@avenirs-esr/avenirs-dsav 0.1.1 → 0.1.2
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 +7375 -15307
- package/dist/avenirs-dsav.umd.js +73 -110
- package/dist/src/App.vue.d.ts +2 -0
- package/dist/src/components/badges/AvBadge/AvBadge.stories.d.ts +44 -0
- package/dist/src/components/badges/AvBadge/AvBadge.stub.d.ts +30 -0
- package/dist/src/components/badges/AvBadge/AvBadge.test.d.ts +1 -0
- package/dist/src/components/badges/AvBadge/AvBadge.vue.d.ts +44 -0
- package/dist/src/components/badges/index.d.ts +1 -0
- package/dist/src/components/base/AvIconText/AvIconText.stories.d.ts +36 -0
- package/dist/src/components/base/AvIconText/AvIconText.test.d.ts +1 -0
- package/dist/src/components/base/AvIconText/AvIconText.vue.d.ts +40 -0
- package/dist/src/components/base/AvNotice/AvNotice.stories.d.ts +63 -0
- package/dist/src/components/base/AvNotice/AvNotice.test.d.ts +1 -0
- package/dist/src/components/base/AvNotice/AvNotice.vue.d.ts +22 -0
- package/dist/src/components/base/AvVIcon/AvVIcon.stories.d.ts +47 -0
- package/dist/src/components/base/AvVIcon/AvVIcon.stub.d.ts +9 -0
- package/dist/src/components/base/AvVIcon/AvVIcon.vue.d.ts +54 -0
- package/dist/src/components/base/index.d.ts +2 -0
- package/dist/src/components/cards/AvCard/AvCard.stories.d.ts +28 -0
- package/dist/src/components/cards/AvCard/AvCard.test.d.ts +1 -0
- package/dist/src/components/cards/AvCard/AvCard.vue.d.ts +58 -0
- package/dist/src/components/cards/index.d.ts +1 -0
- package/dist/src/components/feedback/AvAlert/AvAlert.test.d.ts +1 -0
- package/dist/src/components/feedback/AvAlert/AvAlert.vue.d.ts +77 -0
- package/dist/src/components/feedback/AvToaster/AvToaster.test.d.ts +1 -0
- package/dist/src/components/feedback/AvToaster/AvToaster.vue.d.ts +79 -0
- package/dist/src/components/feedback/index.d.ts +2 -0
- package/dist/src/components/header/AvHeader/AvHeader.test.d.ts +1 -0
- package/dist/src/components/header/AvHeader/AvHeader.vue.d.ts +132 -0
- package/dist/src/components/header/AvHeaderMenuLinks/AvHeaderMenuLinks.test.d.ts +1 -0
- package/dist/src/components/header/AvHeaderMenuLinks/AvHeaderMenuLinks.vue.d.ts +38 -0
- package/dist/src/components/header/AvLogo.vue.d.ts +2 -0
- package/dist/src/components/header/EsupLogo.test.d.ts +1 -0
- package/dist/src/components/header/EsupLogo.vue.d.ts +7 -0
- package/dist/src/components/header/index.d.ts +5 -0
- package/dist/src/components/index.d.ts +8 -0
- package/dist/src/components/interaction/accordions/AvAccordion/AvAccordion.stories.d.ts +30 -0
- package/dist/src/components/interaction/accordions/AvAccordion/AvAccordion.test.d.ts +1 -0
- package/dist/src/components/interaction/accordions/AvAccordion/AvAccordion.vue.d.ts +31 -0
- package/dist/src/components/interaction/accordions/AvAccordionsGroup/AvAccordionsGroup.stories.d.ts +48 -0
- package/dist/src/components/interaction/accordions/AvAccordionsGroup/AvAccordionsGroup.test.d.ts +1 -0
- package/dist/src/components/interaction/accordions/AvAccordionsGroup/AvAccordionsGroup.vue.d.ts +36 -0
- package/dist/src/components/interaction/accordions/index.d.ts +2 -0
- package/dist/src/components/interaction/buttons/AvButton/AvButton.stories.d.ts +75 -0
- package/dist/src/components/interaction/buttons/AvButton/AvButton.stub.d.ts +15 -0
- package/dist/src/components/interaction/buttons/AvButton/AvButton.test.d.ts +1 -0
- package/dist/src/components/interaction/buttons/AvButton/AvButton.vue.d.ts +78 -0
- package/dist/src/components/interaction/buttons/AvRichButton/AvRichButton.stories.d.ts +39 -0
- package/dist/src/components/interaction/buttons/AvRichButton/AvRichButton.test.d.ts +1 -0
- package/dist/src/components/interaction/buttons/AvRichButton/AvRichButton.vue.d.ts +48 -0
- package/dist/src/components/interaction/buttons/index.d.ts +2 -0
- package/dist/src/components/interaction/files/AvFileUpload/AvFileUpload.stories.d.ts +30 -0
- package/dist/src/components/interaction/files/AvFileUpload/AvFileUpload.test.d.ts +1 -0
- package/dist/src/components/interaction/files/AvFileUpload/AvFileUpload.vue.d.ts +131 -0
- package/dist/src/components/interaction/files/AvFileUpload/AvFileUploadAlert.vue.d.ts +19 -0
- package/dist/src/components/interaction/files/index.d.ts +1 -0
- package/dist/src/components/interaction/index.d.ts +10 -0
- package/dist/src/components/interaction/inputs/AvInput/AvInput.stories.d.ts +71 -0
- package/dist/src/components/interaction/inputs/AvInput/AvInput.test.d.ts +1 -0
- package/dist/src/components/interaction/inputs/AvInput/AvInput.vue.d.ts +111 -0
- package/dist/src/components/interaction/inputs/index.d.ts +1 -0
- package/dist/src/components/interaction/lists/AvList/AvList.stories.d.ts +55 -0
- package/dist/src/components/interaction/lists/AvList/AvList.stub.d.ts +5 -0
- package/dist/src/components/interaction/lists/AvList/AvList.test.d.ts +1 -0
- package/dist/src/components/interaction/lists/AvList/AvList.vue.d.ts +74 -0
- package/dist/src/components/interaction/lists/AvListItem/AvListItem.stories.d.ts +59 -0
- package/dist/src/components/interaction/lists/AvListItem/AvListItem.stub.d.ts +19 -0
- package/dist/src/components/interaction/lists/AvListItem/AvListItem.test.d.ts +1 -0
- package/dist/src/components/interaction/lists/AvListItem/AvListItem.vue.d.ts +112 -0
- package/dist/src/components/interaction/lists/index.d.ts +2 -0
- package/dist/src/components/interaction/pickers/AvPageSizePicker/AvPageSizePicker.stories.d.ts +24 -0
- package/dist/src/components/interaction/pickers/AvPageSizePicker/AvPageSizePicker.test.d.ts +1 -0
- package/dist/src/components/interaction/pickers/AvPageSizePicker/AvPageSizePicker.vue.d.ts +23 -0
- package/dist/src/components/interaction/pickers/AvTagPicker/AvTagPicker.stories.d.ts +96 -0
- package/dist/src/components/interaction/pickers/AvTagPicker/AvTagPicker.stub.d.ts +11 -0
- package/dist/src/components/interaction/pickers/AvTagPicker/AvTagPicker.test.d.ts +1 -0
- package/dist/src/components/interaction/pickers/AvTagPicker/AvTagPicker.vue.d.ts +79 -0
- package/dist/src/components/interaction/pickers/index.d.ts +2 -0
- package/dist/src/components/interaction/radios/AvRadioButton/AvRadioButton.stories.d.ts +34 -0
- package/dist/src/components/interaction/radios/AvRadioButton/AvRadioButton.test.d.ts +1 -0
- package/dist/src/components/interaction/radios/AvRadioButton/AvRadioButton.vue.d.ts +38 -0
- package/dist/src/components/interaction/radios/AvRadioButtonSet/AvRadioButtonSet.stories.d.ts +54 -0
- package/dist/src/components/interaction/radios/AvRadioButtonSet/AvRadioButtonSet.test.d.ts +1 -0
- package/dist/src/components/interaction/radios/AvRadioButtonSet/AvRadioButtonSet.vue.d.ts +76 -0
- package/dist/src/components/interaction/radios/index.d.ts +2 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocomplete.stories.d.ts +553 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocomplete.stub.d.ts +28 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocomplete.test.d.ts +1 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocomplete.types.d.ts +101 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocomplete.vue.d.ts +204 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocompleteContext.d.ts +14 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocompleteDropdown.vue.d.ts +60 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocompleteInput.vue.d.ts +309 -0
- package/dist/src/components/interaction/selects/AvAutocomplete/AvAutocompleteSelectedTags.vue.d.ts +42 -0
- package/dist/src/components/interaction/selects/AvSelect/AvSelect.stories.d.ts +103 -0
- package/dist/src/components/interaction/selects/AvSelect/AvSelect.stub.d.ts +15 -0
- package/dist/src/components/interaction/selects/AvSelect/AvSelect.test.d.ts +1 -0
- package/dist/src/components/interaction/selects/AvSelect/AvSelect.vue.d.ts +63 -0
- package/dist/src/components/interaction/selects/index.d.ts +3 -0
- package/dist/src/components/interaction/tabs/AvTab/AvTab.stories.d.ts +34 -0
- package/dist/src/components/interaction/tabs/AvTab/AvTab.test.d.ts +1 -0
- package/dist/src/components/interaction/tabs/AvTab/AvTab.vue.d.ts +31 -0
- package/dist/src/components/interaction/tabs/AvTabs/AvTabs.stories.d.ts +51 -0
- package/dist/src/components/interaction/tabs/AvTabs/AvTabs.test.d.ts +1 -0
- package/dist/src/components/interaction/tabs/AvTabs/AvTabs.vue.d.ts +40 -0
- package/dist/src/components/interaction/tabs/index.d.ts +2 -0
- package/dist/src/components/interaction/toggles/AvToggle/AvToggle.stories.d.ts +21 -0
- package/dist/src/components/interaction/toggles/AvToggle/AvToggle.test.d.ts +1 -0
- package/dist/src/components/interaction/toggles/AvToggle/AvToggle.vue.d.ts +46 -0
- package/dist/src/components/interaction/toggles/index.d.ts +1 -0
- package/dist/src/components/navigation/AvNavigation/AvNavigation.stories.d.ts +34 -0
- package/dist/src/components/navigation/AvNavigation/AvNavigation.test.d.ts +1 -0
- package/dist/src/components/navigation/AvNavigation/AvNavigation.vue.d.ts +16 -0
- package/dist/src/components/navigation/AvNavigation/index.d.ts +1 -0
- package/dist/src/components/navigation/AvPagination/AvPagination.test.d.ts +1 -0
- package/dist/src/components/navigation/AvPagination/AvPagination.vue.d.ts +57 -0
- package/dist/src/components/navigation/AvPagination/utils.d.ts +14 -0
- package/dist/src/components/navigation/AvPagination/utils.test.d.ts +1 -0
- package/dist/src/components/navigation/AvSideMenu/AvSideMenu.stories.d.ts +55 -0
- package/dist/src/components/navigation/AvSideMenu/AvSideMenu.test.d.ts +1 -0
- package/dist/src/components/navigation/AvSideMenu/AvSideMenu.vue.d.ts +61 -0
- package/dist/src/components/navigation/AvSideNavigation/AvSideNavigation.stories.d.ts +58 -0
- package/dist/src/components/navigation/AvSideNavigation/AvSideNavigation.stub.d.ts +16 -0
- package/dist/src/components/navigation/AvSideNavigation/AvSideNavigation.test.d.ts +1 -0
- package/dist/src/components/navigation/AvSideNavigation/AvSideNavigation.vue.d.ts +38 -0
- package/dist/src/components/navigation/index.d.ts +5 -0
- package/dist/src/components/overlay/drawers/AvDrawer/AvDrawer.stories.d.ts +53 -0
- package/dist/src/components/overlay/drawers/AvDrawer/AvDrawer.stub.d.ts +11 -0
- package/dist/src/components/overlay/drawers/AvDrawer/AvDrawer.test.d.ts +1 -0
- package/dist/src/components/overlay/drawers/AvDrawer/AvDrawer.vue.d.ts +60 -0
- package/dist/src/components/overlay/index.d.ts +3 -0
- package/dist/src/components/overlay/modals/AvModal/AvModal.test.d.ts +1 -0
- package/dist/src/components/overlay/modals/AvModal/AvModal.vue.d.ts +74 -0
- package/dist/src/components/overlay/popovers/AvPopover/AvPopover.stories.d.ts +49 -0
- package/dist/src/components/overlay/popovers/AvPopover/AvPopover.test.d.ts +1 -0
- package/dist/src/components/overlay/popovers/AvPopover/AvPopover.vue.d.ts +48 -0
- package/dist/src/components/overlay/popovers/AvPopover/use-popover.d.ts +41 -0
- package/dist/src/components/overlay/popovers/AvPopover/use-popover.test.d.ts +1 -0
- package/dist/src/composables/index.d.ts +1 -0
- package/dist/src/composables/use-focus-trap/use-focus-trap.d.ts +25 -0
- package/dist/src/composables/use-focus-trap/use-focus-trap.test.d.ts +1 -0
- package/dist/src/config/index.d.ts +1 -0
- package/dist/src/config/page-sizes.d.ts +6 -0
- package/dist/src/index.d.ts +5 -0
- package/dist/src/main.d.ts +8 -0
- package/dist/src/stories/foundations/icons.stories.d.ts +6 -0
- package/dist/src/stories/foundations/typography.stories.d.ts +5 -0
- package/dist/src/tests/index.d.ts +2 -0
- package/dist/src/tests/stubs.d.ts +62 -0
- package/dist/src/tests/utils.d.ts +34 -0
- package/dist/src/tokens/icons.d.ts +79 -0
- package/dist/src/tokens/index.d.ts +1 -0
- package/dist/src/utils/array/array.d.ts +8 -0
- package/dist/src/utils/forms/form.test.d.ts +1 -0
- package/dist/src/utils/forms/forms.d.ts +6 -0
- package/dist/src/utils/index.d.ts +3 -0
- package/dist/src/utils/string/string.d.ts +21 -0
- package/dist/src/utils/string/string.test.d.ts +1 -0
- package/package.json +4 -3
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import type { Slot } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* AvListItem component props.
|
|
4
|
+
*/
|
|
5
|
+
export interface AvListItemProps {
|
|
6
|
+
/**
|
|
7
|
+
* The icon name according to the naming convention defined for `VIcon` on VueDSFR.
|
|
8
|
+
*/
|
|
9
|
+
icon?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The icon color.
|
|
12
|
+
* @default 'var(--text1)'
|
|
13
|
+
*/
|
|
14
|
+
color?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The icon size.
|
|
17
|
+
* @default 1.3125
|
|
18
|
+
*/
|
|
19
|
+
iconSize?: number;
|
|
20
|
+
/**
|
|
21
|
+
* icon color
|
|
22
|
+
*/
|
|
23
|
+
iconColor?: string;
|
|
24
|
+
/**
|
|
25
|
+
* The title text.
|
|
26
|
+
*/
|
|
27
|
+
title?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The description text.
|
|
30
|
+
*/
|
|
31
|
+
description?: string;
|
|
32
|
+
/**
|
|
33
|
+
* The hover color when the list item is clickable.
|
|
34
|
+
* @default 'var(--dark-background-primary1)'
|
|
35
|
+
*/
|
|
36
|
+
hoverBackgroundColor?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The color when the list item is hovered.
|
|
39
|
+
* @default 'var(--dark-background-primary1)'
|
|
40
|
+
*/
|
|
41
|
+
colorOnHover?: string;
|
|
42
|
+
/**
|
|
43
|
+
* The description color.
|
|
44
|
+
* @default 'var(--text2)'
|
|
45
|
+
*/
|
|
46
|
+
descriptionColor?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Whether the list item is clickable.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
clickable?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Whether the list item is disabled.
|
|
54
|
+
* @default false
|
|
55
|
+
*/
|
|
56
|
+
disabled?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the list item is selected/active.
|
|
59
|
+
* @default false
|
|
60
|
+
*/
|
|
61
|
+
selected?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Function called when list item is clicked.
|
|
64
|
+
* @param event The click MouseEvent
|
|
65
|
+
*/
|
|
66
|
+
onClick?: ($event: MouseEvent) => void;
|
|
67
|
+
/**
|
|
68
|
+
* ARIA label for the list item when clickable.
|
|
69
|
+
*/
|
|
70
|
+
ariaLabel?: string;
|
|
71
|
+
/**
|
|
72
|
+
* ID of an element that describes the list item.
|
|
73
|
+
*/
|
|
74
|
+
ariaDescribedby?: string;
|
|
75
|
+
/**
|
|
76
|
+
* HTML tag to use for the root element when clickable.
|
|
77
|
+
* @default 'button'
|
|
78
|
+
*/
|
|
79
|
+
tag?: 'button' | 'div' | 'a';
|
|
80
|
+
/**
|
|
81
|
+
* Href attribute when tag is 'a'.
|
|
82
|
+
*/
|
|
83
|
+
href?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Target attribute when tag is 'a'.
|
|
86
|
+
*/
|
|
87
|
+
target?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Rel attribute when tag is 'a'.
|
|
90
|
+
*/
|
|
91
|
+
rel?: string;
|
|
92
|
+
/**
|
|
93
|
+
* ARIA role for the list item. If not provided, defaults based on context.
|
|
94
|
+
*/
|
|
95
|
+
role?: string;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Slots available in the AvListItem component.
|
|
99
|
+
*/
|
|
100
|
+
type __VLS_Slots = {
|
|
101
|
+
/**
|
|
102
|
+
* Default slot for custom content.
|
|
103
|
+
*/
|
|
104
|
+
default?: Slot;
|
|
105
|
+
};
|
|
106
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvListItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvListItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
107
|
+
export default _default;
|
|
108
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
109
|
+
new (): {
|
|
110
|
+
$slots: S;
|
|
111
|
+
};
|
|
112
|
+
};
|
package/dist/src/components/interaction/pickers/AvPageSizePicker/AvPageSizePicker.stories.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
import { type AvPageSizePickerProps } from '@/components/interaction/pickers/AvPageSizePicker/AvPageSizePicker.vue';
|
|
3
|
+
/**
|
|
4
|
+
* <h1 class="n1">Picker for number of results per page - <code>AvPageSizePicker</code></h1>
|
|
5
|
+
*
|
|
6
|
+
* <h2 class="n2">🌟 Introduction</h2>
|
|
7
|
+
*
|
|
8
|
+
* <p>
|
|
9
|
+
* <span class="b2-regular">
|
|
10
|
+
* The <code>AvPageSizePicker</code> is a component implementing the <code>AvTagPicker</code> and dedicated to selecting the number of results per page.
|
|
11
|
+
* </span>
|
|
12
|
+
* </p>
|
|
13
|
+
*
|
|
14
|
+
* <h2 class="n2">📐 Structure</h2>
|
|
15
|
+
*
|
|
16
|
+
* <p>
|
|
17
|
+
* <span class="b2-regular">
|
|
18
|
+
* The pickers for number of results per page consist of an <code>AvTagPicker</code> to which options specific to the number of results per page are assigned.
|
|
19
|
+
* </span>
|
|
20
|
+
* </p>
|
|
21
|
+
*/
|
|
22
|
+
declare const meta: Meta<AvPageSizePickerProps>;
|
|
23
|
+
export default meta;
|
|
24
|
+
export declare const Default: StoryFn<AvPageSizePickerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type AvTagPickerOption } from '@/components/interaction/pickers/AvTagPicker/AvTagPicker.vue';
|
|
2
|
+
import { PageSizes } from '@/config';
|
|
3
|
+
/**
|
|
4
|
+
* AvPageSizePicker component props.
|
|
5
|
+
*/
|
|
6
|
+
export interface AvPageSizePickerProps {
|
|
7
|
+
/**
|
|
8
|
+
* Label of the page size picker.
|
|
9
|
+
*/
|
|
10
|
+
label: string;
|
|
11
|
+
/**
|
|
12
|
+
* Number of results per page selected.
|
|
13
|
+
*/
|
|
14
|
+
pageSizeSelected: PageSizes;
|
|
15
|
+
/**
|
|
16
|
+
* Method executed when changing selection.
|
|
17
|
+
*
|
|
18
|
+
* @param val Selected option of type AvTagPickerOption.
|
|
19
|
+
*/
|
|
20
|
+
handleSelectChange: (val: AvTagPickerOption) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const _default: import("vue").DefineComponent<AvPageSizePickerProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvPageSizePickerProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { StoryFn } from '@storybook/vue3';
|
|
2
|
+
import { type AvTagPickerProps } from '@/components/interaction/pickers/AvTagPicker/AvTagPicker.vue';
|
|
3
|
+
/**
|
|
4
|
+
* <h1 class="n1">Tag picker - <code>AvTagPicker</code></h1>
|
|
5
|
+
*
|
|
6
|
+
* <h2 class="n2">🌟 Introduction</h2>
|
|
7
|
+
*
|
|
8
|
+
* <p>
|
|
9
|
+
* <span class="b2-regular">
|
|
10
|
+
* The <code>AvTagPicker</code> is a Vue component enabling a user to select an element from a given set.
|
|
11
|
+
* Selectable elements consist of <code>DsfrTag</code>.
|
|
12
|
+
* </span>
|
|
13
|
+
* </p>
|
|
14
|
+
*
|
|
15
|
+
* <p>
|
|
16
|
+
* <span class="b2-regular">
|
|
17
|
+
* The <code>DsfrTag</code> list provides a list of options from which the user can choose.
|
|
18
|
+
* </span>
|
|
19
|
+
* </p>
|
|
20
|
+
*
|
|
21
|
+
* <h2 class="n2">📐 Structure</h2>
|
|
22
|
+
*
|
|
23
|
+
* <p><span class="b2-regular">Buttons consist of :</span></p>
|
|
24
|
+
*
|
|
25
|
+
* <ul>
|
|
26
|
+
* <li>
|
|
27
|
+
* <span class="b2-regular">
|
|
28
|
+
* A label - mandatory, using the <code>label</code> prop, enables label display when <code>iconOnly</code> is <code>false</code>,
|
|
29
|
+
* also enables connection to <code>title</code> and <code>aria-label</code>;
|
|
30
|
+
* </span>
|
|
31
|
+
* </li>
|
|
32
|
+
* <li>
|
|
33
|
+
* <span class="b2-regular">
|
|
34
|
+
* An icon, which can be modified (see available icons) - optional.
|
|
35
|
+
* </span>
|
|
36
|
+
* </li>
|
|
37
|
+
* </ul>
|
|
38
|
+
*/
|
|
39
|
+
declare const meta: {
|
|
40
|
+
title: string;
|
|
41
|
+
component: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
|
42
|
+
tags: string[];
|
|
43
|
+
argTypes: {
|
|
44
|
+
options: {
|
|
45
|
+
type: {
|
|
46
|
+
name: string;
|
|
47
|
+
required: boolean;
|
|
48
|
+
};
|
|
49
|
+
control: boolean;
|
|
50
|
+
};
|
|
51
|
+
label: {
|
|
52
|
+
type: {
|
|
53
|
+
name: string;
|
|
54
|
+
};
|
|
55
|
+
control: string;
|
|
56
|
+
};
|
|
57
|
+
labelColor: {
|
|
58
|
+
type: {
|
|
59
|
+
name: string;
|
|
60
|
+
};
|
|
61
|
+
control: string;
|
|
62
|
+
};
|
|
63
|
+
labelTypographyClass: {
|
|
64
|
+
type: {
|
|
65
|
+
name: string;
|
|
66
|
+
};
|
|
67
|
+
control: string;
|
|
68
|
+
};
|
|
69
|
+
multiple: {
|
|
70
|
+
type: {
|
|
71
|
+
name: string;
|
|
72
|
+
};
|
|
73
|
+
control: string;
|
|
74
|
+
};
|
|
75
|
+
selected: {
|
|
76
|
+
type: {
|
|
77
|
+
name: string;
|
|
78
|
+
};
|
|
79
|
+
control: boolean;
|
|
80
|
+
};
|
|
81
|
+
handleSelectChange: {
|
|
82
|
+
type: {
|
|
83
|
+
name: string;
|
|
84
|
+
required: boolean;
|
|
85
|
+
};
|
|
86
|
+
control: boolean;
|
|
87
|
+
action: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
args: {
|
|
91
|
+
label: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
export default meta;
|
|
95
|
+
export declare const Default: StoryFn<AvTagPickerProps>;
|
|
96
|
+
export declare const Multiple: StoryFn<AvTagPickerProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const AvTagPickerStub: import("vue").DefineComponent<{
|
|
2
|
+
label?: any;
|
|
3
|
+
selected?: any;
|
|
4
|
+
options?: any;
|
|
5
|
+
handleSelectChange?: any;
|
|
6
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
7
|
+
label?: any;
|
|
8
|
+
selected?: any;
|
|
9
|
+
options?: any;
|
|
10
|
+
handleSelectChange?: any;
|
|
11
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an option in the AvTagPicker component.
|
|
3
|
+
*/
|
|
4
|
+
export interface AvTagPickerOption {
|
|
5
|
+
/**
|
|
6
|
+
* Label displayed for the option.
|
|
7
|
+
*/
|
|
8
|
+
label: string;
|
|
9
|
+
/**
|
|
10
|
+
* Value associated with the option.
|
|
11
|
+
*/
|
|
12
|
+
value: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Basic props common to AvTagPicker in single or multiple mode.
|
|
16
|
+
*/
|
|
17
|
+
interface AvTagPickerBaseProps {
|
|
18
|
+
/**
|
|
19
|
+
* List of options available in the picker.
|
|
20
|
+
*/
|
|
21
|
+
options: AvTagPickerOption[];
|
|
22
|
+
/**
|
|
23
|
+
* Label displayed above the picker.
|
|
24
|
+
*/
|
|
25
|
+
label?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Label color.
|
|
28
|
+
* @default 'var(--text2)'
|
|
29
|
+
*/
|
|
30
|
+
labelColor?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Typography class applied to label.
|
|
33
|
+
* @default 'b2-regular'
|
|
34
|
+
*/
|
|
35
|
+
labelTypographyClass?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* AvTagPicker component props in single selection mode.
|
|
39
|
+
*/
|
|
40
|
+
interface AvTagPickerSingleProps extends AvTagPickerBaseProps {
|
|
41
|
+
/**
|
|
42
|
+
* Multiple mode disabled.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
multiple?: false;
|
|
46
|
+
/**
|
|
47
|
+
* Option selected.
|
|
48
|
+
*/
|
|
49
|
+
selected?: AvTagPickerOption;
|
|
50
|
+
/**
|
|
51
|
+
* Method called when changing selection.
|
|
52
|
+
* @param selected The selected option.
|
|
53
|
+
*/
|
|
54
|
+
handleSelectChange: (selected: AvTagPickerOption) => void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* AvTagPicker component props in multiple selection mode.
|
|
58
|
+
*/
|
|
59
|
+
interface AvTagPickerMultipleProps extends AvTagPickerBaseProps {
|
|
60
|
+
/**
|
|
61
|
+
* Enables multiple selection mode.
|
|
62
|
+
*/
|
|
63
|
+
multiple: true;
|
|
64
|
+
/**
|
|
65
|
+
* Options selected.
|
|
66
|
+
*/
|
|
67
|
+
selected?: AvTagPickerOption[];
|
|
68
|
+
/**
|
|
69
|
+
* Method called when changing selection.
|
|
70
|
+
* @param selected The selected options.
|
|
71
|
+
*/
|
|
72
|
+
handleSelectChange: (selected: AvTagPickerOption[]) => void;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* AvTagPicker component props which can be in single or multiple mode.
|
|
76
|
+
*/
|
|
77
|
+
export type AvTagPickerProps = AvTagPickerSingleProps | AvTagPickerMultipleProps;
|
|
78
|
+
declare const _default: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps>;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
import { type AvRadioButtonProps } from '@/components/interaction/radios/AvRadioButton/AvRadioButton.vue';
|
|
3
|
+
/**
|
|
4
|
+
* <h1 class="n1">Radio buttons - <code>AvRadioButton</code></h1>
|
|
5
|
+
*
|
|
6
|
+
* <h2 class="n2">🌟 Introduction</h2>
|
|
7
|
+
*
|
|
8
|
+
* <p>
|
|
9
|
+
* <span class="b2-regular">
|
|
10
|
+
* The <code>AvRadioButton</code> is a declarative component used exclusively in the <code>default</code> slot of <code>AvRadioButtonSet</code>.
|
|
11
|
+
* <code>AvRadioButton</code> allows you to configure a radio button by passing its props (such as <code>value</code>, <code>label</code>,
|
|
12
|
+
* <code>description</code> and <code>disabled</code>) to the <code>AvRadioButtonSet</code> component without rendering.
|
|
13
|
+
* </span>
|
|
14
|
+
* </p>
|
|
15
|
+
*
|
|
16
|
+
* <p>
|
|
17
|
+
* <span class="b2-regular">
|
|
18
|
+
* It acts as a proxy component: it exposes information (props) used by <code>AvRadioButtonSet</code> to generate the interface.
|
|
19
|
+
* </span>
|
|
20
|
+
* </p>
|
|
21
|
+
*
|
|
22
|
+
* <p>
|
|
23
|
+
* <span class="b2-regular">
|
|
24
|
+
* 🚫 This component does not display anything by itself and should not be used outside <code>AvRadioButtonSet</code>.
|
|
25
|
+
* </span>
|
|
26
|
+
* </p>
|
|
27
|
+
*
|
|
28
|
+
* <h2 class="n2">📐 Structure</h2>
|
|
29
|
+
*
|
|
30
|
+
* <p><span class="b2-regular">None.</span></p>
|
|
31
|
+
*/
|
|
32
|
+
declare const meta: Meta<AvRadioButtonProps>;
|
|
33
|
+
export default meta;
|
|
34
|
+
export declare const Default: StoryFn<AvRadioButtonProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Slot } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* AvRadioButton component props.
|
|
4
|
+
*/
|
|
5
|
+
export interface AvRadioButtonProps {
|
|
6
|
+
/**
|
|
7
|
+
* Value of the radio button.
|
|
8
|
+
* This value will be emitted when the radio is selected.
|
|
9
|
+
*/
|
|
10
|
+
value: string | number | boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Optional fallback label, used if no custom label slot is provided.
|
|
13
|
+
* Ignored if the `default` slot is used (see slot description).
|
|
14
|
+
*/
|
|
15
|
+
label?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional description shown under the radio label, providing more context.
|
|
18
|
+
*/
|
|
19
|
+
description?: string;
|
|
20
|
+
/**
|
|
21
|
+
* If true, disables this radio button.
|
|
22
|
+
*/
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
type __VLS_Slots = {
|
|
26
|
+
/**
|
|
27
|
+
* Default slot used to fully customize the radio label.
|
|
28
|
+
* When provided, this slot replaces the default `label` prop.
|
|
29
|
+
*/
|
|
30
|
+
default?: Slot;
|
|
31
|
+
};
|
|
32
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvRadioButtonProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AvRadioButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
35
|
+
new (): {
|
|
36
|
+
$slots: S;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/vue3';
|
|
2
|
+
import { type AvRadioButtonSetProps } from '@/components/interaction/radios/AvRadioButtonSet/AvRadioButtonSet.vue';
|
|
3
|
+
/**
|
|
4
|
+
* <h1 class="n1">Radio button set - <code>AvRadioButtonSet</code></h1>
|
|
5
|
+
*
|
|
6
|
+
* <h2 class="n2">🌟 Introduction</h2>
|
|
7
|
+
*
|
|
8
|
+
* <p>
|
|
9
|
+
* <span class="b2-regular">
|
|
10
|
+
* The <code>AvRadioButtonSet</code> component implements VueDSFR <code>DsfrRadioButtonSet</code> while automatically managing the addition of
|
|
11
|
+
* <code>DsfrRadioButton</code> according to the <code>AvRadioButton</code> present in the <code>default</code> slot.
|
|
12
|
+
* </span>
|
|
13
|
+
* </p>
|
|
14
|
+
*
|
|
15
|
+
* <p>
|
|
16
|
+
* <span class="b2-regular">
|
|
17
|
+
* Radio buttons allow the user to select a single option from a list.
|
|
18
|
+
* </span>
|
|
19
|
+
* </p>
|
|
20
|
+
*
|
|
21
|
+
* <p>
|
|
22
|
+
* <span class="b2-regular">
|
|
23
|
+
* The radio button cannot be used on its own: a minimum of 2 options is required. It is preferable not to select a default option,
|
|
24
|
+
* so that the user choice is conscious (especially if the choice is mandatory).
|
|
25
|
+
* </span>
|
|
26
|
+
* </p>
|
|
27
|
+
*
|
|
28
|
+
* <p>
|
|
29
|
+
* <span class="b2-regular">
|
|
30
|
+
* 🏅 Documentation on <code>DsfrRadioButtonSet</code> can be found at
|
|
31
|
+
* <a href="https://vue-ds.fr/composants/DsfrRadioButtonSet" target="_blank" rel="noopener noreferrer">VueDSFR</a>
|
|
32
|
+
* </span>
|
|
33
|
+
* </p>
|
|
34
|
+
*
|
|
35
|
+
* <h2 class="n2">📐 Structure</h2>
|
|
36
|
+
*
|
|
37
|
+
* <p><span class="b2-regular">The <code>AvRadioButtonSet</code> component consists of the following elements:</span></p>
|
|
38
|
+
*
|
|
39
|
+
* <ul>
|
|
40
|
+
* <li><span class="b2-regular">A <code><div></code> element encompassing the entire radio group.</span></li>
|
|
41
|
+
* <li><span class="b2-regular">A <code><fieldset></code> element containing the radio buttons and associated messages.</span></li>
|
|
42
|
+
* <li><span class="b2-regular">A legend (<code>legend</code>) defined by the <code>legend</code> prop and customizable with the <code>legend</code> slot.</span></li>
|
|
43
|
+
* <li><span class="b2-regular">A hint (<code>hint</code>) defined by the <code>hint</code> prop and customizable with the <code>hint</code> slot.</span></li>
|
|
44
|
+
* <li><span class="b2-regular">A group of individual radio buttons rendered by the <code>AvRadioButton</code>/<code>DsfrRadioButton</code> component.</span></li>
|
|
45
|
+
* <li><span class="b2-regular">An information, error or validation message, displayed below the group of radio buttons (optional).</span></li>
|
|
46
|
+
* </ul>
|
|
47
|
+
*/
|
|
48
|
+
declare const meta: Meta<AvRadioButtonSetProps>;
|
|
49
|
+
export default meta;
|
|
50
|
+
export declare const Default: StoryFn<AvRadioButtonSetProps>;
|
|
51
|
+
export declare const Inline: StoryFn<AvRadioButtonSetProps>;
|
|
52
|
+
export declare const Disabled: StoryFn<AvRadioButtonSetProps>;
|
|
53
|
+
export declare const Error: StoryFn<AvRadioButtonSetProps>;
|
|
54
|
+
export declare const SuccessInline: StoryFn<AvRadioButtonSetProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { type Slot } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* AvRadioButtonSet component props.
|
|
4
|
+
*/
|
|
5
|
+
export interface AvRadioButtonSetProps {
|
|
6
|
+
/**
|
|
7
|
+
* Name of the radio group, applied to each radio `<input name>`.
|
|
8
|
+
* Used for form submission and accessibility.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/**
|
|
12
|
+
* Label (legend) for the radio group, rendered visually as a title.
|
|
13
|
+
* Helps screen readers understand the group context.
|
|
14
|
+
*/
|
|
15
|
+
legend?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Current selected value in the radio group.
|
|
18
|
+
* Must match one of the options values.
|
|
19
|
+
*/
|
|
20
|
+
modelValue: string | number | boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* If true, disables all radio buttons in the group.
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* If true, marks the group as required and shows a required indicator.
|
|
27
|
+
*/
|
|
28
|
+
required?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* If true, displays the radio buttons in compact (small) mode.
|
|
31
|
+
*/
|
|
32
|
+
small?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* If true, displays the radio buttons inline (horizontally).
|
|
35
|
+
*/
|
|
36
|
+
inline?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Optional global error message displayed below the group.
|
|
39
|
+
* If set, indicates a validation error.
|
|
40
|
+
*/
|
|
41
|
+
errorMessage?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Optional global valid message displayed below the group.
|
|
44
|
+
* If set, confirms successful validation.
|
|
45
|
+
*/
|
|
46
|
+
validMessage?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional hint text displayed below the legend.
|
|
49
|
+
* Provides guidance or extra information.
|
|
50
|
+
*/
|
|
51
|
+
hint?: string;
|
|
52
|
+
}
|
|
53
|
+
type __VLS_Slots = {
|
|
54
|
+
/**
|
|
55
|
+
* Default slot to pass in one or more `AvRadioButton` components.
|
|
56
|
+
*
|
|
57
|
+
* Each `AvRadioButton` defines the props and content for a single radio option.
|
|
58
|
+
* The content of each button will be injected into the `label` slot of `DsfrRadioButton`.
|
|
59
|
+
*
|
|
60
|
+
* @slot default
|
|
61
|
+
*/
|
|
62
|
+
default?: Slot;
|
|
63
|
+
};
|
|
64
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<AvRadioButtonSetProps, {
|
|
65
|
+
selected: import("vue").Ref<string | number | boolean | undefined, string | number | boolean | undefined>;
|
|
66
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
67
|
+
"update:modelValue": (value: string | number | boolean) => any;
|
|
68
|
+
}, string, import("vue").PublicProps, Readonly<AvRadioButtonSetProps> & Readonly<{
|
|
69
|
+
"onUpdate:modelValue"?: ((value: string | number | boolean) => any) | undefined;
|
|
70
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
71
|
+
export default _default;
|
|
72
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
73
|
+
new (): {
|
|
74
|
+
$slots: S;
|
|
75
|
+
};
|
|
76
|
+
};
|