@koobiq/components 21.0.1 → 21.1.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/badge/_badge-theme.scss +31 -0
- package/breadcrumbs/breadcrumbs.scss +5 -1
- package/checkbox/_checkbox-theme.scss +0 -17
- package/checkbox/checkbox-tokens.scss +0 -4
- package/code-block/_code-block-theme.scss +7 -6
- package/code-block/code-block-tokens.scss +8 -4
- package/code-block/code-block.scss +54 -32
- package/content-panel/content-panel-header.scss +2 -3
- package/content-panel/content-panel.scss +3 -0
- package/core/selection/pseudo-checkbox/pseudo-checkbox-tokens.scss +0 -2
- package/fesm2022/koobiq-components-accordion.mjs +4 -4
- package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
- package/fesm2022/koobiq-components-actions-panel.mjs +10 -2
- package/fesm2022/koobiq-components-actions-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs +1 -1
- package/fesm2022/koobiq-components-app-switcher.mjs.map +1 -1
- package/fesm2022/koobiq-components-badge.mjs +2 -2
- package/fesm2022/koobiq-components-badge.mjs.map +1 -1
- package/fesm2022/koobiq-components-breadcrumbs.mjs +2 -2
- package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs +1 -1
- package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-checkbox.mjs +18 -8
- package/fesm2022/koobiq-components-checkbox.mjs.map +1 -1
- package/fesm2022/koobiq-components-clamped-text.mjs +78 -10
- package/fesm2022/koobiq-components-clamped-text.mjs.map +1 -1
- package/fesm2022/koobiq-components-code-block.mjs +63 -379
- package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
- package/fesm2022/koobiq-components-content-panel.mjs +4 -4
- package/fesm2022/koobiq-components-content-panel.mjs.map +1 -1
- package/fesm2022/koobiq-components-core.mjs +300 -37
- package/fesm2022/koobiq-components-core.mjs.map +1 -1
- package/fesm2022/koobiq-components-datepicker.mjs +151 -60
- package/fesm2022/koobiq-components-datepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-divider.mjs +3 -3
- package/fesm2022/koobiq-components-divider.mjs.map +1 -1
- package/fesm2022/koobiq-components-dropdown.mjs +3 -3
- package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
- package/fesm2022/koobiq-components-file-upload.mjs +17 -8
- package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
- package/fesm2022/koobiq-components-filter-bar.mjs +115 -36
- package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-flag.mjs +3 -3
- package/fesm2022/koobiq-components-flag.mjs.map +1 -1
- package/fesm2022/koobiq-components-form-field.mjs +90 -27
- package/fesm2022/koobiq-components-form-field.mjs.map +1 -1
- package/fesm2022/koobiq-components-icon.mjs +2 -2
- package/fesm2022/koobiq-components-icon.mjs.map +1 -1
- package/fesm2022/koobiq-components-inline-edit.mjs +19 -2
- package/fesm2022/koobiq-components-inline-edit.mjs.map +1 -1
- package/fesm2022/koobiq-components-input.mjs +76 -17
- package/fesm2022/koobiq-components-input.mjs.map +1 -1
- package/fesm2022/koobiq-components-list.mjs +1 -1
- package/fesm2022/koobiq-components-list.mjs.map +1 -1
- package/fesm2022/koobiq-components-modal.mjs +3 -3
- package/fesm2022/koobiq-components-modal.mjs.map +1 -1
- package/fesm2022/koobiq-components-navbar.mjs +86 -25
- package/fesm2022/koobiq-components-navbar.mjs.map +1 -1
- package/fesm2022/koobiq-components-notification-center.mjs +4 -4
- package/fesm2022/koobiq-components-notification-center.mjs.map +1 -1
- package/fesm2022/koobiq-components-overflow-items.mjs +116 -38
- package/fesm2022/koobiq-components-overflow-items.mjs.map +1 -1
- package/fesm2022/koobiq-components-popover.mjs +86 -7
- package/fesm2022/koobiq-components-popover.mjs.map +1 -1
- package/fesm2022/koobiq-components-radio.mjs +41 -19
- package/fesm2022/koobiq-components-radio.mjs.map +1 -1
- package/fesm2022/koobiq-components-search-expandable.mjs +29 -17
- package/fesm2022/koobiq-components-search-expandable.mjs.map +1 -1
- package/fesm2022/koobiq-components-select.mjs +49 -12
- package/fesm2022/koobiq-components-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-sidepanel.mjs +198 -186
- package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
- package/fesm2022/koobiq-components-splitter.mjs +49 -25
- package/fesm2022/koobiq-components-splitter.mjs.map +1 -1
- package/fesm2022/koobiq-components-tabs.mjs +30 -11
- package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
- package/fesm2022/koobiq-components-tags.mjs +1 -1
- package/fesm2022/koobiq-components-tags.mjs.map +1 -1
- package/fesm2022/koobiq-components-textarea.mjs +28 -11
- package/fesm2022/koobiq-components-textarea.mjs.map +1 -1
- package/fesm2022/koobiq-components-time-range.mjs +2 -2
- package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
- package/fesm2022/koobiq-components-timepicker.mjs +71 -16
- package/fesm2022/koobiq-components-timepicker.mjs.map +1 -1
- package/fesm2022/koobiq-components-timezone.mjs +2 -2
- package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
- package/fesm2022/koobiq-components-toast.mjs +2 -2
- package/fesm2022/koobiq-components-toast.mjs.map +1 -1
- package/fesm2022/koobiq-components-toggle.mjs +25 -9
- package/fesm2022/koobiq-components-toggle.mjs.map +1 -1
- package/fesm2022/koobiq-components-tooltip.mjs +90 -17
- package/fesm2022/koobiq-components-tooltip.mjs.map +1 -1
- package/fesm2022/koobiq-components-top-bar.mjs +27 -7
- package/fesm2022/koobiq-components-top-bar.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree-select.mjs +4 -4
- package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
- package/fesm2022/koobiq-components-tree.mjs +71 -27
- package/fesm2022/koobiq-components-tree.mjs.map +1 -1
- package/file-upload/_file-upload-theme.scss +0 -12
- package/file-upload/file-upload-tokens.scss +0 -1
- package/file-upload/file-upload.scss +0 -1
- package/filter-bar/_filter-bar-theme.scss +7 -8
- package/filter-bar/filter-bar.scss +0 -1
- package/filter-bar/pipes/base-pipe.scss +36 -2
- package/filter-bar/pipes/pipe-multi-tree-select.scss +27 -0
- package/form-field/_fieldset-theme.scss +2 -7
- package/form-field/_form-field-theme.scss +9 -22
- package/form-field/_hint-theme.scss +20 -0
- package/form-field/fieldset-tokens.scss +0 -1
- package/form-field/fieldset.scss +0 -3
- package/form-field/form-field-tokens.scss +1 -1
- package/form-field/form-field.scss +9 -0
- package/form-field/hint-tokens.scss +3 -0
- package/modal/modal.scss +2 -0
- package/navbar/_navbar-item_vertical.scss +48 -2
- package/navbar/_navbar-theme.scss +11 -3
- package/navbar/navbar-item.scss +17 -0
- package/navbar/navbar-tokens.scss +3 -0
- package/package.json +4 -4
- package/popover/popover.scss +1 -1
- package/radio/_radio-theme.scss +0 -30
- package/radio/radio-tokens.scss +0 -2
- package/schematics/migrations/deprecated-icons/README.md +21 -5
- package/schematics/migrations/deprecated-icons/index.cjs +8 -22
- package/schematics/migrations/deprecated-icons/schema.json +1 -1
- package/schematics/migrations/icons-replacement/README.md +16 -2
- package/schematics/migrations/icons-replacement/index.cjs +18 -16
- package/schematics/migrations/icons-replacement/schema.json +12 -3
- package/schematics/migrations/new-icons-pack/README.md +37 -25
- package/schematics/migrations/new-icons-pack/index.cjs +22 -32
- package/schematics/migrations/new-icons-pack/replacement.json +2 -14
- package/schematics/migrations/new-icons-pack/schema.json +3 -3
- package/schematics/ng-add/index.cjs +4 -4
- package/schematics/utils/custom-data.cjs +64 -0
- package/schematics/utils/icon-migration.cjs +9 -3
- package/schematics/utils/messages.cjs +4 -0
- package/schematics/utils/package-config.cjs +19 -0
- package/select/select.scss +7 -0
- package/tabs/_tabs-common.scss +23 -0
- package/textarea/textarea-tokens.scss +4 -1
- package/toast/toast.component.scss +1 -0
- package/toggle/_toggle-theme.scss +0 -17
- package/tooltip/tooltip.scss +1 -1
- package/top-bar/top-bar-tokens.scss +1 -0
- package/top-bar/top-bar.scss +10 -0
- package/types/koobiq-components-accordion.d.ts +25 -0
- package/types/koobiq-components-button-toggle.d.ts +6 -0
- package/types/koobiq-components-checkbox.d.ts +30 -0
- package/types/koobiq-components-clamped-text.d.ts +16 -3
- package/types/koobiq-components-code-block.d.ts +17 -3
- package/types/koobiq-components-core.d.ts +226 -13
- package/types/koobiq-components-datepicker.d.ts +28 -1
- package/types/koobiq-components-divider.d.ts +28 -10
- package/types/koobiq-components-dropdown.d.ts +19 -0
- package/types/koobiq-components-filter-bar.d.ts +77 -4
- package/types/koobiq-components-flag.d.ts +18 -0
- package/types/koobiq-components-form-field.d.ts +87 -6
- package/types/koobiq-components-icon.d.ts +15 -0
- package/types/koobiq-components-inline-edit.d.ts +8 -1
- package/types/koobiq-components-input.d.ts +22 -3
- package/types/koobiq-components-list.d.ts +6 -0
- package/types/koobiq-components-modal.d.ts +7 -0
- package/types/koobiq-components-navbar.d.ts +71 -7
- package/types/koobiq-components-notification-center.d.ts +13 -0
- package/types/koobiq-components-overflow-items.d.ts +26 -2
- package/types/koobiq-components-popover.d.ts +38 -3
- package/types/koobiq-components-radio.d.ts +30 -0
- package/types/koobiq-components-search-expandable.d.ts +10 -0
- package/types/koobiq-components-select.d.ts +36 -4
- package/types/koobiq-components-sidepanel.d.ts +52 -1
- package/types/koobiq-components-splitter.d.ts +13 -4
- package/types/koobiq-components-tabs.d.ts +4 -0
- package/types/koobiq-components-tags.d.ts +6 -0
- package/types/koobiq-components-textarea.d.ts +9 -2
- package/types/koobiq-components-timepicker.d.ts +15 -0
- package/types/koobiq-components-toggle.d.ts +30 -0
- package/types/koobiq-components-tooltip.d.ts +55 -10
- package/types/koobiq-components-top-bar.d.ts +11 -3
- package/types/koobiq-components-tree-select.d.ts +12 -0
- package/types/koobiq-components-tree.d.ts +37 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { QueryList, InjectionToken, inject, ANIMATION_MODULE_TYPE, DestroyRef, MAX_ANIMATION_TIMEOUT, PLATFORM_ID, afterNextRender, ElementRef, signal, forwardRef, model, computed, untracked, Directive, linkedSignal, input, ChangeDetectorRef, LOCALE_ID, isDevMode, Injectable, Type, effect, EnvironmentInjector, numberAttribute, Renderer2, Injector, runInInjectionContext, NgModule, Pipe, contentChildren, booleanAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, EventEmitter, viewChild, ApplicationRef, TemplateRef, NgZone, ViewContainerRef, isWritableSignal, REQUEST, RendererFactory2, output, Version } from '@angular/core';
|
|
2
|
+
import { QueryList, InjectionToken, inject, ANIMATION_MODULE_TYPE, DestroyRef, MAX_ANIMATION_TIMEOUT, PLATFORM_ID, afterNextRender, ElementRef, signal, forwardRef, model, computed, untracked, Directive, linkedSignal, input, ChangeDetectorRef, LOCALE_ID, isDevMode, Injectable, Type, effect, EnvironmentInjector, numberAttribute, Renderer2, Injector, runInInjectionContext, NgModule, Pipe, contentChildren, booleanAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, EventEmitter, viewChild, ApplicationRef, TemplateRef, RendererStyleFlags2, NgZone, ViewContainerRef, isWritableSignal, REQUEST, RendererFactory2, output, Version } from '@angular/core';
|
|
3
3
|
import { Subject, Subscription, BehaviorSubject, defer, distinctUntilChanged, switchMap, EMPTY, asyncScheduler, of, timer, merge, fromEvent, map as map$1, Observable } from 'rxjs';
|
|
4
4
|
import { tap, debounceTime, filter, map, distinctUntilChanged as distinctUntilChanged$1, delay } from 'rxjs/operators';
|
|
5
5
|
import { _getEventTarget, _getFocusedElementPierceShadowDom, Platform, _getShadowRoot } from '@angular/cdk/platform';
|
|
@@ -18,131 +18,252 @@ import { Directionality } from '@angular/cdk/bidi';
|
|
|
18
18
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
19
19
|
import { ViewportRuler } from '@angular/cdk/scrolling';
|
|
20
20
|
|
|
21
|
+
/** @docs-private */
|
|
21
22
|
const MAC_ENTER = 3;
|
|
23
|
+
/** @docs-private */
|
|
22
24
|
const BACKSPACE = 8;
|
|
25
|
+
/** @docs-private */
|
|
23
26
|
const TAB = 9;
|
|
27
|
+
/** @docs-private */
|
|
24
28
|
const NUM_CENTER = 12;
|
|
29
|
+
/** @docs-private */
|
|
25
30
|
const ENTER = 13;
|
|
31
|
+
/** @docs-private */
|
|
26
32
|
const SHIFT = 16;
|
|
33
|
+
/** @docs-private */
|
|
27
34
|
const CONTROL = 17;
|
|
35
|
+
/** @docs-private */
|
|
28
36
|
const ALT = 18;
|
|
37
|
+
/** @docs-private */
|
|
29
38
|
const PAUSE = 19;
|
|
39
|
+
/** @docs-private */
|
|
30
40
|
const CAPS_LOCK = 20;
|
|
41
|
+
/** @docs-private */
|
|
31
42
|
const ESCAPE = 27;
|
|
43
|
+
/** @docs-private */
|
|
32
44
|
const SPACE = 32;
|
|
45
|
+
/** @docs-private */
|
|
33
46
|
const PAGE_UP = 33;
|
|
47
|
+
/** @docs-private */
|
|
34
48
|
const PAGE_DOWN = 34;
|
|
49
|
+
/** @docs-private */
|
|
35
50
|
const END = 35;
|
|
51
|
+
/** @docs-private */
|
|
36
52
|
const HOME = 36;
|
|
53
|
+
/** @docs-private */
|
|
37
54
|
const LEFT_ARROW = 37;
|
|
55
|
+
/** @docs-private */
|
|
38
56
|
const UP_ARROW = 38;
|
|
57
|
+
/** @docs-private */
|
|
39
58
|
const RIGHT_ARROW = 39;
|
|
59
|
+
/** @docs-private */
|
|
40
60
|
const DOWN_ARROW = 40;
|
|
61
|
+
/** @docs-private */
|
|
41
62
|
const PLUS_SIGN = 43;
|
|
63
|
+
/** @docs-private */
|
|
42
64
|
const PRINT_SCREEN = 44;
|
|
65
|
+
/** @docs-private */
|
|
43
66
|
const INSERT = 45;
|
|
67
|
+
/** @docs-private */
|
|
44
68
|
const DELETE = 46;
|
|
69
|
+
/** @docs-private */
|
|
45
70
|
const ZERO = 48;
|
|
71
|
+
/** @docs-private */
|
|
46
72
|
const ONE = 49;
|
|
73
|
+
/** @docs-private */
|
|
47
74
|
const TWO = 50;
|
|
75
|
+
/** @docs-private */
|
|
48
76
|
const THREE = 51;
|
|
77
|
+
/** @docs-private */
|
|
49
78
|
const FOUR = 52;
|
|
79
|
+
/** @docs-private */
|
|
50
80
|
const FIVE = 53;
|
|
81
|
+
/** @docs-private */
|
|
51
82
|
const SIX = 54;
|
|
83
|
+
/** @docs-private */
|
|
52
84
|
const SEVEN = 55;
|
|
85
|
+
/** @docs-private */
|
|
53
86
|
const EIGHT = 56;
|
|
87
|
+
/** @docs-private */
|
|
54
88
|
const NINE = 57;
|
|
89
|
+
/** @docs-private */
|
|
55
90
|
const FF_SEMICOLON = 59; // Firefox (Gecko) fires this for semicolon instead of 186
|
|
91
|
+
/** @docs-private */
|
|
56
92
|
const FF_EQUALS = 61; // Firefox (Gecko) fires this for equals instead of 187
|
|
93
|
+
/** @docs-private */
|
|
57
94
|
const QUESTION_MARK = 63;
|
|
95
|
+
/** @docs-private */
|
|
58
96
|
const AT_SIGN = 64;
|
|
97
|
+
/** @docs-private */
|
|
59
98
|
const A = 65;
|
|
99
|
+
/** @docs-private */
|
|
60
100
|
const B = 66;
|
|
101
|
+
/** @docs-private */
|
|
61
102
|
const C = 67;
|
|
103
|
+
/** @docs-private */
|
|
62
104
|
const D = 68;
|
|
105
|
+
/** @docs-private */
|
|
63
106
|
const E = 69;
|
|
107
|
+
/** @docs-private */
|
|
64
108
|
const F = 70;
|
|
109
|
+
/** @docs-private */
|
|
65
110
|
const G = 71;
|
|
111
|
+
/** @docs-private */
|
|
66
112
|
const H = 72;
|
|
113
|
+
/** @docs-private */
|
|
67
114
|
const I = 73;
|
|
115
|
+
/** @docs-private */
|
|
68
116
|
const J = 74;
|
|
117
|
+
/** @docs-private */
|
|
69
118
|
const K = 75;
|
|
119
|
+
/** @docs-private */
|
|
70
120
|
const L = 76;
|
|
121
|
+
/** @docs-private */
|
|
71
122
|
const M = 77;
|
|
123
|
+
/** @docs-private */
|
|
72
124
|
const N = 78;
|
|
125
|
+
/** @docs-private */
|
|
73
126
|
const O = 79;
|
|
127
|
+
/** @docs-private */
|
|
74
128
|
const P = 80;
|
|
129
|
+
/** @docs-private */
|
|
75
130
|
const Q = 81;
|
|
131
|
+
/** @docs-private */
|
|
76
132
|
const R = 82;
|
|
133
|
+
/** @docs-private */
|
|
77
134
|
const S = 83;
|
|
135
|
+
/** @docs-private */
|
|
78
136
|
const T = 84;
|
|
137
|
+
/** @docs-private */
|
|
79
138
|
const U = 85;
|
|
139
|
+
/** @docs-private */
|
|
80
140
|
const V = 86;
|
|
141
|
+
/** @docs-private */
|
|
81
142
|
const W = 87;
|
|
143
|
+
/** @docs-private */
|
|
82
144
|
const X = 88;
|
|
145
|
+
/** @docs-private */
|
|
83
146
|
const Y = 89;
|
|
147
|
+
/** @docs-private */
|
|
84
148
|
const Z = 90;
|
|
149
|
+
/** @docs-private */
|
|
85
150
|
const META = 91; // WIN_KEY_LEFT
|
|
151
|
+
/** @docs-private */
|
|
86
152
|
const MAC_WK_CMD_LEFT = 91;
|
|
153
|
+
/** @docs-private */
|
|
87
154
|
const MAC_WK_CMD_RIGHT = 93;
|
|
155
|
+
/** @docs-private */
|
|
88
156
|
const CONTEXT_MENU = 93;
|
|
157
|
+
/** @docs-private */
|
|
89
158
|
const NUMPAD_ZERO = 96;
|
|
159
|
+
/** @docs-private */
|
|
90
160
|
const NUMPAD_ONE = 97;
|
|
161
|
+
/** @docs-private */
|
|
91
162
|
const NUMPAD_TWO = 98;
|
|
163
|
+
/** @docs-private */
|
|
92
164
|
const NUMPAD_THREE = 99;
|
|
165
|
+
/** @docs-private */
|
|
93
166
|
const NUMPAD_FOUR = 100;
|
|
167
|
+
/** @docs-private */
|
|
94
168
|
const NUMPAD_FIVE = 101;
|
|
169
|
+
/** @docs-private */
|
|
95
170
|
const NUMPAD_SIX = 102;
|
|
171
|
+
/** @docs-private */
|
|
96
172
|
const NUMPAD_SEVEN = 103;
|
|
173
|
+
/** @docs-private */
|
|
97
174
|
const NUMPAD_EIGHT = 104;
|
|
175
|
+
/** @docs-private */
|
|
98
176
|
const NUMPAD_NINE = 105;
|
|
177
|
+
/** @docs-private */
|
|
99
178
|
const NUMPAD_MULTIPLY = 106;
|
|
179
|
+
/** @docs-private */
|
|
100
180
|
const NUMPAD_PLUS = 107;
|
|
181
|
+
/** @docs-private */
|
|
101
182
|
const NUMPAD_MINUS = 109;
|
|
183
|
+
/** @docs-private */
|
|
102
184
|
const NUMPAD_PERIOD = 110;
|
|
185
|
+
/** @docs-private */
|
|
103
186
|
const NUMPAD_DIVIDE = 111;
|
|
187
|
+
/** @docs-private */
|
|
104
188
|
const F1 = 112;
|
|
189
|
+
/** @docs-private */
|
|
105
190
|
const F2 = 113;
|
|
191
|
+
/** @docs-private */
|
|
106
192
|
const F3 = 114;
|
|
193
|
+
/** @docs-private */
|
|
107
194
|
const F4 = 115;
|
|
195
|
+
/** @docs-private */
|
|
108
196
|
const F5 = 116;
|
|
197
|
+
/** @docs-private */
|
|
109
198
|
const F6 = 117;
|
|
199
|
+
/** @docs-private */
|
|
110
200
|
const F7 = 118;
|
|
201
|
+
/** @docs-private */
|
|
111
202
|
const F8 = 119;
|
|
203
|
+
/** @docs-private */
|
|
112
204
|
const F9 = 120;
|
|
205
|
+
/** @docs-private */
|
|
113
206
|
const F10 = 121;
|
|
207
|
+
/** @docs-private */
|
|
114
208
|
const F11 = 122;
|
|
209
|
+
/** @docs-private */
|
|
115
210
|
const F12 = 123;
|
|
211
|
+
/** @docs-private */
|
|
116
212
|
const NUM_LOCK = 144;
|
|
213
|
+
/** @docs-private */
|
|
117
214
|
const SCROLL_LOCK = 145;
|
|
215
|
+
/** @docs-private */
|
|
118
216
|
const FIRST_MEDIA = 166;
|
|
217
|
+
/** @docs-private */
|
|
119
218
|
const FF_MINUS = 173;
|
|
219
|
+
/** @docs-private */
|
|
120
220
|
const MUTE = 173; // Firefox (Gecko) fires 181 for MUTE
|
|
221
|
+
/** @docs-private */
|
|
121
222
|
const VOLUME_DOWN = 174; // Firefox (Gecko) fires 182 for VOLUME_DOWN
|
|
223
|
+
/** @docs-private */
|
|
122
224
|
const VOLUME_UP = 175; // Firefox (Gecko) fires 183 for VOLUME_UP
|
|
225
|
+
/** @docs-private */
|
|
123
226
|
const FF_MUTE = 181;
|
|
227
|
+
/** @docs-private */
|
|
124
228
|
const FF_VOLUME_DOWN = 182;
|
|
229
|
+
/** @docs-private */
|
|
125
230
|
const LAST_MEDIA = 183;
|
|
231
|
+
/** @docs-private */
|
|
126
232
|
const FF_VOLUME_UP = 183;
|
|
233
|
+
/** @docs-private */
|
|
127
234
|
const SEMICOLON = 186; // Firefox (Gecko) fires 59 for SEMICOLON
|
|
235
|
+
/** @docs-private */
|
|
128
236
|
const EQUALS = 187; // Firefox (Gecko) fires 61 for EQUALS
|
|
237
|
+
/** @docs-private */
|
|
129
238
|
const COMMA = 188;
|
|
239
|
+
/** @docs-private */
|
|
130
240
|
const DASH = 189; // Firefox (Gecko) fires 173 for DASH/MINUS
|
|
241
|
+
/** @docs-private */
|
|
131
242
|
const PERIOD = 190;
|
|
243
|
+
/** @docs-private */
|
|
132
244
|
const SLASH = 191;
|
|
245
|
+
/** @docs-private */
|
|
133
246
|
const APOSTROPHE = 192;
|
|
247
|
+
/** @docs-private */
|
|
134
248
|
const TILDE = 192;
|
|
249
|
+
/** @docs-private */
|
|
135
250
|
const OPEN_SQUARE_BRACKET = 219;
|
|
251
|
+
/** @docs-private */
|
|
136
252
|
const BACKSLASH = 220;
|
|
253
|
+
/** @docs-private */
|
|
137
254
|
const CLOSE_SQUARE_BRACKET = 221;
|
|
255
|
+
/** @docs-private */
|
|
138
256
|
const SINGLE_QUOTE = 222;
|
|
257
|
+
/** @docs-private */
|
|
139
258
|
const MAC_META = 224;
|
|
259
|
+
/** @docs-private */
|
|
140
260
|
function hasModifierKey(event, ...modifiers) {
|
|
141
261
|
if (modifiers.length) {
|
|
142
262
|
return modifiers.some((modifier) => event[modifier]);
|
|
143
263
|
}
|
|
144
264
|
return event.altKey || event.shiftKey || event.ctrlKey || event.metaKey;
|
|
145
265
|
}
|
|
266
|
+
/** @docs-private */
|
|
146
267
|
function isControl(event) {
|
|
147
268
|
const keyCode = event.keyCode;
|
|
148
269
|
switch (keyCode) {
|
|
@@ -154,41 +275,56 @@ function isControl(event) {
|
|
|
154
275
|
return event.metaKey;
|
|
155
276
|
}
|
|
156
277
|
}
|
|
278
|
+
/** @docs-private */
|
|
157
279
|
function isNumberKey({ keyCode }) {
|
|
158
280
|
return keyCode >= ZERO && keyCode <= NINE;
|
|
159
281
|
}
|
|
282
|
+
/** @docs-private */
|
|
160
283
|
function isNumpadKey({ keyCode }) {
|
|
161
284
|
return keyCode >= NUMPAD_ZERO && keyCode <= NUMPAD_NINE;
|
|
162
285
|
}
|
|
286
|
+
/** @docs-private */
|
|
163
287
|
function isLetterKey({ keyCode }) {
|
|
164
288
|
return keyCode >= A && keyCode <= Z;
|
|
165
289
|
}
|
|
290
|
+
/** @docs-private */
|
|
166
291
|
function isFunctionKey({ keyCode }) {
|
|
167
292
|
return keyCode >= F1 && keyCode <= F12;
|
|
168
293
|
}
|
|
294
|
+
/** @docs-private */
|
|
169
295
|
function isVerticalMovement({ keyCode }) {
|
|
170
296
|
return [UP_ARROW, DOWN_ARROW, PAGE_DOWN, PAGE_UP, HOME, END].includes(keyCode);
|
|
171
297
|
}
|
|
298
|
+
/** @docs-private */
|
|
172
299
|
function isHorizontalMovement({ keyCode }) {
|
|
173
300
|
return [LEFT_ARROW, RIGHT_ARROW, BACKSPACE, DELETE].includes(keyCode);
|
|
174
301
|
}
|
|
302
|
+
/** @docs-private */
|
|
175
303
|
function isSelectAll(event) {
|
|
176
304
|
return (event.ctrlKey || event.metaKey) && event.keyCode === A;
|
|
177
305
|
}
|
|
306
|
+
/** @docs-private */
|
|
178
307
|
function isCopy(event) {
|
|
179
308
|
return (event.ctrlKey || event.metaKey) && event.keyCode === C;
|
|
180
309
|
}
|
|
310
|
+
/** @docs-private */
|
|
181
311
|
function isInput$1(event) {
|
|
182
312
|
const target = _getEventTarget(event);
|
|
183
313
|
return !!target && (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA');
|
|
184
314
|
}
|
|
315
|
+
/** @docs-private */
|
|
185
316
|
function isLeftBracket(event) {
|
|
186
317
|
return event.code === 'BracketLeft';
|
|
187
318
|
}
|
|
319
|
+
/** @docs-private */
|
|
188
320
|
function isRightBracket(event) {
|
|
189
321
|
return event.code === 'BracketRight';
|
|
190
322
|
}
|
|
191
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* @deprecated Use {@link isNumberKey}, which checks the same keys. Will be removed in 22.0.0.
|
|
325
|
+
*
|
|
326
|
+
* @docs-private
|
|
327
|
+
*/
|
|
192
328
|
function isDigit({ keyCode }) {
|
|
193
329
|
return [ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE].includes(keyCode);
|
|
194
330
|
}
|
|
@@ -5217,12 +5353,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
5217
5353
|
}]
|
|
5218
5354
|
}] });
|
|
5219
5355
|
class KbqRelativeLongDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
5220
|
-
transform(value) {
|
|
5221
|
-
return super.transform(value);
|
|
5356
|
+
transform(value, options) {
|
|
5357
|
+
return super.transform(value, options);
|
|
5222
5358
|
}
|
|
5223
|
-
format(value) {
|
|
5359
|
+
format(value, options) {
|
|
5224
5360
|
const date = toValidDate(this.adapter, value);
|
|
5225
|
-
return date ? this.formatter.relativeLongDate(date) : '';
|
|
5361
|
+
return date ? this.formatter.relativeLongDate(date, options) : '';
|
|
5226
5362
|
}
|
|
5227
5363
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqRelativeLongDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5228
5364
|
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqRelativeLongDatePipe, isStandalone: true, name: "kbqRelativeLongDate", pure: false }); }
|
|
@@ -5235,12 +5371,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
5235
5371
|
}]
|
|
5236
5372
|
}] });
|
|
5237
5373
|
class KbqRelativeShortDatePipe extends BaseLocaleAwareFormatterPipe {
|
|
5238
|
-
transform(value) {
|
|
5239
|
-
return super.transform(value);
|
|
5374
|
+
transform(value, options) {
|
|
5375
|
+
return super.transform(value, options);
|
|
5240
5376
|
}
|
|
5241
|
-
format(value) {
|
|
5377
|
+
format(value, options) {
|
|
5242
5378
|
const date = toValidDate(this.adapter, value);
|
|
5243
|
-
return date ? this.formatter.relativeShortDate(date) : '';
|
|
5379
|
+
return date ? this.formatter.relativeShortDate(date, options) : '';
|
|
5244
5380
|
}
|
|
5245
5381
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqRelativeShortDatePipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5246
5382
|
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: KbqRelativeShortDatePipe, isStandalone: true, name: "kbqRelativeShortDate", pure: false }); }
|
|
@@ -6693,7 +6829,7 @@ class KbqOptionActionComponent {
|
|
|
6693
6829
|
/**
|
|
6694
6830
|
* Value of the `disabled` and `aria-disabled` attributes.
|
|
6695
6831
|
*
|
|
6696
|
-
* @
|
|
6832
|
+
* @docs-private
|
|
6697
6833
|
*/
|
|
6698
6834
|
this.disabledAttribute = computed(() => this.disabled() || null, ...(ngDevMode ? [{ debugName: "disabledAttribute" }] : /* istanbul ignore next */ []));
|
|
6699
6835
|
this.hasFocus = false;
|
|
@@ -6892,7 +7028,7 @@ function resolveMultipleMode(value) {
|
|
|
6892
7028
|
if (checkboxAliases.includes(value)) {
|
|
6893
7029
|
return MultipleMode.CHECKBOX;
|
|
6894
7030
|
}
|
|
6895
|
-
if (!singleAliases.includes(value) && (
|
|
7031
|
+
if (!singleAliases.includes(value) && isDevMode()) {
|
|
6896
7032
|
// eslint-disable-next-line no-console
|
|
6897
7033
|
console.warn(`Unsupported \`multiple\` value ${JSON.stringify(value)}, falling back to single selection. ` +
|
|
6898
7034
|
`Expected ${modes.map((mode) => `"${mode}"`).join(', ')}, an empty value or a boolean. ` +
|
|
@@ -6921,7 +7057,7 @@ class KbqPseudoCheckbox extends KbqColorDirective {
|
|
|
6921
7057
|
this.disabled = input(false, ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
6922
7058
|
}
|
|
6923
7059
|
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqPseudoCheckbox, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
6924
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: KbqPseudoCheckbox, isStandalone: true, selector: "kbq-pseudo-checkbox", inputs: { big: { classPropertyName: "big", publicName: "big", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-pseudo-checkbox_big": "big()", "class.kbq-indeterminate": "state() === \"indeterminate\"", "class.kbq-checked": "state() === true || state() === \"checked\"", "class.kbq-disabled": "disabled()" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n<i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;width:var(--kbq-checkbox-size-normal-width);height:var(--kbq-checkbox-size-normal-width);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;border-radius:var(--kbq-checkbox-size-normal-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-normal-border-radius) * 1.85,var(--kbq-checkbox-size-normal-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-normal-border-radius) * 2)}}.kbq-pseudo-checkbox{cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width);height:var(--kbq-checkbox-size-big-width);border-width:var(--kbq-checkbox-size-big-border-width);border-radius:var(--kbq-checkbox-size-big-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-big-border-radius) * 1.85,var(--kbq-checkbox-size-big-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-big-border-radius) * 2)}}.kbq-pseudo-checkbox{border-color:var(--kbq-checkbox-theme-default-border);background:var(--kbq-checkbox-theme-default-background)}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-pseudo-checkbox.kbq-checked,.kbq-pseudo-checkbox.kbq-indeterminate{border-color:var(--kbq-checkbox-theme-states-checked-border);background:var(--kbq-checkbox-theme-states-checked-background)}.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-pseudo-checkbox.kbq-disabled{border-color:var(--kbq-checkbox-theme-states-disabled-border);background:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-pseudo-checkbox.kbq-error{border-color:var(--kbq-checkbox-error-default-border);background:var(--kbq-checkbox-error-default-background)}.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-pseudo-checkbox.kbq-error.kbq-checked,.kbq-pseudo-checkbox.kbq-error.kbq-indeterminate{border-color:var(--kbq-checkbox-error-states-checked-border);background:var(--kbq-checkbox-error-states-checked-background)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled{border-color:var(--kbq-checkbox-error-states-disabled-border);background:var(--kbq-checkbox-error-states-disabled-background)}\n", ".kbq-pseudo-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-
|
|
7060
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: KbqPseudoCheckbox, isStandalone: true, selector: "kbq-pseudo-checkbox", inputs: { big: { classPropertyName: "big", publicName: "big", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.kbq-pseudo-checkbox_big": "big()", "class.kbq-indeterminate": "state() === \"indeterminate\"", "class.kbq-checked": "state() === true || state() === \"checked\"", "class.kbq-disabled": "disabled()" }, classAttribute: "kbq-pseudo-checkbox" }, usesInheritance: true, ngImport: i0, template: "<i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n<i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;width:var(--kbq-checkbox-size-normal-width);height:var(--kbq-checkbox-size-normal-width);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;border-radius:var(--kbq-checkbox-size-normal-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-normal-border-radius) * 1.85,var(--kbq-checkbox-size-normal-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-normal-border-radius) * 2)}}.kbq-pseudo-checkbox{cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width);height:var(--kbq-checkbox-size-big-width);border-width:var(--kbq-checkbox-size-big-border-width);border-radius:var(--kbq-checkbox-size-big-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-big-border-radius) * 1.85,var(--kbq-checkbox-size-big-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-big-border-radius) * 2)}}.kbq-pseudo-checkbox{border-color:var(--kbq-checkbox-theme-default-border);background:var(--kbq-checkbox-theme-default-background)}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-pseudo-checkbox.kbq-checked,.kbq-pseudo-checkbox.kbq-indeterminate{border-color:var(--kbq-checkbox-theme-states-checked-border);background:var(--kbq-checkbox-theme-states-checked-background)}.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-pseudo-checkbox.kbq-disabled{border-color:var(--kbq-checkbox-theme-states-disabled-border);background:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-pseudo-checkbox.kbq-error{border-color:var(--kbq-checkbox-error-default-border);background:var(--kbq-checkbox-error-default-background)}.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-pseudo-checkbox.kbq-error.kbq-checked,.kbq-pseudo-checkbox.kbq-error.kbq-indeterminate{border-color:var(--kbq-checkbox-error-states-checked-border);background:var(--kbq-checkbox-error-states-checked-background)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled{border-color:var(--kbq-checkbox-error-states-disabled-border);background:var(--kbq-checkbox-error-states-disabled-background)}\n", ".kbq-pseudo-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
6925
7061
|
}
|
|
6926
7062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: KbqPseudoCheckbox, decorators: [{
|
|
6927
7063
|
type: Component,
|
|
@@ -6931,7 +7067,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImpo
|
|
|
6931
7067
|
'[class.kbq-indeterminate]': 'state() === "indeterminate"',
|
|
6932
7068
|
'[class.kbq-checked]': 'state() === true || state() === "checked"',
|
|
6933
7069
|
'[class.kbq-disabled]': 'disabled()'
|
|
6934
|
-
}, preserveWhitespaces: false, template: "<i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n<i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;width:var(--kbq-checkbox-size-normal-width);height:var(--kbq-checkbox-size-normal-width);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;border-radius:var(--kbq-checkbox-size-normal-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-normal-border-radius) * 1.85,var(--kbq-checkbox-size-normal-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-normal-border-radius) * 2)}}.kbq-pseudo-checkbox{cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width);height:var(--kbq-checkbox-size-big-width);border-width:var(--kbq-checkbox-size-big-border-width);border-radius:var(--kbq-checkbox-size-big-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-big-border-radius) * 1.85,var(--kbq-checkbox-size-big-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-big-border-radius) * 2)}}.kbq-pseudo-checkbox{border-color:var(--kbq-checkbox-theme-default-border);background:var(--kbq-checkbox-theme-default-background)}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-pseudo-checkbox.kbq-checked,.kbq-pseudo-checkbox.kbq-indeterminate{border-color:var(--kbq-checkbox-theme-states-checked-border);background:var(--kbq-checkbox-theme-states-checked-background)}.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-pseudo-checkbox.kbq-disabled{border-color:var(--kbq-checkbox-theme-states-disabled-border);background:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-pseudo-checkbox.kbq-error{border-color:var(--kbq-checkbox-error-default-border);background:var(--kbq-checkbox-error-default-background)}.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-pseudo-checkbox.kbq-error.kbq-checked,.kbq-pseudo-checkbox.kbq-error.kbq-indeterminate{border-color:var(--kbq-checkbox-error-states-checked-border);background:var(--kbq-checkbox-error-states-checked-background)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled{border-color:var(--kbq-checkbox-error-states-disabled-border);background:var(--kbq-checkbox-error-states-disabled-background)}\n", ".kbq-pseudo-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-
|
|
7070
|
+
}, preserveWhitespaces: false, template: "<i class=\"kbq-checkbox-checkmark kbq kbq-check-s_16\"></i>\n<i class=\"kbq-checkbox-mixedmark kbq kbq-minus-s_16\"></i>\n", styles: [".kbq-pseudo-checkbox{position:relative;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;width:var(--kbq-checkbox-size-normal-width);height:var(--kbq-checkbox-size-normal-width);border-width:var(--kbq-checkbox-size-normal-border-width);border-style:solid;border-radius:var(--kbq-checkbox-size-normal-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-normal-border-radius) * 1.85,var(--kbq-checkbox-size-normal-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-normal-border-radius) * 2)}}.kbq-pseudo-checkbox{cursor:pointer;vertical-align:middle;flex-shrink:0}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{display:none}.kbq-pseudo-checkbox.kbq-checked .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-indeterminate .kbq-checkbox-mixedmark{display:inline-block}.kbq-pseudo-checkbox.kbq-disabled{cursor:default}.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{width:var(--kbq-checkbox-size-big-width);height:var(--kbq-checkbox-size-big-width);border-width:var(--kbq-checkbox-size-big-border-width);border-radius:var(--kbq-checkbox-size-big-border-radius)}@supports (corner-shape: squircle){.kbq-pseudo-checkbox.kbq-pseudo-checkbox_big{corner-shape:squircle;border-radius:clamp(var(--kbq-checkbox-size-big-border-radius) * 1.85,var(--kbq-checkbox-size-big-border-radius) * 2.3 - 3.6px,var(--kbq-checkbox-size-big-border-radius) * 2)}}.kbq-pseudo-checkbox{border-color:var(--kbq-checkbox-theme-default-border);background:var(--kbq-checkbox-theme-default-background)}.kbq-pseudo-checkbox .kbq-checkbox-checkmark,.kbq-pseudo-checkbox .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-default-color)}.kbq-pseudo-checkbox.kbq-checked,.kbq-pseudo-checkbox.kbq-indeterminate{border-color:var(--kbq-checkbox-theme-states-checked-border);background:var(--kbq-checkbox-theme-states-checked-background)}.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-theme-states-disabled-color)}.kbq-pseudo-checkbox.kbq-disabled{border-color:var(--kbq-checkbox-theme-states-disabled-border);background:var(--kbq-checkbox-theme-states-disabled-background)}.kbq-pseudo-checkbox.kbq-error{border-color:var(--kbq-checkbox-error-default-border);background:var(--kbq-checkbox-error-default-background)}.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-default-color)}.kbq-pseudo-checkbox.kbq-error.kbq-checked,.kbq-pseudo-checkbox.kbq-error.kbq-indeterminate{border-color:var(--kbq-checkbox-error-states-checked-border);background:var(--kbq-checkbox-error-states-checked-background)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-checkmark,.kbq-pseudo-checkbox.kbq-error.kbq-disabled .kbq-checkbox-mixedmark{color:var(--kbq-checkbox-error-states-disabled-color)}.kbq-pseudo-checkbox.kbq-error.kbq-disabled{border-color:var(--kbq-checkbox-error-states-disabled-border);background:var(--kbq-checkbox-error-states-disabled-background)}\n", ".kbq-pseudo-checkbox{--kbq-checkbox-size-normal-width: var(--kbq-size-l);--kbq-checkbox-size-normal-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-normal-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-normal-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-normal-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-normal-top: var(--kbq-size-3xs);--kbq-checkbox-size-big-width: var(--kbq-size-l);--kbq-checkbox-size-big-border-width: var(--kbq-size-border-width);--kbq-checkbox-size-big-border-radius: var(--kbq-size-xxs);--kbq-checkbox-size-big-horizontal-content-padding: var(--kbq-size-s);--kbq-checkbox-size-big-vertical-content-padding: var(--kbq-size-3xs);--kbq-checkbox-size-big-top: var(--kbq-size-xxs);--kbq-checkbox-theme-default-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-default-color: var(--kbq-icon-white);--kbq-checkbox-theme-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-theme-default-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-hover-border: var(--kbq-line-contrast-fade);--kbq-checkbox-theme-states-hover-background: var(--kbq-states-background-transparent-hover);--kbq-checkbox-theme-states-checked-border: transparent;--kbq-checkbox-theme-states-checked-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-hover-border: transparent;--kbq-checkbox-theme-states-checked-hover-background: var(--kbq-states-background-theme-hover);--kbq-checkbox-theme-states-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-focused-background: var(--kbq-background-bg);--kbq-checkbox-theme-states-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-border: var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-checked-focused-background: var(--kbq-background-theme);--kbq-checkbox-theme-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-theme);--kbq-checkbox-theme-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-theme-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-theme-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-theme-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-theme-states-disabled-caption: var(--kbq-states-icon-disabled);--kbq-checkbox-error-default-border: var(--kbq-line-error);--kbq-checkbox-error-default-color: var(--kbq-icon-white);--kbq-checkbox-error-default-text: var(--kbq-foreground-contrast);--kbq-checkbox-error-default-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-hover-border: var(--kbq-line-error);--kbq-checkbox-error-states-hover-background: var(--kbq-states-background-error-fade-hover);--kbq-checkbox-error-states-checked-border: transparent;--kbq-checkbox-error-states-checked-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-hover-border: transparent;--kbq-checkbox-error-states-checked-hover-background: var(--kbq-states-background-error-hover);--kbq-checkbox-error-states-focused-border: var(--kbq-line-error);--kbq-checkbox-error-states-focused-background: var(--kbq-background-error-less);--kbq-checkbox-error-states-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-border: var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-checked-focused-background: var(--kbq-background-error);--kbq-checkbox-error-states-checked-focused-outline: 1px solid var(--kbq-states-line-focus-error);--kbq-checkbox-error-states-disabled-border: var(--kbq-states-line-disabled);--kbq-checkbox-error-states-disabled-color: var(--kbq-states-icon-disabled);--kbq-checkbox-error-states-disabled-text: var(--kbq-states-foreground-disabled);--kbq-checkbox-error-states-disabled-background: var(--kbq-states-background-disabled);--kbq-checkbox-error-states-disabled-caption: var(--kbq-states-icon-disabled)}\n"] }]
|
|
6935
7071
|
}], propDecorators: { big: [{ type: i0.Input, args: [{ isSignal: true, alias: "big", required: false }] }], state: [{ type: i0.Input, args: [{ isSignal: true, alias: "state", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
6936
7072
|
|
|
6937
7073
|
class KbqPseudoCheckboxModule {
|
|
@@ -7127,7 +7263,7 @@ class KbqOption extends KbqOptionBase {
|
|
|
7127
7263
|
/**
|
|
7128
7264
|
* Value of `aria-disabled`: the same as `disabled`, but a signal of its own, since `kbq-disabled` reads that one.
|
|
7129
7265
|
*
|
|
7130
|
-
* @
|
|
7266
|
+
* @docs-private
|
|
7131
7267
|
*/
|
|
7132
7268
|
this.ariaDisabled = computed(() => this.disabled, ...(ngDevMode ? [{ debugName: "ariaDisabled" }] : /* istanbul ignore next */ []));
|
|
7133
7269
|
this.tabIndex = computed(() => (this.disabled ? '-1' : '0'), ...(ngDevMode ? [{ debugName: "tabIndex" }] : /* istanbul ignore next */ []));
|
|
@@ -7796,7 +7932,7 @@ class KbqOverlayLayer {
|
|
|
7796
7932
|
this.registry = inject(KbqOverlayLayerRegistry);
|
|
7797
7933
|
this.document = inject(DOCUMENT);
|
|
7798
7934
|
this.container = null;
|
|
7799
|
-
/** @
|
|
7935
|
+
/** @docs-private */
|
|
7800
7936
|
this.host = kbqInjectNativeElement();
|
|
7801
7937
|
this.registry.register(this);
|
|
7802
7938
|
}
|
|
@@ -7809,7 +7945,7 @@ class KbqOverlayLayer {
|
|
|
7809
7945
|
* Created with the first panel, so an element that never opens one is left untouched. Lives inside the host to
|
|
7810
7946
|
* share its stacking context with a bar rendered in the same scrolling viewport.
|
|
7811
7947
|
*
|
|
7812
|
-
* @
|
|
7948
|
+
* @docs-private
|
|
7813
7949
|
*/
|
|
7814
7950
|
getContainerElement() {
|
|
7815
7951
|
if (!this.container) {
|
|
@@ -7852,16 +7988,18 @@ const kbqIsElementOrigin = (origin) => origin instanceof CdkOverlayOrigin ||
|
|
|
7852
7988
|
!!origin.nativeElement ||
|
|
7853
7989
|
'getBoundingClientRect' in origin;
|
|
7854
7990
|
/** Resolves a Koobiq origin into the value a connected position strategy accepts. */
|
|
7855
|
-
const kbqResolveOverlayOrigin = (origin) => origin instanceof CdkOverlayOrigin ? origin.elementRef : origin;
|
|
7856
|
-
/**
|
|
7991
|
+
const kbqResolveOverlayOrigin = (origin) => (origin instanceof CdkOverlayOrigin ? origin.elementRef : origin);
|
|
7992
|
+
/** Rectangle of an overlay origin in viewport coordinates, for measurements and arrow alignment. */
|
|
7857
7993
|
const kbqGetOverlayOriginSize = (origin) => {
|
|
7858
7994
|
const resolved = kbqResolveOverlayOrigin(origin);
|
|
7859
7995
|
const element = resolved.nativeElement ?? resolved;
|
|
7860
7996
|
// Duck typing rather than `instanceof Element`, which is not defined on the server.
|
|
7861
|
-
if ('getBoundingClientRect' in element)
|
|
7862
|
-
|
|
7863
|
-
|
|
7864
|
-
|
|
7997
|
+
if ('getBoundingClientRect' in element) {
|
|
7998
|
+
const { left, top, width, height } = element.getBoundingClientRect();
|
|
7999
|
+
return { x: left, y: top, width, height };
|
|
8000
|
+
}
|
|
8001
|
+
const { x, y, width = 0, height = 0 } = element;
|
|
8002
|
+
return { x, y, width, height };
|
|
7865
8003
|
};
|
|
7866
8004
|
|
|
7867
8005
|
/** @internal */
|
|
@@ -8413,7 +8551,7 @@ class KbqShadowDomOverlayContainer extends OverlayContainer {
|
|
|
8413
8551
|
/**
|
|
8414
8552
|
* CDK lifecycle hook — overridden to relocate the container into a shadow root.
|
|
8415
8553
|
*
|
|
8416
|
-
* @
|
|
8554
|
+
* @docs-private
|
|
8417
8555
|
*/
|
|
8418
8556
|
_createContainer() {
|
|
8419
8557
|
// Let CDK create the container (and run its test-environment cleanup). It is appended to `document.body`.
|
|
@@ -8620,6 +8758,43 @@ class EmptyFocusTrapStrategy {
|
|
|
8620
8758
|
allowFocus() { }
|
|
8621
8759
|
}
|
|
8622
8760
|
|
|
8761
|
+
/**
|
|
8762
|
+
* Calculates the translation that points a pop-up arrow at a viewport point, clamped to the panel's arrow inset.
|
|
8763
|
+
*
|
|
8764
|
+
* @param placement - Resolved CSS placement of the panel.
|
|
8765
|
+
* @param panelRect - Panel rectangle in viewport coordinates.
|
|
8766
|
+
* @param point - Target point in viewport coordinates.
|
|
8767
|
+
* @param arrowCenterInset - Distance from a panel edge to the arrow center, in pixels.
|
|
8768
|
+
*/
|
|
8769
|
+
const kbqGetPopUpArrowShift = (placement, panelRect, point, arrowCenterInset) => {
|
|
8770
|
+
const horizontal = placement === 'top' ||
|
|
8771
|
+
placement === 'bottom' ||
|
|
8772
|
+
placement.startsWith('top-') ||
|
|
8773
|
+
placement.startsWith('bottom-');
|
|
8774
|
+
const vertical = placement === 'left' ||
|
|
8775
|
+
placement === 'right' ||
|
|
8776
|
+
placement.startsWith('left-') ||
|
|
8777
|
+
placement.startsWith('right-');
|
|
8778
|
+
if (!horizontal && !vertical)
|
|
8779
|
+
return { x: 0, y: 0 };
|
|
8780
|
+
const axis = horizontal ? 'x' : 'y';
|
|
8781
|
+
const panelStart = horizontal ? panelRect.left : panelRect.top;
|
|
8782
|
+
const panelEnd = horizontal ? panelRect.right : panelRect.bottom;
|
|
8783
|
+
const panelCenter = (panelStart + panelEnd) / 2;
|
|
8784
|
+
const alignedToStart = horizontal ? placement.endsWith('-left') : placement.endsWith('-top');
|
|
8785
|
+
const alignedToEnd = horizontal ? placement.endsWith('-right') : placement.endsWith('-bottom');
|
|
8786
|
+
const defaultCenter = alignedToStart
|
|
8787
|
+
? panelStart + arrowCenterInset
|
|
8788
|
+
: alignedToEnd
|
|
8789
|
+
? panelEnd - arrowCenterInset
|
|
8790
|
+
: panelCenter;
|
|
8791
|
+
const min = panelStart + arrowCenterInset;
|
|
8792
|
+
const max = panelEnd - arrowCenterInset;
|
|
8793
|
+
const pointCenter = min > max ? panelCenter : Math.min(Math.max(point[axis], min), max);
|
|
8794
|
+
const shift = pointCenter - defaultCenter;
|
|
8795
|
+
return { x: horizontal ? shift : 0, y: vertical ? shift : 0 };
|
|
8796
|
+
};
|
|
8797
|
+
|
|
8623
8798
|
class KbqPopUp {
|
|
8624
8799
|
constructor() {
|
|
8625
8800
|
this.renderer = inject(Renderer2);
|
|
@@ -8637,6 +8812,12 @@ class KbqPopUp {
|
|
|
8637
8812
|
/** Whether the pointer is over the pop-up. */
|
|
8638
8813
|
this.hovered = this.hoveredState.asReadonly();
|
|
8639
8814
|
this.classMapState = signal({}, ...(ngDevMode ? [{ debugName: "classMapState" }] : /* istanbul ignore next */ []));
|
|
8815
|
+
/** Whether the arrow points at the origin center while the panel keeps its placement. Defaults to `false`. */
|
|
8816
|
+
this.arrowCentered = false;
|
|
8817
|
+
/** Distance from a panel edge to the arrow center, in pixels. Defaults to `0`. */
|
|
8818
|
+
this.arrowCenterInset = 0;
|
|
8819
|
+
this.resolvedPlacement = 'top';
|
|
8820
|
+
this.appliedArrowShift = null;
|
|
8640
8821
|
this.visibilityState = signal(PopUpVisibility.Initial, ...(ngDevMode ? [{ debugName: "visibilityState" }] : /* istanbul ignore next */ []));
|
|
8641
8822
|
this.visibleChange = new EventEmitter();
|
|
8642
8823
|
/** Subject for notifying that the tooltip has been hidden from the view */
|
|
@@ -8728,6 +8909,7 @@ class KbqPopUp {
|
|
|
8728
8909
|
return this.visibility === PopUpVisibility.Visible;
|
|
8729
8910
|
}
|
|
8730
8911
|
updateClassMap(placement, customClass, classMap) {
|
|
8912
|
+
this.resolvedPlacement = placement;
|
|
8731
8913
|
// `customClass` may be a whitespace-separated list of class names; expand it into
|
|
8732
8914
|
// individual keys so the native `[class]` binding (which doesn't tokenise object keys)
|
|
8733
8915
|
// applies each class correctly.
|
|
@@ -8754,6 +8936,57 @@ class KbqPopUp {
|
|
|
8754
8936
|
detectChanges() {
|
|
8755
8937
|
this.changeDetectorRef.detectChanges();
|
|
8756
8938
|
}
|
|
8939
|
+
/** Updates arrow geometry after the connected overlay applies a position. @docs-private */
|
|
8940
|
+
updateArrowPosition() {
|
|
8941
|
+
const element = this.elementRef?.nativeElement;
|
|
8942
|
+
if (!element)
|
|
8943
|
+
return;
|
|
8944
|
+
const point = this.trigger?.getArrowPoint();
|
|
8945
|
+
if (!point || !this.arrow || this.trigger.stickToWindow) {
|
|
8946
|
+
this.resetArrowShift();
|
|
8947
|
+
return;
|
|
8948
|
+
}
|
|
8949
|
+
const panelRect = this.getPanelViewportRect(element);
|
|
8950
|
+
// Not laid out (detached or `display: none`): a stale shift is as wrong as a made-up one.
|
|
8951
|
+
if (!panelRect) {
|
|
8952
|
+
this.resetArrowShift();
|
|
8953
|
+
return;
|
|
8954
|
+
}
|
|
8955
|
+
const shift = kbqGetPopUpArrowShift(this.resolvedPlacement, panelRect, point, this.arrowCenterInset);
|
|
8956
|
+
const nextShift = { x: `${shift.x}px`, y: `${shift.y}px` };
|
|
8957
|
+
if (this.appliedArrowShift?.x === nextShift.x && this.appliedArrowShift.y === nextShift.y)
|
|
8958
|
+
return;
|
|
8959
|
+
this.renderer.setStyle(element, `--${this.prefix}-arrow-shift-x`, nextShift.x, RendererStyleFlags2.DashCase);
|
|
8960
|
+
this.renderer.setStyle(element, `--${this.prefix}-arrow-shift-y`, nextShift.y, RendererStyleFlags2.DashCase);
|
|
8961
|
+
this.appliedArrowShift = nextShift;
|
|
8962
|
+
}
|
|
8963
|
+
/**
|
|
8964
|
+
* Border box of the panel in viewport coordinates. `getBoundingClientRect` reflects the entrance
|
|
8965
|
+
* `scale(...)` transform — an empty box at `scale(0)` — while the `offset*` reads describe the laid-out
|
|
8966
|
+
* panel regardless of transforms; measuring the transformed box makes the arrow jump whenever this runs
|
|
8967
|
+
* between attach and the end of the show animation.
|
|
8968
|
+
*/
|
|
8969
|
+
getPanelViewportRect(element) {
|
|
8970
|
+
const { offsetWidth, offsetHeight } = element;
|
|
8971
|
+
if (!offsetWidth || !offsetHeight)
|
|
8972
|
+
return null;
|
|
8973
|
+
const offsetParent = element.offsetParent;
|
|
8974
|
+
if (!offsetParent)
|
|
8975
|
+
return null;
|
|
8976
|
+
const parentRect = offsetParent.getBoundingClientRect();
|
|
8977
|
+
return new DOMRect(parentRect.left + element.offsetLeft, parentRect.top + element.offsetTop, offsetWidth, offsetHeight);
|
|
8978
|
+
}
|
|
8979
|
+
/** Removes the arrow shift written earlier, if any. */
|
|
8980
|
+
resetArrowShift() {
|
|
8981
|
+
if (!this.appliedArrowShift)
|
|
8982
|
+
return;
|
|
8983
|
+
const element = this.elementRef?.nativeElement;
|
|
8984
|
+
if (!element)
|
|
8985
|
+
return;
|
|
8986
|
+
this.renderer.removeStyle(element, `--${this.prefix}-arrow-shift-x`, RendererStyleFlags2.DashCase);
|
|
8987
|
+
this.renderer.removeStyle(element, `--${this.prefix}-arrow-shift-y`, RendererStyleFlags2.DashCase);
|
|
8988
|
+
this.appliedArrowShift = null;
|
|
8989
|
+
}
|
|
8757
8990
|
/**
|
|
8758
8991
|
* Called once the pop-up has animated in. Only the entrance animates: `hide()` emits `onHideSubject`
|
|
8759
8992
|
* synchronously and `KbqPopUpTrigger` detaches the overlay in the same call stack.
|
|
@@ -8965,6 +9198,8 @@ class KbqPopUpTrigger {
|
|
|
8965
9198
|
* @docs-private
|
|
8966
9199
|
*/
|
|
8967
9200
|
this.leaveDelay = 0;
|
|
9201
|
+
/** Whether the arrow points at the origin center while the panel keeps its placement. Defaults to `false`. */
|
|
9202
|
+
this.arrowCentered = false;
|
|
8968
9203
|
/**
|
|
8969
9204
|
* Current resolved placement of the pop-up.
|
|
8970
9205
|
*
|
|
@@ -9003,6 +9238,8 @@ class KbqPopUpTrigger {
|
|
|
9003
9238
|
* @docs-private
|
|
9004
9239
|
*/
|
|
9005
9240
|
this.origin = null;
|
|
9241
|
+
/** Origin currently applied to the position strategy; `null` follows the configured origin or host. */
|
|
9242
|
+
this.activeOrigin = null;
|
|
9006
9243
|
/**
|
|
9007
9244
|
* Hide pop-up with timeout. Need if you want to show pop-up after leaving trigger
|
|
9008
9245
|
*
|
|
@@ -9068,6 +9305,7 @@ class KbqPopUpTrigger {
|
|
|
9068
9305
|
// `stickToWindow` pop-up on its window edge. No-op when `stickToWindow` is unset.
|
|
9069
9306
|
this.instance.setStickPosition();
|
|
9070
9307
|
this.instance.detectChanges();
|
|
9308
|
+
this.instance.updateArrowPosition();
|
|
9071
9309
|
};
|
|
9072
9310
|
/** Binds a single event listener to the pop-up's native element. */
|
|
9073
9311
|
this.addEventListener = (listener, event) => {
|
|
@@ -9273,7 +9511,7 @@ class KbqPopUpTrigger {
|
|
|
9273
9511
|
* Re-evaluates the delayed hide of `hideWithTimeout` after the pointer has entered or left the trigger or the
|
|
9274
9512
|
* pop-up. Called by the pop-up, a separate class.
|
|
9275
9513
|
*
|
|
9276
|
-
* @
|
|
9514
|
+
* @docs-private
|
|
9277
9515
|
*/
|
|
9278
9516
|
handleHoverChange() {
|
|
9279
9517
|
if (!this.hoverHideArmed)
|
|
@@ -9313,7 +9551,7 @@ class KbqPopUpTrigger {
|
|
|
9313
9551
|
// Create connected position strategy that listens for scroll events to reposition.
|
|
9314
9552
|
this.strategy = this.overlay
|
|
9315
9553
|
.position()
|
|
9316
|
-
.flexibleConnectedTo(this.
|
|
9554
|
+
.flexibleConnectedTo(this.getActiveOrigin())
|
|
9317
9555
|
.withTransformOriginOn(this.originSelector)
|
|
9318
9556
|
.withFlexibleDimensions(false)
|
|
9319
9557
|
.withPositions([...EXTENDED_OVERLAY_POSITIONS])
|
|
@@ -9335,7 +9573,7 @@ class KbqPopUpTrigger {
|
|
|
9335
9573
|
* @docs-private
|
|
9336
9574
|
*/
|
|
9337
9575
|
resetOrigin() {
|
|
9338
|
-
this.
|
|
9576
|
+
this.setOrigin(null);
|
|
9339
9577
|
}
|
|
9340
9578
|
/**
|
|
9341
9579
|
* Positions the pop-up against `origin` — an element, or a rectangle in viewport coordinates such as the one
|
|
@@ -9347,12 +9585,10 @@ class KbqPopUpTrigger {
|
|
|
9347
9585
|
*/
|
|
9348
9586
|
updateOrigin(origin) {
|
|
9349
9587
|
this.origin = origin;
|
|
9350
|
-
if (!this.strategy)
|
|
9351
|
-
return;
|
|
9352
9588
|
// Told to the strategy even while the pop-up is closed: the overlay is created once and reused, so an
|
|
9353
9589
|
// origin bound between two opens would otherwise never reach it.
|
|
9354
|
-
this.
|
|
9355
|
-
if (!this.overlayRef?.hasAttached())
|
|
9590
|
+
this.setOrigin(this.getResolvedOrigin());
|
|
9591
|
+
if (!this.strategy || !this.overlayRef?.hasAttached())
|
|
9356
9592
|
return;
|
|
9357
9593
|
// Through `updatePosition()`, because the new positions it applies clear the position locked in by
|
|
9358
9594
|
// `withLockedPosition()`. Re-applying the last position instead would keep the pop-up on the placement
|
|
@@ -9360,6 +9596,21 @@ class KbqPopUpTrigger {
|
|
|
9360
9596
|
this.updatePosition();
|
|
9361
9597
|
this.overlayRef.updatePosition();
|
|
9362
9598
|
}
|
|
9599
|
+
/** Sets and records the origin applied to the position strategy. @docs-private */
|
|
9600
|
+
setOrigin(origin) {
|
|
9601
|
+
this.activeOrigin = origin;
|
|
9602
|
+
if (this.strategy) {
|
|
9603
|
+
this.strategy.setOrigin(origin ?? this.getResolvedOrigin());
|
|
9604
|
+
}
|
|
9605
|
+
}
|
|
9606
|
+
/**
|
|
9607
|
+
* The origin currently applied to the position strategy, or the configured origin while none was set.
|
|
9608
|
+
*
|
|
9609
|
+
* @docs-private
|
|
9610
|
+
*/
|
|
9611
|
+
getActiveOrigin() {
|
|
9612
|
+
return this.activeOrigin ?? this.getResolvedOrigin();
|
|
9613
|
+
}
|
|
9363
9614
|
/**
|
|
9364
9615
|
* The origin the position strategy is connected to.
|
|
9365
9616
|
*
|
|
@@ -9390,7 +9641,10 @@ class KbqPopUpTrigger {
|
|
|
9390
9641
|
}
|
|
9391
9642
|
if (this.trigger.includes(PopUpTriggers.Keydown)) {
|
|
9392
9643
|
this.listeners.set('keydown', (event) => {
|
|
9393
|
-
|
|
9644
|
+
// With a click listener, a native button activates itself for Enter/Space. Opening here as well
|
|
9645
|
+
// can make CDK treat that click as outside the panel that the timer just opened and close it again.
|
|
9646
|
+
const opensNatively = this.getNativeElement().tagName === 'BUTTON' && this.trigger.includes(PopUpTriggers.Click);
|
|
9647
|
+
if (event instanceof KeyboardEvent && [ENTER, SPACE].includes(event.keyCode) && !opensNatively) {
|
|
9394
9648
|
// Recorded the way `createListener` does it for every other trigger. Without it the show
|
|
9395
9649
|
// is still attributed to whichever event ran last, and a stale `focus` there makes the
|
|
9396
9650
|
// tooltip's keyboard-origin gate swallow the show outright. The event itself carries the
|
|
@@ -9456,6 +9710,15 @@ class KbqPopUpTrigger {
|
|
|
9456
9710
|
getNativeElement() {
|
|
9457
9711
|
return this.externalNativeElement || this.elementRef.nativeElement;
|
|
9458
9712
|
}
|
|
9713
|
+
/** Point the arrow should follow, or `null` when trigger-centered arrows are disabled. @docs-private */
|
|
9714
|
+
getArrowPoint() {
|
|
9715
|
+
return this.arrowCentered ? this.getOriginCenter() : null;
|
|
9716
|
+
}
|
|
9717
|
+
/** Center of the active origin in viewport coordinates. @docs-private */
|
|
9718
|
+
getOriginCenter() {
|
|
9719
|
+
const { x, y, width, height } = kbqGetOverlayOriginSize(this.getActiveOrigin());
|
|
9720
|
+
return { x: x + width / 2, y: y + height / 2 };
|
|
9721
|
+
}
|
|
9459
9722
|
/**
|
|
9460
9723
|
* Sets an external element to anchor and measure the pop-up against instead of the host element.
|
|
9461
9724
|
*
|
|
@@ -9485,12 +9748,12 @@ class KbqPopUpTrigger {
|
|
|
9485
9748
|
}
|
|
9486
9749
|
/**
|
|
9487
9750
|
* Size of what the pop-up is positioned against: a corner placement shifts the pop-up so that its arrow still
|
|
9488
|
-
* points at an anchor narrower than the arrow's inset. The
|
|
9751
|
+
* points at an anchor narrower than the arrow's inset. The active origin by default.
|
|
9489
9752
|
*
|
|
9490
9753
|
* @docs-private
|
|
9491
9754
|
*/
|
|
9492
9755
|
getAnchorSize() {
|
|
9493
|
-
return
|
|
9756
|
+
return kbqGetOverlayOriginSize(this.getActiveOrigin());
|
|
9494
9757
|
}
|
|
9495
9758
|
/**
|
|
9496
9759
|
* Maps a priority placement value (or array of values) to the matching connected position pairs.
|
|
@@ -9549,9 +9812,9 @@ class KbqPopUpTrigger {
|
|
|
9549
9812
|
}
|
|
9550
9813
|
];
|
|
9551
9814
|
}
|
|
9552
|
-
/** Remembers the last mouse event
|
|
9815
|
+
/** Remembers the last mouse event used for cursor-relative positioning. */
|
|
9553
9816
|
saveMouseEvent(event) {
|
|
9554
|
-
if (this.triggerName === 'mouseenter') {
|
|
9817
|
+
if (this.triggerName === 'mouseenter' || this.triggerName === 'click') {
|
|
9555
9818
|
this.mouseEvent = event;
|
|
9556
9819
|
}
|
|
9557
9820
|
}
|
|
@@ -11443,7 +11706,7 @@ const validationTooltipShowDelay = 10;
|
|
|
11443
11706
|
*/
|
|
11444
11707
|
const validationTooltipHideDelay = 3000;
|
|
11445
11708
|
|
|
11446
|
-
const VERSION = new Version('21.0
|
|
11709
|
+
const VERSION = new Version('21.1.0+sha-a4febdd');
|
|
11447
11710
|
|
|
11448
11711
|
/**
|
|
11449
11712
|
* Generated bundle index. Do not edit.
|