Disabled checked token for radio button

pull/6011/head
Cagatay Civici 2024-07-03 11:49:36 +03:00
parent 2966a83ffd
commit 78ae452134
7 changed files with 26 additions and 16 deletions

View File

@ -32,7 +32,8 @@ export default {
export default { export default {
data() { data() {
return { return {
checked: false checked1: false,
checked2: true,
}; };
} }
}; };
@ -49,7 +50,8 @@ export default {
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
const checked = ref(false); const checked1 = ref(false);
const checked2 = ref(true);
<\/script> <\/script>
` `
} }

View File

@ -2,8 +2,9 @@
<DocSectionText v-bind="$attrs"> <DocSectionText v-bind="$attrs">
<p>When <i>disabled</i> is present, the element cannot be edited and focused.</p> <p>When <i>disabled</i> is present, the element cannot be edited and focused.</p>
</DocSectionText> </DocSectionText>
<div class="card flex justify-center"> <div class="card flex justify-center gap-2">
<RadioButton v-model="value" :value="1" disabled /> <RadioButton v-model="value" :value="1" disabled />
<RadioButton v-model="value" :value="2" disabled />
</div> </div>
<DocSectionCode :code="code" /> <DocSectionCode :code="code" />
</template> </template>
@ -12,15 +13,17 @@
export default { export default {
data() { data() {
return { return {
value: null, value: 2,
code: { code: {
basic: ` basic: `
<RadioButton v-model="value" :value="1" disabled /> <RadioButton v-model="value" :value="1" disabled />
<RadioButton v-model="value" :value="2" disabled />
`, `,
options: ` options: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton v-model="value" :value="1" disabled /> <RadioButton v-model="value" :value="1" disabled />
<RadioButton v-model="value" :value="2" disabled />
</div> </div>
</template> </template>
@ -28,7 +31,7 @@ export default {
export default { export default {
data() { data() {
return { return {
value: null value: 2
} }
} }
} }
@ -37,14 +40,15 @@ export default {
composition: ` composition: `
<template> <template>
<div class="card flex justify-center"> <div class="card flex justify-center">
<RadioButton v-model="value" :value="1" disabled /> <RadioButton v-model="value" :value="1" disabled />
<RadioButton v-model="value" :value="2" disabled />
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref } from "vue";
const value = ref(null); const value = ref(2);
<\/script> <\/script>
` `
} }

View File

@ -52,16 +52,16 @@ export default {
label: 'Dynamic', label: 'Dynamic',
component: DynamicDoc component: DynamicDoc
}, },
{
id: 'invalid',
label: 'Invalid',
component: InvalidDoc
},
{ {
id: 'filled', id: 'filled',
label: 'Filled', label: 'Filled',
component: FilledDoc component: FilledDoc
}, },
{
id: 'invalid',
label: 'Invalid',
component: InvalidDoc
},
{ {
id: 'disabled', id: 'disabled',
label: 'Disabled', label: 'Disabled',

View File

@ -111,10 +111,11 @@ const theme = ({ dt }) => `
.p-radiobutton.p-disabled .p-radiobutton-box { .p-radiobutton.p-disabled .p-radiobutton-box {
background: ${dt('radiobutton.disabled.background')}; background: ${dt('radiobutton.disabled.background')};
border-color: ${dt('radiobutton.checked.disabled.border.color')};
} }
.p-radiobutton.p-disabled .p-radiobutton-box .p-radiobutton-icon { .p-radiobutton-checked.p-disabled .p-radiobutton-box .p-radiobutton-icon {
color: ${dt('radiobutton.icon.disabled.color')}; background: ${dt('radiobutton.icon.disabled.color')};
} }
`; `;

View File

@ -13,6 +13,7 @@ export default {
checkedBorderColor: '{primary.color}', checkedBorderColor: '{primary.color}',
checkedHoverBorderColor: '{primary.hover.color}', checkedHoverBorderColor: '{primary.hover.color}',
checkedFocusBorderColor: '{primary.color}', checkedFocusBorderColor: '{primary.color}',
checkedDisabledBorderColor: '{form.field.border.color}',
invalidBorderColor: '{form.field.invalid.border.color}', invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}', shadow: '{form.field.shadow}',
focusRing: { focusRing: {

View File

@ -13,6 +13,7 @@ export default {
checkedBorderColor: '{primary.color}', checkedBorderColor: '{primary.color}',
checkedHoverBorderColor: '{primary.hover.color}', checkedHoverBorderColor: '{primary.hover.color}',
checkedFocusBorderColor: '{primary.color}', checkedFocusBorderColor: '{primary.color}',
checkedDisabledBorderColor: '{form.field.border.color}',
invalidBorderColor: '{form.field.invalid.border.color}', invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}', shadow: '{form.field.shadow}',
focusRing: { focusRing: {

View File

@ -13,6 +13,7 @@ export default {
checkedBorderColor: '{form.field.border.color}', checkedBorderColor: '{form.field.border.color}',
checkedHoverBorderColor: '{form.field.hover.border.color}', checkedHoverBorderColor: '{form.field.hover.border.color}',
checkedFocusBorderColor: '{form.field.focus.border.color}', checkedFocusBorderColor: '{form.field.focus.border.color}',
checkedDisabledBorderColor: '{form.field.border.color}',
invalidBorderColor: '{form.field.invalid.border.color}', invalidBorderColor: '{form.field.invalid.border.color}',
shadow: '{form.field.shadow}', shadow: '{form.field.shadow}',
focusRing: { focusRing: {