@appscode/design-system 2.17.61 → 2.17.62
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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
id?: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
modifierClasses?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
id: "",
|
|
14
|
+
description: "",
|
|
15
|
+
disabled: false,
|
|
16
|
+
modifierClasses: "",
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const checked = defineModel<boolean>("checked", { default: false });
|
|
20
|
+
|
|
21
|
+
const inputId = computed(() => props.id || `check-item-${props.label.toLowerCase().replace(/\s+/g, "-")}`);
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<label
|
|
26
|
+
:for="inputId"
|
|
27
|
+
class="card-select is-clickable mb-0 is-flex is-flex-direction-column gap-10"
|
|
28
|
+
:class="[modifierClasses, { 'is-selected': checked, 'is-disabled': disabled }]"
|
|
29
|
+
>
|
|
30
|
+
<div class="is-flex is-align-items-center gap-8">
|
|
31
|
+
<span class="ac-checkbox mb-0 is-align-items-flex-start">
|
|
32
|
+
<input :id="inputId" type="checkbox" :disabled="disabled" v-model="checked" />
|
|
33
|
+
<span class="checkmark"></span>
|
|
34
|
+
</span>
|
|
35
|
+
<p class="mb-0 has-text-weight-semibold">{{ label }}</p>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<p v-if="description" class="mb-0">{{ description }}</p>
|
|
39
|
+
</label>
|
|
40
|
+
</template>
|