dasar-ui 2.6.2 → 2.6.4

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,6 +1,6 @@
1
1
  {
2
2
  "name": "dasar-ui",
3
- "version": "2.6.2",
3
+ "version": "2.6.4",
4
4
  "description": "UI component library for Angular",
5
5
  "author": "dxxta",
6
6
  "license": "MIT",
@@ -396,6 +396,38 @@ export declare class DasarNumberInput implements ControlValueAccessor {
396
396
  static ngAcceptInputType_hideOverflow: unknown;
397
397
  }
398
398
  export declare const DasarNumberInputComponent: readonly [typeof DasarNumberInputDecrementSlot, typeof DasarNumberInputIncrementSlot, typeof DasarNumberInputPrefixSlot, typeof DasarNumberInput];
399
+ export type DasarPanelPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
400
+ export type DasarPlacementRect = Pick<DOMRect, 'top' | 'bottom' | 'left' | 'right' | 'width' | 'height'>;
401
+ export interface DasarPlacementTarget {
402
+ getBoundingClientRect(): DasarPlacementRect;
403
+ }
404
+ export declare function computeSmartPlacement(trigger: DasarPlacementTarget, panel: DasarPlacementTarget, preferred: DasarPanelPlacement, margin?: number): DasarPanelPlacement;
405
+ /**
406
+ * Gives a fixed panel the width of its trigger. Do it before measuring the panel, because a fixed
407
+ * panel is as wide as the viewport until it has a width.
408
+ */
409
+ export declare function matchTriggerWidth(trigger: HTMLElement, panel: HTMLElement): void;
410
+ /**
411
+ * Positions a panel with `position: fixed` using viewport coordinates, so it is not
412
+ * clipped by ancestors with `overflow: hidden` (e.g. a card with `hide-overflow`).
413
+ * Hides the panel while its trigger is scrolled out of the clipping ancestors.
414
+ */
415
+ export declare function applyFixedPanelPosition(trigger: HTMLElement, panel: HTMLElement, placement: DasarPanelPlacement, options?: {
416
+ offset?: number;
417
+ matchWidth?: boolean;
418
+ }): void;
419
+ /**
420
+ * Calls `callback` on window resize and on any scroll (including scrollable ancestors),
421
+ * until the owning component is destroyed.
422
+ */
423
+ export declare function listenViewportChanges(callback: () => void, destroyRef: DestroyRef): void;
424
+ /**
425
+ * Keeps a fixed panel positioned while it exists. The first update runs in a microtask, right
426
+ * after the render that created the panel, so it never depends on a timer racing change detection.
427
+ * It repeats when the panel changes size and once more on the next frame if the panel is still
428
+ * hidden. Returns a function that stops watching.
429
+ */
430
+ export declare function watchPanel(panel: HTMLElement, update: () => void): () => void;
399
431
  export type DasarChipAppearanceType = DasarButtonAppearanceType;
400
432
  export type DasarChipVariantType = DasarButtonVariantType;
401
433
  export interface DasarChipConfig {
@@ -527,38 +559,6 @@ export declare class DasarChip {
527
559
  static ngAcceptInputType_fluid: unknown;
528
560
  }
529
561
  export declare const DasarChipComponent: readonly [typeof DasarChip, typeof DasarChipLabelSlot, typeof DasarChipCloseSlot];
530
- export type DasarPanelPlacement = 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
531
- export type DasarPlacementRect = Pick<DOMRect, 'top' | 'bottom' | 'left' | 'right' | 'width' | 'height'>;
532
- export interface DasarPlacementTarget {
533
- getBoundingClientRect(): DasarPlacementRect;
534
- }
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;
541
- /**
542
- * Positions a panel with `position: fixed` using viewport coordinates, so it is not
543
- * clipped by ancestors with `overflow: hidden` (e.g. a card with `hide-overflow`).
544
- * Hides the panel while its trigger is scrolled out of the clipping ancestors.
545
- */
546
- export declare function applyFixedPanelPosition(trigger: HTMLElement, panel: HTMLElement, placement: DasarPanelPlacement, options?: {
547
- offset?: number;
548
- matchWidth?: boolean;
549
- }): void;
550
- /**
551
- * Calls `callback` on window resize and on any scroll (including scrollable ancestors),
552
- * until the owning component is destroyed.
553
- */
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;
562
562
  export type DasarSelectSizeType = Extract<ScaleAttributeType$1, 'sm' | 'md' | 'lg'>;
563
563
  export type DasarSelectPlacementType = DasarPanelPlacement;
564
564
  export type DasarSelectChipSizeType = Extract<ScaleAttributeType$1, 'xs' | 'sm' | 'md' | 'lg' | 'xl'>;
@@ -4999,10 +4999,10 @@ declare function filterTree(items: DasarTreeItem[], matches: (item: DasarTreeIte
4999
4999
  };
5000
5000
  /** Moves a node next to or into another one without changing the input. */
5001
5001
  declare function moveItem(items: DasarTreeItem[], dragKey: DasarTreeKey, targetKey: DasarTreeKey, position: DasarTreeDropPosition): DasarTreeItem[] | null;
5002
- export type DasarTreeType = 'file' | 'selectable' | 'multiple' | null;
5002
+ export type DasarTreeFilterMethod = (item: DasarTreeItem, query: string) => boolean;
5003
5003
  export type DasarTreeSize = Extract<ScaleAttributeType$1, 'sm' | 'md' | 'lg'>;
5004
+ export type DasarTreeType = 'file' | 'selectable' | 'multiple' | null;
5004
5005
  export type DasarTreeSpacing = 'normal' | 'compact';
5005
- export type DasarTreeFilterMethod = (item: DasarTreeItem, query: string) => boolean;
5006
5006
  export interface DasarTreeConfig {
5007
5007
  type?: DasarTreeType;
5008
5008
  size?: DasarTreeSize;