@gitlab/ui 32.64.0 → 32.66.0
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/CHANGELOG.md +28 -0
- package/dist/components/base/paginated_list/paginated_list.documentation.js +2 -5
- package/dist/components/base/toast/toast.documentation.js +2 -5
- package/dist/components/utilities/intersection_observer/intersection_observer.documentation.js +1 -20
- package/dist/components/utilities/intersection_observer/intersection_observer.js +12 -0
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/documentation/documented_stories.js +3 -0
- package/package.json +1 -1
- package/src/components/base/paginated_list/paginated_list.documentation.js +0 -2
- package/src/components/base/paginated_list/paginated_list.md +0 -2
- package/src/components/base/paginated_list/paginated_list.stories.js +162 -154
- package/src/components/base/toast/toast.documentation.js +0 -2
- package/src/components/base/toast/toast.md +0 -11
- package/src/components/base/toast/toast.stories.js +66 -50
- package/src/components/utilities/intersection_observer/intersection_observer.documentation.js +0 -23
- package/src/components/utilities/intersection_observer/intersection_observer.stories.js +91 -80
- package/src/components/utilities/intersection_observer/intersection_observer.vue +15 -0
- package/src/scss/utilities.scss +30 -4
- package/src/scss/utility-mixins/flex.scss +1 -1
- package/src/scss/utility-mixins/opacity.scss +8 -0
- package/src/scss/utility-mixins/spacing.scss +7 -1
- package/dist/components/base/paginated_list/examples/index.js +0 -49
- package/dist/components/base/paginated_list/examples/paginated_list.basic.example.js +0 -51
- package/dist/components/base/paginated_list/examples/paginated_list.no_filter.example.js +0 -51
- package/dist/components/base/paginated_list/examples/paginated_list.with_empty_list.example.js +0 -38
- package/dist/components/base/paginated_list/examples/paginated_list.with_filter_function.example.js +0 -51
- package/dist/components/base/paginated_list/examples/paginated_list.with_header_slot.example.js +0 -51
- package/dist/components/base/paginated_list/examples/paginated_list.with_row_slot.example.js +0 -53
- package/dist/components/base/paginated_list/examples/paginated_list.with_subheader_slot.example.js +0 -51
- package/dist/components/base/toast/examples/index.js +0 -19
- package/dist/components/base/toast/examples/toast.action.example.js +0 -40
- package/dist/components/base/toast/examples/toast.default.example.js +0 -38
- package/dist/components/utilities/intersection_observer/examples/index.js +0 -19
- package/dist/components/utilities/intersection_observer/examples/intersection_observer.image.example.js +0 -62
- package/dist/components/utilities/intersection_observer/examples/intersection_observer.last_appeared.example.js +0 -83
- package/src/components/base/paginated_list/examples/index.js +0 -57
- package/src/components/base/paginated_list/examples/paginated_list.basic.example.vue +0 -19
- package/src/components/base/paginated_list/examples/paginated_list.no_filter.example.vue +0 -20
- package/src/components/base/paginated_list/examples/paginated_list.with_empty_list.example.vue +0 -3
- package/src/components/base/paginated_list/examples/paginated_list.with_filter_function.example.vue +0 -20
- package/src/components/base/paginated_list/examples/paginated_list.with_header_slot.example.vue +0 -23
- package/src/components/base/paginated_list/examples/paginated_list.with_row_slot.example.vue +0 -25
- package/src/components/base/paginated_list/examples/paginated_list.with_subheader_slot.example.vue +0 -23
- package/src/components/base/toast/examples/index.js +0 -22
- package/src/components/base/toast/examples/toast.action.example.vue +0 -11
- package/src/components/base/toast/examples/toast.default.example.vue +0 -3
- package/src/components/utilities/intersection_observer/examples/index.js +0 -23
- package/src/components/utilities/intersection_observer/examples/intersection_observer.image.example.vue +0 -29
- package/src/components/utilities/intersection_observer/examples/intersection_observer.last_appeared.example.vue +0 -43
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<script>
|
|
2
|
-
export default {
|
|
3
|
-
data: () => ({
|
|
4
|
-
appearedAt: null,
|
|
5
|
-
now: null,
|
|
6
|
-
interval: null,
|
|
7
|
-
}),
|
|
8
|
-
computed: {
|
|
9
|
-
secondsSinceAppearance() {
|
|
10
|
-
if (!this.appearedAt) {
|
|
11
|
-
return 0;
|
|
12
|
-
}
|
|
13
|
-
return Math.floor((this.now - this.appearedAt) / 1000);
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
destroyed() {
|
|
17
|
-
this.clearInterval();
|
|
18
|
-
},
|
|
19
|
-
methods: {
|
|
20
|
-
appear() {
|
|
21
|
-
this.clearInterval();
|
|
22
|
-
this.interval = setInterval(this.tick, 1000);
|
|
23
|
-
this.tick();
|
|
24
|
-
this.appearedAt = this.now;
|
|
25
|
-
},
|
|
26
|
-
disappear() {
|
|
27
|
-
this.clearInterval();
|
|
28
|
-
},
|
|
29
|
-
clearInterval() {
|
|
30
|
-
clearInterval(this.interval);
|
|
31
|
-
},
|
|
32
|
-
tick() {
|
|
33
|
-
this.now = new Date().getTime();
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
</script>
|
|
38
|
-
|
|
39
|
-
<template>
|
|
40
|
-
<gl-intersection-observer @appear="appear" @disappear="disappear">
|
|
41
|
-
<span>Last appeared {{ secondsSinceAppearance }} seconds ago</span>
|
|
42
|
-
</gl-intersection-observer>
|
|
43
|
-
</template>
|