@cdevhub/ngx-tw 0.6.1 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +7 -7
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +7 -7
- 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-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-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-tags-input.mjs +8 -8
- package/fesm2022/cdevhub-ngx-tw-tags-input.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-switch.mjs","sources":["../../../projects/ngx-tw/switch/switch.ts","../../../projects/ngx-tw/switch/cdevhub-ngx-tw-switch.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\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 { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n type TwColor,\n type TwSize,\n wireErrorState,\n} from '@cdevhub/ngx-tw/core';\n\n/** Position of the label relative to the switch control. */\nexport type SwitchLabelPosition = 'before' | 'after';\n\n// ── tv() config ──────────────────────────────────────────────────\n\nconst switchVariants = tv(\n {\n slots: {\n root: 'inline-flex items-center gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n switchEl: 'relative inline-flex items-center shrink-0',\n track:\n 'relative inline-flex items-center rounded-full border border-transparent transition-colors duration-normal motion-reduce:transition-none',\n thumb:\n 'absolute left-0.5 inline-flex items-center justify-center bg-surface rounded-full shadow-sm transition-transform duration-normal motion-reduce:transition-none',\n iconWrap:\n 'absolute inset-0 flex items-center justify-between px-1 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 track: 'h-4 w-7',\n thumb: 'size-3 data-[checked=true]:translate-x-3',\n label: 'text-xs',\n description: 'text-2xs',\n },\n sm: {\n track: 'h-5 w-9',\n thumb: 'size-4 data-[checked=true]:translate-x-4',\n label: 'text-sm',\n description: 'text-xs',\n },\n md: {\n track: 'h-6 w-11',\n thumb: 'size-5 data-[checked=true]:translate-x-5',\n label: 'text-sm',\n description: 'text-xs',\n },\n lg: {\n track: 'h-7 w-12',\n thumb: 'size-6 data-[checked=true]:translate-x-5',\n label: 'text-base',\n description: 'text-sm',\n },\n xl: {\n track: 'h-8 w-14',\n thumb: 'size-7 data-[checked=true]:translate-x-6',\n label: 'text-base',\n description: 'text-sm',\n },\n },\n labelPosition: {\n before: { root: 'flex-row-reverse' },\n after: { root: 'flex-row' },\n },\n checked: {\n true: { track: '' },\n false: { track: 'bg-surface-muted' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: { root: '' },\n },\n errorState: {\n true: { label: 'text-error-700', description: 'text-error-600' },\n false: { label: '', description: '' },\n },\n },\n compoundVariants: [\n // Error state on an off (unchecked) switch repaints the rail with the error color.\n // The on (checked) track is dominated by CHECKED_TRACK[color]; consumers wanting an\n // error appearance on a checked switch should set `color=\"error\"` directly.\n {\n errorState: true,\n checked: false,\n class: { track: 'bg-error-100 ring-1 ring-inset ring-error-300' },\n },\n ],\n defaultVariants: {\n size: 'md',\n labelPosition: 'after',\n checked: false,\n disabled: false,\n errorState: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Static checked-state color lookups (statically written for Tailwind v4 scanning) ──\n\nconst CHECKED_TRACK: Record<TwColor, string> = {\n primary: 'bg-primary-600',\n secondary: 'bg-secondary-600',\n accent: 'bg-accent-600',\n neutral: 'bg-fg',\n info: 'bg-info-600',\n success: 'bg-success-600',\n warning: 'bg-warning-500',\n error: 'bg-error-600',\n};\n\nconst CHECKED_ICON_COLOR: 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\nlet nextId = 0;\n\n// ── SwitchComponent ──────────────────────────────────────────────\n\n@Component({\n selector: 'tw-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span [class]=\"switchClasses()\">\n <span [class]=\"trackClasses()\">\n <span [class]=\"iconWrapClasses()\">\n <span [class]=\"offIconClasses()\">\n <ng-content select=\"[slot='off-icon']\" />\n </span>\n <span [class]=\"onIconClasses()\">\n <ng-content select=\"[slot='on-icon']\" />\n </span>\n </span>\n <span [class]=\"thumbClasses()\" [attr.data-checked]=\"internalChecked()\"></span>\n </span>\n </span>\n\n <span [class]=\"labelWrapClasses()\">\n <span [id]=\"labelId\" [class]=\"labelClasses()\">\n <ng-content />\n @if (label()) {\n {{ label() }}\n }\n </span>\n <span [id]=\"descriptionId\" [class]=\"descriptionClasses()\">\n <ng-content select=\"[slot='description']\" />\n @if (description()) {\n {{ description() }}\n }\n </span>\n </span>\n `,\n host: {\n 'role': 'switch',\n '[id]': 'hostId',\n '[class]': 'rootClasses()',\n '[attr.data-checked]': 'internalChecked()',\n '[attr.aria-checked]': 'internalChecked()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || 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 SwitchComponent implements ControlValueAccessor, OnInit {\n /** Sets the semantic color for the active (checked) track. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls the overall scale of the track, thumb, and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\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. Also inferred from `Validators.required` / `Validators.requiredTrue` on a bound control, so a reactive/template-driven form does not have to state it twice. Defaults to `false`. */\n readonly requiredInput = input(false, { alias: 'required' });\n\n /**\n * @internal Shared `errorState` / `required` / `errors` derivation — see\n * `wireErrorState`. Declared here, above `required`, because class field\n * initializers run in declaration order.\n */\n private readonly errorWiring = wireErrorState({\n ngControl: () => this.ngControl,\n matcher: () => this.errorStateMatcher(),\n required: () => this.requiredInput(),\n // A switch bound with `Validators.requiredTrue` is required too.\n requiredValidators: [Validators.required, Validators.requiredTrue],\n });\n\n /**\n * @internal Resolved required state: the `required` input OR'd with\n * `Validators.required` / `Validators.requiredTrue` on a bound `NgControl`.\n */\n readonly required: Signal<boolean> = this.errorWiring.required;\n\n /** Optional inline label rendered next to the switch. Use default content projection for rich label content instead. */\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. */\n readonly description = input<string | undefined>(undefined);\n\n /** Position of the label/description relative to the switch. Defaults to `'after'`. */\n readonly labelPosition = input<SwitchLabelPosition>('after');\n\n /** Optional name attribute, mirrored to the host for form association. */\n readonly name = input<string | undefined>(undefined);\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 switch. 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 switch. Mirrored to `aria-describedby`. Defaults to `undefined`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\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 /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the switch uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\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 uid = nextId++;\n readonly hostId = `tw-switch-${this.uid}`;\n readonly labelId = `${this.hostId}-label`;\n readonly descriptionId = `${this.hostId}-description`;\n\n constructor() {\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-switch] The switch has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.',\n );\n }\n });\n }\n\n readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n /** Whether the switch is in an error state per the configured `ErrorStateMatcher`. Reads the bound `NgControl.invalid` through the matcher. */\n readonly errorState: Signal<boolean> = this.errorWiring.errorState;\n\n readonly internalChecked = linkedSignal(() => this.checked());\n\n readonly effectiveAriaLabelledby = computed(() => {\n const external = this.ariaLabelledby();\n if (external) return external;\n if (this.ariaLabel()) return undefined;\n return this.labelId;\n });\n\n readonly effectiveAriaDescribedby = computed(() => {\n const external = this.ariaDescribedby();\n if (external) return external;\n return this.descriptionId;\n });\n\n private readonly variantResult = computed(() =>\n switchVariants({\n size: this.size(),\n labelPosition: this.labelPosition(),\n checked: this.internalChecked(),\n disabled: this.isDisabled(),\n errorState: this.errorState(),\n }),\n );\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly switchClasses = computed(() => this.variantResult().switchEl());\n readonly labelWrapClasses = computed(() => this.variantResult().labelWrap());\n readonly labelClasses = computed(() => this.variantResult().label());\n readonly descriptionClasses = computed(() => this.variantResult().description());\n readonly iconWrapClasses = computed(() => this.variantResult().iconWrap());\n readonly thumbClasses = computed(() => this.variantResult().thumb());\n\n readonly trackClasses = computed(() => {\n const base = this.variantResult().track();\n return this.internalChecked() ? `${base} ${CHECKED_TRACK[this.color()]}` : base;\n });\n\n readonly onIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-100' : 'opacity-0';\n const color = this.internalChecked() ? CHECKED_ICON_COLOR[this.color()] : 'text-fg-muted';\n return `${base} ${visibility} ${color}`;\n });\n\n readonly offIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none text-fg-muted empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-0' : 'opacity-100';\n return `${base} ${visibility}`;\n });\n\n // ── Interactions ──────────────────────────────────────────\n\n /** Toggles the checked state. No-op when disabled. */\n toggle(): void {\n if (this.isDisabled()) return;\n const next = !this.internalChecked();\n this.internalChecked.set(next);\n this.checked.set(next);\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-switch` 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. Space toggles the switch — matches the ARIA `switch` role pattern (Enter is intentionally NOT handled, mirroring `<tw-checkbox>`). */\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 }\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 // ── Lifecycle ─────────────────────────────────────────────\n\n ngOnInit(): void {\n this.focusMonitor.monitor(this.elementRef);\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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AAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAoBU,eAAe,EAAA,UAAA,EAAA,CAAA;kBApD3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BT,EAAA,CAAA;AACD,oBAAA,IAAI,EAAE;AACJ,wBAAA,MAAM,EAAE,QAAQ;AAChB,wBAAA,MAAM,EAAE,QAAQ;AAChB,wBAAA,SAAS,EAAE,eAAe;AAC1B,wBAAA,qBAAqB,EAAE,mBAAmB;AAC1C,wBAAA,qBAAqB,EAAE,mBAAmB;AAC1C,wBAAA,sBAAsB,EAAE,sBAAsB;AAC9C,wBAAA,qBAAqB,EAAE,sBAAsB;AAC7C,wBAAA,sBAAsB,EAAE,oBAAoB;AAC5C,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;;;ACzMD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-switch.mjs","sources":["../../../projects/ngx-tw/switch/switch.ts","../../../projects/ngx-tw/switch/cdevhub-ngx-tw-switch.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\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 { tv } from 'tailwind-variants';\nimport {\n type ErrorStateMatcher,\n type TwColor,\n type TwSize,\n wireErrorState,\n} from '@cdevhub/ngx-tw/core';\n\n/** Position of the label relative to the switch control. */\nexport type SwitchLabelPosition = 'before' | 'after';\n\n// ── tv() config ──────────────────────────────────────────────────\n\nconst switchVariants = tv(\n {\n slots: {\n root: 'inline-flex items-center gap-3 cursor-pointer select-none rounded-md focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500',\n switchEl: 'relative inline-flex items-center shrink-0',\n track:\n 'relative inline-flex items-center rounded-full border border-transparent transition-colors duration-normal motion-reduce:transition-none',\n thumb:\n 'absolute left-0.5 inline-flex items-center justify-center bg-surface rounded-full shadow-sm transition-transform duration-normal motion-reduce:transition-none',\n iconWrap:\n 'absolute inset-0 flex items-center justify-between px-1 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 track: 'h-4 w-7',\n thumb: 'size-3 data-[checked=true]:translate-x-3',\n label: 'text-xs',\n description: 'text-2xs',\n },\n sm: {\n track: 'h-5 w-9',\n thumb: 'size-4 data-[checked=true]:translate-x-4',\n label: 'text-sm',\n description: 'text-xs',\n },\n md: {\n track: 'h-6 w-11',\n thumb: 'size-5 data-[checked=true]:translate-x-5',\n label: 'text-sm',\n description: 'text-xs',\n },\n lg: {\n track: 'h-7 w-12',\n thumb: 'size-6 data-[checked=true]:translate-x-5',\n label: 'text-base',\n description: 'text-sm',\n },\n xl: {\n track: 'h-8 w-14',\n thumb: 'size-7 data-[checked=true]:translate-x-6',\n label: 'text-base',\n description: 'text-sm',\n },\n },\n labelPosition: {\n before: { root: 'flex-row-reverse' },\n after: { root: 'flex-row' },\n },\n checked: {\n true: { track: '' },\n false: { track: 'bg-surface-muted' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: { root: '' },\n },\n errorState: {\n true: { label: 'text-error-700', description: 'text-error-600' },\n false: { label: '', description: '' },\n },\n },\n compoundVariants: [\n // Error state on an off (unchecked) switch repaints the rail with the error color.\n // The on (checked) track is dominated by CHECKED_TRACK[color]; consumers wanting an\n // error appearance on a checked switch should set `color=\"error\"` directly.\n {\n errorState: true,\n checked: false,\n class: { track: 'bg-error-100 ring-1 ring-inset ring-error-border-strong' },\n },\n ],\n defaultVariants: {\n size: 'md',\n labelPosition: 'after',\n checked: false,\n disabled: false,\n errorState: false,\n },\n },\n { twMerge: true },\n);\n\n// ── Static checked-state color lookups (statically written for Tailwind v4 scanning) ──\n\nconst CHECKED_TRACK: Record<TwColor, string> = {\n primary: 'bg-primary-600',\n secondary: 'bg-secondary-600',\n accent: 'bg-accent-600',\n neutral: 'bg-fg',\n info: 'bg-info-600',\n success: 'bg-success-600',\n warning: 'bg-warning-500',\n error: 'bg-error-600',\n};\n\nconst CHECKED_ICON_COLOR: 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\nlet nextId = 0;\n\n// ── SwitchComponent ──────────────────────────────────────────────\n\n@Component({\n selector: 'tw-switch',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span [class]=\"switchClasses()\">\n <span [class]=\"trackClasses()\">\n <span [class]=\"iconWrapClasses()\">\n <span [class]=\"offIconClasses()\">\n <ng-content select=\"[slot='off-icon']\" />\n </span>\n <span [class]=\"onIconClasses()\">\n <ng-content select=\"[slot='on-icon']\" />\n </span>\n </span>\n <span [class]=\"thumbClasses()\" [attr.data-checked]=\"internalChecked()\"></span>\n </span>\n </span>\n\n <span [class]=\"labelWrapClasses()\">\n <span [id]=\"labelId\" [class]=\"labelClasses()\">\n <ng-content />\n @if (label()) {\n {{ label() }}\n }\n </span>\n <span [id]=\"descriptionId\" [class]=\"descriptionClasses()\">\n <ng-content select=\"[slot='description']\" />\n @if (description()) {\n {{ description() }}\n }\n </span>\n </span>\n `,\n host: {\n 'role': 'switch',\n '[id]': 'hostId',\n '[class]': 'rootClasses()',\n '[attr.data-checked]': 'internalChecked()',\n '[attr.aria-checked]': 'internalChecked()',\n '[attr.aria-disabled]': 'isDisabled() || null',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || 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 SwitchComponent implements ControlValueAccessor, OnInit {\n /** Sets the semantic color for the active (checked) track. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls the overall scale of the track, thumb, and label typography. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\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. Also inferred from `Validators.required` / `Validators.requiredTrue` on a bound control, so a reactive/template-driven form does not have to state it twice. Defaults to `false`. */\n readonly requiredInput = input(false, { alias: 'required' });\n\n /**\n * @internal Shared `errorState` / `required` / `errors` derivation — see\n * `wireErrorState`. Declared here, above `required`, because class field\n * initializers run in declaration order.\n */\n private readonly errorWiring = wireErrorState({\n ngControl: () => this.ngControl,\n matcher: () => this.errorStateMatcher(),\n required: () => this.requiredInput(),\n // A switch bound with `Validators.requiredTrue` is required too.\n requiredValidators: [Validators.required, Validators.requiredTrue],\n });\n\n /**\n * @internal Resolved required state: the `required` input OR'd with\n * `Validators.required` / `Validators.requiredTrue` on a bound `NgControl`.\n */\n readonly required: Signal<boolean> = this.errorWiring.required;\n\n /** Optional inline label rendered next to the switch. Use default content projection for rich label content instead. */\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. */\n readonly description = input<string | undefined>(undefined);\n\n /** Position of the label/description relative to the switch. Defaults to `'after'`. */\n readonly labelPosition = input<SwitchLabelPosition>('after');\n\n /** Optional name attribute, mirrored to the host for form association. */\n readonly name = input<string | undefined>(undefined);\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 switch. 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 switch. Mirrored to `aria-describedby`. Defaults to `undefined`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\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 /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, the switch uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\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 uid = nextId++;\n readonly hostId = `tw-switch-${this.uid}`;\n readonly labelId = `${this.hostId}-label`;\n readonly descriptionId = `${this.hostId}-description`;\n\n constructor() {\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-switch] The switch has no accessible name. Provide a `label` input, project label content, or set `aria-label` / `aria-labelledby`.',\n );\n }\n });\n }\n\n readonly isDisabled = computed(() => this.disabled() || this.cvaDisabled());\n\n /** Whether the switch is in an error state per the configured `ErrorStateMatcher`. Reads the bound `NgControl.invalid` through the matcher. */\n readonly errorState: Signal<boolean> = this.errorWiring.errorState;\n\n readonly internalChecked = linkedSignal(() => this.checked());\n\n readonly effectiveAriaLabelledby = computed(() => {\n const external = this.ariaLabelledby();\n if (external) return external;\n if (this.ariaLabel()) return undefined;\n return this.labelId;\n });\n\n readonly effectiveAriaDescribedby = computed(() => {\n const external = this.ariaDescribedby();\n if (external) return external;\n return this.descriptionId;\n });\n\n private readonly variantResult = computed(() =>\n switchVariants({\n size: this.size(),\n labelPosition: this.labelPosition(),\n checked: this.internalChecked(),\n disabled: this.isDisabled(),\n errorState: this.errorState(),\n }),\n );\n\n readonly rootClasses = computed(() => this.variantResult().root());\n readonly switchClasses = computed(() => this.variantResult().switchEl());\n readonly labelWrapClasses = computed(() => this.variantResult().labelWrap());\n readonly labelClasses = computed(() => this.variantResult().label());\n readonly descriptionClasses = computed(() => this.variantResult().description());\n readonly iconWrapClasses = computed(() => this.variantResult().iconWrap());\n readonly thumbClasses = computed(() => this.variantResult().thumb());\n\n readonly trackClasses = computed(() => {\n const base = this.variantResult().track();\n return this.internalChecked() ? `${base} ${CHECKED_TRACK[this.color()]}` : base;\n });\n\n readonly onIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-100' : 'opacity-0';\n const color = this.internalChecked() ? CHECKED_ICON_COLOR[this.color()] : 'text-fg-muted';\n return `${base} ${visibility} ${color}`;\n });\n\n readonly offIconClasses = computed(() => {\n const base =\n 'inline-flex items-center justify-center transition-opacity duration-normal motion-reduce:transition-none text-fg-muted empty:hidden';\n const visibility = this.internalChecked() ? 'opacity-0' : 'opacity-100';\n return `${base} ${visibility}`;\n });\n\n // ── Interactions ──────────────────────────────────────────\n\n /** Toggles the checked state. No-op when disabled. */\n toggle(): void {\n if (this.isDisabled()) return;\n const next = !this.internalChecked();\n this.internalChecked.set(next);\n this.checked.set(next);\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-switch` 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. Space toggles the switch — matches the ARIA `switch` role pattern (Enter is intentionally NOT handled, mirroring `<tw-checkbox>`). */\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 }\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 // ── Lifecycle ─────────────────────────────────────────────\n\n ngOnInit(): void {\n this.focusMonitor.monitor(this.elementRef);\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":";;;;;;;AAkCA;AAEA,MAAM,cAAc,GAAG,EAAE,CACvB;AACE,IAAA,KAAK,EAAE;AACL,QAAA,IAAI,EAAE,+JAA+J;AACrK,QAAA,QAAQ,EAAE,4CAA4C;AACtD,QAAA,KAAK,EACH,0IAA0I;AAC5I,QAAA,KAAK,EACH,gKAAgK;AAClK,QAAA,QAAQ,EACN,0FAA0F;AAC5F,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;AACF,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,KAAK,EAAE,0CAA0C;AACjD,gBAAA,KAAK,EAAE,SAAS;AAChB,gBAAA,WAAW,EAAE,UAAU;AACxB,aAAA;AACD,YAAA,EAAE,EAAE;AACF,gBAAA,KAAK,EAAE,SAAS;AACh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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;;;ACzMD;;AAEG;;;;"}
|
|
@@ -50,14 +50,14 @@ const tagsInputVariants = tv({
|
|
|
50
50
|
xl: { root: 'text-base', removeButton: 'size-8 -my-1.5 -mr-1.5', removeIcon: 'size-4' },
|
|
51
51
|
},
|
|
52
52
|
color: {
|
|
53
|
-
primary: { root: 'focus-within:outline-primary-
|
|
54
|
-
secondary: { root: 'focus-within:outline-secondary-
|
|
55
|
-
accent: { root: 'focus-within:outline-accent-
|
|
53
|
+
primary: { root: 'focus-within:outline-primary-border' },
|
|
54
|
+
secondary: { root: 'focus-within:outline-secondary-border' },
|
|
55
|
+
accent: { root: 'focus-within:outline-accent-border' },
|
|
56
56
|
neutral: { root: 'focus-within:outline-border-strong' },
|
|
57
|
-
info: { root: 'focus-within:outline-info-
|
|
58
|
-
success: { root: 'focus-within:outline-success-
|
|
59
|
-
warning: { root: 'focus-within:outline-warning-
|
|
60
|
-
error: { root: 'focus-within:outline-error-
|
|
57
|
+
info: { root: 'focus-within:outline-info-border' },
|
|
58
|
+
success: { root: 'focus-within:outline-success-border' },
|
|
59
|
+
warning: { root: 'focus-within:outline-warning-border' },
|
|
60
|
+
error: { root: 'focus-within:outline-error-border' },
|
|
61
61
|
},
|
|
62
62
|
disabled: {
|
|
63
63
|
true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },
|
|
@@ -110,7 +110,7 @@ const tagsInputVariants = tv({
|
|
|
110
110
|
{
|
|
111
111
|
inFormField: false,
|
|
112
112
|
errorState: true,
|
|
113
|
-
class: { root: 'border-error-
|
|
113
|
+
class: { root: 'border-error-border focus-within:outline-error-border' },
|
|
114
114
|
},
|
|
115
115
|
],
|
|
116
116
|
defaultVariants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdevhub-ngx-tw-tags-input.mjs","sources":["../../../projects/ngx-tw/tags-input/tags-input.ts","../../../projects/ngx-tw/tags-input/cdevhub-ngx-tw-tags-input.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n type OnInit,\n output,\n signal,\n type Signal,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { type ControlValueAccessor, NgControl } from '@angular/forms';\nimport { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\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 {\n FormFieldControl,\n TW_FORM_FIELD,\n TW_FORM_FIELD_CONTROL,\n} from '@cdevhub/ngx-tw/form-field';\nimport { BadgeComponent } from '@cdevhub/ngx-tw/badge';\nimport type {\n TwTagAddedEvent,\n TwTagCompareFn,\n TwTagFactory,\n TwTagLabelFn,\n TwTagRemovedEvent,\n} from './types';\n\n// ── tv() config ──\n// `focus-within:outline-{color}-500` and the chip color classes are emitted by\n// combobox / badge already, so the Tailwind v4 JIT scanner picks them up.\n\nconst tagsInputVariants = tv(\n {\n slots: {\n // Host is the `role=\"group\"` chip strip. `flex-wrap` lets chips wrap; the\n // container owns the focus-within ring (standalone) or strips its chrome\n // inside a `<tw-form-field>` (the field draws the border / focus border).\n root: 'flex flex-wrap items-center gap-1.5 w-full text-fg',\n chip: 'max-w-full min-w-0',\n chipLabel: 'truncate',\n // Real DOM focus → canonical outline ring (NOT the activedescendant\n // background-shift carve-out). `text-current` inherits the chip color.\n // Per-size sets the square-interactive target size + negative margins.\n removeButton:\n 'inline-flex items-center justify-center shrink-0 ml-0.5 rounded-md text-current opacity-70 hover:opacity-100 transition-opacity duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:pointer-events-none',\n removeIcon: 'shrink-0',\n input:\n 'flex-1 min-w-24 bg-transparent text-fg placeholder:text-fg-subtle outline-none disabled:cursor-not-allowed',\n },\n variants: {\n inFormField: {\n // Inside a form-field: keep only the chip-strip layout; the field owns\n // border, padding, background and the focused-border indicator.\n true: { root: '' },\n false: {\n root: 'rounded-md border border-border bg-surface transition-colors duration-normal motion-reduce:transition-none hover:border-border-strong focus-within:outline-2 focus-within:outline-offset-2',\n },\n },\n size: {\n // removeButton uses the square-interactive sub-scale (the button IS the\n // touch target): size-6 (24px) meets WCAG 2.5.8; negative margins absorb\n // the overflow so the chip height is unchanged. Mirrors badge's dismiss.\n // `size-3.5` half-step on the md remove glyph lines up the X with text-sm\n // at md density (codified half-step per CLAUDE.md icon sizing).\n xs: { root: 'text-xs', removeButton: 'size-6 -my-1 -mr-1', removeIcon: 'size-3' },\n sm: { root: 'text-sm', removeButton: 'size-6 -my-1 -mr-1', removeIcon: 'size-3' },\n md: { root: 'text-sm', removeButton: 'size-7 -my-1.5 -mr-1.5', removeIcon: 'size-3.5' },\n lg: { root: 'text-base', removeButton: 'size-8 -my-1.5 -mr-1.5', removeIcon: 'size-4' },\n xl: { root: 'text-base', removeButton: 'size-8 -my-1.5 -mr-1.5', removeIcon: 'size-4' },\n },\n color: {\n primary: { root: 'focus-within:outline-primary-500' },\n secondary: { root: 'focus-within:outline-secondary-500' },\n accent: { root: 'focus-within:outline-accent-500' },\n neutral: { root: 'focus-within:outline-border-strong' },\n info: { root: 'focus-within:outline-info-500' },\n success: { root: 'focus-within:outline-success-500' },\n warning: { root: 'focus-within:outline-warning-500' },\n error: { root: 'focus-within:outline-error-500' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: {},\n },\n errorState: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n // Standalone density × size — inline padding scale (mirrors combobox trigger)\n // plus the control-height FLOOR. Per docs/vertical-rhythm.md §2 the chip\n // strip is a `min-h` control, not a pinned one: chips wrap, so `py-*` stays\n // exactly as it is and `min-h-*` only guarantees the box never sits below\n // the control scale. Standalone-only, alongside the padding: inside a\n // `tw-form-field` the root drops its border and padding and the field owns\n // the box, so a floor here would stack on top of the field's own padding.\n // Vertical padding is set so the `min-h-*` floor actually BINDS at rest.\n //\n // The tallest resting content is a CHIP, not the bare input line box. A\n // chip is a badge: its own padding and text size make it taller than the\n // input beside it at every size, so the box arithmetic that decides\n // whether the floor binds is\n //\n // chip + 2*py + 2px border <= floor\n //\n // Sizing the padding against the input line box instead left the floor\n // inert the moment a single tag existed. Empty, the control measured\n // correctly at all five sizes; populated, it measured 26 / 32 / 38 / 50 /\n // 54 against a 24 / 32 / 36 / 44 / 48 scale — so a filter bar was on the\n // grid until the user typed the first tag, then jumped 2px at xs and md\n // and 6px at lg and xl. Only sm was ever correct, which is why the\n // isolated slot reading looked like a one-off rather than a broken rule.\n //\n // Resting appearance does not change: once the floor binds, `items-center`\n // centres the chip and the padding is no longer what sets the height. The\n // padding still governs the multi-line case, where chips wrap and the box\n // legitimately grows past the floor.\n //\n // Chip heights are 20 / 20 / 24 / 32 / 32, so the padding ceiling is\n // 1 / 5 / 5 / 5 / 7px. `py-px` at xs is not decorative restraint: a 20px\n // chip inside a 24px control with a 1px border leaves exactly 1px a side.\n { inFormField: false, size: 'xs', class: { root: 'px-2 py-px min-h-6' } },\n { inFormField: false, size: 'sm', class: { root: 'px-3 py-1 min-h-8' } },\n { inFormField: false, size: 'md', class: { root: 'px-4 py-1 min-h-9' } },\n { inFormField: false, size: 'lg', class: { root: 'px-5 py-1 min-h-11' } },\n { inFormField: false, size: 'xl', class: { root: 'px-6 py-1.5 min-h-12' } },\n // Standalone error state — colored border + focus ring.\n {\n inFormField: false,\n errorState: true,\n class: { root: 'border-error-500 focus-within:outline-error-500' },\n },\n ],\n defaultVariants: {\n inFormField: false,\n size: 'md',\n color: 'primary',\n disabled: false,\n errorState: false,\n },\n },\n { twMerge: true },\n);\n\nconst DEFAULT_SEPARATORS: readonly string[] = ['Enter', ','];\n\nlet nextId = 0;\n\n/**\n * Free-text multi-value input. The user types a token and commits it via Enter,\n * a separator key, paste, or blur; committed tokens render as dismissible chips\n * (composing `[twBadge]`) inline with the text input. The value is exposed as a\n * real `T[]` (default `string[]`) through `ControlValueAccessor`, so it works\n * with template-driven, reactive, and signal forms and integrates with\n * `<tw-form-field>` for label / hint / error chrome.\n *\n * The control is a single tab stop with a roving-tabindex chip strip\n * (Material `MatChipGrid` interaction model): Arrow keys traverse chips and the\n * input, Delete / a two-step Backspace remove chips, and `LiveAnnouncer` voices\n * add / remove. Autocomplete suggestions are out of scope (use `tw-combobox`).\n */\n@Component({\n selector: 'tw-tags-input',\n exportAs: 'twTagsInput',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [BadgeComponent],\n providers: [\n {\n provide: TW_FORM_FIELD_CONTROL,\n useExisting: forwardRef(() => TagsInputComponent),\n },\n ],\n template: `\n @for (chip of chipViews(); track chip.index) {\n <span twBadge variant=\"soft\" [color]=\"color()\" [size]=\"size()\" [class]=\"chipClasses()\">\n <span [class]=\"chipLabelClasses()\">{{ chip.label }}</span>\n <button\n #removeBtn\n type=\"button\"\n [class]=\"removeButtonClasses()\"\n [attr.tabindex]=\"activeChipIndex() === chip.index ? 0 : -1\"\n [attr.aria-label]=\"chip.removeLabel\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick(chip.index)\"\n (keydown)=\"onChipKeydown($event, chip.index)\"\n >\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"removeIconClasses()\"\n >\n <path\n d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"\n />\n </svg>\n </button>\n </span>\n }\n <input\n #textInput\n type=\"text\"\n [class]=\"inputClasses()\"\n [attr.tabindex]=\"activeChipIndex() === null ? 0 : -1\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"resolvedLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedDescribedBy() || null\"\n [attr.aria-invalid]=\"errorState() || null\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (paste)=\"onPaste($event)\"\n />\n `,\n host: {\n 'role': 'group',\n '[id]': 'id()',\n '[class]': 'rootClasses()',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'resolvedLabelledBy() || null',\n '[attr.aria-describedby]': 'resolvedDescribedBy() || null',\n '[attr.aria-disabled]': 'disabled() || null',\n // NOTE: no `aria-invalid` here. ARIA 1.2 does not allow it on\n // `role=\"group\"` (axe: critical `aria-allowed-attr`). The inner\n // `<input type=\"text\">` already carries it — that is the control with the\n // value. Latent rather than observed: it only fires once a consumer puts\n // the control into an error state.\n '[attr.data-focused]': 'focused() || null',\n },\n})\nexport class TagsInputComponent<T = string>\n extends FormFieldControl<T[]>\n implements ControlValueAccessor, OnInit\n{\n /** Semantic color for the container focus-within ring and the chip accent. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls overall density: container padding, chip size, and text scale. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, blocks typing, committing, and chip removal, and applies muted styling. Reactive forms also propagate disabled via `setDisabledState`. Defaults to `false`. */\n readonly disabledInput = input(false, { alias: 'disabled' });\n\n /** Marks the control as required. Mirrored to the input's `aria-required`. Also inferred from `Validators.required` on a bound control. Defaults to `false`. */\n readonly requiredInput = input(false, { alias: 'required' });\n\n /** Placeholder shown in the text input only while there are no chips and the input is empty. Defaults to `undefined`. */\n readonly placeholder = input<string | undefined>(undefined);\n\n /** Keys that commit the in-progress text as a tag. Each entry is a `KeyboardEvent.key` value (`'Enter'`) or a single separator character (`','`). Single-character separators also split pasted text. Defaults to `['Enter', ',']`. */\n readonly separatorKeys = input<readonly string[]>(DEFAULT_SEPARATORS);\n\n /** When true, blurring the control while the input holds non-empty text commits it as a tag. Defaults to `false`. */\n readonly addOnBlur = input(false);\n\n /** Maximum number of tags. Once reached, further commits are blocked and announced. Does not truncate an oversized `writeValue`. Defaults to `undefined` (no limit). */\n readonly maxTags = input<number | undefined>(undefined);\n\n /** When false (default), a committed tag equal (per `compareWith`) to an existing tag is dropped silently. When true, duplicates are kept. Defaults to `false`. */\n readonly allowDuplicates = input(false);\n\n /** Maps committed text to a tag value. Default is identity — the trimmed string. Override to build object tags. */\n readonly createTag = input<TwTagFactory<T>>(\n ((text: string) => text) as unknown as TwTagFactory<T>,\n );\n\n /** Maps a tag value to its visible chip label and the remove-button accessible name. Defaults to `String(tag)`. */\n readonly tagLabel = input<TwTagLabelFn<T>>((tag: T) => String(tag));\n\n /** Equality comparator used for dedup when `allowDuplicates` is false. Defaults to `Object.is` (reference / value identity). String tags dedupe case-sensitively by default; pass `(a, b) => a.toLowerCase() === b.toLowerCase()` for case-insensitive dedup. */\n readonly compareWith = input<TwTagCompareFn<T>>((a: T, b: T) => Object.is(a, b));\n\n /** Applied to the text input for labeling and identification only; does not submit the tag array via native (non-Angular) form posting. Defaults to `undefined`. */\n readonly name = input<string | undefined>(undefined);\n\n /** Id on the host element. Auto-generated as `tw-tags-input-N` when not provided. Used by the form-field's `<label for>` association. */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /** Accessible name applied to the control when no visible label is wired. 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 control. 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 control. Form-field merges its hint / error ids alongside. Defaults to `undefined`. Alias: `aria-describedby`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /**\n * Fires when the tag array changes through user interaction (add, remove,\n * clear). Emits a fresh array reference. Does **not** fire on `writeValue` /\n * `FormControl.setValue` / `ngModel`.\n *\n * This is a hand-written, user-gesture-only output. The control exposes no\n * `value` input and therefore no two-way binding, so — unlike\n * `tw-checkbox` / `tw-switch` / `tw-radio-group`, where `(valueChange)` /\n * `(checkedChange)` is minted by a `model()` and fires on programmatic writes\n * too — there is no any-change channel here. Observe programmatic writes\n * through the bound form control's own `valueChanges`.\n */\n readonly valueChange = output<T[]>();\n\n /** Fires when a tag is committed via Enter, a separator key, paste, or `addTag()`. Does not fire for dropped duplicates, blocked-by-max commits, empty commits, or `writeValue`. */\n readonly tagAdded = output<TwTagAddedEvent<T>>();\n\n /** Fires when a tag is removed via the remove button, Backspace / Delete, or `removeTag()`. Does not fire on `writeValue` or `clear()`. */\n readonly tagRemoved = output<TwTagRemovedEvent<T>>();\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n private readonly formField = inject(TW_FORM_FIELD, { optional: true });\n /**\n * Optional so a consumer that never imports `BidiModule` still gets a working\n * control — chip navigation falls back to LTR when the token is absent. Read\n * imperatively inside the keydown handlers; nothing here needs to re-render\n * on a direction change.\n */\n private readonly directionality = inject(Directionality, { optional: true });\n\n private readonly textInputRef = viewChild<ElementRef<HTMLInputElement>>('textInput');\n private readonly removeButtons = viewChildren<ElementRef<HTMLButtonElement>>('removeBtn');\n\n private onChange: (value: T[]) => void = () => {};\n private onTouched: () => void = () => {};\n\n private readonly tags = signal<T[]>([]);\n /** The current in-progress (uncommitted) text in the input. Empty when nothing is typed. */\n readonly inputText = signal('');\n /** @internal Roving-tabindex position. `null` = the text input is the active element; a number = that chip's remove button. */\n protected readonly activeChipIndex = signal<number | null>(null);\n private readonly cvaDisabled = signal(false);\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 track: [() => this._focused()],\n });\n private readonly describedByIdsSignal = signal<readonly string[]>([]);\n private readonly labelledByIdsSignal = signal<readonly string[]>([]);\n /** Nonce bumped only on explicit focus intent — keeps the focus effect from stealing focus on unrelated renders. */\n private readonly focusNonce = signal(0);\n private lastMaxAnnounce = 0;\n\n private readonly uid = nextId++;\n /** @internal Fallback id used when the consumer does not set `[id]`. */\n readonly hostId = `tw-tags-input-${this.uid}`;\n\n // ── FormFieldControl signals ──\n\n /** @internal */\n readonly id: Signal<string> = computed(() => this.idInput() ?? this.hostId);\n\n /** The current tag array (empty array when there are no tags). Read from a template ref (`#t=\"twTagsInput\"`) for non-form usage. Doubles as the `FormFieldControl` contract member. */\n readonly value: Signal<T[]> = this.tags.asReadonly();\n\n /** @internal */\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n\n /** @internal Empty when there are no chips AND the input text is blank — drives the form-field floating label. */\n readonly empty: Signal<boolean> = computed(\n () => this.tags().length === 0 && this.inputText().trim().length === 0,\n );\n\n /** @internal */\n readonly disabled: Signal<boolean> = computed(\n () => this.disabledInput() || this.cvaDisabled(),\n );\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 control, for `[twError match=\"…\"]` filtering. */\n override readonly errors = this.errorWiring.errors;\n\n /** @internal */\n readonly controlType = 'tags-input';\n\n /** @internal */\n readonly userAriaDescribedBy: Signal<string | undefined> = computed(() => this.ariaDescribedby());\n\n /** @internal */\n override readonly userAriaLabelledby: Signal<string | undefined> = computed(() =>\n this.ariaLabelledby(),\n );\n\n // ── Effective ARIA ──\n //\n // When wrapped by `<tw-form-field>`, the form-field pushes the FULLY MERGED\n // id list (hint/error/label + the consumer's `aria-*by` ids) via\n // `setDescribedByIds` / `setLabelledByIds`. In that case the pushed ids alone\n // are the source of truth — re-merging the consumer's `aria-*by` input on top\n // would duplicate ids. When standalone, fall back to the consumer-supplied\n // `aria-*by` input.\n\n /** @internal Merged `aria-describedby` (form-field hint/error ids + consumer-supplied). */\n readonly resolvedDescribedBy = computed(() => {\n const pushed = this.describedByIdsSignal();\n if (pushed.length) return pushed.join(' ');\n const user = this.ariaDescribedby();\n if (user) return user.split(/\\s+/).filter(Boolean).join(' ');\n return '';\n });\n\n /** @internal Merged `aria-labelledby` (form-field label id + consumer-supplied). */\n readonly resolvedLabelledBy = computed(() => {\n const pushed = this.labelledByIdsSignal();\n if (pushed.length) return pushed.join(' ');\n const user = this.ariaLabelledby();\n if (user) return user.split(/\\s+/).filter(Boolean).join(' ');\n return '';\n });\n\n // ── tv() class bindings ──\n\n private readonly variantResult = computed(() =>\n tagsInputVariants({\n inFormField: !!this.formField,\n size: this.size(),\n color: this.color(),\n disabled: this.disabled(),\n errorState: this.errorState(),\n }),\n );\n\n /** @internal */\n readonly rootClasses = computed(() => this.variantResult().root());\n /** @internal */\n readonly chipClasses = computed(() => this.variantResult().chip());\n /** @internal */\n readonly chipLabelClasses = computed(() => this.variantResult().chipLabel());\n /** @internal */\n readonly removeButtonClasses = computed(() => this.variantResult().removeButton());\n /** @internal */\n readonly removeIconClasses = computed(() => this.variantResult().removeIcon());\n /** @internal */\n readonly inputClasses = computed(() => this.variantResult().input());\n\n /** @internal Pre-resolved chip view models so the template never calls accessor functions inline. */\n readonly chipViews = computed(() => {\n const label = this.tagLabel();\n return this.tags().map((tag, index) => {\n const text = label(tag);\n return { tag, label: text, removeLabel: `Remove ${text}`, index };\n });\n });\n\n constructor() {\n super();\n // Runtime CVA wiring — register on any host-level NgControl. The component\n // injects `NgControl { self }` for TW_ERROR_STATE_MATCHER, so a static\n // NG_VALUE_ACCESSOR provider would create circular DI on the same instance.\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n // Focus side-effect (leaves the signal graph; writes no signal → no cycle).\n // Triggered only by `focusNonce` bumps so it never steals focus on an\n // unrelated render (e.g. initial mount). Reads the active index and refs\n // untracked so it does not re-fire when the chip list changes on its own.\n effect(() => {\n if (this.focusNonce() === 0) return;\n untracked(() => {\n const idx = this.activeChipIndex();\n if (idx === null) {\n this.textInputRef()?.nativeElement.focus();\n } else {\n this.removeButtons()[idx]?.nativeElement.focus();\n }\n });\n });\n\n afterNextRender(() => {\n if (isDevMode() && !this.hasAccessibleNameHint()) {\n console.warn(\n '[tw-tags-input] The control has no accessible name. Provide `aria-label` / `aria-labelledby`, or wrap it in a <tw-form-field> with a <label twLabel>.',\n );\n }\n });\n }\n\n // ── Public instance API ──\n\n /** Commits `text` as a tag (trim → `createTag` → dedup unless `allowDuplicates` → `maxTags` check). Returns true if a tag was added, false if dropped (empty / duplicate / max). Emits `tagAdded` + `valueChange` on success. No-op when disabled. */\n addTag(text: string): boolean {\n if (this.disabled()) return false;\n const trimmed = text.trim();\n if (!trimmed) return false;\n return this.tryAdd(this.createTag()(trimmed)) === 'added';\n }\n\n /** Removes a tag by value (first match via `compareWith`) or by index when a number is passed. Emits `tagRemoved` + `valueChange` and restores focus. No-op when disabled or when no match. Note: when the tag type is `number`, the argument is treated as an index. */\n removeTag(tag: T | number): void {\n if (this.disabled()) return;\n if (typeof tag === 'number') {\n this.removeAt(tag);\n return;\n }\n const cmp = this.compareWith();\n const idx = this.tags().findIndex((t) => cmp(t, tag));\n if (idx >= 0) this.removeAt(idx);\n }\n\n /** Removes all tags and clears the in-progress input text. Emits `valueChange` with `[]`. Does NOT emit `tagRemoved` per tag (bulk reset). No-op when already empty or disabled. */\n clear(): void {\n if (this.disabled()) return;\n if (this.tags().length === 0 && this.inputText().length === 0) return;\n this.tags.set([]);\n this.setInputText('');\n this.activeChipIndex.set(null);\n this.onChange([]);\n this.valueChange.emit([]);\n this.liveAnnouncer.announce('All tags removed', 'polite');\n }\n\n /** Moves focus to the text input. */\n focus(): void {\n this.activeChipIndex.set(null);\n this.requestFocus();\n }\n\n // ── Internal commit / remove pipeline ──\n\n private tryAdd(tag: T): 'added' | 'duplicate' | 'max' {\n const current = this.tags();\n if (!this.allowDuplicates()) {\n const cmp = this.compareWith();\n if (current.some((e) => cmp(e, tag))) return 'duplicate';\n }\n const max = this.maxTags();\n if (max !== undefined && current.length >= max) {\n this.announceMax();\n return 'max';\n }\n const next = [...current, tag];\n this.tags.set(next);\n this.onChange(next);\n this.tagAdded.emit({ tag, value: next });\n this.valueChange.emit(next);\n this.liveAnnouncer.announce(`${this.tagLabel()(tag)} added`, 'polite');\n return 'added';\n }\n\n private commitInput(): void {\n if (this.disabled()) return;\n const trimmed = this.inputText().trim();\n if (!trimmed) {\n this.setInputText('');\n return;\n }\n const result = this.tryAdd(this.createTag()(trimmed));\n // Clear on success or duplicate (gesture consumed); retain on max so the\n // user can retry after removing a tag.\n if (result !== 'max') this.setInputText('');\n }\n\n private removeAt(index: number): void {\n if (this.disabled()) return;\n const current = this.tags();\n if (index < 0 || index >= current.length) return;\n const tag = current[index];\n const next = current.filter((_, i) => i !== index);\n this.tags.set(next);\n this.onChange(next);\n this.tagRemoved.emit({ tag, value: next, index });\n this.valueChange.emit(next);\n this.liveAnnouncer.announce(`${this.tagLabel()(tag)} removed`, 'polite');\n // Focus restoration: next chip at this index, else the previous chip, else the input.\n if (next.length === 0) {\n this.focusInput();\n } else if (index < next.length) {\n this.focusChip(index);\n } else {\n this.focusChip(next.length - 1);\n }\n }\n\n // ── DOM event handlers ──\n\n /** @internal */\n onInput(event: Event): void {\n this.inputText.set((event.target as HTMLInputElement).value);\n }\n\n /** @internal */\n onInputKeydown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n const separators = this.separatorKeys();\n const key = event.key;\n\n // Single-character separator → commit (and swallow the character).\n if (key.length === 1 && separators.includes(key)) {\n event.preventDefault();\n this.commitInput();\n return;\n }\n // Enter separator → commit only when there is text (otherwise let the form submit).\n if (key === 'Enter' && separators.includes('Enter')) {\n if (this.inputText().trim().length > 0) {\n event.preventDefault();\n this.commitInput();\n }\n return;\n }\n // Stepping out of the input into the last chip is a *backwards* move: the\n // chip row is rendered before the input, so it is ArrowLeft in LTR and\n // ArrowRight in an RTL locale, where the row lays out right-to-left. The\n // caret test is direction-independent — `selectionStart === 0` is the\n // logical start of the text in both directions.\n const backKey = this.directionality?.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n if (key === backKey) {\n const el = event.target as HTMLInputElement;\n const atStart = (el.selectionStart ?? 0) === 0 && (el.selectionEnd ?? 0) === 0;\n if (atStart && this.tags().length > 0) {\n event.preventDefault();\n this.focusChip(this.tags().length - 1);\n }\n return;\n }\n if (key === 'Backspace' && this.inputText().length === 0) {\n if (this.tags().length > 0) {\n event.preventDefault();\n this.focusChip(this.tags().length - 1);\n }\n return;\n }\n if (key === 'Escape' && this.inputText().length > 0) {\n event.preventDefault();\n this.setInputText('');\n }\n }\n\n /** @internal */\n onChipKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled()) return;\n const last = this.tags().length - 1;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowRight': {\n // Horizontal arrows follow the layout direction. Chips sit on a\n // flex row that lays out right-to-left in an RTL locale, so ArrowLeft\n // is the *forward* key there. The chip host is a custom element, not a\n // native control, so the browser does no flipping for us. Home/End stay\n // logical — CDK's ListKeyManager does not flip them either.\n event.preventDefault();\n const rtl = this.directionality?.value === 'rtl';\n const forward = rtl ? event.key === 'ArrowLeft' : event.key === 'ArrowRight';\n if (forward) {\n if (index < last) this.focusChip(index + 1);\n else this.focusInput();\n } else if (index > 0) {\n this.focusChip(index - 1);\n }\n return;\n }\n case 'Home':\n event.preventDefault();\n this.focusChip(0);\n return;\n case 'End':\n event.preventDefault();\n this.focusInput();\n return;\n case 'Delete':\n case 'Backspace':\n event.preventDefault();\n this.removeAt(index);\n return;\n case 'Escape':\n event.preventDefault();\n this.focusInput();\n return;\n default:\n return;\n }\n }\n\n /** @internal */\n onRemoveClick(index: number): void {\n this.removeAt(index);\n }\n\n /** @internal */\n onPaste(event: ClipboardEvent): void {\n if (this.disabled()) return;\n const data = event.clipboardData?.getData('text') ?? '';\n const charSeparators = this.separatorKeys().filter((k) => k.length === 1);\n const hasSeparator = charSeparators.some((s) => data.includes(s));\n if (!hasSeparator) {\n // No separator: let the browser merge the text into the input natively.\n return;\n }\n event.preventDefault();\n const combined = this.inputText() + data;\n this.setInputText('');\n for (const piece of this.splitOnSeparators(combined, charSeparators)) {\n const trimmed = piece.trim();\n if (!trimmed) continue;\n if (this.tryAdd(this.createTag()(trimmed)) === 'max') break;\n }\n }\n\n // ── ControlValueAccessor ──\n\n writeValue(value: T[] | null | undefined): void {\n this.tags.set(Array.isArray(value) ? [...value] : []);\n this.setInputText('');\n }\n\n registerOnChange(fn: (value: T[]) => 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 */\n setDescribedByIds(ids: string[]): void {\n this.describedByIdsSignal.set([...ids]);\n }\n\n /** @internal */\n override setLabelledByIds(ids: string[]): void {\n this.labelledByIdsSignal.set([...ids]);\n }\n\n /** @internal Clicking the form-field surface (outside the control) focuses the text input. Clicks inside the control are left alone so chip removal keeps its own focus restoration. */\n onContainerClick(event: MouseEvent): void {\n if (this.disabled()) 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 this.focus();\n }\n\n // ── Lifecycle ──\n\n ngOnInit(): void {\n // checkChildren: true — internal focus moves (input ↔ chips) stay \"focused\";\n // origin === null fires only when focus leaves the whole control, the single\n // source for onTouched and the addOnBlur commit.\n const monitor$ = this.focusMonitor.monitor(this.elementRef, true);\n if (isObservable(monitor$)) {\n monitor$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((origin) => {\n const wasFocused = this._focused();\n this._focused.set(!!origin);\n if (wasFocused && !origin) {\n if (this.addOnBlur() && this.inputText().trim().length > 0) {\n this.commitInput();\n }\n this.onTouched();\n this.errorWiring.bump();\n // Reset roving so the next Tab into the control lands on the input.\n this.activeChipIndex.set(null);\n }\n });\n }\n this.destroyRef.onDestroy(() => this.focusMonitor.stopMonitoring(this.elementRef));\n\n this.errorWiring.connect();\n }\n\n // ── Helpers ──\n\n private focusChip(index: number): void {\n this.activeChipIndex.set(index);\n this.requestFocus();\n }\n\n private focusInput(): void {\n this.activeChipIndex.set(null);\n this.requestFocus();\n }\n\n private requestFocus(): void {\n this.focusNonce.update((n) => n + 1);\n }\n\n private setInputText(value: string): void {\n this.inputText.set(value);\n const el = this.textInputRef()?.nativeElement;\n if (el && el.value !== value) el.value = value;\n }\n\n private announceMax(): void {\n const now = Date.now();\n if (now - this.lastMaxAnnounce < 500) return;\n this.lastMaxAnnounce = now;\n this.liveAnnouncer.announce(`Maximum ${this.maxTags()} tags reached`, 'assertive');\n }\n\n private splitOnSeparators(text: string, separators: readonly string[]): string[] {\n if (separators.length === 0) return [text];\n let normalized = text;\n for (const s of separators) normalized = normalized.split(s).join('\\u0000');\n return normalized.split('\\u0000');\n }\n\n private hasAccessibleNameHint(): boolean {\n return (\n !!this.ariaLabel() ||\n !!this.ariaLabelledby() ||\n this.labelledByIdsSignal().length > 0\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA8CA;AACA;AACA;AAEA,MAAM,iBAAiB,GAAG,EAAE,CAC1B;AACE,IAAA,KAAK,EAAE;;;;AAIL,QAAA,IAAI,EAAE,oDAAoD;AAC1D,QAAA,IAAI,EAAE,oBAAoB;AAC1B,QAAA,SAAS,EAAE,UAAU;;;;AAIrB,QAAA,YAAY,EACV,qSAAqS;AACvS,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,KAAK,EACH,4GAA4G;AAC/G,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE;;;AAGX,YAAA,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAClB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,4LAA4L;AACnM,aAAA;AACF,SAAA;AACD,QAAA,IAAI,EAAE;;;;;;AAMJ,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE;AACjF,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE;AACjF,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,wBAAwB,EAAE,UAAU,EAAE,UAAU,EAAE;AACvF,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,wBAAwB,EAAE,UAAU,EAAE,QAAQ,EAAE;AACvF,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,wBAAwB,EAAE,UAAU,EAAE,QAAQ,EAAE;AACxF,SAAA;AACD,QAAA,KAAK,EAAE;AACL,YAA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A,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,WAAW,0EACN,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC5V1F;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cdevhub-ngx-tw-tags-input.mjs","sources":["../../../projects/ngx-tw/tags-input/tags-input.ts","../../../projects/ngx-tw/tags-input/cdevhub-ngx-tw-tags-input.ts"],"sourcesContent":["import {\n afterNextRender,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n isDevMode,\n type OnInit,\n output,\n signal,\n type Signal,\n untracked,\n viewChild,\n viewChildren,\n} from '@angular/core';\nimport { type ControlValueAccessor, NgControl } from '@angular/forms';\nimport { FocusMonitor, LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\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 {\n FormFieldControl,\n TW_FORM_FIELD,\n TW_FORM_FIELD_CONTROL,\n} from '@cdevhub/ngx-tw/form-field';\nimport { BadgeComponent } from '@cdevhub/ngx-tw/badge';\nimport type {\n TwTagAddedEvent,\n TwTagCompareFn,\n TwTagFactory,\n TwTagLabelFn,\n TwTagRemovedEvent,\n} from './types';\n\n// ── tv() config ──\n// `focus-within:outline-{color}-500` and the chip color classes are emitted by\n// combobox / badge already, so the Tailwind v4 JIT scanner picks them up.\n\nconst tagsInputVariants = tv(\n {\n slots: {\n // Host is the `role=\"group\"` chip strip. `flex-wrap` lets chips wrap; the\n // container owns the focus-within ring (standalone) or strips its chrome\n // inside a `<tw-form-field>` (the field draws the border / focus border).\n root: 'flex flex-wrap items-center gap-1.5 w-full text-fg',\n chip: 'max-w-full min-w-0',\n chipLabel: 'truncate',\n // Real DOM focus → canonical outline ring (NOT the activedescendant\n // background-shift carve-out). `text-current` inherits the chip color.\n // Per-size sets the square-interactive target size + negative margins.\n removeButton:\n 'inline-flex items-center justify-center shrink-0 ml-0.5 rounded-md text-current opacity-70 hover:opacity-100 transition-opacity duration-normal motion-reduce:transition-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary-500 disabled:pointer-events-none',\n removeIcon: 'shrink-0',\n input:\n 'flex-1 min-w-24 bg-transparent text-fg placeholder:text-fg-subtle outline-none disabled:cursor-not-allowed',\n },\n variants: {\n inFormField: {\n // Inside a form-field: keep only the chip-strip layout; the field owns\n // border, padding, background and the focused-border indicator.\n true: { root: '' },\n false: {\n root: 'rounded-md border border-border bg-surface transition-colors duration-normal motion-reduce:transition-none hover:border-border-strong focus-within:outline-2 focus-within:outline-offset-2',\n },\n },\n size: {\n // removeButton uses the square-interactive sub-scale (the button IS the\n // touch target): size-6 (24px) meets WCAG 2.5.8; negative margins absorb\n // the overflow so the chip height is unchanged. Mirrors badge's dismiss.\n // `size-3.5` half-step on the md remove glyph lines up the X with text-sm\n // at md density (codified half-step per CLAUDE.md icon sizing).\n xs: { root: 'text-xs', removeButton: 'size-6 -my-1 -mr-1', removeIcon: 'size-3' },\n sm: { root: 'text-sm', removeButton: 'size-6 -my-1 -mr-1', removeIcon: 'size-3' },\n md: { root: 'text-sm', removeButton: 'size-7 -my-1.5 -mr-1.5', removeIcon: 'size-3.5' },\n lg: { root: 'text-base', removeButton: 'size-8 -my-1.5 -mr-1.5', removeIcon: 'size-4' },\n xl: { root: 'text-base', removeButton: 'size-8 -my-1.5 -mr-1.5', removeIcon: 'size-4' },\n },\n color: {\n primary: { root: 'focus-within:outline-primary-border' },\n secondary: { root: 'focus-within:outline-secondary-border' },\n accent: { root: 'focus-within:outline-accent-border' },\n neutral: { root: 'focus-within:outline-border-strong' },\n info: { root: 'focus-within:outline-info-border' },\n success: { root: 'focus-within:outline-success-border' },\n warning: { root: 'focus-within:outline-warning-border' },\n error: { root: 'focus-within:outline-error-border' },\n },\n disabled: {\n true: { root: 'opacity-50 pointer-events-none cursor-not-allowed' },\n false: {},\n },\n errorState: {\n true: {},\n false: {},\n },\n },\n compoundVariants: [\n // Standalone density × size — inline padding scale (mirrors combobox trigger)\n // plus the control-height FLOOR. Per docs/vertical-rhythm.md §2 the chip\n // strip is a `min-h` control, not a pinned one: chips wrap, so `py-*` stays\n // exactly as it is and `min-h-*` only guarantees the box never sits below\n // the control scale. Standalone-only, alongside the padding: inside a\n // `tw-form-field` the root drops its border and padding and the field owns\n // the box, so a floor here would stack on top of the field's own padding.\n // Vertical padding is set so the `min-h-*` floor actually BINDS at rest.\n //\n // The tallest resting content is a CHIP, not the bare input line box. A\n // chip is a badge: its own padding and text size make it taller than the\n // input beside it at every size, so the box arithmetic that decides\n // whether the floor binds is\n //\n // chip + 2*py + 2px border <= floor\n //\n // Sizing the padding against the input line box instead left the floor\n // inert the moment a single tag existed. Empty, the control measured\n // correctly at all five sizes; populated, it measured 26 / 32 / 38 / 50 /\n // 54 against a 24 / 32 / 36 / 44 / 48 scale — so a filter bar was on the\n // grid until the user typed the first tag, then jumped 2px at xs and md\n // and 6px at lg and xl. Only sm was ever correct, which is why the\n // isolated slot reading looked like a one-off rather than a broken rule.\n //\n // Resting appearance does not change: once the floor binds, `items-center`\n // centres the chip and the padding is no longer what sets the height. The\n // padding still governs the multi-line case, where chips wrap and the box\n // legitimately grows past the floor.\n //\n // Chip heights are 20 / 20 / 24 / 32 / 32, so the padding ceiling is\n // 1 / 5 / 5 / 5 / 7px. `py-px` at xs is not decorative restraint: a 20px\n // chip inside a 24px control with a 1px border leaves exactly 1px a side.\n { inFormField: false, size: 'xs', class: { root: 'px-2 py-px min-h-6' } },\n { inFormField: false, size: 'sm', class: { root: 'px-3 py-1 min-h-8' } },\n { inFormField: false, size: 'md', class: { root: 'px-4 py-1 min-h-9' } },\n { inFormField: false, size: 'lg', class: { root: 'px-5 py-1 min-h-11' } },\n { inFormField: false, size: 'xl', class: { root: 'px-6 py-1.5 min-h-12' } },\n // Standalone error state — colored border + focus ring.\n {\n inFormField: false,\n errorState: true,\n class: { root: 'border-error-border focus-within:outline-error-border' },\n },\n ],\n defaultVariants: {\n inFormField: false,\n size: 'md',\n color: 'primary',\n disabled: false,\n errorState: false,\n },\n },\n { twMerge: true },\n);\n\nconst DEFAULT_SEPARATORS: readonly string[] = ['Enter', ','];\n\nlet nextId = 0;\n\n/**\n * Free-text multi-value input. The user types a token and commits it via Enter,\n * a separator key, paste, or blur; committed tokens render as dismissible chips\n * (composing `[twBadge]`) inline with the text input. The value is exposed as a\n * real `T[]` (default `string[]`) through `ControlValueAccessor`, so it works\n * with template-driven, reactive, and signal forms and integrates with\n * `<tw-form-field>` for label / hint / error chrome.\n *\n * The control is a single tab stop with a roving-tabindex chip strip\n * (Material `MatChipGrid` interaction model): Arrow keys traverse chips and the\n * input, Delete / a two-step Backspace remove chips, and `LiveAnnouncer` voices\n * add / remove. Autocomplete suggestions are out of scope (use `tw-combobox`).\n */\n@Component({\n selector: 'tw-tags-input',\n exportAs: 'twTagsInput',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [BadgeComponent],\n providers: [\n {\n provide: TW_FORM_FIELD_CONTROL,\n useExisting: forwardRef(() => TagsInputComponent),\n },\n ],\n template: `\n @for (chip of chipViews(); track chip.index) {\n <span twBadge variant=\"soft\" [color]=\"color()\" [size]=\"size()\" [class]=\"chipClasses()\">\n <span [class]=\"chipLabelClasses()\">{{ chip.label }}</span>\n <button\n #removeBtn\n type=\"button\"\n [class]=\"removeButtonClasses()\"\n [attr.tabindex]=\"activeChipIndex() === chip.index ? 0 : -1\"\n [attr.aria-label]=\"chip.removeLabel\"\n [disabled]=\"disabled()\"\n (click)=\"onRemoveClick(chip.index)\"\n (keydown)=\"onChipKeydown($event, chip.index)\"\n >\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n [class]=\"removeIconClasses()\"\n >\n <path\n d=\"M5.28 4.22a.75.75 0 0 0-1.06 1.06L6.94 8l-2.72 2.72a.75.75 0 1 0 1.06 1.06L8 9.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L9.06 8l2.72-2.72a.75.75 0 0 0-1.06-1.06L8 6.94 5.28 4.22Z\"\n />\n </svg>\n </button>\n </span>\n }\n <input\n #textInput\n type=\"text\"\n [class]=\"inputClasses()\"\n [attr.tabindex]=\"activeChipIndex() === null ? 0 : -1\"\n [attr.placeholder]=\"placeholder() || null\"\n [attr.aria-required]=\"required() || null\"\n [attr.aria-label]=\"ariaLabel() || null\"\n [attr.aria-labelledby]=\"resolvedLabelledBy() || null\"\n [attr.aria-describedby]=\"resolvedDescribedBy() || null\"\n [attr.aria-invalid]=\"errorState() || null\"\n [attr.name]=\"name() || null\"\n [disabled]=\"disabled()\"\n (input)=\"onInput($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (paste)=\"onPaste($event)\"\n />\n `,\n host: {\n 'role': 'group',\n '[id]': 'id()',\n '[class]': 'rootClasses()',\n '[attr.aria-label]': 'ariaLabel() || null',\n '[attr.aria-labelledby]': 'resolvedLabelledBy() || null',\n '[attr.aria-describedby]': 'resolvedDescribedBy() || null',\n '[attr.aria-disabled]': 'disabled() || null',\n // NOTE: no `aria-invalid` here. ARIA 1.2 does not allow it on\n // `role=\"group\"` (axe: critical `aria-allowed-attr`). The inner\n // `<input type=\"text\">` already carries it — that is the control with the\n // value. Latent rather than observed: it only fires once a consumer puts\n // the control into an error state.\n '[attr.data-focused]': 'focused() || null',\n },\n})\nexport class TagsInputComponent<T = string>\n extends FormFieldControl<T[]>\n implements ControlValueAccessor, OnInit\n{\n /** Semantic color for the container focus-within ring and the chip accent. Defaults to `'primary'`. */\n readonly color = input<TwColor>('primary');\n\n /** Controls overall density: container padding, chip size, and text scale. Defaults to `'md'`. */\n readonly size = input<TwSize>('md');\n\n /** When true, blocks typing, committing, and chip removal, and applies muted styling. Reactive forms also propagate disabled via `setDisabledState`. Defaults to `false`. */\n readonly disabledInput = input(false, { alias: 'disabled' });\n\n /** Marks the control as required. Mirrored to the input's `aria-required`. Also inferred from `Validators.required` on a bound control. Defaults to `false`. */\n readonly requiredInput = input(false, { alias: 'required' });\n\n /** Placeholder shown in the text input only while there are no chips and the input is empty. Defaults to `undefined`. */\n readonly placeholder = input<string | undefined>(undefined);\n\n /** Keys that commit the in-progress text as a tag. Each entry is a `KeyboardEvent.key` value (`'Enter'`) or a single separator character (`','`). Single-character separators also split pasted text. Defaults to `['Enter', ',']`. */\n readonly separatorKeys = input<readonly string[]>(DEFAULT_SEPARATORS);\n\n /** When true, blurring the control while the input holds non-empty text commits it as a tag. Defaults to `false`. */\n readonly addOnBlur = input(false);\n\n /** Maximum number of tags. Once reached, further commits are blocked and announced. Does not truncate an oversized `writeValue`. Defaults to `undefined` (no limit). */\n readonly maxTags = input<number | undefined>(undefined);\n\n /** When false (default), a committed tag equal (per `compareWith`) to an existing tag is dropped silently. When true, duplicates are kept. Defaults to `false`. */\n readonly allowDuplicates = input(false);\n\n /** Maps committed text to a tag value. Default is identity — the trimmed string. Override to build object tags. */\n readonly createTag = input<TwTagFactory<T>>(\n ((text: string) => text) as unknown as TwTagFactory<T>,\n );\n\n /** Maps a tag value to its visible chip label and the remove-button accessible name. Defaults to `String(tag)`. */\n readonly tagLabel = input<TwTagLabelFn<T>>((tag: T) => String(tag));\n\n /** Equality comparator used for dedup when `allowDuplicates` is false. Defaults to `Object.is` (reference / value identity). String tags dedupe case-sensitively by default; pass `(a, b) => a.toLowerCase() === b.toLowerCase()` for case-insensitive dedup. */\n readonly compareWith = input<TwTagCompareFn<T>>((a: T, b: T) => Object.is(a, b));\n\n /** Applied to the text input for labeling and identification only; does not submit the tag array via native (non-Angular) form posting. Defaults to `undefined`. */\n readonly name = input<string | undefined>(undefined);\n\n /** Id on the host element. Auto-generated as `tw-tags-input-N` when not provided. Used by the form-field's `<label for>` association. */\n readonly idInput = input<string | undefined>(undefined, { alias: 'id' });\n\n /** Accessible name applied to the control when no visible label is wired. 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 control. 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 control. Form-field merges its hint / error ids alongside. Defaults to `undefined`. Alias: `aria-describedby`. */\n readonly ariaDescribedby = input<string | undefined>(undefined, { alias: 'aria-describedby' });\n\n /** Per-instance override of the {@link ErrorStateMatcher}. When omitted, uses the `TW_ERROR_STATE_MATCHER` token's value. */\n readonly errorStateMatcher = input<ErrorStateMatcher | undefined>(undefined);\n\n /**\n * Fires when the tag array changes through user interaction (add, remove,\n * clear). Emits a fresh array reference. Does **not** fire on `writeValue` /\n * `FormControl.setValue` / `ngModel`.\n *\n * This is a hand-written, user-gesture-only output. The control exposes no\n * `value` input and therefore no two-way binding, so — unlike\n * `tw-checkbox` / `tw-switch` / `tw-radio-group`, where `(valueChange)` /\n * `(checkedChange)` is minted by a `model()` and fires on programmatic writes\n * too — there is no any-change channel here. Observe programmatic writes\n * through the bound form control's own `valueChanges`.\n */\n readonly valueChange = output<T[]>();\n\n /** Fires when a tag is committed via Enter, a separator key, paste, or `addTag()`. Does not fire for dropped duplicates, blocked-by-max commits, empty commits, or `writeValue`. */\n readonly tagAdded = output<TwTagAddedEvent<T>>();\n\n /** Fires when a tag is removed via the remove button, Backspace / Delete, or `removeTag()`. Does not fire on `writeValue` or `clear()`. */\n readonly tagRemoved = output<TwTagRemovedEvent<T>>();\n\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngControl = inject(NgControl, { optional: true, self: true });\n private readonly formField = inject(TW_FORM_FIELD, { optional: true });\n /**\n * Optional so a consumer that never imports `BidiModule` still gets a working\n * control — chip navigation falls back to LTR when the token is absent. Read\n * imperatively inside the keydown handlers; nothing here needs to re-render\n * on a direction change.\n */\n private readonly directionality = inject(Directionality, { optional: true });\n\n private readonly textInputRef = viewChild<ElementRef<HTMLInputElement>>('textInput');\n private readonly removeButtons = viewChildren<ElementRef<HTMLButtonElement>>('removeBtn');\n\n private onChange: (value: T[]) => void = () => {};\n private onTouched: () => void = () => {};\n\n private readonly tags = signal<T[]>([]);\n /** The current in-progress (uncommitted) text in the input. Empty when nothing is typed. */\n readonly inputText = signal('');\n /** @internal Roving-tabindex position. `null` = the text input is the active element; a number = that chip's remove button. */\n protected readonly activeChipIndex = signal<number | null>(null);\n private readonly cvaDisabled = signal(false);\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 track: [() => this._focused()],\n });\n private readonly describedByIdsSignal = signal<readonly string[]>([]);\n private readonly labelledByIdsSignal = signal<readonly string[]>([]);\n /** Nonce bumped only on explicit focus intent — keeps the focus effect from stealing focus on unrelated renders. */\n private readonly focusNonce = signal(0);\n private lastMaxAnnounce = 0;\n\n private readonly uid = nextId++;\n /** @internal Fallback id used when the consumer does not set `[id]`. */\n readonly hostId = `tw-tags-input-${this.uid}`;\n\n // ── FormFieldControl signals ──\n\n /** @internal */\n readonly id: Signal<string> = computed(() => this.idInput() ?? this.hostId);\n\n /** The current tag array (empty array when there are no tags). Read from a template ref (`#t=\"twTagsInput\"`) for non-form usage. Doubles as the `FormFieldControl` contract member. */\n readonly value: Signal<T[]> = this.tags.asReadonly();\n\n /** @internal */\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n\n /** @internal Empty when there are no chips AND the input text is blank — drives the form-field floating label. */\n readonly empty: Signal<boolean> = computed(\n () => this.tags().length === 0 && this.inputText().trim().length === 0,\n );\n\n /** @internal */\n readonly disabled: Signal<boolean> = computed(\n () => this.disabledInput() || this.cvaDisabled(),\n );\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 control, for `[twError match=\"…\"]` filtering. */\n override readonly errors = this.errorWiring.errors;\n\n /** @internal */\n readonly controlType = 'tags-input';\n\n /** @internal */\n readonly userAriaDescribedBy: Signal<string | undefined> = computed(() => this.ariaDescribedby());\n\n /** @internal */\n override readonly userAriaLabelledby: Signal<string | undefined> = computed(() =>\n this.ariaLabelledby(),\n );\n\n // ── Effective ARIA ──\n //\n // When wrapped by `<tw-form-field>`, the form-field pushes the FULLY MERGED\n // id list (hint/error/label + the consumer's `aria-*by` ids) via\n // `setDescribedByIds` / `setLabelledByIds`. In that case the pushed ids alone\n // are the source of truth — re-merging the consumer's `aria-*by` input on top\n // would duplicate ids. When standalone, fall back to the consumer-supplied\n // `aria-*by` input.\n\n /** @internal Merged `aria-describedby` (form-field hint/error ids + consumer-supplied). */\n readonly resolvedDescribedBy = computed(() => {\n const pushed = this.describedByIdsSignal();\n if (pushed.length) return pushed.join(' ');\n const user = this.ariaDescribedby();\n if (user) return user.split(/\\s+/).filter(Boolean).join(' ');\n return '';\n });\n\n /** @internal Merged `aria-labelledby` (form-field label id + consumer-supplied). */\n readonly resolvedLabelledBy = computed(() => {\n const pushed = this.labelledByIdsSignal();\n if (pushed.length) return pushed.join(' ');\n const user = this.ariaLabelledby();\n if (user) return user.split(/\\s+/).filter(Boolean).join(' ');\n return '';\n });\n\n // ── tv() class bindings ──\n\n private readonly variantResult = computed(() =>\n tagsInputVariants({\n inFormField: !!this.formField,\n size: this.size(),\n color: this.color(),\n disabled: this.disabled(),\n errorState: this.errorState(),\n }),\n );\n\n /** @internal */\n readonly rootClasses = computed(() => this.variantResult().root());\n /** @internal */\n readonly chipClasses = computed(() => this.variantResult().chip());\n /** @internal */\n readonly chipLabelClasses = computed(() => this.variantResult().chipLabel());\n /** @internal */\n readonly removeButtonClasses = computed(() => this.variantResult().removeButton());\n /** @internal */\n readonly removeIconClasses = computed(() => this.variantResult().removeIcon());\n /** @internal */\n readonly inputClasses = computed(() => this.variantResult().input());\n\n /** @internal Pre-resolved chip view models so the template never calls accessor functions inline. */\n readonly chipViews = computed(() => {\n const label = this.tagLabel();\n return this.tags().map((tag, index) => {\n const text = label(tag);\n return { tag, label: text, removeLabel: `Remove ${text}`, index };\n });\n });\n\n constructor() {\n super();\n // Runtime CVA wiring — register on any host-level NgControl. The component\n // injects `NgControl { self }` for TW_ERROR_STATE_MATCHER, so a static\n // NG_VALUE_ACCESSOR provider would create circular DI on the same instance.\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n\n // Focus side-effect (leaves the signal graph; writes no signal → no cycle).\n // Triggered only by `focusNonce` bumps so it never steals focus on an\n // unrelated render (e.g. initial mount). Reads the active index and refs\n // untracked so it does not re-fire when the chip list changes on its own.\n effect(() => {\n if (this.focusNonce() === 0) return;\n untracked(() => {\n const idx = this.activeChipIndex();\n if (idx === null) {\n this.textInputRef()?.nativeElement.focus();\n } else {\n this.removeButtons()[idx]?.nativeElement.focus();\n }\n });\n });\n\n afterNextRender(() => {\n if (isDevMode() && !this.hasAccessibleNameHint()) {\n console.warn(\n '[tw-tags-input] The control has no accessible name. Provide `aria-label` / `aria-labelledby`, or wrap it in a <tw-form-field> with a <label twLabel>.',\n );\n }\n });\n }\n\n // ── Public instance API ──\n\n /** Commits `text` as a tag (trim → `createTag` → dedup unless `allowDuplicates` → `maxTags` check). Returns true if a tag was added, false if dropped (empty / duplicate / max). Emits `tagAdded` + `valueChange` on success. No-op when disabled. */\n addTag(text: string): boolean {\n if (this.disabled()) return false;\n const trimmed = text.trim();\n if (!trimmed) return false;\n return this.tryAdd(this.createTag()(trimmed)) === 'added';\n }\n\n /** Removes a tag by value (first match via `compareWith`) or by index when a number is passed. Emits `tagRemoved` + `valueChange` and restores focus. No-op when disabled or when no match. Note: when the tag type is `number`, the argument is treated as an index. */\n removeTag(tag: T | number): void {\n if (this.disabled()) return;\n if (typeof tag === 'number') {\n this.removeAt(tag);\n return;\n }\n const cmp = this.compareWith();\n const idx = this.tags().findIndex((t) => cmp(t, tag));\n if (idx >= 0) this.removeAt(idx);\n }\n\n /** Removes all tags and clears the in-progress input text. Emits `valueChange` with `[]`. Does NOT emit `tagRemoved` per tag (bulk reset). No-op when already empty or disabled. */\n clear(): void {\n if (this.disabled()) return;\n if (this.tags().length === 0 && this.inputText().length === 0) return;\n this.tags.set([]);\n this.setInputText('');\n this.activeChipIndex.set(null);\n this.onChange([]);\n this.valueChange.emit([]);\n this.liveAnnouncer.announce('All tags removed', 'polite');\n }\n\n /** Moves focus to the text input. */\n focus(): void {\n this.activeChipIndex.set(null);\n this.requestFocus();\n }\n\n // ── Internal commit / remove pipeline ──\n\n private tryAdd(tag: T): 'added' | 'duplicate' | 'max' {\n const current = this.tags();\n if (!this.allowDuplicates()) {\n const cmp = this.compareWith();\n if (current.some((e) => cmp(e, tag))) return 'duplicate';\n }\n const max = this.maxTags();\n if (max !== undefined && current.length >= max) {\n this.announceMax();\n return 'max';\n }\n const next = [...current, tag];\n this.tags.set(next);\n this.onChange(next);\n this.tagAdded.emit({ tag, value: next });\n this.valueChange.emit(next);\n this.liveAnnouncer.announce(`${this.tagLabel()(tag)} added`, 'polite');\n return 'added';\n }\n\n private commitInput(): void {\n if (this.disabled()) return;\n const trimmed = this.inputText().trim();\n if (!trimmed) {\n this.setInputText('');\n return;\n }\n const result = this.tryAdd(this.createTag()(trimmed));\n // Clear on success or duplicate (gesture consumed); retain on max so the\n // user can retry after removing a tag.\n if (result !== 'max') this.setInputText('');\n }\n\n private removeAt(index: number): void {\n if (this.disabled()) return;\n const current = this.tags();\n if (index < 0 || index >= current.length) return;\n const tag = current[index];\n const next = current.filter((_, i) => i !== index);\n this.tags.set(next);\n this.onChange(next);\n this.tagRemoved.emit({ tag, value: next, index });\n this.valueChange.emit(next);\n this.liveAnnouncer.announce(`${this.tagLabel()(tag)} removed`, 'polite');\n // Focus restoration: next chip at this index, else the previous chip, else the input.\n if (next.length === 0) {\n this.focusInput();\n } else if (index < next.length) {\n this.focusChip(index);\n } else {\n this.focusChip(next.length - 1);\n }\n }\n\n // ── DOM event handlers ──\n\n /** @internal */\n onInput(event: Event): void {\n this.inputText.set((event.target as HTMLInputElement).value);\n }\n\n /** @internal */\n onInputKeydown(event: KeyboardEvent): void {\n if (this.disabled()) return;\n const separators = this.separatorKeys();\n const key = event.key;\n\n // Single-character separator → commit (and swallow the character).\n if (key.length === 1 && separators.includes(key)) {\n event.preventDefault();\n this.commitInput();\n return;\n }\n // Enter separator → commit only when there is text (otherwise let the form submit).\n if (key === 'Enter' && separators.includes('Enter')) {\n if (this.inputText().trim().length > 0) {\n event.preventDefault();\n this.commitInput();\n }\n return;\n }\n // Stepping out of the input into the last chip is a *backwards* move: the\n // chip row is rendered before the input, so it is ArrowLeft in LTR and\n // ArrowRight in an RTL locale, where the row lays out right-to-left. The\n // caret test is direction-independent — `selectionStart === 0` is the\n // logical start of the text in both directions.\n const backKey = this.directionality?.value === 'rtl' ? 'ArrowRight' : 'ArrowLeft';\n if (key === backKey) {\n const el = event.target as HTMLInputElement;\n const atStart = (el.selectionStart ?? 0) === 0 && (el.selectionEnd ?? 0) === 0;\n if (atStart && this.tags().length > 0) {\n event.preventDefault();\n this.focusChip(this.tags().length - 1);\n }\n return;\n }\n if (key === 'Backspace' && this.inputText().length === 0) {\n if (this.tags().length > 0) {\n event.preventDefault();\n this.focusChip(this.tags().length - 1);\n }\n return;\n }\n if (key === 'Escape' && this.inputText().length > 0) {\n event.preventDefault();\n this.setInputText('');\n }\n }\n\n /** @internal */\n onChipKeydown(event: KeyboardEvent, index: number): void {\n if (this.disabled()) return;\n const last = this.tags().length - 1;\n switch (event.key) {\n case 'ArrowLeft':\n case 'ArrowRight': {\n // Horizontal arrows follow the layout direction. Chips sit on a\n // flex row that lays out right-to-left in an RTL locale, so ArrowLeft\n // is the *forward* key there. The chip host is a custom element, not a\n // native control, so the browser does no flipping for us. Home/End stay\n // logical — CDK's ListKeyManager does not flip them either.\n event.preventDefault();\n const rtl = this.directionality?.value === 'rtl';\n const forward = rtl ? event.key === 'ArrowLeft' : event.key === 'ArrowRight';\n if (forward) {\n if (index < last) this.focusChip(index + 1);\n else this.focusInput();\n } else if (index > 0) {\n this.focusChip(index - 1);\n }\n return;\n }\n case 'Home':\n event.preventDefault();\n this.focusChip(0);\n return;\n case 'End':\n event.preventDefault();\n this.focusInput();\n return;\n case 'Delete':\n case 'Backspace':\n event.preventDefault();\n this.removeAt(index);\n return;\n case 'Escape':\n event.preventDefault();\n this.focusInput();\n return;\n default:\n return;\n }\n }\n\n /** @internal */\n onRemoveClick(index: number): void {\n this.removeAt(index);\n }\n\n /** @internal */\n onPaste(event: ClipboardEvent): void {\n if (this.disabled()) return;\n const data = event.clipboardData?.getData('text') ?? '';\n const charSeparators = this.separatorKeys().filter((k) => k.length === 1);\n const hasSeparator = charSeparators.some((s) => data.includes(s));\n if (!hasSeparator) {\n // No separator: let the browser merge the text into the input natively.\n return;\n }\n event.preventDefault();\n const combined = this.inputText() + data;\n this.setInputText('');\n for (const piece of this.splitOnSeparators(combined, charSeparators)) {\n const trimmed = piece.trim();\n if (!trimmed) continue;\n if (this.tryAdd(this.createTag()(trimmed)) === 'max') break;\n }\n }\n\n // ── ControlValueAccessor ──\n\n writeValue(value: T[] | null | undefined): void {\n this.tags.set(Array.isArray(value) ? [...value] : []);\n this.setInputText('');\n }\n\n registerOnChange(fn: (value: T[]) => 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 */\n setDescribedByIds(ids: string[]): void {\n this.describedByIdsSignal.set([...ids]);\n }\n\n /** @internal */\n override setLabelledByIds(ids: string[]): void {\n this.labelledByIdsSignal.set([...ids]);\n }\n\n /** @internal Clicking the form-field surface (outside the control) focuses the text input. Clicks inside the control are left alone so chip removal keeps its own focus restoration. */\n onContainerClick(event: MouseEvent): void {\n if (this.disabled()) 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 this.focus();\n }\n\n // ── Lifecycle ──\n\n ngOnInit(): void {\n // checkChildren: true — internal focus moves (input ↔ chips) stay \"focused\";\n // origin === null fires only when focus leaves the whole control, the single\n // source for onTouched and the addOnBlur commit.\n const monitor$ = this.focusMonitor.monitor(this.elementRef, true);\n if (isObservable(monitor$)) {\n monitor$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((origin) => {\n const wasFocused = this._focused();\n this._focused.set(!!origin);\n if (wasFocused && !origin) {\n if (this.addOnBlur() && this.inputText().trim().length > 0) {\n this.commitInput();\n }\n this.onTouched();\n this.errorWiring.bump();\n // Reset roving so the next Tab into the control lands on the input.\n this.activeChipIndex.set(null);\n }\n });\n }\n this.destroyRef.onDestroy(() => this.focusMonitor.stopMonitoring(this.elementRef));\n\n this.errorWiring.connect();\n }\n\n // ── Helpers ──\n\n private focusChip(index: number): void {\n this.activeChipIndex.set(index);\n this.requestFocus();\n }\n\n private focusInput(): void {\n this.activeChipIndex.set(null);\n this.requestFocus();\n }\n\n private requestFocus(): void {\n this.focusNonce.update((n) => n + 1);\n }\n\n private setInputText(value: string): void {\n this.inputText.set(value);\n const el = this.textInputRef()?.nativeElement;\n if (el && el.value !== value) el.value = value;\n }\n\n private announceMax(): void {\n const now = Date.now();\n if (now - this.lastMaxAnnounce < 500) return;\n this.lastMaxAnnounce = now;\n this.liveAnnouncer.announce(`Maximum ${this.maxTags()} tags reached`, 'assertive');\n }\n\n private splitOnSeparators(text: string, separators: readonly string[]): string[] {\n if (separators.length === 0) return [text];\n let normalized = text;\n for (const s of separators) normalized = normalized.split(s).join('\\u0000');\n return normalized.split('\\u0000');\n }\n\n private hasAccessibleNameHint(): boolean {\n return (\n !!this.ariaLabel() ||\n !!this.ariaLabelledby() ||\n this.labelledByIdsSignal().length > 0\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AA8CA;AACA;AACA;AAEA,MAAM,iBAAiB,GAAG,EAAE,CAC1B;AACE,IAAA,KAAK,EAAE;;;;AAIL,QAAA,IAAI,EAAE,oDAAoD;AAC1D,QAAA,IAAI,EAAE,oBAAoB;AAC1B,QAAA,SAAS,EAAE,UAAU;;;;AAIrB,QAAA,YAAY,EACV,qSAAqS;AACvS,QAAA,UAAU,EAAE,UAAU;AACtB,QAAA,KAAK,EACH,4GAA4G;AAC/G,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,WAAW,EAAE;;;AAGX,YAAA,IAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;AAClB,YAAA,KAAK,EAAE;AACL,gBAAA,IAAI,EAAE,4LAA4L;AACnM,aAAA;AACF,SAAA;AACD,QAAA,IAAI,EAAE;;;;;;AAMJ,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE;AACjF,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,oBAAoB,EAAE,UAAU,EAAE,QAAQ,EAAE;AACjF,YAAA,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,E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AAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,WAAW,0EACN,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC5V1F;;AAEG;;;;"}
|
|
@@ -229,15 +229,15 @@ const timePickerVariants = tv({
|
|
|
229
229
|
{ variant: 'default', size: 'md', class: { root: 'h-9' } },
|
|
230
230
|
{ variant: 'default', size: 'lg', class: { root: 'h-11' } },
|
|
231
231
|
{ variant: 'default', size: 'xl', class: { root: 'h-12' } },
|
|
232
|
-
{ variant: 'default', focused: true, color: 'primary', class: { root: 'border-primary-
|
|
233
|
-
{ variant: 'default', focused: true, color: 'secondary', class: { root: 'border-secondary-
|
|
234
|
-
{ variant: 'default', focused: true, color: 'accent', class: { root: 'border-accent-
|
|
232
|
+
{ variant: 'default', focused: true, color: 'primary', class: { root: 'border-primary-border' } },
|
|
233
|
+
{ variant: 'default', focused: true, color: 'secondary', class: { root: 'border-secondary-border' } },
|
|
234
|
+
{ variant: 'default', focused: true, color: 'accent', class: { root: 'border-accent-border' } },
|
|
235
235
|
{ variant: 'default', focused: true, color: 'neutral', class: { root: 'border-border-strong' } },
|
|
236
|
-
{ variant: 'default', focused: true, color: 'info', class: { root: 'border-info-
|
|
237
|
-
{ variant: 'default', focused: true, color: 'success', class: { root: 'border-success-
|
|
238
|
-
{ variant: 'default', focused: true, color: 'warning', class: { root: 'border-warning-
|
|
239
|
-
{ variant: 'default', focused: true, color: 'error', class: { root: 'border-error-
|
|
240
|
-
{ variant: 'default', errorState: true, class: { root: 'border-error-
|
|
236
|
+
{ variant: 'default', focused: true, color: 'info', class: { root: 'border-info-border' } },
|
|
237
|
+
{ variant: 'default', focused: true, color: 'success', class: { root: 'border-success-border' } },
|
|
238
|
+
{ variant: 'default', focused: true, color: 'warning', class: { root: 'border-warning-border' } },
|
|
239
|
+
{ variant: 'default', focused: true, color: 'error', class: { root: 'border-error-border' } },
|
|
240
|
+
{ variant: 'default', errorState: true, class: { root: 'border-error-border' } },
|
|
241
241
|
],
|
|
242
242
|
defaultVariants: {
|
|
243
243
|
size: 'md',
|