dasar-ui 2.2.1 → 2.2.2
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/dasar-ui.mjs +85 -50
- package/fesm2022/dasar-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/dasar-ui.d.ts +18 -4
package/package.json
CHANGED
package/types/dasar-ui.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, OnInit, QueryList, RendererFactory2, SimpleChanges, TemplateRef } from "@angular/core";
|
|
2
|
+
import { AfterContentInit, AfterViewInit, DestroyRef, ElementRef, EventEmitter, InjectionToken, OnChanges, OnDestroy, OnInit, QueryList, RendererFactory2, SimpleChanges, TemplateRef } from "@angular/core";
|
|
3
3
|
import { ControlValueAccessor } from "@angular/forms";
|
|
4
4
|
import { ScaleAttributeType } from "@models/type.model";
|
|
5
5
|
import { SafeHtml } from "@angular/platform-browser";
|
|
@@ -533,6 +533,20 @@ export interface DasarPlacementTarget {
|
|
|
533
533
|
getBoundingClientRect(): DasarPlacementRect;
|
|
534
534
|
}
|
|
535
535
|
export declare function computeSmartPlacement(trigger: DasarPlacementTarget, panel: DasarPlacementTarget, preferred: DasarPanelPlacement, margin?: number): DasarPanelPlacement;
|
|
536
|
+
/**
|
|
537
|
+
* Positions a panel with `position: fixed` using viewport coordinates, so it is not
|
|
538
|
+
* clipped by ancestors with `overflow: hidden` (e.g. a card with `hide-overflow`).
|
|
539
|
+
* Hides the panel while its trigger is scrolled out of the clipping ancestors.
|
|
540
|
+
*/
|
|
541
|
+
export declare function applyFixedPanelPosition(trigger: HTMLElement, panel: HTMLElement, placement: DasarPanelPlacement, options?: {
|
|
542
|
+
offset?: number;
|
|
543
|
+
matchWidth?: boolean;
|
|
544
|
+
}): void;
|
|
545
|
+
/**
|
|
546
|
+
* Calls `callback` on window resize and on any scroll (including scrollable ancestors),
|
|
547
|
+
* until the owning component is destroyed.
|
|
548
|
+
*/
|
|
549
|
+
export declare function listenViewportChanges(callback: () => void, destroyRef: DestroyRef): void;
|
|
536
550
|
export type DasarSelectSizeType = Extract<ScaleAttributeType$1, 'sm' | 'md' | 'lg'>;
|
|
537
551
|
export type DasarSelectPlacementType = DasarPanelPlacement;
|
|
538
552
|
export type DasarSelectChipSizeType = Extract<ScaleAttributeType$1, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;
|
|
@@ -695,7 +709,7 @@ export declare class DasarSelect implements ControlValueAccessor {
|
|
|
695
709
|
clearSelection(event: Event): void;
|
|
696
710
|
toggleDropdown(): void;
|
|
697
711
|
openPanel(): void;
|
|
698
|
-
|
|
712
|
+
private viewportListener;
|
|
699
713
|
private recalculatePlacement;
|
|
700
714
|
closePanel(): void;
|
|
701
715
|
isOptionSelected(option: DasarSelectOption): boolean;
|
|
@@ -920,7 +934,7 @@ export declare class DasarMenu {
|
|
|
920
934
|
get hasMenuLabel(): boolean;
|
|
921
935
|
get hasMenuItem(): boolean;
|
|
922
936
|
get itemIconSize(): number;
|
|
923
|
-
|
|
937
|
+
private viewportListener;
|
|
924
938
|
private recalculatePlacement;
|
|
925
939
|
toggle(event?: Event): void;
|
|
926
940
|
open(): void;
|
|
@@ -2163,7 +2177,7 @@ export declare class DasarDatepicker implements OnInit, ControlValueAccessor {
|
|
|
2163
2177
|
private setFocus;
|
|
2164
2178
|
get iconSize(): number;
|
|
2165
2179
|
toggleDropdown(event: Event): void;
|
|
2166
|
-
|
|
2180
|
+
private viewportListener;
|
|
2167
2181
|
clearValue(event: Event): void;
|
|
2168
2182
|
onCalendarSelect(date: Date | null): void;
|
|
2169
2183
|
private formatReturnValue;
|