srcdev-nuxt-forms 6.1.18 → 6.1.19

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.
@@ -40,7 +40,7 @@
40
40
  :showError="fieldHasError"
41
41
  :id="errorId"
42
42
  :isDetached="true"
43
- :styleClassPassthrough="inputErrorStyles"
43
+ :styleClassPassthrough="elementClasses"
44
44
  />
45
45
  </template>
46
46
  </FormFieldset>
@@ -126,7 +126,9 @@ const slots = useSlots()
126
126
 
127
127
  const modelValue = defineModel()
128
128
 
129
- const inputErrorStyles = ref<string[]>(props.styleClassPassthrough)
129
+ const { elementClasses, updateElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
130
+
131
+ // const inputErrorStyles = ref(styleClassPassthroughRef.value)
130
132
 
131
133
  const id = `${props.name}-input-${useId()}`
132
134
  const errorId = `${name}-error-message`
@@ -137,9 +139,7 @@ const ariaDescribedby = computed(() => {
137
139
 
138
140
  watchEffect(() => {
139
141
  if (!slots.description && props.fieldHasError) {
140
- inputErrorStyles.value.push("mbs-12")
141
- } else {
142
- inputErrorStyles.value = inputErrorStyles.value.filter((style) => style !== "mbs-12")
142
+ updateElementClasses(["mbs-12"])
143
143
  }
144
144
  })
145
145
  </script>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "srcdev-nuxt-forms",
3
3
  "type": "module",
4
- "version": "6.1.18",
4
+ "version": "6.1.19",
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",