@cdevhub/ngx-tw 0.6.2 → 0.8.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/fesm2022/cdevhub-ngx-tw-alert.mjs +8 -1
- package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +11 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +7 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover-testing.mjs +213 -0
- package/fesm2022/cdevhub-ngx-tw-popover-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +10 -4
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +2 -2
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +29 -9
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tooltip-testing.mjs +195 -0
- package/fesm2022/cdevhub-ngx-tw-tooltip-testing.mjs.map +1 -0
- package/index.json +1 -1
- package/package.json +9 -1
- package/types/cdevhub-ngx-tw-popover-testing.d.ts +138 -0
- package/types/cdevhub-ngx-tw-tabs.d.ts +23 -3
- package/types/cdevhub-ngx-tw-theme.d.ts +18 -1
- package/types/cdevhub-ngx-tw-tooltip-testing.d.ts +131 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-checkbox.mjs","sources":["../../../projects/ngx-tw/checkbox/checkbox.ts","../../../projects/ngx-tw/checkbox/cdevhub-ngx-tw-checkbox.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n type OnInit,\n output,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n type ControlValueAccessor,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { isObservable } from 'rxjs';\nimport { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n type TwColor,\n type TwSize,\n wireErrorState,\n} from '@cdevhub/ngx-tw/core';\nimport { FormFieldControl, TW_FORM_FIELD_CONTROL } from '@cdevhub/ngx-tw/form-field';\n\n/** Visual style of the checkbox when checked or indeterminate. */\nexport type CheckboxVariant = 'solid' | 'outline';\n\n/** Position of the label relative to the checkbox control. */\nexport type CheckboxLabelPosition = 'before' | 'after';\n\n// ── tv() config ──────────────────────────────────────────────────\n\nconst checkboxVariants = tv(\n {\n slots: {\n // `items-start` aligns the boxWrap with the top of the label container; combined with\n // a `min-h-N` matching the label's first-line line-height on boxWrap, the box stays\n // centered on the first line of the label whether it spans one line or many.\n //\n // ── Row-height scale (selection cohort) ──────────────────────────────\n // The rendered row is `max(boxWrap, label first line)`, and the host itself is the\n // click target (`role=\"checkbox\"` + `tabindex` + `(click)` all sit on the root), so\n // the row IS the interactive target. It runs 16 / 20 / 24 / 28 / 32 px — five distinct\n // steps, every one on the 4px baseline of docs/vertical-rhythm.md, and identical to\n // `switch`, the sibling selection control. Selection controls are glyph-scale and\n // deliberately do NOT take the pinned 24/32/36/44/48 form-row scale (vertical-rhythm.md\n // section 4).\n //\n // The row is driven by `boxWrap` min-h, NOT by the box glyph, which stays at its own\n // well-proportioned 14 / 16 / 20 / 24 / 28 scale (4px of slack inside the row at every\n // size; 2px at xs, where the codified size-3.5 half-step applies). Driving it from\n // boxWrap is what makes the five steps survive when no label is projected.\n //\n // Because centering demands `boxWrap height == label first-line leading`, the label\n // leading carries the same 4 / 5 / 6 / 7 / 8 progression. That is forced, not chosen:\n // the label font scale has only three steps (text-xs, text-sm, text-base), so leading\n // is the only lever that can break the sm/md and lg/xl ties. Before this, sm and md\n // both rendered a 20px row — a dead step. Accepted cost: `text-base leading-8` at xl is\n // a 2.0 line ratio, looser than typographic ideal on a wrapped multi-line label.\n root: 'relative inline-flex items-start gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n boxWrap: 'relative inline-flex items-center justify-center shrink-0',\n box: 'inline-flex items-center justify-center rounded-md border transition-colors duration-normal motion-reduce:transition-none',\n icon: 'absolute inset-0 flex items-center justify-center pointer-events-none empty:hidden',\n labelWrap: 'flex flex-col min-w-0 empty:hidden',\n label: 'font-medium text-fg empty:hidden',\n description: 'text-fg-muted empty:hidden',\n },\n variants: {\n size: {\n xs: {\n // `size-3.5` half-step: aligns with text-xs/leading-4. Codified per CLAUDE.md.\n box: 'size-3.5',\n icon: '[&_svg]:size-3',\n boxWrap: 'min-h-4',\n label: 'text-xs leading-4',\n description: 'text-2xs leading-4',\n },\n sm: {\n box: 'size-4',\n icon: '[&_svg]:size-3',\n boxWrap: 'min-h-5',\n label: 'text-sm leading-5',\n description: 'text-xs leading-4',\n },\n md: {\n box: 'size-5',\n // md icon uses `size-3.5` (14px) — proportional inset (70%) of the\n // size-5 (20px) box; the half-step is the only size that fills the\n // checkmark without crowding the box edges.\n icon: '[&_svg]:size-3.5',\n // 24px row. `text-sm` is shared with sm by the documented font scale, so the\n // leading breaks the tie: leading-6 lifts the row off sm's 20px.\n boxWrap: 'min-h-6',\n label: 'text-sm leading-6',\n description: 'text-xs leading-4',\n },\n lg: {\n box: 'size-6',\n icon: '[&_svg]:size-4',\n // 28px row — leading-7 keeps the first label line the same height as boxWrap.\n boxWrap: 'min-h-7',\n label: 'text-base leading-7',\n description: 'text-sm leading-5',\n },\n xl: {\n box: 'size-7',\n icon: '[&_svg]:size-5',\n // 32px row. `text-base` is shared with lg, so leading-8 breaks that tie the same\n // way leading-6 breaks sm/md. A 2.0 ratio on a wrapped label is the accepted cost.\n boxWrap: 'min-h-8',\n label: 'text-base leading-8',\n description: 'text-sm leading-5',\n },\n },\n labelPosition: {\n before: { root: 'flex-row-reverse' },\n after: { root: 'flex-row' },\n },\n active: {\n true: { box: '' },\n false: { box: 'bg-surface border-border hover:border-border-strong' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: { root: '' },\n },\n },\n defaultVariants: {\n size: 'md',\n labelPosition: 'after',\n active: false,\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Static active-state color lookups (statically written for Tailwind v4 scanning) ──\n\nconst SOLID_BOX: Record<TwColor, string> = {\n primary: 'bg-primary-600 border-primary-600',\n secondary: 'bg-secondary-600 border-secondary-600',\n accent: 'bg-accent-600 border-accent-600',\n neutral: 'bg-fg border-fg',\n info: 'bg-info-600 border-info-600',\n success: 'bg-success-600 border-success-600',\n warning: 'bg-warning-500 border-warning-500',\n error: 'bg-error-600 border-error-600',\n};\n\nconst SOLID_ICON: Record<TwColor, string> = {\n primary: 'text-on-primary',\n secondary: 'text-on-secondary',\n accent: 'text-on-accent',\n neutral: 'text-on-neutral',\n info: 'text-on-info',\n success: 'text-on-success',\n warning: 'text-on-warning',\n error: 'text-on-error',\n};\n\nconst OUTLINE_BOX: Record<TwColor, string> = {\n primary: 'bg-surface border-primary-600',\n secondary: 'bg-surface border-secondary-600',\n accent: 'bg-surface border-accent-600',\n neutral: 'bg-surface border-fg',\n info: 'bg-surface border-info-600',\n success: 'bg-surface border-success-600',\n warning: 'bg-surface border-warning-500',\n error: 'bg-surface border-error-600',\n};\n\nconst OUTLINE_ICON: Record<TwColor, string> = {\n primary: 'text-primary-600',\n secondary: 'text-secondary-600',\n accent: 'text-accent-600',\n neutral: 'text-fg',\n info: 'text-info-600',\n success: 'text-success-600',\n warning: 'text-warning-600',\n error: 'text-error-600',\n};\n\nlet nextId = 0;\n\n// ── CheckboxComponent ────────────────────────────────────────────\n\n@Component({\n selector: 'tw-checkbox',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TW_FORM_FIELD_CONTROL,\n useExisting: forwardRef(() => CheckboxComponent),\n },\n ],\n template: `\n <!--\n Hidden form-submission proxy. Uses \\`hidden\\` (display:none), not \\`sr-only\\`:\n a display:none control is excluded from focus order so axe's\n \\`nested-interactive\\` rule doesn't flag it inside the \\`role=\"checkbox\"\\`\n host, yet it still participates in native (non-Angular) form submission —\n the entry-list algorithm excludes only \\`disabled\\` controls, not hidden ones.\n -->\n <input\n type=\"checkbox\"\n hidden\n aria-hidden=\"true\"\n [name]=\"name() || null\"\n [checked]=\"internalChecked()\"\n [disabled]=\"isDisabled()\"\n />\n\n <span [class]=\"boxWrapClasses()\">\n <span [class]=\"boxClasses()\">\n <span [class]=\"iconClasses()\">\n @if (internalIndeterminate()) {\n <span [class]=\"iconColorClasses()\" animate.enter=\"check-in\">\n <ng-content select=\"[slot='indeterminate-icon']\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path\n d=\"M5 12 h14\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </ng-content>\n </span>\n } @else if (internalChecked()) {\n <span [class]=\"iconColorClasses()\" animate.enter=\"check-in\">\n <ng-content select=\"[slot='check-icon']\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path\n d=\"M5 12 l5 5 l9 -11\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </ng-content>\n </span>\n }\n </span>\n </span>\n </span>\n\n <span [class]=\"labelWrapClasses()\">\n <span [id]=\"labelElementId()\" [class]=\"labelClasses()\">\n <ng-content>\n @if (label()) {\n {{ label() }}\n }\n </ng-content>\n </span>\n <span [id]=\"descriptionElementId()\" [class]=\"descriptionClasses()\">\n <ng-content select=\"[slot='description']\">\n @if (description()) {\n {{ description() }}\n }\n </ng-content>\n </span>\n </span>\n `,\n host: {\n 'role': 'checkbox',\n '[id]': 'id()',\n '[class]': 'rootClasses()',\n '[attr.data-checked]': 'internalChecked()',\n '[attr.data-indeterminate]': 'internalIndeterminate()',\n '[attr.aria-checked]': 'ariaCheckedValue()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'effectiveAriaLabelledby() || null',\n '[attr.aria-describedby]': 'effectiveAriaDescribedby() || null',\n '[attr.tabindex]': 'isDisabled() ? -1 : 0',\n '[attr.name]': 'name() || null',\n '(click)': 'toggle()',\n '(keydown)': 'onKeydown($event)',\n '(blur)': 'onBlur()',\n },\n})\nexport class CheckboxComponent\n extends FormFieldControl<boolean>\n implements ControlValueAccessor, OnInit\n{\n /** Sets the semantic color for the checked and indeterminate box fill/border. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls the overall scale of the box, check icon, and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Visual style when checked or indeterminate. `'solid'` fills the box with the color; `'outline'` keeps a transparent fill with a colored border and check. Defaults to `'solid'`. */\n readonly variant = input<CheckboxVariant>('solid');\n\n /** When true, prevents interaction and applies muted styling. Defaults to `false`. */\n readonly disabled = input(false);\n\n /** When true, sets `aria-required=\"true\"` so assistive tech announces the control as required. Defaults to `false`. */\n readonly requiredInput = input(false, { alias: 'required' });\n\n /** Optional inline label rendered next to the checkbox. Use default content projection for rich label content instead. Projection takes precedence. */\n readonly label = input<string | undefined>(undefined);\n\n /** Optional secondary description rendered under the label. Use `[slot=\"description\"]` content projection for rich content instead. Projection takes precedence. */\n readonly description = input<string | undefined>(undefined);\n\n /** Position of the label/description relative to the checkbox. Defaults to `'after'`. */\n readonly labelPosition = input<CheckboxLabelPosition>('after');\n\n /** Optional name attribute, applied to the hidden native `<input type=\"checkbox\">` so native form submission includes the control. */\n readonly name = input<string | undefined>(undefined);\n\n /** Id on the host element. Auto-generated as `tw-checkbox-N` when not provided. Anchors the derived label/description ids; the accessible name inside a `<tw-form-field>` comes from `aria-labelledby`, not from the field's `<label for>` (the host is a custom element, which `for` cannot target). */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /** Accessible name when no visible label is provided. Mirrored to `aria-label`. Defaults to `undefined`. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** ID of an external element that labels the checkbox. Mirrored to `aria-labelledby`. Defaults to `undefined`. */\n readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** ID of an external element that describes the checkbox. Mirrored to `aria-describedby`. Form-field merges its hint/error ids alongside. Defaults to `undefined`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the directive uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /**\n * Two-way bound checked state. Updates when the user toggles via click or\n * Space, **and** when a bound form writes into the control\n * (`FormControl.setValue`, `ngModel`, `writeValue`). Defaults to `false`.\n *\n * The two-way binding mints a `checkedChange` output. That output is the\n * *any-change* channel: it fires on programmatic writes as well as user\n * gestures. `(change)` is the *user-gesture-only* channel. Bind\n * `(checkedChange)` to mirror state; bind `(change)` for analytics or a\n * confirmation prompt, where a programmatic write must not count as a click.\n * Writing back into the same form from a `(checkedChange)` handler will echo.\n */\n readonly checked = model(false);\n\n /**\n * Two-way bound indeterminate state. When true, the box shows a dash and the\n * host exposes `aria-checked=\"mixed\"`. Any user toggle clears indeterminate\n * and sets `checked` to `true`. Defaults to `false`.\n *\n * Its minted `indeterminateChange` output follows the same rule as\n * `checkedChange`: it also fires when `writeValue` clears the state, so it is\n * an any-change channel, not a gesture channel.\n */\n readonly indeterminate = model(false);\n\n /**\n * Fires after the checked state changes from a user interaction (click or\n * Space). Does **not** fire when the value is updated programmatically via\n * `writeValue` / `FormControl.setValue` / `ngModel` — for those, bind the\n * two-way binding's `(checkedChange)` instead, which fires on any change.\n */\n readonly change = output<boolean>();\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n private readonly cvaDisabled = signal(false);\n\n private readonly _focused = signal(false);\n\n /** @internal Shared `errorState` / `required` / `errors` derivation — see `wireErrorState`. */\n private readonly errorWiring = wireErrorState({\n ngControl: () => this.ngControl,\n matcher: () => this.errorStateMatcher(),\n required: () => this.requiredInput(),\n // A checkbox bound with `Validators.requiredTrue` is required too.\n requiredValidators: [Validators.required, Validators.requiredTrue],\n track: [() => this._focused()],\n });\n private readonly describedByIdsSignal = signal<readonly string[]>([]);\n private readonly labelledByIdsSignal = signal<readonly string[]>([]);\n\n private readonly uid = nextId++;\n /** @internal Fallback id used when the consumer does not set `[id]`. */\n readonly hostId = `tw-checkbox-${this.uid}`;\n\n /** @internal Resolved id on the host element. */\n readonly id: Signal<string> = computed(() => this.idInput() ?? this.hostId);\n\n /** @internal Id of the internal label `<span>`, derived from the resolved host id. */\n readonly labelElementId = computed(() => `${this.id()}-label`);\n\n /** @internal Id of the internal description `<span>`, derived from the resolved host id. */\n readonly descriptionElementId = computed(() => `${this.id()}-description`);\n\n constructor() {\n super();\n // Material-style CVA wiring: declare ourselves as the value accessor on any\n // host-level `NgControl` (FormControlDirective, NgModel, etc.). This avoids\n // the circular-DI that a static `NG_VALUE_ACCESSOR` provider would create\n // because `NgControl` is injected with `self: true` on the same element.\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n afterNextRender(() => {\n if (isDevMode() && !this.hasAccessibleNameHint()) {\n console.warn(\n '[tw-checkbox] The checkbox has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.',\n );\n }\n });\n }\n\n /** @internal */\n readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n /**\n * @internal Visible-state mirror of the `checked` model. `linkedSignal` keeps it\n * synced with parent updates (including `writeValue` from reactive forms), while\n * also accepting explicit `set()` calls from `toggle()` / `writeValue()` so the\n * DOM reflects the new state synchronously — before `checkedChange` propagates\n * through the host binding round-trip. Reading this signal in host bindings\n * (`aria-checked`, `data-checked`, box classes) decouples render from the\n * model's notification cadence.\n */\n readonly internalChecked = linkedSignal(() => this.checked());\n\n /**\n * @internal Visible-state mirror of the `indeterminate` model. Same rationale as\n * `internalChecked` — `toggle()` and `writeValue()` clear it synchronously so\n * `aria-checked=\"mixed\"` flips off in the same microtask as `aria-checked=\"true\"`.\n */\n readonly internalIndeterminate = linkedSignal(() => this.indeterminate());\n\n readonly ariaCheckedValue = computed(() => {\n if (this.internalIndeterminate()) return 'mixed';\n return this.internalChecked() ? 'true' : 'false';\n });\n\n readonly effectiveAriaLabelledby = computed(() => {\n // A wrapping `<tw-form-field>` pushes the projected `<label twLabel>` id (plus\n // any consumer `aria-labelledby`) through `setLabelledByIds`. Those ids win:\n // the host is `<tw-checkbox role=\"checkbox\">`, a custom element that is not a\n // labelable form control, so the field's `<label for>` resolves to nothing and\n // this attribute is the ONLY route from the visible label to the control.\n // Without it the checkbox's own label span is empty in that arrangement — the\n // visible text lives in the form-field — and the control has no name at all.\n const pushed = this.labelledByIdsSignal();\n if (pushed.length) return pushed.join(' ');\n const external = this.ariaLabelledby();\n if (external) return external;\n if (this.ariaLabel()) return undefined;\n return this.labelElementId();\n });\n\n readonly effectiveAriaDescribedby = computed(() => {\n const merged: string[] = [];\n const extra = this.describedByIdsSignal();\n for (const id of extra) merged.push(id);\n const external = this.ariaDescribedby();\n if (external) {\n for (const id of external.split(/\\s+/).filter(Boolean)) merged.push(id);\n } else if (extra.length === 0) {\n // Only fall back to the internal description id when no external sources are wired.\n merged.push(this.descriptionElementId());\n }\n return merged.length ? merged.join(' ') : undefined;\n });\n\n private readonly isActive = computed(() => this.internalChecked() || this.internalIndeterminate());\n\n // ── FormFieldControl signals ──\n\n /** @internal */\n readonly value: Signal<boolean | null> = computed(() => this.internalChecked());\n\n /** @internal */\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n\n /** @internal Checkboxes are never empty in the form-field sense — they always have a boolean value. */\n readonly empty: Signal<boolean> = computed(() => false);\n\n /** @internal */\n readonly required: Signal<boolean> = this.errorWiring.required;\n\n /** @internal */\n readonly errorState: Signal<boolean> = this.errorWiring.errorState;\n\n /** @internal Active validation errors map from the bound `NgControl`. Drives `[twError match=\"…\"]` inside a wrapping `tw-form-field`; without it the form-field's key set is permanently empty and every `match`ed error stays hidden. */\n override readonly errors: Signal<Record<string, unknown> | null> = this.errorWiring.errors;\n\n /** @internal */\n readonly controlType = 'checkbox';\n\n /** @internal */\n readonly userAriaDescribedBy: Signal<string | undefined> = computed(() => this.ariaDescribedby());\n\n /** @internal Consumer-supplied `aria-labelledby`, surfaced so the wrapping form-field merges it into the ids it pushes back rather than replacing it. */\n override readonly userAriaLabelledby: Signal<string | undefined> = computed(() =>\n this.ariaLabelledby(),\n );\n\n private readonly variantResult = computed(() =>\n checkboxVariants({\n size: this.size(),\n labelPosition: this.labelPosition(),\n active: this.isActive(),\n disabled: this.isDisabled(),\n }),\n );\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly boxWrapClasses = computed(() => this.variantResult().boxWrap());\n readonly iconClasses = computed(() => this.variantResult().icon());\n readonly labelWrapClasses = computed(() => this.variantResult().labelWrap());\n readonly labelClasses = computed(() => this.variantResult().label());\n readonly descriptionClasses = computed(() => this.variantResult().description());\n\n readonly boxClasses = computed(() => {\n const base = this.variantResult().box();\n const active = this.isActive();\n const error = this.errorState();\n const variant = this.variant();\n const effectiveColor: TwColor = error ? 'error' : this.color();\n if (!active) {\n if (error) return `${base} border-error-500`;\n return base;\n }\n const lookup = variant === 'solid' ? SOLID_BOX : OUTLINE_BOX;\n return `${base} ${lookup[effectiveColor]}`;\n });\n\n readonly iconColorClasses = computed(() => {\n const lookup = this.variant() === 'solid' ? SOLID_ICON : OUTLINE_ICON;\n const effectiveColor: TwColor = this.errorState() ? 'error' : this.color();\n return `inline-flex items-center justify-center ${lookup[effectiveColor]}`;\n });\n\n // ── Interactions ──────────────────────────────────────────\n\n /** Toggles the checked state. Clears indeterminate if set. No-op when disabled. */\n toggle(): void {\n if (this.isDisabled()) return;\n const wasIndeterminate = this.internalIndeterminate();\n const next = wasIndeterminate ? true : !this.internalChecked();\n this.internalChecked.set(next);\n this.checked.set(next);\n if (wasIndeterminate) {\n this.internalIndeterminate.set(false);\n this.indeterminate.set(false);\n }\n this.onChange(next);\n // Deliberately NOT `onTouched()`. Angular's CVA contract registers\n // `onTouched` as the BLUR notification; calling it here flipped `touched`\n // the instant the value changed, so a consumer staging error display on\n // `touched` (\"only once they leave the field\") got different behaviour from\n // `tw-checkbox` than from `tw-slider` / `tw-input`. `onBlur()` below is the\n // only place that fires it.\n this.change.emit(next);\n }\n\n /** Handles keyboard activation. Only Space toggles — matches native checkbox semantics. */\n onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) return;\n if (event.key === ' ' || event.key === 'Spacebar') {\n event.preventDefault();\n this.toggle();\n }\n }\n\n /** @internal Called on host blur to notify forms the control has been touched and recompute errorState. */\n onBlur(): void {\n this.onTouched();\n this.errorWiring.bump();\n }\n\n // ── ControlValueAccessor ──────────────────────────────────\n\n writeValue(value: boolean | null | undefined): void {\n const next = !!value;\n this.internalChecked.set(next);\n this.checked.set(next);\n this.internalIndeterminate.set(false);\n this.indeterminate.set(false);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n }\n\n // ── FormFieldControl methods ──\n\n /** @internal Called by the form-field once it has computed the merged describedby ids. */\n setDescribedByIds(ids: string[]): void {\n this.describedByIdsSignal.set([...ids]);\n }\n\n /** @internal Receives the merged `aria-labelledby` ids from the wrapping form-field. Required because the host is a custom element rather than a labelable control, so the field's `<label for>` never reaches it. */\n override setLabelledByIds(ids: string[]): void {\n this.labelledByIdsSignal.set([...ids]);\n }\n\n /** @internal Called when the form-field container is clicked — focus the host without toggling. */\n onContainerClick(event: MouseEvent): void {\n if (this.isDisabled()) return;\n if (event.defaultPrevented) return;\n const host = this.elementRef.nativeElement;\n if (event.target === host || host.contains(event.target as Node)) return;\n host.focus();\n }\n\n // ── Lifecycle ─────────────────────────────────────────────\n\n ngOnInit(): void {\n const monitor$ = this.focusMonitor.monitor(this.elementRef);\n if (isObservable(monitor$)) {\n monitor$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((origin) => {\n const wasFocused = this._focused();\n this._focused.set(!!origin);\n if (wasFocused && !origin) {\n // Blur often flips `touched` on the bound `NgControl`; notify forms\n // and bump the revision so `errorState` recomputes.\n this.onTouched();\n this.errorWiring.bump();\n }\n });\n }\n this.destroyRef.onDestroy(() => {\n this.focusMonitor.stopMonitoring(this.elementRef);\n });\n\n // NgControl's `control` is set by the parent FormControl* directive before\n // children's `ngOnInit`. Connect here so errorState reacts to status/value\n // changes on the bound control.\n this.errorWiring.connect();\n }\n\n private hasAccessibleNameHint(): boolean {\n if (this.label() || this.ariaLabel() || this.ariaLabelledby()) return true;\n const host = this.elementRef.nativeElement;\n return host.textContent !== null && host.textContent.trim().length > 0;\n }\n}\n","/**\n * Generated bundle index. Do not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AC;AACjD,yBAAA;AACF,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmET,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,UAAU;AAClB,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,qBAAqB,EAAE,mBAAmB;AAC1C,wBAAA,2BAA2B,EAAE,yBAAyB;AACtD,wBAAA,qBAAqB,EAAE,oBAAoB;AAC3C,wBAAA,sBAAsB,EAAE,sBAAsB;AAC9C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,wBAAwB,EAAE,mCAAmC;AAC7D,wBAAA,yBAAyB,EAAE,oCAAoC;AAC/D,wBAAA,iBAAiB,EAAE,uBAAuB;AAC1C,wBAAA,aAAa,EAAE,gBAAgB;AAC/B,wBAAA,SAAS,EAAE,UAAU;AACrB,wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,QAAQ,EAAE,UAAU;AACrB,qBAAA;AACF,iBAAA;;;ACtSD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-checkbox.mjs","sources":["../../../projects/ngx-tw/checkbox/checkbox.ts","../../../projects/ngx-tw/checkbox/cdevhub-ngx-tw-checkbox.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n type OnInit,\n output,\n signal,\n type Signal,\n} from '@angular/core';\nimport {\n type ControlValueAccessor,\n NgControl,\n Validators,\n} from '@angular/forms';\nimport { FocusMonitor } from '@angular/cdk/a11y';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { isObservable } from 'rxjs';\nimport { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n type TwColor,\n type TwSize,\n wireErrorState,\n} from '@cdevhub/ngx-tw/core';\nimport { FormFieldControl, TW_FORM_FIELD_CONTROL } from '@cdevhub/ngx-tw/form-field';\n\n/** Visual style of the checkbox when checked or indeterminate. */\nexport type CheckboxVariant = 'solid' | 'outline';\n\n/** Position of the label relative to the checkbox control. */\nexport type CheckboxLabelPosition = 'before' | 'after';\n\n// ── tv() config ──────────────────────────────────────────────────\n\nconst checkboxVariants = tv(\n {\n slots: {\n // `items-start` aligns the boxWrap with the top of the label container; combined with\n // a `min-h-N` matching the label's first-line line-height on boxWrap, the box stays\n // centered on the first line of the label whether it spans one line or many.\n //\n // ── Row-height scale (selection cohort) ──────────────────────────────\n // The rendered row is `max(boxWrap, label first line)`, and the host itself is the\n // click target (`role=\"checkbox\"` + `tabindex` + `(click)` all sit on the root), so\n // the row IS the interactive target. It runs 16 / 20 / 24 / 28 / 32 px — five distinct\n // steps, every one on the 4px baseline of docs/vertical-rhythm.md, and identical to\n // `switch`, the sibling selection control. Selection controls are glyph-scale and\n // deliberately do NOT take the pinned 24/32/36/44/48 form-row scale (vertical-rhythm.md\n // section 4).\n //\n // The row is driven by `boxWrap` min-h, NOT by the box glyph, which stays at its own\n // well-proportioned 14 / 16 / 20 / 24 / 28 scale (4px of slack inside the row at every\n // size; 2px at xs, where the codified size-3.5 half-step applies). Driving it from\n // boxWrap is what makes the five steps survive when no label is projected.\n //\n // Because centering demands `boxWrap height == label first-line leading`, the label\n // leading carries the same 4 / 5 / 6 / 7 / 8 progression. That is forced, not chosen:\n // the label font scale has only three steps (text-xs, text-sm, text-base), so leading\n // is the only lever that can break the sm/md and lg/xl ties. Before this, sm and md\n // both rendered a 20px row — a dead step. Accepted cost: `text-base leading-8` at xl is\n // a 2.0 line ratio, looser than typographic ideal on a wrapped multi-line label.\n root: 'relative inline-flex items-start gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n boxWrap: 'relative inline-flex items-center justify-center shrink-0',\n box: 'inline-flex items-center justify-center rounded-md border transition-colors duration-normal motion-reduce:transition-none',\n icon: 'absolute inset-0 flex items-center justify-center pointer-events-none empty:hidden',\n labelWrap: 'flex flex-col min-w-0 empty:hidden',\n label: 'font-medium text-fg empty:hidden',\n description: 'text-fg-muted empty:hidden',\n },\n variants: {\n size: {\n xs: {\n // `size-3.5` half-step: aligns with text-xs/leading-4. Codified per CLAUDE.md.\n box: 'size-3.5',\n icon: '[&_svg]:size-3',\n boxWrap: 'min-h-4',\n label: 'text-xs leading-4',\n description: 'text-2xs leading-4',\n },\n sm: {\n box: 'size-4',\n icon: '[&_svg]:size-3',\n boxWrap: 'min-h-5',\n label: 'text-sm leading-5',\n description: 'text-xs leading-4',\n },\n md: {\n box: 'size-5',\n // md icon uses `size-3.5` (14px) — proportional inset (70%) of the\n // size-5 (20px) box; the half-step is the only size that fills the\n // checkmark without crowding the box edges.\n icon: '[&_svg]:size-3.5',\n // 24px row. `text-sm` is shared with sm by the documented font scale, so the\n // leading breaks the tie: leading-6 lifts the row off sm's 20px.\n boxWrap: 'min-h-6',\n label: 'text-sm leading-6',\n description: 'text-xs leading-4',\n },\n lg: {\n box: 'size-6',\n icon: '[&_svg]:size-4',\n // 28px row — leading-7 keeps the first label line the same height as boxWrap.\n boxWrap: 'min-h-7',\n label: 'text-base leading-7',\n description: 'text-sm leading-5',\n },\n xl: {\n box: 'size-7',\n icon: '[&_svg]:size-5',\n // 32px row. `text-base` is shared with lg, so leading-8 breaks that tie the same\n // way leading-6 breaks sm/md. A 2.0 ratio on a wrapped label is the accepted cost.\n boxWrap: 'min-h-8',\n label: 'text-base leading-8',\n description: 'text-sm leading-5',\n },\n },\n labelPosition: {\n before: { root: 'flex-row-reverse' },\n after: { root: 'flex-row' },\n },\n active: {\n true: { box: '' },\n false: { box: 'bg-surface border-border hover:border-border-strong' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: { root: '' },\n },\n },\n defaultVariants: {\n size: 'md',\n labelPosition: 'after',\n active: false,\n disabled: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Static active-state color lookups (statically written for Tailwind v4 scanning) ──\n\nconst SOLID_BOX: Record<TwColor, string> = {\n primary: 'bg-primary-600 border-primary-600',\n secondary: 'bg-secondary-600 border-secondary-600',\n accent: 'bg-accent-600 border-accent-600',\n neutral: 'bg-fg border-fg',\n info: 'bg-info-600 border-info-600',\n success: 'bg-success-600 border-success-600',\n warning: 'bg-warning-500 border-warning-border-strong',\n error: 'bg-error-600 border-error-600',\n};\n\nconst SOLID_ICON: Record<TwColor, string> = {\n primary: 'text-on-primary',\n secondary: 'text-on-secondary',\n accent: 'text-on-accent',\n neutral: 'text-on-neutral',\n info: 'text-on-info',\n success: 'text-on-success',\n warning: 'text-on-warning',\n error: 'text-on-error',\n};\n\nconst OUTLINE_BOX: Record<TwColor, string> = {\n primary: 'bg-surface border-primary-600',\n secondary: 'bg-surface border-secondary-600',\n accent: 'bg-surface border-accent-600',\n neutral: 'bg-surface border-fg',\n info: 'bg-surface border-info-600',\n success: 'bg-surface border-success-600',\n warning: 'bg-surface border-warning-border-strong',\n error: 'bg-surface border-error-600',\n};\n\nconst OUTLINE_ICON: Record<TwColor, string> = {\n primary: 'text-primary-600',\n secondary: 'text-secondary-600',\n accent: 'text-accent-600',\n neutral: 'text-fg',\n info: 'text-info-600',\n success: 'text-success-600',\n warning: 'text-warning-600',\n error: 'text-error-600',\n};\n\nlet nextId = 0;\n\n// ── CheckboxComponent ────────────────────────────────────────────\n\n@Component({\n selector: 'tw-checkbox',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TW_FORM_FIELD_CONTROL,\n useExisting: forwardRef(() => CheckboxComponent),\n },\n ],\n template: `\n <!--\n Hidden form-submission proxy. Uses \\`hidden\\` (display:none), not \\`sr-only\\`:\n a display:none control is excluded from focus order so axe's\n \\`nested-interactive\\` rule doesn't flag it inside the \\`role=\"checkbox\"\\`\n host, yet it still participates in native (non-Angular) form submission —\n the entry-list algorithm excludes only \\`disabled\\` controls, not hidden ones.\n -->\n <input\n type=\"checkbox\"\n hidden\n aria-hidden=\"true\"\n [name]=\"name() || null\"\n [checked]=\"internalChecked()\"\n [disabled]=\"isDisabled()\"\n />\n\n <span [class]=\"boxWrapClasses()\">\n <span [class]=\"boxClasses()\">\n <span [class]=\"iconClasses()\">\n @if (internalIndeterminate()) {\n <span [class]=\"iconColorClasses()\" animate.enter=\"check-in\">\n <ng-content select=\"[slot='indeterminate-icon']\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path\n d=\"M5 12 h14\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </ng-content>\n </span>\n } @else if (internalChecked()) {\n <span [class]=\"iconColorClasses()\" animate.enter=\"check-in\">\n <ng-content select=\"[slot='check-icon']\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" aria-hidden=\"true\">\n <path\n d=\"M5 12 l5 5 l9 -11\"\n stroke-width=\"3\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </ng-content>\n </span>\n }\n </span>\n </span>\n </span>\n\n <span [class]=\"labelWrapClasses()\">\n <span [id]=\"labelElementId()\" [class]=\"labelClasses()\">\n <ng-content>\n @if (label()) {\n {{ label() }}\n }\n </ng-content>\n </span>\n <span [id]=\"descriptionElementId()\" [class]=\"descriptionClasses()\">\n <ng-content select=\"[slot='description']\">\n @if (description()) {\n {{ description() }}\n }\n </ng-content>\n </span>\n </span>\n `,\n host: {\n 'role': 'checkbox',\n '[id]': 'id()',\n '[class]': 'rootClasses()',\n '[attr.data-checked]': 'internalChecked()',\n '[attr.data-indeterminate]': 'internalIndeterminate()',\n '[attr.aria-checked]': 'ariaCheckedValue()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'effectiveAriaLabelledby() || null',\n '[attr.aria-describedby]': 'effectiveAriaDescribedby() || null',\n '[attr.tabindex]': 'isDisabled() ? -1 : 0',\n '[attr.name]': 'name() || null',\n '(click)': 'toggle()',\n '(keydown)': 'onKeydown($event)',\n '(blur)': 'onBlur()',\n },\n})\nexport class CheckboxComponent\n extends FormFieldControl<boolean>\n implements ControlValueAccessor, OnInit\n{\n /** Sets the semantic color for the checked and indeterminate box fill/border. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls the overall scale of the box, check icon, and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** Visual style when checked or indeterminate. `'solid'` fills the box with the color; `'outline'` keeps a transparent fill with a colored border and check. Defaults to `'solid'`. */\n readonly variant = input<CheckboxVariant>('solid');\n\n /** When true, prevents interaction and applies muted styling. Defaults to `false`. */\n readonly disabled = input(false);\n\n /** When true, sets `aria-required=\"true\"` so assistive tech announces the control as required. Defaults to `false`. */\n readonly requiredInput = input(false, { alias: 'required' });\n\n /** Optional inline label rendered next to the checkbox. Use default content projection for rich label content instead. Projection takes precedence. */\n readonly label = input<string | undefined>(undefined);\n\n /** Optional secondary description rendered under the label. Use `[slot=\"description\"]` content projection for rich content instead. Projection takes precedence. */\n readonly description = input<string | undefined>(undefined);\n\n /** Position of the label/description relative to the checkbox. Defaults to `'after'`. */\n readonly labelPosition = input<CheckboxLabelPosition>('after');\n\n /** Optional name attribute, applied to the hidden native `<input type=\"checkbox\">` so native form submission includes the control. */\n readonly name = input<string | undefined>(undefined);\n\n /** Id on the host element. Auto-generated as `tw-checkbox-N` when not provided. Anchors the derived label/description ids; the accessible name inside a `<tw-form-field>` comes from `aria-labelledby`, not from the field's `<label for>` (the host is a custom element, which `for` cannot target). */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /** Accessible name when no visible label is provided. Mirrored to `aria-label`. Defaults to `undefined`. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'aria-label' });\n\n /** ID of an external element that labels the checkbox. Mirrored to `aria-labelledby`. Defaults to `undefined`. */\n readonly ariaLabelledby = input<string | undefined>(undefined, { alias: 'aria-labelledby' });\n\n /** ID of an external element that describes the checkbox. Mirrored to `aria-describedby`. Form-field merges its hint/error ids alongside. Defaults to `undefined`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the directive uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /**\n * Two-way bound checked state. Updates when the user toggles via click or\n * Space, **and** when a bound form writes into the control\n * (`FormControl.setValue`, `ngModel`, `writeValue`). Defaults to `false`.\n *\n * The two-way binding mints a `checkedChange` output. That output is the\n * *any-change* channel: it fires on programmatic writes as well as user\n * gestures. `(change)` is the *user-gesture-only* channel. Bind\n * `(checkedChange)` to mirror state; bind `(change)` for analytics or a\n * confirmation prompt, where a programmatic write must not count as a click.\n * Writing back into the same form from a `(checkedChange)` handler will echo.\n */\n readonly checked = model(false);\n\n /**\n * Two-way bound indeterminate state. When true, the box shows a dash and the\n * host exposes `aria-checked=\"mixed\"`. Any user toggle clears indeterminate\n * and sets `checked` to `true`. Defaults to `false`.\n *\n * Its minted `indeterminateChange` output follows the same rule as\n * `checkedChange`: it also fires when `writeValue` clears the state, so it is\n * an any-change channel, not a gesture channel.\n */\n readonly indeterminate = model(false);\n\n /**\n * Fires after the checked state changes from a user interaction (click or\n * Space). Does **not** fire when the value is updated programmatically via\n * `writeValue` / `FormControl.setValue` / `ngModel` — for those, bind the\n * two-way binding's `(checkedChange)` instead, which fires on any change.\n */\n readonly change = output<boolean>();\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n private readonly cvaDisabled = signal(false);\n\n private readonly _focused = signal(false);\n\n /** @internal Shared `errorState` / `required` / `errors` derivation — see `wireErrorState`. */\n private readonly errorWiring = wireErrorState({\n ngControl: () => this.ngControl,\n matcher: () => this.errorStateMatcher(),\n required: () => this.requiredInput(),\n // A checkbox bound with `Validators.requiredTrue` is required too.\n requiredValidators: [Validators.required, Validators.requiredTrue],\n track: [() => this._focused()],\n });\n private readonly describedByIdsSignal = signal<readonly string[]>([]);\n private readonly labelledByIdsSignal = signal<readonly string[]>([]);\n\n private readonly uid = nextId++;\n /** @internal Fallback id used when the consumer does not set `[id]`. */\n readonly hostId = `tw-checkbox-${this.uid}`;\n\n /** @internal Resolved id on the host element. */\n readonly id: Signal<string> = computed(() => this.idInput() ?? this.hostId);\n\n /** @internal Id of the internal label `<span>`, derived from the resolved host id. */\n readonly labelElementId = computed(() => `${this.id()}-label`);\n\n /** @internal Id of the internal description `<span>`, derived from the resolved host id. */\n readonly descriptionElementId = computed(() => `${this.id()}-description`);\n\n constructor() {\n super();\n // Material-style CVA wiring: declare ourselves as the value accessor on any\n // host-level `NgControl` (FormControlDirective, NgModel, etc.). This avoids\n // the circular-DI that a static `NG_VALUE_ACCESSOR` provider would create\n // because `NgControl` is injected with `self: true` on the same element.\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n afterNextRender(() => {\n if (isDevMode() && !this.hasAccessibleNameHint()) {\n console.warn(\n '[tw-checkbox] The checkbox has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.',\n );\n }\n });\n }\n\n /** @internal */\n readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n /**\n * @internal Visible-state mirror of the `checked` model. `linkedSignal` keeps it\n * synced with parent updates (including `writeValue` from reactive forms), while\n * also accepting explicit `set()` calls from `toggle()` / `writeValue()` so the\n * DOM reflects the new state synchronously — before `checkedChange` propagates\n * through the host binding round-trip. Reading this signal in host bindings\n * (`aria-checked`, `data-checked`, box classes) decouples render from the\n * model's notification cadence.\n */\n readonly internalChecked = linkedSignal(() => this.checked());\n\n /**\n * @internal Visible-state mirror of the `indeterminate` model. Same rationale as\n * `internalChecked` — `toggle()` and `writeValue()` clear it synchronously so\n * `aria-checked=\"mixed\"` flips off in the same microtask as `aria-checked=\"true\"`.\n */\n readonly internalIndeterminate = linkedSignal(() => this.indeterminate());\n\n readonly ariaCheckedValue = computed(() => {\n if (this.internalIndeterminate()) return 'mixed';\n return this.internalChecked() ? 'true' : 'false';\n });\n\n readonly effectiveAriaLabelledby = computed(() => {\n // A wrapping `<tw-form-field>` pushes the projected `<label twLabel>` id (plus\n // any consumer `aria-labelledby`) through `setLabelledByIds`. Those ids win:\n // the host is `<tw-checkbox role=\"checkbox\">`, a custom element that is not a\n // labelable form control, so the field's `<label for>` resolves to nothing and\n // this attribute is the ONLY route from the visible label to the control.\n // Without it the checkbox's own label span is empty in that arrangement — the\n // visible text lives in the form-field — and the control has no name at all.\n const pushed = this.labelledByIdsSignal();\n if (pushed.length) return pushed.join(' ');\n const external = this.ariaLabelledby();\n if (external) return external;\n if (this.ariaLabel()) return undefined;\n return this.labelElementId();\n });\n\n readonly effectiveAriaDescribedby = computed(() => {\n const merged: string[] = [];\n const extra = this.describedByIdsSignal();\n for (const id of extra) merged.push(id);\n const external = this.ariaDescribedby();\n if (external) {\n for (const id of external.split(/\\s+/).filter(Boolean)) merged.push(id);\n } else if (extra.length === 0) {\n // Only fall back to the internal description id when no external sources are wired.\n merged.push(this.descriptionElementId());\n }\n return merged.length ? merged.join(' ') : undefined;\n });\n\n private readonly isActive = computed(() => this.internalChecked() || this.internalIndeterminate());\n\n // ── FormFieldControl signals ──\n\n /** @internal */\n readonly value: Signal<boolean | null> = computed(() => this.internalChecked());\n\n /** @internal */\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n\n /** @internal Checkboxes are never empty in the form-field sense — they always have a boolean value. */\n readonly empty: Signal<boolean> = computed(() => false);\n\n /** @internal */\n readonly required: Signal<boolean> = this.errorWiring.required;\n\n /** @internal */\n readonly errorState: Signal<boolean> = this.errorWiring.errorState;\n\n /** @internal Active validation errors map from the bound `NgControl`. Drives `[twError match=\"…\"]` inside a wrapping `tw-form-field`; without it the form-field's key set is permanently empty and every `match`ed error stays hidden. */\n override readonly errors: Signal<Record<string, unknown> | null> = this.errorWiring.errors;\n\n /** @internal */\n readonly controlType = 'checkbox';\n\n /** @internal */\n readonly userAriaDescribedBy: Signal<string | undefined> = computed(() => this.ariaDescribedby());\n\n /** @internal Consumer-supplied `aria-labelledby`, surfaced so the wrapping form-field merges it into the ids it pushes back rather than replacing it. */\n override readonly userAriaLabelledby: Signal<string | undefined> = computed(() =>\n this.ariaLabelledby(),\n );\n\n private readonly variantResult = computed(() =>\n checkboxVariants({\n size: this.size(),\n labelPosition: this.labelPosition(),\n active: this.isActive(),\n disabled: this.isDisabled(),\n }),\n );\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly boxWrapClasses = computed(() => this.variantResult().boxWrap());\n readonly iconClasses = computed(() => this.variantResult().icon());\n readonly labelWrapClasses = computed(() => this.variantResult().labelWrap());\n readonly labelClasses = computed(() => this.variantResult().label());\n readonly descriptionClasses = computed(() => this.variantResult().description());\n\n readonly boxClasses = computed(() => {\n const base = this.variantResult().box();\n const active = this.isActive();\n const error = this.errorState();\n const variant = this.variant();\n const effectiveColor: TwColor = error ? 'error' : this.color();\n if (!active) {\n if (error) return `${base} border-error-500`;\n return base;\n }\n const lookup = variant === 'solid' ? SOLID_BOX : OUTLINE_BOX;\n return `${base} ${lookup[effectiveColor]}`;\n });\n\n readonly iconColorClasses = computed(() => {\n const lookup = this.variant() === 'solid' ? SOLID_ICON : OUTLINE_ICON;\n const effectiveColor: TwColor = this.errorState() ? 'error' : this.color();\n return `inline-flex items-center justify-center ${lookup[effectiveColor]}`;\n });\n\n // ── Interactions ──────────────────────────────────────────\n\n /** Toggles the checked state. Clears indeterminate if set. No-op when disabled. */\n toggle(): void {\n if (this.isDisabled()) return;\n const wasIndeterminate = this.internalIndeterminate();\n const next = wasIndeterminate ? true : !this.internalChecked();\n this.internalChecked.set(next);\n this.checked.set(next);\n if (wasIndeterminate) {\n this.internalIndeterminate.set(false);\n this.indeterminate.set(false);\n }\n this.onChange(next);\n // Deliberately NOT `onTouched()`. Angular's CVA contract registers\n // `onTouched` as the BLUR notification; calling it here flipped `touched`\n // the instant the value changed, so a consumer staging error display on\n // `touched` (\"only once they leave the field\") got different behaviour from\n // `tw-checkbox` than from `tw-slider` / `tw-input`. `onBlur()` below is the\n // only place that fires it.\n this.change.emit(next);\n }\n\n /** Handles keyboard activation. Only Space toggles — matches native checkbox semantics. */\n onKeydown(event: KeyboardEvent): void {\n if (this.isDisabled()) return;\n if (event.key === ' ' || event.key === 'Spacebar') {\n event.preventDefault();\n this.toggle();\n }\n }\n\n /** @internal Called on host blur to notify forms the control has been touched and recompute errorState. */\n onBlur(): void {\n this.onTouched();\n this.errorWiring.bump();\n }\n\n // ── ControlValueAccessor ──────────────────────────────────\n\n writeValue(value: boolean | null | undefined): void {\n const next = !!value;\n this.internalChecked.set(next);\n this.checked.set(next);\n this.internalIndeterminate.set(false);\n this.indeterminate.set(false);\n }\n\n registerOnChange(fn: (value: boolean) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.cvaDisabled.set(isDisabled);\n }\n\n // ── FormFieldControl methods ──\n\n /** @internal Called by the form-field once it has computed the merged describedby ids. */\n setDescribedByIds(ids: string[]): void {\n this.describedByIdsSignal.set([...ids]);\n }\n\n /** @internal Receives the merged `aria-labelledby` ids from the wrapping form-field. Required because the host is a custom element rather than a labelable control, so the field's `<label for>` never reaches it. */\n override setLabelledByIds(ids: string[]): void {\n this.labelledByIdsSignal.set([...ids]);\n }\n\n /** @internal Called when the form-field container is clicked — focus the host without toggling. */\n onContainerClick(event: MouseEvent): void {\n if (this.isDisabled()) return;\n if (event.defaultPrevented) return;\n const host = this.elementRef.nativeElement;\n if (event.target === host || host.contains(event.target as Node)) return;\n host.focus();\n }\n\n // ── Lifecycle ─────────────────────────────────────────────\n\n ngOnInit(): void {\n const monitor$ = this.focusMonitor.monitor(this.elementRef);\n if (isObservable(monitor$)) {\n monitor$\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((origin) => {\n const wasFocused = this._focused();\n this._focused.set(!!origin);\n if (wasFocused && !origin) {\n // Blur often flips `touched` on the bound `NgControl`; notify forms\n // and bump the revision so `errorState` recomputes.\n this.onTouched();\n this.errorWiring.bump();\n }\n });\n }\n this.destroyRef.onDestroy(() => {\n this.focusMonitor.stopMonitoring(this.elementRef);\n });\n\n // NgControl's `control` is set by the parent FormControl* directive before\n // children's `ngOnInit`. Connect here so errorState reacts to status/value\n // changes on the bound control.\n this.errorWiring.connect();\n }\n\n private hasAccessibleNameHint(): boolean {\n if (this.label() || this.ariaLabel() || this.ariaLabelledby()) return true;\n const host = this.elementRef.nativeElement;\n return host.textContent !== null && host.textContent.trim().length > 0;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAyCA;AAEA,MAAM,gBAAgB,GAAG,EAAE,CACzB;AACE,IAAA,KAAK,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;AAyBL,QAAA,IAAI,EAAE,uKAAuK;AAC7K,QAAA,OAAO,EAAE,2DAA2D;AACpE,QAAA,GAAG,EAAE,2HAA2H;AAChI,QAAA,IAAI,EAAE,oFAAoF;AAC1F,QAAA,SAAS,EAAE,oCAAoC;AAC/C,QAAA,KAAK,EAAE,kCAAkC;AACzC,QAAA,WAAW,EAAE,4BAA4B;AAC1C,KAAA;AACD,IAAA,QAA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sBAAsB;AAC9C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,wBAAwB,EAAE,mCAAmC;AAC7D,wBAAA,yBAAyB,EAAE,oCAAoC;AAC/D,wBAAA,iBAAiB,EAAE,uBAAuB;AAC1C,wBAAA,aAAa,EAAE,gBAAgB;AAC/B,wBAAA,SAAS,EAAE,UAAU;AACrB,wBAAA,WAAW,EAAE,mBAAmB;AAChC,wBAAA,QAAQ,EAAE,UAAU;AACrB,qBAAA;AACF,iBAAA;;;ACtSD;;AAEG;;;;"}
|
|
@@ -38,7 +38,7 @@ const PAGE_BUTTON_ACTIVE_BG = {
|
|
|
38
38
|
success: 'bg-success-600 hover:bg-success-700 border-success-600 focus-visible:outline-success-border',
|
|
39
39
|
// Warning keeps -500 because the amber-500/amber-950 pairing meets contrast — see
|
|
40
40
|
// `theme/_semantic.css` warning role comment ("yellow signage convention").
|
|
41
|
-
warning: 'bg-warning-500 hover:bg-warning-600 border-warning-
|
|
41
|
+
warning: 'bg-warning-500 hover:bg-warning-600 border-warning-border-strong focus-visible:outline-warning-border',
|
|
42
42
|
error: 'bg-error-600 hover:bg-error-700 border-error-600 focus-visible:outline-error-border',
|
|
43
43
|
};
|
|
44
44
|
const PAGE_BUTTON_ACTIVE_FG = {
|