@agorapulse/ui-components 22.0.32 → 22.0.33
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/agorapulse-ui-components-22.0.33.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-popover.mjs +200 -0
- package/fesm2022/agorapulse-ui-components-popover.mjs.map +1 -0
- package/fesm2022/agorapulse-ui-components.mjs +1 -0
- package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
- package/package.json +5 -1
- package/types/agorapulse-ui-components-popover.d.ts +92 -0
- package/types/agorapulse-ui-components.d.ts +2 -0
- package/agorapulse-ui-components-22.0.32.tgz +0 -0
|
Binary file
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';
|
|
2
|
+
import { CdkTrapFocus } from '@angular/cdk/a11y';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import * as i0 from '@angular/core';
|
|
5
|
+
import { input, output, computed, ChangeDetectionStrategy, Component, inject, ElementRef, Directive } from '@angular/core';
|
|
6
|
+
import { createFloatingOverlay } from '@agorapulse/ui-components/floating';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* The `role="dialog"` surface, its optional header and its focus trap. Instantiated by the popover
|
|
10
|
+
* directive, never by a consumer.
|
|
11
|
+
*
|
|
12
|
+
* Focus is the CDK's: `cdkTrapFocus` confines Tab, `autoCapture` focuses on open and restores the
|
|
13
|
+
* trigger on destruction. The cost is that Tab cannot leave the panel — Escape or the button do.
|
|
14
|
+
*/
|
|
15
|
+
class PopoverPanelComponent {
|
|
16
|
+
static nextId = 0;
|
|
17
|
+
/** The consumer's content. Always a template: the directive sits on the trigger, not here. */
|
|
18
|
+
content = input.required(/* @ts-ignore */
|
|
19
|
+
...(ngDevMode ? [{ debugName: "content" }] : /* istanbul ignore next */ []));
|
|
20
|
+
/** Mirrors the popover's heading, and gives the dialog its accessible name. */
|
|
21
|
+
heading = input(/* @ts-ignore */
|
|
22
|
+
...(ngDevMode ? [undefined, { debugName: "heading" }] : /* istanbul ignore next */ []));
|
|
23
|
+
/** Mirrors the popover's input of the same name. */
|
|
24
|
+
closable = input(false, /* @ts-ignore */
|
|
25
|
+
...(ngDevMode ? [{ debugName: "closable" }] : /* istanbul ignore next */ []));
|
|
26
|
+
/** Mirrors the popover's backdrop, which is what makes the page genuinely inert. */
|
|
27
|
+
backdrop = input(false, /* @ts-ignore */
|
|
28
|
+
...(ngDevMode ? [{ debugName: "backdrop" }] : /* istanbul ignore next */ []));
|
|
29
|
+
/** Mirrors the popover's, and names the dialog when there is no heading. */
|
|
30
|
+
ariaLabel = input(/* @ts-ignore */
|
|
31
|
+
...(ngDevMode ? [undefined, { debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
32
|
+
closeAriaLabel = input('Close', /* @ts-ignore */
|
|
33
|
+
...(ngDevMode ? [{ debugName: "closeAriaLabel" }] : /* istanbul ignore next */ []));
|
|
34
|
+
/** Set by the directive, which needs it for the trigger's `aria-controls`. */
|
|
35
|
+
panelId = input('', /* @ts-ignore */
|
|
36
|
+
...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
|
|
37
|
+
/**
|
|
38
|
+
* The id of the element that names the dialog when nothing else does — the trigger, set by the
|
|
39
|
+
* directive. An id rather than its text, so the name is computed on the live DOM: that follows a
|
|
40
|
+
* label that changes, and reads a trigger whose own name is an `aria-label`.
|
|
41
|
+
*/
|
|
42
|
+
fallbackLabelId = input(/* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [undefined, { debugName: "fallbackLabelId" }] : /* istanbul ignore next */ []));
|
|
44
|
+
closed = output();
|
|
45
|
+
headingId = `ap-popover-heading-${PopoverPanelComponent.nextId++}`;
|
|
46
|
+
/** A dialog must be named. The heading does it, failing that the trigger. */
|
|
47
|
+
labelledBy = computed(() => {
|
|
48
|
+
if (this.heading()) {
|
|
49
|
+
return this.headingId;
|
|
50
|
+
}
|
|
51
|
+
return this.ariaLabel() ? null : (this.fallbackLabelId() ?? null);
|
|
52
|
+
}, /* @ts-ignore */
|
|
53
|
+
...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
54
|
+
label = computed(() => (this.heading() ? null : (this.ariaLabel() ?? null)), /* @ts-ignore */
|
|
55
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: PopoverPanelComponent, isStandalone: true, selector: "ap-popover-panel", inputs: { content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: true, transformFunction: null }, heading: { classPropertyName: "heading", publicName: "heading", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, backdrop: { classPropertyName: "backdrop", publicName: "backdrop", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, closeAriaLabel: { classPropertyName: "closeAriaLabel", publicName: "closeAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, panelId: { classPropertyName: "panelId", publicName: "panelId", isSignal: true, isRequired: false, transformFunction: null }, fallbackLabelId: { classPropertyName: "fallbackLabelId", publicName: "fallbackLabelId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, ngImport: i0, template: "<div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\">\n <div\n class=\"ap-popover__panel\"\n role=\"dialog\"\n tabindex=\"-1\"\n cdkFocusInitial\n [id]=\"panelId()\"\n [attr.aria-modal]=\"backdrop() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"label()\">\n @if (heading() || closable()) {\n <div class=\"ap-popover__header\">\n @if (heading()) {\n <h2\n class=\"ap-popover__heading\"\n [id]=\"headingId\">\n {{ heading() }}\n </h2>\n }\n @if (closable()) {\n <ap-close-button\n [ariaLabel]=\"closeAriaLabel()\"\n (closed)=\"closed.emit()\" />\n }\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"content()\" />\n </div>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;background-color:var(--comp-popover-background-color);border-radius:var(--comp-popover-border-radius);box-shadow:var(--comp-popover-box-shadow);padding:var(--comp-popover-padding)}.ap-popover__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--comp-popover-header-gap);margin-bottom:var(--comp-popover-header-margin-bottom)}.ap-popover__heading{margin:0;color:var(--comp-popover-heading-color);font-family:var(--comp-popover-heading-font-family);font-size:var(--comp-popover-heading-size);font-weight:var(--comp-popover-heading-weight);line-height:var(--comp-popover-heading-line-height)}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: CloseButtonComponent, selector: "ap-close-button", inputs: ["disabled", "ariaLabel", "dataTest"], outputs: ["closed"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
58
|
+
}
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverPanelComponent, decorators: [{
|
|
60
|
+
type: Component,
|
|
61
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-popover-panel', imports: [CdkTrapFocus, CloseButtonComponent, NgTemplateOutlet], template: "<div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\">\n <div\n class=\"ap-popover__panel\"\n role=\"dialog\"\n tabindex=\"-1\"\n cdkFocusInitial\n [id]=\"panelId()\"\n [attr.aria-modal]=\"backdrop() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"label()\">\n @if (heading() || closable()) {\n <div class=\"ap-popover__header\">\n @if (heading()) {\n <h2\n class=\"ap-popover__heading\"\n [id]=\"headingId\">\n {{ heading() }}\n </h2>\n }\n @if (closable()) {\n <ap-close-button\n [ariaLabel]=\"closeAriaLabel()\"\n (closed)=\"closed.emit()\" />\n }\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"content()\" />\n </div>\n</div>\n", styles: [":host{display:block;box-sizing:border-box;background-color:var(--comp-popover-background-color);border-radius:var(--comp-popover-border-radius);box-shadow:var(--comp-popover-box-shadow);padding:var(--comp-popover-padding)}.ap-popover__header{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--comp-popover-header-gap);margin-bottom:var(--comp-popover-header-margin-bottom)}.ap-popover__heading{margin:0;color:var(--comp-popover-heading-color);font-family:var(--comp-popover-heading-font-family);font-size:var(--comp-popover-heading-size);font-weight:var(--comp-popover-heading-weight);line-height:var(--comp-popover-heading-line-height)}\n"] }]
|
|
62
|
+
}], propDecorators: { content: [{ type: i0.Input, args: [{ isSignal: true, alias: "content", required: true }] }], heading: [{ type: i0.Input, args: [{ isSignal: true, alias: "heading", required: false }] }], closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], backdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "backdrop", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], closeAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeAriaLabel", required: false }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], fallbackLabelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallbackLabelId", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A click-triggered interactive panel: `role="dialog"`, managed focus, Escape, optional backdrop.
|
|
66
|
+
* A tooltip is the opposite — descriptive, hover-triggered, and never focusable.
|
|
67
|
+
*
|
|
68
|
+
* Sits on the **trigger**, so it owns the trigger's ARIA and the content is always a `TemplateRef`.
|
|
69
|
+
* Inputs are prefixed one by one rather than bundled: an inline config object would be recreated on
|
|
70
|
+
* every change-detection cycle and thrash the overlay.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* <button [apPopover]="shareTpl" apPopoverHeading="Share">Share</button>
|
|
74
|
+
* <ng-template #shareTpl>…</ng-template>
|
|
75
|
+
*/
|
|
76
|
+
class PopoverDirective {
|
|
77
|
+
static nextId = 0;
|
|
78
|
+
instanceId = PopoverDirective.nextId++;
|
|
79
|
+
floating = createFloatingOverlay();
|
|
80
|
+
triggerElement = inject(ElementRef);
|
|
81
|
+
panelRef = null;
|
|
82
|
+
/** The panel's content. */
|
|
83
|
+
apPopover = input.required(/* @ts-ignore */
|
|
84
|
+
...(ngDevMode ? [{ debugName: "apPopover" }] : /* istanbul ignore next */ []));
|
|
85
|
+
/** Unset means derived from the anchor mode. There is no `'auto'` value. */
|
|
86
|
+
apPopoverPlacement = input(/* @ts-ignore */
|
|
87
|
+
...(ngDevMode ? [undefined, { debugName: "apPopoverPlacement" }] : /* istanbul ignore next */ []));
|
|
88
|
+
apPopoverAnchor = input('trigger', /* @ts-ignore */
|
|
89
|
+
...(ngDevMode ? [{ debugName: "apPopoverAnchor" }] : /* istanbul ignore next */ []));
|
|
90
|
+
apPopoverArrow = input(false, /* @ts-ignore */
|
|
91
|
+
...(ngDevMode ? [{ debugName: "apPopoverArrow" }] : /* istanbul ignore next */ []));
|
|
92
|
+
apPopoverArrowTarget = input('anchor', /* @ts-ignore */
|
|
93
|
+
...(ngDevMode ? [{ debugName: "apPopoverArrowTarget" }] : /* istanbul ignore next */ []));
|
|
94
|
+
/** Shows a close button — and, by doing so, makes it *the* way to close: no more outside click. */
|
|
95
|
+
apPopoverClosable = input(false, /* @ts-ignore */
|
|
96
|
+
...(ngDevMode ? [{ debugName: "apPopoverClosable" }] : /* istanbul ignore next */ []));
|
|
97
|
+
/** Blocks the page behind. Non-modal by default — that is the point of a popover. */
|
|
98
|
+
apPopoverBackdrop = input(false, /* @ts-ignore */
|
|
99
|
+
...(ngDevMode ? [{ debugName: "apPopoverBackdrop" }] : /* istanbul ignore next */ []));
|
|
100
|
+
/** Optional heading. When set, it becomes the dialog's accessible name. */
|
|
101
|
+
apPopoverHeading = input(/* @ts-ignore */
|
|
102
|
+
...(ngDevMode ? [undefined, { debugName: "apPopoverHeading" }] : /* istanbul ignore next */ []));
|
|
103
|
+
/** Accessible name used when there is no heading. */
|
|
104
|
+
apPopoverAriaLabel = input(/* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [undefined, { debugName: "apPopoverAriaLabel" }] : /* istanbul ignore next */ []));
|
|
106
|
+
/** An input rather than a hard-coded string: several of the DS's own labels read badly. */
|
|
107
|
+
apPopoverCloseAriaLabel = input('Close', /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "apPopoverCloseAriaLabel" }] : /* istanbul ignore next */ []));
|
|
109
|
+
apPopoverPanelClass = input(/* @ts-ignore */
|
|
110
|
+
...(ngDevMode ? [undefined, { debugName: "apPopoverPanelClass" }] : /* istanbul ignore next */ []));
|
|
111
|
+
isOpen = this.floating.isOpen;
|
|
112
|
+
panelId = `ap-popover-${this.instanceId}`;
|
|
113
|
+
open(event) {
|
|
114
|
+
if (this.isOpen())
|
|
115
|
+
return;
|
|
116
|
+
this.panelRef = this.floating.open(PopoverPanelComponent, this.triggerElement.nativeElement, {
|
|
117
|
+
placement: this.apPopoverPlacement(),
|
|
118
|
+
anchor: this.apPopoverAnchor(),
|
|
119
|
+
arrow: this.apPopoverArrow(),
|
|
120
|
+
arrowTarget: this.apPopoverArrowTarget(),
|
|
121
|
+
showBackdrop: this.apPopoverBackdrop(),
|
|
122
|
+
panelClass: this.apPopoverPanelClass(),
|
|
123
|
+
// Escape always closes: APG requires it of a dialog. An outside click does not.
|
|
124
|
+
onEscape: () => this.close(),
|
|
125
|
+
onOutsideClick: () => {
|
|
126
|
+
if (!this.apPopoverClosable()) {
|
|
127
|
+
this.close();
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
}, event);
|
|
131
|
+
this.panelRef?.setInput('content', this.apPopover());
|
|
132
|
+
this.panelRef?.setInput('panelId', this.panelId);
|
|
133
|
+
this.panelRef?.setInput('heading', this.apPopoverHeading());
|
|
134
|
+
this.panelRef?.setInput('closable', this.apPopoverClosable());
|
|
135
|
+
this.panelRef?.setInput('backdrop', this.apPopoverBackdrop());
|
|
136
|
+
this.panelRef?.setInput('ariaLabel', this.apPopoverAriaLabel());
|
|
137
|
+
this.panelRef?.setInput('closeAriaLabel', this.apPopoverCloseAriaLabel());
|
|
138
|
+
this.panelRef?.setInput('fallbackLabelId', this.ensureTriggerId());
|
|
139
|
+
this.panelRef?.instance.closed.subscribe(() => this.close());
|
|
140
|
+
// Render before repositioning: `attach()` measured an unevaluated template, so the first
|
|
141
|
+
// position is for an empty box and the panel jumps once the content lands.
|
|
142
|
+
this.panelRef?.changeDetectorRef.detectChanges();
|
|
143
|
+
this.floating.updatePosition();
|
|
144
|
+
}
|
|
145
|
+
/** The dialog falls back to being named by its trigger, and `aria-labelledby` needs an id to point at. */
|
|
146
|
+
ensureTriggerId() {
|
|
147
|
+
const trigger = this.triggerElement.nativeElement;
|
|
148
|
+
if (!trigger.id) {
|
|
149
|
+
trigger.id = `ap-popover-trigger-${this.instanceId}`;
|
|
150
|
+
}
|
|
151
|
+
this.warnWhenNameless(trigger);
|
|
152
|
+
return trigger.id;
|
|
153
|
+
}
|
|
154
|
+
/** The residual case the fallback cannot cover: a trigger that names nothing either. */
|
|
155
|
+
warnWhenNameless(trigger) {
|
|
156
|
+
const hasOwnName = Boolean(this.apPopoverHeading()) || Boolean(this.apPopoverAriaLabel());
|
|
157
|
+
// An icon-only trigger has no text but may carry an `aria-label`, which names it just as well.
|
|
158
|
+
const triggerNamesIt = Boolean(trigger.textContent?.trim()) || Boolean(trigger.getAttribute('aria-label'));
|
|
159
|
+
if (hasOwnName || triggerNamesIt) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
console.warn(`[Popover] The dialog opened by #${trigger.id} has no accessible name: it has neither a ` +
|
|
163
|
+
'heading nor an aria-label, and its trigger has no text. Set apPopoverHeading or apPopoverAriaLabel.');
|
|
164
|
+
}
|
|
165
|
+
close() {
|
|
166
|
+
this.panelRef = null;
|
|
167
|
+
this.floating.close();
|
|
168
|
+
}
|
|
169
|
+
toggle(event) {
|
|
170
|
+
if (this.isOpen()) {
|
|
171
|
+
this.close();
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.open(event);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
178
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: PopoverDirective, isStandalone: true, selector: "[apPopover]", inputs: { apPopover: { classPropertyName: "apPopover", publicName: "apPopover", isSignal: true, isRequired: true, transformFunction: null }, apPopoverPlacement: { classPropertyName: "apPopoverPlacement", publicName: "apPopoverPlacement", isSignal: true, isRequired: false, transformFunction: null }, apPopoverAnchor: { classPropertyName: "apPopoverAnchor", publicName: "apPopoverAnchor", isSignal: true, isRequired: false, transformFunction: null }, apPopoverArrow: { classPropertyName: "apPopoverArrow", publicName: "apPopoverArrow", isSignal: true, isRequired: false, transformFunction: null }, apPopoverArrowTarget: { classPropertyName: "apPopoverArrowTarget", publicName: "apPopoverArrowTarget", isSignal: true, isRequired: false, transformFunction: null }, apPopoverClosable: { classPropertyName: "apPopoverClosable", publicName: "apPopoverClosable", isSignal: true, isRequired: false, transformFunction: null }, apPopoverBackdrop: { classPropertyName: "apPopoverBackdrop", publicName: "apPopoverBackdrop", isSignal: true, isRequired: false, transformFunction: null }, apPopoverHeading: { classPropertyName: "apPopoverHeading", publicName: "apPopoverHeading", isSignal: true, isRequired: false, transformFunction: null }, apPopoverAriaLabel: { classPropertyName: "apPopoverAriaLabel", publicName: "apPopoverAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, apPopoverCloseAriaLabel: { classPropertyName: "apPopoverCloseAriaLabel", publicName: "apPopoverCloseAriaLabel", isSignal: true, isRequired: false, transformFunction: null }, apPopoverPanelClass: { classPropertyName: "apPopoverPanelClass", publicName: "apPopoverPanelClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggle($event)" }, properties: { "attr.aria-haspopup": "\"dialog\"", "attr.aria-expanded": "isOpen()", "attr.aria-controls": "isOpen() ? panelId : null" } }, exportAs: ["apPopover"], ngImport: i0 });
|
|
179
|
+
}
|
|
180
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: PopoverDirective, decorators: [{
|
|
181
|
+
type: Directive,
|
|
182
|
+
args: [{
|
|
183
|
+
selector: '[apPopover]',
|
|
184
|
+
exportAs: 'apPopover',
|
|
185
|
+
host: {
|
|
186
|
+
'[attr.aria-haspopup]': '"dialog"',
|
|
187
|
+
'[attr.aria-expanded]': 'isOpen()',
|
|
188
|
+
// Only while open: pointing `aria-controls` at an id that does not exist yet is invalid.
|
|
189
|
+
'[attr.aria-controls]': 'isOpen() ? panelId : null',
|
|
190
|
+
'(click)': 'toggle($event)',
|
|
191
|
+
},
|
|
192
|
+
}]
|
|
193
|
+
}], propDecorators: { apPopover: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopover", required: true }] }], apPopoverPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverPlacement", required: false }] }], apPopoverAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverAnchor", required: false }] }], apPopoverArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverArrow", required: false }] }], apPopoverArrowTarget: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverArrowTarget", required: false }] }], apPopoverClosable: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverClosable", required: false }] }], apPopoverBackdrop: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverBackdrop", required: false }] }], apPopoverHeading: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverHeading", required: false }] }], apPopoverAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverAriaLabel", required: false }] }], apPopoverCloseAriaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverCloseAriaLabel", required: false }] }], apPopoverPanelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "apPopoverPanelClass", required: false }] }] } });
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Generated bundle index. Do not edit.
|
|
197
|
+
*/
|
|
198
|
+
|
|
199
|
+
export { PopoverDirective, PopoverPanelComponent };
|
|
200
|
+
//# sourceMappingURL=agorapulse-ui-components-popover.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-popover.mjs","sources":["../../../libs/ui-components/popover/src/popover-panel/popover-panel.component.ts","../../../libs/ui-components/popover/src/popover-panel/popover-panel.component.html","../../../libs/ui-components/popover/src/popover.directive.ts","../../../libs/ui-components/popover/src/agorapulse-ui-components-popover.ts"],"sourcesContent":["import { CloseButtonComponent } from '@agorapulse/ui-components/close-button';\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, output, TemplateRef } from '@angular/core';\n\n/**\n * The `role=\"dialog\"` surface, its optional header and its focus trap. Instantiated by the popover\n * directive, never by a consumer.\n *\n * Focus is the CDK's: `cdkTrapFocus` confines Tab, `autoCapture` focuses on open and restores the\n * trigger on destruction. The cost is that Tab cannot leave the panel — Escape or the button do.\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-popover-panel',\n imports: [CdkTrapFocus, CloseButtonComponent, NgTemplateOutlet],\n templateUrl: 'popover-panel.component.html',\n styleUrls: ['popover-panel.component.scss'],\n})\nexport class PopoverPanelComponent {\n private static nextId = 0;\n\n /** The consumer's content. Always a template: the directive sits on the trigger, not here. */\n readonly content = input.required<TemplateRef<unknown>>();\n\n /** Mirrors the popover's heading, and gives the dialog its accessible name. */\n readonly heading = input<string>();\n\n /** Mirrors the popover's input of the same name. */\n readonly closable = input<boolean>(false);\n\n /** Mirrors the popover's backdrop, which is what makes the page genuinely inert. */\n readonly backdrop = input<boolean>(false);\n\n /** Mirrors the popover's, and names the dialog when there is no heading. */\n readonly ariaLabel = input<string>();\n\n readonly closeAriaLabel = input<string>('Close');\n\n /** Set by the directive, which needs it for the trigger's `aria-controls`. */\n readonly panelId = input<string>('');\n\n /**\n * The id of the element that names the dialog when nothing else does — the trigger, set by the\n * directive. An id rather than its text, so the name is computed on the live DOM: that follows a\n * label that changes, and reads a trigger whose own name is an `aria-label`.\n */\n readonly fallbackLabelId = input<string>();\n\n readonly closed = output<void>();\n\n protected readonly headingId = `ap-popover-heading-${PopoverPanelComponent.nextId++}`;\n\n /** A dialog must be named. The heading does it, failing that the trigger. */\n protected readonly labelledBy = computed<string | null>(() => {\n if (this.heading()) {\n return this.headingId;\n }\n return this.ariaLabel() ? null : (this.fallbackLabelId() ?? null);\n });\n\n protected readonly label = computed<string | null>(() => (this.heading() ? null : (this.ariaLabel() ?? null)));\n}\n","<div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\">\n <div\n class=\"ap-popover__panel\"\n role=\"dialog\"\n tabindex=\"-1\"\n cdkFocusInitial\n [id]=\"panelId()\"\n [attr.aria-modal]=\"backdrop() || null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-label]=\"label()\">\n @if (heading() || closable()) {\n <div class=\"ap-popover__header\">\n @if (heading()) {\n <h2\n class=\"ap-popover__heading\"\n [id]=\"headingId\">\n {{ heading() }}\n </h2>\n }\n @if (closable()) {\n <ap-close-button\n [ariaLabel]=\"closeAriaLabel()\"\n (closed)=\"closed.emit()\" />\n }\n </div>\n }\n <ng-container [ngTemplateOutlet]=\"content()\" />\n </div>\n</div>\n","import { createFloatingOverlay, FloatingAnchorMode, FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { ComponentRef, Directive, ElementRef, inject, input, TemplateRef } from '@angular/core';\nimport { PopoverPanelComponent } from './popover-panel/popover-panel.component';\n\n/**\n * A click-triggered interactive panel: `role=\"dialog\"`, managed focus, Escape, optional backdrop.\n * A tooltip is the opposite — descriptive, hover-triggered, and never focusable.\n *\n * Sits on the **trigger**, so it owns the trigger's ARIA and the content is always a `TemplateRef`.\n * Inputs are prefixed one by one rather than bundled: an inline config object would be recreated on\n * every change-detection cycle and thrash the overlay.\n *\n * @example\n * <button [apPopover]=\"shareTpl\" apPopoverHeading=\"Share\">Share</button>\n * <ng-template #shareTpl>…</ng-template>\n */\n@Directive({\n selector: '[apPopover]',\n exportAs: 'apPopover',\n host: {\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'isOpen()',\n // Only while open: pointing `aria-controls` at an id that does not exist yet is invalid.\n '[attr.aria-controls]': 'isOpen() ? panelId : null',\n '(click)': 'toggle($event)',\n },\n})\nexport class PopoverDirective {\n private static nextId = 0;\n\n private readonly instanceId = PopoverDirective.nextId++;\n private readonly floating = createFloatingOverlay();\n private readonly triggerElement = inject<ElementRef<HTMLElement>>(ElementRef);\n private panelRef: ComponentRef<PopoverPanelComponent> | null = null;\n\n /** The panel's content. */\n readonly apPopover = input.required<TemplateRef<unknown>>();\n\n /** Unset means derived from the anchor mode. There is no `'auto'` value. */\n readonly apPopoverPlacement = input<FloatingPlacement>();\n readonly apPopoverAnchor = input<FloatingAnchorMode>('trigger');\n readonly apPopoverArrow = input<boolean>(false);\n readonly apPopoverArrowTarget = input<'anchor' | 'pointer'>('anchor');\n\n /** Shows a close button — and, by doing so, makes it *the* way to close: no more outside click. */\n readonly apPopoverClosable = input<boolean>(false);\n\n /** Blocks the page behind. Non-modal by default — that is the point of a popover. */\n readonly apPopoverBackdrop = input<boolean>(false);\n\n /** Optional heading. When set, it becomes the dialog's accessible name. */\n readonly apPopoverHeading = input<string>();\n\n /** Accessible name used when there is no heading. */\n readonly apPopoverAriaLabel = input<string>();\n\n /** An input rather than a hard-coded string: several of the DS's own labels read badly. */\n readonly apPopoverCloseAriaLabel = input<string>('Close');\n\n readonly apPopoverPanelClass = input<string | string[]>();\n\n readonly isOpen = this.floating.isOpen;\n\n protected readonly panelId = `ap-popover-${this.instanceId}`;\n\n open(event?: MouseEvent): void {\n if (this.isOpen()) return;\n\n this.panelRef = this.floating.open(\n PopoverPanelComponent,\n this.triggerElement.nativeElement,\n {\n placement: this.apPopoverPlacement(),\n anchor: this.apPopoverAnchor(),\n arrow: this.apPopoverArrow(),\n arrowTarget: this.apPopoverArrowTarget(),\n showBackdrop: this.apPopoverBackdrop(),\n panelClass: this.apPopoverPanelClass(),\n // Escape always closes: APG requires it of a dialog. An outside click does not.\n onEscape: () => this.close(),\n onOutsideClick: () => {\n if (!this.apPopoverClosable()) {\n this.close();\n }\n },\n },\n event\n );\n\n this.panelRef?.setInput('content', this.apPopover());\n this.panelRef?.setInput('panelId', this.panelId);\n this.panelRef?.setInput('heading', this.apPopoverHeading());\n this.panelRef?.setInput('closable', this.apPopoverClosable());\n this.panelRef?.setInput('backdrop', this.apPopoverBackdrop());\n this.panelRef?.setInput('ariaLabel', this.apPopoverAriaLabel());\n this.panelRef?.setInput('closeAriaLabel', this.apPopoverCloseAriaLabel());\n this.panelRef?.setInput('fallbackLabelId', this.ensureTriggerId());\n this.panelRef?.instance.closed.subscribe(() => this.close());\n\n // Render before repositioning: `attach()` measured an unevaluated template, so the first\n // position is for an empty box and the panel jumps once the content lands.\n this.panelRef?.changeDetectorRef.detectChanges();\n this.floating.updatePosition();\n }\n\n /** The dialog falls back to being named by its trigger, and `aria-labelledby` needs an id to point at. */\n private ensureTriggerId(): string {\n const trigger = this.triggerElement.nativeElement;\n if (!trigger.id) {\n trigger.id = `ap-popover-trigger-${this.instanceId}`;\n }\n\n this.warnWhenNameless(trigger);\n return trigger.id;\n }\n\n /** The residual case the fallback cannot cover: a trigger that names nothing either. */\n private warnWhenNameless(trigger: HTMLElement): void {\n const hasOwnName = Boolean(this.apPopoverHeading()) || Boolean(this.apPopoverAriaLabel());\n // An icon-only trigger has no text but may carry an `aria-label`, which names it just as well.\n const triggerNamesIt = Boolean(trigger.textContent?.trim()) || Boolean(trigger.getAttribute('aria-label'));\n if (hasOwnName || triggerNamesIt) {\n return;\n }\n\n console.warn(\n `[Popover] The dialog opened by #${trigger.id} has no accessible name: it has neither a ` +\n 'heading nor an aria-label, and its trigger has no text. Set apPopoverHeading or apPopoverAriaLabel.'\n );\n }\n\n close(): void {\n this.panelRef = null;\n this.floating.close();\n }\n\n toggle(event?: MouseEvent): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open(event);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;AAKA;;;;;;AAMG;MAQU,qBAAqB,CAAA;AACtB,IAAA,OAAO,MAAM,GAAG,CAAC;;IAGhB,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAAwB;;AAGhD,IAAA,OAAO,GAAG,KAAK;2FAAU;;IAGzB,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;;IAGhC,QAAQ,GAAG,KAAK,CAAU,KAAK;iFAAC;;AAGhC,IAAA,SAAS,GAAG,KAAK;6FAAU;IAE3B,cAAc,GAAG,KAAK,CAAS,OAAO;uFAAC;;IAGvC,OAAO,GAAG,KAAK,CAAS,EAAE;g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E,WAAW;AACrB,oBAAA,IAAI,EAAE;AACF,wBAAA,sBAAsB,EAAE,UAAU;AAClC,wBAAA,sBAAsB,EAAE,UAAU;;AAElC,wBAAA,sBAAsB,EAAE,2BAA2B;AACnD,wBAAA,SAAS,EAAE,gBAAgB;AAC9B,qBAAA;AACJ,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -41,6 +41,7 @@ export { CustomTooltipType, TooltipDirective, TooltipExternalTriggerDirective }
|
|
|
41
41
|
import * as i0 from '@angular/core';
|
|
42
42
|
import { NgModule } from '@angular/core';
|
|
43
43
|
import { MAT_TABS_CONFIG } from '@angular/material/tabs';
|
|
44
|
+
export { PopoverDirective } from '@agorapulse/ui-components/popover';
|
|
44
45
|
export { DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';
|
|
45
46
|
export { ActionDropdownComponent, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';
|
|
46
47
|
export { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components.mjs","sources":["../../../libs/ui-components/src/lib/agorapulse-ui-components.module.ts","../../../libs/ui-components/index.ts","../../../libs/ui-components/agorapulse-ui-components.ts"],"sourcesContent":["// Modules\nimport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nimport { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nimport { DatepickerComponent } from '@agorapulse/ui-components/datepicker';\nimport {\n AutosizeTextareaDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nimport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nimport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nimport { LabelComponent, LabelListComponent } from '@agorapulse/ui-components/labels';\nimport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nimport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nimport { ModalComponent } from '@agorapulse/ui-components/modal';\nimport { DayDisabledPipe, NeoDatepickerComponent } from '@agorapulse/ui-components/neo-datepicker';\nimport { NotificationComponent } from '@agorapulse/ui-components/notification';\nimport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nimport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nimport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nimport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nimport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nimport { StepperComponent } from '@agorapulse/ui-components/stepper';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { NgModule } from '@angular/core';\nimport { MAT_TABS_CONFIG } from '@angular/material/tabs';\n\n/**\n * @deprecated for better tree-shaking, use standalone component import instead\n */\n@NgModule({\n declarations: [],\n imports: [\n // Components\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n LabelListComponent,\n LabelsSelectorComponent,\n NeoDatepickerComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Directives\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n AddCommentComponent,\n AutosizeTextareaDirective,\n // Pipes\n DayDisabledPipe,\n ],\n exports: [\n // Components\n AddCommentComponent,\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n NeoDatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n LabelComponent,\n LabelListComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelsSelectorComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Pipes\n DayDisabledPipe,\n // Directives\n AutosizeTextareaDirective,\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n // Modules\n PopmenuModule,\n ],\n providers: [\n // Disable ripple effect\n // {provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: {disabled: true}},\n // Disable tabs animation\n { provide: MAT_TABS_CONFIG, useValue: { animationDuration: '0ms' } },\n ],\n})\nexport class AgorapulseUiComponentsModule {}\n","/*\n * Public API Surface of ui\n */\n\n// Module\nexport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nexport { AgorapulseUiComponentsModule } from './src/lib/agorapulse-ui-components.module';\n\n// Directive\nexport {\n AutosizeTextareaDirective,\n CheckboxDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nexport { PopmenuDirective } from '@agorapulse/ui-components/popmenu';\nexport { TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';\n\n// Dropdown base\nexport { DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';\n\n// Component\nexport { ActionDropdownComponent, ActionDropdownItem, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';\nexport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nexport { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';\nexport { AvatarComponent, AvatarItem } from '@agorapulse/ui-components/avatar';\nexport { BadgeComponent } from '@agorapulse/ui-components/badge';\nexport { ButtonComponent } from '@agorapulse/ui-components/button';\nexport { CheckboxComponent } from '@agorapulse/ui-components/checkbox';\nexport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nexport { CounterComponent } from '@agorapulse/ui-components/counter';\nexport { DatepickerComponent, DatepickerMode, I18nDatePicker, Period } from '@agorapulse/ui-components/datepicker';\nexport { DateRangePickerComponent, DateRangePickerPreset, defaultDateRangePickerPresets } from '@agorapulse/ui-components/date-range-picker';\nexport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nexport { IconButtonComponent } from '@agorapulse/ui-components/icon-button';\nexport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nexport { LabelComponent, LabelListComponent } from '@agorapulse/ui-components/labels';\nexport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nexport { InputComponent } from '@agorapulse/ui-components/legacy/input';\nexport { SelectComponent } from '@agorapulse/ui-components/legacy/select';\nexport { TextareaComponent } from '@agorapulse/ui-components/legacy/textarea';\nexport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nexport { ModalComponent, ModalConfig } from '@agorapulse/ui-components/modal';\nexport { NavSelectorComponent } from '@agorapulse/ui-components/nav-selector';\nexport {\n DayDisabledPipe,\n NeoDatePickerLocale,\n NeoDatePickerMode,\n NeoDatePickerStartsOn,\n NeoDatepickerComponent,\n} from '@agorapulse/ui-components/neo-datepicker';\nexport { NotificationComponent } from '@agorapulse/ui-components/notification';\nexport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nexport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nexport { PopmenuComponent } from '@agorapulse/ui-components/popmenu';\nexport { RadioComponent } from '@agorapulse/ui-components/radio';\nexport { RadioButtonCardComponent } from '@agorapulse/ui-components/radio-button-card';\nexport { SegmentedControlComponent, SegmentedControlOption } from '@agorapulse/ui-components/segmented-control';\nexport {\n SelectionDropdownComponent,\n SelectionDropdownItem,\n SelectionDropdownTriggerDirective,\n} from '@agorapulse/ui-components/selection-dropdown';\nexport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nexport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nexport { SocialButtonComponent } from '@agorapulse/ui-components/social-button';\nexport { StatusComponent } from '@agorapulse/ui-components/status';\nexport { StatusCardActor, StatusCardComponent } from '@agorapulse/ui-components/status-card';\nexport { StepperComponent } from '@agorapulse/ui-components/stepper';\nexport { TagComponent } from '@agorapulse/ui-components/tag';\nexport { ToggleComponent } from '@agorapulse/ui-components/toggle';\n\n// Service\nexport { SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';\n\n// Model\nexport { ConfirmModalTexts } from '@agorapulse/ui-components/confirm-modal';\nexport * from '@agorapulse/ui-components/filter-dropdown';\nexport {\n CodeStatus,\n SnackbarTypeValues,\n SnackbarsThreadBase,\n externalSnackbarTypeAllowed,\n generateCodeStatus,\n} from '@agorapulse/ui-components/snackbars-thread';\nexport { Step } from '@agorapulse/ui-components/stepper';\nexport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType } from '@agorapulse/ui-components/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AA+BA;;AAEG;MA4EU,4BAA4B,CAAA;uGAA5B,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;wGAA5B,4BAA4B,EAAA,OAAA,EAAA;;YAvEjC,eAAe;YACf,gBAAgB;YAChB,qBAAqB;YACrB,mBAAmB;YACnB,mBAAmB;YACnB,iBAAiB;YACjB,gBAAgB;YAChB,kBAAkB;YAClB,uBAAuB;YACvB,sBAAsB;YACtB,kCAAkC;YAClC,cAAc;YACd,sBAAsB;YACtB,cAAc;YACd,qBAAqB;YACrB,kBAAkB;YAClB,wBAAwB;YACxB,oBAAoB;YACpB,wBAAwB;;YAExB,qBAAqB;YACrB,kBAAkB;YAClB,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B,oBAAA,OAAO,EAAE;;wBAEL,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,mBAAmB;wBACnB,mBAAmB;wBACnB,iBAAiB;wBACjB,gBAAgB;wBAChB,kBAAkB;wBAClB,uBAAuB;wBACvB,sBAAsB;wBACtB,kCAAkC;wBAClC,cAAc;wBACd,sBAAsB;wBACtB,cAAc;wBACd,qBAAqB;wBACrB,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;wBACpB,wBAAwB;;wBAExB,qBAAqB;wBACrB,kBAAkB;wBAClB,uBAAuB;wBACvB,uBAAuB;wBACvB,gBAAgB;wBAChB,mBAAmB;wBACnB,yBAAyB;;wBAEzB,eAAe;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;;wBAEL,mBAAmB;wBACnB,eAAe;wBACf,gBAAgB;wBAChB,qBAAqB;wBACrB,mBAAmB;wBACnB,sBAAsB;wBACtB,mBAAmB;wBACnB,iBAAiB;wBACjB,gBAAgB;wBAChB,cAAc;wBACd,kBAAkB;wBAClB,kCAAkC;wBAClC,cAAc;wBACd,sBAAsB;wBACtB,uBAAuB;wBACvB,qBAAqB;wBACrB,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;wBACpB,wBAAwB;;wBAExB,eAAe;;wBAEf,yBAAyB;wBACzB,qBAAqB;wBACrB,kBAAkB;wBAClB,uBAAuB;wBACvB,uBAAuB;wBACvB,gBAAgB;;wBAEhB,aAAa;AAChB,qBAAA;AACD,oBAAA,SAAS,EAAE;;;;wBAIP,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;AACvE,qBAAA;AACJ,iBAAA;;;AC5GD;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components.mjs","sources":["../../../libs/ui-components/src/lib/agorapulse-ui-components.module.ts","../../../libs/ui-components/index.ts","../../../libs/ui-components/agorapulse-ui-components.ts"],"sourcesContent":["// Modules\nimport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nimport { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nimport { DatepickerComponent } from '@agorapulse/ui-components/datepicker';\nimport {\n AutosizeTextareaDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nimport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nimport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nimport { LabelComponent, LabelListComponent } from '@agorapulse/ui-components/labels';\nimport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nimport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nimport { ModalComponent } from '@agorapulse/ui-components/modal';\nimport { DayDisabledPipe, NeoDatepickerComponent } from '@agorapulse/ui-components/neo-datepicker';\nimport { NotificationComponent } from '@agorapulse/ui-components/notification';\nimport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nimport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nimport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nimport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nimport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nimport { StepperComponent } from '@agorapulse/ui-components/stepper';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { NgModule } from '@angular/core';\nimport { MAT_TABS_CONFIG } from '@angular/material/tabs';\n\n/**\n * @deprecated for better tree-shaking, use standalone component import instead\n */\n@NgModule({\n declarations: [],\n imports: [\n // Components\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n LabelListComponent,\n LabelsSelectorComponent,\n NeoDatepickerComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Directives\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n AddCommentComponent,\n AutosizeTextareaDirective,\n // Pipes\n DayDisabledPipe,\n ],\n exports: [\n // Components\n AddCommentComponent,\n AvatarComponent,\n StepperComponent,\n ConfirmModalComponent,\n DatepickerComponent,\n NeoDatepickerComponent,\n DotStepperComponent,\n EllipsisDirective,\n InfoboxComponent,\n LabelComponent,\n LabelListComponent,\n MediaDisplayOverlayDialogComponent,\n ModalComponent,\n PasswordInputComponent,\n LabelsSelectorComponent,\n NotificationComponent,\n PaginatorComponent,\n PaginatorButtonComponent,\n SlideToggleComponent,\n SnackbarsThreadComponent,\n // Pipes\n DayDisabledPipe,\n // Directives\n AutosizeTextareaDirective,\n DefaultImageDirective,\n FrozenGifDirective,\n EqualValidatorDirective,\n MultiStyleTextDirective,\n TooltipDirective,\n // Modules\n PopmenuModule,\n ],\n providers: [\n // Disable ripple effect\n // {provide: MAT_RIPPLE_GLOBAL_OPTIONS, useValue: {disabled: true}},\n // Disable tabs animation\n { provide: MAT_TABS_CONFIG, useValue: { animationDuration: '0ms' } },\n ],\n})\nexport class AgorapulseUiComponentsModule {}\n","/*\n * Public API Surface of ui\n */\n\n// Module\nexport { PopmenuModule } from '@agorapulse/ui-components/popmenu';\nexport { AgorapulseUiComponentsModule } from './src/lib/agorapulse-ui-components.module';\n\n// Directive\nexport {\n AutosizeTextareaDirective,\n CheckboxDirective,\n DefaultImageDirective,\n EllipsisDirective,\n EqualValidatorDirective,\n FrozenGifDirective,\n MultiStyleTextDirective,\n} from '@agorapulse/ui-components/directives';\nexport { PopmenuDirective } from '@agorapulse/ui-components/popmenu';\nexport { PopoverDirective } from '@agorapulse/ui-components/popover';\nexport { TooltipDirective, TooltipExternalTriggerDirective } from '@agorapulse/ui-components/tooltip';\n\n// Floating\nexport type { FloatingAnchorMode, FloatingPlacement, FloatingSide } from '@agorapulse/ui-components/floating';\n\n// Dropdown base\nexport { DropdownOverlay, DropdownTriggerDirective, createDropdownOverlay } from '@agorapulse/ui-components/dropdown-base';\n\n// Component\nexport { ActionDropdownComponent, ActionDropdownItem, ActionDropdownTriggerDirective } from '@agorapulse/ui-components/action-dropdown';\nexport { AddCommentComponent } from '@agorapulse/ui-components/add-comment';\nexport { AutocompleteComponent } from '@agorapulse/ui-components/autocomplete';\nexport { AvatarComponent, AvatarItem } from '@agorapulse/ui-components/avatar';\nexport { BadgeComponent } from '@agorapulse/ui-components/badge';\nexport { ButtonComponent } from '@agorapulse/ui-components/button';\nexport { CheckboxComponent } from '@agorapulse/ui-components/checkbox';\nexport { ConfirmModalComponent } from '@agorapulse/ui-components/confirm-modal';\nexport { CounterComponent } from '@agorapulse/ui-components/counter';\nexport {\n DateRangePickerComponent,\n DateRangePickerPreset,\n defaultDateRangePickerPresets,\n} from '@agorapulse/ui-components/date-range-picker';\nexport { DatepickerComponent, DatepickerMode, I18nDatePicker, Period } from '@agorapulse/ui-components/datepicker';\nexport { DotStepperComponent } from '@agorapulse/ui-components/dot-stepper';\nexport { IconButtonComponent } from '@agorapulse/ui-components/icon-button';\nexport { InfoboxComponent } from '@agorapulse/ui-components/infobox';\nexport { LabelComponent, LabelListComponent } from '@agorapulse/ui-components/labels';\nexport { LabelsSelectorComponent } from '@agorapulse/ui-components/labels-selector';\nexport { InputComponent } from '@agorapulse/ui-components/legacy/input';\nexport { SelectComponent } from '@agorapulse/ui-components/legacy/select';\nexport { TextareaComponent } from '@agorapulse/ui-components/legacy/textarea';\nexport { MediaDisplayOverlayDialogComponent } from '@agorapulse/ui-components/media-display-overlay';\nexport { ModalComponent, ModalConfig } from '@agorapulse/ui-components/modal';\nexport { NavSelectorComponent } from '@agorapulse/ui-components/nav-selector';\nexport {\n DayDisabledPipe,\n NeoDatePickerLocale,\n NeoDatePickerMode,\n NeoDatePickerStartsOn,\n NeoDatepickerComponent,\n} from '@agorapulse/ui-components/neo-datepicker';\nexport { NotificationComponent } from '@agorapulse/ui-components/notification';\nexport { PaginatorButtonComponent, PaginatorComponent } from '@agorapulse/ui-components/paginator';\nexport { PasswordInputComponent } from '@agorapulse/ui-components/password-input';\nexport { PopmenuComponent } from '@agorapulse/ui-components/popmenu';\nexport { RadioComponent } from '@agorapulse/ui-components/radio';\nexport { RadioButtonCardComponent } from '@agorapulse/ui-components/radio-button-card';\nexport { SegmentedControlComponent, SegmentedControlOption } from '@agorapulse/ui-components/segmented-control';\nexport {\n SelectionDropdownComponent,\n SelectionDropdownItem,\n SelectionDropdownTriggerDirective,\n} from '@agorapulse/ui-components/selection-dropdown';\nexport { SlideToggleComponent } from '@agorapulse/ui-components/slide-toggle';\nexport { SnackbarsThreadComponent } from '@agorapulse/ui-components/snackbars-thread';\nexport { SocialButtonComponent } from '@agorapulse/ui-components/social-button';\nexport { StatusComponent } from '@agorapulse/ui-components/status';\nexport { StatusCardActor, StatusCardComponent } from '@agorapulse/ui-components/status-card';\nexport { StepperComponent } from '@agorapulse/ui-components/stepper';\nexport { TagComponent } from '@agorapulse/ui-components/tag';\nexport { ToggleComponent } from '@agorapulse/ui-components/toggle';\n\n// Service\nexport { SnackbarsThreadService } from '@agorapulse/ui-components/snackbars-thread';\n\n// Model\nexport { ConfirmModalTexts } from '@agorapulse/ui-components/confirm-modal';\nexport * from '@agorapulse/ui-components/filter-dropdown';\nexport {\n CodeStatus,\n SnackbarTypeValues,\n SnackbarsThreadBase,\n externalSnackbarTypeAllowed,\n generateCodeStatus,\n} from '@agorapulse/ui-components/snackbars-thread';\nexport { Step } from '@agorapulse/ui-components/stepper';\nexport { CustomTooltipAvatarItem, CustomTooltipPresentationItem, CustomTooltipType } from '@agorapulse/ui-components/tooltip';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";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ACd,sBAAsB;wBACtB,uBAAuB;wBACvB,qBAAqB;wBACrB,kBAAkB;wBAClB,wBAAwB;wBACxB,oBAAoB;wBACpB,wBAAwB;;wBAExB,eAAe;;wBAEf,yBAAyB;wBACzB,qBAAqB;wBACrB,kBAAkB;wBAClB,uBAAuB;wBACvB,uBAAuB;wBACvB,gBAAgB;;wBAEhB,aAAa;AAChB,qBAAA;AACD,oBAAA,SAAS,EAAE;;;;wBAIP,EAAE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;AACvE,qBAAA;AACJ,iBAAA;;;AC5GD;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agorapulse/ui-components",
|
|
3
3
|
"description": "Agorapulse UI Components Library",
|
|
4
|
-
"version": "22.0.
|
|
4
|
+
"version": "22.0.33",
|
|
5
5
|
"author": "Benoit Hediard",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -201,6 +201,10 @@
|
|
|
201
201
|
"types": "./types/agorapulse-ui-components-popmenu.d.ts",
|
|
202
202
|
"default": "./fesm2022/agorapulse-ui-components-popmenu.mjs"
|
|
203
203
|
},
|
|
204
|
+
"./popover": {
|
|
205
|
+
"types": "./types/agorapulse-ui-components-popover.d.ts",
|
|
206
|
+
"default": "./fesm2022/agorapulse-ui-components-popover.mjs"
|
|
207
|
+
},
|
|
204
208
|
"./providers": {
|
|
205
209
|
"types": "./types/agorapulse-ui-components-providers.d.ts",
|
|
206
210
|
"default": "./fesm2022/agorapulse-ui-components-providers.mjs"
|
|
@@ -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';
|
|
Binary file
|