@skra/ui 0.7.0 → 0.9.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.
- package/consumer-guide/README.md +92 -90
- package/consumer-guide/file-upload.md +210 -0
- package/consumer-guide/layout.md +116 -38
- package/consumer-guide/setup-and-gotchas.md +37 -36
- package/fesm2022/skra-ui-file-upload.mjs +894 -0
- package/fesm2022/skra-ui-file-upload.mjs.map +1 -0
- package/fesm2022/skra-ui-layout.mjs +74 -8
- package/fesm2022/skra-ui-layout.mjs.map +1 -1
- package/fesm2022/skra-ui-link.mjs +62 -2
- package/fesm2022/skra-ui-link.mjs.map +1 -1
- package/package.json +6 -2
- package/types/skra-ui-file-upload.d.ts +360 -0
- package/types/skra-ui-file-upload.d.ts.map +1 -0
- package/types/skra-ui-layout.d.ts +31 -2
- package/types/skra-ui-layout.d.ts.map +1 -1
- package/types/skra-ui-link.d.ts +28 -1
- package/types/skra-ui-link.d.ts.map +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skra-ui-file-upload.mjs","sources":["../../../../libs/ui/file-upload/src/lib/file-upload.directives.ts","../../../../libs/ui/file-upload/src/lib/file-helpers/file-helpers.ts","../../../../libs/ui/file-upload/src/lib/file-helpers/file-partition.ts","../../../../libs/ui/file-upload/src/lib/file-upload/file-upload-context.ts","../../../../libs/ui/file-upload/src/lib/file-input/file-input.ts","../../../../libs/ui/file-upload/src/lib/file-upload/file-drop-guard.ts","../../../../libs/ui/file-upload/src/lib/file-upload/file-upload.ts","../../../../libs/ui/file-upload/src/lib/file-upload/file-upload.html","../../../../libs/ui/file-upload/src/lib/file-helpers/file-name.ts","../../../../libs/ui/file-upload/src/lib/file-item/file-item.ts","../../../../libs/ui/file-upload/src/lib/file-item/file-item.html","../../../../libs/ui/file-upload/src/index.ts","../../../../libs/ui/file-upload/src/skra-ui-file-upload.ts"],"sourcesContent":["import { Directive } from '@angular/core';\r\n\r\n// Slot markers of the FileUpload family (ADR 020 Smart Slots v2.0). Each is detected\r\n// through a Signal Query so the owning component renders a slot's wrapper only when the\r\n// slot is filled — never an empty node. Entry-local (the Button / Accordion precedent)\r\n// to avoid a cross-entry marker dependency. Import the markers you use alongside the\r\n// component: projection works on the attribute alone, but slot DETECTION needs the class.\r\n\r\n// ─── <skra-file-upload> ──────────────────────────────────────────────────────\r\n\r\n/** Leading icon of `<skra-file-upload>`'s face. Decorative — the consumer marks it `aria-hidden`. */\r\n@Directive({\r\n selector: '[skra-start]',\r\n standalone: true,\r\n})\r\nexport class SkraFileUploadStart {}\r\n\r\n/**\r\n * REQUIRED. The visible action text of `<skra-file-upload>` (\"Choose a video\"). It joins the\r\n * native control's accessible name through `aria-labelledby` (ADR 0056 D4, WCAG 2.5.3), so a\r\n * voice-control user can say what they see.\r\n */\r\n@Directive({\r\n selector: '[skra-file-upload-action]',\r\n standalone: true,\r\n})\r\nexport class SkraFileUploadAction {}\r\n\r\n/**\r\n * The drop instruction (\"or drag it here\"). Its presence switches the face from the compact\r\n * row to the drop-zone layout — an instruction is what invites dragging. Hidden on devices\r\n * with no fine pointer, where \"drag\" means nothing.\r\n */\r\n@Directive({\r\n selector: '[skra-file-upload-instruction]',\r\n standalone: true,\r\n})\r\nexport class SkraFileUploadInstruction {}\r\n\r\n/**\r\n * The selection summary in the page's language (\"recording.mp4, 2.3 GB\"). Rendered inside the\r\n * composite's always-present `role=\"status\"` region and linked to the control as a description,\r\n * so a change is announced and the user agent's browser-language status is not the only one.\r\n */\r\n@Directive({\r\n selector: '[skra-file-upload-status]',\r\n standalone: true,\r\n})\r\nexport class SkraFileUploadStatus {}\r\n\r\n// ─── li[skraFileItem] ────────────────────────────────────────────────────────\r\n\r\n/** Leading visual of a file row — an icon or a consumer-made thumbnail (`URL.createObjectURL`). */\r\n@Directive({\r\n selector: '[skra-start]',\r\n standalone: true,\r\n})\r\nexport class SkraFileItemStart {}\r\n\r\n/** Row detail under the name — typically `progress[skraProgress]` or a status line. */\r\n@Directive({\r\n selector: '[skra-file-item-detail]',\r\n standalone: true,\r\n})\r\nexport class SkraFileItemDetail {}\r\n\r\n/**\r\n * The row's error text. Its presence is what paints the row invalid\r\n * (`data-skra-validation=\"invalid\"`), so the colour never appears without the words\r\n * (WCAG 1.4.1 by construction).\r\n */\r\n@Directive({\r\n selector: '[skra-file-item-error]',\r\n standalone: true,\r\n})\r\nexport class SkraFileItemError {}\r\n\r\n/** Trailing row actions — the consumer's `button[skraButton]`s (cancel / retry / remove). */\r\n@Directive({\r\n selector: '[skra-end]',\r\n standalone: true,\r\n})\r\nexport class SkraFileItemEnd {}\r\n","// The two \"How\" helpers of the FileUpload family — pure, framework-free and SSR-safe (no\r\n// DOM access; `File` is used as a type and read through `name` / `type` only). Every\r\n// consumer otherwise reimplements them, and each has a subtle edge that is easy to get\r\n// wrong: 1000 vs 1024, a rounded value that crosses a unit boundary, the HTML `accept`\r\n// grammar, and files the platform reports with no MIME type at all.\r\n\r\n/** SI units, 1 kB = 1000 B — the `Intl` unit identifiers, and what macOS / iOS show. */\r\nconst UNITS = [\r\n 'byte',\r\n 'kilobyte',\r\n 'megabyte',\r\n 'gigabyte',\r\n 'terabyte',\r\n 'petabyte',\r\n] as const;\r\n\r\n/**\r\n * Format a byte count for display in `locale` (`undefined` → the host default, the ADR 0050\r\n * §5 precedent): `2,3 GB` in `pl`, `2.3 GB` in `en`, one fractional digit at most.\r\n *\r\n * SI units (1 kB = 1000 B) because `Intl` names only those and macOS / iOS report sizes the\r\n * same way. The unit label is `Intl`'s own short form, so it is translated and pluralised by\r\n * the platform's locale data, never by Skra (e.g. `999 byte` in English, `999 B` in Polish —\r\n * CLDR's choice, not ours). A multi-GB `File.size` is a safe integer; nothing here rounds\r\n * the input.\r\n *\r\n * @throws RangeError for a negative or non-finite count — a size that cannot exist is a bug\r\n * in the caller, and printing `NaN byte` would hide it.\r\n */\r\nexport function skraFormatFileSize(bytes: number, locale?: string): string {\r\n if (!Number.isFinite(bytes) || bytes < 0) {\r\n throw new RangeError(\r\n `skraFormatFileSize: expected a finite, non-negative byte count, got ${bytes}.`,\r\n );\r\n }\r\n let index = 0;\r\n while (index < UNITS.length - 1 && bytes >= 1000 ** (index + 1)) index += 1;\r\n // A value that ROUNDS up to 1000 of its unit reads as the next unit: 999 950 B is\r\n // \"1 MB\", not \"1,000 kB\".\r\n if (\r\n index < UNITS.length - 1 &&\r\n Math.round((bytes / 1000 ** index) * 10) / 10 >= 1000\r\n ) {\r\n index += 1;\r\n }\r\n return new Intl.NumberFormat(locale, {\r\n style: 'unit',\r\n unit: UNITS[index],\r\n unitDisplay: 'short',\r\n maximumFractionDigits: 1,\r\n }).format(bytes / 1000 ** index);\r\n}\r\n\r\n/** One parsed `accept` token. Tokens the HTML grammar does not recognise are dropped. */\r\ntype AcceptToken =\r\n | { kind: 'extension'; value: string }\r\n | { kind: 'mime'; value: string }\r\n | { kind: 'wildcard'; value: string };\r\n\r\nfunction parseAccept(accept: string): AcceptToken[] {\r\n const tokens: AcceptToken[] = [];\r\n for (const raw of accept.split(',')) {\r\n const token = raw.trim().toLowerCase();\r\n if (token.length > 1 && token.startsWith('.')) {\r\n tokens.push({ kind: 'extension', value: token });\r\n continue;\r\n }\r\n // `type/subtype` or `type/*`; parameters (`;charset=…`) never take part in a match.\r\n const mime = token.split(';')[0].trim();\r\n const slash = mime.indexOf('/');\r\n if (slash <= 0 || slash === mime.length - 1) continue;\r\n const subtype = mime.slice(slash + 1);\r\n if (subtype === '*') {\r\n tokens.push({ kind: 'wildcard', value: mime.slice(0, slash + 1) });\r\n } else {\r\n tokens.push({ kind: 'mime', value: mime });\r\n }\r\n }\r\n return tokens;\r\n}\r\n\r\n/**\r\n * Does `file` satisfy `accept`, under the HTML attribute's own semantics?\r\n *\r\n * - `.ext` — a case-insensitive suffix of the file NAME;\r\n * - `type/subtype` — the file's MIME type, case-insensitive, parameters ignored;\r\n * - `type/*` — any subtype of `type`.\r\n *\r\n * An empty `accept`, or one with no token the grammar recognises, accepts everything — the\r\n * picker applies no filter in that case either.\r\n *\r\n * **Typeless files** (`File.type === ''` — common for `.mkv` / `.heic` on some engines) are\r\n * matched by extension tokens only, and PASS when `accept` has no extension token (spec Q-5).\r\n * A false rejection of a legitimate 4 GB recording costs more than a junk file the consumer\r\n * and the server reject anyway.\r\n *\r\n * `accept` is never a guarantee: every platform lets a user bypass it. Validate on the server.\r\n */\r\nexport function skraFileMatchesAccept(\r\n file: Pick<File, 'name' | 'type'>,\r\n accept: string,\r\n): boolean {\r\n const tokens = parseAccept(accept);\r\n if (!tokens.length) return true;\r\n\r\n const name = file.name.toLowerCase();\r\n const type = file.type.trim().toLowerCase().split(';')[0].trim();\r\n const extensions = tokens.filter((t) => t.kind === 'extension');\r\n\r\n if (extensions.some((t) => name.endsWith(t.value))) return true;\r\n if (!type) return extensions.length === 0;\r\n\r\n return tokens.some(\r\n (t) =>\r\n (t.kind === 'mime' && t.value === type) ||\r\n (t.kind === 'wildcard' && type.startsWith(t.value)),\r\n );\r\n}\r\n","import { skraFileMatchesAccept } from './file-helpers';\r\n\r\n/** Why the normalisation turned a file down. Every reason is a rule the PLATFORM's picker enforces. */\r\nexport type SkraFileRejectionReason = 'type' | 'count' | 'directory';\r\n\r\n/** A file the normalisation rejected, and why. */\r\nexport interface SkraFileRejection {\r\n readonly file: File;\r\n readonly reason: SkraFileRejectionReason;\r\n}\r\n\r\n/** One selected item. `isDirectory` can only be true on the drop path. */\r\nexport interface SkraFileCandidate {\r\n readonly file: File;\r\n readonly isDirectory: boolean;\r\n}\r\n\r\n/** The native constraints Skra reads from the host — never mirrored as inputs. */\r\nexport interface SkraFileConstraints {\r\n readonly accept: string;\r\n readonly multiple: boolean;\r\n}\r\n\r\nexport interface SkraFilePartition {\r\n readonly accepted: File[];\r\n readonly rejected: SkraFileRejection[];\r\n}\r\n\r\n/**\r\n * Internal — NOT part of the public barrel. Partition one selection into accepted and\r\n * rejected files, enforcing exactly what the platform's own picker enforces and nothing more\r\n * (size, file count caps and duplicates are product policy — the consumer's, in `filesChange`).\r\n *\r\n * Precedence, one reason per file:\r\n * 1. `directory` — a dropped folder is never a file;\r\n * 2. `count` — more than one file on a control without `multiple` rejects ALL of them: a\r\n * single-file control never silently keeps one of N (spec Q-6);\r\n * 3. `type` — the file does not satisfy `accept` (`skraFileMatchesAccept`, typeless → Q-5).\r\n *\r\n * Order is preserved within both lists.\r\n */\r\nexport function partitionFiles(\r\n candidates: readonly SkraFileCandidate[],\r\n constraints: SkraFileConstraints,\r\n): SkraFilePartition {\r\n const accepted: File[] = [];\r\n const rejected: SkraFileRejection[] = [];\r\n const tooMany =\r\n !constraints.multiple &&\r\n candidates.filter((c) => !c.isDirectory).length > 1;\r\n\r\n for (const { file, isDirectory } of candidates) {\r\n if (isDirectory) rejected.push({ file, reason: 'directory' });\r\n else if (tooMany) rejected.push({ file, reason: 'count' });\r\n else if (skraFileMatchesAccept(file, constraints.accept))\r\n accepted.push(file);\r\n else rejected.push({ file, reason: 'type' });\r\n }\r\n return { accepted, rejected };\r\n}\r\n","import { Injectable, inject } from '@angular/core';\r\nimport { IdGeneratorService } from '@skra/ui/field';\r\n\r\n/**\r\n * Internal — provided by `<skra-file-upload>` per instance, injected `{ optional: true }` by\r\n * the projected `input[skraFileInput]` (ADR 013 §3.6 contextual wiring). Carries ids only —\r\n * never a value, never state (ADR 037; the composite owns no state, ADR 027 §3.8).\r\n *\r\n * Its PRESENCE is what puts the input into overlay mode (`data-skra-in-upload`, ADR 027\r\n * §3.9b): Emulated encapsulation lets no parent style projected content, and DI keeps the\r\n * rule in the atom's own stylesheet instead of a global slice (no O-8 bridge cost).\r\n */\r\n@Injectable()\r\nexport class SkraFileUploadContext {\r\n private readonly base = inject(IdGeneratorService).nextId('skra-file-upload');\r\n\r\n /** The face's visible action text — the second half of the control's name (ADR 0056 D4). */\r\n readonly actionId = `${this.base}-action`;\r\n\r\n /** The always-present status region — a description of the control, never its name. */\r\n readonly statusId = `${this.base}-status`;\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n ViewEncapsulation,\r\n afterNextRender,\r\n computed,\r\n effect,\r\n inject,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { SkraFieldContext } from '@skra/ui/field';\r\nimport {\r\n partitionFiles,\r\n type SkraFileCandidate,\r\n type SkraFileRejection,\r\n} from '../file-helpers/file-partition';\r\nimport { SkraFileUploadContext } from '../file-upload/file-upload-context';\r\n\r\nexport type {\r\n SkraFileRejection,\r\n SkraFileRejectionReason,\r\n} from '../file-helpers/file-partition';\r\n\r\ndeclare const ngDevMode: boolean | undefined;\r\n\r\n/** True when a drag carries files from the OS — not text, not a link, not an in-page node. */\r\nfunction carriesFiles(event: DragEvent): boolean {\r\n const types = event.dataTransfer?.types;\r\n return !!types && Array.from(types).includes('Files');\r\n}\r\n\r\n/**\r\n * `input[type=\"file\"][skraFileInput]` — the native file control (spec\r\n * `component-file-upload-spec.md`; ADR 0056 Group B). A Component-on-a-native-host\r\n * (ADR 040): `<input>` is void, so `template: ''`, and `file-input.scss` is scoped to the\r\n * host by Emulated encapsulation — the box from `comp.field.*`, the user agent's\r\n * `::file-selector-button` painted from `comp.field.file.*` (ADR 0056 B1–B5).\r\n *\r\n * **No inputs.** Every constraint is a NATIVE attribute on the consumer's own host —\r\n * `accept`, `multiple`, `capture`, `required`, `disabled`, `name`, `webkitdirectory`\r\n * (native-attr-first, Iron Boundary #9). Skra reads them at the moment of a selection; it\r\n * never mirrors them.\r\n *\r\n * **Agnostic value (ADR 037).** The selection is REPORTED, never held: `filesChange` carries\r\n * the normalised files, `filesRejected` what the normalisation turned down. Native\r\n * `(change)` keeps working and reports the RAW selection; `filesChange` is the normalised one.\r\n *\r\n * **Normalisation** — Skra enforces exactly what the platform's own picker enforces, on\r\n * every path, and nothing more (size / count caps / duplicates are product policy):\r\n *\r\n * | Rule | Picker (`change`) | Drop (`drop` on the host) |\r\n * | --- | --- | --- |\r\n * | `accept` mismatch → `type` | possible (Windows \"All files\", Android) | the browser applies no `accept` to drops |\r\n * | >1 file without `multiple` → `count` | impossible | possible — ALL rejected |\r\n * | a directory → `directory` | impossible | possible |\r\n * | assignment | `input.files` left as the platform set it | `input.files` = the ACCEPTED files, then `input` + `change` are dispatched |\r\n *\r\n * A drop where nothing is accepted leaves the existing selection untouched and emits only\r\n * `filesRejected` — like a cancelled picker, it is not a change.\r\n *\r\n * **Field wiring (ADR 013 §3.7)** — the `skraInput` wiring verbatim: optional\r\n * `SkraFieldContext`; `id` / `disabled` written from guarded `effect()`s so a standalone\r\n * consumer's own attributes survive; `aria-describedby` / `aria-invalid` / `aria-required`\r\n * host bindings. Readonly: the native `readonly` attribute does not apply to `type=\"file\"`\r\n * (HTML) and `aria-readonly` is not exposed for its `button` role (G-4, measured), so it is\r\n * `aria-disabled=\"true\"` — the focusable soft-disable — plus a behaviour guard that blocks the\r\n * picker (`click`, keys other than `Tab`) and drops.\r\n *\r\n * **Known limitation (G-4, measured in Chromium):** \"required\" cannot reach assistive\r\n * technology on this control — neither `aria-required` (kept: harmless, and the field's\r\n * contract) nor native `required` is exposed for the `button` role. Say \"required\" in visible\r\n * text (the label or the hint) as well.\r\n *\r\n * **Inside `<skra-file-upload>`** (ADR 0056 Group D) the composite's context is injected:\r\n * the host reflects `data-skra-in-upload` (ADR 027 §3.9b) and its own stylesheet makes it a\r\n * transparent overlay over the painted face (`opacity: 0` only — D2); its name becomes\r\n * \"field label + visible action text\" via `aria-labelledby` (D4, WCAG 2.5.3) and the\r\n * composite's status region joins its description.\r\n *\r\n * <skra-field>\r\n * <label skraLabelFor>Session recording</label>\r\n * <input skraFileInput type=\"file\" accept=\"video/*\" #picker (filesChange)=\"onFiles($event)\" />\r\n * </skra-field>\r\n */\r\n@Component({\r\n selector: 'input[type=\"file\"][skraFileInput]',\r\n standalone: true,\r\n // Void host — no <ng-content>. See ADR 040 §2.\r\n template: '',\r\n styleUrl: './file-input.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n // ARIA relationships — Skra-owned, present only while a field / the composite cascades them.\r\n '[attr.aria-describedby]': 'describedBy()',\r\n '[attr.aria-labelledby]': 'labelledBy()',\r\n '[attr.aria-invalid]': 'context?.hasError() ? \"true\" : null',\r\n '[attr.aria-required]': 'context?.isRequired() ? \"true\" : null',\r\n // Readonly → `aria-disabled` (spec Q-4's fallback, taken 2026-10-31 on the G-4\r\n // measurement): native `readonly` does not apply to type=\"file\", and `aria-readonly` is\r\n // not exposed for the role a file input has (`button`) — a screen reader heard nothing.\r\n // `aria-disabled` alone is the sanctioned soft-disable (boundary #9 exception): the\r\n // control stays focusable, AT hears \"unavailable\", the guard below makes it true. Never\r\n // alongside native `disabled`, which already says it.\r\n '[attr.aria-disabled]': 'softDisabled() ? \"true\" : null',\r\n // ADR 027 §3.9a — a Pointer state with no pseudo-class (`:drop()` never shipped).\r\n '[attr.data-skra-dragover]': 'dragOver() ? \"\" : null',\r\n // ADR 027 §3.9b — structural placement marker, static for the instance's lifetime.\r\n '[attr.data-skra-in-upload]': 'inUpload ? \"\" : null',\r\n '(change)': 'onChange()',\r\n '(click)': 'blockWhenReadonly($event)',\r\n '(keydown)': 'blockKeyWhenReadonly($event)',\r\n '(dragenter)': 'onDragEnter($event)',\r\n '(dragover)': 'onDragOver($event)',\r\n '(dragleave)': 'onDragLeave()',\r\n '(drop)': 'onDrop($event)',\r\n '(dragend)': 'resetDrag()',\r\n },\r\n})\r\nexport class SkraFileInput {\r\n private readonly el = inject<ElementRef<HTMLInputElement>>(ElementRef);\r\n readonly context = inject(SkraFieldContext, { optional: true });\r\n private readonly upload = inject(SkraFileUploadContext, { optional: true });\r\n\r\n /** User picked or dropped files. Fires on user interaction only, after normalisation. */\r\n readonly filesChange = output<readonly File[]>();\r\n\r\n /** Files the normalisation rejected. Fires only when at least one was rejected. */\r\n readonly filesRejected = output<readonly SkraFileRejection[]>();\r\n\r\n protected readonly inUpload = this.upload !== null;\r\n protected readonly dragOver = signal(false);\r\n\r\n // dragenter / dragleave also fire when the pointer crosses into the user agent's own\r\n // button inside the control (retargeted to the host), and Safari reports a null\r\n // `relatedTarget` on every dragleave — so a depth counter, not relatedTarget, decides\r\n // when the drag has really left (spec G-5).\r\n private dragDepth = 0;\r\n\r\n protected readonly softDisabled = computed(\r\n () => !!this.context?.isReadonly() && !this.context.isDisabled(),\r\n );\r\n\r\n protected readonly describedBy = computed(() => {\r\n const ids = [this.context?.describedByIds(), this.upload?.statusId].filter(\r\n Boolean,\r\n );\r\n return ids.length ? ids.join(' ') : null;\r\n });\r\n\r\n // ADR 0056 D4 — field label first, the face's action text second; the action alone when\r\n // there is no field. Outside the composite the name is the consumer's `<label>` (Path 1).\r\n protected readonly labelledBy = computed(() => {\r\n if (!this.upload) return null;\r\n return [this.context?.labelId(), this.upload.actionId]\r\n .filter(Boolean)\r\n .join(' ');\r\n });\r\n\r\n constructor() {\r\n const el = this.el.nativeElement;\r\n\r\n // Field-cascaded native properties — only bound when a field is present, so a\r\n // standalone consumer keeps full control of its own `id` / `disabled` (ADR 013 §3.7).\r\n if (this.context) {\r\n const ctx = this.context;\r\n effect(() => {\r\n el.id = ctx.fieldId();\r\n });\r\n effect(() => {\r\n el.disabled = ctx.isDisabled();\r\n });\r\n }\r\n\r\n // Dev-only: inside the composite, `aria-labelledby` names the control and OVERRIDES a\r\n // `<label for>` — so outside <skra-field> a consumer's own label would vanish from the\r\n // name. A read of the rendered control, never a write.\r\n if (\r\n this.upload &&\r\n !this.context &&\r\n (typeof ngDevMode === 'undefined' || ngDevMode)\r\n ) {\r\n afterNextRender(() => {\r\n if (el.labels?.length) {\r\n console.warn(\r\n '[skraFileInput] inside <skra-file-upload> without <skra-field>, the control is named by ' +\r\n 'its visible action alone (aria-labelledby, ADR 0056 D4) — which overrides your ' +\r\n '<label for>. Wrap it in <skra-field> with label[skraLabelFor] to get \"label + action\".',\r\n );\r\n }\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Reset the native selection (`value = ''`) so the same file can be picked again — the\r\n * queue model (`filesChange` → enqueue → `clear()`). Programmatic: emits nothing.\r\n * Reach it through a template reference: `#picker` on the host resolves to this component.\r\n */\r\n clear(): void {\r\n this.el.nativeElement.value = '';\r\n }\r\n\r\n private get blocked(): boolean {\r\n return this.el.nativeElement.disabled || !!this.context?.isReadonly();\r\n }\r\n\r\n /**\r\n * The native constraints, read at selection time. A `webkitdirectory` picker hands over\r\n * EVERY file of the chosen folder whether or not `multiple` is set, so it counts as\r\n * multiple — otherwise each folder pick would be rejected whole as `count`.\r\n */\r\n private constraints() {\r\n const el = this.el.nativeElement;\r\n return { accept: el.accept, multiple: el.multiple || el.webkitdirectory };\r\n }\r\n\r\n /**\r\n * The picker path — and the drop path's own dispatched `change`, already normalised.\r\n *\r\n * Order is part of the contract, the same on both paths: `filesChange` FIRST, then\r\n * `filesRejected`. A consumer that clears its error on a new selection and sets it on a\r\n * rejection then ends on the rejection message, not on a cleared one. A selection where\r\n * EVERY file was rejected emits no `filesChange` at all (like a fully rejected drop): it\r\n * changed nothing the consumer can use. An empty selection with no rejection (a picker\r\n * that reports a cleared selection) still emits `filesChange([])`.\r\n */\r\n protected onChange(): void {\r\n const el = this.el.nativeElement;\r\n const { accepted, rejected } = partitionFiles(\r\n Array.from(el.files ?? [], (file) => ({ file, isDirectory: false })),\r\n this.constraints(),\r\n );\r\n if (accepted.length || !rejected.length) this.filesChange.emit(accepted);\r\n if (rejected.length) this.filesRejected.emit(rejected);\r\n }\r\n\r\n /** Readonly: `preventDefault` on `click` keeps the picker closed, for pointer and keyboard alike. */\r\n protected blockWhenReadonly(event: Event): void {\r\n if (this.context?.isReadonly()) event.preventDefault();\r\n }\r\n\r\n /** Readonly: block keyboard activation; let `Tab` through. */\r\n protected blockKeyWhenReadonly(event: KeyboardEvent): void {\r\n if (this.context?.isReadonly() && event.key !== 'Tab') {\r\n event.preventDefault();\r\n }\r\n }\r\n\r\n protected onDragEnter(event: DragEvent): void {\r\n if (!carriesFiles(event) || this.blocked) return;\r\n event.preventDefault();\r\n this.dragDepth += 1;\r\n this.dragOver.set(true);\r\n }\r\n\r\n protected onDragOver(event: DragEvent): void {\r\n if (!carriesFiles(event)) return;\r\n // Always cancelled for a file drag: on a blocked control that is what stops the user\r\n // agent's own drop handling (which would assign the files); `dropEffect` tells the\r\n // user why nothing will happen.\r\n event.preventDefault();\r\n if (event.dataTransfer) {\r\n event.dataTransfer.dropEffect = this.blocked ? 'none' : 'copy';\r\n }\r\n if (!this.blocked) {\r\n // A dragover with no counted dragenter (the control became enabled mid-drag) still\r\n // owes the leave that clears it.\r\n if (this.dragDepth === 0) this.dragDepth = 1;\r\n this.dragOver.set(true);\r\n }\r\n }\r\n\r\n protected onDragLeave(): void {\r\n if (this.dragDepth === 0) return;\r\n this.dragDepth -= 1;\r\n if (this.dragDepth === 0) this.dragOver.set(false);\r\n }\r\n\r\n protected resetDrag(): void {\r\n this.dragDepth = 0;\r\n this.dragOver.set(false);\r\n }\r\n\r\n /** The drop path — normalise, then assign the ACCEPTED files and replay the native events. */\r\n protected onDrop(event: DragEvent): void {\r\n if (!carriesFiles(event)) return;\r\n event.preventDefault();\r\n this.resetDrag();\r\n if (this.blocked || !event.dataTransfer) return;\r\n\r\n const el = this.el.nativeElement;\r\n const { accepted, rejected } = partitionFiles(\r\n this.candidatesOf(event.dataTransfer),\r\n this.constraints(),\r\n );\r\n\r\n if (accepted.length) {\r\n const transfer = new DataTransfer();\r\n for (const file of accepted) transfer.items.add(file);\r\n el.files = transfer.files;\r\n // The native event stream stays the one source of truth: consumers bound through\r\n // `(change)`, `[formControl]` or `[(ngModel)]` see a drop exactly like a pick, and\r\n // `onChange()` emits `filesChange` once, from the same place for both paths.\r\n el.dispatchEvent(new Event('input', { bubbles: true }));\r\n el.dispatchEvent(new Event('change', { bubbles: true }));\r\n }\r\n // Last, as on the picker path (see onChange).\r\n if (rejected.length) this.filesRejected.emit(rejected);\r\n }\r\n\r\n /**\r\n * Directory detection has to happen INSIDE the `drop` handler: `webkitGetAsEntry()` is the\r\n * only cross-engine signal (a dropped folder arrives as a `File` too), and the item list\r\n * is emptied once the event returns.\r\n */\r\n private candidatesOf(transfer: DataTransfer): SkraFileCandidate[] {\r\n const items = transfer.items\r\n ? Array.from(transfer.items).filter((i) => i.kind === 'file')\r\n : [];\r\n if (!items.length) {\r\n return Array.from(transfer.files, (file) => ({\r\n file,\r\n isDirectory: false,\r\n }));\r\n }\r\n const candidates: SkraFileCandidate[] = [];\r\n for (const item of items) {\r\n const file = item.getAsFile();\r\n if (!file) continue;\r\n const entry =\r\n typeof item.webkitGetAsEntry === 'function'\r\n ? item.webkitGetAsEntry()\r\n : null;\r\n candidates.push({ file, isDirectory: !!entry?.isDirectory });\r\n }\r\n return candidates;\r\n }\r\n}\r\n","import { DOCUMENT, Injectable, inject } from '@angular/core';\r\n\r\n/**\r\n * Internal — NOT part of the public barrel. The page-navigation guard of the FileUpload\r\n * family (spec Q-3, architect-reviewed 2026-10-31: spec-level, not an ADR).\r\n *\r\n * A file dropped a few pixels OUTSIDE a drop zone makes the browser navigate to it — midway\r\n * through a multi-GB upload, that destroys the session. While at least one\r\n * `<skra-file-upload>` is mounted, this cancels `dragover` / `drop` on the document, and only\r\n * for drags that:\r\n * - carry `Files` (text, links and in-page drags are never touched);\r\n * - nothing nearer has already handled (`defaultPrevented` — every drop target, including\r\n * `input[skraFileInput]`, cancels the events it accepts);\r\n * - do not land on a target that accepts files natively: ANY `input[type=\"file\"]` (Skra's or\r\n * not) and editable content keep their own drop behaviour.\r\n *\r\n * It is the library's FIRST document-level listener, so the rules are binding here: scoped\r\n * exactly as above, ref-counted (installed once for any number of instances, removed with the\r\n * last), browser-only (installed from `afterNextRender`, so never under SSR). A second\r\n * component needing one lifts these rules into an ADR. react-dropzone ships the same default\r\n * (`preventDropOnDocument`).\r\n */\r\n@Injectable({ providedIn: 'root' })\r\nexport class SkraFileDropGuard {\r\n private readonly doc = inject(DOCUMENT);\r\n private holders = 0;\r\n\r\n // Cancel ONLY — no `dropEffect` write. Cancelling `dragover` + `drop` is what stops the\r\n // navigation; writing `dropEffect = 'none'` here would also silently kill a consumer's own\r\n // page-wide drop target on `window` (or a later `document` listener) that cancels without\r\n // setting `dropEffect` itself — the browser would never fire its `drop` (review 2026-11-01).\r\n private readonly onDragOver = (event: DragEvent): void => {\r\n if (this.guards(event)) event.preventDefault();\r\n };\r\n\r\n private readonly onDrop = (event: DragEvent): void => {\r\n if (this.guards(event)) event.preventDefault();\r\n };\r\n\r\n /** One mounted composite more. Installs the listeners on the first. */\r\n acquire(): void {\r\n this.holders += 1;\r\n if (this.holders > 1) return;\r\n this.doc.addEventListener('dragover', this.onDragOver);\r\n this.doc.addEventListener('drop', this.onDrop);\r\n }\r\n\r\n /** One mounted composite fewer. Removes the listeners with the last. */\r\n release(): void {\r\n if (this.holders === 0) return;\r\n this.holders -= 1;\r\n if (this.holders > 0) return;\r\n this.doc.removeEventListener('dragover', this.onDragOver);\r\n this.doc.removeEventListener('drop', this.onDrop);\r\n }\r\n\r\n private guards(event: DragEvent): boolean {\r\n if (event.defaultPrevented) return false;\r\n const types = event.dataTransfer?.types;\r\n if (!types || !Array.from(types).includes('Files')) return false;\r\n const target = event.target as\r\n | (Partial<Pick<Element, 'closest'>> & { isContentEditable?: boolean })\r\n | null;\r\n if (target?.closest?.('input[type=\"file\"]')) return false;\r\n if (target?.isContentEditable) return false;\r\n return true;\r\n }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n DestroyRef,\r\n ElementRef,\r\n ViewEncapsulation,\r\n afterNextRender,\r\n computed,\r\n contentChild,\r\n contentChildren,\r\n effect,\r\n inject,\r\n} from '@angular/core';\r\nimport { SkraFileDropGuard } from './file-drop-guard';\r\nimport { SkraFileInput } from '../file-input/file-input';\r\nimport {\r\n SkraFileUploadAction,\r\n SkraFileUploadInstruction,\r\n SkraFileUploadStart,\r\n SkraFileUploadStatus,\r\n} from '../file-upload.directives';\r\nimport { SkraFileUploadContext } from './file-upload-context';\r\n\r\ndeclare const ngDevMode: boolean | undefined;\r\n\r\n/**\r\n * `<skra-file-upload>` — the optional enhancement over a projected `input[skraFileInput]`\r\n * (spec `component-file-upload-spec.md`; ADR 0056 Group D). It paints a localisable face —\r\n * the action and the instruction in the PAGE's language, from tokens — enlarges the control\r\n * into a drop zone, and hosts the live selection-status region.\r\n *\r\n * Why it exists: the native control's two strings (\"Choose File\" / \"No file chosen\") come\r\n * from the browser's UI language, not the page's `lang`, and no CSS or attribute can replace\r\n * them (ADR 0056 §1.6). The native control stays THE control (D2): transparent\r\n * (`opacity: 0`, its own stylesheet, switched on by this component's context), covering the\r\n * whole face, it remains the focus target, the pointer target, the drop target and the node\r\n * assistive technology reads — so `required`, `aria-invalid`, the validation bubble, label\r\n * activation, form submission and the iOS camera / library sheet all keep working.\r\n *\r\n * **State-READING** (ADR 027 §3.8, ADR 055): no inputs, no outputs; every state it paints —\r\n * hover, focus-visible, drag-over, disabled, readonly, invalid — is read from the projected\r\n * control through `:has()`. It owns no state, so it mirrors no ARIA.\r\n *\r\n * **Layout follows content (ADR 020).** No `[skra-file-upload-instruction]` → a compact,\r\n * field-like row (`[icon] [action] status`); with one → the drop-zone layout (stacked,\r\n * centred, dashed). Both accept drops. There is no look input (skin philosophy).\r\n *\r\n * **Never project interactive content** into it — the transparent control covers the whole\r\n * face and swallows the clicks (D3). The file list is a SIBLING.\r\n *\r\n * **Page-navigation guard.** While one is mounted, a FILE drag dropped outside every drop\r\n * target is cancelled instead of navigating the page to the file (spec Q-3; text / link\r\n * drags, native file inputs and editable content are untouched).\r\n *\r\n * <skra-field [hasError]=\"!!error()\">\r\n * <label skraLabelFor>Session recording</label>\r\n * <skra-file-upload>\r\n * <span skra-file-upload-action>Choose a video</span>\r\n * <span skra-file-upload-instruction>or drag it here</span>\r\n * <span skra-file-upload-status>{{ summary() }}</span>\r\n * <input skraFileInput type=\"file\" accept=\"video/*\" (filesChange)=\"onFiles($event)\" />\r\n * </skra-file-upload>\r\n * <skra-error>{{ error() }}</skra-error>\r\n * </skra-field>\r\n */\r\n@Component({\r\n selector: 'skra-file-upload',\r\n standalone: true,\r\n templateUrl: './file-upload.html',\r\n styleUrl: './file-upload.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n providers: [SkraFileUploadContext],\r\n host: {\r\n // Slot presence (ADR 020 / ADR 027 §3.6 — exempt from the State Surface).\r\n '[attr.data-skra-has-start]': 'hasStart() ? \"\" : null',\r\n '[attr.data-skra-has-instruction]': 'hasInstruction() ? \"\" : null',\r\n '[attr.data-skra-has-status]': 'hasStatus() ? \"\" : null',\r\n },\r\n})\r\nexport class SkraFileUpload {\r\n protected readonly ctx = inject(SkraFileUploadContext);\r\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\r\n\r\n // `descendants: false` — projection takes top-level content only, so detection must too\r\n // (ADR 020: a slot marker nested deeper is never projected and must not render a wrapper).\r\n private readonly start = contentChild(SkraFileUploadStart, {\r\n descendants: false,\r\n });\r\n private readonly action = contentChild(SkraFileUploadAction, {\r\n descendants: false,\r\n });\r\n private readonly instruction = contentChild(SkraFileUploadInstruction, {\r\n descendants: false,\r\n });\r\n private readonly status = contentChild(SkraFileUploadStatus, {\r\n descendants: false,\r\n });\r\n // Direct children only (the projection slot takes nothing else) vs anywhere inside.\r\n private readonly inputs = contentChildren(SkraFileInput);\r\n private readonly nestedInputs = contentChildren(SkraFileInput, {\r\n descendants: true,\r\n });\r\n\r\n protected readonly hasStart = computed(() => !!this.start());\r\n protected readonly hasInstruction = computed(() => !!this.instruction());\r\n protected readonly hasStatus = computed(() => !!this.status());\r\n\r\n constructor() {\r\n // The page-navigation guard (spec Q-3): a missed drop must not navigate away from a\r\n // multi-GB upload. Browser-only by construction — `afterNextRender` never runs under SSR\r\n // — and ref-counted across every mounted composite.\r\n const guard = inject(SkraFileDropGuard);\r\n const destroyRef = inject(DestroyRef);\r\n afterNextRender(() => {\r\n guard.acquire();\r\n destroyRef.onDestroy(() => guard.release());\r\n });\r\n\r\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\r\n effect(() => this.warnMisuse());\r\n afterNextRender(() => this.warnInteractiveFace());\r\n }\r\n }\r\n\r\n /**\r\n * Dev-only, ADR 0056 D3: the face is paint. Anything interactive projected into it sits\r\n * UNDER the transparent control, so the control swallows its clicks — and inside the\r\n * `aria-hidden` face it is hidden from assistive technology while still focusable. A read of\r\n * the rendered face, never a write.\r\n */\r\n private warnInteractiveFace(): void {\r\n const face = this.host.nativeElement.querySelector(\r\n '.skra-file-upload-face',\r\n );\r\n const offender = face?.querySelector(\r\n 'a[href], button, input, select, textarea, [tabindex], [contenteditable]',\r\n );\r\n if (offender) {\r\n console.error(\r\n `[skra-file-upload] interactive content (<${offender.tagName.toLowerCase()}>) is ` +\r\n 'projected into the face. The transparent control covers the whole face and swallows ' +\r\n 'its clicks, and the face is aria-hidden (ADR 0056 D3). Put row actions in a SIBLING ' +\r\n 'list (ul[skraStack] of li[skraFileItem]).',\r\n );\r\n }\r\n }\r\n\r\n /** Dev-only: the composite cannot work without exactly one direct-child control and an action. */\r\n private warnMisuse(): void {\r\n const direct = this.inputs().length;\r\n const all = this.nestedInputs().length;\r\n if (all === 0) {\r\n console.error(\r\n '[skra-file-upload] needs a direct-child <input type=\"file\" skraFileInput> — it is the ' +\r\n 'control; the component only paints a face over it (ADR 0056 Group D). Import ' +\r\n 'SkraFileInput and project the input as a direct child.',\r\n );\r\n } else if (direct !== all) {\r\n console.error(\r\n '[skra-file-upload] the input[skraFileInput] must be a DIRECT child — wrapped in another ' +\r\n 'element it is never projected, and nothing covers the face.',\r\n );\r\n } else if (direct > 1) {\r\n console.error(\r\n '[skra-file-upload] takes exactly ONE input[skraFileInput]; use `multiple` on it for ' +\r\n 'several files.',\r\n );\r\n }\r\n if (!this.action()) {\r\n console.error(\r\n '[skra-file-upload] needs a [skra-file-upload-action] (e.g. <span skra-file-upload-action>' +\r\n 'Choose a video</span>) — it is the visible action and half of the control’s accessible ' +\r\n 'name (ADR 0056 D4). Import SkraFileUploadAction so it can be detected.',\r\n );\r\n }\r\n }\r\n}\r\n","<!--\r\n The FACE (ADR 0056 D3) — paint, not a widget: aria-hidden, nothing focusable. The native\r\n control projected below covers all of it (D2) and is the only thing a user or AT operates.\r\n-->\r\n<span class=\"skra-file-upload-face\" aria-hidden=\"true\">\r\n @if (hasStart()) {\r\n <span class=\"skra-file-upload-icon\"\r\n ><ng-content select=\"[skra-start]\"\r\n /></span>\r\n }\r\n <!-- Referenced by the control's aria-labelledby (D4): the visible action text IS in the name. -->\r\n <span class=\"skra-file-upload-action\" [id]=\"ctx.actionId\"\r\n ><ng-content select=\"[skra-file-upload-action]\"\r\n /></span>\r\n @if (hasInstruction()) {\r\n <span class=\"skra-file-upload-instruction\"\r\n ><ng-content select=\"[skra-file-upload-instruction]\"\r\n /></span>\r\n }\r\n</span>\r\n<!--\r\n ALWAYS rendered: a live region must exist before its content changes, or the first change is\r\n not announced. Outside the aria-hidden face (D3's one exception) and linked to the control as a\r\n description. Role only — the implicit `status` politeness, no explicit aria-live (ADR 0052).\r\n-->\r\n<span class=\"skra-file-upload-status\" role=\"status\" [id]=\"ctx.statusId\"\r\n ><ng-content select=\"[skra-file-upload-status]\"\r\n/></span>\r\n<ng-content select=\"input[skraFileInput]\" />\r\n","/** A file name split for middle truncation: the stem may shrink, the extension never does. */\r\nexport interface SkraFileNameParts {\r\n readonly stem: string;\r\n readonly ext: string;\r\n}\r\n\r\n/**\r\n * Internal — NOT part of the public barrel. Split a file name at its LAST dot, for display.\r\n *\r\n * - `clip.final.mp4` → `clip.final` + `.mp4` (only the last dot separates);\r\n * - `.env` → no extension (a dotfile is all name — the dot is at index 0);\r\n * - `README`, `x.` → no extension (none, or an empty one after a trailing dot).\r\n *\r\n * Purely visual: the row also renders the WHOLE name for assistive technology, so the split\r\n * (and the ellipsis) is never heard.\r\n */\r\nexport function splitFileName(name: string): SkraFileNameParts {\r\n const dot = name.lastIndexOf('.');\r\n if (dot <= 0 || dot === name.length - 1) return { stem: name, ext: '' };\r\n return { stem: name.slice(0, dot), ext: name.slice(dot) };\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ViewEncapsulation,\r\n computed,\r\n contentChild,\r\n input,\r\n} from '@angular/core';\r\nimport { skraFormatFileSize } from '../file-helpers/file-helpers';\r\nimport { splitFileName } from '../file-helpers/file-name';\r\nimport {\r\n SkraFileItemDetail,\r\n SkraFileItemEnd,\r\n SkraFileItemError,\r\n SkraFileItemStart,\r\n} from '../file-upload.directives';\r\n\r\n/**\r\n * `li[skraFileItem]` — a display row for ONE consumer-owned file (spec\r\n * `component-file-upload-spec.md`). A Component-on-a-native-host (ADR 012 / ADR 040): the\r\n * `<li>` keeps its list-item semantics inside the consumer's `ul[skraStack]`.\r\n *\r\n * Separate from `<skra-file-upload>` by SRP: a row outlives the selection (it tracks an\r\n * upload), its source of truth is the consumer's queue — not `input.files` — and it is a\r\n * display list item, not a form control. **Skra never uploads**: progress, retry, cancel and\r\n * removal are the consumer's, projected into the row's slots.\r\n *\r\n * - **Name**, middle-truncated with the extension always visible — pure CSS, no measurement.\r\n * The visual split is `aria-hidden`; an `[skra-sr-only]` copy carries the whole name.\r\n * - **Size** — `skraFormatFileSize(size, locale)`: SI units, `Intl` short labels, the\r\n * `locale` input or the host default (the ADR 0050 §5 precedent).\r\n * - **Invalid is READ, never owned** (ADR 027 §3.8, spec Q-7): the row paints\r\n * `data-skra-validation=\"invalid\"` only while `[skra-file-item-error]` text is projected, so\r\n * the colour never appears without the words (WCAG 1.4.1 by construction). No `aria-invalid`\r\n * — no role an `<li>` holds supports it.\r\n *\r\n * <ul skraStack>\r\n * @for (u of uploads(); track u.id) {\r\n * <li skraFileItem [name]=\"u.file.name\" [size]=\"u.file.size\" locale=\"pl-PL\">\r\n * <progress skraProgress skra-file-item-detail [value]=\"u.sent\" [max]=\"u.file.size\"\r\n * [attr.aria-label]=\"'Uploading ' + u.file.name\"></progress>\r\n * @if (u.error) { <span skra-file-item-error>{{ u.error }}</span> }\r\n * <button skraButton skra-end emphasis=\"low\" (click)=\"cancel(u)\">\r\n * Cancel<span skra-sr-only> {{ u.file.name }}</span>\r\n * </button>\r\n * </li>\r\n * }\r\n * </ul>\r\n */\r\n@Component({\r\n selector: 'li[skraFileItem]',\r\n standalone: true,\r\n templateUrl: './file-item.html',\r\n styleUrl: './file-item.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n // Slot presence (ADR 020 / ADR 027 §3.6 — exempt).\r\n '[attr.data-skra-has-start]': 'hasStart() ? \"\" : null',\r\n '[attr.data-skra-has-detail]': 'hasDetail() ? \"\" : null',\r\n '[attr.data-skra-has-end]': 'hasEnd() ? \"\" : null',\r\n // Validation READ from the error slot (ADR 027 §3.8) — the canonical value, never\r\n // `data-skra-has-error` (ADR 027 iron boundary).\r\n '[attr.data-skra-validation]': 'hasError() ? \"invalid\" : null',\r\n },\r\n})\r\nexport class SkraFileItem {\r\n /** The file name, shown as stem + extension. */\r\n readonly name = input.required<string>();\r\n\r\n /** Size in bytes, formatted for display. `undefined` → no size shown. */\r\n readonly size = input<number | undefined>(undefined);\r\n\r\n /** `Intl` locale for the size. `undefined` → the host default (ADR 0050 §5 precedent). */\r\n readonly locale = input<string | undefined>(undefined);\r\n\r\n // `descendants: false` — `<ng-content select>` projects only TOP-LEVEL content, so detection\r\n // must look no deeper: an icon marked `[skra-start]` inside an end-slot button would\r\n // otherwise report a start slot and render an empty wrapper (ADR 020).\r\n private readonly start = contentChild(SkraFileItemStart, {\r\n descendants: false,\r\n });\r\n private readonly detail = contentChild(SkraFileItemDetail, {\r\n descendants: false,\r\n });\r\n private readonly error = contentChild(SkraFileItemError, {\r\n descendants: false,\r\n });\r\n private readonly end = contentChild(SkraFileItemEnd, { descendants: false });\r\n\r\n protected readonly hasStart = computed(() => !!this.start());\r\n protected readonly hasDetail = computed(() => !!this.detail());\r\n protected readonly hasError = computed(() => !!this.error());\r\n protected readonly hasEnd = computed(() => !!this.end());\r\n\r\n protected readonly parts = computed(() => splitFileName(this.name()));\r\n\r\n // A size that cannot exist is shown as no size, not as an exception in the template:\r\n // the row is display, and the helper's RangeError is for the caller who computes sizes.\r\n protected readonly sizeLabel = computed(() => {\r\n const bytes = this.size();\r\n if (bytes === undefined || !Number.isFinite(bytes) || bytes < 0) return '';\r\n return skraFormatFileSize(bytes, this.locale());\r\n });\r\n}\r\n","@if (hasStart()) {\r\n<span class=\"skra-file-item-start\"><ng-content select=\"[skra-start]\" /></span>\r\n}\r\n<span class=\"skra-file-item-body\">\r\n <!--\r\n The name, middle-truncated with the extension always visible. The split pieces are\r\n aria-hidden; the whole name is read from the sr-only copy, so a screen reader never hears\r\n the split or the ellipsis. `dir=\"auto\"` lets an RTL name order its own pieces.\r\n -->\r\n <span class=\"skra-file-item-name\" dir=\"auto\">\r\n <span class=\"skra-file-item-stem\" aria-hidden=\"true\"\r\n >{{ parts().stem }}</span\r\n >\r\n @if (parts().ext) {\r\n <span class=\"skra-file-item-ext\" aria-hidden=\"true\">{{ parts().ext }}</span>\r\n }\r\n <span skra-sr-only>{{ name() }}</span>\r\n </span>\r\n @if (sizeLabel()) {\r\n <span class=\"skra-file-item-meta\">{{ sizeLabel() }}</span>\r\n } @if (hasDetail()) {\r\n <span class=\"skra-file-item-detail\"\r\n ><ng-content select=\"[skra-file-item-detail]\"\r\n /></span>\r\n } @if (hasError()) {\r\n <span class=\"skra-file-item-error\"\r\n ><ng-content select=\"[skra-file-item-error]\"\r\n /></span>\r\n }\r\n</span>\r\n@if (hasEnd()) {\r\n<span class=\"skra-file-item-end\"><ng-content select=\"[skra-end]\" /></span>\r\n}\r\n","// Public API for @skra/ui/file-upload — the FileUpload family (spec\r\n// adr/specs/component-file-upload-spec.md; ADR 0056 Groups B + D).\r\nexport * from './lib/file-upload.directives';\r\nexport * from './lib/file-helpers/file-helpers';\r\nexport * from './lib/file-input/file-input';\r\nexport * from './lib/file-upload/file-upload';\r\nexport * from './lib/file-item/file-item';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AAEA;AAEA;MAKa,mBAAmB,CAAA;uGAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAnB,mBAAmB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AAGD;;;;AAIG;MAKU,oBAAoB,CAAA;uGAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;AAGD;;;;AAIG;MAKU,yBAAyB,CAAA;uGAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,gCAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA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AAA,CAAA,EAAA,GAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACmC,eAAe,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,KAAK,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExF7E;AACA;;ACDA;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute } from '@angular/core';
|
|
2
|
+
import { input, ViewEncapsulation, ChangeDetectionStrategy, Component, booleanAttribute, inject, ElementRef, afterNextRender } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SkraBox — semantically-neutral spacing/padding primitive (ADR 041).
|
|
@@ -56,7 +56,7 @@ class SkraStack {
|
|
|
56
56
|
...(ngDevMode ? [{ debugName: "justify" }] : /* istanbul ignore next */ []));
|
|
57
57
|
wrap = input(false, { ...(ngDevMode ? { debugName: "wrap" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
58
58
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraStack, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
59
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SkraStack, isStandalone: true, selector: "div[skraStack], section[skraStack], article[skraStack], main[skraStack], nav[skraStack], aside[skraStack], header[skraStack], footer[skraStack], form[skraStack], figure[skraStack], ul[skraStack], ol[skraStack], menu[skraStack]", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-skra-direction": "direction()", "attr.data-skra-gap": "gap()", "attr.data-skra-align": "align()", "attr.data-skra-justify": "justify()", "attr.data-skra-wrap": "wrap() ? \"\" : null" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:flex;margin:0;box-sizing:border-box}:host[data-skra-direction=column]{flex-direction:column}:host[data-skra-direction=row]{flex-direction:row}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-stack-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-stack-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-stack-gap-lg)}:host[data-skra-align=start]{align-items:flex-start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:flex-end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-justify=start]{justify-content:flex-start}:host[data-skra-justify=center]{justify-content:center}:host[data-skra-justify=end]{justify-content:flex-end}:host[data-skra-justify=between]{justify-content:space-between}:host[data-skra-justify=around]{justify-content:space-around}:host[data-skra-wrap]{flex-wrap:wrap}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
59
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SkraStack, isStandalone: true, selector: "div[skraStack], section[skraStack], article[skraStack], main[skraStack], nav[skraStack], aside[skraStack], header[skraStack], footer[skraStack], form[skraStack], figure[skraStack], ul[skraStack], ol[skraStack], menu[skraStack]", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justify: { classPropertyName: "justify", publicName: "justify", isSignal: true, isRequired: false, transformFunction: null }, wrap: { classPropertyName: "wrap", publicName: "wrap", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-skra-direction": "direction()", "attr.data-skra-gap": "gap()", "attr.data-skra-align": "align()", "attr.data-skra-justify": "justify()", "attr.data-skra-wrap": "wrap() ? \"\" : null" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:flex;margin:0;box-sizing:border-box}:host[data-skra-direction=column]{flex-direction:column}:host[data-skra-direction=row]{flex-direction:row}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-stack-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-stack-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-stack-gap-lg)}:host[data-skra-align=start]{align-items:flex-start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:flex-end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-align=baseline]{align-items:baseline}:host[data-skra-justify=start]{justify-content:flex-start}:host[data-skra-justify=center]{justify-content:center}:host[data-skra-justify=end]{justify-content:flex-end}:host[data-skra-justify=between]{justify-content:space-between}:host[data-skra-justify=around]{justify-content:space-around}:host[data-skra-wrap]{flex-wrap:wrap}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}:host(:where([align])){text-align:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
60
60
|
}
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraStack, decorators: [{
|
|
62
62
|
type: Component,
|
|
@@ -70,7 +70,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
70
70
|
'[attr.data-skra-align]': 'align()',
|
|
71
71
|
'[attr.data-skra-justify]': 'justify()',
|
|
72
72
|
'[attr.data-skra-wrap]': 'wrap() ? "" : null',
|
|
73
|
-
}, styles: [":host{display:flex;margin:0;box-sizing:border-box}:host[data-skra-direction=column]{flex-direction:column}:host[data-skra-direction=row]{flex-direction:row}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-stack-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-stack-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-stack-gap-lg)}:host[data-skra-align=start]{align-items:flex-start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:flex-end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-justify=start]{justify-content:flex-start}:host[data-skra-justify=center]{justify-content:center}:host[data-skra-justify=end]{justify-content:flex-end}:host[data-skra-justify=between]{justify-content:space-between}:host[data-skra-justify=around]{justify-content:space-around}:host[data-skra-wrap]{flex-wrap:wrap}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}\n"] }]
|
|
73
|
+
}, styles: [":host{display:flex;margin:0;box-sizing:border-box}:host[data-skra-direction=column]{flex-direction:column}:host[data-skra-direction=row]{flex-direction:row}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-stack-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-stack-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-stack-gap-lg)}:host[data-skra-align=start]{align-items:flex-start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:flex-end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-align=baseline]{align-items:baseline}:host[data-skra-justify=start]{justify-content:flex-start}:host[data-skra-justify=center]{justify-content:center}:host[data-skra-justify=end]{justify-content:flex-end}:host[data-skra-justify=between]{justify-content:space-between}:host[data-skra-justify=around]{justify-content:space-around}:host[data-skra-wrap]{flex-wrap:wrap}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}:host(:where([align])){text-align:inherit}\n"] }]
|
|
74
74
|
}], propDecorators: { direction: [{ type: i0.Input, args: [{ isSignal: true, alias: "direction", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], justify: [{ type: i0.Input, args: [{ isSignal: true, alias: "justify", required: false }] }], wrap: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrap", required: false }] }] } });
|
|
75
75
|
|
|
76
76
|
/**
|
|
@@ -105,7 +105,7 @@ class SkraGrid {
|
|
|
105
105
|
justifyItems = input('stretch', /* @ts-ignore */
|
|
106
106
|
...(ngDevMode ? [{ debugName: "justifyItems" }] : /* istanbul ignore next */ []));
|
|
107
107
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraGrid, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
108
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SkraGrid, isStandalone: true, selector: "div[skraGrid], section[skraGrid], article[skraGrid], main[skraGrid], nav[skraGrid], aside[skraGrid], header[skraGrid], footer[skraGrid], form[skraGrid], figure[skraGrid], ul[skraGrid], ol[skraGrid], menu[skraGrid]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, flow: { classPropertyName: "flow", publicName: "flow", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justifyItems: { classPropertyName: "justifyItems", publicName: "justifyItems", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-skra-columns": "columns()", "attr.data-skra-min": "min()", "attr.data-skra-gap": "gap()", "attr.data-skra-flow": "flow()", "attr.data-skra-align": "align()", "attr.data-skra-justify-items": "justifyItems()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:grid;margin:0;box-sizing:border-box}:host[data-skra-min=sm]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-sm)}:host[data-skra-min=md]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-md)}:host[data-skra-min=lg]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-lg)}:host[data-skra-columns=\"1\"]{grid-template-columns:repeat(1,minmax(0,1fr))}:host[data-skra-columns=\"2\"]{grid-template-columns:repeat(2,minmax(0,1fr))}:host[data-skra-columns=\"3\"]{grid-template-columns:repeat(3,minmax(0,1fr))}:host[data-skra-columns=\"4\"]{grid-template-columns:repeat(4,minmax(0,1fr))}:host[data-skra-columns=\"5\"]{grid-template-columns:repeat(5,minmax(0,1fr))}:host[data-skra-columns=\"6\"]{grid-template-columns:repeat(6,minmax(0,1fr))}:host[data-skra-columns=auto-fit]{grid-template-columns:repeat(auto-fit,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-columns=auto-fill]{grid-template-columns:repeat(auto-fill,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-grid-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-grid-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-grid-gap-lg)}:host[data-skra-flow=row]{grid-auto-flow:row}:host[data-skra-flow=column]{grid-auto-flow:column}:host[data-skra-flow=dense]{grid-auto-flow:row dense}:host[data-skra-align=start]{align-items:start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-justify-items=start]{justify-items:start}:host[data-skra-justify-items=center]{justify-items:center}:host[data-skra-justify-items=end]{justify-items:end}:host[data-skra-justify-items=stretch]{justify-items:stretch}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
108
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SkraGrid, isStandalone: true, selector: "div[skraGrid], section[skraGrid], article[skraGrid], main[skraGrid], nav[skraGrid], aside[skraGrid], header[skraGrid], footer[skraGrid], form[skraGrid], figure[skraGrid], ul[skraGrid], ol[skraGrid], menu[skraGrid]", inputs: { columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, gap: { classPropertyName: "gap", publicName: "gap", isSignal: true, isRequired: false, transformFunction: null }, flow: { classPropertyName: "flow", publicName: "flow", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, justifyItems: { classPropertyName: "justifyItems", publicName: "justifyItems", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-skra-columns": "columns()", "attr.data-skra-min": "min()", "attr.data-skra-gap": "gap()", "attr.data-skra-flow": "flow()", "attr.data-skra-align": "align()", "attr.data-skra-justify-items": "justifyItems()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:grid;margin:0;box-sizing:border-box}:host[data-skra-min=sm]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-sm)}:host[data-skra-min=md]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-md)}:host[data-skra-min=lg]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-lg)}:host[data-skra-columns=\"1\"]{grid-template-columns:repeat(1,minmax(0,1fr))}:host[data-skra-columns=\"2\"]{grid-template-columns:repeat(2,minmax(0,1fr))}:host[data-skra-columns=\"3\"]{grid-template-columns:repeat(3,minmax(0,1fr))}:host[data-skra-columns=\"4\"]{grid-template-columns:repeat(4,minmax(0,1fr))}:host[data-skra-columns=\"5\"]{grid-template-columns:repeat(5,minmax(0,1fr))}:host[data-skra-columns=\"6\"]{grid-template-columns:repeat(6,minmax(0,1fr))}:host[data-skra-columns=auto-fit]{grid-template-columns:repeat(auto-fit,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-columns=auto-fill]{grid-template-columns:repeat(auto-fill,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-grid-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-grid-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-grid-gap-lg)}:host[data-skra-flow=row]{grid-auto-flow:row}:host[data-skra-flow=column]{grid-auto-flow:column}:host[data-skra-flow=dense]{grid-auto-flow:row dense}:host[data-skra-align=start]{align-items:start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-justify-items=start]{justify-items:start}:host[data-skra-justify-items=center]{justify-items:center}:host[data-skra-justify-items=end]{justify-items:end}:host[data-skra-justify-items=stretch]{justify-items:stretch}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}:host(:where([align])){text-align:inherit}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
109
109
|
}
|
|
110
110
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraGrid, decorators: [{
|
|
111
111
|
type: Component,
|
|
@@ -120,7 +120,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
120
120
|
'[attr.data-skra-flow]': 'flow()',
|
|
121
121
|
'[attr.data-skra-align]': 'align()',
|
|
122
122
|
'[attr.data-skra-justify-items]': 'justifyItems()',
|
|
123
|
-
}, styles: [":host{display:grid;margin:0;box-sizing:border-box}:host[data-skra-min=sm]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-sm)}:host[data-skra-min=md]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-md)}:host[data-skra-min=lg]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-lg)}:host[data-skra-columns=\"1\"]{grid-template-columns:repeat(1,minmax(0,1fr))}:host[data-skra-columns=\"2\"]{grid-template-columns:repeat(2,minmax(0,1fr))}:host[data-skra-columns=\"3\"]{grid-template-columns:repeat(3,minmax(0,1fr))}:host[data-skra-columns=\"4\"]{grid-template-columns:repeat(4,minmax(0,1fr))}:host[data-skra-columns=\"5\"]{grid-template-columns:repeat(5,minmax(0,1fr))}:host[data-skra-columns=\"6\"]{grid-template-columns:repeat(6,minmax(0,1fr))}:host[data-skra-columns=auto-fit]{grid-template-columns:repeat(auto-fit,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-columns=auto-fill]{grid-template-columns:repeat(auto-fill,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-grid-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-grid-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-grid-gap-lg)}:host[data-skra-flow=row]{grid-auto-flow:row}:host[data-skra-flow=column]{grid-auto-flow:column}:host[data-skra-flow=dense]{grid-auto-flow:row dense}:host[data-skra-align=start]{align-items:start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-justify-items=start]{justify-items:start}:host[data-skra-justify-items=center]{justify-items:center}:host[data-skra-justify-items=end]{justify-items:end}:host[data-skra-justify-items=stretch]{justify-items:stretch}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}\n"] }]
|
|
123
|
+
}, styles: [":host{display:grid;margin:0;box-sizing:border-box}:host[data-skra-min=sm]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-sm)}:host[data-skra-min=md]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-md)}:host[data-skra-min=lg]{--skra-comp-grid-track-min: var(--skra-comp-grid-min-lg)}:host[data-skra-columns=\"1\"]{grid-template-columns:repeat(1,minmax(0,1fr))}:host[data-skra-columns=\"2\"]{grid-template-columns:repeat(2,minmax(0,1fr))}:host[data-skra-columns=\"3\"]{grid-template-columns:repeat(3,minmax(0,1fr))}:host[data-skra-columns=\"4\"]{grid-template-columns:repeat(4,minmax(0,1fr))}:host[data-skra-columns=\"5\"]{grid-template-columns:repeat(5,minmax(0,1fr))}:host[data-skra-columns=\"6\"]{grid-template-columns:repeat(6,minmax(0,1fr))}:host[data-skra-columns=auto-fit]{grid-template-columns:repeat(auto-fit,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-columns=auto-fill]{grid-template-columns:repeat(auto-fill,minmax(var(--skra-comp-grid-track-min),1fr))}:host[data-skra-gap=none]{gap:0}:host[data-skra-gap=sm]{gap:var(--skra-comp-grid-gap-sm)}:host[data-skra-gap=md]{gap:var(--skra-comp-grid-gap-md)}:host[data-skra-gap=lg]{gap:var(--skra-comp-grid-gap-lg)}:host[data-skra-flow=row]{grid-auto-flow:row}:host[data-skra-flow=column]{grid-auto-flow:column}:host[data-skra-flow=dense]{grid-auto-flow:row dense}:host[data-skra-align=start]{align-items:start}:host[data-skra-align=center]{align-items:center}:host[data-skra-align=end]{align-items:end}:host[data-skra-align=stretch]{align-items:stretch}:host[data-skra-justify-items=start]{justify-items:start}:host[data-skra-justify-items=center]{justify-items:center}:host[data-skra-justify-items=end]{justify-items:end}:host[data-skra-justify-items=stretch]{justify-items:stretch}:host(ul),:host(ol),:host(menu){list-style:none;padding-inline-start:0}:host(:where([align])){text-align:inherit}\n"] }]
|
|
124
124
|
}], propDecorators: { columns: [{ type: i0.Input, args: [{ isSignal: true, alias: "columns", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], gap: [{ type: i0.Input, args: [{ isSignal: true, alias: "gap", required: false }] }], flow: [{ type: i0.Input, args: [{ isSignal: true, alias: "flow", required: false }] }], align: [{ type: i0.Input, args: [{ isSignal: true, alias: "align", required: false }] }], justifyItems: [{ type: i0.Input, args: [{ isSignal: true, alias: "justifyItems", required: false }] }] } });
|
|
125
125
|
|
|
126
126
|
/**
|
|
@@ -151,7 +151,7 @@ class SkraSurface {
|
|
|
151
151
|
padding = input('md', /* @ts-ignore */
|
|
152
152
|
...(ngDevMode ? [{ debugName: "padding" }] : /* istanbul ignore next */ []));
|
|
153
153
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraSurface, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SkraSurface, isStandalone: true, selector: "div[skraSurface], section[skraSurface], article[skraSurface], main[skraSurface], nav[skraSurface], aside[skraSurface], header[skraSurface], footer[skraSurface], figure[skraSurface]", inputs: { padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-skra-padding": "padding()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;margin:0;box-sizing:border-box;background:var(--skra-comp-surface-background);color:var(--skra-comp-surface-foreground);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width);border-style:var(--skra-comp-surface-border-style);border-radius:var(--skra-comp-surface-radius);box-shadow:var(--skra-comp-surface-shadow);padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline);transition:background-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing),border-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing)}:host[data-skra-padding=none]{padding-block:0;padding-inline:0}:host[data-skra-padding=sm]{padding-block:var(--skra-comp-surface-padding-block-sm);padding-inline:var(--skra-comp-surface-padding-inline-sm)}:host[data-skra-padding=md]{padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline)}:host[data-skra-padding=lg]{padding-block:var(--skra-comp-surface-padding-block-lg);padding-inline:var(--skra-comp-surface-padding-inline-lg)}:host([aria-current]),:host([aria-selected=true]){background:var(--skra-comp-surface-background-selected);border-color:var(--skra-comp-surface-border-color-selected);border-width:var(--skra-comp-surface-border-width-selected)}:host([aria-current=false]),:host([aria-selected=false]){background:var(--skra-comp-surface-background);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width)}:host(:focus-visible){outline:var(--skra-comp-surface-focus-ring-width) solid var(--skra-comp-surface-focus-ring-color);outline-offset:var(--skra-comp-surface-focus-ring-width)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
154
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.1.1", type: SkraSurface, isStandalone: true, selector: "div[skraSurface], section[skraSurface], article[skraSurface], main[skraSurface], nav[skraSurface], aside[skraSurface], header[skraSurface], footer[skraSurface], figure[skraSurface]", inputs: { padding: { classPropertyName: "padding", publicName: "padding", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.data-skra-padding": "padding()" } }, ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:block;margin:0;box-sizing:border-box;background:var(--skra-comp-surface-background);color:var(--skra-comp-surface-foreground);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width);border-style:var(--skra-comp-surface-border-style);border-radius:var(--skra-comp-surface-radius);box-shadow:var(--skra-comp-surface-shadow);padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline);transition:background-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing),border-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing)}:host[data-skra-padding=none]{padding-block:0;padding-inline:0}:host[data-skra-padding=sm]{padding-block:var(--skra-comp-surface-padding-block-sm);padding-inline:var(--skra-comp-surface-padding-inline-sm)}:host[data-skra-padding=md]{padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline)}:host[data-skra-padding=lg]{padding-block:var(--skra-comp-surface-padding-block-lg);padding-inline:var(--skra-comp-surface-padding-inline-lg)}:host([aria-current]),:host([aria-selected=true]){background:var(--skra-comp-surface-background-selected);border-color:var(--skra-comp-surface-border-color-selected);border-width:var(--skra-comp-surface-border-width-selected)}:host([aria-current=false]),:host([aria-current=\"\"]),:host([aria-current=undefined]),:host([aria-selected=false]){background:var(--skra-comp-surface-background);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width)}:host(:focus-visible){outline:var(--skra-comp-surface-focus-ring-width) solid var(--skra-comp-surface-focus-ring-color);outline-offset:var(--skra-comp-surface-focus-ring-width)}:host(:has([skraSurfaceLink])){position:relative}@media(hover:hover)and (pointer:fine){:host(:has([skraSurfaceLink]:hover):not(:has([skraSurface] [skraSurfaceLink]:hover)):not([aria-current]:not([aria-current=false]):not([aria-current=\"\"]):not([aria-current=undefined])):not([aria-selected=true])){background:var(--skra-comp-surface-background-hover)}}:host(:has([skraSurfaceLink]:focus-visible):not(:has([skraSurface] [skraSurfaceLink]:focus-visible))){outline:var(--skra-comp-surface-focus-ring-width) solid var(--skra-comp-surface-focus-ring-color);outline-offset:var(--skra-comp-surface-focus-ring-width)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
155
155
|
}
|
|
156
156
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraSurface, decorators: [{
|
|
157
157
|
type: Component,
|
|
@@ -159,12 +159,78 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
159
159
|
// CSP-Safe State Reflection (ADR 021) — NO inline styles. This is the ONLY
|
|
160
160
|
// host attribute Surface emits (ADR 0055 R2): no role, no tabindex, no aria-*.
|
|
161
161
|
'[attr.data-skra-padding]': 'padding()',
|
|
162
|
-
}, styles: [":host{display:block;margin:0;box-sizing:border-box;background:var(--skra-comp-surface-background);color:var(--skra-comp-surface-foreground);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width);border-style:var(--skra-comp-surface-border-style);border-radius:var(--skra-comp-surface-radius);box-shadow:var(--skra-comp-surface-shadow);padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline);transition:background-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing),border-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing)}:host[data-skra-padding=none]{padding-block:0;padding-inline:0}:host[data-skra-padding=sm]{padding-block:var(--skra-comp-surface-padding-block-sm);padding-inline:var(--skra-comp-surface-padding-inline-sm)}:host[data-skra-padding=md]{padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline)}:host[data-skra-padding=lg]{padding-block:var(--skra-comp-surface-padding-block-lg);padding-inline:var(--skra-comp-surface-padding-inline-lg)}:host([aria-current]),:host([aria-selected=true]){background:var(--skra-comp-surface-background-selected);border-color:var(--skra-comp-surface-border-color-selected);border-width:var(--skra-comp-surface-border-width-selected)}:host([aria-current=false]),:host([aria-selected=false]){background:var(--skra-comp-surface-background);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width)}:host(:focus-visible){outline:var(--skra-comp-surface-focus-ring-width) solid var(--skra-comp-surface-focus-ring-color);outline-offset:var(--skra-comp-surface-focus-ring-width)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"] }]
|
|
162
|
+
}, styles: [":host{display:block;margin:0;box-sizing:border-box;background:var(--skra-comp-surface-background);color:var(--skra-comp-surface-foreground);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width);border-style:var(--skra-comp-surface-border-style);border-radius:var(--skra-comp-surface-radius);box-shadow:var(--skra-comp-surface-shadow);padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline);transition:background-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing),border-color var(--skra-comp-surface-motion-duration) var(--skra-comp-surface-motion-easing)}:host[data-skra-padding=none]{padding-block:0;padding-inline:0}:host[data-skra-padding=sm]{padding-block:var(--skra-comp-surface-padding-block-sm);padding-inline:var(--skra-comp-surface-padding-inline-sm)}:host[data-skra-padding=md]{padding-block:var(--skra-comp-surface-padding-block);padding-inline:var(--skra-comp-surface-padding-inline)}:host[data-skra-padding=lg]{padding-block:var(--skra-comp-surface-padding-block-lg);padding-inline:var(--skra-comp-surface-padding-inline-lg)}:host([aria-current]),:host([aria-selected=true]){background:var(--skra-comp-surface-background-selected);border-color:var(--skra-comp-surface-border-color-selected);border-width:var(--skra-comp-surface-border-width-selected)}:host([aria-current=false]),:host([aria-current=\"\"]),:host([aria-current=undefined]),:host([aria-selected=false]){background:var(--skra-comp-surface-background);border-color:var(--skra-comp-surface-border-color);border-width:var(--skra-comp-surface-border-width)}:host(:focus-visible){outline:var(--skra-comp-surface-focus-ring-width) solid var(--skra-comp-surface-focus-ring-color);outline-offset:var(--skra-comp-surface-focus-ring-width)}:host(:has([skraSurfaceLink])){position:relative}@media(hover:hover)and (pointer:fine){:host(:has([skraSurfaceLink]:hover):not(:has([skraSurface] [skraSurfaceLink]:hover)):not([aria-current]:not([aria-current=false]):not([aria-current=\"\"]):not([aria-current=undefined])):not([aria-selected=true])){background:var(--skra-comp-surface-background-hover)}}:host(:has([skraSurfaceLink]:focus-visible):not(:has([skraSurface] [skraSurfaceLink]:focus-visible))){outline:var(--skra-comp-surface-focus-ring-width) solid var(--skra-comp-surface-focus-ring-color);outline-offset:var(--skra-comp-surface-focus-ring-width)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"] }]
|
|
163
163
|
}], propDecorators: { padding: [{ type: i0.Input, args: [{ isSignal: true, alias: "padding", required: false }] }] } });
|
|
164
164
|
|
|
165
|
+
/**
|
|
166
|
+
* SkraSurfaceLink — the stretched-link marker that makes a whole `SkraSurface`
|
|
167
|
+
* one activation target (ADR 0055 R3/R4).
|
|
168
|
+
*
|
|
169
|
+
* Placed on the consumer's OWN primary control — `<a>` for navigation, `<button>`
|
|
170
|
+
* where the destination is an action — never on the Surface host (R3.1:
|
|
171
|
+
* `a[skraSurface]` / `button[skraSurface]` stay unsupported). Its own host
|
|
172
|
+
* stylesheet stretches the control's hit area over the nearest Surface with a
|
|
173
|
+
* `::after` overlay; the Surface reads `:has([skraSurfaceLink]…)` and paints hover
|
|
174
|
+
* and the focus ring on itself, because the surface is the target (R4.2).
|
|
175
|
+
*
|
|
176
|
+
* Accessible name: the control's own visible text (ADR 033 Path 1) — normally the
|
|
177
|
+
* card's heading. No inputs, no `aria-*`, no `role`, no `tabindex`: the native
|
|
178
|
+
* host already is the one tab stop.
|
|
179
|
+
*
|
|
180
|
+
* Dev-mode console errors (R3.3): no `[skraSurface]` ancestor (the overlay would
|
|
181
|
+
* stretch over whatever positioned ancestor happens to exist — possibly the whole
|
|
182
|
+
* page), and more than one marker whose NEAREST Surface is the same (two overlays
|
|
183
|
+
* = an invisible hit-area conflict). Checked on the rendered DOM, not through DI:
|
|
184
|
+
* a consumer's own card component projecting content into `<article skraSurface>`
|
|
185
|
+
* puts the marker inside the Surface in the DOM while its injector chain follows
|
|
186
|
+
* the declaring template and never meets the Surface.
|
|
187
|
+
*/
|
|
188
|
+
class SkraSurfaceLink {
|
|
189
|
+
constructor() {
|
|
190
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
191
|
+
const host = inject(ElementRef).nativeElement;
|
|
192
|
+
// Browser-only (afterNextRender never runs on the server) and read-only: the
|
|
193
|
+
// DOM is inspected, never mutated.
|
|
194
|
+
afterNextRender(() => checkPlacement(host));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraSurfaceLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
198
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraSurfaceLink, isStandalone: true, selector: "a[skraSurfaceLink], button[skraSurfaceLink]", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{position:static;margin:0;color:inherit;text-decoration:var(--skra-comp-surface-link-text-decoration)}:host(button){padding:0;border:0;background:none;font:inherit;text-align:inherit;cursor:pointer}:host:after{content:\"\";position:absolute;inset:0}:host(:focus-visible){outline:none}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
199
|
+
}
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraSurfaceLink, decorators: [{
|
|
201
|
+
type: Component,
|
|
202
|
+
args: [{ selector: 'a[skraSurfaceLink], button[skraSurfaceLink]', standalone: true, template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, styles: [":host{position:static;margin:0;color:inherit;text-decoration:var(--skra-comp-surface-link-text-decoration)}:host(button){padding:0;border:0;background:none;font:inherit;text-align:inherit;cursor:pointer}:host:after{content:\"\";position:absolute;inset:0}:host(:focus-visible){outline:none}\n"] }]
|
|
203
|
+
}], ctorParameters: () => [] });
|
|
204
|
+
/** Markers already reported as duplicates, per Surface — so one conflict logs once. */
|
|
205
|
+
const reportedMarkers = new WeakMap();
|
|
206
|
+
/** Dev-mode placement check (ADR 0055 R3 / R3.3). */
|
|
207
|
+
function checkPlacement(host) {
|
|
208
|
+
const surface = host.parentElement?.closest('[skraSurface]');
|
|
209
|
+
if (!surface) {
|
|
210
|
+
console.error('[skraSurfaceLink] must sit inside a [skraSurface] host — its overlay stretches ' +
|
|
211
|
+
'over the nearest Surface, and without one it would cover whatever positioned ' +
|
|
212
|
+
'ancestor exists (ADR 0055 R3).', host);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
const own = Array.from(surface.querySelectorAll('[skraSurfaceLink]')).filter((link) => link.parentElement?.closest('[skraSurface]') === surface);
|
|
216
|
+
// Reported once per conflict, by whichever marker renders into it — including one
|
|
217
|
+
// inserted BEFORE an existing marker, which a "not the first in DOM order" rule
|
|
218
|
+
// missed (PR #9 review, S2). A marker that has already been reported stays quiet.
|
|
219
|
+
if (own.length > 1) {
|
|
220
|
+
const seen = reportedMarkers.get(surface) ?? new WeakSet();
|
|
221
|
+
reportedMarkers.set(surface, seen);
|
|
222
|
+
if (own.every((link) => seen.has(link)))
|
|
223
|
+
return;
|
|
224
|
+
own.forEach((link) => seen.add(link));
|
|
225
|
+
console.error('[skraSurfaceLink] appears more than once in the same [skraSurface] — at most one ' +
|
|
226
|
+
'stretched link per surface (ADR 0055 R3.3). Make each target its own Surface, ' +
|
|
227
|
+
'or keep the secondary control a plain link/button raised above the overlay.', host);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
165
231
|
/**
|
|
166
232
|
* Generated bundle index. Do not edit.
|
|
167
233
|
*/
|
|
168
234
|
|
|
169
|
-
export { SkraBox, SkraGrid, SkraStack, SkraSurface };
|
|
235
|
+
export { SkraBox, SkraGrid, SkraStack, SkraSurface, SkraSurfaceLink };
|
|
170
236
|
//# sourceMappingURL=skra-ui-layout.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skra-ui-layout.mjs","sources":["../../../../libs/ui/layout/src/lib/box/box.ts","../../../../libs/ui/layout/src/lib/stack/stack.ts","../../../../libs/ui/layout/src/lib/grid/grid.ts","../../../../libs/ui/layout/src/lib/surface/surface.ts","../../../../libs/ui/layout/src/skra-ui-layout.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n input,\n} from '@angular/core';\n\nexport type BoxPadding = 'none' | 'sm' | 'md' | 'lg';\nexport type BoxDisplay = 'block' | 'inline-block' | 'flex';\n\n/**\n * SkraBox — semantically-neutral spacing/padding primitive (ADR 041).\n *\n * Component-on-native-host: layers onto a generic flow/sectioning container via\n * the bounded host allowlist below — NEVER a `<skra-box>` custom element\n * (ADR 012 §3.1 / ADR 041). Box does NOT arrange children, so list hosts\n * (`ul`/`ol`/`menu`) are intentionally excluded from its allowlist.\n *\n * Box is a pure spacing primitive: it MUST NOT establish a container-query\n * context (`container-type`/`container-name`) — that is an app-level concern\n * (ADR 016 §3.3, amended by ADR 041).\n */\n@Component({\n selector:\n 'div[skraBox], section[skraBox], article[skraBox], main[skraBox], nav[skraBox], aside[skraBox], header[skraBox], footer[skraBox], form[skraBox], figure[skraBox]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './box.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection (ADR 021) — NO inline styles! The layout reset\n // (margin/box-sizing) + figure UA-margin normalization live in box.scss\n // `:host` (ADR 022 / ADR 041 Host Normalization Contract); host-metadata\n // bare keys would render as junk attributes, not styles.\n '[attr.data-skra-padding]': 'padding()',\n '[attr.data-skra-display]': 'display()',\n },\n})\nexport class SkraBox {\n readonly padding = input<BoxPadding>('none');\n readonly display = input<BoxDisplay>('block');\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n booleanAttribute,\n input,\n} from '@angular/core';\n\nexport type StackDirection = 'row' | 'column';\nexport type StackGap = 'none' | 'sm' | 'md' | 'lg';\nexport type StackAlign = 'start' | 'center' | 'end' | 'stretch';\nexport type StackJustify = 'start' | 'center' | 'end' | 'between' | 'around';\n\n/**\n * SkraStack — flex layout primitive that arranges its children (ADR 041).\n *\n * Component-on-native-host via the bounded allowlist below. As a child-arranger\n * it additionally accepts list hosts (`ul`/`ol`/`menu`) — their UA list styling\n * is normalized in stack.scss per the Host Normalization Contract. List markers\n * are restorable without `!important` via a direct `li {}` rule (a direct\n * declaration beats the inherited `list-style: none`).\n *\n * Stack consumes `@container`; it MUST NOT establish a container-query context\n * (ADR 016 §3.3, amended by ADR 041).\n */\n@Component({\n selector:\n 'div[skraStack], section[skraStack], article[skraStack], main[skraStack], nav[skraStack], aside[skraStack], header[skraStack], footer[skraStack], form[skraStack], figure[skraStack], ul[skraStack], ol[skraStack], menu[skraStack]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './stack.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection — only data-attributes, no [style.*]. The\n // layout reset (margin/box-sizing) + list/UA normalization live in\n // stack.scss `:host` (ADR 022 / ADR 041 Host Normalization Contract);\n // host-metadata bare keys would render as junk attributes, not styles.\n '[attr.data-skra-direction]': 'direction()',\n '[attr.data-skra-gap]': 'gap()',\n '[attr.data-skra-align]': 'align()',\n '[attr.data-skra-justify]': 'justify()',\n '[attr.data-skra-wrap]': 'wrap() ? \"\" : null',\n },\n})\nexport class SkraStack {\n readonly direction = input<StackDirection>('column');\n readonly gap = input<StackGap>('md');\n readonly align = input<StackAlign>('stretch');\n readonly justify = input<StackJustify>('start');\n readonly wrap = input(false, { transform: booleanAttribute });\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n input,\n} from '@angular/core';\n\nexport type GridColumns =\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | 'auto-fit'\n | 'auto-fill';\nexport type GridMin = 'sm' | 'md' | 'lg';\nexport type GridGap = 'none' | 'sm' | 'md' | 'lg';\nexport type GridFlow = 'row' | 'column' | 'dense';\nexport type GridAlign = 'start' | 'center' | 'end' | 'stretch';\n\n/**\n * SkraGrid — 2D layout primitive that arranges its children in a CSS Grid\n * (ADR 041, scope O-3). The bucket-only companion to Stack (1D) and Box (spacing).\n *\n * Component-on-native-host via the bounded allowlist below. As a child-arranger\n * it additionally accepts list hosts (`ul`/`ol`/`menu`) — their UA list styling\n * is normalized in grid.scss per the Host Normalization Contract.\n *\n * Bucket-only by design: every axis is an enumerated input reflected as a\n * `data-skra-*` attribute → token. Arbitrary track lists, `grid-template-areas`,\n * named lines and per-item placement are OUT of scope (bespoke = native CSS) —\n * exposing them would force an `[style.*]` host binding (ADR 021 violation).\n *\n * Responsiveness: `columns=\"auto-fit\"` (default) + `min` produce an intrinsically\n * responsive card grid via `repeat(auto-fit, minmax(var(--min), 1fr))` — column\n * count tracks available width with NO media/container queries. Grid consumes\n * `@container`; it MUST NOT establish a container-query context (ADR 041 §3.3).\n */\n@Component({\n selector:\n 'div[skraGrid], section[skraGrid], article[skraGrid], main[skraGrid], nav[skraGrid], aside[skraGrid], header[skraGrid], footer[skraGrid], form[skraGrid], figure[skraGrid], ul[skraGrid], ol[skraGrid], menu[skraGrid]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './grid.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection — only data-attributes, no [style.*]. The layout\n // reset (margin/box-sizing/display:grid) + list/UA normalization live in\n // grid.scss `:host` (ADR 022 / ADR 041 Host Normalization Contract);\n // host-metadata bare keys would render as junk attributes, not styles.\n '[attr.data-skra-columns]': 'columns()',\n '[attr.data-skra-min]': 'min()',\n '[attr.data-skra-gap]': 'gap()',\n '[attr.data-skra-flow]': 'flow()',\n '[attr.data-skra-align]': 'align()',\n '[attr.data-skra-justify-items]': 'justifyItems()',\n },\n})\nexport class SkraGrid {\n readonly columns = input<GridColumns>('auto-fit');\n readonly min = input<GridMin>('md');\n readonly gap = input<GridGap>('md');\n readonly flow = input<GridFlow>('row');\n readonly align = input<GridAlign>('stretch');\n readonly justifyItems = input<GridAlign>('stretch');\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n input,\n} from '@angular/core';\n\nexport type SurfacePadding = 'none' | 'sm' | 'md' | 'lg';\n\n/**\n * SkraSurface — the painted container primitive (ADR 0053), Box's painting sibling.\n *\n * Component-on-native-host: layers onto a generic flow/sectioning container via the\n * bounded host allowlist below — NEVER a `<skra-surface>` custom element, and never\n * an interactive host (ADR 0055 R3.1: `a[skraSurface]` / `button[skraSurface]` are\n * unsupported). \"Card\", \"Panel\" and \"Tile\" are consumer compositions of Surface +\n * `[skraStack]`/`[skraBox]` + a heading — not Skra components (ADR 0053 rule 1).\n *\n * **State-reading doctrine (ADR 0055).** Surface is a READER of state, never an\n * OWNER of state. It exposes no `interactive`/`hoverable`/`selected`/`elevation`\n * input and emits no `role`/`tabindex`/`aria-*`. Focus and selection are READ from\n * the markup the consumer authored (see surface.scss) — which is why an\n * informational card gets no interactive paint with zero API, and why a selected\n * card can never disagree with what assistive technology announces.\n *\n * Zero baked semantics: sectioning role and accessible name are 100% consumer-owned\n * (ADR 0053 rule 6). No `container-type` in v1 (ADR 0055 R7.1).\n */\n@Component({\n selector:\n 'div[skraSurface], section[skraSurface], article[skraSurface], main[skraSurface], nav[skraSurface], aside[skraSurface], header[skraSurface], footer[skraSurface], figure[skraSurface]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './surface.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection (ADR 021) — NO inline styles. This is the ONLY\n // host attribute Surface emits (ADR 0055 R2): no role, no tabindex, no aria-*.\n '[attr.data-skra-padding]': 'padding()',\n },\n})\nexport class SkraSurface {\n /**\n * Semantic padding preset, reusing Box's enum for cross-atom consistency\n * (ADR 0053 rule 4). Defaults to `md` rather than Box's `none` — Box is\n * spacing-neutral by construction, a painted container is not (ADR 0055 R1).\n */\n readonly padding = input<SurfacePadding>('md');\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;AAWG;MAkBU,OAAO,CAAA;IACT,OAAO,GAAG,KAAK,CAAa,MAAM;gFAAC;IACnC,OAAO,GAAG,KAAK,CAAa,OAAO;gFAAC;uGAFlC,OAAO,EAAA,IAA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AA,sLAAsL,EAAA,UAAA,EAC5K,IAAI,EAAA,QAAA,EACN,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;;;AAGJ,wBAAA,0BAA0B,EAAE,WAAW;AACxC,qBAAA,EAAA,MAAA,EAAA,CAAA,wzDAAA,CAAA,EAAA;;;ACxCH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skra-ui-layout.mjs","sources":["../../../../libs/ui/layout/src/lib/box/box.ts","../../../../libs/ui/layout/src/lib/stack/stack.ts","../../../../libs/ui/layout/src/lib/grid/grid.ts","../../../../libs/ui/layout/src/lib/surface/surface.ts","../../../../libs/ui/layout/src/lib/surface/surface-link.ts","../../../../libs/ui/layout/src/skra-ui-layout.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n input,\n} from '@angular/core';\n\nexport type BoxPadding = 'none' | 'sm' | 'md' | 'lg';\nexport type BoxDisplay = 'block' | 'inline-block' | 'flex';\n\n/**\n * SkraBox — semantically-neutral spacing/padding primitive (ADR 041).\n *\n * Component-on-native-host: layers onto a generic flow/sectioning container via\n * the bounded host allowlist below — NEVER a `<skra-box>` custom element\n * (ADR 012 §3.1 / ADR 041). Box does NOT arrange children, so list hosts\n * (`ul`/`ol`/`menu`) are intentionally excluded from its allowlist.\n *\n * Box is a pure spacing primitive: it MUST NOT establish a container-query\n * context (`container-type`/`container-name`) — that is an app-level concern\n * (ADR 016 §3.3, amended by ADR 041).\n */\n@Component({\n selector:\n 'div[skraBox], section[skraBox], article[skraBox], main[skraBox], nav[skraBox], aside[skraBox], header[skraBox], footer[skraBox], form[skraBox], figure[skraBox]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './box.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection (ADR 021) — NO inline styles! The layout reset\n // (margin/box-sizing) + figure UA-margin normalization live in box.scss\n // `:host` (ADR 022 / ADR 041 Host Normalization Contract); host-metadata\n // bare keys would render as junk attributes, not styles.\n '[attr.data-skra-padding]': 'padding()',\n '[attr.data-skra-display]': 'display()',\n },\n})\nexport class SkraBox {\n readonly padding = input<BoxPadding>('none');\n readonly display = input<BoxDisplay>('block');\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\nexport type StackDirection = 'row' | 'column';\r\nexport type StackGap = 'none' | 'sm' | 'md' | 'lg';\r\nexport type StackAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline';\r\nexport type StackJustify = 'start' | 'center' | 'end' | 'between' | 'around';\r\n\r\n/**\r\n * SkraStack — flex layout primitive that arranges its children (ADR 041).\r\n *\r\n * Component-on-native-host via the bounded allowlist below. As a child-arranger\r\n * it additionally accepts list hosts (`ul`/`ol`/`menu`) — their UA list styling\r\n * is normalized in stack.scss per the Host Normalization Contract. List markers\r\n * are restorable without `!important` via a direct `li {}` rule (a direct\r\n * declaration beats the inherited `list-style: none`).\r\n *\r\n * Stack consumes `@container`; it MUST NOT establish a container-query context\r\n * (ADR 016 §3.3, amended by ADR 041).\r\n */\r\n@Component({\r\n selector:\r\n 'div[skraStack], section[skraStack], article[skraStack], main[skraStack], nav[skraStack], aside[skraStack], header[skraStack], footer[skraStack], form[skraStack], figure[skraStack], ul[skraStack], ol[skraStack], menu[skraStack]',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './stack.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n host: {\r\n // CSP-Safe State Reflection — only data-attributes, no [style.*]. The\r\n // layout reset (margin/box-sizing) + list/UA normalization live in\r\n // stack.scss `:host` (ADR 022 / ADR 041 Host Normalization Contract);\r\n // host-metadata bare keys would render as junk attributes, not styles.\r\n '[attr.data-skra-direction]': 'direction()',\r\n '[attr.data-skra-gap]': 'gap()',\r\n '[attr.data-skra-align]': 'align()',\r\n '[attr.data-skra-justify]': 'justify()',\r\n '[attr.data-skra-wrap]': 'wrap() ? \"\" : null',\r\n },\r\n})\r\nexport class SkraStack {\r\n readonly direction = input<StackDirection>('column');\r\n readonly gap = input<StackGap>('md');\r\n readonly align = input<StackAlign>('stretch');\r\n readonly justify = input<StackJustify>('start');\r\n readonly wrap = input(false, { transform: booleanAttribute });\r\n}\r\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n input,\n} from '@angular/core';\n\nexport type GridColumns =\n | '1'\n | '2'\n | '3'\n | '4'\n | '5'\n | '6'\n | 'auto-fit'\n | 'auto-fill';\nexport type GridMin = 'sm' | 'md' | 'lg';\nexport type GridGap = 'none' | 'sm' | 'md' | 'lg';\nexport type GridFlow = 'row' | 'column' | 'dense';\nexport type GridAlign = 'start' | 'center' | 'end' | 'stretch';\n\n/**\n * SkraGrid — 2D layout primitive that arranges its children in a CSS Grid\n * (ADR 041, scope O-3). The bucket-only companion to Stack (1D) and Box (spacing).\n *\n * Component-on-native-host via the bounded allowlist below. As a child-arranger\n * it additionally accepts list hosts (`ul`/`ol`/`menu`) — their UA list styling\n * is normalized in grid.scss per the Host Normalization Contract.\n *\n * Bucket-only by design: every axis is an enumerated input reflected as a\n * `data-skra-*` attribute → token. Arbitrary track lists, `grid-template-areas`,\n * named lines and per-item placement are OUT of scope (bespoke = native CSS) —\n * exposing them would force an `[style.*]` host binding (ADR 021 violation).\n *\n * Responsiveness: `columns=\"auto-fit\"` (default) + `min` produce an intrinsically\n * responsive card grid via `repeat(auto-fit, minmax(var(--min), 1fr))` — column\n * count tracks available width with NO media/container queries. Grid consumes\n * `@container`; it MUST NOT establish a container-query context (ADR 041 §3.3).\n */\n@Component({\n selector:\n 'div[skraGrid], section[skraGrid], article[skraGrid], main[skraGrid], nav[skraGrid], aside[skraGrid], header[skraGrid], footer[skraGrid], form[skraGrid], figure[skraGrid], ul[skraGrid], ol[skraGrid], menu[skraGrid]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './grid.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection — only data-attributes, no [style.*]. The layout\n // reset (margin/box-sizing/display:grid) + list/UA normalization live in\n // grid.scss `:host` (ADR 022 / ADR 041 Host Normalization Contract);\n // host-metadata bare keys would render as junk attributes, not styles.\n '[attr.data-skra-columns]': 'columns()',\n '[attr.data-skra-min]': 'min()',\n '[attr.data-skra-gap]': 'gap()',\n '[attr.data-skra-flow]': 'flow()',\n '[attr.data-skra-align]': 'align()',\n '[attr.data-skra-justify-items]': 'justifyItems()',\n },\n})\nexport class SkraGrid {\n readonly columns = input<GridColumns>('auto-fit');\n readonly min = input<GridMin>('md');\n readonly gap = input<GridGap>('md');\n readonly flow = input<GridFlow>('row');\n readonly align = input<GridAlign>('stretch');\n readonly justifyItems = input<GridAlign>('stretch');\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n input,\n} from '@angular/core';\n\nexport type SurfacePadding = 'none' | 'sm' | 'md' | 'lg';\n\n/**\n * SkraSurface — the painted container primitive (ADR 0053), Box's painting sibling.\n *\n * Component-on-native-host: layers onto a generic flow/sectioning container via the\n * bounded host allowlist below — NEVER a `<skra-surface>` custom element, and never\n * an interactive host (ADR 0055 R3.1: `a[skraSurface]` / `button[skraSurface]` are\n * unsupported). \"Card\", \"Panel\" and \"Tile\" are consumer compositions of Surface +\n * `[skraStack]`/`[skraBox]` + a heading — not Skra components (ADR 0053 rule 1).\n *\n * **State-reading doctrine (ADR 0055).** Surface is a READER of state, never an\n * OWNER of state. It exposes no `interactive`/`hoverable`/`selected`/`elevation`\n * input and emits no `role`/`tabindex`/`aria-*`. Focus and selection are READ from\n * the markup the consumer authored (see surface.scss) — which is why an\n * informational card gets no interactive paint with zero API, and why a selected\n * card can never disagree with what assistive technology announces.\n *\n * Zero baked semantics: sectioning role and accessible name are 100% consumer-owned\n * (ADR 0053 rule 6). No `container-type` in v1 (ADR 0055 R7.1).\n */\n@Component({\n selector:\n 'div[skraSurface], section[skraSurface], article[skraSurface], main[skraSurface], nav[skraSurface], aside[skraSurface], header[skraSurface], footer[skraSurface], figure[skraSurface]',\n standalone: true,\n template: '<ng-content></ng-content>',\n styleUrl: './surface.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n host: {\n // CSP-Safe State Reflection (ADR 021) — NO inline styles. This is the ONLY\n // host attribute Surface emits (ADR 0055 R2): no role, no tabindex, no aria-*.\n '[attr.data-skra-padding]': 'padding()',\n },\n})\nexport class SkraSurface {\n /**\n * Semantic padding preset, reusing Box's enum for cross-atom consistency\n * (ADR 0053 rule 4). Defaults to `md` rather than Box's `none` — Box is\n * spacing-neutral by construction, a painted container is not (ADR 0055 R1).\n */\n readonly padding = input<SurfacePadding>('md');\n}\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n ViewEncapsulation,\r\n afterNextRender,\r\n inject,\r\n} from '@angular/core';\r\n\r\ndeclare const ngDevMode: boolean | undefined;\r\n\r\n/**\r\n * SkraSurfaceLink — the stretched-link marker that makes a whole `SkraSurface`\r\n * one activation target (ADR 0055 R3/R4).\r\n *\r\n * Placed on the consumer's OWN primary control — `<a>` for navigation, `<button>`\r\n * where the destination is an action — never on the Surface host (R3.1:\r\n * `a[skraSurface]` / `button[skraSurface]` stay unsupported). Its own host\r\n * stylesheet stretches the control's hit area over the nearest Surface with a\r\n * `::after` overlay; the Surface reads `:has([skraSurfaceLink]…)` and paints hover\r\n * and the focus ring on itself, because the surface is the target (R4.2).\r\n *\r\n * Accessible name: the control's own visible text (ADR 033 Path 1) — normally the\r\n * card's heading. No inputs, no `aria-*`, no `role`, no `tabindex`: the native\r\n * host already is the one tab stop.\r\n *\r\n * Dev-mode console errors (R3.3): no `[skraSurface]` ancestor (the overlay would\r\n * stretch over whatever positioned ancestor happens to exist — possibly the whole\r\n * page), and more than one marker whose NEAREST Surface is the same (two overlays\r\n * = an invisible hit-area conflict). Checked on the rendered DOM, not through DI:\r\n * a consumer's own card component projecting content into `<article skraSurface>`\r\n * puts the marker inside the Surface in the DOM while its injector chain follows\r\n * the declaring template and never meets the Surface.\r\n */\r\n@Component({\r\n selector: 'a[skraSurfaceLink], button[skraSurfaceLink]',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './surface-link.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class SkraSurfaceLink {\r\n constructor() {\r\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\r\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n // Browser-only (afterNextRender never runs on the server) and read-only: the\r\n // DOM is inspected, never mutated.\r\n afterNextRender(() => checkPlacement(host));\r\n }\r\n }\r\n}\r\n\r\n/** Markers already reported as duplicates, per Surface — so one conflict logs once. */\r\nconst reportedMarkers = new WeakMap<Element, WeakSet<Element>>();\r\n\r\n/** Dev-mode placement check (ADR 0055 R3 / R3.3). */\r\nfunction checkPlacement(host: HTMLElement): void {\r\n const surface = host.parentElement?.closest('[skraSurface]');\r\n if (!surface) {\r\n console.error(\r\n '[skraSurfaceLink] must sit inside a [skraSurface] host — its overlay stretches ' +\r\n 'over the nearest Surface, and without one it would cover whatever positioned ' +\r\n 'ancestor exists (ADR 0055 R3).',\r\n host,\r\n );\r\n return;\r\n }\r\n const own = Array.from(surface.querySelectorAll('[skraSurfaceLink]')).filter(\r\n (link) => link.parentElement?.closest('[skraSurface]') === surface,\r\n );\r\n // Reported once per conflict, by whichever marker renders into it — including one\r\n // inserted BEFORE an existing marker, which a \"not the first in DOM order\" rule\r\n // missed (PR #9 review, S2). A marker that has already been reported stays quiet.\r\n if (own.length > 1) {\r\n const seen = reportedMarkers.get(surface) ?? new WeakSet<Element>();\r\n reportedMarkers.set(surface, seen);\r\n if (own.every((link) => seen.has(link))) return;\r\n own.forEach((link) => seen.add(link));\r\n console.error(\r\n '[skraSurfaceLink] appears more than once in the same [skraSurface] — at most one ' +\r\n 'stretched link per surface (ADR 0055 R3.3). Make each target its own Surface, ' +\r\n 'or keep the secondary control a plain link/button raised above the overlay.',\r\n host,\r\n );\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;AAWG;MAkBU,OAAO,CAAA;IACT,OAAO,GAAG,KAAK,CAAa,MAAM;gFAAC;IACnC,OAAO,GAAG,KAAK,CAAa,OAAO;gFAAC;uGAFlC,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAP,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,OAAO,2kBAbR,2BAA2B,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8bAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAa1B,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;AAEN,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iKAAiK,EAAA,UAAA,EACvJ,IAAI,EAAA,QAAA,EACN,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,IAAA,EACnC;;;;;AAKJ,wBAAA,0BAA0B,EAAE,WAAW;AACvC,wBAAA,0BAA0B,EAAE,WAAW;AACxC,qBAAA,EAAA,MAAA,EAAA,CAAA,8bAAA,CAAA,EAAA;;;ACxBH;;;;;;;;;;;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,IAAI,KAAK,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CACX,mFAAmF;YACjF,gFAAgF;YAChF,6EAA6E,EAC/E,IAAI,CACL;IACH;AACF;;ACtFA;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { ViewEncapsulation, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
import { ViewEncapsulation, ChangeDetectionStrategy, Component, inject, ElementRef, afterNextRender } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* SkraLink — text-style anchor primitive (ADR 032 §3.6).
|
|
@@ -21,9 +21,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImpor
|
|
|
21
21
|
args: [{ selector: 'a[skraLink]', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, template: "<ng-content></ng-content>\n", styles: [":host{margin:0;color:var(--skra-comp-link-foreground);text-decoration-line:var(--skra-comp-link-text-decoration-line);text-decoration-thickness:var(--skra-comp-link-text-decoration-thickness);text-underline-offset:var(--skra-comp-link-text-underline-offset);transition:color var(--skra-comp-link-motion-duration) var(--skra-comp-link-motion-easing)}:host:visited{color:var(--skra-comp-link-foreground-visited)}@media(hover:hover)and (pointer:fine){:host:hover{color:var(--skra-comp-link-foreground-hover)}}:host:active{color:var(--skra-comp-link-foreground-active)}:host:focus-visible{outline-style:solid;outline-color:var(--skra-comp-link-focus-ring-color);outline-width:var(--skra-comp-link-focus-ring-width);outline-offset:2px}\n"] }]
|
|
22
22
|
}] });
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* SkraNavLink — a navigation destination with a visible current state (ADR 0060).
|
|
26
|
+
*
|
|
27
|
+
* Selector: `a[skraNavLink]` — `<a>` is the sole host (R1: a nav item that does not
|
|
28
|
+
* navigate is not a nav item). A separate atom from `skraLink`: the surface shape and
|
|
29
|
+
* the current state belong to navigation chrome, `:visited` and the underline to prose.
|
|
30
|
+
*
|
|
31
|
+
* **A navigation link is a link.** It keeps every native `<a>` behaviour and owns no
|
|
32
|
+
* state: zero inputs, zero outputs, no host attributes. The current state is READ from
|
|
33
|
+
* the native `aria-current` the consumer or the router already sets
|
|
34
|
+
* (`routerLinkActive` + `ariaCurrentWhenActive="page"`) — the component never writes it,
|
|
35
|
+
* so the paint and what assistive technology announces cannot disagree (R3).
|
|
36
|
+
*
|
|
37
|
+
* No `intent`/`emphasis`/`size` (R2 — the guardrail that keeps the marketing CTA out,
|
|
38
|
+
* ADR 032 §3.5), no `disabled` (ADR 032 §3.6.3), no `ariaLabel` (ADR 033 Path 1: the
|
|
39
|
+
* visible text is the name).
|
|
40
|
+
*
|
|
41
|
+
* Dev-mode console error (R5.1): a nav link outside a navigation landmark (`<nav>` or
|
|
42
|
+
* `role="navigation"`). Checked on the rendered DOM, not through DI — a consumer
|
|
43
|
+
* component that projects the link into its own `<nav>` must not trip it.
|
|
44
|
+
*/
|
|
45
|
+
class SkraNavLink {
|
|
46
|
+
constructor() {
|
|
47
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
48
|
+
const host = inject(ElementRef).nativeElement;
|
|
49
|
+
// Browser-only (afterNextRender never runs on the server) and read-only.
|
|
50
|
+
afterNextRender(() => {
|
|
51
|
+
if (!inNavigation(host)) {
|
|
52
|
+
console.error('[skraNavLink] must sit inside a navigation landmark (<nav> or ' +
|
|
53
|
+
'role="navigation") — outside one, a pill-shaped link is the marketing CTA ' +
|
|
54
|
+
'that ADR 032 §3.5 keeps unsupported (ADR 0060 R5.1).', host);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraNavLink, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
60
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.1", type: SkraNavLink, isStandalone: true, selector: "a[skraNavLink]", ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: [":host{display:inline-flex;align-items:center;margin:0;box-sizing:border-box;background:var(--skra-comp-nav-link-background);color:var(--skra-comp-nav-link-foreground);border-color:var(--skra-comp-nav-link-border-color);border-width:var(--skra-comp-nav-link-border-width);border-style:var(--skra-comp-nav-link-border-style);border-radius:var(--skra-comp-nav-link-radius);box-shadow:var(--skra-comp-nav-link-shadow);padding-block:var(--skra-comp-nav-link-padding-block);padding-inline:var(--skra-comp-nav-link-padding-inline);font-family:var(--skra-sys-typography-role-label-large-font-family);font-size:var(--skra-sys-typography-role-label-large-font-size);font-weight:var(--skra-sys-typography-role-label-large-font-weight);line-height:var(--skra-sys-typography-role-label-large-line-height);letter-spacing:var(--skra-sys-typography-role-label-large-letter-spacing);text-decoration:none;transition:background-color var(--skra-comp-nav-link-motion-duration) var(--skra-comp-nav-link-motion-easing),color var(--skra-comp-nav-link-motion-duration) var(--skra-comp-nav-link-motion-easing),border-color var(--skra-comp-nav-link-motion-duration) var(--skra-comp-nav-link-motion-easing)}:host([aria-current]:not([aria-current=false]):not([aria-current=\"\"]):not([aria-current=undefined])){background:var(--skra-comp-nav-link-background-current);color:var(--skra-comp-nav-link-foreground-current);border-color:var(--skra-comp-nav-link-border-color-current);border-width:var(--skra-comp-nav-link-border-width-current);padding-block:calc(var(--skra-comp-nav-link-padding-block) - (var(--skra-comp-nav-link-border-width-current) - var(--skra-comp-nav-link-border-width)));padding-inline:calc(var(--skra-comp-nav-link-padding-inline) - (var(--skra-comp-nav-link-border-width-current) - var(--skra-comp-nav-link-border-width)))}@media(hover:hover)and (pointer:fine){:host(:hover:not([aria-current]:not([aria-current=false]):not([aria-current=\"\"]):not([aria-current=undefined]))){background:var(--skra-comp-nav-link-background-hover);color:var(--skra-comp-nav-link-foreground-hover)}}:host(:focus-visible){outline:var(--skra-comp-nav-link-focus-ring-width) solid var(--skra-comp-nav-link-focus-ring-color);outline-offset:var(--skra-comp-nav-link-focus-ring-width)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
61
|
+
}
|
|
62
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.1", ngImport: i0, type: SkraNavLink, decorators: [{
|
|
63
|
+
type: Component,
|
|
64
|
+
args: [{ selector: 'a[skraNavLink]', standalone: true, template: '<ng-content></ng-content>', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.Emulated, styles: [":host{display:inline-flex;align-items:center;margin:0;box-sizing:border-box;background:var(--skra-comp-nav-link-background);color:var(--skra-comp-nav-link-foreground);border-color:var(--skra-comp-nav-link-border-color);border-width:var(--skra-comp-nav-link-border-width);border-style:var(--skra-comp-nav-link-border-style);border-radius:var(--skra-comp-nav-link-radius);box-shadow:var(--skra-comp-nav-link-shadow);padding-block:var(--skra-comp-nav-link-padding-block);padding-inline:var(--skra-comp-nav-link-padding-inline);font-family:var(--skra-sys-typography-role-label-large-font-family);font-size:var(--skra-sys-typography-role-label-large-font-size);font-weight:var(--skra-sys-typography-role-label-large-font-weight);line-height:var(--skra-sys-typography-role-label-large-line-height);letter-spacing:var(--skra-sys-typography-role-label-large-letter-spacing);text-decoration:none;transition:background-color var(--skra-comp-nav-link-motion-duration) var(--skra-comp-nav-link-motion-easing),color var(--skra-comp-nav-link-motion-duration) var(--skra-comp-nav-link-motion-easing),border-color var(--skra-comp-nav-link-motion-duration) var(--skra-comp-nav-link-motion-easing)}:host([aria-current]:not([aria-current=false]):not([aria-current=\"\"]):not([aria-current=undefined])){background:var(--skra-comp-nav-link-background-current);color:var(--skra-comp-nav-link-foreground-current);border-color:var(--skra-comp-nav-link-border-color-current);border-width:var(--skra-comp-nav-link-border-width-current);padding-block:calc(var(--skra-comp-nav-link-padding-block) - (var(--skra-comp-nav-link-border-width-current) - var(--skra-comp-nav-link-border-width)));padding-inline:calc(var(--skra-comp-nav-link-padding-inline) - (var(--skra-comp-nav-link-border-width-current) - var(--skra-comp-nav-link-border-width)))}@media(hover:hover)and (pointer:fine){:host(:hover:not([aria-current]:not([aria-current=false]):not([aria-current=\"\"]):not([aria-current=undefined]))){background:var(--skra-comp-nav-link-background-hover);color:var(--skra-comp-nav-link-foreground-hover)}}:host(:focus-visible){outline:var(--skra-comp-nav-link-focus-ring-width) solid var(--skra-comp-nav-link-focus-ring-color);outline-offset:var(--skra-comp-nav-link-focus-ring-width)}@media(prefers-reduced-motion:reduce){:host{transition:none}}\n"] }]
|
|
65
|
+
}], ctorParameters: () => [] });
|
|
66
|
+
/**
|
|
67
|
+
* True when `el` sits inside a navigation landmark in the FLAT tree. `closest()` stops at a
|
|
68
|
+
* shadow root, but assistive technology does not: a link rendered in the shadow root of a
|
|
69
|
+
* consumer component that itself sits inside `<nav>` IS navigation. So the walk hops from
|
|
70
|
+
* a shadow root to its host and continues.
|
|
71
|
+
*/
|
|
72
|
+
function inNavigation(el) {
|
|
73
|
+
let node = el;
|
|
74
|
+
while (node) {
|
|
75
|
+
const hit = node.closest('nav, [role="navigation"]');
|
|
76
|
+
if (hit)
|
|
77
|
+
return true;
|
|
78
|
+
const root = node.getRootNode();
|
|
79
|
+
node = root instanceof ShadowRoot ? root.host : null;
|
|
80
|
+
}
|
|
81
|
+
return false;
|
|
82
|
+
}
|
|
83
|
+
|
|
24
84
|
/**
|
|
25
85
|
* Generated bundle index. Do not edit.
|
|
26
86
|
*/
|
|
27
87
|
|
|
28
|
-
export { SkraLink };
|
|
88
|
+
export { SkraLink, SkraNavLink };
|
|
29
89
|
//# sourceMappingURL=skra-ui-link.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skra-ui-link.mjs","sources":["../../../../libs/ui/link/src/lib/link/link.ts","../../../../libs/ui/link/src/lib/link/link.html","../../../../libs/ui/link/src/skra-ui-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * SkraLink — text-style anchor primitive (ADR 032 §3.6).\n *\n * Selector: `a[skraLink]` — `<a>` is the sole host.\n *\n * Per ADR 032 §3.6.3 there is no `disabled` input and no `data-skra-*`\n * Availability reflection: a link the user cannot or should not follow should\n * not be a link in the first place. Severity is deferred beyond MVP (§3.6.4).\n * Accessible Name follows ADR 033 Path 1 — visible text is the accessible name;\n * the component exposes no `ariaLabel` input.\n */\n@Component({\n selector: 'a[skraLink]',\n standalone: true,\n templateUrl: './link.html',\n styleUrl: './link.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SkraLink {}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAMA;;;;;;;;;;AAUG;MASU,QAAQ,CAAA;uGAAR,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAR,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,uECzBrB,6BACA,EAAA,MAAA,EAAA,CAAA,8tBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDwBa,QAAQ,EAAA,UAAA,EAAA,CAAA;kBARpB,SAAS;+BACE,aAAa,EAAA,UAAA,EACX,IAAI,EAAA,eAAA,EAGC,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,8tBAAA,CAAA,EAAA;;;
|
|
1
|
+
{"version":3,"file":"skra-ui-link.mjs","sources":["../../../../libs/ui/link/src/lib/link/link.ts","../../../../libs/ui/link/src/lib/link/link.html","../../../../libs/ui/link/src/lib/nav-link/nav-link.ts","../../../../libs/ui/link/src/skra-ui-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n} from '@angular/core';\n\n/**\n * SkraLink — text-style anchor primitive (ADR 032 §3.6).\n *\n * Selector: `a[skraLink]` — `<a>` is the sole host.\n *\n * Per ADR 032 §3.6.3 there is no `disabled` input and no `data-skra-*`\n * Availability reflection: a link the user cannot or should not follow should\n * not be a link in the first place. Severity is deferred beyond MVP (§3.6.4).\n * Accessible Name follows ADR 033 Path 1 — visible text is the accessible name;\n * the component exposes no `ariaLabel` input.\n */\n@Component({\n selector: 'a[skraLink]',\n standalone: true,\n templateUrl: './link.html',\n styleUrl: './link.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.Emulated,\n})\nexport class SkraLink {}\n","<ng-content></ng-content>\n","import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n ElementRef,\r\n ViewEncapsulation,\r\n afterNextRender,\r\n inject,\r\n} from '@angular/core';\r\n\r\ndeclare const ngDevMode: boolean | undefined;\r\n\r\n/**\r\n * SkraNavLink — a navigation destination with a visible current state (ADR 0060).\r\n *\r\n * Selector: `a[skraNavLink]` — `<a>` is the sole host (R1: a nav item that does not\r\n * navigate is not a nav item). A separate atom from `skraLink`: the surface shape and\r\n * the current state belong to navigation chrome, `:visited` and the underline to prose.\r\n *\r\n * **A navigation link is a link.** It keeps every native `<a>` behaviour and owns no\r\n * state: zero inputs, zero outputs, no host attributes. The current state is READ from\r\n * the native `aria-current` the consumer or the router already sets\r\n * (`routerLinkActive` + `ariaCurrentWhenActive=\"page\"`) — the component never writes it,\r\n * so the paint and what assistive technology announces cannot disagree (R3).\r\n *\r\n * No `intent`/`emphasis`/`size` (R2 — the guardrail that keeps the marketing CTA out,\r\n * ADR 032 §3.5), no `disabled` (ADR 032 §3.6.3), no `ariaLabel` (ADR 033 Path 1: the\r\n * visible text is the name).\r\n *\r\n * Dev-mode console error (R5.1): a nav link outside a navigation landmark (`<nav>` or\r\n * `role=\"navigation\"`). Checked on the rendered DOM, not through DI — a consumer\r\n * component that projects the link into its own `<nav>` must not trip it.\r\n */\r\n@Component({\r\n selector: 'a[skraNavLink]',\r\n standalone: true,\r\n template: '<ng-content></ng-content>',\r\n styleUrl: './nav-link.scss',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.Emulated,\r\n})\r\nexport class SkraNavLink {\r\n constructor() {\r\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\r\n const host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\r\n // Browser-only (afterNextRender never runs on the server) and read-only.\r\n afterNextRender(() => {\r\n if (!inNavigation(host)) {\r\n console.error(\r\n '[skraNavLink] must sit inside a navigation landmark (<nav> or ' +\r\n 'role=\"navigation\") — outside one, a pill-shaped link is the marketing CTA ' +\r\n 'that ADR 032 §3.5 keeps unsupported (ADR 0060 R5.1).',\r\n host,\r\n );\r\n }\r\n });\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * True when `el` sits inside a navigation landmark in the FLAT tree. `closest()` stops at a\r\n * shadow root, but assistive technology does not: a link rendered in the shadow root of a\r\n * consumer component that itself sits inside `<nav>` IS navigation. So the walk hops from\r\n * a shadow root to its host and continues.\r\n */\r\nfunction inNavigation(el: Element): boolean {\r\n let node: Element | null = el;\r\n while (node) {\r\n const hit = node.closest('nav, [role=\"navigation\"]');\r\n if (hit) return true;\r\n const root = node.getRootNode();\r\n node = root instanceof ShadowRoot ? root.host : null;\r\n }\r\n return false;\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAMA;;;;;;;;;;AAUG;MASU,QAAQ,CAAA;uGAAR,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,C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EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAK1B,WAAW,EAAA,UAAA,EAAA,CAAA;kBARvB,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EAAA,QAAA,EACN,2BAA2B,EAAA,eAAA,EAEpB,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,QAAQ,EAAA,MAAA,EAAA,CAAA,8wEAAA,CAAA,EAAA;;AAqB3C;;;;;AAKG;AACH,SAAS,YAAY,CAAC,EAAW,EAAA;IAC/B,IAAI,IAAI,GAAmB,EAAE;IAC7B,OAAO,IAAI,EAAE;QACX,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,0BAA0B,CAAC;AACpD,QAAA,IAAI,GAAG;AAAE,YAAA,OAAO,IAAI;AACpB,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE;AAC/B,QAAA,IAAI,GAAG,IAAI,YAAY,UAAU,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI;IACtD;AACA,IAAA,OAAO,KAAK;AACd;;AC1EA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skra/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -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.
|
|
13
|
+
"@skra/tokens": "^0.9.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@floating-ui/dom": "^1.7.6",
|
|
@@ -78,6 +78,10 @@
|
|
|
78
78
|
"types": "./types/skra-ui-field.d.ts",
|
|
79
79
|
"default": "./fesm2022/skra-ui-field.mjs"
|
|
80
80
|
},
|
|
81
|
+
"./file-upload": {
|
|
82
|
+
"types": "./types/skra-ui-file-upload.d.ts",
|
|
83
|
+
"default": "./fesm2022/skra-ui-file-upload.mjs"
|
|
84
|
+
},
|
|
81
85
|
"./icon": {
|
|
82
86
|
"types": "./types/skra-ui-icon.d.ts",
|
|
83
87
|
"default": "./fesm2022/skra-ui-icon.mjs"
|