@club-employes/utopia 4.176.0 → 4.178.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/atoms/index.d.ts +1 -2
- package/dist/components/molecules/GrantUsersSelection/GrantUsersSelection.d.ts +25 -1
- package/dist/components/molecules/GrantUsersSelection/types.d.ts +23 -0
- package/dist/components/molecules/Modal/Modal.d.ts +1 -1
- package/dist/components/molecules/Toast/Toast.d.ts +16 -0
- package/dist/components/molecules/Toast/ToastContainer.d.ts +12 -0
- package/dist/components/molecules/Toast/index.d.ts +5 -0
- package/dist/components/molecules/Toast/toastService.d.ts +22 -0
- package/dist/components/molecules/Toast/types.d.ts +47 -0
- package/dist/components/molecules/Toast/useToast.d.ts +6 -0
- package/dist/components/molecules/index.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +13004 -12668
- package/dist/utopia.css +1 -1
- package/package.json +1 -1
|
@@ -17,10 +17,9 @@ export { TextArea, type TextAreaProps } from './TextArea';
|
|
|
17
17
|
export { Tips, type TipsProps } from './Tips';
|
|
18
18
|
export { SectionTitle, type SectionTitleProps } from './SectionTitle';
|
|
19
19
|
export { Stepper, type StepperProps } from './Stepper';
|
|
20
|
+
export type { ButtonVariant, ButtonSize } from './Button/types';
|
|
20
21
|
export type BadgeVariant = 'default' | 'success' | 'warning' | 'danger';
|
|
21
22
|
export type BadgeSize = 'small' | 'medium';
|
|
22
|
-
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
23
|
-
export type ButtonSize = 'small' | 'medium' | 'large';
|
|
24
23
|
export type IconName = string;
|
|
25
24
|
export type IconSize = 'extra-small' | 'small' | 'medium' | 'large';
|
|
26
25
|
export type IconColor = 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'neutral' | 'current';
|
|
@@ -1,12 +1,36 @@
|
|
|
1
|
-
import { GrantUsersSelectionProps } from './types';
|
|
1
|
+
import { GrantUsersSelectionProps, GrantUsersSelectionUser, GrantUsersSelectionGroup } from './types';
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
declare const _default: DefineComponent<GrantUsersSelectionProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4
4
|
"update:modelValue": (value: string) => any;
|
|
5
|
+
"search-users": (query: string) => any;
|
|
6
|
+
"page-change-users": (page: number) => any;
|
|
7
|
+
"page-size-change-users": (size: number) => any;
|
|
8
|
+
"search-groups": (query: string) => any;
|
|
9
|
+
"page-change-groups": (page: number) => any;
|
|
10
|
+
"page-size-change-groups": (size: number) => any;
|
|
5
11
|
}, string, PublicProps, Readonly<GrantUsersSelectionProps> & Readonly<{
|
|
6
12
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
13
|
+
"onSearch-users"?: ((query: string) => any) | undefined;
|
|
14
|
+
"onPage-change-users"?: ((page: number) => any) | undefined;
|
|
15
|
+
"onPage-size-change-users"?: ((size: number) => any) | undefined;
|
|
16
|
+
"onSearch-groups"?: ((query: string) => any) | undefined;
|
|
17
|
+
"onPage-change-groups"?: ((page: number) => any) | undefined;
|
|
18
|
+
"onPage-size-change-groups"?: ((size: number) => any) | undefined;
|
|
7
19
|
}>, {
|
|
8
20
|
name: string;
|
|
9
21
|
disabled: boolean;
|
|
10
22
|
modelValue: string;
|
|
23
|
+
users: GrantUsersSelectionUser[];
|
|
24
|
+
groups: GrantUsersSelectionGroup[];
|
|
25
|
+
totalUsers: number;
|
|
26
|
+
totalGroups: number;
|
|
27
|
+
usersCurrentPage: number;
|
|
28
|
+
usersPageSize: number;
|
|
29
|
+
usersTotalPages: number;
|
|
30
|
+
groupsCurrentPage: number;
|
|
31
|
+
groupsPageSize: number;
|
|
32
|
+
groupsTotalPages: number;
|
|
33
|
+
usersLoading: boolean;
|
|
34
|
+
groupsLoading: boolean;
|
|
11
35
|
}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
12
36
|
export default _default;
|
|
@@ -1,7 +1,30 @@
|
|
|
1
|
+
export interface GrantUsersSelectionUser {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
email: string;
|
|
5
|
+
avatar?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface GrantUsersSelectionGroup {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
count: number;
|
|
11
|
+
}
|
|
1
12
|
export interface GrantUsersSelectionProps {
|
|
2
13
|
modelValue?: string;
|
|
3
14
|
name?: string;
|
|
4
15
|
variant?: 'default' | 'primary' | 'secondary';
|
|
5
16
|
size?: 'small' | 'medium' | 'large';
|
|
6
17
|
disabled?: boolean;
|
|
18
|
+
users?: GrantUsersSelectionUser[];
|
|
19
|
+
groups?: GrantUsersSelectionGroup[];
|
|
20
|
+
totalUsers?: number;
|
|
21
|
+
totalGroups?: number;
|
|
22
|
+
usersCurrentPage?: number;
|
|
23
|
+
usersPageSize?: number;
|
|
24
|
+
usersTotalPages?: number;
|
|
25
|
+
groupsCurrentPage?: number;
|
|
26
|
+
groupsPageSize?: number;
|
|
27
|
+
groupsTotalPages?: number;
|
|
28
|
+
usersLoading?: boolean;
|
|
29
|
+
groupsLoading?: boolean;
|
|
7
30
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { nextTick, ComponentInternalInstance, VNodeProps, AllowedComponentProps, ComponentCustomProps, Slot, ComponentPublicInstance, ComponentOptionsBase, ComponentOptionsMixin, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DebuggerEvent, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties, DefineComponent, PublicProps } from 'vue';
|
|
2
2
|
import { ModalProps, ModalChangeReason, ModalSize, ModalPosition, ModalAnimation, ModalMobileBehavior } from './types';
|
|
3
|
-
import { ButtonVariant, ButtonSize } from '
|
|
3
|
+
import { ButtonVariant, ButtonSize } from '../..';
|
|
4
4
|
import { ButtonProps } from '../../..';
|
|
5
5
|
import { OnCleanup } from '@vue/reactivity';
|
|
6
6
|
declare function __VLS_template(): {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ToastProps, ToastVariant, ToastSize } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
declare const _default: DefineComponent<ToastProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
4
|
+
close: (id?: string | undefined) => any;
|
|
5
|
+
}, string, PublicProps, Readonly<ToastProps> & Readonly<{
|
|
6
|
+
onClose?: ((id?: string | undefined) => any) | undefined;
|
|
7
|
+
}>, {
|
|
8
|
+
size: ToastSize;
|
|
9
|
+
variant: ToastVariant;
|
|
10
|
+
progressBar: "top" | "bottom" | false;
|
|
11
|
+
floating: boolean;
|
|
12
|
+
duration: number;
|
|
13
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
14
|
+
progressRef: HTMLDivElement;
|
|
15
|
+
}, HTMLDivElement>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ToastItem, ToastPosition } from './types';
|
|
2
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
toasts: ToastItem[];
|
|
5
|
+
positions: ToastPosition[];
|
|
6
|
+
};
|
|
7
|
+
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
|
|
8
|
+
dismiss: (id: string) => any;
|
|
9
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
onDismiss?: ((id: string) => any) | undefined;
|
|
11
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Toast } from './Toast';
|
|
2
|
+
export { ToastService, ToastServiceKey } from './toastService';
|
|
3
|
+
export { useToast } from './useToast';
|
|
4
|
+
export type { ToastProps, ToastOptions, ToastItem, ToastAction, ToastPosition, ToastSize, ToastVariant, ToastServiceOptions } from './types';
|
|
5
|
+
export type { ToastServiceApi } from './toastService';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { App } from 'vue';
|
|
2
|
+
import { ToastOptions, ToastServiceOptions } from './types';
|
|
3
|
+
export type ToastServiceApi = {
|
|
4
|
+
show: (options: ToastOptions) => string;
|
|
5
|
+
success: (content: string, options?: Omit<ToastOptions, 'content' | 'variant'>) => string;
|
|
6
|
+
error: (content: string, options?: Omit<ToastOptions, 'content' | 'variant'>) => string;
|
|
7
|
+
warning: (content: string, options?: Omit<ToastOptions, 'content' | 'variant'>) => string;
|
|
8
|
+
info: (content: string, options?: Omit<ToastOptions, 'content' | 'variant'>) => string;
|
|
9
|
+
dismiss: (id: string) => void;
|
|
10
|
+
dismissAll: () => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const ToastService: {
|
|
13
|
+
install(app: App, options?: ToastServiceOptions): void;
|
|
14
|
+
readonly show: (options: ToastOptions) => string;
|
|
15
|
+
readonly success: (content: string, options?: Omit<ToastOptions, "content" | "variant">) => string;
|
|
16
|
+
readonly error: (content: string, options?: Omit<ToastOptions, "content" | "variant">) => string;
|
|
17
|
+
readonly warning: (content: string, options?: Omit<ToastOptions, "content" | "variant">) => string;
|
|
18
|
+
readonly info: (content: string, options?: Omit<ToastOptions, "content" | "variant">) => string;
|
|
19
|
+
readonly dismiss: (id: string) => void;
|
|
20
|
+
readonly dismissAll: () => void;
|
|
21
|
+
};
|
|
22
|
+
export declare const ToastServiceKey: symbol;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type ToastVariant = 'info' | 'success' | 'warning' | 'danger' | 'neutral';
|
|
2
|
+
export type ToastSize = 'sm' | 'md' | 'lg' | 'full' | 'square';
|
|
3
|
+
export type ToastPosition = 'top' | 'bottom' | 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
4
|
+
export interface ToastAction {
|
|
5
|
+
label: string;
|
|
6
|
+
onClick: () => void;
|
|
7
|
+
}
|
|
8
|
+
/** Options passées au service (sans id, id généré par le service) */
|
|
9
|
+
export interface ToastOptions {
|
|
10
|
+
title?: string;
|
|
11
|
+
content: string;
|
|
12
|
+
variant?: ToastVariant;
|
|
13
|
+
size?: ToastSize;
|
|
14
|
+
/** Position à l'écran (sinon celle définie à l'installation du plugin) */
|
|
15
|
+
position?: ToastPosition;
|
|
16
|
+
duration?: number;
|
|
17
|
+
floating?: boolean;
|
|
18
|
+
progressBar?: 'top' | 'bottom' | false;
|
|
19
|
+
icon?: string;
|
|
20
|
+
action?: ToastAction;
|
|
21
|
+
}
|
|
22
|
+
/** Props du composant Toast (id optionnel si usage manuel en template) */
|
|
23
|
+
export interface ToastProps extends ToastOptions {
|
|
24
|
+
id?: string;
|
|
25
|
+
}
|
|
26
|
+
/** Élément dans la liste du container (id + position requis) */
|
|
27
|
+
export interface ToastItem extends ToastOptions {
|
|
28
|
+
id: string;
|
|
29
|
+
position: ToastPosition;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Options d'installation du ToastService.
|
|
33
|
+
* Toutes les options (sauf position) servent de valeurs par défaut pour chaque toast ;
|
|
34
|
+
* chaque appel à show() / success() / etc. peut les surcharger.
|
|
35
|
+
*/
|
|
36
|
+
export interface ToastServiceOptions {
|
|
37
|
+
/** Position par défaut des toasts à l'écran */
|
|
38
|
+
position?: ToastPosition;
|
|
39
|
+
/** Durée par défaut en ms (0 = pas de fermeture auto) */
|
|
40
|
+
duration?: number;
|
|
41
|
+
/** Taille par défaut des toasts */
|
|
42
|
+
size?: ToastSize;
|
|
43
|
+
/** Barre de progression par défaut ('top' | 'bottom' | false) */
|
|
44
|
+
progressBar?: 'top' | 'bottom' | false;
|
|
45
|
+
/** Espacement entre toasts (floating) par défaut */
|
|
46
|
+
floating?: boolean;
|
|
47
|
+
}
|
|
@@ -41,3 +41,5 @@ export { RepeatableGroup } from './RepeatableGroup';
|
|
|
41
41
|
export type { RepeatableGroupProps } from './RepeatableGroup';
|
|
42
42
|
export { OptionSelect } from './OptionSelect';
|
|
43
43
|
export type { OptionSelectProps } from './OptionSelect';
|
|
44
|
+
export { Toast, ToastService, ToastServiceKey, useToast } from './Toast';
|
|
45
|
+
export type { ToastProps, ToastOptions, ToastItem, ToastAction, ToastPosition, ToastSize, ToastVariant, ToastServiceApi, ToastServiceOptions } from './Toast';
|
package/dist/index.d.ts
CHANGED
|
@@ -49,6 +49,9 @@ export type { PriceTagProps } from './components/molecules/PriceTag/types';
|
|
|
49
49
|
export type { RadioCardProps } from './components/molecules/RadioCard/types';
|
|
50
50
|
export type { TooltipProps } from './components/molecules/Tooltip/types';
|
|
51
51
|
export type { ProductImageType, ProductImageProps } from './components/molecules/ProductImage/types';
|
|
52
|
+
export type { ToastProps, ToastOptions, ToastItem } from './components/molecules/Toast/types';
|
|
53
|
+
export { ToastService, ToastServiceKey, useToast } from './components/molecules/Toast';
|
|
54
|
+
export type { ToastServiceApi, ToastServiceOptions } from './components/molecules/Toast';
|
|
52
55
|
export type { AuthLayoutProps } from './components/layouts/AuthLayout/types';
|
|
53
56
|
export type { AccordionItemProps, AccordionProps } from './components/organisms/Accordion/types';
|
|
54
57
|
export type { BreadcrumbsItem, BreadcrumbsProps } from './components/organisms/Breadcrumbs/types';
|