@mixd-id/web-scaffold 0.1.2301231345 → 0.1.2301231346
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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<slot name="start"></slot>
|
|
4
4
|
<input :type="type" :disabled="isDisabled" @focus="isActive = true" @blur="onBlur"
|
|
5
5
|
:placeholder="placeholder" :maxlength="maxlength" ref="input" autocomplete="new-password"
|
|
6
|
-
:value="modelValue ?? value" @input="onInput"
|
|
6
|
+
:value="modelValue ?? value" @input="onInput" :readonly="Boolean(readonly)"
|
|
7
7
|
@keydown="onKeyDown"/>
|
|
8
8
|
<div v-if="!!(errors)">
|
|
9
9
|
<svg :class="$style.svg" width="24" height="24" class="fill-red-500" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -62,6 +62,7 @@ export default{
|
|
|
62
62
|
value: String,
|
|
63
63
|
|
|
64
64
|
placeholder: [ String, Number ],
|
|
65
|
+
readonly: undefined,
|
|
65
66
|
maxlength: String,
|
|
66
67
|
type: String,
|
|
67
68
|
|
|
@@ -91,7 +92,7 @@ export default{
|
|
|
91
92
|
return this.customClass ?? [
|
|
92
93
|
this.$style.textbox,
|
|
93
94
|
this.$style['state-' + this.computedState],
|
|
94
|
-
this.isActive ? this.$style.active : '',
|
|
95
|
+
this.isActive && !this.readonly ? this.$style.active : '',
|
|
95
96
|
this.align ? this.$style['align-' + this.align] : '',
|
|
96
97
|
this.size ? this.$style['size-' + this.size] : ''
|
|
97
98
|
].join(' ')
|
|
@@ -162,6 +163,10 @@ export default{
|
|
|
162
163
|
@apply flex items-center border-[1px] border-text-200 bg-base-50 rounded-lg overflow-hidden;
|
|
163
164
|
}
|
|
164
165
|
|
|
166
|
+
.textbox input:read-only{
|
|
167
|
+
@apply bg-text-50;
|
|
168
|
+
}
|
|
169
|
+
|
|
165
170
|
.size-sm{ @apply min-h-[var(--h-cp-sm)]; }
|
|
166
171
|
.size-sm input{ @apply text-sm; }
|
|
167
172
|
|