@spartan-ng/brain 0.0.1-alpha.708 → 0.0.1-alpha.709

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.
@@ -63,36 +63,41 @@ class BrnAccordionItem {
63
63
  if (!this._accordion) {
64
64
  throw Error('Accordion item can only be used inside an Accordion. Add brnAccordion to ancestor.');
65
65
  }
66
- effect(() => {
67
- const state = this.state();
68
- if (untracked(this.disabled))
69
- return;
70
- untracked(() => {
71
- this.stateChange.emit(state);
72
- this.openedChange.emit(state === 'open');
73
- });
74
- });
75
66
  effect(() => {
76
67
  const isOpened = this.isOpened();
77
68
  untracked(() => {
78
69
  if (isOpened) {
79
- this.open();
70
+ this._triggerOpen(false);
80
71
  }
81
72
  else {
82
- this.close();
73
+ this._triggerClose(false);
83
74
  }
84
75
  });
85
76
  });
86
77
  }
87
78
  open() {
88
- if (this.disabled())
79
+ this._triggerOpen(true);
80
+ }
81
+ close() {
82
+ this._triggerClose(true);
83
+ }
84
+ _triggerOpen(emitEvent) {
85
+ if (this.disabled() || this.state() === 'open')
89
86
  return;
90
87
  this._accordion.openItem(this.id);
88
+ if (emitEvent) {
89
+ this.stateChange.emit('open');
90
+ this.openedChange.emit(true);
91
+ }
91
92
  }
92
- close() {
93
- if (this.disabled())
93
+ _triggerClose(emitEvent) {
94
+ if (this.disabled() || this.state() !== 'open')
94
95
  return;
95
96
  this._accordion.closeItem(this.id);
97
+ if (emitEvent) {
98
+ this.stateChange.emit('closed');
99
+ this.openedChange.emit(false);
100
+ }
96
101
  }
97
102
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnAccordionItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
98
103
  /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.16", type: BrnAccordionItem, isStandalone: true, selector: "[brnAccordionItem]", inputs: { isOpened: { classPropertyName: "isOpened", publicName: "isOpened", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stateChange: "stateChange", openedChange: "openedChange" }, host: { properties: { "attr.data-state": "state()" } }, providers: [provideBrnAccordionItem(BrnAccordionItem)], exportAs: ["brnAccordionItem"], ngImport: i0 });
@@ -183,13 +188,6 @@ class BrnAccordion {
183
188
  setActiveItem(item) {
184
189
  this._keyManager()?.setActiveItem(item);
185
190
  }
186
- toggleItem(id) {
187
- if (this._openItemIds().includes(id)) {
188
- this.closeItem(id);
189
- return;
190
- }
191
- this.openItem(id);
192
- }
193
191
  openItem(id) {
194
192
  if (this.type() === 'single') {
195
193
  this._openItemIds.set([id]);
@@ -238,18 +236,14 @@ class BrnAccordion {
238
236
  }
239
237
  openAll() {
240
238
  if (this.type() === 'multiple') {
241
- this._brnAccordionItems()
242
- .filter((a) => !a.disabled())
243
- .forEach((a) => this.openItem(a.id));
239
+ this._brnAccordionItems().forEach((a) => a.open());
244
240
  }
245
241
  else {
246
242
  console.warn('[BrnAccordion]: openAll is only available in multiple mode');
247
243
  }
248
244
  }
249
245
  closeAll() {
250
- this._brnAccordionItems()
251
- .filter((a) => !a.disabled())
252
- .forEach((a) => this.closeItem(a.id));
246
+ this._brnAccordionItems().forEach((a) => a.close());
253
247
  }
254
248
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnAccordion, deps: [], target: i0.ɵɵFactoryTarget.Directive });
255
249
  /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "21.2.16", type: BrnAccordion, isStandalone: true, selector: "[brnAccordion]", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.dir": "_direction()", "attr.data-state": "state()", "attr.data-orientation": "orientation()" } }, providers: [provideBrnAccordion(BrnAccordion)], queries: [{ propertyName: "_brnAccordionItems", predicate: BrnAccordionItem, isSignal: true }], exportAs: ["brnAccordion"], ngImport: i0 });
@@ -393,7 +387,12 @@ class BrnAccordionTrigger {
393
387
  }
394
388
  toggle(event) {
395
389
  event.preventDefault();
396
- this._accordion.toggleItem(this._item.id);
390
+ if (this._state() === 'open') {
391
+ this._item.close();
392
+ }
393
+ else {
394
+ this._item.open();
395
+ }
397
396
  }
398
397
  focus() {
399
398
  this._el.nativeElement.focus();
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-accordion.mjs","sources":["../../../../libs/brain/accordion/src/lib/brn-accordion-token.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-item.ts","../../../../libs/brain/accordion/src/lib/brn-accordion.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-content.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-header.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-trigger.ts","../../../../libs/brain/accordion/src/index.ts","../../../../libs/brain/accordion/src/spartan-ng-brain-accordion.ts"],"sourcesContent":["import { type ExistingProvider, inject, InjectionToken, type Type, type ValueProvider } from '@angular/core';\nimport type { MeasurementDisplay } from '@spartan-ng/brain/core';\nimport type { BrnAccordion } from './brn-accordion';\nimport type { BrnAccordionItem } from './brn-accordion-item';\n\nexport const BrnAccordionToken = new InjectionToken<BrnAccordion>('BrnAccordionToken');\n\nexport function injectBrnAccordion() {\n\treturn inject(BrnAccordionToken);\n}\n\nexport function provideBrnAccordion(accordion: Type<BrnAccordion>): ExistingProvider {\n\treturn { provide: BrnAccordionToken, useExisting: accordion };\n}\n\nexport const BrnAccordionItemToken = new InjectionToken<BrnAccordionItem>('BrnAccordionItemToken');\n\nexport function injectBrnAccordionItem() {\n\treturn inject(BrnAccordionItemToken);\n}\n\nexport function provideBrnAccordionItem(item: Type<BrnAccordionItem>): ExistingProvider {\n\treturn { provide: BrnAccordionItemToken, useExisting: item };\n}\n\nexport interface BrBrnAccordionConfig {\n\t/**\n\t * The display style to use when measuring element dimensions.\n\t * @default 'block'\n\t */\n\tmeasurementDisplay: MeasurementDisplay;\n}\n\nconst defaultConfig: BrBrnAccordionConfig = {\n\tmeasurementDisplay: 'block',\n};\n\nconst BrnAccordionConfigToken = new InjectionToken<BrBrnAccordionConfig>('BrnBrnAccordionConfig');\n\nexport function provideBrnAccordionConfig(config: Partial<BrBrnAccordionConfig>): ValueProvider {\n\treturn { provide: BrnAccordionConfigToken, useValue: { ...defaultConfig, ...config } };\n}\n\nexport function injectBrnAccordionConfig(): BrBrnAccordionConfig {\n\treturn inject(BrnAccordionConfigToken, { optional: true }) ?? defaultConfig;\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, effect, input, output, untracked } from '@angular/core';\nimport { injectBrnAccordion, provideBrnAccordionItem } from './brn-accordion-token';\n\n@Directive({\n\tselector: '[brnAccordionItem]',\n\texportAs: 'brnAccordionItem',\n\tproviders: [provideBrnAccordionItem(BrnAccordionItem)],\n\thost: {\n\t\t'[attr.data-state]': 'state()',\n\t},\n})\nexport class BrnAccordionItem {\n\tprivate static _itemIdGenerator = 0;\n\tpublic readonly id = ++BrnAccordionItem._itemIdGenerator;\n\tprivate readonly _accordion = injectBrnAccordion();\n\t/**\n\t * Whether the item is opened or closed.\n\t * @default false\n\t */\n\tpublic readonly isOpened = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether the item is disabled.\n\t * @default false\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state of the item, either 'open' or 'closed'\n\t * @default closed\n\t */\n\tpublic readonly state = computed(() => (this._accordion.openItemIds()?.includes(this.id) ? 'open' : 'closed'));\n\t/**\n\t * Emits boolean when the item is opened or closed.\n\t */\n\tpublic readonly stateChange = output<'open' | 'closed'>();\n\t/**\n\t * Emits state change when item is opened or closed\n\t */\n\tpublic readonly openedChange = output<boolean>();\n\n\tconstructor() {\n\t\tif (!this._accordion) {\n\t\t\tthrow Error('Accordion item can only be used inside an Accordion. Add brnAccordion to ancestor.');\n\t\t}\n\t\teffect(() => {\n\t\t\tconst state = this.state();\n\t\t\tif (untracked(this.disabled)) return;\n\t\t\tuntracked(() => {\n\t\t\t\tthis.stateChange.emit(state);\n\t\t\t\tthis.openedChange.emit(state === 'open');\n\t\t\t});\n\t\t});\n\t\teffect(() => {\n\t\t\tconst isOpened = this.isOpened();\n\t\t\tuntracked(() => {\n\t\t\t\tif (isOpened) {\n\t\t\t\t\tthis.open();\n\t\t\t\t} else {\n\t\t\t\t\tthis.close();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic open(): void {\n\t\tif (this.disabled()) return;\n\t\tthis._accordion.openItem(this.id);\n\t}\n\n\tpublic close(): void {\n\t\tif (this.disabled()) return;\n\t\tthis._accordion.closeItem(this.id);\n\t}\n}\n","import { FocusKeyManager, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n\ttype AfterContentInit,\n\tcomputed,\n\tcontentChildren,\n\tDirective,\n\tElementRef,\n\tinject,\n\tinput,\n\ttype OnDestroy,\n\tsignal,\n} from '@angular/core';\nimport { BrnAccordionItem } from './brn-accordion-item';\nimport { provideBrnAccordion } from './brn-accordion-token';\nimport type { BrnAccordionTrigger } from './brn-accordion-trigger';\n\nconst HORIZONTAL_KEYS_TO_PREVENT_DEFAULT = [\n\t'ArrowLeft',\n\t'ArrowRight',\n\t'PageDown',\n\t'PageUp',\n\t'Home',\n\t'End',\n\t' ',\n\t'Enter',\n] as const;\n\nconst VERTICAL_KEYS_TO_PREVENT_DEFAULT = [\n\t'ArrowUp',\n\t'ArrowDown',\n\t'PageDown',\n\t'PageUp',\n\t'Home',\n\t'End',\n\t' ',\n\t'Enter',\n] as const;\n\n@Directive({\n\tselector: '[brnAccordion]',\n\texportAs: 'brnAccordion',\n\tproviders: [provideBrnAccordion(BrnAccordion)],\n\thost: {\n\t\t'[attr.dir]': '_direction()',\n\t\t'[attr.data-state]': 'state()',\n\t\t'[attr.data-orientation]': 'orientation()',\n\t},\n})\nexport class BrnAccordion implements AfterContentInit, OnDestroy {\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\tprivate readonly _dir = inject(Directionality);\n\tprivate readonly _brnAccordionItems = contentChildren(BrnAccordionItem);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _keyManager = computed(() =>\n\t\tnew FocusKeyManager<BrnAccordionTrigger>(this._triggers())\n\t\t\t.withHomeAndEnd()\n\t\t\t.withPageUpDown()\n\t\t\t.withWrap()\n\t\t\t.withHorizontalOrientation(this.orientation() === 'vertical' ? null : (this._direction() ?? 'ltr'))\n\t\t\t.withVerticalOrientation(this.orientation() === 'vertical')\n\t\t\t.skipPredicate((item) => item.disabled),\n\t);\n\n\t// Not a signal: FocusMonitor can fire mid-render (a disabled child blurs during change\n\t// detection) and a signal write there throws NG0600. Only read imperatively in keydown. #1371\n\tprivate _focused = false;\n\tprivate readonly _openItemIds = signal<number[]>([]);\n\tpublic readonly openItemIds = this._openItemIds.asReadonly();\n\tpublic readonly state = computed(() => (this._openItemIds().length > 0 ? 'open' : 'closed'));\n\n\tprivate readonly _triggers = signal<BrnAccordionTrigger[]>([]);\n\n\t/**\n\t * Whether the accordion is in single or multiple mode.\n\t * @default 'single'\n\t */\n\tpublic readonly type = input<'single' | 'multiple'>('single');\n\n\t/**\n\t * The orientation of the accordion, either 'horizontal' or 'vertical'.\n\t * @default 'vertical'\n\t */\n\tpublic readonly orientation = input<'horizontal' | 'vertical'>('vertical');\n\n\t/** internal **/\n\tprotected readonly _direction = this._dir.valueSignal;\n\n\tpublic ngAfterContentInit() {\n\t\tthis._el.nativeElement.addEventListener('keydown', (event: KeyboardEvent) => {\n\t\t\tif (this.shouldIgnoreEvent(event)) return;\n\t\t\tthis._keyManager()?.onKeydown(event);\n\t\t\tthis.preventDefaultEvents(event);\n\t\t});\n\t\tthis._focusMonitor.monitor(this._el, true).subscribe((origin) => {\n\t\t\tthis._focused = origin !== null;\n\t\t});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._focusMonitor.stopMonitoring(this._el);\n\t}\n\n\tpublic registerTrigger(trigger: BrnAccordionTrigger) {\n\t\tthis._triggers.update((triggers) => [...triggers, trigger]);\n\t}\n\n\tpublic unregisterTrigger(trigger: BrnAccordionTrigger) {\n\t\tthis._triggers.update((triggers) => triggers.filter((t) => t !== trigger));\n\t}\n\n\tpublic setActiveItem(item: BrnAccordionTrigger) {\n\t\tthis._keyManager()?.setActiveItem(item);\n\t}\n\n\tpublic toggleItem(id: number) {\n\t\tif (this._openItemIds().includes(id)) {\n\t\t\tthis.closeItem(id);\n\t\t\treturn;\n\t\t}\n\t\tthis.openItem(id);\n\t}\n\n\tpublic openItem(id: number) {\n\t\tif (this.type() === 'single') {\n\t\t\tthis._openItemIds.set([id]);\n\t\t\treturn;\n\t\t}\n\t\tthis._openItemIds.update((ids) => (ids.includes(id) ? ids : [...ids, id]));\n\t}\n\n\tpublic closeItem(id: number) {\n\t\tthis._openItemIds.update((ids) => ids.filter((openId) => openId !== id));\n\t}\n\n\tprivate isEditableTarget(el: EventTarget | null): boolean {\n\t\tconst node = el as HTMLElement | null;\n\t\tif (!node) return false;\n\n\t\tconst tag = node.tagName;\n\t\tif (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT') return true;\n\t\tif (node.isContentEditable) return true;\n\n\t\tconst role = node.getAttribute?.('role') ?? '';\n\t\tif (/^(textbox|searchbox|combobox|listbox|grid|tree|menu|spinbutton|slider)$/.test(role)) return true;\n\n\t\tconst editableAncestor = node.closest?.(\n\t\t\t'input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], ' +\n\t\t\t\t'[role=\"textbox\"], [role=\"searchbox\"], [role=\"combobox\"], [role=\"listbox\"], ' +\n\t\t\t\t'[role=\"grid\"], [role=\"tree\"], [role=\"menu\"], [role=\"spinbutton\"], [role=\"slider\"]',\n\t\t);\n\t\treturn !!editableAncestor;\n\t}\n\n\tprivate shouldIgnoreEvent(e: KeyboardEvent): boolean {\n\t\tif (e.defaultPrevented) return true; // another handler already acted\n\t\tif (e.ctrlKey || e.metaKey || e.altKey) return true; // let shortcuts through\n\t\treturn this.isEditableTarget(e.target); // don't steal from editable/ARIA widgets\n\t}\n\n\tprivate preventDefaultEvents(event: KeyboardEvent) {\n\t\tif (event.defaultPrevented) return;\n\t\tif (!this._focused) return;\n\t\tif (!('key' in event)) return;\n\n\t\tconst keys: readonly string[] =\n\t\t\tthis.orientation() === 'horizontal' ? HORIZONTAL_KEYS_TO_PREVENT_DEFAULT : VERTICAL_KEYS_TO_PREVENT_DEFAULT;\n\n\t\tif (keys.includes(event.key) && event.code !== 'NumpadEnter') {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tpublic openAll(): void {\n\t\tif (this.type() === 'multiple') {\n\t\t\tthis._brnAccordionItems()\n\t\t\t\t.filter((a) => !a.disabled())\n\t\t\t\t.forEach((a) => this.openItem(a.id));\n\t\t} else {\n\t\t\tconsole.warn('[BrnAccordion]: openAll is only available in multiple mode');\n\t\t}\n\t}\n\n\tpublic closeAll(): void {\n\t\tthis._brnAccordionItems()\n\t\t\t.filter((a) => !a.disabled())\n\t\t\t.forEach((a) => this.closeItem(a.id));\n\t}\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n\tDestroyRef,\n\tDirective,\n\tElementRef,\n\tNgZone,\n\tPLATFORM_ID,\n\tafterNextRender,\n\tcomputed,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { measureDimensions } from '@spartan-ng/brain/core';\nimport { injectBrnAccordionConfig, injectBrnAccordionItem } from './brn-accordion-token';\n\n@Directive({\n\tselector: 'brn-accordion-content,[brnAccordionContent]',\n\thost: {\n\t\t'[attr.data-state]': 'state?.()',\n\t\t'[attr.aria-labelledby]': 'ariaLabeledBy',\n\t\trole: 'region',\n\t\t'[id]': 'id',\n\t\t'[style.--brn-accordion-content-width.px]': '_width()',\n\t\t'[style.--brn-accordion-content-height.px]': '_height()',\n\t\t'[attr.inert]': '_inert()',\n\t\t'[attr.style]': 'style()',\n\t},\n})\nexport class BrnAccordionContent {\n\tprivate readonly _config = injectBrnAccordionConfig();\n\tprivate readonly _item = injectBrnAccordionItem();\n\tprivate readonly _elementRef = inject(ElementRef);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _ngZone = inject(NgZone);\n\tprivate readonly _platformId = inject(PLATFORM_ID);\n\n\tprotected readonly _width = signal<number | null>(null);\n\tprotected readonly _height = signal<number | null>(null);\n\tprotected readonly _inert = computed(() => (this.state?.() === 'closed' ? true : undefined));\n\n\tpublic readonly state = this._item?.state;\n\tpublic readonly id = `brn-accordion-content-${this._item?.id}`;\n\tpublic readonly ariaLabeledBy = `brn-accordion-trigger-${this._item?.id}`;\n\t/**\n\t * The style to be applied to the host element after the dimensions are calculated.\n\t * @default 'overflow: hidden'\n\t */\n\tpublic readonly style = input<string>('overflow: hidden');\n\n\tconstructor() {\n\t\tif (!this._item) {\n\t\t\tthrow Error('Accordion Content can only be used inside an AccordionItem. Add brnAccordionItem to parent.');\n\t\t}\n\t\tafterNextRender(() => {\n\t\t\tconst hasValidDimensions = this._measureAndSetDimensions();\n\t\t\tif (!hasValidDimensions) {\n\t\t\t\tthis._setupVisibilityObserver();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _measureAndSetDimensions(): boolean {\n\t\tconst content = this._elementRef.nativeElement.firstChild as HTMLElement | null;\n\t\tif (!content) return false;\n\n\t\tconst { width, height } = measureDimensions(content, this._config.measurementDisplay);\n\t\tthis._width.set(width);\n\t\tthis._height.set(height);\n\n\t\treturn width > 0 && height > 0;\n\t}\n\n\tprivate _setupVisibilityObserver(): void {\n\t\tif (!isPlatformBrowser(this._platformId)) return;\n\t\tif (typeof IntersectionObserver === 'undefined') return;\n\n\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\tif (entries[0].isIntersecting) {\n\t\t\t\t\t\tthis._ngZone.run(() => {\n\t\t\t\t\t\t\tif (this._measureAndSetDimensions()) {\n\t\t\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ root: null, threshold: 0 },\n\t\t\t);\n\n\t\t\tobserver.observe(this._elementRef.nativeElement);\n\t\t\tthis._destroyRef.onDestroy(() => observer.disconnect());\n\t\t});\n\t}\n}\n","import { Directive } from '@angular/core';\nimport { injectBrnAccordion } from './brn-accordion-token';\n\n@Directive({\n\tselector: '[brnAccordionHeader]',\n\thost: {\n\t\t'[attr.data-orientation]': '_orientation()',\n\t},\n})\nexport class BrnAccordionHeader {\n\tprivate readonly _accordion = injectBrnAccordion();\n\n\tprotected readonly _orientation = this._accordion.orientation;\n}\n","import type { FocusableOption } from '@angular/cdk/a11y';\nimport { computed, DestroyRef, Directive, ElementRef, inject, isDevMode, untracked } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent } from 'rxjs';\nimport { injectBrnAccordion, injectBrnAccordionItem } from './brn-accordion-token';\n\n@Directive({\n\tselector: 'button[brnAccordionTrigger]',\n\thost: {\n\t\t'[id]': 'id',\n\t\ttype: 'button',\n\t\ttabindex: '0',\n\t\t'[attr.data-orientation]': '_orientation()',\n\t\t'[attr.data-state]': '_state()',\n\t\t'[attr.aria-expanded]': '_isExpanded()',\n\t\t'[attr.aria-controls]': 'ariaControls',\n\t\t'[attr.aria-disabled]': '_disabled()',\n\t\t'[disabled]': '_disabled()',\n\t\t'(click)': 'toggle($event)',\n\t\t'(keyup.space)': 'toggle($event)',\n\t\t'(keyup.enter)': 'toggle($event)',\n\t},\n})\nexport class BrnAccordionTrigger implements FocusableOption {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _accordion = injectBrnAccordion();\n\tprivate readonly _item = injectBrnAccordionItem();\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\n\tprotected readonly _orientation = this._accordion.orientation;\n\tprotected readonly _state = this._item.state;\n\tprotected readonly _isExpanded = computed(() => this._item.state() === 'open');\n\tprotected readonly _disabled = this._item.disabled;\n\tpublic readonly id = `brn-accordion-trigger-${this._item.id}`;\n\tpublic readonly ariaControls = `brn-accordion-content-${this._item.id}`;\n\n\tpublic get disabled() {\n\t\treturn this._disabled();\n\t}\n\n\tconstructor() {\n\t\tif (!this._accordion) throw Error('Accordion trigger requires a parent Accordion.');\n\t\tif (!this._item) throw Error('Accordion trigger requires a parent AccordionItem.');\n\n\t\tthis._accordion.registerTrigger(this);\n\n\t\tthis._destroyRef.onDestroy(() => this._accordion.unregisterTrigger(this));\n\n\t\tthis.validateAriaStructure();\n\n\t\tfromEvent(this._el.nativeElement, 'focus')\n\t\t\t.pipe(takeUntilDestroyed())\n\t\t\t.subscribe(() => {\n\t\t\t\t// Focus can land here mid-render, and setActiveItem writes the key manager's signals.\n\t\t\t\t// untracked keeps that from throwing NG0600 (those signals aren't read by any view). #1371\n\t\t\t\tuntracked(() => this._accordion.setActiveItem(this));\n\t\t\t});\n\t}\n\n\tprotected toggle(event: Event): void {\n\t\tevent.preventDefault();\n\t\tthis._accordion.toggleItem(this._item.id);\n\t}\n\n\tpublic focus() {\n\t\tthis._el.nativeElement.focus();\n\t}\n\n\tprivate validateAriaStructure(): void {\n\t\tconst element = this._el.nativeElement;\n\n\t\tconst isButton = element.tagName === 'BUTTON';\n\t\tconst hasButtonRole = element.getAttribute('role') === 'button';\n\n\t\tif (!isButton && !hasButtonRole) {\n\t\t\tthrow Error(\n\t\t\t\t`BrnAccordionTrigger: The trigger element must be a <button> or have role=\"button\". ` +\n\t\t\t\t\t`Found: <${element.tagName.toLowerCase()}>`,\n\t\t\t);\n\t\t}\n\n\t\tconst parent = element.parentElement;\n\t\tif (!parent) {\n\t\t\tconst message = 'BrnAccordionTrigger: The trigger button must be wrapped in a heading element.';\n\t\t\tif (isDevMode()) {\n\t\t\t\tthrow Error(message);\n\t\t\t} else {\n\t\t\t\tconsole.warn(message);\n\t\t\t}\n\t\t}\n\n\t\tconst isNativeHeading = /^H[1-6]$/.test(parent.tagName);\n\t\tconst hasHeadingRole = parent.getAttribute('role') === 'heading';\n\n\t\tif (!isNativeHeading && !hasHeadingRole) {\n\t\t\tthrow Error(\n\t\t\t\t`BrnAccordionTrigger: The trigger button must be wrapped in a heading element ` +\n\t\t\t\t\t`(h1-h6) or an element with role=\"heading\". Found parent: <${parent.tagName.toLowerCase()}>`,\n\t\t\t);\n\t\t}\n\n\t\tif (hasHeadingRole && !parent.hasAttribute('aria-level')) {\n\t\t\tthrow Error('BrnAccordionTrigger: Elements with role=\"heading\" must have an aria-level attribute.');\n\t\t}\n\t}\n}\n","import { BrnAccordion } from './lib/brn-accordion';\nimport { BrnAccordionContent } from './lib/brn-accordion-content';\nimport { BrnAccordionHeader } from './lib/brn-accordion-header';\nimport { BrnAccordionItem } from './lib/brn-accordion-item';\nimport { BrnAccordionTrigger } from './lib/brn-accordion-trigger';\n\nexport * from './lib/brn-accordion';\nexport * from './lib/brn-accordion-content';\nexport * from './lib/brn-accordion-header';\nexport * from './lib/brn-accordion-item';\nexport * from './lib/brn-accordion-token';\nexport * from './lib/brn-accordion-trigger';\n\nexport const BrnAccordionImports = [\n\tBrnAccordion,\n\tBrnAccordionContent,\n\tBrnAccordionHeader,\n\tBrnAccordionItem,\n\tBrnAccordionTrigger,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAKa,iBAAiB,GAAG,IAAI,cAAc,CAAe,mBAAmB;SAErE,kBAAkB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,iBAAiB,CAAC;AACjC;AAEM,S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A,MAAM,EAAE,IAAI;AACZ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,QAAQ,EAAE,GAAG;AACb,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,sBAAsB,EAAE,eAAe;AACvC,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,aAAa;AACrC,wBAAA,YAAY,EAAE,aAAa;AAC3B,wBAAA,SAAS,EAAE,gBAAgB;AAC3B,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,eAAe,EAAE,gBAAgB;AACjC,qBAAA;AACD,iBAAA;;;ACTM,MAAM,mBAAmB,GAAG;IAClC,YAAY;IACZ,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;;;AClBpB;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-accordion.mjs","sources":["../../../../libs/brain/accordion/src/lib/brn-accordion-token.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-item.ts","../../../../libs/brain/accordion/src/lib/brn-accordion.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-content.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-header.ts","../../../../libs/brain/accordion/src/lib/brn-accordion-trigger.ts","../../../../libs/brain/accordion/src/index.ts","../../../../libs/brain/accordion/src/spartan-ng-brain-accordion.ts"],"sourcesContent":["import { type ExistingProvider, inject, InjectionToken, type Type, type ValueProvider } from '@angular/core';\nimport type { MeasurementDisplay } from '@spartan-ng/brain/core';\nimport type { BrnAccordion } from './brn-accordion';\nimport type { BrnAccordionItem } from './brn-accordion-item';\n\nexport const BrnAccordionToken = new InjectionToken<BrnAccordion>('BrnAccordionToken');\n\nexport function injectBrnAccordion() {\n\treturn inject(BrnAccordionToken);\n}\n\nexport function provideBrnAccordion(accordion: Type<BrnAccordion>): ExistingProvider {\n\treturn { provide: BrnAccordionToken, useExisting: accordion };\n}\n\nexport const BrnAccordionItemToken = new InjectionToken<BrnAccordionItem>('BrnAccordionItemToken');\n\nexport function injectBrnAccordionItem() {\n\treturn inject(BrnAccordionItemToken);\n}\n\nexport function provideBrnAccordionItem(item: Type<BrnAccordionItem>): ExistingProvider {\n\treturn { provide: BrnAccordionItemToken, useExisting: item };\n}\n\nexport interface BrBrnAccordionConfig {\n\t/**\n\t * The display style to use when measuring element dimensions.\n\t * @default 'block'\n\t */\n\tmeasurementDisplay: MeasurementDisplay;\n}\n\nconst defaultConfig: BrBrnAccordionConfig = {\n\tmeasurementDisplay: 'block',\n};\n\nconst BrnAccordionConfigToken = new InjectionToken<BrBrnAccordionConfig>('BrnBrnAccordionConfig');\n\nexport function provideBrnAccordionConfig(config: Partial<BrBrnAccordionConfig>): ValueProvider {\n\treturn { provide: BrnAccordionConfigToken, useValue: { ...defaultConfig, ...config } };\n}\n\nexport function injectBrnAccordionConfig(): BrBrnAccordionConfig {\n\treturn inject(BrnAccordionConfigToken, { optional: true }) ?? defaultConfig;\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, effect, input, output, untracked } from '@angular/core';\nimport { injectBrnAccordion, provideBrnAccordionItem } from './brn-accordion-token';\n\n@Directive({\n\tselector: '[brnAccordionItem]',\n\texportAs: 'brnAccordionItem',\n\tproviders: [provideBrnAccordionItem(BrnAccordionItem)],\n\thost: {\n\t\t'[attr.data-state]': 'state()',\n\t},\n})\nexport class BrnAccordionItem {\n\tprivate static _itemIdGenerator = 0;\n\tpublic readonly id = ++BrnAccordionItem._itemIdGenerator;\n\tprivate readonly _accordion = injectBrnAccordion();\n\t/**\n\t * Whether the item is opened or closed.\n\t * @default false\n\t */\n\tpublic readonly isOpened = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether the item is disabled.\n\t * @default false\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state of the item, either 'open' or 'closed'\n\t * @default closed\n\t */\n\tpublic readonly state = computed(() => (this._accordion.openItemIds()?.includes(this.id) ? 'open' : 'closed'));\n\t/**\n\t * Emits boolean when the item is opened or closed.\n\t */\n\tpublic readonly stateChange = output<'open' | 'closed'>();\n\t/**\n\t * Emits state change when item is opened or closed\n\t */\n\tpublic readonly openedChange = output<boolean>();\n\n\tconstructor() {\n\t\tif (!this._accordion) {\n\t\t\tthrow Error('Accordion item can only be used inside an Accordion. Add brnAccordion to ancestor.');\n\t\t}\n\n\t\teffect(() => {\n\t\t\tconst isOpened = this.isOpened();\n\t\t\tuntracked(() => {\n\t\t\t\tif (isOpened) {\n\t\t\t\t\tthis._triggerOpen(false);\n\t\t\t\t} else {\n\t\t\t\t\tthis._triggerClose(false);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tpublic open(): void {\n\t\tthis._triggerOpen(true);\n\t}\n\n\tpublic close(): void {\n\t\tthis._triggerClose(true);\n\t}\n\n\tprivate _triggerOpen(emitEvent: boolean): void {\n\t\tif (this.disabled() || this.state() === 'open') return;\n\t\tthis._accordion.openItem(this.id);\n\t\tif (emitEvent) {\n\t\t\tthis.stateChange.emit('open');\n\t\t\tthis.openedChange.emit(true);\n\t\t}\n\t}\n\n\tprivate _triggerClose(emitEvent: boolean): void {\n\t\tif (this.disabled() || this.state() !== 'open') return;\n\t\tthis._accordion.closeItem(this.id);\n\t\tif (emitEvent) {\n\t\t\tthis.stateChange.emit('closed');\n\t\t\tthis.openedChange.emit(false);\n\t\t}\n\t}\n}\n","import { FocusKeyManager, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport {\n\ttype AfterContentInit,\n\tcomputed,\n\tcontentChildren,\n\tDirective,\n\tElementRef,\n\tinject,\n\tinput,\n\ttype OnDestroy,\n\tsignal,\n} from '@angular/core';\nimport { BrnAccordionItem } from './brn-accordion-item';\nimport { provideBrnAccordion } from './brn-accordion-token';\nimport type { BrnAccordionTrigger } from './brn-accordion-trigger';\n\nconst HORIZONTAL_KEYS_TO_PREVENT_DEFAULT = [\n\t'ArrowLeft',\n\t'ArrowRight',\n\t'PageDown',\n\t'PageUp',\n\t'Home',\n\t'End',\n\t' ',\n\t'Enter',\n] as const;\n\nconst VERTICAL_KEYS_TO_PREVENT_DEFAULT = [\n\t'ArrowUp',\n\t'ArrowDown',\n\t'PageDown',\n\t'PageUp',\n\t'Home',\n\t'End',\n\t' ',\n\t'Enter',\n] as const;\n\n@Directive({\n\tselector: '[brnAccordion]',\n\texportAs: 'brnAccordion',\n\tproviders: [provideBrnAccordion(BrnAccordion)],\n\thost: {\n\t\t'[attr.dir]': '_direction()',\n\t\t'[attr.data-state]': 'state()',\n\t\t'[attr.data-orientation]': 'orientation()',\n\t},\n})\nexport class BrnAccordion implements AfterContentInit, OnDestroy {\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\tprivate readonly _dir = inject(Directionality);\n\tprivate readonly _brnAccordionItems = contentChildren(BrnAccordionItem);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _keyManager = computed(() =>\n\t\tnew FocusKeyManager<BrnAccordionTrigger>(this._triggers())\n\t\t\t.withHomeAndEnd()\n\t\t\t.withPageUpDown()\n\t\t\t.withWrap()\n\t\t\t.withHorizontalOrientation(this.orientation() === 'vertical' ? null : (this._direction() ?? 'ltr'))\n\t\t\t.withVerticalOrientation(this.orientation() === 'vertical')\n\t\t\t.skipPredicate((item) => item.disabled),\n\t);\n\n\t// Not a signal: FocusMonitor can fire mid-render (a disabled child blurs during change\n\t// detection) and a signal write there throws NG0600. Only read imperatively in keydown. #1371\n\tprivate _focused = false;\n\tprivate readonly _openItemIds = signal<number[]>([]);\n\tpublic readonly openItemIds = this._openItemIds.asReadonly();\n\tpublic readonly state = computed(() => (this._openItemIds().length > 0 ? 'open' : 'closed'));\n\n\tprivate readonly _triggers = signal<BrnAccordionTrigger[]>([]);\n\n\t/**\n\t * Whether the accordion is in single or multiple mode.\n\t * @default 'single'\n\t */\n\tpublic readonly type = input<'single' | 'multiple'>('single');\n\n\t/**\n\t * The orientation of the accordion, either 'horizontal' or 'vertical'.\n\t * @default 'vertical'\n\t */\n\tpublic readonly orientation = input<'horizontal' | 'vertical'>('vertical');\n\n\t/** internal **/\n\tprotected readonly _direction = this._dir.valueSignal;\n\n\tpublic ngAfterContentInit() {\n\t\tthis._el.nativeElement.addEventListener('keydown', (event: KeyboardEvent) => {\n\t\t\tif (this.shouldIgnoreEvent(event)) return;\n\t\t\tthis._keyManager()?.onKeydown(event);\n\t\t\tthis.preventDefaultEvents(event);\n\t\t});\n\t\tthis._focusMonitor.monitor(this._el, true).subscribe((origin) => {\n\t\t\tthis._focused = origin !== null;\n\t\t});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._focusMonitor.stopMonitoring(this._el);\n\t}\n\n\tpublic registerTrigger(trigger: BrnAccordionTrigger) {\n\t\tthis._triggers.update((triggers) => [...triggers, trigger]);\n\t}\n\n\tpublic unregisterTrigger(trigger: BrnAccordionTrigger) {\n\t\tthis._triggers.update((triggers) => triggers.filter((t) => t !== trigger));\n\t}\n\n\tpublic setActiveItem(item: BrnAccordionTrigger) {\n\t\tthis._keyManager()?.setActiveItem(item);\n\t}\n\n\tpublic openItem(id: number) {\n\t\tif (this.type() === 'single') {\n\t\t\tthis._openItemIds.set([id]);\n\t\t\treturn;\n\t\t}\n\t\tthis._openItemIds.update((ids) => (ids.includes(id) ? ids : [...ids, id]));\n\t}\n\n\tpublic closeItem(id: number) {\n\t\tthis._openItemIds.update((ids) => ids.filter((openId) => openId !== id));\n\t}\n\n\tprivate isEditableTarget(el: EventTarget | null): boolean {\n\t\tconst node = el as HTMLElement | null;\n\t\tif (!node) return false;\n\n\t\tconst tag = node.tagName;\n\t\tif (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT') return true;\n\t\tif (node.isContentEditable) return true;\n\n\t\tconst role = node.getAttribute?.('role') ?? '';\n\t\tif (/^(textbox|searchbox|combobox|listbox|grid|tree|menu|spinbutton|slider)$/.test(role)) return true;\n\n\t\tconst editableAncestor = node.closest?.(\n\t\t\t'input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"], ' +\n\t\t\t\t'[role=\"textbox\"], [role=\"searchbox\"], [role=\"combobox\"], [role=\"listbox\"], ' +\n\t\t\t\t'[role=\"grid\"], [role=\"tree\"], [role=\"menu\"], [role=\"spinbutton\"], [role=\"slider\"]',\n\t\t);\n\t\treturn !!editableAncestor;\n\t}\n\n\tprivate shouldIgnoreEvent(e: KeyboardEvent): boolean {\n\t\tif (e.defaultPrevented) return true; // another handler already acted\n\t\tif (e.ctrlKey || e.metaKey || e.altKey) return true; // let shortcuts through\n\t\treturn this.isEditableTarget(e.target); // don't steal from editable/ARIA widgets\n\t}\n\n\tprivate preventDefaultEvents(event: KeyboardEvent) {\n\t\tif (event.defaultPrevented) return;\n\t\tif (!this._focused) return;\n\t\tif (!('key' in event)) return;\n\n\t\tconst keys: readonly string[] =\n\t\t\tthis.orientation() === 'horizontal' ? HORIZONTAL_KEYS_TO_PREVENT_DEFAULT : VERTICAL_KEYS_TO_PREVENT_DEFAULT;\n\n\t\tif (keys.includes(event.key) && event.code !== 'NumpadEnter') {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n\n\tpublic openAll(): void {\n\t\tif (this.type() === 'multiple') {\n\t\t\tthis._brnAccordionItems().forEach((a) => a.open());\n\t\t} else {\n\t\t\tconsole.warn('[BrnAccordion]: openAll is only available in multiple mode');\n\t\t}\n\t}\n\n\tpublic closeAll(): void {\n\t\tthis._brnAccordionItems().forEach((a) => a.close());\n\t}\n}\n","import { isPlatformBrowser } from '@angular/common';\nimport {\n\tDestroyRef,\n\tDirective,\n\tElementRef,\n\tNgZone,\n\tPLATFORM_ID,\n\tafterNextRender,\n\tcomputed,\n\tinject,\n\tinput,\n\tsignal,\n} from '@angular/core';\nimport { measureDimensions } from '@spartan-ng/brain/core';\nimport { injectBrnAccordionConfig, injectBrnAccordionItem } from './brn-accordion-token';\n\n@Directive({\n\tselector: 'brn-accordion-content,[brnAccordionContent]',\n\thost: {\n\t\t'[attr.data-state]': 'state?.()',\n\t\t'[attr.aria-labelledby]': 'ariaLabeledBy',\n\t\trole: 'region',\n\t\t'[id]': 'id',\n\t\t'[style.--brn-accordion-content-width.px]': '_width()',\n\t\t'[style.--brn-accordion-content-height.px]': '_height()',\n\t\t'[attr.inert]': '_inert()',\n\t\t'[attr.style]': 'style()',\n\t},\n})\nexport class BrnAccordionContent {\n\tprivate readonly _config = injectBrnAccordionConfig();\n\tprivate readonly _item = injectBrnAccordionItem();\n\tprivate readonly _elementRef = inject(ElementRef);\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _ngZone = inject(NgZone);\n\tprivate readonly _platformId = inject(PLATFORM_ID);\n\n\tprotected readonly _width = signal<number | null>(null);\n\tprotected readonly _height = signal<number | null>(null);\n\tprotected readonly _inert = computed(() => (this.state?.() === 'closed' ? true : undefined));\n\n\tpublic readonly state = this._item?.state;\n\tpublic readonly id = `brn-accordion-content-${this._item?.id}`;\n\tpublic readonly ariaLabeledBy = `brn-accordion-trigger-${this._item?.id}`;\n\t/**\n\t * The style to be applied to the host element after the dimensions are calculated.\n\t * @default 'overflow: hidden'\n\t */\n\tpublic readonly style = input<string>('overflow: hidden');\n\n\tconstructor() {\n\t\tif (!this._item) {\n\t\t\tthrow Error('Accordion Content can only be used inside an AccordionItem. Add brnAccordionItem to parent.');\n\t\t}\n\t\tafterNextRender(() => {\n\t\t\tconst hasValidDimensions = this._measureAndSetDimensions();\n\t\t\tif (!hasValidDimensions) {\n\t\t\t\tthis._setupVisibilityObserver();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _measureAndSetDimensions(): boolean {\n\t\tconst content = this._elementRef.nativeElement.firstChild as HTMLElement | null;\n\t\tif (!content) return false;\n\n\t\tconst { width, height } = measureDimensions(content, this._config.measurementDisplay);\n\t\tthis._width.set(width);\n\t\tthis._height.set(height);\n\n\t\treturn width > 0 && height > 0;\n\t}\n\n\tprivate _setupVisibilityObserver(): void {\n\t\tif (!isPlatformBrowser(this._platformId)) return;\n\t\tif (typeof IntersectionObserver === 'undefined') return;\n\n\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\tconst observer = new IntersectionObserver(\n\t\t\t\t(entries) => {\n\t\t\t\t\tif (entries[0].isIntersecting) {\n\t\t\t\t\t\tthis._ngZone.run(() => {\n\t\t\t\t\t\t\tif (this._measureAndSetDimensions()) {\n\t\t\t\t\t\t\t\tobserver.disconnect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ root: null, threshold: 0 },\n\t\t\t);\n\n\t\t\tobserver.observe(this._elementRef.nativeElement);\n\t\t\tthis._destroyRef.onDestroy(() => observer.disconnect());\n\t\t});\n\t}\n}\n","import { Directive } from '@angular/core';\nimport { injectBrnAccordion } from './brn-accordion-token';\n\n@Directive({\n\tselector: '[brnAccordionHeader]',\n\thost: {\n\t\t'[attr.data-orientation]': '_orientation()',\n\t},\n})\nexport class BrnAccordionHeader {\n\tprivate readonly _accordion = injectBrnAccordion();\n\n\tprotected readonly _orientation = this._accordion.orientation;\n}\n","import type { FocusableOption } from '@angular/cdk/a11y';\nimport { computed, DestroyRef, Directive, ElementRef, inject, isDevMode, untracked } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { fromEvent } from 'rxjs';\nimport { injectBrnAccordion, injectBrnAccordionItem } from './brn-accordion-token';\n\n@Directive({\n\tselector: 'button[brnAccordionTrigger]',\n\thost: {\n\t\t'[id]': 'id',\n\t\ttype: 'button',\n\t\ttabindex: '0',\n\t\t'[attr.data-orientation]': '_orientation()',\n\t\t'[attr.data-state]': '_state()',\n\t\t'[attr.aria-expanded]': '_isExpanded()',\n\t\t'[attr.aria-controls]': 'ariaControls',\n\t\t'[attr.aria-disabled]': '_disabled()',\n\t\t'[disabled]': '_disabled()',\n\t\t'(click)': 'toggle($event)',\n\t\t'(keyup.space)': 'toggle($event)',\n\t\t'(keyup.enter)': 'toggle($event)',\n\t},\n})\nexport class BrnAccordionTrigger implements FocusableOption {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _accordion = injectBrnAccordion();\n\tprivate readonly _item = injectBrnAccordionItem();\n\tprivate readonly _el = inject(ElementRef<HTMLElement>);\n\n\tprotected readonly _orientation = this._accordion.orientation;\n\tprotected readonly _state = this._item.state;\n\tprotected readonly _isExpanded = computed(() => this._item.state() === 'open');\n\tprotected readonly _disabled = this._item.disabled;\n\tpublic readonly id = `brn-accordion-trigger-${this._item.id}`;\n\tpublic readonly ariaControls = `brn-accordion-content-${this._item.id}`;\n\n\tpublic get disabled() {\n\t\treturn this._disabled();\n\t}\n\n\tconstructor() {\n\t\tif (!this._accordion) throw Error('Accordion trigger requires a parent Accordion.');\n\t\tif (!this._item) throw Error('Accordion trigger requires a parent AccordionItem.');\n\n\t\tthis._accordion.registerTrigger(this);\n\n\t\tthis._destroyRef.onDestroy(() => this._accordion.unregisterTrigger(this));\n\n\t\tthis.validateAriaStructure();\n\n\t\tfromEvent(this._el.nativeElement, 'focus')\n\t\t\t.pipe(takeUntilDestroyed())\n\t\t\t.subscribe(() => {\n\t\t\t\t// Focus can land here mid-render, and setActiveItem writes the key manager's signals.\n\t\t\t\t// untracked keeps that from throwing NG0600 (those signals aren't read by any view). #1371\n\t\t\t\tuntracked(() => this._accordion.setActiveItem(this));\n\t\t\t});\n\t}\n\n\tprotected toggle(event: Event): void {\n\t\tevent.preventDefault();\n\t\tif (this._state() === 'open') {\n\t\t\tthis._item.close();\n\t\t} else {\n\t\t\tthis._item.open();\n\t\t}\n\t}\n\n\tpublic focus() {\n\t\tthis._el.nativeElement.focus();\n\t}\n\n\tprivate validateAriaStructure(): void {\n\t\tconst element = this._el.nativeElement;\n\n\t\tconst isButton = element.tagName === 'BUTTON';\n\t\tconst hasButtonRole = element.getAttribute('role') === 'button';\n\n\t\tif (!isButton && !hasButtonRole) {\n\t\t\tthrow Error(\n\t\t\t\t`BrnAccordionTrigger: The trigger element must be a <button> or have role=\"button\". ` +\n\t\t\t\t\t`Found: <${element.tagName.toLowerCase()}>`,\n\t\t\t);\n\t\t}\n\n\t\tconst parent = element.parentElement;\n\t\tif (!parent) {\n\t\t\tconst message = 'BrnAccordionTrigger: The trigger button must be wrapped in a heading element.';\n\t\t\tif (isDevMode()) {\n\t\t\t\tthrow Error(message);\n\t\t\t} else {\n\t\t\t\tconsole.warn(message);\n\t\t\t}\n\t\t}\n\n\t\tconst isNativeHeading = /^H[1-6]$/.test(parent.tagName);\n\t\tconst hasHeadingRole = parent.getAttribute('role') === 'heading';\n\n\t\tif (!isNativeHeading && !hasHeadingRole) {\n\t\t\tthrow Error(\n\t\t\t\t`BrnAccordionTrigger: The trigger button must be wrapped in a heading element ` +\n\t\t\t\t\t`(h1-h6) or an element with role=\"heading\". Found parent: <${parent.tagName.toLowerCase()}>`,\n\t\t\t);\n\t\t}\n\n\t\tif (hasHeadingRole && !parent.hasAttribute('aria-level')) {\n\t\t\tthrow Error('BrnAccordionTrigger: Elements with role=\"heading\" must have an aria-level attribute.');\n\t\t}\n\t}\n}\n","import { BrnAccordion } from './lib/brn-accordion';\nimport { BrnAccordionContent } from './lib/brn-accordion-content';\nimport { BrnAccordionHeader } from './lib/brn-accordion-header';\nimport { BrnAccordionItem } from './lib/brn-accordion-item';\nimport { BrnAccordionTrigger } from './lib/brn-accordion-trigger';\n\nexport * from './lib/brn-accordion';\nexport * from './lib/brn-accordion-content';\nexport * from './lib/brn-accordion-header';\nexport * from './lib/brn-accordion-item';\nexport * from './lib/brn-accordion-token';\nexport * from './lib/brn-accordion-trigger';\n\nexport const BrnAccordionImports = [\n\tBrnAccordion,\n\tBrnAccordionContent,\n\tBrnAccordionHeader,\n\tBrnAccordionItem,\n\tBrnAccordionTrigger,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';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;kBAjB/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,IAAI,EAAE;AACL,wBAAA,MAAM,EAAE,IAAI;AACZ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,QAAQ,EAAE,GAAG;AACb,wBAAA,yBAAyB,EAAE,gBAAgB;AAC3C,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,sBAAsB,EAAE,eAAe;AACvC,wBAAA,sBAAsB,EAAE,cAAc;AACtC,wBAAA,sBAAsB,EAAE,aAAa;AACrC,wBAAA,YAAY,EAAE,aAAa;AAC3B,wBAAA,SAAS,EAAE,gBAAgB;AAC3B,wBAAA,eAAe,EAAE,gBAAgB;AACjC,wBAAA,eAAe,EAAE,gBAAgB;AACjC,qBAAA;AACD,iBAAA;;;ACTM,MAAM,mBAAmB,GAAG;IAClC,YAAY;IACZ,mBAAmB;IACnB,kBAAkB;IAClB,gBAAgB;IAChB,mBAAmB;;;AClBpB;;AAEG;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { FocusMonitor } from '@angular/cdk/a11y';
2
2
  import { isPlatformBrowser } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { forwardRef, inject, DestroyRef, Renderer2, ElementRef, ChangeDetectorRef, DOCUMENT, PLATFORM_ID, signal, model, output, computed, input, linkedSignal, booleanAttribute, viewChild, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
4
+ import { forwardRef, inject, DestroyRef, Renderer2, ElementRef, ChangeDetectorRef, DOCUMENT, PLATFORM_ID, signal, input, booleanAttribute, linkedSignal, output, model, computed, viewChild, afterRenderEffect, ChangeDetectionStrategy, Component } from '@angular/core';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
7
7
  import * as i1 from '@spartan-ng/brain/field';
@@ -29,7 +29,8 @@ class BrnCheckbox {
29
29
  * The checked state of the checkbox.
30
30
  * Can be bound with [(checked)] for two-way binding.
31
31
  */
32
- checked = model(false, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
32
+ checkedInput = input(false, { ...(ngDevMode ? { debugName: "checkedInput" } : /* istanbul ignore next */ {}), alias: 'checked', transform: booleanAttribute });
33
+ checked = linkedSignal(this.checkedInput, ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
33
34
  /** Emits when checked state changes. */
34
35
  checkedChange = output();
35
36
  /**
@@ -252,7 +253,7 @@ class BrnCheckbox {
252
253
  this._cdr.markForCheck();
253
254
  }
254
255
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
255
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnCheckbox, isStandalone: true, selector: "brn-checkbox", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, forceInvalid: { classPropertyName: "forceInvalid", publicName: "forceInvalid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", checkedChange: "checkedChange", indeterminate: "indeterminateChange", touched: "touched" }, host: { properties: { "style": "{display: \"contents\"}", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.aria-invalid": "_invalid?.() ? \"true\" : null", "attr.data-invalid": "_invalid?.() ? \"true\" : null", "attr.data-matches-spartan-invalid": "spartanInvalid?.() ? \"true\" : null", "attr.data-touched": "_controlTouched?.() ? \"true\" : null", "attr.data-dirty": "_dirty?.() ? \"true\" : null", "attr.data-state": "_dataState()", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkBox"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0, template: `
256
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnCheckbox, isStandalone: true, selector: "brn-checkbox", inputs: { checkedInput: { classPropertyName: "checkedInput", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, forceInvalid: { classPropertyName: "forceInvalid", publicName: "forceInvalid", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checkedChange: "checkedChange", indeterminate: "indeterminateChange", touched: "touched" }, host: { properties: { "style": "{display: \"contents\"}", "attr.id": "_state().id", "attr.name": "_state().name", "attr.aria-labelledby": "null", "attr.aria-label": "null", "attr.aria-describedby": "null", "attr.aria-invalid": "_invalid?.() ? \"true\" : null", "attr.data-invalid": "_invalid?.() ? \"true\" : null", "attr.data-matches-spartan-invalid": "spartanInvalid?.() ? \"true\" : null", "attr.data-touched": "_controlTouched?.() ? \"true\" : null", "attr.data-dirty": "_dirty?.() ? \"true\" : null", "attr.data-state": "_dataState()", "attr.data-focus-visible": "_focusVisible()", "attr.data-focus": "_focused()", "attr.data-disabled": "_state().disabled()" } }, providers: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)], viewQueries: [{ propertyName: "checkbox", first: true, predicate: ["checkBox"], descendants: true, isSignal: true }], hostDirectives: [{ directive: i1.BrnFieldControl }], ngImport: i0, template: `
256
257
  <button
257
258
  #checkBox
258
259
  role="checkbox"
@@ -324,7 +325,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
324
325
  </button>
325
326
  `,
326
327
  }]
327
- }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], forceInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceInvalid", required: false }] }], checkbox: [{ type: i0.ViewChild, args: ['checkBox', { isSignal: true }] }], touched: [{ type: i0.Output, args: ["touched"] }] } });
328
+ }], ctorParameters: () => [], propDecorators: { checkedInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }], checkedChange: [{ type: i0.Output, args: ["checkedChange"] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], forceInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "forceInvalid", required: false }] }], checkbox: [{ type: i0.ViewChild, args: ['checkBox', { isSignal: true }] }], touched: [{ type: i0.Output, args: ["touched"] }] } });
328
329
 
329
330
  const BrnCheckboxImports = [BrnCheckbox];
330
331
 
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-checkbox.mjs","sources":["../../../../libs/brain/checkbox/src/lib/brn-checkbox.ts","../../../../libs/brain/checkbox/src/index.ts","../../../../libs/brain/checkbox/src/spartan-ng-brain-checkbox.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tafterRenderEffect,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\tDOCUMENT,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';\nimport { type ChangeFn, type TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_CHECKBOX_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnCheckbox),\n\tmulti: true,\n};\n\nlet uniqueIdCounter = 0;\n\nconst CONTAINER_POST_FIX = '-checkbox';\n\n@Component({\n\tselector: 'brn-checkbox',\n\tproviders: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.aria-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': 'spartanInvalid?.() ? \"true\" : null',\n\t\t'[attr.data-touched]': '_controlTouched?.() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty?.() ? \"true\" : null',\n\t\t'[attr.data-state]': '_dataState()',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#checkBox\n\t\t\trole=\"checkbox\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.id]=\"_buttonId()\"\n\t\t\t[attr.name]=\"_buttonName()\"\n\t\t\t[class]=\"class()\"\n\t\t\t[attr.aria-checked]=\"_ariaChecked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"_dataState()\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"_state().disabled() ? -1 : 0\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</button>\n\t`,\n})\nexport class BrnCheckbox implements ControlValueAccessor, AfterContentInit, OnDestroy {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _fieldControl = inject(BrnFieldControl, { optional: true });\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * The checked state of the checkbox.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<boolean>(false);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Read-only signal of current checkbox state.\n\t * Use this when you only need to read state without changing it.\n\t */\n\tpublic readonly isChecked = this.checked.asReadonly();\n\n\t/*\n\t * The indeterminate state of the checkbox.\n\t * For example, a \"select all/deselect all\" checkbox may be in the indeterminate state when some but not all of its sub-controls are checked.\n\t */\n\tpublic readonly indeterminate = model<boolean>(false);\n\n\t/**\n\t * Computed data-state attribute value based on checked state.\n\t * Returns 'checked', 'unchecked', or 'indeterminate'.\n\t */\n\tprotected readonly _dataState = computed(() => {\n\t\tif (this.indeterminate()) return 'indeterminate';\n\t\treturn this.checked() ? 'checked' : 'unchecked';\n\t});\n\n\t/**\n\t * Computed aria-checked attribute value for accessibility.\n\t * Returns 'true', 'false', or 'mixed' (for indeterminate).\n\t */\n\tprotected readonly _ariaChecked = computed(() => {\n\t\tif (this.indeterminate()) return 'mixed';\n\t\treturn this.checked() ? 'true' : 'false';\n\t});\n\n\t/**\n\t * Unique identifier for checkbox component.\n\t * When provided, inner button gets ID without '-checkbox' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for checkbox.\n\t * When provided, inner button gets name without '-checkbox' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this checkbox for accessibility.\n\t * Auto-set when checkbox is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this checkbox for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether checkbox is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether checkbox is disabled.\n\t * Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether to force the field into an invalid state, regardless of the form control's state.\n\t * Overrides both the `data-invalid` and `data-matches-spartan-invalid` attributes.\n\t */\n\tpublic readonly forceInvalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state for checkbox container and accessibility.\n\t * Manages ID, name, and disabled state.\n\t */\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tprotected readonly _buttonId = computed(() => this._getCheckboxButtonId(this._state().id));\n\n\tprotected readonly _buttonName = computed(() => this._getCheckboxButtonId(this._state().name));\n\n\tpublic readonly labelableId = this._buttonId;\n\n\tprotected readonly _dirty = this._fieldControl?.dirty;\n\tprotected readonly _invalid = computed(() => this.forceInvalid() || (this._fieldControl?.invalid?.() ?? null));\n\tpublic readonly spartanInvalid = computed(\n\t\t() => this.forceInvalid() || (this._fieldControl?.spartanInvalid?.() ?? null),\n\t);\n\tprotected readonly _controlTouched = this._fieldControl?.touched;\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\t/**\n\t * Reference to the checkbox button element in the template.\n\t */\n\tpublic readonly checkbox = viewChild.required<ElementRef<HTMLButtonElement>>('checkBox');\n\n\t/**\n\t * Event emitted when checkbox is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst checkboxButtonId = this._getCheckboxButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${checkboxButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles checkbox between checked/unchecked states.\n\t * If checkbox is indeterminate, sets to checked.\n\t * Does nothing if checkbox is disabled.\n\t */\n\ttoggle() {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tconst newChecked = this.indeterminate() ? true : !this.checked();\n\t\tthis.indeterminate.set(false);\n\t\tthis.checkedChange.emit(newChecked);\n\t\tthis.checked.set(newChecked);\n\t\tthis._onChange(newChecked);\n\t}\n\n\tngAfterContentInit() {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-checkbox' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected _getCheckboxButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(new RegExp(CONTAINER_POST_FIX + '$'), '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Handles boolean and 'indeterminate' values.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checkbox state (true/false/'indeterminate')\n\t */\n\twriteValue(value: boolean): void {\n\t\tthis.checked.set(value);\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tregisterOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether checkbox should be disabled\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { BrnCheckbox } from './lib/brn-checkbox';\n\nexport * from './lib/brn-checkbox';\n\nexport const BrnCheckboxImports = [BrnCheckbox] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA+BO,MAAM,2BAA2B,GAAG;AAC1C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,WAAW,CAAC;AAC1C,IAAA,KAAK,EAAE,IAAI;;AAGZ,IAAI,eAAe,GAAG,CAAC;AAEvB,MAAM,kBAAkB,GAAG,WAAW;MAgDzB,WAAW,CAAA;AACN,IAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAChC,IAAA,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,WAAW,GAAG,MAAM,CAA0B,UAAU,CAAC;AACzD,IAAA,aAAa,GAAG,MAAM,CAAC,YAAY,CAAC;AACpC,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAChC,aAAa,GAAG,MAAM,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,IAAI,EA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qC,EAAE,oCAAoC;AAC3E,wBAAA,qBAAqB,EAAE,qCAAqC;AAC5D,wBAAA,mBAAmB,EAAE,4BAA4B;AACjD,wBAAA,mBAAmB,EAAE,cAAc;AACnC,wBAAA,2BAA2B,EAAE,iBAAiB;AAC9C,wBAAA,mBAAmB,EAAE,YAAY;AACjC,wBAAA,sBAAsB,EAAE,qBAAqB;AAC7C,qBAAA;AACD,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;AAsBT,CAAA,CAAA;AACD,iBAAA;szCA6I6E,UAAU,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,OAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AC/NjF,MAAM,kBAAkB,GAAG,CAAC,WAAW;;ACJ9C;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-checkbox.mjs","sources":["../../../../libs/brain/checkbox/src/lib/brn-checkbox.ts","../../../../libs/brain/checkbox/src/index.ts","../../../../libs/brain/checkbox/src/spartan-ng-brain-checkbox.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tafterRenderEffect,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\tDOCUMENT,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BrnFieldControl, provideBrnLabelable } from '@spartan-ng/brain/field';\nimport { type ChangeFn, type TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_CHECKBOX_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnCheckbox),\n\tmulti: true,\n};\n\nlet uniqueIdCounter = 0;\n\nconst CONTAINER_POST_FIX = '-checkbox';\n\n@Component({\n\tselector: 'brn-checkbox',\n\tproviders: [BRN_CHECKBOX_VALUE_ACCESSOR, provideBrnLabelable(BrnCheckbox)],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thostDirectives: [BrnFieldControl],\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.aria-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-invalid]': '_invalid?.() ? \"true\" : null',\n\t\t'[attr.data-matches-spartan-invalid]': 'spartanInvalid?.() ? \"true\" : null',\n\t\t'[attr.data-touched]': '_controlTouched?.() ? \"true\" : null',\n\t\t'[attr.data-dirty]': '_dirty?.() ? \"true\" : null',\n\t\t'[attr.data-state]': '_dataState()',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#checkBox\n\t\t\trole=\"checkbox\"\n\t\t\ttype=\"button\"\n\t\t\t[attr.id]=\"_buttonId()\"\n\t\t\t[attr.name]=\"_buttonName()\"\n\t\t\t[class]=\"class()\"\n\t\t\t[attr.aria-checked]=\"_ariaChecked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"_dataState()\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"_state().disabled() ? -1 : 0\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content />\n\t\t</button>\n\t`,\n})\nexport class BrnCheckbox implements ControlValueAccessor, AfterContentInit, OnDestroy {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _fieldControl = inject(BrnFieldControl, { optional: true });\n\tprivate readonly _document = inject(DOCUMENT);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * The checked state of the checkbox.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checkedInput = input<boolean, BooleanInput>(false, { alias: 'checked', transform: booleanAttribute });\n\tpublic readonly checked = linkedSignal(this.checkedInput);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Read-only signal of current checkbox state.\n\t * Use this when you only need to read state without changing it.\n\t */\n\tpublic readonly isChecked = this.checked.asReadonly();\n\n\t/*\n\t * The indeterminate state of the checkbox.\n\t * For example, a \"select all/deselect all\" checkbox may be in the indeterminate state when some but not all of its sub-controls are checked.\n\t */\n\tpublic readonly indeterminate = model<boolean>(false);\n\n\t/**\n\t * Computed data-state attribute value based on checked state.\n\t * Returns 'checked', 'unchecked', or 'indeterminate'.\n\t */\n\tprotected readonly _dataState = computed(() => {\n\t\tif (this.indeterminate()) return 'indeterminate';\n\t\treturn this.checked() ? 'checked' : 'unchecked';\n\t});\n\n\t/**\n\t * Computed aria-checked attribute value for accessibility.\n\t * Returns 'true', 'false', or 'mixed' (for indeterminate).\n\t */\n\tprotected readonly _ariaChecked = computed(() => {\n\t\tif (this.indeterminate()) return 'mixed';\n\t\treturn this.checked() ? 'true' : 'false';\n\t});\n\n\t/**\n\t * Unique identifier for checkbox component.\n\t * When provided, inner button gets ID without '-checkbox' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for checkbox.\n\t * When provided, inner button gets name without '-checkbox' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this checkbox for accessibility.\n\t * Auto-set when checkbox is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this checkbox for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether checkbox is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether checkbox is disabled.\n\t * Disabled checkboxes cannot be toggled and indicate disabled state through data-disabled attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether to force the field into an invalid state, regardless of the form control's state.\n\t * Overrides both the `data-invalid` and `data-matches-spartan-invalid` attributes.\n\t */\n\tpublic readonly forceInvalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Computed state for checkbox container and accessibility.\n\t * Manages ID, name, and disabled state.\n\t */\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tprotected readonly _buttonId = computed(() => this._getCheckboxButtonId(this._state().id));\n\n\tprotected readonly _buttonName = computed(() => this._getCheckboxButtonId(this._state().name));\n\n\tpublic readonly labelableId = this._buttonId;\n\n\tprotected readonly _dirty = this._fieldControl?.dirty;\n\tprotected readonly _invalid = computed(() => this.forceInvalid() || (this._fieldControl?.invalid?.() ?? null));\n\tpublic readonly spartanInvalid = computed(\n\t\t() => this.forceInvalid() || (this._fieldControl?.spartanInvalid?.() ?? null),\n\t);\n\tprotected readonly _controlTouched = this._fieldControl?.touched;\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\t/**\n\t * Reference to the checkbox button element in the template.\n\t */\n\tpublic readonly checkbox = viewChild.required<ElementRef<HTMLButtonElement>>('checkBox');\n\n\t/**\n\t * Event emitted when checkbox is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\tconstructor() {\n\t\tafterRenderEffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst checkboxButtonId = this._getCheckboxButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${checkboxButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles checkbox between checked/unchecked states.\n\t * If checkbox is indeterminate, sets to checked.\n\t * Does nothing if checkbox is disabled.\n\t */\n\ttoggle() {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tconst newChecked = this.indeterminate() ? true : !this.checked();\n\t\tthis.indeterminate.set(false);\n\t\tthis.checkedChange.emit(newChecked);\n\t\tthis.checked.set(newChecked);\n\t\tthis._onChange(newChecked);\n\t}\n\n\tngAfterContentInit() {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\tngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-checkbox' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected _getCheckboxButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(new RegExp(CONTAINER_POST_FIX + '$'), '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Handles boolean and 'indeterminate' values.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checkbox state (true/false/'indeterminate')\n\t */\n\twriteValue(value: boolean): void {\n\t\tthis.checked.set(value);\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tregisterOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether checkbox should be disabled\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { BrnCheckbox } from './lib/brn-checkbox';\n\nexport * from './lib/brn-checkbox';\n\nexport const BrnCheckboxImports = [BrnCheckbox] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"m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,CAAA,EAAA,EAAA,CAAA;;AChOjF,MAAM,kBAAkB,GAAG,CAAC,WAAW;;ACJ9C;;AAEG;;;;"}
@@ -1,7 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, forwardRef, signal, input, booleanAttribute, linkedSignal, numberAttribute, model, output, computed, viewChild, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import * as i1 from '@angular/forms';
4
- import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
2
+ import { InjectionToken, inject, forwardRef, signal, input, booleanAttribute, linkedSignal, numberAttribute, output, computed, viewChild, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
5
4
 
6
5
  const BrnInputOtpToken = new InjectionToken('BrnInputOtpToken');
7
6
  function injectBrnInputOtp() {
@@ -49,7 +48,8 @@ class BrnInputOtp {
49
48
  */
50
49
  transformPaste = input((text) => text, ...(ngDevMode ? [{ debugName: "transformPaste" }] : /* istanbul ignore next */ []));
51
50
  /** The value controlling the input */
52
- value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
51
+ valueInput = input(null, { ...(ngDevMode ? { debugName: "valueInput" } : /* istanbul ignore next */ {}), alias: 'value' });
52
+ value = linkedSignal(this.valueInput, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
53
53
  /** Emits when the value changes. */
54
54
  valueChange = output();
55
55
  context = computed(() => {
@@ -118,38 +118,38 @@ class BrnInputOtp {
118
118
  updateValue(newValue, maxLength) {
119
119
  const previousValue = this.value() ?? '';
120
120
  this.value.set(newValue);
121
+ this.valueChange.emit(newValue);
121
122
  this._onChange?.(newValue);
122
123
  if (this.isCompleted(newValue, previousValue, maxLength)) {
123
124
  this.completed.emit(newValue);
124
125
  }
125
126
  }
126
127
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnInputOtp, deps: [], target: i0.ɵɵFactoryTarget.Component });
127
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnInputOtp, isStandalone: true, selector: "brn-input-otp", inputs: { hostStyles: { classPropertyName: "hostStyles", publicName: "hostStyles", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputAutocomplete: { classPropertyName: "inputAutocomplete", publicName: "inputAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, inputStyles: { classPropertyName: "inputStyles", publicName: "inputStyles", isSignal: true, isRequired: false, transformFunction: null }, containerStyles: { classPropertyName: "containerStyles", publicName: "containerStyles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: true, transformFunction: null }, inputMode: { classPropertyName: "inputMode", publicName: "inputMode", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, transformPaste: { classPropertyName: "transformPaste", publicName: "transformPaste", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", valueChange: "valueChange", completed: "completed" }, host: { attributes: { "data-input-otp-container": "true" }, properties: { "style": "hostStyles()" } }, providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtp)], viewQueries: [{ propertyName: "_inputComponentRef", first: true, predicate: ["otpInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
128
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.16", type: BrnInputOtp, isStandalone: true, selector: "brn-input-otp", inputs: { hostStyles: { classPropertyName: "hostStyles", publicName: "hostStyles", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, inputAutocomplete: { classPropertyName: "inputAutocomplete", publicName: "inputAutocomplete", isSignal: true, isRequired: false, transformFunction: null }, inputStyles: { classPropertyName: "inputStyles", publicName: "inputStyles", isSignal: true, isRequired: false, transformFunction: null }, containerStyles: { classPropertyName: "containerStyles", publicName: "containerStyles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: true, transformFunction: null }, inputMode: { classPropertyName: "inputMode", publicName: "inputMode", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, autofocus: { classPropertyName: "autofocus", publicName: "autofocus", isSignal: true, isRequired: false, transformFunction: null }, transformPaste: { classPropertyName: "transformPaste", publicName: "transformPaste", isSignal: true, isRequired: false, transformFunction: null }, valueInput: { classPropertyName: "valueInput", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange", completed: "completed" }, host: { attributes: { "data-input-otp-container": "true" }, properties: { "style": "hostStyles()" } }, providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtp)], viewQueries: [{ propertyName: "_inputComponentRef", first: true, predicate: ["otpInput"], descendants: true, isSignal: true }], ngImport: i0, template: `
128
129
  <ng-content />
129
130
  <div [style]="containerStyles()">
130
131
  <input
131
132
  #otpInput
133
+ data-slot="input-otp"
132
134
  [id]="inputId()"
133
135
  [class]="inputClass()"
134
136
  [autocomplete]="inputAutocomplete()"
135
- data-slot="input-otp"
136
137
  [style]="inputStyles()"
137
138
  [disabled]="_disabled()"
138
139
  [inputMode]="inputMode()"
139
- [ngModel]="value()"
140
+ [value]="value() ?? ''"
140
141
  (input)="onInputChange($event)"
141
142
  (paste)="onPaste($event)"
142
143
  (focus)="_focused.set(true)"
143
144
  (blur)="_focused.set(false)"
144
145
  />
145
146
  </div>
146
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
147
+ `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
147
148
  }
148
149
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImport: i0, type: BrnInputOtp, decorators: [{
149
150
  type: Component,
150
151
  args: [{
151
152
  selector: 'brn-input-otp',
152
- imports: [FormsModule],
153
153
  providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtp)],
154
154
  changeDetection: ChangeDetectionStrategy.OnPush,
155
155
  host: {
@@ -161,14 +161,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
161
161
  <div [style]="containerStyles()">
162
162
  <input
163
163
  #otpInput
164
+ data-slot="input-otp"
164
165
  [id]="inputId()"
165
166
  [class]="inputClass()"
166
167
  [autocomplete]="inputAutocomplete()"
167
- data-slot="input-otp"
168
168
  [style]="inputStyles()"
169
169
  [disabled]="_disabled()"
170
170
  [inputMode]="inputMode()"
171
- [ngModel]="value()"
171
+ [value]="value() ?? ''"
172
172
  (input)="onInputChange($event)"
173
173
  (paste)="onPaste($event)"
174
174
  (focus)="_focused.set(true)"
@@ -177,7 +177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.16", ngImpo
177
177
  </div>
178
178
  `,
179
179
  }]
180
- }], ctorParameters: () => [], propDecorators: { hostStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostStyles", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAutocomplete", required: false }] }], inputStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyles", required: false }] }], containerStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "containerStyles", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: true }] }], inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputMode", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], transformPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformPaste", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completed: [{ type: i0.Output, args: ["completed"] }], _inputComponentRef: [{ type: i0.ViewChild, args: ['otpInput', { isSignal: true }] }] } });
180
+ }], ctorParameters: () => [], propDecorators: { hostStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "hostStyles", required: false }] }], inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputId", required: false }] }], inputAutocomplete: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputAutocomplete", required: false }] }], inputStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputStyles", required: false }] }], containerStyles: [{ type: i0.Input, args: [{ isSignal: true, alias: "containerStyles", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], maxLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxLength", required: true }] }], inputMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputMode", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], autofocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "autofocus", required: false }] }], transformPaste: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformPaste", required: false }] }], valueInput: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }], completed: [{ type: i0.Output, args: ["completed"] }], _inputComponentRef: [{ type: i0.ViewChild, args: ['otpInput', { isSignal: true }] }] } });
181
181
 
182
182
  class BrnInputOtpSlot {
183
183
  /** Access the input-otp component */