@ckui/core 0.1.0-next.0 → 0.1.0-next.2
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/README.md +239 -0
- package/fesm2022/ckui-core-badge.mjs +169 -0
- package/fesm2022/ckui-core-badge.mjs.map +1 -0
- package/fesm2022/ckui-core-button.mjs +5 -13
- package/fesm2022/ckui-core-button.mjs.map +1 -1
- package/fesm2022/ckui-core-dialog.mjs +908 -0
- package/fesm2022/ckui-core-dialog.mjs.map +1 -0
- package/fesm2022/ckui-core-field.mjs +6 -10
- package/fesm2022/ckui-core-field.mjs.map +1 -1
- package/fesm2022/ckui-core-internal-overlay.mjs +468 -0
- package/fesm2022/ckui-core-internal-overlay.mjs.map +1 -0
- package/fesm2022/ckui-core-internal.mjs +271 -8
- package/fesm2022/ckui-core-internal.mjs.map +1 -1
- package/fesm2022/ckui-core-progress.mjs +165 -0
- package/fesm2022/ckui-core-progress.mjs.map +1 -0
- package/fesm2022/ckui-core-segmented.mjs +528 -0
- package/fesm2022/ckui-core-segmented.mjs.map +1 -0
- package/fesm2022/ckui-core-stepper.mjs +842 -0
- package/fesm2022/ckui-core-stepper.mjs.map +1 -0
- package/fesm2022/ckui-core-toast.mjs +883 -0
- package/fesm2022/ckui-core-toast.mjs.map +1 -0
- package/fesm2022/ckui-core.mjs +5 -1
- package/fesm2022/ckui-core.mjs.map +1 -1
- package/package.json +29 -1
- package/styles/tokens.css +3 -0
- package/types/ckui-core-badge.d.ts +44 -0
- package/types/ckui-core-button.d.ts +0 -1
- package/types/ckui-core-dialog.d.ts +219 -0
- package/types/ckui-core-field.d.ts +0 -1
- package/types/ckui-core-internal-overlay.d.ts +76 -0
- package/types/ckui-core-internal.d.ts +115 -8
- package/types/ckui-core-progress.d.ts +43 -0
- package/types/ckui-core-segmented.d.ts +124 -0
- package/types/ckui-core-stepper.d.ts +186 -0
- package/types/ckui-core-toast.d.ts +97 -0
- package/types/ckui-core.d.ts +4 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ckui-core-dialog.mjs","names":[],"sources":["../../../../projects/core/dialog/config.ts","../../../../projects/core/dialog/dialog-context.ts","../../../../projects/core/dialog/dialog-ref.ts","../../../../projects/core/dialog/dialog-container.ts","../../../../projects/core/dialog/dialog.service.ts","../../../../projects/core/dialog/dialog.component.ts","../../../../projects/core/dialog/dialog-parts.ts","../../../../projects/core/dialog/index.ts"],"sourcesContent":["import { InjectionToken, Injector } from '@angular/core';\n\nexport type CkDialogRole = 'dialog' | 'alertdialog';\n/** Largest inline size of a modal dialog: 24, 32 or 48rem. */\nexport type CkDialogWidth = 'sm' | 'md' | 'lg';\n/** `auto` opens a sheet on a narrow screen with a coarse pointer, a centred modal otherwise. */\nexport type CkDialogMode = 'auto' | 'modal' | 'sheet';\n\nexport interface CkDialogConfig<D = unknown> {\n /** What the content gets from `inject(CK_DIALOG_DATA)`. */\n data?: D;\n /** `alertdialog` for a message the user has to answer. Default `dialog`. */\n role?: CkDialogRole;\n /** Default `md`. Under a sheet the dialog is as wide as the screen. */\n width?: CkDialogWidth;\n /** Escape, a click on the backdrop and a swipe down close the dialog. Default `true`. */\n dismissible?: boolean;\n /** Shows the close button next to the title. Default `true`. */\n closeButton?: boolean;\n /** Default `auto`, decided at the moment the dialog opens. */\n mode?: CkDialogMode;\n /** A sheet as tall as the screen allows instead of as tall as its content. Default `false`. */\n fullHeight?: boolean;\n /**\n * The parent injector of a component's content, for providers the app root doesn't have (route\n * level, or the opener's own): pass `inject(Injector)` from the opener. `CK_DIALOG_DATA` and\n * `CkDialogRef` are provided on top. Template content keeps the injector of its template.\n */\n injector?: Injector;\n /** The accessible name when the content has no `ckDialogTitle`. */\n ariaLabel?: string;\n}\n\n/** The `data` of the config, for a dialog opened with a component. */\nexport const CK_DIALOG_DATA = new InjectionToken<unknown>('CK_DIALOG_DATA');\n","import { InjectionToken, Signal, computed, signal } from '@angular/core';\nimport { CkDialogMode } from './config';\n\n/** The ids of every title (or description) in the dialog; the newest one names it. */\nexport class CkDialogIds {\n private readonly entries = signal<readonly Signal<string>[]>([]);\n readonly current = computed(() => this.entries().at(-1)?.() ?? null);\n\n /** Returns the function that takes the entry out again; it leaves the others alone. */\n add(id: Signal<string>): () => void {\n this.entries.update((entries) => [...entries, id]);\n return () => this.entries.update((entries) => entries.filter((entry) => entry !== id));\n }\n}\n\n/** What the building blocks inside a dialog tell the dialog: the ids that name it. */\nexport class CkDialogContext {\n readonly titles = new CkDialogIds();\n readonly descriptions = new CkDialogIds();\n readonly titleId = this.titles.current;\n readonly descriptionId = this.descriptions.current;\n /** Resolved when the dialog opens. */\n readonly mode = signal<Exclude<CkDialogMode, 'auto'>>('modal');\n}\n\nexport const CK_DIALOG_CONTEXT = new InjectionToken<CkDialogContext>('CK_DIALOG_CONTEXT');\n","/** What a `CkDialogRef` calls into; supplied by `CkDialog`, not by consumers. */\nexport interface CkDialogRefControls<R> {\n readonly closing: Promise<void>;\n readonly closed: Promise<R | undefined>;\n close(result: R | undefined): void;\n}\n\n/** Controls one open dialog. Returned by `CkDialog.open`, injected by its content; never constructed directly. */\nexport class CkDialogRef<R = unknown> {\n /**\n * Resolves once, after the dialog has left the screen, with the result of the first `close()`.\n * Escape, a click on the backdrop and a swipe resolve it with `undefined`, and so does destroying\n * the app.\n */\n readonly closed: Promise<R | undefined>;\n /**\n * Resolves once, the moment the dialog starts to close (before the leave animation), whatever\n * the cause. `closed` follows when it has left the screen.\n */\n readonly closing: Promise<void>;\n private readonly controls: CkDialogRefControls<R>;\n\n constructor(controls: CkDialogRefControls<R>) {\n this.controls = controls;\n this.closed = controls.closed;\n this.closing = controls.closing;\n }\n\n /** Closes the dialog. Only the first call counts; later ones, with another result too, do nothing. */\n close(result?: R): void {\n this.controls.close(result);\n }\n}\n","import { CdkPortalOutlet, ComponentPortal, Portal, TemplatePortal } from '@angular/cdk/portal';\nimport {\n ChangeDetectionStrategy,\n Component,\n ComponentRef,\n EmbeddedViewRef,\n InjectionToken,\n Injector,\n TemplateRef,\n ViewContainerRef,\n ViewEncapsulation,\n inject,\n} from '@angular/core';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { CK_LABELS } from '@ckui/core';\nimport { CkButton } from '@ckui/core/button';\nimport { CkIcon } from '@ckui/core/internal';\nimport { CK_DIALOG_CONTEXT } from './dialog-context';\nimport { CkDialogRef } from './dialog-ref';\n\n/** What the service hands the container: the consumer's content and the parts of the config it shows. */\nexport interface CkDialogContainerSetup {\n readonly content: ComponentType<unknown> | TemplateRef<unknown>;\n readonly closeButton: boolean;\n readonly dismissible: boolean;\n}\n\nexport const CK_DIALOG_SETUP = new InjectionToken<CkDialogContainerSetup>('CK_DIALOG_SETUP');\n\n/** The dialog's own element inside the overlay: the padding, the close button and the consumer's content. */\n@Component({\n selector: 'ck-dialog-container',\n imports: [CdkPortalOutlet, CkButton, CkIcon],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ck-dialog',\n '[class.ck-dialog--sheet]': 'context.mode() === \"sheet\"',\n '[class.ck-dialog--grab]': 'context.mode() === \"sheet\" && setup.dismissible',\n '[class.ck-dialog--has-close]': 'setup.closeButton',\n '[class.ck-dialog--no-title]': 'context.titleId() === null',\n },\n template: `\n <div class=\"ck-dialog__content\">\n <ng-template [cdkPortalOutlet]=\"portal\" (attached)=\"onAttached($event)\" />\n </div>\n @if (setup.closeButton) {\n <button\n ckButton\n type=\"button\"\n variant=\"ghost\"\n size=\"md\"\n iconOnly\n class=\"ck-dialog__close\"\n [attr.aria-label]=\"labels().close\"\n (click)=\"ref.close()\"\n >\n <ck-icon name=\"close\" />\n </button>\n }\n `,\n styleUrl: './dialog.css',\n})\nexport class CkDialogContainer {\n protected readonly context = inject(CK_DIALOG_CONTEXT);\n protected readonly setup = inject(CK_DIALOG_SETUP);\n protected readonly labels = inject(CK_LABELS);\n protected readonly ref = inject(CkDialogRef);\n\n protected readonly portal: Portal<unknown>;\n\n constructor() {\n const injector = inject(Injector);\n this.portal =\n this.setup.content instanceof TemplateRef\n ? new TemplatePortal(this.setup.content, inject(ViewContainerRef), undefined, injector)\n : new ComponentPortal(this.setup.content, null, injector);\n }\n\n /** A component's host element has to be a flex column too, or its body could not scroll. */\n protected onAttached(attached: ComponentRef<unknown> | EmbeddedViewRef<unknown> | null): void {\n if (attached && 'location' in attached) {\n (attached.location.nativeElement as HTMLElement).classList.add('ck-dialog__component');\n }\n }\n}\n","import { ComponentType } from '@angular/cdk/portal';\nimport { InteractivityChecker } from '@angular/cdk/a11y';\nimport {\n DestroyRef,\n EffectRef,\n Injectable,\n Injector,\n TemplateRef,\n effect,\n inject,\n} from '@angular/core';\nimport { CkOverlayHandle, CkOverlayHost } from '@ckui/core/internal/overlay';\nimport { CK_DIALOG_DATA, CkDialogConfig } from './config';\nimport { CK_DIALOG_CONTEXT, CkDialogContext } from './dialog-context';\nimport { CK_DIALOG_SETUP, CkDialogContainer } from './dialog-container';\nimport { CkDialogRef } from './dialog-ref';\n\ndeclare const ngDevMode: unknown;\n\nconst TABBABLE_CANDIDATES =\n 'a[href], button, input, select, textarea, summary, [tabindex], [contenteditable], audio[controls], video[controls]';\n\ninterface ActiveDialog {\n close(): void;\n /** Settles the result promise and stops everything that outlives the overlay. */\n destroy(): void;\n}\n\n/**\n * Opens modal dialogs, which become bottom sheets on a phone. Takes a component or a template as\n * content and returns a `CkDialogRef` that closes it and delivers the result.\n */\n@Injectable({ providedIn: 'root' })\nexport class CkDialog {\n private readonly overlay = inject(CkOverlayHost);\n private readonly checker = inject(InteractivityChecker);\n private readonly injector = inject(Injector);\n private readonly active = new Set<ActiveDialog>();\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n for (const dialog of [...this.active]) {\n dialog.destroy();\n }\n this.active.clear();\n });\n }\n\n /**\n * Opens a dialog. The content injects `CK_DIALOG_DATA` and `CkDialogRef`; a component sees the\n * app's providers, plus those of `config.injector` when given. On the server nothing is shown and\n * `closed` resolves with `undefined` at once.\n */\n open<C, D = unknown, R = unknown>(\n content: ComponentType<C> | TemplateRef<unknown>,\n config: CkDialogConfig<D> = {},\n ): CkDialogRef<R> {\n const dismissible = config.dismissible ?? true;\n const closeButton = config.closeButton ?? true;\n const context = new CkDialogContext();\n\n let resolveClosed: (result: R | undefined) => void = () => undefined;\n const closed = new Promise<R | undefined>((resolve) => (resolveClosed = resolve));\n let resolveClosing: () => void = () => undefined;\n const closing = new Promise<void>((resolve) => (resolveClosing = resolve));\n let handle: CkOverlayHandle | null = null;\n let requested = false;\n let result: R | undefined;\n let settled = false;\n let labelling: EffectRef | null = null;\n const dialog: ActiveDialog = { close: () => ref.close(), destroy: () => settle() };\n\n const settle = (): void => {\n if (settled) {\n return;\n }\n settled = true;\n resolveClosing();\n labelling?.destroy();\n this.active.delete(dialog);\n resolveClosed(result);\n };\n\n const ref = new CkDialogRef<R>({\n closed,\n closing,\n close: (value) => {\n if (requested) {\n return;\n }\n requested = true;\n result = value;\n resolveClosing();\n // Closed from the content's constructor, before the overlay exists: it closes right after opening.\n void handle?.close();\n },\n });\n\n this.active.add(dialog);\n\n const dialogInjector = Injector.create({\n parent: config.injector ?? this.injector,\n providers: [\n { provide: CK_DIALOG_CONTEXT, useValue: context },\n { provide: CkDialogRef, useValue: ref },\n { provide: CK_DIALOG_DATA, useValue: config.data },\n {\n provide: CK_DIALOG_SETUP,\n useValue: { content, closeButton, dismissible },\n },\n ],\n });\n\n try {\n handle = this.overlay.open(\n CkDialogContainer,\n {\n mode: config.mode ?? 'auto',\n dismissible,\n fullHeight: config.fullHeight ?? false,\n role: config.role ?? 'dialog',\n ariaLabel: config.ariaLabel,\n panelClass: ['ck-dialog-panel', `ck-dialog-panel--${config.width ?? 'md'}`],\n onDismissRequest: () => ref.close(),\n initialFocus: () => (handle ? this.initialFocus(handle.panel) : null),\n },\n dialogInjector,\n );\n } catch (error) {\n settle();\n throw error;\n }\n\n const opened = handle;\n context.mode.set(opened.mode);\n labelling = effect(\n () => {\n this.setAttribute(opened.panel, 'aria-labelledby', context.titleId());\n this.setAttribute(opened.panel, 'aria-describedby', context.descriptionId());\n },\n { injector: this.injector },\n );\n void opened.closed.then(settle);\n if (requested) {\n void opened.close();\n }\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n void opened.opened.then(() => {\n if (!settled && context.titleId() === null && !config.ariaLabel) {\n console.warn(\n 'CkDialog: the dialog has no accessible name. Add [ckDialogTitle] to a heading in its content or set `ariaLabel` in the config.',\n );\n }\n });\n }\n return ref;\n }\n\n /** Closes every open dialog as if each one's `close()` had been called without a result. */\n closeAll(): void {\n for (const dialog of [...this.active]) {\n dialog.close();\n }\n }\n\n private setAttribute(element: HTMLElement, name: string, value: string | null): void {\n if (value === null) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value);\n }\n }\n\n /**\n * The marked element, else the first tabbable one of the content (the close button comes last in\n * the DOM, and the scrolling body itself is skipped), else the panel.\n */\n private initialFocus(panel: HTMLElement): HTMLElement {\n const marked = Array.from(\n panel.querySelectorAll<HTMLElement>('[data-ck-dialog-initial-focus]'),\n ).find((candidate) => this.checker.isFocusable(candidate));\n if (marked) {\n return marked;\n }\n const content = panel.querySelector<HTMLElement>('.ck-dialog__content');\n const first = Array.from(\n content?.querySelectorAll<HTMLElement>(TABBABLE_CANDIDATES) ?? [],\n ).find(\n (candidate) =>\n !candidate.classList.contains('ck-dialog-body') && this.checker.isTabbable(candidate),\n );\n return first ?? panel;\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n PLATFORM_ID,\n TemplateRef,\n ViewEncapsulation,\n afterRenderEffect,\n booleanAttribute,\n contentChild,\n inject,\n input,\n model,\n output,\n untracked,\n} from '@angular/core';\nimport { CkDialogMode, CkDialogRole, CkDialogWidth } from './config';\nimport { CkDialogRef } from './dialog-ref';\nimport { CkDialog } from './dialog.service';\n\ndeclare const ngDevMode: unknown;\n\n/**\n * A dialog declared in a template. Its content is one `<ng-template>` that is only rendered while\n * `open` is true, so nothing in it exists while the dialog is closed. `[(open)]` follows the dialog:\n * Escape, the backdrop, the close button and `[ckDialogClose]` set it back to `false`.\n */\n@Component({\n selector: 'ck-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { style: 'display: none' },\n template: ``,\n})\nexport class CkDialogComponent {\n readonly open = model(false);\n readonly role = input<CkDialogRole>('dialog');\n readonly width = input<CkDialogWidth>('md');\n readonly dismissible = input(true, { transform: booleanAttribute });\n readonly closeButton = input(true, { transform: booleanAttribute });\n readonly mode = input<CkDialogMode>('auto');\n readonly fullHeight = input(false, { transform: booleanAttribute });\n readonly ariaLabel = input<string | undefined>(undefined);\n /** Emits when the dialog has left the screen, with the result of `[ckDialogClose]`, else `undefined`. */\n readonly closed = output<unknown>();\n\n private readonly template = contentChild(TemplateRef);\n private readonly dialog = inject(CkDialog);\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private ref: CkDialogRef | null = null;\n private destroyed = false;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => {\n this.destroyed = true;\n this.ref?.close();\n this.ref = null;\n });\n // After render: never on the server, and never while a template is being checked.\n afterRenderEffect(() => {\n const wanted = this.open();\n if (!this.isBrowser) {\n return;\n }\n untracked(() => this.sync(wanted));\n });\n }\n\n private sync(wanted: boolean): void {\n if (wanted && !this.ref) {\n this.show();\n } else if (!wanted && this.ref) {\n const ref = this.ref;\n this.ref = null;\n ref.close();\n }\n }\n\n private show(): void {\n const template = this.template();\n if (!template) {\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n console.warn('ck-dialog: put the content in an <ng-template> inside the element.');\n }\n this.open.set(false);\n return;\n }\n const ref = this.dialog.open(template, {\n role: this.role(),\n width: this.width(),\n dismissible: this.dismissible(),\n closeButton: this.closeButton(),\n mode: this.mode(),\n fullHeight: this.fullHeight(),\n ariaLabel: this.ariaLabel(),\n });\n this.ref = ref;\n // `open` follows the moment the close starts, so the opener can reopen during the leave animation.\n void ref.closing.then(() => {\n if (!this.destroyed && this.ref === ref) {\n this.ref = null;\n this.open.set(false);\n }\n });\n void ref.closed.then((result) => {\n if (!this.destroyed) {\n this.closed.emit(result);\n }\n });\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n Directive,\n ElementRef,\n PLATFORM_ID,\n Renderer2,\n ViewEncapsulation,\n afterNextRender,\n inject,\n input,\n untracked,\n} from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { createCkId } from '@ckui/core/internal';\nimport { CK_DIALOG_CONTEXT } from './dialog-context';\nimport { CkDialogRef } from './dialog-ref';\n\n/** Marks a heading as the title of the dialog: it names the dialog (`aria-labelledby`). */\n@Directive({\n selector: '[ckDialogTitle]',\n host: { class: 'ck-dialog__title', '[attr.id]': 'id()' },\n})\nexport class CkDialogTitle {\n /** Default: a generated id. */\n readonly id = input(createCkId('ck-dialog-title'));\n\n constructor() {\n const context = inject(CK_DIALOG_CONTEXT, { optional: true });\n if (context) {\n const remove = untracked(() => context.titles.add(this.id));\n inject(DestroyRef).onDestroy(() => untracked(remove));\n }\n }\n}\n\n/** Marks the text that explains the dialog: it describes it (`aria-describedby`). */\n@Directive({\n selector: '[ckDialogDescription]',\n host: { class: 'ck-dialog__description', '[attr.id]': 'id()' },\n})\nexport class CkDialogDescription {\n /** Default: a generated id. */\n readonly id = input(createCkId('ck-dialog-description'));\n\n constructor() {\n const context = inject(CK_DIALOG_CONTEXT, { optional: true });\n if (context) {\n const remove = untracked(() => context.descriptions.add(this.id));\n inject(DestroyRef).onDestroy(() => untracked(remove));\n }\n }\n}\n\n/** The part of a dialog that scrolls when the content is taller than the screen. */\n@Component({\n selector: 'ck-dialog-body',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'ck-dialog-body' },\n template: `<div class=\"ck-dialog-body__inner\"><ng-content /></div>`,\n})\nexport class CkDialogBody {\n constructor() {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n const renderer = inject(Renderer2);\n const destroyRef = inject(DestroyRef);\n let ownTabindex = false;\n\n // A region that scrolls must be reachable by keyboard, but only while it actually scrolls.\n const update = (): void => {\n const scrolls = element.scrollHeight > element.clientHeight + 1;\n if (scrolls && !element.hasAttribute('tabindex')) {\n renderer.setAttribute(element, 'tabindex', '0');\n ownTabindex = true;\n } else if (!scrolls && ownTabindex) {\n renderer.removeAttribute(element, 'tabindex');\n ownTabindex = false;\n }\n };\n\n if (isPlatformBrowser(inject(PLATFORM_ID))) {\n afterNextRender(() => {\n const Observer = element.ownerDocument.defaultView?.ResizeObserver;\n if (!Observer || destroyRef.destroyed) {\n return;\n }\n const observer = new Observer(update);\n observer.observe(element);\n observer.observe(element.firstElementChild!);\n destroyRef.onDestroy(() => observer.disconnect());\n update();\n });\n }\n }\n}\n\n/** The row of buttons at the bottom of a dialog. On a sheet they stack and fill the width. */\n@Component({\n selector: 'ck-dialog-actions',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: { class: 'ck-dialog-actions' },\n template: `<ng-content />`,\n})\nexport class CkDialogActions {}\n\n/** Closes the dialog with the bound value as its result when the element is clicked. */\n@Directive({\n selector: '[ckDialogClose]',\n host: { '(click)': 'close()' },\n})\nexport class CkDialogClose<R = unknown> {\n /** The result of the dialog; empty means `undefined`. */\n readonly result = input<R | '' | undefined>(undefined, { alias: 'ckDialogClose' });\n\n private readonly ref = inject<CkDialogRef<R>>(CkDialogRef, { optional: true });\n\n constructor() {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n // A native button in a form would submit it.\n if (element.tagName === 'BUTTON' && !element.hasAttribute('type')) {\n inject(Renderer2).setAttribute(element, 'type', 'button');\n }\n }\n\n protected close(): void {\n const result = this.result();\n this.ref?.close(result === '' ? undefined : result);\n }\n}\n\n/** Takes focus when the dialog opens, e.g. the least destructive action of an `alertdialog`. */\n@Directive({\n selector: '[ckDialogInitialFocus]',\n host: { 'data-ck-dialog-initial-focus': '' },\n})\nexport class CkDialogInitialFocus {}\n","import { CkDialogComponent } from './dialog.component';\nimport {\n CkDialogActions,\n CkDialogBody,\n CkDialogClose,\n CkDialogDescription,\n CkDialogInitialFocus,\n CkDialogTitle,\n} from './dialog-parts';\n\nexport type { CkDialogConfig, CkDialogMode, CkDialogRole, CkDialogWidth } from './config';\nexport { CK_DIALOG_DATA } from './config';\nexport { CkDialogRef } from './dialog-ref';\nexport { CkDialog } from './dialog.service';\nexport { CkDialogComponent } from './dialog.component';\nexport {\n CkDialogActions,\n CkDialogBody,\n CkDialogClose,\n CkDialogDescription,\n CkDialogInitialFocus,\n CkDialogTitle,\n} from './dialog-parts';\n\n/** Everything a template needs for a dialog: `imports: [CK_DIALOG_IMPORTS]`. */\nexport const CK_DIALOG_IMPORTS = [\n CkDialogComponent,\n CkDialogTitle,\n CkDialogDescription,\n CkDialogBody,\n CkDialogActions,\n CkDialogClose,\n CkDialogInitialFocus,\n] as const;\n"],"mappings":";;;;;;;;;AAkCA,MAAa,iBAAiB,IAAI,eAAwB,gBAAgB;AC9B1E,IAAa,cAAb,MAAwB;CACL,UAAU,OAAkC,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CACvD,UAAU,eAAe,KAAK,QAAO,CAAE,CAAC,GAAG,EAAE,CAAC,GAAE,KAAM,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAGpE,IAAI,IAAkB;EACpB,KAAK,QAAQ,QAAQ,YAAY,CAAC,GAAG,SAAS,EAAE,CAAC;EACjD,aAAa,KAAK,QAAQ,QAAQ,YAAY,QAAQ,QAAQ,UAAU,UAAU,EAAE,CAAC;CACvF;AACD;AAGD,IAAa,kBAAb,MAA4B;CACjB,SAAS,IAAI,YAAW;CACxB,eAAe,IAAI,YAAW;CAC9B,UAAU,KAAK,OA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AA;EAAoB,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAApB,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAoB,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,YAAA,EAAA,gCAAA,GAAA,EAAA;EAAA,UAAA;CAAA,CAAA;;AAApB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAJhC,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,gCAAgC,GAAE;EAC3C,CAAA;;;AChHD,MAAa,oBAAoB;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;AACQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, EnvironmentInjector, Injectable, InjectionToken, PLATFORM_ID, Renderer2, RendererStyleFlags2, ViewEncapsulation, afterEveryRender, afterNextRender, booleanAttribute, computed, contentChild, contentChildren, createComponent, effect, inject, input, signal, untracked, viewChild } from "@angular/core";
|
|
3
3
|
import { isPlatformBrowser } from "@angular/common";
|
|
4
|
-
import { createCkId } from "@ckui/core/internal";
|
|
4
|
+
import { createCkId, hasAccessibleName } from "@ckui/core/internal";
|
|
5
5
|
import { AbstractControl, ControlContainer, FormControl, NgControl, Validators } from "@angular/forms";
|
|
6
6
|
import { CK_CONFIG } from "@ckui/core";
|
|
7
7
|
var CkPrefix = class CkPrefix {
|
|
@@ -780,7 +780,11 @@ var CkInput = class CkInput {
|
|
|
780
780
|
this.observeWidth(destroyRef, () => destroyed);
|
|
781
781
|
if (typeof ngDevMode !== "undefined" && ngDevMode && this.field === null) {
|
|
782
782
|
this.control.refresh();
|
|
783
|
-
if (!
|
|
783
|
+
if (!hasAccessibleName(this.element, {
|
|
784
|
+
title: true,
|
|
785
|
+
text: false,
|
|
786
|
+
labels: true
|
|
787
|
+
})) console.warn("[ckui] ckInput outside a ck-field has no accessible name. Add a <label for>, aria-label or aria-labelledby.", this.element);
|
|
784
788
|
}
|
|
785
789
|
});
|
|
786
790
|
}
|
|
@@ -816,14 +820,6 @@ var CkInput = class CkInput {
|
|
|
816
820
|
this.measured = true;
|
|
817
821
|
element.style.overflowY = previousOverflow;
|
|
818
822
|
}
|
|
819
|
-
hasAccessibleName() {
|
|
820
|
-
const element = this.element;
|
|
821
|
-
const attribute = (name) => (element.getAttribute(name) ?? "").trim() !== "";
|
|
822
|
-
if (attribute("aria-label") || attribute("title")) return true;
|
|
823
|
-
const labelledBy = (element.getAttribute("aria-labelledby") ?? "").split(/\s+/);
|
|
824
|
-
const named = (node) => (node?.textContent ?? "").trim() !== "";
|
|
825
|
-
return labelledBy.some((id) => id !== "" && named(element.ownerDocument.getElementById(id))) || Array.from(element.labels ?? []).some(named);
|
|
826
|
-
}
|
|
827
823
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
828
824
|
minVersion: "12.0.0",
|
|
829
825
|
version: "22.2.4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ckui-core-field.mjs","names":[],"sources":["../../../../projects/core/field/affix.ts","../../../../projects/core/field/control-state.ts","../../../../projects/core/field/error.ts","../../../../projects/core/field/styles.ts","../../../../projects/core/field/hint.ts","../../../../projects/core/field/field.ts","../../../../projects/core/field/field.html","../../../../projects/core/field/input.ts","../../../../projects/core/field/index.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/** Content before the control: text such as `€`, an icon, or a button. */\n@Directive({\n selector: '[ckPrefix]',\n host: { class: 'ck-prefix' },\n})\nexport class CkPrefix {}\n\n/** Content after the control: text, an icon, or a button such as a password toggle. */\n@Directive({\n selector: '[ckSuffix]',\n host: { class: 'ck-suffix' },\n})\nexport class CkSuffix {}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n PLATFORM_ID,\n ElementRef,\n Injectable,\n InjectionToken,\n Renderer2,\n Signal,\n afterEveryRender,\n computed,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlContainer,\n FormControl,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { CkSize } from '@ckui/core';\nimport { createCkId } from '@ckui/core/internal';\n\n/** What `ck-field` asks of `ckInput` for the ARIA attributes on the native control. */\nexport interface CkAriaWiring {\n readonly describedBy: readonly string[];\n /** Every hint and error id of the field, shown or not; tokens with these ids belong to the field. */\n readonly libraryIds: readonly string[];\n readonly invalid: boolean;\n readonly required: boolean;\n}\n\n/** What `ckInput` tells `ck-field` about the native control. Internal, not exported from the entry point. */\nexport interface CkControlState {\n readonly element: HTMLInputElement | HTMLTextAreaElement;\n readonly id: Signal<string>;\n readonly focused: Signal<boolean>;\n readonly hasValue: Signal<boolean>;\n readonly hasPlaceholder: Signal<boolean>;\n readonly nativeUi: Signal<boolean>;\n readonly disabled: Signal<boolean>;\n readonly readonly: Signal<boolean>;\n readonly required: Signal<boolean>;\n readonly invalid: Signal<boolean>;\n readonly touched: Signal<boolean>;\n readonly submitted: Signal<boolean>;\n /** Counts value changes, however they happened (typing, forms API, `[value]`). */\n readonly version: Signal<number>;\n setWiring(wiring: CkAriaWiring): void;\n}\n\n/** What `ckInput`, `ck-hint` and `ck-error` ask of the surrounding `ck-field`. */\nexport interface CkFieldContext {\n readonly resolvedSize: Signal<CkSize>;\n readonly errorsVisible: Signal<boolean>;\n}\n\nexport const CK_CONTROL_STATE = new InjectionToken<CkControlState>('CK_CONTROL_STATE');\nexport const CK_FIELD_CONTEXT = new InjectionToken<CkFieldContext>('CK_FIELD_CONTEXT');\n\nconst NATIVE_UI_TYPES = new Set(['date', 'time', 'datetime-local', 'month', 'week']);\n\ninterface Snapshot {\n readonly id: string;\n readonly focused: boolean;\n readonly hasValue: boolean;\n readonly hasPlaceholder: boolean;\n readonly nativeUi: boolean;\n readonly disabled: boolean;\n readonly readonly: boolean;\n readonly required: boolean;\n readonly invalid: boolean;\n readonly touched: boolean;\n readonly submitted: boolean;\n}\n\nconst INITIAL_SNAPSHOT: Snapshot = {\n id: '',\n focused: false,\n hasValue: false,\n hasPlaceholder: false,\n nativeUi: false,\n disabled: false,\n readonly: false,\n required: false,\n invalid: false,\n touched: false,\n submitted: false,\n};\n\nfunction sameSnapshot(previous: Snapshot, next: Snapshot): boolean {\n return (Object.keys(previous) as (keyof Snapshot)[]).every((key) => previous[key] === next[key]);\n}\n\n/**\n * Holds an attribute the component overrides, and gives the consumer's own value back afterwards.\n * The consumer's value is also kept in a `data-ck-claim-*` attribute, so markup that was rendered\n * earlier (server render) is recognised: a value the library wrote is never mistaken for the\n * consumer's.\n */\nclass AttributeClaim {\n private claimed = false;\n private ours: string | null = null;\n private theirs: string | null = null;\n private readonly marker: string;\n\n constructor(\n private readonly element: HTMLElement,\n private readonly name: string,\n private readonly renderer: Renderer2,\n ) {\n this.marker = `data-ck-claim-${name}`;\n }\n\n /** `desired` of `null` releases the attribute. A consumer rewriting it in between is noticed. */\n apply(desired: string | null): void {\n const current = this.element.getAttribute(this.name);\n if (!this.claimed) {\n const recorded = this.element.getAttribute(this.marker);\n if (recorded !== null) {\n this.claimed = true;\n this.ours = current;\n this.theirs = recorded === 'none' ? null : recorded.slice('value:'.length);\n } else {\n this.theirs = current;\n }\n } else if (current !== this.ours) {\n this.theirs = current;\n }\n if (desired !== null) {\n this.claimed = true;\n this.ours = desired;\n this.renderer.setAttribute(\n this.element,\n this.marker,\n this.theirs === null ? 'none' : `value:${this.theirs}`,\n );\n if (current !== desired) {\n this.renderer.setAttribute(this.element, this.name, desired);\n }\n } else if (this.claimed) {\n this.claimed = false;\n this.ours = null;\n this.renderer.removeAttribute(this.element, this.marker);\n if (this.theirs === null) {\n this.renderer.removeAttribute(this.element, this.name);\n } else if (current !== this.theirs) {\n this.renderer.setAttribute(this.element, this.name, this.theirs);\n }\n }\n }\n}\n\nfunction tokens(value: string | null): string[] {\n return (value ?? '').split(/\\s+/).filter((token) => token !== '');\n}\n\n/** A control inside `<fieldset disabled>` is disabled without a `disabled` attribute of its own. */\nfunction inDisabledFieldset(element: HTMLElement): boolean {\n try {\n return element.matches(':disabled');\n } catch {\n return false;\n }\n}\n\nfunction isEmptyModel(value: unknown): boolean {\n return value === null || value === undefined || value === '';\n}\n\n/**\n * Reads a native input from the DOM and from whichever forms API drives it (Reactive Forms,\n * `ngModel`, Signal Forms) into signals. Provided by `ckInput`, one per control.\n */\n@Injectable()\nexport class CkInputControl implements CkControlState {\n readonly element =\n inject<ElementRef<HTMLInputElement | HTMLTextAreaElement>>(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly ngControl = inject(NgControl, { self: true, optional: true });\n private readonly container = inject(ControlContainer, { optional: true });\n\n private readonly snapshot = signal<Snapshot>(INITIAL_SNAPSHOT, { equal: sameSnapshot });\n private readonly versionState = signal(0);\n readonly version = this.versionState.asReadonly();\n readonly id = computed(() => this.snapshot().id);\n readonly focused = computed(() => this.snapshot().focused);\n readonly hasValue = computed(() => this.snapshot().hasValue);\n readonly hasPlaceholder = computed(() => this.snapshot().hasPlaceholder);\n readonly nativeUi = computed(() => this.snapshot().nativeUi);\n readonly disabled = computed(() => this.snapshot().disabled);\n readonly readonly = computed(() => this.snapshot().readonly);\n readonly required = computed(() => this.snapshot().required);\n readonly invalid = computed(() => this.snapshot().invalid);\n readonly touched = computed(() => this.snapshot().touched);\n readonly submitted = computed(() => this.snapshot().submitted);\n\n private wiring: CkAriaWiring | null = null;\n private lastValue = '';\n private lastModelEmpty = true;\n private readonly invalidClaim = new AttributeClaim(this.element, 'aria-invalid', this.renderer);\n private readonly requiredClaim = new AttributeClaim(this.element, 'aria-required', this.renderer);\n private watchedControl: AbstractControl | null = null;\n private watchedForm: AbstractControl | null = null;\n private subscriptions: { unsubscribe(): void }[] = [];\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly libraryIdsSeen = new Set<string>();\n private probedValidator: unknown;\n private probedVerdict = false;\n\n constructor() {\n if (!this.isBrowser) {\n return;\n }\n const element = this.element;\n const destroyRef = inject(DestroyRef);\n if (element.id === '') {\n this.renderer.setAttribute(element, 'id', createCkId('ck-input'));\n }\n const listener = (): void => this.refresh();\n for (const type of ['focus', 'blur', 'input', 'change']) {\n element.addEventListener(type, listener);\n destroyRef.onDestroy(() => element.removeEventListener(type, listener));\n }\n destroyRef.onDestroy(() => this.unsubscribe());\n // Signal Forms state is read through signals, so this re-runs when it changes.\n effect(() => this.refresh());\n afterEveryRender(() => {\n this.refresh();\n this.applyWiring();\n });\n }\n\n setWiring(wiring: CkAriaWiring): void {\n if (!this.isBrowser) {\n return;\n }\n this.wiring = wiring;\n this.applyWiring();\n }\n\n /** Copies the current DOM and forms state into the signals. Cheap when nothing changed. */\n refresh(): void {\n if (!this.isBrowser) {\n return;\n }\n const element = this.element;\n const control = this.ngControl;\n this.watch();\n\n if (element.id === '') {\n this.renderer.setAttribute(element, 'id', createCkId('ck-input'));\n }\n const type = element.tagName === 'INPUT' ? (element as HTMLInputElement).type : '';\n const model: unknown = control?.value;\n const modelEmpty = isEmptyModel(model);\n // A number input holding \"-\" or \"1e\" reports an empty value but is not empty.\n const hasValue = element.value !== '' || !modelEmpty || !!element.validity?.badInput;\n if (element.value !== this.lastValue || modelEmpty !== this.lastModelEmpty) {\n this.lastValue = element.value;\n this.lastModelEmpty = modelEmpty;\n this.versionState.update((count) => count + 1);\n }\n const form = this.container?.formDirective as { submitted?: boolean } | null | undefined;\n\n this.snapshot.set({\n id: element.id,\n focused: element.ownerDocument?.activeElement === element,\n hasValue,\n hasPlaceholder: element.placeholder.trim() !== '',\n nativeUi: NATIVE_UI_TYPES.has(type),\n disabled: element.disabled || (control?.disabled ?? false) || inDisabledFieldset(element),\n readonly: element.readOnly,\n required: element.required || this.hasRequiredValidator(),\n invalid: control?.invalid ?? false,\n touched: control?.touched ?? false,\n submitted: form?.submitted === true,\n });\n }\n\n private hasRequiredValidator(): boolean {\n const control = this.ngControl?.control;\n if (!control) {\n return false;\n }\n if (control.hasValidator?.(Validators.required)) {\n return true;\n }\n // A composed validator hides `Validators.required`; ask it what it says about an empty value.\n const validator = control.validator;\n if (validator !== this.probedValidator) {\n const verdict = validator?.(new FormControl(''));\n this.probedValidator = validator;\n this.probedVerdict = verdict !== null && verdict !== undefined && 'required' in verdict;\n }\n return this.probedVerdict;\n }\n\n /** (Re)subscribes when the control or its form changes. Reactive Forms has no signals to read. */\n private watch(): void {\n const control = this.ngControl?.control;\n const nextControl = control instanceof AbstractControl ? control : null;\n const root = (this.container?.formDirective as { control?: unknown } | null | undefined)\n ?.control;\n const nextForm = root instanceof AbstractControl ? root : null;\n if (nextControl === this.watchedControl && nextForm === this.watchedForm) {\n return;\n }\n this.unsubscribe();\n this.watchedControl = nextControl;\n this.watchedForm = nextForm;\n const listener = (): void => this.refresh();\n for (const target of new Set([nextControl, nextForm])) {\n if (target) {\n this.subscriptions.push(target.events.subscribe(listener));\n }\n }\n }\n\n private unsubscribe(): void {\n for (const subscription of this.subscriptions) {\n subscription.unsubscribe();\n }\n this.subscriptions = [];\n this.watchedControl = null;\n this.watchedForm = null;\n }\n\n private applyWiring(): void {\n const wiring = this.wiring;\n if (!wiring) {\n return;\n }\n const element = this.element;\n const current = tokens(element.getAttribute('aria-describedby'));\n // An id the field ever owned stays the field's, even after its hint or error is gone.\n wiring.libraryIds.forEach((id) => this.libraryIdsSeen.add(id));\n const consumer = current.filter((token) => !this.libraryIdsSeen.has(token));\n const desired = [...consumer, ...wiring.describedBy];\n if (desired.join(' ') !== current.join(' ')) {\n if (desired.length > 0) {\n this.renderer.setAttribute(element, 'aria-describedby', desired.join(' '));\n } else {\n this.renderer.removeAttribute(element, 'aria-describedby');\n }\n }\n this.invalidClaim.apply(wiring.invalid ? 'true' : null);\n this.requiredClaim.apply(wiring.required && !element.required ? 'true' : null);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, Renderer2, computed, inject } from '@angular/core';\nimport { createCkId } from '@ckui/core/internal';\nimport { CK_FIELD_CONTEXT } from './control-state';\n\ndeclare const ngDevMode: unknown;\n\n/**\n * An error message in a field. It is hidden until the field shows errors, whatever the consumer\n * renders, and it joins the control's description while it is visible.\n */\n@Directive({\n selector: 'ck-error',\n host: {\n class: 'ck-error',\n '[hidden]': 'hidden()',\n },\n})\nexport class CkError {\n private readonly field = inject(CK_FIELD_CONTEXT, { optional: true });\n protected readonly hidden = computed(() => this.field !== null && !this.field.errorsVisible());\n\n constructor() {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (isPlatformBrowser(inject(PLATFORM_ID)) && element.id === '') {\n inject(Renderer2).setAttribute(element, 'id', createCkId('ck-error'));\n }\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.field === null) {\n console.warn('[ckui] ck-error is outside a ck-field, so it is always visible.', element);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n EnvironmentInjector,\n ViewEncapsulation,\n createComponent,\n inject,\n} from '@angular/core';\n\n/** The one place field.css is compiled in; every field and standalone input instantiates it. */\n@Component({\n selector: 'ck-field-styles',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: './field.css',\n})\nclass CkFieldStyles {}\n\n/** Loads the field stylesheet for as long as the calling directive or component lives. */\nexport function loadFieldStyles(): void {\n const styles = createComponent(CkFieldStyles, {\n environmentInjector: inject(EnvironmentInjector),\n });\n inject(DestroyRef).onDestroy(() => styles.destroy());\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, Renderer2, inject } from '@angular/core';\nimport { createCkId } from '@ckui/core/internal';\n\n/** Help text under a field. It stays visible next to an error and is part of the control's description. */\n@Directive({\n selector: 'ck-hint',\n host: { class: 'ck-hint' },\n})\nexport class CkHint {\n constructor() {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (isPlatformBrowser(inject(PLATFORM_ID)) && element.id === '') {\n inject(Renderer2).setAttribute(element, 'id', createCkId('ck-hint'));\n }\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n PLATFORM_ID,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterEveryRender,\n afterNextRender,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport { CK_CONFIG, CkSize } from '@ckui/core';\nimport { CK_CONTROL_STATE, CK_FIELD_CONTEXT, CkFieldContext } from './control-state';\nimport { CkPrefix } from './affix';\nimport { loadFieldStyles } from './styles';\nimport { CkError } from './error';\nimport { CkHint } from './hint';\n\ndeclare const ngDevMode: unknown;\n\nconst LABEL_CLASS = 'ck-field__label';\nconst REQUIRED_CLASS = 'ck-field__required';\n\n/**\n * Wraps one native `ckInput` with a floating `<label>`, `ck-hint`, `ck-error`, and `[ckPrefix]` /\n * `[ckSuffix]` content, and wires ids and ARIA between them.\n */\n@Component({\n selector: 'ck-field',\n templateUrl: './field.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: CK_FIELD_CONTEXT, useExisting: CkField }],\n host: {\n class: 'ck-field',\n '[class]': 'modifierClasses()',\n },\n})\nexport class CkField implements CkFieldContext {\n /** `undefined` uses the size from `provideCkui`. */\n readonly size = input<CkSize | undefined>(undefined);\n /** `always` keeps the label on the border even when the control is empty and unfocused. */\n readonly labelFloat = input<'auto' | 'always'>('auto');\n /** `undefined` follows the control; `true` or `false` forces the invalid look and the errors. */\n readonly invalid = input<boolean | undefined>(undefined);\n\n private readonly config = inject(CK_CONFIG);\n private readonly controls = contentChildren(CK_CONTROL_STATE, { descendants: true });\n private readonly hints = contentChildren(CkHint, { descendants: true, read: ElementRef });\n private readonly errors = contentChildren(CkError, { descendants: true, read: ElementRef });\n private readonly prefix = contentChild(CkPrefix, { descendants: true });\n private readonly main = viewChild<ElementRef<HTMLElement>>('main');\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private labelForSetByField = '';\n\n /** @internal Used by `ckInput` and `ck-error`. */\n readonly resolvedSize = computed(() => this.size() ?? this.config.size);\n private readonly control = computed(() => this.controls()[0] ?? null);\n\n /** @internal Used by `ck-error`. */\n readonly errorsVisible = computed(() => {\n const forced = this.invalid();\n if (forced !== undefined) {\n return forced;\n }\n const control = this.control();\n return control !== null && control.invalid() && (control.touched() || control.submitted());\n });\n\n private readonly floated = computed(() => {\n if (this.labelFloat() === 'always') {\n return true;\n }\n const control = this.control();\n return (\n control !== null &&\n (control.focused() ||\n control.hasValue() ||\n control.hasPlaceholder() ||\n control.nativeUi() ||\n this.prefix() !== undefined)\n );\n });\n\n protected readonly modifierClasses = computed(() => {\n const control = this.control();\n const classes = ['ck-field', `ck-field--${this.resolvedSize()}`];\n if (this.floated()) {\n classes.push('ck-field--floated');\n }\n if (this.errorsVisible()) {\n classes.push('ck-field--invalid');\n }\n if (control?.disabled()) {\n classes.push('ck-field--disabled');\n }\n if (control?.element.tagName === 'TEXTAREA') {\n classes.push('ck-field--textarea');\n }\n return classes.join(' ');\n });\n\n constructor() {\n loadFieldStyles();\n if (this.isBrowser) {\n effect(() => this.wire());\n afterEveryRender(() => this.wire());\n }\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n let destroyed = false;\n inject(DestroyRef).onDestroy(() => (destroyed = true));\n afterNextRender(() => {\n if (destroyed) {\n return;\n }\n const count = this.controls().length;\n if (count !== 1) {\n console.warn(\n `[ckui] ck-field needs exactly one ckInput, found ${count}.`,\n this.main()?.nativeElement.closest('ck-field'),\n );\n }\n if (this.label() === null) {\n console.warn(\n '[ckui] ck-field has no <label>, so its control has no accessible name.',\n this.main()?.nativeElement.closest('ck-field'),\n );\n }\n });\n }\n }\n\n private label(): HTMLLabelElement | null {\n return this.main()?.nativeElement.querySelector<HTMLLabelElement>(':scope > label') ?? null;\n }\n\n /** Writes ids, ARIA and the required marker onto the projected label and control. Idempotent. */\n private wire(): void {\n const control = this.control();\n if (control === null) {\n return;\n }\n const errorsVisible = this.errorsVisible();\n const required = control.required();\n const idOf = (ref: ElementRef): string => (ref.nativeElement as HTMLElement).id;\n const hintIds = this.hints().map(idOf);\n const errorIds = this.errors().map(idOf);\n control.setWiring({\n describedBy: [...hintIds, ...(errorsVisible ? errorIds : [])].filter((id) => id !== ''),\n libraryIds: [...hintIds, ...errorIds].filter((id) => id !== ''),\n invalid: errorsVisible,\n required,\n });\n\n const label = this.label();\n if (label === null) {\n return;\n }\n label.classList.add(LABEL_CLASS);\n const id = control.element.id;\n const current = label.getAttribute('for');\n if (id !== '' && (current === null || current === this.labelForSetByField)) {\n label.setAttribute('for', id);\n this.labelForSetByField = id;\n }\n this.syncRequiredMarker(label, required);\n }\n\n /** Reuses a marker that is already in the label (server render) instead of adding a second. */\n private syncRequiredMarker(label: HTMLElement, required: boolean): void {\n const markers = Array.from(label.children).filter((child) =>\n child.classList.contains(REQUIRED_CLASS),\n );\n label.classList.toggle(`${LABEL_CLASS}--required`, required);\n if (!required) {\n markers.forEach((marker) => marker.remove());\n return;\n }\n markers.slice(1).forEach((marker) => marker.remove());\n if (markers.length === 0) {\n const marker = label.ownerDocument.createElement('span');\n marker.setAttribute('aria-hidden', 'true');\n marker.className = REQUIRED_CLASS;\n marker.textContent = ' *';\n label.append(marker);\n }\n }\n}\n","<div class=\"ck-field__box\">\n <div class=\"ck-field__prefix\"><ng-content select=\"[ckPrefix]\" /></div>\n <div class=\"ck-field__main\" #main>\n <ng-content select=\"label\" />\n <ng-content select=\"[ckInput]\" />\n </div>\n <div class=\"ck-field__suffix\"><ng-content select=\"[ckSuffix]\" /></div>\n</div>\n<div class=\"ck-field__messages\">\n <div class=\"ck-field__hints\"><ng-content select=\"ck-hint\" /></div>\n <div class=\"ck-field__errors\" aria-live=\"polite\"><ng-content select=\"ck-error\" /></div>\n</div>\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n Directive,\n Renderer2,\n RendererStyleFlags2,\n afterNextRender,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n PLATFORM_ID,\n signal,\n untracked,\n} from '@angular/core';\nimport { CK_CONFIG, CkSize } from '@ckui/core';\nimport { loadFieldStyles } from './styles';\nimport { CK_CONTROL_STATE, CK_FIELD_CONTEXT, CkInputControl } from './control-state';\n\ndeclare const ngDevMode: unknown;\n\nconst DEFAULT_ROWS = 2;\n\nfunction toRows(value: number | string | null | undefined): number | undefined {\n if (value === null || value === undefined || value === '') {\n return undefined;\n }\n const rows = Math.floor(Number(value));\n return Number.isFinite(rows) && rows >= 1 ? rows : undefined;\n}\n\n/**\n * A native `<input>` or `<textarea>` for `ck-field`, or on its own with a box of its own.\n * Every native attribute stays on the element.\n */\n@Directive({\n selector: 'input[ckInput], textarea[ckInput]',\n providers: [{ provide: CK_CONTROL_STATE, useClass: CkInputControl }],\n host: {\n class: 'ck-input',\n '[class]': 'modifierClasses()',\n '[class.ck-input--textarea]': 'isTextarea',\n '[class.ck-input--autosize]': 'autosizeActive()',\n '[class.ck-input--autosize-js]': 'autosizeActive() && scriptSizing()',\n '[class.ck-input--max-rows]': 'autosizeActive() && maxRowCount() !== undefined',\n },\n})\nexport class CkInput {\n /** Only used without a surrounding `ck-field`; inside one the field's size applies. */\n readonly size = input<CkSize | undefined>(undefined);\n /** A textarea grows with its content between `minRows` and `maxRows`. */\n readonly autosize = input(false, { transform: booleanAttribute });\n readonly minRows = input<number | undefined, number | string | null | undefined>(undefined, {\n transform: toRows,\n });\n readonly maxRows = input<number | undefined, number | string | null | undefined>(undefined, {\n transform: toRows,\n });\n\n private readonly control = inject(CK_CONTROL_STATE) as CkInputControl;\n private readonly field = inject(CK_FIELD_CONTEXT, { optional: true });\n private readonly config = inject(CK_CONFIG);\n private readonly renderer = inject(Renderer2);\n private readonly element = this.control.element;\n protected readonly isTextarea = this.element.tagName === 'TEXTAREA';\n\n protected readonly modifierClasses = computed(() =>\n this.field ? '' : `ck-input--standalone ck-input--${this.size() ?? this.config.size}`,\n );\n protected readonly autosizeActive = computed(() => this.isTextarea && this.autosize());\n protected readonly maxRowCount = computed(() => {\n const max = this.maxRows();\n return max === undefined ? undefined : Math.max(max, this.minRowCount());\n });\n protected readonly scriptSizing = signal(false);\n private measured = false;\n private readonly minRowCount = computed(\n () => this.minRows() ?? toRows(this.element.getAttribute('rows')) ?? DEFAULT_ROWS,\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n if (this.field === null) {\n loadFieldStyles();\n }\n const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n let destroyed = false;\n destroyRef.onDestroy(() => (destroyed = true));\n\n effect(() => {\n if (this.autosizeActive()) {\n this.setRowProperty('--_ck-rows-min', this.minRowCount());\n this.setRowProperty('--_ck-rows-max', this.maxRowCount());\n } else {\n this.setRowProperty('--_ck-rows-min', undefined);\n this.setRowProperty('--_ck-rows-max', undefined);\n }\n });\n\n // Without `field-sizing: content` the height is measured after every value change.\n effect(() => {\n if (this.autosizeActive() && this.scriptSizing()) {\n this.minRowCount();\n this.maxRowCount();\n this.control.version();\n untracked(() => this.measure());\n } else if (this.measured) {\n this.measured = false;\n this.element.style.removeProperty('block-size');\n }\n });\n\n if (isBrowser) {\n afterNextRender(() => {\n if (destroyed) {\n return;\n }\n this.scriptSizing.set(!supportsFieldSizing());\n this.observeWidth(destroyRef, () => destroyed);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.field === null) {\n this.control.refresh();\n if (!this.hasAccessibleName()) {\n console.warn(\n '[ckui] ckInput outside a ck-field has no accessible name. Add a <label for>, aria-label or aria-labelledby.',\n this.element,\n );\n }\n }\n });\n }\n }\n\n private setRowProperty(name: string, rows: number | undefined): void {\n if (rows === undefined) {\n this.renderer.removeStyle(this.element, name, RendererStyleFlags2.DashCase);\n } else {\n this.renderer.setStyle(this.element, name, String(rows), RendererStyleFlags2.DashCase);\n }\n }\n\n /** Re-measures when the width changes, since that rewraps the text. Script sizing only. */\n private observeWidth(destroyRef: DestroyRef, isDestroyed: () => boolean): void {\n if (!this.isTextarea || typeof ResizeObserver === 'undefined') {\n return;\n }\n let lastWidth = -1;\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width !== lastWidth) {\n lastWidth = width;\n // Measuring changes the observed element's size; do it outside the observer callback.\n requestAnimationFrame(() => {\n if (!isDestroyed() && this.autosizeActive() && this.scriptSizing()) {\n this.measure();\n }\n });\n }\n });\n observer.observe(this.element);\n destroyRef.onDestroy(() => observer.disconnect());\n }\n\n /** Sets the height to the content; the CSS min and max rows clamp it. */\n private measure(): void {\n const element = this.element as HTMLTextAreaElement;\n if (!element.isConnected) {\n return;\n }\n const style = getComputedStyle(element);\n const border = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n const previousOverflow = element.style.overflowY;\n element.style.overflowY = 'hidden';\n element.style.blockSize = '0px';\n const needed = element.scrollHeight + (Number.isFinite(border) ? border : 0);\n element.style.blockSize = `${needed}px`;\n this.measured = true;\n element.style.overflowY = previousOverflow;\n }\n\n private hasAccessibleName(): boolean {\n const element = this.element;\n const attribute = (name: string): boolean => (element.getAttribute(name) ?? '').trim() !== '';\n if (attribute('aria-label') || attribute('title')) {\n return true;\n }\n const labelledBy = (element.getAttribute('aria-labelledby') ?? '').split(/\\s+/);\n const named = (node: Element | null): boolean => (node?.textContent ?? '').trim() !== '';\n return (\n labelledBy.some((id) => id !== '' && named(element.ownerDocument.getElementById(id))) ||\n Array.from(element.labels ?? []).some(named)\n );\n }\n}\n\nfunction supportsFieldSizing(): boolean {\n return (\n typeof CSS !== 'undefined' &&\n typeof CSS.supports === 'function' &&\n CSS.supports('field-sizing', 'content')\n );\n}\n","import { CkPrefix, CkSuffix } from './affix';\nimport { CkError } from './error';\nimport { CkField } from './field';\nimport { CkHint } from './hint';\nimport { CkInput } from './input';\n\nexport { CkPrefix, CkSuffix } from './affix';\nexport { CkError } from './error';\nexport { CkField } from './field';\nexport { CkHint } from './hint';\nexport { CkInput } from './input';\n\n/** Everything a template needs for a field: `imports: [CK_FIELD_IMPORTS]`. */\nexport const CK_FIELD_IMPORTS = [CkField, CkInput, CkHint, CkError, CkPrefix, CkSuffix] as const;\n"],"mappings":";;;;;;AAOA,IAAa,WAAb,MAAa,SAAQ;CAAR,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,YAAA;EAAA,UAAA;CAAA,CAAA;;AAAR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EAJpB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,OAAO,YAAW;EAC3B,CAAA;;;AAQD,IAAa,WAAb,MAAa,SAAQ;CAAR,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,YAAA;EAAA,UAAA;CAAA,CAAA;;AAAR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EAJpB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,OAAO,YAAW;EAC3B,CAAA;;;AC8CD,MAAa,mBAAmB,IAAI,eAA+B,kBAAkB;AACrF,MAAa,mBAAmB,IAAI,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;;;;;;;;;;;;;;;;;;;;AAoJD,SAAS,sBAAmB;CAC1B,OACE,OAAO,QAAQ,eACf,OAAO,IAAI,aAAa,cACxB,IAAI,SAAS,gBAAgB,SAAS;AAE1C;AC5LA,MAAa,mBAAmB;CAAC;CAAS;CAAS;CAAQ;CAAS;CAAU;AAAQ"}
|
|
1
|
+
{"version":3,"file":"ckui-core-field.mjs","names":[],"sources":["../../../../projects/core/field/affix.ts","../../../../projects/core/field/control-state.ts","../../../../projects/core/field/error.ts","../../../../projects/core/field/styles.ts","../../../../projects/core/field/hint.ts","../../../../projects/core/field/field.ts","../../../../projects/core/field/field.html","../../../../projects/core/field/input.ts","../../../../projects/core/field/index.ts"],"sourcesContent":["import { Directive } from '@angular/core';\n\n/** Content before the control: text such as `€`, an icon, or a button. */\n@Directive({\n selector: '[ckPrefix]',\n host: { class: 'ck-prefix' },\n})\nexport class CkPrefix {}\n\n/** Content after the control: text, an icon, or a button such as a password toggle. */\n@Directive({\n selector: '[ckSuffix]',\n host: { class: 'ck-suffix' },\n})\nexport class CkSuffix {}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n PLATFORM_ID,\n ElementRef,\n Injectable,\n InjectionToken,\n Renderer2,\n Signal,\n afterEveryRender,\n computed,\n effect,\n inject,\n signal,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlContainer,\n FormControl,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { CkSize } from '@ckui/core';\nimport { createCkId } from '@ckui/core/internal';\n\n/** What `ck-field` asks of `ckInput` for the ARIA attributes on the native control. */\nexport interface CkAriaWiring {\n readonly describedBy: readonly string[];\n /** Every hint and error id of the field, shown or not; tokens with these ids belong to the field. */\n readonly libraryIds: readonly string[];\n readonly invalid: boolean;\n readonly required: boolean;\n}\n\n/** What `ckInput` tells `ck-field` about the native control. Internal, not exported from the entry point. */\nexport interface CkControlState {\n readonly element: HTMLInputElement | HTMLTextAreaElement;\n readonly id: Signal<string>;\n readonly focused: Signal<boolean>;\n readonly hasValue: Signal<boolean>;\n readonly hasPlaceholder: Signal<boolean>;\n readonly nativeUi: Signal<boolean>;\n readonly disabled: Signal<boolean>;\n readonly readonly: Signal<boolean>;\n readonly required: Signal<boolean>;\n readonly invalid: Signal<boolean>;\n readonly touched: Signal<boolean>;\n readonly submitted: Signal<boolean>;\n /** Counts value changes, however they happened (typing, forms API, `[value]`). */\n readonly version: Signal<number>;\n setWiring(wiring: CkAriaWiring): void;\n}\n\n/** What `ckInput`, `ck-hint` and `ck-error` ask of the surrounding `ck-field`. */\nexport interface CkFieldContext {\n readonly resolvedSize: Signal<CkSize>;\n readonly errorsVisible: Signal<boolean>;\n}\n\nexport const CK_CONTROL_STATE = new InjectionToken<CkControlState>('CK_CONTROL_STATE');\nexport const CK_FIELD_CONTEXT = new InjectionToken<CkFieldContext>('CK_FIELD_CONTEXT');\n\nconst NATIVE_UI_TYPES = new Set(['date', 'time', 'datetime-local', 'month', 'week']);\n\ninterface Snapshot {\n readonly id: string;\n readonly focused: boolean;\n readonly hasValue: boolean;\n readonly hasPlaceholder: boolean;\n readonly nativeUi: boolean;\n readonly disabled: boolean;\n readonly readonly: boolean;\n readonly required: boolean;\n readonly invalid: boolean;\n readonly touched: boolean;\n readonly submitted: boolean;\n}\n\nconst INITIAL_SNAPSHOT: Snapshot = {\n id: '',\n focused: false,\n hasValue: false,\n hasPlaceholder: false,\n nativeUi: false,\n disabled: false,\n readonly: false,\n required: false,\n invalid: false,\n touched: false,\n submitted: false,\n};\n\nfunction sameSnapshot(previous: Snapshot, next: Snapshot): boolean {\n return (Object.keys(previous) as (keyof Snapshot)[]).every((key) => previous[key] === next[key]);\n}\n\n/**\n * Holds an attribute the component overrides, and gives the consumer's own value back afterwards.\n * The consumer's value is also kept in a `data-ck-claim-*` attribute, so markup that was rendered\n * earlier (server render) is recognised: a value the library wrote is never mistaken for the\n * consumer's.\n */\nclass AttributeClaim {\n private claimed = false;\n private ours: string | null = null;\n private theirs: string | null = null;\n private readonly marker: string;\n\n constructor(\n private readonly element: HTMLElement,\n private readonly name: string,\n private readonly renderer: Renderer2,\n ) {\n this.marker = `data-ck-claim-${name}`;\n }\n\n /** `desired` of `null` releases the attribute. A consumer rewriting it in between is noticed. */\n apply(desired: string | null): void {\n const current = this.element.getAttribute(this.name);\n if (!this.claimed) {\n const recorded = this.element.getAttribute(this.marker);\n if (recorded !== null) {\n this.claimed = true;\n this.ours = current;\n this.theirs = recorded === 'none' ? null : recorded.slice('value:'.length);\n } else {\n this.theirs = current;\n }\n } else if (current !== this.ours) {\n this.theirs = current;\n }\n if (desired !== null) {\n this.claimed = true;\n this.ours = desired;\n this.renderer.setAttribute(\n this.element,\n this.marker,\n this.theirs === null ? 'none' : `value:${this.theirs}`,\n );\n if (current !== desired) {\n this.renderer.setAttribute(this.element, this.name, desired);\n }\n } else if (this.claimed) {\n this.claimed = false;\n this.ours = null;\n this.renderer.removeAttribute(this.element, this.marker);\n if (this.theirs === null) {\n this.renderer.removeAttribute(this.element, this.name);\n } else if (current !== this.theirs) {\n this.renderer.setAttribute(this.element, this.name, this.theirs);\n }\n }\n }\n}\n\nfunction tokens(value: string | null): string[] {\n return (value ?? '').split(/\\s+/).filter((token) => token !== '');\n}\n\n/** A control inside `<fieldset disabled>` is disabled without a `disabled` attribute of its own. */\nfunction inDisabledFieldset(element: HTMLElement): boolean {\n try {\n return element.matches(':disabled');\n } catch {\n return false;\n }\n}\n\nfunction isEmptyModel(value: unknown): boolean {\n return value === null || value === undefined || value === '';\n}\n\n/**\n * Reads a native input from the DOM and from whichever forms API drives it (Reactive Forms,\n * `ngModel`, Signal Forms) into signals. Provided by `ckInput`, one per control.\n */\n@Injectable()\nexport class CkInputControl implements CkControlState {\n readonly element =\n inject<ElementRef<HTMLInputElement | HTMLTextAreaElement>>(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly ngControl = inject(NgControl, { self: true, optional: true });\n private readonly container = inject(ControlContainer, { optional: true });\n\n private readonly snapshot = signal<Snapshot>(INITIAL_SNAPSHOT, { equal: sameSnapshot });\n private readonly versionState = signal(0);\n readonly version = this.versionState.asReadonly();\n readonly id = computed(() => this.snapshot().id);\n readonly focused = computed(() => this.snapshot().focused);\n readonly hasValue = computed(() => this.snapshot().hasValue);\n readonly hasPlaceholder = computed(() => this.snapshot().hasPlaceholder);\n readonly nativeUi = computed(() => this.snapshot().nativeUi);\n readonly disabled = computed(() => this.snapshot().disabled);\n readonly readonly = computed(() => this.snapshot().readonly);\n readonly required = computed(() => this.snapshot().required);\n readonly invalid = computed(() => this.snapshot().invalid);\n readonly touched = computed(() => this.snapshot().touched);\n readonly submitted = computed(() => this.snapshot().submitted);\n\n private wiring: CkAriaWiring | null = null;\n private lastValue = '';\n private lastModelEmpty = true;\n private readonly invalidClaim = new AttributeClaim(this.element, 'aria-invalid', this.renderer);\n private readonly requiredClaim = new AttributeClaim(this.element, 'aria-required', this.renderer);\n private watchedControl: AbstractControl | null = null;\n private watchedForm: AbstractControl | null = null;\n private subscriptions: { unsubscribe(): void }[] = [];\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private readonly libraryIdsSeen = new Set<string>();\n private probedValidator: unknown;\n private probedVerdict = false;\n\n constructor() {\n if (!this.isBrowser) {\n return;\n }\n const element = this.element;\n const destroyRef = inject(DestroyRef);\n if (element.id === '') {\n this.renderer.setAttribute(element, 'id', createCkId('ck-input'));\n }\n const listener = (): void => this.refresh();\n for (const type of ['focus', 'blur', 'input', 'change']) {\n element.addEventListener(type, listener);\n destroyRef.onDestroy(() => element.removeEventListener(type, listener));\n }\n destroyRef.onDestroy(() => this.unsubscribe());\n // Signal Forms state is read through signals, so this re-runs when it changes.\n effect(() => this.refresh());\n afterEveryRender(() => {\n this.refresh();\n this.applyWiring();\n });\n }\n\n setWiring(wiring: CkAriaWiring): void {\n if (!this.isBrowser) {\n return;\n }\n this.wiring = wiring;\n this.applyWiring();\n }\n\n /** Copies the current DOM and forms state into the signals. Cheap when nothing changed. */\n refresh(): void {\n if (!this.isBrowser) {\n return;\n }\n const element = this.element;\n const control = this.ngControl;\n this.watch();\n\n if (element.id === '') {\n this.renderer.setAttribute(element, 'id', createCkId('ck-input'));\n }\n const type = element.tagName === 'INPUT' ? (element as HTMLInputElement).type : '';\n const model: unknown = control?.value;\n const modelEmpty = isEmptyModel(model);\n // A number input holding \"-\" or \"1e\" reports an empty value but is not empty.\n const hasValue = element.value !== '' || !modelEmpty || !!element.validity?.badInput;\n if (element.value !== this.lastValue || modelEmpty !== this.lastModelEmpty) {\n this.lastValue = element.value;\n this.lastModelEmpty = modelEmpty;\n this.versionState.update((count) => count + 1);\n }\n const form = this.container?.formDirective as { submitted?: boolean } | null | undefined;\n\n this.snapshot.set({\n id: element.id,\n focused: element.ownerDocument?.activeElement === element,\n hasValue,\n hasPlaceholder: element.placeholder.trim() !== '',\n nativeUi: NATIVE_UI_TYPES.has(type),\n disabled: element.disabled || (control?.disabled ?? false) || inDisabledFieldset(element),\n readonly: element.readOnly,\n required: element.required || this.hasRequiredValidator(),\n invalid: control?.invalid ?? false,\n touched: control?.touched ?? false,\n submitted: form?.submitted === true,\n });\n }\n\n private hasRequiredValidator(): boolean {\n const control = this.ngControl?.control;\n if (!control) {\n return false;\n }\n if (control.hasValidator?.(Validators.required)) {\n return true;\n }\n // A composed validator hides `Validators.required`; ask it what it says about an empty value.\n const validator = control.validator;\n if (validator !== this.probedValidator) {\n const verdict = validator?.(new FormControl(''));\n this.probedValidator = validator;\n this.probedVerdict = verdict !== null && verdict !== undefined && 'required' in verdict;\n }\n return this.probedVerdict;\n }\n\n /** (Re)subscribes when the control or its form changes. Reactive Forms has no signals to read. */\n private watch(): void {\n const control = this.ngControl?.control;\n const nextControl = control instanceof AbstractControl ? control : null;\n const root = (this.container?.formDirective as { control?: unknown } | null | undefined)\n ?.control;\n const nextForm = root instanceof AbstractControl ? root : null;\n if (nextControl === this.watchedControl && nextForm === this.watchedForm) {\n return;\n }\n this.unsubscribe();\n this.watchedControl = nextControl;\n this.watchedForm = nextForm;\n const listener = (): void => this.refresh();\n for (const target of new Set([nextControl, nextForm])) {\n if (target) {\n this.subscriptions.push(target.events.subscribe(listener));\n }\n }\n }\n\n private unsubscribe(): void {\n for (const subscription of this.subscriptions) {\n subscription.unsubscribe();\n }\n this.subscriptions = [];\n this.watchedControl = null;\n this.watchedForm = null;\n }\n\n private applyWiring(): void {\n const wiring = this.wiring;\n if (!wiring) {\n return;\n }\n const element = this.element;\n const current = tokens(element.getAttribute('aria-describedby'));\n // An id the field ever owned stays the field's, even after its hint or error is gone.\n wiring.libraryIds.forEach((id) => this.libraryIdsSeen.add(id));\n const consumer = current.filter((token) => !this.libraryIdsSeen.has(token));\n const desired = [...consumer, ...wiring.describedBy];\n if (desired.join(' ') !== current.join(' ')) {\n if (desired.length > 0) {\n this.renderer.setAttribute(element, 'aria-describedby', desired.join(' '));\n } else {\n this.renderer.removeAttribute(element, 'aria-describedby');\n }\n }\n this.invalidClaim.apply(wiring.invalid ? 'true' : null);\n this.requiredClaim.apply(wiring.required && !element.required ? 'true' : null);\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, Renderer2, computed, inject } from '@angular/core';\nimport { createCkId } from '@ckui/core/internal';\nimport { CK_FIELD_CONTEXT } from './control-state';\n\ndeclare const ngDevMode: unknown;\n\n/**\n * An error message in a field. It is hidden until the field shows errors, whatever the consumer\n * renders, and it joins the control's description while it is visible.\n */\n@Directive({\n selector: 'ck-error',\n host: {\n class: 'ck-error',\n '[hidden]': 'hidden()',\n },\n})\nexport class CkError {\n private readonly field = inject(CK_FIELD_CONTEXT, { optional: true });\n protected readonly hidden = computed(() => this.field !== null && !this.field.errorsVisible());\n\n constructor() {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (isPlatformBrowser(inject(PLATFORM_ID)) && element.id === '') {\n inject(Renderer2).setAttribute(element, 'id', createCkId('ck-error'));\n }\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.field === null) {\n console.warn('[ckui] ck-error is outside a ck-field, so it is always visible.', element);\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n EnvironmentInjector,\n ViewEncapsulation,\n createComponent,\n inject,\n} from '@angular/core';\n\n/** The one place field.css is compiled in; every field and standalone input instantiates it. */\n@Component({\n selector: 'ck-field-styles',\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styleUrl: './field.css',\n})\nclass CkFieldStyles {}\n\n/** Loads the field stylesheet for as long as the calling directive or component lives. */\nexport function loadFieldStyles(): void {\n const styles = createComponent(CkFieldStyles, {\n environmentInjector: inject(EnvironmentInjector),\n });\n inject(DestroyRef).onDestroy(() => styles.destroy());\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport { Directive, ElementRef, PLATFORM_ID, Renderer2, inject } from '@angular/core';\nimport { createCkId } from '@ckui/core/internal';\n\n/** Help text under a field. It stays visible next to an error and is part of the control's description. */\n@Directive({\n selector: 'ck-hint',\n host: { class: 'ck-hint' },\n})\nexport class CkHint {\n constructor() {\n const element = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n if (isPlatformBrowser(inject(PLATFORM_ID)) && element.id === '') {\n inject(Renderer2).setAttribute(element, 'id', createCkId('ck-hint'));\n }\n }\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n PLATFORM_ID,\n Component,\n DestroyRef,\n ElementRef,\n ViewEncapsulation,\n afterEveryRender,\n afterNextRender,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n viewChild,\n} from '@angular/core';\nimport { CK_CONFIG, CkSize } from '@ckui/core';\nimport { CK_CONTROL_STATE, CK_FIELD_CONTEXT, CkFieldContext } from './control-state';\nimport { CkPrefix } from './affix';\nimport { loadFieldStyles } from './styles';\nimport { CkError } from './error';\nimport { CkHint } from './hint';\n\ndeclare const ngDevMode: unknown;\n\nconst LABEL_CLASS = 'ck-field__label';\nconst REQUIRED_CLASS = 'ck-field__required';\n\n/**\n * Wraps one native `ckInput` with a floating `<label>`, `ck-hint`, `ck-error`, and `[ckPrefix]` /\n * `[ckSuffix]` content, and wires ids and ARIA between them.\n */\n@Component({\n selector: 'ck-field',\n templateUrl: './field.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [{ provide: CK_FIELD_CONTEXT, useExisting: CkField }],\n host: {\n class: 'ck-field',\n '[class]': 'modifierClasses()',\n },\n})\nexport class CkField implements CkFieldContext {\n /** `undefined` uses the size from `provideCkui`. */\n readonly size = input<CkSize | undefined>(undefined);\n /** `always` keeps the label on the border even when the control is empty and unfocused. */\n readonly labelFloat = input<'auto' | 'always'>('auto');\n /** `undefined` follows the control; `true` or `false` forces the invalid look and the errors. */\n readonly invalid = input<boolean | undefined>(undefined);\n\n private readonly config = inject(CK_CONFIG);\n private readonly controls = contentChildren(CK_CONTROL_STATE, { descendants: true });\n private readonly hints = contentChildren(CkHint, { descendants: true, read: ElementRef });\n private readonly errors = contentChildren(CkError, { descendants: true, read: ElementRef });\n private readonly prefix = contentChild(CkPrefix, { descendants: true });\n private readonly main = viewChild<ElementRef<HTMLElement>>('main');\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n private labelForSetByField = '';\n\n /** @internal Used by `ckInput` and `ck-error`. */\n readonly resolvedSize = computed(() => this.size() ?? this.config.size);\n private readonly control = computed(() => this.controls()[0] ?? null);\n\n /** @internal Used by `ck-error`. */\n readonly errorsVisible = computed(() => {\n const forced = this.invalid();\n if (forced !== undefined) {\n return forced;\n }\n const control = this.control();\n return control !== null && control.invalid() && (control.touched() || control.submitted());\n });\n\n private readonly floated = computed(() => {\n if (this.labelFloat() === 'always') {\n return true;\n }\n const control = this.control();\n return (\n control !== null &&\n (control.focused() ||\n control.hasValue() ||\n control.hasPlaceholder() ||\n control.nativeUi() ||\n this.prefix() !== undefined)\n );\n });\n\n protected readonly modifierClasses = computed(() => {\n const control = this.control();\n const classes = ['ck-field', `ck-field--${this.resolvedSize()}`];\n if (this.floated()) {\n classes.push('ck-field--floated');\n }\n if (this.errorsVisible()) {\n classes.push('ck-field--invalid');\n }\n if (control?.disabled()) {\n classes.push('ck-field--disabled');\n }\n if (control?.element.tagName === 'TEXTAREA') {\n classes.push('ck-field--textarea');\n }\n return classes.join(' ');\n });\n\n constructor() {\n loadFieldStyles();\n if (this.isBrowser) {\n effect(() => this.wire());\n afterEveryRender(() => this.wire());\n }\n\n if (typeof ngDevMode !== 'undefined' && ngDevMode) {\n let destroyed = false;\n inject(DestroyRef).onDestroy(() => (destroyed = true));\n afterNextRender(() => {\n if (destroyed) {\n return;\n }\n const count = this.controls().length;\n if (count !== 1) {\n console.warn(\n `[ckui] ck-field needs exactly one ckInput, found ${count}.`,\n this.main()?.nativeElement.closest('ck-field'),\n );\n }\n if (this.label() === null) {\n console.warn(\n '[ckui] ck-field has no <label>, so its control has no accessible name.',\n this.main()?.nativeElement.closest('ck-field'),\n );\n }\n });\n }\n }\n\n private label(): HTMLLabelElement | null {\n return this.main()?.nativeElement.querySelector<HTMLLabelElement>(':scope > label') ?? null;\n }\n\n /** Writes ids, ARIA and the required marker onto the projected label and control. Idempotent. */\n private wire(): void {\n const control = this.control();\n if (control === null) {\n return;\n }\n const errorsVisible = this.errorsVisible();\n const required = control.required();\n const idOf = (ref: ElementRef): string => (ref.nativeElement as HTMLElement).id;\n const hintIds = this.hints().map(idOf);\n const errorIds = this.errors().map(idOf);\n control.setWiring({\n describedBy: [...hintIds, ...(errorsVisible ? errorIds : [])].filter((id) => id !== ''),\n libraryIds: [...hintIds, ...errorIds].filter((id) => id !== ''),\n invalid: errorsVisible,\n required,\n });\n\n const label = this.label();\n if (label === null) {\n return;\n }\n label.classList.add(LABEL_CLASS);\n const id = control.element.id;\n const current = label.getAttribute('for');\n if (id !== '' && (current === null || current === this.labelForSetByField)) {\n label.setAttribute('for', id);\n this.labelForSetByField = id;\n }\n this.syncRequiredMarker(label, required);\n }\n\n /** Reuses a marker that is already in the label (server render) instead of adding a second. */\n private syncRequiredMarker(label: HTMLElement, required: boolean): void {\n const markers = Array.from(label.children).filter((child) =>\n child.classList.contains(REQUIRED_CLASS),\n );\n label.classList.toggle(`${LABEL_CLASS}--required`, required);\n if (!required) {\n markers.forEach((marker) => marker.remove());\n return;\n }\n markers.slice(1).forEach((marker) => marker.remove());\n if (markers.length === 0) {\n const marker = label.ownerDocument.createElement('span');\n marker.setAttribute('aria-hidden', 'true');\n marker.className = REQUIRED_CLASS;\n marker.textContent = ' *';\n label.append(marker);\n }\n }\n}\n","<div class=\"ck-field__box\">\n <div class=\"ck-field__prefix\"><ng-content select=\"[ckPrefix]\" /></div>\n <div class=\"ck-field__main\" #main>\n <ng-content select=\"label\" />\n <ng-content select=\"[ckInput]\" />\n </div>\n <div class=\"ck-field__suffix\"><ng-content select=\"[ckSuffix]\" /></div>\n</div>\n<div class=\"ck-field__messages\">\n <div class=\"ck-field__hints\"><ng-content select=\"ck-hint\" /></div>\n <div class=\"ck-field__errors\" aria-live=\"polite\"><ng-content select=\"ck-error\" /></div>\n</div>\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n DestroyRef,\n Directive,\n Renderer2,\n RendererStyleFlags2,\n afterNextRender,\n booleanAttribute,\n computed,\n effect,\n inject,\n input,\n PLATFORM_ID,\n signal,\n untracked,\n} from '@angular/core';\nimport { CK_CONFIG, CkSize } from '@ckui/core';\nimport { hasAccessibleName } from '@ckui/core/internal';\nimport { loadFieldStyles } from './styles';\nimport { CK_CONTROL_STATE, CK_FIELD_CONTEXT, CkInputControl } from './control-state';\n\ndeclare const ngDevMode: unknown;\n\nconst DEFAULT_ROWS = 2;\n\nfunction toRows(value: number | string | null | undefined): number | undefined {\n if (value === null || value === undefined || value === '') {\n return undefined;\n }\n const rows = Math.floor(Number(value));\n return Number.isFinite(rows) && rows >= 1 ? rows : undefined;\n}\n\n/**\n * A native `<input>` or `<textarea>` for `ck-field`, or on its own with a box of its own.\n * Every native attribute stays on the element.\n */\n@Directive({\n selector: 'input[ckInput], textarea[ckInput]',\n providers: [{ provide: CK_CONTROL_STATE, useClass: CkInputControl }],\n host: {\n class: 'ck-input',\n '[class]': 'modifierClasses()',\n '[class.ck-input--textarea]': 'isTextarea',\n '[class.ck-input--autosize]': 'autosizeActive()',\n '[class.ck-input--autosize-js]': 'autosizeActive() && scriptSizing()',\n '[class.ck-input--max-rows]': 'autosizeActive() && maxRowCount() !== undefined',\n },\n})\nexport class CkInput {\n /** Only used without a surrounding `ck-field`; inside one the field's size applies. */\n readonly size = input<CkSize | undefined>(undefined);\n /** A textarea grows with its content between `minRows` and `maxRows`. */\n readonly autosize = input(false, { transform: booleanAttribute });\n readonly minRows = input<number | undefined, number | string | null | undefined>(undefined, {\n transform: toRows,\n });\n readonly maxRows = input<number | undefined, number | string | null | undefined>(undefined, {\n transform: toRows,\n });\n\n private readonly control = inject(CK_CONTROL_STATE) as CkInputControl;\n private readonly field = inject(CK_FIELD_CONTEXT, { optional: true });\n private readonly config = inject(CK_CONFIG);\n private readonly renderer = inject(Renderer2);\n private readonly element = this.control.element;\n protected readonly isTextarea = this.element.tagName === 'TEXTAREA';\n\n protected readonly modifierClasses = computed(() =>\n this.field ? '' : `ck-input--standalone ck-input--${this.size() ?? this.config.size}`,\n );\n protected readonly autosizeActive = computed(() => this.isTextarea && this.autosize());\n protected readonly maxRowCount = computed(() => {\n const max = this.maxRows();\n return max === undefined ? undefined : Math.max(max, this.minRowCount());\n });\n protected readonly scriptSizing = signal(false);\n private measured = false;\n private readonly minRowCount = computed(\n () => this.minRows() ?? toRows(this.element.getAttribute('rows')) ?? DEFAULT_ROWS,\n );\n\n constructor() {\n const destroyRef = inject(DestroyRef);\n if (this.field === null) {\n loadFieldStyles();\n }\n const isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n let destroyed = false;\n destroyRef.onDestroy(() => (destroyed = true));\n\n effect(() => {\n if (this.autosizeActive()) {\n this.setRowProperty('--_ck-rows-min', this.minRowCount());\n this.setRowProperty('--_ck-rows-max', this.maxRowCount());\n } else {\n this.setRowProperty('--_ck-rows-min', undefined);\n this.setRowProperty('--_ck-rows-max', undefined);\n }\n });\n\n // Without `field-sizing: content` the height is measured after every value change.\n effect(() => {\n if (this.autosizeActive() && this.scriptSizing()) {\n this.minRowCount();\n this.maxRowCount();\n this.control.version();\n untracked(() => this.measure());\n } else if (this.measured) {\n this.measured = false;\n this.element.style.removeProperty('block-size');\n }\n });\n\n if (isBrowser) {\n afterNextRender(() => {\n if (destroyed) {\n return;\n }\n this.scriptSizing.set(!supportsFieldSizing());\n this.observeWidth(destroyRef, () => destroyed);\n if (typeof ngDevMode !== 'undefined' && ngDevMode && this.field === null) {\n this.control.refresh();\n if (!hasAccessibleName(this.element, { title: true, text: false, labels: true })) {\n console.warn(\n '[ckui] ckInput outside a ck-field has no accessible name. Add a <label for>, aria-label or aria-labelledby.',\n this.element,\n );\n }\n }\n });\n }\n }\n\n private setRowProperty(name: string, rows: number | undefined): void {\n if (rows === undefined) {\n this.renderer.removeStyle(this.element, name, RendererStyleFlags2.DashCase);\n } else {\n this.renderer.setStyle(this.element, name, String(rows), RendererStyleFlags2.DashCase);\n }\n }\n\n /** Re-measures when the width changes, since that rewraps the text. Script sizing only. */\n private observeWidth(destroyRef: DestroyRef, isDestroyed: () => boolean): void {\n if (!this.isTextarea || typeof ResizeObserver === 'undefined') {\n return;\n }\n let lastWidth = -1;\n const observer = new ResizeObserver((entries) => {\n const width = entries[0]?.contentRect.width ?? 0;\n if (width !== lastWidth) {\n lastWidth = width;\n // Measuring changes the observed element's size; do it outside the observer callback.\n requestAnimationFrame(() => {\n if (!isDestroyed() && this.autosizeActive() && this.scriptSizing()) {\n this.measure();\n }\n });\n }\n });\n observer.observe(this.element);\n destroyRef.onDestroy(() => observer.disconnect());\n }\n\n /** Sets the height to the content; the CSS min and max rows clamp it. */\n private measure(): void {\n const element = this.element as HTMLTextAreaElement;\n if (!element.isConnected) {\n return;\n }\n const style = getComputedStyle(element);\n const border = parseFloat(style.borderTopWidth) + parseFloat(style.borderBottomWidth);\n const previousOverflow = element.style.overflowY;\n element.style.overflowY = 'hidden';\n element.style.blockSize = '0px';\n const needed = element.scrollHeight + (Number.isFinite(border) ? border : 0);\n element.style.blockSize = `${needed}px`;\n this.measured = true;\n element.style.overflowY = previousOverflow;\n }\n}\n\nfunction supportsFieldSizing(): boolean {\n return (\n typeof CSS !== 'undefined' &&\n typeof CSS.supports === 'function' &&\n CSS.supports('field-sizing', 'content')\n );\n}\n","import { CkPrefix, CkSuffix } from './affix';\nimport { CkError } from './error';\nimport { CkField } from './field';\nimport { CkHint } from './hint';\nimport { CkInput } from './input';\n\nexport { CkPrefix, CkSuffix } from './affix';\nexport { CkError } from './error';\nexport { CkField } from './field';\nexport { CkHint } from './hint';\nexport { CkInput } from './input';\n\n/** Everything a template needs for a field: `imports: [CK_FIELD_IMPORTS]`. */\nexport const CK_FIELD_IMPORTS = [CkField, CkInput, CkHint, CkError, CkPrefix, CkSuffix] as const;\n"],"mappings":";;;;;;AAOA,IAAa,WAAb,MAAa,SAAQ;CAAR,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAQ,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAR,OAAA,OAAA,GAAA,qBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,MAAA;EAAQ,cAAA;EAAA,UAAA;EAAA,MAAA,EAAA,gBAAA,YAAA;EAAA,UAAA;CAAA,CAAA;;AAAR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAQ,YAAA,CAAA;EAJpB,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,MAAM,EAAE,OAAO,YAAW;EAC3B,CAAA;;;AAQD,IAAa,WAAb,MAAa,SAAQ;CAAR,OAAA,OAAA,GAAA,mBAAA;EAAA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