@avenirs-esr/avenirs-dsav 0.1.52 → 0.1.54
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 +3 -1
- package/dist/components/badges/AvBadge/AvBadge.stub.d.ts +29 -17
- package/dist/components/badges/AvTag/AvTag.stories.d.ts +50 -0
- package/dist/components/badges/AvTag/AvTag.stub.d.ts +23 -0
- package/dist/components/badges/AvTag/AvTag.vue.d.ts +216 -0
- package/dist/components/badges/index.d.ts +2 -2
- package/dist/components/base/AvVIcon/AvVIcon.stub.d.ts +9 -5
- package/dist/components/base/index.d.ts +0 -1
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/interaction/buttons/AvButton/AvButton.stub.d.ts +15 -6
- package/dist/components/interaction/buttons/AvCancelConfirmButtons/AvCancelConfirmButtons.stub.d.ts +22 -6
- package/dist/components/interaction/buttons/index.d.ts +0 -1
- package/dist/components/interaction/lists/AvList/AvList.stub.d.ts +5 -5
- package/dist/components/interaction/lists/AvListItem/AvListItem.stub.d.ts +19 -6
- package/dist/components/interaction/lists/index.d.ts +0 -2
- package/dist/components/interaction/pickers/AvTagPicker/AvTagPicker.stub.d.ts +11 -5
- package/dist/components/interaction/pickers/index.d.ts +0 -1
- package/dist/components/interaction/selects/AvAutocomplete/AvAutocomplete.stub.d.ts +28 -6
- package/dist/components/interaction/selects/AvSelect/AvSelect.stub.d.ts +15 -11
- package/dist/components/interaction/selects/index.d.ts +1 -3
- package/dist/components/interaction/toggles/AvToggle/AvToggle.stub.d.ts +19 -0
- package/dist/components/navigation/AvBreadcrumb/AvBreadcrumb.stories.d.ts +46 -0
- package/dist/components/navigation/AvBreadcrumb/AvBreadcrumb.stub.d.ts +9 -0
- package/dist/components/navigation/AvBreadcrumb/AvBreadcrumb.test.d.ts +1 -0
- package/dist/components/navigation/AvBreadcrumb/AvBreadcrumb.vue.d.ts +24 -0
- package/dist/components/navigation/AvSideNavigation/AvSideNavigation.stub.d.ts +16 -11
- package/dist/components/navigation/AvStepper/AvStepper.stub.d.ts +19 -14
- package/dist/components/navigation/index.d.ts +1 -2
- package/dist/components/overlay/drawers/AvDrawer/AvDrawer.stub.d.ts +11 -6
- package/dist/components/overlay/index.d.ts +0 -1
- package/dist/composables/index.d.ts +1 -1
- package/dist/composables/use-av-breakpoints/use-av-breakpoints.d.ts +72 -0
- package/dist/composables/use-av-breakpoints/use-av-breakpoints.test.d.ts +1 -0
- package/dist/config/index.d.ts +0 -1
- package/dist/index.cjs.js +19 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +9007 -0
- package/dist/test-utils.cjs.js +114 -0
- package/dist/test-utils.es.js +286 -0
- package/dist/tests/index.d.ts +17 -1
- package/dist/tests/stubs.d.ts +94 -39
- package/dist/tests/utils.d.ts +2 -3
- package/dist/types/index.d.ts +2 -0
- package/package.json +32 -2
- package/src/styles/main.scss +7 -1
- package/dist/avenirs-dsav.es.js +0 -5133
- package/dist/avenirs-dsav.umd.js +0 -44
- package/dist/composables/use-breakpoint/use-breakpoint.d.ts +0 -54
- package/dist/config/breakpoints.d.ts +0 -10
- package/src/styles/breakpoints.scss +0 -32
- /package/dist/{composables/use-breakpoint/use-breakpoint.test.d.ts → components/badges/AvTag/AvTag.test.d.ts} +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { RouteLocationAsPathGeneric, RouteLocationAsRelativeGeneric } from 'vue-router';
|
|
2
|
+
/**
|
|
3
|
+
* AvBreadcrumb component props.
|
|
4
|
+
*/
|
|
5
|
+
export interface AvBreadcrumbProps {
|
|
6
|
+
/**
|
|
7
|
+
* A table of objects representing the links in the breadcrumb. Each object can
|
|
8
|
+
* have a ‘text’ property and, optionally, a ‘to’ property for routes.
|
|
9
|
+
*/
|
|
10
|
+
links?: {
|
|
11
|
+
to?: string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric | undefined;
|
|
12
|
+
text: string;
|
|
13
|
+
}[] | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Displayed label on the breadcrumb `nav` tag.
|
|
16
|
+
*/
|
|
17
|
+
navigationLabel?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Displayed breadcrumb button label.
|
|
20
|
+
*/
|
|
21
|
+
showBreadcrumbLabel?: string;
|
|
22
|
+
}
|
|
23
|
+
declare const _default: import("vue").DefineComponent<AvBreadcrumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvBreadcrumbProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
export default _default;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
export declare const AvSideNavigationStub: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
1
|
+
export declare const AvSideNavigationStub: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
items: ArrayConstructor;
|
|
3
|
+
selectedItem: StringConstructor;
|
|
4
|
+
isSideMenuCollapsed: BooleanConstructor;
|
|
5
|
+
collapsedWidth: StringConstructor;
|
|
6
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:selectedItem" | "update:isSideMenuCollapsed")[], "update:selectedItem" | "update:isSideMenuCollapsed", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
7
|
+
items: ArrayConstructor;
|
|
8
|
+
selectedItem: StringConstructor;
|
|
9
|
+
isSideMenuCollapsed: BooleanConstructor;
|
|
10
|
+
collapsedWidth: StringConstructor;
|
|
11
|
+
}>> & Readonly<{
|
|
12
|
+
"onUpdate:selectedItem"?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
"onUpdate:isSideMenuCollapsed"?: ((...args: any[]) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
isSideMenuCollapsed: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
export declare const AvStepperStub: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
1
|
+
export declare const AvStepperStub: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
+
steps: {
|
|
3
|
+
type: () => string[];
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
currentStep: {
|
|
7
|
+
type: NumberConstructor;
|
|
8
|
+
required: true;
|
|
9
|
+
};
|
|
10
|
+
}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
+
steps: {
|
|
12
|
+
type: () => string[];
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
currentStep: {
|
|
16
|
+
type: NumberConstructor;
|
|
17
|
+
required: true;
|
|
18
|
+
};
|
|
19
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
export { default as AvBreadcrumb, type AvBreadcrumbProps } from './AvBreadcrumb/AvBreadcrumb.vue';
|
|
1
2
|
export * from './AvNavigation';
|
|
2
3
|
export { default as AvPagination } from './AvPagination/AvPagination.vue';
|
|
3
4
|
export * from './AvPagination/utils';
|
|
4
5
|
export { default as AvSideMenu, type AvSideMenuProps } from './AvSideMenu/AvSideMenu.vue';
|
|
5
|
-
export { AvSideNavigationStub } from './AvSideNavigation/AvSideNavigation.stub';
|
|
6
6
|
export { default as AvSideNavigation, type AvSideNavigationItem, type AvSideNavigationProps } from './AvSideNavigation/AvSideNavigation.vue';
|
|
7
|
-
export { AvStepperStub } from './AvStepper/AvStepper.stub';
|
|
8
7
|
export { default as AvStepper, type AvStepperProps } from './AvStepper/AvStepper.vue';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
export declare const AvDrawerStub: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export declare const AvDrawerStub: import("vue").DefineComponent<{
|
|
2
|
+
width?: any;
|
|
3
|
+
show?: any;
|
|
4
|
+
position?: any;
|
|
5
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "escape-pressed"[], "escape-pressed", import("vue").PublicProps, Readonly<{
|
|
6
|
+
width?: any;
|
|
7
|
+
show?: any;
|
|
8
|
+
position?: any;
|
|
9
|
+
}> & Readonly<{
|
|
10
|
+
"onEscape-pressed"?: ((...args: any[]) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { AvDrawerStub } from './drawers/AvDrawer/AvDrawer.stub';
|
|
2
1
|
export { default as AvDrawer } from './drawers/AvDrawer/AvDrawer.vue';
|
|
3
2
|
export { default as AvModal } from './modals/AvModal/AvModal.vue';
|
|
4
3
|
export { default as AvPopover } from './popovers/AvPopover/AvPopover.vue';
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Named viewport breakpoints for responsive behavior.
|
|
4
|
+
* These values are aligned with the DSFR / Avenirs design system.
|
|
5
|
+
*/
|
|
6
|
+
export declare const AV_BREAKPOINTS: {
|
|
7
|
+
readonly sm: 576;
|
|
8
|
+
readonly md: 768;
|
|
9
|
+
readonly lg: 1024;
|
|
10
|
+
readonly xl: 1440;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Result returned by the `useAvBreakpoints` composable.
|
|
14
|
+
*
|
|
15
|
+
* Each property is a reactive reference (`Ref<boolean>`) that updates automatically
|
|
16
|
+
* when the viewport width changes. It provides both **granular breakpoint flags**
|
|
17
|
+
* (`isBelowSm`, `isAboveLg`, etc.) and **semantic viewport categories**
|
|
18
|
+
* (`isMobile`, `isTablet`, `isDesktop`).
|
|
19
|
+
*/
|
|
20
|
+
export interface UseAvBreakpointsReturn {
|
|
21
|
+
/**
|
|
22
|
+
* True if the viewport width is considered mobile.
|
|
23
|
+
* Equivalent to `width < 768px (48rem)` (below md).
|
|
24
|
+
*/
|
|
25
|
+
isMobile: Ref<boolean>;
|
|
26
|
+
/**
|
|
27
|
+
* True if the viewport width is considered tablet.
|
|
28
|
+
* Equivalent to `768px (48rem) <= width < 1024px (64rem)` (between md and lg).
|
|
29
|
+
*/
|
|
30
|
+
isTablet: Ref<boolean>;
|
|
31
|
+
/**
|
|
32
|
+
* True if the viewport width is considered desktop.
|
|
33
|
+
* Equivalent to `width >= 1024px (64rem)` (lg and above).
|
|
34
|
+
*/
|
|
35
|
+
isDesktop: Ref<boolean>;
|
|
36
|
+
/** True if viewport width is below 576px (36rem). */
|
|
37
|
+
isBelowSm: Ref<boolean>;
|
|
38
|
+
/** True if viewport width is below 768px (48rem). */
|
|
39
|
+
isBelowMd: Ref<boolean>;
|
|
40
|
+
/** True if viewport width is below 1024px (64rem). */
|
|
41
|
+
isBelowLg: Ref<boolean>;
|
|
42
|
+
/** True if viewport width is below 1440px (90rem). */
|
|
43
|
+
isBelowXl: Ref<boolean>;
|
|
44
|
+
/** True if viewport width is above or equal to 768px (48rem). */
|
|
45
|
+
isAboveMd: Ref<boolean>;
|
|
46
|
+
/** True if viewport width is above or equal to 1024px (64rem). */
|
|
47
|
+
isAboveLg: Ref<boolean>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Vue composable providing reactive responsive utilities
|
|
51
|
+
* based on the current viewport width.
|
|
52
|
+
*
|
|
53
|
+
* It uses VueUse useBreakpoints with DSAV breakpoints:
|
|
54
|
+
* - sm: 576px (36rem),
|
|
55
|
+
* - md: 768px (48rem),
|
|
56
|
+
* - lg: 1024px (64rem),
|
|
57
|
+
* - xl: 1440px (90rem),
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```ts
|
|
61
|
+
* import { useAvBreakpoints } from '@avenirs-esr/avenirs-dsav'
|
|
62
|
+
*
|
|
63
|
+
* const { isMobile, isDesktop, isBelowMd, isAboveLg } = useAvBreakpoints()
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @returns {UseAvBreakpointsReturn} Object containing:
|
|
67
|
+
* - `isBelowSm|Md|Lg|Xl`: computed refs returning true if below a breakpoint
|
|
68
|
+
* - `isAboveMd|Lg`: computed refs returning true if above a breakpoint
|
|
69
|
+
*
|
|
70
|
+
* @see {@link https://vueuse.org/core/useBreakpoints/ useBreakpoints on VueUse}
|
|
71
|
+
*/
|
|
72
|
+
export declare function useAvBreakpoints(): UseAvBreakpointsReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/config/index.d.ts
CHANGED