claude-web/node_modules/primevue/radiobutton/index.mjs.map

1 line
12 KiB
Plaintext
Raw Permalink Normal View History

2026-02-23 02:23:38 +00:00
{"version":3,"file":"index.mjs","sources":["../../src/radiobutton/BaseRadioButton.vue","../../src/radiobutton/RadioButton.vue","../../src/radiobutton/RadioButton.vue?vue&type=template&id=07604f16&lang.js"],"sourcesContent":["<script>\nimport BaseInput from '@primevue/core/baseinput';\nimport RadioButtonStyle from 'primevue/radiobutton/style';\n\nexport default {\n name: 'BaseRadioButton',\n extends: BaseInput,\n props: {\n value: null,\n binary: Boolean,\n readonly: {\n type: Boolean,\n default: false\n },\n tabindex: {\n type: Number,\n default: null\n },\n inputId: {\n type: String,\n default: null\n },\n inputClass: {\n type: [String, Object],\n default: null\n },\n inputStyle: {\n type: Object,\n default: null\n },\n ariaLabelledby: {\n type: String,\n default: null\n },\n ariaLabel: {\n type: String,\n default: null\n }\n },\n style: RadioButtonStyle,\n provide() {\n return {\n $pcRadioButton: this,\n $parentInstance: this\n };\n }\n};\n</script>\n","<template>\n <div :class=\"cx('root')\" v-bind=\"getPTOptions('root')\" :data-p-checked=\"checked\" :data-p-disabled=\"disabled\" :data-p=\"dataP\">\n <input\n :id=\"inputId\"\n type=\"radio\"\n :class=\"[cx('input'), inputClass]\"\n :style=\"inputStyle\"\n :value=\"value\"\n :name=\"groupName\"\n :checked=\"checked\"\n :tabindex=\"tabindex\"\n :disabled=\"disabled\"\n :readonly=\"readonly\"\n :aria-labelledby=\"ariaLabelledby\"\n :aria-label=\"ariaLabel\"\n :aria-invalid=\"invalid || undefined\"\n @focus=\"onFocus\"\n @blur=\"onBlur\"\n @change=\"onChange\"\n v-bind=\"getPTOptions('input')\"\n />\n <div :class=\"cx('box')\" v-bind=\"getPTOptions('box')\" :data-p=\"dataP\">\n <div :class=\"cx('icon')\" v-bind=\"getPTOptions('icon')\" :data-p=\"dataP\"></div>\n </div>\n </div>\n</template>\n\n<script>\nimport { cn } from '@primeuix/utils';\nimport { equals } from '@primeuix/utils/object';\nimport BaseRadioButton from './BaseRadioButton.vue';\n\nexport default {\n name: 'RadioButton',\n extends: BaseRadioButton,\n inheritAttrs: false,\n emits: ['change', 'focus', 'blur'],\n inject: {\n $pcRadioButtonGroup: {\n default: undefined\n }\n },\n methods: {\n getPTOptions(key) {\n const _ptm = key === 'root' ? this.ptmi : this.ptm;\n\n return _ptm(key, {\n context: {\n checked: this.checked,\n disabled: this.disabled\n }\n });\n },\n onChange(event) {\n if (!this.disabled && !this.readonly) {\n const newModelValue = this.binary ? !this.checked : this.value;\n\n this.$pcRadioButtonGroup ? this.$pcRadioButtonGroup.writeValue(newModelValue, event) : this.writeValue(newModelValue, event);\n this.$emit('change', event);\n }\n },\n onFocus(event) {\n this.$emit('focus', event);\n },\n onBlur(event) {\n this.$emit('blur', event);\n this.formField.onBlur?.(event);\n }\n },\n computed: {\n groupName() {\n return this.$pcRadioButtonGroup ? this.$pcRadioButtonGroup.groupName : this.$formName;\n },\n checked() {\n const value = this.$pcRadioButtonGroup ? this.$pcRadioButtonGroup.d_value : this.d_value;\n\n return value != null && (this.binary ? !!value : equals(value, this.value));\n },\n dataP() {\n return cn({\n invalid: this.$invalid,\n