@cnamts/synapse 0.0.16-alpha → 1.0.0
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/components/Accordion/Accordion.d.ts +39 -0
- package/dist/components/Accordion/config.d.ts +9 -0
- package/dist/components/ChipList/ChipList.d.ts +1 -1
- package/dist/components/CopyBtn/CopyBtn.d.ts +2 -0
- package/dist/components/Customs/SyInputSelect/SyInputSelect.d.ts +12 -0
- package/dist/components/Customs/SySelect/SySelect.d.ts +43 -16
- package/dist/components/Customs/SyTextField/SyTextField.d.ts +17 -17
- package/dist/components/DatePicker/DatePicker.d.ts +34 -34
- package/dist/components/DatePicker/DateTextInput.d.ts +16 -16
- package/dist/components/DiacriticPicker/DiacriticPicker.d.ts +27 -0
- package/dist/components/DiacriticPicker/config.d.ts +14 -0
- package/dist/components/DiacriticPicker/locales.d.ts +6 -0
- package/dist/components/DownloadBtn/DownloadBtn.d.ts +1 -1
- package/dist/components/FooterBar/FooterBar.d.ts +1 -1
- package/dist/components/NirField/NirField.d.ts +34 -32
- package/dist/components/NotificationBar/NotificationBar.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PeriodField/PeriodField.d.ts +64 -64
- package/dist/components/PhoneField/PhoneField.d.ts +1 -0
- package/dist/components/PhoneField/tests/types.d.ts +18 -0
- package/dist/components/SyTextArea/SyTextArea.d.ts +900 -0
- package/dist/components/SyTextArea/locales.d.ts +3 -0
- package/dist/components/SyTextArea/trimStartOnUpdate.d.ts +1 -0
- package/dist/components/SyTextArea/useTextActions.d.ts +13 -0
- package/dist/components/SyTextArea/wrapText.d.ts +1 -0
- package/dist/components/TableToolbar/TableToolbar.d.ts +10 -4
- package/dist/components/TableToolbar/config.d.ts +3 -2
- package/dist/components/index.d.ts +3 -0
- package/dist/composables/date/useHolidayDay.d.ts +36 -0
- package/dist/design-system-v3.js +4202 -3529
- package/dist/design-system-v3.umd.cjs +4 -1
- package/dist/designTokens/tokens/pa/paLightTheme.d.ts +1 -32
- package/dist/style.css +1 -1
- package/dist/utils/rules/index.d.ts +1 -0
- package/dist/utils/rules/isHolidayDay/index.d.ts +11 -0
- package/dist/utils/rules/isHolidayDay/locales.d.ts +2 -0
- package/package.json +3 -2
- package/src/assets/settings.scss +12 -0
- package/src/components/Accordion/Accordion.mdx +69 -0
- package/src/components/Accordion/Accordion.stories.ts +262 -0
- package/src/components/Accordion/Accordion.vue +319 -0
- package/src/components/Accordion/config.ts +9 -0
- package/src/components/Accordion/tests/__snapshots__/accordion.spec.ts.snap +155 -0
- package/src/components/Accordion/tests/accordion.spec.ts +492 -0
- package/src/components/CopyBtn/CopyBtn.stories.ts +189 -0
- package/src/components/CopyBtn/CopyBtn.vue +29 -1
- package/src/components/CopyBtn/tests/CopyBtn.spec.ts +102 -0
- package/src/components/Customs/SyInputSelect/SyInputSelect.stories.ts +155 -1
- package/src/components/Customs/SyInputSelect/SyInputSelect.vue +97 -14
- package/src/components/Customs/SyInputSelect/tests/SyInputSelect.spec.ts +386 -106
- package/src/components/Customs/SySelect/SySelect.stories.ts +121 -2
- package/src/components/Customs/SySelect/SySelect.vue +33 -8
- package/src/components/Customs/SySelect/tests/SySelect.spec.ts +290 -1
- package/src/components/Customs/SyTextField/SyTextField.vue +5 -3
- package/src/components/DatePicker/DatePicker.vue +16 -3
- package/src/components/DatePicker/DateTextInput.vue +16 -5
- package/src/components/DatePicker/examples/DatePickerHolidayRule.vue +130 -0
- package/src/components/DiacriticPicker/DiacriticPicker.mdx +104 -0
- package/src/components/DiacriticPicker/DiacriticPicker.stories.ts +447 -0
- package/src/components/DiacriticPicker/DiacriticPicker.vue +262 -0
- package/src/components/DiacriticPicker/config.ts +15 -0
- package/src/components/DiacriticPicker/locales.ts +6 -0
- package/src/components/DiacriticPicker/tests/DiatriticPicker.spec.ts +132 -0
- package/src/components/DialogBox/DialogBox.vue +1 -3
- package/src/components/NirField/NirField.stories.ts +172 -0
- package/src/components/NirField/NirField.vue +15 -7
- package/src/components/NotificationBar/Accessibilite.stories.ts +1 -1
- package/src/components/NotificationBar/NotificationBar.stories.ts +14 -0
- package/src/components/NotificationBar/NotificationBar.vue +26 -3
- package/src/components/NotificationBar/{options.ts → config.ts} +0 -1
- package/src/components/PaginatedTable/PaginatedTable.vue +0 -11
- package/src/components/PasswordField/PasswordField.stories.ts +4 -3
- package/src/components/PasswordField/PasswordField.vue +26 -18
- package/src/components/PasswordField/tests/PasswordField.spec.ts +1 -10
- package/src/components/PhoneField/PhoneField.stories.ts +143 -0
- package/src/components/PhoneField/PhoneField.vue +88 -30
- package/src/components/PhoneField/tests/PhoneField.additional.spec.ts +266 -0
- package/src/components/PhoneField/tests/PhoneField.spec.ts +248 -28
- package/src/components/PhoneField/tests/types.d.ts +19 -0
- package/src/components/SyTextArea/SyTextArea.mdx +17 -0
- package/src/components/SyTextArea/SyTextArea.stories.ts +322 -0
- package/src/components/SyTextArea/SyTextArea.vue +113 -0
- package/src/components/SyTextArea/locales.ts +3 -0
- package/src/components/SyTextArea/tests/SyTextArea.spec.ts +194 -0
- package/src/components/SyTextArea/trimStartOnUpdate.ts +12 -0
- package/src/components/SyTextArea/useTextActions.ts +52 -0
- package/src/components/SyTextArea/wrapText.ts +42 -0
- package/src/components/TableToolbar/TableToolbar.mdx +86 -1
- package/src/components/TableToolbar/TableToolbar.stories.ts +422 -74
- package/src/components/TableToolbar/TableToolbar.vue +25 -8
- package/src/components/TableToolbar/config.ts +3 -2
- package/src/components/TableToolbar/tests/__snapshots__/TableToolbar.spec.ts.snap +35 -12
- package/src/components/index.ts +3 -0
- package/src/composables/date/useHolidayDay.ts +98 -0
- package/src/composables/rules/useFieldValidation.ts +16 -3
- package/src/composables/validation/useValidation.ts +2 -1
- package/src/designTokens/tokens/pa/paLightTheme.ts +10 -41
- package/src/stories/Accessibilite/Introduction.mdx +5 -2
- package/src/stories/DesignTokens/colors.stories.ts +100 -41
- package/src/utils/rules/index.ts +1 -0
- package/src/utils/rules/isHolidayDay/IsHolidayDay.mdx +52 -0
- package/src/utils/rules/isHolidayDay/IsHolidayDay.stories.ts +129 -0
- package/src/utils/rules/isHolidayDay/index.ts +36 -0
- package/src/utils/rules/isHolidayDay/locales.ts +5 -0
- package/src/utils/rules/isHolidayDay/tests/isHolidayDay.spec.ts +35 -0
- /package/dist/components/NotificationBar/{options.d.ts → config.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function trimStartOnUpdate(input: HTMLTextAreaElement): (value: string) => string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { VTextarea } from 'vuetify/components/VTextarea';
|
|
3
|
+
type ActionsOptions = {
|
|
4
|
+
trim: Ref<boolean>;
|
|
5
|
+
autoWrap: Ref<number | undefined>;
|
|
6
|
+
replaceTabs: Ref<number | undefined>;
|
|
7
|
+
normalize: Ref<boolean>;
|
|
8
|
+
};
|
|
9
|
+
export default function useTextActions(textAreaRef: Ref<InstanceType<typeof VTextarea> | null>, options: ActionsOptions): {
|
|
10
|
+
changeActions: import('vue').ComputedRef<((value: string) => string)[]>;
|
|
11
|
+
blurActions: import('vue').ComputedRef<((value: string) => string)[]>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function wrapText(maxLength: number): (value: string) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomizableOptions } from '../../composables/useCustomizableOptions';
|
|
2
2
|
import { locales as defaultLocales } from './locales';
|
|
3
3
|
type __VLS_Props = {
|
|
4
|
-
nbTotal
|
|
4
|
+
nbTotal?: number;
|
|
5
5
|
nbFiltered?: number;
|
|
6
6
|
search?: string;
|
|
7
7
|
searchLabel?: string;
|
|
@@ -24,13 +24,19 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__
|
|
|
24
24
|
search: string;
|
|
25
25
|
addBtnLabel: string;
|
|
26
26
|
};
|
|
27
|
+
nbTotal: number;
|
|
27
28
|
nbFiltered: number;
|
|
28
29
|
searchLabel: string;
|
|
29
30
|
showAddButton: boolean;
|
|
30
31
|
addButtonLabel: string;
|
|
31
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, Readonly<{
|
|
33
|
+
searchLeft?: (() => undefined) | undefined;
|
|
34
|
+
searchRight?: (() => undefined) | undefined;
|
|
35
|
+
filters?: (() => undefined) | undefined;
|
|
36
|
+
}> & {
|
|
37
|
+
searchLeft?: (() => undefined) | undefined;
|
|
38
|
+
searchRight?: (() => undefined) | undefined;
|
|
39
|
+
filters?: (() => undefined) | undefined;
|
|
34
40
|
}>;
|
|
35
41
|
export default _default;
|
|
36
42
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -8,14 +8,15 @@ export declare const config: {
|
|
|
8
8
|
readonly addBtn: {
|
|
9
9
|
readonly variant: "outlined";
|
|
10
10
|
readonly color: "primary";
|
|
11
|
-
readonly class: "
|
|
11
|
+
readonly class: "px-2 px-md-4";
|
|
12
12
|
readonly minWidth: "44px";
|
|
13
|
+
readonly height: "40px";
|
|
13
14
|
};
|
|
14
15
|
readonly addIconLabel: {
|
|
15
16
|
readonly class: "mr-1";
|
|
16
17
|
};
|
|
17
18
|
readonly textField: {
|
|
18
|
-
readonly variant: "
|
|
19
|
+
readonly variant: "outlined";
|
|
19
20
|
readonly clearable: true;
|
|
20
21
|
readonly singleLine: true;
|
|
21
22
|
readonly hideDetails: true;
|
|
@@ -4,6 +4,7 @@ export type { RuleOptions } from '../composables/rules/useFieldValidation';
|
|
|
4
4
|
export { useNotificationService } from '../services/NotificationService';
|
|
5
5
|
export { useValidation } from '../composables/validation/useValidation';
|
|
6
6
|
export { useDateFormat } from '../composables/date/useDateFormatDayjs';
|
|
7
|
+
export { default as Accordion } from './Accordion/Accordion';
|
|
7
8
|
export { default as BackBtn } from './BackBtn/BackBtn';
|
|
8
9
|
export { default as BackToTopBtn } from './BackToTopBtn/BackToTopBtn';
|
|
9
10
|
export { default as ChipList } from './ChipList/ChipList';
|
|
@@ -23,6 +24,7 @@ export { default as DataList } from './DataList/DataList';
|
|
|
23
24
|
export { default as DataListGroup } from './DataListGroup/DataListGroup';
|
|
24
25
|
export { default as DataListItem } from './DataListItem/DataListItem';
|
|
25
26
|
export { default as DialogBox } from './DialogBox/DialogBox';
|
|
27
|
+
export { default as DiacriticPicker } from './DiacriticPicker/DiacriticPicker';
|
|
26
28
|
export { default as DownloadBtn } from './DownloadBtn/DownloadBtn';
|
|
27
29
|
export { default as ErrorPage } from './ErrorPage/ErrorPage';
|
|
28
30
|
export { default as ExternalLinks } from './ExternalLinks/ExternalLinks';
|
|
@@ -66,6 +68,7 @@ export { default as SkipLink } from './SkipLink/SkipLink';
|
|
|
66
68
|
export { default as SocialMediaLinks } from './SocialMediaLinks/SocialMediaLinks';
|
|
67
69
|
export { default as SubHeader } from './SubHeader/SubHeader';
|
|
68
70
|
export { default as SyAlert } from './SyAlert/SyAlert';
|
|
71
|
+
export { default as SyTextArea } from './SyTextArea/SyTextArea';
|
|
69
72
|
export { default as TableToolbar } from './TableToolbar/TableToolbar';
|
|
70
73
|
export { default as UploadWorkflow } from './UploadWorkflow/UploadWorkflow';
|
|
71
74
|
export { default as UserMenuBtn } from './UserMenuBtn/UserMenuBtn';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composable pour la gestion des jours fériés
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Algorithme de GAUSS pour calculer la date de Pâques
|
|
6
|
+
* @param annee - L'année pour laquelle calculer la date de Pâques
|
|
7
|
+
* @returns Un objet contenant le jour et le mois de Pâques
|
|
8
|
+
*/
|
|
9
|
+
declare function calculPaquesGregorienne(annee: number): {
|
|
10
|
+
jour: number;
|
|
11
|
+
mois: number;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Calcule les jours fériés d'une année donnée
|
|
15
|
+
* @param annee - L'année pour laquelle calculer les jours fériés
|
|
16
|
+
* @param format - Format des jours fériés en retour (défaut : "DD/MM/YYYY")
|
|
17
|
+
* @returns Un Set contenant la liste des jours fériés
|
|
18
|
+
*/
|
|
19
|
+
export declare function getJoursFeries(annee: number, format?: string): Set<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Vérifie si une date est un jour férié
|
|
22
|
+
* @param date - La date à vérifier (Date ou string)
|
|
23
|
+
* @param format - Format de la date si elle est fournie en string (défaut : "DD/MM/YYYY")
|
|
24
|
+
* @returns true si la date est un jour férié, false sinon
|
|
25
|
+
*/
|
|
26
|
+
export declare function isHolidayDay(date: Date | string, format?: string): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Hook composable pour la gestion des jours fériés
|
|
29
|
+
* @returns Fonctions pour gérer les jours fériés
|
|
30
|
+
*/
|
|
31
|
+
export declare function useHolidayDay(): {
|
|
32
|
+
getJoursFeries: typeof getJoursFeries;
|
|
33
|
+
isHolidayDay: typeof isHolidayDay;
|
|
34
|
+
calculPaquesGregorienne: typeof calculPaquesGregorienne;
|
|
35
|
+
};
|
|
36
|
+
export default useHolidayDay;
|