• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kiva / ui / 19154302441

07 Nov 2025 12:35AM UTC coverage: 91.451% (+0.008%) from 91.443%
19154302441

push

github

web-flow
Merge pull request #6433 from kiva/MP-2227-arrows-on-next-steps-row-but-not-a-carousel

fix: adjust mykiva carousels following recent changes and feedback

3725 of 3982 branches covered (93.55%)

Branch coverage included in aggregate %.

31 of 32 new or added lines in 1 file covered. (96.88%)

18954 of 20817 relevant lines covered (91.05%)

78.43 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

97.14
/src/composables/useBreakpoints.js
1
import _throttle from 'lodash/throttle';
1✔
2
import kvTokensPrimitives from '@kiva/kv-tokens';
1✔
3
import { onUnmounted, onMounted, ref } from 'vue';
1✔
4

5
/**
1✔
6
 * Returns reactive breakpoint states for the viewport
1✔
7
 *
1✔
8
 * @returns Object with breakpoint state flags (isMobile, isMedium, isLarge, isExtraLarge)
1✔
9
 */
1✔
10
export default () => {
1✔
11
        const isMobile = ref(false);
18✔
12
        const isMedium = ref(false);
18✔
13
        const isLarge = ref(false);
18✔
14
        const isExtraLarge = ref(false);
18✔
15

16
        const checkBreakpoints = () => {
18✔
17
                const width = window?.innerWidth;
18✔
18
                isMobile.value = width < kvTokensPrimitives.breakpoints.md;
18✔
19
                isMedium.value = width >= kvTokensPrimitives.breakpoints.md;
18✔
20
                isLarge.value = width >= kvTokensPrimitives.breakpoints.lg;
18✔
21
                isExtraLarge.value = width >= kvTokensPrimitives.breakpoints.xl;
18✔
22
        };
18✔
23

24
        const checkBreakpointsThrottled = _throttle(checkBreakpoints, 100);
18✔
25

26
        onMounted(() => {
18✔
27
                checkBreakpoints();
18✔
28
                window.addEventListener('resize', checkBreakpointsThrottled);
18✔
29
        });
18✔
30

31
        onUnmounted(() => {
18✔
NEW
32
                window.removeEventListener('resize', checkBreakpointsThrottled);
×
33
        });
18✔
34

35
        return {
18✔
36
                isMobile, isMedium, isLarge, isExtraLarge,
18✔
37
        };
18✔
38
};
18✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc