dasar-ui 2.4.0 → 2.4.1
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 +64 -15
- package/fesm2022/dasar-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/dasar-ui.d.ts +27 -0
package/package.json
CHANGED
package/types/dasar-ui.d.ts
CHANGED
|
@@ -533,6 +533,11 @@ 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
|
+
* Gives a fixed panel the width of its trigger. Do it before measuring the panel, because a fixed
|
|
538
|
+
* panel is as wide as the viewport until it has a width.
|
|
539
|
+
*/
|
|
540
|
+
export declare function matchTriggerWidth(trigger: HTMLElement, panel: HTMLElement): void;
|
|
536
541
|
/**
|
|
537
542
|
* Positions a panel with `position: fixed` using viewport coordinates, so it is not
|
|
538
543
|
* clipped by ancestors with `overflow: hidden` (e.g. a card with `hide-overflow`).
|
|
@@ -547,6 +552,13 @@ export declare function applyFixedPanelPosition(trigger: HTMLElement, panel: HTM
|
|
|
547
552
|
* until the owning component is destroyed.
|
|
548
553
|
*/
|
|
549
554
|
export declare function listenViewportChanges(callback: () => void, destroyRef: DestroyRef): void;
|
|
555
|
+
/**
|
|
556
|
+
* Keeps a fixed panel positioned while it exists. The first update runs in a microtask, right
|
|
557
|
+
* after the render that created the panel, so it never depends on a timer racing change detection.
|
|
558
|
+
* It repeats when the panel changes size and once more on the next frame if the panel is still
|
|
559
|
+
* hidden. Returns a function that stops watching.
|
|
560
|
+
*/
|
|
561
|
+
export declare function watchPanel(panel: HTMLElement, update: () => void): () => void;
|
|
550
562
|
export type DasarSelectSizeType = Extract<ScaleAttributeType$1, 'sm' | 'md' | 'lg'>;
|
|
551
563
|
export type DasarSelectPlacementType = DasarPanelPlacement;
|
|
552
564
|
export type DasarSelectChipSizeType = Extract<ScaleAttributeType$1, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;
|
|
@@ -632,6 +644,9 @@ export declare class DasarSelect implements ControlValueAccessor {
|
|
|
632
644
|
searchInput?: ElementRef<HTMLInputElement>;
|
|
633
645
|
triggerEl?: ElementRef<HTMLElement>;
|
|
634
646
|
panelEl?: ElementRef<HTMLElement>;
|
|
647
|
+
private stopWatchingPanel;
|
|
648
|
+
private readonly watchPanelCleanup;
|
|
649
|
+
set panelElRef(ref: ElementRef<HTMLElement> | undefined);
|
|
635
650
|
optionLoadingSlot?: DasarSelectOptionLoadingSlot;
|
|
636
651
|
optionEmptySlot?: DasarSelectOptionEmptySlot;
|
|
637
652
|
optionTemplate?: DasarSelectOptionTemplate;
|
|
@@ -908,6 +923,9 @@ export declare class DasarMenu {
|
|
|
908
923
|
isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
909
924
|
triggerEl?: ElementRef<HTMLElement>;
|
|
910
925
|
panelEl?: ElementRef<HTMLElement>;
|
|
926
|
+
private stopWatchingPanel;
|
|
927
|
+
private readonly watchPanelCleanup;
|
|
928
|
+
set panelElRef(ref: ElementRef<HTMLElement> | undefined);
|
|
911
929
|
private _placement;
|
|
912
930
|
set placement(value: DasarMenuPlacementType);
|
|
913
931
|
get placement(): DasarMenuPlacementType;
|
|
@@ -2355,6 +2373,9 @@ export declare class DasarDatepicker implements OnInit, ControlValueAccessor {
|
|
|
2355
2373
|
prefixSlot?: DasarDatepickerPrefixSlot;
|
|
2356
2374
|
triggerEl?: ElementRef<HTMLElement>;
|
|
2357
2375
|
dropdownEl?: ElementRef<HTMLElement>;
|
|
2376
|
+
private stopWatchingPanel;
|
|
2377
|
+
private readonly watchPanelCleanup;
|
|
2378
|
+
set dropdownElRef(ref: ElementRef<HTMLElement> | undefined);
|
|
2358
2379
|
displayFormat: string;
|
|
2359
2380
|
valueFormat: string;
|
|
2360
2381
|
locale: string;
|
|
@@ -5474,6 +5495,9 @@ export interface DasarThemeCheckbox {
|
|
|
5474
5495
|
hintColor?: string;
|
|
5475
5496
|
hintFontSize?: string;
|
|
5476
5497
|
groupGap?: string;
|
|
5498
|
+
labelFontSizeSm?: string;
|
|
5499
|
+
labelFontSizeMd?: string;
|
|
5500
|
+
labelFontSizeLg?: string;
|
|
5477
5501
|
}
|
|
5478
5502
|
export interface DasarThemeRadio {
|
|
5479
5503
|
gap?: string;
|
|
@@ -5493,6 +5517,9 @@ export interface DasarThemeRadio {
|
|
|
5493
5517
|
hintColor?: string;
|
|
5494
5518
|
hintFontSize?: string;
|
|
5495
5519
|
groupGap?: string;
|
|
5520
|
+
labelFontSizeSm?: string;
|
|
5521
|
+
labelFontSizeMd?: string;
|
|
5522
|
+
labelFontSizeLg?: string;
|
|
5496
5523
|
}
|
|
5497
5524
|
export interface DasarThemeDivider {
|
|
5498
5525
|
color?: string;
|