@vue-interface/input-field 1.0.0-beta.0 → 1.0.0-beta.2
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/{index.js → dist/index.d.ts} +1 -4
- package/dist/input-field.js +802 -0
- package/dist/input-field.umd.cjs +1 -0
- package/dist/src/InputField.vue.d.ts +249 -0
- package/dist/style.css +1 -0
- package/package.json +15 -7
- package/dist/input-field.css +0 -1
- package/dist/input-field.es.js +0 -510
- package/dist/input-field.umd.js +0 -14
- package/src/InputField.vue +0 -181
package/src/InputField.vue
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="formGroupClasses">
|
|
3
|
-
<slot name="label">
|
|
4
|
-
<label
|
|
5
|
-
v-if="label"
|
|
6
|
-
ref="label"
|
|
7
|
-
:for="id"
|
|
8
|
-
:class="labelClass"
|
|
9
|
-
@click="focus"
|
|
10
|
-
v-html="label" />
|
|
11
|
-
</slot>
|
|
12
|
-
|
|
13
|
-
<div class="form-group-inner">
|
|
14
|
-
<slot name="control" :bind-events="bindEvents" :control-attributes="controlAttributes" :focus="focus">
|
|
15
|
-
<div v-if="$slots.icon" class="form-group-inner-icon" @click="focus">
|
|
16
|
-
<slot name="icon" />
|
|
17
|
-
</div>
|
|
18
|
-
<input ref="field" v-bind-events v-bind="controlAttributes">
|
|
19
|
-
</slot>
|
|
20
|
-
|
|
21
|
-
<slot name="activity">
|
|
22
|
-
<transition name="input-field-fade">
|
|
23
|
-
<activity-indicator
|
|
24
|
-
v-if="activity"
|
|
25
|
-
key="activity"
|
|
26
|
-
ref="activity"
|
|
27
|
-
:type="indicator"
|
|
28
|
-
:size="indicatorSize || size" />
|
|
29
|
-
</transition>
|
|
30
|
-
</slot>
|
|
31
|
-
</div>
|
|
32
|
-
|
|
33
|
-
<slot name="feedback">
|
|
34
|
-
<div
|
|
35
|
-
v-if="invalidFeedback"
|
|
36
|
-
class="invalid-feedback"
|
|
37
|
-
invalid
|
|
38
|
-
v-html="invalidFeedback" />
|
|
39
|
-
<div
|
|
40
|
-
v-else-if="validFeedback"
|
|
41
|
-
class="valid-feedback"
|
|
42
|
-
valid
|
|
43
|
-
v-html="validFeedback" />
|
|
44
|
-
</slot>
|
|
45
|
-
|
|
46
|
-
<slot name="help">
|
|
47
|
-
<small v-if="helpText" ref="help">
|
|
48
|
-
{{ helpText }}
|
|
49
|
-
</small>
|
|
50
|
-
</slot>
|
|
51
|
-
</div>
|
|
52
|
-
</template>
|
|
53
|
-
|
|
54
|
-
<script>
|
|
55
|
-
import FormControl from '@vue-interface/form-control/src/FormControl';
|
|
56
|
-
import { ActivityIndicator } from '@vue-interface/activity-indicator';
|
|
57
|
-
|
|
58
|
-
export default {
|
|
59
|
-
|
|
60
|
-
name: 'InputField',
|
|
61
|
-
|
|
62
|
-
components: {
|
|
63
|
-
ActivityIndicator
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
mixins: [
|
|
67
|
-
FormControl
|
|
68
|
-
]
|
|
69
|
-
|
|
70
|
-
};
|
|
71
|
-
</script>
|
|
72
|
-
|
|
73
|
-
<style>
|
|
74
|
-
.input-field,
|
|
75
|
-
.input-field .form-group-inner {
|
|
76
|
-
position: relative;
|
|
77
|
-
transition: all .25s ease-in-out;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.input-field .activity-indicator {
|
|
81
|
-
position: absolute;
|
|
82
|
-
right: 0;
|
|
83
|
-
top: 50%;
|
|
84
|
-
transform: translate(-1rem, -50%);
|
|
85
|
-
transition: all .15s ease-in;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.input-field .activity-indicator-xs {
|
|
89
|
-
font-size: .5em;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.input-field.has-activity .form-control-xs {
|
|
93
|
-
padding-right: 3.75em;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.input-field .activity-indicator-sm {
|
|
97
|
-
font-size: .5em;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.input-field.has-activity .form-control-sm {
|
|
101
|
-
padding-right: 3em;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.input-field .activity-indicator-md {
|
|
105
|
-
font-size: .666em;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.input-field.has-activity .form-control-md {
|
|
109
|
-
padding-right: 3em;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.input-field .activity-indicator-lg {
|
|
113
|
-
font-size: .75em;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.input-field.has-activity .form-control-lg {
|
|
117
|
-
padding-right: 3em;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.input-field .activity-indicator-xl {
|
|
121
|
-
font-size: 1em;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.input-field.has-activity .activity-indicator-xl ~ .form-control-xl {
|
|
125
|
-
padding-right: 3.75em;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.input-field .activity-indicator {
|
|
129
|
-
opacity: 1;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.input-field .input-field-fade-enter,
|
|
133
|
-
.input-field .input-field-fade-leave-to {
|
|
134
|
-
opacity: 0;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
.input-field.is-valid .valid-feedback,
|
|
138
|
-
.input-field.is-invalid .invalid-feedback {
|
|
139
|
-
display: flex;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.input-field .form-control-icon {
|
|
143
|
-
padding-left: 2em;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.input-field .form-group-inner-icon {
|
|
147
|
-
position: absolute;
|
|
148
|
-
top: 50%;
|
|
149
|
-
left: .666em;
|
|
150
|
-
width: 1rem;
|
|
151
|
-
font-size: 1em;
|
|
152
|
-
transform: translateY(-50%);
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: center;
|
|
155
|
-
justify-content: center;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
.input-field-sm .form-group-inner-icon {
|
|
159
|
-
position: absolute;
|
|
160
|
-
top: 50%;
|
|
161
|
-
left: .666rem;
|
|
162
|
-
width: .75em;
|
|
163
|
-
font-size: 1.5em;
|
|
164
|
-
transform: translateY(-50%);
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
justify-content: center;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.input-field-lg .form-group-inner-icon {
|
|
171
|
-
position: absolute;
|
|
172
|
-
top: 50%;
|
|
173
|
-
left: .666rem;
|
|
174
|
-
width: 1.25em;
|
|
175
|
-
font-size: 1em;
|
|
176
|
-
transform: translateY(-50%);
|
|
177
|
-
display: flex;
|
|
178
|
-
align-items: center;
|
|
179
|
-
justify-content: center;
|
|
180
|
-
}
|
|
181
|
-
</style>
|