@skra/ui 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +7 -0
  3. package/README.md +39 -0
  4. package/consumer-guide/README.md +84 -0
  5. package/consumer-guide/accessible-names.md +80 -0
  6. package/consumer-guide/forms-and-binding.md +149 -0
  7. package/consumer-guide/layout.md +86 -0
  8. package/consumer-guide/overlays.md +100 -0
  9. package/consumer-guide/setup-and-gotchas.md +103 -0
  10. package/consumer-guide/theming-and-encapsulation.md +115 -0
  11. package/consumer-guide/wrapping-patterns.md +90 -0
  12. package/fesm2022/skra-ui-accordion.mjs +333 -0
  13. package/fesm2022/skra-ui-accordion.mjs.map +1 -0
  14. package/fesm2022/skra-ui-alert.mjs +110 -0
  15. package/fesm2022/skra-ui-alert.mjs.map +1 -0
  16. package/fesm2022/skra-ui-avatar.mjs +83 -0
  17. package/fesm2022/skra-ui-avatar.mjs.map +1 -0
  18. package/fesm2022/skra-ui-badge.mjs +91 -0
  19. package/fesm2022/skra-ui-badge.mjs.map +1 -0
  20. package/fesm2022/skra-ui-button.mjs +67 -0
  21. package/fesm2022/skra-ui-button.mjs.map +1 -0
  22. package/fesm2022/skra-ui-checkbox.mjs +98 -0
  23. package/fesm2022/skra-ui-checkbox.mjs.map +1 -0
  24. package/fesm2022/skra-ui-chip.mjs +82 -0
  25. package/fesm2022/skra-ui-chip.mjs.map +1 -0
  26. package/fesm2022/skra-ui-combobox.mjs +335 -0
  27. package/fesm2022/skra-ui-combobox.mjs.map +1 -0
  28. package/fesm2022/skra-ui-core.mjs +529 -0
  29. package/fesm2022/skra-ui-core.mjs.map +1 -0
  30. package/fesm2022/skra-ui-counter.mjs +53 -0
  31. package/fesm2022/skra-ui-counter.mjs.map +1 -0
  32. package/fesm2022/skra-ui-datepicker.mjs +867 -0
  33. package/fesm2022/skra-ui-datepicker.mjs.map +1 -0
  34. package/fesm2022/skra-ui-dialog.mjs +133 -0
  35. package/fesm2022/skra-ui-dialog.mjs.map +1 -0
  36. package/fesm2022/skra-ui-field.mjs +293 -0
  37. package/fesm2022/skra-ui-field.mjs.map +1 -0
  38. package/fesm2022/skra-ui-icon.mjs +54 -0
  39. package/fesm2022/skra-ui-icon.mjs.map +1 -0
  40. package/fesm2022/skra-ui-input.mjs +42 -0
  41. package/fesm2022/skra-ui-input.mjs.map +1 -0
  42. package/fesm2022/skra-ui-kbd.mjs +44 -0
  43. package/fesm2022/skra-ui-kbd.mjs.map +1 -0
  44. package/fesm2022/skra-ui-layout.mjs +119 -0
  45. package/fesm2022/skra-ui-layout.mjs.map +1 -0
  46. package/fesm2022/skra-ui-link.mjs +29 -0
  47. package/fesm2022/skra-ui-link.mjs.map +1 -0
  48. package/fesm2022/skra-ui-loading-indicator.mjs +24 -0
  49. package/fesm2022/skra-ui-loading-indicator.mjs.map +1 -0
  50. package/fesm2022/skra-ui-menu.mjs +334 -0
  51. package/fesm2022/skra-ui-menu.mjs.map +1 -0
  52. package/fesm2022/skra-ui-multi-select.mjs +179 -0
  53. package/fesm2022/skra-ui-multi-select.mjs.map +1 -0
  54. package/fesm2022/skra-ui-native-select.mjs +123 -0
  55. package/fesm2022/skra-ui-native-select.mjs.map +1 -0
  56. package/fesm2022/skra-ui-popover.mjs +158 -0
  57. package/fesm2022/skra-ui-popover.mjs.map +1 -0
  58. package/fesm2022/skra-ui-progress.mjs +57 -0
  59. package/fesm2022/skra-ui-progress.mjs.map +1 -0
  60. package/fesm2022/skra-ui-radio.mjs +92 -0
  61. package/fesm2022/skra-ui-radio.mjs.map +1 -0
  62. package/fesm2022/skra-ui-rating-display.mjs +81 -0
  63. package/fesm2022/skra-ui-rating-display.mjs.map +1 -0
  64. package/fesm2022/skra-ui-select.mjs +151 -0
  65. package/fesm2022/skra-ui-select.mjs.map +1 -0
  66. package/fesm2022/skra-ui-skeleton.mjs +65 -0
  67. package/fesm2022/skra-ui-skeleton.mjs.map +1 -0
  68. package/fesm2022/skra-ui-star-rating.mjs +110 -0
  69. package/fesm2022/skra-ui-star-rating.mjs.map +1 -0
  70. package/fesm2022/skra-ui-status-dot.mjs +61 -0
  71. package/fesm2022/skra-ui-status-dot.mjs.map +1 -0
  72. package/fesm2022/skra-ui-switch.mjs +94 -0
  73. package/fesm2022/skra-ui-switch.mjs.map +1 -0
  74. package/fesm2022/skra-ui-tabs.mjs +356 -0
  75. package/fesm2022/skra-ui-tabs.mjs.map +1 -0
  76. package/fesm2022/skra-ui-textarea.mjs +81 -0
  77. package/fesm2022/skra-ui-textarea.mjs.map +1 -0
  78. package/fesm2022/skra-ui-toast.mjs +208 -0
  79. package/fesm2022/skra-ui-toast.mjs.map +1 -0
  80. package/fesm2022/skra-ui-tooltip.mjs +252 -0
  81. package/fesm2022/skra-ui-tooltip.mjs.map +1 -0
  82. package/fesm2022/skra-ui-typography.mjs +35 -0
  83. package/fesm2022/skra-ui-typography.mjs.map +1 -0
  84. package/fesm2022/skra-ui.mjs +4 -0
  85. package/fesm2022/skra-ui.mjs.map +1 -0
  86. package/package.json +175 -0
  87. package/types/skra-ui-accordion.d.ts +196 -0
  88. package/types/skra-ui-accordion.d.ts.map +1 -0
  89. package/types/skra-ui-alert.d.ts +81 -0
  90. package/types/skra-ui-alert.d.ts.map +1 -0
  91. package/types/skra-ui-avatar.d.ts +71 -0
  92. package/types/skra-ui-avatar.d.ts.map +1 -0
  93. package/types/skra-ui-badge.d.ts +73 -0
  94. package/types/skra-ui-badge.d.ts.map +1 -0
  95. package/types/skra-ui-button.d.ts +45 -0
  96. package/types/skra-ui-button.d.ts.map +1 -0
  97. package/types/skra-ui-checkbox.d.ts +52 -0
  98. package/types/skra-ui-checkbox.d.ts.map +1 -0
  99. package/types/skra-ui-chip.d.ts +60 -0
  100. package/types/skra-ui-chip.d.ts.map +1 -0
  101. package/types/skra-ui-combobox.d.ts +95 -0
  102. package/types/skra-ui-combobox.d.ts.map +1 -0
  103. package/types/skra-ui-core.d.ts +314 -0
  104. package/types/skra-ui-core.d.ts.map +1 -0
  105. package/types/skra-ui-counter.d.ts +33 -0
  106. package/types/skra-ui-counter.d.ts.map +1 -0
  107. package/types/skra-ui-datepicker.d.ts +164 -0
  108. package/types/skra-ui-datepicker.d.ts.map +1 -0
  109. package/types/skra-ui-dialog.d.ts +59 -0
  110. package/types/skra-ui-dialog.d.ts.map +1 -0
  111. package/types/skra-ui-field.d.ts +181 -0
  112. package/types/skra-ui-field.d.ts.map +1 -0
  113. package/types/skra-ui-icon.d.ts +38 -0
  114. package/types/skra-ui-icon.d.ts.map +1 -0
  115. package/types/skra-ui-input.d.ts +22 -0
  116. package/types/skra-ui-input.d.ts.map +1 -0
  117. package/types/skra-ui-kbd.d.ts +33 -0
  118. package/types/skra-ui-kbd.d.ts.map +1 -0
  119. package/types/skra-ui-layout.d.ts +86 -0
  120. package/types/skra-ui-layout.d.ts.map +1 -0
  121. package/types/skra-ui-link.d.ts +20 -0
  122. package/types/skra-ui-link.d.ts.map +1 -0
  123. package/types/skra-ui-loading-indicator.d.ts +9 -0
  124. package/types/skra-ui-loading-indicator.d.ts.map +1 -0
  125. package/types/skra-ui-menu.d.ts +116 -0
  126. package/types/skra-ui-menu.d.ts.map +1 -0
  127. package/types/skra-ui-multi-select.d.ts +47 -0
  128. package/types/skra-ui-multi-select.d.ts.map +1 -0
  129. package/types/skra-ui-native-select.d.ts +74 -0
  130. package/types/skra-ui-native-select.d.ts.map +1 -0
  131. package/types/skra-ui-popover.d.ts +57 -0
  132. package/types/skra-ui-popover.d.ts.map +1 -0
  133. package/types/skra-ui-progress.d.ts +41 -0
  134. package/types/skra-ui-progress.d.ts.map +1 -0
  135. package/types/skra-ui-radio.d.ts +54 -0
  136. package/types/skra-ui-radio.d.ts.map +1 -0
  137. package/types/skra-ui-rating-display.d.ts +56 -0
  138. package/types/skra-ui-rating-display.d.ts.map +1 -0
  139. package/types/skra-ui-select.d.ts +43 -0
  140. package/types/skra-ui-select.d.ts.map +1 -0
  141. package/types/skra-ui-skeleton.d.ts +42 -0
  142. package/types/skra-ui-skeleton.d.ts.map +1 -0
  143. package/types/skra-ui-star-rating.d.ts +71 -0
  144. package/types/skra-ui-star-rating.d.ts.map +1 -0
  145. package/types/skra-ui-status-dot.d.ts +62 -0
  146. package/types/skra-ui-status-dot.d.ts.map +1 -0
  147. package/types/skra-ui-switch.d.ts +54 -0
  148. package/types/skra-ui-switch.d.ts.map +1 -0
  149. package/types/skra-ui-tabs.d.ts +191 -0
  150. package/types/skra-ui-tabs.d.ts.map +1 -0
  151. package/types/skra-ui-textarea.d.ts +55 -0
  152. package/types/skra-ui-textarea.d.ts.map +1 -0
  153. package/types/skra-ui-toast.d.ts +140 -0
  154. package/types/skra-ui-toast.d.ts.map +1 -0
  155. package/types/skra-ui-tooltip.d.ts +90 -0
  156. package/types/skra-ui-tooltip.d.ts.map +1 -0
  157. package/types/skra-ui-typography.d.ts +17 -0
  158. package/types/skra-ui-typography.d.ts.map +1 -0
  159. package/types/skra-ui.d.ts +3 -0
  160. package/types/skra-ui.d.ts.map +1 -0
@@ -0,0 +1,95 @@
1
+ import * as _skra_ui_core from '@skra/ui/core';
2
+ import { _SkraListboxWidgetBase, SkraListboxKeyboardItem } from '@skra/ui/core';
3
+ export { SkraOption, SkraOptionDetail, SkraOptionLeading } from '@skra/ui/core';
4
+ import * as _angular_core from '@angular/core';
5
+
6
+ /**
7
+ * SkraCombobox — the WAI-ARIA APG **Editable Combobox** (list autocomplete, manual selection): an
8
+ * editable `<input role="combobox" aria-autocomplete="list">` whose top-layer listbox (Popover API,
9
+ * `popover="auto"`, ADR 0044) of projected `skra-option` children NARROWS as the user types. The first
10
+ * Tier-3 / higher-order component. Single-cardinality (ADR 0046); the multi sibling is future work.
11
+ *
12
+ * - **Filtering + option set are CONSUMER-OWNED (ADR 0049):** Forge emits the typed text via
13
+ * `filterChange` (no debounce — timing is the consumer's); the consumer projects the matching
14
+ * `skra-option` subset (sync computed OR async fetch). There is NO `[items]` input and NO internal
15
+ * matcher — Forge renders exactly what is projected.
16
+ * - **Value is OPTION-BOUND (ADR 0049):** `value = input<T>()` + `valueChange` (consumer-owned, ADR 037);
17
+ * a committed value is always an existing option's `T`. On cancel/blur the input text reverts to the
18
+ * selected option's label — typed text that matched nothing NEVER leaks as the value (free-text commit
19
+ * is the separate `skra-autocomplete`).
20
+ * - **Async (ADR 0049/028):** `loading` reflects `aria-busy` + drives a panel loading branch
21
+ * (`[skraLoadingIndicator]` slot + fallback); an empty projected set drives the `[skraComboboxEmpty]`
22
+ * branch; both are announced via `aria-live`.
23
+ *
24
+ * The trigger-shape-agnostic substrate (field cascade, panel toggle/positioner, keyboard wiring,
25
+ * open/close, the `SkraListboxPanel` selection seam) lives in {@link _SkraListboxWidgetBase}, shared
26
+ * verbatim with the select family (ADR 0046 amendment). `skra-option` is reused verbatim — combobox
27
+ * provides the `SKRA_LISTBOX_PANEL` token so the option's selection/keyboard/indicator wiring works
28
+ * unchanged.
29
+ *
30
+ * Full contract: adr/specs/component-combobox-spec.md.
31
+ */
32
+ declare class SkraCombobox<T = unknown> extends _SkraListboxWidgetBase<T> {
33
+ /** Combobox panel token namespace — `--skra-comp-combobox-panel-*`. */
34
+ protected readonly panelTokenPrefix = "combobox";
35
+ /** Consumer-owned value channel (ADR 037) — single, option-bound `T`. */
36
+ readonly value: _angular_core.InputSignal<T | undefined>;
37
+ /** Fires ONLY on user selection of an option — never on a programmatic `value()` change (ADR 037). */
38
+ readonly valueChange: _angular_core.OutputEmitterRef<T>;
39
+ /** The typed text, emitted on EVERY input change. Consumer-driven projection; NO Forge debounce (ADR 0049). */
40
+ readonly filterChange: _angular_core.OutputEmitterRef<string>;
41
+ /** Async hint (ADR 0049/028) — reflects `aria-busy` + drives the panel loading branch. */
42
+ readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
43
+ /** Cardinality hint (ADR 0046) — single-select. */
44
+ readonly multiple = false;
45
+ /** Internal editable-text state; emitted out via `filterChange`. NOT the value (ADR 0049). */
46
+ protected readonly query: _angular_core.WritableSignal<string>;
47
+ private readonly isFocused;
48
+ private readonly hostEl;
49
+ /**
50
+ * Position the panel against — and match its width to — the HOST box, not the inner input. The input
51
+ * is inset (host padding + chevron), so anchoring to it would make a narrower, misaligned panel; the
52
+ * host gives full-width parity with `skra-select`.
53
+ */
54
+ protected positioningAnchor(): HTMLElement;
55
+ /** The option whose value matches `value()` (ADR 037 selection model) — feeds the displayed text + active seed. */
56
+ protected readonly selectedOption: _angular_core.Signal<_skra_ui_core.SkraOption<any> | null>;
57
+ /**
58
+ * The text shown in the input: the live query while editing (focused), otherwise the selected option's
59
+ * label. This is the controlled-input seam that enforces the option-bound value (ADR 0049) — on blur the
60
+ * input snaps back to the selected label, so unmatched typed text never persists.
61
+ */
62
+ protected readonly displayValue: _angular_core.Signal<string>;
63
+ constructor();
64
+ isSelected(value: unknown): boolean;
65
+ selectValue(value: unknown): void;
66
+ protected activeSeedItem(): SkraListboxKeyboardItem | null;
67
+ protected onFocus(): void;
68
+ protected onInput(event: Event): void;
69
+ protected onBlur(): void;
70
+ protected onTriggerKeydown(event: KeyboardEvent): void;
71
+ protected toggle(): void;
72
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraCombobox<any>, never>;
73
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkraCombobox<any>, "skra-combobox", ["skraCombobox"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "filterChange": "filterChange"; }, never, ["[skraLoadingIndicator]", "[skraComboboxEmpty]", "*"], true, never>;
74
+ }
75
+
76
+ /**
77
+ * SkraComboboxEmpty — the no-results marker (ADR 0049). Place on the element that should show inside the
78
+ * combobox listbox when the consumer's filter yields zero `skra-option` children:
79
+ *
80
+ * <skra-combobox (filterChange)="query.set($event)" [value]="city()" (valueChange)="city.set($event)">
81
+ * @for (c of visible(); track c.id) { <skra-option [value]="c.id">{{ c.name }}</skra-option> }
82
+ * <span skraComboboxEmpty>No matches</span>
83
+ * </skra-combobox>
84
+ *
85
+ * The text is consumer-supplied (i18n is the consumer's concern — Forge ships no hardcoded string).
86
+ * Forge toggles its visibility via `@if (!loading() && options().length === 0)`; the marker only carries
87
+ * the projection selector, so no logic lives here.
88
+ */
89
+ declare class SkraComboboxEmpty {
90
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraComboboxEmpty, never>;
91
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SkraComboboxEmpty, "[skraComboboxEmpty]", never, {}, {}, never, never, true, never>;
92
+ }
93
+
94
+ export { SkraCombobox, SkraComboboxEmpty };
95
+ //# sourceMappingURL=skra-ui-combobox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skra-ui-combobox.d.ts","sources":["../../../../libs/ui/combobox/src/lib/combobox/combobox.ts","../../../../libs/ui/combobox/src/lib/combobox/combobox-empty.ts"],"mappings":";;;;;AAsBA;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;AACH,cA2Ea,YAAY,sBAAsB,sBAAsB;;AAEnE;;oBAGc,aAAA,CAAA,WAAA;;0BAEM,aAAA,CAAA,gBAAA;;2BAEC,aAAA,CAAA,gBAAA;;sBAEL,aAAA,CAAA,wBAAA;;;;AAKhB,8BAAwB,aAAA,CAAA,cAAA;AACxB;AAEA;AAEA;;;;AAIG;AACgB,mCAAqB,WAAW;;AAKnD,uCAAiC,aAAA,CAAA,MAAA,CAAA,aAAA,CAAA,UAAA;AAIjC;;;;AAIG;AACH,qCAA+B,aAAA,CAAA,MAAA;;AA8B/B;AAKA;AAWA,gCAA4B,uBAAuB;;AAWnD,6BAAyB,KAAK;;AAa9B,sCAAkC,aAAa;;oDA9GpC,YAAY;sDAAZ,YAAY;AA8JxB;;ACvRD;;;;;;;;;;;;AAYG;AACH,cAIa,iBAAiB;oDAAjB,iBAAiB;sDAAjB,iBAAiB;AAAG;;;;","names":[]}
@@ -0,0 +1,314 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { InjectionToken, ElementRef, TemplateRef } from '@angular/core';
3
+ import { SkraFieldContext } from '@skra/ui/field';
4
+
5
+ /**
6
+ * What a `skra-option` needs from its listbox parent — a narrow contract that breaks the
7
+ * parent↔option import cycle (the `SKRA_MENU` precedent). A token (not a concrete class) so the option
8
+ * file never imports a widget file — no runtime import cycle. Implemented by `_SkraListboxWidgetBase`,
9
+ * so it is shared by `skra-select`, `skra-multi-select` AND `skra-combobox` (ADR 0046 amendment).
10
+ */
11
+ interface SkraListboxPanel {
12
+ /** Live selection test for an option's value (signal-driven: default `Object.is` or consumer `compareWith`). */
13
+ isSelected(value: unknown): boolean;
14
+ /**
15
+ * A user picked this value (pointer/keyboard). Single-select emits `valueChange` + closes; multi-select
16
+ * TOGGLES membership and keeps the panel open (ADR 0046); combobox replaces + closes (ADR 0049).
17
+ * Consumer owns `value` (ADR 037).
18
+ */
19
+ selectValue(value: unknown): void;
20
+ /**
21
+ * Cardinality hint (ADR 0046) — `false` on single widgets (`skra-select`/`skra-combobox`), `true` on
22
+ * `skra-multi-select`. The ONLY thing `skra-option` reads to swap its component-rendered indicator
23
+ * (checkmark ↔ checkbox). NOT an Angular input; cardinality is a component identity, never a runtime flag.
24
+ */
25
+ readonly multiple: boolean;
26
+ }
27
+ /**
28
+ * The item shape the listbox keyboard controller drives. Structurally a CDK `Highlightable`
29
+ * (`setActiveStyles`/`setInactiveStyles`) + `ListKeyManagerOption` (`getLabel`/`disabled`), plus the
30
+ * option's `id` (→ `aria-activedescendant`) and `getValue()` (Enter-to-select). Declared HERE — cdk-free —
31
+ * so the only `@angular/cdk` importer stays `listbox-keyboard.ts` (the `menu-types.ts` precedent).
32
+ */
33
+ interface SkraListboxKeyboardItem {
34
+ readonly optionId: string;
35
+ setActiveStyles(): void;
36
+ setInactiveStyles(): void;
37
+ getLabel(): string;
38
+ getValue(): unknown;
39
+ readonly disabled: boolean;
40
+ }
41
+ /**
42
+ * DI token a listbox widget provides (`useExisting`) and a `skra-option` injects. A token (not a concrete
43
+ * class) so the option file never imports a widget file — no runtime import cycle. Provided by
44
+ * `skra-select`, `skra-multi-select`, and `skra-combobox`.
45
+ */
46
+ declare const SKRA_LISTBOX_PANEL: InjectionToken<SkraListboxPanel>;
47
+
48
+ /**
49
+ * SkraOption — one selectable row in a `skra-select` listbox, a Component on the custom-element host
50
+ * `skra-option` (ADR 040 content-bearing host; there is no native option element that holds rich content
51
+ * outside `<select>`). Carries `value` + rich projected content: a leading icon (`[skra-option-leading]`)
52
+ * and a primary label = the IDENTITY (→ `getLabel()` / the default trigger, ADR 0045), plus an optional
53
+ * secondary `[skra-option-detail]` that is list-only (excluded from the trigger). The selection
54
+ * indicator (trailing checkmark) is component-rendered, driven by `aria-selected` — NOT a slot; iteration 2
55
+ * swaps it for a per-row checkbox with no API change.
56
+ *
57
+ * Implements `SkraListboxKeyboardItem` so `_SkraListboxKeyboard` (CDK `ActiveDescendantKeyManager`) can
58
+ * highlight it (`setActiveStyles`/`setInactiveStyles` → `data-skra-active`) and type-ahead to it
59
+ * (`getLabel`). Disabled is native-attr-first (Menu precedent): the consumer sets `aria-disabled="true"`
60
+ * and Forge OBSERVES it — disabled options stay navigable (discoverable) but cannot be selected.
61
+ *
62
+ * Full contract: adr/specs/component-select-spec.md.
63
+ */
64
+ declare class SkraOption<T = unknown> implements SkraListboxKeyboardItem {
65
+ /** The option's value (ADR 037 — consumer-owned; compared against the select's `value()`). */
66
+ readonly value: _angular_core.InputSignal<T>;
67
+ /** Stable id, the target of the trigger's `aria-activedescendant`. Internal — never consumer-facing. */
68
+ readonly optionId: string;
69
+ private readonly el;
70
+ private readonly select;
71
+ private readonly leadingSlot;
72
+ private readonly detailSlot;
73
+ protected readonly hasLeading: _angular_core.Signal<boolean>;
74
+ protected readonly hasDetail: _angular_core.Signal<boolean>;
75
+ /** Keyboard active-descendant highlight (ADR 0044 §7 — Highlightable, NOT roving focus). */
76
+ protected readonly active: _angular_core.WritableSignal<boolean>;
77
+ /**
78
+ * Cardinality hint from the parent panel (ADR 0046): `false` under `skra-select` → checkmark
79
+ * indicator; `true` under `skra-multi-select` → checkbox indicator. The only thing the shared
80
+ * `skra-option` reads to swap the component-rendered indicator. No public-API change.
81
+ */
82
+ protected readonly multiple: _angular_core.Signal<boolean>;
83
+ /** Selection is signal-derived (ADR 0045 / ADR 037): re-derives on parent `value()`/`compareWith()` or own `value()`. */
84
+ protected readonly selected: _angular_core.Signal<boolean>;
85
+ constructor();
86
+ setActiveStyles(): void;
87
+ setInactiveStyles(): void;
88
+ /**
89
+ * ADR 0045 Rule 1: the option's IDENTITY text (leading + label), EXCLUDING `[skra-option-detail]` and
90
+ * the component-rendered indicator. Own-host `textContent` walk (the `skraMenuItem.getLabel()`
91
+ * precedent) — drives the default trigger text AND type-ahead. Reading own content, NOT
92
+ * `document.querySelector` (ADR 001-clean).
93
+ */
94
+ getLabel(): string;
95
+ getValue(): unknown;
96
+ /** Soft-disabled = the consumer's `aria-disabled="true"` (native-attr-first, Menu precedent); read live. */
97
+ get disabled(): boolean;
98
+ protected onActivate(): void;
99
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraOption<any>, never>;
100
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkraOption<any>, "skra-option", ["skraOption"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, ["leadingSlot", "detailSlot"], ["[skra-option-leading]", "*", "[skra-option-detail]"], true, never>;
101
+ }
102
+
103
+ /**
104
+ * Slot marker: the leading icon/flag of a `skra-option` — part of the option IDENTITY (ADR 0045
105
+ * Rule 4), so it flows into `getLabel()` (emoji/glyph leading appears in the default trigger for free).
106
+ */
107
+ declare class SkraOptionLeading {
108
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraOptionLeading, never>;
109
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SkraOptionLeading, "[skra-option-leading]", never, {}, {}, never, never, true, never>;
110
+ }
111
+ /**
112
+ * Slot marker: secondary DETAIL text of a `skra-option` (e.g. a dial code, a description) — list-only
113
+ * (ADR 0045 Rule 4), EXCLUDED from `getLabel()` and the trigger summary.
114
+ */
115
+ declare class SkraOptionDetail {
116
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraOptionDetail, never>;
117
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SkraOptionDetail, "[skra-option-detail]", never, {}, {}, never, never, true, never>;
118
+ }
119
+
120
+ /**
121
+ * SkraSelectTrigger — the opt-in rich-trigger marker (ADR 0045 Rule 2). Place on an `<ng-template>`
122
+ * inside `<skra-select>`; the select reads it as a `TemplateRef` and stamps it in the trigger via
123
+ * `ngTemplateOutlet` with `{ $implicit: value, option: selectedOption }` context — the ONLY supported
124
+ * path for non-text (SVG/`<img>`) trigger presentation. With no trigger template the default trigger is
125
+ * the selected option's `getLabel()` text (emoji/glyph leading content appears for free).
126
+ *
127
+ * <skra-select [value]="country()" (valueChange)="country.set($event)">
128
+ * <ng-template skraSelectTrigger let-value>
129
+ * <skra-icon [innerSVG]="flagOf(value)"></skra-icon> {{ nameOf(value) }}
130
+ * </ng-template>
131
+ * <skra-option value="de"><skra-icon [innerSVG]="flagOf('de')"></skra-icon> Germany</skra-option>
132
+ * </skra-select>
133
+ */
134
+ declare class SkraSelectTrigger {
135
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraSelectTrigger, never>;
136
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SkraSelectTrigger, "[skraSelectTrigger]", never, {}, {}, never, never, true, never>;
137
+ }
138
+
139
+ /**
140
+ * Forge's single overlay positioning abstraction (ADR 0044 §3 rules 4–5).
141
+ *
142
+ * Wraps `@floating-ui/dom` so the library is an IMPLEMENTATION DETAIL: nothing outside this folder
143
+ * imports it, and swapping the engine (e.g. to native CSS Anchor Positioning once it is baseline
144
+ * cross-browser) is a one-file change with zero public-API impact.
145
+ *
146
+ * It writes **geometry only** (`left`/`top` + the resolved-side `data-skra-placement`) inline on the
147
+ * floating element — the scoped geometry-only exception to ADR 021 / Visual Purism granted by
148
+ * ADR 0044 §3 rule 4. It MUST NOT write any theme/state/token value inline (those stay `var(--skra-*)`
149
+ * + `data-skra-*`). No portal, no z-index, no CDK, no library stylesheet.
150
+ *
151
+ * Decided at the first anchored component (Tooltip, 2026-06-06): a single JS path on all engines
152
+ * (not native-CSS-primary + JS-fallback) — see ADR 0044 §7 + the rule-4 refinement note.
153
+ */
154
+ /** Forge placement intent — the base four sides; flip/shift adjust at runtime. */
155
+ type SkraPlacement = 'top' | 'bottom' | 'left' | 'right';
156
+ interface _PositionerOptions {
157
+ /** Preferred side; `flip` re-sides on viewport collision. */
158
+ placement: SkraPlacement;
159
+ /** Gap between trigger and floating element, in px (resolved from a comp token by the caller). */
160
+ offset?: number;
161
+ /** Minimum distance from the viewport edge for `shift`, in px. */
162
+ viewportPadding?: number;
163
+ }
164
+ interface _PositionerHandle {
165
+ /** Stop repositioning and release the `autoUpdate` listeners. Idempotent. */
166
+ destroy(): void;
167
+ }
168
+ /**
169
+ * Anchor `floating` to `reference` and keep it positioned while visible. Returns a handle whose
170
+ * `destroy()` MUST be called when the overlay hides or the owner is destroyed (no listener leak).
171
+ *
172
+ * `options` is a getter so live token values (offset) are re-read on every reposition.
173
+ */
174
+ declare function _attachPositioner(reference: HTMLElement, floating: HTMLElement, options: () => _PositionerOptions): _PositionerHandle;
175
+
176
+ /**
177
+ * _SkraListboxKeyboard — the WAI-ARIA APG **Select-Only Combobox** listbox keyboard model, confined to
178
+ * ONE file. Sibling to `menu-keyboard.ts`: per ADR 0044 §7 (2026-06-07), `@angular/cdk/a11y` is confined
179
+ * to one swappable `*-keyboard.ts` controller PER APG pattern. Menu uses `FocusKeyManager` (roving REAL
180
+ * focus); the listbox uses **`ActiveDescendantKeyManager`** — focus STAYS on the combobox trigger and the
181
+ * active option is virtual (`aria-activedescendant`), the APG-canonical select-only model. Swapping the
182
+ * engine is a one-file change, exactly as `SkraPositioner` wraps `@floating-ui/dom`.
183
+ *
184
+ * Owns: Down/Up active-descendant movement, Home/End, and type-ahead. Enter/Space (select), Escape and
185
+ * light-dismiss (`popover="auto"`) stay with the select / platform — this controller never touches them.
186
+ */
187
+ declare class _SkraListboxKeyboard {
188
+ private manager?;
189
+ private items;
190
+ private changeHandler?;
191
+ /** Notified whenever the active descendant changes — the select mirrors it to `aria-activedescendant`. */
192
+ onActiveChange(handler: (item: SkraListboxKeyboardItem | null) => void): void;
193
+ /**
194
+ * (Re)build the manager from the current projected option set. Called from an `effect` on the select's
195
+ * signal `contentChildren` — a passed array is a static snapshot (it does not auto-track like a live
196
+ * `QueryList`), so the manager is rebuilt whenever the option set changes (the documented signal↔CDK seam).
197
+ */
198
+ setItems(items: readonly SkraListboxKeyboardItem[]): void;
199
+ /** Delegate Down/Up/Home/End/type-ahead. Enter/Space/Escape are intentionally left to the select/platform. */
200
+ onKeydown(event: KeyboardEvent): void;
201
+ get activeItem(): SkraListboxKeyboardItem | null;
202
+ /** Seed the active descendant on open: the selected option, else the first. */
203
+ setActive(item: SkraListboxKeyboardItem | null): void;
204
+ /** Deactivate (close): `setActiveItem(-1)` clears `_activeItem` and the highlight. */
205
+ clearActive(): void;
206
+ destroy(): void;
207
+ }
208
+
209
+ /**
210
+ * _SkraListboxWidgetBase — the **trigger-shape-agnostic** core shared by every Forge listbox widget,
211
+ * per the **ADR 0046 amendment (2026-06-13)**. It owns ONLY the substrate that does not depend on what
212
+ * the trigger looks like: the `SkraFieldContext` cascade (ADR 013), the panel `(toggle)` →
213
+ * `SkraPositioner` lifecycle + active-descendant seeding, the `_SkraListboxKeyboard` wiring
214
+ * (CDK `ActiveDescendantKeyManager`, ADR 0044 §7), imperative `open()`/`close()`, teardown, and the
215
+ * abstract `SkraListboxPanel` selection seam.
216
+ *
217
+ * Trigger BEHAVIOUR lives one level down, in a per-shape base:
218
+ * - `_SkraSelectBase` adds the button + native `popovertarget` + type-ahead trigger (Select-Only
219
+ * Combobox) and the ADR 0045 `[skraSelectTrigger]` rich-trigger template.
220
+ * - `SkraCombobox` (no extra base) adds the editable `<input>` + filter-output trigger (ADR 0049).
221
+ *
222
+ * The keydown skeleton is NOT here — each trigger shape routes keys differently (the select selects on
223
+ * Space and type-aheads; the combobox types into the input and never type-aheads). Forcing one keydown
224
+ * through both shapes is the wrong abstraction.
225
+ *
226
+ * `panelTokenPrefix` makes the panel comp-token namespace overridable so each widget reads its OWN
227
+ * `--skra-comp-<prefix>-panel-*` tokens (`select` for the select family, `combobox` for the combobox).
228
+ *
229
+ * Full contracts: adr/specs/component-{select,multi-select,combobox}-spec.md.
230
+ */
231
+ declare abstract class _SkraListboxWidgetBase<T = unknown> implements SkraListboxPanel {
232
+ /** Equality strategy seam (ADR 037 selection model): default `Object.is`; object values pass a custom comparator. */
233
+ readonly compareWith: _angular_core.InputSignal<(a: T, b: T) => boolean>;
234
+ /** Value-empty hint shown in the trigger (NOT the accessible name — ADR 033). */
235
+ readonly placeholder: _angular_core.InputSignal<string>;
236
+ /** Placement intent; flip/shift adjust at runtime. */
237
+ readonly placement: _angular_core.InputSignal<SkraPlacement>;
238
+ /** Standalone availability source (Q-1) — `SkraFieldContext` wins when present. */
239
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
240
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
241
+ protected readonly options: _angular_core.Signal<readonly SkraOption<any>[]>;
242
+ protected readonly triggerRef: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
243
+ protected readonly panelRef: _angular_core.Signal<ElementRef<HTMLElement> | undefined>;
244
+ protected readonly context: SkraFieldContext | null;
245
+ protected readonly keyboard: _SkraListboxKeyboard;
246
+ readonly panelId: string;
247
+ protected readonly isOpen: _angular_core.WritableSignal<boolean>;
248
+ protected readonly activeOptionId: _angular_core.WritableSignal<string | null>;
249
+ private positioner?;
250
+ /** Panel comp-token namespace — `--skra-comp-<panelTokenPrefix>-panel-*`. Overridden per widget. */
251
+ protected abstract readonly panelTokenPrefix: string;
252
+ protected readonly isDisabled: _angular_core.Signal<boolean>;
253
+ protected readonly isReadonly: _angular_core.Signal<boolean>;
254
+ protected readonly hasError: _angular_core.Signal<boolean>;
255
+ protected readonly isRequired: _angular_core.Signal<boolean>;
256
+ protected readonly triggerId: _angular_core.Signal<string | null>;
257
+ protected readonly describedBy: _angular_core.Signal<string | null>;
258
+ constructor();
259
+ /** Live selection test: single = equality, multi = membership (both via `compareWith`). */
260
+ abstract isSelected(value: unknown): boolean;
261
+ /** User picked a value: single = replace + close; multi = toggle membership + keep open. */
262
+ abstract selectValue(value: unknown): void;
263
+ /** Cardinality hint read by `skra-option` for the indicator swap — `false` single / `true` multi. */
264
+ abstract readonly multiple: boolean;
265
+ /** Seed the active descendant on open: single = the selected option; multi = the first selected. */
266
+ protected abstract activeSeedItem(): SkraListboxKeyboardItem | null;
267
+ protected onPanelToggle(event: Event): void;
268
+ /**
269
+ * The element the panel is positioned against AND matched in width to (Q-5). Defaults to the trigger
270
+ * — correct for the select family, whose trigger button fills the host. The combobox overrides it to
271
+ * the host box, because its trigger is the INNER input (narrower than the bordered box + chevron), so
272
+ * the panel must align to and match the box, not the input — visual parity with select.
273
+ */
274
+ protected positioningAnchor(): HTMLElement | undefined;
275
+ private onOpen;
276
+ private onClose;
277
+ /** Select the keyboard's active option (Enter), unless it is soft-disabled. Shared by every trigger shape. */
278
+ protected selectActive(): void;
279
+ protected open(): void;
280
+ protected close(): void;
281
+ /** Read a length comp token (px/rem) off the panel computed style for the positioner. */
282
+ private cssLenPx;
283
+ private teardown;
284
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<_SkraListboxWidgetBase<any>, never>;
285
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<_SkraListboxWidgetBase<any>, never, never, { "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, {}, ["options"], never, true, never>;
286
+ }
287
+
288
+ /**
289
+ * _SkraSelectBase — the SELECT-family trigger model over {@link _SkraListboxWidgetBase}: the WAI-ARIA APG
290
+ * **Select-Only Combobox** trigger. It adds the `<button>` + native `popovertarget` interaction, the
291
+ * type-ahead keydown skeleton, and the ADR 0045 `[skraSelectTrigger]` rich-trigger template. Shared by
292
+ * `skra-select` (single) and `skra-multi-select` (multi) — the cardinality split (ADR 0046) lives in
293
+ * those concretes (the `SkraListboxPanel` seam: single replaces + closes, multi toggles + stays open).
294
+ *
295
+ * The trigger-shape-agnostic substrate (field cascade, panel toggle/positioner, keyboard wiring,
296
+ * open/close, the selection seam) lives in the parent base, shared verbatim with `skra-combobox`
297
+ * (which has a different — editable input — trigger; ADR 0046 amendment 2026-06-13).
298
+ *
299
+ * Full contract: adr/specs/component-select-spec.md + adr/specs/component-multi-select-spec.md.
300
+ */
301
+ declare abstract class _SkraSelectBase<T = unknown> extends _SkraListboxWidgetBase<T> {
302
+ /** Select-family panel token namespace — `--skra-comp-select-panel-*` (shared single + multi). */
303
+ protected readonly panelTokenPrefix = "select";
304
+ /** Opt-in rich trigger template (ADR 0045 Rule 2). Select-family only — a combobox input shows text. */
305
+ protected readonly triggerTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
306
+ protected onTriggerClick(event: MouseEvent): void;
307
+ protected onTriggerKeydown(event: KeyboardEvent): void;
308
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<_SkraSelectBase<any>, never>;
309
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<_SkraSelectBase<any>, never, never, {}, {}, ["triggerTemplate"], never, true, never>;
310
+ }
311
+
312
+ export { SKRA_LISTBOX_PANEL, SkraOption, SkraOptionDetail, SkraOptionLeading, SkraSelectTrigger, _SkraListboxWidgetBase, _SkraSelectBase, _attachPositioner };
313
+ export type { SkraListboxKeyboardItem, SkraListboxPanel, SkraPlacement, _PositionerHandle, _PositionerOptions };
314
+ //# sourceMappingURL=skra-ui-core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skra-ui-core.d.ts","sources":["../../../../libs/ui/core/src/lib/select/select-types.ts","../../../../libs/ui/core/src/lib/select/option.ts","../../../../libs/ui/core/src/lib/select/option.directives.ts","../../../../libs/ui/core/src/lib/select/select-trigger.ts","../../../../libs/ui/core/src/lib/positioning/positioner.ts","../../../../libs/ui/core/src/lib/select/listbox-keyboard.ts","../../../../libs/ui/core/src/lib/select/listbox-widget-base.ts","../../../../libs/ui/core/src/lib/select/select-base.ts"],"mappings":";;;;AAEA;;;;;AAKG;UACc,gBAAgB;;AAE/B;AACA;;;;AAIG;AACH;AACA;;;;AAIG;AACH;AACD;AAED;;;;;AAKG;UACc,uBAAuB;AACtC;;;;;AAKA;AACD;AAED;;;;AAIG;AACH,cAAa,kBAAkB,EAAA,cAAA,CAAA,gBAAA;;ACvB/B;;;;;;;;;;;;;;;AAeG;AACH,cAkCa,UAAU,yBAAyB,uBAAuB;;oBAEvD,aAAA,CAAA,WAAA;;;AAKd;AACA;AAEA;AACA;AACA,mCAA6B,aAAA,CAAA,MAAA;AAC7B,kCAA4B,aAAA,CAAA,MAAA;;AAG5B,+BAAyB,aAAA,CAAA,cAAA;AAEzB;;;;AAIG;AACH,iCAA2B,aAAA,CAAA,MAAA;;AAG3B,iCAA2B,aAAA,CAAA,MAAA;;AAgB3B;AAGA;AAIA;;;;;AAKG;AACH;AAqBA;;;;oDA5EW,UAAU;sDAAV,UAAU;AAyFtB;;AC/JD;;;AAGG;AACH,cAIa,iBAAiB;oDAAjB,iBAAiB;sDAAjB,iBAAiB;AAAG;AAEjC;;;AAGG;AACH,cAIa,gBAAgB;oDAAhB,gBAAgB;sDAAhB,gBAAgB;AAAG;;AClBhC;;;;;;;;;;;;;AAaG;AACH,cAIa,iBAAiB;oDAAjB,iBAAiB;sDAAjB,iBAAiB;AAAG;;ACXjC;;;;;;;;;;;;;;AAcG;AAEH;AACM,KAAM,aAAa;UAER,kBAAkB;;eAEtB,aAAa;;;;;AAKzB;UAEgB,iBAAiB;;;AAGjC;AAED;;;;;AAKG;AACH,iBAAgB,iBAAiB,YACpB,WAAW,YACZ,WAAW,iBACN,kBAAkB,GAChC,iBAAiB;;AChDpB;;;;;;;;;;AAUG;AACH,cAAa,oBAAoB;;;;;AAM/B,mCACkB,uBAAuB;AAKzC;;;;AAIG;AACH,6BAAyB,uBAAuB;;AAiBhD,qBAAiB,aAAa;AAI9B,sBAAkB,uBAAuB;;AAKzC,oBAAgB,uBAAuB;;AAOvC;AAIA;AAID;;AC/CD;;;;;;;;;;;;;;;;;;;;;AAqBG;AACH,uBAQsB,sBAAsB,yBAC/B,gBAAgB;;0BAGP,aAAA,CAAA,WAAA;;0BAEA,aAAA,CAAA,WAAA;;wBAEF,aAAA,CAAA,WAAA,CAAA,aAAA;;uBAED,aAAA,CAAA,wBAAA;uBACA,aAAA,CAAA,wBAAA;AAEjB,gCAA0B,aAAA,CAAA,MAAA,UAAA,UAAA;AAE1B,mCAA6B,aAAA,CAAA,MAAA,CAAA,UAAA,CAAA,WAAA;AAC7B,iCAA2B,aAAA,CAAA,MAAA,CAAA,UAAA,CAAA,WAAA;AAE3B,gCAA0B,gBAAA;AAC1B,iCAA2B,oBAAA;;AAG3B,+BAAyB,aAAA,CAAA,cAAA;AACzB,uCAAiC,aAAA,CAAA,cAAA;;;;AAQjC,mCAA6B,aAAA,CAAA,MAAA;AAG7B,mCAA6B,aAAA,CAAA,MAAA;AAG7B,iCAA2B,aAAA,CAAA,MAAA;AAG3B,mCAA6B,aAAA,CAAA,MAAA;AAG7B,kCAA4B,aAAA,CAAA,MAAA;AAG5B,oCAA8B,aAAA,CAAA,MAAA;;;AAgB9B;;AAEA;;AAEA;;AAEA,yCAAqC,uBAAuB;AAG5D,mCAA+B,KAAK;AAOpC;;;;;AAKG;AACH,mCAA+B,WAAW;AAI1C;AAqBA;;;;;;AAqBA;AAaA;oDA/IoB,sBAAsB;sDAAtB,sBAAsB;AAmJ3C;;ACtMD;;;;;;;;;;;;AAYG;AACH,uBACsB,eAAe,sBAE3B,sBAAsB;;AAE9B;;AAGA,wCAAkC,aAAA,CAAA,MAAA,CAAA,WAAA;AAKlC,oCAAgC,UAAU;AAK1C,sCAAkC,aAAa;oDAjB3B,eAAe;sDAAf,eAAe;AAuDpC;;;;","names":[]}
@@ -0,0 +1,33 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ /**
4
+ * Status atom rendering `{value.length}` or `{value.length}/{max}` for a
5
+ * sibling form control. Pure UI primitive — agnostic of form binding strategy
6
+ * per ADR 037: consumer wires `[value]` from their chosen source (Signal Forms
7
+ * `field().value()`, Reactive Forms `ctrl.value`, `ngModel`, raw signal).
8
+ *
9
+ * Counter does NOT subscribe to SkraFieldContext for value — ADR 037 §3.3
10
+ * explicitly forbids a value channel in the context. The atom remains
11
+ * independently testable and works outside `<skra-field>` if desired.
12
+ *
13
+ * <skra-field>
14
+ * <label skraLabelFor>Bio</label>
15
+ * <textarea skraTextarea [formField]="form.bio" maxlength="500"></textarea>
16
+ * <skra-counter [value]="form.bio().value()" [max]="500" />
17
+ * </skra-field>
18
+ *
19
+ * `max` is optional — without it, the counter shows just the current length
20
+ * (e.g. for free-form "characters typed" indicators). Native `maxlength` on
21
+ * the form control is a separate concern (browser enforces the cap); `[max]`
22
+ * here is the displayed reference value.
23
+ */
24
+ declare class SkraCounter {
25
+ readonly value: _angular_core.InputSignal<string>;
26
+ readonly max: _angular_core.InputSignal<number | null>;
27
+ readonly display: _angular_core.Signal<string>;
28
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraCounter, never>;
29
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkraCounter, "skra-counter", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
30
+ }
31
+
32
+ export { SkraCounter };
33
+ //# sourceMappingURL=skra-ui-counter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skra-ui-counter.d.ts","sources":["../../../../libs/ui/counter/src/lib/counter/counter.component.ts"],"mappings":";;AAQA;;;;;;;;;;;;;;;;;;;;AAoBG;AACH,cAgBa,WAAW;oBACR,aAAA,CAAA,WAAA;kBACF,aAAA,CAAA,WAAA;sBAEI,aAAA,CAAA,MAAA;oDAJL,WAAW;sDAAX,WAAW;AASvB;;;;","names":[]}
@@ -0,0 +1,164 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { SkraPlacement } from '@skra/ui/core';
3
+ export { SkraPlacement } from '@skra/ui/core';
4
+
5
+ /** A localized weekday column header (short label + full name for the `<abbr title>`). */
6
+ interface WeekdayHeader {
7
+ /** ISO weekday 1=Mon … 7=Sun — a stable `@for` track key. */
8
+ readonly key: number;
9
+ readonly short: string;
10
+ readonly long: string;
11
+ }
12
+
13
+ interface DayCell {
14
+ readonly key: string;
15
+ readonly iso: string | null;
16
+ readonly dayNum: string;
17
+ readonly srName: string;
18
+ readonly today: boolean;
19
+ readonly selected: boolean;
20
+ readonly disabled: boolean;
21
+ readonly focused: boolean;
22
+ }
23
+ interface WeekRow {
24
+ readonly key: number;
25
+ readonly days: DayCell[];
26
+ }
27
+ /**
28
+ * SkraDatePicker — pick a single **calendar date** from an APG Date Picker grid in the native top layer.
29
+ * Second Tier-3 component. A value-display **trigger** (`<button>`) opens a non-modal top-layer **calendar
30
+ * panel** (Popover API, `popover="auto"`, ADR 0044). The value is an **ISO 8601 date-only string**
31
+ * (`YYYY-MM-DD`), consumer-owned (ADR 0050/037 — NO `@angular/forms`); all date math is the zoneless
32
+ * UTC-calculator discipline in `calendar-math` (no date library). Localization (month/weekday names,
33
+ * first-day-of-week, digits) is `Intl`-derived in `calendar-intl`; the 2-D grid keyboard is the
34
+ * hand-rolled `SkraCalendarKeyboard` (ADR 0044 §7 — roving REAL focus, not aria-activedescendant).
35
+ *
36
+ * No projected content: the calendar days are GENERATED (the structural divergence from select/combobox —
37
+ * there is no `skra-option` reuse). The only focusable element in the open panel is the roving day cell;
38
+ * the month-nav buttons are pointer affordances (`tabindex="-1"`, driven by PageUp/PageDown on keyboard),
39
+ * and Tab dismisses — so no focus-containment machinery is needed (spec Q-1).
40
+ *
41
+ * Full contract: adr/specs/component-datepicker-spec.md.
42
+ */
43
+ declare class SkraDatePicker {
44
+ /** Consumer-owned value: ISO 8601 date-only (`YYYY-MM-DD`); `''` = unset. NEVER a Date (ADR 0050/037). */
45
+ readonly value: _angular_core.InputSignal<string>;
46
+ /** Inclusive lower bound (ISO); `''` = unbounded (ADR 0050 §2). */
47
+ readonly min: _angular_core.InputSignal<string>;
48
+ /** Inclusive upper bound (ISO); `''` = unbounded. */
49
+ readonly max: _angular_core.InputSignal<string>;
50
+ /** `Intl` locale (BCP-47); `undefined` → host default (ADR 0050 §5). */
51
+ readonly locale: _angular_core.InputSignal<string | undefined>;
52
+ /** First day of week, ISO 1=Mon … 7=Sun; overrides `Intl.getWeekInfo` (the MVP safety valve, ADR 0050 §5). */
53
+ readonly firstDayOfWeek: _angular_core.InputSignal<number | undefined>;
54
+ /** Value-empty hint in the trigger (NOT the accessible name — ADR 033). */
55
+ readonly placeholder: _angular_core.InputSignal<string>;
56
+ /** Placement intent; flip/shift adjust at runtime. */
57
+ readonly placement: _angular_core.InputSignal<SkraPlacement>;
58
+ /** Standalone availability source — `SkraFieldContext` wins when present. */
59
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
60
+ readonly readonly: _angular_core.InputSignalWithTransform<boolean, unknown>;
61
+ /** Fires ONLY on user date selection — never on a programmatic `value()` change (ADR 037/0050). */
62
+ readonly valueChange: _angular_core.OutputEmitterRef<string>;
63
+ private readonly triggerRef;
64
+ private readonly panelRef;
65
+ private readonly context;
66
+ private readonly injector;
67
+ private readonly keyboard;
68
+ readonly panelId: string;
69
+ readonly monthYearId: string;
70
+ protected readonly isOpen: _angular_core.WritableSignal<boolean>;
71
+ /** Today's LOCAL date (ADR 0050 §3) — stable for the session. */
72
+ private readonly todayIso;
73
+ /** The roving-focus day; SINGLE source of truth for what the grid shows AND which cell is focusable. */
74
+ private readonly focusedIso;
75
+ private positioner?;
76
+ /** Set when a close should return focus to the trigger (keyboard/select), not on outside-click. */
77
+ private returnFocus;
78
+ protected readonly isDisabled: _angular_core.Signal<boolean>;
79
+ protected readonly isReadonly: _angular_core.Signal<boolean>;
80
+ protected readonly hasError: _angular_core.Signal<boolean>;
81
+ protected readonly isRequired: _angular_core.Signal<boolean>;
82
+ protected readonly triggerId: _angular_core.Signal<string | null>;
83
+ protected readonly describedBy: _angular_core.Signal<string | null>;
84
+ /** The committed value, defensively normalized: invalid/out-of-range → `''` for display (ADR 0050 §1). */
85
+ protected readonly selectedIso: _angular_core.Signal<string>;
86
+ protected readonly formattedValue: _angular_core.Signal<string>;
87
+ private readonly firstDow;
88
+ /** The month being shown — always the focused day's month (keeps the roving tabindex valid). */
89
+ private readonly displayedMonth;
90
+ protected readonly monthYearLabel: _angular_core.Signal<string>;
91
+ protected readonly prevMonthLabel: _angular_core.Signal<string>;
92
+ protected readonly nextMonthLabel: _angular_core.Signal<string>;
93
+ protected readonly weekdayHeadersView: _angular_core.Signal<WeekdayHeader[]>;
94
+ protected readonly weeks: _angular_core.Signal<WeekRow[]>;
95
+ constructor();
96
+ protected onTriggerClick(event: MouseEvent): void;
97
+ protected onTriggerKeydown(event: KeyboardEvent): void;
98
+ protected onGridKeydown(event: KeyboardEvent): void;
99
+ protected goToPreviousMonth(): void;
100
+ protected goToNextMonth(): void;
101
+ protected selectDate(iso: string): void;
102
+ protected onPanelToggle(event: Event): void;
103
+ private onOpen;
104
+ private onClose;
105
+ private open;
106
+ private close;
107
+ /** Seed the focused day on open: the valid current value, else today, clamped into `[min,max]`. */
108
+ private seedFocus;
109
+ private monthOffsetLabel;
110
+ private emptyCell;
111
+ private scheduleFocus;
112
+ private focusActiveDay;
113
+ /** Read a length comp token (px/rem) off the panel computed style for the positioner. */
114
+ private cssLenPx;
115
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkraDatePicker, never>;
116
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkraDatePicker, "skra-datepicker", ["skraDatePicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
117
+ }
118
+
119
+ /**
120
+ * The intent a key produces in the calendar grid. The controller is PURE (no DOM, no focus, no signals);
121
+ * the `skra-datepicker` component applies the intent — sets `focusedIso`/`displayedMonth` and moves REAL
122
+ * DOM focus (roving). `monthChanged` tells the component the grid will re-stamp so it must re-`focus()`.
123
+ */
124
+ type CalendarKeyIntent = {
125
+ readonly type: 'focus';
126
+ readonly iso: string;
127
+ readonly monthChanged: boolean;
128
+ } | {
129
+ readonly type: 'select';
130
+ } | {
131
+ readonly type: 'close';
132
+ } | {
133
+ readonly type: 'none';
134
+ };
135
+ interface CalendarKeyContext {
136
+ /** The currently focused day (ISO). */
137
+ readonly focusedIso: string;
138
+ /** First day of week, ISO 1=Mon … 7=Sun (already resolved by `calendar-intl`). */
139
+ readonly firstDayOfWeek: number;
140
+ }
141
+ /**
142
+ * SkraCalendarKeyboard — the WAI-ARIA APG **Date Picker Dialog** grid keyboard model (2-D), confined to
143
+ * ONE file. The THIRD per-pattern keyboard controller and the FIRST that does NOT wrap a CDK key manager:
144
+ * neither `FocusKeyManager` (Menu) nor `ActiveDescendantKeyManager` (Select/Combobox) models a 2-D grid
145
+ * whose focusable cell set is recomputed on month change (ADR 0044 §7 note, 2026-06-14). Date arithmetic
146
+ * is delegated to `calendar-math` (the ADR 0050 single math site); this controller only maps keys to
147
+ * intents. Roving REAL focus (NOT `aria-activedescendant`) — the divergence from Select/Combobox.
148
+ *
149
+ * Navigation is unclamped (a user may move onto a disabled out-of-range day — APG-discoverable); only
150
+ * SELECTION is range-guarded, and that guard lives in the component (one place, shared with pointer click).
151
+ */
152
+ declare class SkraCalendarKeyboard {
153
+ resolve(event: {
154
+ key: string;
155
+ shiftKey: boolean;
156
+ }, ctx: CalendarKeyContext): CalendarKeyIntent;
157
+ private toFocus;
158
+ private monthChanged;
159
+ private weekStart;
160
+ }
161
+
162
+ export { SkraCalendarKeyboard, SkraDatePicker };
163
+ export type { CalendarKeyContext, CalendarKeyIntent };
164
+ //# sourceMappingURL=skra-ui-datepicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skra-ui-datepicker.d.ts","sources":["../../../../libs/ui/datepicker/src/lib/datepicker/calendar-intl.ts","../../../../libs/ui/datepicker/src/lib/datepicker/datepicker.ts","../../../../libs/ui/datepicker/src/lib/datepicker/calendar-keyboard.ts"],"mappings":";;;;AAWA;UACiB,aAAa;;AAE5B;AACA;AACA;AACD;;AC2BD,UAAU,OAAO;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAED,UAAU,OAAO;AACf;AACA,mBAAe,OAAO;AACvB;AAID;;;;;;;;;;;;;;;AAeG;AACH,cAyJa,cAAc;;oBAEX,aAAA,CAAA,WAAA;;kBAEF,aAAA,CAAA,WAAA;;kBAEA,aAAA,CAAA,WAAA;;qBAEG,aAAA,CAAA,WAAA;;6BAEQ,aAAA,CAAA,WAAA;;0BAEH,aAAA,CAAA,WAAA;;wBAEF,aAAA,CAAA,WAAA,CAAA,aAAA;;uBAED,aAAA,CAAA,wBAAA;uBACA,aAAA,CAAA,wBAAA;;0BAGG,aAAA,CAAA,gBAAA;AAEpB;AAEA;AAEA;AACA;AACA;;;AAIA,+BAAyB,aAAA,CAAA,cAAA;;AAGzB;;AAEA;;;;AAOA,mCAA6B,aAAA,CAAA,MAAA;AAG7B,mCAA6B,aAAA,CAAA,MAAA;AAG7B,iCAA2B,aAAA,CAAA,MAAA;AAG3B,mCAA6B,aAAA,CAAA,MAAA;AAG7B,kCAA4B,aAAA,CAAA,MAAA;AAG5B,oCAA8B,aAAA,CAAA,MAAA;;AAM9B,oCAA8B,aAAA,CAAA,MAAA;AAI9B,uCAAiC,aAAA,CAAA,MAAA;AAGjC;;AAIA;AAIA,uCAAiC,aAAA,CAAA,MAAA;AAOjC,uCAAiC,aAAA,CAAA,MAAA;AACjC,uCAAiC,aAAA,CAAA,MAAA;AACjC,2CAAqC,aAAA,CAAA,MAAA,CAAAA,aAAA;AAGrC,8BAAwB,aAAA,CAAA,MAAA,CAAA,OAAA;;AAqDxB,oCAAgC,UAAU;AAI1C,sCAAkC,aAAa;AAS/C,mCAA+B,aAAa;;;AAwC5C;AAQA,mCAA+B,KAAK;AAOpC;AAiBA;AASA;AAGA;;AAKA;AAMA;AAMA;AAaA;AAIA;;AASA;oDA7RW,cAAc;sDAAd,cAAc;AAyS1B;;ACxgBD;;;;AAIG;AACG,KAAM,iBAAiB;AAEvB;AACA;AACA;;AAEA;;AACA;;AACA;;UAEW,kBAAkB;;AAEjC;;AAEA;AACD;AAID;;;;;;;;;;AAUG;AACH,cAAa,oBAAoB;;;;AAEY,YACpC,kBAAkB,GACtB,iBAAiB;AA8CpB;AAQA;AAMA;AAMD;;;;","names":["__calendar_intl.WeekdayHeader"]}