@koobiq/components 20.1.0 → 20.3.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 +6 -2
- package/accordion/accordion-tokens.scss +3 -0
- package/accordion/{accordion-trigger.component.scss → accordion-trigger.scss} +10 -0
- package/accordion/accordion.scss +71 -0
- package/accordion/index.d.ts +264 -121
- package/actions-panel/index.d.ts +25 -13
- package/alert/_alert-theme.scss +14 -0
- package/alert/alert.component.scss +24 -13
- package/alert/index.d.ts +63 -29
- package/app-switcher/app-switcher-dropdown-app.scss +7 -5
- package/app-switcher/app-switcher-dropdown-site.scss +6 -4
- package/app-switcher/index.d.ts +41 -4
- package/app-switcher/kbq-app-switcher-list-item.scss +6 -8
- package/autocomplete/autocomplete.scss +2 -1
- package/autocomplete/index.d.ts +58 -37
- package/badge/index.d.ts +2 -3
- package/breadcrumbs/index.d.ts +1 -1
- package/button/index.d.ts +2 -2
- package/button-toggle/button-toggle-tokens.scss +2 -0
- package/button-toggle/button-toggle.scss +9 -0
- package/button-toggle/index.d.ts +5 -0
- package/checkbox/index.d.ts +33 -29
- package/clamped-text/index.d.ts +3 -2
- package/code-block/index.d.ts +24 -19
- package/content-panel/index.d.ts +1 -1
- package/core/index.d.ts +1217 -186
- package/core/option/_action-container-mixins.scss +28 -0
- package/core/option/_option-theme.scss +24 -0
- package/core/option/action.scss +7 -0
- package/core/styles/_core.scss +2 -0
- package/core/styles/_koobiq-theme.scss +2 -0
- package/core/styles/_tokens.scss +1 -0
- package/core/styles/common/_animation.scss +31 -24
- package/core/styles/common/_connected-overlay.scss +39 -0
- package/core/styles/common/_select.scss +19 -2
- package/core/styles/common/_tokens.scss +0 -9
- package/core/styles/theming/_index.scss +0 -1
- package/core/styles/theming/_theming.scss +34 -5
- package/datepicker/index.d.ts +46 -15
- package/dl/dl.scss +26 -0
- package/dl/index.d.ts +8 -1
- package/dropdown/_dropdown-theme.scss +28 -2
- package/dropdown/dropdown-item.scss +29 -0
- package/dropdown/dropdown-tokens.scss +2 -1
- package/dropdown/dropdown.scss +16 -1
- package/dropdown/index.d.ts +331 -17
- package/dynamic-translation/index.d.ts +1 -1
- package/fesm2022/koobiq-components-accordion.mjs +480 -317
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +57 -46
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +98 -58
- package/fesm2022/koobiq-components-alert.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +233 -38
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +89 -52
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +18 -17
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +17 -12
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +25 -25
- package/fesm2022/koobiq-components-checkbox.mjs +69 -92
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +18 -13
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +56 -69
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +29 -29
- package/fesm2022/koobiq-components-core.mjs +2485 -735
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +168 -126
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +23 -15
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +814 -136
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-dynamic-translation.mjs +13 -13
- package/fesm2022/koobiq-components-ellipsis-center.mjs +7 -7
- package/fesm2022/koobiq-components-empty-state.mjs +19 -19
- package/fesm2022/koobiq-components-file-upload.mjs +74 -42
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +783 -199
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +7 -7
- package/fesm2022/koobiq-components-form-field.mjs +350 -162
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +52 -25
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +175 -28
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +41 -24
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-link.mjs +8 -8
- package/fesm2022/koobiq-components-list.mjs +657 -143
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-markdown.mjs +14 -11
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +59 -35
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +177 -67
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +40 -24
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -17
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +31 -21
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-progress-bar.mjs +13 -13
- package/fesm2022/koobiq-components-progress-spinner.mjs +13 -13
- package/fesm2022/koobiq-components-radio.mjs +10 -10
- package/fesm2022/koobiq-components-resizer.mjs +33 -14
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-scrollbar.mjs +10 -10
- package/fesm2022/koobiq-components-search-expandable.mjs +49 -14
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +450 -146
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +14 -14
- package/fesm2022/koobiq-components-sidepanel.mjs +26 -26
- package/fesm2022/koobiq-components-skeleton.mjs +10 -10
- package/fesm2022/koobiq-components-split-button.mjs +10 -17
- package/fesm2022/koobiq-components-split-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +17 -17
- package/fesm2022/koobiq-components-table.mjs +15 -13
- package/fesm2022/koobiq-components-table.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +80 -68
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +283 -122
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +13 -8
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +29 -24
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +61 -30
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +77 -42
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +51 -26
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +72 -64
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +219 -28
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +13 -13
- package/fesm2022/koobiq-components-tree-select.mjs +222 -80
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +302 -81
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +27 -27
- package/file-upload/index.d.ts +25 -6
- package/file-upload/multiple-file-upload.component.scss +14 -0
- package/filter-bar/_filter-bar-theme.scss +0 -10
- package/filter-bar/filter-bar-tokens.scss +3 -0
- package/filter-bar/filters.scss +3 -2
- package/filter-bar/index.d.ts +281 -9
- package/filter-bar/pipes/base-pipe.scss +0 -11
- package/filter-bar/pipes/pipe-input.scss +10 -0
- package/filter-bar/pipes/pipe-multi-tree-select.scss +0 -6
- package/filter-bar/pipes/pipe-multiselect.scss +0 -6
- package/filter-bar/pipes/pipe-tree-select.scss +0 -6
- package/form-field/_form-field-theme.scss +76 -20
- package/form-field/fieldset.scss +10 -0
- package/form-field/form-field-tokens.scss +15 -1
- package/form-field/form-field.scss +15 -19
- package/form-field/index.d.ts +147 -65
- package/icon/icon-button.scss +3 -1
- package/icon/index.d.ts +45 -7
- package/inline-edit/index.d.ts +57 -4
- package/inline-edit/inline-edit.scss +10 -0
- package/input/index.d.ts +17 -2
- package/list/_list-theme.scss +42 -10
- package/list/index.d.ts +326 -79
- package/list/list-tokens.scss +43 -8
- package/list/list.scss +186 -12
- package/markdown/index.d.ts +1 -1
- package/modal/index.d.ts +21 -4
- package/modal/modal-tokens.scss +1 -1
- package/navbar/_navbar-item_vertical.scss +7 -5
- package/navbar/index.d.ts +54 -5
- package/navbar/navbar-brand.scss +23 -7
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/index.d.ts +2 -1
- package/notification-center/notification-item.scss +6 -0
- package/package.json +3 -6
- package/popover/index.d.ts +2 -2
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/resizer/index.d.ts +12 -0
- 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/deprecated-icons/README.md +29 -4
- package/schematics/migrations/deprecated-icons/data.js +7 -0
- package/schematics/migrations/deprecated-icons/index.js +62 -35
- package/schematics/migrations/filter-bar-signals/README.md +1 -1
- package/schematics/migrations/new-icons-pack/README.md +37 -2
- package/schematics/migrations/new-icons-pack/data.js +8 -0
- package/schematics/migrations/new-icons-pack/index.js +144 -53
- package/schematics/migrations.json +11 -1
- package/schematics/ng-add/index.js +3 -3
- package/schematics/utils/angular-parsing.js +41 -14
- package/schematics/utils/ast.js +31 -0
- package/schematics/utils/icon-migration.js +530 -0
- package/schematics/utils/typescript.js +44 -0
- package/scrollbar/index.d.ts +1 -1
- package/search-expandable/index.d.ts +3 -0
- package/select/index.d.ts +212 -40
- package/select/select-tokens.scss +0 -1
- package/select/select.scss +0 -2
- package/splitter/index.d.ts +1 -1
- package/table/_table-theme.scss +4 -0
- package/table/index.d.ts +2 -1
- package/table/table.scss +8 -0
- 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/tags/index.d.ts +128 -29
- package/textarea/index.d.ts +5 -0
- package/time-range/index.d.ts +1 -1
- package/timepicker/index.d.ts +4 -0
- package/timezone/index.d.ts +10 -8
- package/toast/index.d.ts +26 -3
- package/toggle/index.d.ts +34 -14
- package/tooltip/index.d.ts +119 -7
- package/tree/_tree-theme.scss +25 -5
- package/tree/index.d.ts +71 -3
- package/tree/tree-option.scss +2 -8
- package/tree-select/_tree-select-theme.scss +22 -0
- package/tree-select/index.d.ts +127 -36
- package/accordion/accordion.component.scss +0 -50
- package/core/styles/_tokens.kbq.import.scss +0 -4
- package/core/styles/theming/_components-theming.scss +0 -1927
- package/filter-bar/pipes/pipe-select.scss +0 -5
- package/overflow-items/overflow-items.scss +0 -20
package/actions-panel/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Overlay, ScrollStrategy, OverlayRef, ComponentType } from '@angular/cdk/overlay';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injector, ElementRef,
|
|
3
|
+
import { InjectionToken, Injector, ElementRef, Provider, OnDestroy, EventEmitter, TemplateRef } from '@angular/core';
|
|
4
4
|
import { Direction } from '@angular/cdk/bidi';
|
|
5
5
|
import { CdkDialogContainer, DialogRef } from '@angular/cdk/dialog';
|
|
6
6
|
import { Observable } from 'rxjs';
|
|
@@ -183,30 +183,42 @@ declare class KbqActionsPanelRef<I = unknown, R = unknown> {
|
|
|
183
183
|
* @docs-private
|
|
184
184
|
*/
|
|
185
185
|
containerInstance: KbqActionsPanelContainer;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
186
|
+
private readonly afterOpenedSubject;
|
|
187
|
+
private readonly beforeOpenedSubject;
|
|
188
|
+
private readonly beforeClosedSubject;
|
|
189
|
+
/** Emits when keydown events are targeted on the overlay. */
|
|
190
|
+
readonly keydownEvents: Observable<KeyboardEvent>;
|
|
191
|
+
/** Emits when the actions panel starts opening, before its entrance animation plays. */
|
|
192
|
+
readonly beforeOpened: Observable<void>;
|
|
193
|
+
/** Emits when the actions panel has opened and appeared. */
|
|
194
|
+
readonly afterOpened: Observable<void>;
|
|
195
|
+
/** Emits when the actions panel starts closing, before its exit animation plays. */
|
|
196
|
+
readonly beforeClosed: Observable<R | undefined>;
|
|
197
|
+
/** Emits when the actions panel is finished closing. */
|
|
198
|
+
readonly afterClosed: Observable<R | undefined>;
|
|
192
199
|
/**
|
|
193
|
-
*
|
|
200
|
+
* Overlay reference for the actions panel.
|
|
194
201
|
*
|
|
195
202
|
* @docs-private
|
|
196
203
|
*/
|
|
197
|
-
|
|
204
|
+
readonly overlayRef: OverlayRef;
|
|
198
205
|
/**
|
|
199
|
-
*
|
|
206
|
+
* ID of the actions panel.
|
|
200
207
|
*
|
|
201
208
|
* @docs-private
|
|
202
209
|
*/
|
|
203
|
-
|
|
204
|
-
private readonly _afterOpened;
|
|
210
|
+
readonly id: string;
|
|
205
211
|
/** Result to be passed down to the `afterClosed` stream. */
|
|
206
212
|
private result;
|
|
207
213
|
/** Handle to the timeout that's running as a fallback in case the close animation doesn't fire. */
|
|
208
|
-
private closeAnimationFallbackTimeout
|
|
214
|
+
private closeAnimationFallbackTimeout?;
|
|
209
215
|
constructor(dialogRef: DialogRef<R, I>, containerInstance: KbqActionsPanelContainer);
|
|
216
|
+
/**
|
|
217
|
+
* Opens the actions panel, playing its entrance animation.
|
|
218
|
+
*
|
|
219
|
+
* @docs-private
|
|
220
|
+
*/
|
|
221
|
+
open(): void;
|
|
210
222
|
/** Closes the actions panel. */
|
|
211
223
|
close(result?: R): void;
|
|
212
224
|
private handleAnimation;
|
package/alert/_alert-theme.scss
CHANGED
|
@@ -29,6 +29,20 @@
|
|
|
29
29
|
&.kbq-alert_info {
|
|
30
30
|
@include kbq-alert-style(default, info);
|
|
31
31
|
}
|
|
32
|
+
|
|
33
|
+
// The status icon is the only thing distinguishing default-style alerts, so it must clear the
|
|
34
|
+
// WCAG 1.4.11 3:1 non-text minimum. The `--kbq-icon-*` palette is tuned for the page background
|
|
35
|
+
// and does not clear it against the neutral container in the light scheme (warning 2.59:1,
|
|
36
|
+
// success 2.79:1); the darker `--kbq-foreground-*` values do (4.00:1 / 4.65:1). In the dark
|
|
37
|
+
// scheme both palettes resolve to the same value, so this override is inert there.
|
|
38
|
+
// The token has to be redeclared on the icon element itself: icon-tokens.scss declares
|
|
39
|
+
// `--kbq-icon-warning-color` on `.kbq-icon`, so a value inherited from `.kbq-alert` never wins.
|
|
40
|
+
// `:not()` excludes icon-item and icon-button, which inherit `.kbq-icon` from KbqIcon but paint
|
|
41
|
+
// their own filled backgrounds.
|
|
42
|
+
.kbq-alert__icon > .kbq-icon:not(.kbq-icon-item, .kbq-icon-button) {
|
|
43
|
+
--kbq-icon-warning-color: var(--kbq-foreground-warning);
|
|
44
|
+
--kbq-icon-success-color: var(--kbq-foreground-success);
|
|
45
|
+
}
|
|
32
46
|
}
|
|
33
47
|
|
|
34
48
|
.kbq-alert.kbq-alert_colored {
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
.kbq-alert__icon {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: flex-start;
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
.kbq-alert__content {
|
|
16
21
|
display: flex;
|
|
17
22
|
flex-direction: column;
|
|
@@ -30,14 +35,13 @@
|
|
|
30
35
|
margin: var(--kbq-alert-size-normal-no-title-icon-margin-top) var(--kbq-alert-size-normal-icon-margin-right)
|
|
31
36
|
var(--kbq-alert-size-normal-icon-margin-bottom) var(--kbq-alert-size-normal-icon-margin-left);
|
|
32
37
|
|
|
38
|
+
padding-top: var(--kbq-alert-size-normal-no-title-icon-padding-top);
|
|
39
|
+
|
|
33
40
|
&.kbq-alert__icon_title {
|
|
34
41
|
margin-top: var(--kbq-alert-size-normal-icon-margin-top);
|
|
35
42
|
|
|
36
|
-
padding-top: var(--kbq-alert-size-normal-
|
|
43
|
+
padding-top: var(--kbq-alert-size-normal-icon-padding-top);
|
|
37
44
|
}
|
|
38
|
-
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
align-items: flex-start;
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
& .kbq-alert__content {
|
|
@@ -50,12 +54,17 @@
|
|
|
50
54
|
}
|
|
51
55
|
|
|
52
56
|
& .kbq-alert__button-stack {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
align-items: center;
|
|
60
|
+
gap: var(--kbq-size-m);
|
|
61
|
+
|
|
53
62
|
padding-top: var(--kbq-alert-size-normal-button-stack-padding-top);
|
|
54
63
|
padding-bottom: var(--kbq-alert-size-normal-button-stack-padding-bottom);
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
& .kbq-alert__button-stack_has-button {
|
|
58
|
-
padding-top:
|
|
67
|
+
padding-top: var(--kbq-size-m);
|
|
59
68
|
}
|
|
60
69
|
|
|
61
70
|
& .kbq-alert__close-button {
|
|
@@ -63,8 +72,8 @@
|
|
|
63
72
|
margin-left: var(--kbq-alert-size-normal-close-button-margin-left);
|
|
64
73
|
|
|
65
74
|
.kbq-icon-button {
|
|
66
|
-
--kbq-icon-button-size-normal-horizontal-padding:
|
|
67
|
-
--kbq-icon-button-size-normal-vertical-padding:
|
|
75
|
+
--kbq-icon-button-size-normal-horizontal-padding: var(--kbq-size-xxs);
|
|
76
|
+
--kbq-icon-button-size-normal-vertical-padding: var(--kbq-size-xxs);
|
|
68
77
|
}
|
|
69
78
|
}
|
|
70
79
|
}
|
|
@@ -86,9 +95,6 @@
|
|
|
86
95
|
|
|
87
96
|
padding-top: var(--kbq-alert-size-compact-icon-padding-top);
|
|
88
97
|
}
|
|
89
|
-
|
|
90
|
-
display: inline-flex;
|
|
91
|
-
align-items: flex-start;
|
|
92
98
|
}
|
|
93
99
|
|
|
94
100
|
& .kbq-alert__content {
|
|
@@ -101,12 +107,17 @@
|
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
& .kbq-alert__button-stack {
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-wrap: wrap;
|
|
112
|
+
align-items: center;
|
|
113
|
+
gap: var(--kbq-size-m);
|
|
114
|
+
|
|
104
115
|
padding-top: var(--kbq-alert-size-compact-button-stack-padding-top);
|
|
105
116
|
padding-bottom: var(--kbq-alert-size-compact-button-stack-padding-bottom);
|
|
106
117
|
}
|
|
107
118
|
|
|
108
119
|
& .kbq-alert__button-stack_has-button {
|
|
109
|
-
padding-top:
|
|
120
|
+
padding-top: var(--kbq-size-m);
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
& .kbq-alert__close-button {
|
|
@@ -114,8 +125,8 @@
|
|
|
114
125
|
margin-left: var(--kbq-alert-size-compact-close-button-margin-left);
|
|
115
126
|
|
|
116
127
|
.kbq-icon-button {
|
|
117
|
-
--kbq-icon-button-size-normal-horizontal-padding:
|
|
118
|
-
--kbq-icon-button-size-normal-vertical-padding:
|
|
128
|
+
--kbq-icon-button-size-normal-horizontal-padding: var(--kbq-size-xxs);
|
|
129
|
+
--kbq-icon-button-size-normal-vertical-padding: var(--kbq-size-xxs);
|
|
119
130
|
}
|
|
120
131
|
}
|
|
121
132
|
}
|
package/alert/index.d.ts
CHANGED
|
@@ -1,54 +1,88 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { AfterContentInit } from '@angular/core';
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
3
2
|
import { KbqButton } from '@koobiq/components/button';
|
|
4
3
|
import { KbqIconItem, KbqIcon } from '@koobiq/components/icon';
|
|
5
|
-
import * as i1 from '@angular/cdk/a11y';
|
|
6
|
-
import * as i2 from '@angular/cdk/platform';
|
|
7
4
|
|
|
5
|
+
/** Visual style of an alert. */
|
|
8
6
|
declare enum KbqAlertStyles {
|
|
7
|
+
/** Neutral background; the status is conveyed by the icon color only. */
|
|
9
8
|
Default = "default",
|
|
9
|
+
/** Colored background matching the status — use to draw attention when a default alert gets lost on screen. */
|
|
10
10
|
Colored = "colored"
|
|
11
11
|
}
|
|
12
|
+
/** Status conveyed by an alert. Drives the background (colored style) and the auto-tinted status icon. */
|
|
12
13
|
declare enum KbqAlertColors {
|
|
13
14
|
Error = "error",
|
|
14
15
|
Warning = "warning",
|
|
15
16
|
Success = "success",
|
|
16
17
|
Info = "info"
|
|
17
18
|
}
|
|
19
|
+
/** Marks the projected alert heading. */
|
|
18
20
|
declare class KbqAlertTitle {
|
|
19
|
-
static ɵfac:
|
|
20
|
-
static ɵdir:
|
|
21
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqAlertTitle, never>;
|
|
22
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KbqAlertTitle, "[kbq-alert-title]", ["kbqAlertTitle"], {}, {}, never, never, true, never>;
|
|
21
23
|
}
|
|
24
|
+
/** Marks the projected close control (place it on a native `<button>` with an accessible name). */
|
|
22
25
|
declare class KbqAlertCloseButton {
|
|
23
|
-
static ɵfac:
|
|
24
|
-
static ɵdir:
|
|
26
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqAlertCloseButton, never>;
|
|
27
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KbqAlertCloseButton, "[kbq-alert-close-button]", ["kbqAlertCloseButton"], {}, {}, never, never, true, never>;
|
|
25
28
|
}
|
|
29
|
+
/** Marks a projected action control (link or button) shown in the alert's button stack. */
|
|
26
30
|
declare class KbqAlertControl {
|
|
27
|
-
static ɵfac:
|
|
28
|
-
static ɵdir:
|
|
31
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqAlertControl, never>;
|
|
32
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<KbqAlertControl, "[kbq-alert-control]", ["kbqAlertControl"], {}, {}, never, never, true, never>;
|
|
29
33
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
private
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Shows important information on a page. Can carry a hint, signal a status change, or indicate a problem.
|
|
36
|
+
*
|
|
37
|
+
* ```html
|
|
38
|
+
* <kbq-alert [alertColor]="'error'" [alertStyle]="'colored'">Something went wrong</kbq-alert>
|
|
39
|
+
* ```
|
|
40
|
+
*
|
|
41
|
+
* For a dynamically inserted alert, add `role="alert"` (or `aria-live`) on the host so assistive
|
|
42
|
+
* technology announces it — see the component guide.
|
|
43
|
+
*/
|
|
44
|
+
declare class KbqAlert {
|
|
45
|
+
/** @docs-private */
|
|
46
|
+
protected readonly iconItem: _angular_core.Signal<KbqIconItem | undefined>;
|
|
47
|
+
/** @docs-private */
|
|
48
|
+
protected readonly icon: _angular_core.Signal<KbqIcon | undefined>;
|
|
49
|
+
/** @docs-private */
|
|
50
|
+
protected readonly button: _angular_core.Signal<KbqButton | undefined>;
|
|
51
|
+
/** @docs-private */
|
|
52
|
+
protected readonly title: _angular_core.Signal<KbqAlertTitle | undefined>;
|
|
53
|
+
/** @docs-private */
|
|
54
|
+
protected readonly control: _angular_core.Signal<KbqAlertControl | undefined>;
|
|
55
|
+
/** @docs-private */
|
|
56
|
+
protected readonly closeButton: _angular_core.Signal<KbqAlertCloseButton | undefined>;
|
|
57
|
+
/** Whether the alert uses the denser compact size. */
|
|
58
|
+
readonly compact: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
59
|
+
/** Visual style — neutral `default` or the attention-drawing `colored` background. */
|
|
60
|
+
readonly alertStyle: _angular_core.InputSignal<"default" | "colored">;
|
|
61
|
+
/**
|
|
62
|
+
* Status of the alert. Drives the background in the `colored` style and auto-tints an uncolored
|
|
63
|
+
* projected status icon to the matching color (`info` icons become `contrast`).
|
|
64
|
+
* @default 'info'
|
|
65
|
+
*/
|
|
66
|
+
readonly alertColor: _angular_core.InputSignalWithTransform<"error" | "warning" | "success" | "info", "error" | "warning" | "success" | "info" | null | undefined>;
|
|
67
|
+
/** Emitted when the projected close control is activated. The consumer is responsible for hiding the alert. */
|
|
68
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
69
|
+
/** @docs-private */
|
|
70
|
+
protected readonly alertColorClass: _angular_core.Signal<string>;
|
|
71
|
+
/** @docs-private */
|
|
72
|
+
protected readonly isColored: _angular_core.Signal<boolean>;
|
|
73
|
+
/** The projected status icon, whichever slot it came from. @docs-private */
|
|
74
|
+
protected readonly projectedIcon: _angular_core.Signal<KbqIcon | undefined>;
|
|
75
|
+
/** Last color this component auto-assigned to the icon; lets us correct color on change without ignoring consumer's color. */
|
|
76
|
+
private lastAutoColor;
|
|
77
|
+
constructor();
|
|
78
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqAlert, never>;
|
|
79
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqAlert, "kbq-alert", ["kbqAlert"], { "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "alertStyle": { "alias": "alertStyle"; "required": false; "isSignal": true; }; "alertColor": { "alias": "alertColor"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, ["iconItem", "icon", "button", "title", "control", "closeButton"], ["[kbq-icon-item],[kbq-icon]", "[kbq-alert-title]", "*", "[kbq-alert-control]", "[kbq-alert-close-button]"], true, never>;
|
|
46
80
|
}
|
|
47
81
|
|
|
48
82
|
declare class KbqAlertModule {
|
|
49
|
-
static ɵfac:
|
|
50
|
-
static ɵmod:
|
|
51
|
-
static ɵinj:
|
|
83
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqAlertModule, never>;
|
|
84
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<KbqAlertModule, never, [typeof KbqAlert, typeof KbqAlertTitle, typeof KbqAlertCloseButton, typeof KbqAlertControl], [typeof KbqAlert, typeof KbqAlertTitle, typeof KbqAlertCloseButton, typeof KbqAlertControl]>;
|
|
85
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<KbqAlertModule>;
|
|
52
86
|
}
|
|
53
87
|
|
|
54
88
|
export { KbqAlert, KbqAlertCloseButton, KbqAlertColors, KbqAlertControl, KbqAlertModule, KbqAlertStyles, KbqAlertTitle };
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
min-height: 50px;
|
|
10
10
|
|
|
11
11
|
border-radius: var(--kbq-size-xs);
|
|
12
|
-
//
|
|
12
|
+
// transparent border to keep the box model aligned with the other list rows (matches kbq-list-item-base)
|
|
13
13
|
border: var(--kbq-size-3xs) solid transparent;
|
|
14
14
|
|
|
15
15
|
@include common.user-select(none);
|
|
@@ -59,12 +59,14 @@
|
|
|
59
59
|
color: var(--kbq-list-default-text-color);
|
|
60
60
|
|
|
61
61
|
&.kbq-dropdown-item_highlighted,
|
|
62
|
-
&:hover
|
|
63
|
-
|
|
62
|
+
&:hover,
|
|
63
|
+
&.cdk-keyboard-focused {
|
|
64
|
+
background: var(--kbq-states-background-transparent-hover);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
&:active,
|
|
68
|
+
&.kbq-active {
|
|
69
|
+
background: var(--kbq-states-background-transparent-active);
|
|
68
70
|
}
|
|
69
71
|
|
|
70
72
|
.kbq-app-switcher-dropdown-app__caption {
|
|
@@ -33,12 +33,14 @@
|
|
|
33
33
|
color: var(--kbq-list-default-text-color);
|
|
34
34
|
|
|
35
35
|
&.kbq-dropdown-item_highlighted,
|
|
36
|
-
&:hover
|
|
37
|
-
|
|
36
|
+
&:hover,
|
|
37
|
+
&.cdk-keyboard-focused {
|
|
38
|
+
background: var(--kbq-states-background-transparent-hover);
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
&:active,
|
|
42
|
+
&.kbq-active {
|
|
43
|
+
background: var(--kbq-states-background-transparent-active);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
}
|
package/app-switcher/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { InjectionToken, AfterViewInit, AfterContentInit, OnInit, TemplateRef, EventEmitter, Type } from '@angular/core';
|
|
4
|
+
import { InjectionToken, AfterViewInit, OnDestroy, AfterContentInit, OnInit, TemplateRef, EventEmitter, Type, QueryList } from '@angular/core';
|
|
5
5
|
import * as _koobiq_components_core from '@koobiq/components/core';
|
|
6
|
-
import { KbqPopUp, KbqPopUpTrigger, KbqPopUpPlacementValues, KbqPopUpSizeValues } from '@koobiq/components/core';
|
|
6
|
+
import { KbqPopUp, KbqPopUpTrigger, KbqPopUpPlacementValues, FocusKeyManager, KbqPopUpSizeValues } from '@koobiq/components/core';
|
|
7
7
|
import { ScrollStrategy, Overlay, OverlayConfig, CdkScrollable } from '@angular/cdk/overlay';
|
|
8
8
|
import { FormControl } from '@angular/forms';
|
|
9
9
|
import { KbqDropdownTrigger, KbqDropdownItem } from '@koobiq/components/dropdown';
|
|
@@ -58,7 +58,7 @@ declare const KBQ_APP_SWITCHER_DEFAULT_CONFIGURATION: {
|
|
|
58
58
|
/** @docs-private */
|
|
59
59
|
declare const KBQ_APP_SWITCHER_CONFIGURATION: InjectionToken<unknown>;
|
|
60
60
|
/** @docs-private */
|
|
61
|
-
declare class KbqAppSwitcherComponent extends KbqPopUp implements AfterViewInit {
|
|
61
|
+
declare class KbqAppSwitcherComponent extends KbqPopUp implements AfterViewInit, OnDestroy {
|
|
62
62
|
/** @docs-private */
|
|
63
63
|
protected readonly localeService: _koobiq_components_core.KbqLocaleService | null;
|
|
64
64
|
readonly externalConfiguration: unknown;
|
|
@@ -84,14 +84,49 @@ declare class KbqAppSwitcherComponent extends KbqPopUp implements AfterViewInit
|
|
|
84
84
|
readonly input: i0.Signal<KbqInput | undefined>;
|
|
85
85
|
/** @docs-private */
|
|
86
86
|
readonly otherSites: i0.Signal<KbqDropdownTrigger>;
|
|
87
|
+
/** @docs-private */
|
|
88
|
+
protected allItems: QueryList<KbqDropdownItem>;
|
|
89
|
+
/** Roving-focus manager over the inline menu items (flat app rows and other-site rows). */
|
|
90
|
+
protected keyManager: FocusKeyManager<KbqDropdownItem>;
|
|
91
|
+
/** @docs-private */
|
|
92
|
+
private readonly menuItems;
|
|
93
|
+
/** @docs-private */
|
|
94
|
+
private readonly dir;
|
|
95
|
+
/**
|
|
96
|
+
* CSS class marking a nested alias row, bound in the template (see app-switcher.html). Kept as a
|
|
97
|
+
* single named constant, rather than a literal repeated in both places, so handleGroupHorizontal's
|
|
98
|
+
* classList check can't silently drift from the template's class binding if the class is renamed.
|
|
99
|
+
*/
|
|
100
|
+
protected readonly nestedAliasClass = "kbq-app-switcher-site_nested";
|
|
87
101
|
constructor();
|
|
88
102
|
ngAfterViewInit(): void;
|
|
103
|
+
/** Releases the internal roving-focus menu QueryList. */
|
|
104
|
+
ngOnDestroy(): void;
|
|
89
105
|
/** @docs-private */
|
|
90
106
|
updateClassMap(placement: string, customClass: string, size: KbqPopUpSizeValues): void;
|
|
91
107
|
/** @docs-private */
|
|
92
108
|
updateTrapFocus(isTrapFocus: boolean): void;
|
|
93
109
|
/** @docs-private */
|
|
94
110
|
escapeHandler(): void;
|
|
111
|
+
/** Handles keyboard navigation across the app-switcher menu items.
|
|
112
|
+
* @docs-private */
|
|
113
|
+
protected keydownHandler(event: KeyboardEvent): void;
|
|
114
|
+
/**
|
|
115
|
+
* Expands/collapses an app group (or steps from an alias back to its header) on Left/Right,
|
|
116
|
+
* honouring the current text direction. Returns whether the key was consumed.
|
|
117
|
+
*/
|
|
118
|
+
private handleGroupHorizontal;
|
|
119
|
+
/** Whether the keyboard event originated from the search input. */
|
|
120
|
+
private eventFromInput;
|
|
121
|
+
/** Syncs the key manager's active item with focus that arrives via Tab, click or a closing flyout.
|
|
122
|
+
* Clears the active item (index -1) when focus lands on a focusable element that isn't one of
|
|
123
|
+
* `menuItems` (e.g. the search field's clear button) - otherwise a stale `activeItem` from before
|
|
124
|
+
* the focus move would keep receiving Enter/Space/arrow-key actions meant for the new target.
|
|
125
|
+
* @docs-private */
|
|
126
|
+
protected focusinHandler(event: FocusEvent): void;
|
|
127
|
+
/** Closes the popup once focus leaves the menu and its site flyouts, mirroring the dropdown.
|
|
128
|
+
* @docs-private */
|
|
129
|
+
protected focusoutHandler(event: FocusEvent): void;
|
|
95
130
|
/** @docs-private */
|
|
96
131
|
selectAppInSite(site: KbqAppSwitcherSite, app: KbqAppSwitcherApp): void;
|
|
97
132
|
private filterSites;
|
|
@@ -221,11 +256,13 @@ declare class KbqAppSwitcherListItem extends KbqDropdownItem {
|
|
|
221
256
|
private sanitizer;
|
|
222
257
|
app: KbqAppSwitcherApp;
|
|
223
258
|
readonly toggle: i0.InputSignalWithTransform<boolean, unknown>;
|
|
259
|
+
/** Search query to highlight within the app name. */
|
|
260
|
+
readonly highlightText: i0.InputSignal<string>;
|
|
224
261
|
collapsed: boolean;
|
|
225
262
|
clickHandler(event: MouseEvent): void;
|
|
226
263
|
getIcon(icon: string | null): _angular_platform_browser.SafeHtml;
|
|
227
264
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqAppSwitcherListItem, never>;
|
|
228
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqAppSwitcherListItem, "[kbq-app-switcher-list-item]", ["kbqAppSwitcherApp"], { "app": { "alias": "app"; "required": false; }; "toggle": { "alias": "toggle"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, {}, never, never, true, never>;
|
|
265
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqAppSwitcherListItem, "[kbq-app-switcher-list-item]", ["kbqAppSwitcherApp"], { "app": { "alias": "app"; "required": false; }; "toggle": { "alias": "toggle"; "required": false; "isSignal": true; }; "highlightText": { "alias": "highlightText"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, {}, never, never, true, never>;
|
|
229
266
|
static ngAcceptInputType_collapsed: unknown;
|
|
230
267
|
}
|
|
231
268
|
|
|
@@ -118,7 +118,8 @@
|
|
|
118
118
|
.kbq-app-switcher-list-item {
|
|
119
119
|
&:hover,
|
|
120
120
|
&.kbq-hover,
|
|
121
|
-
&.kbq-focused
|
|
121
|
+
&.kbq-focused,
|
|
122
|
+
&.cdk-keyboard-focused {
|
|
122
123
|
&:has(.kbq-app-switcher-list-item__toggle) .kbq-app-switcher-list-item__icon {
|
|
123
124
|
visibility: hidden;
|
|
124
125
|
}
|
|
@@ -129,7 +130,8 @@
|
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
&:hover,
|
|
132
|
-
&.kbq-hover
|
|
133
|
+
&.kbq-hover,
|
|
134
|
+
&.cdk-keyboard-focused {
|
|
133
135
|
background: var(--kbq-states-background-transparent-hover);
|
|
134
136
|
|
|
135
137
|
& .kbq-app-switcher-list-item__toggle {
|
|
@@ -146,7 +148,8 @@
|
|
|
146
148
|
background: var(--kbq-background-theme-less);
|
|
147
149
|
|
|
148
150
|
&:hover,
|
|
149
|
-
&.kbq-hover
|
|
151
|
+
&.kbq-hover,
|
|
152
|
+
&.cdk-keyboard-focused {
|
|
150
153
|
background: var(--kbq-states-background-theme-less-hover);
|
|
151
154
|
}
|
|
152
155
|
|
|
@@ -158,11 +161,6 @@
|
|
|
158
161
|
|
|
159
162
|
background: var(--kbq-list-default-container-background);
|
|
160
163
|
color: var(--kbq-list-default-text-color);
|
|
161
|
-
|
|
162
|
-
&.cdk-keyboard-focused {
|
|
163
|
-
outline: none;
|
|
164
|
-
border-color: var(--kbq-list-states-focused-focus-outline-color);
|
|
165
|
-
}
|
|
166
164
|
}
|
|
167
165
|
}
|
|
168
166
|
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
box-sizing: border-box;
|
|
15
15
|
min-width: 100%;
|
|
16
16
|
width: 100%;
|
|
17
|
-
|
|
17
|
+
// See `%kbq-select-panel` — same soft cap, same token.
|
|
18
|
+
max-width: var(--kbq-panel-size-width-max, 640px);
|
|
18
19
|
|
|
19
20
|
border-radius: var(--kbq-autocomplete-size-panel-border-radius, var(--kbq-size-border-radius));
|
|
20
21
|
max-height: var(--kbq-autocomplete-size-panel-max-height);
|