@avenirs-esr/avenirs-dsav 0.1.43 → 0.1.46
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/avenirs-dsav.css +1 -1
- package/dist/avenirs-dsav.es.js +485 -477
- package/dist/avenirs-dsav.umd.js +7 -7
- package/dist/components/interaction/toggles/index.d.ts +1 -1
- package/dist/composables/index.d.ts +1 -0
- package/dist/composables/use-breakpoint/use-breakpoint.d.ts +54 -0
- package/dist/composables/use-breakpoint/use-breakpoint.test.d.ts +1 -0
- package/dist/config/breakpoints.d.ts +10 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as AvToggle } from './AvToggle/AvToggle.vue';
|
|
1
|
+
export { default as AvToggle, type AvToggleProps } from './AvToggle/AvToggle.vue';
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { BREAKPOINTS } from '@/config';
|
|
3
|
+
/**
|
|
4
|
+
* Result returned by the useBreakpoint composable.
|
|
5
|
+
*/
|
|
6
|
+
export interface UseBreakpointReturn {
|
|
7
|
+
/**
|
|
8
|
+
* Returns a computed boolean that is `true` when the viewport width
|
|
9
|
+
* is strictly **below** the given breakpoint (`max-width: bp - 1px`).
|
|
10
|
+
*
|
|
11
|
+
* Equivalent to the Sass mixin: `@include respond-below($breakpoint)`
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const isMobile = respondBelow(BREAKPOINTS.MD) // true if width <= 767px
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
respondBelow: (bp: BREAKPOINTS) => ComputedRef<boolean>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns a computed boolean that is `true` when the viewport width
|
|
21
|
+
* is **at or above** the given breakpoint (`min-width: bp`).
|
|
22
|
+
*
|
|
23
|
+
* Equivalent to the Sass mixin: `@include respond-to($breakpoint)`
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* const isDesktop = respondTo(BREAKPOINTS.LG) // true if width >= 1024px
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
respondTo: (bp: BREAKPOINTS) => ComputedRef<boolean>;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Vue composable to handle responsive breakpoints based on the current viewport width.
|
|
34
|
+
*
|
|
35
|
+
* This composable provides reactive utilities (`respondBelow` and `respondTo`)
|
|
36
|
+
* that mirror the behavior of the Sass mixins `@include respond-below($breakpoint)`
|
|
37
|
+
* and `@include respond-to($breakpoint)`, allowing you to keep logic and styles
|
|
38
|
+
* perfectly in sync.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```ts
|
|
42
|
+
* const { respondBelow, respondTo } = useBreakpoint()
|
|
43
|
+
*
|
|
44
|
+
* const isMobile = respondBelow(BREAKPOINTS.MD) // true if width < 768px
|
|
45
|
+
* const isDesktop = respondTo(BREAKPOINTS.LG) // true if width >= 1024px
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @returns {UseBreakpointReturn} Object containing:
|
|
49
|
+
* - `respondBelow`: Returns a computed boolean (`true` if width < breakpoint),
|
|
50
|
+
* - `respondTo`: Returns a computed boolean (`true` if width >= breakpoint).
|
|
51
|
+
*
|
|
52
|
+
* @see BREAKPOINTS for the defined responsive thresholds.
|
|
53
|
+
*/
|
|
54
|
+
export declare function useBreakpoint(): UseBreakpointReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/config/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED