@agorapulse/ui-components 22.0.32 → 22.1.0

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.
Files changed (28) hide show
  1. package/agorapulse-ui-components-22.1.0.tgz +0 -0
  2. package/fesm2022/agorapulse-ui-components-autocomplete.mjs +5 -3
  3. package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
  4. package/fesm2022/agorapulse-ui-components-datepicker.mjs +3 -2
  5. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  6. package/fesm2022/agorapulse-ui-components-directives.mjs +140 -2
  7. package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
  8. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +7 -2
  9. package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
  10. package/fesm2022/agorapulse-ui-components-input-search.mjs +4 -3
  11. package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
  12. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +3 -3
  13. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
  14. package/fesm2022/agorapulse-ui-components-popmenu.mjs +3 -2
  15. package/fesm2022/agorapulse-ui-components-popmenu.mjs.map +1 -1
  16. package/fesm2022/agorapulse-ui-components-popover.mjs +200 -0
  17. package/fesm2022/agorapulse-ui-components-popover.mjs.map +1 -0
  18. package/fesm2022/agorapulse-ui-components-radio-button-card.mjs +3 -2
  19. package/fesm2022/agorapulse-ui-components-radio-button-card.mjs.map +1 -1
  20. package/fesm2022/agorapulse-ui-components-select.mjs +5 -4
  21. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  22. package/fesm2022/agorapulse-ui-components.mjs +1 -0
  23. package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
  24. package/package.json +5 -1
  25. package/types/agorapulse-ui-components-directives.d.ts +63 -1
  26. package/types/agorapulse-ui-components-popover.d.ts +92 -0
  27. package/types/agorapulse-ui-components.d.ts +2 -0
  28. package/agorapulse-ui-components-22.0.32.tgz +0 -0
@@ -56,6 +56,48 @@ declare class CheckboxDirective implements OnInit, OnDestroy {
56
56
  static ngAcceptInputType_indeterminateInput: unknown;
57
57
  }
58
58
 
59
+ /**
60
+ * Turns a non-interactive element into a control: it receives an ARIA role, enters the
61
+ * tab order and activates with the keyboard, through the `(apClick)` binding alone.
62
+ *
63
+ * Prefer a real `<button>` whenever the layout allows one. Reach for this directive when
64
+ * the element cannot be a button — a table row, a card, a styled anchor with no href.
65
+ *
66
+ * @example
67
+ * ```html
68
+ * <div (apClick)="openPost()">…</div>
69
+ * <span (apClick)="openDocs()" apClickRole="link">…</span>
70
+ * <tr (apClick)="openRow()" [apClickDisabled]="editing()">…</tr>
71
+ * ```
72
+ */
73
+ declare class ClickDirective {
74
+ /** Turns the host back into a plain element: no role, no tab stop, no activation at all. */
75
+ apClickDisabled: i0.InputSignalWithTransform<boolean, unknown>;
76
+ /** ARIA role applied while the host is interactive. */
77
+ apClickRole: i0.InputSignal<string>;
78
+ apClick: i0.OutputEmitterRef<MouseEvent | KeyboardEvent>;
79
+ private host;
80
+ constructor();
81
+ protected isInteractive(): boolean;
82
+ /** The two checks are independent, so an anchor without `href` still gets its contenteditable read. */
83
+ private isNativelyActivated;
84
+ /**
85
+ * `routerLink` counts as an `href`, and is read as a written attribute so the answer does not
86
+ * depend on whether this directive's host bindings run before RouterLink's. A bound
87
+ * `[routerLink]` leaves no attribute, so such an anchor stays plain until RouterLink writes one.
88
+ */
89
+ private isNativeAnchor;
90
+ /** `contenteditable="false"` is explicitly opted out, so only a present, non-"false" value counts. */
91
+ private isContentEditable;
92
+ private warnRedundant;
93
+ protected onClick(event: MouseEvent): void;
94
+ protected onKeydown(event: KeyboardEvent): void;
95
+ /** A link activates on Enter only; every other role also answers Space. */
96
+ private activationKeys;
97
+ static ɵfac: i0.ɵɵFactoryDeclaration<ClickDirective, never>;
98
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ClickDirective, "[apClick]", never, { "apClickDisabled": { "alias": "apClickDisabled"; "required": false; "isSignal": true; }; "apClickRole": { "alias": "apClickRole"; "required": false; "isSignal": true; }; }, { "apClick": "apClick"; }, never, never, true, never>;
99
+ }
100
+
59
101
  declare class DefaultImageDirective {
60
102
  src: string;
61
103
  default: string;
@@ -148,6 +190,26 @@ declare class MultiStyleTextDirective {
148
190
  static ɵdir: i0.ɵɵDirectiveDeclaration<MultiStyleTextDirective, "[multiStyleText]", never, { "multiStyleText": { "alias": "multiStyleText"; "required": false; }; }, { "partEvent": "partEvent"; }, never, never, true, never>;
149
191
  }
150
192
 
193
+ /**
194
+ * Stops a click from reaching the ancestors, without altering the host semantics.
195
+ *
196
+ * Use it on an element nested inside a clickable container — the container's handler
197
+ * must not fire when the inner control is used.
198
+ *
199
+ * @example
200
+ * ```html
201
+ * <div class="row" (click)="openRow()">
202
+ * <div class="row__actions" apStopPropagation>
203
+ * <ap-icon-button symbolId="more" />
204
+ * </div>
205
+ * </div>
206
+ * ```
207
+ */
208
+ declare class StopPropagationDirective {
209
+ static ɵfac: i0.ɵɵFactoryDeclaration<StopPropagationDirective, never>;
210
+ static ɵdir: i0.ɵɵDirectiveDeclaration<StopPropagationDirective, "[apStopPropagation]", never, {}, {}, never, never, true, never>;
211
+ }
212
+
151
213
  /**
152
214
  * Moves a column's body cells with its header cell while columns are reordered.
153
215
  *
@@ -172,4 +234,4 @@ declare class TableColumnDragDirective implements OnInit, OnDestroy {
172
234
  static ɵdir: i0.ɵɵDirectiveDeclaration<TableColumnDragDirective, "table[apTableColumnDrag]", never, {}, {}, never, never, true, never>;
173
235
  }
174
236
 
175
- export { AutosizeTextareaDirective, BaseButtonDirective, CheckboxDirective, DefaultImageDirective, EllipsisDirective, EqualValidatorDirective, FrozenGifDirective, GifService, MultiStyleTextDirective, TableColumnDragDirective };
237
+ export { AutosizeTextareaDirective, BaseButtonDirective, CheckboxDirective, ClickDirective, DefaultImageDirective, EllipsisDirective, EqualValidatorDirective, FrozenGifDirective, GifService, MultiStyleTextDirective, StopPropagationDirective, TableColumnDragDirective };
@@ -0,0 +1,92 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+ import * as _floating_ui_utils from '@floating-ui/utils';
4
+ import { FloatingAnchorMode } from '@agorapulse/ui-components/floating';
5
+
6
+ /**
7
+ * The `role="dialog"` surface, its optional header and its focus trap. Instantiated by the popover
8
+ * directive, never by a consumer.
9
+ *
10
+ * Focus is the CDK's: `cdkTrapFocus` confines Tab, `autoCapture` focuses on open and restores the
11
+ * trigger on destruction. The cost is that Tab cannot leave the panel — Escape or the button do.
12
+ */
13
+ declare class PopoverPanelComponent {
14
+ private static nextId;
15
+ /** The consumer's content. Always a template: the directive sits on the trigger, not here. */
16
+ readonly content: _angular_core.InputSignal<TemplateRef<unknown>>;
17
+ /** Mirrors the popover's heading, and gives the dialog its accessible name. */
18
+ readonly heading: _angular_core.InputSignal<string | undefined>;
19
+ /** Mirrors the popover's input of the same name. */
20
+ readonly closable: _angular_core.InputSignal<boolean>;
21
+ /** Mirrors the popover's backdrop, which is what makes the page genuinely inert. */
22
+ readonly backdrop: _angular_core.InputSignal<boolean>;
23
+ /** Mirrors the popover's, and names the dialog when there is no heading. */
24
+ readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
25
+ readonly closeAriaLabel: _angular_core.InputSignal<string>;
26
+ /** Set by the directive, which needs it for the trigger's `aria-controls`. */
27
+ readonly panelId: _angular_core.InputSignal<string>;
28
+ /**
29
+ * The id of the element that names the dialog when nothing else does — the trigger, set by the
30
+ * directive. An id rather than its text, so the name is computed on the live DOM: that follows a
31
+ * label that changes, and reads a trigger whose own name is an `aria-label`.
32
+ */
33
+ readonly fallbackLabelId: _angular_core.InputSignal<string | undefined>;
34
+ readonly closed: _angular_core.OutputEmitterRef<void>;
35
+ protected readonly headingId: string;
36
+ /** A dialog must be named. The heading does it, failing that the trigger. */
37
+ protected readonly labelledBy: _angular_core.Signal<string | null>;
38
+ protected readonly label: _angular_core.Signal<string | null>;
39
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverPanelComponent, never>;
40
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopoverPanelComponent, "ap-popover-panel", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "backdrop": { "alias": "backdrop"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "closeAriaLabel": { "alias": "closeAriaLabel"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": false; "isSignal": true; }; "fallbackLabelId": { "alias": "fallbackLabelId"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, never, true, never>;
41
+ }
42
+
43
+ /**
44
+ * A click-triggered interactive panel: `role="dialog"`, managed focus, Escape, optional backdrop.
45
+ * A tooltip is the opposite — descriptive, hover-triggered, and never focusable.
46
+ *
47
+ * Sits on the **trigger**, so it owns the trigger's ARIA and the content is always a `TemplateRef`.
48
+ * Inputs are prefixed one by one rather than bundled: an inline config object would be recreated on
49
+ * every change-detection cycle and thrash the overlay.
50
+ *
51
+ * @example
52
+ * <button [apPopover]="shareTpl" apPopoverHeading="Share">Share</button>
53
+ * <ng-template #shareTpl>…</ng-template>
54
+ */
55
+ declare class PopoverDirective {
56
+ private static nextId;
57
+ private readonly instanceId;
58
+ private readonly floating;
59
+ private readonly triggerElement;
60
+ private panelRef;
61
+ /** The panel's content. */
62
+ readonly apPopover: _angular_core.InputSignal<TemplateRef<unknown>>;
63
+ /** Unset means derived from the anchor mode. There is no `'auto'` value. */
64
+ readonly apPopoverPlacement: _angular_core.InputSignal<_floating_ui_utils.Placement | undefined>;
65
+ readonly apPopoverAnchor: _angular_core.InputSignal<FloatingAnchorMode>;
66
+ readonly apPopoverArrow: _angular_core.InputSignal<boolean>;
67
+ readonly apPopoverArrowTarget: _angular_core.InputSignal<"anchor" | "pointer">;
68
+ /** Shows a close button — and, by doing so, makes it *the* way to close: no more outside click. */
69
+ readonly apPopoverClosable: _angular_core.InputSignal<boolean>;
70
+ /** Blocks the page behind. Non-modal by default — that is the point of a popover. */
71
+ readonly apPopoverBackdrop: _angular_core.InputSignal<boolean>;
72
+ /** Optional heading. When set, it becomes the dialog's accessible name. */
73
+ readonly apPopoverHeading: _angular_core.InputSignal<string | undefined>;
74
+ /** Accessible name used when there is no heading. */
75
+ readonly apPopoverAriaLabel: _angular_core.InputSignal<string | undefined>;
76
+ /** An input rather than a hard-coded string: several of the DS's own labels read badly. */
77
+ readonly apPopoverCloseAriaLabel: _angular_core.InputSignal<string>;
78
+ readonly apPopoverPanelClass: _angular_core.InputSignal<string | string[] | undefined>;
79
+ readonly isOpen: _angular_core.Signal<boolean>;
80
+ protected readonly panelId: string;
81
+ open(event?: MouseEvent): void;
82
+ /** The dialog falls back to being named by its trigger, and `aria-labelledby` needs an id to point at. */
83
+ private ensureTriggerId;
84
+ /** The residual case the fallback cannot cover: a trigger that names nothing either. */
85
+ private warnWhenNameless;
86
+ close(): void;
87
+ toggle(event?: MouseEvent): void;
88
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopoverDirective, never>;
89
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<PopoverDirective, "[apPopover]", ["apPopover"], { "apPopover": { "alias": "apPopover"; "required": true; "isSignal": true; }; "apPopoverPlacement": { "alias": "apPopoverPlacement"; "required": false; "isSignal": true; }; "apPopoverAnchor": { "alias": "apPopoverAnchor"; "required": false; "isSignal": true; }; "apPopoverArrow": { "alias": "apPopoverArrow"; "required": false; "isSignal": true; }; "apPopoverArrowTarget": { "alias": "apPopoverArrowTarget"; "required": false; "isSignal": true; }; "apPopoverClosable": { "alias": "apPopoverClosable"; "required": false; "isSignal": true; }; "apPopoverBackdrop": { "alias": "apPopoverBackdrop"; "required": false; "isSignal": true; }; "apPopoverHeading": { "alias": "apPopoverHeading"; "required": false; "isSignal": true; }; "apPopoverAriaLabel": { "alias": "apPopoverAriaLabel"; "required": false; "isSignal": true; }; "apPopoverCloseAriaLabel": { "alias": "apPopoverCloseAriaLabel"; "required": false; "isSignal": true; }; "apPopoverPanelClass": { "alias": "apPopoverPanelClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
90
+ }
91
+
92
+ export { PopoverDirective, PopoverPanelComponent };
@@ -39,6 +39,8 @@ import * as i18 from '@agorapulse/ui-components/tooltip';
39
39
  export { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType, TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';
40
40
  import * as i19 from '@agorapulse/ui-components/add-comment';
41
41
  export { AddCommentComponent } from '@agorapulse/ui-components/add-comment';
42
+ export { PopoverDirective } from '@agorapulse/ui-components/popover';
43
+ export { FloatingAnchorMode, FloatingPlacement, FloatingSide } from '@agorapulse/ui-components/floating';
42
44
  export { DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';
43
45
  export { ActionDropdownComponent, ActionDropdownItem, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';
44
46
  export { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';