@cdevhub/ngx-tw 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +108 -0
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-alert.mjs +240 -0
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +287 -0
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +332 -0
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +452 -0
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-button.mjs +227 -0
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +417 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +232 -0
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +4482 -0
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-card.mjs +157 -0
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +1454 -0
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +593 -0
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +228 -0
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +510 -0
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +1721 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +721 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-core.mjs +861 -0
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +1558 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +1833 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +693 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +331 -0
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +289 -0
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +572 -0
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +36 -0
- package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +278 -0
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-input.mjs +355 -0
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-item.mjs +241 -0
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +433 -0
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +691 -0
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +678 -0
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +335 -0
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +708 -0
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +319 -0
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs +1722 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +115 -0
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +768 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +149 -0
- package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +1147 -0
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +346 -0
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs +186 -0
- package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-split.mjs +1082 -0
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +579 -0
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +443 -0
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +391 -0
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +315 -0
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-table.mjs +994 -0
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +508 -0
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +147 -0
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +178 -0
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +1344 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +1136 -0
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +1311 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +533 -0
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw.mjs +61 -0
- package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -0
- package/package.json +265 -0
- package/theme/_base.css +394 -0
- package/theme/_dark.css +510 -0
- package/theme/_high-contrast.css +290 -0
- package/theme/_semantic.css +317 -0
- package/theme/_typography.css +9 -0
- package/theme/index.css +54 -0
- package/types/cdevhub-ngx-tw-accordion.d.ts +48 -0
- package/types/cdevhub-ngx-tw-alert.d.ts +67 -0
- package/types/cdevhub-ngx-tw-avatar.d.ts +79 -0
- package/types/cdevhub-ngx-tw-badge.d.ts +94 -0
- package/types/cdevhub-ngx-tw-breadcrumbs.d.ts +227 -0
- package/types/cdevhub-ngx-tw-button.d.ts +74 -0
- package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +200 -0
- package/types/cdevhub-ngx-tw-calendar-testing.d.ts +113 -0
- package/types/cdevhub-ngx-tw-calendar.d.ts +1704 -0
- package/types/cdevhub-ngx-tw-card.d.ts +48 -0
- package/types/cdevhub-ngx-tw-carousel.d.ts +406 -0
- package/types/cdevhub-ngx-tw-checkbox.d.ts +136 -0
- package/types/cdevhub-ngx-tw-code-block.d.ts +93 -0
- package/types/cdevhub-ngx-tw-collapsible.d.ts +151 -0
- package/types/cdevhub-ngx-tw-combobox.d.ts +389 -0
- package/types/cdevhub-ngx-tw-command-palette.d.ts +215 -0
- package/types/cdevhub-ngx-tw-core.d.ts +719 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +317 -0
- package/types/cdevhub-ngx-tw-date-range-picker.d.ts +313 -0
- package/types/cdevhub-ngx-tw-dialog.d.ts +303 -0
- package/types/cdevhub-ngx-tw-empty-state.d.ts +104 -0
- package/types/cdevhub-ngx-tw-flip-card.d.ts +95 -0
- package/types/cdevhub-ngx-tw-form-field.d.ts +210 -0
- package/types/cdevhub-ngx-tw-icon-lucide.d.ts +29 -0
- package/types/cdevhub-ngx-tw-icon.d.ts +134 -0
- package/types/cdevhub-ngx-tw-input.d.ts +110 -0
- package/types/cdevhub-ngx-tw-item.d.ts +70 -0
- package/types/cdevhub-ngx-tw-menu.d.ts +99 -0
- package/types/cdevhub-ngx-tw-paginator.d.ts +305 -0
- package/types/cdevhub-ngx-tw-popover.d.ts +157 -0
- package/types/cdevhub-ngx-tw-progress-bar.d.ts +100 -0
- package/types/cdevhub-ngx-tw-radio.d.ts +174 -0
- package/types/cdevhub-ngx-tw-segmented-control.d.ts +66 -0
- package/types/cdevhub-ngx-tw-select.d.ts +384 -0
- package/types/cdevhub-ngx-tw-separator.d.ts +28 -0
- package/types/cdevhub-ngx-tw-sheet.d.ts +335 -0
- package/types/cdevhub-ngx-tw-skeleton.d.ts +52 -0
- package/types/cdevhub-ngx-tw-slider.d.ts +258 -0
- package/types/cdevhub-ngx-tw-sort.d.ts +136 -0
- package/types/cdevhub-ngx-tw-spinner.d.ts +50 -0
- package/types/cdevhub-ngx-tw-split.d.ts +265 -0
- package/types/cdevhub-ngx-tw-stat.d.ts +140 -0
- package/types/cdevhub-ngx-tw-stepper.d.ts +127 -0
- package/types/cdevhub-ngx-tw-switch.d.ts +88 -0
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +107 -0
- package/types/cdevhub-ngx-tw-table.d.ts +479 -0
- package/types/cdevhub-ngx-tw-tabs.d.ts +121 -0
- package/types/cdevhub-ngx-tw-textarea.d.ts +62 -0
- package/types/cdevhub-ngx-tw-theme.d.ts +106 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +303 -0
- package/types/cdevhub-ngx-tw-timeline.d.ts +278 -0
- package/types/cdevhub-ngx-tw-toast.d.ts +388 -0
- package/types/cdevhub-ngx-tw-tooltip.d.ts +95 -0
- package/types/cdevhub-ngx-tw.d.ts +49 -0
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, EventEmitter, ComponentRef, OnDestroy, TemplateRef, EnvironmentProviders, OnInit } from '@angular/core';
|
|
3
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import { DialogConfig, AutoFocusTarget, RestoreFocusValue, DialogRole, CdkDialogContainer, DialogRef } from '@angular/cdk/dialog';
|
|
6
|
+
import { OverlayContainerAnimationEvent, OverlayContainerState, TwColor } from '@cdevhub/ngx-tw/core';
|
|
7
|
+
import * as i1 from '@angular/cdk/scrolling';
|
|
8
|
+
|
|
9
|
+
/** Preset sizes mapped to width constraints for the dialog panel. */
|
|
10
|
+
type TwDialogSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'fullscreen';
|
|
11
|
+
/** ARIA role of the dialog element. Use `'alertdialog'` for destructive confirmation prompts. */
|
|
12
|
+
type TwDialogRole = DialogRole;
|
|
13
|
+
/** Where to move focus when the dialog opens. */
|
|
14
|
+
type TwDialogAutoFocus = AutoFocusTarget | string | boolean;
|
|
15
|
+
/** How to restore focus on close. `true` restores to the previously focused element; a selector or element targets a specific node. */
|
|
16
|
+
type TwDialogRestoreFocus = RestoreFocusValue;
|
|
17
|
+
/** Scroll behavior for content underneath the dialog. */
|
|
18
|
+
type TwDialogScrollStrategy = 'block' | 'close' | 'reposition' | 'noop';
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for opening a dialog with {@link TwDialog.open}.
|
|
21
|
+
*
|
|
22
|
+
* Mirrors the shape of `@angular/cdk/dialog`'s `DialogConfig` with additional
|
|
23
|
+
* tailwind-focused options (`size`, `enterAnimationDuration`, etc.).
|
|
24
|
+
*/
|
|
25
|
+
declare class TwDialogConfig<D = unknown, R = unknown> extends DialogConfig<D, R> {
|
|
26
|
+
/** Preset size for the dialog panel. Ignored when `width`/`maxWidth` are provided. Defaults to `'md'`. */
|
|
27
|
+
size?: TwDialogSize;
|
|
28
|
+
/** Duration of the open animation in ms. Defaults to `150`. Use `0` to disable. */
|
|
29
|
+
enterAnimationDuration?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Duration of the close animation in ms. Defaults to `120`. Use `0` to disable.
|
|
32
|
+
* Asymmetric with `enterAnimationDuration` by design: the close transition is
|
|
33
|
+
* slightly faster so the dialog feels dismissive rather than reluctant.
|
|
34
|
+
*/
|
|
35
|
+
exitAnimationDuration?: number;
|
|
36
|
+
/** Scroll strategy preset applied when `scrollStrategy` isn't set. Defaults to `'block'`. */
|
|
37
|
+
scrollBehavior?: TwDialogScrollStrategy;
|
|
38
|
+
/** Maximum width. Number values are treated as pixels. Defaults to `'calc(100vw - 32px)'`. */
|
|
39
|
+
maxWidth?: number | string;
|
|
40
|
+
/**
|
|
41
|
+
* Whether the dialog is modal — sets `aria-modal` on the container.
|
|
42
|
+
* Defaults to `true`: a `role="dialog"` opened over the page is modal by
|
|
43
|
+
* default and the rest of the document is inert while it is open. Set to
|
|
44
|
+
* `false` only for non-modal surfaces (rare; consider `popover` instead).
|
|
45
|
+
*/
|
|
46
|
+
ariaModal?: boolean;
|
|
47
|
+
/** Whether Escape and backdrop clicks are blocked. Defaults to `false`. */
|
|
48
|
+
disableClose?: boolean;
|
|
49
|
+
/** Where to move focus when the dialog opens. Defaults to `'first-tabbable'`. */
|
|
50
|
+
autoFocus?: TwDialogAutoFocus;
|
|
51
|
+
/** Whether to restore focus to the previously focused element after close. Defaults to `true`. */
|
|
52
|
+
restoreFocus?: TwDialogRestoreFocus;
|
|
53
|
+
/** Whether the dialog renders a backdrop. Defaults to `true`. */
|
|
54
|
+
hasBackdrop?: boolean;
|
|
55
|
+
/** Whether navigation (e.g. router) closes the dialog. Defaults to `true`. */
|
|
56
|
+
closeOnNavigation?: boolean;
|
|
57
|
+
}
|
|
58
|
+
/** Injection token carrying the `data` value passed via {@link TwDialogConfig.data}. */
|
|
59
|
+
declare const TW_DIALOG_DATA: InjectionToken<unknown>;
|
|
60
|
+
/** Injection token for application-wide default dialog options. Set via `provideTwDialog()`. */
|
|
61
|
+
declare const TW_DIALOG_DEFAULT_OPTIONS: InjectionToken<Partial<TwDialogConfig<unknown, unknown>>>;
|
|
62
|
+
|
|
63
|
+
/** Lifecycle states a dialog passes through. */
|
|
64
|
+
type DialogState = OverlayContainerState;
|
|
65
|
+
/** Event emitted when the dialog's animation state transitions. */
|
|
66
|
+
type DialogAnimationEvent = OverlayContainerAnimationEvent;
|
|
67
|
+
/**
|
|
68
|
+
* Dialog container rendered inside the CDK overlay. Wraps the user-provided
|
|
69
|
+
* content in a Tailwind-styled surface and coordinates enter/exit transitions
|
|
70
|
+
* with {@link TwDialogRef}.
|
|
71
|
+
*
|
|
72
|
+
* The animation state machine, `aria-describedby` queue, and panel-class
|
|
73
|
+
* merge are shared with `SheetContainer` via {@link OverlayContainerCoordinator}
|
|
74
|
+
* (component-scoped — see `providers: [OverlayContainerCoordinator]`).
|
|
75
|
+
*
|
|
76
|
+
* @docs-private
|
|
77
|
+
*/
|
|
78
|
+
declare class DialogContainer extends CdkDialogContainer<TwDialogConfig> {
|
|
79
|
+
private readonly coordinator;
|
|
80
|
+
/** Lifecycle state of the dialog's enter/exit animation. */
|
|
81
|
+
readonly state: Signal<DialogState>;
|
|
82
|
+
/** Emits whenever the animation state transitions. */
|
|
83
|
+
readonly animationStateChanged: EventEmitter<DialogAnimationEvent>;
|
|
84
|
+
/** Resolved enter-animation duration in ms. */
|
|
85
|
+
readonly enterAnimationDuration: number;
|
|
86
|
+
/** Resolved exit-animation duration in ms. */
|
|
87
|
+
readonly exitAnimationDuration: number;
|
|
88
|
+
private readonly sizeVariant;
|
|
89
|
+
protected readonly hostClasses: Signal<string>;
|
|
90
|
+
protected readonly ariaDescribedByAttr: Signal<string | null>;
|
|
91
|
+
protected readonly transitionDuration: Signal<number>;
|
|
92
|
+
constructor();
|
|
93
|
+
protected _contentAttached(): void;
|
|
94
|
+
/** Triggered by the dialog ref to play the exit transition before disposing the overlay. */
|
|
95
|
+
_startExitAnimation(): void;
|
|
96
|
+
/** Registers a description id for the container's `aria-describedby`. */
|
|
97
|
+
_addAriaDescribedBy(id: string): void;
|
|
98
|
+
/** Removes a previously registered description id. */
|
|
99
|
+
_removeAriaDescribedBy(id: string): void;
|
|
100
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogContainer, never>;
|
|
101
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogContainer, "tw-dialog-container", never, {}, {}, never, never, true, never>;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Reference to a dialog opened via {@link TwDialog.open}. Drives the dialog
|
|
106
|
+
* lifecycle (close, state, observables) and forwards useful overlay streams.
|
|
107
|
+
*/
|
|
108
|
+
declare class TwDialogRef<R = unknown, C = unknown> {
|
|
109
|
+
private readonly cdkRef;
|
|
110
|
+
readonly config: TwDialogConfig<unknown, R>;
|
|
111
|
+
readonly containerInstance: DialogContainer;
|
|
112
|
+
/** Unique ID of the dialog. */
|
|
113
|
+
readonly id: string;
|
|
114
|
+
/** Instance of the component rendered inside the dialog, or `null` for template dialogs. */
|
|
115
|
+
componentInstance: C | null;
|
|
116
|
+
/** `ComponentRef` of the content component, or `null` for template dialogs. */
|
|
117
|
+
readonly componentRef: ComponentRef<C> | null;
|
|
118
|
+
/** Current lifecycle state. Reactively readable. */
|
|
119
|
+
readonly state: Signal<DialogState>;
|
|
120
|
+
/** When `true`, close-via-escape and close-via-backdrop are disabled. */
|
|
121
|
+
disableClose: boolean | undefined;
|
|
122
|
+
private readonly stateSignal;
|
|
123
|
+
private readonly afterOpenedSubject;
|
|
124
|
+
private readonly beforeClosedSubject;
|
|
125
|
+
private readonly afterClosedSubject;
|
|
126
|
+
private pendingResult;
|
|
127
|
+
private closeFocusOrigin;
|
|
128
|
+
constructor(cdkRef: DialogRef<R, C>, config: TwDialogConfig<unknown, R>, containerInstance: DialogContainer);
|
|
129
|
+
/**
|
|
130
|
+
* Closes the dialog. The exit animation runs before the overlay is disposed.
|
|
131
|
+
* @param result Value forwarded to `afterClosed()` subscribers.
|
|
132
|
+
*/
|
|
133
|
+
close(result?: R): void;
|
|
134
|
+
/** Observable that emits once after the enter animation finishes. */
|
|
135
|
+
afterOpened(): Observable<void>;
|
|
136
|
+
/** Observable that emits once when the close animation starts. */
|
|
137
|
+
beforeClosed(): Observable<R | undefined>;
|
|
138
|
+
/** Observable that emits once after the dialog has fully closed and the overlay is disposed. */
|
|
139
|
+
afterClosed(): Observable<R | undefined>;
|
|
140
|
+
/** Backdrop click stream (emits even when `disableClose` is set). */
|
|
141
|
+
backdropClick(): Observable<MouseEvent>;
|
|
142
|
+
/** Keydown event stream for the overlay. */
|
|
143
|
+
keydownEvents(): Observable<KeyboardEvent>;
|
|
144
|
+
/** Updates the dialog's width/height. Pass empty string to reset a dimension. */
|
|
145
|
+
updateSize(width?: string | number, height?: string | number): this;
|
|
146
|
+
/** Adds CSS classes to the overlay panel. */
|
|
147
|
+
addPanelClass(classes: string | string[]): this;
|
|
148
|
+
/** Removes CSS classes from the overlay panel. */
|
|
149
|
+
removePanelClass(classes: string | string[]): this;
|
|
150
|
+
private closeWithOrigin;
|
|
151
|
+
private finishClose;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Opens Tailwind-styled modal dialogs. Composes `@angular/cdk/dialog` for focus
|
|
156
|
+
* trapping, portals, overlay plumbing, and adds a Tailwind container, richer
|
|
157
|
+
* ref API, and animation lifecycle.
|
|
158
|
+
*
|
|
159
|
+
* Not `providedIn: 'root'` — register it via {@link provideTwDialog}.
|
|
160
|
+
*/
|
|
161
|
+
declare class TwDialog implements OnDestroy {
|
|
162
|
+
private readonly cdkDialog;
|
|
163
|
+
private readonly injector;
|
|
164
|
+
private readonly defaultOptions;
|
|
165
|
+
private readonly parentDialog;
|
|
166
|
+
private readonly openDialogsAtThisLevel;
|
|
167
|
+
private readonly afterOpenedSubject;
|
|
168
|
+
private readonly afterAllClosedSubject;
|
|
169
|
+
/** Reactively-readable list of currently-open dialogs across the full dialog tree. */
|
|
170
|
+
readonly openDialogs: Signal<readonly TwDialogRef<unknown, unknown>[]>;
|
|
171
|
+
/** Emits every time a dialog is opened. */
|
|
172
|
+
readonly afterOpened: Observable<TwDialogRef<unknown, unknown>>;
|
|
173
|
+
/**
|
|
174
|
+
* Emits when every open dialog has closed. Emits immediately on subscribe if
|
|
175
|
+
* there are none open.
|
|
176
|
+
*/
|
|
177
|
+
readonly afterAllClosed: Observable<void>;
|
|
178
|
+
/**
|
|
179
|
+
* Opens a dialog using the given component or template.
|
|
180
|
+
* @param content Component class or `TemplateRef`.
|
|
181
|
+
* @param config Options merged over the application defaults.
|
|
182
|
+
* @returns Reference controlling the opened dialog.
|
|
183
|
+
*/
|
|
184
|
+
open<R = unknown, D = unknown, C = unknown>(content: ComponentType<C> | TemplateRef<C>, config?: TwDialogConfig<D, R>): TwDialogRef<R, C>;
|
|
185
|
+
/** Closes every open dialog managed by this service (and child services). */
|
|
186
|
+
closeAll(): void;
|
|
187
|
+
/** Looks up an open dialog by its id. */
|
|
188
|
+
getDialogById<R = unknown, C = unknown>(id: string): TwDialogRef<R, C> | undefined;
|
|
189
|
+
ngOnDestroy(): void;
|
|
190
|
+
private registerOpen;
|
|
191
|
+
private unregister;
|
|
192
|
+
private getAfterAllClosedSource;
|
|
193
|
+
private resolveConfig;
|
|
194
|
+
private resolveScrollStrategy;
|
|
195
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TwDialog, never>;
|
|
196
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TwDialog>;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Registers the {@link TwDialog} service for dependency injection.
|
|
200
|
+
*
|
|
201
|
+
* @param defaultOptions Optional defaults merged into every `open()` call.
|
|
202
|
+
* @example
|
|
203
|
+
* ```ts
|
|
204
|
+
* provideTwDialog({ size: 'lg', hasBackdrop: true })
|
|
205
|
+
* ```
|
|
206
|
+
*/
|
|
207
|
+
declare function provideTwDialog(defaultOptions?: Partial<TwDialogConfig>): EnvironmentProviders;
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* Header wrapper for a dialog. Provides consistent padding and spacing for
|
|
211
|
+
* title + subtitle + leading icon, and separates the header from scrollable
|
|
212
|
+
* content below.
|
|
213
|
+
*/
|
|
214
|
+
declare class DialogHeaderDirective {
|
|
215
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogHeaderDirective, never>;
|
|
216
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogHeaderDirective, "[twDialogHeader], tw-dialog-header", never, {}, {}, never, never, true, never>;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Decorative leading icon for a dialog header. Use with a semantic `color` to
|
|
220
|
+
* match destructive / informational / success dialogs.
|
|
221
|
+
*/
|
|
222
|
+
declare class DialogIconDirective {
|
|
223
|
+
/** Semantic color for the icon container. Defaults to a neutral surface. */
|
|
224
|
+
readonly color: i0.InputSignal<TwColor | undefined>;
|
|
225
|
+
protected readonly classes: i0.Signal<string>;
|
|
226
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogIconDirective, never>;
|
|
227
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogIconDirective, "[twDialogIcon]", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Dialog title. Registers its ID with the container's `aria-labelledby` queue
|
|
231
|
+
* so screen readers announce it automatically.
|
|
232
|
+
*/
|
|
233
|
+
declare class DialogTitleDirective implements OnInit, OnDestroy {
|
|
234
|
+
private readonly generatedId;
|
|
235
|
+
private readonly dialogRef;
|
|
236
|
+
private readonly container;
|
|
237
|
+
/** Custom id for the title element. Defaults to a generated unique id. */
|
|
238
|
+
readonly id: i0.InputSignal<string>;
|
|
239
|
+
ngOnInit(): void;
|
|
240
|
+
ngOnDestroy(): void;
|
|
241
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogTitleDirective, never>;
|
|
242
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogTitleDirective, "[twDialogTitle], tw-dialog-title", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
243
|
+
}
|
|
244
|
+
/** Secondary line beneath the dialog title — intended for a short description. */
|
|
245
|
+
declare class DialogSubtitleDirective {
|
|
246
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogSubtitleDirective, never>;
|
|
247
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogSubtitleDirective, "[twDialogSubtitle], tw-dialog-subtitle", never, {}, {}, never, never, true, never>;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Dialog description. Registers its ID with the container's `aria-describedby`
|
|
251
|
+
* queue so screen readers announce the descriptive paragraph after the title.
|
|
252
|
+
* Mirrors {@link DialogTitleDirective} but for `aria-describedby`.
|
|
253
|
+
*/
|
|
254
|
+
declare class DialogDescriptionDirective implements OnInit, OnDestroy {
|
|
255
|
+
private readonly generatedId;
|
|
256
|
+
private readonly dialogRef;
|
|
257
|
+
private readonly container;
|
|
258
|
+
/** Custom id for the description element. Defaults to a generated unique id. */
|
|
259
|
+
readonly id: i0.InputSignal<string>;
|
|
260
|
+
ngOnInit(): void;
|
|
261
|
+
ngOnDestroy(): void;
|
|
262
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogDescriptionDirective, never>;
|
|
263
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDescriptionDirective, "[twDialogDescription], tw-dialog-description", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
264
|
+
}
|
|
265
|
+
/**
|
|
266
|
+
* Scrollable content region of the dialog. Apply between the header and the
|
|
267
|
+
* actions bar. Inherits CDK's `CdkScrollable` to play nicely with scroll
|
|
268
|
+
* strategies and nested scrollables.
|
|
269
|
+
*/
|
|
270
|
+
declare class DialogContentDirective {
|
|
271
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogContentDirective, never>;
|
|
272
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogContentDirective, "[twDialogContent], tw-dialog-content", never, {}, {}, never, never, true, [{ directive: typeof i1.CdkScrollable; inputs: {}; outputs: {}; }]>;
|
|
273
|
+
}
|
|
274
|
+
/** Horizontal alignment for dialog action buttons. */
|
|
275
|
+
type DialogActionsAlign = 'start' | 'center' | 'end';
|
|
276
|
+
/**
|
|
277
|
+
* Bottom action bar of a dialog. Use inside the dialog content or template to
|
|
278
|
+
* host Cancel/Confirm buttons. Stays pinned below scrollable content.
|
|
279
|
+
*/
|
|
280
|
+
declare class DialogActionsDirective {
|
|
281
|
+
/** Horizontal alignment of the action buttons. Defaults to `'end'`. */
|
|
282
|
+
readonly align: i0.InputSignal<DialogActionsAlign>;
|
|
283
|
+
protected readonly classes: i0.Signal<string>;
|
|
284
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogActionsDirective, never>;
|
|
285
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogActionsDirective, "[twDialogActions], tw-dialog-actions", never, { "align": { "alias": "align"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Closes the enclosing dialog when the host button is clicked. Provide a
|
|
289
|
+
* `[twDialogClose]` value to pass a result to `afterClosed()` subscribers.
|
|
290
|
+
*/
|
|
291
|
+
declare class DialogCloseDirective {
|
|
292
|
+
/** Value passed to `afterClosed()` when the button is clicked. */
|
|
293
|
+
readonly twDialogClose: i0.InputSignal<unknown>;
|
|
294
|
+
/** Native button `type`. Defaults to `'button'` to avoid accidental form submission. */
|
|
295
|
+
readonly type: i0.InputSignal<"button" | "submit" | "reset">;
|
|
296
|
+
private readonly dialogRef;
|
|
297
|
+
protected onClick(): void;
|
|
298
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogCloseDirective, never>;
|
|
299
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DialogCloseDirective, "[twDialogClose]", never, { "twDialogClose": { "alias": "twDialogClose"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export { DialogActionsDirective, DialogCloseDirective, DialogContainer, DialogContentDirective, DialogDescriptionDirective, DialogHeaderDirective, DialogIconDirective, DialogSubtitleDirective, DialogTitleDirective, TW_DIALOG_DATA, TW_DIALOG_DEFAULT_OPTIONS, TwDialog, TwDialogConfig, TwDialogRef, provideTwDialog };
|
|
303
|
+
export type { DialogActionsAlign, DialogAnimationEvent, DialogState, TwDialogAutoFocus, TwDialogRestoreFocus, TwDialogRole, TwDialogScrollStrategy, TwDialogSize };
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef } from '@angular/core';
|
|
3
|
+
import { TwSize } from '@cdevhub/ngx-tw/core';
|
|
4
|
+
|
|
5
|
+
/** Layout style of the empty state. */
|
|
6
|
+
type EmptyStateVariant = 'centered' | 'inline';
|
|
7
|
+
/** Heading level for the title element. Matches native `<h1>`–`<h6>`. */
|
|
8
|
+
type EmptyStateTitleLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
9
|
+
/**
|
|
10
|
+
* Icon-slot marker. Project an icon element with `twEmptyStateIcon` to
|
|
11
|
+
* replace the fallback `<tw-icon name="inbox">`.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <tw-empty-state>
|
|
16
|
+
* <tw-icon twEmptyStateIcon name="search" />
|
|
17
|
+
* </tw-empty-state>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare class EmptyStateIconDirective {
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmptyStateIconDirective, never>;
|
|
22
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EmptyStateIconDirective, "[twEmptyStateIcon]", never, {}, {}, never, never, true, never>;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Structural title slot. Captures a `TemplateRef` so the heading can be
|
|
26
|
+
* rendered into the dynamic `<h1>`–`<h6>` wrapper at runtime.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```html
|
|
30
|
+
* <tw-empty-state>
|
|
31
|
+
* <span *twEmptyStateTitle>No results <tw-badge>0</tw-badge></span>
|
|
32
|
+
* </tw-empty-state>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare class EmptyStateTitleDirective {
|
|
36
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
37
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmptyStateTitleDirective, never>;
|
|
38
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EmptyStateTitleDirective, "[twEmptyStateTitle]", never, {}, {}, never, never, true, never>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Structural description slot. Captures a `TemplateRef` so the content can
|
|
42
|
+
* be rendered into the `<p>` wrapper.
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```html
|
|
46
|
+
* <tw-empty-state>
|
|
47
|
+
* <span *twEmptyStateDescription>Try a <a href="…">different search</a>.</span>
|
|
48
|
+
* </tw-empty-state>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare class EmptyStateDescriptionDirective {
|
|
52
|
+
readonly templateRef: TemplateRef<unknown>;
|
|
53
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmptyStateDescriptionDirective, never>;
|
|
54
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EmptyStateDescriptionDirective, "[twEmptyStateDescription]", never, {}, {}, never, never, true, never>;
|
|
55
|
+
}
|
|
56
|
+
/** Actions-slot directive. Carries the actions row classes (`flex gap-2` etc.) on its host. */
|
|
57
|
+
declare class EmptyStateActionsDirective {
|
|
58
|
+
private readonly emptyStateRef;
|
|
59
|
+
readonly classes: _angular_core.Signal<string>;
|
|
60
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmptyStateActionsDirective, never>;
|
|
61
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<EmptyStateActionsDirective, "[twEmptyStateActions]", never, {}, {}, never, never, true, never>;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Zero-data layout primitive. Renders an icon, title, description, and
|
|
65
|
+
* actions for surfaces that have nothing to display.
|
|
66
|
+
*
|
|
67
|
+
* The component is intentionally neutral — accent comes from projected
|
|
68
|
+
* action buttons. It does not announce itself: consumers that want a live
|
|
69
|
+
* announcement (e.g. "no search results found") wrap the component with
|
|
70
|
+
* `<div role="status" aria-live="polite">…</div>` themselves.
|
|
71
|
+
*/
|
|
72
|
+
declare class EmptyStateComponent {
|
|
73
|
+
/** Controls overall spacing and icon scale. Defaults to `'md'`. */
|
|
74
|
+
readonly size: _angular_core.InputSignal<TwSize>;
|
|
75
|
+
/** Layout style. `'centered'` stacks icon/title/description/actions vertically with center alignment for full-region usage; `'inline'` arranges them horizontally for compact rows. Defaults to `'centered'`. */
|
|
76
|
+
readonly variant: _angular_core.InputSignal<EmptyStateVariant>;
|
|
77
|
+
/** Primary heading text. Projected `*twEmptyStateTitle` content takes precedence. Defaults to `undefined`. */
|
|
78
|
+
readonly title: _angular_core.InputSignal<string | undefined>;
|
|
79
|
+
/** Secondary descriptive text. Projected `*twEmptyStateDescription` content takes precedence. Defaults to `undefined`. */
|
|
80
|
+
readonly description: _angular_core.InputSignal<string | undefined>;
|
|
81
|
+
/** Heading level used for the title element. Set to match the surrounding document outline. Defaults to `3`. */
|
|
82
|
+
readonly titleLevel: _angular_core.InputSignal<EmptyStateTitleLevel>;
|
|
83
|
+
/** @internal */
|
|
84
|
+
readonly titleSlot: _angular_core.Signal<EmptyStateTitleDirective | undefined>;
|
|
85
|
+
/** @internal */
|
|
86
|
+
readonly descriptionSlot: _angular_core.Signal<EmptyStateDescriptionDirective | undefined>;
|
|
87
|
+
readonly hasTitleSlot: _angular_core.Signal<boolean>;
|
|
88
|
+
readonly hasDescriptionSlot: _angular_core.Signal<boolean>;
|
|
89
|
+
readonly hasTitle: _angular_core.Signal<boolean>;
|
|
90
|
+
readonly hasDescription: _angular_core.Signal<boolean>;
|
|
91
|
+
/** Size passed to the fallback `<tw-icon>` per CLAUDE.md glyph sub-scale. */
|
|
92
|
+
readonly iconSize: _angular_core.Signal<TwSize>;
|
|
93
|
+
private readonly variantResult;
|
|
94
|
+
readonly rootClasses: _angular_core.Signal<string>;
|
|
95
|
+
readonly iconWrapperClasses: _angular_core.Signal<string>;
|
|
96
|
+
readonly titleClasses: _angular_core.Signal<string>;
|
|
97
|
+
readonly descriptionClasses: _angular_core.Signal<string>;
|
|
98
|
+
readonly actionsClasses: _angular_core.Signal<string>;
|
|
99
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
|
|
100
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmptyStateComponent, "tw-empty-state", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "titleLevel": { "alias": "titleLevel"; "required": false; "isSignal": true; }; }, {}, ["titleSlot", "descriptionSlot"], ["[twEmptyStateIcon]", "[twEmptyStateActions]"], true, never>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export { EmptyStateActionsDirective, EmptyStateComponent, EmptyStateDescriptionDirective, EmptyStateIconDirective, EmptyStateTitleDirective };
|
|
104
|
+
export type { EmptyStateTitleLevel, EmptyStateVariant };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
|
|
3
|
+
/** Visual style of the flip card chrome. Mirrors `tw-card`. */
|
|
4
|
+
type FlipCardVariant = 'outlined' | 'elevated' | 'ghost';
|
|
5
|
+
/** Axis of rotation for the flip animation. */
|
|
6
|
+
type FlipCardDirection = 'horizontal' | 'vertical';
|
|
7
|
+
/** Which user interaction flips the card. */
|
|
8
|
+
type FlipCardTrigger = 'hover' | 'click' | 'manual' | 'both';
|
|
9
|
+
/**
|
|
10
|
+
* Two-faced card with a CSS 3D-perspective flip animation.
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* **Hard theme dependency.** The flip animation is driven by helper classes
|
|
14
|
+
* (`tw-flip-perspective`, `tw-flip-inner`, `tw-flip-face`, `tw-flip-back-face`,
|
|
15
|
+
* `tw-flip-axis-x`, `tw-flip-axis-y`, `tw-flip-rotated`, `tw-flip-back-x`,
|
|
16
|
+
* `tw-flip-back-y`) declared in `projects/ngx-tw/theme/_base.css` and re-exported
|
|
17
|
+
* via `ngx-tw/theme/default.css`. Consumers MUST import the theme stylesheet —
|
|
18
|
+
* without it the card renders as two stacked faces with no perspective and no
|
|
19
|
+
* rotation, and there is no run-time fallback. `prefers-reduced-motion: reduce`
|
|
20
|
+
* is handled in the theme CSS, not here.
|
|
21
|
+
*/
|
|
22
|
+
declare class FlipCardComponent {
|
|
23
|
+
/**
|
|
24
|
+
* Visual style of the card chrome. Mirrors `tw-card`'s variant vocabulary.
|
|
25
|
+
* Defaults to `'outlined'` (vs `tw-card`'s `'elevated'` default) so the flip
|
|
26
|
+
* animation reads more clearly without a baseline shadow underneath.
|
|
27
|
+
*/
|
|
28
|
+
readonly variant: _angular_core.InputSignal<FlipCardVariant>;
|
|
29
|
+
/** Axis of rotation. `'horizontal'` rotates around the Y axis (left/right flip); `'vertical'` rotates around the X axis (top/bottom flip). Defaults to `'horizontal'`. */
|
|
30
|
+
readonly direction: _angular_core.InputSignal<FlipCardDirection>;
|
|
31
|
+
/** Which user action flips the card. `'both'` enables click and hover. `'manual'` disables all triggers and defers control to the `flipped` model. Defaults to `'both'`. */
|
|
32
|
+
readonly trigger: _angular_core.InputSignal<FlipCardTrigger>;
|
|
33
|
+
/** When true, all triggers and keyboard handling are disabled; the current face stays visible. Defaults to `false`. */
|
|
34
|
+
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
35
|
+
/** Whether the back face is currently visible. Two-way bindable via `[(flipped)]`. Defaults to `false`. The `flippedChange` event fires on every toggle. */
|
|
36
|
+
readonly flipped: _angular_core.ModelSignal<boolean>;
|
|
37
|
+
/**
|
|
38
|
+
* Accessible name for the host element. Required when `trigger` is
|
|
39
|
+
* `'manual'` (the host renders as `role="region"`, which AXE requires to
|
|
40
|
+
* have an accessible name); a default of `'Flip card'` is used in that
|
|
41
|
+
* mode if no value is provided. In interactive modes the host's accessible
|
|
42
|
+
* name is normally derived from the visible face's content — set this
|
|
43
|
+
* input to override.
|
|
44
|
+
*/
|
|
45
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
46
|
+
private readonly liveAnnouncer;
|
|
47
|
+
private readonly destroyRef;
|
|
48
|
+
private readonly backWrapper;
|
|
49
|
+
private readonly _hasBack;
|
|
50
|
+
/** @internal */
|
|
51
|
+
readonly hasBack: _angular_core.Signal<boolean>;
|
|
52
|
+
/** @internal */
|
|
53
|
+
readonly interactive: _angular_core.Signal<boolean>;
|
|
54
|
+
/** @internal */
|
|
55
|
+
readonly hostRole: _angular_core.Signal<"region" | "button">;
|
|
56
|
+
/** @internal */
|
|
57
|
+
readonly hostTabindex: _angular_core.Signal<0 | null>;
|
|
58
|
+
/** @internal */
|
|
59
|
+
readonly ariaPressed: _angular_core.Signal<string | null>;
|
|
60
|
+
/** @internal */
|
|
61
|
+
readonly ariaLive: _angular_core.Signal<"polite" | null>;
|
|
62
|
+
/** @internal */
|
|
63
|
+
readonly ariaDisabled: _angular_core.Signal<"true" | null>;
|
|
64
|
+
/** @internal */
|
|
65
|
+
readonly hostAriaLabel: _angular_core.Signal<string | null>;
|
|
66
|
+
/** @internal */
|
|
67
|
+
readonly frontAriaHidden: _angular_core.Signal<"true" | null>;
|
|
68
|
+
/** @internal */
|
|
69
|
+
readonly backAriaHidden: _angular_core.Signal<"true" | null>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
readonly frontInert: _angular_core.Signal<"" | null>;
|
|
72
|
+
/** @internal */
|
|
73
|
+
readonly backInert: _angular_core.Signal<"" | null>;
|
|
74
|
+
private readonly variantResult;
|
|
75
|
+
readonly rootClasses: _angular_core.Signal<string>;
|
|
76
|
+
readonly innerClasses: _angular_core.Signal<string>;
|
|
77
|
+
readonly frontClasses: _angular_core.Signal<string>;
|
|
78
|
+
readonly backClasses: _angular_core.Signal<string>;
|
|
79
|
+
constructor();
|
|
80
|
+
/** @internal */
|
|
81
|
+
onClick(): void;
|
|
82
|
+
/** @internal */
|
|
83
|
+
onKeydown(event: KeyboardEvent): void;
|
|
84
|
+
/** @internal */
|
|
85
|
+
onMouseEnter(): void;
|
|
86
|
+
/** @internal */
|
|
87
|
+
onMouseLeave(): void;
|
|
88
|
+
private toggle;
|
|
89
|
+
private setFlipped;
|
|
90
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FlipCardComponent, never>;
|
|
91
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FlipCardComponent, "tw-flip-card", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "flipped": { "alias": "flipped"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "flipped": "flippedChange"; }, never, ["[slot='front']", "[slot='back']"], true, never>;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export { FlipCardComponent };
|
|
95
|
+
export type { FlipCardDirection, FlipCardTrigger, FlipCardVariant };
|