@club-employes/utopia 4.345.0 → 4.347.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/molecules/DatePicker/CalendarGrid.d.ts +7 -14
- package/dist/components/molecules/DatePicker/CalendarHeader.d.ts +7 -9
- package/dist/components/molecules/DatePicker/DatePickerFooter.d.ts +4 -0
- package/dist/components/molecules/DatePicker/dateUtils.d.ts +16 -6
- package/dist/components/molecules/DatePicker/types.d.ts +38 -0
- package/dist/components/molecules/DateRange/DateRange.d.ts +24 -0
- package/dist/components/molecules/DateRange/index.d.ts +2 -0
- package/dist/components/molecules/DateRange/types.d.ts +30 -0
- package/dist/components/molecules/index.d.ts +3 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +12443 -11986
- package/dist/utopia.css +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,12 @@
|
|
|
1
|
+
import { CalendarGridProps } from './types';
|
|
1
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
|
|
3
|
-
date: Date;
|
|
4
|
-
isCurrentMonth: boolean;
|
|
5
|
-
}
|
|
6
|
-
type __VLS_Props = {
|
|
7
|
-
weekDays: string[];
|
|
8
|
-
calendarDays: CalendarDay[];
|
|
9
|
-
draftSelectedDate: Date | null;
|
|
10
|
-
minDate?: Date | string;
|
|
11
|
-
maxDate?: Date | string;
|
|
12
|
-
dday?: boolean;
|
|
13
|
-
};
|
|
14
|
-
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3
|
+
declare const _default: DefineComponent<CalendarGridProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
15
4
|
"select-date": (date: Date) => any;
|
|
16
|
-
|
|
5
|
+
"confirm-date": (date: Date) => any;
|
|
6
|
+
"hover-date": (date: Date) => any;
|
|
7
|
+
}, string, PublicProps, Readonly<CalendarGridProps> & Readonly<{
|
|
17
8
|
"onSelect-date"?: ((date: Date) => any) | undefined;
|
|
9
|
+
"onConfirm-date"?: ((date: Date) => any) | undefined;
|
|
10
|
+
"onHover-date"?: ((date: Date) => any) | undefined;
|
|
18
11
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
19
12
|
export default _default;
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
+
import { CalendarHeaderProps } from './types';
|
|
1
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
-
|
|
3
|
-
currentMonthName: string;
|
|
4
|
-
canGoPrev: boolean;
|
|
5
|
-
currentView: 'days' | 'years';
|
|
6
|
-
yearsRange?: string;
|
|
7
|
-
};
|
|
8
|
-
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
3
|
+
declare const _default: DefineComponent<CalendarHeaderProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
9
4
|
next: () => any;
|
|
10
5
|
prev: () => any;
|
|
11
6
|
"toggle-view": () => any;
|
|
12
|
-
}, string, PublicProps, Readonly<
|
|
7
|
+
}, string, PublicProps, Readonly<CalendarHeaderProps> & Readonly<{
|
|
13
8
|
onNext?: (() => any) | undefined;
|
|
14
9
|
onPrev?: (() => any) | undefined;
|
|
15
10
|
"onToggle-view"?: (() => any) | undefined;
|
|
16
|
-
}>, {
|
|
11
|
+
}>, {
|
|
12
|
+
showPrev: boolean;
|
|
13
|
+
showNext: boolean;
|
|
14
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
17
15
|
export default _default;
|
|
@@ -3,13 +3,17 @@ type __VLS_Props = {
|
|
|
3
3
|
formattedDraftDateDisplay: string;
|
|
4
4
|
enableTime: boolean;
|
|
5
5
|
language: string;
|
|
6
|
+
/** Format de saisie : 'DD/MM/YYYY' (défaut/fr) ou 'MM/DD/YYYY' (en). */
|
|
7
|
+
format?: string;
|
|
6
8
|
hideConfirmButton?: boolean;
|
|
7
9
|
};
|
|
8
10
|
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
9
11
|
clear: () => any;
|
|
10
12
|
confirm: () => any;
|
|
13
|
+
"update-draft": (date: Date | null) => any;
|
|
11
14
|
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
15
|
onClear?: (() => any) | undefined;
|
|
13
16
|
onConfirm?: (() => any) | undefined;
|
|
17
|
+
"onUpdate-draft"?: ((date: Date | null) => any) | undefined;
|
|
14
18
|
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
19
|
export default _default;
|
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Utilitaires date pour DatePicker : parsing, formatage, masque
|
|
2
|
+
* Utilitaires date pour DatePicker : parsing, formatage, masque.
|
|
3
|
+
*
|
|
4
|
+
* Formats supportés : 'DD/MM/YYYY' (défaut, fr), 'MM/DD/YYYY' (en).
|
|
5
|
+
* Le séparateur est toujours `/` ; la structure 2-2-4 est identique dans les deux cas,
|
|
6
|
+
* seule l'interprétation des deux premiers groupes diffère.
|
|
3
7
|
*/
|
|
4
8
|
/**
|
|
5
|
-
* Parse une chaîne ou Date
|
|
6
|
-
*
|
|
9
|
+
* Parse une chaîne ou Date en tenant compte du format.
|
|
10
|
+
* - 'DD/MM/YYYY' (défaut) : premier groupe = jour, deuxième = mois.
|
|
11
|
+
* - 'MM/DD/YYYY' : premier groupe = mois, deuxième = jour.
|
|
12
|
+
* Fallback ISO pour les chaînes YYYY-MM-DD et similaires.
|
|
7
13
|
*/
|
|
8
|
-
export declare function parseDate(value: string | Date | null): Date | null;
|
|
9
|
-
/**
|
|
10
|
-
|
|
14
|
+
export declare function parseDate(value: string | Date | null, format?: string): Date | null;
|
|
15
|
+
/**
|
|
16
|
+
* Formate une date pour la saisie clavier selon le format.
|
|
17
|
+
* - 'DD/MM/YYYY' (défaut) → "26/06/2025"
|
|
18
|
+
* - 'MM/DD/YYYY' → "06/26/2025"
|
|
19
|
+
*/
|
|
20
|
+
export declare function formatForInput(date: Date | null, format?: string): string;
|
|
11
21
|
/** Masque DD/MM/YYYY : uniquement chiffres (max 8), insertion auto des /. */
|
|
12
22
|
export declare function applyDateMask(raw: string): string;
|
|
13
23
|
/**
|
|
@@ -30,3 +30,41 @@ export interface DatePickerProps {
|
|
|
30
30
|
/** Masquer le bouton "Choisir la date" — la sélection se confirme automatiquement au clic */
|
|
31
31
|
hideConfirmButton?: boolean;
|
|
32
32
|
}
|
|
33
|
+
export interface CalendarHeaderProps {
|
|
34
|
+
/** Nom du mois courant affiché dans le titre (ex : "Juin 2025"). */
|
|
35
|
+
currentMonthName: string;
|
|
36
|
+
/** Active ou désactive le bouton "précédent" (ex : contrainte minDate). */
|
|
37
|
+
canGoPrev: boolean;
|
|
38
|
+
/** Vue active : 'days' (grille de jours) ou 'years' (sélecteur d'années). */
|
|
39
|
+
currentView: 'days' | 'years';
|
|
40
|
+
/** Libellé de la plage d'années affiché en vue 'years' (ex : "2020 – 2031"). */
|
|
41
|
+
yearsRange?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Affiche ou masque la flèche de navigation "précédent".
|
|
44
|
+
* `false` → remplacé par un placeholder de même taille pour conserver l'alignement.
|
|
45
|
+
* Utile dans le panneau droit d'un DateRange (deux calendriers côte à côte).
|
|
46
|
+
* @default true
|
|
47
|
+
*/
|
|
48
|
+
showPrev?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Affiche ou masque la flèche de navigation "suivant".
|
|
51
|
+
* `false` → remplacé par un placeholder de même taille pour conserver l'alignement.
|
|
52
|
+
* Utile dans le panneau gauche d'un DateRange (deux calendriers côte à côte).
|
|
53
|
+
* @default true
|
|
54
|
+
*/
|
|
55
|
+
showNext?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface CalendarDay {
|
|
58
|
+
date: Date;
|
|
59
|
+
isCurrentMonth: boolean;
|
|
60
|
+
}
|
|
61
|
+
export interface CalendarGridProps {
|
|
62
|
+
weekDays: string[];
|
|
63
|
+
calendarDays: CalendarDay[];
|
|
64
|
+
draftSelectedDate?: Date | null;
|
|
65
|
+
minDate?: Date | string;
|
|
66
|
+
maxDate?: Date | string;
|
|
67
|
+
dday?: boolean;
|
|
68
|
+
rangeStart?: Date | null;
|
|
69
|
+
rangeEnd?: Date | null;
|
|
70
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DateRangeProps, DateRangeValue, DateRangeTrigger } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<DateRangeProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4
|
+
change: (value: DateRangeValue) => any;
|
|
5
|
+
"update:modelValue": (value: DateRangeValue) => any;
|
|
6
|
+
}, string, PublicProps, Readonly<DateRangeProps> & Readonly<{
|
|
7
|
+
onChange?: ((value: DateRangeValue) => any) | undefined;
|
|
8
|
+
"onUpdate:modelValue"?: ((value: DateRangeValue) => any) | undefined;
|
|
9
|
+
}>, {
|
|
10
|
+
size: "small" | "medium" | "large";
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
modelValue: DateRangeValue | null;
|
|
13
|
+
teleport: boolean;
|
|
14
|
+
state: "default" | "valid" | "error";
|
|
15
|
+
readonly: boolean;
|
|
16
|
+
language: "fr" | "en";
|
|
17
|
+
format: string;
|
|
18
|
+
clearable: boolean;
|
|
19
|
+
trigger: DateRangeTrigger;
|
|
20
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
21
|
+
containerRef: HTMLDivElement;
|
|
22
|
+
menuRef: HTMLDivElement;
|
|
23
|
+
}, HTMLDivElement>;
|
|
24
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface DateRangeValue {
|
|
2
|
+
start: Date | null;
|
|
3
|
+
end: Date | null;
|
|
4
|
+
}
|
|
5
|
+
export type DateRangeTrigger = 'dual' | 'single';
|
|
6
|
+
export interface DateRangeProps {
|
|
7
|
+
modelValue?: DateRangeValue | null;
|
|
8
|
+
/** 'dual' = two side-by-side inputs (default); 'single' = one input showing the full range */
|
|
9
|
+
trigger?: DateRangeTrigger;
|
|
10
|
+
/** Used when trigger='single' */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Used when trigger='single' */
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
labelStart?: string;
|
|
15
|
+
labelEnd?: string;
|
|
16
|
+
required?: boolean;
|
|
17
|
+
placeholderStart?: string;
|
|
18
|
+
placeholderEnd?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
readonly?: boolean;
|
|
21
|
+
clearable?: boolean;
|
|
22
|
+
state?: 'default' | 'valid' | 'error';
|
|
23
|
+
message?: string;
|
|
24
|
+
size?: 'small' | 'medium' | 'large';
|
|
25
|
+
format?: string;
|
|
26
|
+
minDate?: Date | string;
|
|
27
|
+
maxDate?: Date | string;
|
|
28
|
+
teleport?: boolean;
|
|
29
|
+
language?: 'fr' | 'en';
|
|
30
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { BottomSheet } from './BottomSheet';
|
|
2
2
|
export type { BottomSheetChangeReason, BottomSheetProps } from './BottomSheet/types';
|
|
3
3
|
export { DatePicker } from './DatePicker';
|
|
4
|
-
export type { DatePickerProps } from './DatePicker/types';
|
|
4
|
+
export type { DatePickerProps, CalendarDay, CalendarGridProps, CalendarHeaderProps } from './DatePicker/types';
|
|
5
5
|
export { DropDown } from './DropDown';
|
|
6
6
|
export { DropFilter } from './DropFilter';
|
|
7
7
|
export { FeedbackState } from './FeedbackState';
|
|
@@ -68,3 +68,5 @@ export { GrantSelect, type GrantSelectItemProps, GrantSelectTree } from './Grant
|
|
|
68
68
|
export { CartStepper, type CartStepperProps, type CartStepperStep } from './CartStepper';
|
|
69
69
|
export { CartPreviewItem } from './CartPreviewItem';
|
|
70
70
|
export type { CartPreviewItemProps } from './CartPreviewItem';
|
|
71
|
+
export { DateRange } from './DateRange';
|
|
72
|
+
export type { DateRangeProps, DateRangeValue, DateRangeTrigger } from './DateRange';
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export type { Icon3DProps } from './components/atoms/Icon3D/types';
|
|
|
32
32
|
export type { SeparatorProps } from './components/atoms/Separator/types';
|
|
33
33
|
export type { BottomSheetChangeReason, BottomSheetProps } from './components/molecules/BottomSheet/types';
|
|
34
34
|
export type { CounterButtonsProps } from './components/molecules/CounterButtons/types';
|
|
35
|
-
export type { DatePickerProps } from './components/molecules/DatePicker/types';
|
|
35
|
+
export type { DatePickerProps, CalendarDay, CalendarGridProps, CalendarHeaderProps } from './components/molecules/DatePicker/types';
|
|
36
36
|
export type { DropDownOption, DropDownProps } from './components/molecules/DropDown/types';
|
|
37
37
|
export type { ErrorStateProps, FeedbackStateProps } from './components/molecules/FeedbackState/types';
|
|
38
38
|
export type { FilterChipProps } from './components/molecules/FilterChip/types';
|
|
@@ -74,7 +74,7 @@ export type { TromboItemProps } from './components/molecules/TromboItem/types';
|
|
|
74
74
|
export type { CountryDropDownProps } from './components/molecules/CountryDropDown/types';
|
|
75
75
|
export type { GrantSelectItemProps } from './components/molecules/GrantSelect/types';
|
|
76
76
|
export type { CartStepperProps, CartStepperStep } from './components/molecules/CartStepper/types';
|
|
77
|
-
export type {
|
|
77
|
+
export type { DateRangeProps, DateRangeValue, DateRangeTrigger } from './components/molecules/DateRange/types';
|
|
78
78
|
export { TromboItem, TromboItemEmptyState } from './components/molecules/TromboItem';
|
|
79
79
|
export type { AuthLayoutProps } from './components/layouts/AuthLayout/types';
|
|
80
80
|
export type { MfePageProps, ShyHeaderMode } from './components/layouts/MfePage/types';
|
|
@@ -98,7 +98,8 @@ export type { ProductRecapProps } from './components/organisms/ProductRecap/type
|
|
|
98
98
|
export type { OrderRecapProps, OrderRecapMessage } from './components/organisms/OrderRecap/types';
|
|
99
99
|
export type { SummaryMetricCardProps } from './components/organisms/SummaryMetricCard/types';
|
|
100
100
|
export type { AddressFormProps, AddressFormSchema, AddressFormSection } from './components/organisms/AddressForm/types';
|
|
101
|
-
export type { CartPreviewProps,
|
|
101
|
+
export type { CartPreviewProps, CartPreviewPrice, CartPreviewPriceLine } from './components/organisms/CartPreview/types';
|
|
102
|
+
export type { CartPreviewItemProps } from './components/molecules/CartPreviewItem/types';
|
|
102
103
|
export { clubEmployesDark, clubEmployesLight } from './themes/club-employes';
|
|
103
104
|
export { gifteoDark, gifteoLight } from './themes/gifteo';
|
|
104
105
|
export type { LoaderProps } from './components/templates/Loader/types';
|