@indielayer/ui 1.15.0 → 1.15.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.
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const _default: "1.15.0";
1
+ declare const _default: "1.15.1";
2
2
  export default _default;
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const e = "1.15.0";
1
+ const e = "1.15.1";
2
2
  export {
3
3
  e as default
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indielayer/ui",
3
- "version": "1.15.0",
3
+ "version": "1.15.1",
4
4
  "description": "Indielayer UI Components with Tailwind CSS build for Vue 3",
5
5
  "author": {
6
6
  "name": "João Teixeira",
@@ -119,6 +119,12 @@ const currentLength = computed(() => {
119
119
 
120
120
  const showClearIcon = computed(() => props.clearable && props.modelValue !== '')
121
121
 
122
+ function isEmpty(value: typeof props.modelValue) {
123
+ if (typeof value === 'undefined' || value === null) return true
124
+
125
+ return false
126
+ }
127
+
122
128
  const { styles, classes, className } = useTheme('Textarea', {}, props, { errorInternal })
123
129
 
124
130
  defineExpose({ focus, blur, reset, validate, setError })
@@ -161,7 +167,7 @@ defineExpose({ focus, blur, reset, validate, setError })
161
167
  :name="name"
162
168
  :placeholder="placeholder"
163
169
  :readonly="readonly"
164
- :value="typeof modelValue !== 'undefined' ? String(modelValue) : ''"
170
+ :value="isEmpty(modelValue) ? '' : String(modelValue)"
165
171
  v-bind="dataAttrs"
166
172
  v-on="inputListeners"
167
173
  @keydown.enter="onEnter"
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export default '1.15.0'
1
+ export default '1.15.1'