@koobiq/components 20.3.1 → 20.3.2

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.
Files changed (92) hide show
  1. package/accordion/accordion.scss +4 -1
  2. package/accordion/index.d.ts +36 -12
  3. package/alert/index.d.ts +8 -0
  4. package/breadcrumbs/index.d.ts +2 -0
  5. package/button-toggle/button-toggle-tokens.scss +14 -0
  6. package/button-toggle/button-toggle.scss +75 -3
  7. package/core/index.d.ts +33 -1
  8. package/core/styles/common/_select.scss +98 -3
  9. package/core/styles/typography/_typography.scss +8 -0
  10. package/ellipsis-center/index.d.ts +35 -2
  11. package/fesm2022/koobiq-components-accordion.mjs +143 -44
  12. package/fesm2022/koobiq-components-accordion.mjs.map +1 -1
  13. package/fesm2022/koobiq-components-alert.mjs +17 -1
  14. package/fesm2022/koobiq-components-alert.mjs.map +1 -1
  15. package/fesm2022/koobiq-components-autocomplete.mjs +2 -2
  16. package/fesm2022/koobiq-components-autocomplete.mjs.map +1 -1
  17. package/fesm2022/koobiq-components-breadcrumbs.mjs +8 -3
  18. package/fesm2022/koobiq-components-breadcrumbs.mjs.map +1 -1
  19. package/fesm2022/koobiq-components-button-toggle.mjs +2 -2
  20. package/fesm2022/koobiq-components-button-toggle.mjs.map +1 -1
  21. package/fesm2022/koobiq-components-code-block.mjs +10 -5
  22. package/fesm2022/koobiq-components-code-block.mjs.map +1 -1
  23. package/fesm2022/koobiq-components-core.mjs +43 -5
  24. package/fesm2022/koobiq-components-core.mjs.map +1 -1
  25. package/fesm2022/koobiq-components-dropdown.mjs +2 -2
  26. package/fesm2022/koobiq-components-dropdown.mjs.map +1 -1
  27. package/fesm2022/koobiq-components-ellipsis-center.mjs +77 -22
  28. package/fesm2022/koobiq-components-ellipsis-center.mjs.map +1 -1
  29. package/fesm2022/koobiq-components-file-upload.mjs +7 -7
  30. package/fesm2022/koobiq-components-file-upload.mjs.map +1 -1
  31. package/fesm2022/koobiq-components-filter-bar.mjs +76 -41
  32. package/fesm2022/koobiq-components-filter-bar.mjs.map +1 -1
  33. package/fesm2022/koobiq-components-list.mjs +3 -3
  34. package/fesm2022/koobiq-components-list.mjs.map +1 -1
  35. package/fesm2022/koobiq-components-markdown.mjs +6 -2
  36. package/fesm2022/koobiq-components-markdown.mjs.map +1 -1
  37. package/fesm2022/koobiq-components-modal.mjs +48 -7
  38. package/fesm2022/koobiq-components-modal.mjs.map +1 -1
  39. package/fesm2022/koobiq-components-select.mjs +98 -11
  40. package/fesm2022/koobiq-components-select.mjs.map +1 -1
  41. package/fesm2022/koobiq-components-sidebar.mjs +5 -1
  42. package/fesm2022/koobiq-components-sidebar.mjs.map +1 -1
  43. package/fesm2022/koobiq-components-sidepanel.mjs +25 -6
  44. package/fesm2022/koobiq-components-sidepanel.mjs.map +1 -1
  45. package/fesm2022/koobiq-components-tabs.mjs +7 -1
  46. package/fesm2022/koobiq-components-tabs.mjs.map +1 -1
  47. package/fesm2022/koobiq-components-time-range.mjs +388 -74
  48. package/fesm2022/koobiq-components-time-range.mjs.map +1 -1
  49. package/fesm2022/koobiq-components-timezone.mjs +2 -2
  50. package/fesm2022/koobiq-components-timezone.mjs.map +1 -1
  51. package/fesm2022/koobiq-components-title.mjs +15 -3
  52. package/fesm2022/koobiq-components-title.mjs.map +1 -1
  53. package/fesm2022/koobiq-components-tree-select.mjs +2 -2
  54. package/fesm2022/koobiq-components-tree-select.mjs.map +1 -1
  55. package/fesm2022/koobiq-components-tree.mjs +14 -4
  56. package/fesm2022/koobiq-components-tree.mjs.map +1 -1
  57. package/file-upload/file-upload.scss +11 -0
  58. package/file-upload/index.d.ts +1 -1
  59. package/file-upload/multiple-file-upload.component.scss +15 -3
  60. package/file-upload/single-file-upload.component.scss +10 -2
  61. package/filter-bar/filter-bar-tokens.scss +2 -1
  62. package/filter-bar/index.d.ts +25 -4
  63. package/filter-bar/pipes/base-pipe.scss +13 -6
  64. package/filter-bar/pipes/pipe-input.scss +3 -1
  65. package/link/_link-theme.scss +50 -15
  66. package/markdown/index.d.ts +2 -0
  67. package/modal/index.d.ts +16 -7
  68. package/navbar/_navbar-item_horizontal.scss +5 -0
  69. package/package.json +3 -3
  70. package/prebuilt-themes/dark-theme.css +1 -1
  71. package/prebuilt-themes/light-theme.css +1 -1
  72. package/prebuilt-themes/theme.css +1 -1
  73. package/schematics/migrations/alert-signals/index.js +4 -1
  74. package/schematics/migrations/autocomplete-panel-width-auto/index.js +3 -34
  75. package/schematics/migrations/empty-state-size-attr/index.js +3 -34
  76. package/schematics/migrations/filter-bar-signals/index.js +4 -1
  77. package/schematics/migrations/loader-overlay-size-attr/index.js +3 -34
  78. package/schematics/migrations/v20-upgrade/index.js +4 -1
  79. package/schematics/ng-add/index.js +1 -1
  80. package/schematics/utils/angular-parsing.js +11 -12
  81. package/schematics/utils/package-config.js +5 -4
  82. package/schematics/utils/typescript.js +24 -0
  83. package/select/_select-theme.scss +9 -1
  84. package/select/index.d.ts +12 -2
  85. package/select/select.scss +13 -0
  86. package/sidebar/index.d.ts +1 -0
  87. package/sidepanel/index.d.ts +9 -0
  88. package/tabs/index.d.ts +1 -0
  89. package/time-range/index.d.ts +140 -5
  90. package/time-range/time-range.scss +16 -1
  91. package/title/index.d.ts +10 -2
  92. package/tree/index.d.ts +1 -0
@@ -3,20 +3,53 @@ import { OnInit, AfterViewInit, OnDestroy } from '@angular/core';
3
3
  import { KbqTooltipTrigger } from '@koobiq/components/tooltip';
4
4
  import { Subject } from 'rxjs';
5
5
 
6
+ /**
7
+ * Renders text as two spans and moves the ellipsis into the middle, so the tail — a file extension, the
8
+ * digits that tell two reports apart — stays readable when the host is too narrow for the whole string. A
9
+ * tooltip spells out the full text, and is enabled only while something is actually hidden.
10
+ *
11
+ * The host needs the layout contract the consuming component ships (see `.kbq-ellipsis-center` in
12
+ * `file-upload.scss`): the two spans have no styles of their own.
13
+ */
6
14
  declare class KbqEllipsisCenterDirective extends KbqTooltipTrigger implements OnInit, AfterViewInit, OnDestroy {
7
15
  private cdr;
16
+ /**
17
+ * Application-wide `ResizeObserver` shared by every consumer, as `KbqTitleDirective` uses. Unlike the
18
+ * `window:resize` listener this directive used to carry, it also reacts to container-only resizes — a
19
+ * splitter drag, a sidebar collapse, or the vertical scrollbar that appears once a file list fills up —
20
+ * none of which resize the window, all of which change where the text has to be split.
21
+ */
22
+ private readonly resizeObserver;
8
23
  set kbqEllipsisCenter(value: string);
24
+ /**
25
+ * Shortest text worth splitting in the middle. Anything below it keeps its natural order and is cut off
26
+ * at the end by the host's own `text-overflow`.
27
+ *
28
+ * Defaults to `0` — every overflowing text is split — because that is what the directive has always
29
+ * done: the input was declared but never read, so any other default would silently end-truncate labels
30
+ * that consumers expect to see split.
31
+ */
9
32
  readonly minVisibleLength: i0.InputSignal<number>;
33
+ /**
34
+ * Lower bound, in pixels, for the average glyph width used to decide how many characters fit in the
35
+ * tail. The rendered text is measured as well and the wider of the two wins, so an underestimate here
36
+ * can no longer push the extension out of the tail — raising it only shortens the tail further.
37
+ */
10
38
  readonly charWidth: i0.InputSignal<number>;
11
39
  /**
12
40
  * Debounce time (ms) for resize events before recalculating ellipsis position.
13
41
  * @default 50
14
42
  */
15
43
  readonly debounceInterval: i0.InputSignalWithTransform<number, unknown>;
16
- /** @docs-private */
44
+ /**
45
+ * @deprecated No longer read. Resizes now come from the shared `ResizeObserver`, which also catches the
46
+ * container-only ones a `window:resize` listener cannot see; the host listener that used to feed this
47
+ * subject is gone, and nothing subscribes to it. Kept as a no-op and removed in the next major version.
48
+ * @docs-private */
17
49
  readonly resizeStream: Subject<Event>;
18
50
  private _kbqEllipsisCenter;
19
- private resizeSubscription;
51
+ private lastMeasuredWidth;
52
+ private refreshTimeoutId;
20
53
  ngOnInit(): void;
21
54
  ngAfterViewInit(): void;
22
55
  ngOnDestroy(): void;
@@ -3,12 +3,13 @@ import { Directionality } from '@angular/cdk/bidi';
3
3
  import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
4
4
  import { ENTER, SPACE } from '@angular/cdk/keycodes';
5
5
  import * as i0 from '@angular/core';
6
- import { inject, Renderer2, signal, afterNextRender, RendererStyleFlags2, Directive, viewChild, ViewEncapsulation, Component, ChangeDetectorRef, contentChild, forwardRef, input, computed, output, booleanAttribute, Input, Injectable, InjectionToken, ElementRef, Injector, contentChildren, numberAttribute, effect, untracked, isDevMode, ChangeDetectionStrategy, NgModule } from '@angular/core';
6
+ import { inject, Renderer2, Injector, signal, afterNextRender, RendererStyleFlags2, Directive, viewChild, ViewEncapsulation, Component, ChangeDetectorRef, contentChild, forwardRef, input, computed, output, booleanAttribute, Input, Injectable, InjectionToken, ElementRef, contentChildren, numberAttribute, effect, untracked, isDevMode, ChangeDetectionStrategy, NgModule } from '@angular/core';
7
7
  import { Subscription, Subject } from 'rxjs';
8
+ import { Platform } from '@angular/cdk/platform';
8
9
  import { kbqInjectNativeElement, KBQ_WINDOW } from '@koobiq/components/core';
9
10
  import { KbqIcon } from '@koobiq/components/icon';
10
- import { Platform } from '@angular/cdk/platform';
11
11
 
12
+ const CONTENT_HEIGHT = '--kbq-accordion-content-height';
12
13
  class KbqAccordionContentDirective {
13
14
  /** @docs-private */
14
15
  get contentId() {
@@ -20,34 +21,57 @@ class KbqAccordionContentDirective {
20
21
  }
21
22
  constructor() {
22
23
  this.renderer = inject(Renderer2);
24
+ this.platform = inject(Platform);
25
+ this.injector = inject(Injector);
23
26
  /** @docs-private */
24
27
  this.nativeElement = kbqInjectNativeElement();
25
28
  /** @docs-private */
26
29
  this.item = inject(KbqAccordionItem);
27
30
  /** @docs-private */
28
31
  this.hidden = signal(true, ...(ngDevMode ? [{ debugName: "hidden" }] : []));
29
- /** Whether the first browser render has happened, i.e. whether the content can be measured. */
32
+ /** Whether the first browser render has happened; until then a toggle only sets the initial state. */
30
33
  this.rendered = false;
31
34
  // `afterNextRender` never runs on the server, so no platform check is needed here.
32
- this.afterRenderRef = afterNextRender(() => {
35
+ afterNextRender(() => {
33
36
  this.rendered = true;
34
- this.updateHeight();
35
37
  this.enableAnimation();
36
- this.afterRenderRef?.destroy();
37
38
  });
38
39
  }
40
+ ngOnInit() {
41
+ // Content the item's `toggle()` cannot have reached yet: created after the item initialized (inside
42
+ // `@if` or `@defer`), or outside the item's own template.
43
+ this.toggle();
44
+ }
45
+ ngDoCheck() {
46
+ // The item cannot reach content declared in a child component's template to toggle it.
47
+ if (this.hidden() === this.item.expanded) {
48
+ this.toggle();
49
+ }
50
+ }
39
51
  ngAfterViewInit() {
52
+ // Skipped on the server: the write would reach the prerendered `style` attribute, and hydration
53
+ // reuses that node, so the client would read `none` back as the transition worth restoring and
54
+ // `enableAnimation()` would make it permanent. There is nothing to suppress without a paint.
55
+ if (!this.platform.isBrowser)
56
+ return;
40
57
  this.disableAnimation();
41
58
  }
42
59
  toggle() {
43
- // Re-measure while the content is still collapsed. Its natural height depends on the width
44
- // it is finally laid out at, and that width is not known at first render when the accordion
45
- // lives in a container sized afterwards (sidepanel, overlay, responsive layout).
46
- if (this.rendered && this.item.expanded && this.hidden()) {
47
- this.updateHeight();
60
+ if (this.rendered) {
61
+ this.pinHeight();
48
62
  }
49
63
  this.hidden.set(!this.item.expanded);
50
64
  }
65
+ /** @docs-private */
66
+ onTransitionEnd(event) {
67
+ // Transitions of the projected content and of pseudo-elements bubble up here as well.
68
+ if (event.target !== this.nativeElement || event.propertyName !== 'height' || event.pseudoElement)
69
+ return;
70
+ // The transition that ended or was cancelled may already be replaced by one that still needs the pin.
71
+ if (!this.isHeightTransitionRunning()) {
72
+ this.releaseHeight();
73
+ }
74
+ }
51
75
  disableAnimation() {
52
76
  this.savedTransition = this.nativeElement.style.transition;
53
77
  this.nativeElement.style.transition = 'none';
@@ -56,18 +80,62 @@ class KbqAccordionContentDirective {
56
80
  this.nativeElement.style.transition = this.savedTransition;
57
81
  }
58
82
  /**
59
- * Publishes the natural height of the projected content as `--kbq-accordion-content-height`,
60
- * which the open state animates towards.
83
+ * Pins the height the transition runs between: the natural height of the content when expanding,
84
+ * the current one when collapsing. The pin is released once the transition ends, so expanded
85
+ * content keeps `height: auto` and follows its own size — its container can be laid out later
86
+ * (a content panel, an overlay) or resized, and nested items can toggle.
61
87
  *
62
- * `scrollHeight` is used rather than `getBoundingClientRect()`: the host is `overflow: hidden`
63
- * and collapsed to `height: 0` while closed, so its box reports `0`, whereas `scrollHeight`
64
- * still reports the height of the content it clips.
88
+ * `scrollHeight` reports the natural height even while the `overflow: hidden` host is collapsed.
65
89
  */
66
- updateHeight() {
67
- this.renderer.setStyle(this.nativeElement, '--kbq-accordion-content-height', `${this.nativeElement.scrollHeight}px`, RendererStyleFlags2.DashCase);
90
+ pinHeight() {
91
+ const element = this.nativeElement;
92
+ // No transition would release the pin.
93
+ if (element.style.transition === 'none') {
94
+ this.releaseHeight();
95
+ return;
96
+ }
97
+ const expanded = this.item.expanded;
98
+ const current = element.offsetHeight;
99
+ const target = expanded ? element.scrollHeight : 0;
100
+ // Nothing to animate: no box yet (e.g. in a closed content panel), or already there.
101
+ if (current === target) {
102
+ this.releaseHeight();
103
+ return;
104
+ }
105
+ this.setHeight(expanded ? target : current);
106
+ // A collapse starts from `auto`, which does not transition: commit the pinned height before
107
+ // `data-state` flips.
108
+ if (!expanded) {
109
+ element.getBoundingClientRect();
110
+ }
111
+ afterNextRender(() => this.settleHeight(), { injector: this.injector });
112
+ }
113
+ /** Checks the pin once `data-state` has flipped. */
114
+ settleHeight() {
115
+ const running = this.isHeightTransitionRunning();
116
+ if (running === false) {
117
+ // Transitions are off (a stylesheet, reduced motion), so no `transitionend` will release the pin.
118
+ this.releaseHeight();
119
+ }
120
+ else if (this.item.expanded) {
121
+ // Content rendered by the flip itself (`@if`, `@defer`) was not there to measure: retarget.
122
+ this.setHeight(this.nativeElement.scrollHeight);
123
+ }
124
+ }
125
+ /** Whether a height transition runs on the host; `undefined` without the Web Animations API. */
126
+ isHeightTransitionRunning() {
127
+ return this.nativeElement
128
+ .getAnimations?.()
129
+ .some((animation) => animation.transitionProperty === 'height');
130
+ }
131
+ setHeight(height) {
132
+ this.renderer.setStyle(this.nativeElement, CONTENT_HEIGHT, `${height}px`, RendererStyleFlags2.DashCase);
133
+ }
134
+ releaseHeight() {
135
+ this.renderer.removeStyle(this.nativeElement, CONTENT_HEIGHT, RendererStyleFlags2.DashCase);
68
136
  }
69
137
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
70
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqAccordionContentDirective, isStandalone: true, selector: "[kbqAccordionContent]", host: { listeners: { "transitionend": "toggle()" }, properties: { "attr.id": "contentId", "attr.role": "\"region\"", "attr.hidden": "hidden() ? \"\" : null", "attr.inert": "hidden() ? \"\" : null", "attr.aria-labelledby": "triggerId", "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.data-orientation": "item.orientation" } }, exportAs: ["kbqAccordionContent"], ngImport: i0 }); }
138
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.30", type: KbqAccordionContentDirective, isStandalone: true, selector: "[kbqAccordionContent]", host: { listeners: { "transitionend": "onTransitionEnd($event)", "transitioncancel": "onTransitionEnd($event)" }, properties: { "attr.id": "contentId", "attr.role": "\"region\"", "attr.hidden": "hidden() ? \"\" : null", "attr.inert": "hidden() ? \"\" : null", "attr.aria-labelledby": "triggerId", "attr.data-state": "item.dataState", "attr.data-disabled": "item.disabled", "attr.data-orientation": "item.orientation" } }, exportAs: ["kbqAccordionContent"], ngImport: i0 }); }
71
139
  }
72
140
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAccordionContentDirective, decorators: [{
73
141
  type: Directive,
@@ -86,7 +154,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
86
154
  '[attr.data-state]': 'item.dataState',
87
155
  '[attr.data-disabled]': 'item.disabled',
88
156
  '[attr.data-orientation]': 'item.orientation',
89
- '(transitionend)': 'toggle()'
157
+ '(transitionend)': 'onTransitionEnd($event)',
158
+ '(transitioncancel)': 'onTransitionEnd($event)'
90
159
  },
91
160
  exportAs: 'kbqAccordionContent'
92
161
  }]
@@ -178,6 +247,7 @@ class KbqAccordionTrigger {
178
247
  return this.accordion.variant() === 'hugSpaceBetween';
179
248
  }
180
249
  constructor() {
250
+ this.platform = inject(Platform);
181
251
  /** @docs-private */
182
252
  this.nativeElement = kbqInjectNativeElement();
183
253
  /** @docs-private */
@@ -190,6 +260,11 @@ class KbqAccordionTrigger {
190
260
  });
191
261
  }
192
262
  ngAfterViewInit() {
263
+ // Skipped on the server: the write would reach the prerendered `style` attribute, and hydration
264
+ // reuses that node, so the client would read `none` back as the transition worth restoring and
265
+ // `enableAnimation()` would make it permanent. There is nothing to suppress without a paint.
266
+ if (!this.platform.isBrowser)
267
+ return;
193
268
  this.disableAnimation();
194
269
  }
195
270
  ngOnDestroy() {
@@ -243,7 +318,10 @@ class KbqAccordionItem {
243
318
  get orientation() {
244
319
  return this.accordion.orientation();
245
320
  }
246
- /** Whether the AccordionItem is expanded. */
321
+ /**
322
+ * Whether the AccordionItem is expanded. When the accordion initializes, its controlled `value`, the saved
323
+ * state and `defaultValue` take precedence over it.
324
+ */
247
325
  // Kept as an `@Input` accessor (not `model()`): the setter runs a synchronous side-effect
248
326
  // cascade (emits opened/closed/expandedChange, notifies the selection dispatcher, toggles the
249
327
  // content and persists state) that sibling items rely on within the same change-detection tick.
@@ -254,25 +332,10 @@ class KbqAccordionItem {
254
332
  // Only emit events and update the internal value if the value changes.
255
333
  if (this._expanded !== expanded) {
256
334
  this._expanded = expanded;
257
- this.expandedChange.emit(expanded);
258
- if (expanded) {
259
- // TODO: The 'emit' function requires a mandatory void argument
260
- this.opened.emit();
261
- /**
262
- * In the unique selection dispatcher, the id parameter is the id of the KbqAccordionItem,
263
- * the name value is the id of the accordion.
264
- */
265
- this.expansionDispatcher.notify(this.value(), this.accordion.id);
266
- }
267
- else {
268
- // TODO: The 'emit' function requires a mandatory void argument
269
- this.closed.emit();
270
- }
271
- this.content()?.toggle();
272
- this.accordion.saveItemState(this);
273
- // Ensures that the animation will run when the value is set outside of an `@Input`.
274
- // This includes cases like the open, close and toggle methods.
275
- this.changeDetectorRef.markForCheck();
335
+ // Before `ngOnInit` the accordion's inputs may still be unbound, this item may not be in its `items()`
336
+ // and nothing listens to the outputs yet — the static attribute is applied while the view is created.
337
+ if (this.initialized)
338
+ this.reportExpanded();
276
339
  }
277
340
  }
278
341
  /** Whether the AccordionItem is disabled. */
@@ -304,6 +367,7 @@ class KbqAccordionItem {
304
367
  this.content = contentChild(forwardRef(() => KbqAccordionContentDirective), ...(ngDevMode ? [{ debugName: "content" }] : []));
305
368
  this._id = `kbq-accordion-item-${uniqueIdCounter$1++}`;
306
369
  this._expanded = false;
370
+ this.initialized = false;
307
371
  /**
308
372
  * The item's own `value` input. Must stay `public`: a `protected` input cannot be bound from a
309
373
  * consumer template (TS2445 under full AOT template type-checking).
@@ -351,6 +415,11 @@ class KbqAccordionItem {
351
415
  // When an accordion item is hosted in an accordion, subscribe to open/close events.
352
416
  this.openCloseAllSubscription = this.subscribeToOpenCloseAllActions();
353
417
  }
418
+ ngOnInit() {
419
+ this.initialized = true;
420
+ if (this._expanded)
421
+ this.reportExpanded();
422
+ }
354
423
  ngOnDestroy() {
355
424
  this.removeUniqueSelectionListener();
356
425
  this.openCloseAllSubscription.unsubscribe();
@@ -394,6 +463,29 @@ class KbqAccordionItem {
394
463
  this.content()?.enableAnimation();
395
464
  this.triggerComponent()?.enableAnimation();
396
465
  }
466
+ /** Emits the expanded state and propagates it to the siblings, the content and the saved state. */
467
+ reportExpanded() {
468
+ // First: a handler below may run change detection, and the content pins its height before `data-state` flips.
469
+ this.content()?.toggle();
470
+ this.expandedChange.emit(this._expanded);
471
+ if (this._expanded) {
472
+ // TODO: The 'emit' function requires a mandatory void argument
473
+ this.opened.emit();
474
+ /**
475
+ * In the unique selection dispatcher, the id parameter is the id of the KbqAccordionItem,
476
+ * the name value is the id of the accordion.
477
+ */
478
+ this.expansionDispatcher.notify(this.value(), this.accordion.id);
479
+ }
480
+ else {
481
+ // TODO: The 'emit' function requires a mandatory void argument
482
+ this.closed.emit();
483
+ }
484
+ this.accordion.saveItemState(this);
485
+ // Ensures that the animation will run when the value is set outside of an `@Input`.
486
+ // This includes cases like the open, close and toggle methods.
487
+ this.changeDetectorRef.markForCheck();
488
+ }
397
489
  subscribeToOpenCloseAllActions() {
398
490
  return this.accordion.openCloseAllActions.subscribe((expanded) => {
399
491
  // Only change expanded state if item is enabled
@@ -577,6 +669,11 @@ class KbqAccordion {
577
669
  }, ...(ngDevMode ? [{ debugName: "defaultValueArray" }] : []));
578
670
  this._id = `kbq-accordion-${uniqueIdCounter++}`;
579
671
  this.state = null;
672
+ /**
673
+ * Whether the saved state has been read. An item reports a static `[expanded]` from its own `ngOnInit`,
674
+ * which runs before `ngAfterContentInit`, and writing then would replace the saved state before it is read.
675
+ */
676
+ this.stateRestored = false;
580
677
  // Re-emit `valueChange` whenever any (current or future) item toggles its expanded state.
581
678
  // Reading `items()` inside the effect keeps the subscriptions in sync with dynamically
582
679
  // added/removed items.
@@ -604,6 +701,7 @@ class KbqAccordion {
604
701
  }
605
702
  this.state = this.stateStore.getState(this.stateStorageKey);
606
703
  }
704
+ this.stateRestored = true;
607
705
  if (this.valueInput() !== undefined) {
608
706
  this.selectionDispatcher.notify(this.value(), this.id);
609
707
  }
@@ -615,7 +713,8 @@ class KbqAccordion {
615
713
  this.selectionDispatcher.notify((this.isMultiple ? expandedValues : expandedValues[0]), this.id);
616
714
  }
617
715
  }
618
- else {
716
+ else if (this.defaultValueArray().length) {
717
+ // Without a `defaultValue` the items keep their own `[expanded]`: an empty payload would close them all.
619
718
  this.selectionDispatcher.notify(this.defaultValueArray(), this.id);
620
719
  }
621
720
  // Seed initial state for any items missing from the store (without overwriting existing entries).
@@ -681,7 +780,7 @@ class KbqAccordion {
681
780
  * @docs-private
682
781
  */
683
782
  saveItemState(item, force = true) {
684
- if (!this.useStateSaving())
783
+ if (!this.useStateSaving() || !this.stateRestored)
685
784
  return;
686
785
  if (!force && this.state?.[item.id])
687
786
  return;
@@ -703,7 +802,7 @@ class KbqAccordion {
703
802
  /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAccordion, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
704
803
  /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.30", type: KbqAccordion, isStandalone: true, selector: "kbq-accordion, [kbq-accordion]", inputs: { useStateSaving: { classPropertyName: "useStateSaving", publicName: "useStateSaving", isSignal: true, isRequired: false, transformFunction: null }, stateSavingKey: { classPropertyName: "stateSavingKey", publicName: "stateSavingKey", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, host: { properties: { "attr.data-orientation": "orientation()" }, classAttribute: "kbq-accordion" }, providers: [
705
804
  { provide: UniqueSelectionDispatcher, useClass: UniqueSelectionDispatcher }
706
- ], queries: [{ propertyName: "allItems", predicate: i0.forwardRef(() => KbqAccordionItem), descendants: true, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [".kbq-accordion{display:block}.kbq-accordion-item{box-sizing:border-box;display:block;border-width:var(--kbq-accordion-size-item-border-width);border-style:solid;border-color:transparent}.kbq-accordion-header{display:flex;height:var(--kbq-accordion-size-item-header-height);overflow:hidden}.kbq-accordion-header>.kbq-accordion-header__actions{display:flex;align-items:center;gap:var(--kbq-accordion-size-item-header-actions-gap);flex-shrink:0;padding-right:var(--kbq-accordion-size-item-header-actions-padding-right)}.kbq-accordion-content{display:block;overflow:hidden}.kbq-accordion-content>.kbq-accordion-content__body{margin:unset;padding:var(--kbq-accordion-size-item-content-padding)}.kbq-accordion-content[data-state=open]{transition:height .3s ease-out;height:var(--kbq-accordion-content-height)}.kbq-accordion-content[data-state=closed]{transition:height .3s ease-out;height:0}@media(prefers-reduced-motion:reduce){.kbq-accordion-content[data-state=open],.kbq-accordion-content[data-state=closed]{transition:none}}.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-trigger:focus),.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-header .kbq-accordion-trigger:focus){border-color:var(--kbq-accordion-item-states-focus-border-color)}.kbq-accordion-item{background:var(--kbq-accordion-item-default-background);color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-item .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-default-icon-color)}.kbq-accordion-trigger{width:100%;background:transparent;border:none;outline:none;color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-trigger:hover:not([data-disabled=true]){cursor:pointer}.kbq-accordion-trigger:hover:not([data-disabled=true]) .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-hover-icon-color)}.kbq-accordion-trigger[data-disabled=true]{color:var(--kbq-accordion-item-states-disabled-text-color)}.kbq-accordion-trigger[data-disabled=true] .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-disabled-icon-color)}.kbq-accordion-header,.kbq-accordion-trigger{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-accordion-trigger__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-accordion-content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-accordion{--kbq-accordion-size-item-border-width: 2px;--kbq-accordion-size-item-header-height: 36px;--kbq-accordion-size-item-header-variant-fill-padding: var(--kbq-size-xs) var(--kbq-size-s);--kbq-accordion-size-item-header-variant-hug-padding: var(--kbq-size-xs) var(--kbq-size-s) var(--kbq-size-xs) var(--kbq-size-m);--kbq-accordion-size-item-content-padding: 0px var(--kbq-size-m) var(--kbq-size-s) var(--kbq-size-m);--kbq-accordion-size-item-header-actions-gap: var(--kbq-size-3xs);--kbq-accordion-size-item-header-actions-padding-right: var(--kbq-size-s);--kbq-accordion-item-default-background: transparent;--kbq-accordion-item-default-text-color: var(--kbq-foreground-contrast);--kbq-accordion-item-default-icon-color: var(--kbq-icon-contrast-fade);--kbq-accordion-item-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-accordion-item-states-focus-border-color: var(--kbq-line-theme);--kbq-accordion-item-states-disabled-text-color: var(--kbq-foreground-contrast-secondary);--kbq-accordion-item-states-disabled-icon-color: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
805
+ ], queries: [{ propertyName: "allItems", predicate: i0.forwardRef(() => KbqAccordionItem), descendants: true, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: [".kbq-accordion{display:block}.kbq-accordion-item{box-sizing:border-box;display:block;border-width:var(--kbq-accordion-size-item-border-width);border-style:solid;border-color:transparent}.kbq-accordion-header{display:flex;height:var(--kbq-accordion-size-item-header-height);overflow:hidden}.kbq-accordion-header>.kbq-accordion-header__actions{display:flex;align-items:center;gap:var(--kbq-accordion-size-item-header-actions-gap);flex-shrink:0;padding-right:var(--kbq-accordion-size-item-header-actions-padding-right)}.kbq-accordion-content{display:block;overflow:hidden}.kbq-accordion-content>.kbq-accordion-content__body{--kbq-accordion-content-height: initial;margin:unset;padding:var(--kbq-accordion-size-item-content-padding)}.kbq-accordion-content[data-state=open]{transition:height .3s ease-out;height:var(--kbq-accordion-content-height, auto)}.kbq-accordion-content[data-state=closed]{transition:height .3s ease-out;height:0}@media(prefers-reduced-motion:reduce){.kbq-accordion-content[data-state=open],.kbq-accordion-content[data-state=closed]{transition:none}}.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-trigger:focus),.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-header .kbq-accordion-trigger:focus){border-color:var(--kbq-accordion-item-states-focus-border-color)}.kbq-accordion-item{background:var(--kbq-accordion-item-default-background);color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-item .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-default-icon-color)}.kbq-accordion-trigger{width:100%;background:transparent;border:none;outline:none;color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-trigger:hover:not([data-disabled=true]){cursor:pointer}.kbq-accordion-trigger:hover:not([data-disabled=true]) .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-hover-icon-color)}.kbq-accordion-trigger[data-disabled=true]{color:var(--kbq-accordion-item-states-disabled-text-color)}.kbq-accordion-trigger[data-disabled=true] .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-disabled-icon-color)}.kbq-accordion-header,.kbq-accordion-trigger{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-accordion-trigger__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-accordion-content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-accordion{--kbq-accordion-size-item-border-width: 2px;--kbq-accordion-size-item-header-height: 36px;--kbq-accordion-size-item-header-variant-fill-padding: var(--kbq-size-xs) var(--kbq-size-s);--kbq-accordion-size-item-header-variant-hug-padding: var(--kbq-size-xs) var(--kbq-size-s) var(--kbq-size-xs) var(--kbq-size-m);--kbq-accordion-size-item-content-padding: 0px var(--kbq-size-m) var(--kbq-size-s) var(--kbq-size-m);--kbq-accordion-size-item-header-actions-gap: var(--kbq-size-3xs);--kbq-accordion-size-item-header-actions-padding-right: var(--kbq-size-s);--kbq-accordion-item-default-background: transparent;--kbq-accordion-item-default-text-color: var(--kbq-foreground-contrast);--kbq-accordion-item-default-icon-color: var(--kbq-icon-contrast-fade);--kbq-accordion-item-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-accordion-item-states-focus-border-color: var(--kbq-line-theme);--kbq-accordion-item-states-disabled-text-color: var(--kbq-foreground-contrast-secondary);--kbq-accordion-item-states-disabled-icon-color: var(--kbq-states-icon-disabled)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
707
806
  }
708
807
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqAccordion, decorators: [{
709
808
  type: Component,
@@ -712,7 +811,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImpo
712
811
  ], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
713
812
  class: 'kbq-accordion',
714
813
  '[attr.data-orientation]': 'orientation()'
715
- }, styles: [".kbq-accordion{display:block}.kbq-accordion-item{box-sizing:border-box;display:block;border-width:var(--kbq-accordion-size-item-border-width);border-style:solid;border-color:transparent}.kbq-accordion-header{display:flex;height:var(--kbq-accordion-size-item-header-height);overflow:hidden}.kbq-accordion-header>.kbq-accordion-header__actions{display:flex;align-items:center;gap:var(--kbq-accordion-size-item-header-actions-gap);flex-shrink:0;padding-right:var(--kbq-accordion-size-item-header-actions-padding-right)}.kbq-accordion-content{display:block;overflow:hidden}.kbq-accordion-content>.kbq-accordion-content__body{margin:unset;padding:var(--kbq-accordion-size-item-content-padding)}.kbq-accordion-content[data-state=open]{transition:height .3s ease-out;height:var(--kbq-accordion-content-height)}.kbq-accordion-content[data-state=closed]{transition:height .3s ease-out;height:0}@media(prefers-reduced-motion:reduce){.kbq-accordion-content[data-state=open],.kbq-accordion-content[data-state=closed]{transition:none}}.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-trigger:focus),.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-header .kbq-accordion-trigger:focus){border-color:var(--kbq-accordion-item-states-focus-border-color)}.kbq-accordion-item{background:var(--kbq-accordion-item-default-background);color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-item .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-default-icon-color)}.kbq-accordion-trigger{width:100%;background:transparent;border:none;outline:none;color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-trigger:hover:not([data-disabled=true]){cursor:pointer}.kbq-accordion-trigger:hover:not([data-disabled=true]) .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-hover-icon-color)}.kbq-accordion-trigger[data-disabled=true]{color:var(--kbq-accordion-item-states-disabled-text-color)}.kbq-accordion-trigger[data-disabled=true] .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-disabled-icon-color)}.kbq-accordion-header,.kbq-accordion-trigger{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-accordion-trigger__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-accordion-content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-accordion{--kbq-accordion-size-item-border-width: 2px;--kbq-accordion-size-item-header-height: 36px;--kbq-accordion-size-item-header-variant-fill-padding: var(--kbq-size-xs) var(--kbq-size-s);--kbq-accordion-size-item-header-variant-hug-padding: var(--kbq-size-xs) var(--kbq-size-s) var(--kbq-size-xs) var(--kbq-size-m);--kbq-accordion-size-item-content-padding: 0px var(--kbq-size-m) var(--kbq-size-s) var(--kbq-size-m);--kbq-accordion-size-item-header-actions-gap: var(--kbq-size-3xs);--kbq-accordion-size-item-header-actions-padding-right: var(--kbq-size-s);--kbq-accordion-item-default-background: transparent;--kbq-accordion-item-default-text-color: var(--kbq-foreground-contrast);--kbq-accordion-item-default-icon-color: var(--kbq-icon-contrast-fade);--kbq-accordion-item-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-accordion-item-states-focus-border-color: var(--kbq-line-theme);--kbq-accordion-item-states-disabled-text-color: var(--kbq-foreground-contrast-secondary);--kbq-accordion-item-states-disabled-icon-color: var(--kbq-states-icon-disabled)}\n"] }]
814
+ }, styles: [".kbq-accordion{display:block}.kbq-accordion-item{box-sizing:border-box;display:block;border-width:var(--kbq-accordion-size-item-border-width);border-style:solid;border-color:transparent}.kbq-accordion-header{display:flex;height:var(--kbq-accordion-size-item-header-height);overflow:hidden}.kbq-accordion-header>.kbq-accordion-header__actions{display:flex;align-items:center;gap:var(--kbq-accordion-size-item-header-actions-gap);flex-shrink:0;padding-right:var(--kbq-accordion-size-item-header-actions-padding-right)}.kbq-accordion-content{display:block;overflow:hidden}.kbq-accordion-content>.kbq-accordion-content__body{--kbq-accordion-content-height: initial;margin:unset;padding:var(--kbq-accordion-size-item-content-padding)}.kbq-accordion-content[data-state=open]{transition:height .3s ease-out;height:var(--kbq-accordion-content-height, auto)}.kbq-accordion-content[data-state=closed]{transition:height .3s ease-out;height:0}@media(prefers-reduced-motion:reduce){.kbq-accordion-content[data-state=open],.kbq-accordion-content[data-state=closed]{transition:none}}.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-trigger:focus),.kbq-accordion.cdk-keyboard-focused .kbq-accordion-item:has(>.kbq-accordion-header .kbq-accordion-trigger:focus){border-color:var(--kbq-accordion-item-states-focus-border-color)}.kbq-accordion-item{background:var(--kbq-accordion-item-default-background);color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-item .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-default-icon-color)}.kbq-accordion-trigger{width:100%;background:transparent;border:none;outline:none;color:var(--kbq-accordion-item-default-text-color)}.kbq-accordion-trigger:hover:not([data-disabled=true]){cursor:pointer}.kbq-accordion-trigger:hover:not([data-disabled=true]) .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-hover-icon-color)}.kbq-accordion-trigger[data-disabled=true]{color:var(--kbq-accordion-item-states-disabled-text-color)}.kbq-accordion-trigger[data-disabled=true] .kbq-accordion-trigger__icon{color:var(--kbq-accordion-item-states-disabled-icon-color)}.kbq-accordion-header,.kbq-accordion-trigger{font-size:var(--kbq-typography-text-big-font-size);font-style:var(--kbq-typography-text-big-font-style);font-weight:var(--kbq-typography-text-big-font-weight);line-height:var(--kbq-typography-text-big-line-height);font-family:var(--kbq-typography-text-big-font-family);text-transform:var(--kbq-typography-text-big-text-transform);font-feature-settings:var(--kbq-typography-text-big-font-feature-settings);letter-spacing:var(--kbq-typography-text-big-letter-spacing)}.kbq-accordion-trigger__caption{font-size:var(--kbq-typography-text-compact-font-size);font-style:var(--kbq-typography-text-compact-font-style);font-weight:var(--kbq-typography-text-compact-font-weight);line-height:var(--kbq-typography-text-compact-line-height);font-family:var(--kbq-typography-text-compact-font-family);text-transform:var(--kbq-typography-text-compact-text-transform);font-feature-settings:var(--kbq-typography-text-compact-font-feature-settings);letter-spacing:var(--kbq-typography-text-compact-letter-spacing)}.kbq-accordion-content{font-size:var(--kbq-typography-text-normal-font-size);font-style:var(--kbq-typography-text-normal-font-style);font-weight:var(--kbq-typography-text-normal-font-weight);line-height:var(--kbq-typography-text-normal-line-height);font-family:var(--kbq-typography-text-normal-font-family);text-transform:var(--kbq-typography-text-normal-text-transform);font-feature-settings:var(--kbq-typography-text-normal-font-feature-settings);letter-spacing:var(--kbq-typography-text-normal-letter-spacing)}\n", ".kbq-accordion{--kbq-accordion-size-item-border-width: 2px;--kbq-accordion-size-item-header-height: 36px;--kbq-accordion-size-item-header-variant-fill-padding: var(--kbq-size-xs) var(--kbq-size-s);--kbq-accordion-size-item-header-variant-hug-padding: var(--kbq-size-xs) var(--kbq-size-s) var(--kbq-size-xs) var(--kbq-size-m);--kbq-accordion-size-item-content-padding: 0px var(--kbq-size-m) var(--kbq-size-s) var(--kbq-size-m);--kbq-accordion-size-item-header-actions-gap: var(--kbq-size-3xs);--kbq-accordion-size-item-header-actions-padding-right: var(--kbq-size-s);--kbq-accordion-item-default-background: transparent;--kbq-accordion-item-default-text-color: var(--kbq-foreground-contrast);--kbq-accordion-item-default-icon-color: var(--kbq-icon-contrast-fade);--kbq-accordion-item-states-hover-icon-color: var(--kbq-icon-contrast);--kbq-accordion-item-states-focus-border-color: var(--kbq-line-theme);--kbq-accordion-item-states-disabled-text-color: var(--kbq-foreground-contrast-secondary);--kbq-accordion-item-states-disabled-icon-color: var(--kbq-states-icon-disabled)}\n"] }]
716
815
  }], ctorParameters: () => [], propDecorators: { allItems: [{ type: i0.ContentChildren, args: [forwardRef(() => KbqAccordionItem), { ...{ descendants: true }, isSignal: true }] }], useStateSaving: [{ type: i0.Input, args: [{ isSignal: true, alias: "useStateSaving", required: false }] }], stateSavingKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "stateSavingKey", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], level: [{ type: i0.Input, args: [{ isSignal: true, alias: "level", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
717
816
 
718
817
  class KbqAccordionContent {