UNPKG

igniteui-webcomponents

Version:

Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.

34 lines 967 B
import { iterNodes } from '../common/util.js'; export function getGroup(member) { const result = { active: [], checked: [], radios: [], siblings: [], }; if (!member.name) { result.radios.push(member); if (member.checked) { result.checked.push(member); } if (!member.disabled) { result.active.push(member); } return result; } const iterator = iterNodes(globalThis.document.documentElement, 'SHOW_ELEMENT', (radio) => radio.matches(member.tagName) && radio.name === member.name); for (const each of iterator) { result.radios.push(each); if (!each.disabled) { result.active.push(each); } if (each.checked) { result.checked.push(each); } if (each !== member) { result.siblings.push(each); } } return result; } //# sourceMappingURL=utils.js.map