@koobiq/components 19.8.5 → 19.8.7
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-content.directive.d.ts +23 -3
- package/accordion/accordion-trigger.component.d.ts +1 -0
- package/accordion/accordion.component.scss +4 -1
- package/alert/alert-tokens.scss +4 -4
- package/app-switcher/app-switcher.d.ts +9 -2
- package/autocomplete/autocomplete-trigger.directive.d.ts +10 -5
- package/breadcrumbs/breadcrumbs.d.ts +2 -0
- package/breadcrumbs/breadcrumbs.scss +4 -0
- package/button/button-group.scss +42 -2
- package/button-toggle/button-toggle-tokens.scss +16 -0
- package/button-toggle/button-toggle.component.d.ts +3 -1
- package/button-toggle/button-toggle.scss +105 -1
- package/checkbox/checkbox.scss +5 -4
- package/clamped-text/clamped-text.d.ts +1 -0
- package/core/form-field/field-sizing-content.d.ts +0 -1
- package/core/form-field/form-field-ref.d.ts +1 -0
- package/core/form-field/index.d.ts +1 -0
- package/core/form-field/text-field-selection.d.ts +18 -0
- package/core/form-field/text-ruler.d.ts +16 -0
- package/core/navbar/rectangle-item.d.ts +8 -0
- package/core/option/_action-container-mixins.scss +28 -0
- package/core/option/_option-theme.scss +8 -0
- package/core/option/action.d.ts +9 -0
- package/core/option/action.scss +7 -0
- package/core/option/option.d.ts +10 -6
- package/core/pop-up/pop-up-trigger.d.ts +6 -0
- package/core/select/constants.d.ts +8 -1
- package/core/services/measure-scrollbar.service.d.ts +1 -0
- package/core/styles/common/_animation.scss +35 -24
- package/core/styles/common/_select.scss +21 -3
- package/core/styles/theming/_scrollbar-theme.scss +4 -0
- package/core/styles/typography/_typography.scss +8 -0
- package/core/utils/dom.d.ts +12 -0
- package/datepicker/datepicker-input.directive.d.ts +20 -5
- package/datepicker/datepicker.component.d.ts +4 -1
- package/dl/dl.component.d.ts +1 -0
- package/dl/dl.scss +10 -0
- package/dropdown/dropdown-item.component.d.ts +10 -2
- package/dropdown/dropdown-item.scss +16 -0
- package/dropdown/dropdown-trigger.directive.d.ts +6 -1
- package/dropdown/dropdown.component.d.ts +6 -1
- package/dropdown/dropdown.module.d.ts +1 -1
- package/dropdown/dropdown.scss +18 -3
- package/ellipsis-center/ellipsis-center.directive.d.ts +40 -2
- package/fesm2022/koobiq-components-accordion.mjs +104 -16
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-alert.mjs +2 -2
- package/fesm2022/koobiq-components-app-switcher.mjs +8 -8
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +21 -9
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +10 -5
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +8 -5
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-button.mjs +4 -4
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +2 -2
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +4 -0
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +14 -5
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +5 -4
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +244 -67
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +73 -49
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-dl.mjs +5 -4
- package/fesm2022/koobiq-components-dl.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +65 -22
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-ellipsis-center.mjs +82 -22
- package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +12 -12
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +152 -46
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +27 -6
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +1 -1
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +26 -5
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +12 -22
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-markdown.mjs +4 -1
- package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +53 -12
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +69 -21
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +45 -7
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +4 -0
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +39 -19
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +3 -7
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-resizer.mjs +23 -4
- package/fesm2022/koobiq-components-resizer.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +2 -1
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +174 -40
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +10 -0
- package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +34 -10
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +4 -0
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +27 -7
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +3 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -14
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +20 -2
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +44 -19
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +17 -6
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +50 -7
- package/fesm2022/koobiq-components-title.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +31 -3
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +2 -2
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +46 -6
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +56 -14
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +41 -37
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +2 -2
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/dropzone.d.ts +0 -1
- package/file-upload/file-upload.scss +11 -0
- package/file-upload/multiple-file-upload.component.scss +29 -3
- package/file-upload/primitives/file-picker.d.ts +1 -1
- package/file-upload/single-file-upload.component.scss +10 -2
- package/filter-bar/filter-bar.d.ts +1 -1
- package/filter-bar/pipes/base-pipe.d.ts +31 -0
- package/filter-bar/pipes/pipe-date.d.ts +1 -1
- package/filter-bar/pipes/pipe-datetime.d.ts +1 -1
- package/form-field/fieldset.scss +10 -0
- package/form-field/form-field-control.d.ts +10 -0
- package/form-field/form-field.d.ts +17 -0
- package/inline-edit/inline-edit.d.ts +5 -0
- package/inline-edit/inline-edit.scss +7 -7
- package/link/_link-theme.scss +50 -15
- package/list/_list-theme.scss +12 -0
- package/list/list-selection.component.d.ts +1 -0
- package/list/list.scss +2 -9
- package/modal/modal-tokens.scss +1 -1
- package/modal/modal.component.d.ts +9 -1
- package/modal/modal.directive.d.ts +11 -0
- package/modal/modal.type.d.ts +7 -0
- package/navbar/_navbar-item_horizontal.scss +5 -0
- package/navbar/_navbar-item_vertical.scss +7 -5
- package/navbar/navbar-brand.component.d.ts +1 -0
- package/navbar/navbar-brand.scss +12 -5
- package/navbar/navbar-item.component.d.ts +33 -1
- package/navbar/navbar.component.d.ts +1 -0
- package/navbar/vertical-navbar.scss +6 -0
- package/notification-center/notification-center.d.ts +13 -1
- package/notification-center/notification-center.scss +12 -0
- package/notification-center/notification-item.scss +10 -1
- package/overflow-items/overflow-items.d.ts +1 -0
- package/package.json +8 -8
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/radio/radio.component.d.ts +1 -5
- package/radio/radio.scss +18 -4
- package/resizer/resizer.d.ts +12 -0
- package/schematics/ng-add/index.js +2 -2
- package/select/select-option.directive.d.ts +6 -0
- package/select/select.component.d.ts +51 -4
- package/sidebar/sidebar.component.d.ts +3 -0
- package/sidepanel/sidepanel-directives.d.ts +2 -0
- package/sidepanel/sidepanel.service.d.ts +8 -0
- package/splitter/splitter.component.d.ts +1 -0
- package/tabs/tab-body.component.d.ts +2 -0
- package/tabs/tab-header.component.d.ts +1 -0
- package/tabs/tab-header.scss +1 -0
- package/tabs/tab-nav-bar.d.ts +1 -0
- package/tabs/tabs-tokens.scss +1 -1
- package/textarea/textarea.component.d.ts +0 -1
- package/time-range/time-range-title-as-form-field.d.ts +11 -0
- package/timepicker/timepicker.directive.d.ts +3 -0
- package/timezone/timezone-option.directive.d.ts +6 -0
- package/title/title.directive.d.ts +26 -0
- package/toast/toast-container.component.d.ts +25 -0
- package/tooltip/tooltip.component.d.ts +25 -1
- package/tree/_tree-theme.scss +5 -11
- package/tree/toggle.scss +4 -0
- package/tree/tree-option.component.d.ts +3 -0
- package/tree/tree-option.scss +2 -12
- package/tree/tree-selection.component.d.ts +1 -0
- package/tree-select/tree-select.component.d.ts +24 -2
|
@@ -27,8 +27,8 @@ function ngAdd(options) {
|
|
|
27
27
|
}
|
|
28
28
|
// Installing dependencies
|
|
29
29
|
utils_packageConfig.addPackageToPackageJson(tree, '@angular/cdk', "^19.2.19");
|
|
30
|
-
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.
|
|
31
|
-
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.
|
|
30
|
+
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/cdk', "^19.8.7");
|
|
31
|
+
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/angular-luxon-adapter', "^19.8.7");
|
|
32
32
|
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-formatter', "^3.5.1");
|
|
33
33
|
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/date-adapter', "^3.5.1");
|
|
34
34
|
utils_packageConfig.addPackageToPackageJson(tree, '@koobiq/icons', "^11.5.0");
|
|
@@ -2,9 +2,15 @@ import { AfterViewInit, OnDestroy } from '@angular/core';
|
|
|
2
2
|
import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class KbqOptionTooltip extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
|
|
5
|
+
/**
|
|
6
|
+
* The hint repeats text the option had to clip, so `kbqTooltipDisabled="false"` cannot conjure one for an
|
|
7
|
+
* option that fits.
|
|
8
|
+
* @docs-private */
|
|
9
|
+
protected readonly derivedDisabledWins = true;
|
|
5
10
|
private readonly option;
|
|
6
11
|
private readonly resizeObserver;
|
|
7
12
|
private readonly contentObserver;
|
|
13
|
+
private readonly isBrowser;
|
|
8
14
|
private readonly debounceInterval;
|
|
9
15
|
private resizeSubscription;
|
|
10
16
|
private contentObserverSubscription;
|
|
@@ -112,6 +112,13 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
112
112
|
readonly stateChanges: Subject<void>;
|
|
113
113
|
/** A name for this control that can be used by `kbq-form-field`. */
|
|
114
114
|
controlType: string;
|
|
115
|
+
/**
|
|
116
|
+
* A `kbq-select` is not a native labelable element, so the form-field's `<label for>` cannot
|
|
117
|
+
* associate with it. The select is named through `aria-labelledby` instead.
|
|
118
|
+
*/
|
|
119
|
+
readonly isNativeLabelSupported = false;
|
|
120
|
+
/** `aria-labelledby` set on the host by the consumer, which outranks the form-field caption. */
|
|
121
|
+
private readonly ariaLabelledbyAttribute;
|
|
115
122
|
hiddenItems: number;
|
|
116
123
|
/** The last measured value for the trigger's client bounding rect. */
|
|
117
124
|
triggerRect: DOMRect;
|
|
@@ -121,6 +128,12 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
121
128
|
selectionModel: SelectionModel<KbqOptionBase>;
|
|
122
129
|
/** Previously selected options before the current selection was made. */
|
|
123
130
|
previousSelectionModelSelected: KbqOptionBase[];
|
|
131
|
+
/**
|
|
132
|
+
* Detached copies of the selected options, captured while the option was still rendered.
|
|
133
|
+
* `cdk-virtual-scroll` recycles option views, so a `KbqOption` kept in `selectionModel` can
|
|
134
|
+
* silently start carrying another item's value and label — the copy preserves the original ones.
|
|
135
|
+
*/
|
|
136
|
+
private readonly selectedOptionCopies;
|
|
124
137
|
/** Manages keyboard events for options in the panel. */
|
|
125
138
|
keyManager: ActiveDescendantKeyManager<KbqOption>;
|
|
126
139
|
/** The value of the select panel's transform-origin property for animations. */
|
|
@@ -344,6 +357,14 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
344
357
|
get isEmptySearchResult(): boolean;
|
|
345
358
|
/** Whether the cleaner (clear button) should be shown. */
|
|
346
359
|
get canShowCleaner(): boolean;
|
|
360
|
+
/**
|
|
361
|
+
* Id of the `kbq-form-field` caption naming this select, when it has one.
|
|
362
|
+
*
|
|
363
|
+
* A `<label for>` does not associate with a custom element, so the relationship is expressed the
|
|
364
|
+
* other way around — from the control to the label.
|
|
365
|
+
* @docs-private
|
|
366
|
+
*/
|
|
367
|
+
protected get ariaLabelledby(): string | null;
|
|
347
368
|
/** Returns the currently selected option(s). Single value or array for multiple selection. */
|
|
348
369
|
get selected(): KbqOptionBase | KbqOptionBase[];
|
|
349
370
|
/** Returns the display value for the trigger element. */
|
|
@@ -358,6 +379,12 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
358
379
|
get firstSelected(): KbqOptionBase | null;
|
|
359
380
|
/** Whether the first selected option is filtered (not visible in the list). */
|
|
360
381
|
get firstFiltered(): boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Whether the legacy `KbqValidateDirective` marks this control. The class it writes never changes
|
|
384
|
+
* after the host is created, so it is probed once instead of on every change detection pass.
|
|
385
|
+
*/
|
|
386
|
+
private hasLegacyValidateDirective;
|
|
387
|
+
private readonly invalidState;
|
|
361
388
|
/** @docs-private */
|
|
362
389
|
get colorForState(): KbqComponentColors;
|
|
363
390
|
/** Whether multiple choice is enabled. True if multiple or multiline mode is active. */
|
|
@@ -366,7 +393,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
366
393
|
private closeSubscription;
|
|
367
394
|
/** Subscription to the options panel scroll event used by `scrolledToBottom`. */
|
|
368
395
|
private scrollSubscription;
|
|
369
|
-
/** The scroll
|
|
396
|
+
/** The scroll offset the panel is restored to when it attaches — the list always opens at the top. */
|
|
370
397
|
private scrollTop;
|
|
371
398
|
/** Unique id for this input. Auto-incremented for each instance. */
|
|
372
399
|
private readonly uid;
|
|
@@ -392,6 +419,7 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
392
419
|
ngOnDestroy(): void;
|
|
393
420
|
/** Updates the error state based on the error state matcher. */
|
|
394
421
|
updateErrorState(): void;
|
|
422
|
+
private syncInvalidState;
|
|
395
423
|
/**
|
|
396
424
|
* Formats the hidden items text with the number of hidden items.
|
|
397
425
|
* @param hiddenItemsText Template string with {{ number }} placeholder.
|
|
@@ -543,6 +571,12 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
543
571
|
private getTotalItemsWidthInMatcher;
|
|
544
572
|
/**
|
|
545
573
|
* Calculates the width of a single item including margins.
|
|
574
|
+
*
|
|
575
|
+
* The elements measured here are `kbq-tag`s, which are `border-box` and carry horizontal
|
|
576
|
+
* padding. `getComputedStyle().width` resolves to the used content-box width whatever
|
|
577
|
+
* `box-sizing` says, so it dropped that padding from every tag and the matcher believed more
|
|
578
|
+
* tags fit than actually do. `getBoundingClientRect()` is always the border box — the same fix
|
|
579
|
+
* `kbqGetPanelWidthOrigin()` carries for the dropdown trigger.
|
|
546
580
|
* @param element The DOM element to measure.
|
|
547
581
|
* @returns Total width including margins and gap.
|
|
548
582
|
*/
|
|
@@ -556,6 +590,8 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
556
590
|
* Defers execution to avoid change detection errors.
|
|
557
591
|
*/
|
|
558
592
|
private initializeSelection;
|
|
593
|
+
/** Whether the key manager has no active item, or its active item is missing from the current options list. */
|
|
594
|
+
private isActiveItemStale;
|
|
559
595
|
/**
|
|
560
596
|
* Sets the selected option based on a value.
|
|
561
597
|
* If no option can be found with the designated value, the select trigger is cleared.
|
|
@@ -569,16 +605,28 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
569
605
|
*/
|
|
570
606
|
private getCorrespondOption;
|
|
571
607
|
/**
|
|
572
|
-
* Finds and selects
|
|
573
|
-
* @returns Option that has the corresponding value.
|
|
608
|
+
* Finds and selects an option based on its value.
|
|
609
|
+
* @returns Option that has the corresponding value, when it is currently rendered.
|
|
574
610
|
*/
|
|
575
611
|
private selectValue;
|
|
612
|
+
/**
|
|
613
|
+
* Builds a detached option for a value whose `KbqOption` is not rendered, or returns `undefined`
|
|
614
|
+
* when the value cannot be resolved and the consumer gave no way to render it.
|
|
615
|
+
*/
|
|
616
|
+
private createVirtualOptionForValue;
|
|
576
617
|
/**
|
|
577
618
|
* Single entry point for building a `KbqVirtualOption` from a raw value.
|
|
578
619
|
* Uses the consumer-provided `virtualOptionFactory` when set, otherwise
|
|
579
620
|
* wraps the raw value with the select's current `disabled` state.
|
|
580
621
|
*/
|
|
581
622
|
private createVirtualOption;
|
|
623
|
+
/**
|
|
624
|
+
* Remembers the value and the label of a selected option while its view is still live, so that the
|
|
625
|
+
* selection survives the view being recycled by `cdk-virtual-scroll` for another item.
|
|
626
|
+
*/
|
|
627
|
+
private captureSelectedOptionCopy;
|
|
628
|
+
/** Copy of `option` when its view has been recycled for another item, otherwise `option` itself. */
|
|
629
|
+
private resolveSelectedOption;
|
|
582
630
|
/** Sets up a key manager to listen to keyboard events on the overlay panel. */
|
|
583
631
|
private initKeyManager;
|
|
584
632
|
/** Drops current option subscriptions and IDs and resets from scratch. */
|
|
@@ -594,7 +642,6 @@ export declare class KbqSelect extends KbqAbstractSelect implements AfterContent
|
|
|
594
642
|
* the first item instead.
|
|
595
643
|
*/
|
|
596
644
|
private highlightCorrectOption;
|
|
597
|
-
/** Scrolls the active option into view. */
|
|
598
645
|
private scrollActiveOptionIntoView;
|
|
599
646
|
/** Gets how wide the overlay panel should be. */
|
|
600
647
|
private getOverlayWidth;
|
|
@@ -32,6 +32,9 @@ export declare class KbqSidebar implements OnDestroy, AfterContentInit {
|
|
|
32
32
|
protected readonly document: Document;
|
|
33
33
|
private readonly renderer;
|
|
34
34
|
private readonly changeDetectorRef;
|
|
35
|
+
private readonly isBrowser;
|
|
36
|
+
/** Set once the view is torn down; the animation can still report done after that. */
|
|
37
|
+
private isDestroyed;
|
|
35
38
|
get opened(): boolean;
|
|
36
39
|
set opened(value: boolean);
|
|
37
40
|
private _opened;
|
|
@@ -11,6 +11,7 @@ export declare class KbqSidepanelClose implements OnInit, OnChanges {
|
|
|
11
11
|
private sidepanelService;
|
|
12
12
|
sidepanelResult: any;
|
|
13
13
|
kbqSidepanelClose: any;
|
|
14
|
+
private readonly renderer;
|
|
14
15
|
constructor(sidepanelRef: KbqSidepanelRef, elementRef: ElementRef<HTMLElement>, sidepanelService: KbqSidepanelService);
|
|
15
16
|
ngOnInit(): void;
|
|
16
17
|
ngOnChanges(changes: SimpleChanges): void;
|
|
@@ -38,6 +39,7 @@ export declare class KbqSidepanelHeader {
|
|
|
38
39
|
export declare class KbqSidepanelBody {
|
|
39
40
|
private readonly sidepanelRef;
|
|
40
41
|
private readonly elementRef;
|
|
42
|
+
constructor();
|
|
41
43
|
/** @docs-private */
|
|
42
44
|
protected checkOverflow(): void;
|
|
43
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqSidepanelBody, never>;
|
|
@@ -47,6 +47,14 @@ export declare class KbqSidepanelService implements OnDestroy {
|
|
|
47
47
|
private closeSidepanels;
|
|
48
48
|
private getOpenedSidepanelsWithSamePosition;
|
|
49
49
|
private updateAnimationState;
|
|
50
|
+
/**
|
|
51
|
+
* Moves a sidepanel into `state`, unless it is closing already.
|
|
52
|
+
*
|
|
53
|
+
* The exit animation is what disposes the overlay, so interrupting it with another state leaves the
|
|
54
|
+
* sidepanel in the DOM and in `openedSidepanels` for good — which is what closing a stack of them as
|
|
55
|
+
* a group used to do to the panels underneath.
|
|
56
|
+
*/
|
|
57
|
+
private setAnimationState;
|
|
50
58
|
/**
|
|
51
59
|
* Removes a sidepanel from the array of open sidepanels.
|
|
52
60
|
* @param sidepanelRef Sidepanel to be removed.
|
|
@@ -113,6 +113,7 @@ export declare class KbqSplitterAreaDirective implements AfterViewInit, OnDestro
|
|
|
113
113
|
private splitter;
|
|
114
114
|
readonly sizeChange: EventEmitter<number>;
|
|
115
115
|
private readonly window;
|
|
116
|
+
private readonly platform;
|
|
116
117
|
constructor(elementRef: ElementRef<HTMLElement>, renderer: Renderer2, splitter: KbqSplitterComponent);
|
|
117
118
|
isResizing(): boolean;
|
|
118
119
|
disableFlex(): void;
|
|
@@ -28,6 +28,8 @@ export type KbqTabBodyOriginState = 'left' | 'right';
|
|
|
28
28
|
export declare class KbqTabBody implements OnInit, OnDestroy {
|
|
29
29
|
private readonly elementRef;
|
|
30
30
|
private readonly dir;
|
|
31
|
+
/** Set once the view is torn down; the animation callbacks can still fire after that. */
|
|
32
|
+
private isDestroyed;
|
|
31
33
|
/** The shifted index position of the tab body, where zero represents the active center tab. */
|
|
32
34
|
set position(position: number);
|
|
33
35
|
/** Tab body position state. Used by the animation trigger for the current state. */
|
|
@@ -23,6 +23,7 @@ export declare class KbqTabHeader extends KbqPaginatedTabHeader {
|
|
|
23
23
|
readonly tabList: ElementRef;
|
|
24
24
|
readonly nextPaginator: ElementRef<HTMLElement>;
|
|
25
25
|
readonly previousPaginator: ElementRef<HTMLElement>;
|
|
26
|
+
private readonly isBrowser;
|
|
26
27
|
/** Width of the active tab, adjusted for icon-only tab margins. */
|
|
27
28
|
protected get activeTabOffsetWidth(): number | undefined;
|
|
28
29
|
/** Left offset of the active tab, adjusted for icon-only tab margins. */
|
package/tabs/tab-header.scss
CHANGED
package/tabs/tab-nav-bar.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export declare class KbqTabNavBar extends KbqPaginatedTabHeader implements After
|
|
|
10
10
|
readonly nextPaginator: ElementRef<HTMLElement>;
|
|
11
11
|
readonly previousPaginator: ElementRef<HTMLElement>;
|
|
12
12
|
readonly items: QueryList<KbqTabLink>;
|
|
13
|
+
private readonly isBrowser;
|
|
13
14
|
/** Whether the nav bar background should be transparent. */
|
|
14
15
|
transparent: boolean;
|
|
15
16
|
onSurface: boolean;
|
package/tabs/tabs-tokens.scss
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
--kbq-tabs-size-tab-item-content-gap-horizontal: var(--kbq-size-xxs);
|
|
6
6
|
--kbq-tabs-size-tab-item-border-radius: var(--kbq-size-s);
|
|
7
7
|
--kbq-tabs-size-tab-item-focus-outline-width: var(--kbq-size-3xs);
|
|
8
|
-
--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-
|
|
8
|
+
--kbq-tabs-size-tab-stack-horizontal-border-radius: var(--kbq-size-border-radius);
|
|
9
9
|
--kbq-tabs-size-tab-stack-vertical-content-gap-vertical: var(--kbq-size-s);
|
|
10
10
|
/* THEME TOKENS */
|
|
11
11
|
--kbq-tabs-tab-item-filled-on-background-default-background: transparent;
|
|
@@ -10,9 +10,12 @@ export declare class KbqTimeRangeTitlePlaceholder {
|
|
|
10
10
|
/** Component simulates `KbqFormFieldControl` allowing to provide custom content inside `KbqFormField` */
|
|
11
11
|
export declare class KbqTimeRangeTitleAsControl implements KbqFormFieldControl<any> {
|
|
12
12
|
private timeRange;
|
|
13
|
+
private readonly parentFormField;
|
|
13
14
|
/** @docs-private */
|
|
14
15
|
controlType: string;
|
|
15
16
|
/** @docs-private */
|
|
17
|
+
readonly isNativeLabelSupported = false;
|
|
18
|
+
/** @docs-private */
|
|
16
19
|
stateChanges: Observable<void>;
|
|
17
20
|
/** @docs-private */
|
|
18
21
|
ngControl: NgControl | null;
|
|
@@ -36,6 +39,14 @@ export declare class KbqTimeRangeTitleAsControl implements KbqFormFieldControl<a
|
|
|
36
39
|
onContainerClick(_event: MouseEvent): void;
|
|
37
40
|
/** @docs-private */
|
|
38
41
|
focus(_options?: FocusOptions): void;
|
|
42
|
+
/**
|
|
43
|
+
* Id of the `kbq-form-field` caption naming this control, when it has one.
|
|
44
|
+
*
|
|
45
|
+
* A `<label for>` does not associate with a custom element, so the relationship is expressed the
|
|
46
|
+
* other way around — from the control to the label.
|
|
47
|
+
* @docs-private
|
|
48
|
+
*/
|
|
49
|
+
protected get ariaLabelledby(): string | null;
|
|
39
50
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTimeRangeTitleAsControl, never>;
|
|
40
51
|
static ɵcmp: i0.ɵɵComponentDeclaration<KbqTimeRangeTitleAsControl, "kbq-time-range-title-as-control", never, {}, {}, never, ["*"], true, never>;
|
|
41
52
|
}
|
|
@@ -123,6 +123,8 @@ export declare class KbqTimepicker<D> implements KbqFormFieldControl<D>, Control
|
|
|
123
123
|
private formatUserInput;
|
|
124
124
|
private replaceSymbols;
|
|
125
125
|
private replaceNumbers;
|
|
126
|
+
/** Clamps a time part to the allowed maximum and trims it to two digits */
|
|
127
|
+
private normalizeTimePart;
|
|
126
128
|
/** Checks whether the input is invalid based on the native validation. */
|
|
127
129
|
private isBadInput;
|
|
128
130
|
private spaceKeyHandler;
|
|
@@ -148,6 +150,7 @@ export declare class KbqTimepicker<D> implements KbqFormFieldControl<D>, Control
|
|
|
148
150
|
private maxValidator;
|
|
149
151
|
private getValidDateOrNull;
|
|
150
152
|
private setViewValue;
|
|
153
|
+
private setSelection;
|
|
151
154
|
private updateView;
|
|
152
155
|
/** @docs-private */
|
|
153
156
|
updateErrorState(): void;
|
|
@@ -3,10 +3,16 @@ import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare const TOOLTIP_VISIBLE_ROWS_COUNT = 3;
|
|
5
5
|
export declare class KbqTimezoneOptionTooltip extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
|
|
6
|
+
/**
|
|
7
|
+
* The hint shows rows the option had to clip, so `kbqTooltipDisabled="false"` cannot conjure one for an
|
|
8
|
+
* option that fits.
|
|
9
|
+
* @docs-private */
|
|
10
|
+
protected readonly derivedDisabledWins = true;
|
|
6
11
|
private readonly option;
|
|
7
12
|
private readonly changeDetectorRef;
|
|
8
13
|
private readonly resizeObserver;
|
|
9
14
|
private readonly contentObserver;
|
|
15
|
+
private readonly platform;
|
|
10
16
|
private readonly debounceInterval;
|
|
11
17
|
private resizeSubscription;
|
|
12
18
|
private contentObserverSubscription;
|
|
@@ -5,17 +5,43 @@ import { Subject } from 'rxjs';
|
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class KbqTitleDirective extends KbqTooltipTrigger implements AfterViewInit, OnDestroy {
|
|
7
7
|
private componentInstance?;
|
|
8
|
+
/**
|
|
9
|
+
* The hint repeats text the host had to clip, so `kbqTooltipDisabled="false"` cannot conjure one for a
|
|
10
|
+
* fully visible title.
|
|
11
|
+
* @docs-private */
|
|
12
|
+
protected readonly derivedDisabledWins = true;
|
|
8
13
|
private readonly nativeElement;
|
|
14
|
+
/** SSR-safe window reference used for `getComputedStyle` reads. */
|
|
15
|
+
private readonly window;
|
|
9
16
|
private contentObserver;
|
|
10
17
|
set trigger(value: string);
|
|
11
18
|
get trigger(): string;
|
|
12
19
|
get isOverflown(): boolean;
|
|
13
20
|
get isHorizontalOverflown(): boolean;
|
|
14
21
|
get isVerticalOverflown(): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Compares measured widths, treating only *visible* clipping as overflow. With `text-overflow: ellipsis`
|
|
24
|
+
* any positive difference counts (even a sub-pixel overflow shows `…`). With `text-overflow: clip` the
|
|
25
|
+
* widths are rounded to whole CSS pixels first — mirroring the integer `offsetWidth`/`scrollWidth` path —
|
|
26
|
+
* so an imperceptible sub-pixel clip is not treated as truncation.
|
|
27
|
+
* @docs-private */
|
|
28
|
+
private isWidthOverflown;
|
|
15
29
|
get viewValue(): string;
|
|
16
30
|
get parent(): HTMLElement;
|
|
17
31
|
get child(): HTMLElement;
|
|
18
32
|
get hasOnlyText(): boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether the measured text truncates with an ellipsis on either the child text element or its
|
|
35
|
+
* wrapping container. Only then is a sub-pixel overflow actually visible (the trailing glyph is
|
|
36
|
+
* replaced by `…`); with the default `text-overflow: clip` a sub-pixel clip is imperceptible, so
|
|
37
|
+
* it must not be reported as truncation. Both elements are checked because `text-overflow` is not
|
|
38
|
+
* inherited and consumers place it differently: `KbqOption`/`KbqDropdownItem` style the measured
|
|
39
|
+
* `child`, whereas `KbqTreeOption` styles the `parent` container that wraps the child.
|
|
40
|
+
* @docs-private */
|
|
41
|
+
private get hasEllipsis();
|
|
42
|
+
/** Whether the element's computed `text-overflow` renders an ellipsis.
|
|
43
|
+
* @docs-private */
|
|
44
|
+
private elementHasEllipsis;
|
|
19
45
|
readonly resizeStream: Subject<Event>;
|
|
20
46
|
private readonly debounceInterval;
|
|
21
47
|
private resizeSubscription;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CdkScrollable, ScrollDispatcher } from '@angular/cdk/overlay';
|
|
2
2
|
import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, Injector, NgZone, TemplateRef, ViewContainerRef, ViewRef } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
3
4
|
import { KbqToastService } from './toast.service';
|
|
4
5
|
import { KbqToastData } from './toast.type';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
@@ -8,11 +9,35 @@ export declare class KbqToastContainerComponent extends CdkScrollable {
|
|
|
8
9
|
private changeDetectorRef;
|
|
9
10
|
readonly service: KbqToastService;
|
|
10
11
|
viewContainer: ViewContainerRef;
|
|
12
|
+
/**
|
|
13
|
+
* Emits while the stack re-lays-out. Toasts are ordinary flow children, so removing one slides the
|
|
14
|
+
* rest for as long as its height animates — and an overlay opened from inside a toast is anchored to
|
|
15
|
+
* a trigger that is moving. CDK only re-measures the origin on a scroll or a viewport resize, so the
|
|
16
|
+
* stack has to say when it moved.
|
|
17
|
+
*
|
|
18
|
+
* The container's own box tracks the reflow exactly: continuously while a leaving toast animates its
|
|
19
|
+
* height away, and once for a removal that is not animated at all, such as a template toast.
|
|
20
|
+
*/
|
|
21
|
+
private readonly reflowed;
|
|
11
22
|
constructor(injector: Injector, changeDetectorRef: ChangeDetectorRef, service: KbqToastService, elementRef: ElementRef<HTMLElement>, scrollDispatcher: ScrollDispatcher, ngZone: NgZone);
|
|
23
|
+
/**
|
|
24
|
+
* `ScrollDispatcher` subscribes to this method when the container registers itself, so merging the
|
|
25
|
+
* reflow signal in re-broadcasts it to every overlay that repositions on scroll — which is what
|
|
26
|
+
* `kbq-select` and the dropdown trigger do by default.
|
|
27
|
+
*/
|
|
28
|
+
elementScrolled(): Observable<Event>;
|
|
12
29
|
createToast<C>(data: KbqToastData, componentType: any, onTop: boolean): ComponentRef<C>;
|
|
13
30
|
createTemplate<C>(data: KbqToastData, template: TemplateRef<any>, onTop: boolean): EmbeddedViewRef<C>;
|
|
14
31
|
remove(viewRef: ViewRef): void;
|
|
15
32
|
getInjector(data: KbqToastData): Injector;
|
|
33
|
+
/**
|
|
34
|
+
* Fakes a scroll on the container so that overlays anchored inside a toast are repositioned by their
|
|
35
|
+
* `RepositionScrollStrategy` when the stack shifts.
|
|
36
|
+
*
|
|
37
|
+
* @deprecated The container reports its own reflow through `elementScrolled()`, so nothing calls this.
|
|
38
|
+
* It is kept only for callers that already hold a container reference — the instance created by
|
|
39
|
+
* `KbqToastService` is not exposed.
|
|
40
|
+
*/
|
|
16
41
|
dispatchScrollEvent: () => void;
|
|
17
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqToastContainerComponent, never>;
|
|
18
43
|
static ɵcmp: i0.ɵɵComponentDeclaration<KbqToastContainerComponent, "kbq-toast-container", never, {}, {}, never, never, true, never>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
2
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
2
3
|
import { Overlay, OverlayConfig, ScrollStrategy } from '@angular/cdk/overlay';
|
|
3
4
|
import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnDestroy, Renderer2, TemplateRef, Type, WritableSignal } from '@angular/core';
|
|
4
5
|
import { KbqComponentColors, KbqParentPopup, KbqPopUp, KbqPopUpPlacementValues, KbqPopUpTrigger } from '@koobiq/components/core';
|
|
@@ -78,8 +79,24 @@ export declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipCompone
|
|
|
78
79
|
set tooltipPlacementPriority(value: string | string[] | null);
|
|
79
80
|
get content(): string | TemplateRef<any>;
|
|
80
81
|
set content(content: string | TemplateRef<any>);
|
|
82
|
+
/**
|
|
83
|
+
* Input (`kbqTooltipDisabled`) controlling whether the tooltip is disabled; setting it to `true` hides it.
|
|
84
|
+
* `undefined` leaves the decision to the trigger, like an unset input.
|
|
85
|
+
*
|
|
86
|
+
* Reads back the *effective* state, which for triggers that derive one of their own (see
|
|
87
|
+
* `derivedDisabledWins`) is not necessarily the value that was written.
|
|
88
|
+
*/
|
|
81
89
|
get disabled(): boolean;
|
|
82
|
-
set disabled(value:
|
|
90
|
+
set disabled(value: BooleanInput);
|
|
91
|
+
/**
|
|
92
|
+
* Whether the state this trigger derives means *there is nothing to show*, so an explicit
|
|
93
|
+
* `kbqTooltipDisabled="false"` cannot override it, as for a hint that repeats text the host never clipped.
|
|
94
|
+
* Otherwise the explicit value wins in both directions, so `false` on a wrapped control that is not disabled
|
|
95
|
+
* still asks for a tooltip.
|
|
96
|
+
* @docs-private */
|
|
97
|
+
protected readonly derivedDisabledWins: boolean;
|
|
98
|
+
private explicitlyDisabled;
|
|
99
|
+
private derivedDisabled;
|
|
83
100
|
enterDelay: number;
|
|
84
101
|
leaveDelay: number;
|
|
85
102
|
get trigger(): string;
|
|
@@ -121,6 +138,13 @@ export declare class KbqTooltipTrigger extends KbqPopUpTrigger<KbqTooltipCompone
|
|
|
121
138
|
getOverlayHandleComponentType(): Type<KbqTooltipComponent>;
|
|
122
139
|
updateClassMap(newPlacement?: string): void;
|
|
123
140
|
protected applyRelativeToPointer(): void;
|
|
141
|
+
/**
|
|
142
|
+
* Records the state this trigger derives from what it renders — the wrapped control being disabled, text
|
|
143
|
+
* overflow in `KbqTitleDirective` and the option tooltips — without overwriting `kbqTooltipDisabled`.
|
|
144
|
+
* @docs-private */
|
|
145
|
+
protected setDerivedDisabled(value: boolean): void;
|
|
146
|
+
private applyDisabled;
|
|
147
|
+
private foldDisabled;
|
|
124
148
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTooltipTrigger, never>;
|
|
125
149
|
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqTooltipTrigger, "[kbqTooltip]", ["kbqTooltip"], { "forDisabledComponent": { "alias": "forDisabledComponent"; "required": false; "isSignal": true; }; "ignoreTooltipPointerEvents": { "alias": "ignoreTooltipPointerEvents"; "required": false; "isSignal": true; }; "hideWithTimeout": { "alias": "hideWithTimeout"; "required": false; }; "tooltipVisible": { "alias": "kbqVisible"; "required": false; }; "tooltipPlacement": { "alias": "kbqPlacement"; "required": false; }; "relativeToPointer": { "alias": "kbqRelativeToPointer"; "required": false; }; "tooltipPlacementPriority": { "alias": "kbqPlacementPriority"; "required": false; }; "content": { "alias": "kbqTooltip"; "required": false; }; "disabled": { "alias": "kbqTooltipDisabled"; "required": false; }; "enterDelay": { "alias": "kbqEnterDelay"; "required": false; }; "leaveDelay": { "alias": "kbqLeaveDelay"; "required": false; }; "trigger": { "alias": "kbqTrigger"; "required": false; }; "customClass": { "alias": "kbqTooltipClass"; "required": false; }; "context": { "alias": "kbqTooltipContext"; "required": false; }; "color": { "alias": "kbqTooltipColor"; "required": false; }; "arrow": { "alias": "kbqTooltipArrow"; "required": false; }; "offset": { "alias": "kbqTooltipOffset"; "required": false; }; }, { "placementChange": "kbqPlacementChange"; "visibleChange": "kbqVisibleChange"; }, never, never, true, never>;
|
|
126
150
|
static ngAcceptInputType_hideWithTimeout: unknown;
|
package/tree/_tree-theme.scss
CHANGED
|
@@ -11,11 +11,6 @@
|
|
|
11
11
|
color: var(--kbq-tree-#{$state-name}-text-color);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.kbq-tree-node-toggle .kbq-icon.kbq-empty,
|
|
15
|
-
.kbq-icon.kbq-empty.kbq-tree-node-toggle {
|
|
16
|
-
color: var(--kbq-tree-#{$state-name}-tree-toggle-color);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
14
|
.kbq-option-action .kbq-icon.kbq-empty {
|
|
20
15
|
color: var(--kbq-tree-#{$state-name}-action-button-color);
|
|
21
16
|
}
|
|
@@ -69,19 +64,18 @@
|
|
|
69
64
|
&.kbq-disabled {
|
|
70
65
|
@include kbq-tree-option(states-disabled);
|
|
71
66
|
|
|
72
|
-
& .kbq-icon.kbq-empty {
|
|
67
|
+
& .kbq-icon.kbq-empty:not(.kbq-tree-node-toggle .kbq-icon) {
|
|
73
68
|
color: var(--kbq-states-icon-disabled);
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
}
|
|
77
72
|
|
|
78
|
-
|
|
73
|
+
// Scoped to the tree's own focus-monitored host, matching `kbq-option-action-visibility`. A bare
|
|
74
|
+
// `.cdk-keyboard-focused` would also match an outer monitored ancestor (e.g. the tree-select panel),
|
|
75
|
+
// drawing the focus ring on a row whose action button stays correctly hidden.
|
|
76
|
+
.kbq-tree-selection.cdk-keyboard-focused {
|
|
79
77
|
& .kbq-tree-option.kbq-focused:not(.kbq-action-button-focused) {
|
|
80
78
|
border-color: var(--kbq-tree-states-focused-focus-outline-color);
|
|
81
|
-
|
|
82
|
-
& .kbq-action-container {
|
|
83
|
-
display: flex;
|
|
84
|
-
}
|
|
85
79
|
}
|
|
86
80
|
}
|
|
87
81
|
}
|
package/tree/toggle.scss
CHANGED
|
@@ -30,7 +30,10 @@ export declare class KbqTreeOption extends KbqTreeNode<KbqTreeOption> implements
|
|
|
30
30
|
readonly onFocus: Subject<KbqTreeOptionEvent>;
|
|
31
31
|
readonly onBlur: Subject<KbqTreeOptionEvent>;
|
|
32
32
|
preventBlur: boolean;
|
|
33
|
+
/** Set once the option is destroyed; the tree can still emit a selection change for it after that. */
|
|
34
|
+
private isDestroyed;
|
|
33
35
|
parentTextElement: ElementRef;
|
|
36
|
+
get textElement(): ElementRef;
|
|
34
37
|
toggleElementDirective: KbqTreeNodeToggleBaseDirective<KbqTreeOption>;
|
|
35
38
|
toggleElementComponent: KbqTreeNodeToggleBaseDirective<KbqTreeOption>;
|
|
36
39
|
pseudoCheckbox: KbqPseudoCheckbox;
|
package/tree/tree-option.scss
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
@use '../core/option/action-container-mixins' as action-container;
|
|
1
2
|
@use '../core/styles/common';
|
|
2
3
|
@use '../core/styles/common/tokens' as *;
|
|
3
4
|
@use '../core/styles/common/vendor-prefixes';
|
|
4
5
|
|
|
5
6
|
.kbq-tree-option {
|
|
6
7
|
@include vendor-prefixes.user-select(none);
|
|
8
|
+
@include action-container.kbq-option-action-visibility('.kbq-tree-selection.cdk-keyboard-focused');
|
|
7
9
|
|
|
8
10
|
position: relative;
|
|
9
11
|
|
|
@@ -57,20 +59,8 @@
|
|
|
57
59
|
outline: none;
|
|
58
60
|
}
|
|
59
61
|
|
|
60
|
-
&.kbq-disabled .kbq-icon {
|
|
61
|
-
cursor: default;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
62
|
&:not(.kbq-disabled) {
|
|
65
63
|
cursor: pointer;
|
|
66
|
-
|
|
67
|
-
&:hover,
|
|
68
|
-
&.kbq-hovered,
|
|
69
|
-
&.kbq-action-button-focused {
|
|
70
|
-
& .kbq-action-container {
|
|
71
|
-
display: flex;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
64
|
}
|
|
75
65
|
|
|
76
66
|
&:is(.kbq-checked, .kbq-selected, .kbq-focused):has(+ :is(.kbq-checked, .kbq-selected, .kbq-focused)) {
|
|
@@ -51,6 +51,7 @@ export declare class KbqTreeSelection extends KbqTreeBase<any> implements Contro
|
|
|
51
51
|
private elementRef;
|
|
52
52
|
private scheduler;
|
|
53
53
|
private clipboard;
|
|
54
|
+
private readonly platform;
|
|
54
55
|
protected readonly focusMonitor: FocusMonitor;
|
|
55
56
|
/** Indicates whether this component is placed inside a KbqFormField component. */
|
|
56
57
|
protected readonly inSelect: boolean;
|
|
@@ -93,6 +93,13 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
|
|
|
93
93
|
readonly stateChanges: Subject<void>;
|
|
94
94
|
/** A name for this control that can be used by `kbq-form-field`. */
|
|
95
95
|
controlType: string;
|
|
96
|
+
/**
|
|
97
|
+
* A `kbq-tree-select` is not a native labelable element, so the form-field's `<label for>` cannot
|
|
98
|
+
* associate with it. The control is named through `aria-labelledby` instead.
|
|
99
|
+
*/
|
|
100
|
+
readonly isNativeLabelSupported = false;
|
|
101
|
+
/** `aria-labelledby` set on the host by the consumer, which outranks the form-field caption. */
|
|
102
|
+
private readonly ariaLabelledbyAttribute;
|
|
96
103
|
hiddenItems: number;
|
|
97
104
|
/** The last measured value for the trigger's client bounding rect. */
|
|
98
105
|
triggerRect: DOMRect;
|
|
@@ -125,6 +132,8 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
|
|
|
125
132
|
*/
|
|
126
133
|
trigger: ElementRef;
|
|
127
134
|
panel: ElementRef;
|
|
135
|
+
/** Scrollable option list inside the panel. */
|
|
136
|
+
protected optionsContainer: ElementRef<HTMLElement>;
|
|
128
137
|
overlayDir: CdkConnectedOverlay;
|
|
129
138
|
tags: QueryList<KbqTag>;
|
|
130
139
|
cleaner: KbqCleaner;
|
|
@@ -234,6 +243,14 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
|
|
|
234
243
|
private _searchMinOptionsThreshold;
|
|
235
244
|
get panelOpen(): boolean;
|
|
236
245
|
get canShowCleaner(): boolean;
|
|
246
|
+
/**
|
|
247
|
+
* Id of the `kbq-form-field` caption naming this control, when it has one.
|
|
248
|
+
*
|
|
249
|
+
* A `<label for>` does not associate with a custom element, so the relationship is expressed the
|
|
250
|
+
* other way around — from the control to the label.
|
|
251
|
+
* @docs-private
|
|
252
|
+
*/
|
|
253
|
+
protected get ariaLabelledby(): string | null;
|
|
237
254
|
/** @docs-private */
|
|
238
255
|
get colorForState(): KbqComponentColors;
|
|
239
256
|
isEmptySearchResult: boolean;
|
|
@@ -241,7 +258,7 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
|
|
|
241
258
|
private closeSubscription;
|
|
242
259
|
private _panelOpen;
|
|
243
260
|
private originalOnKeyDown;
|
|
244
|
-
/** The scroll
|
|
261
|
+
/** The scroll offset the panel is restored to when it attaches — the list always opens at the top. */
|
|
245
262
|
private scrollTop;
|
|
246
263
|
/** Unique id for this input. */
|
|
247
264
|
private readonly uid;
|
|
@@ -333,6 +350,12 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
|
|
|
333
350
|
/** Gets how wide the overlay panel should be. */
|
|
334
351
|
private getOverlayWidth;
|
|
335
352
|
private buildTriggerClone;
|
|
353
|
+
/**
|
|
354
|
+
* Width of a single `kbq-tag` in the matcher, including margins and the inter-tag gap.
|
|
355
|
+
*
|
|
356
|
+
* Tags are `border-box` and carry horizontal padding, which `getComputedStyle().width` — always
|
|
357
|
+
* the used content-box width — leaves out. See the twin in `KbqSelect`.
|
|
358
|
+
*/
|
|
336
359
|
private getItemWidth;
|
|
337
360
|
private refreshTriggerValues;
|
|
338
361
|
/**
|
|
@@ -348,7 +371,6 @@ export declare class KbqTreeSelect extends KbqAbstractSelect implements AfterCon
|
|
|
348
371
|
* the first item instead.
|
|
349
372
|
*/
|
|
350
373
|
private highlightCorrectOption;
|
|
351
|
-
/** Scrolls the active option into view. */
|
|
352
374
|
private scrollActiveOptionIntoView;
|
|
353
375
|
private subscribeOnSearchChanges;
|
|
354
376
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqTreeSelect, [null, null, null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; host: true; }, { optional: true; self: true; }, { optional: true; }]>;
|