vunor 0.0.2 → 0.0.3

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vunor",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -60,6 +60,7 @@ function focusInput(event: MouseEvent) {
60
60
  'segmented': groupItem,
61
61
  }"
62
62
  v-bind="attrs"
63
+ :data-has-value="!!modelValue"
63
64
  :data-active="focused || active"
64
65
  >
65
66
  <span class="i8-underline" />
@@ -74,7 +75,7 @@ function focusInput(event: MouseEvent) {
74
75
  'i8-icon-clickable': !!onPrependClick,
75
76
  }"
76
77
  >
77
- <slot name="prepend" v-bind="attrs">
78
+ <slot name="prepend" v-bind="attrs" :data-has-value="!!modelValue">
78
79
  <VuIcon :name="iconPrepend!" @click="emit('prependClick', $event)" />
79
80
  </slot>
80
81
  </div>
@@ -123,6 +124,7 @@ function focusInput(event: MouseEvent) {
123
124
  <slot
124
125
  name="append"
125
126
  v-bind="attrs"
127
+ :data-has-value="!!modelValue"
126
128
  :emitClick="(event: MouseEvent) => emit('appendClick', event)"
127
129
  :iconAppend
128
130
  >
@@ -94,14 +94,11 @@ export function useInputDataAttrs() {
94
94
  const instance = getCurrentInstance() as unknown as
95
95
  | {
96
96
  props: TInputProps
97
- setupState?: { modelValue: string | number | undefined }
98
97
  }
99
98
  | undefined
100
99
  return computed(() => ({
101
100
  'data-has-label': instance?.props.label ? '' : undefined,
102
101
  'data-has-placeholder': instance?.props.placeholder ? '' : undefined,
103
- 'data-has-value':
104
- instance?.setupState?.modelValue || instance?.setupState?.modelValue === 0 ? '' : undefined,
105
102
  'data-type': instance?.props.type ?? 'text',
106
103
  'aria-disabled': instance?.props.disabled ? true : undefined,
107
104
  }))