@juv/codego-react-ui 3.1.7 → 3.1.8

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.ts 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,563 @@ 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 BulletinBoardProps {
472
+ /** Array of bulletin post items. */
473
+ items: BulletinItem[];
474
+ /** Board layout mode. */
475
+ layout?: "grid" | "list" | "masonry";
476
+ /** Number of grid columns (responsive). */
477
+ columns?: 1 | 2 | 3 | 4;
478
+ /** Visual style of each post card. */
479
+ variant?: "card" | "minimal" | "bordered";
480
+ /** Show a search input above the board. */
481
+ searchable?: boolean;
482
+ /** Show category filter chips above the board. */
483
+ filterable?: boolean;
484
+ /** Explicit category list for filter chips. Auto-derived from items if omitted. */
485
+ categories?: string[];
486
+ /** Board header title. */
487
+ title?: React.ReactNode;
488
+ /** Trailing element in the board header (e.g. a New Post button). */
489
+ headerAction?: React.ReactNode;
490
+ /** Show or hide the board header bar. */
491
+ showHeader?: boolean;
492
+ /** Content shown when the filtered list is empty. */
493
+ emptyMessage?: React.ReactNode;
494
+ /** Show skeleton cards instead of real content. */
495
+ loading?: boolean;
496
+ /** Number of skeleton cards to render while loading. */
497
+ loadingCount?: number;
498
+ /** Open a BulletinPreview modal when a card is clicked. */
499
+ preview?: boolean;
500
+ /** Called when the Edit button is clicked inside the preview. */
501
+ onEdit?: (item: BulletinItem) => void;
502
+ /** Called when the Delete button is clicked inside the preview. */
503
+ onDelete?: (item: BulletinItem) => void;
504
+ /** Called when the View button is clicked inside the preview. */
505
+ onView?: (item: BulletinItem) => void;
506
+ /** Base URL for built-in PUT {baseUrl}/{id} request. */
507
+ editBaseUrl?: string;
508
+ /** HTTP method for edit request (default: PUT). */
509
+ editMethod?: "PUT" | "PATCH" | "POST";
510
+ /** Item key used as the id segment in the edit URL. */
511
+ editIdKey?: string;
512
+ /** Base URL for built-in DELETE {baseUrl}/{id}/delete request. */
513
+ deleteBaseUrl?: string;
514
+ /** Item key used as the id segment in the delete URL. */
515
+ deleteIdKey?: string;
516
+ /** Pass the serverPagination from useServerBulletin to enable server-driven pagination. */
517
+ serverPagination?: BulletinServerPaginationProp | null;
518
+ /** Fired when a post card is clicked (ignored when preview=true). */
519
+ onItemClick?: (item: BulletinItem) => void;
520
+ /** Additional CSS classes on the outer wrapper. */
521
+ className?: string;
522
+ }
523
+ declare function BulletinBoard({ items, layout, columns, variant, searchable, filterable, categories: categoriesProp, title, headerAction, showHeader, emptyMessage, loading, loadingCount, onItemClick, onView, onEdit, onDelete, preview, deleteBaseUrl, deleteIdKey, serverPagination, className, }: BulletinBoardProps): react_jsx_runtime.JSX.Element;
524
+
525
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
526
+ variant?: "primary" | "secondary" | "outline" | "ghost" | "link" | "danger" | "success" | "destructive";
527
+ size?: "xs" | "sm" | "md" | "lg" | "xl";
528
+ fullWidth?: boolean;
529
+ width?: number | string;
530
+ height?: number | string;
531
+ rounded?: "none" | "sm" | "md" | "lg" | "xl" | "full";
532
+ bgColor?: string;
533
+ textColor?: string;
534
+ borderColor?: string;
535
+ borderWidth?: number;
536
+ shadow?: boolean;
537
+ shadowColor?: string;
538
+ opacity?: number;
539
+ gradientFrom?: string;
540
+ gradientTo?: string;
541
+ gradientDirection?: "to-r" | "to-l" | "to-t" | "to-b" | "to-tr" | "to-tl" | "to-br" | "to-bl";
542
+ fontSize?: number;
543
+ fontWeight?: "normal" | "medium" | "semibold" | "bold";
544
+ padding?: number | string;
545
+ margin?: number | string;
546
+ label?: string;
547
+ children?: React.ReactNode;
548
+ leftIcon?: React.ReactNode;
549
+ rightIcon?: React.ReactNode;
550
+ iconOnly?: boolean;
551
+ loading?: boolean;
552
+ loadingText?: string;
553
+ loadingPosition?: "left" | "right" | "center";
554
+ disabled?: boolean;
555
+ active?: boolean;
556
+ selected?: boolean;
557
+ animate?: boolean;
558
+ transitionDuration?: number;
559
+ transitionType?: "ease" | "linear" | "spring";
560
+ hoverScale?: number;
561
+ hoverOpacity?: number;
562
+ hoverBgColor?: string;
563
+ hoverTextColor?: string;
564
+ hoverBorderColor?: string;
565
+ activeScale?: number;
566
+ pressAnimation?: "shrink" | "bounce" | "none";
567
+ rippleEffect?: boolean;
568
+ rippleColor?: string;
569
+ rippleDuration?: number;
570
+ animationType?: "bounce" | "pulse" | "shake" | "wiggle";
571
+ loopAnimation?: boolean;
572
+ animationDelay?: number;
573
+ fadeIn?: boolean;
574
+ slideIn?: boolean;
575
+ slideDirection?: "left" | "right" | "top" | "bottom";
576
+ onClick?: (e?: any) => void;
577
+ onDoubleClick?: (e?: any) => void;
578
+ onMouseEnter?: (e?: any) => void;
579
+ onMouseLeave?: (e?: any) => void;
580
+ onMouseDown?: (e?: any) => void;
581
+ onMouseUp?: (e?: any) => void;
582
+ onPress?: () => void;
583
+ onLongPress?: () => void;
584
+ onPressIn?: () => void;
585
+ onPressOut?: () => void;
586
+ onFocus?: () => void;
587
+ onBlur?: () => void;
588
+ ariaLabel?: string;
589
+ role?: string;
590
+ tabIndex?: number;
591
+ type?: "button" | "submit" | "reset";
592
+ preventDefault?: boolean;
593
+ stopPropagation?: boolean;
594
+ debounceTime?: number;
595
+ throttleTime?: number;
596
+ confirmBeforeClick?: boolean;
597
+ confirmBeforeClickModalTitle?: string;
598
+ confirmBeforeClickModalContent?: React.ReactNode;
599
+ confirmBeforeClickFooterAction?: React.ReactNode;
600
+ href?: string;
601
+ target?: "_blank" | "_self";
602
+ as?: "button" | "a" | "div";
603
+ className?: string;
604
+ style?: React.CSSProperties;
605
+ testID?: string;
606
+ }
607
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLElement>>;
608
+
609
+ interface CalendarEvent {
610
+ id?: string;
611
+ date: Date;
612
+ endDate?: Date;
613
+ label: string;
614
+ color?: string;
615
+ allDay?: boolean;
616
+ description?: string;
617
+ }
618
+ type CalendarView = "month" | "week" | "day";
619
+ interface CalendarProps {
620
+ events?: CalendarEvent[];
621
+ defaultView?: CalendarView;
622
+ defaultDate?: Date;
623
+ onEventClick?: (event: CalendarEvent) => void;
624
+ onDateClick?: (date: Date) => void;
625
+ onAddEvent?: (date: Date) => void;
626
+ className?: string;
627
+ }
628
+ declare const EVENT_COLORS: string[];
629
+ declare function Calendar({ events, defaultView, defaultDate, onEventClick, onDateClick, onAddEvent, className, }: CalendarProps): react_jsx_runtime.JSX.Element;
630
+
631
+ declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
632
+ declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
633
+ declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
634
+ declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
635
+ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
636
+ declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
637
+
638
+ interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
639
+ inline?: boolean;
640
+ label?: React.ReactNode;
641
+ accepted?: boolean;
642
+ acceptedColor?: string;
643
+ declined?: boolean;
644
+ declinedColor?: string;
645
+ height?: number | string;
646
+ width?: number | string;
647
+ required?: boolean;
648
+ error?: string;
649
+ }
650
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
651
+
652
+ interface ColorPickerProps {
653
+ value?: string;
654
+ defaultValue?: string;
655
+ onChange?: (color: string) => void;
656
+ showOpacity?: boolean;
657
+ showSwatches?: boolean;
658
+ disabled?: boolean;
659
+ className?: string;
660
+ required?: boolean;
661
+ error?: string;
662
+ }
663
+ declare function ColorPicker({ value: controlled, defaultValue, onChange, showOpacity, showSwatches, disabled, className, required, error, }: ColorPickerProps): react_jsx_runtime.JSX.Element;
664
+
665
+ interface ComboboxOption {
666
+ value: string;
667
+ label: string;
668
+ description?: string;
669
+ icon?: React.ReactNode;
670
+ disabled?: boolean;
671
+ group?: string;
672
+ }
673
+ interface ComboboxProps {
674
+ options: ComboboxOption[];
675
+ value?: string | string[];
676
+ defaultValue?: string | string[];
677
+ onChange?: (value: string | string[]) => void;
678
+ placeholder?: string;
679
+ searchPlaceholder?: string;
680
+ multiple?: boolean;
681
+ creatable?: boolean;
682
+ clearable?: boolean;
683
+ disabled?: boolean;
684
+ maxHeight?: string;
685
+ className?: string;
686
+ required?: boolean;
687
+ error?: string;
688
+ }
689
+ declare function Combobox({ options, value: controlled, defaultValue, onChange, placeholder, searchPlaceholder, multiple, creatable, clearable, disabled, maxHeight, className, required, error, }: ComboboxProps): react_jsx_runtime.JSX.Element;
690
+
691
+ interface CommandItem {
692
+ id: string;
527
693
  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
- }[];
694
+ description?: string;
695
+ icon?: React.ReactNode;
696
+ shortcut?: string;
697
+ group?: string;
698
+ onSelect: () => void;
699
+ keywords?: string[];
700
+ }
701
+ interface CommandPaletteProps {
702
+ items: CommandItem[];
703
+ open?: boolean;
704
+ onOpenChange?: (open: boolean) => void;
536
705
  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;
706
+ maxRecent?: number;
707
+ className?: string;
548
708
  }
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 */
709
+ declare function CommandPalette({ items, open: controlled, onOpenChange, placeholder, maxRecent, className, }: CommandPaletteProps): react_jsx_runtime.JSX.Element;
710
+
711
+ interface ContextMenuItem {
712
+ label?: React.ReactNode;
564
713
  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";
714
+ shortcut?: string;
715
+ onClick?: () => void;
716
+ disabled?: boolean;
717
+ danger?: boolean;
718
+ separator?: boolean;
719
+ children?: ContextMenuItem[];
720
+ }
721
+ interface ContextMenuProps {
722
+ items: ContextMenuItem[];
723
+ children: React.ReactNode;
569
724
  className?: string;
570
725
  }
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 */
726
+ declare function ContextMenu({ items, children, className }: ContextMenuProps): react_jsx_runtime.JSX.Element;
727
+
728
+ type TrendDir = "up" | "down" | "neutral";
729
+ type SemanticColor = "primary" | "info" | "success" | "warning" | "danger" | "muted";
730
+ interface StatsWidgetProps {
731
+ title: string;
732
+ value: string | number;
733
+ subtitle?: string;
578
734
  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;
735
+ iconColor?: SemanticColor;
736
+ trend?: TrendDir;
737
+ trendValue?: string;
738
+ trendLabel?: string;
739
+ delta?: string | number;
740
+ sparkline?: number[];
741
+ sparklineColor?: SemanticColor;
742
+ progress?: number;
743
+ progressColor?: SemanticColor;
744
+ badge?: React.ReactNode;
745
+ footer?: React.ReactNode;
746
+ animate?: boolean;
747
+ loading?: boolean;
748
+ onClick?: () => void;
592
749
  className?: string;
593
- onClick: (item: T) => void;
594
750
  }
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>[];
751
+ 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;
752
+ interface ChartDataPoint {
753
+ label: string;
754
+ value: number;
755
+ color?: SemanticColor;
622
756
  }
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 */
757
+ interface ChartWidgetProps {
758
+ title: string;
759
+ description?: string;
760
+ data: ChartDataPoint[];
761
+ type?: "bar" | "line" | "donut";
762
+ color?: SemanticColor;
763
+ height?: number;
764
+ showLegend?: boolean;
765
+ showValues?: boolean;
766
+ showGrid?: boolean;
767
+ unit?: string;
641
768
  action?: React.ReactNode;
769
+ footer?: React.ReactNode;
770
+ loading?: boolean;
771
+ className?: string;
642
772
  }
643
- interface Column<T> {
644
- key: keyof T | string;
773
+ declare function ChartWidget({ title, description, data, type, color, height, showLegend, showValues, showGrid, unit, action, footer, loading, className, }: ChartWidgetProps): react_jsx_runtime.JSX.Element;
774
+ interface TableWidgetProps {
645
775
  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;
776
+ description?: string;
777
+ action?: React.ReactNode;
778
+ footer?: React.ReactNode;
779
+ children: React.ReactNode;
780
+ className?: string;
659
781
  }
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;
782
+ declare function TableWidget({ title, description, action, footer, children, className }: TableWidgetProps): react_jsx_runtime.JSX.Element;
783
+ interface ComposableWidgetProps {
784
+ title?: string;
785
+ description?: string;
786
+ headerLeft?: React.ReactNode;
787
+ headerRight?: React.ReactNode;
788
+ toolbar?: React.ReactNode;
789
+ children: React.ReactNode;
790
+ footer?: React.ReactNode;
791
+ padding?: "none" | "sm" | "md";
674
792
  className?: string;
675
793
  }
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;
794
+ declare function ComposableWidget({ title, description, headerLeft, headerRight, toolbar, children, footer, padding, className, }: ComposableWidgetProps): react_jsx_runtime.JSX.Element;
795
+ interface MetricItem {
796
+ label: string;
797
+ value: string | number;
798
+ trend?: TrendDir;
799
+ trendValue?: string;
800
+ color?: SemanticColor;
801
+ }
802
+ interface MetricRowProps {
803
+ items: MetricItem[];
804
+ divided?: boolean;
805
+ className?: string;
806
+ }
807
+ declare function MetricRow({ items, divided, className }: MetricRowProps): react_jsx_runtime.JSX.Element;
677
808
 
678
809
  interface ServerDataGridProp {
679
810
  pagination: ServerPagination;
@@ -863,8 +994,10 @@ interface FileUploadProps extends React.HTMLAttributes<HTMLDivElement>, FileType
863
994
  /** Image editor configuration */
864
995
  imageEditorOptions?: ImageEditorOptions;
865
996
  className?: string;
997
+ required?: boolean;
998
+ error?: string;
866
999
  }
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;
1000
+ 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
1001
 
869
1002
  type FlexDirection = "row" | "row-reverse" | "col" | "col-reverse";
870
1003
  type FlexWrap = "nowrap" | "wrap" | "wrap-reverse";
@@ -925,6 +1058,8 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
925
1058
  autocapitalize?: "none" | "sentences" | "words" | "characters" | boolean;
926
1059
  prefix?: React.ReactNode;
927
1060
  suffix?: React.ReactNode;
1061
+ required?: boolean;
1062
+ error?: string;
928
1063
  regexValidation?: {
929
1064
  pattern: RegExp;
930
1065
  message?: string;
@@ -1272,8 +1407,10 @@ interface OtpInputProps {
1272
1407
  disabled?: boolean;
1273
1408
  invalid?: boolean;
1274
1409
  className?: string;
1410
+ required?: boolean;
1411
+ error?: string;
1275
1412
  }
1276
- declare function OtpInput({ length, value: controlled, onChange, onComplete, mask, disabled, invalid, className, }: OtpInputProps): react_jsx_runtime.JSX.Element;
1413
+ declare function OtpInput({ length, value: controlled, onChange, onComplete, mask, disabled, invalid, className, required, error, }: OtpInputProps): react_jsx_runtime.JSX.Element;
1277
1414
 
1278
1415
  interface PaginationProps {
1279
1416
  page: number;
@@ -1410,8 +1547,10 @@ interface RadioGroupProps {
1410
1547
  orientation?: "horizontal" | "vertical";
1411
1548
  name?: string;
1412
1549
  className?: string;
1550
+ required?: boolean;
1551
+ error?: string;
1413
1552
  }
1414
- declare function RadioGroup({ options, value: controlledValue, defaultValue, onChange, variant, size, orientation, name, className, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
1553
+ declare function RadioGroup({ options, value: controlledValue, defaultValue, onChange, variant, size, orientation, name, className, required, error, }: RadioGroupProps): react_jsx_runtime.JSX.Element;
1415
1554
 
1416
1555
  interface RepeaterProps<T> {
1417
1556
  items: T[];
@@ -1486,8 +1625,10 @@ interface SelectProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChan
1486
1625
  createOptionForm?: React.ReactNode;
1487
1626
  suffixIcon?: React.ReactNode;
1488
1627
  suffixIconColor?: "success" | "error" | "warning" | "info" | (string & {});
1628
+ required?: boolean;
1629
+ error?: string;
1489
1630
  }
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;
1631
+ 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
1632
 
1492
1633
  type Theme = 'dark' | 'light' | 'system';
1493
1634
  type ThemeColors = {
@@ -1570,6 +1711,8 @@ interface SliderProps {
1570
1711
  label?: React.ReactNode;
1571
1712
  showValue?: boolean;
1572
1713
  className?: string;
1714
+ required?: boolean;
1715
+ error?: string;
1573
1716
  }
1574
1717
  interface RangeSliderProps {
1575
1718
  value?: [number, number];
@@ -1583,9 +1726,11 @@ interface RangeSliderProps {
1583
1726
  label?: React.ReactNode;
1584
1727
  showValue?: boolean;
1585
1728
  className?: string;
1729
+ required?: boolean;
1730
+ error?: string;
1586
1731
  }
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;
1732
+ 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;
1733
+ declare function RangeSlider({ value: controlled, defaultValue, min, max, step, onChange, disabled, showTooltip, label, showValue, className, required, error, }: RangeSliderProps): react_jsx_runtime.JSX.Element;
1589
1734
 
1590
1735
  type StatTrend = "up" | "down" | "neutral";
1591
1736
  interface StatCardProps {
@@ -1652,8 +1797,10 @@ interface TagInputProps {
1652
1797
  allowDuplicates?: boolean;
1653
1798
  disabled?: boolean;
1654
1799
  className?: string;
1800
+ required?: boolean;
1801
+ error?: string;
1655
1802
  }
1656
- declare function TagInput({ value: controlled, defaultValue, onChange, placeholder, maxTags, allowDuplicates, disabled, className, }: TagInputProps): react_jsx_runtime.JSX.Element;
1803
+ declare function TagInput({ value: controlled, defaultValue, onChange, placeholder, maxTags, allowDuplicates, disabled, className, required, error, }: TagInputProps): react_jsx_runtime.JSX.Element;
1657
1804
 
1658
1805
  interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "rows" | "cols" | "readOnly" | "minLength" | "maxLength"> {
1659
1806
  rows?: number;
@@ -1665,6 +1812,9 @@ interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaEl
1665
1812
  minLength?: number;
1666
1813
  maxLength?: number;
1667
1814
  length?: number;
1815
+ label?: string;
1816
+ required?: boolean;
1817
+ error?: string;
1668
1818
  }
1669
1819
  declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
1670
1820
 
@@ -1721,6 +1871,8 @@ interface ToggleSwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
1721
1871
  declinedColor?: string;
1722
1872
  width?: number | string;
1723
1873
  height?: number | string;
1874
+ required?: boolean;
1875
+ error?: string;
1724
1876
  }
1725
1877
  declare const ToggleSwitch: React.ForwardRefExoticComponent<ToggleSwitchProps & React.RefAttributes<HTMLInputElement>>;
1726
1878
 
@@ -1866,4 +2018,4 @@ interface WizardProps {
1866
2018
  }
1867
2019
  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
2020
 
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 };
2021
+ 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 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 };