@wakastellar/ui 0.1.3 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/README.md +403 -199
  2. package/dist/blocks/activity-timeline/index.d.ts +73 -0
  3. package/dist/blocks/calendar-view/index.d.ts +56 -0
  4. package/dist/blocks/chat/index.d.ts +87 -0
  5. package/dist/blocks/dashboard/index.d.ts +92 -0
  6. package/dist/blocks/empty-states/index.d.ts +44 -0
  7. package/dist/blocks/error-pages/index.d.ts +52 -0
  8. package/dist/blocks/faq/index.d.ts +54 -0
  9. package/dist/blocks/file-manager/index.d.ts +81 -0
  10. package/dist/blocks/header/index.d.ts +86 -0
  11. package/dist/blocks/i18n-editor/index.d.ts +63 -0
  12. package/dist/blocks/kanban-board/index.d.ts +77 -0
  13. package/dist/blocks/landing/index.d.ts +101 -0
  14. package/dist/blocks/login/index.d.ts +12 -1
  15. package/dist/blocks/login/types.d.ts +46 -7
  16. package/dist/blocks/pricing/index.d.ts +60 -0
  17. package/dist/blocks/profile/index.d.ts +98 -0
  18. package/dist/blocks/settings/index.d.ts +62 -0
  19. package/dist/blocks/sidebar/index.d.ts +151 -0
  20. package/dist/blocks/theme-creator-block/index.d.ts +86 -0
  21. package/dist/blocks/user-management/index.d.ts +95 -0
  22. package/dist/blocks/wizard/index.d.ts +88 -0
  23. package/dist/charts.d.ts +17 -0
  24. package/dist/components/DataTable/DataTableBody.d.ts +70 -0
  25. package/dist/components/DataTable/DataTableCell.d.ts +38 -0
  26. package/dist/components/DataTable/DataTableConflictResolver.d.ts +45 -0
  27. package/dist/components/DataTable/DataTableFilterBuilder.d.ts +14 -0
  28. package/dist/components/DataTable/DataTableHeader.d.ts +50 -0
  29. package/dist/components/DataTable/DataTableSyncStatus.d.ts +31 -0
  30. package/dist/components/DataTable/formatters/index.d.ts +127 -0
  31. package/dist/components/DataTable/hooks/useDataTableAdvancedFilters.d.ts +18 -0
  32. package/dist/components/DataTable/hooks/useDataTableColumnTemplates.d.ts +28 -0
  33. package/dist/components/DataTable/hooks/useDataTableExport.d.ts +1 -1
  34. package/dist/components/DataTable/hooks/useDataTableOffline.d.ts +80 -0
  35. package/dist/components/DataTable/services/IndexedDBService.d.ts +117 -0
  36. package/dist/components/DataTable/templates/index.d.ts +104 -0
  37. package/dist/components/DataTable/workers/exportWorker.d.ts +29 -0
  38. package/dist/components/error-boundary/ErrorBoundary.d.ts +102 -0
  39. package/dist/components/error-boundary/index.d.ts +2 -0
  40. package/dist/components/waka-autocomplete/index.d.ts +59 -0
  41. package/dist/components/waka-barcode/index.d.ts +27 -0
  42. package/dist/components/waka-breadcrumb/index.d.ts +43 -0
  43. package/dist/components/waka-charts/WakaAreaChart.d.ts +12 -0
  44. package/dist/components/waka-charts/WakaBarChart.d.ts +12 -0
  45. package/dist/components/waka-charts/WakaChart.d.ts +17 -0
  46. package/dist/components/waka-charts/WakaLineChart.d.ts +12 -0
  47. package/dist/components/waka-charts/WakaMiniChart.d.ts +13 -0
  48. package/dist/components/waka-charts/WakaPieChart.d.ts +12 -0
  49. package/dist/components/waka-charts/WakaSparkline.d.ts +13 -0
  50. package/dist/components/waka-charts/dataTableHelpers.d.ts +34 -0
  51. package/dist/components/waka-charts/hooks/useChartTheme.d.ts +23 -0
  52. package/dist/components/waka-charts/hooks/useRechartsLoader.d.ts +161 -0
  53. package/dist/components/waka-charts/index.d.ts +57 -0
  54. package/dist/components/waka-charts/types.d.ts +298 -0
  55. package/dist/components/waka-color-picker/index.d.ts +40 -0
  56. package/dist/components/waka-combobox/index.d.ts +81 -0
  57. package/dist/components/waka-date-range-picker/index.d.ts +68 -0
  58. package/dist/components/waka-drawer/index.d.ts +59 -0
  59. package/dist/components/waka-file-upload/index.d.ts +49 -0
  60. package/dist/components/waka-image/index.d.ts +59 -0
  61. package/dist/components/waka-kanban/index.d.ts +68 -0
  62. package/dist/components/waka-modal/index.d.ts +82 -0
  63. package/dist/components/waka-number-input/index.d.ts +60 -0
  64. package/dist/components/waka-pagination/index.d.ts +67 -0
  65. package/dist/components/waka-qrcode/index.d.ts +32 -0
  66. package/dist/components/waka-rich-text-editor/index.d.ts +36 -0
  67. package/dist/components/waka-segmented-control/index.d.ts +42 -0
  68. package/dist/components/waka-stat/index.d.ts +57 -0
  69. package/dist/components/waka-stepper/index.d.ts +76 -0
  70. package/dist/components/waka-time-picker/index.d.ts +51 -0
  71. package/dist/components/waka-timeline/index.d.ts +46 -0
  72. package/dist/components/waka-tree/index.d.ts +67 -0
  73. package/dist/components/waka-video/index.d.ts +66 -0
  74. package/dist/components/waka-virtual-list/index.d.ts +54 -0
  75. package/dist/export.d.ts +28 -0
  76. package/dist/index.cjs.js +25 -23
  77. package/dist/index.es.js +5665 -5527
  78. package/dist/rich-text.d.ts +21 -0
  79. package/dist/ui.css +1 -1
  80. package/dist/utils/error-handling.d.ts +190 -0
  81. package/package.json +5 -2
@@ -0,0 +1,63 @@
1
+ export interface TranslationValue {
2
+ value: string;
3
+ updatedAt?: Date;
4
+ comment?: string;
5
+ }
6
+ export interface TranslationEntry {
7
+ key: string;
8
+ translations: Record<string, TranslationValue>;
9
+ }
10
+ export interface LanguageConfig {
11
+ code: string;
12
+ label: string;
13
+ flag?: string;
14
+ isSource?: boolean;
15
+ }
16
+ export interface I18nEditorConfig {
17
+ /** Langues disponibles */
18
+ languages: LanguageConfig[];
19
+ /** Code de la langue source */
20
+ sourceLanguage: string;
21
+ /** Séparateur pour les clés (ex: ".") */
22
+ keyPathSeparator?: string;
23
+ /** Activer l'auto-save */
24
+ autoSave?: boolean;
25
+ /** Délai de debounce pour l'auto-save en ms */
26
+ saveDebounceMs?: number;
27
+ /** Patterns de placeholders à valider */
28
+ placeholderPatterns?: string[];
29
+ /** Ratio max de longueur */
30
+ maxLengthRatio?: number;
31
+ }
32
+ export interface I18nEditorProps {
33
+ /** Configuration de l'éditeur */
34
+ config: I18nEditorConfig;
35
+ /** Données de traduction initiales */
36
+ translations: TranslationEntry[];
37
+ /** Callback quand une traduction change */
38
+ onChange?: (key: string, language: string, value: string) => void;
39
+ /** Callback pour sauvegarder */
40
+ onSave?: (translations: TranslationEntry[]) => Promise<void>;
41
+ /** Callback pour ajouter une clé */
42
+ onAddKey?: (key: string) => Promise<void>;
43
+ /** Callback pour supprimer une clé */
44
+ onDeleteKey?: (key: string) => Promise<void>;
45
+ /** Callback pour ajouter une langue */
46
+ onAddLanguage?: (language: LanguageConfig) => Promise<void>;
47
+ /** Callback pour exporter */
48
+ onExport?: (language?: string) => Promise<void>;
49
+ /** Callback pour importer */
50
+ onImport?: (file: File, language: string, strategy: "overwrite" | "merge") => Promise<void>;
51
+ /** État de chargement */
52
+ isLoading?: boolean;
53
+ /** État de sauvegarde */
54
+ isSaving?: boolean;
55
+ /** Classe CSS */
56
+ className?: string;
57
+ /** Titre */
58
+ title?: string;
59
+ /** Description */
60
+ description?: string;
61
+ }
62
+ export declare function WakaI18nEditor({ config, translations: initialTranslations, onChange, onSave, onAddKey, onDeleteKey, onAddLanguage, onExport, onImport, isLoading, isSaving, className, title, description, }: I18nEditorProps): import("react/jsx-runtime").JSX.Element;
63
+ export default WakaI18nEditor;
@@ -0,0 +1,77 @@
1
+ export type KanbanCardPriority = "low" | "medium" | "high" | "urgent";
2
+ export interface KanbanCardLabel {
3
+ id: string;
4
+ name: string;
5
+ color: string;
6
+ }
7
+ export interface KanbanCardAssignee {
8
+ id: string;
9
+ name: string;
10
+ avatar?: string;
11
+ }
12
+ export interface KanbanCard {
13
+ id: string;
14
+ title: string;
15
+ description?: string;
16
+ priority?: KanbanCardPriority;
17
+ labels?: KanbanCardLabel[];
18
+ assignees?: KanbanCardAssignee[];
19
+ dueDate?: Date | string;
20
+ createdAt?: Date | string;
21
+ metadata?: Record<string, unknown>;
22
+ }
23
+ export interface KanbanColumn {
24
+ id: string;
25
+ title: string;
26
+ cards: KanbanCard[];
27
+ color?: string;
28
+ limit?: number;
29
+ }
30
+ export interface WakaKanbanBoardProps {
31
+ /** Colonnes du tableau */
32
+ columns: KanbanColumn[];
33
+ /** Callback lors du changement des colonnes */
34
+ onColumnsChange?: (columns: KanbanColumn[]) => void;
35
+ /** Callback lors du clic sur une carte */
36
+ onCardClick?: (card: KanbanCard, columnId: string) => void;
37
+ /** Callback lors de l'ajout d'une carte */
38
+ onCardAdd?: (columnId: string, card: Partial<KanbanCard>) => void;
39
+ /** Callback lors de la modification d'une carte */
40
+ onCardEdit?: (cardId: string, columnId: string, data: Partial<KanbanCard>) => void;
41
+ /** Callback lors de la suppression d'une carte */
42
+ onCardDelete?: (cardId: string, columnId: string) => void;
43
+ /** Callback lors du déplacement d'une carte */
44
+ onCardMove?: (cardId: string, fromColumnId: string, toColumnId: string, index: number) => void;
45
+ /** Callback lors de l'ajout d'une colonne */
46
+ onColumnAdd?: (column: Partial<KanbanColumn>) => void;
47
+ /** Callback lors de la modification d'une colonne */
48
+ onColumnEdit?: (columnId: string, data: Partial<KanbanColumn>) => void;
49
+ /** Callback lors de la suppression d'une colonne */
50
+ onColumnDelete?: (columnId: string) => void;
51
+ /** Afficher le bouton d'ajout de carte */
52
+ showAddCard?: boolean;
53
+ /** Afficher le bouton d'ajout de colonne */
54
+ showAddColumn?: boolean;
55
+ /** Afficher le nombre de cartes */
56
+ showCardCount?: boolean;
57
+ /** Afficher les assignés */
58
+ showAssignees?: boolean;
59
+ /** Afficher les labels */
60
+ showLabels?: boolean;
61
+ /** Afficher la priorité */
62
+ showPriority?: boolean;
63
+ /** Afficher la date d'échéance */
64
+ showDueDate?: boolean;
65
+ /** Autoriser le drag & drop */
66
+ draggable?: boolean;
67
+ /** Labels disponibles */
68
+ availableLabels?: KanbanCardLabel[];
69
+ /** Assignés disponibles */
70
+ availableAssignees?: KanbanCardAssignee[];
71
+ /** Classes CSS additionnelles */
72
+ className?: string;
73
+ }
74
+ export declare function WakaKanbanBoard({ columns: externalColumns, onColumnsChange, onCardClick, onCardAdd, onCardEdit, onCardDelete, onCardMove, onColumnAdd, onColumnEdit, onColumnDelete, showAddCard, showAddColumn, showCardCount, showAssignees, showLabels, showPriority, showDueDate, draggable, availableLabels, availableAssignees, className, }: WakaKanbanBoardProps): import("react/jsx-runtime").JSX.Element;
75
+ export declare const defaultKanbanColumns: KanbanColumn[];
76
+ export declare const defaultKanbanLabels: KanbanCardLabel[];
77
+ export default WakaKanbanBoard;
@@ -0,0 +1,101 @@
1
+ import * as React from "react";
2
+ export interface LandingNavItem {
3
+ label: string;
4
+ href: string;
5
+ isActive?: boolean;
6
+ }
7
+ export interface LandingHeroProps {
8
+ /** Badge texte */
9
+ badge?: string;
10
+ /** Titre principal */
11
+ title: string;
12
+ /** Titre mis en évidence */
13
+ highlightedTitle?: string;
14
+ /** Description */
15
+ description: string;
16
+ /** Texte du bouton principal */
17
+ primaryButtonText?: string;
18
+ /** Action du bouton principal */
19
+ primaryButtonAction?: () => void;
20
+ /** Lien du bouton principal */
21
+ primaryButtonHref?: string;
22
+ /** Texte du bouton secondaire */
23
+ secondaryButtonText?: string;
24
+ /** Action du bouton secondaire */
25
+ secondaryButtonAction?: () => void;
26
+ /** Lien du bouton secondaire */
27
+ secondaryButtonHref?: string;
28
+ /** Image/illustration */
29
+ image?: React.ReactNode;
30
+ /** Statistiques */
31
+ stats?: {
32
+ value: string;
33
+ label: string;
34
+ }[];
35
+ }
36
+ export interface LandingFeature {
37
+ id: string;
38
+ icon: React.ReactNode;
39
+ title: string;
40
+ description: string;
41
+ }
42
+ export interface LandingTestimonial {
43
+ id: string;
44
+ content: string;
45
+ author: string;
46
+ role: string;
47
+ company?: string;
48
+ avatar?: string;
49
+ rating?: number;
50
+ }
51
+ export interface LandingCTA {
52
+ title: string;
53
+ description?: string;
54
+ buttonText: string;
55
+ buttonAction?: () => void;
56
+ buttonHref?: string;
57
+ secondaryButtonText?: string;
58
+ secondaryButtonAction?: () => void;
59
+ variant?: "default" | "gradient" | "dark";
60
+ }
61
+ export interface WakaLandingProps {
62
+ /** Logo */
63
+ logo?: React.ReactNode;
64
+ /** Nom de la marque */
65
+ brandName?: string;
66
+ /** Items de navigation */
67
+ navItems?: LandingNavItem[];
68
+ /** Afficher le bouton de connexion */
69
+ showLoginButton?: boolean;
70
+ /** Texte du bouton de connexion */
71
+ loginButtonText?: string;
72
+ /** Action du bouton de connexion */
73
+ onLogin?: () => void;
74
+ /** URL de connexion */
75
+ loginHref?: string;
76
+ /** Configuration du Hero */
77
+ hero?: LandingHeroProps;
78
+ /** Features */
79
+ features?: LandingFeature[];
80
+ /** Titre de la section features */
81
+ featuresTitle?: string;
82
+ /** Description de la section features */
83
+ featuresDescription?: string;
84
+ /** Témoignages */
85
+ testimonials?: LandingTestimonial[];
86
+ /** Titre de la section témoignages */
87
+ testimonialsTitle?: string;
88
+ /** CTA */
89
+ cta?: LandingCTA;
90
+ /** Footer content */
91
+ footer?: React.ReactNode;
92
+ /** Classes CSS additionnelles */
93
+ className?: string;
94
+ }
95
+ export declare function WakaLanding({ logo, brandName, navItems, showLoginButton, loginButtonText, onLogin, loginHref, hero, features, featuresTitle, featuresDescription, testimonials, testimonialsTitle, cta, footer, className, }: WakaLandingProps): import("react/jsx-runtime").JSX.Element;
96
+ export declare const defaultLandingNavItems: LandingNavItem[];
97
+ export declare const defaultLandingFeatures: LandingFeature[];
98
+ export declare const defaultLandingTestimonials: LandingTestimonial[];
99
+ export declare const defaultLandingHero: LandingHeroProps;
100
+ export declare const defaultLandingCTA: LandingCTA;
101
+ export default WakaLanding;
@@ -1,7 +1,18 @@
1
1
  import { LoginConfig } from './types';
2
2
  export type { LoginConfig, LoginColorConfig, LoginThemeConfig, LoginAssetsConfig, LoginSignupOptions } from './types';
3
3
  export interface LoginProps {
4
- /** Configuration JSON complète du composant */
4
+ /**
5
+ * Configuration JSON complète du composant Login
6
+ *
7
+ * Doit correspondre exactement à la structure LoginConfig avec :
8
+ * - color_json : couleurs personnalisées (primary, secondary, accent)
9
+ * - theme_json : configuration du thème (name, dark_mode)
10
+ * - assets : logos et images selon le thème
11
+ * - waka_powered : afficher le badge "Powered by Waka"
12
+ * - lang_code : code de langue (ex: "fr_FR")
13
+ * - signup_options : options SSO, MFA, allow_login
14
+ * - oem_resolution_rules : règles de résolution OEM (optionnel)
15
+ */
5
16
  config?: LoginConfig;
6
17
  /** Callback lors de la soumission du formulaire */
7
18
  onSubmit?: (data: LoginFormData) => void;
@@ -68,20 +68,59 @@ export interface LoginSignupOptions {
68
68
  }
69
69
  /**
70
70
  * Configuration complète du composant Login
71
+ *
72
+ * Structure JSON attendue :
73
+ * {
74
+ * "color_json": {
75
+ * "primary": "#000000",
76
+ * "secondary": "#FFFFFF",
77
+ * "accent": "#FF9900"
78
+ * },
79
+ * "theme_json": {
80
+ * "name": "Default Theme",
81
+ * "dark_mode": true
82
+ * },
83
+ * "assets": {
84
+ * "theme_logo_dark": "https://...",
85
+ * "theme_logo_light": "https://...",
86
+ * "theme_image_light": "https://...",
87
+ * "theme_image_dark": "https://...",
88
+ * "sponsor_image_light": "https://...",
89
+ * "sponsor_image_dark": "https://..."
90
+ * },
91
+ * "waka_powered": true,
92
+ * "lang_code": "fr_FR",
93
+ * "signup_options": {
94
+ * "allow_login": true,
95
+ * "require_MFA": false,
96
+ * "MFA_email": true,
97
+ * "MFA_whatsapp": false,
98
+ * "MFA_RCS": false,
99
+ * "allow_sso_google": true,
100
+ * "allow_sso_microsoft": true,
101
+ * "allow_sso_apple": false,
102
+ * "allow_sso_linkedIn": false,
103
+ * "allow_sso_github": false,
104
+ * "allow_sso_facebook": false,
105
+ * "allow_sso_instagram": false,
106
+ * "allow_sso_france_connect": false
107
+ * },
108
+ * "oem_resolution_rules": ["..."]
109
+ * }
71
110
  */
72
111
  export interface LoginConfig {
73
- /** Configuration des couleurs */
112
+ /** Configuration des couleurs du thème */
74
113
  color_json: LoginColorConfig;
75
- /** Configuration du thème */
114
+ /** Configuration du thème (nom et mode dark/light) */
76
115
  theme_json: LoginThemeConfig;
77
- /** Assets (logos et images) */
116
+ /** Assets (logos et images selon le thème) */
78
117
  assets: LoginAssetsConfig;
79
- /** Afficher le badge "Waka Powered" */
118
+ /** Afficher le badge "Waka Powered" en bas du formulaire */
80
119
  waka_powered: boolean;
81
- /** Code de langue (ex: "fr_FR") */
120
+ /** Code de langue (ex: "fr_FR", "en_US") - utilisé pour l'i18n */
82
121
  lang_code: string;
83
- /** Options d'inscription et de connexion */
122
+ /** Options d'inscription et de connexion (SSO, MFA, etc.) */
84
123
  signup_options: LoginSignupOptions;
85
- /** Règles de résolution OEM (optionnel, pour documentation) */
124
+ /** Règles de résolution OEM (optionnel, utilisé pour la documentation/logique métier) */
86
125
  oem_resolution_rules?: string[];
87
126
  }
@@ -0,0 +1,60 @@
1
+ export interface PricingFeature {
2
+ name: string;
3
+ included: boolean | "partial" | "limited";
4
+ tooltip?: string;
5
+ value?: string;
6
+ }
7
+ export interface PricingPlan {
8
+ id: string;
9
+ name: string;
10
+ description?: string;
11
+ price: number | string;
12
+ priceYearly?: number | string;
13
+ currency?: string;
14
+ period?: string;
15
+ periodYearly?: string;
16
+ features: PricingFeature[];
17
+ buttonText?: string;
18
+ buttonVariant?: "default" | "outline" | "secondary";
19
+ onSelect?: () => void;
20
+ href?: string;
21
+ popular?: boolean;
22
+ badge?: string;
23
+ disabled?: boolean;
24
+ }
25
+ export interface PricingFAQ {
26
+ question: string;
27
+ answer: string;
28
+ }
29
+ export interface WakaPricingProps {
30
+ /** Titre */
31
+ title?: string;
32
+ /** Description */
33
+ description?: string;
34
+ /** Plans de tarification */
35
+ plans: PricingPlan[];
36
+ /** Afficher le toggle mensuel/annuel */
37
+ showBillingToggle?: boolean;
38
+ /** Période de facturation */
39
+ billingPeriod?: "monthly" | "yearly";
40
+ /** Callback changement de période */
41
+ onBillingPeriodChange?: (period: "monthly" | "yearly") => void;
42
+ /** Réduction annuelle (ex: "20%") */
43
+ yearlyDiscount?: string;
44
+ /** FAQ */
45
+ faq?: PricingFAQ[];
46
+ /** Titre de la FAQ */
47
+ faqTitle?: string;
48
+ /** Layout */
49
+ layout?: "cards" | "table";
50
+ /** Nombre de colonnes */
51
+ columns?: 2 | 3 | 4;
52
+ /** Afficher la comparaison de features */
53
+ showComparison?: boolean;
54
+ /** Classes CSS additionnelles */
55
+ className?: string;
56
+ }
57
+ export declare function WakaPricing({ title, description, plans, showBillingToggle, billingPeriod: externalBillingPeriod, onBillingPeriodChange, yearlyDiscount, faq, faqTitle, layout, columns, showComparison, className, }: WakaPricingProps): import("react/jsx-runtime").JSX.Element;
58
+ export declare const defaultPricingPlans: PricingPlan[];
59
+ export declare const defaultPricingFAQ: PricingFAQ[];
60
+ export default WakaPricing;
@@ -0,0 +1,98 @@
1
+ import * as React from "react";
2
+ export interface ProfileSocialLink {
3
+ id: string;
4
+ type: "website" | "twitter" | "github" | "linkedin" | "other";
5
+ url: string;
6
+ label?: string;
7
+ }
8
+ export interface ProfileField {
9
+ id: string;
10
+ label: string;
11
+ value: string;
12
+ type?: "text" | "email" | "tel" | "url" | "textarea" | "date" | "select";
13
+ placeholder?: string;
14
+ options?: {
15
+ value: string;
16
+ label: string;
17
+ }[];
18
+ required?: boolean;
19
+ disabled?: boolean;
20
+ icon?: React.ReactNode;
21
+ }
22
+ export interface ProfileSection {
23
+ id: string;
24
+ title: string;
25
+ description?: string;
26
+ icon?: React.ReactNode;
27
+ fields: ProfileField[];
28
+ }
29
+ export interface ProfileData {
30
+ /** Nom d'affichage */
31
+ displayName: string;
32
+ /** Prénom */
33
+ firstName?: string;
34
+ /** Nom */
35
+ lastName?: string;
36
+ /** Email */
37
+ email: string;
38
+ /** Téléphone */
39
+ phone?: string;
40
+ /** Bio */
41
+ bio?: string;
42
+ /** Avatar URL */
43
+ avatarUrl?: string;
44
+ /** Rôle/Titre */
45
+ role?: string;
46
+ /** Département */
47
+ department?: string;
48
+ /** Entreprise */
49
+ company?: string;
50
+ /** Localisation */
51
+ location?: string;
52
+ /** Site web */
53
+ website?: string;
54
+ /** Date d'inscription */
55
+ joinedAt?: Date | string;
56
+ /** Liens sociaux */
57
+ socialLinks?: ProfileSocialLink[];
58
+ /** Champs personnalisés */
59
+ customFields?: Record<string, string>;
60
+ }
61
+ export interface WakaProfileProps {
62
+ /** Données du profil */
63
+ profile: ProfileData;
64
+ /** Mode édition */
65
+ editable?: boolean;
66
+ /** En mode édition actuellement */
67
+ isEditing?: boolean;
68
+ /** Callback pour activer/désactiver l'édition */
69
+ onEditToggle?: (editing: boolean) => void;
70
+ /** Callback lors d'un changement */
71
+ onChange?: (field: string, value: string) => void;
72
+ /** Callback de sauvegarde */
73
+ onSave?: (profile: ProfileData) => void | Promise<void>;
74
+ /** En cours de sauvegarde */
75
+ saving?: boolean;
76
+ /** Callback changement d'avatar */
77
+ onAvatarChange?: (file: File) => void | Promise<void>;
78
+ /** Sections personnalisées */
79
+ customSections?: ProfileSection[];
80
+ /** Afficher les liens sociaux */
81
+ showSocialLinks?: boolean;
82
+ /** Afficher les statistiques */
83
+ showStats?: boolean;
84
+ /** Statistiques */
85
+ stats?: {
86
+ label: string;
87
+ value: string | number;
88
+ }[];
89
+ /** Layout */
90
+ layout?: "card" | "page" | "compact";
91
+ /** Tabs pour page layout */
92
+ useTabs?: boolean;
93
+ /** Classes CSS additionnelles */
94
+ className?: string;
95
+ }
96
+ export declare function WakaProfile({ profile, editable, isEditing: externalIsEditing, onEditToggle, onChange, onSave, saving, onAvatarChange, customSections, showSocialLinks, showStats, stats, layout, useTabs, className, }: WakaProfileProps): import("react/jsx-runtime").JSX.Element;
97
+ export declare const defaultProfileData: ProfileData;
98
+ export default WakaProfile;
@@ -0,0 +1,62 @@
1
+ import * as React from "react";
2
+ export interface SettingsSectionConfig {
3
+ id: string;
4
+ title: string;
5
+ description?: string;
6
+ icon?: React.ReactNode;
7
+ fields: SettingsFieldConfig[];
8
+ }
9
+ export interface SettingsFieldConfig {
10
+ id: string;
11
+ label: string;
12
+ description?: string;
13
+ type: "text" | "email" | "password" | "textarea" | "switch" | "select" | "custom";
14
+ value?: string | boolean;
15
+ placeholder?: string;
16
+ options?: {
17
+ value: string;
18
+ label: string;
19
+ }[];
20
+ disabled?: boolean;
21
+ required?: boolean;
22
+ customComponent?: React.ReactNode;
23
+ }
24
+ export interface SettingsTabConfig {
25
+ id: string;
26
+ label: string;
27
+ icon?: React.ReactNode;
28
+ sections: SettingsSectionConfig[];
29
+ }
30
+ export interface WakaSettingsProps {
31
+ /** Titre de la page */
32
+ title?: string;
33
+ /** Description */
34
+ description?: string;
35
+ /** Tabs de paramètres */
36
+ tabs?: SettingsTabConfig[];
37
+ /** Sections sans tabs */
38
+ sections?: SettingsSectionConfig[];
39
+ /** Utiliser les tabs */
40
+ useTabs?: boolean;
41
+ /** Tab actif par défaut */
42
+ defaultTab?: string;
43
+ /** Valeurs des champs */
44
+ values?: Record<string, string | boolean>;
45
+ /** Callback lors d'un changement */
46
+ onChange?: (fieldId: string, value: string | boolean) => void;
47
+ /** Callback de sauvegarde */
48
+ onSave?: (values: Record<string, string | boolean>) => void | Promise<void>;
49
+ /** En cours de sauvegarde */
50
+ saving?: boolean;
51
+ /** Afficher le bouton sauvegarder */
52
+ showSaveButton?: boolean;
53
+ /** Afficher le bouton supprimer le compte */
54
+ showDeleteAccount?: boolean;
55
+ /** Callback suppression compte */
56
+ onDeleteAccount?: () => void;
57
+ /** Classes CSS additionnelles */
58
+ className?: string;
59
+ }
60
+ export declare function WakaSettings({ title, description, tabs, sections, useTabs, defaultTab, values, onChange, onSave, saving, showSaveButton, showDeleteAccount, onDeleteAccount, className, }: WakaSettingsProps): import("react/jsx-runtime").JSX.Element;
61
+ export declare const defaultSettingsTabs: SettingsTabConfig[];
62
+ export default WakaSettings;