@cdevhub/ngx-tw 0.6.1 → 0.7.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 +18 -8
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +14 -8
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-card.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-collapsible.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +16 -16
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- 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-select.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-separator.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +21 -21
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.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-tags-input.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/index.json +1 -1
- package/package.json +1 -1
- package/types/cdevhub-ngx-tw-tabs.d.ts +23 -3
- package/types/cdevhub-ngx-tw-theme.d.ts +18 -1
|
@@ -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 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;AAC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3C,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,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,EAAE,EAAE;;AAEF,gBAAA,GAAG,EAAE,UAAU;AACf,gBAAA,IAAI,EAAE,gBAAgB;AACtB,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,KAAK,EAAE,mBAAmB;AAC1B,gBAAA,WAAW,EAAE,oBAAoB;AAClC,aAAA;AACD,YAAA,EAAE,EAAE;AACF,gBAAA,GAAG,EAAE,QAAQ;AACb,gBAAA,IAAI,EAAE,gBAAgB;AACtB,gBAAA,OAAO,EAAE,SAAS;AAClB,gBAAA,KAAK,EAAE,mBAAm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,iBAAA;;;ACtSD;;AAEG;;;;"}
|
|
@@ -84,13 +84,13 @@ const collapsibleVariants = tv({
|
|
|
84
84
|
{ variant: 'solid', color: 'warning', class: { root: 'bg-warning-50', trigger: 'text-warning-800 hover:bg-warning-100', content: 'text-warning-700', icon: 'text-warning-600' } },
|
|
85
85
|
{ variant: 'solid', color: 'error', class: { root: 'bg-error-50', trigger: 'text-error-800 hover:bg-error-100', content: 'text-error-700', icon: 'text-error-600' } },
|
|
86
86
|
// ── Outline + color ──
|
|
87
|
-
{ variant: 'outline', color: 'primary', class: { root: 'border-primary-
|
|
88
|
-
{ variant: 'outline', color: 'secondary', class: { root: 'border-secondary-
|
|
89
|
-
{ variant: 'outline', color: 'accent', class: { root: 'border-accent-
|
|
90
|
-
{ variant: 'outline', color: 'info', class: { root: 'border-info-
|
|
91
|
-
{ variant: 'outline', color: 'success', class: { root: 'border-success-
|
|
92
|
-
{ variant: 'outline', color: 'warning', class: { root: 'border-warning-
|
|
93
|
-
{ variant: 'outline', color: 'error', class: { root: 'border-error-
|
|
87
|
+
{ variant: 'outline', color: 'primary', class: { root: 'border-primary-border' } },
|
|
88
|
+
{ variant: 'outline', color: 'secondary', class: { root: 'border-secondary-border' } },
|
|
89
|
+
{ variant: 'outline', color: 'accent', class: { root: 'border-accent-border' } },
|
|
90
|
+
{ variant: 'outline', color: 'info', class: { root: 'border-info-border' } },
|
|
91
|
+
{ variant: 'outline', color: 'success', class: { root: 'border-success-border' } },
|
|
92
|
+
{ variant: 'outline', color: 'warning', class: { root: 'border-warning-border' } },
|
|
93
|
+
{ variant: 'outline', color: 'error', class: { root: 'border-error-border' } },
|
|
94
94
|
],
|
|
95
95
|
defaultVariants: {
|
|
96
96
|
variant: 'default',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-collapsible.mjs","sources":["../../../projects/ngx-tw/collapsible/collapsible.ts","../../../projects/ngx-tw/collapsible/cdevhub-ngx-tw-collapsible.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n output,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { type FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the collapsible container. */\nexport type CollapsibleVariant =\n | 'default'\n | 'outline'\n | 'ghost'\n | 'solid'\n | CollapsibleVariantLegacy;\n\n/**\n * Legacy `variant` spellings, kept so existing templates keep compiling.\n * @deprecated `'bordered'` aliases `'outline'` and `'filled'` aliases\n * `'solid'`. Both render identically to their replacements and will be\n * removed in the next major.\n */\nexport type CollapsibleVariantLegacy = 'bordered' | 'filled';\n\n/** Canonical `variant` spellings — the set `tv()` actually keys on. */\ntype CollapsibleVariantCanonical = Exclude<CollapsibleVariant, CollapsibleVariantLegacy>;\n\n/** Maps every legacy spelling onto its canonical replacement. */\nconst VARIANT_ALIASES: Readonly<\n Record<CollapsibleVariantLegacy, CollapsibleVariantCanonical>\n> = {\n bordered: 'outline',\n filled: 'solid',\n};\n\n/** Decorative axes bundled into a single collapsible input. */\nexport interface CollapsibleDisplay {\n /** Visual style of the panel container. Defaults to `'default'`. */\n variant?: CollapsibleVariant;\n /** Semantic color; applies to the `outline` and `solid` variants. Defaults to `'neutral'`. */\n color?: TwColor;\n /** Padding scale for the trigger and content sections. Defaults to `'md'`. */\n size?: TwSize;\n}\n\n/**\n * `CollapsibleDisplay` after defaults are filled in and legacy `variant`\n * spellings are normalised. Module-private on purpose: narrowing `variant`\n * to the canonical set is what makes the compiler prove the normalisation\n * happened before `tv()` is called, and it is not consumer API.\n */\ntype ResolvedCollapsibleDisplay = Required<Omit<CollapsibleDisplay, 'variant'>> & {\n variant: CollapsibleVariantCanonical;\n};\n\nconst DISPLAY_DEFAULTS: ResolvedCollapsibleDisplay = {\n variant: 'default',\n color: 'neutral',\n size: 'md',\n};\n\n// ── tv() config ──\n\nconst collapsibleVariants = tv({\n slots: {\n root: 'block rounded-lg overflow-hidden',\n trigger:\n 'flex w-full items-center justify-between gap-3 bg-transparent border-0 appearance-none cursor-pointer text-sm font-medium text-fg transition-colors duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n icon: 'size-5 shrink-0 text-fg-muted transition-transform duration-normal motion-reduce:transition-none',\n content: 'text-sm text-fg',\n },\n variants: {\n variant: {\n default: {\n root: 'border-b border-border',\n trigger: 'hover:bg-surface-muted',\n },\n outline: {\n root: 'border border-border',\n trigger: 'hover:bg-surface-muted',\n content: 'border-t border-border',\n },\n ghost: {\n root: '',\n trigger: 'hover:bg-surface-muted rounded-md',\n },\n solid: {\n root: '',\n },\n },\n // The trigger takes a `min-h-*` floor rather than a pinned height (see\n // `docs/vertical-rhythm.md`): a collapsible header is a single-line control\n // at rest, but a long title must be free to wrap. Vertical padding sits one\n // half-step below the inline-padding scale so the floor actually binds — at\n // the nominal padding the natural height lands 2px above it at every size,\n // leaving a closed collapsible 38px against a 36px button beside it.\n // `content` padding is unchanged: it is container padding, not control height.\n size: {\n xs: { trigger: 'px-2 py-0.5 text-xs min-h-6', content: 'p-2' },\n sm: { trigger: 'px-3 py-1 text-sm min-h-8', content: 'p-3' },\n md: { trigger: 'px-4 py-1.5 text-sm min-h-9', content: 'p-4' },\n lg: { trigger: 'px-5 py-2 text-base min-h-11', content: 'p-6' },\n xl: { trigger: 'px-6 py-2.5 text-base min-h-12', content: 'p-8' },\n },\n color: {\n primary: {},\n secondary: {},\n accent: {},\n neutral: {},\n info: {},\n success: {},\n warning: {},\n error: {},\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none' },\n false: {},\n },\n inGroup: {\n true: { root: 'rounded-none border-b-0 border-0' },\n false: {},\n },\n },\n compoundVariants: [\n // ── Solid + color ──\n { variant: 'solid', color: 'primary', class: { root: 'bg-primary-50', trigger: 'text-primary-800 hover:bg-primary-100', content: 'text-primary-700', icon: 'text-primary-600' } },\n { variant: 'solid', color: 'secondary', class: { root: 'bg-secondary-50', trigger: 'text-secondary-800 hover:bg-secondary-100', content: 'text-secondary-700', icon: 'text-secondary-600' } },\n { variant: 'solid', color: 'accent', class: { root: 'bg-accent-50', trigger: 'text-accent-800 hover:bg-accent-100', content: 'text-accent-700', icon: 'text-accent-600' } },\n { variant: 'solid', color: 'neutral', class: { root: 'bg-surface-muted', trigger: 'text-fg hover:bg-surface-sunken', content: 'text-fg-muted' } },\n { variant: 'solid', color: 'info', class: { root: 'bg-info-50', trigger: 'text-info-800 hover:bg-info-100', content: 'text-info-700', icon: 'text-info-600' } },\n { variant: 'solid', color: 'success', class: { root: 'bg-success-50', trigger: 'text-success-800 hover:bg-success-100', content: 'text-success-700', icon: 'text-success-600' } },\n { variant: 'solid', color: 'warning', class: { root: 'bg-warning-50', trigger: 'text-warning-800 hover:bg-warning-100', content: 'text-warning-700', icon: 'text-warning-600' } },\n { variant: 'solid', color: 'error', class: { root: 'bg-error-50', trigger: 'text-error-800 hover:bg-error-100', content: 'text-error-700', icon: 'text-error-600' } },\n\n // ── Outline + color ──\n { variant: 'outline', color: 'primary', class: { root: 'border-primary-300' } },\n { variant: 'outline', color: 'secondary', class: { root: 'border-secondary-300' } },\n { variant: 'outline', color: 'accent', class: { root: 'border-accent-300' } },\n { variant: 'outline', color: 'info', class: { root: 'border-info-300' } },\n { variant: 'outline', color: 'success', class: { root: 'border-success-300' } },\n { variant: 'outline', color: 'warning', class: { root: 'border-warning-300' } },\n { variant: 'outline', color: 'error', class: { root: 'border-error-300' } },\n ],\n defaultVariants: {\n variant: 'default',\n color: 'neutral',\n size: 'md',\n disabled: false,\n inGroup: false,\n },\n}, {\n twMerge: true,\n});\n\n// ── Unique ID counter ──\nlet nextId = 0;\n\n// ── CollapsibleIconDirective ──\n\n@Directive({\n selector: '[twCollapsibleIcon]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class CollapsibleIconDirective {\n private readonly collapsible = inject(CollapsibleComponent);\n\n /** @internal */\n readonly classes = computed(() => {\n const base = this.collapsible.iconClasses();\n return this.collapsible.open() ? `${base} rotate-180` : base;\n });\n}\n\n// ── CollapsibleTriggerDirective ──\n\n/**\n * Marks the toggle element inside a `<tw-collapsible>`. Apply this to a\n * native `<button>`; the directive wires up ARIA, keyboard handling, and\n * focus management. Custom hosts (e.g. `<div>`) are not supported.\n */\n@Component({\n selector: '[twCollapsibleTrigger]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n // ViewEncapsulation.None — the directive's host IS the consumer's <button>;\n // scoped styles can't reach a host that lives outside this component's tree.\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '[attr.aria-expanded]': 'collapsible.open()',\n '[attr.aria-controls]': 'collapsible.panelId',\n '[attr.aria-disabled]': 'collapsible.disabled() || null',\n '[attr.tabindex]': 'collapsible.disabled() ? -1 : 0',\n '[attr.id]': 'collapsible.triggerId',\n '(click)': 'onClick()',\n '(keydown)': 'onKeydown($event)',\n },\n template: `\n <ng-content />\n @if (!collapsible.customIcon()) {\n <svg [class]=\"iconClasses()\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" d=\"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n }\n `,\n})\nexport class CollapsibleTriggerDirective implements FocusableOption {\n /** @internal */\n readonly collapsible = inject(CollapsibleComponent);\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** @internal */\n readonly classes = this.collapsible.triggerClasses;\n\n /** @internal */\n readonly iconClasses = computed(() => {\n const base = this.collapsible.iconClasses();\n return this.collapsible.open() ? `${base} rotate-180` : base;\n });\n\n /** @internal Toggles the parent collapsible when the trigger is clicked. */\n onClick(): void {\n this.collapsible.toggle();\n }\n\n /** @internal Toggles on Enter/Space and delegates arrow-key navigation to the enclosing group. */\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.collapsible.toggle();\n return;\n }\n\n // Delegate arrow key navigation to group\n const group = this.collapsible.group;\n if (group) {\n group.onTriggerKeydown(event);\n }\n }\n\n /** Moves DOM focus to the trigger element. Called by `FocusKeyManager` during arrow-key navigation. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** @internal FocusableOption: lets FocusKeyManager skip disabled triggers. */\n get disabled(): boolean {\n return this.collapsible.disabled();\n }\n\n /** @internal FocusableOption: text label for typeahead navigation. */\n getLabel(): string {\n return this.elementRef.nativeElement.textContent?.trim() ?? '';\n }\n}\n\n// ── CollapsibleComponent ──\n\n@Component({\n selector: 'tw-collapsible',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'rootClasses()',\n },\n template: `\n <ng-content select=\"[twCollapsibleTrigger]\" />\n @if (keepAlive() ? activated() : open()) {\n <div [class]=\"contentWrapperClasses()\"\n [attr.data-open]=\"open()\"\n [attr.id]=\"panelId\"\n [attr.aria-labelledby]=\"triggerId\"\n role=\"region\"\n [animate.enter]=\"'collapsible-enter'\"\n [animate.leave]=\"keepAlive() ? '' : 'collapsible-leave'\">\n <div class=\"overflow-hidden\">\n <ng-content />\n </div>\n </div>\n }\n `,\n})\nexport class CollapsibleComponent {\n /** Unique identifier for this panel. Required when used inside a group. Defaults to an empty string. */\n readonly value = input<string>('');\n\n /** Bundles decorative axes: `variant`, `color`, `size`. Accepts a partial; unset keys fall back to the defaults (`{ variant: 'default', color: 'neutral', size: 'md' }`). */\n readonly display = input<CollapsibleDisplay>({});\n\n /** When true, the panel cannot be toggled and appears dimmed. Defaults to `false`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** When true, content is rendered on first open and kept in the DOM across toggles. Defaults to `false`. */\n readonly keepAlive = input(false, { transform: booleanAttribute });\n\n /** Whether the panel is expanded. Two-way bindable. Defaults to `false`. */\n readonly open = model(false);\n\n /** Fires after the panel is toggled. Payload is the new open state. */\n readonly toggled = output<boolean>();\n\n /** @internal */\n readonly group = inject(CollapsibleGroupComponent, { optional: true });\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n /** @internal */\n readonly customIcon = contentChild(CollapsibleIconDirective);\n\n private readonly componentId = `tw-collapsible-${nextId++}`;\n readonly triggerId = `${this.componentId}-trigger`;\n readonly panelId = `${this.componentId}-panel`;\n\n /**\n * @internal Tracks whether the panel has been opened at least once (for keepAlive mode).\n *\n * Latches to `true` the first time `open` is `true` and stays `true` for the\n * lifetime of the component. Implemented as a `linkedSignal` so the derivation\n * lives next to the source — `activated()` reads cleanly as \"derived from open\".\n */\n readonly activated = linkedSignal<boolean, boolean>({\n source: () => this.open(),\n computation: (open, prev) => (prev?.value ?? false) || open,\n });\n\n // ── Resolved display config ──\n\n /**\n * @internal Resolved decorative configuration: defaults filled in, then\n * legacy `variant` spellings folded onto their canonical replacements. The\n * narrowed return type is the guard — `tv()` silently returns *base classes\n * only* for a variant value it does not know, so an un-normalised legacy\n * string would render an unstyled panel with no error anywhere.\n */\n readonly resolvedDisplay = computed<ResolvedCollapsibleDisplay>(() => {\n const merged = { ...DISPLAY_DEFAULTS, ...this.display() };\n const variant = merged.variant;\n return {\n ...merged,\n variant:\n (VARIANT_ALIASES as Record<string, CollapsibleVariantCanonical | undefined>)[\n variant\n ] ?? (variant as CollapsibleVariantCanonical),\n };\n });\n\n // ── Variant classes ──\n\n private readonly variantResult = computed(() => {\n const { variant, color, size } = this.resolvedDisplay();\n return collapsibleVariants({\n variant,\n color,\n size,\n disabled: this.disabled(),\n inGroup: !!this.group,\n });\n });\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly triggerClasses = computed(() => this.variantResult().trigger());\n readonly iconClasses = computed(() => this.variantResult().icon());\n readonly contentClasses = computed(() => this.variantResult().content());\n\n readonly contentWrapperClasses = computed(() => {\n const base = this.contentClasses();\n return this.keepAlive() ? `${base} collapsible-keep-alive` : base;\n });\n\n /** @internal Toggle the open state. Called by the trigger directive. */\n toggle(): void {\n if (this.disabled()) return;\n\n if (this.group) {\n this.group.toggleItem(this);\n } else {\n const next = !this.open();\n this.open.set(next);\n this.toggled.emit(next);\n this.announceState(next);\n }\n }\n\n /** @internal Set the open state programmatically (used by group). */\n setOpen(value: boolean): void {\n this.open.set(value);\n }\n\n /** @internal */\n announceState(isOpen: boolean): void {\n this.liveAnnouncer.announce(\n isOpen ? 'Section expanded' : 'Section collapsed',\n );\n }\n}\n\n// ── CollapsibleGroupComponent ──\n\n@Component({\n selector: 'tw-collapsible-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Use bindings (not static attributes) so subclasses can override the values.\n // Angular DOES inherit host metadata across `extends`; literal-string entries\n // can't be turned off by a subclass, but binding expressions are evaluated\n // against the actual instance and so respect subclass overrides of the\n // backing signal/computed.\n '[attr.role]': 'hostRole()',\n '[class]': 'hostClasses()',\n },\n template: `<ng-content />`,\n})\nexport class CollapsibleGroupComponent {\n /**\n * When true, only one panel can be open at a time.\n *\n * `AccordionComponent` (subclass) ignores this input and drives the same\n * behaviour from its own `type` input via the `isAccordionMode()` /\n * `canCollapseSingleMode()` virtual hooks below. Consumers using\n * `<tw-collapsible-group>` directly should bind this input; consumers using\n * `<tw-accordion>` should bind `type=\"single\"` / `type=\"multiple\"` instead.\n *\n * Defaults to `false`.\n */\n readonly accordion = input(false, { transform: booleanAttribute });\n\n /** The value(s) of currently open panels. String in accordion mode, string array in independent mode. `null` when no panel is open in accordion mode. Two-way bindable. Defaults to `null`. */\n readonly value = model<string | string[] | null>(null);\n\n /**\n * @internal Wrapper `role` attribute. Subclasses may override (e.g.\n * `AccordionComponent` returns `null` per APG — accordions don't carry\n * `role=\"group\"`).\n */\n readonly hostRole = computed<string | null>(() => 'group');\n\n /**\n * @internal Host class string. Subclasses may override to provide their own\n * variant-driven string (e.g. `AccordionComponent.rootClasses`).\n */\n readonly hostClasses = computed(() => 'block rounded-lg overflow-hidden divide-y divide-border');\n\n /** @internal */\n readonly items = contentChildren(CollapsibleComponent);\n\n /** @internal */\n readonly triggers = contentChildren(CollapsibleTriggerDirective, { descendants: true });\n\n private keyManager: FocusKeyManager<CollapsibleTriggerDirective> | null = null;\n\n /**\n * @internal Whether the group is in single-open-panel mode.\n *\n * Subclasses override to bridge their own input surface (e.g. `AccordionComponent`\n * returns `this.type() === 'single'`). All internal toggle/sync/warn logic reads\n * the mode through this hook, never `accordion()` directly — that lets the\n * subclass drive mode from `type` without redeclaring the parent's signal input.\n */\n protected isAccordionMode(): boolean {\n return this.accordion();\n }\n\n /**\n * @internal Whether re-clicking the open panel in single mode closes it.\n *\n * Defaults to `true` for the bare group component (re-clicking always closes).\n * `AccordionComponent` overrides to honour its `collapsible` opt-out input.\n */\n protected canCollapseSingleMode(): boolean {\n return true;\n }\n\n constructor() {\n // Sync children open states from the group value\n afterNextRender(() => {\n this.syncChildrenFromValue();\n });\n\n // Watch for value changes and sync children\n effect(() => {\n const val = this.value();\n const items = this.items();\n if (items.length === 0) return;\n\n // Read mode via the virtual hook so subclass overrides take effect.\n const accordion = this.isAccordionMode();\n\n if (isDevMode()) {\n if (accordion && Array.isArray(val)) {\n console.warn(\n '[tw-collapsible-group] `value` is an array but the group is in accordion mode. Use a single string (or null) in accordion mode.',\n );\n } else if (!accordion && typeof val === 'string' && val !== '') {\n console.warn(\n '[tw-collapsible-group] `value` is a string but the group is in independent mode. Use a string[] in independent mode.',\n );\n }\n }\n\n untracked(() => {\n for (const item of items) {\n const itemValue = item.value();\n if (accordion) {\n item.setOpen(itemValue === val);\n } else {\n const openValues = Array.isArray(val) ? val : [];\n item.setOpen(openValues.includes(itemValue));\n }\n }\n });\n });\n\n // Rebuild FocusKeyManager whenever the trigger set changes\n effect((onCleanup) => {\n const triggers = this.triggers();\n if (triggers.length === 0) {\n this.keyManager = null;\n return;\n }\n this.keyManager = new FocusKeyManager(triggers)\n .withWrap()\n .withHomeAndEnd()\n .withVerticalOrientation()\n .withTypeAhead();\n\n onCleanup(() => {\n this.keyManager?.destroy();\n });\n });\n }\n\n private syncChildrenFromValue(): void {\n const val = this.value();\n const items = this.items();\n const accordion = this.isAccordionMode();\n for (const item of items) {\n const itemValue = item.value();\n if (accordion) {\n item.setOpen(itemValue === val);\n } else {\n const openValues = Array.isArray(val) ? val : [];\n item.setOpen(openValues.includes(itemValue));\n }\n }\n }\n\n /** @internal Called by a child collapsible when it is toggled. */\n toggleItem(item: CollapsibleComponent): void {\n const itemValue = item.value();\n const isCurrentlyOpen = item.open();\n const next = !isCurrentlyOpen;\n\n if (this.isAccordionMode()) {\n if (next) {\n // Close all others, open this one\n for (const child of this.items()) {\n if (child !== item) {\n child.setOpen(false);\n }\n }\n item.setOpen(true);\n this.value.set(itemValue);\n } else {\n // Close this one — honour the subclass's collapsible opt-out, if any.\n if (!this.canCollapseSingleMode()) return;\n item.setOpen(false);\n this.value.set(null);\n }\n } else {\n // Independent mode\n item.setOpen(next);\n const currentOpen = this.items()\n .filter(i => i.open())\n .map(i => i.value());\n this.value.set(currentOpen);\n }\n\n item.toggled.emit(next);\n item.announceState(next);\n }\n\n /** @internal Handle keyboard navigation within the group. */\n onTriggerKeydown(event: KeyboardEvent): void {\n if (!this.keyManager) return;\n\n // Sync active item with the currently focused trigger.\n // Use event.target (not document.activeElement) so this works under shadow DOM.\n const triggers = this.triggers();\n const focusedIdx = triggers.findIndex(\n t => t.elementRef.nativeElement === event.target,\n );\n if (focusedIdx >= 0 && focusedIdx !== this.keyManager.activeItemIndex) {\n this.keyManager.setActiveItem(focusedIdx);\n }\n\n this.keyManager.onKeydown(event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":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,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAAA,oBAAoB,6FAGjB,2BAA2B,CAAA,EAAA,EAAA,GAAE,EAAE,WAAW,EAAE,IAAI,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC7cxF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-collapsible.mjs","sources":["../../../projects/ngx-tw/collapsible/collapsible.ts","../../../projects/ngx-tw/collapsible/cdevhub-ngx-tw-collapsible.ts"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n isDevMode,\n linkedSignal,\n model,\n output,\n untracked,\n ViewEncapsulation,\n} from '@angular/core';\nimport { type FocusableOption, FocusKeyManager, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\n\n/** Visual style of the collapsible container. */\nexport type CollapsibleVariant =\n | 'default'\n | 'outline'\n | 'ghost'\n | 'solid'\n | CollapsibleVariantLegacy;\n\n/**\n * Legacy `variant` spellings, kept so existing templates keep compiling.\n * @deprecated `'bordered'` aliases `'outline'` and `'filled'` aliases\n * `'solid'`. Both render identically to their replacements and will be\n * removed in the next major.\n */\nexport type CollapsibleVariantLegacy = 'bordered' | 'filled';\n\n/** Canonical `variant` spellings — the set `tv()` actually keys on. */\ntype CollapsibleVariantCanonical = Exclude<CollapsibleVariant, CollapsibleVariantLegacy>;\n\n/** Maps every legacy spelling onto its canonical replacement. */\nconst VARIANT_ALIASES: Readonly<\n Record<CollapsibleVariantLegacy, CollapsibleVariantCanonical>\n> = {\n bordered: 'outline',\n filled: 'solid',\n};\n\n/** Decorative axes bundled into a single collapsible input. */\nexport interface CollapsibleDisplay {\n /** Visual style of the panel container. Defaults to `'default'`. */\n variant?: CollapsibleVariant;\n /** Semantic color; applies to the `outline` and `solid` variants. Defaults to `'neutral'`. */\n color?: TwColor;\n /** Padding scale for the trigger and content sections. Defaults to `'md'`. */\n size?: TwSize;\n}\n\n/**\n * `CollapsibleDisplay` after defaults are filled in and legacy `variant`\n * spellings are normalised. Module-private on purpose: narrowing `variant`\n * to the canonical set is what makes the compiler prove the normalisation\n * happened before `tv()` is called, and it is not consumer API.\n */\ntype ResolvedCollapsibleDisplay = Required<Omit<CollapsibleDisplay, 'variant'>> & {\n variant: CollapsibleVariantCanonical;\n};\n\nconst DISPLAY_DEFAULTS: ResolvedCollapsibleDisplay = {\n variant: 'default',\n color: 'neutral',\n size: 'md',\n};\n\n// ── tv() config ──\n\nconst collapsibleVariants = tv({\n slots: {\n root: 'block rounded-lg overflow-hidden',\n trigger:\n 'flex w-full items-center justify-between gap-3 bg-transparent border-0 appearance-none cursor-pointer text-sm font-medium text-fg transition-colors duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n icon: 'size-5 shrink-0 text-fg-muted transition-transform duration-normal motion-reduce:transition-none',\n content: 'text-sm text-fg',\n },\n variants: {\n variant: {\n default: {\n root: 'border-b border-border',\n trigger: 'hover:bg-surface-muted',\n },\n outline: {\n root: 'border border-border',\n trigger: 'hover:bg-surface-muted',\n content: 'border-t border-border',\n },\n ghost: {\n root: '',\n trigger: 'hover:bg-surface-muted rounded-md',\n },\n solid: {\n root: '',\n },\n },\n // The trigger takes a `min-h-*` floor rather than a pinned height (see\n // `docs/vertical-rhythm.md`): a collapsible header is a single-line control\n // at rest, but a long title must be free to wrap. Vertical padding sits one\n // half-step below the inline-padding scale so the floor actually binds — at\n // the nominal padding the natural height lands 2px above it at every size,\n // leaving a closed collapsible 38px against a 36px button beside it.\n // `content` padding is unchanged: it is container padding, not control height.\n size: {\n xs: { trigger: 'px-2 py-0.5 text-xs min-h-6', content: 'p-2' },\n sm: { trigger: 'px-3 py-1 text-sm min-h-8', content: 'p-3' },\n md: { trigger: 'px-4 py-1.5 text-sm min-h-9', content: 'p-4' },\n lg: { trigger: 'px-5 py-2 text-base min-h-11', content: 'p-6' },\n xl: { trigger: 'px-6 py-2.5 text-base min-h-12', content: 'p-8' },\n },\n color: {\n primary: {},\n secondary: {},\n accent: {},\n neutral: {},\n info: {},\n success: {},\n warning: {},\n error: {},\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none' },\n false: {},\n },\n inGroup: {\n true: { root: 'rounded-none border-b-0 border-0' },\n false: {},\n },\n },\n compoundVariants: [\n // ── Solid + color ──\n { variant: 'solid', color: 'primary', class: { root: 'bg-primary-50', trigger: 'text-primary-800 hover:bg-primary-100', content: 'text-primary-700', icon: 'text-primary-600' } },\n { variant: 'solid', color: 'secondary', class: { root: 'bg-secondary-50', trigger: 'text-secondary-800 hover:bg-secondary-100', content: 'text-secondary-700', icon: 'text-secondary-600' } },\n { variant: 'solid', color: 'accent', class: { root: 'bg-accent-50', trigger: 'text-accent-800 hover:bg-accent-100', content: 'text-accent-700', icon: 'text-accent-600' } },\n { variant: 'solid', color: 'neutral', class: { root: 'bg-surface-muted', trigger: 'text-fg hover:bg-surface-sunken', content: 'text-fg-muted' } },\n { variant: 'solid', color: 'info', class: { root: 'bg-info-50', trigger: 'text-info-800 hover:bg-info-100', content: 'text-info-700', icon: 'text-info-600' } },\n { variant: 'solid', color: 'success', class: { root: 'bg-success-50', trigger: 'text-success-800 hover:bg-success-100', content: 'text-success-700', icon: 'text-success-600' } },\n { variant: 'solid', color: 'warning', class: { root: 'bg-warning-50', trigger: 'text-warning-800 hover:bg-warning-100', content: 'text-warning-700', icon: 'text-warning-600' } },\n { variant: 'solid', color: 'error', class: { root: 'bg-error-50', trigger: 'text-error-800 hover:bg-error-100', content: 'text-error-700', icon: 'text-error-600' } },\n\n // ── Outline + color ──\n { variant: 'outline', color: 'primary', class: { root: 'border-primary-border' } },\n { variant: 'outline', color: 'secondary', class: { root: 'border-secondary-border' } },\n { variant: 'outline', color: 'accent', class: { root: 'border-accent-border' } },\n { variant: 'outline', color: 'info', class: { root: 'border-info-border' } },\n { variant: 'outline', color: 'success', class: { root: 'border-success-border' } },\n { variant: 'outline', color: 'warning', class: { root: 'border-warning-border' } },\n { variant: 'outline', color: 'error', class: { root: 'border-error-border' } },\n ],\n defaultVariants: {\n variant: 'default',\n color: 'neutral',\n size: 'md',\n disabled: false,\n inGroup: false,\n },\n}, {\n twMerge: true,\n});\n\n// ── Unique ID counter ──\nlet nextId = 0;\n\n// ── CollapsibleIconDirective ──\n\n@Directive({\n selector: '[twCollapsibleIcon]',\n host: {\n '[class]': 'classes()',\n },\n})\nexport class CollapsibleIconDirective {\n private readonly collapsible = inject(CollapsibleComponent);\n\n /** @internal */\n readonly classes = computed(() => {\n const base = this.collapsible.iconClasses();\n return this.collapsible.open() ? `${base} rotate-180` : base;\n });\n}\n\n// ── CollapsibleTriggerDirective ──\n\n/**\n * Marks the toggle element inside a `<tw-collapsible>`. Apply this to a\n * native `<button>`; the directive wires up ARIA, keyboard handling, and\n * focus management. Custom hosts (e.g. `<div>`) are not supported.\n */\n@Component({\n selector: '[twCollapsibleTrigger]',\n changeDetection: ChangeDetectionStrategy.OnPush,\n // ViewEncapsulation.None — the directive's host IS the consumer's <button>;\n // scoped styles can't reach a host that lives outside this component's tree.\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class]': 'classes()',\n '[attr.aria-expanded]': 'collapsible.open()',\n '[attr.aria-controls]': 'collapsible.panelId',\n '[attr.aria-disabled]': 'collapsible.disabled() || null',\n '[attr.tabindex]': 'collapsible.disabled() ? -1 : 0',\n '[attr.id]': 'collapsible.triggerId',\n '(click)': 'onClick()',\n '(keydown)': 'onKeydown($event)',\n },\n template: `\n <ng-content />\n @if (!collapsible.customIcon()) {\n <svg [class]=\"iconClasses()\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\">\n <path fill-rule=\"evenodd\" d=\"M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" />\n </svg>\n }\n `,\n})\nexport class CollapsibleTriggerDirective implements FocusableOption {\n /** @internal */\n readonly collapsible = inject(CollapsibleComponent);\n readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** @internal */\n readonly classes = this.collapsible.triggerClasses;\n\n /** @internal */\n readonly iconClasses = computed(() => {\n const base = this.collapsible.iconClasses();\n return this.collapsible.open() ? `${base} rotate-180` : base;\n });\n\n /** @internal Toggles the parent collapsible when the trigger is clicked. */\n onClick(): void {\n this.collapsible.toggle();\n }\n\n /** @internal Toggles on Enter/Space and delegates arrow-key navigation to the enclosing group. */\n onKeydown(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n this.collapsible.toggle();\n return;\n }\n\n // Delegate arrow key navigation to group\n const group = this.collapsible.group;\n if (group) {\n group.onTriggerKeydown(event);\n }\n }\n\n /** Moves DOM focus to the trigger element. Called by `FocusKeyManager` during arrow-key navigation. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n\n /** @internal FocusableOption: lets FocusKeyManager skip disabled triggers. */\n get disabled(): boolean {\n return this.collapsible.disabled();\n }\n\n /** @internal FocusableOption: text label for typeahead navigation. */\n getLabel(): string {\n return this.elementRef.nativeElement.textContent?.trim() ?? '';\n }\n}\n\n// ── CollapsibleComponent ──\n\n@Component({\n selector: 'tw-collapsible',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'rootClasses()',\n },\n template: `\n <ng-content select=\"[twCollapsibleTrigger]\" />\n @if (keepAlive() ? activated() : open()) {\n <div [class]=\"contentWrapperClasses()\"\n [attr.data-open]=\"open()\"\n [attr.id]=\"panelId\"\n [attr.aria-labelledby]=\"triggerId\"\n role=\"region\"\n [animate.enter]=\"'collapsible-enter'\"\n [animate.leave]=\"keepAlive() ? '' : 'collapsible-leave'\">\n <div class=\"overflow-hidden\">\n <ng-content />\n </div>\n </div>\n }\n `,\n})\nexport class CollapsibleComponent {\n /** Unique identifier for this panel. Required when used inside a group. Defaults to an empty string. */\n readonly value = input<string>('');\n\n /** Bundles decorative axes: `variant`, `color`, `size`. Accepts a partial; unset keys fall back to the defaults (`{ variant: 'default', color: 'neutral', size: 'md' }`). */\n readonly display = input<CollapsibleDisplay>({});\n\n /** When true, the panel cannot be toggled and appears dimmed. Defaults to `false`. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n /** When true, content is rendered on first open and kept in the DOM across toggles. Defaults to `false`. */\n readonly keepAlive = input(false, { transform: booleanAttribute });\n\n /** Whether the panel is expanded. Two-way bindable. Defaults to `false`. */\n readonly open = model(false);\n\n /** Fires after the panel is toggled. Payload is the new open state. */\n readonly toggled = output<boolean>();\n\n /** @internal */\n readonly group = inject(CollapsibleGroupComponent, { optional: true });\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n /** @internal */\n readonly customIcon = contentChild(CollapsibleIconDirective);\n\n private readonly componentId = `tw-collapsible-${nextId++}`;\n readonly triggerId = `${this.componentId}-trigger`;\n readonly panelId = `${this.componentId}-panel`;\n\n /**\n * @internal Tracks whether the panel has been opened at least once (for keepAlive mode).\n *\n * Latches to `true` the first time `open` is `true` and stays `true` for the\n * lifetime of the component. Implemented as a `linkedSignal` so the derivation\n * lives next to the source — `activated()` reads cleanly as \"derived from open\".\n */\n readonly activated = linkedSignal<boolean, boolean>({\n source: () => this.open(),\n computation: (open, prev) => (prev?.value ?? false) || open,\n });\n\n // ── Resolved display config ──\n\n /**\n * @internal Resolved decorative configuration: defaults filled in, then\n * legacy `variant` spellings folded onto their canonical replacements. The\n * narrowed return type is the guard — `tv()` silently returns *base classes\n * only* for a variant value it does not know, so an un-normalised legacy\n * string would render an unstyled panel with no error anywhere.\n */\n readonly resolvedDisplay = computed<ResolvedCollapsibleDisplay>(() => {\n const merged = { ...DISPLAY_DEFAULTS, ...this.display() };\n const variant = merged.variant;\n return {\n ...merged,\n variant:\n (VARIANT_ALIASES as Record<string, CollapsibleVariantCanonical | undefined>)[\n variant\n ] ?? (variant as CollapsibleVariantCanonical),\n };\n });\n\n // ── Variant classes ──\n\n private readonly variantResult = computed(() => {\n const { variant, color, size } = this.resolvedDisplay();\n return collapsibleVariants({\n variant,\n color,\n size,\n disabled: this.disabled(),\n inGroup: !!this.group,\n });\n });\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly triggerClasses = computed(() => this.variantResult().trigger());\n readonly iconClasses = computed(() => this.variantResult().icon());\n readonly contentClasses = computed(() => this.variantResult().content());\n\n readonly contentWrapperClasses = computed(() => {\n const base = this.contentClasses();\n return this.keepAlive() ? `${base} collapsible-keep-alive` : base;\n });\n\n /** @internal Toggle the open state. Called by the trigger directive. */\n toggle(): void {\n if (this.disabled()) return;\n\n if (this.group) {\n this.group.toggleItem(this);\n } else {\n const next = !this.open();\n this.open.set(next);\n this.toggled.emit(next);\n this.announceState(next);\n }\n }\n\n /** @internal Set the open state programmatically (used by group). */\n setOpen(value: boolean): void {\n this.open.set(value);\n }\n\n /** @internal */\n announceState(isOpen: boolean): void {\n this.liveAnnouncer.announce(\n isOpen ? 'Section expanded' : 'Section collapsed',\n );\n }\n}\n\n// ── CollapsibleGroupComponent ──\n\n@Component({\n selector: 'tw-collapsible-group',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Use bindings (not static attributes) so subclasses can override the values.\n // Angular DOES inherit host metadata across `extends`; literal-string entries\n // can't be turned off by a subclass, but binding expressions are evaluated\n // against the actual instance and so respect subclass overrides of the\n // backing signal/computed.\n '[attr.role]': 'hostRole()',\n '[class]': 'hostClasses()',\n },\n template: `<ng-content />`,\n})\nexport class CollapsibleGroupComponent {\n /**\n * When true, only one panel can be open at a time.\n *\n * `AccordionComponent` (subclass) ignores this input and drives the same\n * behaviour from its own `type` input via the `isAccordionMode()` /\n * `canCollapseSingleMode()` virtual hooks below. Consumers using\n * `<tw-collapsible-group>` directly should bind this input; consumers using\n * `<tw-accordion>` should bind `type=\"single\"` / `type=\"multiple\"` instead.\n *\n * Defaults to `false`.\n */\n readonly accordion = input(false, { transform: booleanAttribute });\n\n /** The value(s) of currently open panels. String in accordion mode, string array in independent mode. `null` when no panel is open in accordion mode. Two-way bindable. Defaults to `null`. */\n readonly value = model<string | string[] | null>(null);\n\n /**\n * @internal Wrapper `role` attribute. Subclasses may override (e.g.\n * `AccordionComponent` returns `null` per APG — accordions don't carry\n * `role=\"group\"`).\n */\n readonly hostRole = computed<string | null>(() => 'group');\n\n /**\n * @internal Host class string. Subclasses may override to provide their own\n * variant-driven string (e.g. `AccordionComponent.rootClasses`).\n */\n readonly hostClasses = computed(() => 'block rounded-lg overflow-hidden divide-y divide-border');\n\n /** @internal */\n readonly items = contentChildren(CollapsibleComponent);\n\n /** @internal */\n readonly triggers = contentChildren(CollapsibleTriggerDirective, { descendants: true });\n\n private keyManager: FocusKeyManager<CollapsibleTriggerDirective> | null = null;\n\n /**\n * @internal Whether the group is in single-open-panel mode.\n *\n * Subclasses override to bridge their own input surface (e.g. `AccordionComponent`\n * returns `this.type() === 'single'`). All internal toggle/sync/warn logic reads\n * the mode through this hook, never `accordion()` directly — that lets the\n * subclass drive mode from `type` without redeclaring the parent's signal input.\n */\n protected isAccordionMode(): boolean {\n return this.accordion();\n }\n\n /**\n * @internal Whether re-clicking the open panel in single mode closes it.\n *\n * Defaults to `true` for the bare group component (re-clicking always closes).\n * `AccordionComponent` overrides to honour its `collapsible` opt-out input.\n */\n protected canCollapseSingleMode(): boolean {\n return true;\n }\n\n constructor() {\n // Sync children open states from the group value\n afterNextRender(() => {\n this.syncChildrenFromValue();\n });\n\n // Watch for value changes and sync children\n effect(() => {\n const val = this.value();\n const items = this.items();\n if (items.length === 0) return;\n\n // Read mode via the virtual hook so subclass overrides take effect.\n const accordion = this.isAccordionMode();\n\n if (isDevMode()) {\n if (accordion && Array.isArray(val)) {\n console.warn(\n '[tw-collapsible-group] `value` is an array but the group is in accordion mode. Use a single string (or null) in accordion mode.',\n );\n } else if (!accordion && typeof val === 'string' && val !== '') {\n console.warn(\n '[tw-collapsible-group] `value` is a string but the group is in independent mode. Use a string[] in independent mode.',\n );\n }\n }\n\n untracked(() => {\n for (const item of items) {\n const itemValue = item.value();\n if (accordion) {\n item.setOpen(itemValue === val);\n } else {\n const openValues = Array.isArray(val) ? val : [];\n item.setOpen(openValues.includes(itemValue));\n }\n }\n });\n });\n\n // Rebuild FocusKeyManager whenever the trigger set changes\n effect((onCleanup) => {\n const triggers = this.triggers();\n if (triggers.length === 0) {\n this.keyManager = null;\n return;\n }\n this.keyManager = new FocusKeyManager(triggers)\n .withWrap()\n .withHomeAndEnd()\n .withVerticalOrientation()\n .withTypeAhead();\n\n onCleanup(() => {\n this.keyManager?.destroy();\n });\n });\n }\n\n private syncChildrenFromValue(): void {\n const val = this.value();\n const items = this.items();\n const accordion = this.isAccordionMode();\n for (const item of items) {\n const itemValue = item.value();\n if (accordion) {\n item.setOpen(itemValue === val);\n } else {\n const openValues = Array.isArray(val) ? val : [];\n item.setOpen(openValues.includes(itemValue));\n }\n }\n }\n\n /** @internal Called by a child collapsible when it is toggled. */\n toggleItem(item: CollapsibleComponent): void {\n const itemValue = item.value();\n const isCurrentlyOpen = item.open();\n const next = !isCurrentlyOpen;\n\n if (this.isAccordionMode()) {\n if (next) {\n // Close all others, open this one\n for (const child of this.items()) {\n if (child !== item) {\n child.setOpen(false);\n }\n }\n item.setOpen(true);\n this.value.set(itemValue);\n } else {\n // Close this one — honour the subclass's collapsible opt-out, if any.\n if (!this.canCollapseSingleMode()) return;\n item.setOpen(false);\n this.value.set(null);\n }\n } else {\n // Independent mode\n item.setOpen(next);\n const currentOpen = this.items()\n .filter(i => i.open())\n .map(i => i.value());\n this.value.set(currentOpen);\n }\n\n item.toggled.emit(next);\n item.announceState(next);\n }\n\n /** @internal Handle keyboard navigation within the group. */\n onTriggerKeydown(event: KeyboardEvent): void {\n if (!this.keyManager) return;\n\n // Sync active item with the currently focused trigger.\n // Use event.target (not document.activeElement) so this works under shadow DOM.\n const triggers = this.triggers();\n const focusedIdx = triggers.findIndex(\n t => t.elementRef.nativeElement === event.target,\n );\n if (focusedIdx >= 0 && focusedIdx !== this.keyManager.activeItemIndex) {\n this.keyManager.setActiveItem(focusedIdx);\n }\n\n this.keyManager.onKeydown(event);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AA2CA;AACA,MAAM,eAAe,GAEjB;AACF,IAAA,QAAQ,EAAE,SAAS;AACnB,IAAA,MAAM,EAAE,OAAO;CAChB;AAsBD,MAAM,gBAAgB,GAA+B;AACnD,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,IAAI,EAAE,IAAI;CACX;AAED;AAEA,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC7B,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,kCAAkC;AACxC,QAAA,OAAO,EACL,4RAA4R;AAC9R,QAAA,IAAI,EAAE,kGAAkG;AACxG,QAAA,OAAO,EAAE,iBAAiB;AAC3B,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,OAAO,EAAE;AACP,YAAA,OAAO,EAAE;AACP,gBAAA,IAAI,EAAE,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A;;AC7cxF;;AAEG;;;;"}
|
|
@@ -403,14 +403,14 @@ const comboboxVariants = tv({
|
|
|
403
403
|
xl: { trigger: 'px-6 text-base h-12', chevron: 'size-5', spinner: 'size-5' },
|
|
404
404
|
},
|
|
405
405
|
color: {
|
|
406
|
-
primary: { trigger: 'focus-within:outline-primary-
|
|
407
|
-
secondary: { trigger: 'focus-within:outline-secondary-
|
|
408
|
-
accent: { trigger: 'focus-within:outline-accent-
|
|
406
|
+
primary: { trigger: 'focus-within:outline-primary-border' },
|
|
407
|
+
secondary: { trigger: 'focus-within:outline-secondary-border' },
|
|
408
|
+
accent: { trigger: 'focus-within:outline-accent-border' },
|
|
409
409
|
neutral: { trigger: 'focus-within:outline-border-strong' },
|
|
410
|
-
info: { trigger: 'focus-within:outline-info-
|
|
411
|
-
success: { trigger: 'focus-within:outline-success-
|
|
412
|
-
warning: { trigger: 'focus-within:outline-warning-
|
|
413
|
-
error: { trigger: 'focus-within:outline-error-
|
|
410
|
+
info: { trigger: 'focus-within:outline-info-border' },
|
|
411
|
+
success: { trigger: 'focus-within:outline-success-border' },
|
|
412
|
+
warning: { trigger: 'focus-within:outline-warning-border' },
|
|
413
|
+
error: { trigger: 'focus-within:outline-error-border' },
|
|
414
414
|
},
|
|
415
415
|
disabled: {
|
|
416
416
|
true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },
|
|
@@ -432,7 +432,7 @@ const comboboxVariants = tv({
|
|
|
432
432
|
false: {},
|
|
433
433
|
},
|
|
434
434
|
errorState: {
|
|
435
|
-
true: { trigger: 'focus-within:outline-error-
|
|
435
|
+
true: { trigger: 'focus-within:outline-error-border' },
|
|
436
436
|
false: {},
|
|
437
437
|
},
|
|
438
438
|
},
|