@avakhula/ui 0.0.168 → 0.0.170
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 +11 -6
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +45 -19
- package/src/components/Form/Input/Input.vue +8 -4
- package/src/components/Form/Input/input.scss +9 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,33 +1,59 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<div class="hello">
|
|
3
|
+
<div v-for="item in items" :key="item.id">
|
|
4
|
+
{{ item.name }}
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
</template>
|
|
10
|
-
</ib-select>
|
|
6
|
+
<ib-icon-button @click="deleteItem(item.id)" v-tooltip="'DELETE'">
|
|
7
|
+
<ib-icon name="close-outline" />
|
|
8
|
+
</ib-icon-button>
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script>
|
|
14
|
-
import
|
|
14
|
+
import { TextOverflowTooltipDirective as TextOverflowTooltip } from "./directives/tooltip/textOverflowTooltip";
|
|
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"
|
|
15
19
|
export default {
|
|
16
20
|
data() {
|
|
17
21
|
return {
|
|
18
|
-
|
|
19
|
-
|
|
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
|
+
};
|
|
20
30
|
},
|
|
21
31
|
methods: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
28
40
|
},
|
|
29
41
|
components: {
|
|
30
|
-
|
|
42
|
+
IbIconButton,
|
|
43
|
+
IbIcon
|
|
31
44
|
}
|
|
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);
|
|
32
58
|
}
|
|
33
|
-
</
|
|
59
|
+
</style>
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
@input="onInput($event)"
|
|
15
15
|
@blur="onBlur($event)"
|
|
16
16
|
@focus="onFocus($event)"
|
|
17
|
+
@change="onChange($event)"
|
|
17
18
|
/>
|
|
18
19
|
|
|
19
20
|
<ib-icon v-if="showIcon" class="icon-search" name="search-outline" />
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
<ib-icon-button
|
|
22
23
|
kind="ghost"
|
|
23
24
|
class="button-clear"
|
|
24
|
-
:disabled="readonly"
|
|
25
|
+
:disabled="readonly || disabled"
|
|
25
26
|
:help-text="clearButtonMessage"
|
|
26
27
|
prevent-default
|
|
27
28
|
type="button"
|
|
@@ -37,7 +38,7 @@
|
|
|
37
38
|
class="toggle-password"
|
|
38
39
|
prevent-default
|
|
39
40
|
type="button"
|
|
40
|
-
:disabled="readonly"
|
|
41
|
+
:disabled="readonly || disabled"
|
|
41
42
|
:help-text="showPassword ? hidePasswordMessage : showPasswordMessage"
|
|
42
43
|
@click.prevent="toggleShowPassword"
|
|
43
44
|
v-if="actualValue?.length && type === 'password'"
|
|
@@ -195,6 +196,9 @@ export default {
|
|
|
195
196
|
this.$emit("input", this.actualValue);
|
|
196
197
|
}
|
|
197
198
|
},
|
|
199
|
+
onChange(event) {
|
|
200
|
+
console.log('test', event, this.name)
|
|
201
|
+
},
|
|
198
202
|
delayedInput(value) {
|
|
199
203
|
if (this.timer) {
|
|
200
204
|
clearTimeout(this.timer);
|
|
@@ -241,7 +245,7 @@ export default {
|
|
|
241
245
|
this.actualValue = newVal;
|
|
242
246
|
},
|
|
243
247
|
disabled(val) {
|
|
244
|
-
|
|
248
|
+
this.$globalEvents.$emit(`label:disabled:${this.id}`, val);
|
|
245
249
|
},
|
|
246
250
|
},
|
|
247
251
|
emits: [
|
|
@@ -249,7 +253,7 @@ export default {
|
|
|
249
253
|
"blur",
|
|
250
254
|
"focus",
|
|
251
255
|
"update:modelValue",
|
|
252
|
-
|
|
256
|
+
`label:disabled:${this?.id}`,
|
|
253
257
|
],
|
|
254
258
|
components: {
|
|
255
259
|
IbAlert,
|
|
@@ -105,6 +105,15 @@ $input-border-error-color: $red-800;
|
|
|
105
105
|
background-color: $input-disabled-bg;
|
|
106
106
|
border-bottom-color: $input-disabled-border-color;
|
|
107
107
|
|
|
108
|
+
&::-ms-reveal {
|
|
109
|
+
display: none;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:-webkit-autofill {
|
|
113
|
+
color: $input-disabled-color;
|
|
114
|
+
background-color: $input-disabled-bg;
|
|
115
|
+
}
|
|
116
|
+
|
|
108
117
|
&::placeholder {
|
|
109
118
|
color: $input-disabled-placeholder-color;
|
|
110
119
|
}
|