@koobiq/components 20.1.0 → 20.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/_accordion-theme.scss +1 -1
- package/accordion/accordion-tokens.scss +1 -0
- package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +4 -0
- package/accordion/{accordion.component.scss → accordion.scss} +3 -3
- package/accordion/index.d.ts +215 -119
- package/alert/_alert-theme.scss +14 -0
- package/alert/alert.component.scss +24 -13
- package/alert/index.d.ts +63 -29
- package/autocomplete/autocomplete.scss +2 -1
- package/autocomplete/index.d.ts +35 -29
- package/badge/index.d.ts +2 -3
- package/clamped-text/index.d.ts +3 -2
- package/core/index.d.ts +116 -11
- package/core/styles/_core.scss +2 -0
- package/core/styles/common/_animation.scss +31 -24
- package/core/styles/common/_connected-overlay.scss +36 -0
- package/core/styles/common/_select.scss +7 -2
- package/dropdown/dropdown-item.scss +16 -0
- package/dropdown/dropdown-tokens.scss +2 -1
- package/dropdown/dropdown.scss +9 -0
- package/dropdown/index.d.ts +73 -6
- package/fesm2022/koobiq-components-accordion.mjs +406 -303
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +88 -48
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +37 -23
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +5 -4
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +5 -0
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +1 -1
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +98 -4
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +10 -7
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +99 -20
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +2 -2
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +203 -32
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +4 -4
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +14 -5
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +4 -2
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +117 -22
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +19 -4
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +5 -0
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +43 -8
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +36 -45
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-split-button.mjs +3 -10
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +29 -17
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +1 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +3 -4
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +3 -5
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +1 -1
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +118 -6
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +39 -31
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/filter-bar/_filter-bar-theme.scss +0 -4
- package/filter-bar/filter-bar-tokens.scss +3 -0
- package/filter-bar/filters.scss +3 -2
- package/filter-bar/index.d.ts +62 -3
- package/filter-bar/pipes/base-pipe.scss +0 -11
- package/filter-bar/pipes/pipe-input.scss +10 -0
- package/icon/icon-button.scss +3 -1
- package/icon/index.d.ts +15 -2
- package/navbar/_navbar-item_vertical.scss +7 -5
- package/navbar/index.d.ts +38 -4
- package/navbar/navbar-brand.scss +17 -7
- package/notification-center/index.d.ts +2 -1
- package/package.json +3 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/collection.json +10 -0
- package/schematics/migrations/alert-signals/README.md +64 -0
- package/schematics/migrations/alert-signals/data.js +70 -0
- package/schematics/migrations/alert-signals/index.js +350 -0
- package/schematics/migrations/alert-signals/schema.json +20 -0
- package/schematics/migrations/autocomplete-panel-width-auto/README.md +68 -0
- package/schematics/migrations/autocomplete-panel-width-auto/index.js +70 -0
- package/schematics/migrations/autocomplete-panel-width-auto/schema.json +15 -0
- package/schematics/migrations/filter-bar-signals/README.md +1 -1
- package/schematics/migrations.json +11 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/utils/angular-parsing.js +11 -2
- package/search-expandable/index.d.ts +3 -0
- package/select/index.d.ts +51 -24
- package/tabs/_tabs-common.scss +60 -31
- package/tabs/_tabs-theme.scss +12 -0
- package/tabs/index.d.ts +2 -2
- package/tabs/tab-header.scss +14 -0
- package/tabs/tab-nav-bar.scss +4 -0
- package/tabs/tabs-tokens.scss +1 -0
- package/timezone/index.d.ts +1 -3
- package/tooltip/index.d.ts +73 -4
- package/tree-select/index.d.ts +46 -22
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// Recreates the trigger↔panel gap for connected dropdown panels as transparent padding
|
|
2
|
+
/// INSIDE the `.cdk-overlay-pane`, instead of a physical overlay `offsetY`.
|
|
3
|
+
|
|
4
|
+
// Previously the gap was produced by the CDK overlay `offsetY` (`defaultOffsetY`,
|
|
5
|
+
// packages/components/core/pop-up/constants.ts), which shifted the whole pane away from the trigger and
|
|
6
|
+
// left a dead band that was not covered by any overlay element — so the cursor/clicks passed through it
|
|
7
|
+
// onto the content underneath. Now the pane is flush with the trigger (`offsetY: 0`) and the gap is padded
|
|
8
|
+
// inside the pane. Because the pane has `pointer-events: auto`, the band is covered and no longer
|
|
9
|
+
// click/hover-through, while the visible panel keeps the exact same on-screen position.
|
|
10
|
+
|
|
11
|
+
// The class names must match KBQ_CONNECTED_OVERLAY_BELOW_CLASS / KBQ_CONNECTED_OVERLAY_ABOVE_CLASS
|
|
12
|
+
// (packages/components/core/pop-up/constants.ts), applied per-position via `ConnectedPosition.panelClass`.
|
|
13
|
+
// The compound `.cdk-overlay-pane.<class>` selector (specificity 0,2,0) deterministically overrides the
|
|
14
|
+
// `.cdk-overlay-pane { padding: 0 }` reset from `overlay()`.
|
|
15
|
+
|
|
16
|
+
// The gap size is the `--kbq-connected-overlay-gap` custom property, falling back to the `--kbq-size-xxs`
|
|
17
|
+
// token (4px) when unset — so the default is unchanged. The pane is portaled to <body>, so the variable
|
|
18
|
+
// must be set on `:root` or on the pane itself, never on the component that opens it:
|
|
19
|
+
// * globally: :root { --kbq-connected-overlay-gap: 8px; }
|
|
20
|
+
// * per overlay type: .cdk-overlay-pane.kbq-select-overlay { --kbq-connected-overlay-gap: 8px; }
|
|
21
|
+
|
|
22
|
+
// Caveat: the `--kbq-size-xxs`/4px default is kept in sync with `defaultOffsetY`
|
|
23
|
+
// (packages/components/core/pop-up/constants.ts), off which components size their viewport-fit compensation
|
|
24
|
+
// (`withViewportMargin`). Enlarging the gap past that can let the pane overflow the viewport edge by
|
|
25
|
+
// `gap - margin`px, so bump the corresponding margin to match.
|
|
26
|
+
@mixin kbq-connected-overlay-gap() {
|
|
27
|
+
// Panel is below the trigger: the gap sits at the top of the pane.
|
|
28
|
+
.cdk-overlay-pane.kbq-connected-overlay_below {
|
|
29
|
+
padding-top: var(--kbq-connected-overlay-gap, var(--kbq-size-xxs, 4px));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Panel is flipped above the trigger: the gap sits at the bottom of the pane.
|
|
33
|
+
.cdk-overlay-pane.kbq-connected-overlay_above {
|
|
34
|
+
padding-bottom: var(--kbq-connected-overlay-gap, var(--kbq-size-xxs, 4px));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -122,9 +122,9 @@
|
|
|
122
122
|
overflow: hidden;
|
|
123
123
|
|
|
124
124
|
& .kbq-select__match-hidden-text {
|
|
125
|
-
flex: 0 0
|
|
125
|
+
flex: 0 0 var(--kbq-form-field-size-addon-width);
|
|
126
126
|
align-self: center;
|
|
127
|
-
padding-left:
|
|
127
|
+
padding-left: var(--kbq-size-xxs);
|
|
128
128
|
padding-right: var(--kbq-select-size-multiple-content-gap, var(--kbq-size-xxs));
|
|
129
129
|
|
|
130
130
|
text-align: right;
|
|
@@ -167,6 +167,11 @@
|
|
|
167
167
|
%kbq-select-panel {
|
|
168
168
|
min-width: 100%; // prevents some animation twitching and test inconsistencies in IE11
|
|
169
169
|
|
|
170
|
+
// Caps how far the panel grows with its content. `min-width` above intentionally wins over this,
|
|
171
|
+
// so the panel is never narrower than its trigger and an explicit `panelWidth` is never clamped.
|
|
172
|
+
// The token is deliberately left undeclared so that a `:root` override reaches every panel.
|
|
173
|
+
max-width: var(--kbq-panel-size-width-max, 640px);
|
|
174
|
+
|
|
170
175
|
overflow: hidden;
|
|
171
176
|
|
|
172
177
|
border-radius: var(--kbq-select-panel-size-border-radius, var(--kbq-size-border-radius));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use '../core/styles/common/animation';
|
|
1
2
|
@use '../core/styles/common/list';
|
|
2
3
|
@use '../core/styles/common/vendor-prefixes';
|
|
3
4
|
|
|
@@ -47,6 +48,21 @@
|
|
|
47
48
|
border-radius: inherit;
|
|
48
49
|
}
|
|
49
50
|
|
|
51
|
+
// kbq-dropdown-item's :before/:after are already used for the hit-area extension (see
|
|
52
|
+
// select.item-active-area() in dropdown.scss), so the .kbq-progress shimmer is rendered on the
|
|
53
|
+
// existing overlay element instead of the usual ::after.
|
|
54
|
+
.kbq-dropdown-item.kbq-progress .kbq-dropdown-item-overlay {
|
|
55
|
+
@include animation.kbq-progress-overlay();
|
|
56
|
+
|
|
57
|
+
// .kbq-dropdown-item-overlay's default inset (-1px) only bleeds past the padding box, leaving
|
|
58
|
+
// the item's own border uncovered. Flush the shimmer to the item's outer edge instead.
|
|
59
|
+
inset: calc(-1 * var(--kbq-size-3xs));
|
|
60
|
+
|
|
61
|
+
@media (prefers-reduced-motion: reduce) {
|
|
62
|
+
animation: none;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
50
66
|
.kbq-dropdown__group-header {
|
|
51
67
|
@include vendor-prefixes.user-select(none);
|
|
52
68
|
@include list.kbq-list-header-base();
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
.kbq-dropdown__panel {
|
|
4
4
|
--kbq-dropdown-size-container-width-min: 200px;
|
|
5
|
-
|
|
5
|
+
// Kept as a dropdown-specific override point; defaults to the shared panel cap.
|
|
6
|
+
--kbq-dropdown-size-container-width-max: var(--kbq-panel-size-width-max, 640px);
|
|
6
7
|
--kbq-dropdown-size-container-padding-vertical: var(--kbq-size-xxs);
|
|
7
8
|
--kbq-dropdown-size-container-border-radius: var(--kbq-size-s);
|
|
8
9
|
/* THEME TOKENS */
|
package/dropdown/dropdown.scss
CHANGED
|
@@ -66,6 +66,15 @@
|
|
|
66
66
|
top: calc(-1 * var(--kbq-size-3xs));
|
|
67
67
|
bottom: calc(-1 * var(--kbq-size-3xs));
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
// The generic .kbq-progress::after rule (see _animation.scss) would otherwise paint the
|
|
71
|
+
// shimmer onto this hit-area pseudo-element. The shimmer is rendered on
|
|
72
|
+
// .kbq-dropdown-item-overlay instead (see dropdown-item.scss), so just neutralize it here
|
|
73
|
+
// without touching content/position/width/height/left, which the hit-area still needs.
|
|
74
|
+
&.kbq-progress:after {
|
|
75
|
+
background: none;
|
|
76
|
+
animation: none;
|
|
77
|
+
}
|
|
69
78
|
}
|
|
70
79
|
|
|
71
80
|
.kbq-divider {
|
package/dropdown/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { AnimationTriggerMetadata, AnimationEvent } from '@angular/animations';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { OnDestroy, TemplateRef, EventEmitter, QueryList, InjectionToken, AfterViewInit, ElementRef, AfterContentInit, OnInit } from '@angular/core';
|
|
3
|
+
import { OnDestroy, TemplateRef, EventEmitter, Signal, QueryList, InjectionToken, AfterViewInit, ElementRef, AfterContentInit, OnInit } from '@angular/core';
|
|
4
4
|
import { Subject, Observable } from 'rxjs';
|
|
5
5
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
6
|
-
import { KbqTitleTextRef, IFocusableOption, KbqComponentColors } from '@koobiq/components/core';
|
|
6
|
+
import { KbqPanelWidth, KbqPanelMinWidth, KbqPanelMaxWidth, KbqTitleTextRef, IFocusableOption, KbqComponentColors, KbqPanelWidthOrigin } from '@koobiq/components/core';
|
|
7
7
|
import * as i2 from '@koobiq/components/icon';
|
|
8
8
|
import { KbqIcon } from '@koobiq/components/icon';
|
|
9
9
|
import { Direction } from '@angular/cdk/bidi';
|
|
@@ -95,7 +95,14 @@ interface KbqDropdownPanel {
|
|
|
95
95
|
templateRef: TemplateRef<any>;
|
|
96
96
|
closed: EventEmitter<DropdownCloseReason>;
|
|
97
97
|
parent?: KbqDropdownPanel | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated Has no effect. Use `KbqDropdownTrigger.widthOrigin` to make the panel match
|
|
100
|
+
* an element other than the trigger. Will be removed in v21.
|
|
101
|
+
*/
|
|
98
102
|
triggerWidth?: string;
|
|
103
|
+
panelWidth?: Signal<KbqPanelWidth>;
|
|
104
|
+
panelMinWidth?: Signal<KbqPanelMinWidth>;
|
|
105
|
+
panelMaxWidth?: Signal<KbqPanelMaxWidth>;
|
|
99
106
|
direction?: Direction;
|
|
100
107
|
lazyContent?: KbqDropdownContent;
|
|
101
108
|
backdropClass?: string;
|
|
@@ -119,6 +126,18 @@ interface KbqDropdownDefaultOptions {
|
|
|
119
126
|
backdropClass: string;
|
|
120
127
|
/** Whether the dropdown has a backdrop. */
|
|
121
128
|
hasBackdrop: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Width of the panel. If set to `auto`, the panel will match the trigger width.
|
|
131
|
+
* If set to null, the panel will grow to match its content.
|
|
132
|
+
*/
|
|
133
|
+
panelWidth?: KbqPanelWidth;
|
|
134
|
+
/** Minimum width of the panel. If set to null, only the trigger width applies. */
|
|
135
|
+
panelMinWidth?: KbqPanelMinWidth;
|
|
136
|
+
/**
|
|
137
|
+
* Maximum width of the panel. Caps growth by content only — it never overrides the trigger width or an
|
|
138
|
+
* explicit `panelWidth`. If null, the `--kbq-dropdown-size-container-width-max` token applies.
|
|
139
|
+
*/
|
|
140
|
+
panelMaxWidth?: KbqPanelMaxWidth;
|
|
122
141
|
}
|
|
123
142
|
/**
|
|
124
143
|
* Injection token used to provide the parent dropdown to dropdown-specific components.
|
|
@@ -143,6 +162,8 @@ declare class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, Afte
|
|
|
143
162
|
get disabled(): boolean;
|
|
144
163
|
set disabled(value: boolean);
|
|
145
164
|
private _disabled;
|
|
165
|
+
/** Whether the dropdown item is in a loading state. */
|
|
166
|
+
readonly progress: i0.InputSignalWithTransform<boolean, unknown>;
|
|
146
167
|
/** Stream that emits when the dropdown item is hovered. */
|
|
147
168
|
readonly hovered: Subject<KbqDropdownItem>;
|
|
148
169
|
/** Stream that emits when the menu item is focused. */
|
|
@@ -170,7 +191,7 @@ declare class KbqDropdownItem implements KbqTitleTextRef, IFocusableOption, Afte
|
|
|
170
191
|
getLabel(): string;
|
|
171
192
|
haltDisabledEvents(event: Event): void;
|
|
172
193
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqDropdownItem, never>;
|
|
173
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqDropdownItem, "kbq-dropdown-item, [kbq-dropdown-item]", ["kbqDropdownItem"], { "disabled": { "alias": "disabled"; "required": false; }; }, {}, ["icon"], ["[kbq-icon]", "*"], true, never>;
|
|
194
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqDropdownItem, "kbq-dropdown-item, [kbq-dropdown-item]", ["kbqDropdownItem"], { "disabled": { "alias": "disabled"; "required": false; }; "progress": { "alias": "progress"; "required": false; "isSignal": true; }; }, {}, ["icon"], ["[kbq-icon]", "*"], true, never>;
|
|
174
195
|
static ngAcceptInputType_disabled: unknown;
|
|
175
196
|
}
|
|
176
197
|
|
|
@@ -213,10 +234,16 @@ declare class KbqDropdownTrigger implements AfterContentInit, OnDestroy {
|
|
|
213
234
|
private focusMonitor;
|
|
214
235
|
private readonly overlayContainer;
|
|
215
236
|
private readonly renderer;
|
|
237
|
+
private readonly ngZone;
|
|
216
238
|
protected readonly isBrowser: boolean;
|
|
217
|
-
private readonly window;
|
|
218
239
|
private readonly host;
|
|
219
240
|
lastDestroyReason: DropdownCloseReason;
|
|
241
|
+
/**
|
|
242
|
+
* Element whose width the panel should match. Defaults to the trigger itself.
|
|
243
|
+
* Useful when the trigger is only a part of a larger control, e.g. `kbq-split-button`.
|
|
244
|
+
* @docs-private
|
|
245
|
+
*/
|
|
246
|
+
widthOrigin?: KbqPanelWidthOrigin;
|
|
220
247
|
/** Position offset of the dropdown in the X axis. */
|
|
221
248
|
offsetX: number;
|
|
222
249
|
/** Position offset of the dropdown in the Y axis. */
|
|
@@ -258,6 +285,7 @@ declare class KbqDropdownTrigger implements AfterContentInit, OnDestroy {
|
|
|
258
285
|
private overlayRef;
|
|
259
286
|
private closeSubscription;
|
|
260
287
|
private hoverSubscription;
|
|
288
|
+
private widthLockSubscription;
|
|
261
289
|
private classAddedToOverlayContainer;
|
|
262
290
|
constructor();
|
|
263
291
|
ngAfterContentInit(): void;
|
|
@@ -303,6 +331,8 @@ declare class KbqDropdownTrigger implements AfterContentInit, OnDestroy {
|
|
|
303
331
|
* OverlayRef so that it can be attached to the DOM when open is called.
|
|
304
332
|
*/
|
|
305
333
|
private createOverlay;
|
|
334
|
+
/** Whether the panel should be at least as wide as its trigger. */
|
|
335
|
+
private get shouldMatchTriggerWidth();
|
|
306
336
|
/**
|
|
307
337
|
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
308
338
|
* @returns OverlayConfig
|
|
@@ -328,7 +358,15 @@ declare class KbqDropdownTrigger implements AfterContentInit, OnDestroy {
|
|
|
328
358
|
private handleHover;
|
|
329
359
|
/** Gets the portal that should be attached to the overlay. */
|
|
330
360
|
private getPortal;
|
|
331
|
-
private
|
|
361
|
+
private getOverlaySize;
|
|
362
|
+
/**
|
|
363
|
+
* When the panel hosts a search field, its content-sized width would jump as the field's cleaner
|
|
364
|
+
* appears or options are filtered. Freeze the width at the opened (empty) state so it stays stable
|
|
365
|
+
* — mirrors `KbqAbstractSelect.lockOverlayWidthForSearch`.
|
|
366
|
+
*/
|
|
367
|
+
private lockOverlayWidthForSearch;
|
|
368
|
+
/** Freezes the overlay pane at its rendered width. */
|
|
369
|
+
private pinOverlayWidth;
|
|
332
370
|
private addClassToOverlayContainer;
|
|
333
371
|
private removeClassFromOverlayContainer;
|
|
334
372
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqDropdownTrigger, never>;
|
|
@@ -347,6 +385,8 @@ declare class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit,
|
|
|
347
385
|
private ngZone;
|
|
348
386
|
private defaultOptions;
|
|
349
387
|
private readonly search;
|
|
388
|
+
/** Whether the dropdown projects a search form-field. @docs-private */
|
|
389
|
+
readonly hasSearch: i0.Signal<boolean>;
|
|
350
390
|
readonly navigationWithWrap: i0.InputSignal<boolean>;
|
|
351
391
|
/** Position of the dropdown in the X axis. */
|
|
352
392
|
get xPosition(): KbqDropdownPositionX;
|
|
@@ -375,6 +415,10 @@ declare class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit,
|
|
|
375
415
|
private _overlapTriggerX;
|
|
376
416
|
private _overlapTriggerY;
|
|
377
417
|
private _hasBackdrop;
|
|
418
|
+
/**
|
|
419
|
+
* @deprecated Has no effect. Use `KbqDropdownTrigger.widthOrigin` to make the panel match
|
|
420
|
+
* an element other than the trigger. Will be removed in v21.
|
|
421
|
+
*/
|
|
378
422
|
triggerWidth: string;
|
|
379
423
|
/** Config object to be passed into the dropdown panel's `[class]` binding */
|
|
380
424
|
classList: {
|
|
@@ -392,6 +436,29 @@ declare class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit,
|
|
|
392
436
|
direction: Direction;
|
|
393
437
|
/** Class to be added to the backdrop element. */
|
|
394
438
|
backdropClass: string;
|
|
439
|
+
/**
|
|
440
|
+
* Width of the panel. If set to `auto`, the panel will match the trigger width, but will never be
|
|
441
|
+
* narrower than `panelMinWidth`. If set to null, the panel will grow to match its content.
|
|
442
|
+
* Any other value is used as an exact width, and `panelMinWidth` is not applied.
|
|
443
|
+
*/
|
|
444
|
+
readonly panelWidth: i0.InputSignal<KbqPanelWidth>;
|
|
445
|
+
/**
|
|
446
|
+
* Minimum width of the panel in pixels. The panel is never narrower than this, nor than its trigger.
|
|
447
|
+
*/
|
|
448
|
+
readonly panelMinWidth: i0.InputSignalWithTransform<KbqPanelMinWidth, unknown>;
|
|
449
|
+
/**
|
|
450
|
+
* Maximum width of the panel in pixels. Caps how far the panel grows with its content — it never makes
|
|
451
|
+
* the panel narrower than the trigger, and never clamps an explicit `panelWidth`.
|
|
452
|
+
* When null, the `--kbq-dropdown-size-container-width-max` token applies.
|
|
453
|
+
*/
|
|
454
|
+
readonly panelMaxWidth: i0.InputSignalWithTransform<KbqPanelMaxWidth, unknown>;
|
|
455
|
+
/**
|
|
456
|
+
* `panelMinWidth` rendered as a CSS length for the `--kbq-dropdown-size-container-width-min`
|
|
457
|
+
* token, so the panel's CSS `min-width` floor tracks the input — mirroring how `panelMaxWidth`
|
|
458
|
+
* drives `max-width`. Non-finite input (e.g. `null`) leaves the token's static default in place.
|
|
459
|
+
* @docs-private
|
|
460
|
+
*/
|
|
461
|
+
protected readonly panelMinWidthToken: i0.Signal<string | null>;
|
|
395
462
|
/** @docs-private */
|
|
396
463
|
templateRef: TemplateRef<any>;
|
|
397
464
|
/**
|
|
@@ -460,7 +527,7 @@ declare class KbqDropdown implements AfterContentInit, KbqDropdownPanel, OnInit,
|
|
|
460
527
|
*/
|
|
461
528
|
private updateDirectDescendants;
|
|
462
529
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqDropdown, never>;
|
|
463
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqDropdown, "kbq-dropdown", ["kbqDropdown"], { "navigationWithWrap": { "alias": "navigationWithWrap"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "overlapTriggerY": { "alias": "overlapTriggerY"; "required": false; }; "overlapTriggerX": { "alias": "overlapTriggerX"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelClass": { "alias": "class"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; }, { "closed": "closed"; }, ["search", "lazyContent", "items"], ["*", "[kbqDropdownStaticContent]"], true, never>;
|
|
530
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqDropdown, "kbq-dropdown", ["kbqDropdown"], { "navigationWithWrap": { "alias": "navigationWithWrap"; "required": false; "isSignal": true; }; "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "overlapTriggerY": { "alias": "overlapTriggerY"; "required": false; }; "overlapTriggerX": { "alias": "overlapTriggerX"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "panelClass": { "alias": "class"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; "isSignal": true; }; "panelMaxWidth": { "alias": "panelMaxWidth"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, ["search", "lazyContent", "items"], ["*", "[kbqDropdownStaticContent]"], true, never>;
|
|
464
531
|
}
|
|
465
532
|
|
|
466
533
|
declare class KbqDropdownModule {
|