@avakhula/ui 0.0.141 → 0.0.142
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 -5
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +12 -47
- package/src/components/Alert/Alert.vue +15 -5
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,56 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
<ib-form-group class="form-group">
|
|
4
|
-
<ib-label for="first_name" required>
|
|
5
|
-
test
|
|
6
|
-
</ib-label>
|
|
2
|
+
<ib-alert class="info-notification" type="info" show-icon title="twat">
|
|
7
3
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</ib-form-group>
|
|
4
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Assumenda minus qui reiciendis. Id assumenda dolore
|
|
5
|
+
laudantium nobis corporis corrupti, rem officiis voluptatum et debitis voluptatem error asperiores, aperiam porro
|
|
6
|
+
itaque?
|
|
12
7
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<ib-input id="first_name" name="first_name"
|
|
19
|
-
v-tooltip="'Cannot be edited because user info were synchronized from another LMS.'"
|
|
20
|
-
readonly />
|
|
21
|
-
</ib-form-group>
|
|
22
|
-
</div>
|
|
8
|
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Assumenda minus qui reiciendis. Id assumenda dolore
|
|
9
|
+
laudantium nobis corporis corrupti, rem officiis voluptatum et debitis voluptatem error asperiores, aperiam porro
|
|
10
|
+
itaque?
|
|
11
|
+
</ib-alert>
|
|
23
12
|
</template>
|
|
24
13
|
|
|
25
14
|
<script>
|
|
26
|
-
import
|
|
27
|
-
import { IbFormGroup, IbLabel, TooltipDirective as Tooltip } from "./index";
|
|
15
|
+
import IbAlert from "./components/Alert/Alert.vue"
|
|
28
16
|
export default {
|
|
29
|
-
directives: {
|
|
30
|
-
Tooltip
|
|
31
|
-
},
|
|
32
|
-
methods: {
|
|
33
|
-
test() {
|
|
34
|
-
console.log('test')
|
|
35
|
-
},
|
|
36
|
-
test1() {
|
|
37
|
-
console.log('test')
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
17
|
components: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
IbLabel
|
|
44
|
-
},
|
|
45
|
-
};
|
|
46
|
-
</script>
|
|
47
|
-
|
|
48
|
-
<style lang="scss">
|
|
49
|
-
#test {
|
|
50
|
-
width: 100vw;
|
|
51
|
-
height: 100vh;
|
|
52
|
-
display: flex;
|
|
53
|
-
align-items: center;
|
|
54
|
-
justify-content: center;
|
|
18
|
+
IbAlert
|
|
19
|
+
}
|
|
55
20
|
}
|
|
56
|
-
</
|
|
21
|
+
</script>
|
|
@@ -56,12 +56,22 @@ export default {
|
|
|
56
56
|
},
|
|
57
57
|
},
|
|
58
58
|
mounted() {
|
|
59
|
-
|
|
60
|
-
this.checkHeight();
|
|
61
|
-
}, 1000);
|
|
59
|
+
this.checkHeight();
|
|
62
60
|
|
|
61
|
+
if (this.$refs.content) {
|
|
62
|
+
this.contentObserver = new ResizeObserver(() => {
|
|
63
|
+
this.checkHeight();
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
this.contentObserver.observe(this.$refs.content);
|
|
67
|
+
}
|
|
63
68
|
window.addEventListener("resize", () => this.checkHeight());
|
|
64
69
|
},
|
|
70
|
+
data() {
|
|
71
|
+
return {
|
|
72
|
+
contentObserver: null,
|
|
73
|
+
};
|
|
74
|
+
},
|
|
65
75
|
methods: {
|
|
66
76
|
close() {
|
|
67
77
|
this.$emit("close");
|
|
@@ -76,11 +86,10 @@ export default {
|
|
|
76
86
|
|
|
77
87
|
if (!parentWidth || !contentStyle) return;
|
|
78
88
|
|
|
79
|
-
console.log(contentStyle.width, 'contentStyle.width', 'parentWidth', parentWidth)
|
|
80
89
|
if (parseInt(contentStyle.width) <= parentWidth) {
|
|
81
90
|
this.$refs.content.classList.remove("large");
|
|
82
91
|
}
|
|
83
|
-
|
|
92
|
+
|
|
84
93
|
if (parseInt(contentStyle.height) > 37) {
|
|
85
94
|
this.$refs.content.classList.add("large");
|
|
86
95
|
}
|
|
@@ -122,6 +131,7 @@ export default {
|
|
|
122
131
|
},
|
|
123
132
|
},
|
|
124
133
|
beforeUnmount() {
|
|
134
|
+
this.contentObserver?.disconnect();
|
|
125
135
|
window.removeEventListener("resize", () => this.checkHeight());
|
|
126
136
|
},
|
|
127
137
|
components: {
|