@avenirs-esr/avenirs-dsav 0.1.28 → 0.1.30

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.
@@ -33,13 +33,13 @@ import { type AvButtonProps } from '@/components/interaction/buttons/AvButton/Av
33
33
  * <ul>
34
34
  * <li>
35
35
  * <span class="b2-regular">
36
- * A label mandatory, using the <code>label</code> prop, enables label display when <code>iconOnly</code> is <code>false</code>,
36
+ * A label - mandatory, using the <code>label</code> prop, enables label display when <code>iconOnly</code> is <code>false</code>,
37
37
  * also enables connection to <code>title</code> and <code>aria-label</code>;
38
38
  * </span>
39
39
  * </li>
40
40
  * <li>
41
41
  * <span class="b2-regular">
42
- * An icon, which can be modified (see available icons) optional.
42
+ * An icon, which can be modified (see available icons) - optional.
43
43
  * </span>
44
44
  * </li>
45
45
  * </ul>
@@ -508,6 +508,8 @@ export declare const WithCustomItemSlotExample: {
508
508
  CHECK: string;
509
509
  CHECK_CIRCLE: string;
510
510
  CHECK_CIRCLE_OUTLINE: string;
511
+ CHECKBOX_BLANK_OUTLINE: string;
512
+ CHECKBOX_MARKED: string;
511
513
  CHEVRON_DOUBLE_LEFT: string;
512
514
  CHEVRON_DOUBLE_RIGHT: string;
513
515
  CLOSE_CIRCLE_OUTLINE: string;
@@ -0,0 +1,129 @@
1
+ import type { StoryFn } from '@storybook/vue3';
2
+ import { type AvMultiselectProps } from '@/components/interaction/selects/AvMultiselect/AvMultiselect.vue';
3
+ /**
4
+ * <h2 class="n2">✨ Introduction</h2>
5
+ *
6
+ * <p>
7
+ * <span class="b2-regular">
8
+ * The <code>AvMultiselect</code> is a Vue component enabling a user to select one or many items from a given list.
9
+ * </span>
10
+ * </p>
11
+ *
12
+ * <p>
13
+ * <span class="b2-regular">
14
+ * The drop-down list provides a list of options for the user to choose from.
15
+ * The user can filter this list and use a button to select/deselect all visible items.
16
+ * </span>
17
+ * </p>
18
+ *
19
+ * <h2 class="n2">🏗️ Structure</h2>
20
+ *
21
+ * <p><span class="b2-regular">The <code>AvMultiselect</code> consists of:</span></p>
22
+ * <ul>
23
+ * <li><span class="b2-regular">a <strong>label</strong> - Mandatory (<code>label</code> prop)</span></li>
24
+ * <li><span class="b2-regular">a <strong>description</strong> - Optional (<code>hint</code> prop or <code>hint</code> slot)</span></li>
25
+ * <li><span class="b2-regular">a <strong>list</strong> - Composed of a set of selectable options (mandatory, <code>options</code> prop with a label, a value and an optional icon)</span></li>
26
+ * </ul>
27
+ *
28
+ * <p><span class="b2-regular">Inside the list:</span></p>
29
+ * <ul>
30
+ * <li><span class="b2-regular">a <strong>"Select all" / "Deselect all" button</strong> - Optional (<code>selectAll</code> and <code>selectAllLabel</code> props)</span></li>
31
+ * <li><span class="b2-regular">an <strong>input field</strong> - Optional</span></li>
32
+ * <li><span class="b2-regular">a <strong>form section (fieldset)</strong> containing:</span>
33
+ * <ul>
34
+ * <li><span class="b2-regular">a <strong>legend</strong> - Optional, can be hidden (<code>legend</code> prop or <code>legend</code> slot)</span></li>
35
+ * <li><span class="b2-regular">a <strong>description of the group</strong> - Optional, can be hidden</span></li>
36
+ * <li><span class="b2-regular">a <strong>list of options</strong> - Mandatory (<code>options</code> prop with a label, a value and an optional icon)</span></li>
37
+ * </ul>
38
+ * </li>
39
+ * </ul>
40
+ */
41
+ declare const meta: {
42
+ title: string;
43
+ component: import("vue").DefineComponent<AvMultiselectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
44
+ "update:modelValue": (value: import("@/components/interaction/selects/AvMultiselect/AvMultiselect.vue").AvMultiselectOption[]) => any;
45
+ }, string, import("vue").PublicProps, Readonly<AvMultiselectProps> & Readonly<{
46
+ "onUpdate:modelValue"?: ((value: import("@/components/interaction/selects/AvMultiselect/AvMultiselect.vue").AvMultiselectOption[]) => any) | undefined;
47
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
48
+ tags: string[];
49
+ argTypes: {
50
+ disabled: {
51
+ control: string;
52
+ };
53
+ dense: {
54
+ control: string;
55
+ };
56
+ selectId: {
57
+ control: string;
58
+ };
59
+ name: {
60
+ control: string;
61
+ };
62
+ hint: {
63
+ control: string;
64
+ };
65
+ modelValue: {
66
+ type: {
67
+ name: string;
68
+ required: boolean;
69
+ };
70
+ control: boolean;
71
+ };
72
+ label: {
73
+ control: string;
74
+ };
75
+ options: {
76
+ type: {
77
+ name: string;
78
+ required: boolean;
79
+ };
80
+ control: boolean;
81
+ };
82
+ successMessage: {
83
+ control: string;
84
+ };
85
+ errorMessage: {
86
+ control: string;
87
+ };
88
+ defaultUnselectedText: {
89
+ control: string;
90
+ required: boolean;
91
+ };
92
+ selectAll: {
93
+ control: string;
94
+ };
95
+ search: {
96
+ control: string;
97
+ };
98
+ };
99
+ args: {
100
+ options: {
101
+ value: string;
102
+ label: string;
103
+ }[];
104
+ defaultUnselectedText: string;
105
+ required: boolean;
106
+ disabled: boolean;
107
+ selectId: string;
108
+ name: string;
109
+ hint: string;
110
+ modelValue: never[];
111
+ label: string;
112
+ successMessage: string;
113
+ errorMessage: string;
114
+ dense: boolean;
115
+ selectAll: boolean;
116
+ search: boolean;
117
+ };
118
+ parameters: {
119
+ docs: {
120
+ story: {
121
+ height: string;
122
+ };
123
+ };
124
+ };
125
+ };
126
+ export default meta;
127
+ export declare const Default: StoryFn<AvMultiselectProps>;
128
+ export declare const Dense: StoryFn<AvMultiselectProps>;
129
+ export declare const OptionsWithIcon: StoryFn<AvMultiselectProps>;
@@ -0,0 +1,90 @@
1
+ /**
2
+ * AvMultiselect option props.
3
+ */
4
+ export interface AvMultiselectOption {
5
+ /**
6
+ * Displayed label of the option
7
+ */
8
+ label: string;
9
+ /**
10
+ * Name of the icon option
11
+ */
12
+ icon?: string;
13
+ /**
14
+ * Value of the option
15
+ */
16
+ value: string | number;
17
+ }
18
+ /**
19
+ * AvMultiselect component props.
20
+ */
21
+ export interface AvMultiselectProps {
22
+ /**
23
+ * Indicated if the select is disabled.
24
+ */
25
+ disabled?: boolean;
26
+ /**
27
+ * Unique id for the select. Used for the accessibility.
28
+ */
29
+ selectId?: string;
30
+ /**
31
+ * Field name.
32
+ */
33
+ name?: string;
34
+ /**
35
+ * Hint for guidance.
36
+ */
37
+ hint?: string;
38
+ /**
39
+ * Selected option(s) value(s).
40
+ */
41
+ modelValue: AvMultiselectOption[];
42
+ /**
43
+ * Select text label.
44
+ */
45
+ label: string;
46
+ /**
47
+ * Selectable options.
48
+ */
49
+ options?: AvMultiselectOption[];
50
+ /**
51
+ * If set, display a success message.
52
+ */
53
+ successMessage?: string;
54
+ /**
55
+ * If set, display an error message.
56
+ */
57
+ errorMessage?: string;
58
+ /**
59
+ * Placeholder text.
60
+ */
61
+ defaultUnselectedText: string;
62
+ /**
63
+ * dense mode
64
+ */
65
+ dense?: boolean;
66
+ /**
67
+ * Displayed text when options are selected.
68
+ */
69
+ selectedText?: string;
70
+ /**
71
+ * Displays the select all items button
72
+ */
73
+ selectAll?: boolean;
74
+ /**
75
+ * Update the select all items button label
76
+ * @default
77
+ * ["Tout sélectionner", "Tout désélectionner"]
78
+ */
79
+ selectAllLabel?: [string, string];
80
+ /**
81
+ * Displays the search bar
82
+ */
83
+ search?: boolean;
84
+ }
85
+ declare const _default: import("vue").DefineComponent<AvMultiselectProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
86
+ "update:modelValue": (value: AvMultiselectOption[]) => any;
87
+ }, string, import("vue").PublicProps, Readonly<AvMultiselectProps> & Readonly<{
88
+ "onUpdate:modelValue"?: ((value: AvMultiselectOption[]) => any) | undefined;
89
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
90
+ export default _default;
@@ -20,6 +20,8 @@ export declare const MDI_ICONS: {
20
20
  CHECK: string;
21
21
  CHECK_CIRCLE: string;
22
22
  CHECK_CIRCLE_OUTLINE: string;
23
+ CHECKBOX_BLANK_OUTLINE: string;
24
+ CHECKBOX_MARKED: string;
23
25
  CHEVRON_DOUBLE_LEFT: string;
24
26
  CHEVRON_DOUBLE_RIGHT: string;
25
27
  CLOSE_CIRCLE_OUTLINE: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@avenirs-esr/avenirs-dsav",
3
3
  "type": "module",
4
- "version": "0.1.28",
4
+ "version": "0.1.30",
5
5
  "main": "dist/avenirs-dsav.umd.js",
6
6
  "module": "dist/avenirs-dsav.es.js",
7
7
  "types": "dist/index.d.ts",