@nextcloud/vue
Version:
Nextcloud vue components
1 lines • 907 B
Source Map (JSON)
{"version":3,"file":"useNcRadioGroup-DaZbEKbf.mjs","sources":["../../src/components/NcRadioGroup/useNcRadioGroup.ts"],"sourcesContent":["/*!\n * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ComputedRef, InjectionKey } from 'vue'\n\nimport { inject } from 'vue'\n\nexport const INSIDE_RADIO_GROUP_KEY: InjectionKey<ComputedRef<{ modelValue: string, onUpdate: (value: string) => void, register: (isButton: boolean) => void }>> = Symbol.for('insideRadioGroup')\n\n/**\n * To check if inside a radio group and if yes inject the current modelValue as well as the onUpdate method.\n */\nexport function useInsideRadioGroup() {\n\treturn inject(INSIDE_RADIO_GROUP_KEY, undefined)\n}\n"],"names":[],"mappings":";AAAA;AAAA;AAAA;AAAA;AASO,MAAM,yBAAsJ,OAAO,IAAI,kBAAkB;AAKzL,SAAS,sBAAsB;AACrC,SAAO,OAAO,wBAAwB,MAAS;AAChD;"}