@cocoar/ui 0.1.0-beta.99 → 0.1.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 (43) hide show
  1. package/README.md +21 -11
  2. package/fesm2022/cocoar-ui-components.mjs +9549 -0
  3. package/fesm2022/cocoar-ui-components.mjs.map +1 -0
  4. package/fesm2022/cocoar-ui-menu.mjs +1082 -0
  5. package/fesm2022/cocoar-ui-menu.mjs.map +1 -0
  6. package/fesm2022/cocoar-ui-overlay.mjs +1284 -0
  7. package/fesm2022/cocoar-ui-overlay.mjs.map +1 -0
  8. package/fesm2022/cocoar-ui.mjs +8 -0
  9. package/fesm2022/cocoar-ui.mjs.map +1 -0
  10. package/llms-full.txt +2303 -0
  11. package/llms.txt +82 -0
  12. package/package.json +38 -19
  13. package/styles/all.css +9 -0
  14. package/styles/components.css +127 -0
  15. package/styles/tokens/all.css +38 -0
  16. package/styles/tokens/code-block.css +72 -0
  17. package/styles/tokens/colors-primitives-dark.css +84 -0
  18. package/styles/tokens/colors-primitives-light.css +75 -0
  19. package/styles/tokens/colors-usage.css +272 -0
  20. package/styles/tokens/components-shared.css +42 -0
  21. package/styles/tokens/elevation.css +30 -0
  22. package/styles/tokens/focus.css +30 -0
  23. package/styles/tokens/layers.css +17 -0
  24. package/styles/tokens/menu.css +53 -0
  25. package/styles/tokens/motion.css +93 -0
  26. package/styles/tokens/new-components.css +104 -0
  27. package/styles/tokens/radius.css +15 -0
  28. package/styles/tokens/select-overlay.css +40 -0
  29. package/styles/tokens/shadows.css +38 -0
  30. package/styles/tokens/sidebar.css +67 -0
  31. package/styles/tokens/spacing.css +16 -0
  32. package/styles/tokens/stroke-width.css +12 -0
  33. package/styles/tokens/type-primitives.css +23 -0
  34. package/styles/tokens/typography-responsive.css +44 -0
  35. package/styles/tokens/typography.css +41 -0
  36. package/types/cocoar-ui-components.d.ts +3719 -0
  37. package/types/cocoar-ui-menu.d.ts +326 -0
  38. package/types/cocoar-ui-overlay.d.ts +301 -0
  39. package/types/cocoar-ui.d.ts +3 -0
  40. package/src/index.d.ts +0 -4
  41. package/src/index.d.ts.map +0 -1
  42. package/src/index.js +0 -5
  43. package/src/index.js.map +0 -1
package/llms-full.txt ADDED
@@ -0,0 +1,2303 @@
1
+ # Cocoar UI — Full API Reference
2
+ > Angular 21 component library with design tokens. Package: @cocoar/ui
3
+
4
+ Docs: https://cocoar-dev.github.io/cocoar-ui/
5
+ Source: https://github.com/cocoar-dev/cocoar-ui
6
+
7
+ ---
8
+
9
+ # Display
10
+
11
+ ## coar-button
12
+
13
+ **Selector:** `<coar-button>`
14
+ **Class:** `CoarButtonComponent`
15
+ **Import:** `import { CoarButtonComponent } from '@cocoar/ui';`
16
+
17
+ ### Inputs
18
+
19
+ | Name | Type | Default | Required | Description |
20
+ |------|------|---------|----------|-------------|
21
+ | variant | `ButtonVariant` | `'primary'` | No | Button visual variant |
22
+ | size | `ButtonSize` | `'m'` | No | Button size |
23
+ | disabled | `boolean` | `false` | No | Whether the button is disabled |
24
+ | loading | `boolean` | `false` | No | Whether the button is in loading state |
25
+ | type | `'button' | 'submit' | 'reset'` | `'button'` | No | Button type attribute |
26
+ | iconStart | `string | undefined` | `undefined` | No | Icon to display before the label |
27
+ | iconEnd | `string | undefined` | `undefined` | No | Icon to display after the label |
28
+ | fullWidth | `boolean` | `false` | No | Whether the button should take full width |
29
+ | ariaLabel | `string` | `''` | No | Optional aria-label applied to the underlying <button> element |
30
+
31
+ ### Outputs
32
+
33
+ | Name | Type | Description |
34
+ |------|------|-------------|
35
+ | clicked | `MouseEvent` | Emitted when the button is clicked (not emitted when disabled or loading) |
36
+
37
+ ### Content Slots
38
+
39
+ - Default slot: `<ng-content />`
40
+
41
+ ### Related Types
42
+
43
+ ```typescript
44
+ type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'danger' | 'ghost';
45
+ ```
46
+
47
+ ```typescript
48
+ type ButtonSize = 'xs' | 's' | 'm' | 'l';
49
+ ```
50
+
51
+ ## coar-badge
52
+
53
+ **Selector:** `<coar-badge>`
54
+ **Class:** `CoarBadgeComponent`
55
+ **Import:** `import { CoarBadgeComponent } from '@cocoar/ui';`
56
+
57
+ ### Inputs
58
+
59
+ | Name | Type | Default | Required | Description |
60
+ |------|------|---------|----------|-------------|
61
+ | content | `string | number` | `''` | No | Content to display in the badge (number, text, or icon) |
62
+ | variant | `BadgeVariant` | `'primary'` | No | Badge visual variant |
63
+ | size | `BadgeSize` | `'m'` | No | Badge size |
64
+ | pulse | `boolean` | `false` | No | Whether the badge should pulse/animate (for notifications) |
65
+ | dot | `boolean` | `false` | No | Whether to show as a dot without content |
66
+ | max | `number | null` | `null` | No | Maximum number to display (shows "99+" if exceeded) |
67
+ | bordered | `boolean` | `false` | No | Whether to show a border around the badge |
68
+
69
+ ### Related Types
70
+
71
+ ```typescript
72
+ type BadgeVariant = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
73
+ ```
74
+
75
+ ```typescript
76
+ type BadgeSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'auto';
77
+ ```
78
+
79
+ ## coar-tag
80
+
81
+ **Selector:** `<coar-tag>`
82
+ **Class:** `CoarTagComponent`
83
+ **Import:** `import { CoarTagComponent } from '@cocoar/ui';`
84
+
85
+ CoarTagComponent
86
+ A compact label component for categorizing, labeling, or marking content.
87
+ Shares the same variant system as CoarCard for visual consistency.
88
+ Unlike badges (pill-shaped, for counts/notifications), tags use
89
+ slight rounding and support interactive features like closing.
90
+
91
+ ### Inputs
92
+
93
+ | Name | Type | Default | Required | Description |
94
+ |------|------|---------|----------|-------------|
95
+ | variant | `TagVariant` | `'neutral'` | No | Tag semantic variant - matches Card variants |
96
+ | size | `TagSize` | `'m'` | No | Tag size |
97
+ | closable | `boolean` | `false` | No | Whether the tag can be closed/removed |
98
+ | elevated | `boolean` | `false` | No | Adds a box-shadow for elevation/depth. |
99
+ | borderless | `boolean` | `false` | No | Removes the border from the tag, leaving only background color. |
100
+
101
+ ### Outputs
102
+
103
+ | Name | Type | Description |
104
+ |------|------|-------------|
105
+ | closed | `void` | Emitted when the close button is clicked |
106
+
107
+ ### Content Slots
108
+
109
+ - Default slot: `<ng-content />`
110
+
111
+ ### CSS Custom Properties
112
+
113
+ | Property | Default |
114
+ |----------|---------|
115
+ | `--coar-tag-bg` | — |
116
+ | `--coar-tag-border-color` | — |
117
+
118
+ ### Related Types
119
+
120
+ ```typescript
121
+ type TagVariant = 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'accent';
122
+ ```
123
+ Tag semantic variants - mirrors CardVariant for visual consistency.
124
+ Tags are the "little brother" of Cards with the same variant system.
125
+
126
+ ```typescript
127
+ type TagSize = 's' | 'm' | 'l';
128
+ ```
129
+ Tag size variants.
130
+ - s: Compact tags for dense UIs (10px font)
131
+ - m: Default size (12px font)
132
+ - l: Larger tags for emphasis (14px font)
133
+
134
+ ## coar-card
135
+
136
+ **Selector:** `<coar-card>`
137
+ **Class:** `CoarCardComponent`
138
+ **Import:** `import { CoarCardComponent } from '@cocoar/ui';`
139
+
140
+ ### Inputs
141
+
142
+ | Name | Type | Default | Required | Description |
143
+ |------|------|---------|----------|-------------|
144
+ | variant | `CardVariant` | `'neutral'` | No | Card semantic variant |
145
+ | padding | `CardPadding` | `'m'` | No | Card padding size |
146
+ | elevated | `boolean` | `false` | No | Adds a box-shadow for elevation/depth. |
147
+ | borderless | `boolean` | `false` | No | Removes the border from the card, leaving only background color. |
148
+
149
+ ### Content Slots
150
+
151
+ - `[coar-card-header]`
152
+ - Default slot: `<ng-content />`
153
+ - `[coar-card-footer]`
154
+ - `[coar-card-inset]`
155
+
156
+ ### CSS Custom Properties
157
+
158
+ | Property | Default |
159
+ |----------|---------|
160
+ | `--coar-card-padding` | — |
161
+
162
+ ### Related Types
163
+
164
+ ```typescript
165
+ type CardVariant = 'neutral' | 'outlined' | 'success' | 'warning' | 'error' | 'info' | 'accent';
166
+ ```
167
+
168
+ ```typescript
169
+ type CardPadding = 'none' | 's' | 'm' | 'l';
170
+ ```
171
+
172
+ ## coar-note
173
+
174
+ **Selector:** `<coar-note>`
175
+ **Class:** `CoarNoteComponent`
176
+ **Import:** `import { CoarNoteComponent } from '@cocoar/ui';`
177
+
178
+ A callout/note component for highlighting information.
179
+ Features a colored left border and subtle background.
180
+ Use for tips, warnings, important information, or behavioral notes.
181
+
182
+ ### Inputs
183
+
184
+ | Name | Type | Default | Required | Description |
185
+ |------|------|---------|----------|-------------|
186
+ | variant | `NoteVariant` | `'neutral'` | No | Note semantic variant. |
187
+ | padding | `NotePadding` | `'m'` | No | Note padding size. |
188
+
189
+ ### Content Slots
190
+
191
+ - Default slot: `<ng-content />`
192
+
193
+ ### CSS Custom Properties
194
+
195
+ | Property | Default |
196
+ |----------|---------|
197
+ | `--coar-note-border-color` | — |
198
+ | `--coar-note-bg` | — |
199
+
200
+ ### Related Types
201
+
202
+ ```typescript
203
+ type NoteVariant = 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'accent';
204
+ ```
205
+
206
+ ```typescript
207
+ type NotePadding = 's' | 'm' | 'l';
208
+ ```
209
+
210
+ ## coar-divider
211
+
212
+ **Selector:** `<coar-divider>`
213
+ **Class:** `CoarDividerComponent`
214
+ **Import:** `import { CoarDividerComponent } from '@cocoar/ui';`
215
+
216
+ A flexible divider component for visually separating content sections.
217
+ Supports optional content (text, icons, etc.) via ng-content that can be
218
+ aligned left, center, or right. When content is present, the divider line
219
+ splits around it.
220
+
221
+ ### Inputs
222
+
223
+ | Name | Type | Default | Required | Description |
224
+ |------|------|---------|----------|-------------|
225
+ | align | `DividerAlign` | `'center'` | No | Content alignment when ng-content is provided |
226
+ | variant | `DividerVariant` | `'subtle'` | No | Visual style variant |
227
+ | width | `number` | `90` | No | Width of the divider as a percentage (0-100) |
228
+ | spacingTop | `number` | `0` | No | Spacing above the divider in pixels |
229
+ | spacingBottom | `number` | `0` | No | Spacing below the divider in pixels |
230
+
231
+ ### Content Slots
232
+
233
+ - Default slot: `<ng-content />`
234
+
235
+ ### Related Types
236
+
237
+ ```typescript
238
+ type DividerAlign = 'left' | 'center' | 'right';
239
+ ```
240
+ Content alignment options for the divider.
241
+ - 'center': Content is centered with lines on both sides (default)
242
+ - 'left': Content is aligned left with line on the right
243
+ - 'right': Content is aligned right with line on the left
244
+
245
+ ```typescript
246
+ type DividerVariant = 'subtle' | 'strong';
247
+ ```
248
+ Visual style variants for the divider line.
249
+ - 'subtle': Light, unobtrusive divider (default)
250
+ - 'strong': More prominent divider
251
+
252
+ ## coar-table
253
+
254
+ **Selector:** `<coar-table>`
255
+ **Class:** `CoarTableComponent`
256
+ **Import:** `import { CoarTableComponent } from '@cocoar/ui';`
257
+
258
+ A simple table component that provides consistent styling.
259
+ Default styling uses alternating row colors (zebra stripes) for readability.
260
+ Use 'plain' variant for no stripes, or 'bordered' for full cell borders.
261
+ Usage:
262
+ ```html
263
+ <coar-table>
264
+ <thead>
265
+ <tr>
266
+ <th>Property</th>
267
+ <th>Type</th>
268
+ </tr>
269
+ </thead>
270
+ <tbody>
271
+ <tr>
272
+ <td><code>name</code></td>
273
+ <td><code>string</code></td>
274
+ </tr>
275
+ </tbody>
276
+ </coar-table>
277
+ ```
278
+
279
+ ### Inputs
280
+
281
+ | Name | Type | Default | Required | Description |
282
+ |------|------|---------|----------|-------------|
283
+ | variant | `CoarTableVariant` | `'default'` | No | Visual variant of the table: default (zebra stripes), plain (no stripes), bordered (cell borders) |
284
+ | compact | `boolean` | `false` | No | Whether to use compact padding |
285
+ | hover | `boolean` | `true` | No | Whether rows should highlight on hover |
286
+
287
+ ### Content Slots
288
+
289
+ - Default slot: `<ng-content />`
290
+
291
+ ### Related Types
292
+
293
+ ```typescript
294
+ type CoarTableVariant = 'default' | 'plain' | 'bordered';
295
+ ```
296
+
297
+ ## coar-label
298
+
299
+ **Selector:** `<coar-label>`
300
+ **Class:** `CoarLabelComponent`
301
+ **Import:** `import { CoarLabelComponent } from '@cocoar/ui';`
302
+
303
+ Standalone label component for consistent form labeling across the design system.
304
+
305
+ ### Inputs
306
+
307
+ | Name | Type | Default | Required | Description |
308
+ |------|------|---------|----------|-------------|
309
+ | size | `CoarLabelSize` | `'m'` | No | Size of the label. Should match the size of the associated input/form element. |
310
+ | required | `boolean` | `false` | No | Whether to show a required indicator (*) after the label text. |
311
+ | for | `string | undefined` | `undefined` | No | The ID of the form element this label is associated with. |
312
+ | text | `string` | `''` | No | |
313
+
314
+ ### Content Slots
315
+
316
+ - Default slot: `<ng-content />`
317
+
318
+ ### CSS Custom Properties
319
+
320
+ | Property | Default |
321
+ |----------|---------|
322
+ | `--coar-component-xs-label-font-size` | — |
323
+ | `--coar-component-s-label-font-size` | — |
324
+ | `--coar-component-m-label-font-size` | — |
325
+ | `--coar-component-l-label-font-size` | — |
326
+
327
+ ### Related Types
328
+
329
+ ```typescript
330
+ type CoarLabelSize = 'xs' | 's' | 'm' | 'l';
331
+ ```
332
+ Available sizes for the label component.
333
+ Matches the component size system used by buttons and inputs.
334
+
335
+ ## coar-icon
336
+
337
+ **Selector:** `<coar-icon>`
338
+ **Class:** `CoarIconComponent`
339
+ **Import:** `import { CoarIconComponent } from '@cocoar/ui';`
340
+
341
+ COAR Icon Component
342
+ Icon component supporting DI-provided icon registries.
343
+ Usage:
344
+ ```html
345
+ <coar-icon name="settings" size="m"></coar-icon>
346
+ ```
347
+ Size tokens:
348
+ - xs = 12px
349
+ - s = 16px
350
+ - m = 20px (default)
351
+ - l = 24px
352
+ - xl = 32px
353
+ - auto = fills parent container (use padding on parent to control)
354
+
355
+ ### Inputs
356
+
357
+ | Name | Type | Default | Required | Description |
358
+ |------|------|---------|----------|-------------|
359
+ | name | `string` | — | No | Icon identifier. |
360
+ | source | `string | undefined` | — | No | Optional icon source key. |
361
+ | size | `CoarIconSize | string` | `'m'` | No | Icon size. Defaults to 'm' (20px). |
362
+ | rotate | `number` | `0` | No | Rotation angle in degrees (0, 90, 180, 270, or any number). |
363
+ | rotateTransition | `number | string` | — | No | Rotation transition animation. |
364
+ | spin | `boolean` | `false` | No | Enable continuous spinning animation. |
365
+ | color | `string` | `'inherit'` | No | Icon color. Can be any valid CSS color value. |
366
+ | label | `string | number` | — | No | Optional text label to display next to the icon. |
367
+
368
+ ### Content Slots
369
+
370
+ - Default slot: `<ng-content />`
371
+
372
+ ## CoarIconService
373
+
374
+ **Kind:** Service (Injectable, providedIn: root)
375
+ **Class:** `CoarIconService`
376
+ **Import:** `import { CoarIconService } from '@cocoar/ui';`
377
+
378
+ ### Methods
379
+
380
+ #### `getIcon(name: string, sourceKey?: string): Observable<string`
381
+ Get an icon by name from a specific icon source.
382
+ - If `sourceKey` is omitted, the default source is used.
383
+ - If no source is configured, this throws to make misconfiguration obvious.
384
+
385
+ #### `getRegisteredSources(): ReadonlyArray<CoarIconRegisteredSource>`
386
+ List all registered icon sources.
387
+ This is useful for UIs that allow users to browse icons grouped by source.
388
+
389
+ #### `getAvailableIconKeys(sourceKey?: string): Observable<readonly`
390
+ Get the available icon keys from a specific source.
391
+ Throws if the source does not support listing keys.
392
+
393
+ #### `clearCache(): void`
394
+
395
+ #### `clearIconCache(name: string): void`
396
+
397
+ ### Related Types
398
+
399
+ ```typescript
400
+ type CoarIconSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'auto';
401
+ ```
402
+
403
+ ```typescript
404
+ type CoarIconRegisteredSource = Readonly<{
405
+ key: string;
406
+ ```
407
+
408
+ ## coar-avatar
409
+
410
+ **Selector:** `<coar-avatar>`
411
+ **Class:** `CoarAvatarComponent`
412
+ **Import:** `import { CoarAvatarComponent } from '@cocoar/ui';`
413
+
414
+ Avatar component for displaying user profile images with fallback to initials.
415
+
416
+ ### Inputs
417
+
418
+ | Name | Type | Default | Required | Description |
419
+ |------|------|---------|----------|-------------|
420
+ | src | `string` | `''` | No | Image URL for the avatar |
421
+ | name | `string` | `''` | No | User's full name (used for initials fallback and alt text) |
422
+ | size | `AvatarSize` | `'m'` | No | Avatar size |
423
+ | shape | `AvatarShape` | `'circle'` | No | Avatar shape |
424
+ | clickable | `boolean` | `false` | No | Whether the avatar is interactive (clickable) |
425
+ | initials | `string` | `''` | No | Custom initials override (otherwise computed from name) |
426
+ | bgColor | `string` | `''` | No | Background color for initials (auto-generated from name if not set) |
427
+
428
+ ### Content Slots
429
+
430
+ - Default slot: `<ng-content />`
431
+
432
+ ### Related Types
433
+
434
+ ```typescript
435
+ type AvatarSize = 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl';
436
+ ```
437
+
438
+ ```typescript
439
+ type AvatarShape = 'circle' | 'square';
440
+ ```
441
+
442
+ ## coar-code-block
443
+
444
+ **Selector:** `<coar-code-block>`
445
+ **Class:** `CoarCodeBlockComponent`
446
+ **Import:** `import { CoarCodeBlockComponent } from '@cocoar/ui';`
447
+
448
+ ### Inputs
449
+
450
+ | Name | Type | Default | Required | Description |
451
+ |------|------|---------|----------|-------------|
452
+ | language | `string` | `'html'` | No | Language for syntax highlighting |
453
+ | title | `string` | `''` | No | Title/label for the code block |
454
+ | collapsible | `boolean` | `true` | No | Whether the code block can be collapsed |
455
+ | collapsed | `boolean` | `false` | No | Whether the code block starts collapsed |
456
+ | showCopy | `boolean` | `true` | No | Whether to show the copy button |
457
+ | borderless | `boolean` | `false` | No | Whether to hide the border and border-radius |
458
+ | showLineNumbers | `boolean` | `false` | No | Whether to show line numbers |
459
+ | variant | `CodeBlockVariant` | `'neutral'` | No | Semantic variant for the header area |
460
+ | maxHeight | `number` | `0` | No | Maximum height before scrolling (0 = no limit) |
461
+ | elevated | `boolean` | `false` | No | Adds a box-shadow for elevation/depth |
462
+ | code | `string` | — | Yes | The code to display |
463
+
464
+ ### CSS Custom Properties
465
+
466
+ | Property | Default |
467
+ |----------|---------|
468
+ | `--coar-code-block-border` | — |
469
+ | `--coar-code-block-bg` | — |
470
+ | `--coar-code-block-header-bg` | — |
471
+ | `--coar-code-block-text-muted` | — |
472
+ | `--coar-code-block-text` | — |
473
+ | `--coar-code-block-button-bg-hover` | — |
474
+ | `--coar-code-block-comment` | — |
475
+ | `--coar-code-block-punctuation` | — |
476
+ | `--coar-code-block-number` | — |
477
+ | `--coar-code-block-string` | — |
478
+ | `--coar-code-block-operator` | — |
479
+ | `--coar-code-block-keyword` | — |
480
+ | `--coar-code-block-function` | — |
481
+ | `--coar-code-block-class` | — |
482
+ | `--coar-code-block-tag` | — |
483
+ | `--coar-code-block-attr-name` | — |
484
+ | `--coar-code-block-attr-value` | — |
485
+
486
+ ### Related Types
487
+
488
+ ```typescript
489
+ type CodeBlockVariant = 'neutral' | 'success' | 'warning' | 'error' | 'info' | 'accent';
490
+ ```
491
+
492
+ ## [coarScrollbar]
493
+
494
+ **Kind:** Directive
495
+ **Selector:** `[coarScrollbar]`
496
+ **Export As:** `coarScrollbar`
497
+ **Class:** `CoarScrollbarDirective`
498
+ **Import:** `import { CoarScrollbarDirective } from '@cocoar/ui';`
499
+
500
+ Directive that applies custom overlay scrollbars to an element.
501
+ Uses OverlayScrollbars library to replace native scrollbars with
502
+ styleable overlay scrollbars while preserving native scroll behavior.
503
+
504
+ ### Inputs
505
+
506
+ | Name | Type | Default | Required | Description |
507
+ |------|------|---------|----------|-------------|
508
+ | theme | `CoarScrollbarTheme` | `'dark'` | No | Theme for scrollbar appearance |
509
+ | autoHide | `CoarScrollbarAutoHide` | `'leave'` | No | Auto-hide behavior for scrollbars |
510
+ | autoHideDelay | `number` | `400` | No | Delay in ms before auto-hide triggers |
511
+ | clickScroll | `boolean` | `true` | No | Whether clicking the track scrolls to that position |
512
+ | overflowX | `CoarScrollbarOverflow` | `'scroll'` | No | Overflow behavior for x-axis |
513
+ | overflowY | `CoarScrollbarOverflow` | `'scroll'` | No | Overflow behavior for y-axis |
514
+ | defer | `boolean` | `true` | No | Whether to defer initialization until browser is idle |
515
+ | overscrollBehavior | `'auto' | 'contain' | 'none'` | `'auto'` | No | Overscroll behavior to prevent scroll chaining to parent elements. |
516
+
517
+ ### Related Types
518
+
519
+ ```typescript
520
+ type CoarScrollbarTheme = 'dark' | 'light';
521
+ ```
522
+ Theme options for the scrollbar appearance.
523
+ - 'dark': Dark scrollbar theme (default)
524
+ - 'light': Light scrollbar theme
525
+
526
+ ```typescript
527
+ type CoarScrollbarAutoHide = 'never' | 'scroll' | 'leave' | 'move';
528
+ ```
529
+ Auto-hide behavior for the scrollbar.
530
+ - 'never': Scrollbars are always visible
531
+ - 'scroll': Scrollbars hide when not scrolling
532
+ - 'leave': Scrollbars hide when pointer leaves the element
533
+ - 'move': Scrollbars hide when pointer stops moving
534
+
535
+ ```typescript
536
+ type CoarScrollbarOverflow = 'hidden' | 'scroll' | 'visible-hidden' | 'visible-scroll';
537
+ ```
538
+ Overflow behavior for each axis.
539
+ - 'hidden': Content is clipped, no scrollbar
540
+ - 'scroll': Always show scrollbar
541
+ - 'visible-hidden': Content visible but no scrollbar
542
+ - 'visible-scroll': Content visible with scrollbar
543
+
544
+ ## coar-progress-bar
545
+
546
+ **Selector:** `<coar-progress-bar>`
547
+ **Class:** `CoarProgressBarComponent`
548
+ **Import:** `import { CoarProgressBarComponent } from '@cocoar/ui';`
549
+
550
+ ### Inputs
551
+
552
+ | Name | Type | Default | Required | Description |
553
+ |------|------|---------|----------|-------------|
554
+ | value | `number` | `0` | No | Current progress value (0 to max) |
555
+ | max | `number` | `100` | No | Maximum progress value |
556
+ | variant | `CoarProgressBarVariant` | `'accent'` | No | Visual variant |
557
+ | size | `CoarProgressBarSize` | `'m'` | No | Bar height size |
558
+ | indeterminate | `boolean` | `false` | No | Whether to show an indeterminate animation |
559
+ | label | `string` | `''` | No | Accessible label for the progress bar |
560
+ | showValue | `boolean` | `false` | No | Whether to display the percentage text |
561
+
562
+ ### CSS Custom Properties
563
+
564
+ | Property | Default |
565
+ |----------|---------|
566
+ | `--coar-progress-bar-height` | — |
567
+ | `--coar-progress-bar-fill-color` | — |
568
+
569
+ ### Related Types
570
+
571
+ ```typescript
572
+ type CoarProgressBarVariant = 'accent' | 'success' | 'warning' | 'error';
573
+ ```
574
+
575
+ ```typescript
576
+ type CoarProgressBarSize = 's' | 'm' | 'l';
577
+ ```
578
+
579
+ ## coar-spinner
580
+
581
+ **Selector:** `<coar-spinner>`
582
+ **Class:** `CoarSpinnerComponent`
583
+ **Import:** `import { CoarSpinnerComponent } from '@cocoar/ui';`
584
+
585
+ ### Inputs
586
+
587
+ | Name | Type | Default | Required | Description |
588
+ |------|------|---------|----------|-------------|
589
+ | size | `CoarSpinnerSize` | `'m'` | No | Spinner size |
590
+ | label | `string` | `'Loading'` | No | Accessible label |
591
+
592
+ ### CSS Custom Properties
593
+
594
+ | Property | Default |
595
+ |----------|---------|
596
+ | `--coar-spinner-size` | — |
597
+
598
+ ### Related Types
599
+
600
+ ```typescript
601
+ type CoarSpinnerSize = 'xs' | 's' | 'm' | 'l';
602
+ ```
603
+
604
+ ## coar-link
605
+
606
+ **Kind:** CSS-only component (no Angular class)
607
+ **Import:** `@import '@cocoar/ui/components/display/link/coar-link.css';`
608
+
609
+ ### CSS Classes
610
+
611
+ - `.coar-link`
612
+ - `.coar-link--subtle`
613
+ - `.coar-link--s`
614
+ - `.coar-link--m`
615
+ - `.coar-link--l`
616
+ - `.coar-link--disabled`
617
+
618
+ ### CSS Custom Properties
619
+
620
+ | Property | Default |
621
+ |----------|---------|
622
+ | `--coar-text-accent-primary` | — |
623
+ | `--coar-duration-fast` | — |
624
+ | `--coar-component-m-font-size` | — |
625
+ | `--coar-text-accent-secondary` | — |
626
+ | `--coar-focus-shadow` | — |
627
+ | `--coar-radius-xs` | — |
628
+ | `--coar-text-neutral-secondary` | — |
629
+ | `--coar-component-s-font-size` | — |
630
+ | `--coar-component-l-font-size` | — |
631
+ | `--coar-text-neutral-disabled` | — |
632
+
633
+ ---
634
+
635
+ # Forms
636
+
637
+ ## coar-text-input
638
+
639
+ **Selector:** `<coar-text-input>`
640
+ **Class:** `CoarTextInputComponent`
641
+ **Import:** `import { CoarTextInputComponent } from '@cocoar/ui';`
642
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
643
+
644
+ ### Inputs
645
+
646
+ | Name | Type | Default | Required | Description |
647
+ |------|------|---------|----------|-------------|
648
+ | label | `string` | `''` | No | Label text displayed above the input |
649
+ | placeholder | `string` | `''` | No | Placeholder text shown when input is empty |
650
+ | size | `CoarTextInputSize` | `'m'` | No | Input size - matches button/checkbox sizes for consistent layouts |
651
+ | rows | `number` | `1` | No | Number of visible text rows (1 = single-line input, 2+ = textarea) |
652
+ | disabled | `boolean` | `false` | No | Disables the input (greyed out, not focusable) |
653
+ | readonly | `boolean` | `false` | No | Makes the input read-only (focusable but not editable) |
654
+ | required | `boolean` | `false` | No | Marks the input as required, shows asterisk on label |
655
+ | error | `string` | `''` | No | Error message to display below the input |
656
+ | hint | `string` | `''` | No | Hint text displayed below the input |
657
+ | clearable | `boolean` | `true` | No | Show clear button when input has value and is focused/hovered |
658
+ | prefix | `string` | `''` | No | Text or symbol displayed before the input value |
659
+ | suffix | `string` | `''` | No | Text or symbol displayed after the input value |
660
+ | id | `string` | `''` | No | HTML id attribute for the input element |
661
+ | name | `string` | `''` | No | HTML name attribute for form submission |
662
+ | autocomplete | `string` | `''` | No | HTML autocomplete attribute |
663
+ | maxlength | `number | undefined` | `undefined` | No | Maximum character length |
664
+
665
+ ### Two-Way Bindings (model)
666
+
667
+ | Name | Type | Default | Description |
668
+ |------|------|---------|-------------|
669
+ | value | `string` | `''` | Current input value (two-way bindable with [(value)]) |
670
+
671
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
672
+
673
+ ### Outputs
674
+
675
+ | Name | Type | Description |
676
+ |------|------|-------------|
677
+ | valueChange | `string` | Emits when input value changes |
678
+ | blurred | `FocusEvent` | Emits when input loses focus |
679
+ | focused | `FocusEvent` | Emits when input gains focus |
680
+ | clear | `void` | Emits when clear button is clicked |
681
+
682
+ ### Content Slots
683
+
684
+ - `[prefix]`
685
+ - `[suffix]`
686
+ - `[suffixAction]`
687
+
688
+ ### Related Types
689
+
690
+ ```typescript
691
+ type CoarTextInputSize = 'xs' | 's' | 'm' | 'l';
692
+ ```
693
+
694
+ ## coar-number-input
695
+
696
+ **Selector:** `<coar-number-input>`
697
+ **Class:** `CoarNumberInputComponent`
698
+ **Import:** `import { CoarNumberInputComponent } from '@cocoar/ui';`
699
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
700
+
701
+ ### Inputs
702
+
703
+ | Name | Type | Default | Required | Description |
704
+ |------|------|---------|----------|-------------|
705
+ | label | `string` | `''` | No | Label text displayed above the input |
706
+ | placeholder | `string` | `''` | No | Placeholder text shown when input is empty |
707
+ | size | `CoarNumberInputSize` | `'m'` | No | Input size - matches button/checkbox sizes for consistent layouts |
708
+ | min | `number | undefined` | `undefined` | No | Minimum allowed value |
709
+ | max | `number | undefined` | `undefined` | No | Maximum allowed value |
710
+ | step | `number` | `1` | No | Step increment for arrows and keyboard |
711
+ | decimals | `number` | `0` | No | Number of decimal places to display |
712
+ | disabled | `boolean` | `false` | No | Disables the input (greyed out, not focusable) |
713
+ | readonly | `boolean` | `false` | No | Makes the input read-only (focusable but not editable) |
714
+ | required | `boolean` | `false` | No | Marks the input as required, shows asterisk on label |
715
+ | error | `string` | `''` | No | Error message to display below the input |
716
+ | hint | `string` | `''` | No | Hint text displayed below the input |
717
+ | clearable | `boolean` | `true` | No | Show clear button when input has value and is focused/hovered |
718
+ | stepperButtons | `CoarNumberInputStepperButtons` | `'none'` | No | Controls visibility of increment/decrement stepper buttons. |
719
+ | prefix | `string` | `''` | No | Text or symbol displayed before the input value |
720
+ | suffix | `string` | `''` | No | Text or symbol displayed after the input value |
721
+ | locale | `string` | — | No | Locale identifier for number formatting (e.g., 'de-AT', 'en-US'). |
722
+ | numberFormat | `NumberFormatConfig` | — | No | Number format configuration (decimal and thousand separators). |
723
+ | id | `string` | `''` | No | HTML id attribute for the input element |
724
+ | name | `string` | `''` | No | HTML name attribute for form submission |
725
+
726
+ ### Two-Way Bindings (model)
727
+
728
+ | Name | Type | Default | Description |
729
+ |------|------|---------|-------------|
730
+ | value | `number | null` | `null` | Current numeric value. |
731
+
732
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
733
+
734
+ ### Outputs
735
+
736
+ | Name | Type | Description |
737
+ |------|------|-------------|
738
+ | valueChange | `number | null` | Emits when input value changes |
739
+ | blurred | `FocusEvent` | Emits when input loses focus |
740
+ | focused | `FocusEvent` | Emits when input gains focus |
741
+ | clear | `void` | Emits when clear button is clicked |
742
+
743
+ ### Content Slots
744
+
745
+ - `[prefix]`
746
+ - `[suffix]`
747
+
748
+ ### Related Types
749
+
750
+ ```typescript
751
+ type CoarNumberInputSize = 'xs' | 's' | 'm' | 'l';
752
+ ```
753
+
754
+ ```typescript
755
+ type CoarNumberInputStepperButtons = 'none' | 'increment' | 'decrement' | 'both';
756
+ ```
757
+
758
+ ```typescript
759
+ interface NumberFormatConfig {readonly decimal: string;
760
+ readonly thousand: string;
761
+ }
762
+ ```
763
+ Configuration for number formatting
764
+
765
+ ## coar-password-input
766
+
767
+ **Selector:** `<coar-password-input>`
768
+ **Class:** `CoarPasswordInputComponent`
769
+ **Import:** `import { CoarPasswordInputComponent } from '@cocoar/ui';`
770
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
771
+
772
+ ### Inputs
773
+
774
+ | Name | Type | Default | Required | Description |
775
+ |------|------|---------|----------|-------------|
776
+ | label | `string` | `''` | No | Label text displayed above the input |
777
+ | placeholder | `string` | `''` | No | Placeholder text shown when input is empty |
778
+ | size | `CoarPasswordInputSize` | `'m'` | No | Input size - matches other form elements for consistent layouts |
779
+ | disabled | `boolean` | `false` | No | Disables the input (greyed out, not focusable) |
780
+ | readonly | `boolean` | `false` | No | Makes the input read-only (focusable but not editable) |
781
+ | required | `boolean` | `false` | No | Marks the input as required, shows asterisk on label |
782
+ | error | `string` | `''` | No | Error message to display below the input |
783
+ | hint | `string` | `''` | No | Hint text displayed below the input |
784
+ | clearable | `boolean` | `true` | No | Show clear button when input has value and is focused/hovered |
785
+ | id | `string` | `''` | No | HTML id attribute for the input element |
786
+ | name | `string` | `''` | No | HTML name attribute for form submission |
787
+ | autocomplete | `string` | `'current-password'` | No | HTML autocomplete attribute for browser autofill |
788
+ | maxlength | `number | undefined` | `undefined` | No | Maximum character length |
789
+
790
+ ### Two-Way Bindings (model)
791
+
792
+ | Name | Type | Default | Description |
793
+ |------|------|---------|-------------|
794
+ | value | `string` | `''` | Current password value. |
795
+
796
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
797
+
798
+ ### Outputs
799
+
800
+ | Name | Type | Description |
801
+ |------|------|-------------|
802
+ | valueChange | `string` | Emits when password value changes |
803
+ | blurred | `FocusEvent` | Emits when input loses focus |
804
+ | focused | `FocusEvent` | Emits when input gains focus |
805
+ | clear | `void` | Emits when clear button is clicked |
806
+
807
+ ### Related Types
808
+
809
+ ```typescript
810
+ type CoarPasswordInputSize = 'xs' | 's' | 'm' | 'l';
811
+ ```
812
+
813
+ ## coar-checkbox
814
+
815
+ **Selector:** `<coar-checkbox>`
816
+ **Class:** `CoarCheckboxComponent`
817
+ **Import:** `import { CoarCheckboxComponent } from '@cocoar/ui';`
818
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
819
+
820
+ ### Inputs
821
+
822
+ | Name | Type | Default | Required | Description |
823
+ |------|------|---------|----------|-------------|
824
+ | label | `string` | `''` | No | Label text displayed next to the checkbox |
825
+ | indeterminate | `boolean` | `false` | No | Sets the checkbox to indeterminate state (visual only). |
826
+ | disabled | `boolean` | `false` | No | Disables the checkbox (greyed out, not focusable) |
827
+ | readonly | `boolean` | `false` | No | Prevents changes but keeps normal appearance and focus |
828
+ | required | `boolean` | `false` | No | Marks as required, shows asterisk on label |
829
+ | error | `string` | `''` | No | Error message to display below the checkbox |
830
+ | hint | `string` | `''` | No | Hint text displayed below the checkbox |
831
+ | size | `CoarCheckboxSize` | `'m'` | No | Checkbox size - matches input/button heights for consistent layouts |
832
+ | id | `string` | `''` | No | HTML id attribute for the checkbox element |
833
+ | name | `string` | `''` | No | HTML name attribute for form submission |
834
+ | value | `string` | `''` | No | Value submitted with form when checked |
835
+
836
+ ### Two-Way Bindings (model)
837
+
838
+ | Name | Type | Default | Description |
839
+ |------|------|---------|-------------|
840
+ | checked | `boolean | undefined` | `undefined` | Checkbox checked state: true for checked, false for unchecked, undefined for pristine. |
841
+
842
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
843
+
844
+ ### Related Types
845
+
846
+ ```typescript
847
+ type CoarCheckboxSize = 'xs' | 's' | 'm' | 'l';
848
+ ```
849
+
850
+ ## coar-radio-group
851
+
852
+ **Selector:** `<coar-radio-group>`
853
+ **Class:** `CoarRadioGroupComponent`
854
+ **Import:** `import { CoarRadioGroupComponent } from '@cocoar/ui';`
855
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
856
+
857
+ Radio group component for single-choice selection.
858
+
859
+ ### Inputs
860
+
861
+ | Name | Type | Default | Required | Description |
862
+ |------|------|---------|----------|-------------|
863
+ | label | `string` | `''` | No | Accessible label for the group |
864
+ | orientation | `RadioGroupOrientation` | `'vertical'` | No | Layout orientation |
865
+ | size | `RadioGroupSize` | `'m'` | No | Size of radio buttons |
866
+ | disabled | `boolean` | `false` | No | Disables all radio buttons in the group |
867
+ | required | `boolean` | `false` | No | Marks the group as required |
868
+ | error | `string` | `''` | No | Error message to display |
869
+ | hint | `string` | `''` | No | Hint text displayed below the group |
870
+ | name | `string` | — | Yes | Group name for radio inputs |
871
+
872
+ ### Two-Way Bindings (model)
873
+
874
+ | Name | Type | Default | Description |
875
+ |------|------|---------|-------------|
876
+ | value | `T | undefined` | `undefined` | Currently selected value |
877
+
878
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
879
+
880
+ ### Outputs
881
+
882
+ | Name | Type | Description |
883
+ |------|------|-------------|
884
+ | valueChange | `T` | Emits when selection changes |
885
+
886
+ ### Content Slots
887
+
888
+ - Default slot: `<ng-content />`
889
+
890
+ ## coar-radio
891
+
892
+ **Selector:** `<coar-radio>`
893
+ **Class:** `CoarRadioComponent`
894
+ **Import:** `import { CoarRadioComponent } from '@cocoar/ui';`
895
+
896
+ Individual radio button, must be used inside a coar-radio-group.
897
+
898
+ ### Inputs
899
+
900
+ | Name | Type | Default | Required | Description |
901
+ |------|------|---------|----------|-------------|
902
+ | disabled | `boolean` | `false` | No | Disables this specific radio button |
903
+ | value | `T` | — | Yes | Value of this radio option |
904
+
905
+ ### Content Slots
906
+
907
+ - Default slot: `<ng-content />`
908
+
909
+ ### Related Types
910
+
911
+ ```typescript
912
+ type RadioGroupOrientation = 'horizontal' | 'vertical';
913
+ ```
914
+
915
+ ```typescript
916
+ type RadioGroupSize = 's' | 'm' | 'l';
917
+ ```
918
+
919
+ ## coar-multi-select
920
+
921
+ **Selector:** `<coar-multi-select>`
922
+ **Class:** `CoarMultiSelectComponent`
923
+ **Import:** `import { CoarMultiSelectComponent } from '@cocoar/ui';`
924
+
925
+ Multi-select dropdown component.
926
+ Allows selecting multiple options from a list with checkboxes,
927
+ keyboard navigation, search/filter support, and full forms integration.
928
+
929
+ ### Inputs
930
+
931
+ | Name | Type | Default | Required | Description |
932
+ |------|------|---------|----------|-------------|
933
+ | clearable | `boolean` | `false` | No | Whether to show a clear button when values are selected |
934
+ | maxDisplayItems | `number` | `3` | No | Maximum number of selected items to display before showing count |
935
+ | showSelectAll | `boolean` | `false` | No | Whether to show "Select All" option |
936
+
937
+ ### Two-Way Bindings (model)
938
+
939
+ | Name | Type | Default | Description |
940
+ |------|------|---------|-------------|
941
+ | value | `T[]` | `[]` | Current selected values (two-way bindable with [(value)]) |
942
+
943
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
944
+
945
+ ### Outputs
946
+
947
+ | Name | Type | Description |
948
+ |------|------|-------------|
949
+ | valueChange | `T[]` | Emits when the selected values change |
950
+
951
+ ## coar-single-select
952
+
953
+ **Selector:** `<coar-single-select>`
954
+ **Class:** `CoarSingleSelectComponent`
955
+ **Import:** `import { CoarSingleSelectComponent } from '@cocoar/ui';`
956
+
957
+ Single-select dropdown component.
958
+ Allows selecting one option from a list with keyboard navigation,
959
+ search/filter support, and full forms integration.
960
+
961
+ ### Inputs
962
+
963
+ | Name | Type | Default | Required | Description |
964
+ |------|------|---------|----------|-------------|
965
+ | clearable | `boolean` | `false` | No | Whether to show a clear button when a value is selected |
966
+
967
+ ### Two-Way Bindings (model)
968
+
969
+ | Name | Type | Default | Description |
970
+ |------|------|---------|-------------|
971
+ | value | `T | null` | `null` | Current selected value (two-way bindable with [(value)]) |
972
+
973
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
974
+
975
+ ### Outputs
976
+
977
+ | Name | Type | Description |
978
+ |------|------|-------------|
979
+ | valueChange | `T | null` | Emits when the selected value changes |
980
+
981
+ ## coar-tag-select
982
+
983
+ **Selector:** `<coar-tag-select>`
984
+ **Class:** `CoarTagSelectComponent`
985
+ **Import:** `import { CoarTagSelectComponent } from '@cocoar/ui';`
986
+
987
+ Tag-based multi-select component.
988
+ Displays selected items as removable tag chips with support for
989
+ creating new tags on-the-fly (optional), keyboard navigation,
990
+ and full forms integration.
991
+
992
+ ### Inputs
993
+
994
+ | Name | Type | Default | Required | Description |
995
+ |------|------|---------|----------|-------------|
996
+ | allowCreate | `boolean` | `false` | No | Allow creating new tags that don't exist in options |
997
+ | maxTags | `number` | `0` | No | Maximum number of tags that can be selected (0 = unlimited) |
998
+ | createPrefix | `string` | `'Create: '` | No | Text shown when creating a new tag |
999
+
1000
+ ### Two-Way Bindings (model)
1001
+
1002
+ | Name | Type | Default | Description |
1003
+ |------|------|---------|-------------|
1004
+ | value | `T[]` | `[]` | Current selected values (two-way bindable with [(value)]) |
1005
+
1006
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1007
+
1008
+ ### Outputs
1009
+
1010
+ | Name | Type | Description |
1011
+ |------|------|-------------|
1012
+ | valueChange | `T[]` | Emits when the selected values change |
1013
+ | tagCreated | `T` | Emits when a new tag is created |
1014
+
1015
+ ### Related Types
1016
+
1017
+ ```typescript
1018
+ interface CoarSelectOption {/** The value stored when this option is selected */
1019
+ value: T;
1020
+
1021
+ /** The display label shown in the dropdown and selected state */
1022
+ label: string;
1023
+
1024
+ /** Whether this option is disabled and cannot be selected */
1025
+ disabled?: boolean;
1026
+
1027
+ /** Optional group this option belongs to (for grouped options) */
1028
+ group?: string;
1029
+
1030
+ /** Optional icon to display next to the label */
1031
+ icon?: string;
1032
+ }
1033
+ ```
1034
+ Represents a selectable option in select components.
1035
+
1036
+ ## coar-switch
1037
+
1038
+ **Selector:** `<coar-switch>`
1039
+ **Class:** `CoarSwitchComponent`
1040
+ **Import:** `import { CoarSwitchComponent } from '@cocoar/ui';`
1041
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
1042
+
1043
+ ### Inputs
1044
+
1045
+ | Name | Type | Default | Required | Description |
1046
+ |------|------|---------|----------|-------------|
1047
+ | label | `string` | `''` | No | Label text displayed next to the switch |
1048
+ | disabled | `boolean` | `false` | No | Disables the switch |
1049
+ | readonly | `boolean` | `false` | No | Prevents changes but keeps normal appearance |
1050
+ | size | `CoarSwitchSize` | `'m'` | No | Switch size |
1051
+ | id | `string` | `''` | No | HTML id attribute |
1052
+ | name | `string` | `''` | No | HTML name attribute |
1053
+ | labelPosition | `'before' | 'after'` | `'after'` | No | Label position relative to the switch |
1054
+
1055
+ ### Two-Way Bindings (model)
1056
+
1057
+ | Name | Type | Default | Description |
1058
+ |------|------|---------|-------------|
1059
+ | checked | `boolean` | `false` | Switch checked state |
1060
+
1061
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1062
+
1063
+ ### CSS Custom Properties
1064
+
1065
+ | Property | Default |
1066
+ |----------|---------|
1067
+ | `--coar-switch-track-width` | — |
1068
+ | `--coar-switch-track-height` | — |
1069
+ | `--coar-switch-thumb-size` | — |
1070
+
1071
+ ### Related Types
1072
+
1073
+ ```typescript
1074
+ type CoarSwitchSize = 's' | 'm' | 'l';
1075
+ ```
1076
+
1077
+ ---
1078
+
1079
+ # Navigation
1080
+
1081
+ ## coar-tab-group
1082
+
1083
+ **Selector:** `<coar-tab-group>`
1084
+ **Class:** `CoarTabGroupComponent`
1085
+ **Import:** `import { CoarTabGroupComponent } from '@cocoar/ui';`
1086
+
1087
+ ### Inputs
1088
+
1089
+ | Name | Type | Default | Required | Description |
1090
+ |------|------|---------|----------|-------------|
1091
+ | activeTab | `string` | `''` | No | The currently active tab id |
1092
+
1093
+ ### Outputs
1094
+
1095
+ | Name | Type | Description |
1096
+ |------|------|-------------|
1097
+ | activeTabChange | `string` | Emits when the active tab changes |
1098
+
1099
+ ## coar-tab
1100
+
1101
+ **Selector:** `<coar-tab>`
1102
+ **Class:** `CoarTabComponent`
1103
+ **Import:** `import { CoarTabComponent } from '@cocoar/ui';`
1104
+
1105
+ Individual tab definition for use within CoarTabGroup.
1106
+ The tab label is provided as content projected into the component.
1107
+ This allows simple text, icons, badges, or any custom HTML.
1108
+
1109
+ ### Inputs
1110
+
1111
+ | Name | Type | Default | Required | Description |
1112
+ |------|------|---------|----------|-------------|
1113
+ | disabled | `boolean` | `false` | No | Whether the tab is disabled |
1114
+ | loadingStrategy | `TabLoadingStrategy` | `'lazy'` | No | Loading strategy for the tab content. |
1115
+ | id | `string` | — | Yes | Unique identifier for the tab |
1116
+ | content | `TabContent` | — | Yes | The content to display in the tab panel. |
1117
+
1118
+ ### Content Slots
1119
+
1120
+ - Default slot: `<ng-content />`
1121
+
1122
+ ### Related Types
1123
+
1124
+ ```typescript
1125
+ type TabLoadingStrategy = 'eager' | 'lazy';
1126
+ ```
1127
+ Loading strategy for tab content:
1128
+ - 'lazy': Content is only rendered when tab is active (default)
1129
+ - 'eager': Content is always rendered, hidden when inactive
1130
+
1131
+ ```typescript
1132
+ type TabContent = TemplateRef<unknown> | Type<unknown>;
1133
+ ```
1134
+ Content type that can be passed to a tab.
1135
+ Either a TemplateRef (from ng-template) or a Component class.
1136
+
1137
+ ## coar-sidebar
1138
+
1139
+ **Selector:** `<coar-sidebar>`
1140
+ **Class:** `CoarSidebarComponent`
1141
+ **Import:** `import { CoarSidebarComponent } from '@cocoar/ui';`
1142
+
1143
+ CoarSidebar: A three-part layout component for navigation sidebars.
1144
+ Provides three distinct slots via content projection:
1145
+ - **Header** (`[coar-sidebar-header]`): Fixed at top, for logo/title/branding
1146
+ - **Content** (default slot): Scrollable area for navigation menu or other content
1147
+ - **Footer** (`[coar-sidebar-footer]`): Fixed at bottom, for actions/settings/user info
1148
+ Responsibilities:
1149
+ - Provide consistent sidebar layout structure
1150
+ - Apply design tokens for width, spacing, colors
1151
+ - Handle scrolling behavior (only content area scrolls)
1152
+ - Support left/right positioning
1153
+
1154
+ ### Inputs
1155
+
1156
+ | Name | Type | Default | Required | Description |
1157
+ |------|------|---------|----------|-------------|
1158
+ | position | `'left' | 'right'` | `'left'` | No | Sidebar position: left or right side of screen. |
1159
+ | collapsed | `boolean` | `false` | No | Collapsed state for narrow/icon-only sidebar. |
1160
+
1161
+ ### Content Slots
1162
+
1163
+ - `[coar-sidebar-header]`
1164
+ - Default slot: `<ng-content />`
1165
+ - `[coar-sidebar-footer]`
1166
+
1167
+ ### CSS Custom Properties
1168
+
1169
+ | Property | Default |
1170
+ |----------|---------|
1171
+ | `--coar-sidebar-width` | 16rem |
1172
+ | `--coar-sidebar-min-width` | 12rem |
1173
+ | `--coar-sidebar-max-width` | 20rem |
1174
+ | `--coar-sidebar-background` | var(--coar-background-neutral-primary, #ffffff |
1175
+ | `--coar-sidebar-border` | 1px solid var(--coar-border-neutral-tertiary, #e5e5e5 |
1176
+ | `--coar-sidebar-collapsed-width` | 4rem |
1177
+ | `--coar-sidebar-content-padding` | var(--coar-spacing-s, 8px |
1178
+
1179
+ ## coar-breadcrumb-item
1180
+
1181
+ **Selector:** `<coar-breadcrumb-item>`
1182
+ **Class:** `CoarBreadcrumbItemComponent`
1183
+ **Import:** `import { CoarBreadcrumbItemComponent } from '@cocoar/ui';`
1184
+
1185
+ ### Inputs
1186
+
1187
+ | Name | Type | Default | Required | Description |
1188
+ |------|------|---------|----------|-------------|
1189
+ | active | `boolean` | `false` | No | |
1190
+
1191
+ ### Content Slots
1192
+
1193
+ - Default slot: `<ng-content />`
1194
+
1195
+ ## coar-breadcrumb
1196
+
1197
+ **Selector:** `<coar-breadcrumb>`
1198
+ **Class:** `CoarBreadcrumbComponent`
1199
+ **Import:** `import { CoarBreadcrumbComponent } from '@cocoar/ui';`
1200
+
1201
+ ### Inputs
1202
+
1203
+ | Name | Type | Default | Required | Description |
1204
+ |------|------|---------|----------|-------------|
1205
+ | separator | `string` | `'/'` | No | |
1206
+
1207
+ ### Content Slots
1208
+
1209
+ - Default slot: `<ng-content />`
1210
+
1211
+ ### CSS Custom Properties
1212
+
1213
+ | Property | Default |
1214
+ |----------|---------|
1215
+ | `--coar-breadcrumb-font-size` | var(--coar-font-size-s, 14px |
1216
+ | `--coar-breadcrumb-separator-gap` | var(--coar-spacing-xs, 4px |
1217
+ | `--coar-breadcrumb-separator-color` | var(--coar-text-neutral-tertiary, #999 |
1218
+ | `--coar-breadcrumb-link-color` | var(--coar-text-neutral-secondary, #555 |
1219
+ | `--coar-breadcrumb-active-color` | var(--coar-text-neutral-primary, #111 |
1220
+
1221
+ ## coar-pagination
1222
+
1223
+ **Selector:** `<coar-pagination>`
1224
+ **Class:** `CoarPaginationComponent`
1225
+ **Import:** `import { CoarPaginationComponent } from '@cocoar/ui';`
1226
+
1227
+ ### Inputs
1228
+
1229
+ | Name | Type | Default | Required | Description |
1230
+ |------|------|---------|----------|-------------|
1231
+ | pageSize | `number` | `10` | No | |
1232
+ | maxVisiblePages | `number` | `5` | No | |
1233
+ | showFirstLast | `boolean` | `true` | No | |
1234
+ | disabled | `boolean` | `false` | No | |
1235
+ | totalItems | `number` | — | Yes | |
1236
+
1237
+ ### Two-Way Bindings (model)
1238
+
1239
+ | Name | Type | Default | Description |
1240
+ |------|------|---------|-------------|
1241
+ | currentPage | `number` | `1` | |
1242
+
1243
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1244
+
1245
+ ### Outputs
1246
+
1247
+ | Name | Type | Description |
1248
+ |------|------|-------------|
1249
+ | pageChanged | `number` | |
1250
+
1251
+ ### CSS Custom Properties
1252
+
1253
+ | Property | Default |
1254
+ |----------|---------|
1255
+ | `--coar-pagination-gap` | var(--coar-spacing-3xs, 2px |
1256
+ | `--coar-pagination-button-size` | 2rem |
1257
+ | `--coar-pagination-font-size` | var(--coar-font-size-s, 14px |
1258
+ | `--coar-pagination-hover-background` | var(--coar-background-neutral-tertiary, #f0f0f0 |
1259
+ | `--coar-pagination-active-background` | var(--coar-background-brand-primary, #0066cc |
1260
+ | `--coar-pagination-active-color` | var(--coar-text-on-brand-primary, #fff |
1261
+
1262
+ ### Related Types
1263
+
1264
+ ```typescript
1265
+ type PaginationPageItem = { type: 'page';
1266
+ ```
1267
+
1268
+ ## coar-navbar
1269
+
1270
+ **Selector:** `<coar-navbar>`
1271
+ **Class:** `CoarNavbarComponent`
1272
+ **Import:** `import { CoarNavbarComponent } from '@cocoar/ui';`
1273
+
1274
+ ### Inputs
1275
+
1276
+ | Name | Type | Default | Required | Description |
1277
+ |------|------|---------|----------|-------------|
1278
+ | elevated | `boolean` | `true` | No | |
1279
+ | bordered | `boolean` | `false` | No | |
1280
+
1281
+ ### Content Slots
1282
+
1283
+ - `[coar-navbar-start]`
1284
+ - `[coar-navbar-center]`
1285
+ - `[coar-navbar-end]`
1286
+
1287
+ ### CSS Custom Properties
1288
+
1289
+ | Property | Default |
1290
+ |----------|---------|
1291
+ | `--coar-navbar-height` | 3.5rem |
1292
+ | `--coar-navbar-padding-x` | var(--coar-spacing-l, 16px |
1293
+ | `--coar-navbar-background` | var(--coar-background-neutral-primary, #ffffff |
1294
+ | `--coar-navbar-border-color` | var(--coar-border-neutral-tertiary, #e5e5e5 |
1295
+
1296
+ ---
1297
+
1298
+ # Overlay
1299
+
1300
+ ## coar-popover
1301
+
1302
+ **Selector:** `<coar-popover>`
1303
+ **Class:** `CoarPopoverComponent`
1304
+ **Import:** `import { CoarPopoverComponent } from '@cocoar/ui';`
1305
+
1306
+ A lightweight, hover/focus popover for rich tooltip-like content.
1307
+ Uses the overlay system for positioning with automatic placement and viewport clamping.
1308
+
1309
+ ### Inputs
1310
+
1311
+ | Name | Type | Default | Required | Description |
1312
+ |------|------|---------|----------|-------------|
1313
+ | disabled | `boolean` | `false` | No | Disable popover behavior (still renders trigger content). |
1314
+ | openOnHover | `boolean` | `false` | No | Enable hover/focus behavior (desktop-friendly). Default: false |
1315
+ | openOnClick | `boolean` | `false` | No | Enable click/tap behavior (touch-friendly). Default: false |
1316
+ | interactive | `boolean` | `true` | No | Whether the panel should receive pointer events. Default: true |
1317
+ | fallbackToBestFit | `boolean` | `false` | No | When a concrete placement is set, fall back to best-fit when it doesn't fit. Default: false |
1318
+ | clampToViewport | `boolean` | `true` | No | Whether the panel should be clamped into the viewport. Default: true |
1319
+
1320
+ ### Content Slots
1321
+
1322
+ - `[coarPopoverTrigger]`
1323
+ - `[coarPopoverContent]`
1324
+
1325
+ ### CSS Custom Properties
1326
+
1327
+ | Property | Default |
1328
+ |----------|---------|
1329
+ | `--coar-popover-min-width` | 200px |
1330
+ | `--coar-popover-max-width` | 360px |
1331
+ | `--coar-popover-max-height` | 240px |
1332
+
1333
+ ## coar-tooltip-overlay
1334
+
1335
+ **Selector:** `<coar-tooltip-overlay>`
1336
+ **Class:** `CoarTooltipOverlayComponent`
1337
+ **Import:** `import { CoarTooltipOverlayComponent } from '@cocoar/ui';`
1338
+
1339
+ ### Inputs
1340
+
1341
+ | Name | Type | Default | Required | Description |
1342
+ |------|------|---------|----------|-------------|
1343
+ | tooltipId | `string` | `''` | No | |
1344
+ | content | `CoarTooltipOverlayContent | null` | `null` | No | |
1345
+ | context | `object | null` | `null` | No | Context passed to template content via ngTemplateOutletContext. |
1346
+ | contentInjector | `Injector | null` | `null` | No | Injector for dynamic component content via NgComponentOutlet. |
1347
+
1348
+ ## [coarTooltip]
1349
+
1350
+ **Kind:** Directive
1351
+ **Selector:** `[coarTooltip]`
1352
+ **Export As:** `coarTooltip`
1353
+ **Class:** `CoarTooltipDirective`
1354
+ **Import:** `import { CoarTooltipDirective } from '@cocoar/ui';`
1355
+
1356
+ ### Inputs
1357
+
1358
+ | Name | Type | Default | Required | Description |
1359
+ |------|------|---------|----------|-------------|
1360
+ | coarTooltip | `CoarTooltipOverlayContent | null` | `null` | No | Tooltip content (string, TemplateRef, or Component type). |
1361
+ | coarTooltipContext | `object | null` | `null` | No | Optional context for TemplateRef tooltips. |
1362
+ | coarTooltipDisabled | `boolean` | `false` | No | Disable tooltip behavior. |
1363
+ | coarTooltipPlacement | `TooltipPlacement` | `'top'` | No | Placement preference. Default: 'top'. Use 'auto' for best-fit. |
1364
+ | coarTooltipOpenDelay | `number` | `0` | No | Delay (ms) before opening on hover/focus. Default: 0 |
1365
+ | coarTooltipCloseDelay | `number` | `0` | No | Delay (ms) before closing on leave/blur. Default: 0 |
1366
+ | coarTooltipClampToViewport | `boolean` | `true` | No | Whether the tooltip should be clamped into the viewport. Default: true |
1367
+ | coarTooltipFallbackToBestFit | `boolean` | `false` | No | When placement is explicit (not auto), fall back to best-fit when it doesn't fit. Default: false |
1368
+
1369
+ ## CoarTooltipService
1370
+
1371
+ **Kind:** Service (Injectable, providedIn: root)
1372
+ **Class:** `CoarTooltipService`
1373
+ **Import:** `import { CoarTooltipService } from '@cocoar/ui';`
1374
+
1375
+ ### Methods
1376
+
1377
+ #### `notifyClosed(id: string): void`
1378
+
1379
+ ### Related Types
1380
+
1381
+ ```typescript
1382
+ type CoarTooltipOverlayContent = string | TemplateRef<unknown> | Type<unknown>;
1383
+ ```
1384
+
1385
+ ## [coarPopconfirm]
1386
+
1387
+ **Selector:** `<[coarPopconfirm]>`
1388
+ **Class:** `CoarPopconfirmDirective`
1389
+ **Import:** `import { CoarPopconfirmDirective } from '@cocoar/ui';`
1390
+
1391
+ Popconfirm directive for confirming actions with a small anchored popover.
1392
+ Intercepts clicks on the host element, shows a confirmation popover,
1393
+ and either proceeds with the action (confirm) or cancels.
1394
+
1395
+ ### Inputs
1396
+
1397
+ | Name | Type | Default | Required | Description |
1398
+ |------|------|---------|----------|-------------|
1399
+ | popconfirmTitle | `string` | `''` | No | Optional title above the message |
1400
+ | confirmText | `string` | `'OK'` | No | Text for the confirm button |
1401
+ | cancelText | `string` | `'Cancel'` | No | Text for the cancel button |
1402
+ | confirmVariant | `'primary' | 'danger'` | `'primary'` | No | Variant for confirm button |
1403
+ | placement | `PopconfirmPlacement` | `'top'` | No | Placement relative to trigger element |
1404
+ | popconfirmDisabled | `boolean` | `false` | No | Whether popconfirm is disabled |
1405
+ | message | `string` | `''` | No | Confirmation message to display |
1406
+ | title | `string` | `''` | No | Optional title above the message |
1407
+ | confirmText | `string` | `'OK'` | No | Text for the confirm button |
1408
+ | cancelText | `string` | `'Cancel'` | No | Text for the cancel button |
1409
+ | confirmVariant | `'primary' | 'danger'` | `'primary'` | No | Variant for confirm button |
1410
+ | placement | `PopconfirmPlacement` | `'top'` | No | Placement for arrow positioning |
1411
+ | coarPopconfirm | `string` | — | Yes | Confirmation message to display |
1412
+
1413
+ ### Outputs
1414
+
1415
+ | Name | Type | Description |
1416
+ |------|------|-------------|
1417
+ | confirmed | `void` | Emitted when user confirms |
1418
+ | cancelled | `void` | Emitted when user cancels |
1419
+
1420
+ ### Related Types
1421
+
1422
+ ```typescript
1423
+ type PopconfirmPlacement = 'top' | 'bottom' | 'left' | 'right';
1424
+ ```
1425
+
1426
+ ## coar-dialog-shell
1427
+
1428
+ **Selector:** `<coar-dialog-shell>`
1429
+ **Class:** `CoarDialogShellComponent`
1430
+ **Import:** `import { CoarDialogShellComponent } from '@cocoar/ui';`
1431
+
1432
+ ### Inputs
1433
+
1434
+ | Name | Type | Default | Required | Description |
1435
+ |------|------|---------|----------|-------------|
1436
+ | dialogTitle | `string` | `''` | No | |
1437
+ | dialogSize | `CoarDialogSize` | `'m'` | No | |
1438
+ | showCloseButton | `boolean` | `true` | No | |
1439
+ | contentContext | `unknown` | `null` | No | |
1440
+ | confirmMode | `boolean` | `false` | No | |
1441
+ | confirmMessage | `string` | `''` | No | |
1442
+ | confirmText | `string` | `'Confirm'` | No | |
1443
+ | cancelText | `string` | `'Cancel'` | No | |
1444
+ | confirmVariant | `string` | `'primary'` | No | |
1445
+
1446
+ ## CoarDialogService
1447
+
1448
+ **Kind:** Service (Injectable, providedIn: root)
1449
+ **Class:** `CoarDialogService`
1450
+ **Import:** `import { CoarDialogService } from '@cocoar/ui';`
1451
+
1452
+ ### Methods
1453
+
1454
+ #### `openComponent(component: Type<C>,
1455
+ config: CoarDialogConfig<TResult> = {},
1456
+ inputs?: Record<string, unknown>): CoarDialogRef<TResult>`
1457
+
1458
+ #### `openTemplate(template: TemplateRef<TCtx>,
1459
+ config: CoarDialogConfig<TResult> = {},
1460
+ context?: TCtx): CoarDialogRef<TResult>`
1461
+
1462
+ #### `confirm(options: CoarConfirmOptions): CoarDialogRef<boolean>`
1463
+
1464
+ ### Related Types
1465
+
1466
+ ```typescript
1467
+ type CoarDialogSize = 's' | 'm' | 'l';
1468
+ ```
1469
+
1470
+ ```typescript
1471
+ interface CoarDialogConfig {title?: string;
1472
+ size?: CoarDialogSize;
1473
+ closeOnBackdropClick?: boolean;
1474
+ closeOnEscape?: boolean;
1475
+ showCloseButton?: boolean;
1476
+ panelClass?: string | string[];
1477
+ ariaLabel?: string;
1478
+ ariaDescribedBy?: string;
1479
+ }
1480
+ ```
1481
+
1482
+ ```typescript
1483
+ interface CoarDialogRef {close(result?: TResult): void;
1484
+ readonly afterClosed$: Observable<TResult | undefined>;
1485
+ }
1486
+ ```
1487
+
1488
+ ```typescript
1489
+ interface CoarConfirmOptions {title: string;
1490
+ message: string;
1491
+ confirmText?: string;
1492
+ cancelText?: string;
1493
+ confirmVariant?: 'primary' | 'danger';
1494
+ }
1495
+ ```
1496
+
1497
+ ## coar-toast-container
1498
+
1499
+ **Selector:** `<coar-toast-container>`
1500
+ **Class:** `CoarToastContainerComponent`
1501
+ **Import:** `import { CoarToastContainerComponent } from '@cocoar/ui';`
1502
+
1503
+ ## coar-toast
1504
+
1505
+ **Selector:** `<coar-toast>`
1506
+ **Class:** `CoarToastComponent`
1507
+ **Import:** `import { CoarToastComponent } from '@cocoar/ui';`
1508
+
1509
+ ### Inputs
1510
+
1511
+ | Name | Type | Default | Required | Description |
1512
+ |------|------|---------|----------|-------------|
1513
+ | variant | `CoarToastVariant` | `'info'` | No | |
1514
+ | title | `string` | `''` | No | |
1515
+ | message | `string` | `''` | No | |
1516
+ | duration | `number` | `5000` | No | |
1517
+ | dismissible | `boolean` | `true` | No | |
1518
+ | showProgress | `boolean` | `true` | No | |
1519
+
1520
+ ### Outputs
1521
+
1522
+ | Name | Type | Description |
1523
+ |------|------|-------------|
1524
+ | dismissed | `void` | |
1525
+ | actionClicked | `void` | |
1526
+
1527
+ ### CSS Custom Properties
1528
+
1529
+ | Property | Default |
1530
+ |----------|---------|
1531
+ | `--coar-toast-background` | var(--coar-background-neutral-primary |
1532
+
1533
+ ## CoarToastService
1534
+
1535
+ **Kind:** Service (Injectable, providedIn: root)
1536
+ **Class:** `CoarToastService`
1537
+ **Import:** `import { CoarToastService } from '@cocoar/ui';`
1538
+
1539
+ ### Methods
1540
+
1541
+ #### `success(message: string, config?: Partial<CoarToastConfig>): CoarToastRef`
1542
+
1543
+ #### `error(message: string, config?: Partial<CoarToastConfig>): CoarToastRef`
1544
+
1545
+ #### `warning(message: string, config?: Partial<CoarToastConfig>): CoarToastRef`
1546
+
1547
+ #### `info(message: string, config?: Partial<CoarToastConfig>): CoarToastRef`
1548
+
1549
+ #### `show(config: CoarToastConfig): CoarToastRef`
1550
+
1551
+ #### `dismissAll(): void`
1552
+
1553
+ ### Related Types
1554
+
1555
+ ```typescript
1556
+ type CoarToastVariant = 'success' | 'error' | 'warning' | 'info';
1557
+ ```
1558
+
1559
+ ```typescript
1560
+ type CoarToastPosition = | 'top-right'
1561
+ | 'top-left'
1562
+ | 'top-center'
1563
+ | 'bottom-right'
1564
+ | 'bottom-left'
1565
+ | 'bottom-center';
1566
+ ```
1567
+
1568
+ ```typescript
1569
+ interface CoarToastConfig {variant?: CoarToastVariant;
1570
+ title?: string;
1571
+ message: string;
1572
+ duration?: number;
1573
+ dismissible?: boolean;
1574
+ position?: CoarToastPosition;
1575
+ showProgress?: boolean;
1576
+ action?: { label: string; callback: () => void };
1577
+ }
1578
+ ```
1579
+
1580
+ ```typescript
1581
+ interface CoarToastRef {dismiss(): void;
1582
+ readonly afterDismissed$: Observable<void>;
1583
+ }
1584
+ ```
1585
+
1586
+ ```typescript
1587
+ interface InternalToast {id: number;
1588
+ variant: CoarToastVariant;
1589
+ title: string;
1590
+ message: string;
1591
+ duration: number;
1592
+ dismissible: boolean;
1593
+ showProgress: boolean;
1594
+ action: { label: string; callback: () => void } | null;
1595
+ onDismiss: () => void;
1596
+ }
1597
+ ```
1598
+
1599
+ ---
1600
+
1601
+ # Date & Time
1602
+
1603
+ ## coar-plain-date-picker
1604
+
1605
+ **Selector:** `<coar-plain-date-picker>`
1606
+ **Class:** `CoarPlainDatePickerComponent`
1607
+ **Import:** `import { CoarPlainDatePickerComponent } from '@cocoar/ui';`
1608
+
1609
+ Date picker component with scrollable calendar.
1610
+ Returns strongly-typed `Temporal.PlainDate` values (timezone-independent, date only).
1611
+ Features:
1612
+ - Two-column layout: scrollable calendar on left, month list on right
1613
+ - No time selection (use `coar-plain-date-time-picker` if time is needed)
1614
+ - CSS-based virtualization for smooth scrolling through months
1615
+
1616
+ ### Inputs
1617
+
1618
+ | Name | Type | Default | Required | Description |
1619
+ |------|------|---------|----------|-------------|
1620
+ | min | `Temporal.PlainDate | null` | `null` | No | Minimum selectable date |
1621
+ | max | `Temporal.PlainDate | null` | `null` | No | Maximum selectable date |
1622
+ | closeOnSelect | `boolean` | `false` | No | Whether to close the panel after selecting a date (default: false to allow viewing events) |
1623
+
1624
+ ### Two-Way Bindings (model)
1625
+
1626
+ | Name | Type | Default | Description |
1627
+ |------|------|---------|-------------|
1628
+ | value | `Temporal.PlainDate | null` | `null` | Current selected value (two-way bindable with [(value)]) |
1629
+
1630
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1631
+
1632
+ ### Outputs
1633
+
1634
+ | Name | Type | Description |
1635
+ |------|------|-------------|
1636
+ | valueChange | `Temporal.PlainDate | null` | Emitted when the selected value changes |
1637
+
1638
+ ### Related Types
1639
+
1640
+ ```typescript
1641
+ type CoarPlainDatePickerSize = CoarDatePickerSize;
1642
+ ```
1643
+
1644
+ ## coar-plain-date-time-picker
1645
+
1646
+ **Selector:** `<coar-plain-date-time-picker>`
1647
+ **Class:** `CoarPlainDateTimePickerComponent`
1648
+ **Import:** `import { CoarPlainDateTimePickerComponent } from '@cocoar/ui';`
1649
+
1650
+ Date-time picker component with scrollable calendar and time selection.
1651
+ Returns strongly-typed `Temporal.PlainDateTime` values (timezone-independent).
1652
+ Features:
1653
+ - Two-column layout: scrollable calendar on left, month list + time picker on right
1654
+ - Locale-aware time format (12h/24h auto-detection)
1655
+ - CSS-based virtualization for smooth scrolling through months
1656
+ - Min/max datetime constraints with time clamping
1657
+
1658
+ ### Inputs
1659
+
1660
+ | Name | Type | Default | Required | Description |
1661
+ |------|------|---------|----------|-------------|
1662
+ | min | `Temporal.PlainDateTime | null` | `null` | No | Minimum selectable datetime |
1663
+ | max | `Temporal.PlainDateTime | null` | `null` | No | Maximum selectable datetime |
1664
+ | use24Hour | `boolean | 'auto'` | `'auto'` | No | Whether to use 24-hour time format. |
1665
+ | minuteStep | `1 | 5 | 10 | 15` | `5` | No | Step interval for minute selection (1, 5, 10, or 15) |
1666
+ | defaultTime | `CoarTimeValue` | `{ hours: 9, minutes: 0 }` | No | Default time to use when selecting a date without existing time. |
1667
+
1668
+ ### Two-Way Bindings (model)
1669
+
1670
+ | Name | Type | Default | Description |
1671
+ |------|------|---------|-------------|
1672
+ | value | `Temporal.PlainDateTime | null` | `null` | Current selected value (two-way bindable with [(value)]) |
1673
+
1674
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1675
+
1676
+ ### Outputs
1677
+
1678
+ | Name | Type | Description |
1679
+ |------|------|-------------|
1680
+ | valueChange | `Temporal.PlainDateTime | null` | Emitted when the selected value changes |
1681
+
1682
+ ### Related Types
1683
+
1684
+ ```typescript
1685
+ type CoarPlainDateTimePickerSize = CoarDatePickerSize;
1686
+ ```
1687
+
1688
+ ## coar-zoned-date-time-picker
1689
+
1690
+ **Selector:** `<coar-zoned-date-time-picker>`
1691
+ **Class:** `CoarZonedDateTimePickerComponent`
1692
+ **Import:** `import { CoarZonedDateTimePickerComponent } from '@cocoar/ui';`
1693
+
1694
+ Zoned date-time picker component with full timezone support.
1695
+ Returns strongly-typed `Temporal.ZonedDateTime` values that include:
1696
+ - The local date and time (user's intent)
1697
+ - The IANA timezone (context)
1698
+ - The instant (derived UTC moment)
1699
+ Key concepts:
1700
+ - **Value timezone**: Where the event "lives" - persisted with the value
1701
+ - **Display timezone**: User's viewing lens (from CoarTimeZoneService)
1702
+ This picker captures complete user intent, allowing you to:
1703
+ - Store the local time + timezone as source of truth
1704
+ - Derive the UTC instant for queries and ordering
1705
+ - Recalculate instants if DST rules change
1706
+
1707
+ ### Inputs
1708
+
1709
+ | Name | Type | Default | Required | Description |
1710
+ |------|------|---------|----------|-------------|
1711
+ | timeZone | `string | null` | `null` | No | The timezone for the value. |
1712
+ | min | `Temporal.ZonedDateTime | null` | `null` | No | Minimum selectable datetime (in the value's timezone) |
1713
+ | max | `Temporal.ZonedDateTime | null` | `null` | No | Maximum selectable datetime (in the value's timezone) |
1714
+ | use24Hour | `boolean | 'auto'` | `'auto'` | No | Whether to use 24-hour time format. |
1715
+ | minuteStep | `1 | 5 | 10 | 15` | `5` | No | Step interval for minute selection (1, 5, 10, or 15) |
1716
+ | defaultTime | `CoarTimeValue` | `{ hours: 9, minutes: 0 }` | No | Default time to use when selecting a date without existing time. |
1717
+ | timezoneFilter | `string[]` | `[]` | No | Filter patterns for available timezone options. |
1718
+
1719
+ ### Two-Way Bindings (model)
1720
+
1721
+ | Name | Type | Default | Description |
1722
+ |------|------|---------|-------------|
1723
+ | value | `Temporal.ZonedDateTime | null` | `null` | Current selected value (two-way bindable with [(value)]) |
1724
+
1725
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1726
+
1727
+ ### Outputs
1728
+
1729
+ | Name | Type | Description |
1730
+ |------|------|-------------|
1731
+ | valueChange | `Temporal.ZonedDateTime | null` | Emitted when the selected value changes |
1732
+
1733
+ ### Related Types
1734
+
1735
+ ```typescript
1736
+ type CoarZonedDateTimePickerSize = CoarDatePickerSize;
1737
+ ```
1738
+
1739
+ ## coar-time-picker
1740
+
1741
+ **Selector:** `<coar-time-picker>`
1742
+ **Class:** `CoarTimePickerComponent`
1743
+ **Import:** `import { CoarTimePickerComponent } from '@cocoar/ui';`
1744
+ **Forms:** Compatible with Angular Reactive Forms and ngModel (ControlValueAccessor)
1745
+
1746
+ Time picker component with hours, minutes, and optional AM/PM selection.
1747
+ Supports both 12-hour and 24-hour formats, with locale-aware auto-detection.
1748
+ Values wrap around at boundaries (23→00, 59→00 with hour increment).
1749
+
1750
+ ### Inputs
1751
+
1752
+ | Name | Type | Default | Required | Description |
1753
+ |------|------|---------|----------|-------------|
1754
+ | size | `CoarTimePickerSize` | `'m'` | No | Size variant |
1755
+ | readonly | `boolean` | `false` | No | Whether the picker is readonly |
1756
+ | disabled | `boolean` | `false` | No | Whether the picker is disabled |
1757
+ | use24Hour | `boolean | 'auto'` | `'auto'` | No | Whether to use 24-hour format. |
1758
+ | minuteStep | `1 | 5 | 10 | 15` | `5` | No | Step interval for minute selection. |
1759
+ | locale | `string` | — | No | Locale identifier for 12h/24h format detection. |
1760
+ | ariaLabel | `string` | `'Time'` | No | Label for screen readers (visually hidden). |
1761
+ | minTime | `CoarTimeValue | null` | `null` | No | Minimum allowed time (hours and minutes in 24h format). |
1762
+ | maxTime | `CoarTimeValue | null` | `null` | No | Maximum allowed time (hours and minutes in 24h format). |
1763
+
1764
+ ### Two-Way Bindings (model)
1765
+
1766
+ | Name | Type | Default | Description |
1767
+ |------|------|---------|-------------|
1768
+ | value | `CoarTimeValue | null` | `null` | Current time value (two-way bindable with [(value)]) |
1769
+
1770
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1771
+
1772
+ ### Related Types
1773
+
1774
+ ```typescript
1775
+ type CoarTimePickerSize = 'xs' | 's' | 'm' | 'l';
1776
+ ```
1777
+
1778
+ ## coar-scrollable-calendar
1779
+
1780
+ **Selector:** `<coar-scrollable-calendar>`
1781
+ **Class:** `CoarScrollableCalendarComponent`
1782
+ **Import:** `import { CoarScrollableCalendarComponent } from '@cocoar/ui';`
1783
+
1784
+ Scrollable calendar component displaying multiple months vertically.
1785
+ Uses CSS `content-visibility: auto` for virtualization to optimize performance
1786
+ when displaying many months. The calendar scrolls vertically and syncs with
1787
+ an external month list for navigation.
1788
+
1789
+ ### Inputs
1790
+
1791
+ | Name | Type | Default | Required | Description |
1792
+ |------|------|---------|----------|-------------|
1793
+ | min | `Temporal.PlainDate | null` | `null` | No | Minimum selectable date |
1794
+ | max | `Temporal.PlainDate | null` | `null` | No | Maximum selectable date |
1795
+ | locale | `string` | — | No | Locale identifier for date formatting (e.g., 'de-AT', 'en-US'). |
1796
+ | dateFormatConfig | `DateFormatConfig` | — | No | Date format configuration (pattern and first day of week) |
1797
+ | showWeekNumbers | `boolean` | `false` | No | Whether to show week numbers |
1798
+ | highlightWeekends | `boolean` | `false` | No | Whether to highlight weekend days (Saturday/Sunday) with a subtle background |
1799
+ | markers | `CoarDateMarker[]` | `[]` | No | Date markers for highlighting special dates (holidays, events, etc.) |
1800
+ | monthRange | `{ before: number; after: number }` | `{ before: 12, after: 12 }` | No | Number of months to display before and after the current year. |
1801
+ | maxMonthsInDom | `number` | `25` | No | Maximum number of months to keep in the DOM at once. |
1802
+ | monthsToLoad | `number` | `6` | No | Number of months to load when reaching the edge of the current range. |
1803
+
1804
+ ### Two-Way Bindings (model)
1805
+
1806
+ | Name | Type | Default | Description |
1807
+ |------|------|---------|-------------|
1808
+ | value | `Temporal.PlainDate | null` | `null` | Current selected date (two-way bindable with [(value)]) |
1809
+ | activeMonth | `Temporal.PlainYearMonth` | `Temporal.Now.plainDateISO(` | Currently visible/active month (two-way bindable, syncs with scroll position) |
1810
+
1811
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1812
+
1813
+ ### Outputs
1814
+
1815
+ | Name | Type | Description |
1816
+ |------|------|-------------|
1817
+ | dateSelected | `Temporal.PlainDate` | Emitted when a date is clicked |
1818
+
1819
+ ### Related Types
1820
+
1821
+ ```typescript
1822
+ interface CoarCalendarMonth {readonly yearMonth: Temporal.PlainYearMonth;
1823
+ readonly monthName: string;
1824
+ readonly year: number;
1825
+ readonly days: CoarCalendarDay[];
1826
+ readonly weekNumbers: number[];
1827
+ }
1828
+ ```
1829
+ Represents a single month view in the scrollable calendar.
1830
+
1831
+ ```typescript
1832
+ interface CoarCalendarDay {readonly date: Temporal.PlainDate;
1833
+ readonly day: number;
1834
+ readonly isOutsideMonth: boolean;
1835
+ readonly isToday: boolean;
1836
+ readonly isSelected: boolean;
1837
+ readonly isFocused: boolean;
1838
+ readonly isDisabled: boolean;
1839
+ readonly isWeekend: boolean;
1840
+ readonly markers: CoarDateMarker[];
1841
+ readonly markerCssClass: string;
1842
+ readonly markerTooltip: string | null;
1843
+ }
1844
+ ```
1845
+ Represents a single day cell in the calendar.
1846
+
1847
+ ## coar-mini-calendar
1848
+
1849
+ **Selector:** `<coar-mini-calendar>`
1850
+ **Class:** `CoarMiniCalendarComponent`
1851
+ **Import:** `import { CoarMiniCalendarComponent } from '@cocoar/ui';`
1852
+
1853
+ ### Inputs
1854
+
1855
+ | Name | Type | Default | Required | Description |
1856
+ |------|------|---------|----------|-------------|
1857
+ | min | `Temporal.PlainDate | null` | `null` | No | Minimum selectable date |
1858
+ | max | `Temporal.PlainDate | null` | `null` | No | Maximum selectable date |
1859
+ | locale | `string` | — | No | Locale identifier for date formatting (e.g., 'de-AT', 'en-US'). |
1860
+ | dateFormatConfig | `DateFormatConfig` | — | No | Date format configuration (pattern and first day of week) |
1861
+ | showTodayButton | `boolean` | `true` | No | Whether to show a "Today" button |
1862
+ | showWeekNumbers | `boolean` | `false` | No | Whether to show week numbers |
1863
+ | highlightWeekends | `boolean` | `false` | No | Whether to highlight weekend days (Saturday/Sunday) with a subtle background |
1864
+ | markers | `CoarDateMarker[]` | `[]` | No | Date markers for highlighting special dates (holidays, events, etc.) |
1865
+
1866
+ ### Two-Way Bindings (model)
1867
+
1868
+ | Name | Type | Default | Description |
1869
+ |------|------|---------|-------------|
1870
+ | value | `Temporal.PlainDate | null` | `null` | Current selected date (two-way bindable with [(value)]) |
1871
+
1872
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1873
+
1874
+ ## coar-month-list
1875
+
1876
+ **Selector:** `<coar-month-list>`
1877
+ **Class:** `CoarMonthListComponent`
1878
+ **Import:** `import { CoarMonthListComponent } from '@cocoar/ui';`
1879
+
1880
+ Month list component for date/time picker navigation.
1881
+ Displays a vertical list of month names with a year stepper at the top.
1882
+ The list height adapts to its container and becomes scrollable if all
1883
+ 12 months don't fit.
1884
+
1885
+ ### Inputs
1886
+
1887
+ | Name | Type | Default | Required | Description |
1888
+ |------|------|---------|----------|-------------|
1889
+ | locale | `string` | — | No | Locale identifier for month name formatting. |
1890
+ | minYear | `number` | `Temporal.Now.plainDateISO(` | No | Minimum year that can be selected. |
1891
+ | maxYear | `number` | `Temporal.Now.plainDateISO(` | No | Maximum year that can be selected. |
1892
+
1893
+ ### Two-Way Bindings (model)
1894
+
1895
+ | Name | Type | Default | Description |
1896
+ |------|------|---------|-------------|
1897
+ | activeMonth | `Temporal.PlainYearMonth` | `Temporal.Now.plainDateISO(` | Currently active/visible month (two-way bindable) |
1898
+
1899
+ > Use `[(name)]` for two-way binding or `(nameChange)` to listen for changes.
1900
+
1901
+ ### Outputs
1902
+
1903
+ | Name | Type | Description |
1904
+ |------|------|-------------|
1905
+ | monthSelected | `Temporal.PlainYearMonth` | Emitted when a month is selected from the list |
1906
+ | yearChanged | `number` | Emitted when the year changes via stepper |
1907
+
1908
+ ## date-utilities
1909
+
1910
+ **Kind:** Utility exports (types + helper functions)
1911
+ **Import:** `import { ... } from '@cocoar/ui';`
1912
+
1913
+ ### Types
1914
+
1915
+ ```typescript
1916
+ type CoarTimePeriod = 'AM' | 'PM';
1917
+ ```
1918
+ AM/PM period indicator.
1919
+
1920
+ ### Interfaces
1921
+
1922
+ ```typescript
1923
+ interface DateFormatConfig {/** Date format pattern: 'dd.mm.yyyy', 'dd/mm/yyyy', 'mm/dd/yyyy', 'yyyy-mm-dd' */
1924
+ readonly pattern: 'dd.mm.yyyy' | 'dd/mm/yyyy' | 'mm/dd/yyyy' | 'yyyy-mm-dd';
1925
+
1926
+ /** First day of week: 1 = Monday, 7 = Sunday */
1927
+ readonly firstDayOfWeek: 1 | 7;
1928
+ }
1929
+ ```
1930
+ Shared date formatting configuration.
1931
+ Note: This config is intentionally small so it can be used by multiple UI components
1932
+ (date picker, future calendar, etc.) without pulling in Angular-only code.
1933
+
1934
+ ```typescript
1935
+ interface CoarCalendarGridCell {readonly date: Temporal.PlainDate;
1936
+ readonly isOutsideMonth: boolean;
1937
+ }
1938
+ ```
1939
+
1940
+ ```typescript
1941
+ interface CoarDateMarker {/** Start date of the marker (or single date if no endDate) */
1942
+ startDate: Temporal.PlainDate;
1943
+ /** Optional end date for date ranges (inclusive) */
1944
+ endDate?: Temporal.PlainDate;
1945
+ /** Description shown as tooltip on hover */
1946
+ description: string;
1947
+ /** Optional custom CSS class for styling different marker types */
1948
+ cssClass?: string;
1949
+ }
1950
+ ```
1951
+ Represents a date marker for highlighting special dates (holidays, events, etc.).
1952
+ Supports single dates or date ranges.
1953
+
1954
+ ```typescript
1955
+ interface TimeFormatConfig {/**
1956
+ * Whether to use 24-hour format (true) or 12-hour format with AM/PM (false).
1957
+ * When set to 'auto', the format is detected from the user's locale.
1958
+ */
1959
+ readonly use24Hour: boolean | 'auto';
1960
+
1961
+ /**
1962
+ * Step interval for minute selection.
1963
+ * For example, 5 means minutes can only be 0, 5, 10, 15, etc.
1964
+ */
1965
+ readonly minuteStep: 1 | 5 | 10 | 15;
1966
+ }
1967
+ ```
1968
+ Shared time formatting configuration.
1969
+ Note: This config is intentionally small so it can be used by multiple UI components
1970
+ (time picker, date-time picker, etc.) without pulling in Angular-only code.
1971
+
1972
+ ```typescript
1973
+ interface CoarTimeValue {readonly hours: number;
1974
+ readonly minutes: number;
1975
+ }
1976
+ ```
1977
+ Parsed time value with hours (0-23) and minutes (0-59).
1978
+
1979
+ ### Functions
1980
+
1981
+ #### `coarDetectDateFormatPatternFromIntl(locale: string): DateFormatConfig['pattern']`
1982
+
1983
+ #### `coarGetDateSeparatorForPattern(pattern: DateFormatConfig['pattern']): '.'`
1984
+
1985
+ #### `coarGetLocalizedWeekdays(locale: string, firstDayOfWeek: 1 | 7): string[]`
1986
+
1987
+ #### `coarFormatPlainDate(date: Temporal.PlainDate,
1988
+ pattern: DateFormatConfig['pattern']): string`
1989
+
1990
+ #### `coarParsePlainDateFromInput(text: string,
1991
+ pattern: DateFormatConfig['pattern'],
1992
+ constraints?: {
1993
+ min?: Temporal.PlainDate | null;
1994
+ max?: Temporal.PlainDate | null;
1995
+ }): Temporal.PlainDate`
1996
+
1997
+ #### `coarTemporalPlainDateToDate(date: Temporal.PlainDate): Date`
1998
+
1999
+ #### `coarCalculateIsoWeekNumber(date: Temporal.PlainDate): number`
2000
+
2001
+ #### `coarClampPlainDate(date: Temporal.PlainDate,
2002
+ constraints?: {
2003
+ min?: Temporal.PlainDate | null;
2004
+ max?: Temporal.PlainDate | null;
2005
+ }): Temporal.PlainDate`
2006
+
2007
+ #### `coarGetCalendarGridDates(viewMonth: Temporal.PlainYearMonth,
2008
+ firstDayOfWeek: 1 | 7): CoarCalendarGridCell[]`
2009
+ Returns a fixed 6x7 calendar grid (42 cells) for the given month.
2010
+ Includes leading/trailing days from adjacent months to fill the grid.
2011
+
2012
+ #### `coarDetect12HourFormat(locale: string): boolean`
2013
+ Detects whether the given locale uses 12-hour time format.
2014
+ Uses Intl.DateTimeFormat to check if the locale's default time format
2015
+ includes a dayPeriod (AM/PM indicator).
2016
+
2017
+ #### `coarFormatTime(hours: number, minutes: number, use24Hour: boolean): string`
2018
+ Formats a time value as a string.
2019
+
2020
+ #### `coarParseTimeInput(text: string): CoarTimeValue`
2021
+ Parses a time string into hours and minutes.
2022
+ Supports both 24-hour and 12-hour formats:
2023
+ - 24h: "14:30", "08:00", "23:59"
2024
+ - 12h: "2:30 PM", "12:00 AM", "11:59 pm"
2025
+
2026
+ #### `coarConvertTo12Hour(hours24: number): void`
2027
+ Converts 24-hour format hours to 12-hour format.
2028
+
2029
+ #### `coarConvertTo24Hour(hours12: number, period: CoarTimePeriod): number`
2030
+ Converts 12-hour format to 24-hour format.
2031
+
2032
+ #### `coarIncrementHours(hours: number, delta: number): number`
2033
+ Increments hours with wrap-around.
2034
+
2035
+ #### `coarIncrementMinutes(minutes: number,
2036
+ delta: number,
2037
+ step = 1): void`
2038
+ Increments minutes with wrap-around and optional hour carry.
2039
+
2040
+ #### `coarRoundMinutesToStep(minutes: number, step: number): number`
2041
+ Rounds minutes to the nearest step.
2042
+
2043
+ #### `coarGetValidMinutes(step: 1 | 5 | 10 | 15): number[]`
2044
+ Gets valid minute values for a given step.
2045
+
2046
+ ---
2047
+
2048
+ # Menu
2049
+
2050
+ ## coar-menu
2051
+
2052
+ **Selector:** `<coar-menu>`
2053
+ **Class:** `CoarMenuComponent`
2054
+ **Import:** `import { CoarMenuComponent } from '@cocoar/ui';`
2055
+
2056
+ CoarMenu: Shell component providing menu styling container.
2057
+ Responsibilities:
2058
+ - Apply consistent menu styling via CSS variables
2059
+ - Provide semantic menu container (<menu> or <div role="menu">)
2060
+ - Provide root cascade for sibling submenu tracking
2061
+ - No logic - just a styled wrapper
2062
+ Use standalone for inline menus, or as overlay content (via `createOverlayBuilder`) for context menus/flyouts.
2063
+
2064
+ ### Inputs
2065
+
2066
+ | Name | Type | Default | Required | Description |
2067
+ |------|------|---------|----------|-------------|
2068
+ | showIconColumn | `boolean` | `true` | No | Controls whether the menu reserves and renders an icon column. |
2069
+ | borderless | `boolean` | `false` | No | Removes border, background, border-radius, and shadow for seamless embedding in containers. |
2070
+
2071
+ ### Content Slots
2072
+
2073
+ - Default slot: `<ng-content />`
2074
+
2075
+ ### CSS Custom Properties
2076
+
2077
+ | Property | Default |
2078
+ |----------|---------|
2079
+ | `--coar-menu-min-width` | 12rem |
2080
+ | `--coar-menu-max-width` | 20rem |
2081
+ | `--coar-menu-padding` | 0.5rem |
2082
+ | `--coar-menu-gap` | 0.25rem |
2083
+ | `--coar-menu-background` | #f8f9fa |
2084
+ | `--coar-menu-border` | 1px solid var(--coar-border-neutral-tertiary, #d0d0d0 |
2085
+ | `--coar-menu-border-radius` | var(--coar-radius-s, 4px |
2086
+ | `--coar-menu-shadow` | var(--coar-shadow-s, none |
2087
+
2088
+ ## coar-menu-item
2089
+
2090
+ **Selector:** `<coar-menu-item>`
2091
+ **Class:** `CoarMenuItemComponent`
2092
+ **Import:** `import { CoarMenuItemComponent } from '@cocoar/ui';`
2093
+
2094
+ CoarMenuItem: Individual menu item with optional icon and submenu support.
2095
+ Responsibilities:
2096
+ - Render item text and optional icon
2097
+ - Handle click events
2098
+ - Support disabled state
2099
+ - Visual states: hover, active, focus
2100
+ - Trigger submenu (accordion or flyout via parent menu logic)
2101
+ Does NOT manage overlay directly - parent menu handles flyout logic.
2102
+
2103
+ ### Inputs
2104
+
2105
+ | Name | Type | Default | Required | Description |
2106
+ |------|------|---------|----------|-------------|
2107
+ | label | `string` | — | No | Item text content |
2108
+ | icon | `string | undefined` | `undefined` | No | Optional icon identifier (rendered via CoarIconComponent) |
2109
+ | disabled | `boolean` | `false` | No | Disabled state prevents interaction |
2110
+
2111
+ ### Outputs
2112
+
2113
+ | Name | Type | Description |
2114
+ |------|------|-------------|
2115
+ | clicked | `CoarMenuItemClickEvent` | Emitted when user clicks/selects the item. Menu closes by default unless preventDefault() is called. |
2116
+ | hovered | `Event` | Emitted when user hovers over item (for flyout trigger) |
2117
+
2118
+ ### Content Slots
2119
+
2120
+ - Default slot: `<ng-content />`
2121
+
2122
+ ### CSS Custom Properties
2123
+
2124
+ | Property | Default |
2125
+ |----------|---------|
2126
+ | `--coar-menu-item-gap` | 0.75rem |
2127
+ | `--coar-menu-item-padding` | 0.5rem 0.75rem |
2128
+ | `--coar-menu-item-font-family` | var(--coar-font-family-body, Poppins |
2129
+ | `--coar-menu-item-font-weight` | var(--coar-font-weight-regular, 400 |
2130
+ | `--coar-menu-item-line-height` | 1.5 |
2131
+ | `--coar-menu-item-color` | var(--coar-text-neutral-primary, #545454 |
2132
+ | `--coar-menu-item-background` | transparent |
2133
+ | `--coar-menu-item-border-radius` | 0 |
2134
+ | `--coar-menu-item-margin` | 0 |
2135
+ | `--coar-menu-item-background-hover` | #f5f5f5 |
2136
+ | `--coar-menu-item-color-hover` | var(--coar-text-neutral-primary, #545454 |
2137
+ | `--coar-menu-item-background-focus` | #f5f5f5 |
2138
+ | `--coar-menu-item-outline-focus` | var(--coar-border-accent-primary, #156db7 |
2139
+ | `--coar-menu-item-color-disabled` | var(--coar-text-neutral-disabled, #999999 |
2140
+ | `--coar-menu-item-opacity-disabled` | 0.5 |
2141
+ | `--coar-menu-item-icon-slot-size` | 16px |
2142
+
2143
+ ## coar-menu-divider
2144
+
2145
+ **Selector:** `<coar-menu-divider>`
2146
+ **Class:** `CoarMenuDividerComponent`
2147
+ **Import:** `import { CoarMenuDividerComponent } from '@cocoar/ui';`
2148
+
2149
+ CoarMenuDivider: Visual separator between menu items.
2150
+ Simple horizontal line for grouping menu items.
2151
+
2152
+ ### CSS Custom Properties
2153
+
2154
+ | Property | Default |
2155
+ |----------|---------|
2156
+ | `--coar-menu-divider-margin` | 0.25rem 0.75rem |
2157
+ | `--coar-menu-divider-color` | var(--coar-border-neutral-tertiary, #e0e0e0 |
2158
+
2159
+ ## coar-menu-heading
2160
+
2161
+ **Selector:** `<coar-menu-heading>`
2162
+ **Class:** `CoarMenuHeadingComponent`
2163
+ **Import:** `import { CoarMenuHeadingComponent } from '@cocoar/ui';`
2164
+
2165
+ CoarMenuHeading: Non-interactive section label for menu groups.
2166
+ Responsibilities:
2167
+ - Display section/group heading text
2168
+ - Provide visual separation between menu sections
2169
+ - Non-interactive (no hover, no click, not focusable)
2170
+
2171
+ ### Inputs
2172
+
2173
+ | Name | Type | Default | Required | Description |
2174
+ |------|------|---------|----------|-------------|
2175
+ | label | `string` | — | No | Optional explicit label text (alternative to content projection) |
2176
+
2177
+ ### Content Slots
2178
+
2179
+ - Default slot: `<ng-content />`
2180
+
2181
+ ### CSS Custom Properties
2182
+
2183
+ | Property | Default |
2184
+ |----------|---------|
2185
+ | `--coar-menu-heading-padding` | 0.75rem 0.75rem 0.25rem 0.75rem |
2186
+ | `--coar-menu-heading-font-family` | var(--coar-font-family-body, Poppins |
2187
+ | `--coar-menu-heading-font-size` | var(--coar-component-xs-font-size, 11px |
2188
+ | `--coar-menu-heading-font-weight` | var(--coar-font-weight-semi-bold, 600 |
2189
+ | `--coar-menu-heading-line-height` | 1.4 |
2190
+ | `--coar-menu-heading-text-transform` | uppercase |
2191
+ | `--coar-menu-heading-letter-spacing` | 0.05em |
2192
+ | `--coar-menu-heading-color` | var(--coar-text-neutral-secondary, #6b7280 |
2193
+ | `--coar-menu-heading-spacing-top` | 0.2rem |
2194
+
2195
+ ## coar-submenu-item, coar-sub-flyout
2196
+
2197
+ **Selector:** `<coar-submenu-item, coar-sub-flyout>`
2198
+ **Class:** `CoarSubmenuItemComponent`
2199
+ **Import:** `import { CoarSubmenuItemComponent } from '@cocoar/ui';`
2200
+
2201
+ CoarSubmenuItem: Menu item that opens a submenu on hover.
2202
+ Responsibilities:
2203
+ - Render parent item with icon and label
2204
+ - Manage submenu overlay lifecycle
2205
+ - Support nested submenus (can contain other submenu-items)
2206
+
2207
+ ### Inputs
2208
+
2209
+ | Name | Type | Default | Required | Description |
2210
+ |------|------|---------|----------|-------------|
2211
+ | icon | `string | undefined` | `undefined` | No | Optional icon identifier |
2212
+ | submenuData | `unknown` | `undefined` | No | Optional data to pass to the submenu template. |
2213
+ | disabled | `boolean` | `false` | No | Disabled state prevents interaction |
2214
+ | label | `string` | — | Yes | Label text for the menu item |
2215
+
2216
+ ## coar-sub-expand
2217
+
2218
+ **Selector:** `<coar-sub-expand>`
2219
+ **Class:** `CoarSubExpandComponent`
2220
+ **Import:** `import { CoarSubExpandComponent } from '@cocoar/ui';`
2221
+
2222
+ CoarSubExpand: Menu item that expands/collapses a submenu inline.
2223
+ Use this variant when you want nested options to stay visible (e.g. sidebar panels)
2224
+ while still reusing the same menu item types inside the submenu.
2225
+
2226
+ ### Inputs
2227
+
2228
+ | Name | Type | Default | Required | Description |
2229
+ |------|------|---------|----------|-------------|
2230
+ | icon | `string | undefined` | `undefined` | No | Optional icon identifier |
2231
+ | open | `boolean | undefined` | `undefined` | No | Expanded state (two-way bindable with [(open)]) |
2232
+ | disabled | `boolean` | `false` | No | Disabled state prevents interaction |
2233
+ | label | `string` | — | Yes | Label text for the menu item |
2234
+
2235
+ ### Outputs
2236
+
2237
+ | Name | Type | Description |
2238
+ |------|------|-------------|
2239
+ | openChange | `boolean` | Emits when expanded state changes (for [(open)]) |
2240
+
2241
+ ### CSS Custom Properties
2242
+
2243
+ | Property | Default |
2244
+ |----------|---------|
2245
+ | `--coar-sub-expand-indent-offset` | 16px |
2246
+ | `--coar-sub-expand-line-color` | var(--coar-border-neutral-tertiary, #e5e5e5 |
2247
+ | `--coar-sub-expand-panel-padding-y` | var(--coar-spacing-1, 0.25rem |
2248
+ | `--coar-sub-expand-sidebar-spacing-top` | var(--coar-spacing-m, 12px |
2249
+
2250
+ ## ng-template[coarSubmenu]
2251
+
2252
+ **Kind:** Directive
2253
+ **Selector:** `ng-template[coarSubmenu]`
2254
+ **Class:** `CoarSubmenuTemplateDirective`
2255
+ **Import:** `import { CoarSubmenuTemplateDirective } from '@cocoar/ui';`
2256
+
2257
+ Marks an inline submenu template for a `coar-submenu-item`.
2258
+ This is optional: if a submenu item contains exactly one direct child `<ng-template>`,
2259
+ that template will be used even without this directive.
2260
+
2261
+ ## [coarMenuAimConfig]
2262
+
2263
+ **Kind:** Directive
2264
+ **Selector:** `[coarMenuAimConfig]`
2265
+ **Class:** `CoarMenuAimConfigDirective`
2266
+ **Import:** `import { CoarMenuAimConfigDirective } from '@cocoar/ui';`
2267
+
2268
+ ### Inputs
2269
+
2270
+ | Name | Type | Default | Required | Description |
2271
+ |------|------|---------|----------|-------------|
2272
+ | aimEnabled | `boolean | undefined` | `undefined` | No | Enable/disable menu-aim for this menu tree. |
2273
+ | aimDebugEnabled | `boolean | undefined` | `undefined` | No | Emit debug events for menu-aim visualization (showcase only). |
2274
+ | aimSwitchDelayMs | `number | undefined` | `undefined` | No | Delay before switching to a newly hovered sibling submenu when aim is detected. |
2275
+ | aimSampleMaxAgeMs | `number | undefined` | `undefined` | No | Maximum age of the last pointer sample used for intent detection. |
2276
+
2277
+ ### Related Types
2278
+
2279
+ ```typescript
2280
+ interface CoarMenuItemClickEvent {/** Call this to keep the menu open after clicking (prevents auto-close) */
2281
+ keepMenuOpen(): void;
2282
+ /** Original mouse event */
2283
+ event: MouseEvent;
2284
+ }
2285
+ ```
2286
+ Event emitted when a menu item is clicked.
2287
+ Provides control over menu closing behavior.
2288
+
2289
+ ```typescript
2290
+ interface CoarMenuAimConfig {readonly enabled: boolean;
2291
+ /** Emits debug events consumed by the showcase to render the aim triangle overlay. */
2292
+ readonly debugEnabled: boolean;
2293
+ /** Delay before switching to a newly hovered sibling submenu when aim is detected. */
2294
+ readonly switchDelayMs: number;
2295
+ /** Maximum age of the last pointer sample used for intent detection. */
2296
+ readonly sampleMaxAgeMs: number;
2297
+ }
2298
+ ```
2299
+
2300
+ ```typescript
2301
+ interface CoarMenuAimConfigProvider {getMenuAimConfig(): CoarMenuAimConfig;
2302
+ }
2303
+ ```