@avakhula/ui 0.0.174 → 0.0.175
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 +180 -180
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +11 -50
- package/src/components/Alert/Alert.vue +6 -4
- package/src/components/Alert/alert.scss +19 -0
- package/src/components/Form/Input/Input.vue +9 -11
- package/src/components/Form/Input/input.scss +11 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,59 +1,20 @@
|
|
|
1
|
+
|
|
1
2
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<
|
|
4
|
-
|
|
3
|
+
<form>
|
|
4
|
+
<!-- <ib-input required autofocus type="email" id="email" name="email" ref="email" /> -->
|
|
5
|
+
<ib-input name="password" type="password" />
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
</div>
|
|
7
|
+
<input type="text" name="username" />
|
|
8
|
+
<input type="password" name="password" />
|
|
9
|
+
<input type="submit" name="Login">
|
|
10
|
+
</form>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
|
-
import
|
|
15
|
-
import { TooltipDirective as Tooltip } from "./directives/tooltip/tooltip";
|
|
16
|
-
|
|
17
|
-
import IbIconButton from "./components/IconButton/IconButton.vue";
|
|
18
|
-
import IbIcon from "./components/Icon.vue"
|
|
14
|
+
import IbInput from "./components/Form/Input/input.vue";
|
|
19
15
|
export default {
|
|
20
|
-
data() {
|
|
21
|
-
return {
|
|
22
|
-
items: [
|
|
23
|
-
{ id: 1, name: "Item 1" },
|
|
24
|
-
{ id: 2, name: "Item 2" },
|
|
25
|
-
{ id: 3, name: "Item 3" },
|
|
26
|
-
{ id: 4, name: "Item 4" },
|
|
27
|
-
{ id: 5, name: "Item 5" },
|
|
28
|
-
],
|
|
29
|
-
};
|
|
30
|
-
},
|
|
31
|
-
methods: {
|
|
32
|
-
deleteItem(id) {
|
|
33
|
-
const idx = this.items.findIndex((item) => item.id === id);
|
|
34
|
-
this.items.splice(idx, 1);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
directives: {
|
|
38
|
-
TextOverflowTooltip,
|
|
39
|
-
Tooltip
|
|
40
|
-
},
|
|
41
16
|
components: {
|
|
42
|
-
|
|
43
|
-
IbIcon
|
|
17
|
+
IbInput
|
|
44
18
|
}
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style lang="scss">
|
|
49
|
-
@import "./assets/scss/mixins.scss";
|
|
50
|
-
|
|
51
|
-
.hello {
|
|
52
|
-
padding: 200px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.test {
|
|
56
|
-
max-width: 20px;
|
|
57
|
-
@include lineClamp(1);
|
|
58
19
|
}
|
|
59
|
-
</
|
|
20
|
+
</script>
|
|
@@ -90,10 +90,12 @@ export default {
|
|
|
90
90
|
this.$refs.content.classList.remove("large");
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
if (parseInt(contentStyle.height) > 37 &&
|
|
94
|
-
this.
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
if (parseInt(contentStyle.height) > 37 && this.showIcon) {
|
|
94
|
+
if (this.title.length) {
|
|
95
|
+
this.$refs.content.classList.add("large");
|
|
96
|
+
} else {
|
|
97
|
+
this.$refs.content.classList.add("medium");
|
|
98
|
+
}
|
|
97
99
|
}
|
|
98
100
|
},
|
|
99
101
|
},
|
|
@@ -97,6 +97,25 @@ $alert-success-secondary-color: $green-50;
|
|
|
97
97
|
padding-left: 0;
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
&.medium {
|
|
102
|
+
align-items: start;
|
|
103
|
+
padding-left: 3px;
|
|
104
|
+
padding-right: 5px;
|
|
105
|
+
|
|
106
|
+
.text-content {
|
|
107
|
+
@include Ib-P1-regular;
|
|
108
|
+
margin-bottom: 5px;
|
|
109
|
+
padding-left: 0!important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
& + .close-button {
|
|
113
|
+
position: absolute;
|
|
114
|
+
right: 10px;
|
|
115
|
+
top: 10px;
|
|
116
|
+
transform: translateY(0);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
100
119
|
}
|
|
101
120
|
|
|
102
121
|
&.has-icon {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
<ib-alert v-if="errorMessage">{{ errorMessage }}</ib-alert>
|
|
4
4
|
|
|
5
5
|
<div class="ib-input-wrapper" :class="{ 'has-settings': hasSettings }">
|
|
6
|
+
<ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
|
|
7
|
+
|
|
6
8
|
<input
|
|
7
9
|
v-bind="attrs"
|
|
8
10
|
v-model="actualValue"
|
|
@@ -14,11 +16,8 @@
|
|
|
14
16
|
@input="onInput($event)"
|
|
15
17
|
@blur="onBlur($event)"
|
|
16
18
|
@focus="onFocus($event)"
|
|
17
|
-
@change="onChange($event)"
|
|
18
19
|
/>
|
|
19
20
|
|
|
20
|
-
<ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
|
|
21
|
-
|
|
22
21
|
<ib-icon-button
|
|
23
22
|
kind="ghost"
|
|
24
23
|
class="button-clear"
|
|
@@ -28,7 +27,8 @@
|
|
|
28
27
|
type="button"
|
|
29
28
|
@click="clearInput"
|
|
30
29
|
@keypress.enter="clearInput"
|
|
31
|
-
v-if="
|
|
30
|
+
v-if="type !== 'password' && showClearButton"
|
|
31
|
+
v-show="actualValue?.length"
|
|
32
32
|
>
|
|
33
33
|
<ib-icon name="close-outline"></ib-icon>
|
|
34
34
|
</ib-icon-button>
|
|
@@ -41,7 +41,8 @@
|
|
|
41
41
|
:disabled="readonly || disabled"
|
|
42
42
|
:help-text="showPassword ? hidePasswordMessage : showPasswordMessage"
|
|
43
43
|
@click.prevent="toggleShowPassword"
|
|
44
|
-
v-if="
|
|
44
|
+
v-if="type === 'password'"
|
|
45
|
+
v-show="actualValue?.length"
|
|
45
46
|
>
|
|
46
47
|
<ib-icon
|
|
47
48
|
:name="showPassword ? 'eye-off-outline' : 'eye-outline'"
|
|
@@ -83,6 +84,7 @@ import IbDropdown from "../../Dropdown/Dropdown.vue";
|
|
|
83
84
|
import { inputTypeOptions } from "./constants";
|
|
84
85
|
import generateUID from "../../../helpers/generateUID";
|
|
85
86
|
import removeEvents from "../../../helpers/removeEvents";
|
|
87
|
+
|
|
86
88
|
import {
|
|
87
89
|
verticalPosition,
|
|
88
90
|
horizontalPosition,
|
|
@@ -196,10 +198,6 @@ export default {
|
|
|
196
198
|
this.$emit("input", this.actualValue);
|
|
197
199
|
}
|
|
198
200
|
},
|
|
199
|
-
onChange(event) {
|
|
200
|
-
this.actualValue = event.target.value;
|
|
201
|
-
this.$emit("focus", event.target.value);
|
|
202
|
-
},
|
|
203
201
|
delayedInput(value) {
|
|
204
202
|
if (this.timer) {
|
|
205
203
|
clearTimeout(this.timer);
|
|
@@ -245,8 +243,8 @@ export default {
|
|
|
245
243
|
value(newVal) {
|
|
246
244
|
this.actualValue = newVal;
|
|
247
245
|
},
|
|
248
|
-
disabled(
|
|
249
|
-
this.$globalEvents.$emit(`label:disabled:${this.id}`,
|
|
246
|
+
disabled(newVal) {
|
|
247
|
+
this.$globalEvents.$emit(`label:disabled:${this.id}`, newVal);
|
|
250
248
|
},
|
|
251
249
|
},
|
|
252
250
|
emits: [
|
|
@@ -83,7 +83,7 @@ $input-border-error-color: $red-800;
|
|
|
83
83
|
outline: none;
|
|
84
84
|
border-bottom: 1px solid $input-border-color;
|
|
85
85
|
transition: color 0.3s, border-radius 0.3s, border-bottom-color 0.3s,
|
|
86
|
-
|
|
86
|
+
background-color 0.3s;
|
|
87
87
|
|
|
88
88
|
&::placeholder {
|
|
89
89
|
@include Ib-H4-regular-italic;
|
|
@@ -100,6 +100,16 @@ $input-border-error-color: $red-800;
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
&:-webkit-autofill {
|
|
104
|
+
& + .button-clear {
|
|
105
|
+
display: block!important;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
& + .toggle-password{
|
|
109
|
+
display: block!important;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
103
113
|
&:disabled {
|
|
104
114
|
color: $input-disabled-color;
|
|
105
115
|
background-color: $input-disabled-bg;
|