@mptw/skylens-ui 1.4.23 → 1.4.24
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/components/SLCheckbox.vue +11 -3
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template lang="pug">
|
|
2
|
-
.checkbox(:class='checkboxClass')
|
|
2
|
+
.checkbox(:class='[checkboxClass, { inactive: !interactive }]')
|
|
3
3
|
input(
|
|
4
4
|
type='checkbox',
|
|
5
5
|
:id='uid',
|
|
@@ -65,6 +65,10 @@ export default defineComponent({
|
|
|
65
65
|
default: "",
|
|
66
66
|
validator: (value: string) => ["", "sm"].includes(value),
|
|
67
67
|
},
|
|
68
|
+
interactive: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true,
|
|
71
|
+
},
|
|
68
72
|
},
|
|
69
73
|
emits: ["update:modelValue"],
|
|
70
74
|
setup(props, { emit }) {
|
|
@@ -133,6 +137,10 @@ export default defineComponent({
|
|
|
133
137
|
.checkbox
|
|
134
138
|
@apply inline-flex relative text-base align-top overflow-hidden
|
|
135
139
|
|
|
140
|
+
&.inactive
|
|
141
|
+
label
|
|
142
|
+
@apply pointer-events-none
|
|
143
|
+
|
|
136
144
|
&.checkbox-sm
|
|
137
145
|
@apply text-sm
|
|
138
146
|
|
|
@@ -172,8 +180,8 @@ export default defineComponent({
|
|
|
172
180
|
@apply inline-block
|
|
173
181
|
|
|
174
182
|
input:not(:checked):disabled + label
|
|
175
|
-
@apply text-gray-4 cursor-default
|
|
183
|
+
@apply text-gray-4 cursor-default pointer-events-none
|
|
176
184
|
|
|
177
185
|
input:checked:disabled + label
|
|
178
|
-
@apply text-gray-3 cursor-default
|
|
186
|
+
@apply text-gray-3 cursor-default pointer-events-none
|
|
179
187
|
</style>
|