@arche-mc2/vue-ui-lib 1.0.6 → 1.0.8

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 (53) hide show
  1. package/dist/icons.svg +1613 -0
  2. package/dist/types/components/ButtonBase.vue.d.ts +23 -0
  3. package/dist/types/components/CheckboxBase.vue.d.ts +29 -0
  4. package/dist/types/components/DataGrid.vue.d.ts +30 -0
  5. package/dist/types/components/FlyoutMenu.vue.d.ts +20 -0
  6. package/dist/types/components/InputBase.vue.d.ts +21 -0
  7. package/dist/types/components/ListWithSearch.vue.d.ts +24 -0
  8. package/dist/types/components/ModalBase.vue.d.ts +16 -0
  9. package/dist/types/components/OptionalWrapperComponent.vue.d.ts +19 -0
  10. package/dist/types/components/RadioBase.vue.d.ts +21 -0
  11. package/dist/types/components/SegmentedButton.vue.d.ts +41 -0
  12. package/dist/types/components/SelectBase.vue.d.ts +19 -0
  13. package/dist/types/components/TagBase.vue.d.ts +6 -0
  14. package/dist/types/components/ToastBase.vue.d.ts +2 -0
  15. package/dist/types/components/ToggleAdvanced.vue.d.ts +25 -0
  16. package/dist/types/components/ToggleBase.vue.d.ts +23 -0
  17. package/dist/types/components/TooltipBase.vue.d.ts +21 -0
  18. package/dist/types/components/datePicker/DatePicker.vue.d.ts +12 -0
  19. package/dist/types/components/datePicker/DatePickerCalendar.vue.d.ts +18 -0
  20. package/dist/types/components/datePicker/DatePickerNavigation.vue.d.ts +13 -0
  21. package/dist/types/components/loaderBase/LoaderBase.vue.d.ts +7 -0
  22. package/dist/types/components/selectionBase/SelectionGroup.vue.d.ts +19 -0
  23. package/dist/types/components/selectionBase/SelectionItem.vue.d.ts +29 -0
  24. package/dist/types/components/svgIcon/SvgIcon.vue.d.ts +16 -0
  25. package/dist/types/components/svgIcon/iconNames.d.ts +2 -0
  26. package/dist/types/constantes.d.ts +2 -0
  27. package/dist/types/index.d.ts +39 -0
  28. package/dist/types/stories/buttonBase.stories.d.ts +11 -0
  29. package/dist/types/stories/checkboxBase.stories.d.ts +9 -0
  30. package/dist/types/stories/dataGrid.stories.d.ts +9 -0
  31. package/dist/types/stories/datePicker.stories.d.ts +6 -0
  32. package/dist/types/stories/flyoutMenu.stories.d.ts +6 -0
  33. package/dist/types/stories/inputBase.stories.d.ts +12 -0
  34. package/dist/types/stories/listWithSearch.stories.d.ts +9 -0
  35. package/dist/types/stories/loaderBase.stories.d.ts +7 -0
  36. package/dist/types/stories/modalBase.stories.d.ts +5 -0
  37. package/dist/types/stories/radioBase.stories.d.ts +10 -0
  38. package/dist/types/stories/segmentedButton.stories.d.ts +8 -0
  39. package/dist/types/stories/selectBase.stories.d.ts +9 -0
  40. package/dist/types/stories/selectionGroup.stories.d.ts +7 -0
  41. package/dist/types/stories/svgIcon.stories.d.ts +7 -0
  42. package/dist/types/stories/tagBase.stories.d.ts +9 -0
  43. package/dist/types/stories/toastBase.stories.d.ts +6 -0
  44. package/dist/types/stories/toggleAdvanced.stories.d.ts +8 -0
  45. package/dist/types/stories/toggleBase.stories.d.ts +8 -0
  46. package/dist/types/stories/tooltipBase.stories.d.ts +104 -0
  47. package/dist/types/types.d.ts +46 -0
  48. package/dist/types/utils/date.d.ts +91 -0
  49. package/dist/types/utils/provideToast.d.ts +7 -0
  50. package/dist/types/utils/string.d.ts +2 -0
  51. package/dist/vue-ui-lib.es.js +2586 -2586
  52. package/dist/vue-ui-lib.umd.js +1 -1
  53. package/package.json +3 -3
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import LoaderBase from "../components/loaderBase/LoaderBase.vue";
3
+ declare const meta: Meta<typeof LoaderBase>;
4
+ export default meta;
5
+ export declare const Défaut: StoryFn;
6
+ export declare const Petit: StoryFn;
7
+ export declare const Large: StoryFn;
@@ -0,0 +1,5 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import ModalBase from "../components/ModalBase.vue";
3
+ declare const meta: Meta<typeof ModalBase>;
4
+ export default meta;
5
+ export declare const Modale: StoryFn;
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import RadioBase from "../components/RadioBase.vue";
3
+ declare const _default: Meta<typeof RadioBase>;
4
+ export default _default;
5
+ declare const Template: StoryFn<typeof RadioBase>;
6
+ export declare const Défaut: typeof Template;
7
+ export declare const DeuxChoix: typeof Template;
8
+ export declare const AvecIcône: typeof Template;
9
+ export declare const Désactivé: typeof Template;
10
+ export declare const ThemePersonnalisé: typeof Template;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import SegmentedButton from "../components/SegmentedButton.vue";
3
+ declare const _default: Meta<typeof SegmentedButton>;
4
+ export default _default;
5
+ declare const Template: StoryFn<typeof SegmentedButton>;
6
+ export declare const Défaut: typeof Template;
7
+ export declare const Désactivé: typeof Template;
8
+ export declare const ThemePersonnalisé: typeof Template;
@@ -0,0 +1,9 @@
1
+ import SelectBase from "../components/SelectBase.vue";
2
+ import type { Meta, StoryFn } from "@storybook/vue3";
3
+ declare const _default: Meta<typeof SelectBase>;
4
+ export default _default;
5
+ declare const Template: StoryFn<typeof SelectBase>;
6
+ export declare const Défaut: typeof Template;
7
+ export declare const AvecPréselection: typeof Template;
8
+ export declare const MultiSelection: typeof Template;
9
+ export declare const Désactivé: typeof Template;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import SelectionGroup from "../components/selectionBase/SelectionGroup.vue";
3
+ declare const meta: Meta<typeof SelectionGroup>;
4
+ export default meta;
5
+ declare const Template: StoryFn<typeof SelectionGroup>;
6
+ export declare const Défaut: typeof Template;
7
+ export declare const Disabled: typeof Template;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import SvgIcon from "../components/svgIcon/SvgIcon.vue";
3
+ declare const meta: Meta<typeof SvgIcon>;
4
+ export default meta;
5
+ declare const Template: StoryFn<typeof SvgIcon>;
6
+ export declare const defaut: typeof Template;
7
+ export declare const all: typeof Template;
@@ -0,0 +1,9 @@
1
+ import BaseTag from "../components/TagBase.vue";
2
+ import type { Meta, StoryFn } from "@storybook/vue3";
3
+ declare const _default: Meta<typeof BaseTag>;
4
+ export default _default;
5
+ declare const Template: StoryFn<typeof BaseTag>;
6
+ export declare const Primaire: typeof Template;
7
+ export declare const Secondaire: typeof Template;
8
+ export declare const Bleu: typeof Template;
9
+ export declare const Vert: typeof Template;
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import ToastBase from "../components/ToastBase.vue";
3
+ declare const _default: Meta<typeof ToastBase>;
4
+ export default _default;
5
+ declare const Template: StoryFn;
6
+ export declare const Default: typeof Template;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryFn } from "@storybook/vue3";
2
+ import ToggleAdvanced from "../components/ToggleAdvanced.vue";
3
+ declare const _default: Meta<typeof ToggleAdvanced>;
4
+ export default _default;
5
+ export declare const Défaut: StoryFn;
6
+ export declare const AvecIcônes: StoryFn;
7
+ export declare const Désactivé: StoryFn;
8
+ export declare const ThemePersonnalisé: StoryFn;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from "@storybook/vue3";
2
+ import ToggleBase from "../components/ToggleBase.vue";
3
+ declare const meta: Meta<typeof ToggleBase>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ToggleBase>;
6
+ export declare const Défaut: Story;
7
+ export declare const Désactivé: Story;
8
+ export declare const AvecIcône: Story;
@@ -0,0 +1,104 @@
1
+ import TooltipBase from "../components/TooltipBase.vue";
2
+ import type { Meta, StoryFn } from "@storybook/vue3";
3
+ declare const meta: Meta<typeof TooltipBase>;
4
+ export default meta;
5
+ export declare const EnDessous: StoryFn<{
6
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
7
+ position: import("../types.js").Position;
8
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
9
+ P: {};
10
+ B: {};
11
+ D: {};
12
+ C: {};
13
+ M: {};
14
+ Defaults: {};
15
+ }, Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, {
16
+ position: import("../types.js").Position;
17
+ }>;
18
+ __isFragment?: never;
19
+ __isTeleport?: never;
20
+ __isSuspense?: never;
21
+ } & import("vue").ComponentOptionsBase<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
22
+ position: import("../types.js").Position;
23
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
24
+ $slots: {
25
+ default?: (props: {}) => any;
26
+ } & {
27
+ content?: (props: {}) => any;
28
+ };
29
+ })>;
30
+ export declare const AuDessus: StoryFn<{
31
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
32
+ position: import("../types.js").Position;
33
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
34
+ P: {};
35
+ B: {};
36
+ D: {};
37
+ C: {};
38
+ M: {};
39
+ Defaults: {};
40
+ }, Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, {
41
+ position: import("../types.js").Position;
42
+ }>;
43
+ __isFragment?: never;
44
+ __isTeleport?: never;
45
+ __isSuspense?: never;
46
+ } & import("vue").ComponentOptionsBase<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
47
+ position: import("../types.js").Position;
48
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
49
+ $slots: {
50
+ default?: (props: {}) => any;
51
+ } & {
52
+ content?: (props: {}) => any;
53
+ };
54
+ })>;
55
+ export declare const AGauche: StoryFn<{
56
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
57
+ position: import("../types.js").Position;
58
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
59
+ P: {};
60
+ B: {};
61
+ D: {};
62
+ C: {};
63
+ M: {};
64
+ Defaults: {};
65
+ }, Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, {
66
+ position: import("../types.js").Position;
67
+ }>;
68
+ __isFragment?: never;
69
+ __isTeleport?: never;
70
+ __isSuspense?: never;
71
+ } & import("vue").ComponentOptionsBase<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
72
+ position: import("../types.js").Position;
73
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
74
+ $slots: {
75
+ default?: (props: {}) => any;
76
+ } & {
77
+ content?: (props: {}) => any;
78
+ };
79
+ })>;
80
+ export declare const ADroite: StoryFn<{
81
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").PublicProps, {
82
+ position: import("../types.js").Position;
83
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
84
+ P: {};
85
+ B: {};
86
+ D: {};
87
+ C: {};
88
+ M: {};
89
+ Defaults: {};
90
+ }, Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, {
91
+ position: import("../types.js").Position;
92
+ }>;
93
+ __isFragment?: never;
94
+ __isTeleport?: never;
95
+ __isSuspense?: never;
96
+ } & import("vue").ComponentOptionsBase<Readonly<import("../components/TooltipBase.vue").TooltipBaseProps> & Readonly<{}>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
97
+ position: import("../types.js").Position;
98
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
99
+ $slots: {
100
+ default?: (props: {}) => any;
101
+ } & {
102
+ content?: (props: {}) => any;
103
+ };
104
+ })>;
@@ -0,0 +1,46 @@
1
+ import type { CSSProperties } from "vue";
2
+ export declare enum NavType {
3
+ Day = 0,
4
+ Month = 1,
5
+ Year = 2
6
+ }
7
+ export type DayInfo = {
8
+ number: number;
9
+ month: string;
10
+ day: string;
11
+ isCurrent: boolean;
12
+ };
13
+ export type WeekInfo = DayInfo[];
14
+ export type Position = "top" | "bottom" | "left" | "right" | "bottom-left";
15
+ export type Option = {
16
+ value: string;
17
+ label: string;
18
+ };
19
+ export interface Header {
20
+ key: string;
21
+ label: string;
22
+ style?: CSSProperties;
23
+ sortable?: boolean;
24
+ filtered?: boolean;
25
+ filterQty?: number;
26
+ sortOrder?: "ASC" | "DESC";
27
+ dataType: "string" | "number" | "date";
28
+ }
29
+ export interface DatagridHeader extends Header {
30
+ visibility: {
31
+ isShown: boolean;
32
+ isDisabled: boolean;
33
+ update: (value: boolean) => string[];
34
+ };
35
+ }
36
+ export interface FlyoutMenuItem {
37
+ label: string;
38
+ onClick?: () => void;
39
+ }
40
+ export type ButtonTypes = "primary" | "secondary" | "secondary-pink" | "action1" | "action2" | "action3" | "action4" | "action5" | "action6" | "action7";
41
+ export type Intent = "success" | "warning" | "error" | "info";
42
+ export interface Toast {
43
+ id: number;
44
+ message: string;
45
+ intent: Intent;
46
+ }
@@ -0,0 +1,91 @@
1
+ import "dayjs/locale/fr";
2
+ import type { ManipulateType } from "dayjs";
3
+ import type { WeekInfo } from "../types";
4
+ /**
5
+ * Return true if the date1 is before the date2
6
+ * @param date1 {Date} date1
7
+ * @param date2 {Date} date2
8
+ * @returns {boolean} true if date1 is before date2
9
+ */
10
+ export declare const isBefore: (date1: Date, date2: Date) => boolean;
11
+ /**
12
+ * Return true if the date1 is after the date2
13
+ * @param date1 {Date} date1
14
+ * @param date2 {Date} date2
15
+ * @returns {boolean} true if date1 is after date2
16
+ */
17
+ export declare const isAfter: (date1: Date, date2: Date) => boolean;
18
+ /**
19
+ * Return the difference in days between date1 and date2 from the start of the month
20
+ * @param date1 {Date} date1
21
+ * @param date2 {Date} date2
22
+ * @returns {number} Difference in days
23
+ */
24
+ export declare const differenceInMonths: (date1: Date, date2: Date) => number;
25
+ /**
26
+ * Return the first day of the month
27
+ * @param date {Date} Date object
28
+ * @returns {string} Date object
29
+ */
30
+ export declare const firstDayOfMonth: (date?: Date) => string;
31
+ /**
32
+ * Return the number of days in the month
33
+ * @param date {Date} Date object
34
+ * @returns {number} Number of days
35
+ */
36
+ export declare const daysInMonth: (date?: Date) => number;
37
+ /**
38
+ * Return if the date is full same
39
+ * @param date1 {Date} Date object
40
+ * @param date2 {Date} Date object
41
+ * @returns {boolean} True if the date is full same
42
+ *
43
+ * @example
44
+ * isSameDate(new Date(2020, 0, 1), new Date(2020, 0, 1)) // true
45
+ * isSameDate(new Date(2020, 0, 1), new Date(2020, 0, 2)) // false
46
+ * isSameDate(new Date(2020, 0, 1), new Date(2020, 2, 1)) // false
47
+ */
48
+ export declare const isSameDate: (date1: Date, date2: Date, { noDay, }?: {
49
+ noDay?: boolean;
50
+ }) => boolean;
51
+ /**
52
+ * Return the date with the key (month,...) added
53
+ * @param date {Date} Date object
54
+ * @param key {string} Key to add (month, year, day...) Default: month
55
+ * @param amount {number} Number of month to add
56
+ * @returns {Date} Date object
57
+ */
58
+ export declare const add: ({ date, key, number, }: {
59
+ date?: Date;
60
+ key?: ManipulateType;
61
+ number?: number;
62
+ }) => Date;
63
+ /**
64
+ * Get an array of X dates starting from the first day of the month
65
+ * @param date {Date} Date object
66
+ * @param number {number} Number of dates
67
+ * @param key {ManipulateType|undefined} Number of dates
68
+ * @returns {Date[]} Array of dates
69
+ */
70
+ export declare const getDateInterval: (date: Date, number: number, key?: ManipulateType | undefined) => Date[];
71
+ /**
72
+ * Return the list of day of week
73
+ * @param date {Date} Date object
74
+ * @param options {object} Options
75
+ * @param options.skipWE {boolean} Skip weekends
76
+ * @param options.monthFormat {string} Formatting template for month
77
+ * @param options.dayFormat {string} Formatting template for days
78
+ * @returns {WeekInfo} Array of dates
79
+ */
80
+ export declare const getWeek: (date?: Date, { skipWE, monthFormat, dayFormat }?: {
81
+ skipWE?: boolean | undefined;
82
+ monthFormat?: string | undefined;
83
+ dayFormat?: string | undefined;
84
+ }) => WeekInfo;
85
+ export declare const monthList: string[];
86
+ /**
87
+ * Return the Year
88
+ * @param date {Date} Date object
89
+ * @returns {string} Year YYYY
90
+ */
91
+ export declare const getYear: (date: Date) => string;
@@ -0,0 +1,7 @@
1
+ import { Intent } from "../types";
2
+ declare function show(message: string, intent?: Intent, duration?: number): void;
3
+ export declare function useToast(): {
4
+ show: typeof show;
5
+ };
6
+ export declare function provideToast(app: any): void;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare const capitalizeFirstLetter: (str: string) => string;
2
+ export declare const removeAccents: (str: string) => string;