@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/icon/index.d.ts
CHANGED
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { AfterContentInit, OnChanges, ElementRef, ChangeDetectorRef, DestroyRef, SimpleChanges, AfterViewInit, OnDestroy
|
|
2
|
+
import { InjectionToken, Provider, AfterContentInit, OnChanges, ElementRef, ChangeDetectorRef, DestroyRef, SimpleChanges, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
4
|
-
import * as _koobiq_components_core from '@koobiq/components/core';
|
|
5
|
-
import { KbqColorDirective } from '@koobiq/components/core';
|
|
6
4
|
import { Observable, ReplaySubject } from 'rxjs';
|
|
5
|
+
import { KbqColorDirective } from '@koobiq/components/core';
|
|
7
6
|
import { SafeResourceUrl, SafeHtml } from '@angular/platform-browser';
|
|
8
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Narrow contract that lets `KbqIcon` react to a host's error state (e.g. `autoColor`) without
|
|
10
|
+
* depending on the host's concrete class.
|
|
11
|
+
* @docs-private
|
|
12
|
+
*/
|
|
13
|
+
interface KbqIconErrorStateContext {
|
|
14
|
+
/** Whether the host is currently in an error state. */
|
|
15
|
+
readonly errorState: boolean;
|
|
16
|
+
/** Emits whenever the host's state changes, prompting `KbqIcon` to re-check `errorState`. */
|
|
17
|
+
readonly stateChanges: Observable<void>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Injection token used by `KbqIcon` to look up its `KbqIconErrorStateContext`.
|
|
21
|
+
* @docs-private
|
|
22
|
+
*/
|
|
23
|
+
declare const KBQ_ICON_ERROR_STATE_CONTEXT: InjectionToken<KbqIconErrorStateContext>;
|
|
24
|
+
/**
|
|
25
|
+
* Utility provider for `KBQ_ICON_ERROR_STATE_CONTEXT`, built from a factory that resolves the current host's `KbqIconErrorStateContext`.
|
|
26
|
+
* @docs-private
|
|
27
|
+
*/
|
|
28
|
+
declare const kbqIconErrorStateContextFactoryProvider: (factory: () => KbqIconErrorStateContext) => Provider;
|
|
29
|
+
|
|
9
30
|
interface KbqIconOptions {
|
|
10
31
|
viewBox?: string;
|
|
11
32
|
withCredentials?: boolean;
|
|
@@ -56,7 +77,11 @@ declare class KbqIconRegistry {
|
|
|
56
77
|
|
|
57
78
|
declare class KbqIcon extends KbqColorDirective implements AfterContentInit, OnChanges {
|
|
58
79
|
readonly elementRef: ElementRef<HTMLElement>;
|
|
59
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Host providing error state for `autoColor`, when the icon sits inside one (e.g. a form field).
|
|
82
|
+
* @docs-private
|
|
83
|
+
*/
|
|
84
|
+
protected readonly errorStateContext: KbqIconErrorStateContext | null;
|
|
60
85
|
protected readonly changeDetectorRef: ChangeDetectorRef;
|
|
61
86
|
protected readonly registry: KbqIconRegistry | null;
|
|
62
87
|
protected readonly destroyRef: DestroyRef;
|
|
@@ -83,9 +108,22 @@ declare class KbqIcon extends KbqColorDirective implements AfterContentInit, OnC
|
|
|
83
108
|
static ɵcmp: i0.ɵɵComponentDeclaration<KbqIcon, "[kbq-icon]", never, { "small": { "alias": "small"; "required": false; "isSignal": true; }; "autoColor": { "alias": "autoColor"; "required": false; }; "iconName": { "alias": "kbq-icon"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
84
109
|
}
|
|
85
110
|
|
|
111
|
+
/**
|
|
112
|
+
* Size options for `KbqIconButton`.
|
|
113
|
+
* - `compact`: 16px icon with padding, 24×24px container.
|
|
114
|
+
* - `normal`: 24px icon, no padding.
|
|
115
|
+
*/
|
|
116
|
+
type KbqIconButtonSize = 'compact' | 'normal';
|
|
86
117
|
declare class KbqIconButton extends KbqIcon implements AfterViewInit, OnDestroy {
|
|
87
118
|
protected readonly focusMonitor: FocusMonitor;
|
|
119
|
+
/** Size of the icon button. */
|
|
120
|
+
readonly size: i0.InputSignal<KbqIconButtonSize>;
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated Use `size` input instead. Will be removed in the next major release (#DS-5338).
|
|
123
|
+
*/
|
|
88
124
|
readonly small: i0.InputSignal<boolean>;
|
|
125
|
+
/** @docs-private */
|
|
126
|
+
protected readonly isCompact: i0.Signal<boolean>;
|
|
89
127
|
/** Name of an icon within a @koobiq/icons. */
|
|
90
128
|
iconName: string;
|
|
91
129
|
get tabindex(): any;
|
|
@@ -104,7 +142,7 @@ declare class KbqIconButton extends KbqIcon implements AfterViewInit, OnDestroy
|
|
|
104
142
|
private runFocusMonitor;
|
|
105
143
|
private stopFocusMonitor;
|
|
106
144
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqIconButton, never>;
|
|
107
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqIconButton, "[kbq-icon-button]", never, { "small": { "alias": "small"; "required": false; "isSignal": true; }; "iconName": { "alias": "kbq-icon-button"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
145
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqIconButton, "[kbq-icon-button]", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "small": { "alias": "small"; "required": false; "isSignal": true; }; "iconName": { "alias": "kbq-icon-button"; "required": false; }; "tabindex": { "alias": "tabindex"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
108
146
|
static ngAcceptInputType_disabled: unknown;
|
|
109
147
|
}
|
|
110
148
|
|
|
@@ -158,5 +196,5 @@ declare class KbqIconModule {
|
|
|
158
196
|
static ɵinj: i0.ɵɵInjectorDeclaration<KbqIconModule>;
|
|
159
197
|
}
|
|
160
198
|
|
|
161
|
-
export { KBQ_ICONS_CONFIG, KBQ_ICON_RESOLVER, KbqIcon, KbqIconButton, KbqIconItem, KbqIconModule, KbqIconRegistry, kbqIconsDictProvider, kbqIconsProvider, kbqIconsResolverProvider };
|
|
162
|
-
export type { KbqIconOptions, KbqIconResolver, KbqIconsConfig };
|
|
199
|
+
export { KBQ_ICONS_CONFIG, KBQ_ICON_ERROR_STATE_CONTEXT, KBQ_ICON_RESOLVER, KbqIcon, KbqIconButton, KbqIconItem, KbqIconModule, KbqIconRegistry, kbqIconErrorStateContextFactoryProvider, kbqIconsDictProvider, kbqIconsProvider, kbqIconsResolverProvider };
|
|
200
|
+
export type { KbqIconButtonSize, KbqIconErrorStateContext, KbqIconOptions, KbqIconResolver, KbqIconsConfig };
|
package/inline-edit/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { ElementRef, TemplateRef } from '@angular/core';
|
|
3
|
-
import {
|
|
4
|
-
import { PopUpPlacements, KbqComponentColors } from '@koobiq/components/core';
|
|
3
|
+
import { ScrollStrategy, CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
4
|
+
import { KbqConnectedOverlayOriginProvider, PopUpPlacements, KbqComponentColors } from '@koobiq/components/core';
|
|
5
5
|
import { KbqDropdownTrigger } from '@koobiq/components/dropdown';
|
|
6
6
|
import { KbqLabel, KbqFormField } from '@koobiq/components/form-field';
|
|
7
|
+
import { KbqSelect } from '@koobiq/components/select';
|
|
7
8
|
import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
8
9
|
import * as i1 from '@angular/cdk/a11y';
|
|
9
10
|
|
|
@@ -37,11 +38,24 @@ declare class KbqInlineEditMenu {
|
|
|
37
38
|
* This component is projecting edit/view mode templates and adds keyboard/pointer handlers.
|
|
38
39
|
* Edit mode opens in a positioned overlay that matches the view mode width or can be customized.
|
|
39
40
|
*/
|
|
40
|
-
declare class KbqInlineEdit {
|
|
41
|
+
declare class KbqInlineEdit implements KbqConnectedOverlayOriginProvider {
|
|
41
42
|
private readonly overlay;
|
|
42
43
|
private readonly document;
|
|
44
|
+
private readonly window;
|
|
43
45
|
private readonly resizeObserver;
|
|
44
46
|
protected readonly elementRef: ElementRef<HTMLElement>;
|
|
47
|
+
private readonly ngZone;
|
|
48
|
+
private readonly scrollDispatcher;
|
|
49
|
+
/**
|
|
50
|
+
* The validation tooltip is anchored inside the edit-mode overlay — an overlay inside another
|
|
51
|
+
* overlay. Its default `close()` scroll strategy would close it the moment either overlay's
|
|
52
|
+
* origin scrolls (including the programmatic scroll `showValidationTooltip()` uses to bring an
|
|
53
|
+
* invalid control into view), so it's overridden to `reposition()` here — passed directly as a
|
|
54
|
+
* per-instance override to this tooltip's `[kbqTooltipScrollStrategy]` input, rather than a DI
|
|
55
|
+
* override, so it doesn't leak into any `kbqTooltip` in projected content.
|
|
56
|
+
* @docs-private
|
|
57
|
+
*/
|
|
58
|
+
protected readonly validationTooltipScrollStrategy: () => ScrollStrategy;
|
|
45
59
|
/**
|
|
46
60
|
* Whether to show save/cancel action buttons in edit mode.
|
|
47
61
|
* @default false
|
|
@@ -94,6 +108,14 @@ declare class KbqInlineEdit {
|
|
|
94
108
|
/** @docs-private */
|
|
95
109
|
protected readonly formFieldRefList: _angular_core.Signal<readonly KbqFormField[]>;
|
|
96
110
|
/** @docs-private */
|
|
111
|
+
protected readonly selectRef: _angular_core.Signal<KbqSelect | undefined>;
|
|
112
|
+
/**
|
|
113
|
+
* Whether edit mode contains a single-value select. When true, edit mode shows only the
|
|
114
|
+
* dropdown panel instead of a bordered field - see the "Select-style editor" example.
|
|
115
|
+
* @docs-private
|
|
116
|
+
*/
|
|
117
|
+
protected readonly isSingleSelect: _angular_core.Signal<boolean>;
|
|
118
|
+
/** @docs-private */
|
|
97
119
|
protected overlayOrigin: HTMLElement;
|
|
98
120
|
/** @docs-private */
|
|
99
121
|
protected readonly tooltipTrigger: _angular_core.Signal<KbqTooltipTrigger>;
|
|
@@ -126,15 +148,46 @@ declare class KbqInlineEdit {
|
|
|
126
148
|
/** @docs-private */
|
|
127
149
|
protected readonly colors: typeof KbqComponentColors;
|
|
128
150
|
private initialValue;
|
|
151
|
+
/** Handle for an in-flight `showValidationTooltip()` scroll/settle request, if any. */
|
|
152
|
+
private validationTooltipScrollHandle;
|
|
129
153
|
constructor();
|
|
130
154
|
/** Manually switch mode */
|
|
131
155
|
toggleMode(): void;
|
|
156
|
+
/**
|
|
157
|
+
* Implements `KbqConnectedOverlayOriginProvider`, letting a nested `KbqFormField`'s control
|
|
158
|
+
* anchor its overlay to this element instead of the form-field's own container.
|
|
159
|
+
* When no override is needed, the form-field falls back to its default.
|
|
160
|
+
* @docs-private
|
|
161
|
+
*/
|
|
162
|
+
getConnectedOverlayOrigin(): ElementRef | undefined;
|
|
163
|
+
/** Saves the current value and returns to view mode, running the same validation as a normal save. */
|
|
164
|
+
commit(): void;
|
|
132
165
|
/** @docs-private */
|
|
133
166
|
protected onClick(event: Event): void;
|
|
134
167
|
/** @docs-private */
|
|
135
168
|
protected onAttach(): void;
|
|
136
169
|
/** @docs-private */
|
|
137
170
|
protected save($event?: Event): void;
|
|
171
|
+
/**
|
|
172
|
+
* Whether `overlayOrigin` is fully within the viewport and every registered `CdkScrollable`
|
|
173
|
+
* ancestor between it and the viewport. Ancestors without the `CdkScrollable` directive aren't
|
|
174
|
+
* visible to `ScrollDispatcher` and aren't checked — same limitation as the rest of overlay
|
|
175
|
+
* positioning.
|
|
176
|
+
*/
|
|
177
|
+
private isOverlayOriginFullyVisible;
|
|
178
|
+
/**
|
|
179
|
+
* Shows the validation tooltip, scrolling the invalid control into view first if it isn't fully visible.
|
|
180
|
+
*
|
|
181
|
+
* `scrollIntoView({ behavior: 'smooth' })` finishes asynchronously — for a long scroll distance it can take
|
|
182
|
+
* a while — so showing the tooltip right away would anchor its overlay to a stale, pre-scroll position.
|
|
183
|
+
* `scrollend` reports when the scroll actually completes; the timeout is a fallback for browsers without
|
|
184
|
+
* `scrollend` support and cases where nothing ends up scrolling.
|
|
185
|
+
*
|
|
186
|
+
* TODO(DS-5420): "scroll an element into view, then act once settled" isn't inline-edit-specific — worth
|
|
187
|
+
* extracting into `packages/components/core` in a follow-up. Kept local to this fix for now.
|
|
188
|
+
*/
|
|
189
|
+
private showValidationTooltip;
|
|
190
|
+
private showValidationTooltipIfStillInvalid;
|
|
138
191
|
/** @docs-private */
|
|
139
192
|
protected cancel(): void;
|
|
140
193
|
/** @docs-private */
|
|
@@ -163,7 +216,7 @@ declare class KbqInlineEdit {
|
|
|
163
216
|
private getInputNativeElement;
|
|
164
217
|
private markAllAsTouched;
|
|
165
218
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<KbqInlineEdit, never>;
|
|
166
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqInlineEdit, "kbq-inline-edit", ["kbqInlineEdit"], { "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "showTooltipOnError": { "alias": "showTooltipOnError"; "required": false; "isSignal": true; }; "validationTooltip": { "alias": "validationTooltip"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "editModeWidth": { "alias": "editModeWidth"; "required": false; "isSignal": true; }; "tooltipPlacement": { "alias": "tooltipPlacement"; "required": false; "isSignal": true; }; "overlayPanelClass": { "alias": "overlayPanelClass"; "required": false; "isSignal": true; }; "getValueHandler": { "alias": "getValueHandler"; "required": false; "isSignal": true; }; "setValueHandler": { "alias": "setValueHandler"; "required": false; "isSignal": true; }; "canSaveOnEnter": { "alias": "canSaveOnEnter"; "required": false; "isSignal": true; }; "interactiveSelectors": { "alias": "interactiveSelectors"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "canceled": "canceled"; "modeChange": "modeChange"; }, ["menu", "label", "formFieldRefList"], ["kbq-label", "[kbqInlineEditViewMode]", "[kbqInlineEditMenu]", "[kbqInlineEditEditMode]"], true, [{ directive: typeof i1.CdkMonitorFocus; inputs: {}; outputs: {}; }]>;
|
|
219
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<KbqInlineEdit, "kbq-inline-edit", ["kbqInlineEdit"], { "showActions": { "alias": "showActions"; "required": false; "isSignal": true; }; "showTooltipOnError": { "alias": "showTooltipOnError"; "required": false; "isSignal": true; }; "validationTooltip": { "alias": "validationTooltip"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "editModeWidth": { "alias": "editModeWidth"; "required": false; "isSignal": true; }; "tooltipPlacement": { "alias": "tooltipPlacement"; "required": false; "isSignal": true; }; "overlayPanelClass": { "alias": "overlayPanelClass"; "required": false; "isSignal": true; }; "getValueHandler": { "alias": "getValueHandler"; "required": false; "isSignal": true; }; "setValueHandler": { "alias": "setValueHandler"; "required": false; "isSignal": true; }; "canSaveOnEnter": { "alias": "canSaveOnEnter"; "required": false; "isSignal": true; }; "interactiveSelectors": { "alias": "interactiveSelectors"; "required": false; "isSignal": true; }; }, { "saved": "saved"; "canceled": "canceled"; "modeChange": "modeChange"; }, ["menu", "label", "formFieldRefList", "selectRef"], ["kbq-label", "[kbqInlineEditViewMode]", "[kbqInlineEditMenu]", "[kbqInlineEditEditMode]"], true, [{ directive: typeof i1.CdkMonitorFocus; inputs: {}; outputs: {}; }]>;
|
|
167
220
|
}
|
|
168
221
|
|
|
169
222
|
declare class KbqInlineEditModule {
|
|
@@ -125,6 +125,12 @@
|
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
+
// Select-style editor: edit mode shows only the dropdown, not a bordered field, so the view
|
|
129
|
+
// text keeps showing through and just gets the "active" look instead.
|
|
130
|
+
&.kbq-inline-edit_select.kbq-inline-edit_edit {
|
|
131
|
+
--kbq-inline-edit-background: var(--kbq-states-background-transparent-active);
|
|
132
|
+
}
|
|
133
|
+
|
|
128
134
|
&:hover,
|
|
129
135
|
&.cdk-keyboard-focused,
|
|
130
136
|
&.kbq-inline-edit_anchor-focused {
|
|
@@ -187,6 +193,10 @@
|
|
|
187
193
|
padding: var(--kbq-size-xxs) var(--kbq-size-s) var(--kbq-size-s);
|
|
188
194
|
}
|
|
189
195
|
|
|
196
|
+
&.kbq-inline-edit__panel_select .kbq-inline-edit__control-container {
|
|
197
|
+
display: none;
|
|
198
|
+
}
|
|
199
|
+
|
|
190
200
|
.kbq-inline-edit__control-container,
|
|
191
201
|
.kbq-inline-edit__action-button {
|
|
192
202
|
box-shadow: var(--kbq-shadow-popup);
|
package/input/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnDestroy, EventEmitter, OnChanges, DoCheck, ElementRef,
|
|
2
|
+
import { OnDestroy, EventEmitter, OnChanges, DoCheck, ElementRef, SimpleChanges, Provider, InjectionToken } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/forms';
|
|
4
4
|
import { ControlValueAccessor, NgControl, NgForm, FormGroupDirective, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
|
|
5
5
|
import { KbqNumberInputLocaleConfig, CanUpdateErrorState, ErrorStateMatcher } from '@koobiq/components/core';
|
|
@@ -38,7 +38,11 @@ declare class KbqNumberInput implements KbqFormFieldControl<any>, ControlValueAc
|
|
|
38
38
|
empty: boolean;
|
|
39
39
|
required: boolean;
|
|
40
40
|
errorState: boolean;
|
|
41
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Implemented as part of KbqFormFieldControl.
|
|
43
|
+
* @docs-private
|
|
44
|
+
*/
|
|
45
|
+
controlType: string;
|
|
42
46
|
/**
|
|
43
47
|
* Allows input and pasting of integers only.
|
|
44
48
|
*/
|
|
@@ -114,6 +118,11 @@ declare class KbqInput implements KbqFormFieldControl<any>, OnChanges, OnDestroy
|
|
|
114
118
|
* @docs-private
|
|
115
119
|
*/
|
|
116
120
|
focused: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Implemented as part of KbqFormFieldControl.
|
|
123
|
+
* @docs-private
|
|
124
|
+
*/
|
|
125
|
+
readonly autofilled: i0.Signal<boolean>;
|
|
117
126
|
/**
|
|
118
127
|
* Implemented as part of KbqFormFieldControl.
|
|
119
128
|
* @docs-private
|
|
@@ -248,6 +257,11 @@ declare class KbqInputPassword implements KbqFormFieldControl<any>, OnChanges, O
|
|
|
248
257
|
* @docs-private
|
|
249
258
|
*/
|
|
250
259
|
focused: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Implemented as part of KbqFormFieldControl.
|
|
262
|
+
* @docs-private
|
|
263
|
+
*/
|
|
264
|
+
readonly autofilled: i0.Signal<boolean>;
|
|
251
265
|
/**
|
|
252
266
|
* Implemented as part of KbqFormFieldControl.
|
|
253
267
|
* @docs-private
|
|
@@ -306,6 +320,7 @@ declare class KbqInputPassword implements KbqFormFieldControl<any>, OnChanges, O
|
|
|
306
320
|
ngDoCheck(): void;
|
|
307
321
|
updateErrorState(): void;
|
|
308
322
|
checkRules(): void;
|
|
323
|
+
/** Toggles the native input type between password and text. */
|
|
309
324
|
toggleType(): void;
|
|
310
325
|
/** Focuses the input. */
|
|
311
326
|
focus(): void;
|
package/list/_list-theme.scss
CHANGED
|
@@ -1,27 +1,40 @@
|
|
|
1
1
|
@use '../core/styles/common/tokens';
|
|
2
2
|
|
|
3
|
+
/// Emits the five themed colors of a list option for a single visual state.
|
|
4
|
+
///
|
|
5
|
+
/// Every color falls back to the matching `default`-state token: a state that only redefines the
|
|
6
|
+
/// background then keeps the base text/icon/caption colors instead of resolving to an undefined
|
|
7
|
+
/// `var()` — which, for inherited properties such as `color`, silently degrades to `inherit`.
|
|
3
8
|
@mixin _kbq-list-item($state-name) {
|
|
4
|
-
--kbq-option-background: var(--kbq-list-#{$state-name}-container-background);
|
|
9
|
+
--kbq-option-background: var(--kbq-list-#{$state-name}-container-background, transparent);
|
|
5
10
|
|
|
6
|
-
background: var(--kbq-list-#{$state-name}-container-background);
|
|
11
|
+
background: var(--kbq-list-#{$state-name}-container-background, transparent);
|
|
7
12
|
|
|
8
13
|
.kbq-list-text {
|
|
9
|
-
color: var(--kbq-list-#{$state-name}-text-color);
|
|
14
|
+
color: var(--kbq-list-#{$state-name}-text-color, var(--kbq-list-default-text-color));
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
.kbq-icon.kbq-empty {
|
|
13
|
-
color: var(--kbq-list-#{$state-name}-icon-color);
|
|
18
|
+
color: var(--kbq-list-#{$state-name}-icon-color, var(--kbq-list-default-icon-color));
|
|
14
19
|
}
|
|
15
20
|
|
|
16
21
|
.kbq-option-action .kbq-icon.kbq-empty {
|
|
17
|
-
color: var(--kbq-list-#{$state-name}-icon-button-color);
|
|
22
|
+
color: var(--kbq-list-#{$state-name}-icon-button-color, var(--kbq-list-default-icon-button-color));
|
|
18
23
|
}
|
|
19
24
|
|
|
20
25
|
.kbq-list-option-caption {
|
|
21
|
-
color: var(--kbq-list-#{$state-name}-caption-color);
|
|
26
|
+
color: var(--kbq-list-#{$state-name}-caption-color, var(--kbq-list-default-caption-color));
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
|
|
30
|
+
/// Emits the background-only `:active` treatment. The active states deliberately reuse the colors of
|
|
31
|
+
/// the state they sit on top of (default / selected), so only the background token is redefined.
|
|
32
|
+
@mixin _kbq-list-item-active($state-name) {
|
|
33
|
+
--kbq-option-background: var(--kbq-list-#{$state-name}-container-background);
|
|
34
|
+
|
|
35
|
+
background: var(--kbq-list-#{$state-name}-container-background);
|
|
36
|
+
}
|
|
37
|
+
|
|
25
38
|
@mixin kbq-list-theme() {
|
|
26
39
|
.kbq-list-option {
|
|
27
40
|
@include _kbq-list-item(default);
|
|
@@ -34,7 +47,7 @@
|
|
|
34
47
|
|
|
35
48
|
&.kbq-active:not(.kbq-disabled),
|
|
36
49
|
&:active:not(.kbq-disabled) {
|
|
37
|
-
@include _kbq-list-item(states-active);
|
|
50
|
+
@include _kbq-list-item-active(states-active);
|
|
38
51
|
}
|
|
39
52
|
|
|
40
53
|
&.kbq-selected:not(.kbq-disabled) {
|
|
@@ -47,13 +60,19 @@
|
|
|
47
60
|
|
|
48
61
|
&.kbq-active,
|
|
49
62
|
&:active {
|
|
50
|
-
@include _kbq-list-item(states-selected-active);
|
|
63
|
+
@include _kbq-list-item-active(states-selected-active);
|
|
51
64
|
}
|
|
52
65
|
}
|
|
53
66
|
|
|
54
67
|
&.kbq-disabled {
|
|
55
68
|
@include _kbq-list-item(states-disabled);
|
|
56
69
|
}
|
|
70
|
+
|
|
71
|
+
&.kbq-selected.kbq-disabled {
|
|
72
|
+
--kbq-option-background: var(--kbq-list-states-selected-container-background);
|
|
73
|
+
|
|
74
|
+
background: var(--kbq-list-states-selected-container-background);
|
|
75
|
+
}
|
|
57
76
|
}
|
|
58
77
|
|
|
59
78
|
.kbq-list-option.kbq-list-option_multiple {
|
|
@@ -67,9 +86,15 @@
|
|
|
67
86
|
|
|
68
87
|
&.kbq-active,
|
|
69
88
|
&:active {
|
|
70
|
-
@include _kbq-list-item(multiple-states-selected-active);
|
|
89
|
+
@include _kbq-list-item-active(multiple-states-selected-active);
|
|
71
90
|
}
|
|
72
91
|
}
|
|
92
|
+
|
|
93
|
+
&.kbq-selected.kbq-disabled {
|
|
94
|
+
--kbq-option-background: var(--kbq-list-multiple-states-selected-container-background);
|
|
95
|
+
|
|
96
|
+
background: var(--kbq-list-multiple-states-selected-container-background);
|
|
97
|
+
}
|
|
73
98
|
}
|
|
74
99
|
|
|
75
100
|
.kbq-list-selection.cdk-keyboard-focused {
|
|
@@ -80,8 +105,11 @@
|
|
|
80
105
|
}
|
|
81
106
|
|
|
82
107
|
@mixin kbq-list-typography() {
|
|
108
|
+
// The drag preview sits in `<body>`, outside every `.kbq-list*` selector, so it has to be named
|
|
109
|
+
// here as well or it would fall back to the page's own type.
|
|
83
110
|
.kbq-list-item,
|
|
84
|
-
.kbq-list-option
|
|
111
|
+
.kbq-list-option,
|
|
112
|
+
.kbq-list-drag-preview_text {
|
|
85
113
|
@include tokens.kbq-typography-level-to-styles-css-variables(typography, text-normal);
|
|
86
114
|
|
|
87
115
|
.kbq-list-text {
|
|
@@ -89,5 +117,9 @@
|
|
|
89
117
|
@include tokens.kbq-typography-level-to-styles-css-variables(typography, text-compact);
|
|
90
118
|
}
|
|
91
119
|
}
|
|
120
|
+
|
|
121
|
+
.kbq-list-drag-preview__caption {
|
|
122
|
+
@include tokens.kbq-typography-level-to-styles-css-variables(typography, text-compact);
|
|
123
|
+
}
|
|
92
124
|
}
|
|
93
125
|
}
|