@avenirs-esr/avenirs-dsav 0.1.66 → 0.1.67

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.
Files changed (43) hide show
  1. package/dist/avenirs-dsav.css +2 -2
  2. package/dist/components/header/index.d.ts +1 -1
  3. package/dist/components/interaction/radios/AvRadioButtonSet/AvRadioButtonSet.vue.d.ts +1 -1
  4. package/dist/components/interaction/selects/AvSelect/AvSelect.stories.d.ts +8 -2
  5. package/dist/components/interaction/selects/AvSelect/AvSelect.stub.d.ts +14 -2
  6. package/dist/components/interaction/selects/AvSelect/AvSelect.vue.d.ts +11 -4
  7. package/dist/components/interaction/tabs/AvTabs/AvTabs.vue.d.ts +6 -9
  8. package/dist/components/interaction/tabs/AvTabs/components/TabContent.vue.d.ts +35 -0
  9. package/dist/components/interaction/tabs/AvTabs/components/TabItem.vue.d.ts +41 -0
  10. package/dist/components/interaction/tabs/AvTabs/composables/use-tab-transition.d.ts +23 -0
  11. package/dist/components/interaction/tabs/AvTabs/composables/use-tab-transition.test.d.ts +1 -0
  12. package/dist/components/interaction/tabs/AvTabs/composables/use-tabs-style.d.ts +31 -0
  13. package/dist/components/interaction/tabs/AvTabs/composables/use-tabs-style.test.d.ts +1 -0
  14. package/dist/components/navigation/AvBreadcrumb/AvBreadcrumb.vue.d.ts +7 -0
  15. package/dist/components/navigation/AvNavigation/AvNavigation.stories.d.ts +0 -1
  16. package/dist/components/navigation/AvNavigation/AvNavigation.vue.d.ts +15 -5
  17. package/dist/components/navigation/AvNavigation/components/NavigationItem/NavigationItem.stub.d.ts +21 -0
  18. package/dist/components/navigation/AvNavigation/components/NavigationItem/NavigationItem.test.d.ts +1 -0
  19. package/dist/components/navigation/AvNavigation/components/NavigationItem/NavigationItem.vue.d.ts +31 -0
  20. package/dist/components/navigation/AvNavigation/components/NavigationMenu/NavigationMenu.stub.d.ts +50 -0
  21. package/dist/components/navigation/AvNavigation/components/NavigationMenu/NavigationMenu.test.d.ts +1 -0
  22. package/dist/components/navigation/AvNavigation/components/NavigationMenu/NavigationMenu.vue.d.ts +34 -0
  23. package/dist/components/navigation/AvNavigation/components/NavigationMenuItem/NavigationMenuItem.stub.d.ts +21 -0
  24. package/dist/components/navigation/AvNavigation/components/NavigationMenuItem/NavigationMenuItem.test.d.ts +1 -0
  25. package/dist/components/navigation/AvNavigation/components/NavigationMenuItem/NavigationMenuItem.vue.d.ts +31 -0
  26. package/dist/components/navigation/AvNavigation/components/NavigationMenuLink/NavigationMenuLink.stub.d.ts +53 -0
  27. package/dist/components/navigation/AvNavigation/components/NavigationMenuLink/NavigationMenuLink.test.d.ts +1 -0
  28. package/dist/components/navigation/AvNavigation/components/NavigationMenuLink/NavigationMenuLink.vue.d.ts +39 -0
  29. package/dist/components/navigation/AvPagination/AvPagination.types.d.ts +17 -0
  30. package/dist/components/navigation/AvPagination/AvPagination.vue.d.ts +1 -1
  31. package/dist/components/navigation/AvPagination/utils.d.ts +1 -1
  32. package/dist/components/overlay/modals/AvModal/AvModal.vue.d.ts +3 -12
  33. package/dist/composables/use-av-breakpoints/use-av-breakpoints.d.ts +1 -1
  34. package/dist/composables/use-collapsable/use-collapsable.d.ts +2 -7
  35. package/dist/index.cjs.js +8 -15
  36. package/dist/index.es.js +3643 -4800
  37. package/dist/main.d.ts +0 -1
  38. package/dist/test-utils.cjs.js +13 -8
  39. package/dist/test-utils.es.js +46 -36
  40. package/package.json +1 -2
  41. package/src/styles/main.scss +0 -2
  42. package/dist/tests/stubs.d.ts +0 -53
  43. package/src/styles/links.scss +0 -17
@@ -0,0 +1,39 @@
1
+ import type { RouteLocationRaw } from 'vue-router';
2
+ /**
3
+ * NavigationMenuLink component props.
4
+ */
5
+ export interface NavigationMenuLinkProps {
6
+ /**
7
+ * The unique identifier for the navigation menu link.
8
+ * @default `menu-link-${crypto.randomUUID()}`
9
+ */
10
+ id?: string;
11
+ /**
12
+ * The active identifier for the navigation menu link.
13
+ */
14
+ activeId?: string;
15
+ /**
16
+ * The target route or URL for the navigation menu link.
17
+ * @default `'#'`
18
+ */
19
+ to?: string | RouteLocationRaw;
20
+ /**
21
+ * The text displayed for the navigation menu link.
22
+ * @default `''`
23
+ */
24
+ text?: string;
25
+ /**
26
+ * The icon associated with the navigation menu link. It must follow the Iconify naming conventions.
27
+ */
28
+ icon?: string;
29
+ /**
30
+ * Optional click event handler for the navigation menu link.
31
+ */
32
+ onClick?: ($event: MouseEvent) => void;
33
+ }
34
+ declare const _default: import("vue").DefineComponent<NavigationMenuLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
35
+ toggleId: (id: string) => any;
36
+ }, string, import("vue").PublicProps, Readonly<NavigationMenuLinkProps> & Readonly<{
37
+ onToggleId?: ((id: string) => any) | undefined;
38
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
39
+ export default _default;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Type definition for a pagination page.
3
+ */
4
+ export interface Page {
5
+ /**
6
+ * URL of the page
7
+ */
8
+ href?: string;
9
+ /**
10
+ * Label of the page
11
+ */
12
+ label: string;
13
+ /**
14
+ * Title of the page
15
+ */
16
+ title: string;
17
+ }
@@ -1,4 +1,4 @@
1
- import type { Page } from '@gouvminint/vue-dsfr';
1
+ import type { Page } from '@/components/navigation/AvPagination/AvPagination.types';
2
2
  /**
3
3
  * AvPagination component Props.
4
4
  */
@@ -1,5 +1,5 @@
1
- import type { Page } from '@gouvminint/vue-dsfr';
2
1
  import type { Ref } from 'vue';
2
+ import type { Page } from '@/components/navigation/AvPagination/AvPagination.types';
3
3
  /**
4
4
  * Generates an array of pages for pagination based on the total number of pages.
5
5
  *
@@ -5,7 +5,7 @@ import type { Slot } from 'vue';
5
5
  export interface AvModalProps {
6
6
  /**
7
7
  * Unique identifier for the modal.
8
- * @default useRandomId('modal', 'dialog')
8
+ * @default `av-modal-${crypto.randomUUID()}`
9
9
  */
10
10
  modalId?: string;
11
11
  /**
@@ -18,17 +18,6 @@ export interface AvModalProps {
18
18
  * @default false
19
19
  */
20
20
  isAlert?: boolean;
21
- /**
22
- * Reference to original element to restore focus after closing.
23
- * @default { focus() {} }
24
- */
25
- origin?: {
26
- focus: () => void;
27
- };
28
- /**
29
- * Name of icon to be displayed in modal title.
30
- */
31
- icon?: string;
32
21
  /**
33
22
  * Modal size.
34
23
  * @default 'md'
@@ -45,6 +34,7 @@ export interface AvModalProps {
45
34
  closeButtonIcon?: string;
46
35
  /**
47
36
  * Adds a disabled state on the close button.
37
+ * @default false
48
38
  */
49
39
  closeButtonDisabled?: boolean;
50
40
  /**
@@ -58,6 +48,7 @@ export interface AvModalProps {
58
48
  confirmButtonIcon?: string;
59
49
  /**
60
50
  * Adds a disabled state on the confirm button.
51
+ * @default false
61
52
  */
62
53
  confirmButtonDisabled?: boolean;
63
54
  /**
@@ -1,7 +1,7 @@
1
1
  import type { Ref } from 'vue';
2
2
  /**
3
3
  * Named viewport breakpoints for responsive behavior.
4
- * These values are aligned with the DSFR / Avenirs design system.
4
+ * These values are aligned with the AVENIR(s) design system.
5
5
  */
6
6
  export declare const AV_BREAKPOINTS: {
7
7
  readonly sm: 576;
@@ -3,7 +3,7 @@ import type { Ref } from 'vue';
3
3
  * Return type of the {@link useCollapsable} composable.
4
4
  *
5
5
  * This composable provides a reactive API to manage a collapsible section
6
- * (expand/collapse behavior) in sync with DSFR's CSS-based collapse system.
6
+ * (expand/collapse behavior) in sync with ref CSS-based collapse system.
7
7
  *
8
8
  * It exposes the current state (`collapsing`, `cssExpanded`),
9
9
  * DOM reference (`collapse`), and imperative methods to adjust or toggle
@@ -44,9 +44,6 @@ export interface UseCollapsableReturn {
44
44
  * the related CSS custom properties.
45
45
  *
46
46
  * Should be called before starting an animation or when content changes dynamically.
47
- *
48
- * Mirrors DSFR’s internal behavior:
49
- * {@link https://github.com/GouvernementFR/dsfr/blob/main/src/core/script/collapse/collapse.js#L61 collapse.js#L61}
50
47
  */
51
48
  adjust: () => void;
52
49
  /**
@@ -67,14 +64,12 @@ export interface UseCollapsableReturn {
67
64
  * const { onTransitionEnd } = useCollapsable()
68
65
  * collapse.value?.addEventListener('transitionend', () => onTransitionEnd(cssExpanded.value))
69
66
  * ```
70
- *
71
- * @see {@link https://github.com/GouvernementFR/dsfr/blob/main/src/core/script/collapse/collapse.js#L25 collapse.js#L25}
72
67
  */
73
68
  onTransitionEnd: (expanded: boolean, autoFocus?: boolean) => void;
74
69
  }
75
70
  /**
76
71
  * Vue composable providing a reactive API for collapsible sections,
77
- * consistent with DSFR’s collapse mechanism.
72
+ * consistent with ref collapse mechanism.
78
73
  *
79
74
  * It manages internal CSS variables (`--collapse`, `--collapse-max-height`) and
80
75
  * state flags (`collapsing`, `cssExpanded`) to synchronize DOM transitions.