@wakastellar/ui 0.1.4 → 0.1.5
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 +403 -199
- package/dist/blocks/activity-timeline/index.d.ts +73 -0
- package/dist/blocks/calendar-view/index.d.ts +56 -0
- package/dist/blocks/chat/index.d.ts +87 -0
- package/dist/blocks/dashboard/index.d.ts +92 -0
- package/dist/blocks/empty-states/index.d.ts +44 -0
- package/dist/blocks/error-pages/index.d.ts +52 -0
- package/dist/blocks/faq/index.d.ts +54 -0
- package/dist/blocks/file-manager/index.d.ts +81 -0
- package/dist/blocks/header/index.d.ts +86 -0
- package/dist/blocks/i18n-editor/index.d.ts +63 -0
- package/dist/blocks/kanban-board/index.d.ts +77 -0
- package/dist/blocks/landing/index.d.ts +101 -0
- package/dist/blocks/pricing/index.d.ts +60 -0
- package/dist/blocks/profile/index.d.ts +98 -0
- package/dist/blocks/settings/index.d.ts +62 -0
- package/dist/blocks/sidebar/index.d.ts +151 -0
- package/dist/blocks/theme-creator-block/index.d.ts +86 -0
- package/dist/blocks/user-management/index.d.ts +95 -0
- package/dist/blocks/wizard/index.d.ts +88 -0
- package/dist/charts.d.ts +17 -0
- package/dist/components/DataTable/DataTableBody.d.ts +70 -0
- package/dist/components/DataTable/DataTableCell.d.ts +38 -0
- package/dist/components/DataTable/DataTableConflictResolver.d.ts +45 -0
- package/dist/components/DataTable/DataTableFilterBuilder.d.ts +14 -0
- package/dist/components/DataTable/DataTableHeader.d.ts +50 -0
- package/dist/components/DataTable/DataTableSyncStatus.d.ts +31 -0
- package/dist/components/DataTable/formatters/index.d.ts +127 -0
- package/dist/components/DataTable/hooks/useDataTableAdvancedFilters.d.ts +18 -0
- package/dist/components/DataTable/hooks/useDataTableColumnTemplates.d.ts +28 -0
- package/dist/components/DataTable/hooks/useDataTableOffline.d.ts +80 -0
- package/dist/components/DataTable/services/IndexedDBService.d.ts +117 -0
- package/dist/components/DataTable/templates/index.d.ts +104 -0
- package/dist/components/DataTable/workers/exportWorker.d.ts +29 -0
- package/dist/components/error-boundary/ErrorBoundary.d.ts +102 -0
- package/dist/components/error-boundary/index.d.ts +2 -0
- package/dist/components/waka-autocomplete/index.d.ts +59 -0
- package/dist/components/waka-barcode/index.d.ts +27 -0
- package/dist/components/waka-breadcrumb/index.d.ts +43 -0
- package/dist/components/waka-charts/WakaAreaChart.d.ts +12 -0
- package/dist/components/waka-charts/WakaBarChart.d.ts +12 -0
- package/dist/components/waka-charts/WakaChart.d.ts +17 -0
- package/dist/components/waka-charts/WakaLineChart.d.ts +12 -0
- package/dist/components/waka-charts/WakaMiniChart.d.ts +13 -0
- package/dist/components/waka-charts/WakaPieChart.d.ts +12 -0
- package/dist/components/waka-charts/WakaSparkline.d.ts +13 -0
- package/dist/components/waka-charts/dataTableHelpers.d.ts +34 -0
- package/dist/components/waka-charts/hooks/useChartTheme.d.ts +23 -0
- package/dist/components/waka-charts/hooks/useRechartsLoader.d.ts +161 -0
- package/dist/components/waka-charts/index.d.ts +57 -0
- package/dist/components/waka-charts/types.d.ts +298 -0
- package/dist/components/waka-color-picker/index.d.ts +40 -0
- package/dist/components/waka-combobox/index.d.ts +81 -0
- package/dist/components/waka-date-range-picker/index.d.ts +68 -0
- package/dist/components/waka-drawer/index.d.ts +59 -0
- package/dist/components/waka-file-upload/index.d.ts +49 -0
- package/dist/components/waka-image/index.d.ts +59 -0
- package/dist/components/waka-kanban/index.d.ts +68 -0
- package/dist/components/waka-modal/index.d.ts +82 -0
- package/dist/components/waka-number-input/index.d.ts +60 -0
- package/dist/components/waka-pagination/index.d.ts +67 -0
- package/dist/components/waka-qrcode/index.d.ts +32 -0
- package/dist/components/waka-rich-text-editor/index.d.ts +36 -0
- package/dist/components/waka-segmented-control/index.d.ts +42 -0
- package/dist/components/waka-stat/index.d.ts +57 -0
- package/dist/components/waka-stepper/index.d.ts +76 -0
- package/dist/components/waka-time-picker/index.d.ts +51 -0
- package/dist/components/waka-timeline/index.d.ts +46 -0
- package/dist/components/waka-tree/index.d.ts +67 -0
- package/dist/components/waka-video/index.d.ts +66 -0
- package/dist/components/waka-virtual-list/index.d.ts +54 -0
- package/dist/export.d.ts +28 -0
- package/dist/index.cjs.js +25 -26
- package/dist/index.es.js +4827 -4747
- package/dist/rich-text.d.ts +21 -0
- package/dist/ui.css +1 -1
- package/dist/utils/error-handling.d.ts +190 -0
- package/package.json +11 -17
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ComboboxOption<T = string> {
|
|
3
|
+
/** Valeur unique de l'option */
|
|
4
|
+
value: T;
|
|
5
|
+
/** Libellé affiché */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Description secondaire */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Icône */
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
/** Désactiver l'option */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Groupe de l'option */
|
|
14
|
+
group?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface WakaComboboxProps<T = string> {
|
|
17
|
+
/** Options disponibles */
|
|
18
|
+
options: ComboboxOption<T>[];
|
|
19
|
+
/** Valeur sélectionnée (single) ou valeurs (multiple) */
|
|
20
|
+
value?: T | T[];
|
|
21
|
+
/** Callback lors du changement */
|
|
22
|
+
onChange?: (value: T | T[] | undefined) => void;
|
|
23
|
+
/** Placeholder */
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
/** Placeholder de recherche */
|
|
26
|
+
searchPlaceholder?: string;
|
|
27
|
+
/** Message si aucune option */
|
|
28
|
+
emptyMessage?: string;
|
|
29
|
+
/** Mode multiple */
|
|
30
|
+
multiple?: boolean;
|
|
31
|
+
/** Permettre la création de nouvelles options */
|
|
32
|
+
creatable?: boolean;
|
|
33
|
+
/** Callback lors de la création */
|
|
34
|
+
onCreate?: (inputValue: string) => ComboboxOption<T> | Promise<ComboboxOption<T>>;
|
|
35
|
+
/** Texte du bouton de création */
|
|
36
|
+
createLabel?: string;
|
|
37
|
+
/** Recherche asynchrone */
|
|
38
|
+
onSearch?: (query: string) => Promise<ComboboxOption<T>[]>;
|
|
39
|
+
/** Délai de debounce pour la recherche (ms) */
|
|
40
|
+
searchDebounce?: number;
|
|
41
|
+
/** Désactivé */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
/** Erreur */
|
|
44
|
+
error?: boolean;
|
|
45
|
+
/** Chargement */
|
|
46
|
+
loading?: boolean;
|
|
47
|
+
/** Taille */
|
|
48
|
+
size?: "sm" | "md" | "lg";
|
|
49
|
+
/** Permettre de vider la sélection */
|
|
50
|
+
clearable?: boolean;
|
|
51
|
+
/** Nombre maximum de sélections (multiple) */
|
|
52
|
+
maxSelections?: number;
|
|
53
|
+
/** Classes CSS additionnelles */
|
|
54
|
+
className?: string;
|
|
55
|
+
/** ID pour l'accessibilité */
|
|
56
|
+
id?: string;
|
|
57
|
+
/** Nom du champ */
|
|
58
|
+
name?: string;
|
|
59
|
+
}
|
|
60
|
+
export declare function WakaCombobox<T = string>({ options: initialOptions, value, onChange, placeholder, searchPlaceholder, emptyMessage, multiple, creatable, onCreate, createLabel, onSearch, searchDebounce, disabled, error, loading: externalLoading, size, clearable, maxSelections, className, id, name, }: WakaComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
export interface UseComboboxOptions<T = string> {
|
|
62
|
+
/** Options initiales */
|
|
63
|
+
options?: ComboboxOption<T>[];
|
|
64
|
+
/** Valeur initiale */
|
|
65
|
+
initialValue?: T | T[];
|
|
66
|
+
/** Mode multiple */
|
|
67
|
+
multiple?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export declare function useCombobox<T = string>(options?: UseComboboxOptions<T>): {
|
|
70
|
+
value: T | T[] | undefined;
|
|
71
|
+
onChange: React.Dispatch<React.SetStateAction<T | T[] | undefined>>;
|
|
72
|
+
options: ComboboxOption<T>[];
|
|
73
|
+
setOptions: React.Dispatch<React.SetStateAction<ComboboxOption<T>[]>>;
|
|
74
|
+
clear: () => void;
|
|
75
|
+
addOption: (option: ComboboxOption<T>) => void;
|
|
76
|
+
removeOption: (valueToRemove: T) => void;
|
|
77
|
+
selectAll: () => void;
|
|
78
|
+
selectNone: () => void;
|
|
79
|
+
multiple: boolean;
|
|
80
|
+
};
|
|
81
|
+
export default WakaCombobox;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Locale } from 'date-fns';
|
|
2
|
+
import { DateRange as RdpDateRange } from 'react-day-picker';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
export type { DateRange as WakaDateRange } from 'react-day-picker';
|
|
5
|
+
export interface WakaDateRangePickerProps {
|
|
6
|
+
/** Plage de dates sélectionnée */
|
|
7
|
+
value?: RdpDateRange;
|
|
8
|
+
/** Callback lors du changement */
|
|
9
|
+
onChange?: (range: RdpDateRange | undefined) => void;
|
|
10
|
+
/** Placeholder */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Format d'affichage */
|
|
13
|
+
dateFormat?: string;
|
|
14
|
+
/** Date minimum */
|
|
15
|
+
minDate?: Date;
|
|
16
|
+
/** Date maximum */
|
|
17
|
+
maxDate?: Date;
|
|
18
|
+
/** Désactivé */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Erreur */
|
|
21
|
+
error?: boolean;
|
|
22
|
+
/** Afficher les presets */
|
|
23
|
+
showPresets?: boolean;
|
|
24
|
+
/** Presets personnalisés */
|
|
25
|
+
presets?: DateRangePreset[];
|
|
26
|
+
/** Nombre de mois affichés */
|
|
27
|
+
numberOfMonths?: number;
|
|
28
|
+
/** Locale */
|
|
29
|
+
locale?: Locale;
|
|
30
|
+
/** Taille */
|
|
31
|
+
size?: "sm" | "md" | "lg";
|
|
32
|
+
/** Classes CSS additionnelles */
|
|
33
|
+
className?: string;
|
|
34
|
+
/** ID pour l'accessibilité */
|
|
35
|
+
id?: string;
|
|
36
|
+
/** Nom du champ */
|
|
37
|
+
name?: string;
|
|
38
|
+
/** Permettre de vider la sélection */
|
|
39
|
+
clearable?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface DateRangePreset {
|
|
42
|
+
label: string;
|
|
43
|
+
getValue: () => RdpDateRange;
|
|
44
|
+
}
|
|
45
|
+
declare const defaultPresets: DateRangePreset[];
|
|
46
|
+
export declare function WakaDateRangePicker({ value, onChange, placeholder, dateFormat, minDate, maxDate, disabled, error, showPresets, presets, numberOfMonths, locale, size, className, id, name, clearable, }: WakaDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export interface UseDateRangePickerOptions {
|
|
48
|
+
/** Valeur initiale */
|
|
49
|
+
initialValue?: RdpDateRange;
|
|
50
|
+
/** Date minimum */
|
|
51
|
+
minDate?: Date;
|
|
52
|
+
/** Date maximum */
|
|
53
|
+
maxDate?: Date;
|
|
54
|
+
}
|
|
55
|
+
export declare function useDateRangePicker(options?: UseDateRangePickerOptions): {
|
|
56
|
+
value: RdpDateRange | undefined;
|
|
57
|
+
onChange: React.Dispatch<React.SetStateAction<RdpDateRange | undefined>>;
|
|
58
|
+
clear: () => void;
|
|
59
|
+
setToday: () => void;
|
|
60
|
+
setThisWeek: () => void;
|
|
61
|
+
setThisMonth: () => void;
|
|
62
|
+
isValidRange: () => boolean;
|
|
63
|
+
dayCount: number | null;
|
|
64
|
+
minDate: Date | undefined;
|
|
65
|
+
maxDate: Date | undefined;
|
|
66
|
+
};
|
|
67
|
+
export { defaultPresets };
|
|
68
|
+
export default WakaDateRangePicker;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
export type DrawerPosition = "left" | "right" | "top" | "bottom";
|
|
4
|
+
export type DrawerSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
5
|
+
export interface WakaDrawerProps {
|
|
6
|
+
/** État d'ouverture */
|
|
7
|
+
open: boolean;
|
|
8
|
+
/** Callback de fermeture */
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
/** Position du drawer */
|
|
11
|
+
position?: DrawerPosition;
|
|
12
|
+
/** Taille du drawer */
|
|
13
|
+
size?: DrawerSize;
|
|
14
|
+
/** Titre du drawer */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** Description du drawer */
|
|
17
|
+
description?: string;
|
|
18
|
+
/** Afficher le bouton de fermeture */
|
|
19
|
+
showCloseButton?: boolean;
|
|
20
|
+
/** Fermer en cliquant sur l'overlay */
|
|
21
|
+
closeOnOverlayClick?: boolean;
|
|
22
|
+
/** Fermer avec la touche Escape */
|
|
23
|
+
closeOnEscape?: boolean;
|
|
24
|
+
/** Afficher l'overlay */
|
|
25
|
+
showOverlay?: boolean;
|
|
26
|
+
/** Contenu du drawer */
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
/** Footer avec actions */
|
|
29
|
+
footer?: React.ReactNode;
|
|
30
|
+
/** Classes CSS additionnelles */
|
|
31
|
+
className?: string;
|
|
32
|
+
/** Classes CSS pour le contenu */
|
|
33
|
+
contentClassName?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const DrawerHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export declare const DrawerBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
export declare const DrawerFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
export declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
39
|
+
export declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
40
|
+
export declare function WakaDrawer({ open, onOpenChange, position, size, title, description, showCloseButton, closeOnOverlayClick, closeOnEscape, showOverlay, children, footer, className, contentClassName, }: WakaDrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export interface UseDrawerOptions {
|
|
42
|
+
/** État initial */
|
|
43
|
+
defaultOpen?: boolean;
|
|
44
|
+
/** Callback lors de l'ouverture */
|
|
45
|
+
onOpen?: () => void;
|
|
46
|
+
/** Callback lors de la fermeture */
|
|
47
|
+
onClose?: () => void;
|
|
48
|
+
}
|
|
49
|
+
export interface UseDrawerReturn {
|
|
50
|
+
open: boolean;
|
|
51
|
+
onOpenChange: (open: boolean) => void;
|
|
52
|
+
openDrawer: () => void;
|
|
53
|
+
closeDrawer: () => void;
|
|
54
|
+
toggleDrawer: () => void;
|
|
55
|
+
}
|
|
56
|
+
export declare function useDrawer(options?: UseDrawerOptions): UseDrawerReturn;
|
|
57
|
+
export declare const DrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
58
|
+
export declare const DrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
59
|
+
export default WakaDrawer;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type FileUploadVariant = "dropzone" | "button" | "inline";
|
|
3
|
+
export interface UploadedFile {
|
|
4
|
+
id: string;
|
|
5
|
+
file: File;
|
|
6
|
+
progress: number;
|
|
7
|
+
status: "pending" | "uploading" | "success" | "error";
|
|
8
|
+
error?: string;
|
|
9
|
+
url?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface WakaFileUploadProps {
|
|
12
|
+
/** Variant d'affichage */
|
|
13
|
+
variant?: FileUploadVariant;
|
|
14
|
+
/** Types de fichiers acceptés (ex: "image/*", ".pdf,.doc") */
|
|
15
|
+
accept?: string;
|
|
16
|
+
/** Taille max par fichier en bytes */
|
|
17
|
+
maxSize?: number;
|
|
18
|
+
/** Nombre max de fichiers */
|
|
19
|
+
maxFiles?: number;
|
|
20
|
+
/** Upload multiple */
|
|
21
|
+
multiple?: boolean;
|
|
22
|
+
/** Callback d'upload (retourne l'URL ou throw une erreur) */
|
|
23
|
+
onUpload?: (file: File, onProgress: (progress: number) => void) => Promise<string>;
|
|
24
|
+
/** Callback après tous les uploads */
|
|
25
|
+
onComplete?: (files: UploadedFile[]) => void;
|
|
26
|
+
/** Callback lors de la suppression */
|
|
27
|
+
onRemove?: (file: UploadedFile) => void;
|
|
28
|
+
/** Callback d'erreur */
|
|
29
|
+
onError?: (error: string, file?: File) => void;
|
|
30
|
+
/** Afficher la prévisualisation */
|
|
31
|
+
showPreview?: boolean;
|
|
32
|
+
/** Afficher la barre de progression */
|
|
33
|
+
showProgress?: boolean;
|
|
34
|
+
/** Désactivé */
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/** Classes CSS additionnelles */
|
|
37
|
+
className?: string;
|
|
38
|
+
/** Placeholder */
|
|
39
|
+
placeholder?: string;
|
|
40
|
+
/** Label */
|
|
41
|
+
label?: string;
|
|
42
|
+
/** Description */
|
|
43
|
+
description?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Composant WakaFileUpload
|
|
47
|
+
*/
|
|
48
|
+
export declare const WakaFileUpload: React.ForwardRefExoticComponent<WakaFileUploadProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
export default WakaFileUpload;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface WakaImageProps {
|
|
2
|
+
/** URL de l'image */
|
|
3
|
+
src: string;
|
|
4
|
+
/** Texte alternatif */
|
|
5
|
+
alt: string;
|
|
6
|
+
/** Largeur */
|
|
7
|
+
width?: number | string;
|
|
8
|
+
/** Hauteur */
|
|
9
|
+
height?: number | string;
|
|
10
|
+
/** Image placeholder (base64 ou URL) */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Couleur de fond du placeholder */
|
|
13
|
+
placeholderColor?: string;
|
|
14
|
+
/** Activer le lazy loading */
|
|
15
|
+
lazy?: boolean;
|
|
16
|
+
/** Activer le zoom au clic */
|
|
17
|
+
zoomable?: boolean;
|
|
18
|
+
/** Niveau de zoom maximum */
|
|
19
|
+
maxZoom?: number;
|
|
20
|
+
/** Object fit */
|
|
21
|
+
objectFit?: "contain" | "cover" | "fill" | "none" | "scale-down";
|
|
22
|
+
/** Object position */
|
|
23
|
+
objectPosition?: string;
|
|
24
|
+
/** Arrondi des coins */
|
|
25
|
+
rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
|
|
26
|
+
/** Afficher un indicateur de chargement */
|
|
27
|
+
showLoader?: boolean;
|
|
28
|
+
/** Callback quand l'image est chargée */
|
|
29
|
+
onLoad?: () => void;
|
|
30
|
+
/** Callback en cas d'erreur */
|
|
31
|
+
onError?: () => void;
|
|
32
|
+
/** Callback quand le zoom change */
|
|
33
|
+
onZoomChange?: (zoom: number) => void;
|
|
34
|
+
/** Classes CSS additionnelles */
|
|
35
|
+
className?: string;
|
|
36
|
+
/** Classes CSS pour le conteneur */
|
|
37
|
+
containerClassName?: string;
|
|
38
|
+
/** Ratio d'aspect (ex: "16/9", "4/3", "1/1") */
|
|
39
|
+
aspectRatio?: string;
|
|
40
|
+
}
|
|
41
|
+
export declare function WakaImage({ src, alt, width, height, placeholder, placeholderColor, lazy, zoomable, maxZoom, objectFit, objectPosition, rounded, showLoader, onLoad, onError, onZoomChange, className, containerClassName, aspectRatio, }: WakaImageProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export interface WakaImageGalleryProps {
|
|
43
|
+
/** Liste des images */
|
|
44
|
+
images: Array<{
|
|
45
|
+
src: string;
|
|
46
|
+
alt: string;
|
|
47
|
+
thumbnail?: string;
|
|
48
|
+
}>;
|
|
49
|
+
/** Nombre de colonnes */
|
|
50
|
+
columns?: number;
|
|
51
|
+
/** Gap entre les images */
|
|
52
|
+
gap?: number;
|
|
53
|
+
/** Aspect ratio des images */
|
|
54
|
+
aspectRatio?: string;
|
|
55
|
+
/** Classes CSS additionnelles */
|
|
56
|
+
className?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare function WakaImageGallery({ images, columns, gap, aspectRatio, className, }: WakaImageGalleryProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export default WakaImage;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface KanbanCard {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
labels?: Array<{
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
color: string;
|
|
10
|
+
}>;
|
|
11
|
+
assignee?: {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
avatar?: string;
|
|
15
|
+
};
|
|
16
|
+
priority?: "low" | "medium" | "high" | "urgent";
|
|
17
|
+
dueDate?: Date;
|
|
18
|
+
data?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export interface KanbanColumn {
|
|
21
|
+
id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
cards: KanbanCard[];
|
|
24
|
+
color?: string;
|
|
25
|
+
limit?: number;
|
|
26
|
+
}
|
|
27
|
+
export interface WakaKanbanProps {
|
|
28
|
+
/** Colonnes du kanban */
|
|
29
|
+
columns: KanbanColumn[];
|
|
30
|
+
/** Callback lors du déplacement d'une carte */
|
|
31
|
+
onCardMove?: (cardId: string, fromColumnId: string, toColumnId: string, newIndex: number) => void;
|
|
32
|
+
/** Callback lors du déplacement d'une colonne */
|
|
33
|
+
onColumnMove?: (columnId: string, newIndex: number) => void;
|
|
34
|
+
/** Callback lors de l'ajout d'une carte */
|
|
35
|
+
onCardAdd?: (columnId: string, card: Partial<KanbanCard>) => void;
|
|
36
|
+
/** Callback lors de la suppression d'une carte */
|
|
37
|
+
onCardDelete?: (cardId: string, columnId: string) => void;
|
|
38
|
+
/** Callback lors du clic sur une carte */
|
|
39
|
+
onCardClick?: (card: KanbanCard, columnId: string) => void;
|
|
40
|
+
/** Callback lors de l'ajout d'une colonne */
|
|
41
|
+
onColumnAdd?: (column: Partial<KanbanColumn>) => void;
|
|
42
|
+
/** Callback lors de la suppression d'une colonne */
|
|
43
|
+
onColumnDelete?: (columnId: string) => void;
|
|
44
|
+
/** Permettre l'ajout de cartes */
|
|
45
|
+
allowAddCard?: boolean;
|
|
46
|
+
/** Permettre l'ajout de colonnes */
|
|
47
|
+
allowAddColumn?: boolean;
|
|
48
|
+
/** Permettre le déplacement des colonnes */
|
|
49
|
+
allowColumnDrag?: boolean;
|
|
50
|
+
/** Fonction de rendu personnalisée pour les cartes */
|
|
51
|
+
renderCard?: (card: KanbanCard, columnId: string) => React.ReactNode;
|
|
52
|
+
/** Hauteur du kanban */
|
|
53
|
+
height?: number | string;
|
|
54
|
+
/** Classes CSS additionnelles */
|
|
55
|
+
className?: string;
|
|
56
|
+
}
|
|
57
|
+
export declare function WakaKanban({ columns, onCardMove, onColumnMove, onCardAdd, onCardDelete, onCardClick, onColumnAdd, onColumnDelete, allowAddCard, allowAddColumn, allowColumnDrag, renderCard, height, className, }: WakaKanbanProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function useKanban(initialColumns: KanbanColumn[]): {
|
|
59
|
+
columns: KanbanColumn[];
|
|
60
|
+
setColumns: React.Dispatch<React.SetStateAction<KanbanColumn[]>>;
|
|
61
|
+
moveCard: (cardId: string, fromColumnId: string, toColumnId: string, newIndex: number) => void;
|
|
62
|
+
moveColumn: (columnId: string, newIndex: number) => void;
|
|
63
|
+
addCard: (columnId: string, card: Partial<KanbanCard>) => void;
|
|
64
|
+
deleteCard: (cardId: string, columnId: string) => void;
|
|
65
|
+
addColumn: (column: Partial<KanbanColumn>) => void;
|
|
66
|
+
deleteColumn: (columnId: string) => void;
|
|
67
|
+
};
|
|
68
|
+
export default WakaKanban;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
export type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
4
|
+
export interface WakaModalProps {
|
|
5
|
+
/** État d'ouverture */
|
|
6
|
+
open: boolean;
|
|
7
|
+
/** Callback de fermeture */
|
|
8
|
+
onOpenChange: (open: boolean) => void;
|
|
9
|
+
/** Titre du modal */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Description du modal */
|
|
12
|
+
description?: string;
|
|
13
|
+
/** Contenu du modal */
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
/** Taille du modal */
|
|
16
|
+
size?: ModalSize;
|
|
17
|
+
/** Afficher le bouton de fermeture */
|
|
18
|
+
showCloseButton?: boolean;
|
|
19
|
+
/** Fermer en cliquant sur l'overlay */
|
|
20
|
+
closeOnOverlayClick?: boolean;
|
|
21
|
+
/** Fermer avec la touche Escape */
|
|
22
|
+
closeOnEscape?: boolean;
|
|
23
|
+
/** Animation d'entrée/sortie */
|
|
24
|
+
animation?: "fade" | "slide" | "scale" | "none";
|
|
25
|
+
/** Centré verticalement */
|
|
26
|
+
centered?: boolean;
|
|
27
|
+
/** Sticky header */
|
|
28
|
+
stickyHeader?: boolean;
|
|
29
|
+
/** Sticky footer (pour les actions) */
|
|
30
|
+
stickyFooter?: boolean;
|
|
31
|
+
/** Footer avec actions */
|
|
32
|
+
footer?: React.ReactNode;
|
|
33
|
+
/** Classes CSS additionnelles pour le contenu */
|
|
34
|
+
className?: string;
|
|
35
|
+
/** Classes CSS pour l'overlay */
|
|
36
|
+
overlayClassName?: string;
|
|
37
|
+
}
|
|
38
|
+
declare const ModalOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
39
|
+
animation?: "fade" | "slide" | "scale" | "none";
|
|
40
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
declare const ModalContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
42
|
+
size?: ModalSize;
|
|
43
|
+
animation?: "fade" | "slide" | "scale" | "none";
|
|
44
|
+
centered?: boolean;
|
|
45
|
+
showCloseButton?: boolean;
|
|
46
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
47
|
+
interface ModalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
48
|
+
sticky?: boolean;
|
|
49
|
+
}
|
|
50
|
+
declare const ModalHeader: React.ForwardRefExoticComponent<ModalHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
declare const ModalTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
52
|
+
declare const ModalDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
53
|
+
declare const ModalBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
54
|
+
interface ModalFooterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
55
|
+
sticky?: boolean;
|
|
56
|
+
}
|
|
57
|
+
declare const ModalFooter: React.ForwardRefExoticComponent<ModalFooterProps & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
export declare function WakaModal({ open, onOpenChange, title, description, children, size, showCloseButton, closeOnOverlayClick, closeOnEscape, animation, centered, stickyHeader, stickyFooter, footer, className, overlayClassName, }: WakaModalProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
export interface WakaModalTriggerProps {
|
|
60
|
+
/** Contenu du trigger */
|
|
61
|
+
children: React.ReactNode;
|
|
62
|
+
/** Callback d'ouverture */
|
|
63
|
+
onOpen?: () => void;
|
|
64
|
+
/** Classes CSS additionnelles */
|
|
65
|
+
className?: string;
|
|
66
|
+
/** Désactiver le trigger */
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
}
|
|
69
|
+
export declare function WakaModalTrigger({ children, onOpen, className, disabled, }: WakaModalTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
70
|
+
export interface UseModalOptions {
|
|
71
|
+
defaultOpen?: boolean;
|
|
72
|
+
onOpenChange?: (open: boolean) => void;
|
|
73
|
+
}
|
|
74
|
+
export declare function useModal(options?: UseModalOptions): {
|
|
75
|
+
isOpen: boolean;
|
|
76
|
+
open: () => void;
|
|
77
|
+
close: () => void;
|
|
78
|
+
toggle: () => void;
|
|
79
|
+
onOpenChange: (open: boolean) => void;
|
|
80
|
+
};
|
|
81
|
+
export { ModalOverlay, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalBody, ModalFooter, };
|
|
82
|
+
export default WakaModal;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface WakaNumberInputProps {
|
|
3
|
+
/** Valeur courante */
|
|
4
|
+
value?: number;
|
|
5
|
+
/** Callback lors du changement */
|
|
6
|
+
onChange?: (value: number | undefined) => void;
|
|
7
|
+
/** Valeur minimum */
|
|
8
|
+
min?: number;
|
|
9
|
+
/** Valeur maximum */
|
|
10
|
+
max?: number;
|
|
11
|
+
/** Pas d'incrémentation */
|
|
12
|
+
step?: number;
|
|
13
|
+
/** Précision décimale */
|
|
14
|
+
precision?: number;
|
|
15
|
+
/** Placeholder */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Désactivé */
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
/** Erreur */
|
|
20
|
+
error?: boolean;
|
|
21
|
+
/** Taille */
|
|
22
|
+
size?: "sm" | "md" | "lg";
|
|
23
|
+
/** Position des boutons */
|
|
24
|
+
buttonPosition?: "sides" | "right" | "none";
|
|
25
|
+
/** Permettre la valeur vide */
|
|
26
|
+
allowEmpty?: boolean;
|
|
27
|
+
/** Formater l'affichage */
|
|
28
|
+
formatValue?: (value: number) => string;
|
|
29
|
+
/** Parser la valeur saisie */
|
|
30
|
+
parseValue?: (value: string) => number | undefined;
|
|
31
|
+
/** Classes CSS additionnelles */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** ID pour l'accessibilité */
|
|
34
|
+
id?: string;
|
|
35
|
+
/** Nom du champ */
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
38
|
+
export declare function WakaNumberInput({ value, onChange, min, max, step, precision, placeholder, disabled, error, size, buttonPosition, allowEmpty, formatValue, parseValue, className, id, name, }: WakaNumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export interface UseNumberInputOptions {
|
|
40
|
+
/** Valeur initiale */
|
|
41
|
+
initialValue?: number;
|
|
42
|
+
/** Valeur minimum */
|
|
43
|
+
min?: number;
|
|
44
|
+
/** Valeur maximum */
|
|
45
|
+
max?: number;
|
|
46
|
+
/** Pas d'incrémentation */
|
|
47
|
+
step?: number;
|
|
48
|
+
}
|
|
49
|
+
export declare function useNumberInput(options?: UseNumberInputOptions): {
|
|
50
|
+
value: number | undefined;
|
|
51
|
+
onChange: React.Dispatch<React.SetStateAction<number | undefined>>;
|
|
52
|
+
increment: () => void;
|
|
53
|
+
decrement: () => void;
|
|
54
|
+
reset: () => void;
|
|
55
|
+
clear: () => void;
|
|
56
|
+
min: number | undefined;
|
|
57
|
+
max: number | undefined;
|
|
58
|
+
step: number;
|
|
59
|
+
};
|
|
60
|
+
export default WakaNumberInput;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export interface WakaPaginationProps {
|
|
2
|
+
/** Page courante (1-indexed) */
|
|
3
|
+
page: number;
|
|
4
|
+
/** Nombre total de pages */
|
|
5
|
+
totalPages: number;
|
|
6
|
+
/** Callback lors du changement de page */
|
|
7
|
+
onPageChange: (page: number) => void;
|
|
8
|
+
/** Nombre d'éléments par page */
|
|
9
|
+
pageSize?: number;
|
|
10
|
+
/** Options de taille de page */
|
|
11
|
+
pageSizeOptions?: number[];
|
|
12
|
+
/** Callback lors du changement de taille */
|
|
13
|
+
onPageSizeChange?: (size: number) => void;
|
|
14
|
+
/** Nombre total d'éléments (pour affichage) */
|
|
15
|
+
totalItems?: number;
|
|
16
|
+
/** Afficher la sélection de taille de page */
|
|
17
|
+
showPageSizeSelector?: boolean;
|
|
18
|
+
/** Afficher les infos sur les éléments */
|
|
19
|
+
showItemsInfo?: boolean;
|
|
20
|
+
/** Afficher les boutons premier/dernier */
|
|
21
|
+
showFirstLast?: boolean;
|
|
22
|
+
/** Nombre maximum de pages à afficher */
|
|
23
|
+
maxVisiblePages?: number;
|
|
24
|
+
/** Taille des boutons */
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
/** Variante visuelle */
|
|
27
|
+
variant?: "default" | "outline" | "ghost";
|
|
28
|
+
/** Classes CSS additionnelles */
|
|
29
|
+
className?: string;
|
|
30
|
+
/** Labels personnalisés */
|
|
31
|
+
labels?: {
|
|
32
|
+
page?: string;
|
|
33
|
+
of?: string;
|
|
34
|
+
items?: string;
|
|
35
|
+
itemsPerPage?: string;
|
|
36
|
+
first?: string;
|
|
37
|
+
previous?: string;
|
|
38
|
+
next?: string;
|
|
39
|
+
last?: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export declare function WakaPagination({ page, totalPages, onPageChange, pageSize, pageSizeOptions, onPageSizeChange, totalItems, showPageSizeSelector, showItemsInfo, showFirstLast, maxVisiblePages, size, variant, className, labels, }: WakaPaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export interface UsePaginationOptions {
|
|
44
|
+
/** Total d'éléments */
|
|
45
|
+
totalItems: number;
|
|
46
|
+
/** Taille de page initiale */
|
|
47
|
+
initialPageSize?: number;
|
|
48
|
+
/** Page initiale */
|
|
49
|
+
initialPage?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface UsePaginationReturn {
|
|
52
|
+
page: number;
|
|
53
|
+
pageSize: number;
|
|
54
|
+
totalPages: number;
|
|
55
|
+
setPage: (page: number) => void;
|
|
56
|
+
setPageSize: (size: number) => void;
|
|
57
|
+
nextPage: () => void;
|
|
58
|
+
prevPage: () => void;
|
|
59
|
+
firstPage: () => void;
|
|
60
|
+
lastPage: () => void;
|
|
61
|
+
canNextPage: boolean;
|
|
62
|
+
canPrevPage: boolean;
|
|
63
|
+
startIndex: number;
|
|
64
|
+
endIndex: number;
|
|
65
|
+
}
|
|
66
|
+
export declare function usePagination({ totalItems, initialPageSize, initialPage, }: UsePaginationOptions): UsePaginationReturn;
|
|
67
|
+
export default WakaPagination;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface WakaQRCodeProps {
|
|
3
|
+
/** Données à encoder */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Taille en pixels */
|
|
6
|
+
size?: number;
|
|
7
|
+
/** Niveau de correction d'erreur */
|
|
8
|
+
errorCorrectionLevel?: "L" | "M" | "Q" | "H";
|
|
9
|
+
/** Couleur du QR code */
|
|
10
|
+
fgColor?: string;
|
|
11
|
+
/** Couleur de fond */
|
|
12
|
+
bgColor?: string;
|
|
13
|
+
/** Inclure une marge */
|
|
14
|
+
includeMargin?: boolean;
|
|
15
|
+
/** URL de l'image au centre (logo) */
|
|
16
|
+
logoUrl?: string;
|
|
17
|
+
/** Taille du logo en ratio (0-1) */
|
|
18
|
+
logoSize?: number;
|
|
19
|
+
/** Afficher les actions (télécharger, copier) */
|
|
20
|
+
showActions?: boolean;
|
|
21
|
+
/** Classes CSS additionnelles */
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function WakaQRCode({ value, size, errorCorrectionLevel, fgColor, bgColor, includeMargin, logoUrl, logoSize, showActions, className, }: WakaQRCodeProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function useQRCode(initialValue?: string): {
|
|
26
|
+
value: string;
|
|
27
|
+
setValue: React.Dispatch<React.SetStateAction<string>>;
|
|
28
|
+
props: {
|
|
29
|
+
value: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default WakaQRCode;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type ToolbarButton = "bold" | "italic" | "underline" | "strike" | "h1" | "h2" | "h3" | "bulletList" | "orderedList" | "blockquote" | "code" | "link" | "alignLeft" | "alignCenter" | "alignRight" | "undo" | "redo";
|
|
3
|
+
export interface WakaRichTextEditorProps {
|
|
4
|
+
/** Contenu HTML */
|
|
5
|
+
value?: string;
|
|
6
|
+
/** Callback de changement */
|
|
7
|
+
onChange?: (html: string) => void;
|
|
8
|
+
/** Configuration de la toolbar */
|
|
9
|
+
toolbar?: ToolbarButton[][];
|
|
10
|
+
/** Placeholder */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Longueur max */
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
/** Afficher le compteur de caractères */
|
|
15
|
+
showCharacterCount?: boolean;
|
|
16
|
+
/** Hauteur min */
|
|
17
|
+
minHeight?: number;
|
|
18
|
+
/** Désactivé */
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Erreur */
|
|
21
|
+
error?: string;
|
|
22
|
+
/** Classes CSS additionnelles */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Label */
|
|
25
|
+
label?: string;
|
|
26
|
+
/** Description */
|
|
27
|
+
description?: string;
|
|
28
|
+
/** Mode éditable */
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Composant WakaRichTextEditor
|
|
33
|
+
* Utilise Tiptap si disponible, sinon fallback sur textarea
|
|
34
|
+
*/
|
|
35
|
+
export declare const WakaRichTextEditor: React.ForwardRefExoticComponent<WakaRichTextEditorProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
|
+
export default WakaRichTextEditor;
|