@cngx/common 0.1.0-rc.8 → 0.1.0-rc.9
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/command/README.md +29 -0
- package/data/README.md +5 -2
- package/fesm2022/cngx-common-a11y.mjs +403 -84
- package/fesm2022/cngx-common-a11y.mjs.map +1 -1
- package/fesm2022/cngx-common-audio.mjs +16 -13
- package/fesm2022/cngx-common-audio.mjs.map +1 -1
- package/fesm2022/cngx-common-card.mjs +4 -3
- package/fesm2022/cngx-common-card.mjs.map +1 -1
- package/fesm2022/cngx-common-chart.mjs +55 -36
- package/fesm2022/cngx-common-chart.mjs.map +1 -1
- package/fesm2022/cngx-common-command.mjs +60 -6
- package/fesm2022/cngx-common-command.mjs.map +1 -1
- package/fesm2022/cngx-common-data.mjs +185 -37
- package/fesm2022/cngx-common-data.mjs.map +1 -1
- package/fesm2022/cngx-common-dialog.mjs +86 -48
- package/fesm2022/cngx-common-dialog.mjs.map +1 -1
- package/fesm2022/cngx-common-display.mjs +27 -23
- package/fesm2022/cngx-common-display.mjs.map +1 -1
- package/fesm2022/cngx-common-interactive.mjs +324 -122
- package/fesm2022/cngx-common-interactive.mjs.map +1 -1
- package/fesm2022/cngx-common-layout.mjs +129 -26
- package/fesm2022/cngx-common-layout.mjs.map +1 -1
- package/fesm2022/cngx-common-popover.mjs +947 -33
- package/fesm2022/cngx-common-popover.mjs.map +1 -1
- package/fesm2022/cngx-common-stepper.mjs +300 -166
- package/fesm2022/cngx-common-stepper.mjs.map +1 -1
- package/fesm2022/cngx-common-tabs.mjs +251 -80
- package/fesm2022/cngx-common-tabs.mjs.map +1 -1
- package/fesm2022/cngx-common-timeline.mjs +16 -10
- package/fesm2022/cngx-common-timeline.mjs.map +1 -1
- package/fesm2022/cngx-common.mjs +1 -1
- package/layout/README.md +16 -0
- package/package.json +20 -7
- package/popover/README.md +40 -0
- package/schematics/collection.json +9 -0
- package/schematics/ng-add/index.js +9 -0
- package/schematics/ng-add/schema.json +91 -0
- package/schematics/package.json +3 -0
- package/stepper/README.md +5 -4
- package/theming/components/cngx-popover-sheet.css +402 -0
- package/theming/components/cngx-popover.css +10 -6
- package/types/cngx-common-a11y.d.ts +167 -14
- package/types/cngx-common-chart.d.ts +8 -7
- package/types/cngx-common-command.d.ts +19 -2
- package/types/cngx-common-data.d.ts +164 -26
- package/types/cngx-common-dialog.d.ts +3 -7
- package/types/cngx-common-interactive.d.ts +52 -17
- package/types/cngx-common-layout.d.ts +37 -5
- package/types/cngx-common-popover.d.ts +353 -13
- package/types/cngx-common-stepper.d.ts +168 -129
- package/types/cngx-common-tabs.d.ts +149 -30
- package/types/cngx-common-timeline.d.ts +27 -7
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { ElementRef, InjectionToken, Provider, TemplateRef
|
|
2
|
+
import { ElementRef, Signal, InjectionToken, Provider, TemplateRef } from '@angular/core';
|
|
3
3
|
import * as i1 from '@cngx/common/a11y';
|
|
4
|
-
import {
|
|
4
|
+
import { CngxFocusTrapDriver, AriaLivePoliteness } from '@cngx/common/a11y';
|
|
5
|
+
import * as _cngx_core_utils from '@cngx/core/utils';
|
|
6
|
+
import { SlotRegistry, KeyedRegistry, CngxAsyncState, AsyncStatus } from '@cngx/core/utils';
|
|
5
7
|
import { AsyncAction, CngxPending, CngxSucceeded, CngxFailed } from '@cngx/common/interactive';
|
|
6
8
|
import * as i1$1 from '@cngx/common/display';
|
|
7
9
|
|
|
@@ -164,6 +166,22 @@ declare class CngxPopover {
|
|
|
164
166
|
*/
|
|
165
167
|
private _arrowBounds;
|
|
166
168
|
private getArrowBounds;
|
|
169
|
+
/**
|
|
170
|
+
* Presentation seam resolved lazily on first use, same reason as
|
|
171
|
+
* {@link getArrowBounds}: the modifier providing it constructs after this
|
|
172
|
+
* directive. `self: true` keeps a popover nested inside a sheet's host from
|
|
173
|
+
* picking up the outer sheet's seam.
|
|
174
|
+
*/
|
|
175
|
+
private _presentationSeam;
|
|
176
|
+
private presentationSeam;
|
|
177
|
+
/**
|
|
178
|
+
* `false` while a presentation modifier lays the panel out as a sheet or
|
|
179
|
+
* fullscreen. Gates every anchor, margin, fallback and floating write:
|
|
180
|
+
* inline styles beat author CSS, so the sheet stylesheet cannot win
|
|
181
|
+
* against them.
|
|
182
|
+
*/
|
|
183
|
+
private readonly anchored;
|
|
184
|
+
private hiding;
|
|
167
185
|
/** Anchor-relative placement. */
|
|
168
186
|
readonly placement: _angular_core.InputSignal<PopoverPlacement>;
|
|
169
187
|
/**
|
|
@@ -451,6 +469,9 @@ declare class CngxPopover {
|
|
|
451
469
|
* anchor sits outside the panel's inline extent.
|
|
452
470
|
*/
|
|
453
471
|
private updateArrowOffset;
|
|
472
|
+
private arrowFrame;
|
|
473
|
+
private clearFloatingPosition;
|
|
474
|
+
private cancelArrowFrame;
|
|
454
475
|
private get popoverElement();
|
|
455
476
|
private startClosing;
|
|
456
477
|
private finalize;
|
|
@@ -514,6 +535,13 @@ declare class CngxPopoverTrigger {
|
|
|
514
535
|
* `CngxPopoverPanel`'s `'dialog'` default.
|
|
515
536
|
*/
|
|
516
537
|
readonly haspopupInput: _angular_core.InputSignal<PopoverHaspopup | "none" | undefined>;
|
|
538
|
+
/**
|
|
539
|
+
* ARIA controls override. When set, `aria-controls` names this id instead
|
|
540
|
+
* of the popover element - correct when the popup role sits on an element
|
|
541
|
+
* inside the popover (a `role="listbox"` or `role="tree"` panel). `null`
|
|
542
|
+
* or unset falls back to `popoverRef().id()`.
|
|
543
|
+
*/
|
|
544
|
+
readonly controlsInput: _angular_core.InputSignal<string | null | undefined>;
|
|
517
545
|
/**
|
|
518
546
|
* When `true`, remembers the popover's pre-open focus target (the
|
|
519
547
|
* popover snapshots `document.activeElement` synchronously inside
|
|
@@ -531,6 +559,8 @@ declare class CngxPopoverTrigger {
|
|
|
531
559
|
* binding drops the attribute entirely.
|
|
532
560
|
*/
|
|
533
561
|
protected readonly haspopup: _angular_core.Signal<PopoverHaspopup | null>;
|
|
562
|
+
/** Resolved `aria-controls`: the consumer override, else the popover id. */
|
|
563
|
+
protected readonly controls: _angular_core.Signal<string>;
|
|
534
564
|
/**
|
|
535
565
|
* CSS anchor name, yielded (`null`) while a `CngxPopoverAnchor` holds
|
|
536
566
|
* the popover's explicit anchor slot.
|
|
@@ -539,7 +569,7 @@ declare class CngxPopoverTrigger {
|
|
|
539
569
|
private savedFocus;
|
|
540
570
|
constructor();
|
|
541
571
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverTrigger, never>;
|
|
542
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverTrigger, "[cngxPopoverTrigger]", ["cngxPopoverTrigger"], { "popoverRef": { "alias": "cngxPopoverTrigger"; "required": true; "isSignal": true; }; "haspopupInput": { "alias": "haspopup"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
572
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverTrigger, "[cngxPopoverTrigger]", ["cngxPopoverTrigger"], { "popoverRef": { "alias": "cngxPopoverTrigger"; "required": true; "isSignal": true; }; "haspopupInput": { "alias": "haspopup"; "required": false; "isSignal": true; }; "controlsInput": { "alias": "controls"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
543
573
|
}
|
|
544
574
|
|
|
545
575
|
/**
|
|
@@ -712,20 +742,330 @@ declare class CngxTooltip {
|
|
|
712
742
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxTooltip, "[cngxTooltip]", ["cngxTooltip"], { "text": { "alias": "cngxTooltip"; "required": true; "isSignal": true; }; "placement": { "alias": "tooltipPlacement"; "required": false; "isSignal": true; }; "offset": { "alias": "tooltipOffset"; "required": false; "isSignal": true; }; "openDelay": { "alias": "tooltipDelay"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "enabled": { "alias": "enabled"; "required": false; "isSignal": true; }; "triggers": { "alias": "triggers"; "required": false; "isSignal": true; }; "positionTryFallbacks": { "alias": "tooltipPositionTryFallbacks"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.CngxReducedMotion; inputs: {}; outputs: {}; }]>;
|
|
713
743
|
}
|
|
714
744
|
|
|
745
|
+
/**
|
|
746
|
+
* How an open popover is laid out: anchored to its trigger, as a bottom
|
|
747
|
+
* sheet, or filling the viewport.
|
|
748
|
+
*
|
|
749
|
+
* @category common/popover
|
|
750
|
+
* @since 0.1.0
|
|
751
|
+
*/
|
|
752
|
+
type CngxPopoverPresentation = 'anchored' | 'sheet' | 'fullscreen';
|
|
753
|
+
/**
|
|
754
|
+
* @internal Contract between `CngxPopover` and a presentation modifier on the
|
|
755
|
+
* same element. `CngxPopover` drops every anchor and floating write while
|
|
756
|
+
* `presentation()` is not `'anchored'`, and calls `onShown()` / `onHide()`
|
|
757
|
+
* synchronously inside `show()` / `hide()` so the modifier can move focus and
|
|
758
|
+
* release page state in the caller's stack.
|
|
759
|
+
*/
|
|
760
|
+
interface CngxPopoverPresentationSeam {
|
|
761
|
+
readonly presentation: Signal<CngxPopoverPresentation>;
|
|
762
|
+
/** Runs right after `showPopover()`, with the host already `aria-hidden="false"`. */
|
|
763
|
+
onShown(): void;
|
|
764
|
+
/** Runs once per `hide()`, before any close transition starts (state still open). */
|
|
765
|
+
onHide(): void;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Why a sheet asked to close: a swipe on the header or handle, a tap outside
|
|
770
|
+
* the panel, the Android back gesture, or a close control inside the sheet.
|
|
771
|
+
*
|
|
772
|
+
* @category common/popover
|
|
773
|
+
*/
|
|
774
|
+
type CngxPopoverSheetCloseReason = 'swipe' | 'backdrop' | 'back' | 'close';
|
|
775
|
+
/** @internal Handle a `CngxPopoverSheetTitle` registers. */
|
|
776
|
+
interface CngxPopoverSheetTitleHandle {
|
|
777
|
+
readonly id: Signal<string>;
|
|
778
|
+
}
|
|
779
|
+
/** @internal Handle a `CngxPopoverSheetInitialFocus` registers. */
|
|
780
|
+
interface CngxPopoverSheetFocusHandle {
|
|
781
|
+
readonly element: HTMLElement;
|
|
782
|
+
/** Whether the element takes part in the next open. Absent means it does. */
|
|
783
|
+
readonly enabled?: Signal<boolean>;
|
|
784
|
+
}
|
|
785
|
+
/**
|
|
786
|
+
* @internal What the sheet parts need from `CngxPopoverSheet`. A token
|
|
787
|
+
* instead of the directive class keeps the parts free of the directive
|
|
788
|
+
* import (dialog-title precedent, `CNGX_DIALOG_ARIA_REGISTRY`).
|
|
789
|
+
*/
|
|
790
|
+
interface CngxPopoverSheetPartsHost {
|
|
791
|
+
readonly titleRegistry: SlotRegistry<CngxPopoverSheetTitleHandle>;
|
|
792
|
+
/** Keyed by a per-handle uid; the first enabled handle in document order wins. */
|
|
793
|
+
readonly initialFocusRegistry: KeyedRegistry<CngxPopoverSheetFocusHandle>;
|
|
794
|
+
/** `true` while the sheet lays the panel out as sheet or fullscreen. */
|
|
795
|
+
readonly modal: Signal<boolean>;
|
|
796
|
+
requestClose(reason: CngxPopoverSheetCloseReason): void;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* What a consumer asks for: a fixed presentation, or `'auto'` to let the
|
|
801
|
+
* breakpoint in `cngx-popover-sheet.css` decide.
|
|
802
|
+
*
|
|
803
|
+
* @category common/popover
|
|
804
|
+
*/
|
|
805
|
+
type CngxPopoverPresentationRequest = 'auto' | CngxPopoverPresentation;
|
|
806
|
+
/**
|
|
807
|
+
* Turns a `CngxPopover` into a modal bottom sheet or fullscreen panel on
|
|
808
|
+
* coarse, narrow viewports, and leaves it anchored everywhere else.
|
|
809
|
+
*
|
|
810
|
+
* Place it on the `[cngxPopover]` element. With the default `'auto'` request,
|
|
811
|
+
* the breakpoint written once in `cngx-popover-sheet.css`
|
|
812
|
+
* (`(pointer: coarse) and (max-width: 48rem)`) picks between the anchored
|
|
813
|
+
* panel and `autoPresentation` (`'sheet'` or `'fullscreen'`). Pass a fixed
|
|
814
|
+
* presentation to override it.
|
|
815
|
+
*
|
|
816
|
+
* Both non-anchored presentations are modal: the host becomes
|
|
817
|
+
* `role="dialog"` + `aria-modal="true"`, named by its
|
|
818
|
+
* `CngxPopoverSheetTitle`; focus moves into the panel inside `show()`, onto
|
|
819
|
+
* the first enabled `CngxPopoverSheetInitialFocus` (a marked search input
|
|
820
|
+
* focused there keeps the iOS keyboard of a tap open), Tab is trapped, every page
|
|
821
|
+
* sibling is `inert`, the page is pinned, and announcements go through
|
|
822
|
+
* {@link announce} into a live region inside the panel, the only region
|
|
823
|
+
* VoiceOver speaks under `aria-modal`. On close the page is live again and
|
|
824
|
+
* focus is back on the opener before the close transition starts.
|
|
825
|
+
*
|
|
826
|
+
* The sheet never closes itself. Header swipes, outside taps and the Android
|
|
827
|
+
* back gesture arrive as `closeRequested` with a reason; the popover hides
|
|
828
|
+
* unless `closeOnRequest` is `false`, which lets a consumer apply its own
|
|
829
|
+
* dismiss policy. Escape stays with `CngxPopover`'s `closeOnEscape`.
|
|
830
|
+
*
|
|
831
|
+
* Requires `mode="manual"` on the popover (the default): native light dismiss
|
|
832
|
+
* would bypass `closeRequested`.
|
|
833
|
+
*
|
|
834
|
+
* ```html
|
|
835
|
+
* <button type="button" (click)="pop.show()">Choose city</button>
|
|
836
|
+
* <div cngxPopover #pop="cngxPopover" cngxPopoverSheet #sheet="cngxPopoverSheet">
|
|
837
|
+
* <header cngxPopoverSheetHeader cngxSwipeDismiss="down">
|
|
838
|
+
* <span cngxPopoverSheetHandle></span>
|
|
839
|
+
* <h2 cngxPopoverSheetTitle>City</h2>
|
|
840
|
+
* <button type="button" (click)="sheet.requestClose('close')">Close</button>
|
|
841
|
+
* </header>
|
|
842
|
+
* <ul>...</ul>
|
|
843
|
+
* </div>
|
|
844
|
+
* ```
|
|
845
|
+
*
|
|
846
|
+
* @category common/popover
|
|
847
|
+
* @docsKind primary
|
|
848
|
+
* @wcag AA
|
|
849
|
+
* @github https://github.com/cngxjs/cngx/blob/main/projects/common/popover/popover-sheet.directive.ts
|
|
850
|
+
* @since 0.1.0
|
|
851
|
+
* @relatedTo CngxPopover, CngxSwipeDismiss, CngxFocusTrap, createPinnedScrollLock, injectScopedLiveRegion
|
|
852
|
+
* <example-url>http://localhost:4200/#/common/popover/sheet/bottom-sheet</example-url>
|
|
853
|
+
* <example-url>http://localhost:4200/#/common/popover/sheet/fullscreen-search</example-url>
|
|
854
|
+
*/
|
|
855
|
+
declare class CngxPopoverSheet implements CngxPopoverPresentationSeam, CngxPopoverSheetPartsHost, CngxFocusTrapDriver {
|
|
856
|
+
private readonly popover;
|
|
857
|
+
private readonly trap;
|
|
858
|
+
private readonly announcer;
|
|
859
|
+
private readonly doc;
|
|
860
|
+
private readonly injector;
|
|
861
|
+
private readonly win;
|
|
862
|
+
private readonly host;
|
|
863
|
+
private readonly staticRole;
|
|
864
|
+
private readonly staticLabelledBy;
|
|
865
|
+
private readonly staticTabindex;
|
|
866
|
+
/**
|
|
867
|
+
* Requested presentation. `'auto'` (default, also the bare attribute)
|
|
868
|
+
* resolves through the stylesheet breakpoint.
|
|
869
|
+
*/
|
|
870
|
+
readonly request: _angular_core.InputSignalWithTransform<CngxPopoverPresentationRequest, "" | CngxPopoverPresentationRequest>;
|
|
871
|
+
/**
|
|
872
|
+
* What `'auto'` resolves to below the breakpoint: a content-sized `'sheet'`
|
|
873
|
+
* or a `'fullscreen'` panel (for panels led by a text input).
|
|
874
|
+
*/
|
|
875
|
+
readonly autoPresentation: _angular_core.InputSignal<"sheet" | "fullscreen">;
|
|
876
|
+
/** Id of the element naming the dialog. Wins over a registered `CngxPopoverSheetTitle`. */
|
|
877
|
+
readonly labelledBy: _angular_core.InputSignal<string | undefined>;
|
|
878
|
+
/**
|
|
879
|
+
* Whether the sheet returns focus on close (to `restoreTarget`, else to the
|
|
880
|
+
* element focused before it opened). Turn it off when a `closing` handler
|
|
881
|
+
* moves focus itself.
|
|
882
|
+
*/
|
|
883
|
+
readonly restoreFocus: _angular_core.InputSignal<boolean>;
|
|
884
|
+
/** Element to return focus to on close. Defaults to the element focused before open. */
|
|
885
|
+
readonly restoreTarget: _angular_core.InputSignal<HTMLElement | undefined>;
|
|
886
|
+
/**
|
|
887
|
+
* Whether a close request hides the popover. `false` only emits
|
|
888
|
+
* `closeRequested`, so the consumer decides.
|
|
889
|
+
*/
|
|
890
|
+
readonly closeOnRequest: _angular_core.InputSignal<boolean>;
|
|
891
|
+
/** A swipe, outside tap, back gesture or close control asked the sheet to close. */
|
|
892
|
+
readonly closeRequested: _angular_core.OutputEmitterRef<CngxPopoverSheetCloseReason>;
|
|
893
|
+
/**
|
|
894
|
+
* Emits synchronously inside `hide()` while the page is already live again,
|
|
895
|
+
* before the close transition. The place to move focus out of the panel.
|
|
896
|
+
* Fires only for a modal close.
|
|
897
|
+
*/
|
|
898
|
+
readonly closing: _angular_core.OutputEmitterRef<void>;
|
|
899
|
+
private readonly breakpoint;
|
|
900
|
+
/** Resolved presentation, reflected as `data-cngx-presentation`. */
|
|
901
|
+
readonly presentation: _angular_core.Signal<CngxPopoverPresentation>;
|
|
902
|
+
/** `true` in the sheet and fullscreen presentations. */
|
|
903
|
+
readonly modal: _angular_core.Signal<boolean>;
|
|
904
|
+
/** @internal Drives the composed `CngxFocusTrap`: Tab stays inside while modal and visible. */
|
|
905
|
+
readonly focusTrapEnabled: _angular_core.Signal<boolean>;
|
|
906
|
+
/** @internal The sheet moves focus itself, inside `show()`. */
|
|
907
|
+
readonly focusTrapAutoFocus = false;
|
|
908
|
+
/** @internal */
|
|
909
|
+
readonly titleRegistry: _cngx_core_utils.SlotRegistry<CngxPopoverSheetTitleHandle>;
|
|
910
|
+
/** @internal */
|
|
911
|
+
readonly initialFocusRegistry: _cngx_core_utils.KeyedRegistry<CngxPopoverSheetFocusHandle>;
|
|
912
|
+
protected readonly roleAttr: _angular_core.Signal<string | null>;
|
|
913
|
+
protected readonly ariaModal: _angular_core.Signal<"true" | null>;
|
|
914
|
+
protected readonly ariaLabelledBy: _angular_core.Signal<string | null>;
|
|
915
|
+
protected readonly tabindexAttr: _angular_core.Signal<string | null>;
|
|
916
|
+
private readonly region;
|
|
917
|
+
private engaged;
|
|
918
|
+
private savedFocus;
|
|
919
|
+
private inerted;
|
|
920
|
+
private lifted;
|
|
921
|
+
private releaseLock;
|
|
922
|
+
private settlingFrame;
|
|
923
|
+
private warnedTitle;
|
|
924
|
+
private warnedMode;
|
|
925
|
+
private closeWatcher;
|
|
926
|
+
private readonly outsidePointerDown;
|
|
927
|
+
private clickSwallowTimer;
|
|
928
|
+
private escapeKeyTimer;
|
|
929
|
+
private readonly escapeKeydown;
|
|
930
|
+
private readonly swallowClick;
|
|
931
|
+
constructor();
|
|
932
|
+
/** @internal Seam call from `CngxPopover.show()`, after `showPopover()`. */
|
|
933
|
+
onShown(): void;
|
|
934
|
+
/** @internal Seam call from `CngxPopover.hide()`, before the close transition. */
|
|
935
|
+
onHide(): void;
|
|
936
|
+
/**
|
|
937
|
+
* Ask the sheet to close. Emits `closeRequested` once per open (no-op
|
|
938
|
+
* unless the popover is opening or open) and hides when `closeOnRequest`
|
|
939
|
+
* is on.
|
|
940
|
+
*/
|
|
941
|
+
requestClose(reason: CngxPopoverSheetCloseReason): void;
|
|
942
|
+
/**
|
|
943
|
+
* Speak `message` from the live region inside the panel. Use it for
|
|
944
|
+
* every announcement while the sheet is modal: VoiceOver drops body-level
|
|
945
|
+
* regions under `aria-modal`.
|
|
946
|
+
*/
|
|
947
|
+
announce(message: string, politeness?: AriaLivePoliteness): void;
|
|
948
|
+
/**
|
|
949
|
+
* Move focus to the first enabled `CngxPopoverSheetInitialFocus` in
|
|
950
|
+
* document order, else the first tabbable element, else the host. Runs on
|
|
951
|
+
* every modal open.
|
|
952
|
+
*/
|
|
953
|
+
focusInitial(): void;
|
|
954
|
+
private initialFocusTarget;
|
|
955
|
+
protected handleBeforeToggle(event: ToggleEvent): void;
|
|
956
|
+
private disengage;
|
|
957
|
+
private engage;
|
|
958
|
+
private rehomeFocusAfterFlip;
|
|
959
|
+
private focusFirstTaker;
|
|
960
|
+
private focusableAnchor;
|
|
961
|
+
private openerToRestore;
|
|
962
|
+
private release;
|
|
963
|
+
private armCloseWatcher;
|
|
964
|
+
private armClickSwallow;
|
|
965
|
+
private disarmClickSwallow;
|
|
966
|
+
private disarmCloseWatcher;
|
|
967
|
+
private liftOwnInert;
|
|
968
|
+
private applyInert;
|
|
969
|
+
private skipsInert;
|
|
970
|
+
private restoreInert;
|
|
971
|
+
private handOffPendingAnnouncements;
|
|
972
|
+
private startSettling;
|
|
973
|
+
private stopSettling;
|
|
974
|
+
private warnOnMisconfiguration;
|
|
975
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverSheet, never>;
|
|
976
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverSheet, "[cngxPopoverSheet]", ["cngxPopoverSheet"], { "request": { "alias": "cngxPopoverSheet"; "required": false; "isSignal": true; }; "autoPresentation": { "alias": "autoPresentation"; "required": false; "isSignal": true; }; "labelledBy": { "alias": "labelledBy"; "required": false; "isSignal": true; }; "restoreFocus": { "alias": "restoreFocus"; "required": false; "isSignal": true; }; "restoreTarget": { "alias": "restoreTarget"; "required": false; "isSignal": true; }; "closeOnRequest": { "alias": "closeOnRequest"; "required": false; "isSignal": true; }; }, { "closeRequested": "closeRequested"; "closing": "closing"; }, never, never, true, [{ directive: typeof i1.CngxFocusTrap; inputs: {}; outputs: {}; }]>;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Header row of a `CngxPopoverSheet`. Stays put while the content below it
|
|
981
|
+
* scrolls; add `cngxSwipeDismiss="down"` to close the sheet by swiping it.
|
|
982
|
+
*
|
|
983
|
+
* @category common/popover
|
|
984
|
+
* @since 0.1.0
|
|
985
|
+
* @relatedTo CngxPopoverSheet, CngxSwipeDismiss
|
|
986
|
+
*/
|
|
987
|
+
declare class CngxPopoverSheetHeader {
|
|
988
|
+
constructor();
|
|
989
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverSheetHeader, never>;
|
|
990
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverSheetHeader, "[cngxPopoverSheetHeader]", never, {}, {}, never, never, true, never>;
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* The element that names a modal `CngxPopoverSheet`. The sheet points its
|
|
994
|
+
* `aria-labelledby` here, never at the header that also holds buttons.
|
|
995
|
+
*
|
|
996
|
+
* @category common/popover
|
|
997
|
+
* @since 0.1.0
|
|
998
|
+
* @relatedTo CngxPopoverSheet
|
|
999
|
+
*/
|
|
1000
|
+
declare class CngxPopoverSheetTitle implements CngxPopoverSheetTitleHandle {
|
|
1001
|
+
/** Generated id the sheet references. */
|
|
1002
|
+
readonly id: _angular_core.Signal<string>;
|
|
1003
|
+
constructor();
|
|
1004
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverSheetTitle, never>;
|
|
1005
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverSheetTitle, "[cngxPopoverSheetTitle]", never, {}, {}, never, never, true, never>;
|
|
1006
|
+
}
|
|
1007
|
+
/**
|
|
1008
|
+
* Decorative drag handle. Always `aria-hidden`: screen-reader users close
|
|
1009
|
+
* the sheet through its close control, since their swipe is consumed by
|
|
1010
|
+
* navigation.
|
|
1011
|
+
*
|
|
1012
|
+
* @category common/popover
|
|
1013
|
+
* @since 0.1.0
|
|
1014
|
+
* @relatedTo CngxPopoverSheet
|
|
1015
|
+
*/
|
|
1016
|
+
declare class CngxPopoverSheetHandle {
|
|
1017
|
+
constructor();
|
|
1018
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverSheetHandle, never>;
|
|
1019
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverSheetHandle, "[cngxPopoverSheetHandle]", never, {}, {}, never, never, true, never>;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Marks the element that receives focus when a modal `CngxPopoverSheet`
|
|
1023
|
+
* opens, e.g. the search input of a fullscreen panel. Without one the first
|
|
1024
|
+
* tabbable element is focused.
|
|
1025
|
+
*
|
|
1026
|
+
* A panel can mark several elements. The first enabled one in document order
|
|
1027
|
+
* takes focus, so a search field that should lead only some opens binds
|
|
1028
|
+
* `[cngxPopoverSheetInitialFocus]="condition"` and the list below it carries
|
|
1029
|
+
* the bare attribute as the default target. The condition is read when the
|
|
1030
|
+
* sheet opens.
|
|
1031
|
+
*
|
|
1032
|
+
* @category common/popover
|
|
1033
|
+
* @since 0.1.0
|
|
1034
|
+
* @relatedTo CngxPopoverSheet
|
|
1035
|
+
*/
|
|
1036
|
+
declare class CngxPopoverSheetInitialFocus implements CngxPopoverSheetFocusHandle {
|
|
1037
|
+
/** The element focused on open. */
|
|
1038
|
+
readonly element: HTMLElement;
|
|
1039
|
+
/**
|
|
1040
|
+
* `false` keeps this element out of the next open's focus choice. The bare
|
|
1041
|
+
* attribute, or no binding, leaves it enabled.
|
|
1042
|
+
*/
|
|
1043
|
+
readonly enabledInput: _angular_core.InputSignalWithTransform<boolean | undefined, boolean | "" | undefined>;
|
|
1044
|
+
/** @internal Read by the sheet on open. */
|
|
1045
|
+
readonly enabled: _angular_core.Signal<boolean>;
|
|
1046
|
+
private readonly key;
|
|
1047
|
+
constructor();
|
|
1048
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CngxPopoverSheetInitialFocus, never>;
|
|
1049
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverSheetInitialFocus, "[cngxPopoverSheetInitialFocus]", never, { "enabledInput": { "alias": "cngxPopoverSheetInitialFocus"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
interface ComputePositionSignature {
|
|
1053
|
+
computePosition(reference: HTMLElement, floating: HTMLElement, options?: {
|
|
1054
|
+
placement?: string;
|
|
1055
|
+
middleware?: unknown[];
|
|
1056
|
+
}): Promise<{
|
|
1057
|
+
x: number;
|
|
1058
|
+
y: number;
|
|
1059
|
+
placement: string;
|
|
1060
|
+
}>;
|
|
1061
|
+
}
|
|
715
1062
|
/**
|
|
716
1063
|
* Signature matching `@floating-ui/dom` `computePosition`.
|
|
717
1064
|
* The consumer provides the actual function - the library never imports it directly.
|
|
718
1065
|
*
|
|
719
1066
|
* @category common/popover
|
|
720
1067
|
*/
|
|
721
|
-
type ComputePositionFn =
|
|
722
|
-
placement?: string;
|
|
723
|
-
middleware?: unknown[];
|
|
724
|
-
}) => Promise<{
|
|
725
|
-
x: number;
|
|
726
|
-
y: number;
|
|
727
|
-
placement: string;
|
|
728
|
-
}>;
|
|
1068
|
+
type ComputePositionFn = ComputePositionSignature['computePosition'];
|
|
729
1069
|
/**
|
|
730
1070
|
* Configuration for the Floating UI positioning fallback.
|
|
731
1071
|
*
|
|
@@ -1422,5 +1762,5 @@ declare class CngxPopoverDivider {
|
|
|
1422
1762
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<CngxPopoverDivider, "[cngxPopoverDivider]", ["cngxPopoverDivider"], {}, {}, never, never, true, [{ directive: typeof i1$1.CngxDivider; inputs: { "orientation": "orientation"; "inset": "inset"; }; outputs: {}; }]>;
|
|
1423
1763
|
}
|
|
1424
1764
|
|
|
1425
|
-
export { CNGX_FLOATING_FALLBACK, CNGX_POPOVER_ARROW_BOUNDS, CNGX_POPOVER_LANGUAGE_EN, CNGX_POPOVER_PANEL_CONFIG, CngxPopover, CngxPopoverAction, CngxPopoverAnchor, CngxPopoverArrow, CngxPopoverBody, CngxPopoverClose, CngxPopoverDivider, CngxPopoverEmpty, CngxPopoverError, CngxPopoverFooter, CngxPopoverHeader, CngxPopoverLoading, CngxPopoverPanel, CngxPopoverTrigger, CngxTooltip, provideFloatingFallback, providePopoverPanel, withArrow, withArrowTemplate, withAutoDismiss, withCloseButton, withCloseOnSuccess, withDefaultVariant, withPopoverPanelLabels };
|
|
1426
|
-
export type { ArrowEdge, CngxPopoverArrowBounds, CngxPopoverArrowContext, CngxPopoverLanguageSection, CngxPopoverPanelConfig, CngxPopoverPanelLabels, ComputePositionFn, FloatingFallbackConfig, PopoverActionVariant, PopoverHaspopup, PopoverMode, PopoverPanelFeature, PopoverPanelRole, PopoverPlacement, PopoverPositionTryFallback, PopoverState, TooltipTriggerMode };
|
|
1765
|
+
export { CNGX_FLOATING_FALLBACK, CNGX_POPOVER_ARROW_BOUNDS, CNGX_POPOVER_LANGUAGE_EN, CNGX_POPOVER_PANEL_CONFIG, CngxPopover, CngxPopoverAction, CngxPopoverAnchor, CngxPopoverArrow, CngxPopoverBody, CngxPopoverClose, CngxPopoverDivider, CngxPopoverEmpty, CngxPopoverError, CngxPopoverFooter, CngxPopoverHeader, CngxPopoverLoading, CngxPopoverPanel, CngxPopoverSheet, CngxPopoverSheetHandle, CngxPopoverSheetHeader, CngxPopoverSheetInitialFocus, CngxPopoverSheetTitle, CngxPopoverTrigger, CngxTooltip, provideFloatingFallback, providePopoverPanel, withArrow, withArrowTemplate, withAutoDismiss, withCloseButton, withCloseOnSuccess, withDefaultVariant, withPopoverPanelLabels };
|
|
1766
|
+
export type { ArrowEdge, CngxPopoverArrowBounds, CngxPopoverArrowContext, CngxPopoverLanguageSection, CngxPopoverPanelConfig, CngxPopoverPanelLabels, CngxPopoverPresentation, CngxPopoverPresentationRequest, CngxPopoverSheetCloseReason, ComputePositionFn, FloatingFallbackConfig, PopoverActionVariant, PopoverHaspopup, PopoverMode, PopoverPanelFeature, PopoverPanelRole, PopoverPlacement, PopoverPositionTryFallback, PopoverState, TooltipTriggerMode };
|