@club-employes/utopia 4.305.0 → 4.307.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/README.md +0 -1
- package/dist/components/molecules/LoadingBanner/LoadingBanner.d.ts +13 -0
- package/dist/components/molecules/LoadingBanner/LoadingBannerContainer.d.ts +11 -0
- package/dist/components/molecules/LoadingBanner/index.d.ts +5 -0
- package/dist/components/molecules/LoadingBanner/loadingBannerService.d.ts +18 -0
- package/dist/components/molecules/LoadingBanner/types.d.ts +49 -0
- package/dist/components/molecules/LoadingBanner/useLoadingBanner.d.ts +6 -0
- package/dist/components/molecules/Modal/Modal.d.ts +2 -0
- package/dist/components/molecules/Modal/types.d.ts +4 -0
- package/dist/components/molecules/index.d.ts +2 -0
- package/dist/components/organisms/AddressForm/AddressForm.d.ts +6 -1
- package/dist/components/organisms/AddressForm/types.d.ts +19 -5
- package/dist/components/organisms/Caroussel/Caroussel.d.ts +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +11592 -11184
- package/dist/utopia.css +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -335,7 +335,6 @@ const buttonProps: ButtonProps = {
|
|
|
335
335
|
## 📚 Documentation & Resources
|
|
336
336
|
|
|
337
337
|
- 📖 **[Complete Documentation](https://ds-utopia.vercel.app/)** - Interactive examples and guides
|
|
338
|
-
- 🎨 **[Storybook](https://main--673cf2b1e9d0b7c5f2b7b7e7.chromatic.com/)** - Component stories and visual tests
|
|
339
338
|
- 🐙 **[GitHub Repository](https://github.com/club-employes/ds)** - Source code and issues
|
|
340
339
|
- 📦 **[NPM Package](https://www.npmjs.com/package/@club-employes/utopia)** - Package details
|
|
341
340
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LoadingBannerProps, LoadingBannerProgress } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<LoadingBannerProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4
|
+
close: (id?: string | undefined) => any;
|
|
5
|
+
}, string, PublicProps, Readonly<LoadingBannerProps> & Readonly<{
|
|
6
|
+
onClose?: ((id?: string | undefined) => any) | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
floating: boolean;
|
|
9
|
+
duration: number;
|
|
10
|
+
progressBar: "top" | "bottom" | false;
|
|
11
|
+
loadingProgress: LoadingBannerProgress;
|
|
12
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { LoadingBannerItem } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
items: LoadingBannerItem[];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
7
|
+
dismiss: (id: string) => any;
|
|
8
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onDismiss?: ((id: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as LoadingBanner } from './LoadingBanner';
|
|
2
|
+
export { LoadingBannerService, LoadingBannerServiceKey } from './loadingBannerService';
|
|
3
|
+
export { useLoadingBanner } from './useLoadingBanner';
|
|
4
|
+
export type { LoadingBannerProps, LoadingBannerOptions, LoadingBannerItem, LoadingBannerShowOptions, LoadingBannerProgress, LoadingBannerServiceOptions, LoadingBannerHandle, LoadingBannerPromiseOptions } from './types';
|
|
5
|
+
export type { LoadingBannerServiceApi } from './loadingBannerService';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { LoadingBannerServiceOptions, LoadingBannerShowOptions, LoadingBannerHandle, LoadingBannerPromiseOptions } from './types';
|
|
3
|
+
export type LoadingBannerServiceApi = {
|
|
4
|
+
loading: (content: string, options?: LoadingBannerShowOptions) => LoadingBannerHandle;
|
|
5
|
+
dismiss: (id: string) => void;
|
|
6
|
+
dismissLast: () => void;
|
|
7
|
+
dismissAll: () => void;
|
|
8
|
+
promise: <T>(p: Promise<T>, opts: LoadingBannerPromiseOptions<T>) => Promise<T>;
|
|
9
|
+
};
|
|
10
|
+
export declare const LoadingBannerService: {
|
|
11
|
+
install(app: App, options?: LoadingBannerServiceOptions): void;
|
|
12
|
+
readonly loading: (content: string, options?: LoadingBannerShowOptions) => LoadingBannerHandle;
|
|
13
|
+
readonly dismiss: (id: string) => void;
|
|
14
|
+
readonly dismissLast: () => void;
|
|
15
|
+
readonly dismissAll: () => void;
|
|
16
|
+
readonly promise: <T>(p: Promise<T>, opts: LoadingBannerPromiseOptions<T>) => Promise<T>;
|
|
17
|
+
};
|
|
18
|
+
export declare const LoadingBannerServiceKey: symbol;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Mode d’animation de la barre du bandeau de chargement. */
|
|
2
|
+
export type LoadingBannerProgress = 'loop' | 'fill';
|
|
3
|
+
export interface LoadingBannerOptions {
|
|
4
|
+
title?: string;
|
|
5
|
+
content: string;
|
|
6
|
+
/** Fermeture auto (ms). 0 = pas de fermeture auto (défaut). */
|
|
7
|
+
duration?: number;
|
|
8
|
+
floating?: boolean;
|
|
9
|
+
progressBar?: 'top' | 'bottom' | false;
|
|
10
|
+
icon?: string;
|
|
11
|
+
loadingProgress?: LoadingBannerProgress;
|
|
12
|
+
/** 0–1 : barre « fill » déterministe ; ignoré en mode `loop`. */
|
|
13
|
+
loadingProgressValue?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Durée d’un cycle de la barre « loop » (ms), entre 400 et 60000.
|
|
16
|
+
* Défaut 3000.
|
|
17
|
+
*/
|
|
18
|
+
loadingLoopDurationMs?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Durée d’un cycle de la barre « fill » indéterministe (ms).
|
|
21
|
+
* Ignoré si `loadingProgressValue` est défini. Défaut 3000.
|
|
22
|
+
*/
|
|
23
|
+
loadingFillDurationMs?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface LoadingBannerProps extends LoadingBannerOptions {
|
|
26
|
+
id?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface LoadingBannerItem extends LoadingBannerOptions {
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
/** Options passées en 2e argument de `loading()` (sans `content`). */
|
|
32
|
+
export type LoadingBannerShowOptions = Omit<LoadingBannerOptions, 'content'>;
|
|
33
|
+
export interface LoadingBannerHandle {
|
|
34
|
+
id: string;
|
|
35
|
+
dismiss: () => void;
|
|
36
|
+
update: (content: string, patch?: Partial<Omit<LoadingBannerOptions, 'content'>>) => void;
|
|
37
|
+
}
|
|
38
|
+
export interface LoadingBannerPromiseOptions<T = unknown> {
|
|
39
|
+
loading: string;
|
|
40
|
+
success: string | ((data: T) => string);
|
|
41
|
+
error: string | ((err: unknown) => string);
|
|
42
|
+
loadingOptions?: LoadingBannerShowOptions;
|
|
43
|
+
}
|
|
44
|
+
export interface LoadingBannerServiceOptions {
|
|
45
|
+
progressBar?: 'top' | 'bottom' | false;
|
|
46
|
+
floating?: boolean;
|
|
47
|
+
loadingLoopDurationMs?: number;
|
|
48
|
+
loadingFillDurationMs?: number;
|
|
49
|
+
}
|
|
@@ -110,7 +110,9 @@ declare const __VLS_component: DefineComponent<ModalProps, {}, {}, {}, {}, Compo
|
|
|
110
110
|
disableScrollLock: boolean;
|
|
111
111
|
showCloseButton: boolean;
|
|
112
112
|
showHeader: boolean;
|
|
113
|
+
showHeaderBorder: boolean;
|
|
113
114
|
showFooter: boolean;
|
|
115
|
+
showFooterBorder: boolean;
|
|
114
116
|
showEnlargeLabel: boolean;
|
|
115
117
|
focusTrap: boolean;
|
|
116
118
|
blurBackdrop: boolean;
|
|
@@ -14,7 +14,11 @@ export interface ModalProps {
|
|
|
14
14
|
closeOnOverlayClick?: boolean;
|
|
15
15
|
showCloseButton?: boolean;
|
|
16
16
|
showHeader?: boolean;
|
|
17
|
+
/** Bordure basse du bloc header (séparation avec le contenu). */
|
|
18
|
+
showHeaderBorder?: boolean;
|
|
17
19
|
showFooter?: boolean;
|
|
20
|
+
/** Bordure haute du bloc footer (séparation avec le contenu). */
|
|
21
|
+
showFooterBorder?: boolean;
|
|
18
22
|
showEnlargeLabel?: boolean;
|
|
19
23
|
disableScrollLock?: boolean;
|
|
20
24
|
focusTrap?: boolean;
|
|
@@ -49,6 +49,8 @@ export { ContactBloc } from './ContactBloc';
|
|
|
49
49
|
export type { ContactBlocProps } from './ContactBloc';
|
|
50
50
|
export { Toast, ToastService, ToastServiceKey, useToast } from './Toast';
|
|
51
51
|
export type { ToastProps, ToastOptions, ToastItem, ToastAction, ToastPosition, ToastSize, ToastVariant, ToastServiceApi, ToastServiceOptions } from './Toast';
|
|
52
|
+
export { LoadingBanner, LoadingBannerService, LoadingBannerServiceKey, useLoadingBanner } from './LoadingBanner';
|
|
53
|
+
export type { LoadingBannerProps, LoadingBannerOptions, LoadingBannerItem, LoadingBannerShowOptions, LoadingBannerProgress, LoadingBannerServiceOptions, LoadingBannerHandle, LoadingBannerPromiseOptions, LoadingBannerServiceApi } from './LoadingBanner';
|
|
52
54
|
export { EmptyState } from './EmptyState';
|
|
53
55
|
export type { EmptyStateProps } from './EmptyState';
|
|
54
56
|
export { UserCard } from './UserCard';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AddressFormProps, AddressFormFieldConfig } from './types';
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
|
+
import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = AddressFormProps;
|
|
4
4
|
type __VLS_PublicProps = {
|
|
5
5
|
modelValue: Record<string, any>;
|
|
6
|
+
'valid'?: boolean;
|
|
6
7
|
} & __VLS_Props;
|
|
7
8
|
declare function __VLS_template(): {
|
|
8
9
|
attrs: Partial<{}>;
|
|
@@ -16,10 +17,14 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
16
17
|
declare const __VLS_component: DefineComponent<__VLS_PublicProps, {
|
|
17
18
|
validate: () => boolean;
|
|
18
19
|
validateField: (field: AddressFormFieldConfig) => boolean;
|
|
20
|
+
/** Lecture seule : même critère que `v-model:valid` */
|
|
21
|
+
isValid: ComputedRef<boolean>;
|
|
19
22
|
}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
20
23
|
"update:modelValue": (value: Record<string, any>) => any;
|
|
24
|
+
"update:valid": (value: boolean) => any;
|
|
21
25
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
22
26
|
"onUpdate:modelValue"?: ((value: Record<string, any>) => any) | undefined;
|
|
27
|
+
"onUpdate:valid"?: ((value: boolean) => any) | undefined;
|
|
23
28
|
}>, {
|
|
24
29
|
size: "small" | "extra-small" | "medium" | "large";
|
|
25
30
|
disabled: boolean;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { InputTextProps } from '../../atoms/InputText/types';
|
|
2
|
-
export type AddressFormFieldType = 'text' | 'postalCode' | 'country' | 'number' | 'email' | 'phone' | 'textarea';
|
|
2
|
+
export type AddressFormFieldType = 'text' | 'postalCode' | 'country' | 'number' | 'email' | 'phone' | 'textarea' | 'checkbox';
|
|
3
3
|
export interface AddressFormFieldConfig {
|
|
4
4
|
/** Identifiant unique du champ (clé dans le model) */
|
|
5
5
|
id: string;
|
|
6
|
-
/** Type de composant à afficher */
|
|
6
|
+
/** Type de composant à afficher (`checkbox` : valeur booléenne ; `required` = case obligatoirement cochée) */
|
|
7
7
|
type: AddressFormFieldType;
|
|
8
8
|
/** Libellé du champ */
|
|
9
9
|
label?: string;
|
|
@@ -23,10 +23,19 @@ export interface AddressFormFieldConfig {
|
|
|
23
23
|
required?: string;
|
|
24
24
|
pattern?: string;
|
|
25
25
|
};
|
|
26
|
-
/**
|
|
27
|
-
*
|
|
26
|
+
/**
|
|
27
|
+
* Props supplémentaires pour le composant atom/molecule (v-bind).
|
|
28
|
+
* `disabled`, `readonly`, `hideCountryDropdown`, `size` et `countryFieldId` peuvent être
|
|
29
|
+
* soit une valeur statique, soit une fonction `(formData) => value` où `formData` est le
|
|
30
|
+
* même objet que le `v-model` du formulaire (réévaluation à chaque rendu).
|
|
28
31
|
*/
|
|
29
|
-
componentProps?:
|
|
32
|
+
componentProps?: Record<string, unknown> & {
|
|
33
|
+
disabled?: boolean | ((formData: Record<string, unknown>) => boolean);
|
|
34
|
+
readonly?: boolean | ((formData: Record<string, unknown>) => boolean);
|
|
35
|
+
hideCountryDropdown?: boolean | ((formData: Record<string, unknown>) => boolean);
|
|
36
|
+
size?: InputTextProps['size'] | ((formData: Record<string, unknown>) => InputTextProps['size']);
|
|
37
|
+
countryFieldId?: string | ((formData: Record<string, unknown>) => string);
|
|
38
|
+
};
|
|
30
39
|
/** Largeur flexible (flex-grow) */
|
|
31
40
|
flex?: number;
|
|
32
41
|
}
|
|
@@ -71,4 +80,9 @@ export interface AddressFormProps {
|
|
|
71
80
|
disabled?: boolean;
|
|
72
81
|
/** Lecture seule */
|
|
73
82
|
readonly?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Optionnel : liaison bidirectionnelle de la validité (`v-model:valid`).
|
|
85
|
+
* Mis à jour automatiquement quand le modèle ou les règles rendent le formulaire valide / invalide.
|
|
86
|
+
*/
|
|
87
|
+
valid?: boolean;
|
|
74
88
|
}
|
|
@@ -21,9 +21,9 @@ declare const __VLS_component: DefineComponent<CarousselProps, {}, {}, {}, {}, C
|
|
|
21
21
|
autoplay: boolean;
|
|
22
22
|
autoplayDelay: number;
|
|
23
23
|
showDots: boolean;
|
|
24
|
+
loop: boolean;
|
|
24
25
|
itemsPerView: number | CarousselBreakpoints;
|
|
25
26
|
showArrows: boolean;
|
|
26
|
-
loop: boolean;
|
|
27
27
|
peek: boolean;
|
|
28
28
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
29
29
|
viewportRef: HTMLDivElement;
|
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,9 @@ export type { HeaderNotificationsProps } from './components/molecules/HeaderNoti
|
|
|
60
60
|
export type { ContactBlocProps } from './components/molecules/ContactBloc/types';
|
|
61
61
|
export type { ToastProps, ToastOptions, ToastItem } from './components/molecules/Toast/types';
|
|
62
62
|
export { ToastService, ToastServiceKey, useToast } from './components/molecules/Toast';
|
|
63
|
+
export type { LoadingBannerProps, LoadingBannerOptions, LoadingBannerItem, LoadingBannerShowOptions, LoadingBannerProgress, LoadingBannerServiceOptions, LoadingBannerHandle, LoadingBannerPromiseOptions } from './components/molecules/LoadingBanner/types';
|
|
64
|
+
export { LoadingBanner, LoadingBannerService, LoadingBannerServiceKey, useLoadingBanner } from './components/molecules/LoadingBanner';
|
|
65
|
+
export type { LoadingBannerServiceApi } from './components/molecules/LoadingBanner';
|
|
63
66
|
export type { ToastServiceApi, ToastServiceOptions } from './components/molecules/Toast';
|
|
64
67
|
export type { EmptyStateProps } from './components/molecules/EmptyState/types';
|
|
65
68
|
export type { SubventionCardProps } from './components/molecules/SubventionCard/types';
|