@angular/aria 22.2.0-rc.0 → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -60,7 +60,7 @@ class KeyboardEventManager extends EventManager {
|
|
|
60
60
|
return this;
|
|
61
61
|
}
|
|
62
62
|
_normalizeInputs(...args) {
|
|
63
|
-
const withModifiers = Array.isArray(args[0]) ||
|
|
63
|
+
const withModifiers = Array.isArray(args[0]) || Object.hasOwn(Modifier, args[0]);
|
|
64
64
|
const modifiers = withModifiers ? args[0] : Modifier.None;
|
|
65
65
|
const key = withModifiers ? args[1] : args[0];
|
|
66
66
|
const handler = withModifiers ? args[2] : args[1];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_violations-chunk.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/keyboard-event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/signal-like/signal-like.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/element.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/collection.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/violations.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * An event that supports modifier keys.\n *\n * Matches the native KeyboardEvent, MouseEvent, and TouchEvent.\n */\nexport interface EventWithModifiers extends Event {\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\n/**\n * Options that are applicable to all event handlers.\n *\n * This library has not yet had a need for stopPropagationImmediate.\n */\nexport interface EventHandlerOptions {\n ignoreRepeat?: boolean;\n stopPropagation: boolean;\n preventDefault: boolean;\n}\n\n/** A basic event handler. */\nexport type EventHandler<T extends Event> = (event: T) => void;\n\n/** A function that determines whether an event is to be handled. */\nexport type EventMatcher<T extends Event> = (event: T) => boolean;\n\n/** A config that specifies how to handle a particular event. */\nexport interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {\n matcher: EventMatcher<T>;\n handler: EventHandler<T>;\n}\n\n/** Bit flag representation of the possible modifier keys that can be present on an event. */\nexport enum Modifier {\n None = 0,\n Ctrl = 0b1,\n Shift = 0b10,\n Alt = 0b100,\n Meta = 0b1000,\n Any = 'Any',\n}\n\nexport type ModifierInputs = Modifier | Modifier[];\n\n/**\n * Abstract base class for all event managers.\n *\n * Event managers are designed to normalize how event handlers are authored and create a safety net\n * for common event handling gotchas like remembering to call preventDefault or stopPropagation.\n */\nexport abstract class EventManager<T extends Event> {\n protected configs: EventHandlerConfig<T>[] = [];\n abstract options: EventHandlerOptions;\n\n /** Runs the handlers that match with the given event. */\n handle(event: T): void {\n for (const config of this.configs) {\n if (config.matcher(event)) {\n config.handler(event);\n\n if (config.preventDefault) {\n event.preventDefault();\n }\n\n if (config.stopPropagation) {\n event.stopPropagation();\n }\n }\n }\n }\n\n /** Configures the event manager to handle specific events. (See subclasses for more). */\n abstract on(...args: [...unknown[]]): this;\n}\n\n/** Gets bit flag representation of the modifier keys present on the given event. */\nexport function getModifiers(event: EventWithModifiers): number {\n return (\n (+event.ctrlKey && Modifier.Ctrl) |\n (+event.shiftKey && Modifier.Shift) |\n (+event.altKey && Modifier.Alt) |\n (+event.metaKey && Modifier.Meta)\n );\n}\n\n/**\n * Checks if the given event has modifiers that are an exact match for any of the given modifier\n * flag combinations.\n */\nexport function hasModifiers(event: EventWithModifiers, modifiers: ModifierInputs): boolean {\n const eventModifiers = getModifiers(event);\n const modifiersList = Array.isArray(modifiers) ? modifiers : [modifiers];\n\n if (modifiersList.includes(Modifier.Any)) {\n return true;\n }\n\n return modifiersList.some(modifiers => eventModifiers === modifiers);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SignalLike} from '../signal-like/signal-like';\nimport {\n EventHandler,\n EventHandlerOptions,\n EventManager,\n hasModifiers,\n ModifierInputs,\n Modifier,\n} from './event-manager';\n\n/**\n * Used to represent a keycode.\n *\n * This is used to match whether an events keycode should be handled. The ability to match using a\n * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.\n */\ntype KeyCode = string | SignalLike<string> | RegExp;\n\n/**\n * An event manager that is specialized for handling keyboard events. By default this manager stops\n * propagation and prevents default on all events it handles.\n */\nexport class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {\n readonly options: EventHandlerOptions = {\n ignoreRepeat: true,\n preventDefault: true,\n stopPropagation: true,\n };\n\n /** Configures this event manager to handle events with a specific key and no modifiers. */\n on(key: KeyCode, handler: EventHandler<T>, options?: Partial<EventHandlerOptions>): this;\n\n /** Configures this event manager to handle events with a specific modifer and key combination. */\n on(\n modifiers: ModifierInputs,\n key: KeyCode,\n handler: EventHandler<T>,\n options?: Partial<EventHandlerOptions>,\n ): this;\n\n on(...args: unknown[]) {\n const {modifiers, key, handler, options} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler: handler,\n matcher: event => this._isMatch(event, key, modifiers, options),\n ...this.options,\n ...options,\n });\n\n return this;\n }\n\n private _normalizeInputs(...args: unknown[]) {\n const withModifiers = Array.isArray(args[0]) || Modifier.hasOwnProperty(args[0] as string);\n const modifiers = withModifiers ? args[0] : Modifier.None;\n const key = withModifiers ? args[1] : args[0];\n const handler = withModifiers ? args[2] : args[1];\n const options = withModifiers ? args[3] : args[2];\n\n return {\n key: key as KeyCode,\n handler: handler as EventHandler<T>,\n modifiers: modifiers as ModifierInputs,\n options: (options ?? {}) as Partial<EventHandlerOptions>,\n };\n }\n\n private _isMatch(\n event: T,\n key: KeyCode,\n modifiers: ModifierInputs,\n options?: Partial<EventHandlerOptions>,\n ): boolean {\n // In some cases the `key` may be undefined, despite the types saying otherwise. See #33359.\n if (event.key == null || !hasModifiers(event, modifiers)) {\n return false;\n }\n\n // Default is to ignore repeated key events unless explicitly set to false.\n if (event.repeat && options?.ignoreRepeat !== false) {\n return false;\n }\n\n if (key instanceof RegExp) {\n return key.test(event.key);\n }\n\n const keyStr = typeof key === 'string' ? key : key();\n return keyStr.toLowerCase() === event.key.toLowerCase();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n createComputed,\n createLinkedSignal,\n createSignal,\n linkedSignalSetFn,\n linkedSignalUpdateFn,\n SIGNAL,\n untracked as primitiveUntracked,\n} from '@angular/core/primitives/signals';\n\nexport {primitiveUntracked as untracked};\n\nexport type SignalLike<T> = () => T;\n\nexport interface WritableSignalLike<T> extends SignalLike<T> {\n set(value: T): void;\n update(updateFn: (value: T) => T): void;\n asReadonly(): SignalLike<T>;\n}\n\n/** Converts a getter setter style signal to a WritableSignalLike. */\nexport function convertGetterSetterToWritableSignalLike<T>(\n getter: () => T,\n setter: (v: T) => void,\n): WritableSignalLike<T> {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: setter,\n update: (updateCallback: (v: T) => T) => setter(updateCallback(getter())),\n asReadonly: () => getter,\n });\n}\n\nexport function computed<T>(computation: () => T): SignalLike<T> {\n const computed = createComputed(computation);\n computed[SIGNAL].debugName = '';\n return computed;\n}\n\nexport function signal<T>(initialValue: T): WritableSignalLike<T> {\n const [get, set, update] = createSignal(initialValue);\n get[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(get, {set, update, asReadonly: () => get});\n}\n\nexport function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T> {\n const getter = createLinkedSignal(sourceFn, s => s);\n getter[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: (v: T) => linkedSignalSetFn(getter[SIGNAL], v),\n update: (updater: (v: T) => T) => linkedSignalUpdateFn(getter[SIGNAL], updater),\n asReadonly: () => getter,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport interface HasElement {\n element: HTMLElement;\n}\n\n/**\n * Sort directives by their document order.\n */\nexport function sortDirectives(a: HasElement, b: HasElement) {\n return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0\n ? 1\n : -1;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {signal, computed, Signal} from '@angular/core';\nimport {sortDirectives, HasElement} from './element';\n\n/**\n * A collection that lazily sorts its items based on their DOM position.\n * It uses manual registration and updates its order when items are added/removed\n * or when structural DOM changes are detected via MutationObserver.\n *\n * TODO(ok7sai): replace Mutation Observer with internal API.\n */\nexport class SortedCollection<T extends HasElement> {\n private readonly _items = signal<Set<T>>(new Set());\n private readonly _version = signal(0);\n private _observer?: MutationObserver;\n\n readonly orderedItems: Signal<T[]> = computed(() => {\n this._version(); // Track DOM changes\n const itemsArray = Array.from(this._items());\n return itemsArray.sort(sortDirectives);\n });\n\n register(item: T) {\n this._items.update(set => {\n const newSet = new Set(set);\n newSet.add(item);\n return newSet;\n });\n }\n\n unregister(item: T) {\n this._items.update(set => {\n const newSet = new Set(set);\n newSet.delete(item);\n return newSet;\n });\n }\n\n startObserving(element: HTMLElement) {\n if (this._observer) {\n this._observer.disconnect();\n }\n\n this._observer = new MutationObserver(mutations => {\n const hasStructuralChange = mutations.some(m => m.addedNodes.length || m.removedNodes.length);\n if (hasStructuralChange) {\n this._version.update(v => v + 1);\n }\n });\n\n this._observer.observe(element, {childList: true, subtree: true});\n }\n\n stopObserving() {\n this._observer?.disconnect();\n this._observer = undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Logs each of the violations to the console as errors, optionally with the host element context. */\nexport function reportViolations(violations: string[], element: Element): void {\n if (violations.length) {\n console.warn('Violations found on element: %o:', element);\n violations.forEach(violation => {\n console.warn(violation);\n });\n }\n}\n"],"names":["signal","computed"],"mappings":";;;IA4CY;AAAZ,CAAA,UAAY,QAAQ,EAAA;EAClB,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;EACR,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAU;EACV,QAAA,CAAA,QAAA,CAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,OAAY;EACZ,QAAA,CAAA,QAAA,CAAA,KAAA,CAAA,GAAA,CAAA,CAAA,GAAA,KAAW;EACX,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAa;AACb,EAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACb,CAAC,EAPW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;MAiBE,YAAY,CAAA;AACtB,EAAA,OAAO,GAA4B,EAAE;EAI/C,MAAM,CAAC,KAAQ,EAAA;AACb,IAAA,KAAK,MAAM,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE;AACjC,MAAA,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACzB,QAAA,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAErB,IAAI,MAAM,CAAC,cAAc,EAAE;UACzB,KAAK,CAAC,cAAc,EAAE;AACxB,QAAA;QAE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-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/event-manager/keyboard-event-manager.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/behaviors/signal-like/signal-like.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/element.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/collection.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/private/utils/violations.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/**\n * An event that supports modifier keys.\n *\n * Matches the native KeyboardEvent, MouseEvent, and TouchEvent.\n */\nexport interface EventWithModifiers extends Event {\n ctrlKey: boolean;\n shiftKey: boolean;\n altKey: boolean;\n metaKey: boolean;\n}\n\n/**\n * Options that are applicable to all event handlers.\n *\n * This library has not yet had a need for stopPropagationImmediate.\n */\nexport interface EventHandlerOptions {\n ignoreRepeat?: boolean;\n stopPropagation: boolean;\n preventDefault: boolean;\n}\n\n/** A basic event handler. */\nexport type EventHandler<T extends Event> = (event: T) => void;\n\n/** A function that determines whether an event is to be handled. */\nexport type EventMatcher<T extends Event> = (event: T) => boolean;\n\n/** A config that specifies how to handle a particular event. */\nexport interface EventHandlerConfig<T extends Event> extends EventHandlerOptions {\n matcher: EventMatcher<T>;\n handler: EventHandler<T>;\n}\n\n/** Bit flag representation of the possible modifier keys that can be present on an event. */\nexport enum Modifier {\n None = 0,\n Ctrl = 0b1,\n Shift = 0b10,\n Alt = 0b100,\n Meta = 0b1000,\n Any = 'Any',\n}\n\nexport type ModifierInputs = Modifier | Modifier[];\n\n/**\n * Abstract base class for all event managers.\n *\n * Event managers are designed to normalize how event handlers are authored and create a safety net\n * for common event handling gotchas like remembering to call preventDefault or stopPropagation.\n */\nexport abstract class EventManager<T extends Event> {\n protected configs: EventHandlerConfig<T>[] = [];\n abstract options: EventHandlerOptions;\n\n /** Runs the handlers that match with the given event. */\n handle(event: T): void {\n for (const config of this.configs) {\n if (config.matcher(event)) {\n config.handler(event);\n\n if (config.preventDefault) {\n event.preventDefault();\n }\n\n if (config.stopPropagation) {\n event.stopPropagation();\n }\n }\n }\n }\n\n /** Configures the event manager to handle specific events. (See subclasses for more). */\n abstract on(...args: [...unknown[]]): this;\n}\n\n/** Gets bit flag representation of the modifier keys present on the given event. */\nexport function getModifiers(event: EventWithModifiers): number {\n return (\n (+event.ctrlKey && Modifier.Ctrl) |\n (+event.shiftKey && Modifier.Shift) |\n (+event.altKey && Modifier.Alt) |\n (+event.metaKey && Modifier.Meta)\n );\n}\n\n/**\n * Checks if the given event has modifiers that are an exact match for any of the given modifier\n * flag combinations.\n */\nexport function hasModifiers(event: EventWithModifiers, modifiers: ModifierInputs): boolean {\n const eventModifiers = getModifiers(event);\n const modifiersList = Array.isArray(modifiers) ? modifiers : [modifiers];\n\n if (modifiersList.includes(Modifier.Any)) {\n return true;\n }\n\n return modifiersList.some(modifiers => eventModifiers === modifiers);\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {SignalLike} from '../signal-like/signal-like';\nimport {\n EventHandler,\n EventHandlerOptions,\n EventManager,\n hasModifiers,\n ModifierInputs,\n Modifier,\n} from './event-manager';\n\n/**\n * Used to represent a keycode.\n *\n * This is used to match whether an events keycode should be handled. The ability to match using a\n * string, SignalLike, or Regexp gives us more flexibility when authoring event handlers.\n */\ntype KeyCode = string | SignalLike<string> | RegExp;\n\n/**\n * An event manager that is specialized for handling keyboard events. By default this manager stops\n * propagation and prevents default on all events it handles.\n */\nexport class KeyboardEventManager<T extends KeyboardEvent> extends EventManager<T> {\n readonly options: EventHandlerOptions = {\n ignoreRepeat: true,\n preventDefault: true,\n stopPropagation: true,\n };\n\n /** Configures this event manager to handle events with a specific key and no modifiers. */\n on(key: KeyCode, handler: EventHandler<T>, options?: Partial<EventHandlerOptions>): this;\n\n /** Configures this event manager to handle events with a specific modifer and key combination. */\n on(\n modifiers: ModifierInputs,\n key: KeyCode,\n handler: EventHandler<T>,\n options?: Partial<EventHandlerOptions>,\n ): this;\n\n on(...args: unknown[]) {\n const {modifiers, key, handler, options} = this._normalizeInputs(...args);\n\n this.configs.push({\n handler: handler,\n matcher: event => this._isMatch(event, key, modifiers, options),\n ...this.options,\n ...options,\n });\n\n return this;\n }\n\n private _normalizeInputs(...args: unknown[]) {\n const withModifiers = Array.isArray(args[0]) || Object.hasOwn(Modifier, args[0] as string);\n const modifiers = withModifiers ? args[0] : Modifier.None;\n const key = withModifiers ? args[1] : args[0];\n const handler = withModifiers ? args[2] : args[1];\n const options = withModifiers ? args[3] : args[2];\n\n return {\n key: key as KeyCode,\n handler: handler as EventHandler<T>,\n modifiers: modifiers as ModifierInputs,\n options: (options ?? {}) as Partial<EventHandlerOptions>,\n };\n }\n\n private _isMatch(\n event: T,\n key: KeyCode,\n modifiers: ModifierInputs,\n options?: Partial<EventHandlerOptions>,\n ): boolean {\n // In some cases the `key` may be undefined, despite the types saying otherwise. See #33359.\n if (event.key == null || !hasModifiers(event, modifiers)) {\n return false;\n }\n\n // Default is to ignore repeated key events unless explicitly set to false.\n if (event.repeat && options?.ignoreRepeat !== false) {\n return false;\n }\n\n if (key instanceof RegExp) {\n return key.test(event.key);\n }\n\n const keyStr = typeof key === 'string' ? key : key();\n return keyStr.toLowerCase() === event.key.toLowerCase();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n createComputed,\n createLinkedSignal,\n createSignal,\n linkedSignalSetFn,\n linkedSignalUpdateFn,\n SIGNAL,\n untracked as primitiveUntracked,\n} from '@angular/core/primitives/signals';\n\nexport {primitiveUntracked as untracked};\n\nexport type SignalLike<T> = () => T;\n\nexport interface WritableSignalLike<T> extends SignalLike<T> {\n set(value: T): void;\n update(updateFn: (value: T) => T): void;\n asReadonly(): SignalLike<T>;\n}\n\n/** Converts a getter setter style signal to a WritableSignalLike. */\nexport function convertGetterSetterToWritableSignalLike<T>(\n getter: () => T,\n setter: (v: T) => void,\n): WritableSignalLike<T> {\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: setter,\n update: (updateCallback: (v: T) => T) => setter(updateCallback(getter())),\n asReadonly: () => getter,\n });\n}\n\nexport function computed<T>(computation: () => T): SignalLike<T> {\n const computed = createComputed(computation);\n computed[SIGNAL].debugName = '';\n return computed;\n}\n\nexport function signal<T>(initialValue: T): WritableSignalLike<T> {\n const [get, set, update] = createSignal(initialValue);\n get[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(get, {set, update, asReadonly: () => get});\n}\n\nexport function linkedSignal<T>(sourceFn: () => T): WritableSignalLike<T> {\n const getter = createLinkedSignal(sourceFn, s => s);\n getter[SIGNAL].debugName = '';\n // tslint:disable-next-line:ban Have to use `Object.assign` to preserve the getter function.\n return Object.assign(getter, {\n set: (v: T) => linkedSignalSetFn(getter[SIGNAL], v),\n update: (updater: (v: T) => T) => linkedSignalUpdateFn(getter[SIGNAL], updater),\n asReadonly: () => getter,\n });\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nexport interface HasElement {\n element: HTMLElement;\n}\n\n/**\n * Sort directives by their document order.\n */\nexport function sortDirectives(a: HasElement, b: HasElement) {\n return (a.element.compareDocumentPosition(b.element) & Node.DOCUMENT_POSITION_PRECEDING) > 0\n ? 1\n : -1;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {signal, computed, Signal} from '@angular/core';\nimport {sortDirectives, HasElement} from './element';\n\n/**\n * A collection that lazily sorts its items based on their DOM position.\n * It uses manual registration and updates its order when items are added/removed\n * or when structural DOM changes are detected via MutationObserver.\n *\n * TODO(ok7sai): replace Mutation Observer with internal API.\n */\nexport class SortedCollection<T extends HasElement> {\n private readonly _items = signal<Set<T>>(new Set());\n private readonly _version = signal(0);\n private _observer?: MutationObserver;\n\n readonly orderedItems: Signal<T[]> = computed(() => {\n this._version(); // Track DOM changes\n const itemsArray = Array.from(this._items());\n return itemsArray.sort(sortDirectives);\n });\n\n register(item: T) {\n this._items.update(set => {\n const newSet = new Set(set);\n newSet.add(item);\n return newSet;\n });\n }\n\n unregister(item: T) {\n this._items.update(set => {\n const newSet = new Set(set);\n newSet.delete(item);\n return newSet;\n });\n }\n\n startObserving(element: HTMLElement) {\n if (this._observer) {\n this._observer.disconnect();\n }\n\n this._observer = new MutationObserver(mutations => {\n const hasStructuralChange = mutations.some(m => m.addedNodes.length || m.removedNodes.length);\n if (hasStructuralChange) {\n this._version.update(v => v + 1);\n }\n });\n\n this._observer.observe(element, {childList: true, subtree: true});\n }\n\n stopObserving() {\n this._observer?.disconnect();\n this._observer = undefined;\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\n/** Logs each of the violations to the console as errors, optionally with the host element context. */\nexport function reportViolations(violations: string[], element: Element): void {\n if (violations.length) {\n console.warn('Violations found on element: %o:', element);\n violations.forEach(violation => {\n console.warn(violation);\n });\n }\n}\n"],"names":["signal","computed"],"mappings":";;;IA4CY;AAAZ,CAAA,UAAY,QAAQ,EAAA;EAClB,QAAA,CAAA,QAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;EACR,QAA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,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClC,MAAA;AACF,IAAA,CAAC,CAAC;AAEF,IAAA,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE;AAAC,MAAA,SAAS,EAAE,IAAI;AAAE,MAAA,OAAO,EAAE;AAAI,KAAC,CAAC;AACnE,EAAA;AAEA,EAAA,aAAa,GAAA;AACX,IAAA,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE;IAC5B,IAAI,CAAC,SAAS,GAAG,SAAS;AAC5B,EAAA;AACD;;ACvDK,SAAU,gBAAgB,CAAC,UAAoB,EAAE,OAAgB,EAAA;EACrE,IAAI,UAAU,CAAC,MAAM,EAAE;AACrB,IAAA,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,OAAO,CAAC;AACzD,IAAA,UAAU,CAAC,OAAO,CAAC,SAAS,IAAG;AAC7B,MAAA,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC;AACzB,IAAA,CAAC,CAAC;AACJ,EAAA;AACF;;"}
|
package/fesm2022/accordion.mjs
CHANGED
|
@@ -477,7 +477,8 @@ class AccordionTrigger {
|
|
|
477
477
|
},
|
|
478
478
|
host: {
|
|
479
479
|
attributes: {
|
|
480
|
-
"role": "button"
|
|
480
|
+
"role": "button",
|
|
481
|
+
"ngAccordionTrigger": ""
|
|
481
482
|
},
|
|
482
483
|
properties: {
|
|
483
484
|
"attr.data-active": "active()",
|
|
@@ -511,7 +512,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
511
512
|
'[attr.aria-controls]': '_pattern.controls()',
|
|
512
513
|
'[attr.aria-disabled]': '_pattern.disabled()',
|
|
513
514
|
'[attr.disabled]': '_pattern.hardDisabled() ? true : null',
|
|
514
|
-
'[attr.tabindex]': '_pattern.tabIndex()'
|
|
515
|
+
'[attr.tabindex]': '_pattern.tabIndex()',
|
|
516
|
+
'ngAccordionTrigger': ''
|
|
515
517
|
}
|
|
516
518
|
}]
|
|
517
519
|
}],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-content.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-panel.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-group.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-trigger.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive} from '@angular/core';\nimport {DeferredContent} from '../private';\n\n/**\n * A structural directive that provides a mechanism for lazily rendering the content for an\n * `ngAccordionPanel`.\n *\n * This directive should be applied to an `ng-template` inside an `ngAccordionPanel`.\n * It allows the content of the panel to be lazily rendered, improving performance\n * by only creating the content when the panel is first expanded.\n *\n * ```html\n * <div ngAccordionPanel>\n * <ng-template ngAccordionContent>\n * <p>This is the content that will be displayed inside the panel.</p>\n * </ng-template>\n * </div>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: 'ng-template[ngAccordionContent]',\n hostDirectives: [DeferredContent],\n})\nexport class AccordionContent {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n afterRenderEffect,\n computed,\n contentChild,\n inject,\n input,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {DeferredContentAware, AccordionTriggerPattern, reportViolations} from '../private';\nimport {AccordionContent} from './accordion-content';\n\n/**\n * The content panel of an accordion item that is conditionally visible.\n *\n * This directive is a container for the content that is shown or hidden. It should\n * expose a template reference that will be used by the corresponding `ngAccordionTrigger`.\n * The content within the panel should be provided using an `ng-template` with the\n * `ngAccordionContent` directive so that the content is not rendered on the page until the trigger\n * is expanded. It applies `role=\"region\"` for accessibility and uses the `inert` attribute to hide\n * its content from assistive technologies when not visible.\n *\n * ```html\n * <div ngAccordionPanel #panel=\"ngAccordionPanel\">\n * <ng-template ngAccordionContent>\n * <p>This content is lazily rendered and will be shown when the panel is expanded.</p>\n * </ng-template>\n * </div>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: '[ngAccordionPanel]',\n exportAs: 'ngAccordionPanel',\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n host: {\n 'role': 'region',\n '[attr.id]': 'id()',\n '[attr.aria-labelledby]': '_pattern?.id()',\n '[attr.inert]': '!visible() ? true : null',\n },\n})\nexport class AccordionPanel {\n /** A reference to the trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the trigger element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware);\n\n private readonly _accordionContent = contentChild(AccordionContent);\n\n /** A global unique identifier for the panel. */\n readonly id = input(inject(_IdGenerator).getId('ng-accordion-panel-', true));\n\n /** Whether the accordion panel is visible. True if the associated trigger is expanded. */\n readonly visible = computed(() => this._pattern?.expanded() === true);\n\n /**\n * The pattern for the accordion trigger that controls this panel.\n * This is set by the trigger when it initializes.\n * There is no need for a panel pattern, as the trigger has all the necessary logic.\n */\n _pattern?: AccordionTriggerPattern;\n\n constructor() {\n // Connect the panel's hidden state to the DeferredContentAware's visibility.\n afterRenderEffect({\n write: () => {\n this._deferredContentAware.contentVisible.set(this.visible());\n },\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n\n if (!this._accordionContent()) {\n violations.push('ngAccordionPanel must have an ngAccordionContent to render.');\n }\n if (!this._pattern) {\n violations.push('ngAccordionPanel must have an ngAccordionTrigger to control it.');\n }\n\n reportViolations(violations, this.element);\n },\n });\n }\n }\n\n /** Expands this item. */\n expand() {\n this._pattern?.open();\n }\n\n /** Collapses this item. */\n collapse() {\n this._pattern?.close();\n }\n\n /** Toggles the expansion state of this item. */\n toggle() {\n this._pattern?.toggle();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {AccordionGroup} from './accordion-group';\n\n/** Token used to expose the accordion group. */\nexport const ACCORDION_GROUP = new InjectionToken<AccordionGroup>('ACCORDION_GROUP');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n afterNextRender,\n afterRenderEffect,\n OnDestroy,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {AccordionGroupPattern, SortedCollection, reportViolations} from '../private';\nimport {ACCORDION_GROUP} from './accordion-tokens';\nimport {AccordionTrigger} from './accordion-trigger';\n\n/**\n * A container for a group of accordion items. It manages the overall state and\n * interactions of the accordion, such as keyboard navigation and expansion mode.\n *\n * The `ngAccordionGroup` serves as the root of a group of accordion triggers and panels,\n * coordinating the behavior of the `ngAccordionTrigger` and `ngAccordionPanel` elements within it.\n * It supports both single and multiple expansion modes.\n *\n * ```html\n * <div ngAccordionGroup [multiExpandable]=\"true\">\n * <div class=\"accordion-item\">\n * <h3>\n * <button ngAccordionTrigger [panel]=\"panel1\">Item 1</button>\n * </h3>\n * <div ngAccordionPanel #panel1=\"ngAccordionPanel\">\n * <ng-template ngAccordionContent>\n * <p>Content for Item 1.</p>\n * </ng-template>\n * </div>\n * </div>\n * <div class=\"accordion-item\">\n * <h3>\n * <button ngAccordionTrigger [panel]=\"panel2\">Item 2</button>\n * </h3>\n * <div ngAccordionPanel #panel2=\"ngAccordionPanel\">\n * <ng-template ngAccordionContent>\n * <p>Content for Item 2.</p>\n * </ng-template>\n * </div>\n * </div>\n * </div>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: '[ngAccordionGroup]',\n exportAs: 'ngAccordionGroup',\n host: {\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocus($event)',\n },\n providers: [{provide: ACCORDION_GROUP, useExisting: AccordionGroup}],\n})\nexport class AccordionGroup implements OnDestroy {\n /** A reference to the group element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the group element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The collection of AccordionTriggers. */\n readonly _collection = new SortedCollection<AccordionTrigger>();\n\n /** The corresponding patterns for the accordion triggers. */\n private readonly _triggerPatterns = computed(() => {\n return this._collection.orderedItems().map(t => t._pattern);\n });\n\n /** The text direction (ltr or rtl). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Whether the entire accordion group is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether multiple accordion items can be expanded simultaneously. */\n readonly multiExpandable = input(true, {transform: booleanAttribute});\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether keyboard navigation should wrap around from the last item to the first, and vice-versa. */\n readonly wrap = input(false, {transform: booleanAttribute});\n\n /** The UI pattern instance for this accordion group. */\n readonly _pattern: AccordionGroupPattern = new AccordionGroupPattern({\n ...this,\n element: () => this.element,\n activeItem: signal(undefined),\n items: this._triggerPatterns,\n orientation: () => 'vertical',\n });\n\n constructor() {\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Expands all accordion panels if multi-expandable. */\n expandAll() {\n this._pattern.expandAll();\n }\n\n /** Collapses all accordion panels. */\n collapseAll() {\n this._pattern.collapseAll();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n OnDestroy,\n OnInit,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n afterRenderEffect,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {AccordionTriggerPattern, reportViolations} from '../private';\nimport {ACCORDION_GROUP} from './accordion-tokens';\nimport {AccordionPanel} from './accordion-panel';\n\n/**\n * The trigger that toggles the visibility of its associated `ngAccordionPanel`.\n *\n * This directive requires the `panel` input be set to the template reference of the `ngAccordionPanel`\n * it controls. When clicked, it will expand or collapse the panel. It also handles keyboard\n * interactions for navigation within the `ngAccordionGroup`. It applies `role=\"button\"` and manages\n * `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.\n * The `disabled` input can be used to disable the trigger.\n *\n * ```html\n * <button ngAccordionTrigger [panel]=\"panel\">\n * Accordion Trigger Text\n * </button>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: '[ngAccordionTrigger]',\n exportAs: 'ngAccordionTrigger',\n host: {\n '[attr.data-active]': 'active()',\n 'role': 'button',\n '[id]': 'id()',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': '_pattern.controls()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.disabled]': '_pattern.hardDisabled() ? true : null',\n '[attr.tabindex]': '_pattern.tabIndex()',\n },\n})\nexport class AccordionTrigger implements OnInit, OnDestroy {\n /** A reference to the trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the trigger element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The parent AccordionGroup. */\n private readonly _accordionGroup = inject(ACCORDION_GROUP);\n\n /** The associated AccordionPanel. */\n readonly panel = input.required<AccordionPanel>();\n\n /** The unique identifier for the trigger. */\n readonly id = input(inject(_IdGenerator).getId('ng-accordion-trigger-', true));\n\n /** The unique identifier for the corresponding trigger panel. */\n readonly panelId = computed(() => this.panel().id());\n\n /** Whether the trigger is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the corresponding panel is expanded. */\n readonly expanded = model<boolean>(false);\n\n /** Whether the trigger is active. */\n readonly active = computed(() => this._pattern.active());\n\n /** The UI pattern instance for this trigger. */\n _pattern!: AccordionTriggerPattern;\n\n constructor() {\n // Automatically prevent form submission.\n if (this.element.tagName === 'BUTTON' && !this.element.hasAttribute('type')) {\n this.element.setAttribute('type', 'button');\n }\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n\n if (this.panel() && this.panel().element.contains(this.element)) {\n violations.push(\n 'ngAccordionTrigger must not be nested inside its controlled ngAccordionPanel, otherwise it will become unreachable when collapsed.',\n );\n }\n if (this.panel() && (this.panel() as any)._pattern !== this._pattern) {\n violations.push(\n 'ngAccordionPanel is already controlled by another ngAccordionTrigger.',\n );\n }\n\n reportViolations(violations, this.element);\n },\n });\n }\n }\n\n ngOnInit() {\n this._pattern = new AccordionTriggerPattern({\n ...this,\n element: () => this.element,\n accordionGroup: () => this._accordionGroup._pattern,\n accordionPanelId: this.panelId,\n });\n\n this.panel()._pattern = this._pattern;\n\n this._accordionGroup._collection.register(this);\n }\n\n ngOnDestroy() {\n this.panel()._pattern = undefined;\n\n this._accordionGroup._collection.unregister(this);\n }\n\n /** Expands this item. */\n expand() {\n this._pattern.open();\n }\n\n /** Collapses this item. */\n collapse() {\n this._pattern.close();\n }\n\n /** Toggles the expansion state of this item. */\n toggle() {\n this._pattern.toggle();\n }\n}\n"],"names":["i1.DeferredContent","i1.DeferredContentAware"],"mappings":";;;;;;;;;;;;;MAiCa,gBAAgB,CAAA;;;;;UAAhB,gBAAgB;AAAA,IAAA,IAAA,EAAA,EAAA;AAAA,IAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA;AAAA,GAAA,CAAA;;;;UAAhB,gBAAgB;AAAA,IAAA,YAAA,EAAA,IAAA;AAAA,IAAA,QAAA,EAAA,iCAAA;AAAA,IAAA,cAAA,EAAA,CAAA;MAAA,SAAA,EAAAA;AAAA,KAAA,CAAA;AAAA,IAAA,QAAA,EAAA;AAAA,GAAA,CAAA;;;;;;QAAhB,gBAAgB;AAAA,EAAA,UAAA,EAAA,CAAA;UAJ5B,SAAS;AAAC,IAAA,IAAA,EAAA,CAAA;AACT,MAAA,QAAQ,EAAE,iCAAiC;MAC3C,cAAc,EAAE,CAAC,eAAe;KACjC;;;;MCyBY,cAAc,CAAA;AAER,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;AAG/C,EAAA,qBAAqB,GAAG,MAAM,CAAC,oBAAoB,CAAC;EAEpD,iBAAiB,GAAG,YAAY,CAAC,gBAAgB;;WAAC;AAG1D,EAAA,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC;;WAAC;AAGnE,EAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,IAAI;;WAAC;EAOrE,QAAQ;AAER,EAAA,WAAA,GAAA;AAEE,IAAA,iBAAiB,CAAC;AAChB,MAAA,KAAK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;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"accordion.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-content.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-panel.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-tokens.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-group.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/accordion/accordion-trigger.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Directive} from '@angular/core';\nimport {DeferredContent} from '../private';\n\n/**\n * A structural directive that provides a mechanism for lazily rendering the content for an\n * `ngAccordionPanel`.\n *\n * This directive should be applied to an `ng-template` inside an `ngAccordionPanel`.\n * It allows the content of the panel to be lazily rendered, improving performance\n * by only creating the content when the panel is first expanded.\n *\n * ```html\n * <div ngAccordionPanel>\n * <ng-template ngAccordionContent>\n * <p>This is the content that will be displayed inside the panel.</p>\n * </ng-template>\n * </div>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: 'ng-template[ngAccordionContent]',\n hostDirectives: [DeferredContent],\n})\nexport class AccordionContent {}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n afterRenderEffect,\n computed,\n contentChild,\n inject,\n input,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {DeferredContentAware, AccordionTriggerPattern, reportViolations} from '../private';\nimport {AccordionContent} from './accordion-content';\n\n/**\n * The content panel of an accordion item that is conditionally visible.\n *\n * This directive is a container for the content that is shown or hidden. It should\n * expose a template reference that will be used by the corresponding `ngAccordionTrigger`.\n * The content within the panel should be provided using an `ng-template` with the\n * `ngAccordionContent` directive so that the content is not rendered on the page until the trigger\n * is expanded. It applies `role=\"region\"` for accessibility and uses the `inert` attribute to hide\n * its content from assistive technologies when not visible.\n *\n * ```html\n * <div ngAccordionPanel #panel=\"ngAccordionPanel\">\n * <ng-template ngAccordionContent>\n * <p>This content is lazily rendered and will be shown when the panel is expanded.</p>\n * </ng-template>\n * </div>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: '[ngAccordionPanel]',\n exportAs: 'ngAccordionPanel',\n hostDirectives: [\n {\n directive: DeferredContentAware,\n inputs: ['preserveContent'],\n },\n ],\n host: {\n 'role': 'region',\n '[attr.id]': 'id()',\n '[attr.aria-labelledby]': '_pattern?.id()',\n '[attr.inert]': '!visible() ? true : null',\n },\n})\nexport class AccordionPanel {\n /** A reference to the trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the trigger element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The DeferredContentAware host directive. */\n private readonly _deferredContentAware = inject(DeferredContentAware);\n\n private readonly _accordionContent = contentChild(AccordionContent);\n\n /** A global unique identifier for the panel. */\n readonly id = input(inject(_IdGenerator).getId('ng-accordion-panel-', true));\n\n /** Whether the accordion panel is visible. True if the associated trigger is expanded. */\n readonly visible = computed(() => this._pattern?.expanded() === true);\n\n /**\n * The pattern for the accordion trigger that controls this panel.\n * This is set by the trigger when it initializes.\n * There is no need for a panel pattern, as the trigger has all the necessary logic.\n */\n _pattern?: AccordionTriggerPattern;\n\n constructor() {\n // Connect the panel's hidden state to the DeferredContentAware's visibility.\n afterRenderEffect({\n write: () => {\n this._deferredContentAware.contentVisible.set(this.visible());\n },\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n\n if (!this._accordionContent()) {\n violations.push('ngAccordionPanel must have an ngAccordionContent to render.');\n }\n if (!this._pattern) {\n violations.push('ngAccordionPanel must have an ngAccordionTrigger to control it.');\n }\n\n reportViolations(violations, this.element);\n },\n });\n }\n }\n\n /** Expands this item. */\n expand() {\n this._pattern?.open();\n }\n\n /** Collapses this item. */\n collapse() {\n this._pattern?.close();\n }\n\n /** Toggles the expansion state of this item. */\n toggle() {\n this._pattern?.toggle();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {InjectionToken} from '@angular/core';\nimport type {AccordionGroup} from './accordion-group';\n\n/** Token used to expose the accordion group. */\nexport const ACCORDION_GROUP = new InjectionToken<AccordionGroup>('ACCORDION_GROUP');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n booleanAttribute,\n computed,\n inject,\n input,\n signal,\n afterNextRender,\n afterRenderEffect,\n OnDestroy,\n} from '@angular/core';\nimport {Directionality} from '@angular/cdk/bidi';\nimport {AccordionGroupPattern, SortedCollection, reportViolations} from '../private';\nimport {ACCORDION_GROUP} from './accordion-tokens';\nimport {AccordionTrigger} from './accordion-trigger';\n\n/**\n * A container for a group of accordion items. It manages the overall state and\n * interactions of the accordion, such as keyboard navigation and expansion mode.\n *\n * The `ngAccordionGroup` serves as the root of a group of accordion triggers and panels,\n * coordinating the behavior of the `ngAccordionTrigger` and `ngAccordionPanel` elements within it.\n * It supports both single and multiple expansion modes.\n *\n * ```html\n * <div ngAccordionGroup [multiExpandable]=\"true\">\n * <div class=\"accordion-item\">\n * <h3>\n * <button ngAccordionTrigger [panel]=\"panel1\">Item 1</button>\n * </h3>\n * <div ngAccordionPanel #panel1=\"ngAccordionPanel\">\n * <ng-template ngAccordionContent>\n * <p>Content for Item 1.</p>\n * </ng-template>\n * </div>\n * </div>\n * <div class=\"accordion-item\">\n * <h3>\n * <button ngAccordionTrigger [panel]=\"panel2\">Item 2</button>\n * </h3>\n * <div ngAccordionPanel #panel2=\"ngAccordionPanel\">\n * <ng-template ngAccordionContent>\n * <p>Content for Item 2.</p>\n * </ng-template>\n * </div>\n * </div>\n * </div>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: '[ngAccordionGroup]',\n exportAs: 'ngAccordionGroup',\n host: {\n '(keydown)': '_pattern.onKeydown($event)',\n '(click)': '_pattern.onClick($event)',\n '(focusin)': '_pattern.onFocus($event)',\n },\n providers: [{provide: ACCORDION_GROUP, useExisting: AccordionGroup}],\n})\nexport class AccordionGroup implements OnDestroy {\n /** A reference to the group element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the group element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The collection of AccordionTriggers. */\n readonly _collection = new SortedCollection<AccordionTrigger>();\n\n /** The corresponding patterns for the accordion triggers. */\n private readonly _triggerPatterns = computed(() => {\n return this._collection.orderedItems().map(t => t._pattern);\n });\n\n /** The text direction (ltr or rtl). */\n readonly textDirection = inject(Directionality).valueSignal;\n\n /** Whether the entire accordion group is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether multiple accordion items can be expanded simultaneously. */\n readonly multiExpandable = input(true, {transform: booleanAttribute});\n\n /**\n * Whether to allow disabled items to receive focus. When `true`, disabled items are\n * focusable but not interactive. When `false`, disabled items are skipped during navigation.\n */\n readonly softDisabled = input(true, {transform: booleanAttribute});\n\n /** Whether keyboard navigation should wrap around from the last item to the first, and vice-versa. */\n readonly wrap = input(false, {transform: booleanAttribute});\n\n /** The UI pattern instance for this accordion group. */\n readonly _pattern: AccordionGroupPattern = new AccordionGroupPattern({\n ...this,\n element: () => this.element,\n activeItem: signal(undefined),\n items: this._triggerPatterns,\n orientation: () => 'vertical',\n });\n\n constructor() {\n afterNextRender(() => {\n this._collection.startObserving(this.element);\n });\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n reportViolations(this._pattern.validate(), this.element);\n },\n });\n }\n }\n\n ngOnDestroy() {\n this._collection.stopObserving();\n }\n\n /** Expands all accordion panels if multi-expandable. */\n expandAll() {\n this._pattern.expandAll();\n }\n\n /** Collapses all accordion panels. */\n collapseAll() {\n this._pattern.collapseAll();\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {\n Directive,\n ElementRef,\n OnDestroy,\n OnInit,\n booleanAttribute,\n computed,\n inject,\n input,\n model,\n afterRenderEffect,\n} from '@angular/core';\nimport {_IdGenerator} from '@angular/cdk/a11y';\nimport {AccordionTriggerPattern, reportViolations} from '../private';\nimport {ACCORDION_GROUP} from './accordion-tokens';\nimport {AccordionPanel} from './accordion-panel';\n\n/**\n * The trigger that toggles the visibility of its associated `ngAccordionPanel`.\n *\n * This directive requires the `panel` input be set to the template reference of the `ngAccordionPanel`\n * it controls. When clicked, it will expand or collapse the panel. It also handles keyboard\n * interactions for navigation within the `ngAccordionGroup`. It applies `role=\"button\"` and manages\n * `aria-expanded`, `aria-controls`, and `aria-disabled` attributes for accessibility.\n * The `disabled` input can be used to disable the trigger.\n *\n * ```html\n * <button ngAccordionTrigger [panel]=\"panel\">\n * Accordion Trigger Text\n * </button>\n * ```\n *\n * @see [Accordion](guide/aria/accordion)\n */\n@Directive({\n selector: '[ngAccordionTrigger]',\n exportAs: 'ngAccordionTrigger',\n host: {\n '[attr.data-active]': 'active()',\n 'role': 'button',\n '[id]': 'id()',\n '[attr.aria-expanded]': 'expanded()',\n '[attr.aria-controls]': '_pattern.controls()',\n '[attr.aria-disabled]': '_pattern.disabled()',\n '[attr.disabled]': '_pattern.hardDisabled() ? true : null',\n '[attr.tabindex]': '_pattern.tabIndex()',\n\n // `AccordionGroupPattern` depends on this to find the closest\n // trigger so ensure that it is set. It's usually there for normal usage,\n // but it might not be when the trigger is a host directive.\n 'ngAccordionTrigger': '',\n },\n})\nexport class AccordionTrigger implements OnInit, OnDestroy {\n /** A reference to the trigger element. */\n private readonly _elementRef = inject(ElementRef);\n\n /** A reference to the trigger element. */\n readonly element = this._elementRef.nativeElement as HTMLElement;\n\n /** The parent AccordionGroup. */\n private readonly _accordionGroup = inject(ACCORDION_GROUP);\n\n /** The associated AccordionPanel. */\n readonly panel = input.required<AccordionPanel>();\n\n /** The unique identifier for the trigger. */\n readonly id = input(inject(_IdGenerator).getId('ng-accordion-trigger-', true));\n\n /** The unique identifier for the corresponding trigger panel. */\n readonly panelId = computed(() => this.panel().id());\n\n /** Whether the trigger is disabled. */\n readonly disabled = input(false, {transform: booleanAttribute});\n\n /** Whether the corresponding panel is expanded. */\n readonly expanded = model<boolean>(false);\n\n /** Whether the trigger is active. */\n readonly active = computed(() => this._pattern.active());\n\n /** The UI pattern instance for this trigger. */\n _pattern!: AccordionTriggerPattern;\n\n constructor() {\n // Automatically prevent form submission.\n if (this.element.tagName === 'BUTTON' && !this.element.hasAttribute('type')) {\n this.element.setAttribute('type', 'button');\n }\n\n // Check for any violations after the DOM has been updated.\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n afterRenderEffect({\n read: () => {\n const violations: string[] = [];\n\n if (this.panel() && this.panel().element.contains(this.element)) {\n violations.push(\n 'ngAccordionTrigger must not be nested inside its controlled ngAccordionPanel, otherwise it will become unreachable when collapsed.',\n );\n }\n if (this.panel() && (this.panel() as any)._pattern !== this._pattern) {\n violations.push(\n 'ngAccordionPanel is already controlled by another ngAccordionTrigger.',\n );\n }\n\n reportViolations(violations, this.element);\n },\n });\n }\n }\n\n ngOnInit() {\n this._pattern = new AccordionTriggerPattern({\n ...this,\n element: () => this.element,\n accordionGroup: () => this._accordionGroup._pattern,\n accordionPanelId: this.panelId,\n });\n\n this.panel()._pattern = this._pattern;\n\n this._accordionGroup._collection.register(this);\n }\n\n ngOnDestroy() {\n this.panel()._pattern = undefined;\n\n this._accordionGroup._collection.unregister(this);\n }\n\n /** Expands this item. */\n expand() {\n this._pattern.open();\n }\n\n /** Collapses this item. */\n collapse() {\n this._pattern.close();\n }\n\n /** Toggles the expansion state of this item. */\n toggle() {\n this._pattern.toggle();\n }\n}\n"],"names":["i1.DeferredContent","i1.DeferredContentAware"],"mappings":";;;;;;;;;;;;;MAiCa,gBAAgB,CAAA;;;;;UAAhB,gBAAgB;AAAA,IAAA,IAAA,EAAA,EAAA;AAAA,IAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA;AAAA,GAAA,CAAA;;;;UAAhB,gBAAgB;AAAA,IAAA,YAAA,EAAA,IAAA;AAAA,IAAA,QAAA,EAAA,iCAAA;AAAA,IAAA,cAAA,EAAA,CAAA;MAAA,SAAA,EAAAA;AAAA,KAAA,CAAA;AAAA,IAAA,QAAA,EAAA;AAAA,GAAA,CAAA;;;;;;QAAhB,gBAAgB;AAAA,EAAA,UAAA,EAAA,CAAA;UAJ5B,SAAS;AAAC,IAAA,IAAA,EAAA,CAAA;AACT,MAAA,QAAQ,EAAE,iCAAiC;MAC3C,cAAc,EAAE,CAAC,eAAe;KACjC;;;;MCyBY,cAAc,CAAA;AAER,EAAA,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC;AAGxC,EAAA,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,aAA4B;AAG/C,EAAA,qBAAqB,GAAG,MAAM,CAAC,oBAAoB,CAAC;EAEpD,iBAAiB,GAAG,YAAY,CAAC,gBAAgB;;WAAC;AAG1D,EAAA,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC;;WAAC;AAGnE,EAAA,OAAO,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,IAAI;;WAAC;EAO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qB;AAC7C,QAAA,iBAAiB,EAAE,uCAAuC;AAC1D,QAAA,iBAAiB,EAAE,qBAAqB;AAKxC,QAAA,oBAAoB,EAAE;AACvB;KACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/fesm2022/aria.mjs
CHANGED
package/fesm2022/aria.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aria.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Aria package. */\nexport const VERSION = new Version('22.2.0
|
|
1
|
+
{"version":3,"file":"aria.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/aria/version.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of the Aria package. */\nexport const VERSION = new Version('22.2.0');\n"],"names":[],"mappings":";;MAWa,OAAO,GAAG,IAAI,OAAO,CAAC,mBAAmB;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/aria",
|
|
3
|
-
"version": "22.2.0
|
|
3
|
+
"version": "22.2.0",
|
|
4
4
|
"description": "Angular Aria",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"homepage": "https://github.com/angular/components#readme",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@angular/cdk": "22.2.0
|
|
16
|
-
"@angular/core": "^22.0.0
|
|
15
|
+
"@angular/cdk": "22.2.0",
|
|
16
|
+
"@angular/core": "^22.0.0 || ^23.0.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@angular/cdk": "workspace:*"
|