@wakastellar/ui 0.1.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/footer/index.d.ts +19 -0
- package/dist/blocks/headtab/index.d.ts +27 -0
- package/dist/blocks/index.d.ts +5 -0
- package/dist/blocks/language-selector/index.d.ts +6 -0
- package/dist/blocks/layout/index.d.ts +28 -0
- package/dist/blocks/login/index.d.ts +13 -0
- package/dist/components/DataTable/DataTable.d.ts +17 -0
- package/dist/components/DataTable/DataTableAdvanced.d.ts +27 -0
- package/dist/components/DataTable/DataTableColumnResizer.d.ts +8 -0
- package/dist/components/DataTable/DataTableContextMenu.d.ts +47 -0
- package/dist/components/DataTable/DataTableEditCell.d.ts +29 -0
- package/dist/components/DataTable/DataTableFilters.d.ts +14 -0
- package/dist/components/DataTable/DataTableGrouping.d.ts +25 -0
- package/dist/components/DataTable/DataTablePagination.d.ts +8 -0
- package/dist/components/DataTable/DataTableSelection.d.ts +46 -0
- package/dist/components/DataTable/DataTableToolbar.d.ts +14 -0
- package/dist/components/DataTable/examples/EditExample.d.ts +2 -0
- package/dist/components/DataTable/hooks/useDataTable.d.ts +24 -0
- package/dist/components/DataTable/hooks/useDataTableAdvanced.d.ts +38 -0
- package/dist/components/DataTable/hooks/useDataTableEdit.d.ts +22 -0
- package/dist/components/DataTable/hooks/useDataTableExport.d.ts +15 -0
- package/dist/components/DataTable/hooks/useDataTableImport.d.ts +12 -0
- package/dist/components/DataTable/hooks/useDataTableTheme.d.ts +16 -0
- package/dist/components/DataTable/hooks/useDataTableVirtualization.d.ts +19 -0
- package/dist/components/DataTable/hooks/useTableLayout.d.ts +26 -0
- package/dist/components/DataTable/index.d.ts +37 -0
- package/dist/components/DataTable/types.d.ts +461 -0
- package/dist/components/DataTable/utils.d.ts +37 -0
- package/dist/components/accordion/index.d.ts +7 -0
- package/dist/components/alert/index.d.ts +8 -0
- package/dist/components/alert-dialog/index.d.ts +20 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/avatar/index.d.ts +6 -0
- package/dist/components/badge/index.d.ts +9 -0
- package/dist/components/button/index.d.ts +11 -0
- package/dist/components/calendar/index.d.ts +8 -0
- package/dist/components/card/index.d.ts +8 -0
- package/dist/components/checkbox/index.d.ts +4 -0
- package/dist/components/code/index.d.ts +29 -0
- package/dist/components/collapsible/index.d.ts +5 -0
- package/dist/components/command/index.d.ts +51 -0
- package/dist/components/context-menu/index.d.ts +27 -0
- package/dist/components/dialog/index.d.ts +19 -0
- package/dist/components/dropdown-menu/index.d.ts +27 -0
- package/dist/components/form/index.d.ts +23 -0
- package/dist/components/hover-card/index.d.ts +6 -0
- package/dist/components/index.d.ts +52 -0
- package/dist/components/input/index.d.ts +5 -0
- package/dist/components/input-otp/index.d.ts +51 -0
- package/dist/components/label/index.d.ts +5 -0
- package/dist/components/language-selector/index.d.ts +40 -0
- package/dist/components/menubar/index.d.ts +28 -0
- package/dist/components/navigation-menu/index.d.ts +12 -0
- package/dist/components/popover/index.d.ts +6 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/radio-group/index.d.ts +5 -0
- package/dist/components/scroll-area/index.d.ts +5 -0
- package/dist/components/select/index.d.ts +13 -0
- package/dist/components/separator/index.d.ts +4 -0
- package/dist/components/sheet/index.d.ts +27 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/slider/index.d.ts +4 -0
- package/dist/components/switch/index.d.ts +4 -0
- package/dist/components/table/index.d.ts +10 -0
- package/dist/components/tabs/index.d.ts +7 -0
- package/dist/components/textarea/index.d.ts +5 -0
- package/dist/components/theme-selector/index.d.ts +8 -0
- package/dist/components/toast/index.d.ts +15 -0
- package/dist/components/toaster/index.d.ts +1 -0
- package/dist/components/toggle/index.d.ts +12 -0
- package/dist/components/tooltip/index.d.ts +7 -0
- package/dist/components/typography/index.d.ts +85 -0
- package/dist/components/waka-admincrumb/index.d.ts +41 -0
- package/dist/components/waka-carousel/index.d.ts +105 -0
- package/dist/components/waka-datetime-picker/index.d.ts +135 -0
- package/dist/components/waka-datetime-picker.form-integration/index.d.ts +69 -0
- package/dist/components/waka-notifications/index.d.ts +40 -0
- package/dist/components/waka-spinner/index.d.ts +46 -0
- package/dist/components/waka-theme-creator/index.d.ts +59 -0
- package/dist/components/waka-theme-manager/index.d.ts +62 -0
- package/dist/context/admincrumb-context.d.ts +34 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/language-context.d.ts +57 -0
- package/dist/context/theme-context.d.ts +39 -0
- package/dist/context/theme-provider.d.ts +74 -0
- package/dist/context/waka-provider.d.ts +50 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-toast.d.ts +44 -0
- package/dist/hooks/use-translation.d.ts +15 -0
- package/dist/hooks/useToast.d.ts +44 -0
- package/dist/index.cjs.js +70 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.es.js +16379 -0
- package/dist/lib/i18n.d.ts +4 -0
- package/dist/types/provider.d.ts +108 -0
- package/dist/ui.css +1 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/datetime-helpers.d.ts +137 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/theme-loader.d.ts +101 -0
- package/dist/utils/tweak.d.ts +18 -0
- package/package.json +118 -0
- package/src/styles/carousel.css +687 -0
- package/src/styles/code-highlight.css +232 -0
- package/src/styles/datepicker.css +420 -0
- package/src/styles/globals.css +84 -0
- package/src/styles/prism.css +261 -0
- package/src/styles/themes/forest.css +55 -0
- package/src/styles/themes/index.css +7 -0
- package/src/styles/themes/monochrome.css +55 -0
- package/src/styles/themes/perpetuity.css +55 -0
- package/src/styles/themes/sunset.css +55 -0
- package/src/styles/themes/twilight.css +55 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const textVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "link" | "muted" | "destructive" | "success" | "warning" | null | undefined;
|
|
5
|
+
size?: "base" | "sm" | "lg" | "xs" | "xl" | null | undefined;
|
|
6
|
+
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
7
|
+
align?: "center" | "left" | "right" | "justify" | null | undefined;
|
|
8
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
9
|
+
export interface TextProps extends React.HTMLAttributes<HTMLParagraphElement>, VariantProps<typeof textVariants> {
|
|
10
|
+
asChild?: boolean;
|
|
11
|
+
truncate?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Text - Composant de texte avec variantes de style
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Text variant="muted" size="sm">Texte secondaire</Text>
|
|
19
|
+
* <Text variant="destructive" weight="bold">Erreur importante</Text>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
23
|
+
declare const headingVariants: (props?: ({
|
|
24
|
+
level?: "h2" | "h3" | "h1" | "h4" | "h5" | "h6" | null | undefined;
|
|
25
|
+
variant?: "default" | "muted" | "gradient" | null | undefined;
|
|
26
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
27
|
+
export interface HeadingProps extends React.HTMLAttributes<HTMLHeadingElement>, VariantProps<typeof headingVariants> {
|
|
28
|
+
asChild?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Heading - Composant de titre avec niveaux sémantiques
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <Heading level="h1">Titre principal</Heading>
|
|
36
|
+
* <Heading level="h2" variant="gradient">Sous-titre avec gradient</Heading>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
40
|
+
declare const blockquoteVariants: (props?: ({
|
|
41
|
+
variant?: "default" | "destructive" | "success" | "warning" | "primary" | null | undefined;
|
|
42
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
43
|
+
export interface BlockquoteProps extends React.BlockquoteHTMLAttributes<HTMLQuoteElement>, VariantProps<typeof blockquoteVariants> {
|
|
44
|
+
cite?: string;
|
|
45
|
+
author?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Blockquote - Citation avec bordure et style
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```tsx
|
|
52
|
+
* <Blockquote author="Oscar Wilde">
|
|
53
|
+
* Soyez vous-même, tous les autres sont déjà pris.
|
|
54
|
+
* </Blockquote>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare const Blockquote: React.ForwardRefExoticComponent<BlockquoteProps & React.RefAttributes<HTMLQuoteElement>>;
|
|
58
|
+
declare const codeVariants: (props?: ({
|
|
59
|
+
variant?: "inline" | "block" | null | undefined;
|
|
60
|
+
size?: "base" | "sm" | "lg" | null | undefined;
|
|
61
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
62
|
+
export interface CodeProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof codeVariants> {
|
|
63
|
+
language?: string;
|
|
64
|
+
showLineNumbers?: boolean;
|
|
65
|
+
maxHeight?: string | number;
|
|
66
|
+
copyable?: boolean;
|
|
67
|
+
filename?: string;
|
|
68
|
+
}
|
|
69
|
+
declare const kbdVariants: (props?: ({
|
|
70
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
71
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
72
|
+
export interface KbdProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof kbdVariants> {
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Kbd - Affichage de touches clavier
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```tsx
|
|
79
|
+
* <Kbd>Ctrl</Kbd> + <Kbd>C</Kbd>
|
|
80
|
+
* <Kbd size="lg">⌘ Command</Kbd>
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare const Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLElement>>;
|
|
84
|
+
export { Text, Heading, Blockquote, Kbd };
|
|
85
|
+
export { textVariants, headingVariants, blockquoteVariants, kbdVariants };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export interface AdmincrumbItem {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
type: "partner" | "network" | "customer";
|
|
7
|
+
metadata?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export interface AdmincrumbLevel {
|
|
10
|
+
type: "partner" | "network" | "customer";
|
|
11
|
+
items: AdmincrumbItem[];
|
|
12
|
+
selected?: AdmincrumbItem;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
onSelect: (item: AdmincrumbItem) => void;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
emptyText?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const admincrumbVariants: (props?: ({
|
|
19
|
+
variant?: "default" | "inline" | "compact" | "minimal" | "pills" | null | undefined;
|
|
20
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
21
|
+
export interface WakaAdmincrumbProps extends VariantProps<typeof admincrumbVariants> {
|
|
22
|
+
levels: AdmincrumbLevel[];
|
|
23
|
+
separator?: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
onLevelChange?: (level: number, item: AdmincrumbItem) => void;
|
|
26
|
+
showIcons?: boolean;
|
|
27
|
+
showBadges?: boolean;
|
|
28
|
+
showHome?: boolean;
|
|
29
|
+
maxWidth?: string;
|
|
30
|
+
resetable?: boolean;
|
|
31
|
+
onReset?: () => void;
|
|
32
|
+
}
|
|
33
|
+
export declare const WakaAdmincrumb: React.ForwardRefExoticComponent<WakaAdmincrumbProps & React.RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export declare function useAdmincrumb(): {
|
|
35
|
+
partner: AdmincrumbItem | undefined;
|
|
36
|
+
network: AdmincrumbItem | undefined;
|
|
37
|
+
customer: AdmincrumbItem | undefined;
|
|
38
|
+
handleLevelChange: (level: number, item: AdmincrumbItem) => void;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CarouselImage {
|
|
3
|
+
src: string;
|
|
4
|
+
alt: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
caption?: string;
|
|
8
|
+
downloadUrl?: string;
|
|
9
|
+
shareUrl?: string;
|
|
10
|
+
metadata?: {
|
|
11
|
+
width?: number;
|
|
12
|
+
height?: number;
|
|
13
|
+
size?: string;
|
|
14
|
+
format?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type CarouselTransition = 'fade' | 'slide' | 'zoom' | 'flip';
|
|
18
|
+
export type CarouselLayout = 'default' | 'fullscreen' | 'compact' | 'gallery';
|
|
19
|
+
export type CarouselTheme = 'light' | 'dark' | 'auto';
|
|
20
|
+
export interface WakaCarouselProps {
|
|
21
|
+
images: CarouselImage[];
|
|
22
|
+
autoplay?: boolean;
|
|
23
|
+
autoplayInterval?: number;
|
|
24
|
+
showIndicators?: boolean;
|
|
25
|
+
showNavigation?: boolean;
|
|
26
|
+
showThumbnails?: boolean;
|
|
27
|
+
showFullscreen?: boolean;
|
|
28
|
+
showDownload?: boolean;
|
|
29
|
+
showShare?: boolean;
|
|
30
|
+
showCounter?: boolean;
|
|
31
|
+
showProgress?: boolean;
|
|
32
|
+
transition?: CarouselTransition;
|
|
33
|
+
layout?: CarouselLayout;
|
|
34
|
+
theme?: CarouselTheme;
|
|
35
|
+
aspectRatio?: '16/9' | '4/3' | '1/1' | '3/2' | 'auto';
|
|
36
|
+
maxHeight?: string | number;
|
|
37
|
+
className?: string;
|
|
38
|
+
imageClassName?: string;
|
|
39
|
+
indicatorClassName?: string;
|
|
40
|
+
navigationClassName?: string;
|
|
41
|
+
thumbnailClassName?: string;
|
|
42
|
+
overlayClassName?: string;
|
|
43
|
+
counterClassName?: string;
|
|
44
|
+
progressClassName?: string;
|
|
45
|
+
onImageChange?: (index: number, image: CarouselImage) => void;
|
|
46
|
+
onImageClick?: (image: CarouselImage, index: number) => void;
|
|
47
|
+
onFullscreenToggle?: (isFullscreen: boolean) => void;
|
|
48
|
+
onDownload?: (image: CarouselImage, index: number) => void;
|
|
49
|
+
onShare?: (image: CarouselImage, index: number) => void;
|
|
50
|
+
onPlayPause?: (isPlaying: boolean) => void;
|
|
51
|
+
onThumbnailClick?: (index: number) => void;
|
|
52
|
+
onIndicatorClick?: (index: number) => void;
|
|
53
|
+
onNavigationClick?: (direction: 'prev' | 'next') => void;
|
|
54
|
+
onKeyboardNavigation?: (key: string) => void;
|
|
55
|
+
onTouchStart?: (event: React.TouchEvent) => void;
|
|
56
|
+
onTouchEnd?: (event: React.TouchEvent) => void;
|
|
57
|
+
onSwipeLeft?: () => void;
|
|
58
|
+
onSwipeRight?: () => void;
|
|
59
|
+
onSwipeUp?: () => void;
|
|
60
|
+
onSwipeDown?: () => void;
|
|
61
|
+
onLoadStart?: (index: number) => void;
|
|
62
|
+
onLoadEnd?: (index: number) => void;
|
|
63
|
+
onError?: (index: number, error: Error) => void;
|
|
64
|
+
onReady?: () => void;
|
|
65
|
+
onDestroy?: () => void;
|
|
66
|
+
loop?: boolean;
|
|
67
|
+
pauseOnHover?: boolean;
|
|
68
|
+
pauseOnFocus?: boolean;
|
|
69
|
+
pauseOnTouch?: boolean;
|
|
70
|
+
keyboardNavigation?: boolean;
|
|
71
|
+
touchNavigation?: boolean;
|
|
72
|
+
swipeThreshold?: number;
|
|
73
|
+
animationDuration?: number;
|
|
74
|
+
preloadImages?: boolean;
|
|
75
|
+
lazyLoading?: boolean;
|
|
76
|
+
imageQuality?: 'low' | 'medium' | 'high' | 'auto';
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
errorImage?: string;
|
|
79
|
+
loadingSpinner?: React.ReactNode;
|
|
80
|
+
emptyState?: React.ReactNode;
|
|
81
|
+
customControls?: React.ReactNode;
|
|
82
|
+
customOverlay?: React.ReactNode;
|
|
83
|
+
customThumbnails?: React.ReactNode;
|
|
84
|
+
customIndicators?: React.ReactNode;
|
|
85
|
+
customNavigation?: React.ReactNode;
|
|
86
|
+
ariaLabel?: string;
|
|
87
|
+
ariaLabelledBy?: string;
|
|
88
|
+
ariaDescribedBy?: string;
|
|
89
|
+
role?: string;
|
|
90
|
+
virtualScrolling?: boolean;
|
|
91
|
+
maxVisibleThumbnails?: number;
|
|
92
|
+
thumbnailSize?: 'small' | 'medium' | 'large';
|
|
93
|
+
overlayOpacity?: number;
|
|
94
|
+
overlayGradient?: string;
|
|
95
|
+
navigationSize?: 'small' | 'medium' | 'large';
|
|
96
|
+
indicatorSize?: 'small' | 'medium' | 'large';
|
|
97
|
+
indicatorShape?: 'circle' | 'square' | 'diamond' | 'line';
|
|
98
|
+
thumbnailAspectRatio?: '1/1' | '4/3' | '16/9' | 'auto';
|
|
99
|
+
onMount?: () => void;
|
|
100
|
+
onUnmount?: () => void;
|
|
101
|
+
onBeforeChange?: (fromIndex: number, toIndex: number) => boolean;
|
|
102
|
+
onAfterChange?: (index: number) => void;
|
|
103
|
+
}
|
|
104
|
+
export declare const WakaCarousel: React.FC<WakaCarouselProps>;
|
|
105
|
+
export default WakaCarousel;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration des presets de dates rapides
|
|
4
|
+
*/
|
|
5
|
+
export interface DatePreset {
|
|
6
|
+
label: string;
|
|
7
|
+
value?: Date | (() => Date);
|
|
8
|
+
range?: {
|
|
9
|
+
from: Date;
|
|
10
|
+
to: Date;
|
|
11
|
+
} | (() => {
|
|
12
|
+
from: Date;
|
|
13
|
+
to: Date;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Configuration de validation
|
|
18
|
+
*/
|
|
19
|
+
export interface DateValidation {
|
|
20
|
+
/** Validation personnalisée */
|
|
21
|
+
validate?: (date: Date) => boolean | string;
|
|
22
|
+
/** Message d'erreur personnalisé */
|
|
23
|
+
message?: string;
|
|
24
|
+
/** Dates désactivées (patterns) */
|
|
25
|
+
disabledDates?: Date[];
|
|
26
|
+
/** Fonction pour désactiver des dates */
|
|
27
|
+
disabledDatesFn?: (date: Date) => boolean;
|
|
28
|
+
/** Jours de la semaine désactivés (0-6, 0 = Dimanche) */
|
|
29
|
+
disabledDaysOfWeek?: number[];
|
|
30
|
+
/** Dates highlightées */
|
|
31
|
+
highlightedDates?: Date[];
|
|
32
|
+
/** Fonction pour highlighter des dates */
|
|
33
|
+
highlightedDatesFn?: (date: Date) => boolean;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Range de dates
|
|
37
|
+
*/
|
|
38
|
+
export interface DateRange {
|
|
39
|
+
from: Date | undefined;
|
|
40
|
+
to: Date | undefined;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props du WakaDateTimePicker
|
|
44
|
+
*/
|
|
45
|
+
export interface WakaDateTimePickerProps {
|
|
46
|
+
/** Valeur actuelle (Date simple ou DateRange) */
|
|
47
|
+
value?: Date | DateRange | Date[] | null;
|
|
48
|
+
/** Callback de changement */
|
|
49
|
+
onChange?: (date: Date | DateRange | Date[] | null) => void;
|
|
50
|
+
/** Placeholder du champ */
|
|
51
|
+
placeholder?: string;
|
|
52
|
+
/** Désactiver le picker */
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
/** Classe CSS supplémentaire */
|
|
55
|
+
className?: string;
|
|
56
|
+
/** Variant du picker */
|
|
57
|
+
variant?: "date" | "time" | "datetime" | "range" | "multiple";
|
|
58
|
+
/** Format d'affichage personnalisé */
|
|
59
|
+
format?: string;
|
|
60
|
+
/** Date minimum */
|
|
61
|
+
minDate?: Date;
|
|
62
|
+
/** Date maximum */
|
|
63
|
+
maxDate?: Date;
|
|
64
|
+
/** Afficher les secondes */
|
|
65
|
+
showSeconds?: boolean;
|
|
66
|
+
/** Afficher le bouton clear */
|
|
67
|
+
showClear?: boolean;
|
|
68
|
+
/** Afficher les presets rapides */
|
|
69
|
+
showPresets?: boolean;
|
|
70
|
+
/** Presets personnalisés */
|
|
71
|
+
presets?: DatePreset[];
|
|
72
|
+
/** Locale (fr, en, es, etc.) */
|
|
73
|
+
locale?: string;
|
|
74
|
+
/** Format d'heure (12h ou 24h) */
|
|
75
|
+
timeFormat?: "12h" | "24h";
|
|
76
|
+
/** Taille du composant */
|
|
77
|
+
size?: "sm" | "md" | "lg";
|
|
78
|
+
/** Message d'erreur */
|
|
79
|
+
error?: string;
|
|
80
|
+
/** Label du champ */
|
|
81
|
+
label?: string;
|
|
82
|
+
/** Champ requis */
|
|
83
|
+
required?: boolean;
|
|
84
|
+
/** Mode inline (sans popover) */
|
|
85
|
+
inline?: boolean;
|
|
86
|
+
/** Nombre de mois à afficher */
|
|
87
|
+
monthsShown?: number;
|
|
88
|
+
/** Intervalle de temps (en minutes) */
|
|
89
|
+
timeIntervals?: number;
|
|
90
|
+
/** Validation */
|
|
91
|
+
validation?: DateValidation;
|
|
92
|
+
/** Afficher les numéros de semaine */
|
|
93
|
+
showWeekNumbers?: boolean;
|
|
94
|
+
/** Afficher le bouton "Aujourd'hui" */
|
|
95
|
+
showTodayButton?: boolean;
|
|
96
|
+
/** Afficher les infos de sélection */
|
|
97
|
+
showSelectionInfo?: boolean;
|
|
98
|
+
/** Autoriser la sélection de plage de temps */
|
|
99
|
+
allowTimeRange?: boolean;
|
|
100
|
+
/** Timezone (pour affichage avancé) */
|
|
101
|
+
timezone?: string;
|
|
102
|
+
/** Callback avant changement (peut annuler) */
|
|
103
|
+
onBeforeChange?: (date: Date | DateRange | Date[] | null) => boolean;
|
|
104
|
+
/** Callback après changement */
|
|
105
|
+
onAfterChange?: (date: Date | DateRange | Date[] | null) => void;
|
|
106
|
+
/** Render personnalisé pour une date */
|
|
107
|
+
renderDay?: (date: Date) => React.ReactNode;
|
|
108
|
+
/** Classe pour le container du popover */
|
|
109
|
+
popoverClassName?: string;
|
|
110
|
+
/** Désactiver les animations */
|
|
111
|
+
disableAnimations?: boolean;
|
|
112
|
+
/** Mode lecture seule */
|
|
113
|
+
readOnly?: boolean;
|
|
114
|
+
/** ID du champ (pour les tests) */
|
|
115
|
+
id?: string;
|
|
116
|
+
/** Name du champ (pour les formulaires) */
|
|
117
|
+
name?: string;
|
|
118
|
+
/** Auto-focus */
|
|
119
|
+
autoFocus?: boolean;
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* WakaDateTimePicker
|
|
123
|
+
*
|
|
124
|
+
* Composant datetime picker ultra-complet avec support de :
|
|
125
|
+
* - Date, time, datetime, range, multiple selection
|
|
126
|
+
* - Presets rapides
|
|
127
|
+
* - Validation avancée
|
|
128
|
+
* - I18n complet
|
|
129
|
+
* - Thème dynamique
|
|
130
|
+
* - Keyboard navigation
|
|
131
|
+
* - Accessibilité (ARIA)
|
|
132
|
+
* - Time zones
|
|
133
|
+
* - Custom renders
|
|
134
|
+
*/
|
|
135
|
+
export declare const WakaDateTimePicker: React.ForwardRefExoticComponent<WakaDateTimePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Control, FieldValues, Path } from 'react-hook-form';
|
|
2
|
+
import { WakaDateTimePickerProps, DateRange } from '../waka-datetime-picker';
|
|
3
|
+
/**
|
|
4
|
+
* Props pour le wrapper React Hook Form
|
|
5
|
+
*/
|
|
6
|
+
interface WakaDateTimePickerFormProps<T extends FieldValues> extends Omit<WakaDateTimePickerProps, "value" | "onChange"> {
|
|
7
|
+
name: Path<T>;
|
|
8
|
+
control: Control<T>;
|
|
9
|
+
defaultValue?: Date | DateRange | null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Wrapper pour React Hook Form
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { useForm } from "react-hook-form"
|
|
17
|
+
* import { WakaDateTimePickerForm } from "@wakastart/ui"
|
|
18
|
+
*
|
|
19
|
+
* function MyForm() {
|
|
20
|
+
* const { control, handleSubmit } = useForm()
|
|
21
|
+
*
|
|
22
|
+
* return (
|
|
23
|
+
* <form onSubmit={handleSubmit(onSubmit)}>
|
|
24
|
+
* <WakaDateTimePickerForm
|
|
25
|
+
* name="birthdate"
|
|
26
|
+
* control={control}
|
|
27
|
+
* label="Date de naissance"
|
|
28
|
+
* required
|
|
29
|
+
* />
|
|
30
|
+
* </form>
|
|
31
|
+
* )
|
|
32
|
+
* }
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function WakaDateTimePickerForm<T extends FieldValues>({ name, control, defaultValue, ...props }: WakaDateTimePickerFormProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
/**
|
|
37
|
+
* Exemple d'utilisation complète avec React Hook Form
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Exemple avec validation personnalisée
|
|
41
|
+
*/
|
|
42
|
+
/**
|
|
43
|
+
* Exemple avec plusieurs dates (congés)
|
|
44
|
+
*/
|
|
45
|
+
/**
|
|
46
|
+
* Exemple avec dépendances entre dates
|
|
47
|
+
*/
|
|
48
|
+
/**
|
|
49
|
+
* Hook personnalisé pour les formulaires de dates
|
|
50
|
+
*/
|
|
51
|
+
export declare function useDateForm<T extends FieldValues>(defaultValues?: Partial<T>): {
|
|
52
|
+
formatDateForSubmit: (date: Date | null) => string | null;
|
|
53
|
+
formatRangeForSubmit: (range: DateRange | null) => {
|
|
54
|
+
from: string;
|
|
55
|
+
to: string;
|
|
56
|
+
} | null;
|
|
57
|
+
parseDateFromServer: (dateString: string | null) => Date | null;
|
|
58
|
+
parseRangeFromServer: (rangeData: {
|
|
59
|
+
from: string;
|
|
60
|
+
to: string;
|
|
61
|
+
} | null) => {
|
|
62
|
+
from: Date;
|
|
63
|
+
to: Date;
|
|
64
|
+
} | null;
|
|
65
|
+
};
|
|
66
|
+
export {};
|
|
67
|
+
/**
|
|
68
|
+
* Exemple avec transformation des données
|
|
69
|
+
*/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface Notification {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
type: "info" | "success" | "warning" | "error";
|
|
7
|
+
read: boolean;
|
|
8
|
+
timestamp: Date;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
action?: {
|
|
11
|
+
label: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface WakaNotificationsProps {
|
|
16
|
+
notifications: Notification[];
|
|
17
|
+
onMarkAsRead?: (id: string) => void;
|
|
18
|
+
onMarkAllAsRead?: () => void;
|
|
19
|
+
onDelete?: (id: string) => void;
|
|
20
|
+
onDeleteAll?: () => void;
|
|
21
|
+
onSettingsClick?: () => void;
|
|
22
|
+
maxHeight?: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
iconClassName?: string;
|
|
25
|
+
badgeClassName?: string;
|
|
26
|
+
showBadge?: boolean;
|
|
27
|
+
showTabs?: boolean;
|
|
28
|
+
emptyMessage?: string;
|
|
29
|
+
emptyIcon?: React.ReactNode;
|
|
30
|
+
}
|
|
31
|
+
export declare const WakaNotifications: React.ForwardRefExoticComponent<WakaNotificationsProps & React.RefAttributes<HTMLButtonElement>>;
|
|
32
|
+
export declare function useNotifications(initialNotifications?: Notification[]): {
|
|
33
|
+
notifications: Notification[];
|
|
34
|
+
addNotification: (notification: Omit<Notification, "id" | "timestamp" | "read">) => void;
|
|
35
|
+
markAsRead: (id: string) => void;
|
|
36
|
+
markAllAsRead: () => void;
|
|
37
|
+
deleteNotification: (id: string) => void;
|
|
38
|
+
deleteAllNotifications: () => void;
|
|
39
|
+
unreadCount: number;
|
|
40
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Variantes du spinner spatial WakaSpinner
|
|
5
|
+
* Définit les différentes tailles disponibles pour l'animation
|
|
6
|
+
*/
|
|
7
|
+
declare const spinnerVariants: (props?: ({
|
|
8
|
+
size?: "sm" | "lg" | "md" | "xl" | null | undefined;
|
|
9
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
10
|
+
export interface WakaSpinnerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof spinnerVariants> {
|
|
11
|
+
/**
|
|
12
|
+
* Affiche les astéroïdes en arrière-plan
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
showAsteroids?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Vitesse de rotation de la fusée (en secondes)
|
|
18
|
+
* @default 2
|
|
19
|
+
*/
|
|
20
|
+
speed?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Couleur de la fusée (classe Tailwind ou couleur CSS)
|
|
23
|
+
* @default "text-primary"
|
|
24
|
+
*/
|
|
25
|
+
rocketColor?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Couleur des astéroïdes (classe Tailwind ou couleur CSS)
|
|
28
|
+
* @default "text-muted-foreground"
|
|
29
|
+
*/
|
|
30
|
+
asteroidColor?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* WakaSpinner - Composant de chargement avec animation spatiale
|
|
34
|
+
*
|
|
35
|
+
* Une fusée orbite autour d'un centre avec des astéroïdes flottants optionnels.
|
|
36
|
+
* Idéal pour les écrans de chargement avec une touche ludique.
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <WakaSpinner size="md" />
|
|
41
|
+
* <WakaSpinner size="lg" showAsteroids={true} speed={3} />
|
|
42
|
+
* <WakaSpinner rocketColor="text-blue-500" asteroidColor="text-gray-400" />
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const WakaSpinner: React.ForwardRefExoticComponent<WakaSpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export interface ThemeVersion {
|
|
2
|
+
version: string;
|
|
3
|
+
createdAt: Date;
|
|
4
|
+
createdBy?: string;
|
|
5
|
+
changelog?: string;
|
|
6
|
+
css: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ThemeMetadata {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
previewColor?: string;
|
|
13
|
+
author?: string;
|
|
14
|
+
versions: ThemeVersion[];
|
|
15
|
+
currentVersion: string;
|
|
16
|
+
}
|
|
17
|
+
export interface S3UploadConfig {
|
|
18
|
+
/** URL de base du bucket S3 */
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
/** Méthode HTTP pour l'upload (PUT ou POST) */
|
|
21
|
+
method?: "PUT" | "POST";
|
|
22
|
+
/** Headers personnalisés pour l'authentification */
|
|
23
|
+
headers?: Record<string, string>;
|
|
24
|
+
/** Préfixe des fichiers */
|
|
25
|
+
prefix?: string;
|
|
26
|
+
/** Extension des fichiers */
|
|
27
|
+
extension?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface WakaThemeCreatorProps {
|
|
30
|
+
/** Configuration S3 pour l'upload */
|
|
31
|
+
s3Config: S3UploadConfig;
|
|
32
|
+
/** Callback après sauvegarde réussie */
|
|
33
|
+
onSave?: (theme: ThemeMetadata) => void;
|
|
34
|
+
/** Callback après suppression */
|
|
35
|
+
onDelete?: (themeId: string) => void;
|
|
36
|
+
/** Callback pour charger un thème depuis S3 */
|
|
37
|
+
onLoadTheme?: (themeId: string) => Promise<ThemeMetadata | null>;
|
|
38
|
+
/** Thèmes existants à charger */
|
|
39
|
+
existingThemes?: ThemeMetadata[];
|
|
40
|
+
/** Classe CSS personnalisée */
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* WakaThemeCreator
|
|
45
|
+
*
|
|
46
|
+
* Composant d'administration pour créer, prévisualiser et publier des thèmes TweakCN sur S3.
|
|
47
|
+
*
|
|
48
|
+
* Features:
|
|
49
|
+
* - Création de thèmes avec CSS TweakCN
|
|
50
|
+
* - Prévisualisation en temps réel
|
|
51
|
+
* - Gestion des versions
|
|
52
|
+
* - Upload sur S3/MinIO
|
|
53
|
+
* - Historique des modifications
|
|
54
|
+
* - Validation du CSS
|
|
55
|
+
*/
|
|
56
|
+
export declare function WakaThemeCreator({ s3Config, onSave, onDelete, onLoadTheme, existingThemes, className, }: WakaThemeCreatorProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare namespace WakaThemeCreator {
|
|
58
|
+
var displayName: string;
|
|
59
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const themeManagerVariants: (props?: ({
|
|
4
|
+
size?: "base" | "sm" | "lg" | "full" | null | undefined;
|
|
5
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
6
|
+
export interface TweakCNTheme {
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
author?: string;
|
|
10
|
+
version?: string;
|
|
11
|
+
colors: {
|
|
12
|
+
background: string;
|
|
13
|
+
foreground: string;
|
|
14
|
+
card: string;
|
|
15
|
+
cardForeground: string;
|
|
16
|
+
popover: string;
|
|
17
|
+
popoverForeground: string;
|
|
18
|
+
primary: string;
|
|
19
|
+
primaryForeground: string;
|
|
20
|
+
secondary: string;
|
|
21
|
+
secondaryForeground: string;
|
|
22
|
+
muted: string;
|
|
23
|
+
mutedForeground: string;
|
|
24
|
+
accent: string;
|
|
25
|
+
accentForeground: string;
|
|
26
|
+
destructive: string;
|
|
27
|
+
destructiveForeground: string;
|
|
28
|
+
border: string;
|
|
29
|
+
input: string;
|
|
30
|
+
ring: string;
|
|
31
|
+
chart1?: string;
|
|
32
|
+
chart2?: string;
|
|
33
|
+
chart3?: string;
|
|
34
|
+
chart4?: string;
|
|
35
|
+
chart5?: string;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export interface WakaThemeManagerProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof themeManagerVariants> {
|
|
39
|
+
onThemeChange?: (theme: TweakCNTheme) => void;
|
|
40
|
+
onThemeLoad?: (theme: TweakCNTheme) => void;
|
|
41
|
+
onThemeSave?: (theme: TweakCNTheme) => void;
|
|
42
|
+
initialTheme?: TweakCNTheme;
|
|
43
|
+
showPreview?: boolean;
|
|
44
|
+
showExport?: boolean;
|
|
45
|
+
showImport?: boolean;
|
|
46
|
+
allowCustomColors?: boolean;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* WakaThemeManager - Gestionnaire complet de thèmes TweakCN
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```tsx
|
|
53
|
+
* <WakaThemeManager
|
|
54
|
+
* onThemeChange={(theme) => console.log('Theme changed:', theme)}
|
|
55
|
+
* showPreview={true}
|
|
56
|
+
* showExport={true}
|
|
57
|
+
* showImport={true}
|
|
58
|
+
* />
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
declare const WakaThemeManager: React.ForwardRefExoticComponent<WakaThemeManagerProps & React.RefAttributes<HTMLDivElement>>;
|
|
62
|
+
export { WakaThemeManager, themeManagerVariants };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface AdmincrumbItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: "partner" | "network" | "customer";
|
|
6
|
+
metadata?: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
export interface AdmincrumbSelection {
|
|
9
|
+
partner?: AdmincrumbItem;
|
|
10
|
+
network?: AdmincrumbItem;
|
|
11
|
+
customer?: AdmincrumbItem;
|
|
12
|
+
}
|
|
13
|
+
export interface AdmincrumbContextValue {
|
|
14
|
+
selection: AdmincrumbSelection;
|
|
15
|
+
setPartner: (item: AdmincrumbItem | undefined) => void;
|
|
16
|
+
setNetwork: (item: AdmincrumbItem | undefined) => void;
|
|
17
|
+
setCustomer: (item: AdmincrumbItem | undefined) => void;
|
|
18
|
+
reset: () => void;
|
|
19
|
+
isFiltered: boolean;
|
|
20
|
+
getFilterQuery: () => {
|
|
21
|
+
partnerId?: string;
|
|
22
|
+
networkId?: string;
|
|
23
|
+
customerId?: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface AdmincrumbProviderProps {
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
initialSelection?: AdmincrumbSelection;
|
|
29
|
+
onSelectionChange?: (selection: AdmincrumbSelection) => void;
|
|
30
|
+
persistKey?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function AdmincrumbProvider({ children, initialSelection, onSelectionChange, persistKey }: AdmincrumbProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare function useAdmincrumbContext(): AdmincrumbContextValue;
|
|
34
|
+
export declare function useAdmincrumbContextOptional(): AdmincrumbContextValue | undefined;
|