@redseed/redseed-ui-vue3 2.12.0 → 2.12.2
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.
package/package.json
CHANGED
|
@@ -30,16 +30,16 @@ function setValue(value) {
|
|
|
30
30
|
<slot name="label"></slot>
|
|
31
31
|
</template>
|
|
32
32
|
<div class="rsui-form-field-radio-group__items">
|
|
33
|
-
<div v-for="option in options" :key="option" class="rsui-form-field-radio-group__item"
|
|
34
|
-
@click="setValue(option.value)">
|
|
33
|
+
<div v-for="option in options" :key="option" :class="['rsui-form-field-radio-group__item', {'rsui-form-field-radio-group__item--disabled': option.disabled}]"
|
|
34
|
+
@click="!option.disabled && setValue(option.value)">
|
|
35
35
|
<div class="rsui-form-field-radio-group__control" v-if="model !== option.value"></div>
|
|
36
36
|
<div class="rsui-form-field-radio-group__control rsui-form-field-radio-group__control--active"
|
|
37
37
|
v-if="model == option.value">
|
|
38
38
|
<div></div>
|
|
39
39
|
</div>
|
|
40
|
-
<input class="rsui-form-field-radio-group__item-native-control" type="radio" :value="option.value"
|
|
40
|
+
<input :disabled="option.disabled" class="rsui-form-field-radio-group__item-native-control" type="radio" :value="option.value"
|
|
41
41
|
v-model="model" :id="$attrs.id" :name="$attrs.name">
|
|
42
|
-
<label class="rsui-form-field-radio-group__item-label">{{ option.label }}</label>
|
|
42
|
+
<label :class="['rsui-form-field-radio-group__item-label', {'rsui-form-field-radio-group__item-label--disabled': option.disabled}]">{{ option.label }}</label>
|
|
43
43
|
</div>
|
|
44
44
|
</div>
|
|
45
45
|
<template #help v-if="$slots.help">
|
|
@@ -59,12 +59,15 @@ function setValue(value) {
|
|
|
59
59
|
}
|
|
60
60
|
&__item {
|
|
61
61
|
@apply flex items-center gap-2 cursor-pointer;
|
|
62
|
+
&--disabled {
|
|
63
|
+
@apply opacity-40 cursor-not-allowed;
|
|
64
|
+
}
|
|
62
65
|
}
|
|
63
66
|
&__item-native-control {
|
|
64
67
|
@apply appearance-none;
|
|
65
68
|
}
|
|
66
69
|
&__control {
|
|
67
|
-
@apply size-6 border border-gray-400 rounded-full bg-white;
|
|
70
|
+
@apply shrink-0 size-6 border border-gray-400 rounded-full bg-white;
|
|
68
71
|
&--active {
|
|
69
72
|
@apply bg-primary border-primary flex items-center justify-center;
|
|
70
73
|
div {
|
|
@@ -73,7 +76,10 @@ function setValue(value) {
|
|
|
73
76
|
}
|
|
74
77
|
}
|
|
75
78
|
&__item-label {
|
|
76
|
-
@apply font-normal cursor-pointer;
|
|
79
|
+
@apply font-normal cursor-pointer mb-0;
|
|
80
|
+
&--disabled {
|
|
81
|
+
@apply cursor-not-allowed;
|
|
82
|
+
}
|
|
77
83
|
}
|
|
78
84
|
}
|
|
79
85
|
|