@mirror-physics/fractal-ui 0.2.0-next.3 → 0.2.0-next.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +876 -162
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1122 -94
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +224 -7
- package/dist/index.d.ts +224 -7
- package/dist/index.js +830 -151
- package/dist/index.js.map +1 -1
- package/dist/lattice-FAYE5KWW.svg +3 -0
- package/dist/tokens.css +5 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
5
|
type ButtonType = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
@@ -94,11 +94,16 @@ interface ModalProps {
|
|
|
94
94
|
footer?: React.ReactNode;
|
|
95
95
|
/** When true, prevents closing via overlay click or Escape. */
|
|
96
96
|
noClose?: boolean;
|
|
97
|
+
/** Keeps the close control visible but disables every dismissal route. */
|
|
98
|
+
closeDisabled?: boolean;
|
|
97
99
|
/** Modal width: 'sm' (420px), 'md' (756px), 'lg' (near-fullscreen). */
|
|
98
100
|
size?: 'sm' | 'md' | 'lg';
|
|
101
|
+
/** Replaces the body with a whole-surface loading state while retaining the modal chrome. */
|
|
102
|
+
loading?: boolean;
|
|
103
|
+
loadingLabel?: string;
|
|
99
104
|
className?: string;
|
|
100
105
|
}
|
|
101
|
-
declare function Modal({ open, onClose, title, children, danger, warn, footer, noClose, size, className }: ModalProps): React.ReactPortal | null;
|
|
106
|
+
declare function Modal({ open, onClose, title, children, danger, warn, footer, noClose, closeDisabled, size, loading, loadingLabel, className }: ModalProps): React.ReactPortal | null;
|
|
102
107
|
|
|
103
108
|
interface DataTableColumn<T> {
|
|
104
109
|
key: string;
|
|
@@ -133,6 +138,8 @@ interface DropdownProps {
|
|
|
133
138
|
align?: 'left' | 'right';
|
|
134
139
|
triggerContent?: React.ReactNode;
|
|
135
140
|
label?: React.ReactNode;
|
|
141
|
+
/** Renders the trigger as a square icon button. Requires an accessible triggerLabel. */
|
|
142
|
+
iconOnly?: boolean;
|
|
136
143
|
noChevron?: boolean;
|
|
137
144
|
size?: 'sm' | 'md';
|
|
138
145
|
triggerVariant?: 'outline' | 'tertiary';
|
|
@@ -140,8 +147,9 @@ interface DropdownProps {
|
|
|
140
147
|
triggerClassName?: string;
|
|
141
148
|
panelClassName?: string;
|
|
142
149
|
closeOnSelect?: boolean;
|
|
150
|
+
disabled?: boolean;
|
|
143
151
|
}
|
|
144
|
-
declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, triggerContent, label, noChevron, size, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, }: DropdownProps): React.JSX.Element | null;
|
|
152
|
+
declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, triggerContent, label, iconOnly, noChevron, size, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, disabled, }: DropdownProps): React.JSX.Element | null;
|
|
145
153
|
|
|
146
154
|
type LinkTheme = 'default' | 'muted' | 'accent';
|
|
147
155
|
type LinkSize = 'sm' | 'md' | 'lg';
|
|
@@ -157,7 +165,17 @@ interface ChipProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
157
165
|
}
|
|
158
166
|
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
159
167
|
|
|
168
|
+
interface CheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
169
|
+
checked: boolean;
|
|
170
|
+
onCheckedChange: (checked: boolean) => void;
|
|
171
|
+
}
|
|
172
|
+
declare function Checkbox({ checked, onCheckedChange, className, disabled, onClick, onKeyDown, ...props }: CheckboxProps): React.JSX.Element;
|
|
173
|
+
|
|
160
174
|
type SortDirection = 'asc' | 'desc' | null;
|
|
175
|
+
interface SortableTableDefaultSort {
|
|
176
|
+
key: string;
|
|
177
|
+
direction: Exclude<SortDirection, null>;
|
|
178
|
+
}
|
|
161
179
|
interface SortableTableColumn<T> {
|
|
162
180
|
key: string;
|
|
163
181
|
header: string;
|
|
@@ -167,21 +185,34 @@ interface SortableTableColumn<T> {
|
|
|
167
185
|
render: (row: T, index: number) => ReactNode;
|
|
168
186
|
align?: 'left' | 'right';
|
|
169
187
|
}
|
|
188
|
+
interface SortableTableRowAction<T> {
|
|
189
|
+
label: (row: T, index: number) => string;
|
|
190
|
+
icon: (row: T, index: number) => ReactNode;
|
|
191
|
+
}
|
|
170
192
|
interface SortableTableProps<T> {
|
|
171
193
|
columns: SortableTableColumn<T>[];
|
|
172
194
|
data: T[];
|
|
173
195
|
emptyMessage?: string;
|
|
174
196
|
header?: ReactNode;
|
|
175
197
|
size?: 'sm' | 'md' | 'lg';
|
|
198
|
+
/** Removes the table's outer border and radius for use inside another framed surface. */
|
|
199
|
+
embedded?: boolean;
|
|
176
200
|
className?: string;
|
|
201
|
+
/** Baseline row ordering that does not appear as an active user sort. */
|
|
202
|
+
defaultSort?: SortableTableDefaultSort;
|
|
203
|
+
/** Initial visible user sort state. */
|
|
177
204
|
defaultSortKey?: string;
|
|
178
205
|
defaultSortDirection?: SortDirection;
|
|
179
206
|
sortKey?: string | null;
|
|
180
207
|
sortDirection?: SortDirection;
|
|
181
208
|
onSortChange?: (key: string | null, direction: SortDirection) => void;
|
|
182
209
|
highlightRow?: (row: T, index: number) => boolean;
|
|
210
|
+
/** Invoked when a row is selected. Enables pointer and keyboard row activation. */
|
|
211
|
+
onRowClick?: (row: T, index: number) => void;
|
|
212
|
+
/** Directional affordance displayed over the right edge of an interactive row. */
|
|
213
|
+
rowAction?: SortableTableRowAction<T>;
|
|
183
214
|
}
|
|
184
|
-
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, className, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, highlightRow, }: SortableTableProps<T>): React.JSX.Element;
|
|
215
|
+
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, embedded, className, defaultSort, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, highlightRow, onRowClick, rowAction, }: SortableTableProps<T>): React.JSX.Element;
|
|
185
216
|
|
|
186
217
|
interface TabItem {
|
|
187
218
|
id: string;
|
|
@@ -196,8 +227,25 @@ interface TabsProps {
|
|
|
196
227
|
onValueChange?: (id: string) => void;
|
|
197
228
|
className?: string;
|
|
198
229
|
ariaLabel?: string;
|
|
230
|
+
/** Extends a subtle divider across the entire tab list. */
|
|
231
|
+
divider?: boolean;
|
|
232
|
+
}
|
|
233
|
+
declare function Tabs({ items, defaultValue, value: controlledValue, onValueChange, className, ariaLabel, divider, }: TabsProps): React.JSX.Element;
|
|
234
|
+
|
|
235
|
+
interface ContentSwitcherItem {
|
|
236
|
+
value: string;
|
|
237
|
+
label: React.ReactNode;
|
|
238
|
+
disabled?: boolean;
|
|
239
|
+
}
|
|
240
|
+
interface ContentSwitcherProps {
|
|
241
|
+
items: ContentSwitcherItem[];
|
|
242
|
+
value: string;
|
|
243
|
+
onValueChange: (value: string) => void;
|
|
244
|
+
ariaLabel: string;
|
|
245
|
+
fullWidth?: boolean;
|
|
246
|
+
className?: string;
|
|
199
247
|
}
|
|
200
|
-
declare function
|
|
248
|
+
declare function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth, className }: ContentSwitcherProps): React.JSX.Element;
|
|
201
249
|
|
|
202
250
|
interface DisclosureProps {
|
|
203
251
|
title: ReactNode;
|
|
@@ -206,10 +254,110 @@ interface DisclosureProps {
|
|
|
206
254
|
defaultOpen?: boolean;
|
|
207
255
|
open?: boolean;
|
|
208
256
|
onOpenChange?: (open: boolean) => void;
|
|
257
|
+
disabled?: boolean;
|
|
209
258
|
className?: string;
|
|
210
259
|
variant?: 'card' | 'plain';
|
|
211
260
|
}
|
|
212
|
-
declare function Disclosure({ title, meta, children, defaultOpen, open: controlledOpen, onOpenChange, className, variant, }: DisclosureProps): React.JSX.Element;
|
|
261
|
+
declare function Disclosure({ title, meta, children, defaultOpen, open: controlledOpen, onOpenChange, disabled, className, variant, }: DisclosureProps): React.JSX.Element;
|
|
262
|
+
|
|
263
|
+
interface LatticeLoaderProps extends HTMLAttributes<HTMLSpanElement> {
|
|
264
|
+
label?: string;
|
|
265
|
+
}
|
|
266
|
+
declare function LatticeLoader({ className, label, ...props }: LatticeLoaderProps): React.JSX.Element;
|
|
267
|
+
|
|
268
|
+
type UILoaderTone = 'neutral' | 'blue' | 'green';
|
|
269
|
+
interface UILoaderProps {
|
|
270
|
+
/** Visual height. Width follows the mark's aspect ratio. */
|
|
271
|
+
size?: number | string;
|
|
272
|
+
tone?: UILoaderTone;
|
|
273
|
+
className?: string;
|
|
274
|
+
style?: CSSProperties;
|
|
275
|
+
label?: string;
|
|
276
|
+
/** Use when another nearby element already announces loading. */
|
|
277
|
+
ariaHidden?: boolean;
|
|
278
|
+
}
|
|
279
|
+
/** A branded shine loader for whole UI surfaces, not component-level content. */
|
|
280
|
+
declare function UILoader({ size, tone, className, style, label, ariaHidden }: UILoaderProps): React.JSX.Element;
|
|
281
|
+
|
|
282
|
+
type GhostLength = number | string;
|
|
283
|
+
interface GhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
284
|
+
/** Width of the placeholder. Numbers are interpreted as pixels. */
|
|
285
|
+
width?: GhostLength;
|
|
286
|
+
/** Height of the placeholder. Numbers are interpreted as pixels. */
|
|
287
|
+
height?: GhostLength;
|
|
288
|
+
/** Border radius override. */
|
|
289
|
+
radius?: GhostLength;
|
|
290
|
+
}
|
|
291
|
+
interface GhostLineProps extends Omit<GhostProps, 'height'> {
|
|
292
|
+
/** Text-line size. */
|
|
293
|
+
size?: 'sm' | 'md' | 'lg';
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* An intentionally content-free, shimmering placeholder. Use the composed
|
|
297
|
+
* ghosts below for standard Fractal components; use this primitive for custom
|
|
298
|
+
* product layouts.
|
|
299
|
+
*/
|
|
300
|
+
declare function Ghost({ className, width, height, radius, style, ...props }: GhostProps): React.JSX.Element;
|
|
301
|
+
declare function GhostLine({ className, size, width, ...props }: GhostLineProps): React.JSX.Element;
|
|
302
|
+
interface ButtonGhostProps extends Omit<GhostProps, 'height'> {
|
|
303
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
304
|
+
iconOnly?: boolean;
|
|
305
|
+
}
|
|
306
|
+
declare function ButtonGhost({ className, size, iconOnly, width, ...props }: ButtonGhostProps): React.JSX.Element;
|
|
307
|
+
interface CardGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
308
|
+
lines?: number;
|
|
309
|
+
showHeader?: boolean;
|
|
310
|
+
}
|
|
311
|
+
declare function CardGhost({ className, lines, showHeader, ...props }: CardGhostProps): React.JSX.Element;
|
|
312
|
+
interface DataTableGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
313
|
+
/** Display placeholder cells for a header that is itself still loading. */
|
|
314
|
+
showHeader?: boolean;
|
|
315
|
+
/** Static header labels to retain while only rows are loading. */
|
|
316
|
+
headers?: ReactNode[];
|
|
317
|
+
/** Number of column placeholders. */
|
|
318
|
+
columns?: number;
|
|
319
|
+
/** Number of data row placeholders. */
|
|
320
|
+
rows?: number;
|
|
321
|
+
/** Optional CSS widths mirroring the eventual table columns. */
|
|
322
|
+
columnWidths?: string[];
|
|
323
|
+
size?: 'sm' | 'md' | 'lg';
|
|
324
|
+
}
|
|
325
|
+
declare function DataTableGhost({ className, showHeader, headers, columns, rows, columnWidths, size, ...props }: DataTableGhostProps): React.JSX.Element;
|
|
326
|
+
interface FormFieldGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
327
|
+
labelWidth?: GhostLength;
|
|
328
|
+
multiline?: boolean;
|
|
329
|
+
}
|
|
330
|
+
declare function InputGhost({ className, labelWidth, ...props }: FormFieldGhostProps): React.JSX.Element;
|
|
331
|
+
declare function TextareaGhost({ className, labelWidth, ...props }: FormFieldGhostProps): React.JSX.Element;
|
|
332
|
+
declare function LabelGhost({ className, width, ...props }: Omit<GhostLineProps, 'size'>): React.JSX.Element;
|
|
333
|
+
declare function AlertGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
334
|
+
declare function CheckboxGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
335
|
+
declare const ToggleGhost: typeof CheckboxGhost;
|
|
336
|
+
declare function ChipGhost({ className, width, ...props }: Omit<GhostProps, 'height'>): React.JSX.Element;
|
|
337
|
+
declare function LinkGhost({ className, width, ...props }: Omit<GhostLineProps, 'size'>): React.JSX.Element;
|
|
338
|
+
declare const TextButtonGhost: typeof LinkGhost;
|
|
339
|
+
declare function DropdownGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
340
|
+
declare function ContentSwitcherGhost({ className, options, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
341
|
+
options?: number;
|
|
342
|
+
}): React.JSX.Element;
|
|
343
|
+
declare const TabsGhost: typeof ContentSwitcherGhost;
|
|
344
|
+
declare function DisclosureGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
345
|
+
declare function PaginationGhost({ className, pages, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
346
|
+
pages?: number;
|
|
347
|
+
}): React.JSX.Element;
|
|
348
|
+
declare function FileDropzoneGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
349
|
+
declare function PromptCardGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
350
|
+
declare function SortableTableGhost(props: DataTableGhostProps): React.JSX.Element;
|
|
351
|
+
interface SidebarGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
352
|
+
items?: number;
|
|
353
|
+
}
|
|
354
|
+
declare function SidebarGhost({ className, items, ...props }: SidebarGhostProps): React.JSX.Element;
|
|
355
|
+
interface SurfaceGhostProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
356
|
+
title?: ReactNode;
|
|
357
|
+
lines?: number;
|
|
358
|
+
}
|
|
359
|
+
declare function ModalGhost({ className, title, lines, ...props }: SurfaceGhostProps): React.JSX.Element;
|
|
360
|
+
declare function SidePanelGhost({ className, title, lines, ...props }: SurfaceGhostProps): React.JSX.Element;
|
|
213
361
|
|
|
214
362
|
interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
215
363
|
/** Fixed sidebar width. Defaults to the standard application width. */
|
|
@@ -218,6 +366,18 @@ interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
218
366
|
declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLElement>>;
|
|
219
367
|
declare const SidebarHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
220
368
|
declare const SidebarBrand: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
369
|
+
interface SidebarAccountMenuProps {
|
|
370
|
+
/** Person or workspace label shown in the sidebar header. */
|
|
371
|
+
name: string;
|
|
372
|
+
/** Available account actions. */
|
|
373
|
+
items: DropdownItem[];
|
|
374
|
+
/** Invoked when an account action is selected. */
|
|
375
|
+
onSelect: (value: string) => void;
|
|
376
|
+
/** Accessible label for the account actions menu. */
|
|
377
|
+
triggerLabel?: string;
|
|
378
|
+
className?: string;
|
|
379
|
+
}
|
|
380
|
+
declare function SidebarAccountMenu({ name, items, onSelect, triggerLabel, className, }: SidebarAccountMenuProps): React.JSX.Element;
|
|
221
381
|
declare const SidebarNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
222
382
|
declare const SidebarSection: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
223
383
|
interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -231,6 +391,63 @@ interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
231
391
|
declare const SidebarNavItem: React.ForwardRefExoticComponent<SidebarNavItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
232
392
|
declare const SidebarFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
233
393
|
|
|
394
|
+
interface SidePanelProps {
|
|
395
|
+
open: boolean;
|
|
396
|
+
onClose: () => void;
|
|
397
|
+
title: React.ReactNode;
|
|
398
|
+
description?: React.ReactNode;
|
|
399
|
+
children: React.ReactNode;
|
|
400
|
+
footer?: React.ReactNode;
|
|
401
|
+
/** Panel width: sm (420px), md (540px), lg (680px), or xl (960px). */
|
|
402
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
403
|
+
/** Replaces the body with a whole-surface loading state while retaining the panel header. */
|
|
404
|
+
loading?: boolean;
|
|
405
|
+
loadingLabel?: string;
|
|
406
|
+
className?: string;
|
|
407
|
+
}
|
|
408
|
+
declare function SidePanel({ open, onClose, title, description, children, footer, size, loading, loadingLabel, className }: SidePanelProps): React.ReactPortal | null;
|
|
409
|
+
|
|
410
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
411
|
+
}
|
|
412
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
413
|
+
|
|
414
|
+
type TextButtonSize = 'sm' | 'md';
|
|
415
|
+
type TextButtonIconPosition = 'start' | 'end';
|
|
416
|
+
type TextButtonTone = 'primary' | 'secondary';
|
|
417
|
+
interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
418
|
+
icon?: React.ReactNode;
|
|
419
|
+
iconPosition?: TextButtonIconPosition;
|
|
420
|
+
size?: TextButtonSize;
|
|
421
|
+
tone?: TextButtonTone;
|
|
422
|
+
}
|
|
423
|
+
declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
424
|
+
|
|
425
|
+
interface FileDropzoneProps {
|
|
426
|
+
files: File[];
|
|
427
|
+
onFilesChange: (files: File[]) => void;
|
|
428
|
+
accept?: string;
|
|
429
|
+
multiple?: boolean;
|
|
430
|
+
disabled?: boolean;
|
|
431
|
+
title?: React.ReactNode;
|
|
432
|
+
description?: React.ReactNode;
|
|
433
|
+
className?: string;
|
|
434
|
+
}
|
|
435
|
+
declare function FileDropzone({ files, onFilesChange, accept, multiple, disabled, title, description, className, }: FileDropzoneProps): React.JSX.Element;
|
|
436
|
+
|
|
437
|
+
interface PaginationProps {
|
|
438
|
+
/** One-based active page. */
|
|
439
|
+
page: number;
|
|
440
|
+
pageSize: number;
|
|
441
|
+
totalItems: number;
|
|
442
|
+
onPageChange: (page: number) => void;
|
|
443
|
+
/** Optional page sizes, rendered as an unframed selector in the pagination footer. */
|
|
444
|
+
pageSizeOptions?: number[];
|
|
445
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
446
|
+
ariaLabel?: string;
|
|
447
|
+
className?: string;
|
|
448
|
+
}
|
|
449
|
+
declare function Pagination({ page, pageSize, totalItems, onPageChange, pageSizeOptions, onPageSizeChange, ariaLabel, className, }: PaginationProps): React.JSX.Element;
|
|
450
|
+
|
|
234
451
|
/**
|
|
235
452
|
* Register an Escape-key dismiss handler with the global priority stack.
|
|
236
453
|
*
|
|
@@ -242,4 +459,4 @@ declare function useEscapeDismiss(priority: number, handler: () => void, enabled
|
|
|
242
459
|
|
|
243
460
|
declare function cn(...inputs: ClassValue[]): string;
|
|
244
461
|
|
|
245
|
-
export { Alert, AlertDescription, AlertTitle, Button, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chip, type ChipProps, type ChipTone, DataTable, type DataTableColumn, type DataTableProps, Disclosure, type DisclosureProps, Dropdown, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FolderCard, type FolderCardProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, type LinkSize, type LinkTheme, Modal, type ModalProps, PromptCard, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, Sidebar, SidebarBrand, SidebarFooter, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableProps, type TabItem, Tabs, type TabsProps, Toggle, type ToggleProps, cn, useEscapeDismiss };
|
|
462
|
+
export { Alert, AlertDescription, AlertGhost, AlertTitle, Button, type ButtonColor, ButtonGhost, type ButtonGhostProps, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardGhost, type CardGhostProps, CardHeader, CardTitle, Checkbox, CheckboxGhost, type CheckboxProps, Chip, ChipGhost, type ChipProps, type ChipTone, ContentSwitcher, ContentSwitcherGhost, type ContentSwitcherItem, type ContentSwitcherProps, DataTable, type DataTableColumn, DataTableGhost, type DataTableGhostProps, type DataTableProps, Disclosure, DisclosureGhost, type DisclosureProps, Dropdown, DropdownGhost, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FileDropzone, FileDropzoneGhost, type FileDropzoneProps, FolderCard, type FolderCardProps, type FormFieldGhostProps, Ghost, GhostLine, type GhostLineProps, type GhostProps, Input, InputGhost, type InputProps, Label, LabelGhost, type LabelProps, LatticeLoader, type LatticeLoaderProps, Link, LinkGhost, type LinkProps, type LinkSize, type LinkTheme, Modal, ModalGhost, type ModalProps, Pagination, PaginationGhost, type PaginationProps, PromptCard, PromptCardGhost, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, SidePanel, SidePanelGhost, type SidePanelProps, Sidebar, SidebarAccountMenu, type SidebarAccountMenuProps, SidebarBrand, SidebarFooter, SidebarGhost, type SidebarGhostProps, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableDefaultSort, SortableTableGhost, type SortableTableProps, type SortableTableRowAction, type SurfaceGhostProps, type TabItem, Tabs, TabsGhost, type TabsProps, TextButton, TextButtonGhost, type TextButtonIconPosition, type TextButtonProps, type TextButtonSize, type TextButtonTone, Textarea, TextareaGhost, type TextareaProps, Toggle, ToggleGhost, type ToggleProps, UILoader, type UILoaderProps, type UILoaderTone, cn, useEscapeDismiss };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
2
|
+
import { ReactNode, HTMLAttributes, CSSProperties } from 'react';
|
|
3
3
|
import { ClassValue } from 'clsx';
|
|
4
4
|
|
|
5
5
|
type ButtonType = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
@@ -94,11 +94,16 @@ interface ModalProps {
|
|
|
94
94
|
footer?: React.ReactNode;
|
|
95
95
|
/** When true, prevents closing via overlay click or Escape. */
|
|
96
96
|
noClose?: boolean;
|
|
97
|
+
/** Keeps the close control visible but disables every dismissal route. */
|
|
98
|
+
closeDisabled?: boolean;
|
|
97
99
|
/** Modal width: 'sm' (420px), 'md' (756px), 'lg' (near-fullscreen). */
|
|
98
100
|
size?: 'sm' | 'md' | 'lg';
|
|
101
|
+
/** Replaces the body with a whole-surface loading state while retaining the modal chrome. */
|
|
102
|
+
loading?: boolean;
|
|
103
|
+
loadingLabel?: string;
|
|
99
104
|
className?: string;
|
|
100
105
|
}
|
|
101
|
-
declare function Modal({ open, onClose, title, children, danger, warn, footer, noClose, size, className }: ModalProps): React.ReactPortal | null;
|
|
106
|
+
declare function Modal({ open, onClose, title, children, danger, warn, footer, noClose, closeDisabled, size, loading, loadingLabel, className }: ModalProps): React.ReactPortal | null;
|
|
102
107
|
|
|
103
108
|
interface DataTableColumn<T> {
|
|
104
109
|
key: string;
|
|
@@ -133,6 +138,8 @@ interface DropdownProps {
|
|
|
133
138
|
align?: 'left' | 'right';
|
|
134
139
|
triggerContent?: React.ReactNode;
|
|
135
140
|
label?: React.ReactNode;
|
|
141
|
+
/** Renders the trigger as a square icon button. Requires an accessible triggerLabel. */
|
|
142
|
+
iconOnly?: boolean;
|
|
136
143
|
noChevron?: boolean;
|
|
137
144
|
size?: 'sm' | 'md';
|
|
138
145
|
triggerVariant?: 'outline' | 'tertiary';
|
|
@@ -140,8 +147,9 @@ interface DropdownProps {
|
|
|
140
147
|
triggerClassName?: string;
|
|
141
148
|
panelClassName?: string;
|
|
142
149
|
closeOnSelect?: boolean;
|
|
150
|
+
disabled?: boolean;
|
|
143
151
|
}
|
|
144
|
-
declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, triggerContent, label, noChevron, size, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, }: DropdownProps): React.JSX.Element | null;
|
|
152
|
+
declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, triggerContent, label, iconOnly, noChevron, size, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, disabled, }: DropdownProps): React.JSX.Element | null;
|
|
145
153
|
|
|
146
154
|
type LinkTheme = 'default' | 'muted' | 'accent';
|
|
147
155
|
type LinkSize = 'sm' | 'md' | 'lg';
|
|
@@ -157,7 +165,17 @@ interface ChipProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
157
165
|
}
|
|
158
166
|
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
159
167
|
|
|
168
|
+
interface CheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
169
|
+
checked: boolean;
|
|
170
|
+
onCheckedChange: (checked: boolean) => void;
|
|
171
|
+
}
|
|
172
|
+
declare function Checkbox({ checked, onCheckedChange, className, disabled, onClick, onKeyDown, ...props }: CheckboxProps): React.JSX.Element;
|
|
173
|
+
|
|
160
174
|
type SortDirection = 'asc' | 'desc' | null;
|
|
175
|
+
interface SortableTableDefaultSort {
|
|
176
|
+
key: string;
|
|
177
|
+
direction: Exclude<SortDirection, null>;
|
|
178
|
+
}
|
|
161
179
|
interface SortableTableColumn<T> {
|
|
162
180
|
key: string;
|
|
163
181
|
header: string;
|
|
@@ -167,21 +185,34 @@ interface SortableTableColumn<T> {
|
|
|
167
185
|
render: (row: T, index: number) => ReactNode;
|
|
168
186
|
align?: 'left' | 'right';
|
|
169
187
|
}
|
|
188
|
+
interface SortableTableRowAction<T> {
|
|
189
|
+
label: (row: T, index: number) => string;
|
|
190
|
+
icon: (row: T, index: number) => ReactNode;
|
|
191
|
+
}
|
|
170
192
|
interface SortableTableProps<T> {
|
|
171
193
|
columns: SortableTableColumn<T>[];
|
|
172
194
|
data: T[];
|
|
173
195
|
emptyMessage?: string;
|
|
174
196
|
header?: ReactNode;
|
|
175
197
|
size?: 'sm' | 'md' | 'lg';
|
|
198
|
+
/** Removes the table's outer border and radius for use inside another framed surface. */
|
|
199
|
+
embedded?: boolean;
|
|
176
200
|
className?: string;
|
|
201
|
+
/** Baseline row ordering that does not appear as an active user sort. */
|
|
202
|
+
defaultSort?: SortableTableDefaultSort;
|
|
203
|
+
/** Initial visible user sort state. */
|
|
177
204
|
defaultSortKey?: string;
|
|
178
205
|
defaultSortDirection?: SortDirection;
|
|
179
206
|
sortKey?: string | null;
|
|
180
207
|
sortDirection?: SortDirection;
|
|
181
208
|
onSortChange?: (key: string | null, direction: SortDirection) => void;
|
|
182
209
|
highlightRow?: (row: T, index: number) => boolean;
|
|
210
|
+
/** Invoked when a row is selected. Enables pointer and keyboard row activation. */
|
|
211
|
+
onRowClick?: (row: T, index: number) => void;
|
|
212
|
+
/** Directional affordance displayed over the right edge of an interactive row. */
|
|
213
|
+
rowAction?: SortableTableRowAction<T>;
|
|
183
214
|
}
|
|
184
|
-
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, className, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, highlightRow, }: SortableTableProps<T>): React.JSX.Element;
|
|
215
|
+
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, embedded, className, defaultSort, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, highlightRow, onRowClick, rowAction, }: SortableTableProps<T>): React.JSX.Element;
|
|
185
216
|
|
|
186
217
|
interface TabItem {
|
|
187
218
|
id: string;
|
|
@@ -196,8 +227,25 @@ interface TabsProps {
|
|
|
196
227
|
onValueChange?: (id: string) => void;
|
|
197
228
|
className?: string;
|
|
198
229
|
ariaLabel?: string;
|
|
230
|
+
/** Extends a subtle divider across the entire tab list. */
|
|
231
|
+
divider?: boolean;
|
|
232
|
+
}
|
|
233
|
+
declare function Tabs({ items, defaultValue, value: controlledValue, onValueChange, className, ariaLabel, divider, }: TabsProps): React.JSX.Element;
|
|
234
|
+
|
|
235
|
+
interface ContentSwitcherItem {
|
|
236
|
+
value: string;
|
|
237
|
+
label: React.ReactNode;
|
|
238
|
+
disabled?: boolean;
|
|
239
|
+
}
|
|
240
|
+
interface ContentSwitcherProps {
|
|
241
|
+
items: ContentSwitcherItem[];
|
|
242
|
+
value: string;
|
|
243
|
+
onValueChange: (value: string) => void;
|
|
244
|
+
ariaLabel: string;
|
|
245
|
+
fullWidth?: boolean;
|
|
246
|
+
className?: string;
|
|
199
247
|
}
|
|
200
|
-
declare function
|
|
248
|
+
declare function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth, className }: ContentSwitcherProps): React.JSX.Element;
|
|
201
249
|
|
|
202
250
|
interface DisclosureProps {
|
|
203
251
|
title: ReactNode;
|
|
@@ -206,10 +254,110 @@ interface DisclosureProps {
|
|
|
206
254
|
defaultOpen?: boolean;
|
|
207
255
|
open?: boolean;
|
|
208
256
|
onOpenChange?: (open: boolean) => void;
|
|
257
|
+
disabled?: boolean;
|
|
209
258
|
className?: string;
|
|
210
259
|
variant?: 'card' | 'plain';
|
|
211
260
|
}
|
|
212
|
-
declare function Disclosure({ title, meta, children, defaultOpen, open: controlledOpen, onOpenChange, className, variant, }: DisclosureProps): React.JSX.Element;
|
|
261
|
+
declare function Disclosure({ title, meta, children, defaultOpen, open: controlledOpen, onOpenChange, disabled, className, variant, }: DisclosureProps): React.JSX.Element;
|
|
262
|
+
|
|
263
|
+
interface LatticeLoaderProps extends HTMLAttributes<HTMLSpanElement> {
|
|
264
|
+
label?: string;
|
|
265
|
+
}
|
|
266
|
+
declare function LatticeLoader({ className, label, ...props }: LatticeLoaderProps): React.JSX.Element;
|
|
267
|
+
|
|
268
|
+
type UILoaderTone = 'neutral' | 'blue' | 'green';
|
|
269
|
+
interface UILoaderProps {
|
|
270
|
+
/** Visual height. Width follows the mark's aspect ratio. */
|
|
271
|
+
size?: number | string;
|
|
272
|
+
tone?: UILoaderTone;
|
|
273
|
+
className?: string;
|
|
274
|
+
style?: CSSProperties;
|
|
275
|
+
label?: string;
|
|
276
|
+
/** Use when another nearby element already announces loading. */
|
|
277
|
+
ariaHidden?: boolean;
|
|
278
|
+
}
|
|
279
|
+
/** A branded shine loader for whole UI surfaces, not component-level content. */
|
|
280
|
+
declare function UILoader({ size, tone, className, style, label, ariaHidden }: UILoaderProps): React.JSX.Element;
|
|
281
|
+
|
|
282
|
+
type GhostLength = number | string;
|
|
283
|
+
interface GhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
284
|
+
/** Width of the placeholder. Numbers are interpreted as pixels. */
|
|
285
|
+
width?: GhostLength;
|
|
286
|
+
/** Height of the placeholder. Numbers are interpreted as pixels. */
|
|
287
|
+
height?: GhostLength;
|
|
288
|
+
/** Border radius override. */
|
|
289
|
+
radius?: GhostLength;
|
|
290
|
+
}
|
|
291
|
+
interface GhostLineProps extends Omit<GhostProps, 'height'> {
|
|
292
|
+
/** Text-line size. */
|
|
293
|
+
size?: 'sm' | 'md' | 'lg';
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* An intentionally content-free, shimmering placeholder. Use the composed
|
|
297
|
+
* ghosts below for standard Fractal components; use this primitive for custom
|
|
298
|
+
* product layouts.
|
|
299
|
+
*/
|
|
300
|
+
declare function Ghost({ className, width, height, radius, style, ...props }: GhostProps): React.JSX.Element;
|
|
301
|
+
declare function GhostLine({ className, size, width, ...props }: GhostLineProps): React.JSX.Element;
|
|
302
|
+
interface ButtonGhostProps extends Omit<GhostProps, 'height'> {
|
|
303
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
304
|
+
iconOnly?: boolean;
|
|
305
|
+
}
|
|
306
|
+
declare function ButtonGhost({ className, size, iconOnly, width, ...props }: ButtonGhostProps): React.JSX.Element;
|
|
307
|
+
interface CardGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
308
|
+
lines?: number;
|
|
309
|
+
showHeader?: boolean;
|
|
310
|
+
}
|
|
311
|
+
declare function CardGhost({ className, lines, showHeader, ...props }: CardGhostProps): React.JSX.Element;
|
|
312
|
+
interface DataTableGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
313
|
+
/** Display placeholder cells for a header that is itself still loading. */
|
|
314
|
+
showHeader?: boolean;
|
|
315
|
+
/** Static header labels to retain while only rows are loading. */
|
|
316
|
+
headers?: ReactNode[];
|
|
317
|
+
/** Number of column placeholders. */
|
|
318
|
+
columns?: number;
|
|
319
|
+
/** Number of data row placeholders. */
|
|
320
|
+
rows?: number;
|
|
321
|
+
/** Optional CSS widths mirroring the eventual table columns. */
|
|
322
|
+
columnWidths?: string[];
|
|
323
|
+
size?: 'sm' | 'md' | 'lg';
|
|
324
|
+
}
|
|
325
|
+
declare function DataTableGhost({ className, showHeader, headers, columns, rows, columnWidths, size, ...props }: DataTableGhostProps): React.JSX.Element;
|
|
326
|
+
interface FormFieldGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
327
|
+
labelWidth?: GhostLength;
|
|
328
|
+
multiline?: boolean;
|
|
329
|
+
}
|
|
330
|
+
declare function InputGhost({ className, labelWidth, ...props }: FormFieldGhostProps): React.JSX.Element;
|
|
331
|
+
declare function TextareaGhost({ className, labelWidth, ...props }: FormFieldGhostProps): React.JSX.Element;
|
|
332
|
+
declare function LabelGhost({ className, width, ...props }: Omit<GhostLineProps, 'size'>): React.JSX.Element;
|
|
333
|
+
declare function AlertGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
334
|
+
declare function CheckboxGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
335
|
+
declare const ToggleGhost: typeof CheckboxGhost;
|
|
336
|
+
declare function ChipGhost({ className, width, ...props }: Omit<GhostProps, 'height'>): React.JSX.Element;
|
|
337
|
+
declare function LinkGhost({ className, width, ...props }: Omit<GhostLineProps, 'size'>): React.JSX.Element;
|
|
338
|
+
declare const TextButtonGhost: typeof LinkGhost;
|
|
339
|
+
declare function DropdownGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
340
|
+
declare function ContentSwitcherGhost({ className, options, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
341
|
+
options?: number;
|
|
342
|
+
}): React.JSX.Element;
|
|
343
|
+
declare const TabsGhost: typeof ContentSwitcherGhost;
|
|
344
|
+
declare function DisclosureGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
345
|
+
declare function PaginationGhost({ className, pages, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
346
|
+
pages?: number;
|
|
347
|
+
}): React.JSX.Element;
|
|
348
|
+
declare function FileDropzoneGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
349
|
+
declare function PromptCardGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
350
|
+
declare function SortableTableGhost(props: DataTableGhostProps): React.JSX.Element;
|
|
351
|
+
interface SidebarGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
352
|
+
items?: number;
|
|
353
|
+
}
|
|
354
|
+
declare function SidebarGhost({ className, items, ...props }: SidebarGhostProps): React.JSX.Element;
|
|
355
|
+
interface SurfaceGhostProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
356
|
+
title?: ReactNode;
|
|
357
|
+
lines?: number;
|
|
358
|
+
}
|
|
359
|
+
declare function ModalGhost({ className, title, lines, ...props }: SurfaceGhostProps): React.JSX.Element;
|
|
360
|
+
declare function SidePanelGhost({ className, title, lines, ...props }: SurfaceGhostProps): React.JSX.Element;
|
|
213
361
|
|
|
214
362
|
interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
215
363
|
/** Fixed sidebar width. Defaults to the standard application width. */
|
|
@@ -218,6 +366,18 @@ interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
|
218
366
|
declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLElement>>;
|
|
219
367
|
declare const SidebarHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
220
368
|
declare const SidebarBrand: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
369
|
+
interface SidebarAccountMenuProps {
|
|
370
|
+
/** Person or workspace label shown in the sidebar header. */
|
|
371
|
+
name: string;
|
|
372
|
+
/** Available account actions. */
|
|
373
|
+
items: DropdownItem[];
|
|
374
|
+
/** Invoked when an account action is selected. */
|
|
375
|
+
onSelect: (value: string) => void;
|
|
376
|
+
/** Accessible label for the account actions menu. */
|
|
377
|
+
triggerLabel?: string;
|
|
378
|
+
className?: string;
|
|
379
|
+
}
|
|
380
|
+
declare function SidebarAccountMenu({ name, items, onSelect, triggerLabel, className, }: SidebarAccountMenuProps): React.JSX.Element;
|
|
221
381
|
declare const SidebarNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
222
382
|
declare const SidebarSection: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
223
383
|
interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -231,6 +391,63 @@ interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
231
391
|
declare const SidebarNavItem: React.ForwardRefExoticComponent<SidebarNavItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
232
392
|
declare const SidebarFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
233
393
|
|
|
394
|
+
interface SidePanelProps {
|
|
395
|
+
open: boolean;
|
|
396
|
+
onClose: () => void;
|
|
397
|
+
title: React.ReactNode;
|
|
398
|
+
description?: React.ReactNode;
|
|
399
|
+
children: React.ReactNode;
|
|
400
|
+
footer?: React.ReactNode;
|
|
401
|
+
/** Panel width: sm (420px), md (540px), lg (680px), or xl (960px). */
|
|
402
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
403
|
+
/** Replaces the body with a whole-surface loading state while retaining the panel header. */
|
|
404
|
+
loading?: boolean;
|
|
405
|
+
loadingLabel?: string;
|
|
406
|
+
className?: string;
|
|
407
|
+
}
|
|
408
|
+
declare function SidePanel({ open, onClose, title, description, children, footer, size, loading, loadingLabel, className }: SidePanelProps): React.ReactPortal | null;
|
|
409
|
+
|
|
410
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
411
|
+
}
|
|
412
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
413
|
+
|
|
414
|
+
type TextButtonSize = 'sm' | 'md';
|
|
415
|
+
type TextButtonIconPosition = 'start' | 'end';
|
|
416
|
+
type TextButtonTone = 'primary' | 'secondary';
|
|
417
|
+
interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
418
|
+
icon?: React.ReactNode;
|
|
419
|
+
iconPosition?: TextButtonIconPosition;
|
|
420
|
+
size?: TextButtonSize;
|
|
421
|
+
tone?: TextButtonTone;
|
|
422
|
+
}
|
|
423
|
+
declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
424
|
+
|
|
425
|
+
interface FileDropzoneProps {
|
|
426
|
+
files: File[];
|
|
427
|
+
onFilesChange: (files: File[]) => void;
|
|
428
|
+
accept?: string;
|
|
429
|
+
multiple?: boolean;
|
|
430
|
+
disabled?: boolean;
|
|
431
|
+
title?: React.ReactNode;
|
|
432
|
+
description?: React.ReactNode;
|
|
433
|
+
className?: string;
|
|
434
|
+
}
|
|
435
|
+
declare function FileDropzone({ files, onFilesChange, accept, multiple, disabled, title, description, className, }: FileDropzoneProps): React.JSX.Element;
|
|
436
|
+
|
|
437
|
+
interface PaginationProps {
|
|
438
|
+
/** One-based active page. */
|
|
439
|
+
page: number;
|
|
440
|
+
pageSize: number;
|
|
441
|
+
totalItems: number;
|
|
442
|
+
onPageChange: (page: number) => void;
|
|
443
|
+
/** Optional page sizes, rendered as an unframed selector in the pagination footer. */
|
|
444
|
+
pageSizeOptions?: number[];
|
|
445
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
446
|
+
ariaLabel?: string;
|
|
447
|
+
className?: string;
|
|
448
|
+
}
|
|
449
|
+
declare function Pagination({ page, pageSize, totalItems, onPageChange, pageSizeOptions, onPageSizeChange, ariaLabel, className, }: PaginationProps): React.JSX.Element;
|
|
450
|
+
|
|
234
451
|
/**
|
|
235
452
|
* Register an Escape-key dismiss handler with the global priority stack.
|
|
236
453
|
*
|
|
@@ -242,4 +459,4 @@ declare function useEscapeDismiss(priority: number, handler: () => void, enabled
|
|
|
242
459
|
|
|
243
460
|
declare function cn(...inputs: ClassValue[]): string;
|
|
244
461
|
|
|
245
|
-
export { Alert, AlertDescription, AlertTitle, Button, type ButtonColor, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Chip, type ChipProps, type ChipTone, DataTable, type DataTableColumn, type DataTableProps, Disclosure, type DisclosureProps, Dropdown, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FolderCard, type FolderCardProps, Input, type InputProps, Label, type LabelProps, Link, type LinkProps, type LinkSize, type LinkTheme, Modal, type ModalProps, PromptCard, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, Sidebar, SidebarBrand, SidebarFooter, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableProps, type TabItem, Tabs, type TabsProps, Toggle, type ToggleProps, cn, useEscapeDismiss };
|
|
462
|
+
export { Alert, AlertDescription, AlertGhost, AlertTitle, Button, type ButtonColor, ButtonGhost, type ButtonGhostProps, type ButtonProps, type ButtonSize, type ButtonType, Card, CardContent, CardDescription, CardFooter, CardGhost, type CardGhostProps, CardHeader, CardTitle, Checkbox, CheckboxGhost, type CheckboxProps, Chip, ChipGhost, type ChipProps, type ChipTone, ContentSwitcher, ContentSwitcherGhost, type ContentSwitcherItem, type ContentSwitcherProps, DataTable, type DataTableColumn, DataTableGhost, type DataTableGhostProps, type DataTableProps, Disclosure, DisclosureGhost, type DisclosureProps, Dropdown, DropdownGhost, type DropdownItem, type DropdownProps, FeatureCard, type FeatureCardProps, FileDropzone, FileDropzoneGhost, type FileDropzoneProps, FolderCard, type FolderCardProps, type FormFieldGhostProps, Ghost, GhostLine, type GhostLineProps, type GhostProps, Input, InputGhost, type InputProps, Label, LabelGhost, type LabelProps, LatticeLoader, type LatticeLoaderProps, Link, LinkGhost, type LinkProps, type LinkSize, type LinkTheme, Modal, ModalGhost, type ModalProps, Pagination, PaginationGhost, type PaginationProps, PromptCard, PromptCardGhost, type PromptCardProps, type PromptCardTone, PromptGrid, type PromptGridProps, SidePanel, SidePanelGhost, type SidePanelProps, Sidebar, SidebarAccountMenu, type SidebarAccountMenuProps, SidebarBrand, SidebarFooter, SidebarGhost, type SidebarGhostProps, SidebarHeader, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarProps, SidebarSection, type SortDirection, SortableTable, type SortableTableColumn, type SortableTableDefaultSort, SortableTableGhost, type SortableTableProps, type SortableTableRowAction, type SurfaceGhostProps, type TabItem, Tabs, TabsGhost, type TabsProps, TextButton, TextButtonGhost, type TextButtonIconPosition, type TextButtonProps, type TextButtonSize, type TextButtonTone, Textarea, TextareaGhost, type TextareaProps, Toggle, ToggleGhost, type ToggleProps, UILoader, type UILoaderProps, type UILoaderTone, cn, useEscapeDismiss };
|