@kuraykaraaslan/kui-react 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE +17 -0
  2. package/README.md +168 -0
  3. package/dist/AdvancedDataTable-F3DNXDKX.mjs +11 -0
  4. package/dist/DataTable-2G27T4E6.mjs +11 -0
  5. package/dist/DateRangePicker-AL32QB6L.mjs +11 -0
  6. package/dist/DropdownMenu-f5yV9dzM.d.mts +22 -0
  7. package/dist/DropdownMenu-f5yV9dzM.d.ts +22 -0
  8. package/dist/MapView-FERKPCDB.mjs +10 -0
  9. package/dist/ServerDataTable-RZV3K6KQ.mjs +11 -0
  10. package/dist/Tooltip-Bof5GvOc.d.mts +248 -0
  11. package/dist/Tooltip-Bof5GvOc.d.ts +248 -0
  12. package/dist/VideoPlayer-P3I6ESXJ.mjs +9 -0
  13. package/dist/app.d.mts +620 -0
  14. package/dist/app.d.ts +620 -0
  15. package/dist/app.js +7061 -0
  16. package/dist/app.mjs +100 -0
  17. package/dist/chunk-24BCQSLI.mjs +1 -0
  18. package/dist/chunk-45I3EDB2.mjs +90 -0
  19. package/dist/chunk-4IWCD7ID.mjs +1450 -0
  20. package/dist/chunk-5E2HXWFI.mjs +105 -0
  21. package/dist/chunk-C7AYI4XM.mjs +402 -0
  22. package/dist/chunk-J4D44TUA.mjs +1267 -0
  23. package/dist/chunk-KTEWZKNE.mjs +1020 -0
  24. package/dist/chunk-LMUQHL4Z.mjs +3829 -0
  25. package/dist/chunk-MD5OQ4J2.mjs +527 -0
  26. package/dist/chunk-MPJRPYIZ.mjs +1 -0
  27. package/dist/chunk-MPWUEQ7J.mjs +2422 -0
  28. package/dist/chunk-MTT5TKAJ.mjs +93 -0
  29. package/dist/chunk-RBDK7MWQ.mjs +46 -0
  30. package/dist/chunk-SVFQZPNZ.mjs +3648 -0
  31. package/dist/chunk-TZWBBMSG.mjs +1 -0
  32. package/dist/chunk-XA7J6PVJ.mjs +1488 -0
  33. package/dist/chunk-ZLYBRYWQ.mjs +726 -0
  34. package/dist/common.d.mts +921 -0
  35. package/dist/common.d.ts +921 -0
  36. package/dist/common.js +4991 -0
  37. package/dist/common.mjs +172 -0
  38. package/dist/index.d.mts +10 -0
  39. package/dist/index.d.ts +10 -0
  40. package/dist/index.js +17563 -0
  41. package/dist/index.mjs +349 -0
  42. package/dist/ui.d.mts +937 -0
  43. package/dist/ui.d.ts +937 -0
  44. package/dist/ui.js +10095 -0
  45. package/dist/ui.mjs +163 -0
  46. package/package.json +114 -0
  47. package/styles/index.css +129 -0
package/dist/ui.d.mts ADDED
@@ -0,0 +1,937 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { m as DatePickerProps, n as DateRangePickerProps, o as ComboBoxProps, f as ToastItem } from './Tooltip-Bof5GvOc.mjs';
3
+ export { A as Announcer, B as Breadcrumb, a as BreadcrumbItem, C as ComboBoxOption, D as DateRange, L as LiveRegion, M as MultiSelect, b as MultiSelectOption, S as Select, c as SelectOption, d as SkipLink, T as Toast, e as ToastAction, g as ToastItemAction, h as ToastPosition, i as ToastProvider, j as ToastRegion, k as ToastVariant, l as Tooltip, t as toast } from './Tooltip-Bof5GvOc.mjs';
4
+ import * as react from 'react';
5
+ import react__default, { ReactNode, ComponentType } from 'react';
6
+ export { D as DropdownItem, a as DropdownMenu } from './DropdownMenu-f5yV9dzM.mjs';
7
+ import * as zustand from 'zustand';
8
+
9
+ declare const sizeMap$1: {
10
+ xs: string;
11
+ sm: string;
12
+ md: string;
13
+ lg: string;
14
+ xl: string;
15
+ };
16
+ declare const statusColorMap: {
17
+ online: string;
18
+ offline: string;
19
+ away: string;
20
+ busy: string;
21
+ };
22
+ declare function Avatar({ src, name, size, status, className, }: {
23
+ src?: string | null;
24
+ name: string;
25
+ size?: keyof typeof sizeMap$1;
26
+ status?: keyof typeof statusColorMap;
27
+ className?: string;
28
+ }): react_jsx_runtime.JSX.Element;
29
+ declare function AvatarGroup({ avatars, max, size, }: {
30
+ avatars: {
31
+ src?: string | null;
32
+ name: string;
33
+ }[];
34
+ max?: number;
35
+ size?: keyof typeof sizeMap$1;
36
+ }): react_jsx_runtime.JSX.Element;
37
+
38
+ /**
39
+ * Merges a component's own props with the native props of the element/component
40
+ * specified by the `as` prop, with own props taking precedence on conflicts.
41
+ *
42
+ * Usage:
43
+ * type ButtonOwnProps = { variant?: 'primary' | 'secondary' };
44
+ * export function Button<C extends React.ElementType = 'button'>({
45
+ * as, ...rest
46
+ * }: PolymorphicProps<C, ButtonOwnProps>) { ... }
47
+ */
48
+ type PolymorphicProps<C extends React.ElementType, OwnProps = {}> = OwnProps & Omit<React.ComponentPropsWithRef<C>, keyof OwnProps> & {
49
+ as?: C;
50
+ };
51
+
52
+ type BadgeVariant = 'success' | 'error' | 'warning' | 'info' | 'neutral' | 'primary';
53
+ type BadgeSize = 'sm' | 'md' | 'lg';
54
+ type BadgeOwnProps = {
55
+ children: React.ReactNode;
56
+ variant?: BadgeVariant;
57
+ size?: BadgeSize;
58
+ dot?: boolean;
59
+ dismissible?: boolean;
60
+ onDismiss?: () => void;
61
+ className?: string;
62
+ };
63
+ declare function Badge<C extends React.ElementType = 'span'>({ as, children, variant, size, dot, dismissible, onDismiss, className, ...rest }: PolymorphicProps<C, BadgeOwnProps>): react_jsx_runtime.JSX.Element;
64
+
65
+ type BrandLogoProps = {
66
+ children?: React.ReactNode;
67
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
68
+ className?: string;
69
+ };
70
+ declare function BrandLogo({ children, size, className }: BrandLogoProps): react_jsx_runtime.JSX.Element;
71
+
72
+ type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger' | 'outline';
73
+ type ButtonSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
74
+ type ButtonOwnProps = {
75
+ children?: React.ReactNode;
76
+ variant?: ButtonVariant;
77
+ size?: ButtonSize;
78
+ loading?: boolean;
79
+ iconLeft?: React.ReactNode;
80
+ iconRight?: React.ReactNode;
81
+ iconOnly?: boolean;
82
+ fullWidth?: boolean;
83
+ selected?: boolean;
84
+ type?: 'button' | 'submit' | 'reset';
85
+ 'data-testid'?: string;
86
+ className?: string;
87
+ };
88
+ declare function Button<C extends React.ElementType = 'button'>({ as, children, variant, size, loading, iconLeft, iconRight, iconOnly, fullWidth, selected, type, 'data-testid': testId, className, ...rest }: PolymorphicProps<C, ButtonOwnProps>): react_jsx_runtime.JSX.Element;
89
+
90
+ declare function Checkbox({ id, label, hint, error, disabled, indeterminate, className, ...props }: {
91
+ id: string;
92
+ label: string;
93
+ hint?: string;
94
+ error?: string;
95
+ disabled?: boolean;
96
+ indeterminate?: boolean;
97
+ className?: string;
98
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'id' | 'type'>): react_jsx_runtime.JSX.Element;
99
+
100
+ declare function DatePicker({ id, label, hint, error, value, onChange, disabled, required, min, max, disabledDates, locale: localeCode, format, messages, variant, className, name, }: DatePickerProps): react_jsx_runtime.JSX.Element;
101
+ declare function DateRangePicker({ id, label, hint, error, value, onChange, disabled, required, min, max, disabledDates, locale: localeCode, format, messages, variant, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
102
+
103
+ /** User-facing messages for validation and status. Allows i18n overrides. */
104
+ type FileInputMessages = {
105
+ /** Shown when a file exceeds `maxSizeBytes`. Receives the limit (formatted). */
106
+ invalidSize: (limit: string) => string;
107
+ /** Shown when a file type is not in `allowedTypes` or does not match `accept`. */
108
+ invalidType: string;
109
+ /** Shown when more files are selected than `maxFiles`. */
110
+ tooMany: (max: number) => string;
111
+ /** Default upload failure message. */
112
+ uploadFailed: string;
113
+ /** Default upload success message. */
114
+ uploadSuccess: string;
115
+ };
116
+ type FileInputProps = {
117
+ id: string;
118
+ label?: string;
119
+ hint?: string;
120
+ multiple?: boolean;
121
+ accept?: string;
122
+ maxSizeBytes?: number;
123
+ /** Optional cap on total selected count. */
124
+ maxFiles?: number;
125
+ /** Explicit MIME whitelist (overrides loose `accept` pattern matching). */
126
+ allowedTypes?: string[];
127
+ disabled?: boolean;
128
+ required?: boolean;
129
+ name?: string;
130
+ /** When true, listens for paste-from-clipboard (image bytes). M1. */
131
+ enablePaste?: boolean;
132
+ /** Optional callback fired with the validated File[] (no internal upload). */
133
+ onFiles?: (files: File[]) => void;
134
+ /** Optional upload action; when set, renders an upload button. */
135
+ onUpload?: (files: File[]) => Promise<void>;
136
+ uploadLabel?: string;
137
+ className?: string;
138
+ /** i18n / copy overrides for validation + status messages. */
139
+ messages?: Partial<FileInputMessages>;
140
+ };
141
+
142
+ declare function FileInput({ id, label, hint, multiple, accept, maxSizeBytes, maxFiles, allowedTypes, disabled, required, name, enablePaste, onFiles, onUpload, uploadLabel, className, messages, }: FileInputProps): react_jsx_runtime.JSX.Element;
143
+
144
+ declare const Input: react.ForwardRefExoticComponent<{
145
+ id: string;
146
+ label: string;
147
+ hint?: string;
148
+ error?: string;
149
+ success?: string;
150
+ required?: boolean;
151
+ prefixIcon?: React.ReactNode;
152
+ suffixIcon?: React.ReactNode;
153
+ clearable?: boolean;
154
+ onClear?: () => void;
155
+ showCount?: boolean;
156
+ maxLength?: number;
157
+ className?: string;
158
+ } & react.InputHTMLAttributes<HTMLInputElement> & react.RefAttributes<HTMLInputElement>>;
159
+
160
+ declare const sizeMap: {
161
+ xs: string;
162
+ sm: string;
163
+ md: string;
164
+ lg: string;
165
+ xl: string;
166
+ };
167
+ declare function Spinner({ size, className, }: {
168
+ size?: keyof typeof sizeMap;
169
+ className?: string;
170
+ }): react_jsx_runtime.JSX.Element;
171
+
172
+ type StarRatingSize = 'sm' | 'md' | 'lg';
173
+ type StarRatingProps = {
174
+ /** Current rating value (0–5, decimals supported when readonly). */
175
+ value: number;
176
+ /** Visual size of each star. Defaults to 'md'. */
177
+ size?: StarRatingSize;
178
+ /**
179
+ * When true (default) the component is purely presentational.
180
+ * When false, supply `onChange` to let users pick a whole-star rating.
181
+ */
182
+ readonly?: boolean;
183
+ /** Called with the new (whole-star) value when interactive. */
184
+ onChange?: (value: number) => void;
185
+ /**
186
+ * Accessible label override. When omitted a sensible default is generated
187
+ * such as "4.5 out of 5 stars".
188
+ */
189
+ 'aria-label'?: string;
190
+ /** Optional caption shown next to the stars (e.g. "(312 reviews)"). */
191
+ caption?: React.ReactNode;
192
+ className?: string;
193
+ };
194
+ declare function StarRating({ value, size, readonly, onChange, 'aria-label': ariaLabel, caption, className, }: StarRatingProps): react_jsx_runtime.JSX.Element;
195
+
196
+ type StatCardProps = {
197
+ label: string;
198
+ value: number | string;
199
+ accent?: string;
200
+ className?: string;
201
+ };
202
+ declare function StatCard({ label, value, accent, className }: StatCardProps): react_jsx_runtime.JSX.Element;
203
+
204
+ declare const Textarea: react.ForwardRefExoticComponent<{
205
+ id: string;
206
+ label: string;
207
+ hint?: string;
208
+ error?: string;
209
+ disabled?: boolean;
210
+ required?: boolean;
211
+ rows?: number;
212
+ className?: string;
213
+ } & Omit<react.TextareaHTMLAttributes<HTMLTextAreaElement>, "id" | "rows"> & react.RefAttributes<HTMLTextAreaElement>>;
214
+
215
+ declare function Toggle({ id, label, description, checked, onChange, disabled, size, className, }: {
216
+ id: string;
217
+ label: string;
218
+ description?: string;
219
+ checked: boolean;
220
+ onChange: (checked: boolean) => void;
221
+ disabled?: boolean;
222
+ size?: 'sm' | 'md' | 'lg';
223
+ className?: string;
224
+ }): react_jsx_runtime.JSX.Element;
225
+
226
+ type SortDirection = 'asc' | 'desc';
227
+ type SortState = {
228
+ /** Column key. */
229
+ key: string;
230
+ /** Direction. */
231
+ dir: SortDirection;
232
+ };
233
+ type ColumnFilterKind = 'text' | 'select';
234
+ type ColumnFilterConfig = {
235
+ /** Filter kind — M1 only supports 'text' and 'select'. */
236
+ kind: ColumnFilterKind;
237
+ /** Placeholder text for text inputs. */
238
+ placeholder?: string;
239
+ /** Options for 'select' kind. */
240
+ options?: {
241
+ label: string;
242
+ value: string;
243
+ }[];
244
+ };
245
+ type FilterState = Record<string, string>;
246
+ /**
247
+ * Column definition shared by every table mode.
248
+ * Backwards compatible with the legacy `TableColumn<T>` shape.
249
+ */
250
+ type Column<T> = {
251
+ key: keyof T | string;
252
+ header: string;
253
+ render?: (row: T) => ReactNode;
254
+ align?: 'left' | 'center' | 'right';
255
+ sortable?: boolean;
256
+ /** M1: per-column filter popover config. Set to truthy to enable. */
257
+ filter?: ColumnFilterConfig;
258
+ /** Optional CSS class for the `<th>`. */
259
+ thClass?: string;
260
+ /** Optional CSS class for the `<td>`. */
261
+ tdClass?: string;
262
+ };
263
+ /**
264
+ * Backwards-compatible alias preserved so legacy `TableColumn<T>` imports
265
+ * keep working without source changes.
266
+ */
267
+ type TableColumn<T> = Column<T>;
268
+ type DataTableMode = 'static' | 'paginated' | 'server';
269
+ type DataTableStateValue = 'empty' | 'loading' | 'error' | 'ready';
270
+ type DataTableFetchArgs = {
271
+ page: number;
272
+ pageSize: number;
273
+ sort: SortState[];
274
+ search: string;
275
+ filters: FilterState;
276
+ };
277
+ type DataTableFetchResult<T> = {
278
+ rows: T[];
279
+ total: number;
280
+ cursor?: string;
281
+ };
282
+ type DataTableMessages = {
283
+ empty: string;
284
+ loading: string;
285
+ error: string;
286
+ searchPlaceholder: string;
287
+ rowsPerPage: string;
288
+ filter: string;
289
+ clearFilter: string;
290
+ apply: string;
291
+ };
292
+
293
+ declare function Table<T extends Record<string, unknown>>({ columns, rows, caption, emptyMessage, defaultSortKey, defaultSortDir, className, }: {
294
+ columns: Column<T>[];
295
+ rows: T[];
296
+ caption?: string;
297
+ emptyMessage?: string;
298
+ defaultSortKey?: string;
299
+ defaultSortDir?: SortDirection;
300
+ className?: string;
301
+ }): react_jsx_runtime.JSX.Element;
302
+
303
+ type DataTableProps<T extends Record<string, unknown>> = {
304
+ /** Column descriptors. */
305
+ columns: Column<T>[];
306
+ /** Rows — required for `mode="static" | "paginated"`. Ignored for `mode="server"` (use `fetchPage`). */
307
+ rows?: T[];
308
+ /** Table mode — defaults to `paginated` for backwards compatibility with the legacy `<DataTable />`. */
309
+ mode?: DataTableMode;
310
+ /**
311
+ * Server-side fetcher. Required when `mode="server"`.
312
+ * Called whenever sort / filter / search / pagination changes.
313
+ */
314
+ fetchPage?: (args: DataTableFetchArgs) => Promise<DataTableFetchResult<T>>;
315
+ /** Caption — visually hidden, exposed to screen readers. */
316
+ caption?: string;
317
+ /** Render a search bar above the table. */
318
+ searchable?: boolean;
319
+ /** Placeholder for the search bar. */
320
+ searchPlaceholder?: string;
321
+ /** Default rows-per-page. */
322
+ pageSize?: number;
323
+ /** Page size options shown in the toolbar select. */
324
+ pageSizeOptions?: number[];
325
+ /** Custom empty-state message. */
326
+ emptyMessage?: string;
327
+ /** Custom loading message. */
328
+ loadingMessage?: string;
329
+ /** Custom error message. Takes precedence over `errorMessage` from `fetchPage` rejection. */
330
+ errorMessage?: string;
331
+ /**
332
+ * Manual override of the data state. Useful when the consumer owns the
333
+ * fetch lifecycle and wants to show loading/error skeletons.
334
+ */
335
+ state?: DataTableStateValue;
336
+ /** Click handler for individual rows. */
337
+ onRowClick?: (row: T) => void;
338
+ /** Optional message bundle for i18n. */
339
+ messages?: Partial<DataTableMessages>;
340
+ /** Initial sort. */
341
+ initialSort?: SortState[];
342
+ className?: string;
343
+ /** Stable id used as a prefix for child element ids — falls back to React.useId(). */
344
+ id?: string;
345
+ /**
346
+ * Legacy `AdvancedDataTable` props — preserved so the deprecated alias keeps
347
+ * working without source changes. Will move to dedicated props in M4/M5.
348
+ * @deprecated Use selection / expandable props (coming in M4/M5).
349
+ */
350
+ legacyAdvancedRows?: AdvancedDataTableRow<T>[];
351
+ /** @deprecated Will be replaced by `selectable: 'single' | 'multi'` in M4. */
352
+ selectable?: boolean;
353
+ /** @deprecated Will be replaced by `enableStickyHeader` plugin in M2. */
354
+ stickyHeader?: boolean;
355
+ /** @deprecated Will be replaced by typed selection state in M4. */
356
+ onSelectionChange?: (selected: number[]) => void;
357
+ /**
358
+ * Legacy ServerDataTable props.
359
+ * @deprecated Server-controlled props — prefer the unified `mode="server"` + `fetchPage` flow.
360
+ */
361
+ serverControlled?: {
362
+ page: number;
363
+ totalPages: number;
364
+ total?: number;
365
+ pageSize?: number;
366
+ onPageChange: (page: number) => void;
367
+ getRowKey: (row: T) => string;
368
+ loading?: boolean;
369
+ title?: string;
370
+ subtitle?: string;
371
+ headerRight?: React.ReactNode;
372
+ toolbar?: React.ReactNode;
373
+ };
374
+ };
375
+ /**
376
+ * Legacy advanced-table row shape — accepts an `_expanded` slot for
377
+ * expandable detail rows.
378
+ */
379
+ type AdvancedDataTableRow<T> = T & {
380
+ _expanded?: React.ReactNode;
381
+ };
382
+ declare function DataTable<T extends Record<string, unknown>>(props: DataTableProps<T>): react_jsx_runtime.JSX.Element;
383
+
384
+ /**
385
+ * @deprecated Use `<DataTable />` with selection / expandable props (coming in M4/M5).
386
+ * Will be removed in a future major. Kept as a thin re-export over the unified
387
+ * implementation so existing consumers keep working.
388
+ */
389
+ declare function AdvancedDataTable<T extends Record<string, unknown>>(props: {
390
+ columns: Column<T>[];
391
+ rows: AdvancedDataTableRow<T>[];
392
+ caption?: string;
393
+ selectable?: boolean;
394
+ stickyHeader?: boolean;
395
+ emptyMessage?: string;
396
+ onSelectionChange?: (selected: number[]) => void;
397
+ className?: string;
398
+ }): react_jsx_runtime.JSX.Element;
399
+ /**
400
+ * @deprecated Use `<DataTable mode="server" fetchPage={...} />`. Kept as a thin
401
+ * wrapper for source-compatible migration.
402
+ */
403
+ declare function ServerDataTable<T extends Record<string, unknown>>(props: {
404
+ columns: Column<T>[];
405
+ rows: T[];
406
+ getRowKey: (row: T) => string;
407
+ page: number;
408
+ totalPages: number;
409
+ total?: number;
410
+ pageSize?: number;
411
+ onPageChange: (page: number) => void;
412
+ onRowClick?: (row: T) => void;
413
+ loading?: boolean;
414
+ emptyMessage?: string;
415
+ title?: string;
416
+ subtitle?: string;
417
+ headerRight?: ReactNode;
418
+ toolbar?: ReactNode;
419
+ className?: string;
420
+ caption?: string;
421
+ }): react_jsx_runtime.JSX.Element;
422
+
423
+ type AlertVariant = 'success' | 'warning' | 'error' | 'info';
424
+ type AlertAction = {
425
+ label: string;
426
+ href?: string;
427
+ onClick?: () => void;
428
+ };
429
+ declare function AlertBanner({ variant, title, message, dismissible, action, icon, className, }: {
430
+ variant?: AlertVariant;
431
+ title?: string;
432
+ message: string;
433
+ dismissible?: boolean;
434
+ action?: AlertAction;
435
+ icon?: React.ReactNode;
436
+ className?: string;
437
+ }): react_jsx_runtime.JSX.Element | null;
438
+
439
+ type ButtonGroupVariant = 'primary' | 'secondary' | 'outline' | 'ghost';
440
+ type ButtonGroupSize = 'xs' | 'sm' | 'md' | 'lg';
441
+ type ButtonGroupItem = {
442
+ value: string;
443
+ label: React.ReactNode;
444
+ disabled?: boolean;
445
+ };
446
+ declare function ButtonGroup({ items, value, onChange, variant, size, className, }: {
447
+ items: ButtonGroupItem[];
448
+ value: string;
449
+ onChange: (value: string) => void;
450
+ variant?: ButtonGroupVariant;
451
+ size?: ButtonGroupSize;
452
+ className?: string;
453
+ }): react_jsx_runtime.JSX.Element;
454
+
455
+ type CardProps = {
456
+ as?: React.ElementType;
457
+ title?: string;
458
+ subtitle?: string;
459
+ headerRight?: React.ReactNode;
460
+ footer?: React.ReactNode;
461
+ children?: React.ReactNode;
462
+ variant?: 'raised' | 'flat' | 'outline';
463
+ onClick?: () => void;
464
+ hoverable?: boolean;
465
+ loading?: boolean;
466
+ className?: string;
467
+ } & Record<string, unknown>;
468
+ declare function Card({ as, title, subtitle, headerRight, footer, children, variant, onClick, hoverable, loading, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
469
+
470
+ type CheckboxOption = {
471
+ value: string;
472
+ label: string;
473
+ };
474
+ declare function CheckboxGroup({ legend, options, selected, onChange, disabled, error, className, }: {
475
+ legend: string;
476
+ options: CheckboxOption[];
477
+ selected: string[];
478
+ onChange: (next: string[]) => void;
479
+ disabled?: boolean;
480
+ error?: string;
481
+ className?: string;
482
+ }): react_jsx_runtime.JSX.Element;
483
+
484
+ declare function ComboBox({ id, label, options, value, onChange, onSearch, onLoadMore, placeholder, hint, error, disabled, required, clearable, noResultsText, className, debounceMs, virtualize, }: ComboBoxProps): react_jsx_runtime.JSX.Element;
485
+
486
+ type ScoreRule = {
487
+ label: string;
488
+ check: (value: string) => boolean;
489
+ points: number;
490
+ hint?: string;
491
+ };
492
+ declare function ContentScoreBar({ value, rules, label, className, }: {
493
+ value: string;
494
+ rules: ScoreRule[];
495
+ label?: string;
496
+ className?: string;
497
+ }): react_jsx_runtime.JSX.Element;
498
+
499
+ declare function TimePicker({ id, label, hint, error, value, onChange, disabled, required, step, className, }: {
500
+ id: string;
501
+ label: string;
502
+ hint?: string;
503
+ error?: string;
504
+ value?: string;
505
+ onChange: (time: string) => void;
506
+ disabled?: boolean;
507
+ required?: boolean;
508
+ step?: number;
509
+ className?: string;
510
+ }): react_jsx_runtime.JSX.Element;
511
+
512
+ type DrawerProps = {
513
+ open: boolean;
514
+ onClose: () => void;
515
+ title: string;
516
+ side?: 'left' | 'right';
517
+ children?: React.ReactNode;
518
+ footer?: React.ReactNode;
519
+ /**
520
+ * TODO M6: when true, close on Next.js route change. Drawer use case
521
+ * is typical: closes when the user navigates from a nav drawer.
522
+ * Accepted in M1 but currently a no-op (see useRouteClose stub).
523
+ */
524
+ closeOnRouteChange?: boolean;
525
+ /** TODO M5: respect prefers-reduced-motion when true. */
526
+ reducedMotion?: boolean;
527
+ /** Portal mount target — defaults to document.body. */
528
+ portalTarget?: Element | string | null;
529
+ className?: string;
530
+ ref?: React.Ref<HTMLDivElement>;
531
+ };
532
+ declare function Drawer({ open, onClose, title, side, children, footer, closeOnRouteChange, reducedMotion: _reducedMotion, portalTarget, className, ref, }: DrawerProps): react.ReactPortal | null;
533
+
534
+ declare function EmptyState({ icon, title, description, action, className, }: {
535
+ icon?: React.ReactNode;
536
+ title: string;
537
+ description?: string;
538
+ action?: React.ReactNode;
539
+ className?: string;
540
+ }): react_jsx_runtime.JSX.Element;
541
+
542
+ type MapVariant = 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
543
+ type MapTooltipField = {
544
+ label: string;
545
+ value: string;
546
+ };
547
+ type MapTooltipData = {
548
+ title: string;
549
+ description?: string;
550
+ fields?: MapTooltipField[];
551
+ };
552
+ type MapMarker = {
553
+ id: string;
554
+ position: [number, number];
555
+ variant?: MapVariant;
556
+ tooltip?: MapTooltipData;
557
+ label?: string;
558
+ };
559
+ type MapZone = {
560
+ id: string;
561
+ positions: [number, number][];
562
+ label?: string;
563
+ variant?: MapVariant;
564
+ fillOpacity?: number;
565
+ };
566
+ type MapRoute = {
567
+ id: string;
568
+ positions: [number, number][];
569
+ label?: string;
570
+ color?: string;
571
+ weight?: number;
572
+ dashed?: boolean;
573
+ };
574
+ type MapProviderId = 'leaflet' | 'mapbox' | 'google';
575
+ type MapViewProps = {
576
+ /** Map provider implementation. Default: 'leaflet'. */
577
+ provider?: MapProviderId;
578
+ /** Provider API key (mapbox/google). Ignored by leaflet. */
579
+ apiKey?: string;
580
+ center?: [number, number];
581
+ zoom?: number;
582
+ markers?: MapMarker[];
583
+ zones?: MapZone[];
584
+ routes?: MapRoute[];
585
+ /** When set, the map auto-fits to marker bounds with this padding (px). */
586
+ fitBoundsPadding?: number;
587
+ onMarkerAdd?: (position: [number, number]) => void;
588
+ onMarkerClick?: (id: string) => void;
589
+ height?: string | number;
590
+ className?: string;
591
+ };
592
+
593
+ /**
594
+ * MapView — provider-agnostic interactive map.
595
+ *
596
+ * M1: leaflet provider with token-aware tiles (CartoDB Voyager / Dark Matter),
597
+ * fit-to-bounds, and IntersectionObserver-driven lazy loading. mapbox / google
598
+ * adapters are stubbed — switching providers throws until M1+.
599
+ */
600
+ declare function MapView({ provider, center, zoom, markers, zones, routes, fitBoundsPadding, onMarkerAdd, onMarkerClick, height, className, }: MapViewProps): react_jsx_runtime.JSX.Element;
601
+
602
+ type ModalProps = {
603
+ open: boolean;
604
+ onClose: () => void;
605
+ title: string;
606
+ description?: string;
607
+ children?: React.ReactNode;
608
+ footer?: React.ReactNode;
609
+ size?: 'sm' | 'md' | 'lg';
610
+ fullscreen?: boolean;
611
+ scrollable?: boolean;
612
+ closeOnBackdropClick?: boolean;
613
+ /**
614
+ * TODO M6: when true, close on Next.js route change.
615
+ * Accepted in M1 but currently a no-op (see useRouteClose stub).
616
+ */
617
+ closeOnRouteChange?: boolean;
618
+ /** TODO M5: respect prefers-reduced-motion when true. */
619
+ reducedMotion?: boolean;
620
+ /** Portal mount target — defaults to document.body. */
621
+ portalTarget?: Element | string | null;
622
+ className?: string;
623
+ ref?: React.Ref<HTMLDivElement>;
624
+ };
625
+ declare function Modal({ open, onClose, title, description, children, footer, size, fullscreen, scrollable, closeOnBackdropClick, closeOnRouteChange, reducedMotion: _reducedMotion, portalTarget, className, ref, }: ModalProps): react.ReactPortal | null;
626
+
627
+ type ActionVariant = 'primary' | 'secondary' | 'outline' | 'danger' | 'ghost';
628
+ type PageHeaderAction = {
629
+ label: React.ReactNode;
630
+ onClick?: () => void;
631
+ href?: string;
632
+ variant?: ActionVariant;
633
+ disabled?: boolean;
634
+ };
635
+ declare function PageHeader({ title, subtitle, badge, actions, className, }: {
636
+ title: string;
637
+ subtitle?: string;
638
+ badge?: React.ReactNode;
639
+ actions?: PageHeaderAction[];
640
+ className?: string;
641
+ }): react_jsx_runtime.JSX.Element;
642
+
643
+ type PaginationSize = 'sm' | 'md' | 'lg';
644
+ declare function Pagination({ page, totalPages, onPageChange, size, showFirstLast, showJumpTo, className, }: {
645
+ page: number;
646
+ totalPages: number;
647
+ onPageChange: (page: number) => void;
648
+ size?: PaginationSize;
649
+ showFirstLast?: boolean;
650
+ showJumpTo?: boolean;
651
+ className?: string;
652
+ }): react_jsx_runtime.JSX.Element;
653
+
654
+ /**
655
+ * Anchor positioning utilities for Popover-like overlays.
656
+ *
657
+ * TODO M4: Integrate `@floating-ui/react` (lazy-loaded) for
658
+ * auto-placement, collision detection (flip / shift), arrow positioning
659
+ * and virtual-element anchors (context menus). For M1 we expose only
660
+ * the static Tailwind class table currently used by Popover so the
661
+ * import surface is stable when M4 lands.
662
+ */
663
+ type Placement = 'top' | 'bottom' | 'left' | 'right';
664
+
665
+ type PopoverProps = {
666
+ trigger: React.ReactNode;
667
+ children: React.ReactNode;
668
+ placement?: Placement;
669
+ className?: string;
670
+ /**
671
+ * Built-in focus trap on the panel (M1). For M4 this will be
672
+ * conditional on the `as` prop (no trap for tooltips).
673
+ */
674
+ focusTrap?: boolean;
675
+ };
676
+ declare function Popover({ trigger, children, placement, className, focusTrap, }: PopoverProps): react_jsx_runtime.JSX.Element;
677
+
678
+ type RadioOption = {
679
+ value: string;
680
+ label: string;
681
+ hint?: string;
682
+ icon?: ReactNode;
683
+ };
684
+ type RadioGroupVariant = 'default' | 'card';
685
+ type RadioGroupColumns = 1 | 2 | 3;
686
+ declare function RadioGroup({ name, legend, options, value, onChange, error, disabled, className, optionClassName, variant, columns, }: {
687
+ name: string;
688
+ legend: string;
689
+ options: RadioOption[];
690
+ value?: string;
691
+ onChange?: (value: string) => void;
692
+ error?: string;
693
+ disabled?: boolean;
694
+ className?: string;
695
+ optionClassName?: string;
696
+ variant?: RadioGroupVariant;
697
+ columns?: RadioGroupColumns;
698
+ }): react_jsx_runtime.JSX.Element;
699
+
700
+ declare function SearchBar({ id, placeholder, value, onChange, onClear, className, }: {
701
+ id?: string;
702
+ placeholder?: string;
703
+ value?: string;
704
+ onChange?: (value: string) => void;
705
+ onClear?: () => void;
706
+ className?: string;
707
+ }): react_jsx_runtime.JSX.Element;
708
+
709
+ declare function SkeletonLine({ width, className }: {
710
+ width?: string;
711
+ className?: string;
712
+ }): react_jsx_runtime.JSX.Element;
713
+ declare function SkeletonAvatar({ size, className }: {
714
+ size?: 'sm' | 'md' | 'lg';
715
+ className?: string;
716
+ }): react_jsx_runtime.JSX.Element;
717
+ declare function SkeletonText({ lines, className }: {
718
+ lines?: number;
719
+ className?: string;
720
+ }): react_jsx_runtime.JSX.Element;
721
+ declare function SkeletonCard({ className }: {
722
+ className?: string;
723
+ }): react_jsx_runtime.JSX.Element;
724
+ declare function SkeletonTableRow({ cols, className }: {
725
+ cols?: number;
726
+ className?: string;
727
+ }): react_jsx_runtime.JSX.Element;
728
+
729
+ type Slide = react__default.ReactNode | {
730
+ id: string;
731
+ content: react__default.ReactNode;
732
+ };
733
+ type SliderProps = {
734
+ /** Slides to render. Plain ReactNodes (key auto) or objects with explicit id. */
735
+ slides: Slide[];
736
+ autoPlay?: boolean;
737
+ autoPlayInterval?: number;
738
+ showDots?: boolean;
739
+ showArrows?: boolean;
740
+ loop?: boolean;
741
+ /**
742
+ * Minimum horizontal pointer travel (in px) required to count as a swipe.
743
+ * Below this threshold the gesture is treated as a tap/no-op and the
744
+ * track snaps back to the current slide. Default 50.
745
+ */
746
+ dragThreshold?: number;
747
+ className?: string;
748
+ slideClassName?: string;
749
+ ariaLabel?: string;
750
+ };
751
+
752
+ declare function Slider({ slides, autoPlay, autoPlayInterval, showDots, showArrows, loop, dragThreshold, className, slideClassName, ariaLabel, }: SliderProps): react_jsx_runtime.JSX.Element | null;
753
+
754
+ type StepState = 'complete' | 'active' | 'error' | 'pending';
755
+ type StepItem = {
756
+ label: string;
757
+ description?: string;
758
+ state?: StepState;
759
+ };
760
+ declare function Stepper({ steps, orientation, className, }: {
761
+ steps: StepItem[];
762
+ orientation?: 'horizontal' | 'vertical';
763
+ className?: string;
764
+ }): react_jsx_runtime.JSX.Element;
765
+
766
+ type TabButtonProps = {
767
+ active: boolean;
768
+ onClick: () => void;
769
+ children: React.ReactNode;
770
+ count?: number;
771
+ className?: string;
772
+ };
773
+ declare function TabButton({ active, onClick, children, count, className }: TabButtonProps): react_jsx_runtime.JSX.Element;
774
+
775
+ type Tab = {
776
+ id: string;
777
+ label: string;
778
+ icon?: React.ReactNode;
779
+ badge?: React.ReactNode;
780
+ disabled?: boolean;
781
+ content: React.ReactNode;
782
+ };
783
+ declare function TabGroup({ tabs, defaultTab, label, lazy, className, }: {
784
+ tabs: Tab[];
785
+ defaultTab?: string;
786
+ label?: string;
787
+ lazy?: boolean;
788
+ className?: string;
789
+ }): react_jsx_runtime.JSX.Element;
790
+
791
+ declare function TagInput({ id, label, hint, error, value, onChange, placeholder, disabled, className, }: {
792
+ id: string;
793
+ label: string;
794
+ hint?: string;
795
+ error?: string;
796
+ value: string[];
797
+ onChange: (tags: string[]) => void;
798
+ placeholder?: string;
799
+ disabled?: boolean;
800
+ className?: string;
801
+ }): react_jsx_runtime.JSX.Element;
802
+
803
+ /**
804
+ * Resolve the effective duration for a queued toast.
805
+ * - `duration === 0` → persistent
806
+ * - `duration` set → use as-is
807
+ * - otherwise → variant default
808
+ */
809
+ declare function getEffectiveDuration(item: Pick<ToastItem, 'variant' | 'duration'>): number | null;
810
+ type ToastStore = {
811
+ toasts: ToastItem[];
812
+ add: (item: Omit<ToastItem, 'id'>) => string;
813
+ update: (id: string, patch: Partial<Omit<ToastItem, 'id'>>) => void;
814
+ remove: (id: string) => void;
815
+ clear: () => void;
816
+ /**
817
+ * Maximum number of concurrent toasts kept in the queue. When the queue
818
+ * grows past this, the oldest entries are dropped (FIFO).
819
+ */
820
+ max: number;
821
+ setMax: (max: number) => void;
822
+ };
823
+ declare const useToastStore: zustand.UseBoundStore<zustand.StoreApi<ToastStore>>;
824
+
825
+ type NodeId = string;
826
+ type TreeNode<T = unknown> = {
827
+ id: NodeId;
828
+ label: string;
829
+ children?: TreeNode<T>[];
830
+ /** Optional user payload — preserved by the tree but never inspected. */
831
+ data?: T;
832
+ };
833
+ type SelectionMode = 'single' | 'multi';
834
+ type TreeViewMessages = {
835
+ /** aria-label fallback when no `label` prop is supplied. */
836
+ tree: string;
837
+ expandAll: string;
838
+ collapseAll: string;
839
+ };
840
+ type TreeViewProps = {
841
+ nodes: TreeNode[];
842
+ /** Single-selection (legacy). When `selectionMode === 'multi'`, prefer `selectedIds`. */
843
+ selectedId?: NodeId;
844
+ selectedIds?: NodeId[];
845
+ /** Controlled expanded set. Uncontrolled defaults to "all expanded" (legacy behaviour). */
846
+ expandedIds?: NodeId[];
847
+ defaultExpandedIds?: NodeId[];
848
+ /** Initially focused row. Defaults to the first visible node. */
849
+ focusId?: NodeId;
850
+ selectionMode?: SelectionMode;
851
+ onSelect?: (id: NodeId) => void;
852
+ onSelectionChange?: (ids: NodeId[]) => void;
853
+ onExpand?: (id: NodeId, expanded: boolean) => void;
854
+ /** Fired on Enter — distinct from `onSelect` which fires on every selection change. */
855
+ onActivate?: (id: NodeId) => void;
856
+ label?: string;
857
+ className?: string;
858
+ /** Hide the "Expand all / Collapse all" toolbar. */
859
+ hideToolbar?: boolean;
860
+ messages?: Partial<TreeViewMessages>;
861
+ };
862
+
863
+ declare function TreeView({ nodes, selectedId, selectedIds, expandedIds, defaultExpandedIds, focusId: initialFocusId, selectionMode, onSelect, onSelectionChange, onExpand, onActivate, label, className, hideToolbar, messages, }: TreeViewProps): react_jsx_runtime.JSX.Element;
864
+
865
+ type QualityOption = {
866
+ label: string;
867
+ value: string;
868
+ };
869
+ type SubtitleTrack = {
870
+ label: string;
871
+ srclang?: string;
872
+ src: string;
873
+ };
874
+ type AudioTrackOption = {
875
+ label: string;
876
+ language?: string;
877
+ };
878
+ type VideoSource = {
879
+ src: string;
880
+ type?: string;
881
+ };
882
+ type CastState = 'unavailable' | 'available' | 'connecting' | 'connected';
883
+ type VideoPlayerProps = {
884
+ src: string | VideoSource | (string | VideoSource)[];
885
+ poster?: string;
886
+ title?: string;
887
+ autoPlay?: boolean;
888
+ loop?: boolean;
889
+ startMuted?: boolean;
890
+ /** Video quality options — switching is delegated to onQualityChange */
891
+ qualities?: QualityOption[];
892
+ defaultQuality?: string;
893
+ /** WebVTT subtitle tracks rendered as a custom overlay (supports font-size) */
894
+ subtitles?: SubtitleTrack[];
895
+ /** Audio language options — actual switching via onAudioTrackChange */
896
+ audioTracks?: AudioTrackOption[];
897
+ onQualityChange?: (value: string) => void;
898
+ onAudioTrackChange?: (index: number) => void;
899
+ /**
900
+ * Controlled visibility of the controls overlay.
901
+ * When provided, the component ignores internal auto-hide logic.
902
+ */
903
+ controlsVisible?: boolean;
904
+ /** When false, controls stay visible while playing (no auto-hide). Default: true */
905
+ autoHideControls?: boolean;
906
+ /** Fired whenever the controls overlay visibility changes */
907
+ onControlsVisibilityChange?: (visible: boolean) => void;
908
+ /** Enable Google Cast (Chromecast) integration. Loads the Cast SDK on mount. Default: true */
909
+ enableCast?: boolean;
910
+ /** Fired when cast session state changes */
911
+ onCastStateChange?: (state: CastState) => void;
912
+ className?: string;
913
+ };
914
+
915
+ declare function VideoPlayer({ src, poster, title, autoPlay, loop, startMuted, qualities, defaultQuality, subtitles, audioTracks, onQualityChange, onAudioTrackChange, controlsVisible, autoHideControls, onControlsVisibilityChange, enableCast, onCastStateChange, className, }: VideoPlayerProps): react_jsx_runtime.JSX.Element;
916
+
917
+ type ViewOrientation = 'horizontal' | 'vertical';
918
+ type ViewToggleProps = {
919
+ value: ViewOrientation;
920
+ onChange: (v: ViewOrientation) => void;
921
+ labels?: {
922
+ horizontal?: string;
923
+ vertical?: string;
924
+ };
925
+ ariaLabel?: string;
926
+ className?: string;
927
+ };
928
+ declare function ViewToggle({ value, onChange, labels, ariaLabel, className }: ViewToggleProps): react_jsx_runtime.JSX.Element;
929
+
930
+ declare const LazyDataTable: ComponentType<any>;
931
+ declare const LazyAdvancedDataTable: ComponentType<any>;
932
+ declare const LazyServerDataTable: ComponentType<any>;
933
+ declare const LazyDateRangePicker: ComponentType<any>;
934
+ declare const LazyMapView: ComponentType<any>;
935
+ declare const LazyVideoPlayer: ComponentType<any>;
936
+
937
+ export { AdvancedDataTable, type AlertAction, AlertBanner, type AudioTrackOption, Avatar, AvatarGroup, Badge, BrandLogo, Button, ButtonGroup, type ButtonGroupItem, Card, Checkbox, CheckboxGroup, ComboBox, ContentScoreBar, DataTable, DatePicker, DateRangePicker, Drawer, EmptyState, FileInput, Input, LazyAdvancedDataTable, LazyDataTable, LazyDateRangePicker, LazyMapView, LazyServerDataTable, LazyVideoPlayer, type MapMarker, type MapRoute, type MapTooltipData, type MapTooltipField, type MapVariant, MapView, type MapZone, Modal, PageHeader, type PageHeaderAction, Pagination, Popover, type QualityOption, RadioGroup, type RadioOption, type ScoreRule, SearchBar, ServerDataTable, SkeletonAvatar, SkeletonCard, SkeletonLine, SkeletonTableRow, SkeletonText, Slider, Spinner, StarRating, StatCard, type StepItem, Stepper, type SubtitleTrack, type Tab, TabButton, TabGroup, Table, type TableColumn, TagInput, Textarea, TimePicker, ToastItem, Toggle, type TreeNode, TreeView, VideoPlayer, type ViewOrientation, ViewToggle, getEffectiveDuration, useToastStore };