@koobiq/components 19.7.0 → 19.8.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-content.directive.d.ts +1 -0
- package/autocomplete/autocomplete-trigger.directive.d.ts +2 -1
- package/autocomplete/autocomplete.component.d.ts +7 -1
- package/code-block/_code-block-theme.scss +1 -10
- package/code-block/code-block-highlight.d.ts +61 -7
- package/code-block/code-block-tokens.scss +5 -10
- package/code-block/code-block.d.ts +10 -1
- package/code-block/code-block.scss +8 -7
- package/core/forms/forms-tokens.scss +1 -1
- package/core/option/option.d.ts +2 -1
- package/core/styles/common/_groups-mixins.scss +2 -2
- package/core/styles/common/_groups.scss +6 -6
- package/dropdown/dropdown-item.scss +9 -6
- package/dropdown/dropdown-tokens.scss +1 -1
- package/dropdown/dropdown-trigger.directive.d.ts +8 -1
- package/dropdown/dropdown.component.d.ts +6 -6
- package/dropdown/dropdown.scss +1 -1
- package/dropdown/dropdown.types.d.ts +19 -7
- package/fesm2022/koobiq-components-accordion.mjs +32 -29
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +10 -10
- package/fesm2022/koobiq-components-alert.mjs +16 -16
- package/fesm2022/koobiq-components-app-switcher.mjs +25 -25
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-autocomplete.mjs +35 -23
- package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +13 -13
- package/fesm2022/koobiq-components-breadcrumbs.mjs +25 -25
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +10 -10
- package/fesm2022/koobiq-components-button.mjs +19 -19
- package/fesm2022/koobiq-components-button.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +10 -10
- package/fesm2022/koobiq-components-clamped-text.mjs +13 -13
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +118 -46
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +28 -28
- package/fesm2022/koobiq-components-core.mjs +219 -220
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +37 -42
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +7 -7
- package/fesm2022/koobiq-components-dl.mjs +13 -13
- package/fesm2022/koobiq-components-dropdown.mjs +69 -38
- 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 +39 -39
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +85 -85
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +83 -81
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +343 -21
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +19 -17
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +22 -22
- package/fesm2022/koobiq-components-link.mjs +7 -7
- package/fesm2022/koobiq-components-list.mjs +19 -19
- package/fesm2022/koobiq-components-loader-overlay.mjs +16 -16
- package/fesm2022/koobiq-components-markdown.mjs +10 -10
- package/fesm2022/koobiq-components-modal.mjs +28 -28
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar-ic.mjs +40 -40
- package/fesm2022/koobiq-components-navbar-ic.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +82 -56
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +16 -16
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +16 -16
- package/fesm2022/koobiq-components-popover.mjs +18 -18
- 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 +10 -10
- package/fesm2022/koobiq-components-risk-level.mjs +7 -7
- package/fesm2022/koobiq-components-scrollbar.mjs +12 -12
- package/fesm2022/koobiq-components-scrollbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +7 -7
- package/fesm2022/koobiq-components-select.mjs +129 -64
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidebar.mjs +13 -13
- package/fesm2022/koobiq-components-sidepanel.mjs +28 -28
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-skeleton.mjs +10 -10
- package/fesm2022/koobiq-components-split-button.mjs +7 -7
- package/fesm2022/koobiq-components-splitter.mjs +16 -16
- package/fesm2022/koobiq-components-table.mjs +10 -10
- package/fesm2022/koobiq-components-tabs.mjs +52 -52
- package/fesm2022/koobiq-components-tags.mjs +38 -31
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +7 -7
- package/fesm2022/koobiq-components-time-range.mjs +22 -22
- package/fesm2022/koobiq-components-timepicker.mjs +11 -26
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +58 -37
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-title.mjs +7 -7
- package/fesm2022/koobiq-components-toast.mjs +58 -39
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +7 -7
- package/fesm2022/koobiq-components-tooltip.mjs +16 -16
- package/fesm2022/koobiq-components-top-bar.mjs +17 -25
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +14 -8
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +74 -39
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/fesm2022/koobiq-components-username.mjs +28 -28
- package/fesm2022/koobiq-components-username.mjs.map +1 -1
- package/file-upload/multiple-file-upload.component.scss +6 -0
- package/file-upload/single-file-upload.component.scss +6 -0
- package/form-field/_form-field-theme.scss +9 -4
- package/form-field/fieldset-tokens.scss +1 -0
- package/form-field/fieldset.scss +1 -0
- package/form-field/form-field-tokens.scss +1 -0
- package/form-field/password-toggle.scss +1 -1
- package/icon/icon-button.scss +5 -0
- package/icon/icon-item.scss +5 -0
- package/icon/icon-registry-providers.d.ts +34 -0
- package/icon/icon-registry.d.ts +50 -0
- package/icon/icon.component.d.ts +16 -3
- package/icon/icon.scss +7 -0
- package/icon/public-api.d.ts +2 -0
- package/inline-edit/inline-edit.d.ts +3 -1
- package/inline-edit/inline-edit.scss +1 -11
- package/link/_link-theme.scss +9 -2
- package/navbar/_navbar-theme.scss +0 -4
- package/navbar/navbar-brand.component.d.ts +3 -1
- package/navbar/navbar-item.component.d.ts +1 -0
- package/navbar/navbar.component.d.ts +1 -0
- package/package.json +4 -4
- package/popover/popover.scss +3 -3
- package/prebuilt-themes/dark-theme.css +1 -1
- package/prebuilt-themes/light-theme.css +1 -1
- package/prebuilt-themes/theme.css +1 -1
- package/schematics/ng-add/index.js +4 -4
- package/scrollbar/scrollbar-tokens.scss +1 -1
- package/select/select-option.directive.d.ts +9 -10
- package/select/select.component.d.ts +42 -3
- package/timepicker/timepicker.directive.d.ts +1 -0
- package/timezone/timezone-option.directive.d.ts +12 -9
- package/toast/toast.service.d.ts +5 -3
- package/top-bar/top-bar.d.ts +0 -7
- package/top-bar/top-bar.scss +3 -9
- package/tree/tree-selection.component.d.ts +7 -0
|
@@ -3,6 +3,7 @@ import { KbqAccordionItem } from './accordion-item';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class KbqAccordionContentDirective implements AfterContentInit, AfterViewInit {
|
|
5
5
|
private readonly renderer;
|
|
6
|
+
private readonly platform;
|
|
6
7
|
/** @docs-private */
|
|
7
8
|
protected readonly nativeElement: HTMLElement;
|
|
8
9
|
/** @docs-private */
|
|
@@ -155,7 +155,8 @@ export declare class KbqAutocompleteTrigger implements AfterViewInit, ControlVal
|
|
|
155
155
|
private getOverlayConfig;
|
|
156
156
|
private getOverlayPosition;
|
|
157
157
|
private getConnectedElement;
|
|
158
|
-
private
|
|
158
|
+
private getPanelMinWidth;
|
|
159
|
+
private getOverlaySize;
|
|
159
160
|
private getHostWidth;
|
|
160
161
|
/**
|
|
161
162
|
* Resets the active item to -1 so arrow events will activate the
|
|
@@ -43,6 +43,11 @@ export declare class KbqAutocomplete implements AfterContentInit {
|
|
|
43
43
|
* match the width of its host.
|
|
44
44
|
*/
|
|
45
45
|
panelWidth: string | number;
|
|
46
|
+
/**
|
|
47
|
+
* Minimum width of the panel in pixels.
|
|
48
|
+
* When panelWidth is not set, the panel will be at least as wide as its host and no less than panelMinWidth.
|
|
49
|
+
*/
|
|
50
|
+
panelMinWidth: number;
|
|
46
51
|
/** Event that is emitted whenever an option from the list is selected. */
|
|
47
52
|
readonly optionSelected: EventEmitter<KbqAutocompleteSelectedEvent>;
|
|
48
53
|
/** Event that is emitted when the autocomplete panel is opened. */
|
|
@@ -78,5 +83,6 @@ export declare class KbqAutocomplete implements AfterContentInit {
|
|
|
78
83
|
onKeydown(event: KeyboardEvent): any;
|
|
79
84
|
private updateFocusClass;
|
|
80
85
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqAutocomplete, [null, null, null, { optional: true; host: true; }]>;
|
|
81
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<KbqAutocomplete, "kbq-autocomplete", ["kbqAutocomplete"], { "displayWith": { "alias": "displayWith"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "openOnFocus": { "alias": "openOnFocus"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; }, ["options", "optionGroups"], ["*", "[kbqAutocompleteFooter], kbq-autocomplete-footer"], true, never>;
|
|
86
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<KbqAutocomplete, "kbq-autocomplete", ["kbqAutocomplete"], { "displayWith": { "alias": "displayWith"; "required": false; }; "panelWidth": { "alias": "panelWidth"; "required": false; }; "panelMinWidth": { "alias": "panelMinWidth"; "required": false; }; "classList": { "alias": "class"; "required": false; }; "autoActiveFirstOption": { "alias": "autoActiveFirstOption"; "required": false; }; "openOnFocus": { "alias": "openOnFocus"; "required": false; }; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; }, ["options", "optionGroups"], ["*", "[kbqAutocompleteFooter], kbq-autocomplete-footer"], true, never>;
|
|
87
|
+
static ngAcceptInputType_panelMinWidth: unknown;
|
|
82
88
|
}
|
|
@@ -14,10 +14,6 @@
|
|
|
14
14
|
background: var(--kbq-#{$base}-header-background);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
& .kbq-code-block__actionbar {
|
|
18
|
-
background: var(--kbq-#{$base}-actionbar-background);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
17
|
&.kbq-code-block_header-with-shadow {
|
|
22
18
|
& .kbq-code-block__header {
|
|
23
19
|
box-shadow: var(--kbq-#{$base}-header-scroll-shadow);
|
|
@@ -26,13 +22,8 @@
|
|
|
26
22
|
|
|
27
23
|
&.kbq-code-block_hide-tabs {
|
|
28
24
|
.kbq-code-block__actionbar {
|
|
29
|
-
background: transparent;
|
|
30
|
-
|
|
31
|
-
.kbq-code-block__actionbar__fade-gradient {
|
|
32
|
-
background: var(--kbq-#{$base}-actionbar-fade-gradient);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
25
|
.kbq-code-block__actionbar__button-stack {
|
|
26
|
+
border-color: var(--kbq-#{$base}-actionbar-border-color);
|
|
36
27
|
background: var(--kbq-#{$base}-actionbar-background);
|
|
37
28
|
}
|
|
38
29
|
}
|
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
import { InjectionToken, Provider } from '@angular/core';
|
|
2
|
+
import type { HLJSApi, LanguageFn } from 'highlight.js';
|
|
2
3
|
import { KbqCodeBlockFile } from './types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/** `highlight.js` configuration */
|
|
6
|
+
export type KbqCodeBlockHighlightJsConfig = Partial<{
|
|
7
|
+
/** Lazy loader for highlight.js core (no bundled languages). When omitted, the full bundle is loaded. */
|
|
8
|
+
core: () => Promise<{
|
|
9
|
+
default: HLJSApi;
|
|
10
|
+
}>;
|
|
11
|
+
/** Map of language name to lazy loader for that language's LanguageFn. */
|
|
12
|
+
languages: Record<string, () => Promise<{
|
|
13
|
+
default: LanguageFn;
|
|
14
|
+
}>>;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Injection token for configuring `KbqCodeBlockHighlightJsConfig`.
|
|
18
|
+
*/
|
|
19
|
+
export declare const KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG: InjectionToken<Partial<{
|
|
20
|
+
/** Lazy loader for highlight.js core (no bundled languages). When omitted, the full bundle is loaded. */
|
|
21
|
+
core: () => Promise<{
|
|
22
|
+
default: HLJSApi;
|
|
23
|
+
}>;
|
|
24
|
+
/** Map of language name to lazy loader for that language's LanguageFn. */
|
|
25
|
+
languages: Record<string, () => Promise<{
|
|
26
|
+
default: LanguageFn;
|
|
27
|
+
}>>;
|
|
28
|
+
}>>;
|
|
29
|
+
/**
|
|
30
|
+
* Utility provider for `KBQ_CODE_BLOCK_HIGHLIGHT_JS_CONFIG`.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* providers: [
|
|
35
|
+
* kbqCodeBlockHighlightJsConfigProvider({
|
|
36
|
+
* core: () => import('highlight.js/lib/core'),
|
|
37
|
+
* languages: {
|
|
38
|
+
* typescript: () => import('highlight.js/lib/languages/typescript'),
|
|
39
|
+
* css: () => import('highlight.js/lib/languages/css'),
|
|
40
|
+
* html: () => import('highlight.js/lib/languages/xml')
|
|
41
|
+
* }
|
|
42
|
+
* })
|
|
43
|
+
* ]
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare const kbqCodeBlockHighlightJsConfigProvider: (options: KbqCodeBlockHighlightJsConfig) => Provider;
|
|
4
47
|
/**
|
|
5
48
|
* Fallback language for code block if language is not supported/specified.
|
|
6
49
|
*
|
|
@@ -10,7 +53,11 @@ import * as i0 from "@angular/core";
|
|
|
10
53
|
export declare const KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE: InjectionToken<string>;
|
|
11
54
|
/** Utility provider for `KBQ_CODE_BLOCK_FALLBACK_FILE_LANGUAGE`. */
|
|
12
55
|
export declare const kbqCodeBlockFallbackFileLanguageProvider: (language: string) => Provider;
|
|
13
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Directive which applies syntax highlighting to the code block content.
|
|
58
|
+
*
|
|
59
|
+
* @docs-private
|
|
60
|
+
*/
|
|
14
61
|
export declare class KbqCodeBlockHighlight {
|
|
15
62
|
private readonly nativeElement;
|
|
16
63
|
private readonly document;
|
|
@@ -18,18 +65,25 @@ export declare class KbqCodeBlockHighlight {
|
|
|
18
65
|
private readonly domSanitizer;
|
|
19
66
|
private readonly fallbackFileLanguage;
|
|
20
67
|
private readonly window;
|
|
68
|
+
private readonly config;
|
|
69
|
+
private hljs;
|
|
70
|
+
private readonly _pending;
|
|
71
|
+
/**
|
|
72
|
+
* Whether syntax highlighting is pending.
|
|
73
|
+
*
|
|
74
|
+
* @docs-private
|
|
75
|
+
*/
|
|
76
|
+
readonly pending: import("@angular/core").Signal<boolean>;
|
|
21
77
|
/** The code file. */
|
|
22
78
|
set file(file: KbqCodeBlockFile);
|
|
23
79
|
/** The starting line number. */
|
|
24
80
|
startFrom: number;
|
|
25
81
|
/** Whether to display line numbers for single line code block. */
|
|
26
82
|
singleLine: boolean;
|
|
27
|
-
|
|
83
|
+
private load;
|
|
84
|
+
private highlight;
|
|
28
85
|
private warn;
|
|
29
|
-
/**
|
|
30
|
-
* Initialize the HighlightJS line numbers plugin. This method is called once when
|
|
31
|
-
* the component is constructed.
|
|
32
|
-
*/
|
|
86
|
+
/** Initialize the HighlightJS line numbers plugin after the hljs instance is available. */
|
|
33
87
|
private initLineNumbersPlugin;
|
|
34
88
|
/**
|
|
35
89
|
* This method is not intended for editing.
|
|
@@ -38,7 +92,7 @@ export declare class KbqCodeBlockHighlight {
|
|
|
38
92
|
*/
|
|
39
93
|
private highlightJSLineNumbersPlugin;
|
|
40
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqCodeBlockHighlight, never>;
|
|
41
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqCodeBlockHighlight, "code[kbqCodeBlockHighlight]",
|
|
95
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqCodeBlockHighlight, "code[kbqCodeBlockHighlight]", ["kbqCodeBlockHighlight"], { "file": { "alias": "file"; "required": true; }; "startFrom": { "alias": "startFrom"; "required": false; }; "singleLine": { "alias": "singleLine"; "required": false; }; }, {}, never, never, true, never>;
|
|
42
96
|
static ngAcceptInputType_startFrom: unknown;
|
|
43
97
|
static ngAcceptInputType_singleLine: unknown;
|
|
44
98
|
}
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
--kbq-code-block-size-no-header-content-content-gap-horizontal: var(--kbq-size-m);
|
|
12
12
|
--kbq-code-block-size-header-content-gap-horizontal: var(--kbq-size-l);
|
|
13
13
|
--kbq-code-block-size-actionbar-content-gap-horizontal: var(--kbq-size-3xs);
|
|
14
|
-
--kbq-code-block-size-actionbar-fade-gradient-width: var(--kbq-size-3xl);
|
|
15
14
|
--kbq-code-block-size-collapse-expanded-padding-top: 0;
|
|
16
15
|
--kbq-code-block-size-collapse-expanded-padding-bottom: var(--kbq-size-l);
|
|
17
16
|
--kbq-code-block-size-collapse-collapsed-padding-top: var(--kbq-size-3xl);
|
|
@@ -119,16 +118,12 @@
|
|
|
119
118
|
--kbq-code-block-font-hljs-variable-language-font-style: null;
|
|
120
119
|
--kbq-code-block-font-hljs-variable-language-font-weight: null;
|
|
121
120
|
/* THEME TOKENS */
|
|
122
|
-
--kbq-code-block-filled-container-background: var(--kbq-background-
|
|
121
|
+
--kbq-code-block-filled-container-background: var(--kbq-background-contrast-less);
|
|
123
122
|
--kbq-code-block-filled-container-border-color: transparent;
|
|
124
|
-
--kbq-code-block-filled-header-background:
|
|
123
|
+
--kbq-code-block-filled-header-background: transparent;
|
|
125
124
|
--kbq-code-block-filled-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);
|
|
126
|
-
--kbq-code-block-filled-actionbar-
|
|
127
|
-
|
|
128
|
-
transparent,
|
|
129
|
-
var(--kbq-background-bg-secondary)
|
|
130
|
-
);
|
|
131
|
-
--kbq-code-block-filled-actionbar-background: var(--kbq-background-bg-secondary);
|
|
125
|
+
--kbq-code-block-filled-actionbar-background: var(--kbq-background-card);
|
|
126
|
+
--kbq-code-block-filled-actionbar-border-color: var(--kbq-line-contrast-less);
|
|
132
127
|
--kbq-code-block-filled-collapse-expanded-background: transparent;
|
|
133
128
|
--kbq-code-block-filled-collapse-collapsed-background: linear-gradient(
|
|
134
129
|
180deg,
|
|
@@ -140,8 +135,8 @@
|
|
|
140
135
|
--kbq-code-block-outline-container-border-color: var(--kbq-divider-color, var(--kbq-line-contrast-less));
|
|
141
136
|
--kbq-code-block-outline-header-background: var(--kbq-background-card);
|
|
142
137
|
--kbq-code-block-outline-header-scroll-shadow: var(--kbq-shadow-overflow-normal-bottom);
|
|
143
|
-
--kbq-code-block-outline-actionbar-fade-gradient: linear-gradient(90deg, transparent, var(--kbq-background-card));
|
|
144
138
|
--kbq-code-block-outline-actionbar-background: var(--kbq-background-card);
|
|
139
|
+
--kbq-code-block-outline-actionbar-border-color: var(--kbq-line-contrast-less);
|
|
145
140
|
--kbq-code-block-outline-collapse-expanded-background: transparent;
|
|
146
141
|
--kbq-code-block-outline-collapse-collapsed-background: linear-gradient(
|
|
147
142
|
180deg,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CdkScrollable } from '@angular/cdk/scrolling';
|
|
1
|
+
import { CdkScrollable, ExtendedScrollToOptions } from '@angular/cdk/scrolling';
|
|
2
2
|
import { AfterViewInit, EventEmitter, InjectionToken, Provider, TemplateRef } from '@angular/core';
|
|
3
3
|
import { KbqButtonStyles } from '@koobiq/components/button';
|
|
4
4
|
import { KbqCodeBlockLocaleConfiguration, KbqComponentColors } from '@koobiq/components/core';
|
|
@@ -24,9 +24,15 @@ export declare class KbqCodeBlock implements AfterViewInit {
|
|
|
24
24
|
private readonly copyButtonTooltip?;
|
|
25
25
|
/**
|
|
26
26
|
* Reference to the scrollable code content.
|
|
27
|
+
*
|
|
28
|
+
* @deprecated Use `scrollTo` method instead.
|
|
29
|
+
*
|
|
30
|
+
* @docs-private
|
|
27
31
|
*/
|
|
28
32
|
readonly scrollableCodeContent: CdkScrollable;
|
|
29
33
|
/** @docs-private */
|
|
34
|
+
private readonly highlight;
|
|
35
|
+
/** @docs-private */
|
|
30
36
|
protected readonly tabLinkTemplate: TemplateRef<KbqTabLinkTemplateContext>;
|
|
31
37
|
/** Whether to display line numbers. */
|
|
32
38
|
lineNumbers: boolean;
|
|
@@ -129,6 +135,7 @@ export declare class KbqCodeBlock implements AfterViewInit {
|
|
|
129
135
|
*/
|
|
130
136
|
protected readonly buttonStyle: typeof KbqButtonStyles;
|
|
131
137
|
private readonly elementRef;
|
|
138
|
+
private readonly injector;
|
|
132
139
|
private readonly changeDetectorRef;
|
|
133
140
|
private readonly localeService;
|
|
134
141
|
private readonly destroyRef;
|
|
@@ -155,6 +162,8 @@ export declare class KbqCodeBlock implements AfterViewInit {
|
|
|
155
162
|
* will be displayed.
|
|
156
163
|
*/
|
|
157
164
|
toggleViewAll(): void;
|
|
165
|
+
/** Scrolls the code content to the specified position. */
|
|
166
|
+
scrollTo(options: ExtendedScrollToOptions): void;
|
|
158
167
|
/**
|
|
159
168
|
* Toggles `softWrap` property.
|
|
160
169
|
*
|
|
@@ -38,11 +38,6 @@
|
|
|
38
38
|
display: flex;
|
|
39
39
|
gap: var(--kbq-code-block-size-actionbar-content-gap-horizontal);
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
.kbq-code-block__actionbar__fade-gradient {
|
|
43
|
-
align-self: stretch;
|
|
44
|
-
width: var(--kbq-code-block-size-actionbar-fade-gradient-width);
|
|
45
|
-
}
|
|
46
41
|
}
|
|
47
42
|
|
|
48
43
|
&:has(.kbq-code-block__view-all) {
|
|
@@ -140,8 +135,14 @@
|
|
|
140
135
|
display: none;
|
|
141
136
|
position: absolute;
|
|
142
137
|
top: 0;
|
|
143
|
-
right:
|
|
144
|
-
|
|
138
|
+
right: 0;
|
|
139
|
+
margin: var(--kbq-size-s) var(--kbq-size-s) var(--kbq-size-s) 0;
|
|
140
|
+
|
|
141
|
+
.kbq-code-block__actionbar__button-stack {
|
|
142
|
+
border-width: 1px;
|
|
143
|
+
border-style: solid;
|
|
144
|
+
border-radius: calc(var(--kbq-size-border-radius) + 1px);
|
|
145
|
+
}
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
.kbq-code-block__main {
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
--kbq-forms-size-vertical-legend-margin-top: var(--kbq-size-3xl);
|
|
11
11
|
--kbq-forms-size-vertical-legend-margin-bottom: var(--kbq-size-m);
|
|
12
12
|
/* THEME TOKENS */
|
|
13
|
-
--kbq-forms-label: var(--kbq-foreground-contrast);
|
|
13
|
+
--kbq-forms-label: var(--kbq-foreground-contrast-secondary);
|
|
14
14
|
--kbq-forms-legend: var(--kbq-foreground-contrast);
|
|
15
15
|
}
|
package/core/option/option.d.ts
CHANGED
|
@@ -47,13 +47,14 @@ export declare abstract class KbqOptionBase {
|
|
|
47
47
|
export declare class KbqVirtualOption extends KbqOptionBase {
|
|
48
48
|
value: any;
|
|
49
49
|
private _disabled;
|
|
50
|
+
private readonly _viewValue?;
|
|
50
51
|
get disabled(): any;
|
|
51
52
|
set disabled(value: any);
|
|
52
53
|
get selected(): boolean;
|
|
53
54
|
private _selected;
|
|
54
55
|
get viewValue(): string;
|
|
55
56
|
readonly onSelectionChange: EventEmitter<KbqOptionSelectionChange<KbqVirtualOption>>;
|
|
56
|
-
constructor(value: any, _disabled?: boolean);
|
|
57
|
+
constructor(value: any, _disabled?: boolean, _viewValue?: string | undefined);
|
|
57
58
|
select(): void;
|
|
58
59
|
deselect(): void;
|
|
59
60
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
border-top-left-radius: $radius;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
@mixin group($item-selector: kbq-group-item) {
|
|
23
|
+
@mixin group($item-selector: '.kbq-group-item') {
|
|
24
24
|
& {
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: row;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
@mixin vertical-group($item-selector: kbq-group-item) {
|
|
52
|
+
@mixin vertical-group($item-selector: '.kbq-group-item') {
|
|
53
53
|
& {
|
|
54
54
|
display: flex;
|
|
55
55
|
flex-direction: column;
|
|
@@ -32,19 +32,19 @@
|
|
|
32
32
|
@include groups-mixins.group();
|
|
33
33
|
|
|
34
34
|
& > .kbq-group-item:first-child:not(:last-child) {
|
|
35
|
-
|
|
35
|
+
.kbq-form-field__container {
|
|
36
36
|
@include border-right-radius(0);
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
& > .kbq-group-item:last-child:not(:first-child) {
|
|
41
|
-
|
|
41
|
+
.kbq-form-field__container {
|
|
42
42
|
@include border-left-radius(0);
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
& > .kbq-group-item:not(:first-child):not(:last-child) {
|
|
47
|
-
|
|
47
|
+
.kbq-form-field__container {
|
|
48
48
|
border-radius: 0;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -55,19 +55,19 @@
|
|
|
55
55
|
|
|
56
56
|
> .kbq-group-item {
|
|
57
57
|
&:first-child:not(:last-child) {
|
|
58
|
-
|
|
58
|
+
.kbq-form-field__container {
|
|
59
59
|
@include border-bottom-radius(0);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
&:last-child:not(:first-child) {
|
|
64
|
-
|
|
64
|
+
.kbq-form-field__container {
|
|
65
65
|
@include border-top-radius(0);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
&:not(:first-child):not(:last-child) {
|
|
70
|
-
|
|
70
|
+
.kbq-form-field__container {
|
|
71
71
|
border-radius: 0;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
align-items: flex-start;
|
|
17
17
|
text-decoration: none;
|
|
18
18
|
|
|
19
|
-
& > .kbq-icon:first-child
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
& > .kbq-icon:first-child {
|
|
20
|
+
&:before,
|
|
21
|
+
& > svg {
|
|
22
|
+
align-self: center;
|
|
23
|
+
display: flex;
|
|
24
|
+
height: var(--kbq-size-xl);
|
|
25
|
+
width: 16px;
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
& .kbq-dropdown-item__caption {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@use '../list/list-tokens';
|
|
2
2
|
|
|
3
3
|
.kbq-dropdown__panel {
|
|
4
|
-
--kbq-dropdown-size-container-width-min:
|
|
4
|
+
--kbq-dropdown-size-container-width-min: 200px;
|
|
5
5
|
--kbq-dropdown-size-container-width-max: 640px;
|
|
6
6
|
--kbq-dropdown-size-container-padding-vertical: var(--kbq-size-xxs);
|
|
7
7
|
--kbq-dropdown-size-container-border-radius: var(--kbq-size-s);
|
|
@@ -45,6 +45,12 @@ export declare class KbqDropdownTrigger implements AfterContentInit, OnDestroy {
|
|
|
45
45
|
/** Data to be passed along to any lazily-rendered content. */
|
|
46
46
|
data: any;
|
|
47
47
|
openByArrowDown: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether to demote the overlay container z-index so that dropdown overlays
|
|
50
|
+
* sit below sibling overlays (tooltips, modals, etc.). Set to `false` to
|
|
51
|
+
* keep the dropdown overlay at the default overlay container z-index.
|
|
52
|
+
*/
|
|
53
|
+
demoteOverlay: boolean;
|
|
48
54
|
/**
|
|
49
55
|
* Whether focus should be restored when the menu is closed.
|
|
50
56
|
* Note that disabling this option can have accessibility implications
|
|
@@ -143,7 +149,8 @@ export declare class KbqDropdownTrigger implements AfterContentInit, OnDestroy {
|
|
|
143
149
|
private addClassToOverlayContainer;
|
|
144
150
|
private removeClassFromOverlayContainer;
|
|
145
151
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqDropdownTrigger, [null, null, null, null, { optional: true; }, { optional: true; self: true; }, { optional: true; }, null, null]>;
|
|
146
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqDropdownTrigger, "[kbqDropdownTriggerFor]", ["kbqDropdownTrigger"], { "offsetX": { "alias": "offsetX"; "required": false; }; "offsetY": { "alias": "offsetY"; "required": false; }; "data": { "alias": "kbqDropdownTriggerData"; "required": false; }; "openByArrowDown": { "alias": "openByArrowDown"; "required": false; }; "restoreFocus": { "alias": "kbqDropdownTriggerRestoreFocus"; "required": false; }; "dropdown": { "alias": "kbqDropdownTriggerFor"; "required": false; }; }, { "dropdownOpened": "dropdownOpened"; "dropdownClosed": "dropdownClosed"; }, never, never, true, never>;
|
|
152
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<KbqDropdownTrigger, "[kbqDropdownTriggerFor]", ["kbqDropdownTrigger"], { "offsetX": { "alias": "offsetX"; "required": false; }; "offsetY": { "alias": "offsetY"; "required": false; }; "data": { "alias": "kbqDropdownTriggerData"; "required": false; }; "openByArrowDown": { "alias": "openByArrowDown"; "required": false; }; "demoteOverlay": { "alias": "demoteOverlay"; "required": false; }; "restoreFocus": { "alias": "kbqDropdownTriggerRestoreFocus"; "required": false; }; "dropdown": { "alias": "kbqDropdownTriggerFor"; "required": false; }; }, { "dropdownOpened": "dropdownOpened"; "dropdownClosed": "dropdownClosed"; }, never, never, true, never>;
|
|
147
153
|
static ngAcceptInputType_offsetX: unknown;
|
|
148
154
|
static ngAcceptInputType_offsetY: unknown;
|
|
155
|
+
static ngAcceptInputType_demoteOverlay: unknown;
|
|
149
156
|
}
|
|
@@ -5,7 +5,7 @@ import { AfterContentInit, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit,
|
|
|
5
5
|
import { Observable, Subject } from 'rxjs';
|
|
6
6
|
import { KbqDropdownContent } from './dropdown-content.directive';
|
|
7
7
|
import { KbqDropdownItem } from './dropdown-item.component';
|
|
8
|
-
import {
|
|
8
|
+
import { KbqDropdownDefaultOptions, KbqDropdownPanel, KbqDropdownPositionX, KbqDropdownPositionY } from './dropdown.types';
|
|
9
9
|
import * as i0 from "@angular/core";
|
|
10
10
|
export declare class KbqDropdownStaticContent {
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<KbqDropdownStaticContent, never>;
|
|
@@ -18,11 +18,11 @@ export declare class KbqDropdown implements AfterContentInit, KbqDropdownPanel,
|
|
|
18
18
|
private search?;
|
|
19
19
|
navigationWithWrap: boolean;
|
|
20
20
|
/** Position of the dropdown in the X axis. */
|
|
21
|
-
get xPosition():
|
|
22
|
-
set xPosition(value:
|
|
21
|
+
get xPosition(): KbqDropdownPositionX;
|
|
22
|
+
set xPosition(value: KbqDropdownPositionX);
|
|
23
23
|
/** Position of the dropdown in the Y axis. */
|
|
24
|
-
get yPosition():
|
|
25
|
-
set yPosition(value:
|
|
24
|
+
get yPosition(): KbqDropdownPositionY;
|
|
25
|
+
set yPosition(value: KbqDropdownPositionY);
|
|
26
26
|
/** Whether the dropdown should overlap its trigger vertically. */
|
|
27
27
|
get overlapTriggerY(): boolean;
|
|
28
28
|
set overlapTriggerY(value: boolean);
|
|
@@ -105,7 +105,7 @@ export declare class KbqDropdown implements AfterContentInit, KbqDropdownPanel,
|
|
|
105
105
|
* @param posY Position of the dropdown along the y axis.
|
|
106
106
|
* @docs-private
|
|
107
107
|
*/
|
|
108
|
-
setPositionClasses(posX?:
|
|
108
|
+
setPositionClasses(posX?: KbqDropdownPositionX, posY?: KbqDropdownPositionY): void;
|
|
109
109
|
/** Starts the enter animation. */
|
|
110
110
|
startAnimation(): void;
|
|
111
111
|
/** Resets the panel animation to its initial state. */
|
package/dropdown/dropdown.scss
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
overflow-x: hidden;
|
|
36
36
|
overflow-y: auto;
|
|
37
37
|
|
|
38
|
-
min-width: var(--kbq-dropdown-size-container-width-min);
|
|
38
|
+
min-width: max(var(--kbq-dropdown-size-container-width-min), 100%);
|
|
39
39
|
max-width: var(--kbq-dropdown-size-container-width-max);
|
|
40
40
|
|
|
41
41
|
border-radius: var(--kbq-dropdown-size-container-border-radius);
|
|
@@ -3,8 +3,20 @@ import { Direction } from '@angular/cdk/bidi';
|
|
|
3
3
|
import { EventEmitter, InjectionToken, QueryList, TemplateRef } from '@angular/core';
|
|
4
4
|
import { KbqDropdownContent } from './dropdown-content.directive';
|
|
5
5
|
import { KbqDropdownItem } from './dropdown-item.component';
|
|
6
|
-
|
|
7
|
-
export type
|
|
6
|
+
/** Position of the dropdown panel along the x-axis. */
|
|
7
|
+
export type KbqDropdownPositionX = 'before' | 'after' | 'center';
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `KbqDropdownPositionX` instead.
|
|
10
|
+
* @docs-private
|
|
11
|
+
*/
|
|
12
|
+
export type DropdownPositionX = KbqDropdownPositionX;
|
|
13
|
+
/** Position of the dropdown panel along the y-axis. */
|
|
14
|
+
export type KbqDropdownPositionY = 'above' | 'below';
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use `KbqDropdownPositionY` instead.
|
|
17
|
+
* @docs-private
|
|
18
|
+
*/
|
|
19
|
+
export type DropdownPositionY = KbqDropdownPositionY;
|
|
8
20
|
/** Reason why the menu was closed. */
|
|
9
21
|
export type DropdownCloseReason = void | 'click' | 'keydown' | 'tab';
|
|
10
22
|
/**
|
|
@@ -12,8 +24,8 @@ export type DropdownCloseReason = void | 'click' | 'keydown' | 'tab';
|
|
|
12
24
|
* @docs-private
|
|
13
25
|
*/
|
|
14
26
|
export interface KbqDropdownPanel {
|
|
15
|
-
xPosition:
|
|
16
|
-
yPosition:
|
|
27
|
+
xPosition: KbqDropdownPositionX;
|
|
28
|
+
yPosition: KbqDropdownPositionY;
|
|
17
29
|
overlapTriggerX: boolean;
|
|
18
30
|
overlapTriggerY: boolean;
|
|
19
31
|
templateRef: TemplateRef<any>;
|
|
@@ -27,14 +39,14 @@ export interface KbqDropdownPanel {
|
|
|
27
39
|
items: QueryList<KbqDropdownItem>;
|
|
28
40
|
focusFirstItem(origin?: FocusOrigin): void;
|
|
29
41
|
resetActiveItem(): void;
|
|
30
|
-
setPositionClasses?(x:
|
|
42
|
+
setPositionClasses?(x: KbqDropdownPositionX, y: KbqDropdownPositionY): void;
|
|
31
43
|
}
|
|
32
44
|
/** Default `kbq-dropdown` options that can be overridden. */
|
|
33
45
|
export interface KbqDropdownDefaultOptions {
|
|
34
46
|
/** The x-axis position of the dropdown. */
|
|
35
|
-
xPosition:
|
|
47
|
+
xPosition: KbqDropdownPositionX;
|
|
36
48
|
/** The y-axis position of the dropdown. */
|
|
37
|
-
yPosition:
|
|
49
|
+
yPosition: KbqDropdownPositionY;
|
|
38
50
|
/** Whether the dropdown should overlap the dropdown trigger horizontally. */
|
|
39
51
|
overlapTriggerX: boolean;
|
|
40
52
|
/** Whether the dropdown should overlap the dropdown trigger vertically. */
|