@avakhula/ui 0.0.154 → 0.0.156
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/dist/index.js +182 -177
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +26 -16
- package/src/components/Form/Input/Input.vue +6 -3
- package/src/components/Form/Label/Label.vue +3 -3
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
<form action="">
|
|
3
|
+
|
|
4
|
+
<ib-form-group class="form-group">
|
|
5
|
+
<ib-label for="email" required>
|
|
6
|
+
Email address
|
|
7
|
+
</ib-label>
|
|
8
|
+
|
|
9
|
+
<ib-input required autofocus type="email" id="email" name="email" ref="email" :disabled="disabled"
|
|
10
|
+
placeholder="Enter your email address" />
|
|
11
|
+
</ib-form-group>
|
|
12
|
+
|
|
13
|
+
<ib-form-group class="form-group">
|
|
14
|
+
<ib-label for="password" required>
|
|
15
|
+
Password
|
|
16
|
+
</ib-label>
|
|
17
|
+
|
|
18
|
+
<ib-input required autofocus type="password" id="password" name="password" :disabled="disabled" />
|
|
19
|
+
</ib-form-group>
|
|
20
|
+
</form>
|
|
21
|
+
|
|
22
|
+
<button type="button" @click="() => disabled = !disabled">Disbaled</button>
|
|
18
23
|
</template>
|
|
19
24
|
|
|
20
25
|
<script>
|
|
@@ -24,6 +29,11 @@ import IbFormGroup from "./components/Form/FormGroup/FormGroup.vue"
|
|
|
24
29
|
|
|
25
30
|
|
|
26
31
|
export default {
|
|
32
|
+
data() {
|
|
33
|
+
return {
|
|
34
|
+
disabled: false,
|
|
35
|
+
}
|
|
36
|
+
},
|
|
27
37
|
components: {
|
|
28
38
|
IbInput, IbLabel, IbFormGroup
|
|
29
39
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<input
|
|
7
7
|
v-bind="attrs"
|
|
8
8
|
v-model="actualValue"
|
|
9
|
+
ref="field"
|
|
9
10
|
:readonly="readonly"
|
|
10
11
|
:disabled="disabled"
|
|
11
12
|
:id="id"
|
|
@@ -13,7 +14,6 @@
|
|
|
13
14
|
@input="onInput($event)"
|
|
14
15
|
@blur="onBlur($event)"
|
|
15
16
|
@focus="onFocus($event)"
|
|
16
|
-
@keypress.stop
|
|
17
17
|
/>
|
|
18
18
|
|
|
19
19
|
<ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
|
|
@@ -21,10 +21,12 @@
|
|
|
21
21
|
<ib-icon-button
|
|
22
22
|
kind="ghost"
|
|
23
23
|
class="button-clear"
|
|
24
|
-
prevent-default
|
|
25
24
|
:disabled="readonly"
|
|
26
25
|
:help-text="clearButtonMessage"
|
|
27
|
-
|
|
26
|
+
prevent-default
|
|
27
|
+
type="button"
|
|
28
|
+
@click="clearInput"
|
|
29
|
+
@keypress.enter="clearInput"
|
|
28
30
|
v-if="actualValue?.length && type !== 'password' && showClearButton"
|
|
29
31
|
>
|
|
30
32
|
<ib-icon name="close-outline"></ib-icon>
|
|
@@ -34,6 +36,7 @@
|
|
|
34
36
|
kind="ghost"
|
|
35
37
|
class="toggle-password"
|
|
36
38
|
prevent-default
|
|
39
|
+
type="button"
|
|
37
40
|
:disabled="readonly"
|
|
38
41
|
:help-text="showPassword ? hidePasswordMessage : showPasswordMessage"
|
|
39
42
|
@click.prevent="toggleShowPassword"
|
|
@@ -40,9 +40,9 @@ export default {
|
|
|
40
40
|
},
|
|
41
41
|
},
|
|
42
42
|
mounted() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
this.$globalEvents.$on(`label:disabled:${this.for}`, (value) => {
|
|
44
|
+
this.disabled = value;
|
|
45
|
+
});
|
|
46
46
|
},
|
|
47
47
|
data() {
|
|
48
48
|
return {
|