@wakastellar/ui 0.2.0 → 0.3.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/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/index.d.ts +34 -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/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.cjs.js +1 -0
- package/dist/charts.d.ts +17 -0
- package/dist/charts.es.js +16 -0
- package/dist/cn-CAc3sAGM.js +21 -0
- package/dist/cn-zrNBeCrC.js +1 -0
- package/dist/components/DataTable/DataTableBody.d.ts +3 -1
- package/dist/components/DataTable/DataTableHeader.d.ts +3 -1
- package/dist/components/index.d.ts +19 -0
- package/dist/components/language-selector/index.d.ts +19 -1
- package/dist/components/waka-barcode/index.d.ts +27 -0
- package/dist/components/waka-breadcrumb/index.d.ts +43 -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-image/index.d.ts +57 -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-segmented-control/index.d.ts +42 -0
- package/dist/components/waka-spinner/index.d.ts +57 -21
- package/dist/components/waka-stat/index.d.ts +57 -0
- package/dist/components/waka-stepper/index.d.ts +76 -0
- package/dist/components/waka-theme-creator/index.d.ts +73 -22
- 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.cjs.js +1 -0
- package/dist/export.d.ts +28 -0
- package/dist/export.es.js +5 -0
- package/dist/index-CENPre_9.js +466 -0
- package/dist/index-CHLjUBPo.js +1 -0
- package/dist/index.cjs.js +54 -155
- package/dist/index.es.js +20832 -11710
- package/dist/rich-text.cjs.js +1 -0
- package/dist/rich-text.d.ts +21 -0
- package/dist/rich-text.es.js +4 -0
- package/dist/types-Bjy1Hy76.js +1111 -0
- package/dist/types-CHv7a1SP.js +1 -0
- package/dist/useDataTableImport-DqeEL4GC.js +124 -0
- package/dist/useDataTableImport-sQwBFAJ_.js +775 -0
- package/package.json +53 -5
|
@@ -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,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SegmentOption<T = string> {
|
|
3
|
+
/** Valeur de l'option */
|
|
4
|
+
value: T;
|
|
5
|
+
/** Libellé affiché */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Icône */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Désactiver l'option */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface WakaSegmentedControlProps<T = string> {
|
|
13
|
+
/** Options disponibles */
|
|
14
|
+
options: SegmentOption<T>[];
|
|
15
|
+
/** Valeur sélectionnée */
|
|
16
|
+
value?: T;
|
|
17
|
+
/** Callback lors du changement */
|
|
18
|
+
onChange?: (value: T) => void;
|
|
19
|
+
/** Taille */
|
|
20
|
+
size?: "sm" | "md" | "lg";
|
|
21
|
+
/** Variante */
|
|
22
|
+
variant?: "default" | "pills";
|
|
23
|
+
/** Prendre toute la largeur */
|
|
24
|
+
fullWidth?: boolean;
|
|
25
|
+
/** Désactiver tout le contrôle */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Nom pour les formulaires */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** Classes CSS additionnelles */
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function WakaSegmentedControl<T = string>({ options, value, onChange, size, variant, fullWidth, disabled, name, className, }: WakaSegmentedControlProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function useSegmentedControl<T = string>(options: SegmentOption<T>[], initialValue?: T): {
|
|
34
|
+
value: T | undefined;
|
|
35
|
+
onChange: React.Dispatch<React.SetStateAction<T | undefined>>;
|
|
36
|
+
selectNext: () => void;
|
|
37
|
+
selectPrevious: () => void;
|
|
38
|
+
selectFirst: () => void;
|
|
39
|
+
selectLast: () => void;
|
|
40
|
+
options: SegmentOption<T>[];
|
|
41
|
+
};
|
|
42
|
+
export default WakaSegmentedControl;
|
|
@@ -1,46 +1,82 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
/**
|
|
4
|
-
* Variantes du spinner
|
|
5
|
-
* Définit les différentes tailles disponibles pour l'animation
|
|
4
|
+
* Variantes du spinner Jarvis WakaSpinner
|
|
6
5
|
*/
|
|
7
6
|
declare const spinnerVariants: (props?: ({
|
|
8
|
-
size?: "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
7
|
+
size?: "sm" | "lg" | "md" | "xs" | "xl" | null | undefined;
|
|
9
8
|
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
10
9
|
export interface WakaSpinnerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spinnerVariants> {
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
13
|
-
*
|
|
11
|
+
* Mode du spinner
|
|
12
|
+
* - "infinite": Animation continue style Jarvis (pour processus indéfinis)
|
|
13
|
+
* - "loading": Animation de chargement de données (visuellement différent pour indiquer une récupération)
|
|
14
|
+
* @default "infinite"
|
|
15
|
+
*/
|
|
16
|
+
mode?: "infinite" | "loading";
|
|
17
|
+
/**
|
|
18
|
+
* Label affiché au centre du spinner
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Sous-label affiché sous le label principal
|
|
14
23
|
*/
|
|
15
|
-
|
|
24
|
+
subLabel?: string;
|
|
16
25
|
/**
|
|
17
|
-
* Vitesse de rotation
|
|
18
|
-
* @default
|
|
26
|
+
* Vitesse de rotation (en secondes pour un tour complet)
|
|
27
|
+
* @default 3
|
|
19
28
|
*/
|
|
20
29
|
speed?: number;
|
|
21
30
|
/**
|
|
22
|
-
* Couleur
|
|
23
|
-
* @default "
|
|
31
|
+
* Couleur principale (classe Tailwind ou couleur CSS)
|
|
32
|
+
* @default "primary"
|
|
33
|
+
*/
|
|
34
|
+
color?: "primary" | "secondary" | "accent" | "destructive" | "muted" | string;
|
|
35
|
+
/**
|
|
36
|
+
* Nombre de cercles concentriques
|
|
37
|
+
* @default 3
|
|
24
38
|
*/
|
|
25
|
-
|
|
39
|
+
rings?: 2 | 3 | 4 | 5;
|
|
26
40
|
/**
|
|
27
|
-
*
|
|
28
|
-
* @default
|
|
41
|
+
* Afficher les particules flottantes
|
|
42
|
+
* @default true
|
|
29
43
|
*/
|
|
30
|
-
|
|
44
|
+
showParticles?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Afficher le pulse central
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
showPulse?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Opacité des anneaux (0-1)
|
|
52
|
+
* @default 0.6
|
|
53
|
+
*/
|
|
54
|
+
ringOpacity?: number;
|
|
31
55
|
}
|
|
32
56
|
/**
|
|
33
|
-
* WakaSpinner - Composant de chargement
|
|
57
|
+
* WakaSpinner - Composant de chargement style Jarvis/HUD futuriste
|
|
34
58
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
59
|
+
* Deux modes disponibles :
|
|
60
|
+
* - **infinite** : Cercles concentriques tournants pour processus continus
|
|
61
|
+
* - **loading** : Variante avec effet de scan pour indiquer une récupération de données
|
|
37
62
|
*
|
|
38
63
|
* @example
|
|
39
64
|
* ```tsx
|
|
40
|
-
*
|
|
41
|
-
* <WakaSpinner
|
|
42
|
-
*
|
|
65
|
+
* // Mode infini simple
|
|
66
|
+
* <WakaSpinner mode="infinite" label="Processing" />
|
|
67
|
+
*
|
|
68
|
+
* // Mode loading avec sous-label
|
|
69
|
+
* <WakaSpinner mode="loading" label="Loading" subLabel="Fetching data..." />
|
|
70
|
+
*
|
|
71
|
+
* // Personnalisé
|
|
72
|
+
* <WakaSpinner
|
|
73
|
+
* mode="infinite"
|
|
74
|
+
* size="lg"
|
|
75
|
+
* rings={4}
|
|
76
|
+
* color="accent"
|
|
77
|
+
* label="JARVIS"
|
|
78
|
+
* />
|
|
43
79
|
* ```
|
|
44
80
|
*/
|
|
45
81
|
export declare const WakaSpinner: React.ForwardRefExoticComponent<WakaSpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
-
export
|
|
82
|
+
export default WakaSpinner;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TrendDirection = "up" | "down" | "neutral";
|
|
3
|
+
export interface WakaStatProps {
|
|
4
|
+
/** Libellé de la statistique */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Valeur principale */
|
|
7
|
+
value: string | number;
|
|
8
|
+
/** Description ou sous-titre */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Icône à afficher */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Direction de la tendance */
|
|
13
|
+
trend?: TrendDirection;
|
|
14
|
+
/** Valeur de la tendance (ex: "+12%") */
|
|
15
|
+
trendValue?: string;
|
|
16
|
+
/** Texte de la tendance (ex: "vs last month") */
|
|
17
|
+
trendText?: string;
|
|
18
|
+
/** Inverser les couleurs de tendance (down=good) */
|
|
19
|
+
invertTrend?: boolean;
|
|
20
|
+
/** Variante visuelle */
|
|
21
|
+
variant?: "default" | "card" | "minimal" | "gradient";
|
|
22
|
+
/** Taille */
|
|
23
|
+
size?: "sm" | "md" | "lg";
|
|
24
|
+
/** Couleur de l'icône/accent */
|
|
25
|
+
color?: "default" | "primary" | "success" | "warning" | "destructive" | "blue" | "purple";
|
|
26
|
+
/** Afficher un indicateur de chargement */
|
|
27
|
+
loading?: boolean;
|
|
28
|
+
/** Classes CSS additionnelles */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface WakaStatGroupProps {
|
|
32
|
+
/** Statistiques à afficher */
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
/** Disposition */
|
|
35
|
+
layout?: "row" | "grid";
|
|
36
|
+
/** Nombre de colonnes (pour grid) */
|
|
37
|
+
columns?: 2 | 3 | 4;
|
|
38
|
+
/** Espacement */
|
|
39
|
+
gap?: "sm" | "md" | "lg";
|
|
40
|
+
/** Classes CSS additionnelles */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
export declare function WakaStat({ label, value, description, icon, trend, trendValue, trendText, invertTrend, variant, size, color, loading, className, }: WakaStatProps): import("react/jsx-runtime").JSX.Element;
|
|
44
|
+
export declare function WakaStatGroup({ children, layout, columns, gap, className, }: WakaStatGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export interface UseStatOptions {
|
|
46
|
+
initialValue?: number;
|
|
47
|
+
format?: (value: number) => string;
|
|
48
|
+
previousValue?: number;
|
|
49
|
+
}
|
|
50
|
+
export declare function useStat(options?: UseStatOptions): {
|
|
51
|
+
value: string;
|
|
52
|
+
rawValue: number;
|
|
53
|
+
setValue: React.Dispatch<React.SetStateAction<number>>;
|
|
54
|
+
trend: TrendDirection;
|
|
55
|
+
trendValue: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
export default WakaStat;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type StepStatus = "pending" | "current" | "completed" | "error";
|
|
3
|
+
export interface Step {
|
|
4
|
+
/** Identifiant unique de l'étape */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Titre de l'étape */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Description optionnelle */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Icône personnalisée (optionnel) */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** Contenu de l'étape */
|
|
13
|
+
content?: React.ReactNode;
|
|
14
|
+
/** Étape optionnelle (peut être sautée) */
|
|
15
|
+
optional?: boolean;
|
|
16
|
+
/** Désactiver l'étape */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface WakaStepperProps {
|
|
20
|
+
/** Liste des étapes */
|
|
21
|
+
steps: Step[];
|
|
22
|
+
/** Index de l'étape courante (0-indexed) */
|
|
23
|
+
currentStep: number;
|
|
24
|
+
/** Callback lors du changement d'étape */
|
|
25
|
+
onStepChange?: (stepIndex: number) => void;
|
|
26
|
+
/** Orientation du stepper */
|
|
27
|
+
orientation?: "horizontal" | "vertical";
|
|
28
|
+
/** Variante visuelle */
|
|
29
|
+
variant?: "default" | "simple" | "numbered";
|
|
30
|
+
/** Taille */
|
|
31
|
+
size?: "sm" | "md" | "lg";
|
|
32
|
+
/** Autoriser la navigation en cliquant sur les étapes */
|
|
33
|
+
clickable?: boolean;
|
|
34
|
+
/** Autoriser uniquement la navigation vers les étapes précédentes */
|
|
35
|
+
allowPrevious?: boolean;
|
|
36
|
+
/** Afficher le contenu de l'étape */
|
|
37
|
+
showContent?: boolean;
|
|
38
|
+
/** Classes CSS additionnelles */
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
export interface StepperContextValue {
|
|
42
|
+
currentStep: number;
|
|
43
|
+
orientation: "horizontal" | "vertical";
|
|
44
|
+
variant: "default" | "simple" | "numbered";
|
|
45
|
+
size: "sm" | "md" | "lg";
|
|
46
|
+
clickable: boolean;
|
|
47
|
+
allowPrevious: boolean;
|
|
48
|
+
goToStep: (index: number) => void;
|
|
49
|
+
nextStep: () => void;
|
|
50
|
+
prevStep: () => void;
|
|
51
|
+
getStepStatus: (index: number) => StepStatus;
|
|
52
|
+
}
|
|
53
|
+
export declare function useStepperContext(): StepperContextValue;
|
|
54
|
+
export declare function WakaStepper({ steps, currentStep, onStepChange, orientation, variant, size, clickable, allowPrevious, showContent, className, }: WakaStepperProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export interface StepperNavigationProps {
|
|
56
|
+
/** Texte du bouton précédent */
|
|
57
|
+
prevLabel?: string;
|
|
58
|
+
/** Texte du bouton suivant */
|
|
59
|
+
nextLabel?: string;
|
|
60
|
+
/** Texte du bouton de fin */
|
|
61
|
+
finishLabel?: string;
|
|
62
|
+
/** Callback lors du clic sur Terminer */
|
|
63
|
+
onFinish?: () => void;
|
|
64
|
+
/** Afficher le bouton Annuler */
|
|
65
|
+
showCancel?: boolean;
|
|
66
|
+
/** Texte du bouton Annuler */
|
|
67
|
+
cancelLabel?: string;
|
|
68
|
+
/** Callback lors du clic sur Annuler */
|
|
69
|
+
onCancel?: () => void;
|
|
70
|
+
/** Désactiver le bouton Suivant */
|
|
71
|
+
disableNext?: boolean;
|
|
72
|
+
/** Classes CSS additionnelles */
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|
|
75
|
+
export declare function StepperNavigation({ prevLabel, nextLabel, finishLabel, onFinish, showCancel, cancelLabel, onCancel, disableNext, className, }: StepperNavigationProps): import("react/jsx-runtime").JSX.Element;
|
|
76
|
+
export default WakaStepper;
|
|
@@ -5,6 +5,40 @@ export interface ThemeVersion {
|
|
|
5
5
|
changelog?: string;
|
|
6
6
|
css: string;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Ressource personnalisée pour le thème
|
|
10
|
+
*/
|
|
11
|
+
export interface ThemeCustomResource {
|
|
12
|
+
/** Clé unique de la ressource */
|
|
13
|
+
key: string;
|
|
14
|
+
/** URL de la ressource (après upload S3) */
|
|
15
|
+
url: string;
|
|
16
|
+
/** Type de fichier */
|
|
17
|
+
type: "image" | "icon" | "font" | "other";
|
|
18
|
+
/** Nom du fichier original */
|
|
19
|
+
filename: string;
|
|
20
|
+
/** Taille en octets */
|
|
21
|
+
size?: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Configuration des assets du thème (login, etc.)
|
|
25
|
+
*/
|
|
26
|
+
export interface ThemeAssets {
|
|
27
|
+
/** Logo pour le mode clair */
|
|
28
|
+
logo_light?: string;
|
|
29
|
+
/** Logo pour le mode sombre */
|
|
30
|
+
logo_dark?: string;
|
|
31
|
+
/** Image de fond pour le mode clair */
|
|
32
|
+
background_light?: string;
|
|
33
|
+
/** Image de fond pour le mode sombre */
|
|
34
|
+
background_dark?: string;
|
|
35
|
+
/** Favicon */
|
|
36
|
+
favicon?: string;
|
|
37
|
+
/** Image de sponsor (mode clair) */
|
|
38
|
+
sponsor_light?: string;
|
|
39
|
+
/** Image de sponsor (mode sombre) */
|
|
40
|
+
sponsor_dark?: string;
|
|
41
|
+
}
|
|
8
42
|
export interface ThemeMetadata {
|
|
9
43
|
id: string;
|
|
10
44
|
label: string;
|
|
@@ -13,47 +47,64 @@ export interface ThemeMetadata {
|
|
|
13
47
|
author?: string;
|
|
14
48
|
versions: ThemeVersion[];
|
|
15
49
|
currentVersion: string;
|
|
50
|
+
/** Assets du thème (logos, backgrounds) */
|
|
51
|
+
assets?: ThemeAssets;
|
|
52
|
+
/** Ressources personnalisées */
|
|
53
|
+
customResources?: ThemeCustomResource[];
|
|
16
54
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
extension?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Réponse de l'API d'upload de fichier
|
|
57
|
+
*/
|
|
58
|
+
export interface FileUploadResponse {
|
|
59
|
+
/** URL du fichier uploadé */
|
|
60
|
+
url: string;
|
|
61
|
+
/** Nom du fichier */
|
|
62
|
+
filename?: string;
|
|
63
|
+
/** Taille du fichier en octets */
|
|
64
|
+
size?: number;
|
|
28
65
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
66
|
+
/**
|
|
67
|
+
* Configuration de l'API pour le ThemeCreator
|
|
68
|
+
*/
|
|
69
|
+
export interface ThemeCreatorApiConfig {
|
|
70
|
+
/** Callback pour uploader un fichier (logo, background, etc.) */
|
|
71
|
+
onUploadFile: (file: File, themeId: string, assetType: string) => Promise<FileUploadResponse>;
|
|
72
|
+
/** Callback pour sauvegarder le thème complet */
|
|
73
|
+
onSaveTheme: (theme: ThemeMetadata) => Promise<void>;
|
|
74
|
+
/** Callback pour supprimer un thème */
|
|
75
|
+
onDeleteTheme?: (themeId: string) => Promise<void>;
|
|
76
|
+
/** Callback pour charger les détails d'un thème */
|
|
37
77
|
onLoadTheme?: (themeId: string) => Promise<ThemeMetadata | null>;
|
|
78
|
+
/** Callback pour supprimer un asset */
|
|
79
|
+
onDeleteAsset?: (themeId: string, assetType: string) => Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
export interface WakaThemeCreatorProps {
|
|
82
|
+
/** Configuration de l'API */
|
|
83
|
+
apiConfig: ThemeCreatorApiConfig;
|
|
38
84
|
/** Thèmes existants à charger */
|
|
39
85
|
existingThemes?: ThemeMetadata[];
|
|
86
|
+
/** Callback après sauvegarde réussie */
|
|
87
|
+
onSaveSuccess?: (theme: ThemeMetadata) => void;
|
|
88
|
+
/** Callback après suppression */
|
|
89
|
+
onDeleteSuccess?: (themeId: string) => void;
|
|
40
90
|
/** Classe CSS personnalisée */
|
|
41
91
|
className?: string;
|
|
42
92
|
}
|
|
43
93
|
/**
|
|
44
94
|
* WakaThemeCreator
|
|
45
95
|
*
|
|
46
|
-
* Composant d'administration pour créer, prévisualiser et publier des thèmes TweakCN
|
|
96
|
+
* Composant d'administration pour créer, prévisualiser et publier des thèmes TweakCN.
|
|
47
97
|
*
|
|
48
98
|
* Features:
|
|
49
99
|
* - Création de thèmes avec CSS TweakCN
|
|
50
100
|
* - Prévisualisation en temps réel
|
|
51
101
|
* - Gestion des versions
|
|
52
|
-
* - Upload
|
|
102
|
+
* - Upload via API (POST)
|
|
103
|
+
* - Gestion des ressources (logos, backgrounds, custom)
|
|
53
104
|
* - Historique des modifications
|
|
54
105
|
* - Validation du CSS
|
|
55
106
|
*/
|
|
56
|
-
export declare function WakaThemeCreator({
|
|
107
|
+
export declare function WakaThemeCreator({ apiConfig, existingThemes, onSaveSuccess, onDeleteSuccess, className, }: WakaThemeCreatorProps): import("react/jsx-runtime").JSX.Element;
|
|
57
108
|
export declare namespace WakaThemeCreator {
|
|
58
109
|
var displayName: string;
|
|
59
110
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface WakaTimePickerProps {
|
|
3
|
+
/** Valeur sélectionnée (format HH:mm ou HH:mm:ss) */
|
|
4
|
+
value?: string;
|
|
5
|
+
/** Callback lors du changement */
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
/** Placeholder */
|
|
8
|
+
placeholder?: string;
|
|
9
|
+
/** Format d'affichage */
|
|
10
|
+
format?: "12h" | "24h";
|
|
11
|
+
/** Afficher les secondes */
|
|
12
|
+
showSeconds?: boolean;
|
|
13
|
+
/** Intervalle des minutes (5, 10, 15, 30) */
|
|
14
|
+
minuteStep?: number;
|
|
15
|
+
/** Intervalle des secondes */
|
|
16
|
+
secondStep?: number;
|
|
17
|
+
/** Heure minimum */
|
|
18
|
+
minTime?: string;
|
|
19
|
+
/** Heure maximum */
|
|
20
|
+
maxTime?: string;
|
|
21
|
+
/** Désactivé */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
/** Erreur */
|
|
24
|
+
error?: boolean;
|
|
25
|
+
/** Taille */
|
|
26
|
+
size?: "sm" | "md" | "lg";
|
|
27
|
+
/** Classes CSS additionnelles */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** ID pour l'accessibilité */
|
|
30
|
+
id?: string;
|
|
31
|
+
/** Nom du champ */
|
|
32
|
+
name?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function WakaTimePicker({ value, onChange, placeholder, format, showSeconds, minuteStep, secondStep, minTime, maxTime, disabled, error, size, className, id, name, }: WakaTimePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export interface UseTimePickerOptions {
|
|
36
|
+
/** Valeur initiale */
|
|
37
|
+
initialValue?: string;
|
|
38
|
+
/** Format */
|
|
39
|
+
format?: "12h" | "24h";
|
|
40
|
+
/** Afficher les secondes */
|
|
41
|
+
showSeconds?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare function useTimePicker(options?: UseTimePickerOptions): {
|
|
44
|
+
value: string;
|
|
45
|
+
onChange: React.Dispatch<React.SetStateAction<string>>;
|
|
46
|
+
clear: () => void;
|
|
47
|
+
setNow: () => void;
|
|
48
|
+
format: "12h" | "24h";
|
|
49
|
+
showSeconds: boolean;
|
|
50
|
+
};
|
|
51
|
+
export default WakaTimePicker;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export type TimelineItemStatus = "completed" | "current" | "pending" | "error";
|
|
3
|
+
export interface TimelineItem {
|
|
4
|
+
/** Identifiant unique */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Titre de l'élément */
|
|
7
|
+
title: string;
|
|
8
|
+
/** Description */
|
|
9
|
+
description?: string;
|
|
10
|
+
/** Date/heure */
|
|
11
|
+
date?: Date | string;
|
|
12
|
+
/** Statut */
|
|
13
|
+
status?: TimelineItemStatus;
|
|
14
|
+
/** Icône personnalisée */
|
|
15
|
+
icon?: React.ReactNode;
|
|
16
|
+
/** Couleur personnalisée */
|
|
17
|
+
color?: string;
|
|
18
|
+
/** Contenu supplémentaire (collapsible) */
|
|
19
|
+
content?: React.ReactNode;
|
|
20
|
+
/** Données additionnelles */
|
|
21
|
+
data?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
export interface WakaTimelineProps {
|
|
24
|
+
/** Éléments de la timeline */
|
|
25
|
+
items: TimelineItem[];
|
|
26
|
+
/** Orientation */
|
|
27
|
+
orientation?: "vertical" | "horizontal";
|
|
28
|
+
/** Position de la ligne (vertical seulement) */
|
|
29
|
+
linePosition?: "left" | "center" | "right";
|
|
30
|
+
/** Taille */
|
|
31
|
+
size?: "sm" | "md" | "lg";
|
|
32
|
+
/** Afficher les dates */
|
|
33
|
+
showDates?: boolean;
|
|
34
|
+
/** Format de date */
|
|
35
|
+
dateFormat?: Intl.DateTimeFormatOptions;
|
|
36
|
+
/** Éléments collapsibles */
|
|
37
|
+
collapsible?: boolean;
|
|
38
|
+
/** Alterner les côtés (linePosition=center) */
|
|
39
|
+
alternate?: boolean;
|
|
40
|
+
/** Callback lors du clic sur un élément */
|
|
41
|
+
onItemClick?: (item: TimelineItem) => void;
|
|
42
|
+
/** Classes CSS additionnelles */
|
|
43
|
+
className?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function WakaTimeline({ items, orientation, linePosition, size, showDates, dateFormat, collapsible, alternate, onItemClick, className, }: WakaTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export default WakaTimeline;
|