@yuuvis/client-framework 3.0.0-beta.20.2 → 3.0.0-beta.21.1

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 (129) hide show
  1. package/autocomplete/README.md +1 -1
  2. package/common/README.md +1 -1
  3. package/fesm2022/yuuvis-client-framework-actions.mjs +25 -25
  4. package/fesm2022/yuuvis-client-framework-actions.mjs.map +1 -1
  5. package/fesm2022/yuuvis-client-framework-app-bar.mjs +6 -6
  6. package/fesm2022/yuuvis-client-framework-app-bar.mjs.map +1 -1
  7. package/fesm2022/yuuvis-client-framework-autocomplete.mjs +5 -236
  8. package/fesm2022/yuuvis-client-framework-autocomplete.mjs.map +1 -1
  9. package/fesm2022/yuuvis-client-framework-breadcrumb.mjs +4 -4
  10. package/fesm2022/yuuvis-client-framework-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/yuuvis-client-framework-clipboard.mjs +7 -6
  12. package/fesm2022/yuuvis-client-framework-clipboard.mjs.map +1 -1
  13. package/fesm2022/yuuvis-client-framework-common.mjs +3 -1793
  14. package/fesm2022/yuuvis-client-framework-common.mjs.map +1 -1
  15. package/fesm2022/yuuvis-client-framework-datepicker.mjs +51 -51
  16. package/fesm2022/yuuvis-client-framework-datepicker.mjs.map +1 -1
  17. package/fesm2022/yuuvis-client-framework-forms.mjs +154 -167
  18. package/fesm2022/yuuvis-client-framework-forms.mjs.map +1 -1
  19. package/fesm2022/yuuvis-client-framework-icons.mjs +14 -14
  20. package/fesm2022/yuuvis-client-framework-icons.mjs.map +1 -1
  21. package/fesm2022/yuuvis-client-framework-list.mjs +3 -679
  22. package/fesm2022/yuuvis-client-framework-list.mjs.map +1 -1
  23. package/fesm2022/yuuvis-client-framework-master-details.mjs +3 -136
  24. package/fesm2022/yuuvis-client-framework-master-details.mjs.map +1 -1
  25. package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs +7 -7
  26. package/fesm2022/yuuvis-client-framework-metadata-form-defaults.mjs.map +1 -1
  27. package/fesm2022/yuuvis-client-framework-metadata-form.mjs +28 -28
  28. package/fesm2022/yuuvis-client-framework-metadata-form.mjs.map +1 -1
  29. package/fesm2022/yuuvis-client-framework-object-details.mjs +92 -95
  30. package/fesm2022/yuuvis-client-framework-object-details.mjs.map +1 -1
  31. package/fesm2022/yuuvis-client-framework-object-flavor.mjs +46 -44
  32. package/fesm2022/yuuvis-client-framework-object-flavor.mjs.map +1 -1
  33. package/fesm2022/yuuvis-client-framework-object-form.mjs +47 -47
  34. package/fesm2022/yuuvis-client-framework-object-form.mjs.map +1 -1
  35. package/fesm2022/yuuvis-client-framework-object-preview.mjs +37 -58
  36. package/fesm2022/yuuvis-client-framework-object-preview.mjs.map +1 -1
  37. package/fesm2022/yuuvis-client-framework-object-relationship.mjs +80 -80
  38. package/fesm2022/yuuvis-client-framework-object-relationship.mjs.map +1 -1
  39. package/fesm2022/yuuvis-client-framework-object-summary.mjs +37 -38
  40. package/fesm2022/yuuvis-client-framework-object-summary.mjs.map +1 -1
  41. package/fesm2022/yuuvis-client-framework-object-versions.mjs +20 -20
  42. package/fesm2022/yuuvis-client-framework-object-versions.mjs.map +1 -1
  43. package/fesm2022/yuuvis-client-framework-overflow-hidden.mjs +3 -62
  44. package/fesm2022/yuuvis-client-framework-overflow-hidden.mjs.map +1 -1
  45. package/fesm2022/yuuvis-client-framework-overflow-menu.mjs +3 -129
  46. package/fesm2022/yuuvis-client-framework-overflow-menu.mjs.map +1 -1
  47. package/fesm2022/yuuvis-client-framework-pagination.mjs +5 -5
  48. package/fesm2022/yuuvis-client-framework-pagination.mjs.map +1 -1
  49. package/fesm2022/yuuvis-client-framework-popout.mjs +3 -239
  50. package/fesm2022/yuuvis-client-framework-popout.mjs.map +1 -1
  51. package/fesm2022/yuuvis-client-framework-query-list.mjs +26 -28
  52. package/fesm2022/yuuvis-client-framework-query-list.mjs.map +1 -1
  53. package/fesm2022/yuuvis-client-framework-renderer.mjs +51 -51
  54. package/fesm2022/yuuvis-client-framework-renderer.mjs.map +1 -1
  55. package/fesm2022/yuuvis-client-framework-sequence-list.mjs +7 -7
  56. package/fesm2022/yuuvis-client-framework-sequence-list.mjs.map +1 -1
  57. package/fesm2022/yuuvis-client-framework-simple-search.mjs +4 -4
  58. package/fesm2022/yuuvis-client-framework-simple-search.mjs.map +1 -1
  59. package/fesm2022/yuuvis-client-framework-sort.mjs +34 -55
  60. package/fesm2022/yuuvis-client-framework-sort.mjs.map +1 -1
  61. package/fesm2022/yuuvis-client-framework-split-view.mjs +3 -321
  62. package/fesm2022/yuuvis-client-framework-split-view.mjs.map +1 -1
  63. package/fesm2022/yuuvis-client-framework-tile-list.mjs +88 -90
  64. package/fesm2022/yuuvis-client-framework-tile-list.mjs.map +1 -1
  65. package/fesm2022/yuuvis-client-framework-token-search.mjs +21 -21
  66. package/fesm2022/yuuvis-client-framework-token-search.mjs.map +1 -1
  67. package/fesm2022/yuuvis-client-framework-tree.mjs +16 -16
  68. package/fesm2022/yuuvis-client-framework-tree.mjs.map +1 -1
  69. package/fesm2022/yuuvis-client-framework-upload-progress.mjs +15 -15
  70. package/fesm2022/yuuvis-client-framework-upload-progress.mjs.map +1 -1
  71. package/fesm2022/yuuvis-client-framework-widget-grid.mjs +3 -946
  72. package/fesm2022/yuuvis-client-framework-widget-grid.mjs.map +1 -1
  73. package/fesm2022/yuuvis-client-framework.mjs +22 -22
  74. package/fesm2022/yuuvis-client-framework.mjs.map +1 -1
  75. package/lib/assets/i18n/de.json +1 -55
  76. package/lib/assets/i18n/en.json +1 -55
  77. package/list/README.md +1 -1
  78. package/master-details/README.md +1 -1
  79. package/overflow-hidden/README.md +1 -1
  80. package/overflow-menu/README.md +1 -1
  81. package/package.json +50 -48
  82. package/popout/README.md +1 -1
  83. package/split-view/README.md +1 -1
  84. package/types/yuuvis-client-framework-autocomplete.d.ts +1 -0
  85. package/{clipboard/index.d.ts → types/yuuvis-client-framework-clipboard.d.ts} +1 -1
  86. package/types/yuuvis-client-framework-common.d.ts +1 -0
  87. package/types/yuuvis-client-framework-list.d.ts +1 -0
  88. package/types/yuuvis-client-framework-master-details.d.ts +1 -0
  89. package/{object-flavor/index.d.ts → types/yuuvis-client-framework-object-flavor.d.ts} +1 -0
  90. package/types/yuuvis-client-framework-overflow-hidden.d.ts +1 -0
  91. package/types/yuuvis-client-framework-overflow-menu.d.ts +1 -0
  92. package/types/yuuvis-client-framework-popout.d.ts +1 -0
  93. package/{renderer/index.d.ts → types/yuuvis-client-framework-renderer.d.ts} +2 -2
  94. package/types/yuuvis-client-framework-split-view.d.ts +1 -0
  95. package/types/yuuvis-client-framework-widget-grid.d.ts +1 -0
  96. package/widget-grid/README.md +1 -46
  97. package/autocomplete/index.d.ts +0 -89
  98. package/common/index.d.ts +0 -536
  99. package/list/index.d.ts +0 -380
  100. package/master-details/index.d.ts +0 -69
  101. package/overflow-hidden/index.d.ts +0 -28
  102. package/overflow-menu/index.d.ts +0 -52
  103. package/popout/index.d.ts +0 -106
  104. package/split-view/index.d.ts +0 -197
  105. package/widget-grid/index.d.ts +0 -299
  106. /package/{actions/index.d.ts → types/yuuvis-client-framework-actions.d.ts} +0 -0
  107. /package/{app-bar/index.d.ts → types/yuuvis-client-framework-app-bar.d.ts} +0 -0
  108. /package/{breadcrumb/index.d.ts → types/yuuvis-client-framework-breadcrumb.d.ts} +0 -0
  109. /package/{datepicker/index.d.ts → types/yuuvis-client-framework-datepicker.d.ts} +0 -0
  110. /package/{forms/index.d.ts → types/yuuvis-client-framework-forms.d.ts} +0 -0
  111. /package/{icons/index.d.ts → types/yuuvis-client-framework-icons.d.ts} +0 -0
  112. /package/{metadata-form-defaults/index.d.ts → types/yuuvis-client-framework-metadata-form-defaults.d.ts} +0 -0
  113. /package/{metadata-form/index.d.ts → types/yuuvis-client-framework-metadata-form.d.ts} +0 -0
  114. /package/{object-details/index.d.ts → types/yuuvis-client-framework-object-details.d.ts} +0 -0
  115. /package/{object-form/index.d.ts → types/yuuvis-client-framework-object-form.d.ts} +0 -0
  116. /package/{object-preview/index.d.ts → types/yuuvis-client-framework-object-preview.d.ts} +0 -0
  117. /package/{object-relationship/index.d.ts → types/yuuvis-client-framework-object-relationship.d.ts} +0 -0
  118. /package/{object-summary/index.d.ts → types/yuuvis-client-framework-object-summary.d.ts} +0 -0
  119. /package/{object-versions/index.d.ts → types/yuuvis-client-framework-object-versions.d.ts} +0 -0
  120. /package/{pagination/index.d.ts → types/yuuvis-client-framework-pagination.d.ts} +0 -0
  121. /package/{query-list/index.d.ts → types/yuuvis-client-framework-query-list.d.ts} +0 -0
  122. /package/{sequence-list/index.d.ts → types/yuuvis-client-framework-sequence-list.d.ts} +0 -0
  123. /package/{simple-search/index.d.ts → types/yuuvis-client-framework-simple-search.d.ts} +0 -0
  124. /package/{sort/index.d.ts → types/yuuvis-client-framework-sort.d.ts} +0 -0
  125. /package/{tile-list/index.d.ts → types/yuuvis-client-framework-tile-list.d.ts} +0 -0
  126. /package/{token-search/index.d.ts → types/yuuvis-client-framework-token-search.d.ts} +0 -0
  127. /package/{tree/index.d.ts → types/yuuvis-client-framework-tree.d.ts} +0 -0
  128. /package/{upload-progress/index.d.ts → types/yuuvis-client-framework-upload-progress.d.ts} +0 -0
  129. /package/{index.d.ts → types/yuuvis-client-framework.d.ts} +0 -0
@@ -1,687 +1,11 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, linkedSignal, Input, Directive, contentChildren, output, HostAttributeToken, untracked, effect, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChild, NgModule } from '@angular/core';
3
- import { Utils } from '@yuuvis/client-core';
4
- import { ActiveDescendantKeyManager, A11yModule } from '@angular/cdk/a11y';
5
- import { Directionality } from '@angular/cdk/bidi';
6
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
7
- import * as i1 from '@angular/common';
8
- import { CommonModule } from '@angular/common';
1
+ export { ListComponent, ListItemDirective, ListTileComponent, YuvListModule } from '@yuuvis/client-components/list';
9
2
 
10
3
  /**
11
- * Directive for list items. It is used in the `yuvList` component
12
- * to keep track of active and selected items. Every element with this
13
- * directive will be treated as a list item and can be selected and focused.
14
- *
15
- *```html
16
- * <yuv-list (itemSelect)="itemSelected($event)">
17
- * <div yuvListItem>Entry #1</div>
18
- * <div yuvListItem>Entry #2</div>
19
- * </yuv-list>
20
- * ```
4
+ * @deprecated Import from `@yuuvis/client-components/list` instead.
5
+ * This entry point is a backward-compatibility shim and will be removed in a future release.
21
6
  */
22
- class ListItemDirective {
23
- constructor() {
24
- this.#elRef = inject(ElementRef);
25
- /**
26
- * Whether the item is active or not.
27
- */
28
- this.active = input(false, ...(ngDevMode ? [{ debugName: "active" }] : []));
29
- /**
30
- * Whether the item is selected or not.
31
- */
32
- this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : []));
33
- this.selectedInput = linkedSignal(...(ngDevMode ? [{ debugName: "selectedInput", source: this.selected,
34
- computation: (newOptions, previous) => (newOptions !== previous ? newOptions : previous) }] : [{
35
- source: this.selected,
36
- computation: (newOptions, previous) => (newOptions !== previous ? newOptions : previous)
37
- }]));
38
- this.activeInput = linkedSignal(...(ngDevMode ? [{ debugName: "activeInput", source: this.active,
39
- computation: (newOptions, previous) => (newOptions !== previous ? newOptions : previous) }] : [{
40
- source: this.active,
41
- computation: (newOptions, previous) => (newOptions !== previous ? newOptions : previous)
42
- }]));
43
- this.focusableChildren = [];
44
- this.focusedIndex = -1;
45
- }
46
- #elRef;
47
- onHostClick(evt) {
48
- if (!this.disabled && this.onClick) {
49
- this.#elRef.nativeElement.parentElement.focus();
50
- this.onClick(evt);
51
- }
52
- }
53
- setActiveStyles() {
54
- this.activeInput.set(true);
55
- this.#scrollIntoView();
56
- }
57
- setInactiveStyles() {
58
- this.activeInput.set(false);
59
- }
60
- focusNext() { }
61
- focusPrevious() { }
62
- #scrollIntoView() {
63
- const el = this.#elRef.nativeElement;
64
- const { bottom, top, left, right } = el.getBoundingClientRect();
65
- const containerRect = this.#elRef.nativeElement.parentElement.getBoundingClientRect();
66
- const offsetY = top <= containerRect.top
67
- ? containerRect.top - top > 0
68
- ? (containerRect.top - top) * -1
69
- : 0
70
- : bottom - containerRect.bottom > 0
71
- ? bottom - containerRect.bottom
72
- : 0;
73
- const offsetX = left <= containerRect.left
74
- ? containerRect.left - left > 0
75
- ? (containerRect.left - left) * -1
76
- : 0
77
- : right - containerRect.right > 0
78
- ? right - containerRect.right
79
- : 0;
80
- if (offsetX || offsetY)
81
- this.#elRef.nativeElement.parentElement.scrollBy(offsetX, offsetY);
82
- }
83
- ngAfterViewInit() {
84
- // get all focusable elements and set tabindex to -1
85
- this.focusableChildren = Utils.getFocusableChildren(this.#elRef.nativeElement);
86
- this.focusableChildren.forEach((el) => el.setAttribute('tabindex', '-1'));
87
- }
88
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ListItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
89
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.19", type: ListItemDirective, isStandalone: true, selector: "[yuvListItem]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "onHostClick($event)" }, properties: { "attr.aria-current": "activeInput()", "attr.aria-selected": "selectedInput()" } }, ngImport: i0 }); }
90
- }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ListItemDirective, decorators: [{
92
- type: Directive,
93
- args: [{
94
- selector: '[yuvListItem]',
95
- standalone: true,
96
- host: {
97
- '[attr.aria-current]': 'activeInput()',
98
- '[attr.aria-selected]': 'selectedInput()',
99
- '(click)': 'onHostClick($event)'
100
- }
101
- }]
102
- }], propDecorators: { disabled: [{
103
- type: Input
104
- }], active: [{ type: i0.Input, args: [{ isSignal: true, alias: "active", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }] } });
105
-
106
- /**
107
- * Accessible list component with keyboard navigation, single- and multi-selection,
108
- * and flexible delegation of click- and selection-handling to the parent.
109
- *
110
- * The component renders as an ARIA `listbox` and delegates keyboard focus tracking
111
- * to Angular CDK's `ActiveDescendantKeyManager`. Content is projected via
112
- * `[yuvListItem]`-attributed children (see `ListItemDirective`).
113
- *
114
- * **Key Features:**
115
- * - Single and multi-selection (with Shift / Ctrl modifier support)
116
- * - Full keyboard navigation (Arrow keys, Space, Enter, Escape)
117
- * - Horizontal and vertical layout via the `horizontal` host attribute
118
- * - Auto-selection on initialization via the `autoSelect` input
119
- * - Selection guarding via `preventChangeUntil` callback
120
- * - Optional delegation of click and selection handling to the parent component
121
- * - Accessible: `role="listbox"`, active-descendant focus management, `aria-selected` on items
122
- *
123
- * **Basic usage:**
124
- * ```html
125
- * <yuv-list (itemSelect)="onItemSelect($event)">
126
- * <div yuvListItem>Entry #1</div>
127
- * <div yuvListItem>Entry #2</div>
128
- * </yuv-list>
129
- * ```
130
- *
131
- * **Multi-selection with Shift/Ctrl:**
132
- * ```html
133
- * <yuv-list [multiselect]="true" (itemSelect)="onSelect($event)">
134
- * @for (item of items; track item.id) {
135
- * <div yuvListItem>{{ item.label }}</div>
136
- * }
137
- * </yuv-list>
138
- * ```
139
- *
140
- * **Host Attributes (set declaratively in the template):**
141
- * - `selectOnEnter` — treat the Enter key as a selection trigger (in addition to Space)
142
- * - `horizontal` — switch key navigation to left/right arrows instead of up/down
143
- *
144
- * @example
145
- * ```html
146
- * <!-- Horizontal list, Enter key selects -->
147
- * <yuv-list horizontal selectOnEnter (itemSelect)="onSelect($event)">
148
- * <button yuvListItem>A</button>
149
- * <button yuvListItem>B</button>
150
- * </yuv-list>
151
- * ```
152
- */
153
- class ListComponent {
154
- //#region Dependencies
155
- #dir;
156
- #elRef;
157
- #keyManager;
158
- #selection;
159
- #lastSelection;
160
- //#endregion
161
- //#region Lifecycle Hooks
162
- constructor() {
163
- //#region Dependencies
164
- this.#dir = inject(Directionality);
165
- this.#elRef = inject(ElementRef);
166
- //#endregion
167
- //#region Angular Stuff
168
- /**
169
- * All `[yuvListItem]` children projected into this list.
170
- *
171
- * Queried reactively via `contentChildren` — every time the projected content
172
- * changes (items added, removed, or reordered), the `#itemsEffect` re-runs,
173
- * rebuilds the key manager, and re-attaches click handlers.
174
- */
175
- this.items = contentChildren(ListItemDirective, ...(ngDevMode ? [{ debugName: "items" }] : []));
176
- /**
177
- * Guard function that temporarily blocks all selection changes.
178
- *
179
- * Provide a factory that returns a predicate; as long as that predicate
180
- * returns `true`, any attempt to change the selection (via click, keyboard,
181
- * or programmatic API) is silently ignored. Useful when the parent has
182
- * unsaved changes tied to the current selection and needs to prevent the user
183
- * from accidentally navigating away.
184
- *
185
- * @example
186
- * ```ts
187
- * // Block selection while a save is in progress
188
- * preventChangeUntil = () => () => this.isSaving();
189
- * ```
190
- *
191
- * @default () => false (never prevents)
192
- */
193
- this.preventChangeUntil = input(() => false, ...(ngDevMode ? [{ debugName: "preventChangeUntil" }] : []));
194
- /**
195
- * Enables multi-selection mode.
196
- *
197
- * When `true`, the user can hold **Shift** to range-select items between the last
198
- * selected item and the clicked one, or hold **Ctrl** to toggle individual items
199
- * in and out of the selection. The programmatic `multiSelect()` method is also
200
- * only effective when this input is `true`.
201
- *
202
- * @default false
203
- */
204
- this.multiselect = input(false, ...(ngDevMode ? [{ debugName: "multiselect" }] : []));
205
- /**
206
- * Delegates visual selection and focus state rendering to the parent component.
207
- *
208
- * When `false` (default), `yuv-list` applies `.selected` and `.active` CSS classes
209
- * to items via `ListItemDirective` signals, so the list stylesheet controls the look.
210
- * When `true`, those signals are still updated but the host gets the
211
- * `self-handle-selection` CSS class, which the parent can use to opt into its own
212
- * visual treatment — useful when item templates have custom selected/focused styling.
213
- *
214
- * @default false
215
- */
216
- this.selfHandleSelection = input(false, ...(ngDevMode ? [{ debugName: "selfHandleSelection" }] : []));
217
- /**
218
- * Disables the built-in click-to-select behavior, letting the parent component
219
- * decide when `select()` is called.
220
- *
221
- * By default the list attaches an `onClick` handler to every `ListItemDirective`
222
- * that calls `select()` with the correct Shift/Ctrl modifier flags. Set this
223
- * input to `true` to suppress that wiring — the parent must then call `select()`
224
- * imperatively in response to whatever interaction it chooses (e.g. a single-click
225
- * that is distinguished from a double-click by `ClickDoubleDirective`).
226
- *
227
- * @default false
228
- */
229
- this.selfHandleClick = input(false, ...(ngDevMode ? [{ debugName: "selfHandleClick" }] : []));
230
- /**
231
- * Automatically selects an item when the list is first rendered.
232
- *
233
- * The selection logic runs once per content-children change (see `#itemsEffect`)
234
- * and follows this priority order:
235
- * 1. The first non-disabled item that already carries the `selected` attribute.
236
- * 2. If no such item exists and `autoSelect` is `true`, the item at index 0.
237
- *
238
- * Accepts any truthy string value in addition to a real boolean because the
239
- * input is also consumable as a plain HTML attribute (`<yuv-list autoSelect>`).
240
- *
241
- * @default false
242
- */
243
- this.autoSelect = input(false, ...(ngDevMode ? [{ debugName: "autoSelect", transform: (value) => coerceBooleanProperty(value) }] : [{
244
- transform: (value) => coerceBooleanProperty(value)
245
- }]));
246
- /**
247
- * Emits the current selection as an array of zero-based item indices whenever
248
- * the selection changes — via click, keyboard, or programmatic API calls.
249
- *
250
- * An empty array signals that the selection has been cleared.
251
- *
252
- * @example
253
- * ```ts
254
- * onItemSelect(indices: number[]): void {
255
- * this.selectedItems = indices.map(i => this.items[i]);
256
- * }
257
- * ```
258
- */
259
- this.itemSelect = output();
260
- /**
261
- * Emits the zero-based index of the item that received keyboard focus
262
- * (i.e. the active descendant managed by `ActiveDescendantKeyManager`).
263
- *
264
- * Note that focus and selection are independent: navigating with arrow keys
265
- * moves focus without changing the selection until Space (or Enter when
266
- * `selectOnEnter` is set) is pressed.
267
- */
268
- this.itemFocus = output();
269
- /**
270
- * Puts the list into a display-only mode where no item can be selected.
271
- *
272
- * When `true`, all selection paths are blocked: clicks, keyboard shortcuts
273
- * (`Space`, `Enter`, `Escape`), and programmatic calls to `select()`,
274
- * `multiSelect()`, and `clear()` are all no-ops. The list still renders
275
- * normally and keyboard navigation still moves the focus indicator.
276
- *
277
- * @default false
278
- */
279
- this.disableSelection = input(false, ...(ngDevMode ? [{ debugName: "disableSelection" }] : []));
280
- //#endregion
281
- //#region Properties
282
- /**
283
- * When `true`, pressing **Enter** triggers item selection in addition to **Space**.
284
- *
285
- * Resolved once at construction time from the static `selectOnEnter` host attribute.
286
- * Useful in contexts where Enter has a conventional "confirm" meaning (e.g. search
287
- * result lists, command palettes).
288
- *
289
- * Set declaratively in the template: `<yuv-list selectOnEnter>`.
290
- */
291
- this.selectOnEnter = (inject(new HostAttributeToken('selectOnEnter'), { optional: true }) || 'false') === 'true';
292
- /**
293
- * When `true`, switches the `ActiveDescendantKeyManager` to horizontal mode so that
294
- * the **Left** / **Right** arrow keys navigate between items instead of **Up** / **Down**.
295
- *
296
- * Resolved once at construction time from the static `horizontal` host attribute.
297
- * The text direction of the document is respected automatically (RTL-aware via CDK
298
- * `Directionality`).
299
- *
300
- * Set declaratively in the template: `<yuv-list horizontal>`.
301
- */
302
- this.horizontal = (inject(new HostAttributeToken('horizontal'), { optional: true }) || 'false') === 'true';
303
- this.#selection = [];
304
- //#endregion
305
- //#region Effects
306
- this.#itemsEffect = () => {
307
- const items = this.items();
308
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
309
- if (this.#keyManager)
310
- this.#keyManager.destroy();
311
- untracked(() => {
312
- this.#keyManager = this.horizontal
313
- ? new ActiveDescendantKeyManager(items).withWrap().withHorizontalOrientation(this.#dir.value)
314
- : new ActiveDescendantKeyManager(items).withWrap();
315
- this.#keyManager.change.subscribe((activeIndex) => {
316
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
317
- if (activeIndex !== null) {
318
- this.#updateActiveItemState();
319
- this.itemFocus.emit(activeIndex);
320
- }
321
- });
322
- if (!this.selfHandleClick()) {
323
- items.forEach((item, index) => {
324
- item.onClick = (evt) => {
325
- this.select(index, evt.shiftKey, evt.ctrlKey);
326
- };
327
- item.activeInput.set(false);
328
- });
329
- }
330
- if (this.#lastSelection !== undefined && this.#lastSelection <= items.length) {
331
- this.select(this.#lastSelection);
332
- }
333
- this.#preselectItem();
334
- });
335
- };
336
- effect(this.#itemsEffect);
337
- }
338
- ngOnDestroy() {
339
- this.#keyManager.destroy();
340
- }
341
- //#endregion
342
- //#region Public
343
- /**
344
- * Moves keyboard focus to the item at the given index and selects it.
345
- *
346
- * Combines three operations in one call: updating the CDK key manager's active
347
- * descendant (which drives the ARIA active-descendant attribute and the visual focus ring),
348
- * selecting the item, and transferring DOM focus to the list host element so that
349
- * subsequent keyboard events are processed correctly.
350
- *
351
- * Safe to call before the key manager is initialized — the guard at the top of
352
- * the method prevents errors during early lifecycle phases.
353
- *
354
- * @param index Zero-based index of the item to activate.
355
- */
356
- setActiveItem(index) {
357
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
358
- if (this.#keyManager) {
359
- this.#keyManager.setActiveItem(index);
360
- this.#select(index);
361
- this.focus();
362
- }
363
- }
364
- /**
365
- * Transfers DOM focus to the list host element.
366
- *
367
- * Calling this ensures that subsequent keyboard events (arrow keys, Space, etc.)
368
- * are routed to the list's `(keydown)` handler. Called internally by
369
- * `setActiveItem()`, but also useful from the parent when programmatic focus
370
- * management is needed (e.g. after closing a dialog that was triggered from a
371
- * list item).
372
- */
373
- focus() {
374
- this.#elRef.nativeElement.focus();
375
- }
376
- /**
377
- * Smoothly scrolls the list container back to the top.
378
- *
379
- * Useful after programmatically refreshing the list contents when the user may
380
- * have scrolled far down and the new result set should be shown from the beginning.
381
- */
382
- scrollToTop() {
383
- this.#elRef.nativeElement.scrollTo({ top: 0, behavior: 'smooth' });
384
- }
385
- /**
386
- * Shifts all selected and focused item indices by the given offset.
387
- *
388
- * Use this when items are prepended or inserted at the beginning of the list so
389
- * that the existing selection and keyboard-focus position stay attached to the
390
- * same logical items after the index space shifts. A positive offset moves
391
- * indices forward (items were inserted before the selection); a negative offset
392
- * moves them backward (items were removed before the selection).
393
- *
394
- * Does **not** emit `itemSelect` — the selection indices change structurally,
395
- * not because the user chose different items.
396
- *
397
- * @param offset Number of positions to shift every selected index by.
398
- */
399
- shiftSelectionBy(offset) {
400
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
401
- if (this.#keyManager?.activeItemIndex !== null && this.#keyManager?.activeItemIndex !== undefined) {
402
- this.#keyManager.setActiveItem(this.#keyManager.activeItemIndex + offset);
403
- }
404
- this.#selection = this.#selection.map((i) => i + offset);
405
- if (this.#lastSelection !== undefined)
406
- this.#lastSelection += offset;
407
- this.items().forEach((item, i) => item.selectedInput.set(this.#selection.includes(i)));
408
- }
409
- /**
410
- * Programmatically replaces the entire selection with the given indices.
411
- *
412
- * Only effective when `multiselect` is `true` and `disableSelection` is `false`.
413
- * Out-of-range indices are silently discarded. The resulting selection is sorted
414
- * ascending before being applied and emitted.
415
- *
416
- * Use this when the parent needs to restore a previously saved multi-selection
417
- * state, e.g. after navigation or on component re-initialization.
418
- *
419
- * @param index Array of zero-based item indices to select.
420
- */
421
- multiSelect(index) {
422
- if (this.#preventEmit())
423
- return;
424
- if (!this.multiselect() || this.disableSelection())
425
- return;
426
- this.#selection = index.filter((i) => i >= 0 && i < this.items().length);
427
- this.#selection.sort();
428
- this.items().forEach((item, i) => item.selectedInput.set(this.#selection.includes(i)));
429
- this.#emitSelection();
430
- }
431
- /**
432
- * Selects the item at the given index, optionally extending or toggling
433
- * the existing selection using modifier-key semantics.
434
- *
435
- * - **No modifiers** (default): replaces the current selection with the single item.
436
- * - **`shiftKey = true`** (`multiselect` only): range-selects all items between the
437
- * last selected index and `index` (inclusive of neither endpoint, matching typical
438
- * OS list behavior).
439
- * - **`ctrlKey = true`** (`multiselect` only): toggles `index` in the selection
440
- * without affecting the rest.
441
- *
442
- * Index is clamped to `[0, items.length - 1]`. Negative values and calls while
443
- * `disableSelection` is `true` are ignored. The `preventChangeUntil` guard is
444
- * also respected.
445
- *
446
- * Emits `itemSelect` after updating the visual state.
447
- *
448
- * @param index Zero-based index of the item to select.
449
- * @param shiftKey Extend the selection from the last selected item to `index`.
450
- * @param ctrlKey Toggle `index` in or out of the current selection.
451
- */
452
- select(index, shiftKey = false, ctrlKey = false) {
453
- if (this.#preventEmit())
454
- return;
455
- if (this.disableSelection() || index < 0)
456
- return;
457
- if (index >= this.items().length)
458
- index = this.items().length - 1;
459
- this.#select(index, shiftKey, ctrlKey);
460
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
461
- if (this.#keyManager)
462
- this.#keyManager.setActiveItem(index);
463
- this.#emitSelection();
464
- }
465
- /**
466
- * Clears the current selection and resets the active keyboard-focus index.
467
- *
468
- * If the selection is already empty, the method is a no-op (no event emitted,
469
- * no state update). The `preventChangeUntil` guard is respected — if the guard
470
- * returns `true`, the clear is blocked entirely.
471
- *
472
- * Also triggered internally when the user presses **Escape**.
473
- *
474
- * @param silent When `true`, skips emitting `itemSelect` after clearing. Use this
475
- * when the parent needs to reset state programmatically without
476
- * triggering downstream reactions.
477
- */
478
- clear(silent = false) {
479
- if (this.#preventEmit())
480
- return;
481
- if (this.#selection.length !== 0) {
482
- this.#select(-1);
483
- this.#keyManager.setActiveItem(-1);
484
- if (!silent)
485
- this.#emitSelection();
486
- }
487
- }
488
- //#endregion
489
- //#region UI Methods
490
- /**
491
- * Host `keydown` handler — routes keyboard events to selection or navigation logic.
492
- *
493
- * Handled keys:
494
- * - **Escape**: clears the selection.
495
- * - **Space** (always) / **Enter** (when `selectOnEnter` is set): selects the
496
- * currently focused item. `preventDefault()` is called to stop the browser
497
- * from scrolling the container when Space is pressed.
498
- * - **All other keys**: forwarded to `ActiveDescendantKeyManager` so arrow keys,
499
- * Home, End, etc. move the focus indicator without changing the selection.
500
- *
501
- * When `disableSelection` is `true`, only navigation keys are forwarded to the
502
- * key manager — selection keys (Space, Enter, Escape) are suppressed.
503
- *
504
- * Bound via the `host` metadata as `(keydown)`.
505
- *
506
- * @param event The keyboard event originating from the list host element.
507
- */
508
- onKeydown(event) {
509
- if (this.disableSelection()) {
510
- this.#keyManager?.onKeydown(event);
511
- return;
512
- }
513
- if (event.code === 'Escape') {
514
- this.clear();
515
- }
516
- if (event.code === 'Space' || (this.selectOnEnter && event.code === 'Enter')) {
517
- // prevent default behavior of space in scroll environments
518
- if (this.#preventEmit())
519
- return;
520
- event.preventDefault();
521
- const aii = this.#keyManager.activeItemIndex !== null ? this.#keyManager.activeItemIndex : -1;
522
- if (aii >= 0) {
523
- this.#select(aii);
524
- this.#emitSelection();
525
- }
526
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
527
- }
528
- else
529
- this.#keyManager?.onKeydown(event);
530
- }
531
- /**
532
- * Host `focus` handler — restores a sensible focus position when the list
533
- * host element receives DOM focus without an item already being active.
534
- *
535
- * The logic runs inside a 300 ms timeout so that focus events triggered by
536
- * an item being clicked (which also bubbles a focus event up to the host)
537
- * have already resolved their own active-item state before this handler acts.
538
- * If an active item already exists when the timeout fires, nothing happens.
539
- *
540
- * Focus target priority:
541
- * 1. The first index in the current selection (so the user lands back on the
542
- * previously selected item when tabbing into the list).
543
- * 2. Index 0 as the fallback when there is no selection.
544
- *
545
- * Bound via the `host` metadata as `(focus)`.
546
- */
547
- onFocus() {
548
- // set timeout to check if the focus is coming from an item being clicked
549
- setTimeout(() => {
550
- // if there already is an active item, we do not want to set the focus again
551
- if (this.#keyManager.activeItemIndex === -1 && this.items().length > 0) {
552
- const indexToFocus = this.#selection.length > 0 ? this.#selection[0] : 0;
553
- this.#keyManager.setActiveItem(indexToFocus);
554
- this.itemFocus.emit(indexToFocus);
555
- this.#updateActiveItemState();
556
- }
557
- // eslint-disable-next-line @typescript-eslint/no-magic-numbers
558
- }, 300);
559
- }
560
- //#endregion
561
- //#region Utilities
562
- #preventEmit() {
563
- const preventUntilIsTrue = this.preventChangeUntil();
564
- return preventUntilIsTrue();
565
- }
566
- #select(index, shiftKey = false, ctrlKey = false) {
567
- if (index === -1)
568
- this.#selection = [];
569
- else {
570
- if (this.multiselect()) {
571
- this.#selection = this.#selection.filter((i) => i !== index);
572
- if (ctrlKey) {
573
- this.#selection.push(index);
574
- }
575
- else if (shiftKey) {
576
- if (this.#lastSelection) {
577
- for (let i = this.#lastSelection < index ? this.#lastSelection : index; i < (this.#lastSelection > index ? this.#lastSelection : index); i++) {
578
- this.#selection.push(i);
579
- }
580
- }
581
- else {
582
- this.#selection = [index];
583
- }
584
- }
585
- else {
586
- this.#selection = [index];
587
- }
588
- }
589
- else
590
- this.#selection = [index];
591
- }
592
- this.#lastSelection = this.#selection.length === 0 ? undefined : index;
593
- this.#selection.sort();
594
- this.items().forEach((item, i) => item.selectedInput.set(this.#selection.includes(i)));
595
- }
596
- #updateActiveItemState() {
597
- const activeIndex = this.#keyManager.activeItemIndex;
598
- this.items().forEach((item, i) => {
599
- item.activeInput.set(i === activeIndex);
600
- });
601
- }
602
- #emitSelection() {
603
- this.itemSelect.emit(this.#selection);
604
- }
605
- #preselectItem() {
606
- if (this.#selection.length > 0)
607
- return; // if there is already a selection, do not preselect
608
- const items = this.items();
609
- const autoSelect = this.autoSelect();
610
- let itemIndexToSelect = -1;
611
- // If the list has no items, do nothing.
612
- if (items.length < 1)
613
- return;
614
- // Find the first item that has the "selected"-attribute and is not disabled
615
- itemIndexToSelect = items.findIndex((item) => item.selected() && !item.disabled);
616
- // If no valid item index is given, but autoSelect is true, select the first item
617
- if (itemIndexToSelect === -1 && autoSelect) {
618
- itemIndexToSelect = 0;
619
- }
620
- // If there is a valid item index, select that item, otherwise do nothing
621
- if (itemIndexToSelect !== -1) {
622
- this.select(itemIndexToSelect);
623
- }
624
- }
625
- //#endregion
626
- //#region Effects
627
- #itemsEffect;
628
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
629
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.19", type: ListComponent, isStandalone: true, selector: "yuv-list", inputs: { preventChangeUntil: { classPropertyName: "preventChangeUntil", publicName: "preventChangeUntil", isSignal: true, isRequired: false, transformFunction: null }, multiselect: { classPropertyName: "multiselect", publicName: "multiselect", isSignal: true, isRequired: false, transformFunction: null }, selfHandleSelection: { classPropertyName: "selfHandleSelection", publicName: "selfHandleSelection", isSignal: true, isRequired: false, transformFunction: null }, selfHandleClick: { classPropertyName: "selfHandleClick", publicName: "selfHandleClick", isSignal: true, isRequired: false, transformFunction: null }, autoSelect: { classPropertyName: "autoSelect", publicName: "autoSelect", isSignal: true, isRequired: false, transformFunction: null }, disableSelection: { classPropertyName: "disableSelection", publicName: "disableSelection", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { itemSelect: "itemSelect", itemFocus: "itemFocus" }, host: { attributes: { "role": "listbox", "tabindex": "0" }, listeners: { "focus": "onFocus()", "keydown": "onKeydown($event)" }, properties: { "class.self-handle-selection": "selfHandleSelection()" } }, queries: [{ propertyName: "items", predicate: ListItemDirective, isSignal: true }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["yuv-list{display:block;max-height:100%;overflow-y:auto;outline:none}yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile)){position:relative;cursor:pointer;transition:background-color .2s ease,color .2s ease,border-color .2s ease}yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile)):hover,yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile))[aria-current=true]{background-color:var(--ymt-focus-background);color:var(--ymt-on-focus-background)}yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile))[aria-selected=true]{background-color:var(--ymt-selection-background);color:var(--ymt-on-selection-background);font-weight:500}yuv-list:not(.self-handle-selection) [yuvListItem]:has(yuv-list-tile):hover:not([aria-selected=true]) .tile{--_tile-background: var(--ymt-hover-background)}yuv-list:not(.self-handle-selection) [yuvListItem]:has(yuv-list-tile)[aria-selected=true] .tile{--_tile-background: var(--ymt-selection-background)}yuv-list:not(.self-handle-selection) [yuvListItem]:has(yuv-list-tile)[aria-current=true] .tile{--_tile-background: var(--ymt-focus-background)}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
630
- }
631
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ListComponent, decorators: [{
632
- type: Component,
633
- args: [{ selector: 'yuv-list', standalone: true, imports: [A11yModule], template: '<ng-content />', encapsulation: ViewEncapsulation.None, host: {
634
- role: 'listbox',
635
- tabindex: '0',
636
- '[class.self-handle-selection]': 'selfHandleSelection()',
637
- '(focus)': 'onFocus()',
638
- '(keydown)': 'onKeydown($event)'
639
- }, changeDetection: ChangeDetectionStrategy.OnPush, styles: ["yuv-list{display:block;max-height:100%;overflow-y:auto;outline:none}yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile)){position:relative;cursor:pointer;transition:background-color .2s ease,color .2s ease,border-color .2s ease}yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile)):hover,yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile))[aria-current=true]{background-color:var(--ymt-focus-background);color:var(--ymt-on-focus-background)}yuv-list:not(.self-handle-selection) [yuvListItem]:not(:has(yuv-list-tile))[aria-selected=true]{background-color:var(--ymt-selection-background);color:var(--ymt-on-selection-background);font-weight:500}yuv-list:not(.self-handle-selection) [yuvListItem]:has(yuv-list-tile):hover:not([aria-selected=true]) .tile{--_tile-background: var(--ymt-hover-background)}yuv-list:not(.self-handle-selection) [yuvListItem]:has(yuv-list-tile)[aria-selected=true] .tile{--_tile-background: var(--ymt-selection-background)}yuv-list:not(.self-handle-selection) [yuvListItem]:has(yuv-list-tile)[aria-current=true] .tile{--_tile-background: var(--ymt-focus-background)}\n"] }]
640
- }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => ListItemDirective), { isSignal: true }] }], preventChangeUntil: [{ type: i0.Input, args: [{ isSignal: true, alias: "preventChangeUntil", required: false }] }], multiselect: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiselect", required: false }] }], selfHandleSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "selfHandleSelection", required: false }] }], selfHandleClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "selfHandleClick", required: false }] }], autoSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoSelect", required: false }] }], itemSelect: [{ type: i0.Output, args: ["itemSelect"] }], itemFocus: [{ type: i0.Output, args: ["itemFocus"] }], disableSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableSelection", required: false }] }] } });
641
-
642
- class ListTileComponent {
643
- constructor() {
644
- this.iconSlot = contentChild('iconSlot', ...(ngDevMode ? [{ debugName: "iconSlot", descendants: true }] : [{
645
- descendants: true
646
- }]));
647
- this.titleSlot = contentChild('titleSlot', ...(ngDevMode ? [{ debugName: "titleSlot" }] : []));
648
- this.descriptionSlot = contentChild('descriptionSlot', ...(ngDevMode ? [{ debugName: "descriptionSlot" }] : []));
649
- this.asideSlot = contentChild('asideSlot', ...(ngDevMode ? [{ debugName: "asideSlot" }] : []));
650
- this.actionsSlot = contentChild('actionsSlot', ...(ngDevMode ? [{ debugName: "actionsSlot", descendants: true }] : [{
651
- descendants: true
652
- }]));
653
- this.badgesSlot = contentChild('badgesSlot', ...(ngDevMode ? [{ debugName: "badgesSlot" }] : []));
654
- this.metaSlot = contentChild('metaSlot', ...(ngDevMode ? [{ debugName: "metaSlot" }] : []));
655
- this.extensionSlot = contentChild('extensionSlot', ...(ngDevMode ? [{ debugName: "extensionSlot" }] : []));
656
- }
657
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ListTileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
658
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "20.3.19", type: ListTileComponent, isStandalone: true, selector: "yuv-list-tile", queries: [{ propertyName: "iconSlot", first: true, predicate: ["iconSlot"], descendants: true, isSignal: true }, { propertyName: "titleSlot", first: true, predicate: ["titleSlot"], descendants: true, isSignal: true }, { propertyName: "descriptionSlot", first: true, predicate: ["descriptionSlot"], descendants: true, isSignal: true }, { propertyName: "asideSlot", first: true, predicate: ["asideSlot"], descendants: true, isSignal: true }, { propertyName: "actionsSlot", first: true, predicate: ["actionsSlot"], descendants: true, isSignal: true }, { propertyName: "badgesSlot", first: true, predicate: ["badgesSlot"], descendants: true, isSignal: true }, { propertyName: "metaSlot", first: true, predicate: ["metaSlot"], descendants: true, isSignal: true }, { propertyName: "extensionSlot", first: true, predicate: ["extensionSlot"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-content></ng-content>\n<div class=\"tile\">\n <div data-slot=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconSlot() || null\"></ng-container>\n </div>\n <div class=\"slots\"> \n <div data-slot=\"title-description\">\n <div data-slot=\"title\">\n <ng-container *ngTemplateOutlet=\"titleSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"description\">\n <ng-container *ngTemplateOutlet=\"descriptionSlot() || null\"></ng-container>\n </div>\n </div>\n <div data-slot=\"actions\">\n <ng-container *ngTemplateOutlet=\"actionsSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"aside\">\n <ng-container *ngTemplateOutlet=\"asideSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"meta\">\n <ng-container *ngTemplateOutlet=\"metaSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"badges\">\n <ng-container *ngTemplateOutlet=\"badgesSlot() || null\"></ng-container>\n </div>\n <div class=\"extension\">\n <ng-container *ngTemplateOutlet=\"extensionSlot() || null\"></ng-container>\n </div>\n </div>\n</div>\n", styles: [":host{--_tile-background: var(--tile-background, transparent);--_tile-margin: var(--tile-margin, var(--ymt-spacing-xs));--_tile-padding-inline: var(--tile-padding-inline, var(--ymt-spacing-2xl));--_tile-padding-block: var(--tile-padding-block, var(--ymt-spacing-l));--_transition-duration: var(--transition-duration, .1s);--_tile-icon-size: var(--tile-icon-size, initial);--_tile-font-title: var(--tile-font-title, var(--ymt-font-title-smallest));--_tile-font-description: var(--tile-font-description, var(--ymt-font-body));--_tile-font-meta: var(--tile-font-meta, var(--ymt-font-body-subtle));--_tile-font-aside: var(--tile-font-aside, var(--ymt-font-body-subtle));display:block;cursor:pointer}:host.dense .tile{--_tile-padding-inline: var(--ymt-spacing-m);--_tile-padding-block: var(--ymt-spacing-s);--_tile-margin: var(--ymt-spacing-xs);gap:var(--ymt-spacing-s)}:host.dense .tile .extension,:host.dense .tile [data-slot=aside],:host.dense .tile [data-slot=meta],:host.dense .tile [data-slot=actions]{display:none}:host.dense .tile [data-slot=icon]{--icon-renderer-icon-size: 18px}:host .tile{display:flex;align-items:center;background-color:var(--_tile-background);padding:calc(var(--_tile-padding-block) - var(--_tile-margin)) calc(var(--_tile-padding-inline) - var(--_tile-margin));transition:background-color var(--_transition-duration);position:relative;color:var(--ymt-text-color);border-radius:var(--ymt-corner-s);margin:var(--_tile-margin);gap:var(--ymt-spacing-m)}:host .tile .slots{display:grid;grid-template-rows:repeat(4,auto);grid-template-columns:auto;grid-template-areas:\"title-description title-description actions\" \"meta meta aside\" \"badges badges badges\" \"ext ext ext\";flex:1}:host .tile [data-slot]{-webkit-user-select:none;user-select:none;display:grid;align-self:baseline;word-break:break-word}:host .tile [data-slot=icon]{--icon-renderer-icon-size: var(--_tile-icon-size);grid-area:icon;display:flex;align-self:flex-start}:host .tile [data-slot=title-description]{grid-area:title-description;display:grid;grid-template-areas:\"title\" \"description\";align-self:flex-start}:host .tile [data-slot=title]{font:var(--_tile-font-title);grid-area:title;align-self:flex-start;--tile-slot-padding: 0}:host .tile [data-slot=description]{grid-area:description;font:var(--_tile-font-description);color:var(--ymt-text-color-subtle);--tile-slot-padding: 0}:host .tile [data-slot=meta]{grid-area:meta;font:var(--_tile-font-meta);color:var(--ymt-text-color-subtle);--tile-slot-padding: var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) 0}:host .tile [data-slot=aside]{flex:0 0 auto;grid-area:aside;font:var(--_tile-font-aside);color:var(--ymt-text-color-subtle);justify-content:flex-end;text-align:right;--tile-slot-padding: var(--ymt-spacing-2xs)}:host .tile [data-slot=actions]{opacity:.2;transition:opacity var(--_transition-duration);pointer-events:none;display:flex;justify-content:flex-end;padding-block-end:var(--ymt-spacing-2xs);gap:var(--ymt-spacing-3xs)}:host .tile:hover [data-slot=actions]{opacity:1;pointer-events:all}:host .tile [data-slot=actions]{grid-area:actions;flex:0 0 auto;display:flex;align-items:start}:host .tile [data-slot=actions] button{gap:2px}:host .tile [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host .tile .extension{grid-area:ext}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
659
- }
660
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: ListTileComponent, decorators: [{
661
- type: Component,
662
- args: [{ selector: 'yuv-list-tile', imports: [CommonModule], template: "<ng-content></ng-content>\n<div class=\"tile\">\n <div data-slot=\"icon\">\n <ng-container *ngTemplateOutlet=\"iconSlot() || null\"></ng-container>\n </div>\n <div class=\"slots\"> \n <div data-slot=\"title-description\">\n <div data-slot=\"title\">\n <ng-container *ngTemplateOutlet=\"titleSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"description\">\n <ng-container *ngTemplateOutlet=\"descriptionSlot() || null\"></ng-container>\n </div>\n </div>\n <div data-slot=\"actions\">\n <ng-container *ngTemplateOutlet=\"actionsSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"aside\">\n <ng-container *ngTemplateOutlet=\"asideSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"meta\">\n <ng-container *ngTemplateOutlet=\"metaSlot() || null\"></ng-container>\n </div>\n <div data-slot=\"badges\">\n <ng-container *ngTemplateOutlet=\"badgesSlot() || null\"></ng-container>\n </div>\n <div class=\"extension\">\n <ng-container *ngTemplateOutlet=\"extensionSlot() || null\"></ng-container>\n </div>\n </div>\n</div>\n", styles: [":host{--_tile-background: var(--tile-background, transparent);--_tile-margin: var(--tile-margin, var(--ymt-spacing-xs));--_tile-padding-inline: var(--tile-padding-inline, var(--ymt-spacing-2xl));--_tile-padding-block: var(--tile-padding-block, var(--ymt-spacing-l));--_transition-duration: var(--transition-duration, .1s);--_tile-icon-size: var(--tile-icon-size, initial);--_tile-font-title: var(--tile-font-title, var(--ymt-font-title-smallest));--_tile-font-description: var(--tile-font-description, var(--ymt-font-body));--_tile-font-meta: var(--tile-font-meta, var(--ymt-font-body-subtle));--_tile-font-aside: var(--tile-font-aside, var(--ymt-font-body-subtle));display:block;cursor:pointer}:host.dense .tile{--_tile-padding-inline: var(--ymt-spacing-m);--_tile-padding-block: var(--ymt-spacing-s);--_tile-margin: var(--ymt-spacing-xs);gap:var(--ymt-spacing-s)}:host.dense .tile .extension,:host.dense .tile [data-slot=aside],:host.dense .tile [data-slot=meta],:host.dense .tile [data-slot=actions]{display:none}:host.dense .tile [data-slot=icon]{--icon-renderer-icon-size: 18px}:host .tile{display:flex;align-items:center;background-color:var(--_tile-background);padding:calc(var(--_tile-padding-block) - var(--_tile-margin)) calc(var(--_tile-padding-inline) - var(--_tile-margin));transition:background-color var(--_transition-duration);position:relative;color:var(--ymt-text-color);border-radius:var(--ymt-corner-s);margin:var(--_tile-margin);gap:var(--ymt-spacing-m)}:host .tile .slots{display:grid;grid-template-rows:repeat(4,auto);grid-template-columns:auto;grid-template-areas:\"title-description title-description actions\" \"meta meta aside\" \"badges badges badges\" \"ext ext ext\";flex:1}:host .tile [data-slot]{-webkit-user-select:none;user-select:none;display:grid;align-self:baseline;word-break:break-word}:host .tile [data-slot=icon]{--icon-renderer-icon-size: var(--_tile-icon-size);grid-area:icon;display:flex;align-self:flex-start}:host .tile [data-slot=title-description]{grid-area:title-description;display:grid;grid-template-areas:\"title\" \"description\";align-self:flex-start}:host .tile [data-slot=title]{font:var(--_tile-font-title);grid-area:title;align-self:flex-start;--tile-slot-padding: 0}:host .tile [data-slot=description]{grid-area:description;font:var(--_tile-font-description);color:var(--ymt-text-color-subtle);--tile-slot-padding: 0}:host .tile [data-slot=meta]{grid-area:meta;font:var(--_tile-font-meta);color:var(--ymt-text-color-subtle);--tile-slot-padding: var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) var(--ymt-spacing-2xs) 0}:host .tile [data-slot=aside]{flex:0 0 auto;grid-area:aside;font:var(--_tile-font-aside);color:var(--ymt-text-color-subtle);justify-content:flex-end;text-align:right;--tile-slot-padding: var(--ymt-spacing-2xs)}:host .tile [data-slot=actions]{opacity:.2;transition:opacity var(--_transition-duration);pointer-events:none;display:flex;justify-content:flex-end;padding-block-end:var(--ymt-spacing-2xs);gap:var(--ymt-spacing-3xs)}:host .tile:hover [data-slot=actions]{opacity:1;pointer-events:all}:host .tile [data-slot=actions]{grid-area:actions;flex:0 0 auto;display:flex;align-items:start}:host .tile [data-slot=actions] button{gap:2px}:host .tile [data-slot=badges]{grid-area:badges;justify-self:end;flex:0 0 auto}:host .tile .extension{grid-area:ext}\n"] }]
663
- }], propDecorators: { iconSlot: [{ type: i0.ContentChild, args: ['iconSlot', { ...{
664
- descendants: true
665
- }, isSignal: true }] }], titleSlot: [{ type: i0.ContentChild, args: ['titleSlot', { isSignal: true }] }], descriptionSlot: [{ type: i0.ContentChild, args: ['descriptionSlot', { isSignal: true }] }], asideSlot: [{ type: i0.ContentChild, args: ['asideSlot', { isSignal: true }] }], actionsSlot: [{ type: i0.ContentChild, args: ['actionsSlot', { ...{
666
- descendants: true
667
- }, isSignal: true }] }], badgesSlot: [{ type: i0.ContentChild, args: ['badgesSlot', { isSignal: true }] }], metaSlot: [{ type: i0.ContentChild, args: ['metaSlot', { isSignal: true }] }], extensionSlot: [{ type: i0.ContentChild, args: ['extensionSlot', { isSignal: true }] }] } });
668
-
669
- class YuvListModule {
670
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: YuvListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
671
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.19", ngImport: i0, type: YuvListModule, imports: [ListComponent, ListItemDirective, ListTileComponent], exports: [ListComponent, ListItemDirective, ListTileComponent] }); }
672
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: YuvListModule, imports: [ListComponent, ListTileComponent] }); }
673
- }
674
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.19", ngImport: i0, type: YuvListModule, decorators: [{
675
- type: NgModule,
676
- args: [{
677
- imports: [ListComponent, ListItemDirective, ListTileComponent],
678
- exports: [ListComponent, ListItemDirective, ListTileComponent]
679
- }]
680
- }] });
681
7
 
682
8
  /**
683
9
  * Generated bundle index. Do not edit.
684
10
  */
685
-
686
- export { ListComponent, ListItemDirective, ListTileComponent, YuvListModule };
687
11
  //# sourceMappingURL=yuuvis-client-framework-list.mjs.map