@anyemp/ui-kit 1.3.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.
- package/README.md +50 -0
- package/dist/avatar.png +0 -0
- package/dist/index.d.ts +2435 -0
- package/dist/logo.png +0 -0
- package/dist/ui-kit.css +1 -0
- package/dist/ui-kit.es.js +8888 -0
- package/dist/ui-kit.es.js.map +1 -0
- package/dist/ui-kit.umd.js +7 -0
- package/dist/ui-kit.umd.js.map +1 -0
- package/package.json +94 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2435 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { default as default_2 } from 'react';
|
|
3
|
+
import { JSX } from 'react/jsx-runtime';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
import { RefObject } from 'react';
|
|
6
|
+
|
|
7
|
+
export declare const Accordion: default_2.FC<AccordionProps>;
|
|
8
|
+
|
|
9
|
+
export declare const AccordionContent: default_2.FC<AccordionContentProps>;
|
|
10
|
+
|
|
11
|
+
export declare interface AccordionContentProps {
|
|
12
|
+
children: default_2.ReactNode;
|
|
13
|
+
/** Extra CSS classes on the inner content div */
|
|
14
|
+
sx?: string;
|
|
15
|
+
/** Inline styles on the inner content div */
|
|
16
|
+
style?: default_2.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export declare const AccordionItem: default_2.FC<AccordionItemProps>;
|
|
20
|
+
|
|
21
|
+
export declare interface AccordionItemData {
|
|
22
|
+
id: string;
|
|
23
|
+
/** Header — string or any React node */
|
|
24
|
+
title: default_2.ReactNode;
|
|
25
|
+
/** Body content */
|
|
26
|
+
content: default_2.ReactNode;
|
|
27
|
+
/** Optional leading icon (convenience — put it inside title for more control) */
|
|
28
|
+
icon?: default_2.ReactNode;
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare interface AccordionItemProps {
|
|
33
|
+
/** Unique identifier — used for open state tracking and ARIA */
|
|
34
|
+
id: string;
|
|
35
|
+
children: default_2.ReactNode;
|
|
36
|
+
/** Prevents expanding/collapsing */
|
|
37
|
+
isDisabled?: boolean;
|
|
38
|
+
/** Extra CSS classes on the item wrapper */
|
|
39
|
+
sx?: string;
|
|
40
|
+
/** Inline styles on the item wrapper */
|
|
41
|
+
style?: default_2.CSSProperties;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export declare interface AccordionProps extends Omit<AccordionRootProps, 'children'> {
|
|
45
|
+
items: AccordionItemData[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export declare const AccordionRoot: default_2.FC<AccordionRootProps>;
|
|
49
|
+
|
|
50
|
+
export declare interface AccordionRootProps {
|
|
51
|
+
children: default_2.ReactNode;
|
|
52
|
+
/** Visual style variant */
|
|
53
|
+
variant?: 'filled' | 'outlined' | 'ghost';
|
|
54
|
+
/** Scale of the component */
|
|
55
|
+
size?: 'small' | 'medium' | 'large';
|
|
56
|
+
/** Allow multiple panels open at the same time */
|
|
57
|
+
allowMultiple?: boolean;
|
|
58
|
+
/** IDs of panels open on initial render */
|
|
59
|
+
defaultOpenIds?: string[];
|
|
60
|
+
/** Called when a panel is toggled */
|
|
61
|
+
onToggle?: (id: string, isOpen: boolean) => void;
|
|
62
|
+
/** Show a divider line between trigger and content (default true) */
|
|
63
|
+
divider?: boolean;
|
|
64
|
+
/** Extra CSS classes on the root element */
|
|
65
|
+
sx?: string;
|
|
66
|
+
/** Inline styles on the root element */
|
|
67
|
+
style?: default_2.CSSProperties;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export declare const AccordionTrigger: default_2.FC<AccordionTriggerProps>;
|
|
71
|
+
|
|
72
|
+
export declare interface AccordionTriggerProps {
|
|
73
|
+
children: default_2.ReactNode;
|
|
74
|
+
/** Show rotating chevron icon at the end (default true) */
|
|
75
|
+
showChevron?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Custom node rendered before the toggle button, outside of it.
|
|
78
|
+
* Use this when the leading slot must contain interactive elements (e.g. a checkbox),
|
|
79
|
+
* since nesting `<button>` inside the trigger button is invalid HTML.
|
|
80
|
+
*/
|
|
81
|
+
startAdornment?: default_2.ReactNode;
|
|
82
|
+
/**
|
|
83
|
+
* Custom node rendered after the toggle button, outside of it.
|
|
84
|
+
* Use this for trailing actions (edit, delete, menu, etc.) — interactive elements
|
|
85
|
+
* here are siblings of the toggle button, not children, which keeps HTML valid.
|
|
86
|
+
*/
|
|
87
|
+
endAdornment?: default_2.ReactNode;
|
|
88
|
+
/** Extra CSS classes on the button */
|
|
89
|
+
sx?: string;
|
|
90
|
+
/** Inline styles on the button */
|
|
91
|
+
style?: default_2.CSSProperties;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export declare const Autocomplete: default_2.FC<AutocompleteProps>;
|
|
95
|
+
|
|
96
|
+
declare type AutocompleteChipProps = Pick<ChipProps, 'variant' | 'color' | 'size' | 'leadingIcon' | 'sx'>;
|
|
97
|
+
|
|
98
|
+
export declare interface AutocompleteProps {
|
|
99
|
+
options: SelectOption[] | SelectOptionGroup[];
|
|
100
|
+
value?: string | string[] | null;
|
|
101
|
+
defaultValue?: string | string[];
|
|
102
|
+
multiple?: boolean;
|
|
103
|
+
onChange?: (value: string | string[] | null) => void;
|
|
104
|
+
onSearchChange?: (query: string) => void;
|
|
105
|
+
filterOptions?: (options: SelectOption[], query: string) => SelectOption[];
|
|
106
|
+
label?: string;
|
|
107
|
+
placeholder?: string;
|
|
108
|
+
noOptionsText?: string;
|
|
109
|
+
size?: 'small' | 'normal' | 'large';
|
|
110
|
+
error?: boolean;
|
|
111
|
+
helperText?: string;
|
|
112
|
+
fullWidth?: boolean;
|
|
113
|
+
clearable?: boolean;
|
|
114
|
+
disabled?: boolean;
|
|
115
|
+
required?: boolean;
|
|
116
|
+
/** Props forwarded to each <Chip> in multi-select mode */
|
|
117
|
+
chipProps?: AutocompleteChipProps;
|
|
118
|
+
id?: string;
|
|
119
|
+
sx?: Partial<Record<'root' | 'trigger' | 'listbox' | 'option' | 'label' | 'helperText', string>>;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export declare const Avatar: default_2.FC<AvatarProps>;
|
|
123
|
+
|
|
124
|
+
export declare const AvatarGroup: default_2.FC<AvatarGroupProps>;
|
|
125
|
+
|
|
126
|
+
export declare interface AvatarGroupProps {
|
|
127
|
+
/** Avatar children. Non-Avatar nodes are still rendered as-is (but won't get size/colour propagation). */
|
|
128
|
+
children?: default_2.ReactNode;
|
|
129
|
+
/**
|
|
130
|
+
* Max avatars to show before collapsing the rest into a surplus indicator.
|
|
131
|
+
* When children exceed this, only `max - 1` avatars are rendered and the
|
|
132
|
+
* remainder appears as a single `+N` avatar. Default: `5`.
|
|
133
|
+
*/
|
|
134
|
+
max?: number;
|
|
135
|
+
/**
|
|
136
|
+
* Total count of avatars the group represents — useful when you only render
|
|
137
|
+
* a few children but know how many exist in total (e.g. only the first 3
|
|
138
|
+
* users are loaded, but 50 are in the team). When omitted, the count is
|
|
139
|
+
* inferred from `children.length`.
|
|
140
|
+
*/
|
|
141
|
+
total?: number;
|
|
142
|
+
/**
|
|
143
|
+
* Horizontal overlap between adjacent avatars. Either a preset
|
|
144
|
+
* (`'small'` = -4px, `'medium'` = -8px, default) or an exact pixel number.
|
|
145
|
+
*/
|
|
146
|
+
spacing?: 'small' | 'medium' | number;
|
|
147
|
+
/** Default size applied to children that don't set their own. */
|
|
148
|
+
size?: AvatarProps['size'];
|
|
149
|
+
/** Default shape applied to children that don't set their own. */
|
|
150
|
+
shape?: AvatarProps['shape'];
|
|
151
|
+
/** Background colour for the `+N` surplus indicator. */
|
|
152
|
+
surplusColor?: AvatarProps['color'];
|
|
153
|
+
/** Custom render for the surplus indicator. Receives the overflow count. */
|
|
154
|
+
renderSurplus?: (surplus: number) => default_2.ReactNode;
|
|
155
|
+
/** Extra utility classes on the root */
|
|
156
|
+
sx?: string;
|
|
157
|
+
/** Inline styles on the root */
|
|
158
|
+
style?: default_2.CSSProperties;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export declare interface AvatarProps {
|
|
162
|
+
/** Person/entity name — used for initials when no image is provided */
|
|
163
|
+
name?: string;
|
|
164
|
+
/** Image URL — if provided and loadable, replaces the initials/fallback */
|
|
165
|
+
src?: string;
|
|
166
|
+
/** Alt text for the image. Falls back to `name`. */
|
|
167
|
+
alt?: string;
|
|
168
|
+
/** Avatar size */
|
|
169
|
+
size?: 'small' | 'medium' | 'large';
|
|
170
|
+
/** Shape variant */
|
|
171
|
+
shape?: 'circle' | 'square';
|
|
172
|
+
/**
|
|
173
|
+
* Background colour for the initials fallback. Uses theme tokens, so it
|
|
174
|
+
* adapts to light/dark themes automatically. For brand colours or per-name
|
|
175
|
+
* deterministic colours, pass `style={{ backgroundColor: '...' }}` instead —
|
|
176
|
+
* the colour class is skipped when a custom background is provided.
|
|
177
|
+
*/
|
|
178
|
+
color?: 'primary' | 'secondary' | 'success' | 'tertiary' | 'warning' | 'error' | 'info' | 'neutral';
|
|
179
|
+
/**
|
|
180
|
+
* Custom fallback node rendered when there is no image AND no usable initials
|
|
181
|
+
* from `name`. Common pattern: a profile icon (e.g. `<MdPerson />`).
|
|
182
|
+
* If `fallback` is omitted, the avatar shows `?`.
|
|
183
|
+
*/
|
|
184
|
+
fallback?: default_2.ReactNode;
|
|
185
|
+
/**
|
|
186
|
+
* Forwarded to the `<img>` element. Useful for cross-origin avatars such as
|
|
187
|
+
* Google Account photos which require `'anonymous'` or `''`.
|
|
188
|
+
*/
|
|
189
|
+
crossOrigin?: 'anonymous' | 'use-credentials' | '';
|
|
190
|
+
/**
|
|
191
|
+
* Forwarded to the `<img>` element. Google Account photos (and several
|
|
192
|
+
* other 3rd-party CDNs) return 403 unless `'no-referrer'` is sent.
|
|
193
|
+
*/
|
|
194
|
+
referrerPolicy?: default_2.HTMLAttributeReferrerPolicy;
|
|
195
|
+
/** Native lazy/eager loading hint forwarded to the `<img>` element. */
|
|
196
|
+
loading?: 'eager' | 'lazy';
|
|
197
|
+
/** Extra utility classes on the root */
|
|
198
|
+
sx?: string;
|
|
199
|
+
/** Inline styles on the root (e.g. custom backgroundColor) */
|
|
200
|
+
style?: default_2.CSSProperties;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
export declare const Badge: default_2.FC<BadgeProps>;
|
|
204
|
+
|
|
205
|
+
export declare interface BadgeProps {
|
|
206
|
+
label: string;
|
|
207
|
+
icon?: default_2.ReactNode;
|
|
208
|
+
variant?: 'filled' | 'outlined' | 'subtle';
|
|
209
|
+
color?: 'primary' | 'secondary' | 'success' | 'tertiary' | 'warning' | 'error' | 'info' | 'neutral';
|
|
210
|
+
/**
|
|
211
|
+
* Gradient configuration for the badge
|
|
212
|
+
* Can be a predefined variant (e.g., "primary-horizontal") or a custom gradient object
|
|
213
|
+
* When gradient is specified, it takes priority over the color prop
|
|
214
|
+
*/
|
|
215
|
+
gradient?: GradientConfig;
|
|
216
|
+
size?: 'small' | 'medium' | 'large';
|
|
217
|
+
sx?: string;
|
|
218
|
+
style?: default_2.CSSProperties;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
declare interface BaseFilterSection {
|
|
222
|
+
id: string;
|
|
223
|
+
title: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export declare type BreakpointTokens = {
|
|
227
|
+
'--breakpoint-mobile-min': string;
|
|
228
|
+
'--breakpoint-mobile-max': string;
|
|
229
|
+
'--breakpoint-tablet-min': string;
|
|
230
|
+
'--breakpoint-tablet-max': string;
|
|
231
|
+
'--breakpoint-desktop-min': string;
|
|
232
|
+
'--breakpoint-desktop-max': string;
|
|
233
|
+
'--breakpoint-large-desktop-min': string;
|
|
234
|
+
'--breakpoint-large-desktop-max': string;
|
|
235
|
+
'--breakpoint-extra-large-min': string;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
export declare const Button: default_2.FC<ButtonProps>;
|
|
239
|
+
|
|
240
|
+
export declare interface ButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> {
|
|
241
|
+
variant?: 'filled' | 'outlined' | 'ghost' | 'text';
|
|
242
|
+
color?: 'primary' | 'secondary' | 'success' | 'tertiary' | 'warning' | 'error' | 'info' | 'neutral';
|
|
243
|
+
/**
|
|
244
|
+
* Gradient configuration for the button
|
|
245
|
+
* Can be a predefined variant (e.g., "primary-horizontal") or a custom gradient object
|
|
246
|
+
* When gradient is specified, it takes priority over the color prop
|
|
247
|
+
*/
|
|
248
|
+
gradient?: GradientConfig;
|
|
249
|
+
size?: 'small' | 'medium' | 'large';
|
|
250
|
+
disabled?: boolean;
|
|
251
|
+
children: default_2.ReactNode;
|
|
252
|
+
/** Utility classes (e.g., "rounded-full", "rounded-xl") */
|
|
253
|
+
sx?: string;
|
|
254
|
+
/** Custom inline styles (background, color, borderColor, etc.) */
|
|
255
|
+
style?: default_2.CSSProperties;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export declare const Calendar: default_2.FC<CalendarProps>;
|
|
259
|
+
|
|
260
|
+
declare interface CalendarDateRange {
|
|
261
|
+
start: Date | null;
|
|
262
|
+
end: Date | null;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export declare interface CalendarEvent {
|
|
266
|
+
id: string;
|
|
267
|
+
category: CalendarEventCategory;
|
|
268
|
+
/** Auto-generated from category meta label if not provided */
|
|
269
|
+
title?: string;
|
|
270
|
+
/** YYYY-MM-DD — start day */
|
|
271
|
+
date: string;
|
|
272
|
+
/**
|
|
273
|
+
* YYYY-MM-DD — inclusive last day for multi-day range events.
|
|
274
|
+
* When set and greater than `date`, the event is rendered as a horizontal
|
|
275
|
+
* range bar spanning days in month/week views (and in the all-day section
|
|
276
|
+
* of the day view). `time`/`duration` are ignored for range events.
|
|
277
|
+
*/
|
|
278
|
+
endDate?: string;
|
|
279
|
+
/** HH:mm */
|
|
280
|
+
time?: string;
|
|
281
|
+
/** Duration in minutes */
|
|
282
|
+
duration?: number;
|
|
283
|
+
notes?: string;
|
|
284
|
+
urgent?: boolean;
|
|
285
|
+
/** google_meet | zoom | discord | whatsapp | teams | phone | in_person | any string */
|
|
286
|
+
platform?: string;
|
|
287
|
+
meetLink?: string;
|
|
288
|
+
/** Arbitrary custom fields — accessible in render props */
|
|
289
|
+
data?: Record<string, unknown>;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/** Open string type — pass any category string */
|
|
293
|
+
export declare type CalendarEventCategory = string;
|
|
294
|
+
|
|
295
|
+
export declare interface CalendarFilterOption {
|
|
296
|
+
id?: string;
|
|
297
|
+
value: string;
|
|
298
|
+
label: string;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export declare type CalendarFilterSection = PillsFilterSection | SelectFilterSection | DateRangeFilterSection;
|
|
302
|
+
|
|
303
|
+
export declare const CalendarKPIStrip: default_2.FC<CalendarKPIStripProps>;
|
|
304
|
+
|
|
305
|
+
declare interface CalendarKPIStripProps {
|
|
306
|
+
metrics: KPIMetric[];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
export declare interface CalendarProps {
|
|
310
|
+
events?: CalendarEvent[];
|
|
311
|
+
defaultView?: CalendarView;
|
|
312
|
+
initialDate?: Date;
|
|
313
|
+
/**
|
|
314
|
+
* Category styling metadata.
|
|
315
|
+
* No built-in categories are applied by default — pass your own.
|
|
316
|
+
* Export CATEGORY_META from '@anyemp/ui-kit' for the recruitment preset.
|
|
317
|
+
*/
|
|
318
|
+
categoryMeta?: Record<string, CategoryMetaItem>;
|
|
319
|
+
/**
|
|
320
|
+
* Custom filter sections for the filter panel.
|
|
321
|
+
* When provided, replaces the auto-generated sections.
|
|
322
|
+
*/
|
|
323
|
+
filterSections?: CalendarFilterSection[];
|
|
324
|
+
/**
|
|
325
|
+
* Controlled filter values. When provided together with `onFilterValuesChange`,
|
|
326
|
+
* the Calendar operates in controlled mode — the parent owns the filter state.
|
|
327
|
+
* Use this when you need to programmatically update filter values from outside
|
|
328
|
+
* (e.g. clear `statusIds` when `talentTypes` selection changes).
|
|
329
|
+
*/
|
|
330
|
+
filterValues?: Record<string, FilterSectionValue>;
|
|
331
|
+
/**
|
|
332
|
+
* Called whenever the user changes any filter value (controlled mode).
|
|
333
|
+
* Must be provided together with `filterValues`.
|
|
334
|
+
*/
|
|
335
|
+
onFilterValuesChange?: (values: Record<string, FilterSectionValue>) => void;
|
|
336
|
+
/**
|
|
337
|
+
* Called when the user clicks "+ Add" or presses N.
|
|
338
|
+
* When provided, shows the "+ Add" button.
|
|
339
|
+
*/
|
|
340
|
+
onAddClick?: (date?: string) => void;
|
|
341
|
+
/**
|
|
342
|
+
* Called when the user clicks "Edit" in the event sidebar.
|
|
343
|
+
* When provided, shows the Edit button in the sidebar.
|
|
344
|
+
*/
|
|
345
|
+
onEditClick?: (event: CalendarEvent) => void;
|
|
346
|
+
/**
|
|
347
|
+
* Called by the parent after a new event is created.
|
|
348
|
+
* Also used as a signal to show "+ Add" button if onAddClick is absent.
|
|
349
|
+
*/
|
|
350
|
+
onEventCreate?: (event: Omit<CalendarEvent, 'id'>) => void;
|
|
351
|
+
/** Called when sidebar Delete button is clicked */
|
|
352
|
+
onEventDelete?: (id: string) => void;
|
|
353
|
+
/**
|
|
354
|
+
* Custom event card renderer for all views (month, week, day).
|
|
355
|
+
* Replaces the built-in CalendarEventCard.
|
|
356
|
+
* compact=true in month grid cells and day all-day section.
|
|
357
|
+
*/
|
|
358
|
+
renderEvent?: (event: CalendarEvent, compact: boolean) => React.ReactNode;
|
|
359
|
+
/**
|
|
360
|
+
* Custom KPI strip renderer.
|
|
361
|
+
* When provided, replaces the built-in CalendarKPIStrip.
|
|
362
|
+
*/
|
|
363
|
+
renderKPI?: () => React.ReactNode;
|
|
364
|
+
/**
|
|
365
|
+
* Custom body renderer for the single-event sidebar detail view.
|
|
366
|
+
* Replaces only the scrollable body section; header and footer stay built-in.
|
|
367
|
+
*/
|
|
368
|
+
renderSidebarDetail?: (event: CalendarEvent) => React.ReactNode;
|
|
369
|
+
/**
|
|
370
|
+
* Replaces the built-in filter panel entirely.
|
|
371
|
+
* Receives `isOpen` and `onClose` so it can react to the filter button toggle.
|
|
372
|
+
* When provided, `filterSections` and `onFilterChange` are ignored.
|
|
373
|
+
*/
|
|
374
|
+
renderFilterPanel?: (props: {
|
|
375
|
+
isOpen: boolean;
|
|
376
|
+
onClose: () => void;
|
|
377
|
+
}) => React.ReactNode;
|
|
378
|
+
/**
|
|
379
|
+
* Replaces only the body (sections area) of the built-in filter panel.
|
|
380
|
+
* Header and footer (Apply / Reset) remain.
|
|
381
|
+
* When provided, `filterSections` is ignored.
|
|
382
|
+
*/
|
|
383
|
+
renderFilterPanelBody?: () => React.ReactNode;
|
|
384
|
+
/**
|
|
385
|
+
* Custom renderer for each event row in the sidebar day-list view.
|
|
386
|
+
*/
|
|
387
|
+
renderSidebarItem?: (event: CalendarEvent) => React.ReactNode;
|
|
388
|
+
/**
|
|
389
|
+
* Called when the user changes any filter value.
|
|
390
|
+
* When provided, internal client-side filtering is disabled.
|
|
391
|
+
*/
|
|
392
|
+
onFilterChange?: (filters: Record<string, FilterSectionValue>) => void;
|
|
393
|
+
/**
|
|
394
|
+
* Called on mount and whenever the user navigates (prev/next) or switches view.
|
|
395
|
+
* Provides the exact date range visible on screen so the parent can fetch events.
|
|
396
|
+
* - month: includes padding days from adjacent months shown in the grid
|
|
397
|
+
* - week: Monday–Sunday of the visible week
|
|
398
|
+
* - day: the single selected day
|
|
399
|
+
*/
|
|
400
|
+
onNavigate?: (range: {
|
|
401
|
+
start: Date;
|
|
402
|
+
end: Date;
|
|
403
|
+
}) => void;
|
|
404
|
+
/** Show Ctrl+K search overlay. Default: true */
|
|
405
|
+
showSearch?: boolean;
|
|
406
|
+
/** Show filter panel button. Default: true */
|
|
407
|
+
showFilters?: boolean;
|
|
408
|
+
/** Show right sidebar when an event is clicked. Default: true */
|
|
409
|
+
showSidebar?: boolean;
|
|
410
|
+
/**
|
|
411
|
+
* When true, the calendar fills the full viewport height (`100dvh`).
|
|
412
|
+
* Use when the Calendar is the primary page content.
|
|
413
|
+
* Default: false.
|
|
414
|
+
*/
|
|
415
|
+
pageMode?: boolean;
|
|
416
|
+
sx?: string;
|
|
417
|
+
style?: React.CSSProperties;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
export declare type CalendarView = 'month' | 'week' | 'day';
|
|
421
|
+
|
|
422
|
+
export declare interface CategoryMetaItem {
|
|
423
|
+
label: string;
|
|
424
|
+
short: string;
|
|
425
|
+
/** Required for variant 'icon'; used as decoration in search/sidebar */
|
|
426
|
+
icon?: string;
|
|
427
|
+
color: string;
|
|
428
|
+
bg: string;
|
|
429
|
+
/** 'bar' = colored left bar (default), 'icon' = emoji icon + dashed border */
|
|
430
|
+
variant?: 'bar' | 'icon';
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
export declare const Checkbox: default_2.FC<CheckboxProps>;
|
|
434
|
+
|
|
435
|
+
export declare interface CheckboxProps {
|
|
436
|
+
/** Controlled checked state */
|
|
437
|
+
checked?: boolean;
|
|
438
|
+
/** Uncontrolled initial checked state */
|
|
439
|
+
defaultChecked?: boolean;
|
|
440
|
+
/** Called when the checkbox value changes */
|
|
441
|
+
onChange?: (checked: boolean, event: default_2.ChangeEvent<HTMLInputElement>) => void;
|
|
442
|
+
/** Label text or node rendered beside the checkbox */
|
|
443
|
+
label?: default_2.ReactNode;
|
|
444
|
+
/** Colour theme applied to the checked/indeterminate state */
|
|
445
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
446
|
+
/** Checkbox size */
|
|
447
|
+
size?: 'small' | 'medium' | 'large';
|
|
448
|
+
/** Indeterminate state — overrides the visual appearance regardless of checked */
|
|
449
|
+
isIndeterminate?: boolean;
|
|
450
|
+
/** Disables all interaction */
|
|
451
|
+
isDisabled?: boolean;
|
|
452
|
+
/** name attribute forwarded to the native input */
|
|
453
|
+
name?: string;
|
|
454
|
+
/** value attribute forwarded to the native input */
|
|
455
|
+
value?: string;
|
|
456
|
+
/** id forwarded to the native input (label htmlFor uses this) */
|
|
457
|
+
id?: string;
|
|
458
|
+
/** Additional CSS class(es) appended to the root element */
|
|
459
|
+
sx?: string;
|
|
460
|
+
/** Inline styles applied directly to the root element */
|
|
461
|
+
style?: default_2.CSSProperties;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export declare const Chip: default_2.FC<ChipProps>;
|
|
465
|
+
|
|
466
|
+
export declare interface ChipProps {
|
|
467
|
+
/** Text label displayed inside the chip */
|
|
468
|
+
label: string;
|
|
469
|
+
/** Icon rendered before the label */
|
|
470
|
+
leadingIcon?: default_2.ReactNode;
|
|
471
|
+
/** Icon rendered after the label (ignored when onDelete is set) */
|
|
472
|
+
trailingIcon?: default_2.ReactNode;
|
|
473
|
+
/** Visual style variant */
|
|
474
|
+
variant?: 'filled' | 'outlined' | 'ghost';
|
|
475
|
+
/** Colour theme */
|
|
476
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
477
|
+
/** Chip size */
|
|
478
|
+
size?: 'small' | 'medium' | 'large';
|
|
479
|
+
/** Whether the chip is in a selected / active state */
|
|
480
|
+
selected?: boolean;
|
|
481
|
+
/** Disables all interaction and dims the chip */
|
|
482
|
+
disabled?: boolean;
|
|
483
|
+
/** Makes the chip interactive – called when the chip body is clicked */
|
|
484
|
+
onClick?: (event: default_2.MouseEvent<HTMLDivElement>) => void;
|
|
485
|
+
/** Shows a delete (×) button and calls this handler when it is clicked */
|
|
486
|
+
onDelete?: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
487
|
+
/** Additional CSS class(es) appended to the root element */
|
|
488
|
+
sx?: string;
|
|
489
|
+
/** Inline styles applied directly to the root element */
|
|
490
|
+
style?: default_2.CSSProperties;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
export declare type ColorToken = 'primary-main' | 'primary-light' | 'primary-dark' | 'secondary-main' | 'secondary-light' | 'secondary-dark' | 'success-main' | 'success-light' | 'success-dark' | 'tertiary-main' | 'tertiary-light' | 'tertiary-dark' | 'warning-main' | 'warning-light' | 'warning-dark' | 'error-main' | 'error-light' | 'error-dark' | 'info-main' | 'info-light' | 'info-dark' | 'background-default' | 'background-paper' | 'text-primary' | 'text-secondary';
|
|
494
|
+
|
|
495
|
+
/** Granular toggles for the built-in column menu. Anything omitted defaults
|
|
496
|
+
* to `true` when the menu is enabled. `manage` controls visibility of the
|
|
497
|
+
* "Manage columns" footer item; turning it off leaves only the small
|
|
498
|
+
* per-action items in the header context menu. */
|
|
499
|
+
declare interface ColumnMenuConfig {
|
|
500
|
+
pin?: boolean;
|
|
501
|
+
hide?: boolean;
|
|
502
|
+
reorder?: boolean;
|
|
503
|
+
manage?: boolean;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
declare interface ColumnMenuDefaults {
|
|
507
|
+
pinned?: string[];
|
|
508
|
+
hidden?: string[];
|
|
509
|
+
order?: string[];
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
declare interface ColumnMenuLabels {
|
|
513
|
+
/** Small-menu items */
|
|
514
|
+
pin?: string;
|
|
515
|
+
unpin?: string;
|
|
516
|
+
hide?: string;
|
|
517
|
+
manage?: string;
|
|
518
|
+
/** Manage-columns popover */
|
|
519
|
+
manageTitle?: string;
|
|
520
|
+
unpinAll?: string;
|
|
521
|
+
showAll?: string;
|
|
522
|
+
reset?: string;
|
|
523
|
+
lockedHint?: string;
|
|
524
|
+
/** Drag handle a11y label in the Manage popover. Default `'Reorder'`. */
|
|
525
|
+
dragHandle?: string;
|
|
526
|
+
/** Close-button a11y label in the Manage popover. Default `'Close'`. */
|
|
527
|
+
close?: string;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
export declare type CombinedGradientType = 'primary-secondary' | 'primary-tertiary' | 'primary-success' | 'success-tertiary' | 'warning-error' | 'info-primary';
|
|
531
|
+
|
|
532
|
+
export declare type CombinedGradientVariant = `${CombinedGradientType}-${GradientDirection}`;
|
|
533
|
+
|
|
534
|
+
export declare type ComponentTokens = {
|
|
535
|
+
'--button-padding-x'?: string;
|
|
536
|
+
'--button-padding-y'?: string;
|
|
537
|
+
'--button-border-width'?: string;
|
|
538
|
+
'--button-border-radius'?: string;
|
|
539
|
+
'--textfield-border-color'?: string;
|
|
540
|
+
'--textfield-border-radius'?: string;
|
|
541
|
+
'--textfield-padding-x'?: string;
|
|
542
|
+
'--textfield-padding-y'?: string;
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
export declare interface ConfirmContextValue {
|
|
546
|
+
/** Open a confirmation dialog. Resolves with `true` on Confirm, `false` on Cancel/Escape/backdrop. */
|
|
547
|
+
confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export declare const ConfirmDialog: default_2.FC<ConfirmDialogProps>;
|
|
551
|
+
|
|
552
|
+
export declare interface ConfirmDialogProps {
|
|
553
|
+
/** Whether the dialog is visible */
|
|
554
|
+
open: boolean;
|
|
555
|
+
/** Title displayed at the top of the dialog */
|
|
556
|
+
title?: string;
|
|
557
|
+
/** Body text or content */
|
|
558
|
+
message?: default_2.ReactNode;
|
|
559
|
+
/** Confirm button label. Default: "Confirm" */
|
|
560
|
+
confirmLabel?: string;
|
|
561
|
+
/** Cancel button label. Default: "Cancel" */
|
|
562
|
+
cancelLabel?: string;
|
|
563
|
+
/** Confirm button colour — use 'error' for destructive actions */
|
|
564
|
+
confirmColor?: ButtonProps['color'];
|
|
565
|
+
/** Called when the user clicks Confirm */
|
|
566
|
+
onConfirm: () => void;
|
|
567
|
+
/** Called when the user clicks Cancel, the backdrop, the close button, or presses Escape */
|
|
568
|
+
onCancel: () => void;
|
|
569
|
+
/** Hide the Cancel button (e.g. for an OK-only acknowledgement) */
|
|
570
|
+
hideCancel?: boolean;
|
|
571
|
+
/**
|
|
572
|
+
* Whether clicking the backdrop dismisses the dialog (treated as Cancel).
|
|
573
|
+
* Default: `true`. Set to `false` to force an explicit Cancel / Confirm / Close-icon click.
|
|
574
|
+
*/
|
|
575
|
+
closeOnBackdropClick?: boolean;
|
|
576
|
+
/**
|
|
577
|
+
* Whether pressing Escape dismisses the dialog (treated as Cancel).
|
|
578
|
+
* Default: `true`. Set to `false` to force an explicit button click.
|
|
579
|
+
*/
|
|
580
|
+
closeOnEscape?: boolean;
|
|
581
|
+
/**
|
|
582
|
+
* Return focus to the element that opened the dialog when it closes.
|
|
583
|
+
* Defaults to `false` — useful when the trigger element is unmounted or
|
|
584
|
+
* the user is moving on to a different area (e.g. after deleting a row).
|
|
585
|
+
* Set to `true` to restore focus (helpful for keyboard-only flows where
|
|
586
|
+
* the trigger is still visible).
|
|
587
|
+
*/
|
|
588
|
+
returnFocusOnClose?: boolean;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export declare interface ConfirmOptions {
|
|
592
|
+
title?: string;
|
|
593
|
+
message?: React.ReactNode;
|
|
594
|
+
confirmLabel?: string;
|
|
595
|
+
cancelLabel?: string;
|
|
596
|
+
confirmColor?: ButtonProps['color'];
|
|
597
|
+
hideCancel?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Whether clicking the backdrop dismisses the dialog (treated as Cancel).
|
|
600
|
+
* Default: `true`. Set to `false` to require an explicit Cancel/Confirm/Close-icon click.
|
|
601
|
+
*/
|
|
602
|
+
closeOnBackdropClick?: boolean;
|
|
603
|
+
/**
|
|
604
|
+
* Whether pressing Escape dismisses the dialog (treated as Cancel).
|
|
605
|
+
* Default: `true`.
|
|
606
|
+
*/
|
|
607
|
+
closeOnEscape?: boolean;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
export declare const ConfirmProvider: default_2.FC<ConfirmProviderProps>;
|
|
611
|
+
|
|
612
|
+
export declare interface ConfirmProviderProps {
|
|
613
|
+
children: default_2.ReactNode;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
declare interface CourseAuthor {
|
|
617
|
+
username: string;
|
|
618
|
+
avatarUrl?: string;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
export declare const CourseCard: default_2.FC<CourseCardProps>;
|
|
622
|
+
|
|
623
|
+
export declare interface CourseCardProps {
|
|
624
|
+
title: string;
|
|
625
|
+
description?: string;
|
|
626
|
+
imageUrl?: string;
|
|
627
|
+
difficulty?: 'beginner' | 'intermediate' | 'advanced';
|
|
628
|
+
durationMinutes?: number;
|
|
629
|
+
lessonCount?: number;
|
|
630
|
+
testCount?: number;
|
|
631
|
+
videoCount?: number;
|
|
632
|
+
presentationCount?: number;
|
|
633
|
+
professions?: CourseProfession[];
|
|
634
|
+
progress?: number;
|
|
635
|
+
rating?: number;
|
|
636
|
+
author?: CourseAuthor;
|
|
637
|
+
isCompleted?: boolean;
|
|
638
|
+
isDraft?: boolean;
|
|
639
|
+
isRecommended?: boolean;
|
|
640
|
+
badgeSlot?: default_2.ReactNode;
|
|
641
|
+
isBookmarked?: boolean;
|
|
642
|
+
onBookmarkToggle?: (isBookmarked: boolean) => void;
|
|
643
|
+
href?: string;
|
|
644
|
+
target?: string;
|
|
645
|
+
onClick?: () => void;
|
|
646
|
+
sx?: string;
|
|
647
|
+
}
|
|
648
|
+
|
|
649
|
+
export declare interface CourseProfession {
|
|
650
|
+
name: string;
|
|
651
|
+
color?: string;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Custom gradient configuration
|
|
656
|
+
* Supports both hex colors and color tokens
|
|
657
|
+
*/
|
|
658
|
+
export declare interface CustomGradient {
|
|
659
|
+
/** Start color - hex (#FF6B6B) or color token (primary-main) */
|
|
660
|
+
from: string | ColorToken;
|
|
661
|
+
/** End color - hex (#4ECDC4) or color token (secondary-main) */
|
|
662
|
+
to: string | ColorToken;
|
|
663
|
+
/** Optional gradient direction - defaults to 'diagonal' */
|
|
664
|
+
direction?: GradientDirection;
|
|
665
|
+
/** Optional middle color for 3-stop gradients */
|
|
666
|
+
via?: string | ColorToken;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
export declare const DatePicker: default_2.ForwardRefExoticComponent<DatePickerProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
670
|
+
|
|
671
|
+
export declare interface DatePickerProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'className' | 'type'> {
|
|
672
|
+
/** 'single' selects one date, 'range' selects start + end */
|
|
673
|
+
mode?: 'single' | 'range';
|
|
674
|
+
value?: Date | null;
|
|
675
|
+
onChange?: (date: Date | null) => void;
|
|
676
|
+
rangeValue?: DateRange;
|
|
677
|
+
onRangeChange?: (range: DateRange) => void;
|
|
678
|
+
/** 'input' renders a text field with calendar icon; 'icon' renders only the icon button */
|
|
679
|
+
triggerVariant?: 'input' | 'icon';
|
|
680
|
+
/** Date format string using DD, MM, YYYY tokens. With `showTime`, append ` HH:mm` (or include HH and mm in `format`). Default: 'DD.MM.YYYY' */
|
|
681
|
+
format?: string;
|
|
682
|
+
placeholder?: string;
|
|
683
|
+
minDate?: Date;
|
|
684
|
+
maxDate?: Date;
|
|
685
|
+
/** Specific dates that are not selectable */
|
|
686
|
+
disabledDates?: Date[];
|
|
687
|
+
/** Days of week that are not selectable (0 = Sunday, 1 = Monday, …, 6 = Saturday) */
|
|
688
|
+
disabledDaysOfWeek?: number[];
|
|
689
|
+
/** Custom function to determine if a date is disabled */
|
|
690
|
+
isDateDisabled?: (date: Date) => boolean;
|
|
691
|
+
/** Show hour / minute inputs below the calendar */
|
|
692
|
+
showTime?: boolean;
|
|
693
|
+
/**
|
|
694
|
+
* Minute step for the time lists and validation (`1` = every minute; `30` = half-hour grid from
|
|
695
|
+
* midnight; `60` = hourly). Choose per screen or data source — nothing is fixed inside the component.
|
|
696
|
+
* @default 1
|
|
697
|
+
*/
|
|
698
|
+
timeStep?: number;
|
|
699
|
+
/**
|
|
700
|
+
* Returns inclusive min/max **local** time for the given calendar date.
|
|
701
|
+
* Omit `getTimeBounds` entirely for **no** time-of-day limits (full 00:00–23:59, subject to `timeStep`).
|
|
702
|
+
* Omit only `min`/`max` inside the object for open-ended start or end of the allowed window.
|
|
703
|
+
* Return `null` if that calendar day has no selectable times (day is disabled when `showTime`).
|
|
704
|
+
*/
|
|
705
|
+
getTimeBounds?: (selectedDay: Date) => TimeBounds | null;
|
|
706
|
+
/** Custom preset buttons. Used only when showPresets is true */
|
|
707
|
+
presets?: DatePreset[];
|
|
708
|
+
/** Show a preset panel on the left of the popup */
|
|
709
|
+
showPresets?: boolean;
|
|
710
|
+
/** Show two calendar months side by side. Defaults to true when mode='range' */
|
|
711
|
+
multiMonth?: boolean;
|
|
712
|
+
label?: string;
|
|
713
|
+
helperText?: string;
|
|
714
|
+
error?: boolean;
|
|
715
|
+
disabled?: boolean;
|
|
716
|
+
required?: boolean;
|
|
717
|
+
size?: 'small' | 'normal' | 'large';
|
|
718
|
+
fullWidth?: boolean;
|
|
719
|
+
/** Custom node rendered inside the input wrapper, before the input. Ignored when `triggerVariant='icon'`. */
|
|
720
|
+
startAdornment?: default_2.ReactNode;
|
|
721
|
+
/** Custom node rendered between the input and the built-in clear/calendar buttons. Ignored when `triggerVariant='icon'`. */
|
|
722
|
+
endAdornment?: default_2.ReactNode;
|
|
723
|
+
/** Extra CSS classes targeting individual parts. */
|
|
724
|
+
sx?: Partial<Record<'root' | 'wrapper' | 'input' | 'label' | 'helperText' | 'popup', string>>;
|
|
725
|
+
style?: default_2.CSSProperties;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
export declare interface DatePreset {
|
|
729
|
+
label: string;
|
|
730
|
+
getValue: () => Date | DateRange;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
export declare interface DateRange {
|
|
734
|
+
start: Date | null;
|
|
735
|
+
end: Date | null;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
declare interface DateRangeFilterSection extends BaseFilterSection {
|
|
739
|
+
type: 'daterange';
|
|
740
|
+
minDate?: Date;
|
|
741
|
+
maxDate?: Date;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export declare type DepartmentTokens = {
|
|
745
|
+
'--department-all-default': string;
|
|
746
|
+
'--department-all-hover': string;
|
|
747
|
+
'--department-all-active': string;
|
|
748
|
+
'--department-design-default': string;
|
|
749
|
+
'--department-design-hover': string;
|
|
750
|
+
'--department-design-active': string;
|
|
751
|
+
'--department-development-default': string;
|
|
752
|
+
'--department-development-hover': string;
|
|
753
|
+
'--department-development-active': string;
|
|
754
|
+
'--department-management-default': string;
|
|
755
|
+
'--department-management-hover': string;
|
|
756
|
+
'--department-management-active': string;
|
|
757
|
+
'--department-marketing-default': string;
|
|
758
|
+
'--department-marketing-hover': string;
|
|
759
|
+
'--department-marketing-active': string;
|
|
760
|
+
'--department-video-default': string;
|
|
761
|
+
'--department-video-hover': string;
|
|
762
|
+
'--department-video-active': string;
|
|
763
|
+
};
|
|
764
|
+
|
|
765
|
+
export declare type DepartmentType = 'all' | 'design' | 'development' | 'management' | 'marketing' | 'video';
|
|
766
|
+
|
|
767
|
+
export declare const Drawer: default_2.FC<DrawerProps>;
|
|
768
|
+
|
|
769
|
+
export declare interface DrawerProps {
|
|
770
|
+
/** Controls whether the drawer is visible */
|
|
771
|
+
open: boolean;
|
|
772
|
+
/** Callback fired when the drawer requests to be closed */
|
|
773
|
+
onClose?: () => void;
|
|
774
|
+
/** Whether clicking the backdrop closes the drawer */
|
|
775
|
+
closeOnBackdropClick?: boolean;
|
|
776
|
+
/** Whether pressing Escape key closes the drawer */
|
|
777
|
+
closeOnEscape?: boolean;
|
|
778
|
+
/** Whether to show the close button */
|
|
779
|
+
showCloseButton?: boolean;
|
|
780
|
+
/** Position from which the drawer slides in */
|
|
781
|
+
anchor?: 'left' | 'right' | 'top' | 'bottom';
|
|
782
|
+
/** Width of the drawer (for left/right anchors) */
|
|
783
|
+
width?: string;
|
|
784
|
+
/** Height of the drawer (for top/bottom anchors) */
|
|
785
|
+
height?: string;
|
|
786
|
+
/** Drawer content */
|
|
787
|
+
children: default_2.ReactNode;
|
|
788
|
+
/** Utility classes (e.g., "rounded-xl") */
|
|
789
|
+
sx?: string;
|
|
790
|
+
/** Custom inline styles for the drawer content */
|
|
791
|
+
style?: default_2.CSSProperties;
|
|
792
|
+
/** Custom inline styles for the backdrop */
|
|
793
|
+
backdropStyle?: default_2.CSSProperties;
|
|
794
|
+
/** Hide the dark backdrop overlay */
|
|
795
|
+
hideBackdrop?: boolean;
|
|
796
|
+
/** Custom portal container ID */
|
|
797
|
+
portalContainerId?: string;
|
|
798
|
+
/** Element to focus when drawer opens */
|
|
799
|
+
initialFocusRef?: default_2.RefObject<HTMLElement>;
|
|
800
|
+
/** Whether to return focus to trigger element on close */
|
|
801
|
+
returnFocusOnClose?: boolean;
|
|
802
|
+
/** Whether to trap focus within drawer */
|
|
803
|
+
trapFocus?: boolean;
|
|
804
|
+
/** Title text displayed in the drawer header */
|
|
805
|
+
title?: string;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
export declare const Dropdown: default_2.FC<DropdownProps>;
|
|
809
|
+
|
|
810
|
+
export declare const DropdownItem: default_2.FC<DropdownItemProps>;
|
|
811
|
+
|
|
812
|
+
export declare interface DropdownItemProps {
|
|
813
|
+
children: default_2.ReactNode;
|
|
814
|
+
disabled?: boolean;
|
|
815
|
+
selected?: boolean;
|
|
816
|
+
onClick?: () => void;
|
|
817
|
+
/** Extra CSS class applied to the item wrapper div */
|
|
818
|
+
sx?: string;
|
|
819
|
+
/** Inline styles applied to the item wrapper div */
|
|
820
|
+
style?: default_2.CSSProperties;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
export declare interface DropdownProps {
|
|
824
|
+
/** Trigger element — any ReactNode; click is captured by the Dropdown wrapper */
|
|
825
|
+
trigger: default_2.ReactNode;
|
|
826
|
+
/** Menu content — free-form */
|
|
827
|
+
children: default_2.ReactNode;
|
|
828
|
+
/** Placement relative to trigger (default: 'bottom-end') */
|
|
829
|
+
placement?: 'bottom-start' | 'bottom-end' | 'bottom';
|
|
830
|
+
/** Show dividers between items (default: false) */
|
|
831
|
+
divider?: boolean;
|
|
832
|
+
/**
|
|
833
|
+
* 'menu' — items are selectable: hover highlight + pointer cursor + keyboard nav (default)
|
|
834
|
+
* 'info' — read-only list: no hover, no pointer cursor, no focus on items
|
|
835
|
+
*/
|
|
836
|
+
variant?: 'menu' | 'info';
|
|
837
|
+
/**
|
|
838
|
+
* Render the menu in a portal (attached to <body>) with `position: fixed`
|
|
839
|
+
* coordinates computed from the trigger. Use this when the Dropdown lives
|
|
840
|
+
* inside a scroll container (e.g. Table viewport with `overflow: auto`) or
|
|
841
|
+
* inside a Modal — otherwise the menu is clipped by ancestor overflow /
|
|
842
|
+
* covered by the Modal backdrop.
|
|
843
|
+
*
|
|
844
|
+
* Default: `false` (in-flow, `position: absolute` inside the trigger).
|
|
845
|
+
*/
|
|
846
|
+
portal?: boolean;
|
|
847
|
+
/** Custom CSS classes for root and/or menu container */
|
|
848
|
+
sx?: {
|
|
849
|
+
root?: string;
|
|
850
|
+
menu?: string;
|
|
851
|
+
};
|
|
852
|
+
/** Inline styles for root and/or menu container */
|
|
853
|
+
style?: {
|
|
854
|
+
root?: default_2.CSSProperties;
|
|
855
|
+
menu?: default_2.CSSProperties;
|
|
856
|
+
};
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
export declare interface Employee {
|
|
860
|
+
talentId: string;
|
|
861
|
+
shortName: string | null;
|
|
862
|
+
slug: string;
|
|
863
|
+
avatarUrl?: string;
|
|
864
|
+
profession?: string;
|
|
865
|
+
rate?: EmployeeRate | null;
|
|
866
|
+
summary?: string;
|
|
867
|
+
currency?: string;
|
|
868
|
+
pricingTiers?: PricingTier[];
|
|
869
|
+
prices_discounted?: PricingTier[];
|
|
870
|
+
discount?: string;
|
|
871
|
+
department?: {
|
|
872
|
+
name: string;
|
|
873
|
+
color: string;
|
|
874
|
+
};
|
|
875
|
+
tools?: Tool[];
|
|
876
|
+
languages?: EmployeeLanguage[];
|
|
877
|
+
tasks?: {
|
|
878
|
+
id?: string;
|
|
879
|
+
text: string;
|
|
880
|
+
}[];
|
|
881
|
+
slogan?: string;
|
|
882
|
+
is_pinned?: boolean;
|
|
883
|
+
}
|
|
884
|
+
|
|
885
|
+
export declare const EmployeeCard: default_2.FC<EmployeeCardProps>;
|
|
886
|
+
|
|
887
|
+
export declare interface EmployeeCardProps {
|
|
888
|
+
employee: Employee;
|
|
889
|
+
profileUrl?: string;
|
|
890
|
+
onClick?: () => void;
|
|
891
|
+
talkMode?: TalkModeConfig;
|
|
892
|
+
selectedToolIds?: string[];
|
|
893
|
+
onToolToggle?: (toolId: string) => void;
|
|
894
|
+
isInCart?: boolean;
|
|
895
|
+
onCartToggle?: () => void;
|
|
896
|
+
selectedTierValue?: string;
|
|
897
|
+
onTierChange?: (value: string) => void;
|
|
898
|
+
share?: boolean;
|
|
899
|
+
onShare?: () => void;
|
|
900
|
+
sx?: {
|
|
901
|
+
root?: string;
|
|
902
|
+
header?: string;
|
|
903
|
+
avatar?: string;
|
|
904
|
+
content?: string;
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
export declare interface EmployeeLanguage {
|
|
909
|
+
id?: number;
|
|
910
|
+
name: string;
|
|
911
|
+
/** 2-letter country code for flagcdn, e.g. "gb" (English), "ua" (Ukrainian) */
|
|
912
|
+
iso2: string;
|
|
913
|
+
/** Level short name, e.g. "C1", "Native", "A1" */
|
|
914
|
+
level: string;
|
|
915
|
+
/** Custom icon URL from API; falls back to flagcdn if null/undefined */
|
|
916
|
+
icon?: string | null;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
declare interface EmployeeRate {
|
|
920
|
+
id: number;
|
|
921
|
+
name: string;
|
|
922
|
+
value: string;
|
|
923
|
+
hours: number;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
export declare interface FilterOption {
|
|
927
|
+
value: string;
|
|
928
|
+
label: string;
|
|
929
|
+
/** Image URL — flag for languages, icon for departments */
|
|
930
|
+
icon?: string;
|
|
931
|
+
/** ReactNode icon — for SVG icons in tiles (takes priority over `icon` string) */
|
|
932
|
+
iconNode?: ReactNode;
|
|
933
|
+
/** Accent colour for department cards */
|
|
934
|
+
color?: string;
|
|
935
|
+
/** Secondary label — e.g. "~160 h/mo" for availability tiles */
|
|
936
|
+
sublabel?: string;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
export declare function FilterPanel({ sections, value, onChange, resultCount, isOpen, onClose, onReset, }: FilterPanelProps): JSX.Element;
|
|
940
|
+
|
|
941
|
+
export declare interface FilterPanelProps {
|
|
942
|
+
sections: FilterSection[];
|
|
943
|
+
/** Currently applied (committed) filter values, keyed by section id */
|
|
944
|
+
value: Record<string, string[]>;
|
|
945
|
+
/** Called when the user clicks Apply. Receives the new filter values. */
|
|
946
|
+
onChange: (value: Record<string, string[]>) => void;
|
|
947
|
+
/** Total result count shown in header (reflects last applied state) */
|
|
948
|
+
resultCount?: number;
|
|
949
|
+
isOpen: boolean;
|
|
950
|
+
onClose: () => void;
|
|
951
|
+
/**
|
|
952
|
+
* Called when the user clicks "Reset all".
|
|
953
|
+
* The consumer is responsible for clearing filters and closing the panel.
|
|
954
|
+
* If not provided, filters are cleared locally without closing.
|
|
955
|
+
*/
|
|
956
|
+
onReset?: () => void;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
export declare interface FilterSection {
|
|
960
|
+
id: string;
|
|
961
|
+
title: string;
|
|
962
|
+
icon?: ReactNode;
|
|
963
|
+
/** cards = department grid, pills = toggle buttons, tiles = availability (visual only) */
|
|
964
|
+
type: 'pills' | 'cards' | 'tiles';
|
|
965
|
+
columns?: 2 | 3;
|
|
966
|
+
options: FilterOption[];
|
|
967
|
+
initiallyOpen?: boolean;
|
|
968
|
+
showSearch?: boolean;
|
|
969
|
+
/** Called (debounced) when the user types in the section search input */
|
|
970
|
+
onSearch?: (query: string) => void;
|
|
971
|
+
showMoreLimit?: number;
|
|
972
|
+
/** When true the section is rendered but its selections are not passed to onChange */
|
|
973
|
+
disabled?: boolean;
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/** Value shape per filter section */
|
|
977
|
+
declare type FilterSectionValue = string[] | string | null | CalendarDateRange;
|
|
978
|
+
|
|
979
|
+
export declare type FloatingPlacement = 'bottom-start' | 'bottom-end' | 'bottom' | 'top-start' | 'top-end' | 'top';
|
|
980
|
+
|
|
981
|
+
export declare interface FloatingPositionResult {
|
|
982
|
+
/** Style to apply to the floating element (position: fixed, coords, maxHeight, z-index). */
|
|
983
|
+
style: CSSProperties;
|
|
984
|
+
/** Resolved vertical side after flip logic. */
|
|
985
|
+
side: ResolvedSide;
|
|
986
|
+
/** True once the first measurement is done — use it to render visibility. */
|
|
987
|
+
ready: boolean;
|
|
988
|
+
}
|
|
989
|
+
|
|
990
|
+
declare type FluidSpacingTokens = {
|
|
991
|
+
'--space-fluid-xs': string;
|
|
992
|
+
'--space-fluid-sm': string;
|
|
993
|
+
'--space-fluid-md': string;
|
|
994
|
+
'--space-fluid-lg': string;
|
|
995
|
+
'--space-fluid-xl': string;
|
|
996
|
+
'--space-fluid-2xl': string;
|
|
997
|
+
'--space-fluid-3xl': string;
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Get CSS class name for predefined gradients
|
|
1002
|
+
* Returns null for custom gradients
|
|
1003
|
+
*/
|
|
1004
|
+
export declare function getGradientClassName(gradient: GradientConfig): string | null;
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Generate inline gradient style for custom gradients
|
|
1008
|
+
* Supports 2-color and 3-color gradients
|
|
1009
|
+
*/
|
|
1010
|
+
export declare function getGradientStyle(gradient: CustomGradient): string;
|
|
1011
|
+
|
|
1012
|
+
export declare type GradientColorType = 'primary' | 'secondary' | 'success' | 'tertiary' | 'warning' | 'error' | 'info';
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Gradient configuration for components
|
|
1016
|
+
* Can be either a predefined variant or a custom gradient
|
|
1017
|
+
*/
|
|
1018
|
+
export declare type GradientConfig = GradientVariant | CustomGradient;
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Gradient system types and utilities
|
|
1022
|
+
* Provides type-safe API for predefined and custom gradients
|
|
1023
|
+
*/
|
|
1024
|
+
export declare type GradientDirection = 'horizontal' | 'vertical' | 'diagonal' | 'radial';
|
|
1025
|
+
|
|
1026
|
+
export declare type GradientTokens = {
|
|
1027
|
+
'--gradient-primary-start': string;
|
|
1028
|
+
'--gradient-primary-end': string;
|
|
1029
|
+
'--gradient-secondary-start': string;
|
|
1030
|
+
'--gradient-secondary-end': string;
|
|
1031
|
+
'--gradient-success-start': string;
|
|
1032
|
+
'--gradient-success-end': string;
|
|
1033
|
+
'--gradient-tertiary-start': string;
|
|
1034
|
+
'--gradient-tertiary-end': string;
|
|
1035
|
+
'--gradient-warning-start': string;
|
|
1036
|
+
'--gradient-warning-end': string;
|
|
1037
|
+
'--gradient-error-start': string;
|
|
1038
|
+
'--gradient-error-end': string;
|
|
1039
|
+
'--gradient-info-start': string;
|
|
1040
|
+
'--gradient-info-end': string;
|
|
1041
|
+
'--gradient-primary-secondary-start': string;
|
|
1042
|
+
'--gradient-primary-secondary-end': string;
|
|
1043
|
+
'--gradient-primary-tertiary-start': string;
|
|
1044
|
+
'--gradient-primary-tertiary-end': string;
|
|
1045
|
+
'--gradient-primary-success-start': string;
|
|
1046
|
+
'--gradient-primary-success-end': string;
|
|
1047
|
+
'--gradient-success-tertiary-start': string;
|
|
1048
|
+
'--gradient-success-tertiary-end': string;
|
|
1049
|
+
'--gradient-warning-error-start': string;
|
|
1050
|
+
'--gradient-warning-error-end': string;
|
|
1051
|
+
'--gradient-info-primary-start': string;
|
|
1052
|
+
'--gradient-info-primary-end': string;
|
|
1053
|
+
'--gradient-primary-horizontal': string;
|
|
1054
|
+
'--gradient-primary-vertical': string;
|
|
1055
|
+
'--gradient-primary-diagonal': string;
|
|
1056
|
+
'--gradient-primary-radial': string;
|
|
1057
|
+
'--gradient-secondary-horizontal': string;
|
|
1058
|
+
'--gradient-secondary-vertical': string;
|
|
1059
|
+
'--gradient-secondary-diagonal': string;
|
|
1060
|
+
'--gradient-secondary-radial': string;
|
|
1061
|
+
'--gradient-success-horizontal': string;
|
|
1062
|
+
'--gradient-success-vertical': string;
|
|
1063
|
+
'--gradient-success-diagonal': string;
|
|
1064
|
+
'--gradient-success-radial': string;
|
|
1065
|
+
'--gradient-tertiary-horizontal': string;
|
|
1066
|
+
'--gradient-tertiary-vertical': string;
|
|
1067
|
+
'--gradient-tertiary-diagonal': string;
|
|
1068
|
+
'--gradient-tertiary-radial': string;
|
|
1069
|
+
'--gradient-warning-horizontal': string;
|
|
1070
|
+
'--gradient-warning-vertical': string;
|
|
1071
|
+
'--gradient-warning-diagonal': string;
|
|
1072
|
+
'--gradient-warning-radial': string;
|
|
1073
|
+
'--gradient-error-horizontal': string;
|
|
1074
|
+
'--gradient-error-vertical': string;
|
|
1075
|
+
'--gradient-error-diagonal': string;
|
|
1076
|
+
'--gradient-error-radial': string;
|
|
1077
|
+
'--gradient-info-horizontal': string;
|
|
1078
|
+
'--gradient-info-vertical': string;
|
|
1079
|
+
'--gradient-info-diagonal': string;
|
|
1080
|
+
'--gradient-info-radial': string;
|
|
1081
|
+
'--gradient-primary-secondary-horizontal': string;
|
|
1082
|
+
'--gradient-primary-secondary-vertical': string;
|
|
1083
|
+
'--gradient-primary-secondary-diagonal': string;
|
|
1084
|
+
'--gradient-primary-secondary-radial': string;
|
|
1085
|
+
'--gradient-primary-tertiary-horizontal': string;
|
|
1086
|
+
'--gradient-primary-tertiary-vertical': string;
|
|
1087
|
+
'--gradient-primary-tertiary-diagonal': string;
|
|
1088
|
+
'--gradient-primary-tertiary-radial': string;
|
|
1089
|
+
'--gradient-primary-success-horizontal': string;
|
|
1090
|
+
'--gradient-primary-success-vertical': string;
|
|
1091
|
+
'--gradient-primary-success-diagonal': string;
|
|
1092
|
+
'--gradient-primary-success-radial': string;
|
|
1093
|
+
'--gradient-success-tertiary-horizontal': string;
|
|
1094
|
+
'--gradient-success-tertiary-vertical': string;
|
|
1095
|
+
'--gradient-success-tertiary-diagonal': string;
|
|
1096
|
+
'--gradient-success-tertiary-radial': string;
|
|
1097
|
+
'--gradient-warning-error-horizontal': string;
|
|
1098
|
+
'--gradient-warning-error-vertical': string;
|
|
1099
|
+
'--gradient-warning-error-diagonal': string;
|
|
1100
|
+
'--gradient-warning-error-radial': string;
|
|
1101
|
+
'--gradient-info-primary-horizontal': string;
|
|
1102
|
+
'--gradient-info-primary-vertical': string;
|
|
1103
|
+
'--gradient-info-primary-diagonal': string;
|
|
1104
|
+
'--gradient-info-primary-radial': string;
|
|
1105
|
+
};
|
|
1106
|
+
|
|
1107
|
+
export declare type GradientVariant = SingleGradientVariant | CombinedGradientVariant;
|
|
1108
|
+
|
|
1109
|
+
export declare const Header: default_2.FC<HeaderProps>;
|
|
1110
|
+
|
|
1111
|
+
export declare interface HeaderNavItem {
|
|
1112
|
+
label: string;
|
|
1113
|
+
href?: string;
|
|
1114
|
+
onClick?: () => void;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
export declare interface HeaderProps {
|
|
1118
|
+
navItems?: HeaderNavItem[];
|
|
1119
|
+
logoText?: string;
|
|
1120
|
+
logoSrc?: string;
|
|
1121
|
+
logoAlt?: string;
|
|
1122
|
+
onLogoClick?: () => void;
|
|
1123
|
+
sx?: {
|
|
1124
|
+
root?: string;
|
|
1125
|
+
nav?: string;
|
|
1126
|
+
logo?: string;
|
|
1127
|
+
navItem?: string;
|
|
1128
|
+
};
|
|
1129
|
+
}
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* IconButton component for icon-only buttons
|
|
1133
|
+
* Designed for actions represented by an icon without text
|
|
1134
|
+
*
|
|
1135
|
+
* @example
|
|
1136
|
+
* ```tsx
|
|
1137
|
+
* import { MdClose, MdNotifications } from 'react-icons/md';
|
|
1138
|
+
*
|
|
1139
|
+
* <IconButton
|
|
1140
|
+
* icon={<MdClose />}
|
|
1141
|
+
* aria-label="Close"
|
|
1142
|
+
* onClick={handleClose}
|
|
1143
|
+
* />
|
|
1144
|
+
*
|
|
1145
|
+
* // With badge
|
|
1146
|
+
* <IconButton
|
|
1147
|
+
* icon={<MdNotifications />}
|
|
1148
|
+
* aria-label="Notifications"
|
|
1149
|
+
* badge={5}
|
|
1150
|
+
* badgeColor="error"
|
|
1151
|
+
* />
|
|
1152
|
+
* ```
|
|
1153
|
+
*/
|
|
1154
|
+
export declare const IconButton: default_2.FC<IconButtonProps>;
|
|
1155
|
+
|
|
1156
|
+
export declare interface IconButtonProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'children'> {
|
|
1157
|
+
/** Icon element to display (typically from react-icons) */
|
|
1158
|
+
icon: default_2.ReactNode;
|
|
1159
|
+
/** Size variant of the icon button */
|
|
1160
|
+
size?: 'small' | 'medium' | 'large';
|
|
1161
|
+
/** Color theme of the button */
|
|
1162
|
+
color?: 'primary' | 'secondary' | 'success' | 'tertiary' | 'warning' | 'error' | 'info' | 'neutral';
|
|
1163
|
+
/** Visual style variant */
|
|
1164
|
+
variant?: 'filled' | 'outlined' | 'ghost';
|
|
1165
|
+
/** Accessible label for screen readers (REQUIRED for accessibility) */
|
|
1166
|
+
'aria-label': string;
|
|
1167
|
+
/** Utility classes (e.g., "rounded-full") */
|
|
1168
|
+
sx?: string;
|
|
1169
|
+
/** Custom inline styles */
|
|
1170
|
+
style?: default_2.CSSProperties;
|
|
1171
|
+
/** Badge content (number or string). If provided, displays a badge on the button */
|
|
1172
|
+
badge?: number | string;
|
|
1173
|
+
/** Badge color variant */
|
|
1174
|
+
badgeColor?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info';
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Type guard to check if gradient is custom
|
|
1179
|
+
*/
|
|
1180
|
+
export declare function isCustomGradient(gradient: GradientConfig): gradient is CustomGradient;
|
|
1181
|
+
|
|
1182
|
+
export declare interface KPIMetric {
|
|
1183
|
+
label: string;
|
|
1184
|
+
value: number | string;
|
|
1185
|
+
/** CSS color string or one of: 'primary' | 'success' | 'warning' | 'error' | 'info' */
|
|
1186
|
+
color?: string;
|
|
1187
|
+
onClick?: () => void;
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
export declare const Layout: default_2.FC<LayoutProps>;
|
|
1191
|
+
|
|
1192
|
+
export declare interface LayoutProps {
|
|
1193
|
+
/** Page content */
|
|
1194
|
+
children: default_2.ReactNode;
|
|
1195
|
+
/**
|
|
1196
|
+
* - `'sidebar'` — authenticated layout with fixed left sidebar (default)
|
|
1197
|
+
* - `'centered'` — unauthenticated layout with centered card content
|
|
1198
|
+
*/
|
|
1199
|
+
variant?: 'sidebar' | 'centered';
|
|
1200
|
+
/** Sidebar configuration (used when variant='sidebar') */
|
|
1201
|
+
sidebar?: SidebarProps;
|
|
1202
|
+
/** Header slot (used when variant='centered') */
|
|
1203
|
+
header?: default_2.ReactNode;
|
|
1204
|
+
/** Extra CSS class on the root element */
|
|
1205
|
+
sx?: string;
|
|
1206
|
+
style?: default_2.CSSProperties;
|
|
1207
|
+
}
|
|
1208
|
+
|
|
1209
|
+
export declare type LayoutTokens = {
|
|
1210
|
+
'--layout-columns': string | number;
|
|
1211
|
+
'--layout-gutter': string;
|
|
1212
|
+
'--layout-max-width': string;
|
|
1213
|
+
};
|
|
1214
|
+
|
|
1215
|
+
declare interface LessonAuthor {
|
|
1216
|
+
username: string;
|
|
1217
|
+
avatarUrl?: string;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
export declare const LessonCard: default_2.FC<LessonCardProps>;
|
|
1221
|
+
|
|
1222
|
+
export declare interface LessonCardProps {
|
|
1223
|
+
title: string;
|
|
1224
|
+
description?: string;
|
|
1225
|
+
imageUrl?: string;
|
|
1226
|
+
type?: string;
|
|
1227
|
+
contentType?: string;
|
|
1228
|
+
durationMinutes?: number;
|
|
1229
|
+
author?: LessonAuthor;
|
|
1230
|
+
module?: string;
|
|
1231
|
+
course?: string;
|
|
1232
|
+
skills?: string[];
|
|
1233
|
+
professions?: LessonProfession[];
|
|
1234
|
+
testCount?: number;
|
|
1235
|
+
rating?: number;
|
|
1236
|
+
isBookmarked?: boolean;
|
|
1237
|
+
onBookmarkToggle?: (isBookmarked: boolean) => void;
|
|
1238
|
+
isCompleted?: boolean;
|
|
1239
|
+
isDraft?: boolean;
|
|
1240
|
+
isRecommended?: boolean;
|
|
1241
|
+
badgeSlot?: default_2.ReactNode;
|
|
1242
|
+
href?: string;
|
|
1243
|
+
target?: string;
|
|
1244
|
+
onClick?: () => void;
|
|
1245
|
+
customButtons?: default_2.ReactNode;
|
|
1246
|
+
sx?: string;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
export declare interface LessonProfession {
|
|
1250
|
+
name: string;
|
|
1251
|
+
color?: string;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
export declare const Logo: default_2.FC<LogoProps>;
|
|
1255
|
+
|
|
1256
|
+
export declare interface LogoProps {
|
|
1257
|
+
/**
|
|
1258
|
+
* Path to logo image
|
|
1259
|
+
*/
|
|
1260
|
+
src?: string;
|
|
1261
|
+
/**
|
|
1262
|
+
* Alt text for logo image
|
|
1263
|
+
*/
|
|
1264
|
+
alt?: string;
|
|
1265
|
+
/**
|
|
1266
|
+
* Text to display below the logo
|
|
1267
|
+
*/
|
|
1268
|
+
text?: string;
|
|
1269
|
+
/**
|
|
1270
|
+
* Click handler for logo
|
|
1271
|
+
*/
|
|
1272
|
+
onClick?: () => void;
|
|
1273
|
+
/**
|
|
1274
|
+
* Size of the logo
|
|
1275
|
+
*/
|
|
1276
|
+
size?: 'small' | 'medium' | 'large';
|
|
1277
|
+
/**
|
|
1278
|
+
* Custom class name
|
|
1279
|
+
*/
|
|
1280
|
+
className?: string;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
export declare const Modal: default_2.FC<ModalProps>;
|
|
1284
|
+
|
|
1285
|
+
export declare interface ModalProps {
|
|
1286
|
+
/** Controls whether the modal is visible */
|
|
1287
|
+
open: boolean;
|
|
1288
|
+
/** Callback fired when the modal requests to be closed */
|
|
1289
|
+
onClose?: () => void;
|
|
1290
|
+
/** Whether clicking the backdrop closes the modal */
|
|
1291
|
+
closeOnBackdropClick?: boolean;
|
|
1292
|
+
/** Whether pressing Escape key closes the modal */
|
|
1293
|
+
closeOnEscape?: boolean;
|
|
1294
|
+
/** Whether to show the close button */
|
|
1295
|
+
showCloseButton?: boolean;
|
|
1296
|
+
/** Size variant of the modal */
|
|
1297
|
+
size?: 'small' | 'medium' | 'large' | 'fullscreen';
|
|
1298
|
+
/** Modal content */
|
|
1299
|
+
children: default_2.ReactNode;
|
|
1300
|
+
/** Utility classes (e.g., "rounded-xl") */
|
|
1301
|
+
sx?: string;
|
|
1302
|
+
/** Custom inline styles for the modal content */
|
|
1303
|
+
style?: default_2.CSSProperties;
|
|
1304
|
+
/** Custom inline styles for the backdrop */
|
|
1305
|
+
backdropStyle?: default_2.CSSProperties;
|
|
1306
|
+
/** Custom portal container ID */
|
|
1307
|
+
portalContainerId?: string;
|
|
1308
|
+
/** Element to focus when modal opens */
|
|
1309
|
+
initialFocusRef?: default_2.RefObject<HTMLElement>;
|
|
1310
|
+
/** Whether to return focus to trigger element on close */
|
|
1311
|
+
returnFocusOnClose?: boolean;
|
|
1312
|
+
/** Whether to trap focus within modal */
|
|
1313
|
+
trapFocus?: boolean;
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
export declare type MotionTokens = {
|
|
1317
|
+
'--motion-fast': string;
|
|
1318
|
+
'--motion-normal': string;
|
|
1319
|
+
'--motion-slow': string;
|
|
1320
|
+
'--motion-easing': string;
|
|
1321
|
+
};
|
|
1322
|
+
|
|
1323
|
+
export declare interface NavItem {
|
|
1324
|
+
id: string;
|
|
1325
|
+
label: string;
|
|
1326
|
+
icon?: default_2.ReactNode;
|
|
1327
|
+
path?: string;
|
|
1328
|
+
children?: NavItem[];
|
|
1329
|
+
badge?: string | number;
|
|
1330
|
+
/**
|
|
1331
|
+
* When true, render the item as an external link: opens in a new tab and
|
|
1332
|
+
* skips both `preventDefault` and `onItemClick` so the browser handles it.
|
|
1333
|
+
*/
|
|
1334
|
+
external?: boolean;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Pagination — server-driven page controls.
|
|
1339
|
+
*
|
|
1340
|
+
* Composable footer for paginated lists/tables: prev/next, sliding page-number
|
|
1341
|
+
* window, optional first/last jumps, results summary, per-page select, and
|
|
1342
|
+
* a "Go to" input. All sub-features are independently toggleable.
|
|
1343
|
+
*/
|
|
1344
|
+
export declare const Pagination: default_2.FC<PaginationProps>;
|
|
1345
|
+
|
|
1346
|
+
export declare interface PaginationPerPageOption {
|
|
1347
|
+
/** Numeric per-page value */
|
|
1348
|
+
value: number;
|
|
1349
|
+
/** Display label for the option (e.g. `'10'`, `'25 rows'`) */
|
|
1350
|
+
label: string;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
export declare interface PaginationProps {
|
|
1354
|
+
/** Current 1-based page */
|
|
1355
|
+
currentPage: number;
|
|
1356
|
+
/** Total number of pages */
|
|
1357
|
+
totalPages: number;
|
|
1358
|
+
/** Total number of items across all pages — used by `showResults` */
|
|
1359
|
+
totalItems?: number;
|
|
1360
|
+
/** Items per page — used to compute the displayed range */
|
|
1361
|
+
itemsPerPage?: number;
|
|
1362
|
+
/** Called when user picks another page */
|
|
1363
|
+
onPageChange: (page: number) => void;
|
|
1364
|
+
/** Show « » buttons jumping to first/last (default `true`) */
|
|
1365
|
+
hasFirstLast?: boolean;
|
|
1366
|
+
/** Show "Go to" page input (default `false`) */
|
|
1367
|
+
hasGoToPage?: boolean;
|
|
1368
|
+
/** How to render the results summary (default `'none'`) */
|
|
1369
|
+
showResults?: PaginationResultsDisplay;
|
|
1370
|
+
/** When `totalPages <= 1`, the component normally returns `null`. Set this
|
|
1371
|
+
* to `true` to keep the footer visible on a single page, rendering only the
|
|
1372
|
+
* results summary and per-page selector (page nav + Go-To stay hidden).
|
|
1373
|
+
* Default `false`. */
|
|
1374
|
+
showOnSinglePage?: boolean;
|
|
1375
|
+
/** Per-page select options. Renders the dropdown when both `perPageOptions`
|
|
1376
|
+
* and `onPerPageChange` are provided. */
|
|
1377
|
+
perPageOptions?: PaginationPerPageOption[];
|
|
1378
|
+
/** Current per-page value (controlled) */
|
|
1379
|
+
perPage?: number;
|
|
1380
|
+
/** Called when user picks another per-page value */
|
|
1381
|
+
onPerPageChange?: (value: number) => void;
|
|
1382
|
+
/** How many pages to show on each side of `currentPage` in the middle
|
|
1383
|
+
* range, before collapsing to `…`. Default `1` (i.e. `1 … 4 5 6 … 20`). */
|
|
1384
|
+
siblingCount?: number;
|
|
1385
|
+
/** Component scale */
|
|
1386
|
+
size?: 'small' | 'medium';
|
|
1387
|
+
/** Extra CSS classes on the root element */
|
|
1388
|
+
sx?: string;
|
|
1389
|
+
/** Inline styles on the root element */
|
|
1390
|
+
style?: default_2.CSSProperties;
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
export declare type PaginationResultsDisplay = 'range' | 'total' | 'none';
|
|
1394
|
+
|
|
1395
|
+
export declare type PaletteTokens = {
|
|
1396
|
+
'--palette-primary-main': string;
|
|
1397
|
+
'--palette-primary-light': string;
|
|
1398
|
+
'--palette-primary-dark': string;
|
|
1399
|
+
'--palette-primary-contrast-text': string;
|
|
1400
|
+
'--palette-secondary-main': string;
|
|
1401
|
+
'--palette-secondary-light': string;
|
|
1402
|
+
'--palette-secondary-dark': string;
|
|
1403
|
+
'--palette-secondary-contrast-text': string;
|
|
1404
|
+
'--palette-success-main': string;
|
|
1405
|
+
'--palette-success-light': string;
|
|
1406
|
+
'--palette-success-dark': string;
|
|
1407
|
+
'--palette-success-contrast-text': string;
|
|
1408
|
+
'--palette-tertiary-main': string;
|
|
1409
|
+
'--palette-tertiary-light': string;
|
|
1410
|
+
'--palette-tertiary-dark': string;
|
|
1411
|
+
'--palette-tertiary-contrast-text': string;
|
|
1412
|
+
'--palette-warning-main': string;
|
|
1413
|
+
'--palette-warning-light': string;
|
|
1414
|
+
'--palette-warning-dark': string;
|
|
1415
|
+
'--palette-warning-contrast-text': string;
|
|
1416
|
+
'--palette-error-main': string;
|
|
1417
|
+
'--palette-error-light': string;
|
|
1418
|
+
'--palette-error-dark': string;
|
|
1419
|
+
'--palette-error-contrast-text': string;
|
|
1420
|
+
'--palette-info-main': string;
|
|
1421
|
+
'--palette-info-light': string;
|
|
1422
|
+
'--palette-info-dark': string;
|
|
1423
|
+
'--palette-info-contrast-text': string;
|
|
1424
|
+
'--palette-common-white': string;
|
|
1425
|
+
'--palette-common-black': string;
|
|
1426
|
+
'--palette-background-default': string;
|
|
1427
|
+
'--palette-background-paper': string;
|
|
1428
|
+
'--palette-text-primary': string;
|
|
1429
|
+
'--palette-text-secondary': string;
|
|
1430
|
+
'--palette-divider': string;
|
|
1431
|
+
'--palette-action-hover': string;
|
|
1432
|
+
'--palette-action-selected': string;
|
|
1433
|
+
'--palette-action-disabled': string;
|
|
1434
|
+
'--palette-action-disabledBackground': string;
|
|
1435
|
+
'--palette-overlay-subtle': string;
|
|
1436
|
+
'--palette-overlay-subtle-hover': string;
|
|
1437
|
+
'--palette-badge-bg': string;
|
|
1438
|
+
'--palette-primary-shadow': string;
|
|
1439
|
+
'--palette-primary-shadow-strong': string;
|
|
1440
|
+
'--palette-primary-overlay': string;
|
|
1441
|
+
'--palette-primary-border': string;
|
|
1442
|
+
'--palette-overlay-on-dark': string;
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1445
|
+
declare interface PillsFilterSection extends BaseFilterSection {
|
|
1446
|
+
/** Omitting `type` defaults to pills for backward compatibility */
|
|
1447
|
+
type?: 'pills';
|
|
1448
|
+
options: CalendarFilterOption[];
|
|
1449
|
+
/** Default true. Set to false for single-select (radio) behaviour. */
|
|
1450
|
+
multiple?: boolean;
|
|
1451
|
+
}
|
|
1452
|
+
|
|
1453
|
+
/**
|
|
1454
|
+
* Portal component for rendering children outside the DOM hierarchy
|
|
1455
|
+
* Uses React's createPortal to mount content to a container element
|
|
1456
|
+
* Commonly used for modals, drawers, tooltips, and other overlay components
|
|
1457
|
+
*
|
|
1458
|
+
* @example
|
|
1459
|
+
* ```tsx
|
|
1460
|
+
* <Portal>
|
|
1461
|
+
* <Modal>Content</Modal>
|
|
1462
|
+
* </Portal>
|
|
1463
|
+
* ```
|
|
1464
|
+
*/
|
|
1465
|
+
export declare const Portal: React.FC<PortalProps>;
|
|
1466
|
+
|
|
1467
|
+
export declare interface PortalProps {
|
|
1468
|
+
/** Content to render in the portal */
|
|
1469
|
+
children: ReactNode;
|
|
1470
|
+
/** Custom ID for the portal container */
|
|
1471
|
+
containerId?: string;
|
|
1472
|
+
/** Existing HTML element to use as container */
|
|
1473
|
+
containerElement?: HTMLElement;
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
declare interface PricingTier {
|
|
1477
|
+
value: string;
|
|
1478
|
+
price: string;
|
|
1479
|
+
hours: number;
|
|
1480
|
+
name: string;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
export declare type RadiusTokens = {
|
|
1484
|
+
'--radius-xs': string;
|
|
1485
|
+
'--radius-sm': string;
|
|
1486
|
+
'--radius-md': string;
|
|
1487
|
+
'--radius-lg': string;
|
|
1488
|
+
'--radius-xl': string;
|
|
1489
|
+
'--radius-2xl': string;
|
|
1490
|
+
'--radius-3xl': string;
|
|
1491
|
+
'--radius-full': string;
|
|
1492
|
+
};
|
|
1493
|
+
|
|
1494
|
+
declare type ResolvedSide = 'bottom' | 'top';
|
|
1495
|
+
|
|
1496
|
+
export declare const Select: default_2.ForwardRefExoticComponent<SelectProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
1497
|
+
|
|
1498
|
+
declare type SelectChipProps = Pick<ChipProps, 'variant' | 'color' | 'size' | 'leadingIcon' | 'sx'>;
|
|
1499
|
+
|
|
1500
|
+
declare interface SelectFilterSection extends BaseFilterSection {
|
|
1501
|
+
type: 'select';
|
|
1502
|
+
options: CalendarFilterOption[];
|
|
1503
|
+
placeholder?: string;
|
|
1504
|
+
multiple?: boolean;
|
|
1505
|
+
searchable?: boolean;
|
|
1506
|
+
clearable?: boolean;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
export declare interface SelectOption {
|
|
1510
|
+
label: string;
|
|
1511
|
+
value: string;
|
|
1512
|
+
description?: string;
|
|
1513
|
+
disabled?: boolean;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
export declare interface SelectOptionGroup {
|
|
1517
|
+
label: string;
|
|
1518
|
+
options: SelectOption[];
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
export declare interface SelectProps extends Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'value' | 'defaultValue'> {
|
|
1522
|
+
label?: string;
|
|
1523
|
+
placeholder?: string;
|
|
1524
|
+
size?: 'small' | 'normal' | 'large';
|
|
1525
|
+
sx?: Partial<Record<'root' | 'trigger' | 'listbox' | 'option' | 'label' | 'popup' | 'helperText', string>>;
|
|
1526
|
+
options: SelectOption[] | SelectOptionGroup[];
|
|
1527
|
+
value?: string | string[] | null;
|
|
1528
|
+
defaultValue?: string | string[];
|
|
1529
|
+
multiple?: boolean;
|
|
1530
|
+
onChange?: (value: string | string[] | null) => void;
|
|
1531
|
+
error?: boolean;
|
|
1532
|
+
helperText?: string;
|
|
1533
|
+
fullWidth?: boolean;
|
|
1534
|
+
clearable?: boolean;
|
|
1535
|
+
chipDisplay?: 'inside' | 'outside';
|
|
1536
|
+
/** Props forwarded to each <Chip> in multi-select mode */
|
|
1537
|
+
chipProps?: SelectChipProps;
|
|
1538
|
+
required?: boolean;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
export declare type ShadowTokens = {
|
|
1542
|
+
'--shadow-light': string;
|
|
1543
|
+
'--shadow-card': string;
|
|
1544
|
+
'--shadow-card-elevated': string;
|
|
1545
|
+
'--shadow-card-hover': string;
|
|
1546
|
+
'--shadow-medium': string;
|
|
1547
|
+
'--shadow-heavy': string;
|
|
1548
|
+
'--shadow-avatar': string;
|
|
1549
|
+
'--shadow-badge': string;
|
|
1550
|
+
'--shadow-primary-glow': string;
|
|
1551
|
+
'--shadow-primary-glow-strong': string;
|
|
1552
|
+
};
|
|
1553
|
+
|
|
1554
|
+
export declare interface ShowToastOptions {
|
|
1555
|
+
type?: ToastType;
|
|
1556
|
+
message: React.ReactNode;
|
|
1557
|
+
title?: string;
|
|
1558
|
+
/** Auto-dismiss delay in ms. Pass 0 to keep open until dismissed manually. */
|
|
1559
|
+
duration?: number;
|
|
1560
|
+
icon?: React.ReactNode;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
export declare const Sidebar: default_2.FC<SidebarProps>;
|
|
1564
|
+
|
|
1565
|
+
export declare interface SidebarProps {
|
|
1566
|
+
/** Navigation items */
|
|
1567
|
+
items: NavItem[];
|
|
1568
|
+
/** Controlled collapsed state */
|
|
1569
|
+
collapsed?: boolean;
|
|
1570
|
+
/** Uncontrolled initial collapsed state */
|
|
1571
|
+
defaultCollapsed?: boolean;
|
|
1572
|
+
/** Called when collapsed state changes */
|
|
1573
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
1574
|
+
/** Controls mobile drawer visibility */
|
|
1575
|
+
mobileOpen?: boolean;
|
|
1576
|
+
/** Called when mobile drawer should close */
|
|
1577
|
+
onMobileClose?: () => void;
|
|
1578
|
+
/** Logo / brand area at the top — custom ReactNode, replaces logoIcon + logoTitle */
|
|
1579
|
+
logo?: default_2.ReactNode;
|
|
1580
|
+
/** Project icon shown in the header */
|
|
1581
|
+
logoIcon?: default_2.ReactNode;
|
|
1582
|
+
/** Project / app name shown next to the icon, hidden when collapsed */
|
|
1583
|
+
logoTitle?: string;
|
|
1584
|
+
/**
|
|
1585
|
+
* Custom footer slot. When provided, replaces the built-in
|
|
1586
|
+
* user-info / theme-toggle / logout row entirely.
|
|
1587
|
+
*/
|
|
1588
|
+
footer?: default_2.ReactNode;
|
|
1589
|
+
/** Logged-in user info shown in the footer */
|
|
1590
|
+
user?: SidebarUser;
|
|
1591
|
+
/** Called when the logout button is clicked */
|
|
1592
|
+
onLogout?: () => void;
|
|
1593
|
+
/** Called when the login button is clicked (shown only when user is falsy) */
|
|
1594
|
+
onLogin?: () => void;
|
|
1595
|
+
/** Current theme — drives the Sun/Moon icon */
|
|
1596
|
+
theme?: 'light' | 'dark';
|
|
1597
|
+
/** Called when the theme toggle button is clicked */
|
|
1598
|
+
onThemeToggle?: () => void;
|
|
1599
|
+
/** ID of the currently active nav item. Wins over `activePath` if both are set. */
|
|
1600
|
+
activeItemId?: string;
|
|
1601
|
+
/**
|
|
1602
|
+
* Convenience: instead of computing `activeItemId` yourself, pass the current
|
|
1603
|
+
* pathname and the Sidebar will resolve the deepest-matching item. Ignored
|
|
1604
|
+
* when `activeItemId` is provided.
|
|
1605
|
+
*/
|
|
1606
|
+
activePath?: string;
|
|
1607
|
+
/** Called when a nav item is clicked */
|
|
1608
|
+
onItemClick?: (item: NavItem) => void;
|
|
1609
|
+
/**
|
|
1610
|
+
* Controls what happens when clicking a nav item that has `children`.
|
|
1611
|
+
* - `accordion`: click toggles expand/collapse (default, current behavior)
|
|
1612
|
+
* - `navigate`: click triggers navigation (via `path`/`onItemClick`), chevron toggles expand/collapse
|
|
1613
|
+
*/
|
|
1614
|
+
parentItemBehavior?: 'accordion' | 'navigate';
|
|
1615
|
+
/** Extra CSS class on the root aside */
|
|
1616
|
+
sx?: string;
|
|
1617
|
+
style?: default_2.CSSProperties;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
export declare interface SidebarUser {
|
|
1621
|
+
name?: string;
|
|
1622
|
+
email?: string;
|
|
1623
|
+
/** URL to avatar image */
|
|
1624
|
+
avatar?: string;
|
|
1625
|
+
roles?: string[];
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
export declare type SingleGradientVariant = `${GradientColorType}-${GradientDirection}`;
|
|
1629
|
+
|
|
1630
|
+
export declare type SpacingTokens = {
|
|
1631
|
+
'--space-xs': string;
|
|
1632
|
+
'--space-sm': string;
|
|
1633
|
+
'--space-md': string;
|
|
1634
|
+
'--space-lg': string;
|
|
1635
|
+
'--space-xl': string;
|
|
1636
|
+
'--space-2xl': string;
|
|
1637
|
+
'--space-3xl': string;
|
|
1638
|
+
};
|
|
1639
|
+
|
|
1640
|
+
export declare const Spinner: default_2.FC<SpinnerProps>;
|
|
1641
|
+
|
|
1642
|
+
export declare interface SpinnerProps {
|
|
1643
|
+
/** Spinner size — applies to inline variant only */
|
|
1644
|
+
size?: 'small' | 'medium' | 'large';
|
|
1645
|
+
/**
|
|
1646
|
+
* Stroke colour.
|
|
1647
|
+
* Use `'inherit'` when placing the spinner inside coloured surfaces (e.g. a
|
|
1648
|
+
* filled button) — the spinner will then take its colour from the parent's
|
|
1649
|
+
* text colour via `currentColor` and match the surrounding content.
|
|
1650
|
+
*/
|
|
1651
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral' | 'inherit';
|
|
1652
|
+
/**
|
|
1653
|
+
* Render mode.
|
|
1654
|
+
* - 'inline' (default): plain rotating ring, sized by `size`
|
|
1655
|
+
* - 'page': portalled full-viewport overlay with backdrop and a centered large spinner
|
|
1656
|
+
*/
|
|
1657
|
+
variant?: 'inline' | 'page';
|
|
1658
|
+
/** Accessible label. Defaults to "Loading". */
|
|
1659
|
+
label?: string;
|
|
1660
|
+
/** Extra utility classes appended to the root */
|
|
1661
|
+
sx?: string;
|
|
1662
|
+
/** Inline styles applied to the root */
|
|
1663
|
+
style?: default_2.CSSProperties;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
export declare const Tab: default_2.FC<TabProps>;
|
|
1667
|
+
|
|
1668
|
+
export declare function Table<T>({ columns, data, isLoading, hasBorder, hasRowDividers, hasColumnDividers, isStriped, size, variant, color, radius, visibleColumns, stickyColumns, columnMenu, enableColumnMenu, defaultStickyColumns, defaultHiddenColumns, columnOrder, defaultColumnOrder, onStickyColumnsChange, onHiddenColumnsChange, onColumnOrderChange, columnMenuLabels, columnMenuDefaults, sorting, onSort, footer, onRowClick, rowKey, minWidth, height, maxHeight, stickyHeaderOffset, stickyFooterOffset, emptyState, loadingState, sx, style, }: TableProps<T>): JSX.Element;
|
|
1669
|
+
|
|
1670
|
+
export declare namespace Table {
|
|
1671
|
+
var displayName: string;
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
export declare type TableAlign = 'left' | 'center' | 'right';
|
|
1675
|
+
|
|
1676
|
+
export declare interface TableColumn<T> {
|
|
1677
|
+
/** Unique column identifier */
|
|
1678
|
+
key: string;
|
|
1679
|
+
/** Header label */
|
|
1680
|
+
label: default_2.ReactNode;
|
|
1681
|
+
/** Custom cell renderer; defaults to `row[key]` */
|
|
1682
|
+
render?: (row: T, rowIndex: number) => default_2.ReactNode;
|
|
1683
|
+
/** Toggle sorting (only active when `onSort` is provided) */
|
|
1684
|
+
sortable?: boolean;
|
|
1685
|
+
/** Cell + header alignment */
|
|
1686
|
+
align?: TableAlign;
|
|
1687
|
+
/** Allow body cell text to wrap (default: nowrap) */
|
|
1688
|
+
wrap?: boolean;
|
|
1689
|
+
/** Fixed CSS width — applied via <col> for stable column sizing */
|
|
1690
|
+
width?: string | number;
|
|
1691
|
+
/** Accessible header label */
|
|
1692
|
+
ariaLabel?: string;
|
|
1693
|
+
/** Lock the column as pinned: forces sticky regardless of state, and the
|
|
1694
|
+
* column menu's "Unpin column" / "Unpin all" actions skip it. */
|
|
1695
|
+
alwaysPinned?: boolean;
|
|
1696
|
+
/** Lock the column as visible: the column menu's "Hide column" action is
|
|
1697
|
+
* disabled, and controlled `visibleColumns[key] === false` is ignored. */
|
|
1698
|
+
alwaysVisible?: boolean;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
export declare interface TableProps<T> {
|
|
1702
|
+
/** Column definitions in render order */
|
|
1703
|
+
columns: TableColumn<T>[];
|
|
1704
|
+
/** Row data */
|
|
1705
|
+
data: T[];
|
|
1706
|
+
/** Show loading state instead of rows */
|
|
1707
|
+
isLoading?: boolean;
|
|
1708
|
+
/** Outer border around the table (default `true`) */
|
|
1709
|
+
hasBorder?: boolean;
|
|
1710
|
+
/** Horizontal divider lines between rows (default `true`) */
|
|
1711
|
+
hasRowDividers?: boolean;
|
|
1712
|
+
/** Vertical divider lines between columns (default `false`) */
|
|
1713
|
+
hasColumnDividers?: boolean;
|
|
1714
|
+
/** Alternating row background (default `false`) */
|
|
1715
|
+
isStriped?: boolean;
|
|
1716
|
+
/** Row size scale */
|
|
1717
|
+
size?: 'small' | 'medium' | 'large';
|
|
1718
|
+
/** Visual style variant. `'filled'` (default) uses the palette `paper`
|
|
1719
|
+
* background under header/body/footer. `'ghost'` makes all surfaces
|
|
1720
|
+
* transparent and removes the outer border — the table reads as a thin
|
|
1721
|
+
* grid (header text, dividers, rows). Use ghost when the parent panel
|
|
1722
|
+
* already provides background and frame. */
|
|
1723
|
+
variant?: 'filled' | 'ghost';
|
|
1724
|
+
/** Semantic color preset — tints header / body / footer backgrounds via the
|
|
1725
|
+
* `--ui-table-*` CSS variables. `'default'` keeps the neutral palette
|
|
1726
|
+
* look. Cherry-pick individual vars via `style={{}}` to override. */
|
|
1727
|
+
color?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
1728
|
+
/** Border-radius preset for the table outer container. Default `'md'`. */
|
|
1729
|
+
radius?: 'none' | 'sm' | 'md' | 'lg';
|
|
1730
|
+
/** Hide columns by key — `false` removes the matching column.
|
|
1731
|
+
* Controlled. For uncontrolled state with the built-in column menu, use
|
|
1732
|
+
* `defaultHiddenColumns` + `columnMenu`. */
|
|
1733
|
+
visibleColumns?: Record<string, boolean>;
|
|
1734
|
+
/** Indices of columns pinned to the left (Excel-style frozen columns).
|
|
1735
|
+
* Controlled. Internally normalised to keys, so hiding columns later
|
|
1736
|
+
* does not shift the pin. For uncontrolled state with the built-in
|
|
1737
|
+
* column menu, use `defaultStickyColumns` + `columnMenu`. */
|
|
1738
|
+
stickyColumns?: number[];
|
|
1739
|
+
/** Enable the built-in column menu. Pass `true` (or omit the older
|
|
1740
|
+
* `enableColumnMenu`) to enable everything; pass an object to disable
|
|
1741
|
+
* individual capabilities (`{ pin, hide, reorder, manage }`). Default
|
|
1742
|
+
* `false`. The legacy `enableColumnMenu` boolean stays supported. */
|
|
1743
|
+
columnMenu?: boolean | ColumnMenuConfig;
|
|
1744
|
+
/** @deprecated use `columnMenu` instead. Kept for backwards-compat. */
|
|
1745
|
+
enableColumnMenu?: boolean;
|
|
1746
|
+
/** Initial pinned columns by `col.key` — uncontrolled state used by the
|
|
1747
|
+
* column menu when `stickyColumns` (controlled) is not provided. */
|
|
1748
|
+
defaultStickyColumns?: string[];
|
|
1749
|
+
/** Initial hidden columns by `col.key` — uncontrolled state used by the
|
|
1750
|
+
* column menu when `visibleColumns` (controlled) is not provided. */
|
|
1751
|
+
defaultHiddenColumns?: string[];
|
|
1752
|
+
/** Column order by `col.key`. Controlled. `alwaysPinned` columns are
|
|
1753
|
+
* always forced to the front in their natural definition order
|
|
1754
|
+
* regardless of what this array says (and don't appear in callback
|
|
1755
|
+
* output). Unknown / extra keys are tolerated. */
|
|
1756
|
+
columnOrder?: string[];
|
|
1757
|
+
/** Initial column order — uncontrolled state used by the column menu's
|
|
1758
|
+
* drag-and-drop when `columnOrder` (controlled) is not provided. */
|
|
1759
|
+
defaultColumnOrder?: string[];
|
|
1760
|
+
/** Called after the column menu changes the pinned set. Receives the
|
|
1761
|
+
* full next list of pinned keys (in column order). */
|
|
1762
|
+
onStickyColumnsChange?: (keys: string[]) => void;
|
|
1763
|
+
/** Called after the column menu changes the hidden set. Receives the
|
|
1764
|
+
* full next list of hidden keys. */
|
|
1765
|
+
onHiddenColumnsChange?: (keys: string[]) => void;
|
|
1766
|
+
/** Called after the user drags a column to a new position in the
|
|
1767
|
+
* Manage popover. Receives the full next list of keys in render order
|
|
1768
|
+
* (pinned block then unpinned block — `alwaysPinned` columns are NOT
|
|
1769
|
+
* included since their position is fixed). */
|
|
1770
|
+
onColumnOrderChange?: (keys: string[]) => void;
|
|
1771
|
+
/** Override built-in menu labels (i18n). All optional. */
|
|
1772
|
+
columnMenuLabels?: ColumnMenuLabels;
|
|
1773
|
+
/** Snapshot used by the Manage popover's `Reset` action. Falls back to
|
|
1774
|
+
* `defaultStickyColumns` / `defaultHiddenColumns` / `defaultColumnOrder`
|
|
1775
|
+
* when the table is uncontrolled. When none are set, Reset clears all. */
|
|
1776
|
+
columnMenuDefaults?: ColumnMenuDefaults;
|
|
1777
|
+
/** Current sort state (controlled) */
|
|
1778
|
+
sorting?: TableSorting;
|
|
1779
|
+
/** Called when a sortable header is clicked */
|
|
1780
|
+
onSort?: (columnKey: string) => void;
|
|
1781
|
+
/** Footer slot — typically a `<Pagination>`, but accepts any node (bulk
|
|
1782
|
+
* actions toolbar, summary, etc.). The consumer owns the state, so any
|
|
1783
|
+
* pagination configuration / feature toggle is set on the node directly. */
|
|
1784
|
+
footer?: default_2.ReactNode;
|
|
1785
|
+
/** Row click handler — makes rows focusable + clickable */
|
|
1786
|
+
onRowClick?: (row: T, rowIndex: number) => void;
|
|
1787
|
+
/** Stable row key (defaults to row index) */
|
|
1788
|
+
rowKey?: (row: T, rowIndex: number) => string | number;
|
|
1789
|
+
/** Minimum table width — drives horizontal scroll inside the viewport */
|
|
1790
|
+
minWidth?: string | number;
|
|
1791
|
+
/** Viewport explicit height (overrides `maxHeight`) */
|
|
1792
|
+
height?: string | number;
|
|
1793
|
+
/** Viewport max-height — drives vertical scroll inside the viewport.
|
|
1794
|
+
* Unset by default: the table grows with its content and the page scrolls.
|
|
1795
|
+
* Pass an explicit value (e.g. `'70vh'`) to confine the body to a scrollable
|
|
1796
|
+
* region. */
|
|
1797
|
+
maxHeight?: string | number;
|
|
1798
|
+
/** When set, the table's header is replicated as a fixed overlay pinned to
|
|
1799
|
+
* the browser viewport at this offset (px) from the top whenever the
|
|
1800
|
+
* table's own header has scrolled out of view. Use this when the page
|
|
1801
|
+
* itself scrolls vertically (rather than the table's own viewport).
|
|
1802
|
+
* Setting this prop disables the default internal vertical scroll
|
|
1803
|
+
* (`maxHeight` is ignored). Horizontal scroll inside the table viewport
|
|
1804
|
+
* is preserved and synchronised with the overlay. */
|
|
1805
|
+
stickyHeaderOffset?: number;
|
|
1806
|
+
/** When set, the table's footer is replicated as a fixed overlay pinned to
|
|
1807
|
+
* the browser viewport at this offset (px) from the bottom whenever the
|
|
1808
|
+
* original footer is below the visible area. Requires `footer` to be set. */
|
|
1809
|
+
stickyFooterOffset?: number;
|
|
1810
|
+
/** Empty state node */
|
|
1811
|
+
emptyState?: default_2.ReactNode;
|
|
1812
|
+
/** Loading state node */
|
|
1813
|
+
loadingState?: default_2.ReactNode;
|
|
1814
|
+
/** Extra CSS classes on the root element */
|
|
1815
|
+
sx?: string;
|
|
1816
|
+
/** Inline styles on the root element */
|
|
1817
|
+
style?: default_2.CSSProperties;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
export declare interface TableSorting {
|
|
1821
|
+
sort_by: string;
|
|
1822
|
+
sort_order: TableSortOrder;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
export declare type TableSortOrder = 'ASC' | 'DESC';
|
|
1826
|
+
|
|
1827
|
+
export declare const TabList: default_2.FC<TabListProps>;
|
|
1828
|
+
|
|
1829
|
+
export declare interface TabListProps {
|
|
1830
|
+
/** Accessible label for the tablist — read by screen readers */
|
|
1831
|
+
'aria-label'?: string;
|
|
1832
|
+
/** id of an element that labels the tablist */
|
|
1833
|
+
'aria-labelledby'?: string;
|
|
1834
|
+
children: default_2.ReactNode;
|
|
1835
|
+
sx?: string;
|
|
1836
|
+
style?: default_2.CSSProperties;
|
|
1837
|
+
}
|
|
1838
|
+
|
|
1839
|
+
export declare const TabPanel: default_2.FC<TabPanelProps>;
|
|
1840
|
+
|
|
1841
|
+
export declare interface TabPanelProps {
|
|
1842
|
+
/** Value identifying this panel — must match the corresponding `<Tab value>` */
|
|
1843
|
+
value: string;
|
|
1844
|
+
/**
|
|
1845
|
+
* Render the panel even when inactive (keeps internal state mounted) and just
|
|
1846
|
+
* hide it with `hidden`. Default `false` — inactive panels are unmounted.
|
|
1847
|
+
*/
|
|
1848
|
+
keepMounted?: boolean;
|
|
1849
|
+
children: default_2.ReactNode;
|
|
1850
|
+
sx?: string;
|
|
1851
|
+
style?: default_2.CSSProperties;
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
export declare interface TabProps {
|
|
1855
|
+
/** Value identifying this tab — must match the corresponding `<TabPanel value>` */
|
|
1856
|
+
value: string;
|
|
1857
|
+
/** Disable this tab — keyboard navigation skips it */
|
|
1858
|
+
isDisabled?: boolean;
|
|
1859
|
+
/** Optional icon rendered before the label */
|
|
1860
|
+
icon?: default_2.ReactNode;
|
|
1861
|
+
/** Optional badge (number or short string) rendered after the label */
|
|
1862
|
+
badge?: default_2.ReactNode;
|
|
1863
|
+
children: default_2.ReactNode;
|
|
1864
|
+
sx?: string;
|
|
1865
|
+
style?: default_2.CSSProperties;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
|
1869
|
+
|
|
1870
|
+
declare type TabsColor = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
1871
|
+
|
|
1872
|
+
export declare interface TabsProps {
|
|
1873
|
+
/** Currently active tab value (controlled) */
|
|
1874
|
+
value?: string;
|
|
1875
|
+
/** Initial active tab value (uncontrolled) */
|
|
1876
|
+
defaultValue?: string;
|
|
1877
|
+
/** Called when the active tab changes */
|
|
1878
|
+
onChange?: (value: string) => void;
|
|
1879
|
+
/** Visual variant of the tab triggers */
|
|
1880
|
+
variant?: TabsVariant;
|
|
1881
|
+
/** Size variant — controls font and trigger padding */
|
|
1882
|
+
size?: TabsSize;
|
|
1883
|
+
/** Active colour for indicator/pill */
|
|
1884
|
+
color?: TabsColor;
|
|
1885
|
+
/** Disable all tabs in the group */
|
|
1886
|
+
isDisabled?: boolean;
|
|
1887
|
+
children: default_2.ReactNode;
|
|
1888
|
+
/** Extra utility classes on the root */
|
|
1889
|
+
sx?: string;
|
|
1890
|
+
/** Inline styles on the root */
|
|
1891
|
+
style?: default_2.CSSProperties;
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
declare type TabsSize = 'small' | 'medium' | 'large';
|
|
1895
|
+
|
|
1896
|
+
declare type TabsVariant = 'underline' | 'pills';
|
|
1897
|
+
|
|
1898
|
+
export declare const Tags: default_2.FC<TagsProps>;
|
|
1899
|
+
|
|
1900
|
+
declare type TagSize = 'small' | 'medium' | 'large';
|
|
1901
|
+
|
|
1902
|
+
export declare interface TagsProps {
|
|
1903
|
+
tags: Array<{
|
|
1904
|
+
label: string;
|
|
1905
|
+
department?: DepartmentType;
|
|
1906
|
+
}>;
|
|
1907
|
+
size?: TagSize;
|
|
1908
|
+
sx?: string;
|
|
1909
|
+
}
|
|
1910
|
+
|
|
1911
|
+
export declare interface TalkModeConfig {
|
|
1912
|
+
isConnected: boolean;
|
|
1913
|
+
isConnecting: boolean;
|
|
1914
|
+
micDenied?: boolean;
|
|
1915
|
+
agentName?: string;
|
|
1916
|
+
onStart: () => void;
|
|
1917
|
+
onEnd: () => void;
|
|
1918
|
+
/** Chat messages shown in the built-in side panel */
|
|
1919
|
+
messages?: TalkModeMessage[];
|
|
1920
|
+
/** If provided, shows chat input bar in side panel */
|
|
1921
|
+
onSendMessage?: (text: string) => void;
|
|
1922
|
+
/** Quick question chips shown above the messages */
|
|
1923
|
+
faqChips?: string[];
|
|
1924
|
+
/** External mic mute state (if provided, panel mic button uses this) */
|
|
1925
|
+
isMicMuted?: boolean;
|
|
1926
|
+
/** Toggle mic mute (if provided, panel mic button calls this) */
|
|
1927
|
+
onMicToggle?: () => void;
|
|
1928
|
+
/** Share chat history callback — if provided, shows a share icon in the panel header */
|
|
1929
|
+
onShareChat?: () => void;
|
|
1930
|
+
/** Override: replaces built-in panel content (consuming app provides full UI) */
|
|
1931
|
+
chatSlot?: default_2.ReactNode;
|
|
1932
|
+
}
|
|
1933
|
+
|
|
1934
|
+
export declare interface TalkModeMessage {
|
|
1935
|
+
role: 'user' | 'ai';
|
|
1936
|
+
text: string;
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
export declare const TaskCard: default_2.FC<TaskCardProps>;
|
|
1940
|
+
|
|
1941
|
+
export declare interface TaskCardAssignee {
|
|
1942
|
+
user_id: number | string;
|
|
1943
|
+
user?: {
|
|
1944
|
+
fullName?: string;
|
|
1945
|
+
name?: string;
|
|
1946
|
+
avatar?: string;
|
|
1947
|
+
};
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1950
|
+
export declare interface TaskCardDragHandleProps {
|
|
1951
|
+
ref?: (el: HTMLElement | null) => void;
|
|
1952
|
+
attributes?: Record<string, unknown>;
|
|
1953
|
+
listeners?: Record<string, unknown>;
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
export declare interface TaskCardLabel {
|
|
1957
|
+
id: number | string;
|
|
1958
|
+
name: string;
|
|
1959
|
+
color?: string;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
declare interface TaskCardMilestone {
|
|
1963
|
+
name: string;
|
|
1964
|
+
color?: string | null;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
export declare interface TaskCardProject {
|
|
1968
|
+
name: string;
|
|
1969
|
+
color?: string | null;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
export declare interface TaskCardProps {
|
|
1973
|
+
/** Task to render — accepts the wire shape from task-manager API */
|
|
1974
|
+
task: TaskCardTask;
|
|
1975
|
+
/** Called when the card body is clicked (skipped while pending or dragging) */
|
|
1976
|
+
onClick?: () => void;
|
|
1977
|
+
/**
|
|
1978
|
+
* Optional visual status pill rendered top-right of the title. Consumer
|
|
1979
|
+
* resolves color/label from their own statuses map (task-manager
|
|
1980
|
+
* `GET /task-statuses`) and passes it in. When omitted, no pill is rendered —
|
|
1981
|
+
* appropriate for Kanban views where the column already implies the status.
|
|
1982
|
+
*/
|
|
1983
|
+
statusInfo?: TaskCardStatusInfo;
|
|
1984
|
+
/**
|
|
1985
|
+
* Format a due-date for display. Defaults to `dd.MM` in browser locale.
|
|
1986
|
+
* Consumers with timezone requirements should pass their own formatter.
|
|
1987
|
+
*/
|
|
1988
|
+
formatDate?: (date: Date | string) => string;
|
|
1989
|
+
/** True while the card is being dragged elsewhere — root becomes invisible */
|
|
1990
|
+
isDragging?: boolean;
|
|
1991
|
+
/**
|
|
1992
|
+
* dnd-kit-style handle props. Spread `ref`/`attributes`/`listeners` onto
|
|
1993
|
+
* the root. When omitted, the card is not draggable.
|
|
1994
|
+
*/
|
|
1995
|
+
dragHandleProps?: TaskCardDragHandleProps;
|
|
1996
|
+
/** Extra utility classes appended to the root */
|
|
1997
|
+
sx?: string;
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
declare interface TaskCardStatusInfo {
|
|
2001
|
+
label: string;
|
|
2002
|
+
color?: string;
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
/**
|
|
2006
|
+
* Shape of a task as returned by the task-manager list endpoints
|
|
2007
|
+
* (`GET /tasks`, `GET /projects/:id/tasks`, `GET /tasks/my`) — the "list"
|
|
2008
|
+
* variant of `Task.toApiFormat` on the server. Detail-only fields (description,
|
|
2009
|
+
* hours, metadata, audit fields, full milestone) are intentionally absent.
|
|
2010
|
+
*/
|
|
2011
|
+
export declare interface TaskCardTask {
|
|
2012
|
+
id: number | string;
|
|
2013
|
+
title: string;
|
|
2014
|
+
priority?: 'urgent' | 'high' | 'medium' | 'low' | string;
|
|
2015
|
+
start_date?: string | Date | null;
|
|
2016
|
+
due_date?: string | Date | null;
|
|
2017
|
+
project?: TaskCardProject | null;
|
|
2018
|
+
/** Not returned by list endpoints; kept for detail-shape consumers */
|
|
2019
|
+
milestone?: TaskCardMilestone | null;
|
|
2020
|
+
assignees?: TaskCardAssignee[];
|
|
2021
|
+
controllers?: TaskCardAssignee[];
|
|
2022
|
+
labels?: TaskCardLabel[];
|
|
2023
|
+
/** Task's status name — kept for legacy overdue-suppression fallback */
|
|
2024
|
+
status?: string | null;
|
|
2025
|
+
/** Preferred flag for "done": terminal status for top-level, `is_completed` for subtasks */
|
|
2026
|
+
is_done?: boolean;
|
|
2027
|
+
_commentCount?: number;
|
|
2028
|
+
_attachmentCount?: number;
|
|
2029
|
+
_subtaskCount?: number;
|
|
2030
|
+
/** When provided, subtasks render as `done/total` */
|
|
2031
|
+
_completedSubtaskCount?: number;
|
|
2032
|
+
/** Number of open work sessions on this task — shows a pulsing Play badge */
|
|
2033
|
+
_activeSessions?: number;
|
|
2034
|
+
_pending?: boolean;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
export declare const TextField: default_2.ForwardRefExoticComponent<TextFieldProps & default_2.RefAttributes<HTMLTextAreaElement | HTMLInputElement>>;
|
|
2038
|
+
|
|
2039
|
+
export declare interface TextFieldProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement | HTMLTextAreaElement>, 'size' | 'className'> {
|
|
2040
|
+
label?: string;
|
|
2041
|
+
helperText?: string;
|
|
2042
|
+
error?: boolean;
|
|
2043
|
+
multiline?: boolean;
|
|
2044
|
+
rows?: number;
|
|
2045
|
+
startAdornment?: default_2.ReactNode;
|
|
2046
|
+
endAdornment?: default_2.ReactNode;
|
|
2047
|
+
fullWidth?: boolean;
|
|
2048
|
+
size?: 'small' | 'normal' | 'large';
|
|
2049
|
+
sx?: Partial<Record<'root' | 'wrapper' | 'input' | 'label' | 'helperText', string>>;
|
|
2050
|
+
}
|
|
2051
|
+
|
|
2052
|
+
export declare type Theme = 'light' | 'dark';
|
|
2053
|
+
|
|
2054
|
+
/**
|
|
2055
|
+
* Helper type for theme overrides.
|
|
2056
|
+
* Use this when creating a custom theme that only overrides specific tokens.
|
|
2057
|
+
*/
|
|
2058
|
+
export declare type ThemeOverrides = Partial<ThemeTokens>;
|
|
2059
|
+
|
|
2060
|
+
/**
|
|
2061
|
+
* All available design tokens in the UI-kit.
|
|
2062
|
+
* Use Partial<ThemeTokens> when overriding only specific tokens.
|
|
2063
|
+
*
|
|
2064
|
+
* @example
|
|
2065
|
+
* ```tsx
|
|
2066
|
+
* const customTheme: Partial<ThemeTokens> = {
|
|
2067
|
+
* '--palette-primary-main': '#FF6B6B',
|
|
2068
|
+
* '--palette-secondary-main': '#4ECDC4',
|
|
2069
|
+
* '--font-family-base': 'Inter, sans-serif'
|
|
2070
|
+
* };
|
|
2071
|
+
* ```
|
|
2072
|
+
*/
|
|
2073
|
+
export declare type ThemeTokens = PaletteTokens & DepartmentTokens & LayoutTokens & SpacingTokens & FluidSpacingTokens & BreakpointTokens & TypographyTokens & ZIndexTokens & MotionTokens & ShadowTokens & RadiusTokens & GradientTokens & ComponentTokens;
|
|
2074
|
+
|
|
2075
|
+
/**
|
|
2076
|
+
* Inclusive min/max time. Omit a field for open-ended start/end.
|
|
2077
|
+
* Pass `null` (where accepted) to indicate "no times available."
|
|
2078
|
+
*/
|
|
2079
|
+
export declare type TimeBounds = {
|
|
2080
|
+
min?: TimeOfDay;
|
|
2081
|
+
max?: TimeOfDay;
|
|
2082
|
+
};
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Pure time-math utilities shared by DatePicker (`showTime` mode) and TimePicker.
|
|
2086
|
+
* No React, no DOM. Imported by both components.
|
|
2087
|
+
*/
|
|
2088
|
+
/** Clock time in local hours / minutes (0–23 / 0–59). */
|
|
2089
|
+
export declare type TimeOfDay = {
|
|
2090
|
+
hour: number;
|
|
2091
|
+
minute: number;
|
|
2092
|
+
};
|
|
2093
|
+
|
|
2094
|
+
export declare const TimePicker: default_2.ForwardRefExoticComponent<TimePickerProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
2095
|
+
|
|
2096
|
+
export declare interface TimePickerProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'value' | 'defaultValue' | 'onChange' | 'size' | 'className' | 'type'> {
|
|
2097
|
+
/** 'single' selects one time, 'range' selects start + end. */
|
|
2098
|
+
mode?: 'single' | 'range';
|
|
2099
|
+
value?: Date | null;
|
|
2100
|
+
onChange?: (date: Date | null) => void;
|
|
2101
|
+
rangeValue?: TimeRange;
|
|
2102
|
+
onRangeChange?: (range: TimeRange) => void;
|
|
2103
|
+
/** 'input' renders a text field with a clock icon; 'icon' renders only the icon button. */
|
|
2104
|
+
triggerVariant?: 'input' | 'icon';
|
|
2105
|
+
/** Format using `HH` (00–23) and `mm` (00–59) tokens. Default `'HH:mm'`. */
|
|
2106
|
+
format?: string;
|
|
2107
|
+
placeholder?: string;
|
|
2108
|
+
/**
|
|
2109
|
+
* Minute step (`1` = every minute, `15` = quarter-hour grid, `60` = hourly).
|
|
2110
|
+
* @default 1
|
|
2111
|
+
*/
|
|
2112
|
+
timeStep?: number;
|
|
2113
|
+
/**
|
|
2114
|
+
* Inclusive min/max time. Same bounds apply to both ends in `range` mode;
|
|
2115
|
+
* end is additionally clamped to be `>= start` after each change.
|
|
2116
|
+
* Pass `null` to indicate no available times (picker shows empty state).
|
|
2117
|
+
* Omit entirely for full 00:00–23:59 (subject to `timeStep`).
|
|
2118
|
+
*/
|
|
2119
|
+
bounds?: TimeBounds | null;
|
|
2120
|
+
label?: string;
|
|
2121
|
+
helperText?: string;
|
|
2122
|
+
error?: boolean;
|
|
2123
|
+
disabled?: boolean;
|
|
2124
|
+
required?: boolean;
|
|
2125
|
+
size?: 'small' | 'normal' | 'large';
|
|
2126
|
+
fullWidth?: boolean;
|
|
2127
|
+
/** Custom node rendered inside the input wrapper, before the input. Ignored when `triggerVariant='icon'`. */
|
|
2128
|
+
startAdornment?: default_2.ReactNode;
|
|
2129
|
+
/** Custom node rendered between the input and the built-in clear/clock buttons. Ignored when `triggerVariant='icon'`. */
|
|
2130
|
+
endAdornment?: default_2.ReactNode;
|
|
2131
|
+
/** Extra CSS classes targeting individual parts. */
|
|
2132
|
+
sx?: Partial<Record<'root' | 'wrapper' | 'input' | 'label' | 'helperText' | 'popup', string>>;
|
|
2133
|
+
style?: default_2.CSSProperties;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
export declare interface TimeRange {
|
|
2137
|
+
start: Date | null;
|
|
2138
|
+
end: Date | null;
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
export declare const Toast: default_2.FC<ToastProps>;
|
|
2142
|
+
|
|
2143
|
+
export declare interface ToastContextValue {
|
|
2144
|
+
/** Show a toast and return its id (useful for manual dismissal) */
|
|
2145
|
+
showToast: (options: ShowToastOptions) => string;
|
|
2146
|
+
/** Dismiss a single toast by id */
|
|
2147
|
+
dismissToast: (id: string) => void;
|
|
2148
|
+
/** Dismiss all toasts */
|
|
2149
|
+
dismissAll: () => void;
|
|
2150
|
+
}
|
|
2151
|
+
|
|
2152
|
+
export declare type ToastPosition = 'top-right' | 'top-left' | 'top-center' | 'bottom-right' | 'bottom-left' | 'bottom-center';
|
|
2153
|
+
|
|
2154
|
+
export declare interface ToastProps {
|
|
2155
|
+
/** Visual variant — controls colour and default icon */
|
|
2156
|
+
type?: ToastType;
|
|
2157
|
+
/** Body text or content node */
|
|
2158
|
+
message: default_2.ReactNode;
|
|
2159
|
+
/** Optional bold title rendered above the message */
|
|
2160
|
+
title?: string;
|
|
2161
|
+
/** Override the default type icon */
|
|
2162
|
+
icon?: default_2.ReactNode;
|
|
2163
|
+
/** Called when the user clicks the close button. Omit to hide the button. */
|
|
2164
|
+
onClose?: () => void;
|
|
2165
|
+
/**
|
|
2166
|
+
* If > 0, renders a thin progress bar at the bottom that animates from full to empty
|
|
2167
|
+
* over this many ms — visual countdown until auto-dismiss. Omit or pass 0 to hide.
|
|
2168
|
+
*/
|
|
2169
|
+
duration?: number;
|
|
2170
|
+
/** Extra utility classes on the root */
|
|
2171
|
+
sx?: string;
|
|
2172
|
+
/** Inline styles on the root */
|
|
2173
|
+
style?: default_2.CSSProperties;
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
export declare const ToastProvider: default_2.FC<ToastProviderProps>;
|
|
2177
|
+
|
|
2178
|
+
export declare interface ToastProviderProps {
|
|
2179
|
+
children: default_2.ReactNode;
|
|
2180
|
+
/** Container position on screen. Default: 'top-right' */
|
|
2181
|
+
position?: ToastPosition;
|
|
2182
|
+
/** Default auto-dismiss in ms. Default: 5000 */
|
|
2183
|
+
defaultDuration?: number;
|
|
2184
|
+
/** Optional portal container id */
|
|
2185
|
+
portalContainerId?: string;
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
export declare type ToastType = 'success' | 'error' | 'warning' | 'info';
|
|
2189
|
+
|
|
2190
|
+
export declare const Toggle: default_2.FC<ToggleProps>;
|
|
2191
|
+
|
|
2192
|
+
export declare interface ToggleProps {
|
|
2193
|
+
/** Controlled checked state */
|
|
2194
|
+
checked?: boolean;
|
|
2195
|
+
/** Uncontrolled initial state */
|
|
2196
|
+
defaultChecked?: boolean;
|
|
2197
|
+
/** Called when the user toggles the switch */
|
|
2198
|
+
onChange?: (checked: boolean, event: default_2.ChangeEvent<HTMLInputElement>) => void;
|
|
2199
|
+
/** Label rendered next to the switch */
|
|
2200
|
+
label?: default_2.ReactNode;
|
|
2201
|
+
/** Position of the label relative to the switch */
|
|
2202
|
+
labelPosition?: 'start' | 'end';
|
|
2203
|
+
/** Colour applied to the ON state */
|
|
2204
|
+
color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
2205
|
+
/** Switch size */
|
|
2206
|
+
size?: 'small' | 'medium' | 'large';
|
|
2207
|
+
/** Disable all interaction */
|
|
2208
|
+
isDisabled?: boolean;
|
|
2209
|
+
/** name attribute forwarded to the native input */
|
|
2210
|
+
name?: string;
|
|
2211
|
+
/** value attribute forwarded to the native input */
|
|
2212
|
+
value?: string;
|
|
2213
|
+
/** id forwarded to the native input (label htmlFor uses this) */
|
|
2214
|
+
id?: string;
|
|
2215
|
+
/** Extra utility classes on the root */
|
|
2216
|
+
sx?: string;
|
|
2217
|
+
/** Inline styles on the root */
|
|
2218
|
+
style?: default_2.CSSProperties;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
/**
|
|
2222
|
+
* Token names grouped by category for easier access.
|
|
2223
|
+
*/
|
|
2224
|
+
export declare const TOKEN_CATEGORIES: Record<TokenCategory, readonly string[]>;
|
|
2225
|
+
|
|
2226
|
+
/**
|
|
2227
|
+
* Token category names for organization and validation.
|
|
2228
|
+
*/
|
|
2229
|
+
export declare type TokenCategory = 'palette' | 'department' | 'layout' | 'spacing' | 'fluidSpacing' | 'breakpoint' | 'typography' | 'zIndex' | 'motion' | 'shadow' | 'radius' | 'gradient' | 'component';
|
|
2230
|
+
|
|
2231
|
+
declare interface Tool {
|
|
2232
|
+
id: string;
|
|
2233
|
+
name: string;
|
|
2234
|
+
icon?: string | null;
|
|
2235
|
+
}
|
|
2236
|
+
|
|
2237
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
|
2238
|
+
|
|
2239
|
+
export declare type TooltipPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
2240
|
+
|
|
2241
|
+
export declare interface TooltipProps {
|
|
2242
|
+
/** Content to display inside the tooltip */
|
|
2243
|
+
title: default_2.ReactNode;
|
|
2244
|
+
/** Placement of the tooltip relative to the child element */
|
|
2245
|
+
placement?: TooltipPlacement;
|
|
2246
|
+
/** Whether to show a directional arrow */
|
|
2247
|
+
arrow?: boolean;
|
|
2248
|
+
/** Single child element that triggers the tooltip */
|
|
2249
|
+
children: default_2.ReactElement;
|
|
2250
|
+
/** Additional CSS class on the wrapper span */
|
|
2251
|
+
sx?: string;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
export declare type TypographyTokens = {
|
|
2255
|
+
'--font-family-base': string;
|
|
2256
|
+
'--font-weight-regular': string | number;
|
|
2257
|
+
'--font-weight-medium': string | number;
|
|
2258
|
+
'--font-weight-semibold': string | number;
|
|
2259
|
+
'--h1-font-size': string;
|
|
2260
|
+
'--h1-font-line-height': string;
|
|
2261
|
+
'--h2-font-size': string;
|
|
2262
|
+
'--h2-font-line-height': string;
|
|
2263
|
+
'--h3-font-size': string;
|
|
2264
|
+
'--h3-font-line-height': string;
|
|
2265
|
+
'--h4-font-size': string;
|
|
2266
|
+
'--h4-font-line-height': string;
|
|
2267
|
+
'--h5-font-size': string;
|
|
2268
|
+
'--h5-font-line-height': string;
|
|
2269
|
+
'--body-regular-font-size': string;
|
|
2270
|
+
'--body-regular-font-line-height': string;
|
|
2271
|
+
'--body-medium-font-size': string;
|
|
2272
|
+
'--body-medium-font-line-height': string;
|
|
2273
|
+
'--body-small-font-size': string;
|
|
2274
|
+
'--body-small-font-line-height': string;
|
|
2275
|
+
'--caption-font-size': string;
|
|
2276
|
+
'--caption-font-line-height': string;
|
|
2277
|
+
};
|
|
2278
|
+
|
|
2279
|
+
export declare const useConfirm: () => ConfirmContextValue;
|
|
2280
|
+
|
|
2281
|
+
/**
|
|
2282
|
+
* Hook to handle Escape key press
|
|
2283
|
+
* @param enabled - Whether the escape key handler is active
|
|
2284
|
+
* @param onEscape - Callback function to call when Escape is pressed
|
|
2285
|
+
*/
|
|
2286
|
+
export declare function useEscapeKey({ enabled, onEscape }: UseEscapeKeyOptions): void;
|
|
2287
|
+
|
|
2288
|
+
export declare interface UseEscapeKeyOptions {
|
|
2289
|
+
enabled: boolean;
|
|
2290
|
+
onEscape: () => void;
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
/**
|
|
2294
|
+
* Positions a floating element (menu, listbox, popover) relative to a trigger,
|
|
2295
|
+
* using `position: fixed` coordinates computed from the trigger's viewport rect.
|
|
2296
|
+
*
|
|
2297
|
+
* Listens to `scroll` (capture, catches nested scroll containers too) and
|
|
2298
|
+
* `resize` to keep the floating element attached to the trigger while the user
|
|
2299
|
+
* scrolls the page or a nested overflow container.
|
|
2300
|
+
*
|
|
2301
|
+
* Applies flip logic on the vertical axis when there isn't enough room on the
|
|
2302
|
+
* preferred side.
|
|
2303
|
+
*/
|
|
2304
|
+
export declare function useFloatingPosition(options: UseFloatingPositionOptions): FloatingPositionResult;
|
|
2305
|
+
|
|
2306
|
+
export declare interface UseFloatingPositionOptions {
|
|
2307
|
+
/** Ref to the anchor element (usually the trigger button/wrapper). */
|
|
2308
|
+
triggerRef: RefObject<HTMLElement | null>;
|
|
2309
|
+
/** Ref to the floating element — used to measure its height for flip logic. */
|
|
2310
|
+
floatingRef: RefObject<HTMLElement | null>;
|
|
2311
|
+
/** Whether the floating element is currently rendered. */
|
|
2312
|
+
open: boolean;
|
|
2313
|
+
/** Placement relative to trigger (default: 'bottom-start'). Vertical side may flip if there's not enough room. */
|
|
2314
|
+
placement?: FloatingPlacement;
|
|
2315
|
+
/** Gap in px between trigger and floating element (default: 8). */
|
|
2316
|
+
gap?: number;
|
|
2317
|
+
/** Hard cap for popup max-height when computing available space (default: 320). */
|
|
2318
|
+
maxHeight?: number;
|
|
2319
|
+
/** When true, floating element width is set to the trigger's width (like Select). */
|
|
2320
|
+
matchWidth?: boolean;
|
|
2321
|
+
/** Optional z-index override. Falls back to `var(--z-index-dropdown, 1000)`. */
|
|
2322
|
+
zIndex?: number | string;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
/**
|
|
2326
|
+
* Hook to trap focus within a container element
|
|
2327
|
+
* Useful for modals, drawers, and other overlay components to meet accessibility requirements
|
|
2328
|
+
*
|
|
2329
|
+
* @param options - Configuration options for the focus trap
|
|
2330
|
+
* @param options.enabled - Whether the focus trap is active
|
|
2331
|
+
* @param options.containerRef - Reference to the container element to trap focus within
|
|
2332
|
+
* @param options.initialFocusRef - Optional element to focus initially
|
|
2333
|
+
* @param options.returnFocusOnCleanup - Whether to return focus to the previously focused element on cleanup (default: true)
|
|
2334
|
+
*/
|
|
2335
|
+
export declare function useFocusTrap({ enabled, containerRef, initialFocusRef, returnFocusOnCleanup, }: UseFocusTrapOptions): void;
|
|
2336
|
+
|
|
2337
|
+
export declare interface UseFocusTrapOptions {
|
|
2338
|
+
enabled: boolean;
|
|
2339
|
+
containerRef: React.RefObject<HTMLElement | null>;
|
|
2340
|
+
initialFocusRef?: React.RefObject<HTMLElement | null>;
|
|
2341
|
+
returnFocusOnCleanup?: boolean;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
/**
|
|
2345
|
+
* Hook to lock page scroll when enabled
|
|
2346
|
+
* Prevents scrolling on both body and html elements, useful for modals and drawers
|
|
2347
|
+
* @param enabled - Whether scroll should be locked
|
|
2348
|
+
* @param mediaQuery - Optional media query to restrict locking to specific viewports
|
|
2349
|
+
*/
|
|
2350
|
+
export declare function useLockScroll({ enabled, mediaQuery }: UseLockScrollOptions): void;
|
|
2351
|
+
|
|
2352
|
+
export declare interface UseLockScrollOptions {
|
|
2353
|
+
enabled: boolean;
|
|
2354
|
+
/** Optional media query — lock only when it matches, e.g. '(max-width: 767px)' */
|
|
2355
|
+
mediaQuery?: string;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
/**
|
|
2359
|
+
* Hook to create and manage a portal container element
|
|
2360
|
+
* @param options - Configuration options for the portal
|
|
2361
|
+
* @param options.containerId - Custom ID for the portal container
|
|
2362
|
+
* @param options.containerElement - Existing HTML element to use as container
|
|
2363
|
+
* @returns The portal container element, or null if document is not available (SSR)
|
|
2364
|
+
*/
|
|
2365
|
+
export declare function usePortal(options?: UsePortalOptions): HTMLElement | null;
|
|
2366
|
+
|
|
2367
|
+
export declare interface UsePortalOptions {
|
|
2368
|
+
containerId?: string;
|
|
2369
|
+
containerElement?: HTMLElement;
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
/**
|
|
2373
|
+
* Manages light/dark theme.
|
|
2374
|
+
* - Reads from localStorage (`ui-kit-theme`) on init
|
|
2375
|
+
* - Falls back to system preference
|
|
2376
|
+
* - Syncs to `document.documentElement.dataset.theme`
|
|
2377
|
+
* - Persists changes to localStorage
|
|
2378
|
+
*/
|
|
2379
|
+
export declare function useTheme(): UseThemeReturn;
|
|
2380
|
+
|
|
2381
|
+
export declare interface UseThemeReturn {
|
|
2382
|
+
theme: Theme;
|
|
2383
|
+
isDark: boolean;
|
|
2384
|
+
toggleTheme: () => void;
|
|
2385
|
+
setTheme: (theme: Theme) => void;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
export declare const useToast: () => ToastContextValue;
|
|
2389
|
+
|
|
2390
|
+
export declare interface VideoAuthor {
|
|
2391
|
+
name: string;
|
|
2392
|
+
initials: string;
|
|
2393
|
+
avatarColor?: string;
|
|
2394
|
+
department?: DepartmentType;
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
export declare const VideoCard: default_2.FC<VideoCardProps>;
|
|
2398
|
+
|
|
2399
|
+
export declare interface VideoCardProps {
|
|
2400
|
+
videoUrl: string;
|
|
2401
|
+
thumbnailUrl?: string;
|
|
2402
|
+
title: string;
|
|
2403
|
+
author: VideoAuthor;
|
|
2404
|
+
description: string;
|
|
2405
|
+
tags: VideoTag[];
|
|
2406
|
+
duration?: string;
|
|
2407
|
+
views?: string;
|
|
2408
|
+
publishedAt?: string;
|
|
2409
|
+
isInPlaylist?: boolean;
|
|
2410
|
+
onClick?: () => void;
|
|
2411
|
+
sx?: string;
|
|
2412
|
+
}
|
|
2413
|
+
|
|
2414
|
+
export declare interface VideoTag {
|
|
2415
|
+
label: string;
|
|
2416
|
+
department?: DepartmentType;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
export declare type ZIndexTokens = {
|
|
2420
|
+
'--z-index-dropdown': string | number;
|
|
2421
|
+
'--z-index-sticky': string | number;
|
|
2422
|
+
'--z-index-fixed': string | number;
|
|
2423
|
+
'--z-index-backdrop': string | number;
|
|
2424
|
+
'--z-index-modal': string | number;
|
|
2425
|
+
'--z-index-popover': string | number;
|
|
2426
|
+
'--z-index-tooltip': string | number;
|
|
2427
|
+
};
|
|
2428
|
+
|
|
2429
|
+
export { }
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
export declare namespace Table {
|
|
2433
|
+
var displayName: string;
|
|
2434
|
+
}
|
|
2435
|
+
|