@skra/ui 0.3.0 → 0.3.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.
|
@@ -126,24 +126,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
126
126
|
* moved here from the slice).
|
|
127
127
|
*/
|
|
128
128
|
class SkraLabel {
|
|
129
|
-
|
|
129
|
+
// Optional per ADR 013 §3.7 — outside `<skra-field>` the label still carries the
|
|
130
|
+
// skin and the consumer owns association (a wrapping `<label>`, or a hand-written
|
|
131
|
+
// `for`). Mandatory injection would crash the app for a styling-only use.
|
|
132
|
+
context = inject(SkraFieldContext, { optional: true });
|
|
130
133
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraLabel, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
131
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraLabel, isStandalone: true, selector: "label[skraLabelFor]", host: { properties: { "
|
|
134
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraLabel, isStandalone: true, selector: "label[skraLabelFor]", host: { properties: { "attr.for": "context?.fieldId() ?? null", "attr.id": "context?.labelId() ?? null", "attr.data-skra-required": "context?.isRequired() ? \"\" : null" }, classAttribute: "skra-label" }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{color:var(--skra-comp-field-label-color);font-family:var(--skra-sys-typography-role-label-medium-font-family);font-size:var(--skra-sys-typography-role-label-medium-font-size);font-weight:var(--skra-sys-typography-role-label-medium-font-weight);line-height:var(--skra-sys-typography-role-label-medium-line-height);letter-spacing:var(--skra-sys-typography-role-label-medium-letter-spacing);cursor:var(--skra-comp-field-label-cursor, pointer);transition:color var(--skra-comp-field-motion-duration) var(--skra-comp-field-motion-easing)}:host([data-skra-required]):after{content:\"*\"/\"\";margin-inline-start:var(--skra-sys-spacing-1);color:var(--skra-comp-field-required-color)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
132
135
|
}
|
|
133
136
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraLabel, decorators: [{
|
|
134
137
|
type: Component,
|
|
135
138
|
args: [{ selector: 'label[skraLabelFor]', standalone: true, template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
|
|
136
|
-
// The magic: auto-linking label to input via shared Context ID
|
|
137
|
-
|
|
139
|
+
// The magic: auto-linking label to input via shared Context ID. Bound as an
|
|
140
|
+
// ATTRIBUTE, not the `htmlFor` property — with no field context the property
|
|
141
|
+
// form would stringify `undefined` into `for="undefined"`.
|
|
142
|
+
'[attr.for]': 'context?.fieldId() ?? null',
|
|
138
143
|
// Referenceable id so a non-labelable control (a `role="radiogroup"` host like
|
|
139
144
|
// <skra-star-rating>, which `for`/`id` can't target) can name itself via
|
|
140
145
|
// `aria-labelledby`. Harmless for labelable controls (they use `for`). ADR 013.
|
|
141
|
-
'[id]': 'context
|
|
146
|
+
'[attr.id]': 'context?.labelId() ?? null',
|
|
142
147
|
// Required marker — reflect the field's required state so the SCSS can paint a
|
|
143
148
|
// decorative asterisk (::after). The control already carries `aria-required`,
|
|
144
149
|
// so the marker is purely visual (ADR 021 data-attr reflection; ADR 033 keeps
|
|
145
150
|
// it out of the accessible name via the empty alt-text in `content`).
|
|
146
|
-
'[attr.data-skra-required]': 'context
|
|
151
|
+
'[attr.data-skra-required]': 'context?.isRequired() ? "" : null',
|
|
147
152
|
// Class hook retained for any consumer-side targeting (ADR 024 pattern).
|
|
148
153
|
class: 'skra-label',
|
|
149
154
|
}, styles: [":host{color:var(--skra-comp-field-label-color);font-family:var(--skra-sys-typography-role-label-medium-font-family);font-size:var(--skra-sys-typography-role-label-medium-font-size);font-weight:var(--skra-sys-typography-role-label-medium-font-weight);line-height:var(--skra-sys-typography-role-label-medium-line-height);letter-spacing:var(--skra-sys-typography-role-label-medium-letter-spacing);cursor:var(--skra-comp-field-label-cursor, pointer);transition:color var(--skra-comp-field-motion-duration) var(--skra-comp-field-motion-easing)}:host([data-skra-required]):after{content:\"*\"/\"\";margin-inline-start:var(--skra-sys-spacing-1);color:var(--skra-comp-field-required-color)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"] }]
|
|
@@ -154,16 +159,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
154
159
|
* Auto-receives ID from SkraFieldContext so aria-describedby on input works automatically.
|
|
155
160
|
*/
|
|
156
161
|
class SkraHint {
|
|
157
|
-
|
|
162
|
+
// Optional per ADR 013 §3.7 — mirrors SkraError. Outside `<skra-field>` it
|
|
163
|
+
// publishes no id and is plain styled helper text the consumer associates itself.
|
|
164
|
+
context = inject(SkraFieldContext, { optional: true });
|
|
158
165
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraHint, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
159
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraHint, isStandalone: true, selector: "skra-hint", host: { attributes: { "role": "note" }, properties: { "id": "context
|
|
166
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraHint, isStandalone: true, selector: "skra-hint", host: { attributes: { "role": "note" }, properties: { "attr.id": "context?.hintId() ?? null" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{margin:0;display:block;font-family:var(--skra-sys-typography-role-body-small-font-family);font-size:var(--skra-sys-typography-role-body-small-font-size);font-weight:var(--skra-sys-typography-role-body-small-font-weight);line-height:var(--skra-sys-typography-role-body-small-line-height);letter-spacing:var(--skra-sys-typography-role-body-small-letter-spacing);color:var(--skra-comp-field-hint-color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
160
167
|
}
|
|
161
168
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraHint, decorators: [{
|
|
162
169
|
type: Component,
|
|
163
170
|
args: [{ selector: 'skra-hint', standalone: true, template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
|
|
164
171
|
// Zero-margin reset (ADR 022) lives in hint.component.scss `:host`.
|
|
165
172
|
// ID linked from context — input's aria-describedby points here automatically
|
|
166
|
-
'[id]': 'context
|
|
173
|
+
'[attr.id]': 'context?.hintId() ?? null',
|
|
167
174
|
role: 'note',
|
|
168
175
|
}, styles: [":host{margin:0;display:block;font-family:var(--skra-sys-typography-role-body-small-font-family);font-size:var(--skra-sys-typography-role-body-small-font-size);font-weight:var(--skra-sys-typography-role-body-small-font-weight);line-height:var(--skra-sys-typography-role-body-small-line-height);letter-spacing:var(--skra-sys-typography-role-body-small-letter-spacing);color:var(--skra-comp-field-hint-color)}\n"] }]
|
|
169
176
|
}] });
|
|
@@ -200,16 +207,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
200
207
|
* loaded two responsibilities into a single primitive.
|
|
201
208
|
*/
|
|
202
209
|
class SkraError {
|
|
203
|
-
|
|
210
|
+
// Optional per ADR 013 §3.7. A GROUP-level error is a first-class pattern:
|
|
211
|
+
// `<skra-error>` sits as a direct child of `<fieldset skraFieldset>`, outside any
|
|
212
|
+
// `<skra-field>`, to carry one message for a radio/checkbox group (see the
|
|
213
|
+
// Fieldset `WithGroupError` story). It then publishes no id — nothing points at
|
|
214
|
+
// it via `aria-describedby`, and `role="alert"` announces it on its own.
|
|
215
|
+
context = inject(SkraFieldContext, { optional: true });
|
|
204
216
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraError, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
205
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraError, isStandalone: true, selector: "skra-error", host: { attributes: { "role": "alert" }, properties: { "id": "context
|
|
217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraError, isStandalone: true, selector: "skra-error", host: { attributes: { "role": "alert" }, properties: { "attr.id": "context?.errorId() ?? null" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{margin:0;display:block;font-family:var(--skra-sys-typography-role-body-small-font-family);font-size:var(--skra-sys-typography-role-body-small-font-size);font-weight:var(--skra-sys-typography-role-body-small-font-weight);line-height:var(--skra-sys-typography-role-body-small-line-height);letter-spacing:var(--skra-sys-typography-role-body-small-letter-spacing);color:var(--skra-comp-field-error-color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
206
218
|
}
|
|
207
219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraError, decorators: [{
|
|
208
220
|
type: Component,
|
|
209
221
|
args: [{ selector: 'skra-error', standalone: true, template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, host: {
|
|
210
222
|
// Zero-margin reset (ADR 022) lives in error.component.scss `:host`.
|
|
211
223
|
// ID linked from context — input's aria-describedby points here automatically
|
|
212
|
-
'[id]': 'context
|
|
224
|
+
'[attr.id]': 'context?.errorId() ?? null',
|
|
213
225
|
// role="alert" implies aria-live="assertive" + aria-atomic="true" — do NOT
|
|
214
226
|
// add an explicit aria-live (contradicts the implicit assertive). Errors are
|
|
215
227
|
// announced promptly per WAI-ARIA APG.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skra-ui-field.mjs","sources":["../../../../libs/ui/field/src/lib/id-generator/id-generator.service.ts","../../../../libs/ui/field/src/lib/field-context/field-context.ts","../../../../libs/ui/field/src/lib/field/field.component.ts","../../../../libs/ui/field/src/lib/label/label.ts","../../../../libs/ui/field/src/lib/hint/hint.component.ts","../../../../libs/ui/field/src/lib/error/error.component.ts","../../../../libs/ui/field/src/lib/fieldset/fieldset.ts","../../../../libs/ui/field/src/lib/fieldset/legend.ts","../../../../libs/ui/field/src/index.ts","../../../../libs/ui/field/src/skra-ui-field.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * Root-level service generating unique, short IDs for form elements.\r\n * Implements ADR 013 — deterministic IDs without bloaty UUID libraries.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class IdGeneratorService {\r\n private counter = 0;\r\n\r\n nextId(prefix = 'fg'): string {\r\n return `${prefix}-${++this.counter}`;\r\n }\r\n}\r\n","import { Injectable, signal, computed } from '@angular/core';\r\n\r\n/**\r\n * DI Context service provided per SkraField instance.\r\n * Acts as the synchronization bus between Field, Input, Label, Hint, and Error.\r\n * Implements ADR 013: Signal-based Contextual Interaction.\r\n */\r\n@Injectable()\r\nexport class SkraFieldContext {\r\n readonly fieldId = signal<string>('');\r\n readonly hasError = signal<boolean>(false);\r\n readonly isDisabled = signal<boolean>(false);\r\n readonly isRequired = signal<boolean>(false);\r\n readonly isReadonly = signal<boolean>(false);\r\n\r\n // Derived IDs for aria-describedby linkage\r\n readonly hintId = computed(() => `${this.fieldId()}-hint`);\r\n readonly errorId = computed(() => `${this.fieldId()}-error`);\r\n\r\n // Derived label ID. Labelable controls (input/checkbox/radio) associate via the\r\n // native `for`/`id` pair, so they never needed a referenceable label id. A\r\n // `role=\"radiogroup\"` host (<skra-star-rating>) is NOT labelable by `for`, so it\r\n // must name itself via `aria-labelledby` → the label needs an id. This is the third\r\n // derived id alongside hintId/errorId — an id, never a value (ADR 013 §3.6; the\r\n // context carries id + derived state only). Set on `label[skraLabelFor]`.\r\n readonly labelId = computed(() => `${this.fieldId()}-label`);\r\n\r\n // Combined aria-describedby tokens for the input/textarea host.\r\n // Both ids are always emitted — when <skra-hint> or <skra-error> is not\r\n // rendered, the matching DOM node is absent and browsers / screen readers\r\n // gracefully ignore the dangling reference. Simpler than tracking presence\r\n // via contentChild queries from the directive (which has no template).\r\n readonly describedByIds = computed(\r\n () => `${this.hintId()} ${this.errorId()}`,\r\n );\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n effect,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { SkraFieldContext } from '../field-context/field-context';\r\nimport { IdGeneratorService } from '../id-generator/id-generator.service';\r\n\r\n@Component({\r\n selector: 'skra-field',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n // KEY: provides a new SkraFieldContext instance per field — isolation guaranteed\r\n providers: [SkraFieldContext],\r\n host: {\r\n // CSP-Safe State Reflection (ADR 021). The layout reset (margin) +\r\n // display:flex live in field.component.scss `:host` (ADR 022) — host-metadata\r\n // bare keys (margin, display) render as junk attributes with no styling effect.\r\n // Validation state (ADR 027) — canonical `data-skra-validation=\"invalid\"`,\r\n // NOT the forbidden `data-skra-has-error` (migrated 2026-05-31 per ADR 027\r\n // §3.6 / state-surface-catalog). The control's `aria-invalid` lives on the\r\n // inner <input skraInput> (ADR 013), not on this group host.\r\n '[attr.data-skra-validation]': 'context.hasError() ? \"invalid\" : null',\r\n '[attr.data-skra-disabled]': 'context.isDisabled() ? \"\" : null',\r\n '[attr.data-skra-required]': 'context.isRequired() ? \"\" : null',\r\n '[attr.data-skra-readonly]': 'context.isReadonly() ? \"\" : null',\r\n\r\n // A11y: role=\"group\" groups label+input+hint semantically for screen readers\r\n role: 'group',\r\n },\r\n})\r\nexport class SkraField implements OnInit {\r\n private readonly idGen = inject(IdGeneratorService);\r\n readonly context = inject(SkraFieldContext);\r\n\r\n readonly fieldId = input<string | null>(null);\r\n readonly readonly = input(false, { transform: booleanAttribute });\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n readonly required = input(false, { transform: booleanAttribute });\r\n readonly hasError = input(false, { transform: booleanAttribute });\r\n\r\n constructor() {\r\n // Reactive sync — state inputs propagate to SkraFieldContext on every\r\n // change (not just on init). Replaces the previous ngOnInit-only pattern\r\n // which caused late input changes to silently desync from the context\r\n // (and from sibling atoms reading the context). Matches Checkbox's\r\n // effect() pattern for indeterminate property sync.\r\n effect(() => {\r\n this.context.isReadonly.set(this.readonly());\r\n this.context.isDisabled.set(this.disabled());\r\n this.context.isRequired.set(this.required());\r\n this.context.hasError.set(this.hasError());\r\n });\r\n }\r\n\r\n // fieldId is one-shot — assigned once on init, never changes thereafter\r\n // (a field's identity attribute should be stable for the field's lifetime).\r\n ngOnInit(): void {\r\n this.context.fieldId.set(this.fieldId() ?? this.idGen.nextId('fg'));\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n inject,\r\n} from '@angular/core';\r\nimport { SkraFieldContext } from '../field-context/field-context';\r\n\r\n/**\r\n * `label[skraLabelFor]` — form-control label atom. Per ADR 040 this is a\r\n * Component-on-the-native-host carrying its own `label.scss` (typography + colour\r\n * + cursor) via Emulated encapsulation, replacing the ADR 038 slice branch.\r\n *\r\n * `<label>` is content-bearing (its text is the label), so the template MUST be\r\n * `<ng-content>` — `template: ''` would discard the label text. See ADR 040 §2.\r\n *\r\n * Auto-links to its sibling control via `[htmlFor]` sourced from\r\n * `SkraFieldContext.fieldId()` — zero manual ID passing (ADR 013). The label's\r\n * error-state colour is driven by `<skra-field>[data-skra-validation=\"invalid\"]`\r\n * swapping `--skra-comp-field-label-color` through CSS variable inheritance; this\r\n * SCSS is what consumes that variable (the swap was a no-op before the binding\r\n * moved here from the slice).\r\n */\r\n@Component({\r\n selector: 'label[skraLabelFor]',\r\n standalone: true,\r\n // Content-bearing host — see ADR 040 §2.\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './label.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n // The magic: auto-linking label to input via shared Context ID\r\n '[htmlFor]': 'context.fieldId()',\r\n // Referenceable id so a non-labelable control (a `role=\"radiogroup\"` host like\r\n // <skra-star-rating>, which `for`/`id` can't target) can name itself via\r\n // `aria-labelledby`. Harmless for labelable controls (they use `for`). ADR 013.\r\n '[id]': 'context.labelId()',\r\n // Required marker — reflect the field's required state so the SCSS can paint a\r\n // decorative asterisk (::after). The control already carries `aria-required`,\r\n // so the marker is purely visual (ADR 021 data-attr reflection; ADR 033 keeps\r\n // it out of the accessible name via the empty alt-text in `content`).\r\n '[attr.data-skra-required]': 'context.isRequired() ? \"\" : null',\r\n // Class hook retained for any consumer-side targeting (ADR 024 pattern).\r\n class: 'skra-label',\r\n },\r\n})\r\nexport class SkraLabel {\r\n readonly context = inject(SkraFieldContext);\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n inject,\r\n} from '@angular/core';\r\nimport { SkraFieldContext } from '../field-context/field-context';\r\n\r\n/**\r\n * Hint component for supplementary field information.\r\n * Auto-receives ID from SkraFieldContext so aria-describedby on input works automatically.\r\n */\r\n@Component({\r\n selector: 'skra-hint',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './hint.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n // Zero-margin reset (ADR 022) lives in hint.component.scss `:host`.\r\n // ID linked from context — input's aria-describedby points here automatically\r\n '[id]': 'context.hintId()',\r\n role: 'note',\r\n },\r\n})\r\nexport class SkraHint {\r\n readonly context = inject(SkraFieldContext);\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n inject,\r\n} from '@angular/core';\r\nimport { SkraFieldContext } from '../field-context/field-context';\r\n\r\n/**\r\n * Error message atom sibling to `<skra-hint>`. Renders validation feedback\r\n * inside `<skra-field>` with its own a11y semantics: `role=\"alert\"` (which\r\n * carries an implicit `aria-live=\"assertive\"` + `aria-atomic=\"true\"`), so screen\r\n * readers announce a validation error promptly. NO explicit `aria-live` — adding\r\n * `aria-live=\"polite\"` alongside `role=\"alert\"` is contradictory (alert is\r\n * assertive by definition) and behaves inconsistently across AT. Assertive is\r\n * the WAI-ARIA APG pattern for validation errors (decision 2026-05-31, Batch 4\r\n * cleanroom review).\r\n *\r\n * Per ADR 037 (agnostic atom co-existence) — does not infer error state from\r\n * any binding strategy. Consumer renders or omits `<skra-error>` based on\r\n * their own validation source (Signal Forms `.invalid && .touched`, Reactive\r\n * Forms `ctrl.errors`, raw computed signal). The atom itself just supplies\r\n * a11y wiring + visual treatment.\r\n *\r\n * <skra-field [hasError]=\"emailHasError()\">\r\n * <label skraLabelFor>Email</label>\r\n * <input skraInput type=\"email\" />\r\n * <skra-hint>We'll never share your email.</skra-hint>\r\n * @if (emailHasError()) {\r\n * <skra-error>Please enter a valid email address.</skra-error>\r\n * }\r\n * </skra-field>\r\n *\r\n * Separate from `<skra-hint>` per SRP: hint is static helper text\r\n * (role=\"note\", neutral colour); error is dynamic validation feedback\r\n * (role=\"alert\", live region, error colour). One element per visual\r\n * responsibility — the rejected alternative (\"hint that swaps text on error\")\r\n * loaded two responsibilities into a single primitive.\r\n */\r\n@Component({\r\n selector: 'skra-error',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './error.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n // Zero-margin reset (ADR 022) lives in error.component.scss `:host`.\r\n // ID linked from context — input's aria-describedby points here automatically\r\n '[id]': 'context.errorId()',\r\n // role=\"alert\" implies aria-live=\"assertive\" + aria-atomic=\"true\" — do NOT\r\n // add an explicit aria-live (contradicts the implicit assertive). Errors are\r\n // announced promptly per WAI-ARIA APG.\r\n role: 'alert',\r\n },\r\n})\r\nexport class SkraError {\r\n readonly context = inject(SkraFieldContext);\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n input,\r\n} from '@angular/core';\r\n\r\n/**\r\n * Forge marker on a native `<fieldset>` used to group related form controls\r\n * (checkbox group, radio group, or any related field cluster). Per ADR 039,\r\n * Forge ships no `<skra-radio-group>` / `<skra-checkbox-group>` component\r\n * wrappers — native `<fieldset>` + `<legend>` IS the WCAG-canonical group\r\n * idiom, and Forge stops reinventing it.\r\n *\r\n * Per ADR 040 this is a Component-on-the-native-host carrying its own\r\n * `fieldset.scss` (chrome reset + group layout) via Emulated encapsulation,\r\n * replacing the ADR 038 slice branch. `<fieldset>` is content-bearing (it holds\r\n * the grouped controls), so the template MUST be `<ng-content>` — `template: ''`\r\n * would discard the entire group. See ADR 040 §2.\r\n *\r\n * The `[disabled]` input cascades to the native `disabled` attribute, and\r\n * native `<fieldset disabled>` already disables every form control inside\r\n * (browser-native behaviour). Forge does not iterate children manually.\r\n *\r\n * Selector is opt-in (`fieldset[skraFieldset]`) so the chrome-reset rules do\r\n * not leak onto bare `<fieldset>` elements outside Forge.\r\n *\r\n * <fieldset skraFieldset [disabled]=\"form.disabled()\">\r\n * <legend skraLegend>Send notifications via</legend>\r\n * <!-- skra-field children with checkboxes -->\r\n * <skra-error *ngIf=\"form.channels().length === 0\">Choose at least one</skra-error>\r\n * </fieldset>\r\n *\r\n * `role=\"group\"` is the explicit ARIA role: while the browser default for\r\n * `<fieldset>` is already group semantics for most AT, declaring it explicitly\r\n * is friendlier to assistive tech that may have idiosyncratic handling.\r\n *\r\n * Native `disabled` is sufficient — `aria-disabled` is NOT set per\r\n * native-attr-first doctrine (memory `feedback_native_attr_first.md`). The\r\n * `data-skra-disabled` reflection drives the visual dimming in `fieldset.scss`.\r\n */\r\n@Component({\r\n selector: 'fieldset[skraFieldset]',\r\n standalone: true,\r\n // Content-bearing host — see ADR 040 §2.\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './fieldset.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n role: 'group',\r\n '[attr.disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-skra-disabled]': 'disabled() ? \"\" : null',\r\n },\r\n})\r\nexport class SkraFieldset {\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n/**\r\n * `legend[skraLegend]` — visible group label for `<fieldset skraFieldset>`.\r\n * Per ADR 040 this is a Component-on-the-native-host carrying its own\r\n * `legend.scss` (chrome reset + typography role binding per ADR 036) via Emulated\r\n * encapsulation, replacing the ADR 038 slice branch.\r\n *\r\n * `<legend>` is content-bearing (its text is the group label), so the template\r\n * MUST be `<ng-content>` — `template: ''` would discard the label. See ADR 040 §2.\r\n * No host bindings, no inputs, no DI — purely a styled marker.\r\n *\r\n * <fieldset skraFieldset>\r\n * <legend skraLegend>Account preferences</legend>\r\n * ...\r\n * </fieldset>\r\n *\r\n * HTML requires `<legend>` to be the FIRST child of `<fieldset>` for native\r\n * group-label semantics. The browser HTML parser auto-corrects misplaced\r\n * legends (re-parents to fieldset), but Forge documents the canonical form.\r\n */\r\n@Component({\r\n selector: 'legend[skraLegend]',\r\n standalone: true,\r\n // Content-bearing host — see ADR 040 §2.\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './legend.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class SkraLegend {}\r\n","// Public API for @skra/ui/field — the field-family (ADR 013 contextual a11y).\r\nexport * from './lib/id-generator/id-generator.service';\r\nexport * from './lib/field-context/field-context';\r\nexport * from './lib/field/field.component';\r\nexport * from './lib/label/label';\r\nexport * from './lib/hint/hint.component';\r\nexport * from './lib/error/error.component';\r\nexport * from './lib/fieldset/fieldset';\r\nexport * from './lib/fieldset/legend';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;AAGG;MAEU,kBAAkB,CAAA;IACrB,OAAO,GAAG,CAAC;IAEnB,MAAM,CAAC,MAAM,GAAG,IAAI,EAAA;QAClB,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACtC;uGALW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cADL,MAAM,EAAA,CAAA;;2FACnB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAD9B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACJlC;;;;AAIG;MAEU,gBAAgB,CAAA;IAClB,OAAO,GAAG,MAAM,CAAS,EAAE;gFAAC;IAC5B,QAAQ,GAAG,MAAM,CAAU,KAAK;iFAAC;IACjC,UAAU,GAAG,MAAM,CAAU,KAAK;mFAAC;IACnC,UAAU,GAAG,MAAM,CAAU,KAAK;mFAAC;IACnC,UAAU,GAAG,MAAM,CAAU,KAAK;mFAAC;;IAGnC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAG,IAAI,CAAC,OAAO,EAAE,CAAA,KAAA,CAAO;+EAAC;IACjD,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAA,EAAG,IAAI,CAAC,OAAO,EAAE,CAAA,MAAA,CAAQ;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BAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAK1B,UAAU,EAAA,UAAA,EAAA,CAAA;kBATtB,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAClB,IAAI,EAAA,QAAA,EAEN,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,MAAA,EAAA,CAAA,ygBAAA,CAAA,EAAA;;;AChC3C;;ACAA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skra-ui-field.mjs","sources":["../../../../libs/ui/field/src/lib/id-generator/id-generator.service.ts","../../../../libs/ui/field/src/lib/field-context/field-context.ts","../../../../libs/ui/field/src/lib/field/field.component.ts","../../../../libs/ui/field/src/lib/label/label.ts","../../../../libs/ui/field/src/lib/hint/hint.component.ts","../../../../libs/ui/field/src/lib/error/error.component.ts","../../../../libs/ui/field/src/lib/fieldset/fieldset.ts","../../../../libs/ui/field/src/lib/fieldset/legend.ts","../../../../libs/ui/field/src/index.ts","../../../../libs/ui/field/src/skra-ui-field.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n/**\r\n * Root-level service generating unique, short IDs for form elements.\r\n * Implements ADR 013 — deterministic IDs without bloaty UUID libraries.\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class IdGeneratorService {\r\n private counter = 0;\r\n\r\n nextId(prefix = 'fg'): string {\r\n return `${prefix}-${++this.counter}`;\r\n }\r\n}\r\n","import { Injectable, signal, computed } from '@angular/core';\r\n\r\n/**\r\n * DI Context service provided per SkraField instance.\r\n * Acts as the synchronization bus between Field, Input, Label, Hint, and Error.\r\n * Implements ADR 013: Signal-based Contextual Interaction.\r\n */\r\n@Injectable()\r\nexport class SkraFieldContext {\r\n readonly fieldId = signal<string>('');\r\n readonly hasError = signal<boolean>(false);\r\n readonly isDisabled = signal<boolean>(false);\r\n readonly isRequired = signal<boolean>(false);\r\n readonly isReadonly = signal<boolean>(false);\r\n\r\n // Derived IDs for aria-describedby linkage\r\n readonly hintId = computed(() => `${this.fieldId()}-hint`);\r\n readonly errorId = computed(() => `${this.fieldId()}-error`);\r\n\r\n // Derived label ID. Labelable controls (input/checkbox/radio) associate via the\r\n // native `for`/`id` pair, so they never needed a referenceable label id. A\r\n // `role=\"radiogroup\"` host (<skra-star-rating>) is NOT labelable by `for`, so it\r\n // must name itself via `aria-labelledby` → the label needs an id. This is the third\r\n // derived id alongside hintId/errorId — an id, never a value (ADR 013 §3.6; the\r\n // context carries id + derived state only). Set on `label[skraLabelFor]`.\r\n readonly labelId = computed(() => `${this.fieldId()}-label`);\r\n\r\n // Combined aria-describedby tokens for the input/textarea host.\r\n // Both ids are always emitted — when <skra-hint> or <skra-error> is not\r\n // rendered, the matching DOM node is absent and browsers / screen readers\r\n // gracefully ignore the dangling reference. Simpler than tracking presence\r\n // via contentChild queries from the directive (which has no template).\r\n readonly describedByIds = computed(\r\n () => `${this.hintId()} ${this.errorId()}`,\r\n );\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n OnInit,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n effect,\r\n inject,\r\n input,\r\n} from '@angular/core';\r\nimport { SkraFieldContext } from '../field-context/field-context';\r\nimport { IdGeneratorService } from '../id-generator/id-generator.service';\r\n\r\n@Component({\r\n selector: 'skra-field',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './field.component.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n // KEY: provides a new SkraFieldContext instance per field — isolation guaranteed\r\n providers: [SkraFieldContext],\r\n host: {\r\n // CSP-Safe State Reflection (ADR 021). The layout reset (margin) +\r\n // display:flex live in field.component.scss `:host` (ADR 022) — host-metadata\r\n // bare keys (margin, display) render as junk attributes with no styling effect.\r\n // Validation state (ADR 027) — canonical `data-skra-validation=\"invalid\"`,\r\n // NOT the forbidden `data-skra-has-error` (migrated 2026-05-31 per ADR 027\r\n // §3.6 / state-surface-catalog). The control's `aria-invalid` lives on the\r\n // inner <input skraInput> (ADR 013), not on this group host.\r\n '[attr.data-skra-validation]': 'context.hasError() ? \"invalid\" : null',\r\n '[attr.data-skra-disabled]': 'context.isDisabled() ? \"\" : null',\r\n '[attr.data-skra-required]': 'context.isRequired() ? \"\" : null',\r\n '[attr.data-skra-readonly]': 'context.isReadonly() ? \"\" : null',\r\n\r\n // A11y: role=\"group\" groups label+input+hint semantically for screen readers\r\n role: 'group',\r\n },\r\n})\r\nexport class SkraField implements OnInit {\r\n private readonly idGen = inject(IdGeneratorService);\r\n readonly context = inject(SkraFieldContext);\r\n\r\n readonly fieldId = input<string | null>(null);\r\n readonly readonly = input(false, { transform: booleanAttribute });\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n readonly required = input(false, { transform: booleanAttribute });\r\n readonly hasError = input(false, { transform: booleanAttribute });\r\n\r\n constructor() {\r\n // Reactive sync — state inputs propagate to SkraFieldContext on every\r\n // change (not just on init). Replaces the previous ngOnInit-only pattern\r\n // which caused late input changes to silently desync from the context\r\n // (and from sibling atoms reading the context). Matches Checkbox's\r\n // effect() pattern for indeterminate property sync.\r\n effect(() => {\r\n this.context.isReadonly.set(this.readonly());\r\n this.context.isDisabled.set(this.disabled());\r\n this.context.isRequired.set(this.required());\r\n this.context.hasError.set(this.hasError());\r\n });\r\n }\r\n\r\n // fieldId is one-shot — assigned once on init, never changes thereafter\r\n // (a field's identity attribute should be stable for the field's lifetime).\r\n ngOnInit(): void {\r\n this.context.fieldId.set(this.fieldId() ?? this.idGen.nextId('fg'));\r\n }\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { SkraFieldContext } from '../field-context/field-context';\n\n/**\n * `label[skraLabelFor]` — form-control label atom. Per ADR 040 this is a\n * Component-on-the-native-host carrying its own `label.scss` (typography + colour\n * + cursor) via Emulated encapsulation, replacing the ADR 038 slice branch.\n *\n * `<label>` is content-bearing (its text is the label), so the template MUST be\n * `<ng-content>` — `template: ''` would discard the label text. See ADR 040 §2.\n *\n * Auto-links to its sibling control via `[htmlFor]` sourced from\n * `SkraFieldContext.fieldId()` — zero manual ID passing (ADR 013). The label's\n * error-state colour is driven by `<skra-field>[data-skra-validation=\"invalid\"]`\n * swapping `--skra-comp-field-label-color` through CSS variable inheritance; this\n * SCSS is what consumes that variable (the swap was a no-op before the binding\n * moved here from the slice).\n */\n@Component({\n selector: 'label[skraLabelFor]',\n standalone: true,\n // Content-bearing host — see ADR 040 §2.\n template: '<ng-content></ng-content>',\n styleUrl: './label.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // The magic: auto-linking label to input via shared Context ID. Bound as an\n // ATTRIBUTE, not the `htmlFor` property — with no field context the property\n // form would stringify `undefined` into `for=\"undefined\"`.\n '[attr.for]': 'context?.fieldId() ?? null',\n // Referenceable id so a non-labelable control (a `role=\"radiogroup\"` host like\n // <skra-star-rating>, which `for`/`id` can't target) can name itself via\n // `aria-labelledby`. Harmless for labelable controls (they use `for`). ADR 013.\n '[attr.id]': 'context?.labelId() ?? null',\n // Required marker — reflect the field's required state so the SCSS can paint a\n // decorative asterisk (::after). The control already carries `aria-required`,\n // so the marker is purely visual (ADR 021 data-attr reflection; ADR 033 keeps\n // it out of the accessible name via the empty alt-text in `content`).\n '[attr.data-skra-required]': 'context?.isRequired() ? \"\" : null',\n // Class hook retained for any consumer-side targeting (ADR 024 pattern).\n class: 'skra-label',\n },\n})\nexport class SkraLabel {\n // Optional per ADR 013 §3.7 — outside `<skra-field>` the label still carries the\n // skin and the consumer owns association (a wrapping `<label>`, or a hand-written\n // `for`). Mandatory injection would crash the app for a styling-only use.\n readonly context = inject(SkraFieldContext, { optional: true });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { SkraFieldContext } from '../field-context/field-context';\n\n/**\n * Hint component for supplementary field information.\n * Auto-receives ID from SkraFieldContext so aria-describedby on input works automatically.\n */\n@Component({\n selector: 'skra-hint',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './hint.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // Zero-margin reset (ADR 022) lives in hint.component.scss `:host`.\n // ID linked from context — input's aria-describedby points here automatically\n '[attr.id]': 'context?.hintId() ?? null',\n role: 'note',\n },\n})\nexport class SkraHint {\n // Optional per ADR 013 §3.7 — mirrors SkraError. Outside `<skra-field>` it\n // publishes no id and is plain styled helper text the consumer associates itself.\n readonly context = inject(SkraFieldContext, { optional: true });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { SkraFieldContext } from '../field-context/field-context';\n\n/**\n * Error message atom sibling to `<skra-hint>`. Renders validation feedback\n * inside `<skra-field>` with its own a11y semantics: `role=\"alert\"` (which\n * carries an implicit `aria-live=\"assertive\"` + `aria-atomic=\"true\"`), so screen\n * readers announce a validation error promptly. NO explicit `aria-live` — adding\n * `aria-live=\"polite\"` alongside `role=\"alert\"` is contradictory (alert is\n * assertive by definition) and behaves inconsistently across AT. Assertive is\n * the WAI-ARIA APG pattern for validation errors (decision 2026-05-31, Batch 4\n * cleanroom review).\n *\n * Per ADR 037 (agnostic atom co-existence) — does not infer error state from\n * any binding strategy. Consumer renders or omits `<skra-error>` based on\n * their own validation source (Signal Forms `.invalid && .touched`, Reactive\n * Forms `ctrl.errors`, raw computed signal). The atom itself just supplies\n * a11y wiring + visual treatment.\n *\n * <skra-field [hasError]=\"emailHasError()\">\n * <label skraLabelFor>Email</label>\n * <input skraInput type=\"email\" />\n * <skra-hint>We'll never share your email.</skra-hint>\n * @if (emailHasError()) {\n * <skra-error>Please enter a valid email address.</skra-error>\n * }\n * </skra-field>\n *\n * Separate from `<skra-hint>` per SRP: hint is static helper text\n * (role=\"note\", neutral colour); error is dynamic validation feedback\n * (role=\"alert\", live region, error colour). One element per visual\n * responsibility — the rejected alternative (\"hint that swaps text on error\")\n * loaded two responsibilities into a single primitive.\n */\n@Component({\n selector: 'skra-error',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './error.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // Zero-margin reset (ADR 022) lives in error.component.scss `:host`.\n // ID linked from context — input's aria-describedby points here automatically\n '[attr.id]': 'context?.errorId() ?? null',\n // role=\"alert\" implies aria-live=\"assertive\" + aria-atomic=\"true\" — do NOT\n // add an explicit aria-live (contradicts the implicit assertive). Errors are\n // announced promptly per WAI-ARIA APG.\n role: 'alert',\n },\n})\nexport class SkraError {\n // Optional per ADR 013 §3.7. A GROUP-level error is a first-class pattern:\n // `<skra-error>` sits as a direct child of `<fieldset skraFieldset>`, outside any\n // `<skra-field>`, to carry one message for a radio/checkbox group (see the\n // Fieldset `WithGroupError` story). It then publishes no id — nothing points at\n // it via `aria-describedby`, and `role=\"alert\"` announces it on its own.\n readonly context = inject(SkraFieldContext, { optional: true });\n}\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n booleanAttribute,\r\n input,\r\n} from '@angular/core';\r\n\r\n/**\r\n * Forge marker on a native `<fieldset>` used to group related form controls\r\n * (checkbox group, radio group, or any related field cluster). Per ADR 039,\r\n * Forge ships no `<skra-radio-group>` / `<skra-checkbox-group>` component\r\n * wrappers — native `<fieldset>` + `<legend>` IS the WCAG-canonical group\r\n * idiom, and Forge stops reinventing it.\r\n *\r\n * Per ADR 040 this is a Component-on-the-native-host carrying its own\r\n * `fieldset.scss` (chrome reset + group layout) via Emulated encapsulation,\r\n * replacing the ADR 038 slice branch. `<fieldset>` is content-bearing (it holds\r\n * the grouped controls), so the template MUST be `<ng-content>` — `template: ''`\r\n * would discard the entire group. See ADR 040 §2.\r\n *\r\n * The `[disabled]` input cascades to the native `disabled` attribute, and\r\n * native `<fieldset disabled>` already disables every form control inside\r\n * (browser-native behaviour). Forge does not iterate children manually.\r\n *\r\n * Selector is opt-in (`fieldset[skraFieldset]`) so the chrome-reset rules do\r\n * not leak onto bare `<fieldset>` elements outside Forge.\r\n *\r\n * <fieldset skraFieldset [disabled]=\"form.disabled()\">\r\n * <legend skraLegend>Send notifications via</legend>\r\n * <!-- skra-field children with checkboxes -->\r\n * <skra-error *ngIf=\"form.channels().length === 0\">Choose at least one</skra-error>\r\n * </fieldset>\r\n *\r\n * `role=\"group\"` is the explicit ARIA role: while the browser default for\r\n * `<fieldset>` is already group semantics for most AT, declaring it explicitly\r\n * is friendlier to assistive tech that may have idiosyncratic handling.\r\n *\r\n * Native `disabled` is sufficient — `aria-disabled` is NOT set per\r\n * native-attr-first doctrine (memory `feedback_native_attr_first.md`). The\r\n * `data-skra-disabled` reflection drives the visual dimming in `fieldset.scss`.\r\n */\r\n@Component({\r\n selector: 'fieldset[skraFieldset]',\r\n standalone: true,\r\n // Content-bearing host — see ADR 040 §2.\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './fieldset.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n role: 'group',\r\n '[attr.disabled]': 'disabled() ? \"\" : null',\r\n '[attr.data-skra-disabled]': 'disabled() ? \"\" : null',\r\n },\r\n})\r\nexport class SkraFieldset {\r\n readonly disabled = input(false, { transform: booleanAttribute });\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n} from '@angular/core';\r\n\r\n/**\r\n * `legend[skraLegend]` — visible group label for `<fieldset skraFieldset>`.\r\n * Per ADR 040 this is a Component-on-the-native-host carrying its own\r\n * `legend.scss` (chrome reset + typography role binding per ADR 036) via Emulated\r\n * encapsulation, replacing the ADR 038 slice branch.\r\n *\r\n * `<legend>` is content-bearing (its text is the group label), so the template\r\n * MUST be `<ng-content>` — `template: ''` would discard the label. See ADR 040 §2.\r\n * No host bindings, no inputs, no DI — purely a styled marker.\r\n *\r\n * <fieldset skraFieldset>\r\n * <legend skraLegend>Account preferences</legend>\r\n * ...\r\n * </fieldset>\r\n *\r\n * HTML requires `<legend>` to be the FIRST child of `<fieldset>` for native\r\n * group-label semantics. The browser HTML parser auto-corrects misplaced\r\n * legends (re-parents to fieldset), but Forge documents the canonical form.\r\n */\r\n@Component({\r\n selector: 'legend[skraLegend]',\r\n standalone: true,\r\n // Content-bearing host — see ADR 040 §2.\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './legend.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class SkraLegend {}\r\n","// Public API for @skra/ui/field — the field-family (ADR 013 contextual a11y).\r\nexport * from './lib/id-generator/id-generator.service';\r\nexport * from './lib/field-context/field-context';\r\nexport * from './lib/field/field.component';\r\nexport * from './lib/label/label';\r\nexport * from './lib/hint/hint.component';\r\nexport * from './lib/error/error.component';\r\nexport * from './lib/fieldset/fieldset';\r\nexport * from './lib/fieldset/legend';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAEA;;;AAGG;MAEU,kBAAkB,CAAA;IACrB,OAAO,GAAG,CAAC;IAEnB,MAAM,CAAC,MAAM,GAAG,IAAI,EAAA;QAClB,OAAO,CAAA,EAAG,MAAM,CAAA,CAAA,EAAI,EAAE,IAAI,CAAC,OAAO,EAAE;IACtC;uGALW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBA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"
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@angular/core": ">=22.0.0 <23.0.0",
|
|
11
11
|
"@angular/common": ">=22.0.0 <23.0.0",
|
|
12
12
|
"@angular/cdk": ">=22.0.0 <23.0.0",
|
|
13
|
-
"@skra/tokens": "^0.3.
|
|
13
|
+
"@skra/tokens": "^0.3.1"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@floating-ui/dom": "^1.7.6",
|
|
@@ -172,4 +172,4 @@
|
|
|
172
172
|
}
|
|
173
173
|
},
|
|
174
174
|
"type": "module"
|
|
175
|
-
}
|
|
175
|
+
}
|
package/types/skra-ui-field.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ declare class SkraField implements OnInit {
|
|
|
61
61
|
* moved here from the slice).
|
|
62
62
|
*/
|
|
63
63
|
declare class SkraLabel {
|
|
64
|
-
readonly context: SkraFieldContext;
|
|
64
|
+
readonly context: SkraFieldContext | null;
|
|
65
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkraLabel, never>;
|
|
66
66
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkraLabel, "label[skraLabelFor]", never, {}, {}, never, ["*"], true, never>;
|
|
67
67
|
}
|
|
@@ -71,7 +71,7 @@ declare class SkraLabel {
|
|
|
71
71
|
* Auto-receives ID from SkraFieldContext so aria-describedby on input works automatically.
|
|
72
72
|
*/
|
|
73
73
|
declare class SkraHint {
|
|
74
|
-
readonly context: SkraFieldContext;
|
|
74
|
+
readonly context: SkraFieldContext | null;
|
|
75
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkraHint, never>;
|
|
76
76
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkraHint, "skra-hint", never, {}, {}, never, ["*"], true, never>;
|
|
77
77
|
}
|
|
@@ -108,7 +108,7 @@ declare class SkraHint {
|
|
|
108
108
|
* loaded two responsibilities into a single primitive.
|
|
109
109
|
*/
|
|
110
110
|
declare class SkraError {
|
|
111
|
-
readonly context: SkraFieldContext;
|
|
111
|
+
readonly context: SkraFieldContext | null;
|
|
112
112
|
static ɵfac: i0.ɵɵFactoryDeclaration<SkraError, never>;
|
|
113
113
|
static ɵcmp: i0.ɵɵComponentDeclaration<SkraError, "skra-error", never, {}, {}, never, ["*"], true, never>;
|
|
114
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skra-ui-field.d.ts","sources":["../../../../libs/ui/field/src/lib/id-generator/id-generator.service.ts","../../../../libs/ui/field/src/lib/field-context/field-context.ts","../../../../libs/ui/field/src/lib/field/field.component.ts","../../../../libs/ui/field/src/lib/label/label.ts","../../../../libs/ui/field/src/lib/hint/hint.component.ts","../../../../libs/ui/field/src/lib/error/error.component.ts","../../../../libs/ui/field/src/lib/fieldset/fieldset.ts","../../../../libs/ui/field/src/lib/fieldset/legend.ts"],"mappings":";;;AAEA;;;AAGG;AACH,cACa,kBAAkB;;AAG7B;yCAHW,kBAAkB;6CAAlB,kBAAkB;AAM9B;;ACXD;;;;AAIG;AACH,cACa,gBAAgB;sBACXA,EAAA,CAAA,cAAA;uBACCA,EAAA,CAAA,cAAA;yBACEA,EAAA,CAAA,cAAA;yBACAA,EAAA,CAAA,cAAA;yBACAA,EAAA,CAAA,cAAA;qBAGJA,EAAA,CAAA,MAAA;sBACCA,EAAA,CAAA,MAAA;sBAQAA,EAAA,CAAA,MAAA;6BAOOA,EAAA,CAAA,MAAA;yCAxBZ,gBAAgB;6CAAhB,gBAAgB;AA2B5B;;ACtBD,cA0Ba,SAAU,YAAW,MAAM;AACtC;sBACgB,gBAAA;sBAEAA,EAAA,CAAA,WAAA;uBACCA,EAAA,CAAA,wBAAA;uBACAA,EAAA,CAAA,wBAAA;uBACAA,EAAA,CAAA,wBAAA;uBACAA,EAAA,CAAA,wBAAA;;AAkBjB;yCA1BW,SAAS;2CAAT,SAAS;AA6BrB;;AC5DD;;;;;;;;;;;;;;AAcG;AACH,
|
|
1
|
+
{"version":3,"file":"skra-ui-field.d.ts","sources":["../../../../libs/ui/field/src/lib/id-generator/id-generator.service.ts","../../../../libs/ui/field/src/lib/field-context/field-context.ts","../../../../libs/ui/field/src/lib/field/field.component.ts","../../../../libs/ui/field/src/lib/label/label.ts","../../../../libs/ui/field/src/lib/hint/hint.component.ts","../../../../libs/ui/field/src/lib/error/error.component.ts","../../../../libs/ui/field/src/lib/fieldset/fieldset.ts","../../../../libs/ui/field/src/lib/fieldset/legend.ts"],"mappings":";;;AAEA;;;AAGG;AACH,cACa,kBAAkB;;AAG7B;yCAHW,kBAAkB;6CAAlB,kBAAkB;AAM9B;;ACXD;;;;AAIG;AACH,cACa,gBAAgB;sBACXA,EAAA,CAAA,cAAA;uBACCA,EAAA,CAAA,cAAA;yBACEA,EAAA,CAAA,cAAA;yBACAA,EAAA,CAAA,cAAA;yBACAA,EAAA,CAAA,cAAA;qBAGJA,EAAA,CAAA,MAAA;sBACCA,EAAA,CAAA,MAAA;sBAQAA,EAAA,CAAA,MAAA;6BAOOA,EAAA,CAAA,MAAA;yCAxBZ,gBAAgB;6CAAhB,gBAAgB;AA2B5B;;ACtBD,cA0Ba,SAAU,YAAW,MAAM;AACtC;sBACgB,gBAAA;sBAEAA,EAAA,CAAA,WAAA;uBACCA,EAAA,CAAA,wBAAA;uBACAA,EAAA,CAAA,wBAAA;uBACAA,EAAA,CAAA,wBAAA;uBACAA,EAAA,CAAA,wBAAA;;AAkBjB;yCA1BW,SAAS;2CAAT,SAAS;AA6BrB;;AC5DD;;;;;;;;;;;;;;AAcG;AACH,cA0Ba,SAAS;sBAIJ,gBAAA;yCAJL,SAAS;2CAAT,SAAS;AAKrB;;AC9CD;;;AAGG;AACH,cAca,QAAQ;sBAGH,gBAAA;yCAHL,QAAQ;2CAAR,QAAQ;AAIpB;;ACtBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BG;AACH,cAiBa,SAAS;sBAMJ,gBAAA;yCANL,SAAS;2CAAT,SAAS;AAOrB;;ACvDD;;;;;;;;;;;;;;;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