@cloudron/pankow 3.5.14 → 3.5.15

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.
@@ -1,32 +1,46 @@
1
- <script setup>
2
-
3
- import { ref } from 'vue';
4
- import { uuidv4 } from '../utils.js';
5
-
6
- defineProps({
7
- modelValue: String,
8
- value: String,
9
- label: String,
10
- id: String,
11
- name: String,
12
- disabled: null
13
- });
14
-
15
- defineEmits(['update:modelValue']);
16
-
17
- const internalId = ref(uuidv4());
18
-
19
- </script>
20
-
21
1
  <template>
22
2
  <span class="pankow-radio">
23
- <input :name="name" :id="id || internalId" class="pankow-radio-input" type="radio" :model-value="modelValue" :value="value" @update:model-value="$emit('update:modelValue', $event)" :disabled="disabled" :required="$attrs['required']"/>
3
+ <input :name="name" :id="id || internalId" class="pankow-radio-input" type="radio" v-model="internalValue" :value="value" :disabled="disabled" :required="$attrs['required']"/>
24
4
  <slot>
25
5
  <label :for="id || internalId" class="pankow-radio-input-label">{{ label }}</label>
26
6
  </slot>
27
7
  </span>
28
8
  </template>
29
9
 
10
+ <script>
11
+
12
+ import { uuidv4 } from '../utils.js';
13
+
14
+ export default {
15
+ name: 'Radiobutton',
16
+ props: {
17
+ modelValue: String,
18
+ value: String,
19
+ label: String,
20
+ id: String,
21
+ name: String,
22
+ disabled: null
23
+ },
24
+ emits: ['update:modelValue'],
25
+ computed: {
26
+ internalValue: {
27
+ get() {
28
+ return this.modelValue
29
+ },
30
+ set(internalValue) {
31
+ this.$emit('update:modelValue', internalValue)
32
+ }
33
+ }
34
+ },
35
+ data () {
36
+ return {
37
+ internalId: uuidv4()
38
+ }
39
+ }
40
+ };
41
+
42
+ </script>
43
+
30
44
  <style>
31
45
 
32
46
  .pankow-radio {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudron/pankow",
3
3
  "private": false,
4
- "version": "3.5.14",
4
+ "version": "3.5.15",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "types": "types/index.d.ts",