srcdev-nuxt-forms 6.0.1 → 6.1.1

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.
Files changed (40) hide show
  1. package/README.md +45 -5
  2. package/app/assets/styles/extends-layer/srcdev-forms/components/_form-fieldset.css +1 -1
  3. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-button.css +1 -1
  4. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-checkbox-radio-core.css +1 -1
  5. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-checkbox-radio-options-button.css +1 -1
  6. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-error.css +1 -1
  7. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-label.css +1 -1
  8. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-select.css +1 -1
  9. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-text.css +1 -1
  10. package/app/assets/styles/extends-layer/srcdev-forms/components/_input-textarea.css +1 -1
  11. package/app/assets/styles/setup/_head.css +1 -1
  12. package/app/assets/styles/setup/typography/vars/_reponsive-font-sizes.css +10 -10
  13. package/app/assets/styles/setup/typography/vars/index.css +0 -1
  14. package/app/components/forms/form-fieldset/FormFieldset.vue +19 -10
  15. package/app/components/forms/input-button/InputButtonCore.vue +25 -28
  16. package/app/components/forms/input-checkbox/MultipleCheckboxes.vue +48 -27
  17. package/app/components/forms/input-checkbox/SingleCheckbox.vue +52 -33
  18. package/app/components/forms/input-checkbox-radio/InputCheckboxRadioButton.vue +40 -22
  19. package/app/components/forms/input-checkbox-radio/InputCheckboxRadioWithLabel.vue +33 -17
  20. package/app/components/forms/input-label/InputLabel.vue +10 -12
  21. package/app/components/forms/input-number/InputNumberCore.vue +26 -22
  22. package/app/components/forms/input-number/variants/InputNumberDefault.vue +50 -27
  23. package/app/components/forms/input-radio/MultipleRadiobuttons.vue +31 -25
  24. package/app/components/forms/input-range/InputRangeCore.vue +30 -28
  25. package/app/components/forms/input-range/variants/InputRangeDefault.vue +45 -28
  26. package/app/components/forms/input-range-fancy/InputRangeFancyWithLabel.vue +31 -18
  27. package/app/components/forms/input-select/variants/InputSelectWithLabel.vue +48 -37
  28. package/app/components/forms/input-text/InputTextCore.vue +56 -52
  29. package/app/components/forms/input-text/variants/InputTextAsNumberWithLabel.vue +42 -33
  30. package/app/components/forms/input-text/variants/InputTextWithLabel.vue +51 -42
  31. package/app/components/forms/input-textarea/InputTextareaCore.vue +29 -24
  32. package/app/components/forms/input-textarea/variants/InputTextareaWithLabel.vue +41 -31
  33. package/app/components/forms/toggle-switch/ToggleSwitchCore.vue +43 -25
  34. package/app/components/forms/toggle-switch/ToggleSwitchCoreOld.vue +36 -22
  35. package/app/components/forms/toggle-switch/variants/ToggleSwitchWithLabel.vue +42 -25
  36. package/app/components/forms/toggle-switch/variants/ToggleSwitchWithLabelInline.vue +30 -26
  37. package/nuxt.config.ts +11 -11
  38. package/package.json +2 -2
  39. package/app/assets/styles/setup/typography/vars/_colors.css +0 -14
  40. package/app/assets/styles/setup/variables/index.css +0 -1
@@ -1,11 +1,30 @@
1
1
  <template>
2
- <div class="input-checkbox-radio-options-button" :data-theme="formTheme" :data-size="size" :class="[size, elementClasses, optionsLayout, { error: fieldHasError }]">
3
- <InputCheckboxRadioCore :isButton="true" :type :id :name :required v-model="modelValue" :size :trueValue :falseValue :fieldHasError :theme :ariaDescribedby :displayAsDisc>
2
+ <div
3
+ class="input-checkbox-radio-options-button"
4
+ :data-theme="formTheme"
5
+ :data-size="size"
6
+ :class="[size, elementClasses, optionsLayout, { error: fieldHasError }]"
7
+ >
8
+ <InputCheckboxRadioCore
9
+ :isButton="true"
10
+ :type
11
+ :id
12
+ :name
13
+ :required
14
+ v-model="modelValue"
15
+ :size
16
+ :trueValue
17
+ :falseValue
18
+ :fieldHasError
19
+ :theme
20
+ :ariaDescribedby
21
+ :displayAsDisc
22
+ >
4
23
  <template #checkedIcon>
5
24
  <slot name="checkedIcon"></slot>
6
25
  </template>
7
26
  </InputCheckboxRadioCore>
8
- <label v-if="hasLabelContent" class="input-checkbox-radio-options-button-label" :for="id">
27
+ <label v-if="slots.labelContent" class="input-checkbox-radio-options-button-label" :for="id">
9
28
  <slot name="labelContent"></slot>
10
29
  </label>
11
30
  <label v-else class="input-checkbox-radio-options-button-label" :for="id">{{ label }}</label>
@@ -18,11 +37,11 @@
18
37
  </template>
19
38
 
20
39
  <script setup lang="ts">
21
- import propValidators from '../c12/prop-validators';
40
+ import propValidators from "../c12/prop-validators"
22
41
 
23
42
  const props = defineProps({
24
43
  type: {
25
- type: String as PropType<'checkbox' | 'radio'>,
44
+ type: String as PropType<"checkbox" | "radio">,
26
45
  required: true,
27
46
  },
28
47
  id: {
@@ -55,16 +74,16 @@ const props = defineProps({
55
74
  },
56
75
  size: {
57
76
  type: String as PropType<string>,
58
- default: 'medium',
77
+ default: "medium",
59
78
  validator(value: string) {
60
- return propValidators.size.includes(value);
79
+ return propValidators.size.includes(value)
61
80
  },
62
81
  },
63
82
  optionsLayout: {
64
83
  type: String as PropType<string>,
65
- default: 'equal-widths',
84
+ default: "equal-widths",
66
85
  validator(value: string) {
67
- return propValidators.optionsLayout.includes(value);
86
+ return propValidators.optionsLayout.includes(value)
68
87
  },
69
88
  },
70
89
  styleClassPassthrough: {
@@ -73,16 +92,16 @@ const props = defineProps({
73
92
  },
74
93
  theme: {
75
94
  type: String as PropType<string>,
76
- default: 'primary',
95
+ default: "primary",
77
96
  validator(value: string) {
78
- return propValidators.theme.includes(value);
97
+ return propValidators.theme.includes(value)
79
98
  },
80
99
  },
81
100
  direction: {
82
- type: String as PropType<'row' | 'row-reverse'>,
83
- default: 'row',
101
+ type: String as PropType<"row" | "row-reverse">,
102
+ default: "row",
84
103
  validator(value: string) {
85
- return ['row', 'row-reverse'].includes(value);
104
+ return ["row", "row-reverse"].includes(value)
86
105
  },
87
106
  },
88
107
  ariaDescribedby: {
@@ -93,19 +112,18 @@ const props = defineProps({
93
112
  type: Boolean,
94
113
  default: false,
95
114
  },
96
- });
115
+ })
97
116
 
98
- const slots = useSlots();
99
- const hasLabelContent = computed(() => slots.labelContent !== undefined);
100
- const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
117
+ const slots = useSlots()
118
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
101
119
 
102
- const modelValue = defineModel();
120
+ const modelValue = defineModel()
103
121
 
104
122
  const formTheme = computed(() => {
105
- return props.fieldHasError ? 'error' : props.theme;
106
- });
123
+ return props.fieldHasError ? "error" : props.theme
124
+ })
107
125
 
108
- const flexDirection = ref(props.direction);
126
+ const flexDirection = ref(props.direction)
109
127
  </script>
110
128
 
111
129
  <style lang="css">
@@ -1,12 +1,29 @@
1
1
  <template>
2
- <div class="input-checkbox-radio-with-label" :data-size="size" :class="[elementClasses, optionsLayout, { error: fieldHasError }]">
3
- <InputCheckboxRadioCore :type :id :name :required v-model="modelValue" :size :trueValue :falseValue :fieldHasError :theme :ariaDescribedby :displayAsDisc>
2
+ <div
3
+ class="input-checkbox-radio-with-label"
4
+ :data-size="size"
5
+ :class="[elementClasses, optionsLayout, { error: fieldHasError }]"
6
+ >
7
+ <InputCheckboxRadioCore
8
+ :type
9
+ :id
10
+ :name
11
+ :required
12
+ v-model="modelValue"
13
+ :size
14
+ :trueValue
15
+ :falseValue
16
+ :fieldHasError
17
+ :theme
18
+ :ariaDescribedby
19
+ :displayAsDisc
20
+ >
4
21
  <template #checkedIcon>
5
22
  <slot name="checkedIcon"></slot>
6
23
  </template>
7
24
  </InputCheckboxRadioCore>
8
25
 
9
- <label v-if="hasLabelContent" class="input-checkbox-radio-label body-normal" :for="id">
26
+ <label v-if="slots.labelContent" class="input-checkbox-radio-label body-normal" :for="id">
10
27
  <slot name="labelContent"></slot>
11
28
  </label>
12
29
  <label v-else class="input-checkbox-radio-label body-normal-semibold" :for="id">{{ label }}</label>
@@ -14,11 +31,11 @@
14
31
  </template>
15
32
 
16
33
  <script setup lang="ts">
17
- import propValidators from '../c12/prop-validators';
34
+ import propValidators from "../c12/prop-validators"
18
35
 
19
36
  const props = defineProps({
20
37
  type: {
21
- type: String as PropType<'checkbox' | 'radio'>,
38
+ type: String as PropType<"checkbox" | "radio">,
22
39
  required: true,
23
40
  },
24
41
  name: {
@@ -47,16 +64,16 @@ const props = defineProps({
47
64
  },
48
65
  size: {
49
66
  type: String as PropType<string>,
50
- default: 'medium',
67
+ default: "medium",
51
68
  validator(value: string) {
52
- return propValidators.size.includes(value);
69
+ return propValidators.size.includes(value)
53
70
  },
54
71
  },
55
72
  optionsLayout: {
56
73
  type: String as PropType<string>,
57
- default: 'equal-widths',
74
+ default: "equal-widths",
58
75
  validator(value: string) {
59
- return propValidators.optionsLayout.includes(value);
76
+ return propValidators.optionsLayout.includes(value)
60
77
  },
61
78
  },
62
79
  styleClassPassthrough: {
@@ -65,9 +82,9 @@ const props = defineProps({
65
82
  },
66
83
  theme: {
67
84
  type: String as PropType<string>,
68
- default: 'primary',
85
+ default: "primary",
69
86
  validator(value: string) {
70
- return propValidators.theme.includes(value);
87
+ return propValidators.theme.includes(value)
71
88
  },
72
89
  },
73
90
  ariaDescribedby: {
@@ -78,14 +95,13 @@ const props = defineProps({
78
95
  type: Boolean,
79
96
  default: false,
80
97
  },
81
- });
98
+ })
82
99
 
83
- const slots = useSlots();
84
- const hasLabelContent = computed(() => slots.labelContent !== undefined);
85
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
100
+ const slots = useSlots()
101
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
86
102
 
87
- const modelValue = defineModel();
88
- const id = useId();
103
+ const modelValue = defineModel()
104
+ const id = useId()
89
105
  </script>
90
106
 
91
107
  <style lang="css">
@@ -1,12 +1,12 @@
1
1
  <template>
2
2
  <label :for="id" class="input-label" :class="[elementClasses, inputVariant]">
3
- <slot v-if="hasHtmlLabel" name="htmlLabel"></slot>
4
- <slot v-if="hasTextLabel" name="textLabel"></slot>
3
+ <slot v-if="slots.htmlLabel" name="htmlLabel"></slot>
4
+ <slot v-if="slots.textLabel" name="textLabel"></slot>
5
5
  </label>
6
6
  </template>
7
7
 
8
8
  <script setup lang="ts">
9
- import propValidators from '../c12/prop-validators';
9
+ import propValidators from "../c12/prop-validators"
10
10
 
11
11
  const props = defineProps({
12
12
  id: {
@@ -27,25 +27,23 @@ const props = defineProps({
27
27
  },
28
28
  theme: {
29
29
  type: String as PropType<string>,
30
- default: 'primary',
30
+ default: "primary",
31
31
  validator(value: string) {
32
- return propValidators.theme.includes(value);
32
+ return propValidators.theme.includes(value)
33
33
  },
34
34
  },
35
35
  inputVariant: {
36
36
  type: String as PropType<string>,
37
- default: 'default',
37
+ default: "default",
38
38
  validator(value: string) {
39
- return propValidators.inputVariant.includes(value);
39
+ return propValidators.inputVariant.includes(value)
40
40
  },
41
41
  },
42
- });
42
+ })
43
43
 
44
- const slots = useSlots();
45
- const hasHtmlLabel = computed(() => slots.htmlLabel !== undefined);
46
- const hasTextLabel = computed(() => slots.textLabel !== undefined);
44
+ const slots = useSlots()
47
45
 
48
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
46
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
49
47
  </script>
50
48
 
51
49
  <style lang="css">
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div class="input-number-wrapper" :data-theme="formTheme" :data-size="size">
3
- <div v-if="hasLeftContent" class="slot left">
3
+ <div v-if="slots.left" class="slot left">
4
4
  <slot name="left"></slot>
5
5
  </div>
6
6
 
@@ -13,21 +13,27 @@
13
13
  :min
14
14
  :max
15
15
  :step
16
- :class="[elementClasses, 'input-number-core', `input-number--${theme}`, `input-number--${size}`, `input-number--${weight}`]"
16
+ :class="[
17
+ elementClasses,
18
+ 'input-number-core',
19
+ `input-number--${theme}`,
20
+ `input-number--${size}`,
21
+ `input-number--${weight}`,
22
+ ]"
17
23
  v-model="modelValue"
18
24
  ref="inputField"
19
25
  inputmode="numeric"
20
26
  pattern="[0-9]+"
21
27
  />
22
28
  </div>
23
- <div v-if="hasRightContent" class="slot right">
29
+ <div v-if="slots.right" class="slot right">
24
30
  <slot name="right"></slot>
25
31
  </div>
26
32
  </div>
27
33
  </template>
28
34
 
29
35
  <script setup lang="ts">
30
- import propValidators from '../c12/prop-validators';
36
+ import propValidators from "../c12/prop-validators"
31
37
 
32
38
  const props = defineProps({
33
39
  id: {
@@ -52,7 +58,7 @@ const props = defineProps({
52
58
  },
53
59
  placeholder: {
54
60
  type: String,
55
- default: '',
61
+ default: "",
56
62
  },
57
63
  required: {
58
64
  type: Boolean,
@@ -60,23 +66,23 @@ const props = defineProps({
60
66
  },
61
67
  theme: {
62
68
  type: String as PropType<string>,
63
- default: 'primary',
69
+ default: "primary",
64
70
  validator(value: string) {
65
- return propValidators.theme.includes(value);
71
+ return propValidators.theme.includes(value)
66
72
  },
67
73
  },
68
74
  size: {
69
75
  type: String as PropType<string>,
70
- default: 'medium',
76
+ default: "medium",
71
77
  validator(value: string) {
72
- return propValidators.size.includes(value);
78
+ return propValidators.size.includes(value)
73
79
  },
74
80
  },
75
81
  weight: {
76
82
  type: String as PropType<string>,
77
- default: 'wght-400',
83
+ default: "wght-400",
78
84
  validator(value: string) {
79
- return propValidators.weight.includes(value);
85
+ return propValidators.weight.includes(value)
80
86
  },
81
87
  },
82
88
  fieldHasError: {
@@ -87,20 +93,18 @@ const props = defineProps({
87
93
  type: Array as PropType<string[]>,
88
94
  default: () => [],
89
95
  },
90
- });
96
+ })
91
97
 
92
- const slots = useSlots();
93
- const hasLeftContent = computed(() => slots.left !== undefined);
94
- const hasRightContent = computed(() => slots.right !== undefined);
98
+ const slots = useSlots()
95
99
 
96
100
  const formTheme = computed(() => {
97
- return props.fieldHasError ? 'error' : props.theme;
98
- });
101
+ return props.fieldHasError ? "error" : props.theme
102
+ })
99
103
 
100
- const modelValue = defineModel<number | readonly number[]>();
104
+ const modelValue = defineModel<number | readonly number[]>()
101
105
 
102
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
103
- const minLength = computed(() => `${props.max.toString().length + 1}em`);
106
+ const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
107
+ const minLength = computed(() => `${props.max.toString().length + 1}em`)
104
108
  </script>
105
109
 
106
110
  <style lang="css">
@@ -196,8 +200,8 @@ const minLength = computed(() => `${props.max.toString().length + 1}em`);
196
200
  }
197
201
  }
198
202
 
199
- input[type='number']::-webkit-inner-spin-button,
200
- input[type='number']::-webkit-outer-spin-button {
203
+ input[type="number"]::-webkit-inner-spin-button,
204
+ input[type="number"]::-webkit-outer-spin-button {
201
205
  -webkit-appearance: none;
202
206
  margin: 0;
203
207
  }
@@ -1,15 +1,41 @@
1
1
  <template>
2
- <div class="input-number-with-label" :data-theme="formTheme" :data-size="size" :class="[elementClasses, `theme-${theme}`, { error: fieldHasError }]">
3
- <InputLabel :for="id" :id :theme :name input-variant="normal" :field-has-error :style-class-passthrough="['input-number-label', 'body-normal-bold']">
2
+ <div
3
+ class="input-number-with-label"
4
+ :data-theme="formTheme"
5
+ :data-size="size"
6
+ :class="[elementClasses, `theme-${theme}`, { error: fieldHasError }]"
7
+ >
8
+ <InputLabel
9
+ :for="id"
10
+ :id
11
+ :theme
12
+ :name
13
+ input-variant="normal"
14
+ :field-has-error
15
+ :style-class-passthrough="['input-number-label', 'body-normal-bold']"
16
+ >
4
17
  <template #textLabel>{{ label }}</template>
5
18
  </InputLabel>
6
19
 
7
- <template v-if="hasDescription">
20
+ <template v-if="slots.description">
8
21
  <slot name="description"></slot>
9
22
  </template>
10
23
 
11
- <InputNumberCore v-model="modelValue" :id :name :min :max :step :theme :required :size :weight :fieldHasError :styleClassPassthrough>
12
- <template v-if="hasLeftContent" #left>
24
+ <InputNumberCore
25
+ v-model="modelValue"
26
+ :id
27
+ :name
28
+ :min
29
+ :max
30
+ :step
31
+ :theme
32
+ :required
33
+ :size
34
+ :weight
35
+ :fieldHasError
36
+ :styleClassPassthrough
37
+ >
38
+ <template v-if="slots.left" #left>
13
39
  <InputButtonCore
14
40
  type="button"
15
41
  @click.stop.prevent="updateValue(-step, Number(modelValue) > min)"
@@ -24,7 +50,7 @@
24
50
  </template>
25
51
  </InputButtonCore>
26
52
  </template>
27
- <template v-if="hasRightContent" #right>
53
+ <template v-if="slots.right" #right>
28
54
  <InputButtonCore
29
55
  type="button"
30
56
  @click.stop.prevent="updateValue(step, Number(modelValue) < max)"
@@ -45,7 +71,7 @@
45
71
  </template>
46
72
 
47
73
  <script setup lang="ts">
48
- import propValidators from '../../c12/prop-validators';
74
+ import propValidators from "../../c12/prop-validators"
49
75
 
50
76
  const props = defineProps({
51
77
  name: {
@@ -70,7 +96,7 @@ const props = defineProps({
70
96
  },
71
97
  placeholder: {
72
98
  type: String,
73
- default: '',
99
+ default: "",
74
100
  },
75
101
  errorMessage: {
76
102
  type: [Object, String],
@@ -86,51 +112,48 @@ const props = defineProps({
86
112
  },
87
113
  theme: {
88
114
  type: String as PropType<string>,
89
- default: 'primary',
115
+ default: "primary",
90
116
  validator(value: string) {
91
- return propValidators.theme.includes(value);
117
+ return propValidators.theme.includes(value)
92
118
  },
93
119
  },
94
120
  size: {
95
121
  type: String as PropType<string>,
96
- default: 'medium',
122
+ default: "medium",
97
123
  validator(value: string) {
98
- return propValidators.size.includes(value);
124
+ return propValidators.size.includes(value)
99
125
  },
100
126
  },
101
127
  weight: {
102
128
  type: String as PropType<string>,
103
- default: 'wght-400',
129
+ default: "wght-400",
104
130
  validator(value: string) {
105
- return propValidators.weight.includes(value);
131
+ return propValidators.weight.includes(value)
106
132
  },
107
133
  },
108
134
  styleClassPassthrough: {
109
135
  type: Array as PropType<string[]>,
110
136
  default: () => [],
111
137
  },
112
- });
138
+ })
113
139
 
114
- const slots = useSlots();
115
- const hasDescription = computed(() => slots.description !== undefined);
116
- const hasLeftContent = computed(() => slots.left !== undefined);
117
- const hasRightContent = computed(() => slots.right !== undefined);
118
- const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
140
+ const slots = useSlots()
141
+ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
119
142
 
120
- const id = useId();
143
+ const id = useId()
121
144
  const formTheme = computed(() => {
122
- return props.fieldHasError ? 'error' : props.theme;
123
- });
145
+ return props.fieldHasError ? "error" : props.theme
146
+ })
124
147
 
125
- const modelValue = defineModel<number | readonly number[]>();
148
+ const modelValue = defineModel<number | readonly number[]>()
126
149
 
127
150
  const updateValue = (step: number, withinRangeLimit: boolean) => {
128
151
  if (withinRangeLimit) {
129
- modelValue.value = (Number(modelValue.value) + step) as number;
152
+ modelValue.value = (Number(modelValue.value) + step) as number
130
153
  }
131
- };
154
+ }
132
155
 
133
- updateElementClasses(['has-left-button', 'has-right-button']);
156
+ updateElementClasses(["has-left-button", "has-right-button"])
134
157
  </script>
135
158
 
136
159
  <style lang="css">
@@ -1,5 +1,13 @@
1
1
  <template>
2
- <FormFieldset :id :name :legend :fieldHasError :required :data-testid :styleClassPassthrough="['multiple-radiobuttons-fieldset']">
2
+ <FormFieldset
3
+ :id
4
+ :name
5
+ :legend
6
+ :fieldHasError
7
+ :required
8
+ :data-testid
9
+ :styleClassPassthrough="['multiple-radiobuttons-fieldset']"
10
+ >
3
11
  <template #description>
4
12
  <slot name="description"></slot>
5
13
  </template>
@@ -59,13 +67,13 @@
59
67
  </template>
60
68
 
61
69
  <script setup lang="ts">
62
- import propValidators from '../c12/prop-validators';
63
- import type { IFormMultipleOptions } from '../../../../shared/types/types.forms';
70
+ import propValidators from "../c12/prop-validators"
71
+ import type { IFormMultipleOptions } from "../../../../shared/types/types.forms"
64
72
 
65
73
  const props = defineProps({
66
74
  dataTestid: {
67
75
  type: String,
68
- default: 'multiple-radio-buttons',
76
+ default: "multiple-radio-buttons",
69
77
  },
70
78
  name: {
71
79
  type: String,
@@ -81,7 +89,7 @@ const props = defineProps({
81
89
  },
82
90
  placeholder: {
83
91
  type: String,
84
- default: '',
92
+ default: "",
85
93
  },
86
94
  isButton: {
87
95
  type: Boolean,
@@ -105,16 +113,16 @@ const props = defineProps({
105
113
  },
106
114
  size: {
107
115
  type: String as PropType<string>,
108
- default: 'medium',
116
+ default: "medium",
109
117
  validator(value: string) {
110
- return propValidators.size.includes(value);
118
+ return propValidators.size.includes(value)
111
119
  },
112
120
  },
113
121
  optionsLayout: {
114
122
  type: String as PropType<string>,
115
- default: 'equal-widths',
123
+ default: "equal-widths",
116
124
  validator(value: string) {
117
- return propValidators.optionsLayout.includes(value);
125
+ return propValidators.optionsLayout.includes(value)
118
126
  },
119
127
  },
120
128
  equalCols: {
@@ -127,33 +135,31 @@ const props = defineProps({
127
135
  },
128
136
  theme: {
129
137
  type: String as PropType<string>,
130
- default: 'primary',
138
+ default: "primary",
131
139
  validator(value: string) {
132
- return propValidators.theme.includes(value);
140
+ return propValidators.theme.includes(value)
133
141
  },
134
142
  },
135
143
  direction: {
136
- type: String as PropType<'row' | 'row-reverse'>,
137
- default: 'row',
144
+ type: String as PropType<"row" | "row-reverse">,
145
+ default: "row",
138
146
  validator(value: string) {
139
- return ['row', 'row-reverse'].includes(value);
147
+ return ["row", "row-reverse"].includes(value)
140
148
  },
141
149
  },
142
- });
150
+ })
143
151
 
144
- const slots = useSlots();
145
- const hasDescriptionSlot = computed(() => slots.description !== undefined);
146
- const { elementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
152
+ const slots = useSlots()
147
153
 
148
- const id = `${props.name}-input-${useId()}`;
149
- const errorId = `${name}-error-message`;
154
+ const id = `${props.name}-input-${useId()}`
155
+ const errorId = `${name}-error-message`
150
156
  const ariaDescribedby = computed(() => {
151
- const ariaDescribedbyId = hasDescriptionSlot.value ? `${id}-description` : undefined;
152
- return props.fieldHasError ? errorId : ariaDescribedbyId;
153
- });
157
+ const ariaDescribedbyId = slots.description ? `${id}-description` : undefined
158
+ return props.fieldHasError ? errorId : ariaDescribedbyId
159
+ })
154
160
 
155
- const modelValue = defineModel();
156
- const fieldData = defineModel('fieldData') as Ref<IFormMultipleOptions>;
161
+ const modelValue = defineModel()
162
+ const fieldData = defineModel("fieldData") as Ref<IFormMultipleOptions>
157
163
  </script>
158
164
 
159
165
  <style lang="css">