@truenas/ui-components 0.1.26 → 0.1.28
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,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ElementRef,
|
|
2
|
+
import { ElementRef, OnDestroy, AfterViewInit, AfterContentInit, TemplateRef, Provider, ChangeDetectorRef, PipeTransform, OnInit, ViewContainerRef, AfterViewChecked } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
4
|
import { ComponentHarness, BaseHarnessFilters, HarnessPredicate, HarnessLoader } from '@angular/cdk/testing';
|
|
5
5
|
import { SafeHtml, SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
|
@@ -253,6 +253,139 @@ interface AutocompleteHarnessFilters extends BaseHarnessFilters {
|
|
|
253
253
|
placeholder?: string;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
type TnDrawerMode = 'side' | 'over';
|
|
257
|
+
type TnDrawerPosition = 'start' | 'end';
|
|
258
|
+
declare class TnDrawerComponent implements OnDestroy {
|
|
259
|
+
private readonly document;
|
|
260
|
+
/** Whether the drawer sits alongside content ('side') or overlays it ('over') */
|
|
261
|
+
mode: _angular_core.InputSignal<TnDrawerMode>;
|
|
262
|
+
/** Whether the drawer is open. Two-way bindable via [(opened)] */
|
|
263
|
+
opened: _angular_core.ModelSignal<boolean>;
|
|
264
|
+
/** Prevent closing via backdrop click or Escape */
|
|
265
|
+
disableClose: _angular_core.InputSignal<boolean>;
|
|
266
|
+
/** Width of the drawer panel (must be a concrete CSS value for smooth transition) */
|
|
267
|
+
width: _angular_core.InputSignal<string>;
|
|
268
|
+
/** Which side the drawer appears on */
|
|
269
|
+
position: _angular_core.InputSignal<TnDrawerPosition>;
|
|
270
|
+
/** Accessible label for the drawer panel */
|
|
271
|
+
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
272
|
+
/** Fires after the open transition completes */
|
|
273
|
+
openedComplete: _angular_core.OutputEmitterRef<void>;
|
|
274
|
+
/** Fires after the close transition completes */
|
|
275
|
+
closed: _angular_core.OutputEmitterRef<void>;
|
|
276
|
+
/** Whether the component has rendered (prevents transition flash on load) */
|
|
277
|
+
protected initialized: _angular_core.WritableSignal<boolean>;
|
|
278
|
+
/** Reference to the overlay element (portaled to body in over mode) */
|
|
279
|
+
protected overlayRef: _angular_core.Signal<ElementRef<any> | undefined>;
|
|
280
|
+
/** Focus trap should be active only in 'over' mode when open */
|
|
281
|
+
protected trapFocus: _angular_core.Signal<boolean>;
|
|
282
|
+
/** Role depends on mode: navigation for side, dialog for over */
|
|
283
|
+
protected panelRole: _angular_core.Signal<"dialog" | "navigation">;
|
|
284
|
+
/** Whether to show the backdrop */
|
|
285
|
+
protected showBackdrop: _angular_core.Signal<boolean>;
|
|
286
|
+
/** CSS classes for the drawer panel */
|
|
287
|
+
protected drawerClasses: _angular_core.Signal<string[]>;
|
|
288
|
+
/** Previous focus element for restoration (only captured in over mode) */
|
|
289
|
+
private previousFocus;
|
|
290
|
+
constructor();
|
|
291
|
+
ngOnDestroy(): void;
|
|
292
|
+
/** Open the drawer */
|
|
293
|
+
open(): void;
|
|
294
|
+
/** Close the drawer */
|
|
295
|
+
close(): void;
|
|
296
|
+
/** Toggle the drawer open/closed */
|
|
297
|
+
toggle(): void;
|
|
298
|
+
/** Handle backdrop click */
|
|
299
|
+
protected onBackdropClick(): void;
|
|
300
|
+
/**
|
|
301
|
+
* Handle Escape key in over mode.
|
|
302
|
+
* Side mode drawers are persistent navigation — Escape is not expected
|
|
303
|
+
* to dismiss them. The header toggle button is the intended control.
|
|
304
|
+
*/
|
|
305
|
+
protected onKeydown(event: KeyboardEvent): void;
|
|
306
|
+
/** Handle transition end — emit events and restore focus after animation completes */
|
|
307
|
+
protected onTransitionEnd(event: TransitionEvent): void;
|
|
308
|
+
private restoreFocus;
|
|
309
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnDrawerComponent, never>;
|
|
310
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnDrawerComponent, "tn-drawer", never, { "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "opened": { "alias": "opened"; "required": false; "isSignal": true; }; "disableClose": { "alias": "disableClose"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "opened": "openedChange"; "openedComplete": "openedComplete"; "closed": "closed"; }, never, ["*"], true, never>;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
declare class TnDrawerContainerComponent {
|
|
314
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnDrawerContainerComponent, never>;
|
|
315
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnDrawerContainerComponent, "tn-drawer-container", never, {}, {}, never, ["*"], true, never>;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare class TnDrawerContentComponent {
|
|
319
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnDrawerContentComponent, never>;
|
|
320
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnDrawerContentComponent, "tn-drawer-content", never, {}, {}, never, ["*"], true, never>;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Harness for interacting with tn-drawer in tests.
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```typescript
|
|
328
|
+
* const drawer = await loader.getHarness(TnDrawerHarness);
|
|
329
|
+
* expect(await drawer.isOpen()).toBe(false);
|
|
330
|
+
* ```
|
|
331
|
+
*/
|
|
332
|
+
declare class TnDrawerHarness extends ComponentHarness {
|
|
333
|
+
static hostSelector: string;
|
|
334
|
+
private _inlinePanel;
|
|
335
|
+
/**
|
|
336
|
+
* Checks whether the drawer panel has the open class.
|
|
337
|
+
* Checks both inline (side mode) and portaled (over mode) panels.
|
|
338
|
+
*
|
|
339
|
+
* @returns Promise resolving to true if the drawer is open.
|
|
340
|
+
*
|
|
341
|
+
* @example
|
|
342
|
+
* ```typescript
|
|
343
|
+
* const drawer = await loader.getHarness(TnDrawerHarness);
|
|
344
|
+
* expect(await drawer.isOpen()).toBe(true);
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
347
|
+
isOpen(): Promise<boolean>;
|
|
348
|
+
/**
|
|
349
|
+
* Checks whether the backdrop overlay is visible.
|
|
350
|
+
*
|
|
351
|
+
* @returns Promise resolving to true if the backdrop is visible.
|
|
352
|
+
*
|
|
353
|
+
* @example
|
|
354
|
+
* ```typescript
|
|
355
|
+
* const drawer = await loader.getHarness(TnDrawerHarness);
|
|
356
|
+
* expect(await drawer.hasBackdrop()).toBe(true);
|
|
357
|
+
* ```
|
|
358
|
+
*/
|
|
359
|
+
hasBackdrop(): Promise<boolean>;
|
|
360
|
+
/**
|
|
361
|
+
* Clicks the backdrop to close the drawer (only available in 'over' mode).
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* const drawer = await loader.getHarness(TnDrawerHarness);
|
|
366
|
+
* await drawer.clickBackdrop();
|
|
367
|
+
* expect(await drawer.isOpen()).toBe(false);
|
|
368
|
+
* ```
|
|
369
|
+
*/
|
|
370
|
+
clickBackdrop(): Promise<void>;
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Harness for interacting with tn-drawer-container in tests.
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```typescript
|
|
377
|
+
* const container = await loader.getHarness(TnDrawerContainerHarness);
|
|
378
|
+
* const drawer = await container.getDrawer();
|
|
379
|
+
* ```
|
|
380
|
+
*/
|
|
381
|
+
declare class TnDrawerContainerHarness extends ComponentHarness {
|
|
382
|
+
static hostSelector: string;
|
|
383
|
+
/**
|
|
384
|
+
* Gets the drawer harness within this container.
|
|
385
|
+
*/
|
|
386
|
+
getDrawer(): Promise<TnDrawerHarness>;
|
|
387
|
+
}
|
|
388
|
+
|
|
256
389
|
declare enum DiskType {
|
|
257
390
|
Hdd = "HDD",
|
|
258
391
|
Ssd = "SSD"
|
|
@@ -1145,7 +1278,7 @@ declare class TnCardComponent {
|
|
|
1145
1278
|
title: _angular_core.InputSignal<string | undefined>;
|
|
1146
1279
|
titleLink: _angular_core.InputSignal<string | undefined>;
|
|
1147
1280
|
elevation: _angular_core.InputSignal<"none" | "low" | "medium" | "high">;
|
|
1148
|
-
padding: _angular_core.InputSignal<"
|
|
1281
|
+
padding: _angular_core.InputSignal<"small" | "large" | "medium">;
|
|
1149
1282
|
padContent: _angular_core.InputSignal<boolean>;
|
|
1150
1283
|
bordered: _angular_core.InputSignal<boolean>;
|
|
1151
1284
|
background: _angular_core.InputSignal<boolean>;
|
|
@@ -1174,12 +1307,12 @@ declare class TnCardComponent {
|
|
|
1174
1307
|
declare class TnExpansionPanelComponent {
|
|
1175
1308
|
title: _angular_core.InputSignal<string | undefined>;
|
|
1176
1309
|
elevation: _angular_core.InputSignal<"none" | "low" | "medium" | "high">;
|
|
1177
|
-
padding: _angular_core.InputSignal<"
|
|
1310
|
+
padding: _angular_core.InputSignal<"small" | "large" | "medium">;
|
|
1178
1311
|
bordered: _angular_core.InputSignal<boolean>;
|
|
1179
1312
|
background: _angular_core.InputSignal<boolean>;
|
|
1180
1313
|
expanded: _angular_core.InputSignal<boolean>;
|
|
1181
1314
|
disabled: _angular_core.InputSignal<boolean>;
|
|
1182
|
-
titleStyle: _angular_core.InputSignal<"
|
|
1315
|
+
titleStyle: _angular_core.InputSignal<"body" | "header" | "link">;
|
|
1183
1316
|
expandedChange: _angular_core.OutputEmitterRef<boolean>;
|
|
1184
1317
|
toggleEvent: _angular_core.OutputEmitterRef<void>;
|
|
1185
1318
|
private internalExpanded;
|
|
@@ -4612,5 +4745,5 @@ declare const TN_THEME_DEFINITIONS: readonly TnThemeDefinition[];
|
|
|
4612
4745
|
*/
|
|
4613
4746
|
declare const THEME_MAP: Map<TnTheme, TnThemeDefinition>;
|
|
4614
4747
|
|
|
4615
|
-
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, StripMntPrefixPipe, THEME_MAP, THEME_STORAGE_KEY, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnConfirmDialogComponent, TnDateInputComponent, TnDateRangeInputComponent, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTabsComponent, TnTabsHarness, TnTheme, TnThemeService, TnTimeInputComponent, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeNodeComponent, TnTreeNodeOutletDirective, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, libIconMarker, registerLucideIcons, setupLucideIntegration, tnIconMarker };
|
|
4616
|
-
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, CreateFolderEvent, DateRange, DialogHarnessFilters, EmptyHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelType, LucideIconOptions, MockIconRegistry, MockSpriteLoader, PathSegment, PlatformType, ProgressBarMode, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SlideToggleColor, SpinnerMode, SpriteConfig, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnEmptySize, TnFlatTreeNode, TnMenuItem, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnTableDataSource, TnThemeDefinition, TooltipPosition, YearCell };
|
|
4748
|
+
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, StripMntPrefixPipe, THEME_MAP, THEME_STORAGE_KEY, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnConfirmDialogComponent, TnDateInputComponent, TnDateRangeInputComponent, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnFilePickerComponent, TnFilePickerPopupComponent, TnFormFieldComponent, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTabsComponent, TnTabsHarness, TnTheme, TnThemeService, TnTimeInputComponent, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeNodeComponent, TnTreeNodeOutletDirective, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, createLucideLibrary, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, libIconMarker, registerLucideIcons, setupLucideIntegration, tnIconMarker };
|
|
4749
|
+
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, CreateFolderEvent, DateRange, DialogHarnessFilters, EmptyHarnessFilters, FilePickerCallbacks, FilePickerError, FilePickerMode, FileSystemItem, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelType, LucideIconOptions, MockIconRegistry, MockSpriteLoader, PathSegment, PlatformType, ProgressBarMode, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SlideToggleColor, SpinnerMode, SpriteConfig, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnMenuItem, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnTableDataSource, TnThemeDefinition, TooltipPosition, YearCell };
|