pixelplay 1.0.3 → 1.0.4
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/CHANGELOG.md +61 -61
- package/README.md +91 -91
- package/dist/index.d.mts +1323 -2
- package/dist/index.d.ts +1323 -2
- package/dist/index.js +67119 -15
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +67068 -2
- package/dist/index.mjs.map +1 -0
- package/package.json +57 -57
package/dist/index.d.mts
CHANGED
|
@@ -1,3 +1,1324 @@
|
|
|
1
|
-
|
|
1
|
+
import React$1, { CSSProperties, ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, TextareaHTMLAttributes, HTMLAttributes, SVGAttributes } from 'react';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { ClassValue } from 'clsx';
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
/** Common size scale used across all components */
|
|
6
|
+
type SizeScale = "sm" | "md" | "lg";
|
|
7
|
+
/** Color intent variants */
|
|
8
|
+
type ColorVariant = "default" | "primary" | "secondary" | "success" | "warning" | "danger";
|
|
9
|
+
/** Visual style variants */
|
|
10
|
+
type StyleVariant = "solid" | "bordered" | "light" | "flat" | "faded" | "shadow" | "ghost";
|
|
11
|
+
/** Radius variants */
|
|
12
|
+
type RadiusVariant = "none" | "sm" | "md" | "lg" | "full";
|
|
13
|
+
/**
|
|
14
|
+
* Base props that every component should extend.
|
|
15
|
+
* Provides a consistent API for className and style overrides.
|
|
16
|
+
*/
|
|
17
|
+
interface BaseComponentProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: CSSProperties;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
23
|
+
/** Visual color intent */
|
|
24
|
+
color?: ColorVariant;
|
|
25
|
+
/** Visual style variant */
|
|
26
|
+
variant?: StyleVariant;
|
|
27
|
+
/** Size of the button */
|
|
28
|
+
size?: SizeScale;
|
|
29
|
+
/** Border radius */
|
|
30
|
+
radius?: RadiusVariant;
|
|
31
|
+
/** Show loading spinner and disable interactions */
|
|
32
|
+
isLoading?: boolean;
|
|
33
|
+
/** Disable the button */
|
|
34
|
+
isDisabled?: boolean;
|
|
35
|
+
/** Render as full-width block */
|
|
36
|
+
fullWidth?: boolean;
|
|
37
|
+
/** Icon placed before the children */
|
|
38
|
+
startContent?: React.ReactNode;
|
|
39
|
+
/** Icon placed after the children */
|
|
40
|
+
endContent?: React.ReactNode;
|
|
41
|
+
/** Render as equal-padding icon-only button (hides children) */
|
|
42
|
+
isIconOnly?: boolean;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
|
|
47
|
+
interface ButtonGroupProps {
|
|
48
|
+
children: ReactNode;
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
interface ButtonGroupItemProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
52
|
+
/** Content rendered before the label */
|
|
53
|
+
startContent?: ReactNode;
|
|
54
|
+
/** Render icon-only (tighter padding, no label) */
|
|
55
|
+
isIconOnly?: boolean;
|
|
56
|
+
/** Highlighted / active state */
|
|
57
|
+
isSelected?: boolean;
|
|
58
|
+
/** Disabled state */
|
|
59
|
+
isDisabled?: boolean;
|
|
60
|
+
children?: ReactNode;
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
declare function ButtonGroup({ children, className }: ButtonGroupProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
declare function ButtonGroupItem({ children, startContent, isIconOnly, isSelected, isDisabled, className, onClick, ...props }: ButtonGroupItemProps): react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
67
|
+
type InputVariant = "bordered" | "flat" | "faded" | "underlined";
|
|
68
|
+
type TextareaResize = "none" | "vertical" | "horizontal" | "both";
|
|
69
|
+
interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
70
|
+
/** Visible label above the input */
|
|
71
|
+
label?: string;
|
|
72
|
+
/** Hint text rendered below in gray */
|
|
73
|
+
description?: string;
|
|
74
|
+
/** Error message — also triggers error visual state */
|
|
75
|
+
errorMessage?: string;
|
|
76
|
+
/** Element rendered inside the input, before the text (e.g. an icon or "$") */
|
|
77
|
+
startContent?: React.ReactNode;
|
|
78
|
+
/** Element rendered inside the input, after the text (e.g. a help icon) */
|
|
79
|
+
endContent?: React.ReactNode;
|
|
80
|
+
/** Addon rendered at the left edge with a divider (e.g. country selector, "http://") */
|
|
81
|
+
leadingAddOn?: React.ReactNode;
|
|
82
|
+
/** Addon rendered at the right edge with a divider (e.g. "USD" currency picker) */
|
|
83
|
+
trailingAddOn?: React.ReactNode;
|
|
84
|
+
/** Visual style variant */
|
|
85
|
+
variant?: InputVariant;
|
|
86
|
+
/** Size — matches button height scale */
|
|
87
|
+
size?: SizeScale;
|
|
88
|
+
/** Border radius */
|
|
89
|
+
radius?: RadiusVariant;
|
|
90
|
+
/** Stretch to container width */
|
|
91
|
+
fullWidth?: boolean;
|
|
92
|
+
/** Disable the input */
|
|
93
|
+
isDisabled?: boolean;
|
|
94
|
+
/** Mark as required */
|
|
95
|
+
isRequired?: boolean;
|
|
96
|
+
/** Mark as read-only */
|
|
97
|
+
isReadOnly?: boolean;
|
|
98
|
+
}
|
|
99
|
+
interface TextareaProps extends Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> {
|
|
100
|
+
/** Visible label above the textarea */
|
|
101
|
+
label?: string;
|
|
102
|
+
/** Hint text rendered below in gray */
|
|
103
|
+
description?: string;
|
|
104
|
+
/** Error message — also triggers error visual state */
|
|
105
|
+
errorMessage?: string;
|
|
106
|
+
/** Border radius */
|
|
107
|
+
radius?: RadiusVariant;
|
|
108
|
+
/** Stretch to container width */
|
|
109
|
+
fullWidth?: boolean;
|
|
110
|
+
/** Disable the textarea */
|
|
111
|
+
isDisabled?: boolean;
|
|
112
|
+
/** Mark as required */
|
|
113
|
+
isRequired?: boolean;
|
|
114
|
+
/** Mark as read-only */
|
|
115
|
+
isReadOnly?: boolean;
|
|
116
|
+
/** CSS resize behaviour */
|
|
117
|
+
resize?: TextareaResize;
|
|
118
|
+
/** Minimum visible rows (sets min-height) */
|
|
119
|
+
minRows?: number;
|
|
120
|
+
}
|
|
121
|
+
interface MegaInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size"> {
|
|
122
|
+
/** Size of the input cell */
|
|
123
|
+
size?: SizeScale;
|
|
124
|
+
/** Disable the input */
|
|
125
|
+
isDisabled?: boolean;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare const Input: React$1.ForwardRefExoticComponent<InputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
129
|
+
|
|
130
|
+
declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
|
|
131
|
+
|
|
132
|
+
declare const MegaInput: React$1.ForwardRefExoticComponent<MegaInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
133
|
+
|
|
134
|
+
type BadgeColor = "gray" | "purple" | "red" | "amber" | "emerald" | "slate" | "sky" | "blue" | "indigo" | "violet" | "pink" | "rose" | "orange";
|
|
135
|
+
type BadgeSize = "sm" | "md";
|
|
136
|
+
interface BadgeProps {
|
|
137
|
+
color?: BadgeColor;
|
|
138
|
+
size?: BadgeSize;
|
|
139
|
+
/** Render a leading status dot in the badge's accent colour */
|
|
140
|
+
dot?: boolean;
|
|
141
|
+
/** Leading slot — icon, avatar, flag, etc. */
|
|
142
|
+
startContent?: ReactNode;
|
|
143
|
+
/** Trailing slot — close icon, arrow, etc. */
|
|
144
|
+
endContent?: ReactNode;
|
|
145
|
+
/** Removes horizontal padding and shows only the endContent icon */
|
|
146
|
+
isIconOnly?: boolean;
|
|
147
|
+
children?: ReactNode;
|
|
148
|
+
className?: string;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare function Badge({ color, size, dot, startContent, endContent, isIconOnly, children, className, }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
152
|
+
declare namespace Badge {
|
|
153
|
+
var displayName: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
type BadgeGroupColor = "primary" | "gray" | "error" | "warning" | "success";
|
|
157
|
+
type BadgeGroupSize = "sm" | "md";
|
|
158
|
+
interface BadgeGroupProps {
|
|
159
|
+
color?: BadgeGroupColor;
|
|
160
|
+
size?: BadgeGroupSize;
|
|
161
|
+
/** Text shown inside the inner white chip */
|
|
162
|
+
badgeLabel: string;
|
|
163
|
+
/** Position of the inner chip relative to the message */
|
|
164
|
+
badgePosition?: "left" | "right";
|
|
165
|
+
/** Trailing slot inside the inner chip (e.g. an arrow icon) */
|
|
166
|
+
badgeEndContent?: ReactNode;
|
|
167
|
+
/** Trailing slot on the message text (e.g. an arrow icon) */
|
|
168
|
+
endContent?: ReactNode;
|
|
169
|
+
/** The message text */
|
|
170
|
+
children: ReactNode;
|
|
171
|
+
className?: string;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
declare function BadgeGroup({ color, size, badgeLabel, badgePosition, badgeEndContent, endContent, children, className, }: BadgeGroupProps): react_jsx_runtime.JSX.Element;
|
|
175
|
+
declare namespace BadgeGroup {
|
|
176
|
+
var displayName: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
type TagSize = "sm" | "md" | "lg";
|
|
180
|
+
interface TagProps {
|
|
181
|
+
/** Visual size */
|
|
182
|
+
size?: TagSize;
|
|
183
|
+
/** Leading slot — avatar, flag emoji, icon, etc. */
|
|
184
|
+
startContent?: ReactNode;
|
|
185
|
+
/** Show a leading status dot (uses emerald-500 by default) */
|
|
186
|
+
dot?: boolean;
|
|
187
|
+
/** Renders a dismiss (×) trailing button. Called when clicked. */
|
|
188
|
+
onDismiss?: () => void;
|
|
189
|
+
/** Trailing count number displayed after the label */
|
|
190
|
+
count?: number;
|
|
191
|
+
/**
|
|
192
|
+
* Controlled checkbox state. When defined (even `false`), a checkbox is
|
|
193
|
+
* rendered at the leading edge before all other content.
|
|
194
|
+
*/
|
|
195
|
+
checked?: boolean;
|
|
196
|
+
/** Checkbox change handler */
|
|
197
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
198
|
+
children: ReactNode;
|
|
199
|
+
className?: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
declare function Tag({ size, startContent, dot, onDismiss, count, checked, onCheckedChange, children, className, }: TagProps): react_jsx_runtime.JSX.Element;
|
|
203
|
+
declare namespace Tag {
|
|
204
|
+
var displayName: string;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
208
|
+
/** Makes the entire card a pressable/clickable surface */
|
|
209
|
+
isPressable?: boolean;
|
|
210
|
+
/** Removes default shadow */
|
|
211
|
+
isBlurred?: boolean;
|
|
212
|
+
/** Shadow depth */
|
|
213
|
+
shadow?: "none" | "sm" | "md" | "lg";
|
|
214
|
+
/** Border radius */
|
|
215
|
+
radius?: RadiusVariant;
|
|
216
|
+
/** Full-width card */
|
|
217
|
+
fullWidth?: boolean;
|
|
218
|
+
}
|
|
219
|
+
interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
220
|
+
}
|
|
221
|
+
interface CardBodyProps extends HTMLAttributes<HTMLDivElement> {
|
|
222
|
+
}
|
|
223
|
+
interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
227
|
+
declare const CardHeader: React$1.ForwardRefExoticComponent<CardHeaderProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
228
|
+
declare const CardBody: React$1.ForwardRefExoticComponent<CardBodyProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
229
|
+
declare const CardFooter: React$1.ForwardRefExoticComponent<CardFooterProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
230
|
+
|
|
231
|
+
interface SpinnerProps extends SVGAttributes<SVGSVGElement> {
|
|
232
|
+
/** Loading label for assistive technology */
|
|
233
|
+
label?: string;
|
|
234
|
+
/** Color of the spinner */
|
|
235
|
+
color?: ColorVariant | "current";
|
|
236
|
+
/** Size of the spinner */
|
|
237
|
+
size?: SizeScale;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
declare const Spinner: React$1.ForwardRefExoticComponent<SpinnerProps & React$1.RefAttributes<SVGSVGElement>>;
|
|
241
|
+
|
|
242
|
+
type AvatarColor = "default" | "primary" | "secondary" | "tertiary" | "graphic-1" | "graphic-2" | "graphic-3" | "graphic-4" | "graphic-5" | "graphic-6" | "graphic-7" | "graphic-8" | "graphic-9" | "graphic-10";
|
|
243
|
+
type AvatarSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
244
|
+
interface AvatarProps {
|
|
245
|
+
/** Photo URL */
|
|
246
|
+
src?: string;
|
|
247
|
+
/** Full name → auto-generates 2-letter initials fallback */
|
|
248
|
+
name?: string;
|
|
249
|
+
/** Explicit initials override (max 2 chars shown) */
|
|
250
|
+
initials?: string;
|
|
251
|
+
/** Alt text for the photo */
|
|
252
|
+
alt?: string;
|
|
253
|
+
/** Avatar size — xxs 16px · xs 24px · sm 32px · md 40px · lg 48px · xl 56px · 2xl 64px · 3xl 96px */
|
|
254
|
+
size?: AvatarSize;
|
|
255
|
+
/** Initials/icon background colour — uses theme categorical & semantic tokens */
|
|
256
|
+
color?: AvatarColor;
|
|
257
|
+
/** Adds a coloured outline ring */
|
|
258
|
+
isBordered?: boolean;
|
|
259
|
+
/** Status badge in bottom-right corner */
|
|
260
|
+
status?: "online" | "offline" | "busy" | "away";
|
|
261
|
+
/** Corner logo / company badge — URL rendered as a small bottom-right image */
|
|
262
|
+
badge?: string;
|
|
263
|
+
className?: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
267
|
+
|
|
268
|
+
type SocialPlatform = "google" | "apple" | "facebook" | "twitter" | "figma" | "dribbble" | "github";
|
|
269
|
+
/**
|
|
270
|
+
* "subtle" — white button with coloured brand icon (light style from Figma)
|
|
271
|
+
* "solid" — fully brand-coloured button with white icon
|
|
272
|
+
* "ghost" — outlined button, brand icon colour, dark label
|
|
273
|
+
*/
|
|
274
|
+
type SocialButtonStyle = "subtle" | "solid" | "ghost";
|
|
275
|
+
interface SocialButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
276
|
+
platform: SocialPlatform;
|
|
277
|
+
/** Visual style — brand (outlined light), solid (filled), ghost (no bg) */
|
|
278
|
+
buttonStyle?: SocialButtonStyle;
|
|
279
|
+
/** Show icon only — no label */
|
|
280
|
+
isIconOnly?: boolean;
|
|
281
|
+
/** Disable the button */
|
|
282
|
+
isDisabled?: boolean;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
declare const SocialButton: React$1.ForwardRefExoticComponent<SocialButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
286
|
+
|
|
287
|
+
type StorePlatform = "app-store" | "google-play";
|
|
288
|
+
/** "dark" — black bg (default), "light" — white bg with black border */
|
|
289
|
+
type StoreButtonTheme = "dark" | "light";
|
|
290
|
+
type StoreButtonSize = "sm" | "md";
|
|
291
|
+
interface StoreButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
292
|
+
platform: StorePlatform;
|
|
293
|
+
/** dark = black bg white text, light = white bg black text */
|
|
294
|
+
theme?: StoreButtonTheme;
|
|
295
|
+
size?: StoreButtonSize;
|
|
296
|
+
/** Disable the button */
|
|
297
|
+
isDisabled?: boolean;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
declare const StoreButton: React$1.ForwardRefExoticComponent<StoreButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
301
|
+
|
|
302
|
+
interface DropdownMenuProps {
|
|
303
|
+
children: ReactNode;
|
|
304
|
+
className?: string;
|
|
305
|
+
}
|
|
306
|
+
interface DropdownMenuHeaderProps {
|
|
307
|
+
title: string;
|
|
308
|
+
className?: string;
|
|
309
|
+
}
|
|
310
|
+
interface DropdownMenuAvatarHeaderProps {
|
|
311
|
+
name: string;
|
|
312
|
+
email?: string;
|
|
313
|
+
avatarSrc?: string;
|
|
314
|
+
isOnline?: boolean;
|
|
315
|
+
className?: string;
|
|
316
|
+
}
|
|
317
|
+
interface DropdownMenuSeparatorProps {
|
|
318
|
+
/** muted=true renders a lighter divider (used inside headers) */
|
|
319
|
+
muted?: boolean;
|
|
320
|
+
className?: string;
|
|
321
|
+
}
|
|
322
|
+
interface DropdownMenuItemProps {
|
|
323
|
+
label: string;
|
|
324
|
+
/** Leading icon node */
|
|
325
|
+
icon?: ReactNode;
|
|
326
|
+
/** When defined, a checkbox is shown. Pass true/false to control checked state. */
|
|
327
|
+
checked?: boolean;
|
|
328
|
+
/** Trailing keyboard shortcut string, e.g. "⌘S" */
|
|
329
|
+
shortcut?: string;
|
|
330
|
+
isDisabled?: boolean;
|
|
331
|
+
/** Renders the item in the error/destructive colour */
|
|
332
|
+
isDestructive?: boolean;
|
|
333
|
+
onClick?: () => void;
|
|
334
|
+
className?: string;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
declare function DropdownMenu({ children, className }: DropdownMenuProps): react_jsx_runtime.JSX.Element;
|
|
338
|
+
declare function DropdownMenuHeader({ title, className, }: DropdownMenuHeaderProps): react_jsx_runtime.JSX.Element;
|
|
339
|
+
declare function DropdownMenuAvatarHeader({ name, email, avatarSrc, isOnline, className, }: DropdownMenuAvatarHeaderProps): react_jsx_runtime.JSX.Element;
|
|
340
|
+
declare function DropdownMenuSeparator({ muted, className, }: DropdownMenuSeparatorProps): react_jsx_runtime.JSX.Element;
|
|
341
|
+
declare function DropdownMenuItem({ label, icon, checked, shortcut, isDisabled, isDestructive, onClick, className, }: DropdownMenuItemProps): react_jsx_runtime.JSX.Element;
|
|
342
|
+
|
|
343
|
+
interface SelectOption {
|
|
344
|
+
label: string;
|
|
345
|
+
value: string;
|
|
346
|
+
/** Leading icon node (e.g. a react-feather icon) */
|
|
347
|
+
icon?: ReactNode;
|
|
348
|
+
/** Photo URL for avatar leading slot */
|
|
349
|
+
avatarSrc?: string;
|
|
350
|
+
/** Fallback initials when avatarSrc is absent and avatar slot is used */
|
|
351
|
+
avatarInitials?: string;
|
|
352
|
+
/** Show a coloured online/offline dot next to the item */
|
|
353
|
+
isOnline?: boolean;
|
|
354
|
+
/** Short handle rendered after the label, e.g. "@olivia" */
|
|
355
|
+
username?: string;
|
|
356
|
+
}
|
|
357
|
+
interface SelectProps {
|
|
358
|
+
options: SelectOption[];
|
|
359
|
+
value?: string;
|
|
360
|
+
onChange?: (value: string) => void;
|
|
361
|
+
placeholder?: string;
|
|
362
|
+
/** Renders a search input inside the open panel (ComboBox mode) */
|
|
363
|
+
isSearchable?: boolean;
|
|
364
|
+
isDisabled?: boolean;
|
|
365
|
+
size?: "sm" | "md" | "lg";
|
|
366
|
+
className?: string;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
declare function Select({ options, value, onChange, placeholder, isSearchable, isDisabled, size, className, }: SelectProps): react_jsx_runtime.JSX.Element;
|
|
370
|
+
|
|
371
|
+
interface ToggleProps {
|
|
372
|
+
/** Controlled checked state */
|
|
373
|
+
checked?: boolean;
|
|
374
|
+
/** Uncontrolled default checked state */
|
|
375
|
+
defaultChecked?: boolean;
|
|
376
|
+
/** Called with the new checked value whenever it changes */
|
|
377
|
+
onChange?: (checked: boolean) => void;
|
|
378
|
+
/** Size of the toggle */
|
|
379
|
+
size?: "sm" | "md";
|
|
380
|
+
/** Disable the toggle */
|
|
381
|
+
isDisabled?: boolean;
|
|
382
|
+
/** Label displayed next to the toggle */
|
|
383
|
+
label?: string;
|
|
384
|
+
/** Supporting description rendered below the label */
|
|
385
|
+
description?: string;
|
|
386
|
+
className?: string;
|
|
387
|
+
id?: string;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
declare function Toggle({ checked, defaultChecked, onChange, size, isDisabled, label, description, className, id: idProp, }: ToggleProps): react_jsx_runtime.JSX.Element;
|
|
391
|
+
declare namespace Toggle {
|
|
392
|
+
var displayName: string;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
interface CheckboxProps {
|
|
396
|
+
/** Controlled checked state */
|
|
397
|
+
checked?: boolean;
|
|
398
|
+
/** Indeterminate / partial state — overrides checked visually */
|
|
399
|
+
indeterminate?: boolean;
|
|
400
|
+
/** Uncontrolled default checked state */
|
|
401
|
+
defaultChecked?: boolean;
|
|
402
|
+
/** Called with the new checked value whenever it changes */
|
|
403
|
+
onChange?: (checked: boolean) => void;
|
|
404
|
+
/** Visual shape variant */
|
|
405
|
+
variant?: "square" | "rounded" | "circle";
|
|
406
|
+
/** Size of the checkbox */
|
|
407
|
+
size?: "sm" | "md";
|
|
408
|
+
/** Disable the checkbox */
|
|
409
|
+
isDisabled?: boolean;
|
|
410
|
+
/** Label displayed next to the checkbox */
|
|
411
|
+
label?: string;
|
|
412
|
+
/** Supporting description rendered below the label */
|
|
413
|
+
description?: string;
|
|
414
|
+
className?: string;
|
|
415
|
+
id?: string;
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
declare function Checkbox({ checked, indeterminate, defaultChecked, onChange, variant, size, isDisabled, label, description, className, id: idProp, }: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
419
|
+
declare namespace Checkbox {
|
|
420
|
+
var displayName: string;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
interface CheckboxCardOption {
|
|
424
|
+
value: string;
|
|
425
|
+
title: string;
|
|
426
|
+
/** Short secondary text shown inline with the title (e.g. "$10/month") */
|
|
427
|
+
subtitle?: string;
|
|
428
|
+
/** Supporting description below the title */
|
|
429
|
+
description?: string;
|
|
430
|
+
/** Optional icon rendered in a circular badge on the left */
|
|
431
|
+
icon?: ReactNode;
|
|
432
|
+
isDisabled?: boolean;
|
|
433
|
+
/** Icon-card body: large price value (e.g. "$10") */
|
|
434
|
+
price?: string;
|
|
435
|
+
/** Icon-card body: price period label (e.g. "per month") */
|
|
436
|
+
priceUnit?: string;
|
|
437
|
+
/** Icon-card body: optional badge pill text (e.g. "Limited time only") */
|
|
438
|
+
badge?: string;
|
|
439
|
+
/** Icon-card body: badge color — defaults to "emerald" */
|
|
440
|
+
badgeColor?: BadgeColor;
|
|
441
|
+
/** Avatar variant: URL of the circular avatar image */
|
|
442
|
+
avatarSrc?: string;
|
|
443
|
+
}
|
|
444
|
+
interface CheckboxCardProps extends CheckboxCardOption {
|
|
445
|
+
checked?: boolean;
|
|
446
|
+
defaultChecked?: boolean;
|
|
447
|
+
onChange?: (checked: boolean) => void;
|
|
448
|
+
size?: "sm" | "md";
|
|
449
|
+
/** Visual layout variant */
|
|
450
|
+
variant?: "icon-simple" | "icon-card" | "avatar" | "radio" | "checkbox";
|
|
451
|
+
className?: string;
|
|
452
|
+
id?: string;
|
|
453
|
+
}
|
|
454
|
+
interface CheckboxGroupProps {
|
|
455
|
+
options: CheckboxCardOption[];
|
|
456
|
+
/** Controlled selected values */
|
|
457
|
+
value?: string[];
|
|
458
|
+
/** Uncontrolled default selected values */
|
|
459
|
+
defaultValue?: string[];
|
|
460
|
+
onChange?: (values: string[]) => void;
|
|
461
|
+
/** Group label */
|
|
462
|
+
label?: string;
|
|
463
|
+
/** Disable the entire group */
|
|
464
|
+
isDisabled?: boolean;
|
|
465
|
+
/** Stack direction */
|
|
466
|
+
orientation?: "vertical" | "horizontal";
|
|
467
|
+
/** Card size — sm uses text-sm, md uses text-base with icon ring treatment */
|
|
468
|
+
size?: "sm" | "md";
|
|
469
|
+
/** Visual layout variant — applied to all cards in the group */
|
|
470
|
+
variant?: "icon-simple" | "icon-card" | "avatar" | "radio" | "checkbox";
|
|
471
|
+
className?: string;
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
declare function CheckboxCard({ value: _value, title, subtitle, description, icon, price, priceUnit, badge, badgeColor, avatarSrc, checked, defaultChecked, onChange, isDisabled, size, variant, className, id: idProp, }: CheckboxCardProps): react_jsx_runtime.JSX.Element;
|
|
475
|
+
declare function CheckboxGroup({ options, value, defaultValue, onChange, label, isDisabled, orientation, size, variant, className, }: CheckboxGroupProps): react_jsx_runtime.JSX.Element;
|
|
476
|
+
|
|
477
|
+
type ProgressLabelPlacement = "none" | "right" | "below" | "tooltip-above" | "tooltip-below";
|
|
478
|
+
type ProgressSize = "sm" | "md";
|
|
479
|
+
interface ProgressBarProps {
|
|
480
|
+
/** Progress value, 0–100 */
|
|
481
|
+
value: number;
|
|
482
|
+
/** Custom label text; defaults to `${value}%` */
|
|
483
|
+
label?: string;
|
|
484
|
+
/** Where to show the percentage label (default: "none") */
|
|
485
|
+
labelPlacement?: ProgressLabelPlacement;
|
|
486
|
+
/** Track height: sm = 8 px, md = 12 px */
|
|
487
|
+
size?: ProgressSize;
|
|
488
|
+
className?: string;
|
|
489
|
+
"aria-label"?: string;
|
|
490
|
+
}
|
|
491
|
+
type CircularProgressSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
492
|
+
type CircularProgressVariant = "full" | "half";
|
|
493
|
+
interface CircularProgressProps {
|
|
494
|
+
/** Progress value, 0–100 */
|
|
495
|
+
value: number;
|
|
496
|
+
/** Visual size of the ring */
|
|
497
|
+
size?: CircularProgressSize;
|
|
498
|
+
/** Full 360° ring or 180° top-half arc */
|
|
499
|
+
variant?: CircularProgressVariant;
|
|
500
|
+
/** Optional supplementary label inside the circle (e.g. "Active users") */
|
|
501
|
+
label?: string;
|
|
502
|
+
/** Show the numeric percentage in the centre (default: true) */
|
|
503
|
+
showValue?: boolean;
|
|
504
|
+
className?: string;
|
|
505
|
+
"aria-label"?: string;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
declare function ProgressBar({ value, label, labelPlacement, size, className, "aria-label": ariaLabel, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
509
|
+
declare function CircularProgress({ value, size, variant, label, showValue, className, "aria-label": ariaLabel, }: CircularProgressProps): react_jsx_runtime.JSX.Element;
|
|
510
|
+
|
|
511
|
+
type SliderLabelPlacement = "none" | "label" | "tooltip-above" | "tooltip-below";
|
|
512
|
+
interface RangeSliderProps {
|
|
513
|
+
/** Current value [lo, hi]. Omit for uncontrolled mode. */
|
|
514
|
+
value?: [number, number];
|
|
515
|
+
/** Initial value when uncontrolled. Defaults to [0, 50]. */
|
|
516
|
+
defaultValue?: [number, number];
|
|
517
|
+
/** Minimum bound. Default 0. */
|
|
518
|
+
min?: number;
|
|
519
|
+
/** Maximum bound. Default 100. */
|
|
520
|
+
max?: number;
|
|
521
|
+
/** Step size. Default 1. */
|
|
522
|
+
step?: number;
|
|
523
|
+
/** Fired when the value changes. */
|
|
524
|
+
onChange?: (value: [number, number]) => void;
|
|
525
|
+
/** Where to display the current value near each thumb. */
|
|
526
|
+
labelPlacement?: SliderLabelPlacement;
|
|
527
|
+
/** Custom label formatter. Defaults to `v => \`${v}%\``. */
|
|
528
|
+
formatLabel?: (value: number) => string;
|
|
529
|
+
className?: string;
|
|
530
|
+
"aria-label"?: string;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
declare function RangeSlider({ value: valueProp, defaultValue, min, max, step, onChange, labelPlacement, formatLabel, className, "aria-label": ariaLabel, }: RangeSliderProps): react_jsx_runtime.JSX.Element;
|
|
534
|
+
|
|
535
|
+
/** Which side of the trigger the tooltip appears on. */
|
|
536
|
+
type TooltipPlacement = "top" | "top-start" | "top-end" | "bottom" | "bottom-start" | "bottom-end" | "left" | "right";
|
|
537
|
+
type TooltipColor = "surface" | "inverse";
|
|
538
|
+
/** Props for the static Tooltip bubble. */
|
|
539
|
+
interface TooltipProps {
|
|
540
|
+
/** Headline / label text shown in the bubble. */
|
|
541
|
+
title: string;
|
|
542
|
+
/** Optional supporting body text below the title. */
|
|
543
|
+
description?: string;
|
|
544
|
+
/**
|
|
545
|
+
* Where the arrow caret appears, indicating which side faces the trigger.
|
|
546
|
+
* Omit (or pass undefined) to render without an arrow.
|
|
547
|
+
*/
|
|
548
|
+
placement?: TooltipPlacement;
|
|
549
|
+
/** "inverse" (default) uses inverse-surface bg + inverse-on-surface text; "surface" uses surface bg + on-surface text. */
|
|
550
|
+
color?: TooltipColor;
|
|
551
|
+
className?: string;
|
|
552
|
+
}
|
|
553
|
+
/** Props for the TooltipTrigger wrapper. */
|
|
554
|
+
interface TooltipTriggerProps {
|
|
555
|
+
/** The element that activates the tooltip on hover/focus. */
|
|
556
|
+
children: ReactNode;
|
|
557
|
+
/** Tooltip content and placement configuration. */
|
|
558
|
+
tooltip: TooltipProps;
|
|
559
|
+
/** Extra classes applied to the outer positioning wrapper. */
|
|
560
|
+
className?: string;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
declare function Tooltip({ title, description, placement, color, className, }: TooltipProps): react_jsx_runtime.JSX.Element;
|
|
564
|
+
declare function TooltipTrigger({ children, tooltip, className, }: TooltipTriggerProps): react_jsx_runtime.JSX.Element;
|
|
565
|
+
|
|
566
|
+
type FeatureIconColor = "primary" | "success" | "warning" | "error";
|
|
567
|
+
/** "default" — icon stacked above content. "horizontal" — icon beside content. */
|
|
568
|
+
type ModalLayout = "default" | "horizontal";
|
|
569
|
+
/** Text and icon alignment within the content area. */
|
|
570
|
+
type ModalAlign = "start" | "center";
|
|
571
|
+
/** "center" — dialog centered on screen. "bottom" — sheet anchored to bottom (mobile). */
|
|
572
|
+
type ModalPosition = "center" | "bottom";
|
|
573
|
+
/** sm = 384px · md = 480px · lg = 544px */
|
|
574
|
+
type ModalSize = "sm" | "md" | "lg";
|
|
575
|
+
/**
|
|
576
|
+
* "horizontal" — Cancel | Confirm side-by-side, both full-width.
|
|
577
|
+
* "vertical" — Confirm on top, Cancel below, both full-width.
|
|
578
|
+
* "horizontal-with-checkbox" — Checkbox left, [Cancel | Confirm] right (not full-width).
|
|
579
|
+
*/
|
|
580
|
+
type ModalActionsLayout = "horizontal" | "vertical" | "horizontal-with-checkbox";
|
|
581
|
+
interface ModalAction {
|
|
582
|
+
label: string;
|
|
583
|
+
onClick?: () => void;
|
|
584
|
+
isLoading?: boolean;
|
|
585
|
+
isDisabled?: boolean;
|
|
586
|
+
}
|
|
587
|
+
interface ModalCheckboxConfig {
|
|
588
|
+
label: string;
|
|
589
|
+
checked: boolean;
|
|
590
|
+
onChange: (checked: boolean) => void;
|
|
591
|
+
}
|
|
592
|
+
interface ModalAvatarGroupItem {
|
|
593
|
+
src: string;
|
|
594
|
+
alt?: string;
|
|
595
|
+
}
|
|
596
|
+
interface ModalUserAvatar {
|
|
597
|
+
src?: string;
|
|
598
|
+
name?: string;
|
|
599
|
+
subtitle?: string;
|
|
600
|
+
}
|
|
601
|
+
interface ModalProps {
|
|
602
|
+
isOpen: boolean;
|
|
603
|
+
onClose?: () => void;
|
|
604
|
+
/** 24×24 icon node rendered inside the colour-tinted feature badge. */
|
|
605
|
+
icon?: React$1.ReactNode;
|
|
606
|
+
iconColor?: FeatureIconColor;
|
|
607
|
+
/** Renders a full-width image at the top of the modal instead of the icon. */
|
|
608
|
+
image?: string;
|
|
609
|
+
imageAlt?: string;
|
|
610
|
+
/** Stacked avatar fan rendered instead of the icon (team invite variant). */
|
|
611
|
+
avatarGroup?: ModalAvatarGroupItem[];
|
|
612
|
+
/** A single user avatar row rendered below the description text. */
|
|
613
|
+
userAvatar?: ModalUserAvatar;
|
|
614
|
+
title?: string;
|
|
615
|
+
description?: React$1.ReactNode;
|
|
616
|
+
/**
|
|
617
|
+
* Arbitrary content rendered between the description and the actions row.
|
|
618
|
+
* Use for forms, checkboxes lists, OTP inputs, payment fields, etc.
|
|
619
|
+
*/
|
|
620
|
+
children?: React$1.ReactNode;
|
|
621
|
+
layout?: ModalLayout;
|
|
622
|
+
align?: ModalAlign;
|
|
623
|
+
position?: ModalPosition;
|
|
624
|
+
size?: ModalSize;
|
|
625
|
+
primaryAction?: ModalAction;
|
|
626
|
+
secondaryAction?: ModalAction;
|
|
627
|
+
/** Renders the primary action button in danger/error colour. */
|
|
628
|
+
isDestructive?: boolean;
|
|
629
|
+
actionsLayout?: ModalActionsLayout;
|
|
630
|
+
/**
|
|
631
|
+
* Checkbox rendered left of the actions (used with "horizontal-with-checkbox").
|
|
632
|
+
* Pass the controlled state from the parent.
|
|
633
|
+
*/
|
|
634
|
+
checkbox?: ModalCheckboxConfig;
|
|
635
|
+
className?: string;
|
|
636
|
+
/**
|
|
637
|
+
* When true, renders inline inside a `relative` container instead of using
|
|
638
|
+
* a portal attached to `document.body`. Use this in docs/preview contexts
|
|
639
|
+
* where the modal must be constrained to a parent element.
|
|
640
|
+
*/
|
|
641
|
+
disablePortal?: boolean;
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
declare function Modal({ isOpen, onClose, icon, iconColor, image, imageAlt, avatarGroup, userAvatar, title, description, children, layout, align, position, size, primaryAction, secondaryAction, isDestructive, actionsLayout, checkbox, className, disablePortal, }: ModalProps): react_jsx_runtime.JSX.Element | null;
|
|
645
|
+
|
|
646
|
+
type ChartSize = "xxs" | "xs" | "sm" | "md" | "lg";
|
|
647
|
+
type LegendPosition = "top" | "bottom" | "left" | "right";
|
|
648
|
+
/** A single data series definition */
|
|
649
|
+
interface ChartSeries {
|
|
650
|
+
/** Must match a key in ChartDataPoint */
|
|
651
|
+
key: string;
|
|
652
|
+
/** Human-readable label shown in legend and tooltip */
|
|
653
|
+
label: string;
|
|
654
|
+
/** Explicit color override; defaults to the --graphic-N token for that series index */
|
|
655
|
+
color?: string;
|
|
656
|
+
}
|
|
657
|
+
/** One data row. `label` is the X-axis tick. All other keys map to series values. */
|
|
658
|
+
interface ChartDataPoint {
|
|
659
|
+
label: string;
|
|
660
|
+
[key: string]: string | number;
|
|
661
|
+
}
|
|
662
|
+
interface BaseChartProps {
|
|
663
|
+
data: ChartDataPoint[];
|
|
664
|
+
series: ChartSeries[];
|
|
665
|
+
/** Chart canvas height: sm = 200 px, md = 280 px, lg = 360 px */
|
|
666
|
+
size?: ChartSize;
|
|
667
|
+
showLegend?: boolean;
|
|
668
|
+
legendPosition?: LegendPosition;
|
|
669
|
+
showXAxis?: boolean;
|
|
670
|
+
showYAxis?: boolean;
|
|
671
|
+
showGrid?: boolean;
|
|
672
|
+
/** Rotated label drawn along the Y-axis */
|
|
673
|
+
yAxisLabel?: string;
|
|
674
|
+
/** Label drawn below the X-axis */
|
|
675
|
+
xAxisLabel?: string;
|
|
676
|
+
className?: string;
|
|
677
|
+
}
|
|
678
|
+
interface LineChartProps extends BaseChartProps {
|
|
679
|
+
/** Render a gradient area fill beneath each series line */
|
|
680
|
+
showArea?: boolean;
|
|
681
|
+
/** Use monotone (smooth) curve; set false for linear straight segments */
|
|
682
|
+
curved?: boolean;
|
|
683
|
+
/** Stack all series on top of each other (stacked area chart) */
|
|
684
|
+
stacked?: boolean;
|
|
685
|
+
}
|
|
686
|
+
interface BarChartProps extends BaseChartProps {
|
|
687
|
+
/** Stack bars on top of each other instead of grouping side by side */
|
|
688
|
+
stacked?: boolean;
|
|
689
|
+
/** Render horizontal bars (categories on Y-axis, values on X-axis) */
|
|
690
|
+
orientation?: "horizontal" | "vertical";
|
|
691
|
+
}
|
|
692
|
+
interface DonutChartProps {
|
|
693
|
+
data: Array<{
|
|
694
|
+
label: string;
|
|
695
|
+
value: number;
|
|
696
|
+
color?: string;
|
|
697
|
+
}>;
|
|
698
|
+
size?: ChartSize;
|
|
699
|
+
showLegend?: boolean;
|
|
700
|
+
legendPosition?: LegendPosition;
|
|
701
|
+
/** Text label in the donut hole, e.g. "Active users" */
|
|
702
|
+
centerLabel?: string;
|
|
703
|
+
/** Numeric or string value in the donut hole */
|
|
704
|
+
centerValue?: string | number;
|
|
705
|
+
/** Inner radius as % of the outer radius. 0 = solid pie, default 60 = donut */
|
|
706
|
+
innerRadiusPct?: number;
|
|
707
|
+
className?: string;
|
|
708
|
+
}
|
|
709
|
+
interface RadarChartProps extends BaseChartProps {
|
|
710
|
+
/** Fill the radar polygon with a semi-transparent color */
|
|
711
|
+
filled?: boolean;
|
|
712
|
+
}
|
|
713
|
+
interface ScatterDataPoint {
|
|
714
|
+
x: number;
|
|
715
|
+
y: number;
|
|
716
|
+
/** Optional bubble size for bubble charts */
|
|
717
|
+
z?: number;
|
|
718
|
+
}
|
|
719
|
+
interface ScatterSeries {
|
|
720
|
+
key: string;
|
|
721
|
+
label: string;
|
|
722
|
+
color?: string;
|
|
723
|
+
data: ScatterDataPoint[];
|
|
724
|
+
}
|
|
725
|
+
interface ScatterChartProps {
|
|
726
|
+
series: ScatterSeries[];
|
|
727
|
+
size?: ChartSize;
|
|
728
|
+
showLegend?: boolean;
|
|
729
|
+
legendPosition?: LegendPosition;
|
|
730
|
+
showXAxis?: boolean;
|
|
731
|
+
showYAxis?: boolean;
|
|
732
|
+
showGrid?: boolean;
|
|
733
|
+
xAxisLabel?: string;
|
|
734
|
+
yAxisLabel?: string;
|
|
735
|
+
className?: string;
|
|
736
|
+
}
|
|
737
|
+
interface RadialChartProps {
|
|
738
|
+
data: Array<{
|
|
739
|
+
label: string;
|
|
740
|
+
/** Current value */
|
|
741
|
+
value: number;
|
|
742
|
+
/** Maximum value; defaults to 100 (value treated as %) */
|
|
743
|
+
max?: number;
|
|
744
|
+
color?: string;
|
|
745
|
+
}>;
|
|
746
|
+
size?: ChartSize;
|
|
747
|
+
showLegend?: boolean;
|
|
748
|
+
legendPosition?: LegendPosition;
|
|
749
|
+
centerLabel?: string;
|
|
750
|
+
centerValue?: string | number;
|
|
751
|
+
className?: string;
|
|
752
|
+
}
|
|
753
|
+
interface SparklineChartProps {
|
|
754
|
+
/** Array of data objects; each must include the key specified by `dataKey`. */
|
|
755
|
+
data: Array<Record<string, string | number>>;
|
|
756
|
+
/** Key in each data object to use as the plotted value */
|
|
757
|
+
dataKey: string;
|
|
758
|
+
/** Line and area fill color; defaults to var(--status-positive) */
|
|
759
|
+
color?: string;
|
|
760
|
+
/** Chart height in pixels; defaults to 56 */
|
|
761
|
+
height?: number;
|
|
762
|
+
className?: string;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
declare function LineChart({ data, series, size, showLegend, legendPosition, showXAxis, showYAxis, showGrid, showArea, curved, stacked, yAxisLabel, xAxisLabel, className, }: LineChartProps): react_jsx_runtime.JSX.Element;
|
|
766
|
+
|
|
767
|
+
declare function BarChart({ data, series, size, showLegend, legendPosition, showXAxis, showYAxis, showGrid, stacked, orientation, yAxisLabel, xAxisLabel, className, }: BarChartProps): react_jsx_runtime.JSX.Element;
|
|
768
|
+
|
|
769
|
+
declare function DonutChart({ data, size, showLegend, legendPosition, centerLabel, centerValue, innerRadiusPct, className, }: DonutChartProps): react_jsx_runtime.JSX.Element;
|
|
770
|
+
|
|
771
|
+
declare function RadialChart({ data, size, showLegend, legendPosition, centerLabel, centerValue, className, }: RadialChartProps): react_jsx_runtime.JSX.Element;
|
|
772
|
+
|
|
773
|
+
declare function RadarChart({ data, series, size, showLegend, legendPosition, showGrid, filled, className, }: RadarChartProps): react_jsx_runtime.JSX.Element;
|
|
774
|
+
|
|
775
|
+
declare function ScatterChart({ series, size, showLegend, legendPosition, showXAxis, showYAxis, showGrid, xAxisLabel, yAxisLabel, className, }: ScatterChartProps): react_jsx_runtime.JSX.Element;
|
|
776
|
+
|
|
777
|
+
declare function SparklineChart({ data, dataKey, color, height, className, }: SparklineChartProps): react_jsx_runtime.JSX.Element;
|
|
778
|
+
|
|
779
|
+
/** `link` — ghost text prev/next | `button` — outlined prev/next | `minimal` — prev/next + label only | `base` — inline connected button-group */
|
|
780
|
+
type PaginationVariant = "link" | "button" | "minimal" | "base";
|
|
781
|
+
/** Shape applied to individual numbered page buttons */
|
|
782
|
+
type PaginationPageShape = "square" | "circle";
|
|
783
|
+
interface PaginationProps {
|
|
784
|
+
/** Current active page (1-indexed) */
|
|
785
|
+
currentPage: number;
|
|
786
|
+
/** Total number of pages */
|
|
787
|
+
totalPages: number;
|
|
788
|
+
/** Fires when the user selects a different page */
|
|
789
|
+
onPageChange: (page: number) => void;
|
|
790
|
+
/**
|
|
791
|
+
* Visual style for the prev/next controls and page-number container:
|
|
792
|
+
* - `link` — ghost text buttons, no border/shadow
|
|
793
|
+
* - `button` — outlined shadow buttons (default)
|
|
794
|
+
* - `minimal` — prev/next only + "Page X of Y" label, no numbered pages
|
|
795
|
+
* - `base` — inline joined button-group with page numbers
|
|
796
|
+
*/
|
|
797
|
+
variant?: PaginationVariant;
|
|
798
|
+
/** Shape of numbered page items — `square` (rounded-lg) or `circle` (rounded-full) */
|
|
799
|
+
pageShape?: PaginationPageShape;
|
|
800
|
+
/**
|
|
801
|
+
* Show a "Page X of Y" label alongside the navigation.
|
|
802
|
+
* Automatically shown for `minimal` variant.
|
|
803
|
+
*/
|
|
804
|
+
showPageLabel?: boolean;
|
|
805
|
+
/**
|
|
806
|
+
* For `minimal` variant: placement of the page label relative to the buttons.
|
|
807
|
+
* - `"center"` (default) — [Prev] label [Next]
|
|
808
|
+
* - `"start"` — label [Prev] [Next]
|
|
809
|
+
* - `"end"` — [Prev] [Next] label
|
|
810
|
+
*/
|
|
811
|
+
pageLabelPlacement?: "start" | "center" | "end";
|
|
812
|
+
/** Horizontal alignment of the whole control */
|
|
813
|
+
alignment?: "start" | "center" | "end";
|
|
814
|
+
className?: string;
|
|
815
|
+
}
|
|
816
|
+
type CarouselArrowColor = "primary" | "primary-light" | "dark" | "light";
|
|
817
|
+
type CarouselArrowSize = "sm" | "md";
|
|
818
|
+
interface CarouselArrowProps {
|
|
819
|
+
direction: "prev" | "next";
|
|
820
|
+
color?: CarouselArrowColor;
|
|
821
|
+
size?: CarouselArrowSize;
|
|
822
|
+
onClick?: () => void;
|
|
823
|
+
isDisabled?: boolean;
|
|
824
|
+
className?: string;
|
|
825
|
+
"aria-label"?: string;
|
|
826
|
+
}
|
|
827
|
+
type IndicatorShape = "dot" | "pill";
|
|
828
|
+
type IndicatorSize = "sm" | "md";
|
|
829
|
+
type IndicatorColor = "primary" | "neutral" | "inverse";
|
|
830
|
+
interface PaginationIndicatorProps {
|
|
831
|
+
/** Total number of indicators */
|
|
832
|
+
count: number;
|
|
833
|
+
/** Zero-based index of the active indicator */
|
|
834
|
+
activeIndex: number;
|
|
835
|
+
shape?: IndicatorShape;
|
|
836
|
+
size?: IndicatorSize;
|
|
837
|
+
color?: IndicatorColor;
|
|
838
|
+
className?: string;
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
declare function Pagination({ currentPage, totalPages, onPageChange, variant, pageShape, showPageLabel, pageLabelPlacement, alignment, className, }: PaginationProps): react_jsx_runtime.JSX.Element;
|
|
842
|
+
|
|
843
|
+
declare function CarouselArrow({ direction, color, size, onClick, isDisabled, className, "aria-label": ariaLabel, }: CarouselArrowProps): react_jsx_runtime.JSX.Element;
|
|
844
|
+
|
|
845
|
+
declare function PaginationIndicator({ count, activeIndex, shape, size, color, className, }: PaginationIndicatorProps): react_jsx_runtime.JSX.Element;
|
|
846
|
+
|
|
847
|
+
interface MessageReactionProps {
|
|
848
|
+
/** Emoji character or short code string to display */
|
|
849
|
+
emoji: string;
|
|
850
|
+
/** When provided shows count badge next to the emoji */
|
|
851
|
+
count?: number;
|
|
852
|
+
/** Called when the reaction pill is clicked */
|
|
853
|
+
onClick?: () => void;
|
|
854
|
+
className?: string;
|
|
855
|
+
}
|
|
856
|
+
type AttachmentFileType = "image" | "document";
|
|
857
|
+
interface MessageAttachment {
|
|
858
|
+
name: string;
|
|
859
|
+
size: string;
|
|
860
|
+
fileType?: AttachmentFileType;
|
|
861
|
+
}
|
|
862
|
+
/** Which side of the conversation this message belongs to */
|
|
863
|
+
type MessageSide = "incoming" | "outgoing";
|
|
864
|
+
/** Content type of the message bubble */
|
|
865
|
+
type MessageType = "text" | "file" | "typing";
|
|
866
|
+
interface ChatMessageProps {
|
|
867
|
+
/** Left (incoming) or right (outgoing) alignment */
|
|
868
|
+
side: MessageSide;
|
|
869
|
+
/** Display name shown above the bubble */
|
|
870
|
+
senderName: string;
|
|
871
|
+
/** Timestamp string shown next to the sender name */
|
|
872
|
+
timestamp?: string;
|
|
873
|
+
/** Content type — text, file attachment, or typing indicator */
|
|
874
|
+
type?: MessageType;
|
|
875
|
+
/** Message text (for `type="text"`) */
|
|
876
|
+
text?: string;
|
|
877
|
+
/** File attachment metadata (for `type="file"`) */
|
|
878
|
+
attachment?: MessageAttachment;
|
|
879
|
+
/** Emoji reactions shown below the bubble */
|
|
880
|
+
reactions?: MessageReactionProps[];
|
|
881
|
+
/** Avatar image URL (incoming side only) */
|
|
882
|
+
avatarSrc?: string;
|
|
883
|
+
/** Avatar initials fallback (incoming side only) */
|
|
884
|
+
avatarInitials?: string;
|
|
885
|
+
/** Show the online status dot on the avatar */
|
|
886
|
+
isOnline?: boolean;
|
|
887
|
+
className?: string;
|
|
888
|
+
}
|
|
889
|
+
|
|
890
|
+
declare function ChatMessage({ side, senderName, timestamp, type, text, attachment, reactions, avatarSrc, avatarInitials, isOnline, className, }: ChatMessageProps): react_jsx_runtime.JSX.Element;
|
|
891
|
+
|
|
892
|
+
declare function MessageReaction({ emoji, count, onClick, className, }: MessageReactionProps): react_jsx_runtime.JSX.Element;
|
|
893
|
+
|
|
894
|
+
/** Single column definition for DataTable */
|
|
895
|
+
interface DataTableColumn<T = Record<string, unknown>> {
|
|
896
|
+
key: string;
|
|
897
|
+
/** Column header text */
|
|
898
|
+
header: string;
|
|
899
|
+
/** Show sort arrow icon in header */
|
|
900
|
+
sortable?: boolean;
|
|
901
|
+
/** Show help/info icon in header */
|
|
902
|
+
helpIcon?: boolean;
|
|
903
|
+
/** Fixed column width (e.g. "160px", "auto") */
|
|
904
|
+
width?: string;
|
|
905
|
+
/** Render cell content for a given row */
|
|
906
|
+
cell: (row: T, rowIndex: number) => ReactNode;
|
|
907
|
+
}
|
|
908
|
+
interface DataTableProps<T = Record<string, unknown>> {
|
|
909
|
+
columns: DataTableColumn<T>[];
|
|
910
|
+
rows: T[];
|
|
911
|
+
/** Alternate row background colours (first row is tinted) */
|
|
912
|
+
striped?: boolean;
|
|
913
|
+
/** Enable row-level checkbox selection */
|
|
914
|
+
selectable?: boolean;
|
|
915
|
+
/** Controlled set of selected row indices */
|
|
916
|
+
selectedKeys?: Set<number>;
|
|
917
|
+
/** Called when the internal/controlled selection changes */
|
|
918
|
+
onSelectionChange?: (keys: Set<number>) => void;
|
|
919
|
+
/** Card header title */
|
|
920
|
+
title?: string;
|
|
921
|
+
/** Card header description below the title */
|
|
922
|
+
description?: string;
|
|
923
|
+
/** Badge shown next to the title */
|
|
924
|
+
badge?: ReactNode;
|
|
925
|
+
/** Right-side action slot in the card header */
|
|
926
|
+
headerActions?: ReactNode;
|
|
927
|
+
/** Footer slot — typically Pagination */
|
|
928
|
+
footer?: ReactNode;
|
|
929
|
+
className?: string;
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
declare function DataTable<T = Record<string, unknown>>({ columns, rows, striped, selectable, selectedKeys: controlledSelected, onSelectionChange, title, description, badge, headerActions, footer, className, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
|
|
933
|
+
|
|
934
|
+
interface TextCellProps {
|
|
935
|
+
text: string;
|
|
936
|
+
subtitle?: string;
|
|
937
|
+
/** Extra classes for the primary text span */
|
|
938
|
+
textClassName?: string;
|
|
939
|
+
/** Allow the primary text to wrap (default: false — text stays on one line) */
|
|
940
|
+
wrap?: boolean;
|
|
941
|
+
/** Truncate overflowing text with ellipsis */
|
|
942
|
+
truncate?: boolean;
|
|
943
|
+
}
|
|
944
|
+
declare function TextCell({ text, subtitle, textClassName, wrap, truncate, }: TextCellProps): react_jsx_runtime.JSX.Element;
|
|
945
|
+
interface AvatarCellProps {
|
|
946
|
+
src?: string;
|
|
947
|
+
name: string;
|
|
948
|
+
subtitle?: string;
|
|
949
|
+
initials?: string;
|
|
950
|
+
size?: "sm" | "md";
|
|
951
|
+
}
|
|
952
|
+
declare function AvatarCell({ src, name, subtitle, initials, size, }: AvatarCellProps): react_jsx_runtime.JSX.Element;
|
|
953
|
+
interface BadgeCellProps {
|
|
954
|
+
label: string;
|
|
955
|
+
color?: BadgeColor;
|
|
956
|
+
dot?: boolean;
|
|
957
|
+
}
|
|
958
|
+
declare function BadgeCell({ label, color, dot, }: BadgeCellProps): react_jsx_runtime.JSX.Element;
|
|
959
|
+
interface BadgeItem {
|
|
960
|
+
label: string;
|
|
961
|
+
color?: BadgeColor;
|
|
962
|
+
}
|
|
963
|
+
declare function BadgesCell({ badges }: {
|
|
964
|
+
badges: BadgeItem[];
|
|
965
|
+
}): react_jsx_runtime.JSX.Element;
|
|
966
|
+
interface AvatarGroupItem {
|
|
967
|
+
src?: string;
|
|
968
|
+
name?: string;
|
|
969
|
+
initials?: string;
|
|
970
|
+
/** Explicit colour variant — auto-cycles graphic tokens when omitted */
|
|
971
|
+
color?: AvatarColor;
|
|
972
|
+
}
|
|
973
|
+
interface AvatarGroupCellProps {
|
|
974
|
+
avatars: AvatarGroupItem[];
|
|
975
|
+
/** Max visible avatars before "+N" overflow (default 5) */
|
|
976
|
+
maxVisible?: number;
|
|
977
|
+
}
|
|
978
|
+
declare function AvatarGroupCell({ avatars, maxVisible, }: AvatarGroupCellProps): react_jsx_runtime.JSX.Element;
|
|
979
|
+
declare function ProgressCell({ value }: {
|
|
980
|
+
value: number;
|
|
981
|
+
}): react_jsx_runtime.JSX.Element;
|
|
982
|
+
type FileType = "pdf" | "doc" | "docx" | "jpg" | "jpeg" | "png" | "mp4" | "fig" | "framer" | string;
|
|
983
|
+
interface FileTypeCellProps {
|
|
984
|
+
filename: string;
|
|
985
|
+
size?: string;
|
|
986
|
+
type: FileType;
|
|
987
|
+
}
|
|
988
|
+
declare function FileTypeCell({ filename, size, type }: FileTypeCellProps): react_jsx_runtime.JSX.Element;
|
|
989
|
+
interface ActionIconsCellProps {
|
|
990
|
+
onDelete?: () => void;
|
|
991
|
+
onEdit?: () => void;
|
|
992
|
+
}
|
|
993
|
+
declare function ActionIconsCell({ onDelete, onEdit }: ActionIconsCellProps): react_jsx_runtime.JSX.Element;
|
|
994
|
+
interface ActionDropdownCellProps {
|
|
995
|
+
onClick?: () => void;
|
|
996
|
+
}
|
|
997
|
+
declare function ActionDropdownCell({ onClick }: ActionDropdownCellProps): react_jsx_runtime.JSX.Element;
|
|
998
|
+
interface TextAction {
|
|
999
|
+
label: string;
|
|
1000
|
+
onClick?: () => void;
|
|
1001
|
+
/** Use primary colour for this action */
|
|
1002
|
+
isPrimary?: boolean;
|
|
1003
|
+
}
|
|
1004
|
+
declare function TextActionCell({ actions }: {
|
|
1005
|
+
actions: TextAction[];
|
|
1006
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1007
|
+
|
|
1008
|
+
interface TabItem {
|
|
1009
|
+
/** Unique key for this tab */
|
|
1010
|
+
key: string;
|
|
1011
|
+
/** Tab label text */
|
|
1012
|
+
label: React.ReactNode;
|
|
1013
|
+
/** Optional badge count shown inside the tab */
|
|
1014
|
+
badge?: string | number;
|
|
1015
|
+
}
|
|
1016
|
+
interface TabsProps {
|
|
1017
|
+
/** Tab items to render */
|
|
1018
|
+
items: TabItem[];
|
|
1019
|
+
/** Controlled active key */
|
|
1020
|
+
activeKey?: string;
|
|
1021
|
+
/** Uncontrolled default active key (defaults to first item) */
|
|
1022
|
+
defaultActiveKey?: string;
|
|
1023
|
+
/** Called when the active tab changes */
|
|
1024
|
+
onChange?: (key: string) => void;
|
|
1025
|
+
/**
|
|
1026
|
+
* Visual style variant:
|
|
1027
|
+
* - `pill` — brand-tinted pill on selected item
|
|
1028
|
+
* - `pill-neutral` — neutral-tinted pill on selected item
|
|
1029
|
+
* - `segment` — segmented control with inset container
|
|
1030
|
+
* - `underline` — bottom (or left in vertical) border indicator
|
|
1031
|
+
*/
|
|
1032
|
+
variant?: "pill" | "pill-neutral" | "segment" | "underline";
|
|
1033
|
+
/** Layout orientation */
|
|
1034
|
+
orientation?: "horizontal" | "vertical";
|
|
1035
|
+
className?: string;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
declare function Tabs({ items, activeKey: controlledKey, defaultActiveKey, onChange, variant, orientation, className, }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
1039
|
+
|
|
1040
|
+
interface AccountDropdownItem {
|
|
1041
|
+
key: string;
|
|
1042
|
+
label: string;
|
|
1043
|
+
email?: string;
|
|
1044
|
+
avatarSrc?: string;
|
|
1045
|
+
isSelected?: boolean;
|
|
1046
|
+
}
|
|
1047
|
+
interface BreadcrumbItemData {
|
|
1048
|
+
/** Unique key (defaults to index) */
|
|
1049
|
+
key?: string;
|
|
1050
|
+
/** Label text or node — ignored when isHome is true */
|
|
1051
|
+
label?: React.ReactNode;
|
|
1052
|
+
/** Navigable href. If omitted and not current, renders as a non-link span */
|
|
1053
|
+
href?: string;
|
|
1054
|
+
/** Render a home icon instead of label text */
|
|
1055
|
+
isHome?: boolean;
|
|
1056
|
+
/** Render an ellipsis ("...") collapse item */
|
|
1057
|
+
isEllipsis?: boolean;
|
|
1058
|
+
/** Mark as the current / active page — auto-applied to the last item */
|
|
1059
|
+
isCurrent?: boolean;
|
|
1060
|
+
/** Image URL — renders this item as an account-style avatar + label button */
|
|
1061
|
+
avatarSrc?: string;
|
|
1062
|
+
/** Display name shown next to the avatar */
|
|
1063
|
+
avatarLabel?: string;
|
|
1064
|
+
/** Avatar shape — "square" for logos/brands, "circle" for people */
|
|
1065
|
+
avatarShape?: "square" | "circle";
|
|
1066
|
+
/** Renders the item as a dropdown account-switcher trigger */
|
|
1067
|
+
isDropdown?: boolean;
|
|
1068
|
+
/** Accounts shown in the dropdown popover (requires isDropdown) */
|
|
1069
|
+
dropdownItems?: AccountDropdownItem[];
|
|
1070
|
+
}
|
|
1071
|
+
interface BreadcrumbProps {
|
|
1072
|
+
/** Ordered list of breadcrumb items */
|
|
1073
|
+
items: BreadcrumbItemData[];
|
|
1074
|
+
/**
|
|
1075
|
+
* Separator glyph between items.
|
|
1076
|
+
* - `chevron` — right-pointing chevron `›`
|
|
1077
|
+
* - `slash` — diagonal slash `/`
|
|
1078
|
+
*/
|
|
1079
|
+
separator?: "chevron" | "slash";
|
|
1080
|
+
/**
|
|
1081
|
+
* Visual style variant:
|
|
1082
|
+
* - `default` — clean inline, no container chrome
|
|
1083
|
+
* - `bordered` — full-width row with top/bottom border rules
|
|
1084
|
+
* - `ghost` — rounded hover-background pill on each item
|
|
1085
|
+
*/
|
|
1086
|
+
variant?: "default" | "bordered" | "ghost";
|
|
1087
|
+
/** Extra className applied to the outer `<nav>` */
|
|
1088
|
+
className?: string;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
declare function Breadcrumb({ items, separator, variant, className, }: BreadcrumbProps): react_jsx_runtime.JSX.Element;
|
|
1092
|
+
|
|
1093
|
+
type AlertColor = "default" | "info" | "error" | "warning" | "success";
|
|
1094
|
+
type AlertIconStyle = "box" | "ring";
|
|
1095
|
+
type AlertLayout = "card" | "banner";
|
|
1096
|
+
interface AlertProps {
|
|
1097
|
+
/**
|
|
1098
|
+
* Semantic color / intent of the alert.
|
|
1099
|
+
* - `default` uses neutral/surface tones
|
|
1100
|
+
* - `info`, `error`, `warning`, `success` use feedback tokens
|
|
1101
|
+
*/
|
|
1102
|
+
color?: AlertColor;
|
|
1103
|
+
/**
|
|
1104
|
+
* Icon presentation style.
|
|
1105
|
+
* - `box` — icon lives inside a rounded square container with shadow
|
|
1106
|
+
* - `ring` — icon sits alone with two radiating ring pseudo-elements
|
|
1107
|
+
*/
|
|
1108
|
+
iconStyle?: AlertIconStyle;
|
|
1109
|
+
/**
|
|
1110
|
+
* Layout mode.
|
|
1111
|
+
* - `card` — inline rounded card, typical for in-page alerts
|
|
1112
|
+
* - `banner` — full-width bar with dismiss button; wrap in a fixed container if needed
|
|
1113
|
+
*/
|
|
1114
|
+
layout?: AlertLayout;
|
|
1115
|
+
/** Bold headline text */
|
|
1116
|
+
title: string;
|
|
1117
|
+
/** Supporting body text (can be a ReactNode to embed links) */
|
|
1118
|
+
description?: React.ReactNode;
|
|
1119
|
+
/** Custom icon node — defaults to a contextual SVG per color */
|
|
1120
|
+
icon?: React.ReactNode;
|
|
1121
|
+
/** Action buttons rendered in the trailing slot */
|
|
1122
|
+
actions?: React.ReactNode;
|
|
1123
|
+
/** Called when the dismiss/close button is clicked (shows the X button) */
|
|
1124
|
+
onDismiss?: () => void;
|
|
1125
|
+
className?: string;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
declare function Alert({ color, iconStyle, layout, title, description, icon, actions, onDismiss, className, }: AlertProps): react_jsx_runtime.JSX.Element;
|
|
1129
|
+
|
|
1130
|
+
type ToastColor = "default" | "info" | "error" | "warning" | "success";
|
|
1131
|
+
interface ToastItem {
|
|
1132
|
+
id: string;
|
|
1133
|
+
color?: ToastColor;
|
|
1134
|
+
title: string;
|
|
1135
|
+
description?: React$1.ReactNode;
|
|
1136
|
+
icon?: React$1.ReactNode;
|
|
1137
|
+
actions?: React$1.ReactNode;
|
|
1138
|
+
/**
|
|
1139
|
+
* Auto-dismiss delay in ms.
|
|
1140
|
+
* Set to `0` to keep the toast visible until manually dismissed.
|
|
1141
|
+
* @default 5000
|
|
1142
|
+
*/
|
|
1143
|
+
duration?: number;
|
|
1144
|
+
}
|
|
1145
|
+
interface ToastContextValue {
|
|
1146
|
+
addToast: (toast: Omit<ToastItem, "id">) => string;
|
|
1147
|
+
removeToast: (id: string) => void;
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
declare function useToast(): ToastContextValue;
|
|
1151
|
+
declare function ToastProvider({ children }: {
|
|
1152
|
+
children: React$1.ReactNode;
|
|
1153
|
+
}): react_jsx_runtime.JSX.Element;
|
|
1154
|
+
|
|
1155
|
+
type DatePickerValue = Date | null;
|
|
1156
|
+
interface DateRange {
|
|
1157
|
+
start: Date | null;
|
|
1158
|
+
end: Date | null;
|
|
1159
|
+
}
|
|
1160
|
+
interface DatePickerProps {
|
|
1161
|
+
value?: DatePickerValue;
|
|
1162
|
+
defaultValue?: DatePickerValue;
|
|
1163
|
+
onChange?: (date: DatePickerValue) => void;
|
|
1164
|
+
/** Display the calendar inline without a trigger button */
|
|
1165
|
+
inline?: boolean;
|
|
1166
|
+
placeholder?: string;
|
|
1167
|
+
isDisabled?: boolean;
|
|
1168
|
+
className?: string;
|
|
1169
|
+
}
|
|
1170
|
+
interface DateTimePickerProps {
|
|
1171
|
+
value?: Date | null;
|
|
1172
|
+
defaultValue?: Date | null;
|
|
1173
|
+
onChange?: (date: Date | null) => void;
|
|
1174
|
+
inline?: boolean;
|
|
1175
|
+
placeholder?: string;
|
|
1176
|
+
isDisabled?: boolean;
|
|
1177
|
+
/**
|
|
1178
|
+
* Custom time slot labels, e.g. ["9:00 AM", "9:30 AM", …].
|
|
1179
|
+
* Defaults to 30-min slots from 9:00 AM to 8:30 PM.
|
|
1180
|
+
*/
|
|
1181
|
+
timeSlots?: string[];
|
|
1182
|
+
className?: string;
|
|
1183
|
+
}
|
|
1184
|
+
interface DateRangePickerProps {
|
|
1185
|
+
value?: DateRange;
|
|
1186
|
+
defaultValue?: DateRange;
|
|
1187
|
+
onChange?: (range: DateRange) => void;
|
|
1188
|
+
inline?: boolean;
|
|
1189
|
+
isDisabled?: boolean;
|
|
1190
|
+
className?: string;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
declare function DatePicker({ value, defaultValue, onChange, inline, placeholder, isDisabled, className, }: DatePickerProps): react_jsx_runtime.JSX.Element;
|
|
1194
|
+
declare function DateTimePicker({ value, defaultValue, onChange, inline, placeholder, isDisabled, timeSlots, className, }: DateTimePickerProps): react_jsx_runtime.JSX.Element;
|
|
1195
|
+
declare function DateRangePicker({ value, defaultValue, onChange, inline, isDisabled, className, }: DateRangePickerProps): react_jsx_runtime.JSX.Element;
|
|
1196
|
+
|
|
1197
|
+
type CalendarView = "month" | "week" | "day";
|
|
1198
|
+
type EventColor = "neutral" | "blue" | "green" | "purple" | "orange" | "pink" | "red" | "yellow";
|
|
1199
|
+
interface CalendarEventGuest {
|
|
1200
|
+
name: string;
|
|
1201
|
+
avatarUrl?: string;
|
|
1202
|
+
initials?: string;
|
|
1203
|
+
}
|
|
1204
|
+
interface CalendarEvent {
|
|
1205
|
+
id: string;
|
|
1206
|
+
title: string;
|
|
1207
|
+
date: Date;
|
|
1208
|
+
/** Start time as "HH:MM" (24h) */
|
|
1209
|
+
startTime: string;
|
|
1210
|
+
/** End time as "HH:MM" (24h) */
|
|
1211
|
+
endTime?: string;
|
|
1212
|
+
color?: EventColor;
|
|
1213
|
+
description?: string;
|
|
1214
|
+
reminder?: string;
|
|
1215
|
+
guests?: CalendarEventGuest[];
|
|
1216
|
+
guestsYes?: number;
|
|
1217
|
+
guestsAwaiting?: number;
|
|
1218
|
+
}
|
|
1219
|
+
interface CalendarProps {
|
|
1220
|
+
/** Initial view to display */
|
|
1221
|
+
defaultView?: CalendarView;
|
|
1222
|
+
/** Controlled view */
|
|
1223
|
+
view?: CalendarView;
|
|
1224
|
+
/** Fired when the user switches view */
|
|
1225
|
+
onViewChange?: (view: CalendarView) => void;
|
|
1226
|
+
/** Initial date to focus (defaults to today) */
|
|
1227
|
+
defaultDate?: Date;
|
|
1228
|
+
/** Controlled focused date */
|
|
1229
|
+
date?: Date;
|
|
1230
|
+
/** Fired when the user navigates to a different period */
|
|
1231
|
+
onDateChange?: (date: Date) => void;
|
|
1232
|
+
/** Events to render on the calendar */
|
|
1233
|
+
events?: CalendarEvent[];
|
|
1234
|
+
/** Called when the user clicks "Add event" on a day cell */
|
|
1235
|
+
onAddEvent?: (date: Date) => void;
|
|
1236
|
+
/** Called when the user clicks an event chip */
|
|
1237
|
+
onEventClick?: (event: CalendarEvent) => void;
|
|
1238
|
+
className?: string;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
declare function Calendar({ defaultView, view: controlledView, onViewChange, defaultDate, date: controlledDate, onDateChange, events, onAddEvent, onEventClick, className, }: CalendarProps): react_jsx_runtime.JSX.Element;
|
|
1242
|
+
|
|
1243
|
+
declare function getFileExtColor(name: string): string;
|
|
1244
|
+
declare function getFileExtLabel(name: string): string;
|
|
1245
|
+
interface FileTypeIconProps {
|
|
1246
|
+
/**
|
|
1247
|
+
* File name including extension (e.g. `"report.pdf"`).
|
|
1248
|
+
* Used to derive the badge color and extension label.
|
|
1249
|
+
*/
|
|
1250
|
+
name: string;
|
|
1251
|
+
/**
|
|
1252
|
+
* Visual style:
|
|
1253
|
+
* - `"outline"` (default) — page outline with a colored extension badge
|
|
1254
|
+
* - `"filled"` — fully colored page with a folded corner
|
|
1255
|
+
*/
|
|
1256
|
+
variant?: "outline" | "filled";
|
|
1257
|
+
}
|
|
1258
|
+
declare function FileTypeIcon({ name, variant }: FileTypeIconProps): react_jsx_runtime.JSX.Element;
|
|
1259
|
+
|
|
1260
|
+
type FileUploadStatus = "uploading" | "complete" | "error";
|
|
1261
|
+
type FileUploadVariant = "default" | "compact";
|
|
1262
|
+
interface UploadFile {
|
|
1263
|
+
/** Unique identifier for this file entry */
|
|
1264
|
+
id: string;
|
|
1265
|
+
/** Display name */
|
|
1266
|
+
name: string;
|
|
1267
|
+
/** Formatted size string, e.g. "720 KB" */
|
|
1268
|
+
size: string;
|
|
1269
|
+
/** Upload progress 0–100 */
|
|
1270
|
+
progress?: number;
|
|
1271
|
+
/** Current upload state */
|
|
1272
|
+
status: FileUploadStatus;
|
|
1273
|
+
}
|
|
1274
|
+
interface FileUploadProps {
|
|
1275
|
+
/** Visual layout — `default` shows a progress bar below filename; `compact` uses a background fill */
|
|
1276
|
+
variant?: FileUploadVariant;
|
|
1277
|
+
/** Currently tracked files */
|
|
1278
|
+
files?: UploadFile[];
|
|
1279
|
+
/** Called when user picks/drops new files */
|
|
1280
|
+
onFilesAdded?: (files: File[]) => void;
|
|
1281
|
+
/** Called when user clicks the delete button on a file row */
|
|
1282
|
+
onFileRemove?: (id: string) => void;
|
|
1283
|
+
/** Called when user clicks "Try again" on a failed file */
|
|
1284
|
+
onRetry?: (id: string) => void;
|
|
1285
|
+
/** Accepted MIME types / extensions, forwarded to <input accept> */
|
|
1286
|
+
accept?: string;
|
|
1287
|
+
/** Allow multiple files */
|
|
1288
|
+
multiple?: boolean;
|
|
1289
|
+
/** Hint text shown beneath the upload icon (e.g. file type constraints) */
|
|
1290
|
+
hint?: string;
|
|
1291
|
+
/** Disable the dropzone and all interactions */
|
|
1292
|
+
isDisabled?: boolean;
|
|
1293
|
+
className?: string;
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
declare function FileUpload({ files, onFilesAdded, onFileRemove, onRetry, accept, multiple, variant, hint, isDisabled, className, }: FileUploadProps): react_jsx_runtime.JSX.Element;
|
|
1297
|
+
|
|
1298
|
+
/** ISO 3166-1 alpha-2 country code, e.g. "US", "GB", "DE" */
|
|
1299
|
+
type CountryCode = string;
|
|
1300
|
+
type CountryFlagSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
1301
|
+
type CountryFlagShape = "rectangular" | "rounded" | "circular";
|
|
1302
|
+
interface CountryFlagProps {
|
|
1303
|
+
/** ISO 3166-1 alpha-2 country code (e.g. "US", "GB", "DE") */
|
|
1304
|
+
code: CountryCode;
|
|
1305
|
+
/** Flag size. xs 16px · sm 20px · md 24px · lg 32px · xl 48px */
|
|
1306
|
+
size?: CountryFlagSize;
|
|
1307
|
+
/** Shape variant: rectangular (3:2), rounded rectangle, or circular */
|
|
1308
|
+
shape?: CountryFlagShape;
|
|
1309
|
+
/** Additional class name on the outer wrapper */
|
|
1310
|
+
className?: string;
|
|
1311
|
+
}
|
|
1312
|
+
|
|
1313
|
+
declare function CountryFlag({ code, size, shape, className, }: CountryFlagProps): react_jsx_runtime.JSX.Element | null;
|
|
1314
|
+
|
|
1315
|
+
/**
|
|
1316
|
+
* Merges class names with Tailwind conflict resolution.
|
|
1317
|
+
* Uses clsx for conditional logic and tailwind-merge to avoid
|
|
1318
|
+
* duplicate/conflicting Tailwind utility classes.
|
|
1319
|
+
*/
|
|
1320
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
1321
|
+
|
|
1322
|
+
declare const PIXELPLAY_VERSION = "1.0.3";
|
|
1323
|
+
|
|
1324
|
+
export { type AccountDropdownItem, ActionDropdownCell, type ActionDropdownCellProps, ActionIconsCell, type ActionIconsCellProps, Alert, type AlertColor, type AlertIconStyle, type AlertLayout, type AlertProps, type AttachmentFileType, Avatar, AvatarCell, type AvatarCellProps, type AvatarColor, AvatarGroupCell, type AvatarGroupCellProps, type AvatarGroupItem, type AvatarProps, Badge, BadgeCell, type BadgeCellProps, type BadgeColor, BadgeGroup, type BadgeGroupColor, type BadgeGroupProps, type BadgeGroupSize, type BadgeItem, type BadgeProps, type BadgeSize, BadgesCell, BarChart, type BarChartProps, type BaseChartProps, type BaseComponentProps, Breadcrumb, type BreadcrumbItemData, type BreadcrumbProps, Button, ButtonGroup, ButtonGroupItem, type ButtonGroupItemProps, type ButtonGroupProps, type ButtonProps, Calendar, type CalendarEvent, type CalendarProps, type CalendarView, Card, CardBody, type CardBodyProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CarouselArrow, type CarouselArrowColor, type CarouselArrowProps, type CarouselArrowSize, type ChartDataPoint, type ChartSeries, type ChartSize, ChatMessage, type ChatMessageProps, Checkbox, CheckboxCard, type CheckboxCardOption, type CheckboxCardProps, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, CircularProgress, type CircularProgressProps, type CircularProgressSize, type CircularProgressVariant, type ColorVariant, type CountryCode, CountryFlag, type CountryFlagProps, type CountryFlagShape, type CountryFlagSize, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerValue, type DateRange, DateRangePicker, type DateRangePickerProps, DateTimePicker, type DateTimePickerProps, DonutChart, type DonutChartProps, DropdownMenu, DropdownMenuAvatarHeader, type DropdownMenuAvatarHeaderProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, type DropdownMenuItemProps, type DropdownMenuProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, type EventColor, type FeatureIconColor, type FileType, FileTypeCell, type FileTypeCellProps, FileTypeIcon, type FileTypeIconProps, FileUpload, type FileUploadProps, type FileUploadStatus, type FileUploadVariant, type IndicatorColor, type IndicatorShape, type IndicatorSize, Input, type InputProps, type InputVariant, type LegendPosition, LineChart, type LineChartProps, MegaInput, type MegaInputProps, type MessageAttachment, MessageReaction, type MessageReactionProps, type MessageSide, type MessageType, Modal, type ModalAction, type ModalActionsLayout, type ModalAlign, type ModalAvatarGroupItem, type ModalCheckboxConfig, type ModalLayout, type ModalPosition, type ModalProps, type ModalSize, type ModalUserAvatar, PIXELPLAY_VERSION, Pagination, PaginationIndicator, type PaginationIndicatorProps, type PaginationPageShape, type PaginationProps, type PaginationVariant, ProgressBar, type ProgressBarProps, ProgressCell, type ProgressLabelPlacement, type ProgressSize, RadarChart, type RadarChartProps, RadialChart, type RadialChartProps, type RadiusVariant, RangeSlider, type RangeSliderProps, ScatterChart, type ScatterChartProps, type ScatterDataPoint, type ScatterSeries, Select, type SelectOption, type SelectProps, type SizeScale, type SliderLabelPlacement, SocialButton, type SocialButtonProps, type SocialButtonStyle, type SocialPlatform, SparklineChart, type SparklineChartProps, Spinner, type SpinnerProps, StoreButton, type StoreButtonProps, type StoreButtonSize, type StoreButtonTheme, type StorePlatform, type StyleVariant, type TabItem, Tabs, type TabsProps, Tag, type TagProps, type TagSize, type TextAction, TextActionCell, TextCell, type TextCellProps, Textarea, type TextareaProps, type TextareaResize, type ToastColor, type ToastContextValue, type ToastItem, ToastProvider, Toggle, type ToggleProps, Tooltip, type TooltipColor, type TooltipPlacement, type TooltipProps, TooltipTrigger, type TooltipTriggerProps, type UploadFile, cn, getFileExtColor, getFileExtLabel, useToast };
|