@juv/codego-react-ui 3.1.7 → 3.2.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/index.d.cts CHANGED
@@ -6,6 +6,12 @@ type AuthView = "login" | "register" | "resetPassword";
6
6
  interface AuthField {
7
7
  name: string;
8
8
  label: string;
9
+ type?: "text" | "email" | "password" | "tel" | "url" | "numeric" | "integer";
10
+ placeholder?: string;
11
+ required?: boolean;
12
+ disabled?: boolean;
13
+ error?: string;
14
+ revealable?: boolean;
9
15
  render?: (value: string, onChange: (v: string) => void) => React.ReactNode;
10
16
  }
11
17
  type AuthVariant = "default" | "split" | "minimal" | "glass";
@@ -96,375 +102,97 @@ interface BreadcrumbProps {
96
102
  }
97
103
  declare function Breadcrumb({ items, separator, maxItems, className, }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
98
104
 
99
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
100
- variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
101
- size?: "xs" | "sm" | "md" | "lg" | "xl";
102
- fullWidth?: boolean;
103
- width?: number | string;
104
- height?: number | string;
105
- rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
106
- bgColor?: string;
107
- textColor?: string;
108
- borderColor?: string;
109
- borderWidth?: number;
110
- shadow?: boolean;
111
- shadowColor?: string;
112
- opacity?: number;
113
- gradientFrom?: string;
114
- gradientTo?: string;
115
- gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
116
- fontSize?: number;
117
- fontWeight?: "normal" | "medium" | "semibold" | "bold";
118
- padding?: number | string;
119
- margin?: number | string;
120
- label?: string;
121
- children?: React.ReactNode;
122
- leftIcon?: React.ReactNode;
123
- rightIcon?: React.ReactNode;
124
- iconOnly?: boolean;
125
- loading?: boolean;
126
- loadingText?: string;
127
- loadingPosition?: "left" | "right" | "center";
128
- disabled?: boolean;
129
- active?: boolean;
130
- selected?: boolean;
131
- animate?: boolean;
132
- transitionDuration?: number;
133
- transitionType?: "ease" | "linear" | "spring";
134
- hoverScale?: number;
135
- hoverOpacity?: number;
136
- hoverBgColor?: string;
137
- hoverTextColor?: string;
138
- hoverBorderColor?: string;
139
- activeScale?: number;
140
- pressAnimation?: "shrink" | "bounce" | "none";
141
- rippleEffect?: boolean;
142
- rippleColor?: string;
143
- rippleDuration?: number;
144
- animationType?: "bounce" | "pulse" | "shake" | "wiggle";
145
- loopAnimation?: boolean;
146
- animationDelay?: number;
147
- fadeIn?: boolean;
148
- slideIn?: boolean;
149
- slideDirection?: "left" | "right" | "top" | "bottom";
150
- onClick?: (e?: any) => void;
151
- onDoubleClick?: (e?: any) => void;
152
- onMouseEnter?: (e?: any) => void;
153
- onMouseLeave?: (e?: any) => void;
154
- onMouseDown?: (e?: any) => void;
155
- onMouseUp?: (e?: any) => void;
156
- onPress?: () => void;
157
- onLongPress?: () => void;
158
- onPressIn?: () => void;
159
- onPressOut?: () => void;
160
- onFocus?: () => void;
161
- onBlur?: () => void;
162
- ariaLabel?: string;
163
- role?: string;
164
- tabIndex?: number;
165
- type?: "button" | "submit" | "reset";
166
- preventDefault?: boolean;
167
- stopPropagation?: boolean;
168
- debounceTime?: number;
169
- throttleTime?: number;
170
- confirmBeforeClick?: boolean;
171
- confirmBeforeClickModalTitle?: string;
172
- confirmBeforeClickModalContent?: React.ReactNode;
173
- confirmBeforeClickFooterAction?: React.ReactNode;
174
- href?: string;
175
- target?: "_blank" | "_self";
176
- as?: "button" | "a" | "div";
177
- className?: string;
178
- style?: React.CSSProperties;
179
- testID?: string;
105
+ type ToastVariant = "default" | "success" | "error" | "warning" | "info";
106
+ type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
107
+ interface ToastItem {
108
+ id: string;
109
+ title?: React.ReactNode;
110
+ description?: React.ReactNode;
111
+ variant?: ToastVariant;
112
+ /** Duration in ms before auto-dismiss. 0 = no auto-dismiss */
113
+ duration?: number;
114
+ /** Show a progress bar counting down the duration */
115
+ showProgress?: boolean;
116
+ /** Custom icon — overrides the variant icon */
117
+ icon?: React.ReactNode;
118
+ /** Action button */
119
+ action?: {
120
+ label: string;
121
+ onClick: () => void;
122
+ };
123
+ /** Whether the toast can be manually closed */
124
+ closable?: boolean;
125
+ /** Override the provider's default position for this toast */
126
+ position?: ToastPosition;
180
127
  }
181
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
182
-
183
- interface CalendarEvent {
184
- id?: string;
185
- date: Date;
186
- endDate?: Date;
187
- label: string;
188
- color?: string;
189
- allDay?: boolean;
190
- description?: string;
128
+ interface ToastContextValue {
129
+ toast: (item: Omit<ToastItem, "id">) => string;
130
+ dismiss: (id: string) => void;
131
+ dismissAll: () => void;
191
132
  }
192
- type CalendarView = "month" | "week" | "day";
193
- interface CalendarProps {
194
- events?: CalendarEvent[];
195
- defaultView?: CalendarView;
196
- defaultDate?: Date;
197
- onEventClick?: (event: CalendarEvent) => void;
198
- onDateClick?: (date: Date) => void;
199
- onAddEvent?: (date: Date) => void;
200
- className?: string;
133
+ declare function useToast(): ToastContextValue;
134
+ interface ToastProviderProps {
135
+ children: React.ReactNode;
136
+ /** Default position for all toasts */
137
+ position?: ToastPosition;
138
+ /** Max toasts visible at once */
139
+ maxToasts?: number;
201
140
  }
202
- declare const EVENT_COLORS: string[];
203
- declare function Calendar({ events, defaultView, defaultDate, onEventClick, onDateClick, onAddEvent, className, }: CalendarProps): react_jsx_runtime.JSX.Element;
204
-
205
- declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
206
- declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
207
- declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
208
- declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
209
- declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
210
- declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
211
-
212
- interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
213
- inline?: boolean;
214
- label?: React.ReactNode;
215
- accepted?: boolean;
216
- acceptedColor?: string;
217
- declined?: boolean;
218
- declinedColor?: string;
219
- height?: number | string;
220
- width?: number | string;
141
+ declare function ToastProvider({ children, position, maxToasts, }: ToastProviderProps): react_jsx_runtime.JSX.Element;
142
+ type NotificationVariant = "default" | "success" | "error" | "warning" | "info";
143
+ interface NotificationItem {
144
+ id: string;
145
+ title: React.ReactNode;
146
+ description?: React.ReactNode;
147
+ variant?: NotificationVariant;
148
+ /** Timestamp label e.g. "2m ago" */
149
+ time?: string;
150
+ /** Avatar or icon node shown on the left */
151
+ avatar?: React.ReactNode;
152
+ /** Whether the notification has been read */
153
+ read?: boolean;
154
+ /** Click handler for the whole row */
155
+ onClick?: () => void;
156
+ /** Action buttons */
157
+ actions?: {
158
+ label: string;
159
+ onClick: () => void;
160
+ variant?: "primary" | "ghost";
161
+ }[];
221
162
  }
222
- declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
223
-
224
- interface ColorPickerProps {
225
- value?: string;
226
- defaultValue?: string;
227
- onChange?: (color: string) => void;
228
- showOpacity?: boolean;
229
- showSwatches?: boolean;
230
- disabled?: boolean;
163
+ interface NotificationPanelProps {
164
+ items: NotificationItem[];
165
+ /** Header title */
166
+ title?: string;
167
+ /** Show a badge with unread count on the bell icon trigger */
168
+ showBadge?: boolean;
169
+ /** Called when "Mark all read" is clicked */
170
+ onMarkAllRead?: () => void;
171
+ /** Called when "Clear all" is clicked */
172
+ onClearAll?: () => void;
173
+ /** Called when a single item is dismissed */
174
+ onDismiss?: (id: string) => void;
175
+ /** Empty state message */
176
+ emptyMessage?: string;
231
177
  className?: string;
232
- }
233
- declare function ColorPicker({ value: controlled, defaultValue, onChange, showOpacity, showSwatches, disabled, className, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
234
-
235
- interface ComboboxOption {
236
- value: string;
237
- label: string;
238
- description?: string;
239
- icon?: React.ReactNode;
240
- disabled?: boolean;
241
- group?: string;
242
- }
243
- interface ComboboxProps {
244
- options: ComboboxOption[];
245
- value?: string | string[];
246
- defaultValue?: string | string[];
247
- onChange?: (value: string | string[]) => void;
248
- placeholder?: string;
249
- searchPlaceholder?: string;
250
- multiple?: boolean;
251
- creatable?: boolean;
252
- clearable?: boolean;
253
- disabled?: boolean;
178
+ /** Max height of the list */
254
179
  maxHeight?: string;
255
- className?: string;
256
180
  }
257
- declare function Combobox({ options, value: controlled, defaultValue, onChange, placeholder, searchPlaceholder, multiple, creatable, clearable, disabled, maxHeight, className, }: ComboboxProps): react_jsx_runtime.JSX.Element;
258
-
259
- interface CommandItem {
260
- id: string;
261
- label: string;
262
- description?: string;
181
+ declare function NotificationPanel({ items, title, showBadge, onMarkAllRead, onClearAll, onDismiss, emptyMessage, className, maxHeight, }: NotificationPanelProps): react_jsx_runtime.JSX.Element;
182
+ interface NotificationBannerProps {
183
+ variant?: NotificationVariant;
184
+ title?: React.ReactNode;
185
+ description?: React.ReactNode;
263
186
  icon?: React.ReactNode;
264
- shortcut?: string;
265
- group?: string;
266
- onSelect: () => void;
267
- keywords?: string[];
268
- }
269
- interface CommandPaletteProps {
270
- items: CommandItem[];
271
- open?: boolean;
272
- onOpenChange?: (open: boolean) => void;
273
- placeholder?: string;
274
- maxRecent?: number;
187
+ closable?: boolean;
188
+ onClose?: () => void;
189
+ action?: {
190
+ label: string;
191
+ onClick: () => void;
192
+ };
275
193
  className?: string;
276
194
  }
277
- declare function CommandPalette({ items, open: controlled, onOpenChange, placeholder, maxRecent, className, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
278
-
279
- interface ContextMenuItem {
280
- label?: React.ReactNode;
281
- icon?: React.ReactNode;
282
- shortcut?: string;
283
- onClick?: () => void;
284
- disabled?: boolean;
285
- danger?: boolean;
286
- separator?: boolean;
287
- children?: ContextMenuItem[];
288
- }
289
- interface ContextMenuProps {
290
- items: ContextMenuItem[];
291
- children: React.ReactNode;
292
- className?: string;
293
- }
294
- declare function ContextMenu({ items, children, className }: ContextMenuProps): react_jsx_runtime.JSX.Element;
295
-
296
- type TrendDir = "up" | "down" | "neutral";
297
- type SemanticColor = "primary" | "info" | "success" | "warning" | "danger" | "muted";
298
- interface StatsWidgetProps {
299
- title: string;
300
- value: string | number;
301
- subtitle?: string;
302
- icon?: React.ReactNode;
303
- iconColor?: SemanticColor;
304
- trend?: TrendDir;
305
- trendValue?: string;
306
- trendLabel?: string;
307
- delta?: string | number;
308
- sparkline?: number[];
309
- sparklineColor?: SemanticColor;
310
- progress?: number;
311
- progressColor?: SemanticColor;
312
- badge?: React.ReactNode;
313
- footer?: React.ReactNode;
314
- animate?: boolean;
315
- loading?: boolean;
316
- onClick?: () => void;
317
- className?: string;
318
- }
319
- declare function StatsWidget({ title, value, subtitle, icon, iconColor, trend, trendValue, trendLabel, delta, sparkline, sparklineColor, progress, progressColor, badge, footer, animate, loading, onClick, className, }: StatsWidgetProps): react_jsx_runtime.JSX.Element;
320
- interface ChartDataPoint {
321
- label: string;
322
- value: number;
323
- color?: SemanticColor;
324
- }
325
- interface ChartWidgetProps {
326
- title: string;
327
- description?: string;
328
- data: ChartDataPoint[];
329
- type?: "bar" | "line" | "donut";
330
- color?: SemanticColor;
331
- height?: number;
332
- showLegend?: boolean;
333
- showValues?: boolean;
334
- showGrid?: boolean;
335
- unit?: string;
336
- action?: React.ReactNode;
337
- footer?: React.ReactNode;
338
- loading?: boolean;
339
- className?: string;
340
- }
341
- declare function ChartWidget({ title, description, data, type, color, height, showLegend, showValues, showGrid, unit, action, footer, loading, className, }: ChartWidgetProps): react_jsx_runtime.JSX.Element;
342
- interface TableWidgetProps {
343
- title: string;
344
- description?: string;
345
- action?: React.ReactNode;
346
- footer?: React.ReactNode;
347
- children: React.ReactNode;
348
- className?: string;
349
- }
350
- declare function TableWidget({ title, description, action, footer, children, className }: TableWidgetProps): react_jsx_runtime.JSX.Element;
351
- interface ComposableWidgetProps {
352
- title?: string;
353
- description?: string;
354
- headerLeft?: React.ReactNode;
355
- headerRight?: React.ReactNode;
356
- toolbar?: React.ReactNode;
357
- children: React.ReactNode;
358
- footer?: React.ReactNode;
359
- padding?: "none" | "sm" | "md";
360
- className?: string;
361
- }
362
- declare function ComposableWidget({ title, description, headerLeft, headerRight, toolbar, children, footer, padding, className, }: ComposableWidgetProps): react_jsx_runtime.JSX.Element;
363
- interface MetricItem {
364
- label: string;
365
- value: string | number;
366
- trend?: TrendDir;
367
- trendValue?: string;
368
- color?: SemanticColor;
369
- }
370
- interface MetricRowProps {
371
- items: MetricItem[];
372
- divided?: boolean;
373
- className?: string;
374
- }
375
- declare function MetricRow({ items, divided, className }: MetricRowProps): react_jsx_runtime.JSX.Element;
376
-
377
- type ToastVariant = "default" | "success" | "error" | "warning" | "info";
378
- type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
379
- interface ToastItem {
380
- id: string;
381
- title?: React.ReactNode;
382
- description?: React.ReactNode;
383
- variant?: ToastVariant;
384
- /** Duration in ms before auto-dismiss. 0 = no auto-dismiss */
385
- duration?: number;
386
- /** Show a progress bar counting down the duration */
387
- showProgress?: boolean;
388
- /** Custom icon — overrides the variant icon */
389
- icon?: React.ReactNode;
390
- /** Action button */
391
- action?: {
392
- label: string;
393
- onClick: () => void;
394
- };
395
- /** Whether the toast can be manually closed */
396
- closable?: boolean;
397
- /** Override the provider's default position for this toast */
398
- position?: ToastPosition;
399
- }
400
- interface ToastContextValue {
401
- toast: (item: Omit<ToastItem, "id">) => string;
402
- dismiss: (id: string) => void;
403
- dismissAll: () => void;
404
- }
405
- declare function useToast(): ToastContextValue;
406
- interface ToastProviderProps {
407
- children: React.ReactNode;
408
- /** Default position for all toasts */
409
- position?: ToastPosition;
410
- /** Max toasts visible at once */
411
- maxToasts?: number;
412
- }
413
- declare function ToastProvider({ children, position, maxToasts, }: ToastProviderProps): react_jsx_runtime.JSX.Element;
414
- type NotificationVariant = "default" | "success" | "error" | "warning" | "info";
415
- interface NotificationItem {
416
- id: string;
417
- title: React.ReactNode;
418
- description?: React.ReactNode;
419
- variant?: NotificationVariant;
420
- /** Timestamp label e.g. "2m ago" */
421
- time?: string;
422
- /** Avatar or icon node shown on the left */
423
- avatar?: React.ReactNode;
424
- /** Whether the notification has been read */
425
- read?: boolean;
426
- /** Click handler for the whole row */
427
- onClick?: () => void;
428
- /** Action buttons */
429
- actions?: {
430
- label: string;
431
- onClick: () => void;
432
- variant?: "primary" | "ghost";
433
- }[];
434
- }
435
- interface NotificationPanelProps {
436
- items: NotificationItem[];
437
- /** Header title */
438
- title?: string;
439
- /** Show a badge with unread count on the bell icon trigger */
440
- showBadge?: boolean;
441
- /** Called when "Mark all read" is clicked */
442
- onMarkAllRead?: () => void;
443
- /** Called when "Clear all" is clicked */
444
- onClearAll?: () => void;
445
- /** Called when a single item is dismissed */
446
- onDismiss?: (id: string) => void;
447
- /** Empty state message */
448
- emptyMessage?: string;
449
- className?: string;
450
- /** Max height of the list */
451
- maxHeight?: string;
452
- }
453
- declare function NotificationPanel({ items, title, showBadge, onMarkAllRead, onClearAll, onDismiss, emptyMessage, className, maxHeight, }: NotificationPanelProps): react_jsx_runtime.JSX.Element;
454
- interface NotificationBannerProps {
455
- variant?: NotificationVariant;
456
- title?: React.ReactNode;
457
- description?: React.ReactNode;
458
- icon?: React.ReactNode;
459
- closable?: boolean;
460
- onClose?: () => void;
461
- action?: {
462
- label: string;
463
- onClick: () => void;
464
- };
465
- className?: string;
466
- }
467
- declare function NotificationBanner({ variant, title, description, icon, closable, onClose, action, className, }: NotificationBannerProps): react_jsx_runtime.JSX.Element;
195
+ declare function NotificationBanner({ variant, title, description, icon, closable, onClose, action, className, }: NotificationBannerProps): react_jsx_runtime.JSX.Element;
468
196
 
469
197
  interface ServerPaginationLink {
470
198
  page: number;
@@ -520,160 +248,572 @@ interface ServerPaginationProp {
520
248
  currentPage: number;
521
249
  goToPage: (page: number) => void;
522
250
  }
523
- declare function useServerTable<T extends Record<string, any>>({ url, params, encrypt, key, decryptPayloadLog, columnOverrides }: UseServerTableOptions): UseServerTableReturn<T>;
524
- type ActionFieldType = "input" | "password" | "textarea" | "checkbox" | "toggle" | "select" | "radio" | "slider" | "tag-input" | "otp" | "combobox" | "color-picker" | "date-range" | "rich-text" | "file-upload" | "repeater";
525
- interface ActionField {
526
- key: string;
251
+ declare function useServerTable<T extends Record<string, any>>({ url, params, encrypt, key, decryptPayloadLog, columnOverrides }: UseServerTableOptions): UseServerTableReturn<T>;
252
+ type ActionFieldType = "input" | "password" | "textarea" | "checkbox" | "toggle" | "select" | "radio" | "slider" | "tag-input" | "otp" | "combobox" | "color-picker" | "date-range" | "rich-text" | "file-upload" | "repeater";
253
+ interface ActionField {
254
+ key: string;
255
+ label: string;
256
+ type?: ActionFieldType;
257
+ /** HTML input type for type="input" (e.g. "email", "number", "password") */
258
+ inputType?: string;
259
+ /** Options for type="select", "radio", "combobox" — string[] or { label, value }[] */
260
+ options?: string[] | {
261
+ label: string;
262
+ value: string;
263
+ }[];
264
+ placeholder?: string;
265
+ required?: boolean;
266
+ /** Min value for type="slider" */
267
+ min?: number;
268
+ /** Max value for type="slider" */
269
+ max?: number;
270
+ /** Step for type="slider" */
271
+ step?: number;
272
+ /** Number of OTP digits for type="otp" */
273
+ digits?: number;
274
+ /** Custom render — overrides built-in field renderer */
275
+ render?: (value: any, onChange: (v: any) => void) => React.ReactNode;
276
+ }
277
+ /** Controls appearance of a default action button (view / edit / delete) */
278
+ interface ActionButtonConfig {
279
+ /** Button variant. Defaults: view→"outline", edit→"outline", delete→"danger" */
280
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
281
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
282
+ rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
283
+ gradientFrom?: string;
284
+ gradientTo?: string;
285
+ gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
286
+ bgColor?: string;
287
+ textColor?: string;
288
+ borderColor?: string;
289
+ borderWidth?: number;
290
+ shadow?: boolean;
291
+ /** Override the default icon */
292
+ icon?: React.ReactNode;
293
+ /** Override the default label text */
294
+ label?: string;
295
+ /** "icon" = icon only, "text" = label only, "icon-text" = icon + label. Default "icon" */
296
+ displayMode?: "icon" | "text" | "icon-text";
297
+ className?: string;
298
+ }
299
+ /** Extra action button appended alongside the default view/edit/delete buttons */
300
+ interface ExtraActionConfig<T> {
301
+ /** Unique key */
302
+ key: string;
303
+ /** Button label */
304
+ label?: string;
305
+ /** Icon rendered in the button */
306
+ icon?: React.ReactNode;
307
+ /** "icon" | "text" | "icon-text". Default "icon-text" */
308
+ displayMode?: "icon" | "text" | "icon-text";
309
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
310
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
311
+ rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
312
+ gradientFrom?: string;
313
+ gradientTo?: string;
314
+ gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
315
+ bgColor?: string;
316
+ textColor?: string;
317
+ borderColor?: string;
318
+ borderWidth?: number;
319
+ shadow?: boolean;
320
+ className?: string;
321
+ onClick: (item: T) => void;
322
+ }
323
+ interface DefaultActionsConfig<T> {
324
+ /**
325
+ * Base URL used to build PUT and DELETE requests.
326
+ * PUT → `{baseUrl}/{id}/update`
327
+ * DELETE → `{baseUrl}/{id}/delete`
328
+ */
329
+ baseUrl: string;
330
+ /** Row key used as the URL id segment. Defaults to "id". */
331
+ idKey?: keyof T;
332
+ /** Position of the Actions column. Default "last". */
333
+ position?: "first" | "last";
334
+ /** Fields rendered in the Edit modal form. Auto-derived from row keys when omitted. */
335
+ editForm?: ActionField[];
336
+ /** Fields rendered in the View modal. Auto-derived from row keys when omitted. */
337
+ viewForm?: ActionField[];
338
+ /** Called after a successful edit or delete so the parent can refresh data. */
339
+ onSuccess?: (action: "edit" | "delete", item: T) => void;
340
+ /** Show a toast or notification banner on successful edit/delete */
341
+ onSuccessNotif?: ActionSuccessNotif;
342
+ /** Customize the View button appearance */
343
+ viewButton?: ActionButtonConfig;
344
+ /** Customize the Edit button appearance */
345
+ editButton?: ActionButtonConfig;
346
+ /** Customize the Delete button appearance */
347
+ deleteButton?: ActionButtonConfig;
348
+ /** Extra action buttons rendered alongside view/edit/delete */
349
+ extraActions?: ExtraActionConfig<T>[];
350
+ }
351
+ interface ActionSuccessNotif {
352
+ /** "toast" uses the ToastProvider. "notification" renders an inline banner. Default "toast". */
353
+ type?: "toast" | "notification";
354
+ /** Toast position. Only used when type="toast". Default "bottom-right". */
355
+ toastPosition?: ToastPosition;
356
+ /** Variant for edit success. Default "success". */
357
+ editVariant?: ToastVariant;
358
+ /** Variant for delete success. Default "success". */
359
+ deleteVariant?: ToastVariant;
360
+ /** Title for edit success notification */
361
+ editTitle?: React.ReactNode;
362
+ /** Body/description for edit success notification */
363
+ editBody?: React.ReactNode;
364
+ /** Title for delete success notification */
365
+ deleteTitle?: React.ReactNode;
366
+ /** Body/description for delete success notification */
367
+ deleteBody?: React.ReactNode;
368
+ /** Extra action element rendered inside the notification */
369
+ action?: React.ReactNode;
370
+ }
371
+ interface Column<T> {
372
+ key: keyof T | string;
373
+ title: string;
374
+ type?: "text" | "image" | "badge" | "icon" | "stack" | "select" | "toggle" | "color" | "checkbox";
375
+ stackProps?: {
376
+ limit?: number;
377
+ stacked?: boolean;
378
+ shape?: "circle" | "square";
379
+ size?: number;
380
+ };
381
+ /** Options for type="select" */
382
+ selectOptions?: string[];
383
+ render?: (item: T) => React.ReactNode;
384
+ sortable?: boolean;
385
+ /** Called when a cell value changes (select, toggle, color, checkbox) */
386
+ onChange?: (item: T, value: any) => void;
387
+ }
388
+ interface TableProps<T> {
389
+ data: T[];
390
+ columns: Column<T>[];
391
+ searchable?: boolean;
392
+ searchPlaceholder?: string;
393
+ pagination?: boolean;
394
+ itemsPerPage?: number;
395
+ selectable?: boolean;
396
+ onBulkDelete?: (selectedIds: string[]) => void;
397
+ idKey?: keyof T;
398
+ /** When provided, appends an Actions column with View / Edit / Delete buttons */
399
+ defaultActions?: DefaultActionsConfig<T>;
400
+ /** Pass the serverPagination object from useServerTable to enable server-side pagination */
401
+ serverPagination?: ServerPaginationProp | null;
402
+ className?: string;
403
+ }
404
+ declare function Table<T extends Record<string, any>>({ data, columns, searchable, searchPlaceholder, pagination, itemsPerPage, selectable, onBulkDelete, idKey, defaultActions, serverPagination, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
405
+
406
+ type BulletinPriority = "low" | "medium" | "high" | "urgent";
407
+ type BulletinLayout = "grid" | "list" | "masonry";
408
+ type BulletinVariant = "card" | "minimal" | "bordered";
409
+ type BulletinColumns = 1 | 2 | 3 | 4;
410
+ interface BulletinAction {
411
+ label: string;
412
+ icon?: React.ReactNode;
413
+ onClick: (item: BulletinItem) => void;
414
+ variant?: "default" | "danger";
415
+ }
416
+ interface BulletinItem {
417
+ id: string | number;
418
+ title: string;
419
+ body?: React.ReactNode;
420
+ author?: string;
421
+ /** Author avatar URL */
422
+ authorImage?: string;
423
+ /** Author avatar fallback icon */
424
+ authorIcon?: React.ReactNode;
425
+ date?: string | Date;
426
+ category?: string;
427
+ /** Cover image URL */
428
+ image?: string;
429
+ pinned?: boolean;
430
+ priority?: BulletinPriority;
431
+ tags?: string[];
432
+ /** Per-item action menu items */
433
+ actions?: BulletinAction[];
434
+ className?: string;
435
+ }
436
+ interface BulletinServerPaginationProp {
437
+ pagination: ServerPagination;
438
+ currentPage: number;
439
+ goToPage: (page: number) => void;
440
+ }
441
+ interface UseServerBulletinOptions {
442
+ url: string;
443
+ params?: Record<string, string | number>;
444
+ encrypt?: boolean;
445
+ key?: string;
446
+ decryptPayloadLog?: boolean;
447
+ /** Map raw API row → BulletinItem */
448
+ transform?: (row: any) => BulletinItem;
449
+ }
450
+ interface UseServerBulletinReturn {
451
+ items: BulletinItem[];
452
+ currentPage: number;
453
+ pagination: ServerPagination | null;
454
+ serverPagination: BulletinServerPaginationProp | null;
455
+ loading: boolean;
456
+ error: string | null;
457
+ goToPage: (page: number) => void;
458
+ reload: () => void;
459
+ }
460
+ declare function useServerBulletin({ url, params, encrypt, key, decryptPayloadLog, transform, }: UseServerBulletinOptions): UseServerBulletinReturn;
461
+ interface BulletinPreviewProps {
462
+ item: BulletinItem;
463
+ onClose: () => void;
464
+ onEdit?: (item: BulletinItem) => void;
465
+ onDelete?: (item: BulletinItem) => void;
466
+ onView?: (item: BulletinItem) => void;
467
+ /** Custom actions to add to the preview header */
468
+ customActions?: BulletinAction[];
469
+ }
470
+ declare function BulletinPreview({ item, onClose, onEdit, onDelete, onView, customActions }: BulletinPreviewProps): React.ReactPortal;
471
+ interface BulletinEditField {
472
+ key: keyof BulletinItem | string;
473
+ label: string;
474
+ type: "text" | "textarea" | "select" | "checkbox" | "date";
475
+ options?: string[];
476
+ placeholder?: string;
477
+ }
478
+ interface BulletinBoardProps {
479
+ /** Array of bulletin post items. */
480
+ items: BulletinItem[];
481
+ /** Board layout mode. */
482
+ layout?: "grid" | "list" | "masonry";
483
+ /** Number of grid columns (responsive). */
484
+ columns?: 1 | 2 | 3 | 4;
485
+ /** Visual style of each post card. */
486
+ variant?: "card" | "minimal" | "bordered";
487
+ /** Show a search input above the board. */
488
+ searchable?: boolean;
489
+ /** Show category filter chips above the board. */
490
+ filterable?: boolean;
491
+ /** Explicit category list for filter chips. Auto-derived from items if omitted. */
492
+ categories?: string[];
493
+ /** Board header title. */
494
+ title?: React.ReactNode;
495
+ /** Trailing element in the board header (e.g. a New Post button). */
496
+ headerAction?: React.ReactNode;
497
+ /** Show or hide the board header bar. */
498
+ showHeader?: boolean;
499
+ /** Content shown when the filtered list is empty. */
500
+ emptyMessage?: React.ReactNode;
501
+ /** Show skeleton cards instead of real content. */
502
+ loading?: boolean;
503
+ /** Number of skeleton cards to render while loading. */
504
+ loadingCount?: number;
505
+ /** Open a BulletinPreview modal when a card is clicked. */
506
+ preview?: boolean;
507
+ /** Called when the Edit button is clicked inside the preview. */
508
+ onEdit?: (item: BulletinItem) => void;
509
+ /** Called when the Delete button is clicked inside the preview. */
510
+ onDelete?: (item: BulletinItem) => void;
511
+ /** Called when the View button is clicked inside the preview. */
512
+ onView?: (item: BulletinItem) => void;
513
+ /** Base URL for built-in PUT {baseUrl}/{id} request. */
514
+ editBaseUrl?: string;
515
+ /** HTTP method for edit request (default: PUT). */
516
+ editMethod?: "PUT" | "PATCH" | "POST";
517
+ /** Item key used as the id segment in the edit URL. */
518
+ editIdKey?: string;
519
+ /** Edit form fields configuration. */
520
+ editFields?: BulletinEditField[];
521
+ /** Base URL for built-in DELETE {baseUrl}/{id}/delete request. */
522
+ deleteBaseUrl?: string;
523
+ /** Item key used as the id segment in the delete URL. */
524
+ deleteIdKey?: string;
525
+ /** Pass the serverPagination from useServerBulletin to enable server-driven pagination. */
526
+ serverPagination?: BulletinServerPaginationProp | null;
527
+ /** Fired when a post card is clicked (ignored when preview=true). */
528
+ onItemClick?: (item: BulletinItem) => void;
529
+ /** Additional CSS classes on the outer wrapper. */
530
+ className?: string;
531
+ }
532
+ declare function BulletinBoard({ items, layout, columns, variant, searchable, filterable, categories: categoriesProp, title, headerAction, showHeader, emptyMessage, loading, loadingCount, onItemClick, onView, onEdit, onDelete, preview, editBaseUrl, editMethod, editIdKey, editFields, deleteBaseUrl, deleteIdKey, serverPagination, className, }: BulletinBoardProps): react_jsx_runtime.JSX.Element;
533
+
534
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
535
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
536
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
537
+ fullWidth?: boolean;
538
+ width?: number | string;
539
+ height?: number | string;
540
+ rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
541
+ bgColor?: string;
542
+ textColor?: string;
543
+ borderColor?: string;
544
+ borderWidth?: number;
545
+ shadow?: boolean;
546
+ shadowColor?: string;
547
+ opacity?: number;
548
+ gradientFrom?: string;
549
+ gradientTo?: string;
550
+ gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
551
+ fontSize?: number;
552
+ fontWeight?: "normal" | "medium" | "semibold" | "bold";
553
+ padding?: number | string;
554
+ margin?: number | string;
555
+ label?: string;
556
+ children?: React.ReactNode;
557
+ leftIcon?: React.ReactNode;
558
+ rightIcon?: React.ReactNode;
559
+ iconOnly?: boolean;
560
+ loading?: boolean;
561
+ loadingText?: string;
562
+ loadingPosition?: "left" | "right" | "center";
563
+ disabled?: boolean;
564
+ active?: boolean;
565
+ selected?: boolean;
566
+ animate?: boolean;
567
+ transitionDuration?: number;
568
+ transitionType?: "ease" | "linear" | "spring";
569
+ hoverScale?: number;
570
+ hoverOpacity?: number;
571
+ hoverBgColor?: string;
572
+ hoverTextColor?: string;
573
+ hoverBorderColor?: string;
574
+ activeScale?: number;
575
+ pressAnimation?: "shrink" | "bounce" | "none";
576
+ rippleEffect?: boolean;
577
+ rippleColor?: string;
578
+ rippleDuration?: number;
579
+ animationType?: "bounce" | "pulse" | "shake" | "wiggle";
580
+ loopAnimation?: boolean;
581
+ animationDelay?: number;
582
+ fadeIn?: boolean;
583
+ slideIn?: boolean;
584
+ slideDirection?: "left" | "right" | "top" | "bottom";
585
+ onClick?: (e?: any) => void;
586
+ onDoubleClick?: (e?: any) => void;
587
+ onMouseEnter?: (e?: any) => void;
588
+ onMouseLeave?: (e?: any) => void;
589
+ onMouseDown?: (e?: any) => void;
590
+ onMouseUp?: (e?: any) => void;
591
+ onPress?: () => void;
592
+ onLongPress?: () => void;
593
+ onPressIn?: () => void;
594
+ onPressOut?: () => void;
595
+ onFocus?: () => void;
596
+ onBlur?: () => void;
597
+ ariaLabel?: string;
598
+ role?: string;
599
+ tabIndex?: number;
600
+ type?: "button" | "submit" | "reset";
601
+ preventDefault?: boolean;
602
+ stopPropagation?: boolean;
603
+ debounceTime?: number;
604
+ throttleTime?: number;
605
+ confirmBeforeClick?: boolean;
606
+ confirmBeforeClickModalTitle?: string;
607
+ confirmBeforeClickModalContent?: React.ReactNode;
608
+ confirmBeforeClickFooterAction?: React.ReactNode;
609
+ href?: string;
610
+ target?: "_blank" | "_self";
611
+ as?: "button" | "a" | "div";
612
+ className?: string;
613
+ style?: React.CSSProperties;
614
+ testID?: string;
615
+ }
616
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
617
+
618
+ interface CalendarEvent {
619
+ id?: string;
620
+ date: Date;
621
+ endDate?: Date;
622
+ label: string;
623
+ color?: string;
624
+ allDay?: boolean;
625
+ description?: string;
626
+ }
627
+ type CalendarView = "month" | "week" | "day";
628
+ interface CalendarProps {
629
+ events?: CalendarEvent[];
630
+ defaultView?: CalendarView;
631
+ defaultDate?: Date;
632
+ onEventClick?: (event: CalendarEvent) => void;
633
+ onDateClick?: (date: Date) => void;
634
+ onAddEvent?: (date: Date) => void;
635
+ className?: string;
636
+ }
637
+ declare const EVENT_COLORS: string[];
638
+ declare function Calendar({ events, defaultView, defaultDate, onEventClick, onDateClick, onAddEvent, className, }: CalendarProps): react_jsx_runtime.JSX.Element;
639
+
640
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
641
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
642
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
643
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
644
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
645
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
646
+
647
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
648
+ inline?: boolean;
649
+ label?: React.ReactNode;
650
+ accepted?: boolean;
651
+ acceptedColor?: string;
652
+ declined?: boolean;
653
+ declinedColor?: string;
654
+ height?: number | string;
655
+ width?: number | string;
656
+ required?: boolean;
657
+ error?: string;
658
+ }
659
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
660
+
661
+ interface ColorPickerProps {
662
+ value?: string;
663
+ defaultValue?: string;
664
+ onChange?: (color: string) => void;
665
+ showOpacity?: boolean;
666
+ showSwatches?: boolean;
667
+ disabled?: boolean;
668
+ className?: string;
669
+ required?: boolean;
670
+ error?: string;
671
+ }
672
+ declare function ColorPicker({ value: controlled, defaultValue, onChange, showOpacity, showSwatches, disabled, className, required, error, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
673
+
674
+ interface ComboboxOption {
675
+ value: string;
676
+ label: string;
677
+ description?: string;
678
+ icon?: React.ReactNode;
679
+ disabled?: boolean;
680
+ group?: string;
681
+ }
682
+ interface ComboboxProps {
683
+ options: ComboboxOption[];
684
+ value?: string | string[];
685
+ defaultValue?: string | string[];
686
+ onChange?: (value: string | string[]) => void;
687
+ placeholder?: string;
688
+ searchPlaceholder?: string;
689
+ multiple?: boolean;
690
+ creatable?: boolean;
691
+ clearable?: boolean;
692
+ disabled?: boolean;
693
+ maxHeight?: string;
694
+ className?: string;
695
+ required?: boolean;
696
+ error?: string;
697
+ }
698
+ declare function Combobox({ options, value: controlled, defaultValue, onChange, placeholder, searchPlaceholder, multiple, creatable, clearable, disabled, maxHeight, className, required, error, }: ComboboxProps): react_jsx_runtime.JSX.Element;
699
+
700
+ interface CommandItem {
701
+ id: string;
527
702
  label: string;
528
- type?: ActionFieldType;
529
- /** HTML input type for type="input" (e.g. "email", "number", "password") */
530
- inputType?: string;
531
- /** Options for type="select", "radio", "combobox" — string[] or { label, value }[] */
532
- options?: string[] | {
533
- label: string;
534
- value: string;
535
- }[];
703
+ description?: string;
704
+ icon?: React.ReactNode;
705
+ shortcut?: string;
706
+ group?: string;
707
+ onSelect: () => void;
708
+ keywords?: string[];
709
+ }
710
+ interface CommandPaletteProps {
711
+ items: CommandItem[];
712
+ open?: boolean;
713
+ onOpenChange?: (open: boolean) => void;
536
714
  placeholder?: string;
537
- required?: boolean;
538
- /** Min value for type="slider" */
539
- min?: number;
540
- /** Max value for type="slider" */
541
- max?: number;
542
- /** Step for type="slider" */
543
- step?: number;
544
- /** Number of OTP digits for type="otp" */
545
- digits?: number;
546
- /** Custom render — overrides built-in field renderer */
547
- render?: (value: any, onChange: (v: any) => void) => React.ReactNode;
715
+ maxRecent?: number;
716
+ className?: string;
548
717
  }
549
- /** Controls appearance of a default action button (view / edit / delete) */
550
- interface ActionButtonConfig {
551
- /** Button variant. Defaults: view→"outline", edit→"outline", delete→"danger" */
552
- variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
553
- size?: "xs" | "sm" | "md" | "lg" | "xl";
554
- rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
555
- gradientFrom?: string;
556
- gradientTo?: string;
557
- gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
558
- bgColor?: string;
559
- textColor?: string;
560
- borderColor?: string;
561
- borderWidth?: number;
562
- shadow?: boolean;
563
- /** Override the default icon */
718
+ declare function CommandPalette({ items, open: controlled, onOpenChange, placeholder, maxRecent, className, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
719
+
720
+ interface ContextMenuItem {
721
+ label?: React.ReactNode;
564
722
  icon?: React.ReactNode;
565
- /** Override the default label text */
566
- label?: string;
567
- /** "icon" = icon only, "text" = label only, "icon-text" = icon + label. Default "icon" */
568
- displayMode?: "icon" | "text" | "icon-text";
723
+ shortcut?: string;
724
+ onClick?: () => void;
725
+ disabled?: boolean;
726
+ danger?: boolean;
727
+ separator?: boolean;
728
+ children?: ContextMenuItem[];
729
+ }
730
+ interface ContextMenuProps {
731
+ items: ContextMenuItem[];
732
+ children: React.ReactNode;
569
733
  className?: string;
570
734
  }
571
- /** Extra action button appended alongside the default view/edit/delete buttons */
572
- interface ExtraActionConfig<T> {
573
- /** Unique key */
574
- key: string;
575
- /** Button label */
576
- label?: string;
577
- /** Icon rendered in the button */
735
+ declare function ContextMenu({ items, children, className }: ContextMenuProps): react_jsx_runtime.JSX.Element;
736
+
737
+ type TrendDir = "up" | "down" | "neutral";
738
+ type SemanticColor = "primary" | "info" | "success" | "warning" | "danger" | "muted";
739
+ interface StatsWidgetProps {
740
+ title: string;
741
+ value: string | number;
742
+ subtitle?: string;
578
743
  icon?: React.ReactNode;
579
- /** "icon" | "text" | "icon-text". Default "icon-text" */
580
- displayMode?: "icon" | "text" | "icon-text";
581
- variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
582
- size?: "xs" | "sm" | "md" | "lg" | "xl";
583
- rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
584
- gradientFrom?: string;
585
- gradientTo?: string;
586
- gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
587
- bgColor?: string;
588
- textColor?: string;
589
- borderColor?: string;
590
- borderWidth?: number;
591
- shadow?: boolean;
744
+ iconColor?: SemanticColor;
745
+ trend?: TrendDir;
746
+ trendValue?: string;
747
+ trendLabel?: string;
748
+ delta?: string | number;
749
+ sparkline?: number[];
750
+ sparklineColor?: SemanticColor;
751
+ progress?: number;
752
+ progressColor?: SemanticColor;
753
+ badge?: React.ReactNode;
754
+ footer?: React.ReactNode;
755
+ animate?: boolean;
756
+ loading?: boolean;
757
+ onClick?: () => void;
592
758
  className?: string;
593
- onClick: (item: T) => void;
594
759
  }
595
- interface DefaultActionsConfig<T> {
596
- /**
597
- * Base URL used to build PUT and DELETE requests.
598
- * PUT → `{baseUrl}/{id}/update`
599
- * DELETE → `{baseUrl}/{id}/delete`
600
- */
601
- baseUrl: string;
602
- /** Row key used as the URL id segment. Defaults to "id". */
603
- idKey?: keyof T;
604
- /** Position of the Actions column. Default "last". */
605
- position?: "first" | "last";
606
- /** Fields rendered in the Edit modal form. Auto-derived from row keys when omitted. */
607
- editForm?: ActionField[];
608
- /** Fields rendered in the View modal. Auto-derived from row keys when omitted. */
609
- viewForm?: ActionField[];
610
- /** Called after a successful edit or delete so the parent can refresh data. */
611
- onSuccess?: (action: "edit" | "delete", item: T) => void;
612
- /** Show a toast or notification banner on successful edit/delete */
613
- onSuccessNotif?: ActionSuccessNotif;
614
- /** Customize the View button appearance */
615
- viewButton?: ActionButtonConfig;
616
- /** Customize the Edit button appearance */
617
- editButton?: ActionButtonConfig;
618
- /** Customize the Delete button appearance */
619
- deleteButton?: ActionButtonConfig;
620
- /** Extra action buttons rendered alongside view/edit/delete */
621
- extraActions?: ExtraActionConfig<T>[];
760
+ declare function StatsWidget({ title, value, subtitle, icon, iconColor, trend, trendValue, trendLabel, delta, sparkline, sparklineColor, progress, progressColor, badge, footer, animate, loading, onClick, className, }: StatsWidgetProps): react_jsx_runtime.JSX.Element;
761
+ interface ChartDataPoint {
762
+ label: string;
763
+ value: number;
764
+ color?: SemanticColor;
622
765
  }
623
- interface ActionSuccessNotif {
624
- /** "toast" uses the ToastProvider. "notification" renders an inline banner. Default "toast". */
625
- type?: "toast" | "notification";
626
- /** Toast position. Only used when type="toast". Default "bottom-right". */
627
- toastPosition?: ToastPosition;
628
- /** Variant for edit success. Default "success". */
629
- editVariant?: ToastVariant;
630
- /** Variant for delete success. Default "success". */
631
- deleteVariant?: ToastVariant;
632
- /** Title for edit success notification */
633
- editTitle?: React.ReactNode;
634
- /** Body/description for edit success notification */
635
- editBody?: React.ReactNode;
636
- /** Title for delete success notification */
637
- deleteTitle?: React.ReactNode;
638
- /** Body/description for delete success notification */
639
- deleteBody?: React.ReactNode;
640
- /** Extra action element rendered inside the notification */
766
+ interface ChartWidgetProps {
767
+ title: string;
768
+ description?: string;
769
+ data: ChartDataPoint[];
770
+ type?: "bar" | "line" | "donut";
771
+ color?: SemanticColor;
772
+ height?: number;
773
+ showLegend?: boolean;
774
+ showValues?: boolean;
775
+ showGrid?: boolean;
776
+ unit?: string;
641
777
  action?: React.ReactNode;
778
+ footer?: React.ReactNode;
779
+ loading?: boolean;
780
+ className?: string;
642
781
  }
643
- interface Column<T> {
644
- key: keyof T | string;
782
+ declare function ChartWidget({ title, description, data, type, color, height, showLegend, showValues, showGrid, unit, action, footer, loading, className, }: ChartWidgetProps): react_jsx_runtime.JSX.Element;
783
+ interface TableWidgetProps {
645
784
  title: string;
646
- type?: "text" | "image" | "badge" | "icon" | "stack" | "select" | "toggle" | "color" | "checkbox";
647
- stackProps?: {
648
- limit?: number;
649
- stacked?: boolean;
650
- shape?: "circle" | "square";
651
- size?: number;
652
- };
653
- /** Options for type="select" */
654
- selectOptions?: string[];
655
- render?: (item: T) => React.ReactNode;
656
- sortable?: boolean;
657
- /** Called when a cell value changes (select, toggle, color, checkbox) */
658
- onChange?: (item: T, value: any) => void;
785
+ description?: string;
786
+ action?: React.ReactNode;
787
+ footer?: React.ReactNode;
788
+ children: React.ReactNode;
789
+ className?: string;
659
790
  }
660
- interface TableProps<T> {
661
- data: T[];
662
- columns: Column<T>[];
663
- searchable?: boolean;
664
- searchPlaceholder?: string;
665
- pagination?: boolean;
666
- itemsPerPage?: number;
667
- selectable?: boolean;
668
- onBulkDelete?: (selectedIds: string[]) => void;
669
- idKey?: keyof T;
670
- /** When provided, appends an Actions column with View / Edit / Delete buttons */
671
- defaultActions?: DefaultActionsConfig<T>;
672
- /** Pass the serverPagination object from useServerTable to enable server-side pagination */
673
- serverPagination?: ServerPaginationProp | null;
791
+ declare function TableWidget({ title, description, action, footer, children, className }: TableWidgetProps): react_jsx_runtime.JSX.Element;
792
+ interface ComposableWidgetProps {
793
+ title?: string;
794
+ description?: string;
795
+ headerLeft?: React.ReactNode;
796
+ headerRight?: React.ReactNode;
797
+ toolbar?: React.ReactNode;
798
+ children: React.ReactNode;
799
+ footer?: React.ReactNode;
800
+ padding?: "none" | "sm" | "md";
674
801
  className?: string;
675
802
  }
676
- declare function Table<T extends Record<string, any>>({ data, columns, searchable, searchPlaceholder, pagination, itemsPerPage, selectable, onBulkDelete, idKey, defaultActions, serverPagination, className, }: TableProps<T>): react_jsx_runtime.JSX.Element;
803
+ declare function ComposableWidget({ title, description, headerLeft, headerRight, toolbar, children, footer, padding, className, }: ComposableWidgetProps): react_jsx_runtime.JSX.Element;
804
+ interface MetricItem {
805
+ label: string;
806
+ value: string | number;
807
+ trend?: TrendDir;
808
+ trendValue?: string;
809
+ color?: SemanticColor;
810
+ }
811
+ interface MetricRowProps {
812
+ items: MetricItem[];
813
+ divided?: boolean;
814
+ className?: string;
815
+ }
816
+ declare function MetricRow({ items, divided, className }: MetricRowProps): react_jsx_runtime.JSX.Element;
677
817
 
678
818
  interface ServerDataGridProp {
679
819
  pagination: ServerPagination;
@@ -863,8 +1003,10 @@ interface FileUploadProps extends React.HTMLAttributes<HTMLDivElement>, FileType
863
1003
  /** Image editor configuration */
864
1004
  imageEditorOptions?: ImageEditorOptions;
865
1005
  className?: string;
1006
+ required?: boolean;
1007
+ error?: string;
866
1008
  }
867
- declare function FileUpload({ className, onFileSelect, onFilesChange, onValidationError, accept, multiple, maxSize, maxFiles, disabled, reorderable, imagePreviewHeight, panelAspectRatio, label, helperText, hint, imageEditor, imageEditorOptions, allowedFileTypes, rejectedFileTypes, mimeTypes, ...props }: FileUploadProps): react_jsx_runtime.JSX.Element;
1009
+ declare function FileUpload({ className, onFileSelect, onFilesChange, onValidationError, accept, multiple, maxSize, maxFiles, disabled, reorderable, imagePreviewHeight, panelAspectRatio, label, helperText, hint, imageEditor, imageEditorOptions, allowedFileTypes, rejectedFileTypes, mimeTypes, required, error: externalError, ...props }: FileUploadProps): react_jsx_runtime.JSX.Element;
868
1010
 
869
1011
  type FlexDirection = "row" | "row-reverse" | "col" | "col-reverse";
870
1012
  type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
@@ -925,6 +1067,8 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
925
1067
  autocapitalize?: "none" | "sentences" | "words" | "characters" | boolean;
926
1068
  prefix?: React.ReactNode;
927
1069
  suffix?: React.ReactNode;
1070
+ required?: boolean;
1071
+ error?: string;
928
1072
  regexValidation?: {
929
1073
  pattern: RegExp;
930
1074
  message?: string;
@@ -1272,8 +1416,10 @@ interface OtpInputProps {
1272
1416
  disabled?: boolean;
1273
1417
  invalid?: boolean;
1274
1418
  className?: string;
1419
+ required?: boolean;
1420
+ error?: string;
1275
1421
  }
1276
- declare function OtpInput({ length, value: controlled, onChange, onComplete, mask, disabled, invalid, className, }: OtpInputProps): react_jsx_runtime.JSX.Element;
1422
+ declare function OtpInput({ length, value: controlled, onChange, onComplete, mask, disabled, invalid, className, required, error, }: OtpInputProps): react_jsx_runtime.JSX.Element;
1277
1423
 
1278
1424
  interface PaginationProps {
1279
1425
  page: number;
@@ -1410,8 +1556,10 @@ interface RadioGroupProps {
1410
1556
  orientation?: "horizontal" | "vertical";
1411
1557
  name?: string;
1412
1558
  className?: string;
1559
+ required?: boolean;
1560
+ error?: string;
1413
1561
  }
1414
- declare function RadioGroup({ options, value: controlledValue, defaultValue, onChange, variant, size, orientation, name, className, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
1562
+ declare function RadioGroup({ options, value: controlledValue, defaultValue, onChange, variant, size, orientation, name, className, required, error, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
1415
1563
 
1416
1564
  interface RepeaterProps<T> {
1417
1565
  items: T[];
@@ -1486,8 +1634,10 @@ interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChan
1486
1634
  createOptionForm?: React.ReactNode;
1487
1635
  suffixIcon?: React.ReactNode;
1488
1636
  suffixIconColor?: "success" | "error" | "warning" | "info" | (string & {});
1637
+ required?: boolean;
1638
+ error?: string;
1489
1639
  }
1490
- declare function Select({ options, value, onChange, placeholder, searchable, native, label, loadingMessage, noSearchResultsMessage, searchingMessage, multiple, reorderable, disabled, createOptionForm, suffixIcon, suffixIconColor, className, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
1640
+ declare function Select({ options, value, onChange, placeholder, searchable, native, label, loadingMessage, noSearchResultsMessage, searchingMessage, multiple, reorderable, disabled, createOptionForm, suffixIcon, suffixIconColor, required, error, className, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
1491
1641
 
1492
1642
  type Theme = 'dark' | 'light' | 'system';
1493
1643
  type ThemeColors = {
@@ -1570,6 +1720,8 @@ interface SliderProps {
1570
1720
  label?: React.ReactNode;
1571
1721
  showValue?: boolean;
1572
1722
  className?: string;
1723
+ required?: boolean;
1724
+ error?: string;
1573
1725
  }
1574
1726
  interface RangeSliderProps {
1575
1727
  value?: [number, number];
@@ -1583,9 +1735,11 @@ interface RangeSliderProps {
1583
1735
  label?: React.ReactNode;
1584
1736
  showValue?: boolean;
1585
1737
  className?: string;
1738
+ required?: boolean;
1739
+ error?: string;
1586
1740
  }
1587
- declare function Slider({ value: controlled, defaultValue, min, max, step, onChange, disabled, showTooltip, showMarks, marks, label, showValue, className, }: SliderProps): react_jsx_runtime.JSX.Element;
1588
- declare function RangeSlider({ value: controlled, defaultValue, min, max, step, onChange, disabled, showTooltip, label, showValue, className, }: RangeSliderProps): react_jsx_runtime.JSX.Element;
1741
+ declare function Slider({ value: controlled, defaultValue, min, max, step, onChange, disabled, showTooltip, showMarks, marks, label, showValue, className, required, error, }: SliderProps): react_jsx_runtime.JSX.Element;
1742
+ declare function RangeSlider({ value: controlled, defaultValue, min, max, step, onChange, disabled, showTooltip, label, showValue, className, required, error, }: RangeSliderProps): react_jsx_runtime.JSX.Element;
1589
1743
 
1590
1744
  type StatTrend = "up" | "down" | "neutral";
1591
1745
  interface StatCardProps {
@@ -1652,8 +1806,10 @@ interface TagInputProps {
1652
1806
  allowDuplicates?: boolean;
1653
1807
  disabled?: boolean;
1654
1808
  className?: string;
1809
+ required?: boolean;
1810
+ error?: string;
1655
1811
  }
1656
- declare function TagInput({ value: controlled, defaultValue, onChange, placeholder, maxTags, allowDuplicates, disabled, className, }: TagInputProps): react_jsx_runtime.JSX.Element;
1812
+ declare function TagInput({ value: controlled, defaultValue, onChange, placeholder, maxTags, allowDuplicates, disabled, className, required, error, }: TagInputProps): react_jsx_runtime.JSX.Element;
1657
1813
 
1658
1814
  interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "rows" | "cols" | "readOnly" | "minLength" | "maxLength"> {
1659
1815
  rows?: number;
@@ -1665,6 +1821,9 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
1665
1821
  minLength?: number;
1666
1822
  maxLength?: number;
1667
1823
  length?: number;
1824
+ label?: string;
1825
+ required?: boolean;
1826
+ error?: string;
1668
1827
  }
1669
1828
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
1670
1829
 
@@ -1721,6 +1880,8 @@ interface ToggleSwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
1721
1880
  declinedColor?: string;
1722
1881
  width?: number | string;
1723
1882
  height?: number | string;
1883
+ required?: boolean;
1884
+ error?: string;
1724
1885
  }
1725
1886
  declare const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLInputElement>>;
1726
1887
 
@@ -1866,4 +2027,4 @@ interface WizardProps {
1866
2027
  }
1867
2028
  declare function Wizard({ steps, step: controlledStep, defaultStep, onStepChange, onFinish, onClose, layout, variant, size, isOpen, showClose, unchange, title, description, hideHeader, footer, renderActions, backLabel, nextLabel, finishLabel, cancelLabel, showCancel, showBackOnFirst, loading, clickableSteps, className, contentClassName, }: WizardProps): react_jsx_runtime.JSX.Element;
1868
2029
 
1869
- export { Accordion, type AccordionItem, type AccordionProps, type AccordionVariant, type ActionField, type ActionFieldType, type AuthField, type AuthVariant, type AuthView, Authentication, type AuthenticationProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, COLOR_PALETTE, Calendar, CalendarDateRangePicker, type CalendarDateRangePickerProps, type CalendarDateRangeVariant, type CalendarEvent, type CalendarProps, type CalendarView, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartDataPoint, ChartWidget, type ChartWidgetProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, type ClusterVariant, ColorPicker, type ColorPickerProps, type Column, Combobox, type ComboboxOption, type ComboboxProps, type CommandItem, CommandPalette, type CommandPaletteProps, ComposableWidget, type ComposableWidgetProps, type ConfirmVariant, ContextMenu, type ContextMenuItem, type ContextMenuProps, DataGrid, type DataGridColumn, type DataGridProps, DatePickerPopup, type DateRange, DateRangePicker, type DateRangePickerProps, type DefaultActionsConfig, DocsLayout, Drawer, type DrawerProps, type DrawerSide, Dropdown, DropdownItem, DropdownLabel, type DropdownProps, DropdownSeparator, EVENT_COLORS, type FileTypeValidation, FileUpload, type FileUploadProps, type FlexAlign, type FlexDirection, type FlexGap, FlexItem, type FlexItemProps, type FlexJustify, FlexLayout, type FlexLayoutProps, type FlexWrap, type FlyToOptions, type FormField, type FormFieldType, type GridAlign, type GridCols, type GridGap, GridItem, type GridItemProps, GridLayout, type GridLayoutProps, GroupNavigation, type GroupNavigationProps, type ImageEditorMode, type ImageEditorOptions, Input, type InputProps, KanbanBoard, type KanbanBoardProps, type KanbanCard, type KanbanColumn, Label, LeafletMap, type LeafletMapProps, LeftSidebar, type LeftSidebarProps, type MapLibreClusterVariant, MapLibreMap, type MapLibreMarker, type MapLibreProps, type MapLibreRoute, type MapLibreRouteType, type MapLibreStyle, type MapMarker, type MapRoute, type MarkerColor, type MetricItem, MetricRow, type MetricRowProps, Modal, ModalConfirmation, type ModalConfirmationProps, type ModalProps, ModalUnchange, type ModalUnchangeProps, ModalWithForms, type ModalWithFormsProps, type NavGroup, type NavItem, Navigation, type NavigationProps, NotificationBanner, type NotificationBannerProps, type NotificationItem, NotificationPanel, type NotificationPanelProps, type NotificationVariant, OtpInput, type OtpInputProps, Pagination, type PaginationProps, Panel, type PanelProps, PanelSettings, type PanelSettingsProps, type PanelSettingsTab, PanelSidebarGroup, PanelSidebarItem, Popover, type PopoverPlacement, type PopoverProps, Progress, type ProgressProps, type ProgressSize, type ProgressVariant, type PropRow, PropsTable, RadioGroup, type RadioGroupProps, type RadioOption, type RadioSize, type RadioVariant, RangeSlider, type RangeSliderProps, Repeater, type RepeaterProps, ResizablePanels, type ResizablePanelsProps, RichTextEditor, type RichTextEditorProps, RightSidebar, type RightSidebarProps, type RouteType, ScrollArea, type ScrollAreaProps, Section, SectionBlock, type SectionProps, type SectionVariant, Select, type SelectOption, type SelectProps, type SemanticColor, type ServerDataGridProp, type ServerPagination, type ServerPaginationLink, type ServerPaginationProp, type ServerTableResponse, Skeleton, Slider, type SliderProps, type SortDir, StatCard, type StatCardProps, type StatTrend, StatsWidget, type StatsWidgetProps, type Step, type StepStatus, Stepper, type StepperProps, type TabItem, type TabSize, type TabVariant, Table, TableOfContents, type TableProps, TableWidget, type TableWidgetProps, Tabs, type TabsProps, TagInput, type TagInputProps, Textarea, type TextareaProps, type ThemeColors, ThemeProvider, type ThemeSettings, Timeline, type TimelineItem, type TimelineProps, type TimelineVariant, type ToastItem, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, type TocItem, TocProvider, ToggleSwitch, type ToggleSwitchProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, type TreeNode, TreeView, type TreeViewProps, type TrendDir, type UseServerDataGridOptions, type UseServerDataGridReturn, type UseServerTableOptions, type UseServerTableReturn, Widget, type WidgetProps, Wizard, type WizardActionProps, type WizardLayout, type WizardProps, type WizardSize, type WizardStep, type WizardVariant, useServerDataGrid, useServerTable, useTheme, useToast, useToc };
2030
+ export { Accordion, type AccordionItem, type AccordionProps, type AccordionVariant, type ActionField, type ActionFieldType, type AuthField, type AuthVariant, type AuthView, Authentication, type AuthenticationProps, AvatarStack, type AvatarStackProps, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, type BulletinAction, BulletinBoard, type BulletinBoardProps, type BulletinColumns, type BulletinEditField, type BulletinItem, type BulletinLayout, BulletinPreview, type BulletinPreviewProps, type BulletinPriority, type BulletinServerPaginationProp, type BulletinVariant, Button, type ButtonProps, COLOR_PALETTE, Calendar, CalendarDateRangePicker, type CalendarDateRangePickerProps, type CalendarDateRangeVariant, type CalendarEvent, type CalendarProps, type CalendarView, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type ChartDataPoint, ChartWidget, type ChartWidgetProps, Checkbox, type CheckboxProps, CircularProgress, type CircularProgressProps, type ClusterVariant, ColorPicker, type ColorPickerProps, type Column, Combobox, type ComboboxOption, type ComboboxProps, type CommandItem, CommandPalette, type CommandPaletteProps, ComposableWidget, type ComposableWidgetProps, type ConfirmVariant, ContextMenu, type ContextMenuItem, type ContextMenuProps, DataGrid, type DataGridColumn, type DataGridProps, DatePickerPopup, type DateRange, DateRangePicker, type DateRangePickerProps, type DefaultActionsConfig, DocsLayout, Drawer, type DrawerProps, type DrawerSide, Dropdown, DropdownItem, DropdownLabel, type DropdownProps, DropdownSeparator, EVENT_COLORS, type FileTypeValidation, FileUpload, type FileUploadProps, type FlexAlign, type FlexDirection, type FlexGap, FlexItem, type FlexItemProps, type FlexJustify, FlexLayout, type FlexLayoutProps, type FlexWrap, type FlyToOptions, type FormField, type FormFieldType, type GridAlign, type GridCols, type GridGap, GridItem, type GridItemProps, GridLayout, type GridLayoutProps, GroupNavigation, type GroupNavigationProps, type ImageEditorMode, type ImageEditorOptions, Input, type InputProps, KanbanBoard, type KanbanBoardProps, type KanbanCard, type KanbanColumn, Label, LeafletMap, type LeafletMapProps, LeftSidebar, type LeftSidebarProps, type MapLibreClusterVariant, MapLibreMap, type MapLibreMarker, type MapLibreProps, type MapLibreRoute, type MapLibreRouteType, type MapLibreStyle, type MapMarker, type MapRoute, type MarkerColor, type MetricItem, MetricRow, type MetricRowProps, Modal, ModalConfirmation, type ModalConfirmationProps, type ModalProps, ModalUnchange, type ModalUnchangeProps, ModalWithForms, type ModalWithFormsProps, type NavGroup, type NavItem, Navigation, type NavigationProps, NotificationBanner, type NotificationBannerProps, type NotificationItem, NotificationPanel, type NotificationPanelProps, type NotificationVariant, OtpInput, type OtpInputProps, Pagination, type PaginationProps, Panel, type PanelProps, PanelSettings, type PanelSettingsProps, type PanelSettingsTab, PanelSidebarGroup, PanelSidebarItem, Popover, type PopoverPlacement, type PopoverProps, Progress, type ProgressProps, type ProgressSize, type ProgressVariant, type PropRow, PropsTable, RadioGroup, type RadioGroupProps, type RadioOption, type RadioSize, type RadioVariant, RangeSlider, type RangeSliderProps, Repeater, type RepeaterProps, ResizablePanels, type ResizablePanelsProps, RichTextEditor, type RichTextEditorProps, RightSidebar, type RightSidebarProps, type RouteType, ScrollArea, type ScrollAreaProps, Section, SectionBlock, type SectionProps, type SectionVariant, Select, type SelectOption, type SelectProps, type SemanticColor, type ServerDataGridProp, type ServerPagination, type ServerPaginationLink, type ServerPaginationProp, type ServerTableResponse, Skeleton, Slider, type SliderProps, type SortDir, StatCard, type StatCardProps, type StatTrend, StatsWidget, type StatsWidgetProps, type Step, type StepStatus, Stepper, type StepperProps, type TabItem, type TabSize, type TabVariant, Table, TableOfContents, type TableProps, TableWidget, type TableWidgetProps, Tabs, type TabsProps, TagInput, type TagInputProps, Textarea, type TextareaProps, type ThemeColors, ThemeProvider, type ThemeSettings, Timeline, type TimelineItem, type TimelineProps, type TimelineVariant, type ToastItem, type ToastPosition, ToastProvider, type ToastProviderProps, type ToastVariant, type TocItem, TocProvider, ToggleSwitch, type ToggleSwitchProps, Tooltip, type TooltipProps, Topbar, type TopbarProps, type TreeNode, TreeView, type TreeViewProps, type TrendDir, type UseServerBulletinOptions, type UseServerBulletinReturn, type UseServerDataGridOptions, type UseServerDataGridReturn, type UseServerTableOptions, type UseServerTableReturn, Widget, type WidgetProps, Wizard, type WizardActionProps, type WizardLayout, type WizardProps, type WizardSize, type WizardStep, type WizardVariant, useServerBulletin, useServerDataGrid, useServerTable, useTheme, useToast, useToc };