@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,16 @@
|
|
|
1
|
+
import { C as e, D as r, c as C, a as t, W as h, b as k, f as W, d as i, e as n, h as A, s as T, g as l, u as m } from "./types-Bjy1Hy76.js";
|
|
2
|
+
export {
|
|
3
|
+
e as CHART_SIZE_MAP,
|
|
4
|
+
r as DEFAULT_CHART_COLORS,
|
|
5
|
+
C as WakaAreaChart,
|
|
6
|
+
t as WakaBarChart,
|
|
7
|
+
h as WakaChart,
|
|
8
|
+
k as WakaLineChart,
|
|
9
|
+
W as WakaMiniChart,
|
|
10
|
+
i as WakaPieChart,
|
|
11
|
+
n as WakaSparkline,
|
|
12
|
+
A as createChartColumn,
|
|
13
|
+
T as sparklineTemplate,
|
|
14
|
+
l as useChartTheme,
|
|
15
|
+
m as useRechartsLoader
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { clsx as l } from "clsx";
|
|
2
|
+
import { twMerge as m } from "tailwind-merge";
|
|
3
|
+
import { cva as f } from "class-variance-authority";
|
|
4
|
+
function s(...t) {
|
|
5
|
+
return m(l(...t));
|
|
6
|
+
}
|
|
7
|
+
s.variants = function(t) {
|
|
8
|
+
const a = {
|
|
9
|
+
variants: t.variants ?? {},
|
|
10
|
+
defaultVariants: t.defaultVariants
|
|
11
|
+
}, r = f(t.base ?? "", a);
|
|
12
|
+
return (n) => {
|
|
13
|
+
const o = n ?? {}, { class: c, className: e, ...i } = o, u = r(i);
|
|
14
|
+
return s(u, c, e);
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
const w = (...t) => s(...t);
|
|
18
|
+
export {
|
|
19
|
+
w as c,
|
|
20
|
+
s as t
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const l=require("clsx"),v=require("tailwind-merge"),d=require("class-variance-authority");function s(...t){return v.twMerge(l.clsx(...t))}s.variants=function(t){const n={variants:t.variants??{},defaultVariants:t.defaultVariants},a=d.cva(t.base??"",n);return r=>{const e=r??{},{class:c,className:i,...u}=e,o=a(u);return s(o,c,i)}};const w=(...t)=>s(...t);exports.cn=w;exports.tweak=s;
|
|
@@ -63,6 +63,8 @@ interface DataTableBodyRowProps<TData extends Record<string, unknown>> {
|
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* Ligne individuelle du body
|
|
66
|
+
* Optimisé avec React.memo pour éviter les re-renders inutiles
|
|
66
67
|
*/
|
|
67
|
-
declare function
|
|
68
|
+
declare function DataTableBodyRowInner<TData extends Record<string, unknown>>({ row, rowExpansion, densityClasses, onRowClick, onRowDoubleClick, editingRowId, editableColumns, onUpdateField, onStartEdit, onSaveEdit, onCancelEdit, }: DataTableBodyRowProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
69
|
+
declare const DataTableBodyRow: typeof DataTableBodyRowInner;
|
|
68
70
|
export { DataTableBodyRow };
|
|
@@ -43,6 +43,8 @@ interface DataTableHeaderRowProps<TData> {
|
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
45
|
* Ligne d'en-tête individuelle
|
|
46
|
+
* Optimisé avec React.memo pour éviter les re-renders inutiles
|
|
46
47
|
*/
|
|
47
|
-
declare function
|
|
48
|
+
declare function DataTableHeaderRowInner<TData>({ headerGroup, densityClasses, enableColumnResize, columnResizeMode, table, }: DataTableHeaderRowProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
declare const DataTableHeaderRow: typeof DataTableHeaderRowInner;
|
|
48
50
|
export { DataTableHeaderRow };
|
|
@@ -57,3 +57,22 @@ export * from './waka-file-upload';
|
|
|
57
57
|
export * from './waka-autocomplete';
|
|
58
58
|
export * from './waka-rich-text-editor';
|
|
59
59
|
export * from './waka-charts';
|
|
60
|
+
export * from './waka-stepper';
|
|
61
|
+
export * from './waka-breadcrumb';
|
|
62
|
+
export * from './waka-modal';
|
|
63
|
+
export * from './waka-tree';
|
|
64
|
+
export * from './waka-pagination';
|
|
65
|
+
export * from './waka-time-picker';
|
|
66
|
+
export * from './waka-date-range-picker';
|
|
67
|
+
export * from './waka-combobox';
|
|
68
|
+
export * from './waka-drawer';
|
|
69
|
+
export * from './waka-number-input';
|
|
70
|
+
export * from './waka-image';
|
|
71
|
+
export * from './waka-qrcode';
|
|
72
|
+
export * from './waka-barcode';
|
|
73
|
+
export * from './waka-video';
|
|
74
|
+
export * from './waka-virtual-list';
|
|
75
|
+
export * from './waka-segmented-control';
|
|
76
|
+
export * from './waka-kanban';
|
|
77
|
+
export * from './waka-timeline';
|
|
78
|
+
export * from './waka-stat';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export interface Language {
|
|
2
2
|
code: string;
|
|
3
3
|
label: string;
|
|
4
|
+
shortLabel?: string;
|
|
4
5
|
flag?: string;
|
|
5
6
|
flagEmoji?: string;
|
|
6
7
|
}
|
|
@@ -25,6 +26,22 @@ export interface LanguageSelectorProps {
|
|
|
25
26
|
placeholder?: string;
|
|
26
27
|
/** Texte pour le screen reader */
|
|
27
28
|
ariaLabel?: string;
|
|
29
|
+
/** Titre pour le mode mobile fullscreen */
|
|
30
|
+
title?: string;
|
|
31
|
+
/** Label du bouton Continue pour le mode mobile */
|
|
32
|
+
continueLabel?: string;
|
|
33
|
+
/** Langues récemment utilisées (codes) */
|
|
34
|
+
recentLanguages?: string[];
|
|
35
|
+
/** Label pour la section "Récents" */
|
|
36
|
+
recentLabel?: string;
|
|
37
|
+
/** Label pour la section "Tous" */
|
|
38
|
+
allLabel?: string;
|
|
39
|
+
/** Placeholder de recherche */
|
|
40
|
+
searchPlaceholder?: string;
|
|
41
|
+
/** Breakpoint pour le mode mobile (en pixels) */
|
|
42
|
+
mobileBreakpoint?: number;
|
|
43
|
+
/** Désactiver le mode mobile fullscreen */
|
|
44
|
+
disableMobileFullscreen?: boolean;
|
|
28
45
|
}
|
|
29
46
|
/**
|
|
30
47
|
* LanguageSelector
|
|
@@ -34,7 +51,8 @@ export interface LanguageSelectorProps {
|
|
|
34
51
|
* Features:
|
|
35
52
|
* - Drapeaux emoji ou images
|
|
36
53
|
* - 3 variantes : default (select), compact (bouton), minimal (icon only)
|
|
54
|
+
* - Mode fullscreen automatique sur mobile
|
|
37
55
|
* - Support du chargement asynchrone
|
|
38
56
|
* - Intégration avec LanguageProvider pour S3
|
|
39
57
|
*/
|
|
40
|
-
export declare function LanguageSelector({ languages, value, onChange, showFlags, showLabels, variant, isLoading, className, placeholder, ariaLabel, }: LanguageSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
export declare function LanguageSelector({ languages, value, onChange, showFlags, showLabels, variant, isLoading, className, placeholder, ariaLabel, title, continueLabel, recentLanguages, recentLabel, allLabel, searchPlaceholder, mobileBreakpoint, disableMobileFullscreen, }: LanguageSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type BarcodeFormat = "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14";
|
|
2
|
+
export interface WakaBarcodeProps {
|
|
3
|
+
/** Valeur à encoder */
|
|
4
|
+
value: string;
|
|
5
|
+
/** Format du code-barres */
|
|
6
|
+
format?: BarcodeFormat;
|
|
7
|
+
/** Largeur en pixels */
|
|
8
|
+
width?: number;
|
|
9
|
+
/** Hauteur en pixels */
|
|
10
|
+
height?: number;
|
|
11
|
+
/** Afficher le texte sous le code */
|
|
12
|
+
displayValue?: boolean;
|
|
13
|
+
/** Couleur des barres */
|
|
14
|
+
lineColor?: string;
|
|
15
|
+
/** Couleur de fond */
|
|
16
|
+
background?: string;
|
|
17
|
+
/** Taille de la police */
|
|
18
|
+
fontSize?: number;
|
|
19
|
+
/** Marge en pixels */
|
|
20
|
+
margin?: number;
|
|
21
|
+
/** Afficher les actions */
|
|
22
|
+
showActions?: boolean;
|
|
23
|
+
/** Classes CSS additionnelles */
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function WakaBarcode({ value, format, width, height, displayValue, lineColor, background, fontSize, margin, showActions, className, }: WakaBarcodeProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export default WakaBarcode;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface BreadcrumbItem {
|
|
3
|
+
/** Libellé de l'élément */
|
|
4
|
+
label: string;
|
|
5
|
+
/** URL de destination (optionnel pour le dernier élément) */
|
|
6
|
+
href?: string;
|
|
7
|
+
/** Icône personnalisée */
|
|
8
|
+
icon?: React.ReactNode;
|
|
9
|
+
/** Désactiver le lien */
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Données additionnelles */
|
|
12
|
+
data?: Record<string, unknown>;
|
|
13
|
+
}
|
|
14
|
+
export interface WakaBreadcrumbProps {
|
|
15
|
+
/** Liste des éléments du fil d'Ariane */
|
|
16
|
+
items: BreadcrumbItem[];
|
|
17
|
+
/** Séparateur entre les éléments */
|
|
18
|
+
separator?: React.ReactNode;
|
|
19
|
+
/** Afficher l'icône Home pour le premier élément */
|
|
20
|
+
showHomeIcon?: boolean;
|
|
21
|
+
/** Nombre maximum d'éléments visibles (collapse les autres) */
|
|
22
|
+
maxItems?: number;
|
|
23
|
+
/** Fonction de rendu personnalisée pour les liens */
|
|
24
|
+
renderLink?: (item: BreadcrumbItem, children: React.ReactNode) => React.ReactNode;
|
|
25
|
+
/** Callback lors du clic sur un élément */
|
|
26
|
+
onItemClick?: (item: BreadcrumbItem, index: number) => void;
|
|
27
|
+
/** Taille */
|
|
28
|
+
size?: "sm" | "md" | "lg";
|
|
29
|
+
/** Variante visuelle */
|
|
30
|
+
variant?: "default" | "ghost" | "outline";
|
|
31
|
+
/** Classes CSS additionnelles */
|
|
32
|
+
className?: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function WakaBreadcrumb({ items, separator, showHomeIcon, maxItems, renderLink, onItemClick, size, variant, className, }: WakaBreadcrumbProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
/**
|
|
36
|
+
* Hook pour générer un fil d'Ariane à partir d'un chemin URL
|
|
37
|
+
*/
|
|
38
|
+
export declare function useBreadcrumbFromPath(pathname: string, options?: {
|
|
39
|
+
homeLabel?: string;
|
|
40
|
+
labelMap?: Record<string, string>;
|
|
41
|
+
excludePaths?: string[];
|
|
42
|
+
}): BreadcrumbItem[];
|
|
43
|
+
export default WakaBreadcrumb;
|
|
@@ -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,57 @@
|
|
|
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
|
+
}
|
|
39
|
+
export declare function WakaImage({ src, alt, width, height, placeholder, placeholderColor, lazy, zoomable, maxZoom, objectFit, objectPosition, rounded, showLoader, onLoad, onError, onZoomChange, className, containerClassName, }: WakaImageProps): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
export interface WakaImageGalleryProps {
|
|
41
|
+
/** Liste des images */
|
|
42
|
+
images: Array<{
|
|
43
|
+
src: string;
|
|
44
|
+
alt: string;
|
|
45
|
+
thumbnail?: string;
|
|
46
|
+
}>;
|
|
47
|
+
/** Nombre de colonnes */
|
|
48
|
+
columns?: number;
|
|
49
|
+
/** Gap entre les images */
|
|
50
|
+
gap?: number;
|
|
51
|
+
/** Aspect ratio des images */
|
|
52
|
+
aspectRatio?: string;
|
|
53
|
+
/** Classes CSS additionnelles */
|
|
54
|
+
className?: string;
|
|
55
|
+
}
|
|
56
|
+
export declare function WakaImageGallery({ images, columns, gap, aspectRatio, className, }: WakaImageGalleryProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
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;
|