@aeris-ui/core 22.0.0-alpha.5 → 22.0.0-alpha.6
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/README.md +2 -2
- package/fesm2022/aeris-ui-core-accordion.mjs +12 -12
- package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +3 -3
- package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-complete.mjs +55 -54
- package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-auto-focus.mjs +3 -3
- package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-avatar.mjs +6 -6
- package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-badge.mjs +6 -6
- package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-block-ui.mjs +3 -3
- package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-breadcrumb.mjs +12 -12
- package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button-group.mjs +3 -3
- package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-button.mjs +8 -8
- package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-card.mjs +18 -18
- package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-carousel.mjs +12 -12
- package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-cascade-select.mjs +36 -39
- package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chart.mjs +3 -3
- package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-checkbox.mjs +5 -5
- package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-chip.mjs +9 -9
- package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-class-names.mjs +3 -3
- package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-color-picker.mjs +5 -19
- package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-compare.mjs +12 -12
- package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs +19 -19
- package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-confirm-popup.mjs +18 -18
- package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-context-menu.mjs +6 -6
- package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-date-picker.mjs +302 -302
- package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dialog.mjs +30 -24
- package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-divider.mjs +3 -3
- package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-drawer.mjs +30 -24
- package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +7 -7
- package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-editor.mjs +3 -3
- package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-file-upload.mjs +24 -24
- package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-filter-service.mjs +3 -3
- package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-fluid.mjs +3 -3
- package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-focus-trap.mjs +3 -3
- package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-form-field.mjs +15 -15
- package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-galleria.mjs +27 -27
- package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-glass.mjs +3 -3
- package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-icon-field.mjs +12 -12
- package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-inplace.mjs +9 -9
- package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-group.mjs +15 -15
- package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-mask.mjs +5 -5
- package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-number.mjs +77 -22
- package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-otp.mjs +6 -6
- package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-input-text.mjs +6 -6
- package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-key-filter.mjs +3 -3
- package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-mega-menu.mjs +6 -6
- package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menu.mjs +15 -15
- package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-menubar.mjs +14 -14
- package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-message.mjs +9 -9
- package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-meter-group.mjs +15 -15
- package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-multi-select.mjs +30 -44
- package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-order-list.mjs +9 -9
- package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-organization-chart.mjs +9 -9
- package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-paginator.mjs +3 -3
- package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-panel.mjs +15 -15
- package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-password.mjs +16 -16
- package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-pick-list.mjs +9 -9
- package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-popover.mjs +15 -15
- package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-bar.mjs +9 -9
- package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-progress-spinner.mjs +6 -6
- package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-radio-button.mjs +5 -5
- package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-rating.mjs +3 -3
- package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-panel.mjs +3 -3
- package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-scroll-top.mjs +3 -3
- package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-select.mjs +74 -66
- package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-skeleton.mjs +3 -3
- package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-slider.mjs +3 -3
- package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-speed-dial.mjs +3 -3
- package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-split-button.mjs +3 -3
- package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-splitter.mjs +6 -6
- package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-stepper.mjs +12 -12
- package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-style-class.mjs +3 -3
- package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-table.mjs +18 -18
- package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tabs.mjs +12 -12
- package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-textarea.mjs +6 -6
- package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-theming.mjs +3 -3
- package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tiered-menu.mjs +6 -6
- package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-timeline.mjs +15 -15
- package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toast.mjs +47 -36
- package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toggle-switch.mjs +5 -5
- package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-toolbar.mjs +18 -18
- package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tooltip.mjs +6 -6
- package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-select.mjs +88 -66
- package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree-table.mjs +15 -15
- package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
- package/fesm2022/aeris-ui-core-tree.mjs +12 -12
- package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
- package/fesm2022/aeris-ui-core.mjs +175 -49
- package/fesm2022/aeris-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/aeris.css +56 -0
- package/styles/controls.css +9 -2
- package/types/aeris-ui-core-auto-complete.d.ts +1 -0
- package/types/aeris-ui-core-cascade-select.d.ts +1 -0
- package/types/aeris-ui-core-date-picker.d.ts +2 -0
- package/types/aeris-ui-core-dialog.d.ts +5 -3
- package/types/aeris-ui-core-drawer.d.ts +5 -3
- package/types/aeris-ui-core-input-number.d.ts +2 -0
- package/types/aeris-ui-core-multi-select.d.ts +1 -0
- package/types/aeris-ui-core-select.d.ts +4 -1
- package/types/aeris-ui-core-toast.d.ts +3 -2
- package/types/aeris-ui-core-tree-select.d.ts +1 -0
- package/types/aeris-ui-core.d.ts +5 -1
|
@@ -13,11 +13,19 @@ function aerisInternalPositionAnchoredOverlay(options) {
|
|
|
13
13
|
const bounds = resolveBounds(options);
|
|
14
14
|
const placement = resolvePlacement(options, bounds);
|
|
15
15
|
const point = rawPosition(placement, options);
|
|
16
|
+
const clampedPoint = aerisInternalClampOverlayPoint(point, options.width, options.height, bounds.right - bounds.left, bounds.bottom - bounds.top, 0, bounds.left, bounds.top);
|
|
16
17
|
return {
|
|
17
18
|
placement,
|
|
18
|
-
...
|
|
19
|
+
...(options.tetherToAnchor
|
|
20
|
+
? tetheredPoint(placement, point, clampedPoint)
|
|
21
|
+
: clampedPoint),
|
|
19
22
|
};
|
|
20
23
|
}
|
|
24
|
+
function tetheredPoint(placement, point, clampedPoint) {
|
|
25
|
+
return placement === 'top' || placement === 'bottom'
|
|
26
|
+
? { x: clampedPoint.x, y: point.y }
|
|
27
|
+
: { x: point.x, y: clampedPoint.y };
|
|
28
|
+
}
|
|
21
29
|
function resolvePlacement(options, bounds) {
|
|
22
30
|
const spaces = {
|
|
23
31
|
bottom: bounds.bottom - options.target.bottom - options.offset,
|
|
@@ -26,7 +34,7 @@ function resolvePlacement(options, bounds) {
|
|
|
26
34
|
left: options.target.left - bounds.left - options.offset,
|
|
27
35
|
};
|
|
28
36
|
const preferred = options.placement === 'auto' ? 'bottom' : options.placement;
|
|
29
|
-
const candidates = placementCandidates(preferred);
|
|
37
|
+
const candidates = placementCandidates(preferred, options.tetherToAnchor ?? false);
|
|
30
38
|
const fitting = candidates.find((placement) => spaces[placement] >=
|
|
31
39
|
(placement === 'top' || placement === 'bottom' ? options.height : options.width));
|
|
32
40
|
return (fitting ??
|
|
@@ -55,7 +63,16 @@ function normalizePadding(padding) {
|
|
|
55
63
|
left: Math.max(0, padding.left ?? 0),
|
|
56
64
|
};
|
|
57
65
|
}
|
|
58
|
-
function placementCandidates(preferred) {
|
|
66
|
+
function placementCandidates(preferred, preserveAxis) {
|
|
67
|
+
if (preserveAxis) {
|
|
68
|
+
if (preferred === 'top')
|
|
69
|
+
return ['top', 'bottom'];
|
|
70
|
+
if (preferred === 'bottom')
|
|
71
|
+
return ['bottom', 'top'];
|
|
72
|
+
if (preferred === 'right')
|
|
73
|
+
return ['right', 'left'];
|
|
74
|
+
return ['left', 'right'];
|
|
75
|
+
}
|
|
59
76
|
switch (preferred) {
|
|
60
77
|
case 'top':
|
|
61
78
|
return ['top', 'bottom', 'right', 'left'];
|
|
@@ -117,6 +134,8 @@ class ɵAerisAppendTo {
|
|
|
117
134
|
originCaptured = false;
|
|
118
135
|
originParent = null;
|
|
119
136
|
originNextSibling = null;
|
|
137
|
+
unconstrainedPanelWidth = 0;
|
|
138
|
+
unconstrainedPanelHeight = 0;
|
|
120
139
|
aerisInternalAppendTo = input(/* @ts-ignore */
|
|
121
140
|
...(ngDevMode ? [undefined, { debugName: "aerisInternalAppendTo" }] : /* istanbul ignore next */ []));
|
|
122
141
|
aerisInternalAppendToAnchor = input(null, /* @ts-ignore */
|
|
@@ -138,14 +157,21 @@ class ɵAerisAppendTo {
|
|
|
138
157
|
effect((onCleanup) => {
|
|
139
158
|
const target = aerisInternalResolveAppendTo(this.aerisInternalAppendTo() ?? this.defaultAppendTo, this.document);
|
|
140
159
|
const anchor = this.aerisInternalAppendToAnchor();
|
|
160
|
+
const automaticallyPortaled = this.aerisInternalAppendTo() === undefined &&
|
|
161
|
+
target === 'self' &&
|
|
162
|
+
!!anchor &&
|
|
163
|
+
this.hasClippingAncestor(anchor);
|
|
164
|
+
const effectiveTarget = automaticallyPortaled ? this.document.body : target;
|
|
141
165
|
this.captureOrigin();
|
|
142
|
-
if (
|
|
166
|
+
if (effectiveTarget === 'self')
|
|
143
167
|
this.restoreToOrigin();
|
|
144
|
-
if (
|
|
168
|
+
if (effectiveTarget === 'self' &&
|
|
169
|
+
(!anchor || !this.aerisInternalAppendToPositionSelf())) {
|
|
145
170
|
this.element.removeAttribute('data-aeris-append-to');
|
|
171
|
+
this.element.removeAttribute('data-aeris-auto-portaled');
|
|
146
172
|
return;
|
|
147
173
|
}
|
|
148
|
-
const positioningTarget =
|
|
174
|
+
const positioningTarget = effectiveTarget === 'self' ? this.element.parentElement : effectiveTarget;
|
|
149
175
|
if (!positioningTarget)
|
|
150
176
|
return;
|
|
151
177
|
const inheritedStyles = this.preserveInheritedStyles();
|
|
@@ -167,14 +193,21 @@ class ɵAerisAppendTo {
|
|
|
167
193
|
'z-index',
|
|
168
194
|
]);
|
|
169
195
|
const targetPosition = this.ensurePositionedTarget(positioningTarget);
|
|
170
|
-
if (
|
|
171
|
-
this.renderer.appendChild(
|
|
196
|
+
if (effectiveTarget !== 'self') {
|
|
197
|
+
this.renderer.appendChild(effectiveTarget, this.element);
|
|
172
198
|
this.applyInheritedStyles(inheritedStyles);
|
|
173
|
-
this.renderer.setAttribute(this.element, 'data-aeris-append-to',
|
|
199
|
+
this.renderer.setAttribute(this.element, 'data-aeris-append-to', effectiveTarget === this.document.body ? 'body' : 'target');
|
|
200
|
+
if (automaticallyPortaled) {
|
|
201
|
+
this.renderer.setAttribute(this.element, 'data-aeris-auto-portaled', 'true');
|
|
202
|
+
}
|
|
203
|
+
else {
|
|
204
|
+
this.element.removeAttribute('data-aeris-auto-portaled');
|
|
205
|
+
}
|
|
174
206
|
this.bringToFront();
|
|
175
207
|
}
|
|
176
208
|
else {
|
|
177
209
|
this.element.removeAttribute('data-aeris-append-to');
|
|
210
|
+
this.element.removeAttribute('data-aeris-auto-portaled');
|
|
178
211
|
}
|
|
179
212
|
const reposition = () => this.schedulePosition(anchor, positioningTarget);
|
|
180
213
|
const pointerdown = (event) => {
|
|
@@ -214,7 +247,8 @@ class ɵAerisAppendTo {
|
|
|
214
247
|
this.restoreInheritedStyles(inheritedStyles);
|
|
215
248
|
targetPosition.restore();
|
|
216
249
|
this.element.removeAttribute('data-aeris-append-to');
|
|
217
|
-
|
|
250
|
+
this.element.removeAttribute('data-aeris-auto-portaled');
|
|
251
|
+
if (effectiveTarget !== 'self')
|
|
218
252
|
this.element.remove();
|
|
219
253
|
});
|
|
220
254
|
});
|
|
@@ -227,9 +261,8 @@ class ɵAerisAppendTo {
|
|
|
227
261
|
this.restoreToOrigin();
|
|
228
262
|
}
|
|
229
263
|
schedulePosition(anchor, target) {
|
|
230
|
-
if (!anchor)
|
|
264
|
+
if (!anchor || this.frame !== null)
|
|
231
265
|
return;
|
|
232
|
-
this.cancelFrame();
|
|
233
266
|
const view = this.document.defaultView;
|
|
234
267
|
if (!view)
|
|
235
268
|
return;
|
|
@@ -262,45 +295,42 @@ class ɵAerisAppendTo {
|
|
|
262
295
|
(collisionPadding.top ?? 0) -
|
|
263
296
|
(collisionPadding.bottom ?? 0));
|
|
264
297
|
let panelRect = this.element.getBoundingClientRect();
|
|
265
|
-
|
|
298
|
+
const wasWidthConstrained = this.element.hasAttribute('data-viewport-constrained-width');
|
|
299
|
+
const naturalWidth = wasWidthConstrained
|
|
300
|
+
? Math.max(this.unconstrainedPanelWidth, this.element.scrollWidth)
|
|
301
|
+
: panelRect.width;
|
|
302
|
+
this.unconstrainedPanelWidth = naturalWidth;
|
|
303
|
+
if (naturalWidth > availableWidth && availableWidth > 0) {
|
|
266
304
|
this.element.style.maxWidth = `${availableWidth}px`;
|
|
267
305
|
this.element.style.overflowX = 'auto';
|
|
268
306
|
this.element.style.overscrollBehavior = 'contain';
|
|
269
307
|
this.element.setAttribute('data-viewport-constrained-width', 'true');
|
|
270
308
|
panelRect = this.element.getBoundingClientRect();
|
|
271
309
|
}
|
|
272
|
-
else if (
|
|
310
|
+
else if (wasWidthConstrained) {
|
|
273
311
|
this.element.style.removeProperty('max-width');
|
|
274
312
|
this.element.style.removeProperty('overflow-x');
|
|
275
313
|
this.element.removeAttribute('data-viewport-constrained-width');
|
|
276
314
|
panelRect = this.element.getBoundingClientRect();
|
|
277
315
|
}
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
this.element.
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
panelRect = this.element.getBoundingClientRect();
|
|
284
|
-
}
|
|
285
|
-
else if (this.element.hasAttribute('data-viewport-constrained')) {
|
|
286
|
-
this.element.style.removeProperty('max-height');
|
|
287
|
-
this.element.style.removeProperty('overflow-y');
|
|
288
|
-
this.element.style.removeProperty('overscroll-behavior');
|
|
289
|
-
this.element.removeAttribute('data-viewport-constrained');
|
|
290
|
-
panelRect = this.element.getBoundingClientRect();
|
|
291
|
-
}
|
|
316
|
+
const wasHeightConstrained = this.element.hasAttribute('data-viewport-constrained');
|
|
317
|
+
const naturalHeight = wasHeightConstrained
|
|
318
|
+
? Math.max(this.unconstrainedPanelHeight, this.element.scrollHeight)
|
|
319
|
+
: panelRect.height;
|
|
320
|
+
this.unconstrainedPanelHeight = naturalHeight;
|
|
292
321
|
const direction = view.getComputedStyle(anchor).direction;
|
|
293
322
|
const configuredAlignment = this.aerisInternalAppendToAlignment();
|
|
294
|
-
const
|
|
323
|
+
const alignment = configuredAlignment === 'auto'
|
|
324
|
+
? direction === 'rtl'
|
|
325
|
+
? 'end'
|
|
326
|
+
: 'start'
|
|
327
|
+
: configuredAlignment;
|
|
328
|
+
const position = (height = panelRect.height || this.element.offsetHeight) => aerisInternalPositionAnchoredOverlay({
|
|
295
329
|
target: anchorRect,
|
|
296
330
|
width: panelRect.width || this.element.offsetWidth || anchorRect.width,
|
|
297
|
-
height
|
|
331
|
+
height,
|
|
298
332
|
placement: this.aerisInternalAppendToPlacement(),
|
|
299
|
-
alignment
|
|
300
|
-
? direction === 'rtl'
|
|
301
|
-
? 'end'
|
|
302
|
-
: 'start'
|
|
303
|
-
: configuredAlignment,
|
|
333
|
+
alignment,
|
|
304
334
|
offset: this.aerisInternalAppendToOffset(),
|
|
305
335
|
margin: 8,
|
|
306
336
|
viewportWidth: viewport?.width ?? view.innerWidth,
|
|
@@ -308,7 +338,40 @@ class ɵAerisAppendTo {
|
|
|
308
338
|
viewportLeft,
|
|
309
339
|
viewportTop,
|
|
310
340
|
collisionPadding,
|
|
341
|
+
tetherToAnchor: true,
|
|
311
342
|
});
|
|
343
|
+
let point = position(naturalHeight);
|
|
344
|
+
const viewportBounds = {
|
|
345
|
+
top: viewportTop + (collisionPadding.top ?? 0),
|
|
346
|
+
bottom: viewportTop +
|
|
347
|
+
(viewport?.height ?? view.innerHeight) -
|
|
348
|
+
(collisionPadding.bottom ?? 0),
|
|
349
|
+
};
|
|
350
|
+
const anchorIntersectsViewport = anchorRect.bottom > viewportBounds.top && anchorRect.top < viewportBounds.bottom;
|
|
351
|
+
const placementHeight = anchorIntersectsViewport && point.placement === 'bottom'
|
|
352
|
+
? viewportBounds.bottom - anchorRect.bottom - this.aerisInternalAppendToOffset()
|
|
353
|
+
: anchorIntersectsViewport && point.placement === 'top'
|
|
354
|
+
? anchorRect.top - viewportBounds.top - this.aerisInternalAppendToOffset()
|
|
355
|
+
: availableHeight;
|
|
356
|
+
const constrainedHeight = Math.max(0, Math.min(availableHeight, placementHeight));
|
|
357
|
+
if (naturalHeight > constrainedHeight && constrainedHeight > 0) {
|
|
358
|
+
this.element.style.maxHeight = `${Math.floor(constrainedHeight)}px`;
|
|
359
|
+
this.element.style.overflowY = 'auto';
|
|
360
|
+
this.element.style.overscrollBehavior = 'contain';
|
|
361
|
+
this.element.setAttribute('data-viewport-constrained', 'true');
|
|
362
|
+
panelRect = this.element.getBoundingClientRect();
|
|
363
|
+
}
|
|
364
|
+
else if (wasHeightConstrained) {
|
|
365
|
+
this.element.style.removeProperty('max-height');
|
|
366
|
+
this.element.style.removeProperty('overflow-y');
|
|
367
|
+
this.element.removeAttribute('data-viewport-constrained');
|
|
368
|
+
panelRect = this.element.getBoundingClientRect();
|
|
369
|
+
}
|
|
370
|
+
point = position();
|
|
371
|
+
if (!this.element.hasAttribute('data-viewport-constrained') &&
|
|
372
|
+
!this.element.hasAttribute('data-viewport-constrained-width')) {
|
|
373
|
+
this.element.style.removeProperty('overscroll-behavior');
|
|
374
|
+
}
|
|
312
375
|
if (target === this.document.body) {
|
|
313
376
|
this.element.style.left = `${point.x}px`;
|
|
314
377
|
this.element.style.top = `${point.y}px`;
|
|
@@ -424,6 +487,26 @@ class ɵAerisAppendTo {
|
|
|
424
487
|
target.style.position = entry.previous;
|
|
425
488
|
positionedTargets.delete(target);
|
|
426
489
|
}
|
|
490
|
+
hasClippingAncestor(anchor) {
|
|
491
|
+
const view = this.document.defaultView;
|
|
492
|
+
if (!view)
|
|
493
|
+
return false;
|
|
494
|
+
let ancestor = anchor.parentElement;
|
|
495
|
+
while (ancestor &&
|
|
496
|
+
ancestor !== this.document.body &&
|
|
497
|
+
ancestor !== this.document.documentElement) {
|
|
498
|
+
const style = view.getComputedStyle(ancestor);
|
|
499
|
+
if (isClippingOverflow(style.overflow) ||
|
|
500
|
+
isClippingOverflow(style.overflowX) ||
|
|
501
|
+
isClippingOverflow(style.overflowY) ||
|
|
502
|
+
hasPaintContainment(style.contain) ||
|
|
503
|
+
(style.clipPath && style.clipPath !== 'none')) {
|
|
504
|
+
return true;
|
|
505
|
+
}
|
|
506
|
+
ancestor = ancestor.parentElement;
|
|
507
|
+
}
|
|
508
|
+
return false;
|
|
509
|
+
}
|
|
427
510
|
cancelFrame() {
|
|
428
511
|
if (this.frame === null)
|
|
429
512
|
return;
|
|
@@ -442,10 +525,10 @@ class ɵAerisAppendTo {
|
|
|
442
525
|
return;
|
|
443
526
|
this.renderer.insertBefore(this.originParent, this.element, this.originNextSibling?.parentNode === this.originParent ? this.originNextSibling : null);
|
|
444
527
|
}
|
|
445
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
446
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.
|
|
528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ɵAerisAppendTo, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
529
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.4", type: ɵAerisAppendTo, isStandalone: true, selector: "[aerisInternalAppendTo]", inputs: { aerisInternalAppendTo: { classPropertyName: "aerisInternalAppendTo", publicName: "aerisInternalAppendTo", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToAnchor: { classPropertyName: "aerisInternalAppendToAnchor", publicName: "aerisInternalAppendToAnchor", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToOffset: { classPropertyName: "aerisInternalAppendToOffset", publicName: "aerisInternalAppendToOffset", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToMatchWidth: { classPropertyName: "aerisInternalAppendToMatchWidth", publicName: "aerisInternalAppendToMatchWidth", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToPlacement: { classPropertyName: "aerisInternalAppendToPlacement", publicName: "aerisInternalAppendToPlacement", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToAlignment: { classPropertyName: "aerisInternalAppendToAlignment", publicName: "aerisInternalAppendToAlignment", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToCollisionPadding: { classPropertyName: "aerisInternalAppendToCollisionPadding", publicName: "aerisInternalAppendToCollisionPadding", isSignal: true, isRequired: false, transformFunction: null }, aerisInternalAppendToPositionSelf: { classPropertyName: "aerisInternalAppendToPositionSelf", publicName: "aerisInternalAppendToPositionSelf", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { aerisInternalAppendToOutside: "aerisInternalAppendToOutside" }, ngImport: i0 });
|
|
447
530
|
}
|
|
448
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ɵAerisAppendTo, decorators: [{
|
|
449
532
|
type: Directive,
|
|
450
533
|
args: [{ selector: '[aerisInternalAppendTo]' }]
|
|
451
534
|
}], ctorParameters: () => [], propDecorators: { aerisInternalAppendTo: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendTo", required: false }] }], aerisInternalAppendToAnchor: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToAnchor", required: false }] }], aerisInternalAppendToOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToOffset", required: false }] }], aerisInternalAppendToMatchWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToMatchWidth", required: false }] }], aerisInternalAppendToPlacement: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToPlacement", required: false }] }], aerisInternalAppendToAlignment: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToAlignment", required: false }] }], aerisInternalAppendToCollisionPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToCollisionPadding", required: false }] }], aerisInternalAppendToPositionSelf: [{ type: i0.Input, args: [{ isSignal: true, alias: "aerisInternalAppendToPositionSelf", required: false }] }], aerisInternalAppendToOutside: [{ type: i0.Output, args: ["aerisInternalAppendToOutside"] }] } });
|
|
@@ -468,6 +551,15 @@ function isHtmlElement(value) {
|
|
|
468
551
|
function isDomNode(value) {
|
|
469
552
|
return typeof value === 'object' && value !== null && 'nodeType' in value;
|
|
470
553
|
}
|
|
554
|
+
function isClippingOverflow(value) {
|
|
555
|
+
return /^(auto|clip|hidden|overlay|scroll)$/.test(value.trim());
|
|
556
|
+
}
|
|
557
|
+
function hasPaintContainment(value) {
|
|
558
|
+
return value
|
|
559
|
+
.trim()
|
|
560
|
+
.split(/\s+/)
|
|
561
|
+
.some((token) => token === 'paint' || token === 'content' || token === 'strict');
|
|
562
|
+
}
|
|
471
563
|
|
|
472
564
|
function filterSelectOptions(options, query, fields, matchMode, locale) {
|
|
473
565
|
const normalizedQuery = query.trim().toLocaleLowerCase(locale);
|
|
@@ -618,26 +710,60 @@ function ɵunlockAerisDocumentScroll(document) {
|
|
|
618
710
|
|
|
619
711
|
const BASE_FOCUSABLE_SELECTORS = [
|
|
620
712
|
'a[href]',
|
|
621
|
-
'
|
|
622
|
-
'
|
|
623
|
-
'
|
|
624
|
-
'
|
|
625
|
-
'
|
|
713
|
+
'area[href]',
|
|
714
|
+
'button',
|
|
715
|
+
'input',
|
|
716
|
+
'select',
|
|
717
|
+
'textarea',
|
|
718
|
+
'iframe',
|
|
719
|
+
'object',
|
|
720
|
+
'embed',
|
|
721
|
+
'audio[controls]',
|
|
722
|
+
'video[controls]',
|
|
723
|
+
'summary',
|
|
724
|
+
'[tabindex]',
|
|
626
725
|
];
|
|
627
726
|
function aerisInternalIsFocusable(element, options = {}) {
|
|
628
|
-
if (!element ||
|
|
727
|
+
if (!element ||
|
|
728
|
+
element.tabIndex < 0 ||
|
|
729
|
+
element.matches(':disabled') ||
|
|
730
|
+
element.hidden ||
|
|
731
|
+
element.inert ||
|
|
732
|
+
element.closest('[hidden], [inert], [aria-hidden="true"]')) {
|
|
733
|
+
return false;
|
|
734
|
+
}
|
|
735
|
+
if (element instanceof HTMLInputElement && element.type === 'hidden')
|
|
629
736
|
return false;
|
|
737
|
+
const closedDetails = element.closest('details:not([open])');
|
|
738
|
+
if (closedDetails) {
|
|
739
|
+
const summary = Array.from(closedDetails.children).find((child) => child instanceof HTMLElement && child.tagName === 'SUMMARY');
|
|
740
|
+
if (!summary?.contains(element))
|
|
741
|
+
return false;
|
|
630
742
|
}
|
|
631
743
|
if (!options.checkComputedVisibility)
|
|
632
744
|
return true;
|
|
633
|
-
const
|
|
634
|
-
|
|
745
|
+
const view = element.ownerDocument.defaultView;
|
|
746
|
+
for (let current = element; current; current = current.parentElement) {
|
|
747
|
+
const style = view?.getComputedStyle(current);
|
|
748
|
+
if (style?.visibility === 'hidden' ||
|
|
749
|
+
style?.visibility === 'collapse' ||
|
|
750
|
+
style?.display === 'none') {
|
|
751
|
+
return false;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
return true;
|
|
635
755
|
}
|
|
636
756
|
function aerisInternalFocusableElements(root, options = {}) {
|
|
637
757
|
const selectors = options.includeContentEditable
|
|
638
|
-
? [...BASE_FOCUSABLE_SELECTORS, '[contenteditable="
|
|
758
|
+
? [...BASE_FOCUSABLE_SELECTORS, '[contenteditable]:not([contenteditable="false"])']
|
|
639
759
|
: BASE_FOCUSABLE_SELECTORS;
|
|
640
|
-
return Array.from(root.querySelectorAll(selectors.join(',')))
|
|
760
|
+
return Array.from(root.querySelectorAll(selectors.join(',')))
|
|
761
|
+
.filter((element) => aerisInternalIsFocusable(element, options))
|
|
762
|
+
.sort((left, right) => {
|
|
763
|
+
const leftOrder = left.tabIndex > 0 ? left.tabIndex : Number.MAX_SAFE_INTEGER;
|
|
764
|
+
const rightOrder = right.tabIndex > 0 ? right.tabIndex : Number.MAX_SAFE_INTEGER;
|
|
765
|
+
return leftOrder - rightOrder;
|
|
766
|
+
});
|
|
641
767
|
}
|
|
642
768
|
function aerisInternalFocusInitialElement(root, selector, focusOptions, options = {}) {
|
|
643
769
|
let requested = null;
|
|
@@ -760,7 +886,7 @@ function aerisInternalCreateFrameScheduler(callback) {
|
|
|
760
886
|
};
|
|
761
887
|
}
|
|
762
888
|
|
|
763
|
-
const AERIS_UI_VERSION = '22.0.0-alpha.
|
|
889
|
+
const AERIS_UI_VERSION = '22.0.0-alpha.6';
|
|
764
890
|
|
|
765
891
|
/**
|
|
766
892
|
* Generated bundle index. Do not edit.
|