srcdev-nuxt-forms 2.1.40 → 2.1.42

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.
@@ -98,6 +98,7 @@ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(styleC
98
98
 
99
99
  .toggle-switch-label {
100
100
  display: block;
101
+ white-space: nowrap;
101
102
  }
102
103
  }
103
104
  </style>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <ToggleSwitchWithLabelInline v-model="displayMode" id="dark-mode-switcher" name="dark-mode-switcher" label="Toggle Dark mode (inline)" size="small">
2
+ <ToggleSwitchWithLabelInline v-model="displayMode" :id :name :label labelWeight="normal" :size trueValue="dark" falseValue="light" :style-class-passthrough>
3
3
  <template #iconOn>
4
4
  <Icon name="radix-icons:moon" class="icon" />
5
5
  </template>
@@ -10,7 +10,35 @@
10
10
  </template>
11
11
 
12
12
  <script setup lang="ts">
13
+ import propValidators from '../../forms/c12/prop-validators';
14
+
13
15
  const { styleClassPassthrough } = defineProps({
16
+ id: {
17
+ type: String,
18
+ required: true,
19
+ },
20
+ name: {
21
+ type: String,
22
+ required: true,
23
+ },
24
+ label: {
25
+ type: String,
26
+ required: true,
27
+ },
28
+ labelWeight: {
29
+ type: String as PropType<string>,
30
+ default: 'semi-bold',
31
+ validator(value: string) {
32
+ return propValidators.labelWeight.includes(value);
33
+ },
34
+ },
35
+ size: {
36
+ type: String as PropType<string>,
37
+ default: 'small',
38
+ validator(value: string) {
39
+ return propValidators.size.includes(value);
40
+ },
41
+ },
14
42
  styleClassPassthrough: {
15
43
  type: Array as PropType<string[]>,
16
44
  default: () => [],
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-forms",
3
3
  "type": "module",
4
- "version": "2.1.40",
4
+ "version": "2.1.42",
5
5
  "main": "nuxt.config.ts",
6
6
  "scripts": {
7
7
  "clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",