@mirror-physics/fractal-ui 0.2.0-next.4 → 0.2.0-next.41
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 +1066 -227
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1258 -73
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +246 -13
- package/dist/index.d.ts +246 -13
- package/dist/index.js +1021 -218
- package/dist/index.js.map +1 -1
- package/dist/lattice-FAYE5KWW.svg +3 -0
- package/dist/tokens.css +5 -3
- package/package.json +2 -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';
|
|
@@ -21,6 +21,18 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
|
21
21
|
}
|
|
22
22
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
23
23
|
|
|
24
|
+
interface BreadcrumbItem {
|
|
25
|
+
label: React.ReactNode;
|
|
26
|
+
href?: string;
|
|
27
|
+
onClick?: React.MouseEventHandler<HTMLAnchorElement>;
|
|
28
|
+
}
|
|
29
|
+
interface BreadcrumbsProps extends Omit<React.HTMLAttributes<HTMLElement>, 'children'> {
|
|
30
|
+
items: BreadcrumbItem[];
|
|
31
|
+
ariaLabel?: string;
|
|
32
|
+
separator?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
declare function Breadcrumbs({ items, ariaLabel, separator, className, ...props }: BreadcrumbsProps): React.JSX.Element | null;
|
|
35
|
+
|
|
24
36
|
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
25
37
|
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
26
38
|
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
@@ -60,6 +72,11 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
|
60
72
|
}
|
|
61
73
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
62
74
|
|
|
75
|
+
interface NumberInputProps extends Omit<InputProps, 'type'> {
|
|
76
|
+
unit?: string;
|
|
77
|
+
}
|
|
78
|
+
declare function NumberInput({ unit, className, value, defaultValue, disabled, readOnly, min, max, ...props }: NumberInputProps): React.JSX.Element;
|
|
79
|
+
|
|
63
80
|
interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
64
81
|
}
|
|
65
82
|
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -94,11 +111,18 @@ interface ModalProps {
|
|
|
94
111
|
footer?: React.ReactNode;
|
|
95
112
|
/** When true, prevents closing via overlay click or Escape. */
|
|
96
113
|
noClose?: boolean;
|
|
114
|
+
/** Keeps the close control visible but disables every dismissal route. */
|
|
115
|
+
closeDisabled?: boolean;
|
|
97
116
|
/** Modal width: 'sm' (420px), 'md' (756px), 'lg' (near-fullscreen). */
|
|
98
117
|
size?: 'sm' | 'md' | 'lg';
|
|
118
|
+
/** Replaces the body with a whole-surface loading state while retaining the modal chrome. */
|
|
119
|
+
loading?: boolean;
|
|
120
|
+
loadingLabel?: string;
|
|
121
|
+
/** Constrains the modal to the viewport, scrolls the body, and separates the fixed footer with a full-width divider. */
|
|
122
|
+
scrollable?: boolean;
|
|
99
123
|
className?: string;
|
|
100
124
|
}
|
|
101
|
-
declare function Modal({ open, onClose, title, children, danger, warn, footer, noClose, size, className }: ModalProps): React.ReactPortal | null;
|
|
125
|
+
declare function Modal({ open, onClose, title, children, danger, warn, footer, noClose, closeDisabled, size, loading, loadingLabel, scrollable, className }: ModalProps): React.ReactPortal | null;
|
|
102
126
|
|
|
103
127
|
interface DataTableColumn<T> {
|
|
104
128
|
key: string;
|
|
@@ -133,6 +157,8 @@ interface DropdownProps {
|
|
|
133
157
|
align?: 'left' | 'right';
|
|
134
158
|
triggerContent?: React.ReactNode;
|
|
135
159
|
label?: React.ReactNode;
|
|
160
|
+
/** Renders the trigger as a square icon button. Requires an accessible triggerLabel. */
|
|
161
|
+
iconOnly?: boolean;
|
|
136
162
|
noChevron?: boolean;
|
|
137
163
|
size?: 'sm' | 'md';
|
|
138
164
|
triggerVariant?: 'outline' | 'tertiary';
|
|
@@ -140,8 +166,9 @@ interface DropdownProps {
|
|
|
140
166
|
triggerClassName?: string;
|
|
141
167
|
panelClassName?: string;
|
|
142
168
|
closeOnSelect?: boolean;
|
|
169
|
+
disabled?: boolean;
|
|
143
170
|
}
|
|
144
|
-
declare function Dropdown({ items, selectedValue, onSelect, triggerLabel, direction, align, triggerContent, label, noChevron, size, triggerVariant, className, triggerClassName, panelClassName, closeOnSelect, }: DropdownProps): React.JSX.Element | null;
|
|
171
|
+
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
172
|
|
|
146
173
|
type LinkTheme = 'default' | 'muted' | 'accent';
|
|
147
174
|
type LinkSize = 'sm' | 'md' | 'lg';
|
|
@@ -157,7 +184,17 @@ interface ChipProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
157
184
|
}
|
|
158
185
|
declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLSpanElement>>;
|
|
159
186
|
|
|
187
|
+
interface CheckboxProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onChange'> {
|
|
188
|
+
checked: boolean;
|
|
189
|
+
onCheckedChange: (checked: boolean) => void;
|
|
190
|
+
}
|
|
191
|
+
declare function Checkbox({ checked, onCheckedChange, className, disabled, onClick, onKeyDown, ...props }: CheckboxProps): React.JSX.Element;
|
|
192
|
+
|
|
160
193
|
type SortDirection = 'asc' | 'desc' | null;
|
|
194
|
+
interface SortableTableDefaultSort {
|
|
195
|
+
key: string;
|
|
196
|
+
direction: Exclude<SortDirection, null>;
|
|
197
|
+
}
|
|
161
198
|
interface SortableTableColumn<T> {
|
|
162
199
|
key: string;
|
|
163
200
|
header: string;
|
|
@@ -167,21 +204,34 @@ interface SortableTableColumn<T> {
|
|
|
167
204
|
render: (row: T, index: number) => ReactNode;
|
|
168
205
|
align?: 'left' | 'right';
|
|
169
206
|
}
|
|
207
|
+
interface SortableTableRowAction<T> {
|
|
208
|
+
label: (row: T, index: number) => string;
|
|
209
|
+
icon: (row: T, index: number) => ReactNode;
|
|
210
|
+
}
|
|
170
211
|
interface SortableTableProps<T> {
|
|
171
212
|
columns: SortableTableColumn<T>[];
|
|
172
213
|
data: T[];
|
|
173
214
|
emptyMessage?: string;
|
|
174
215
|
header?: ReactNode;
|
|
175
216
|
size?: 'sm' | 'md' | 'lg';
|
|
217
|
+
/** Removes the table's outer border and radius for use inside another framed surface. */
|
|
218
|
+
embedded?: boolean;
|
|
176
219
|
className?: string;
|
|
220
|
+
/** Required baseline row ordering that does not appear as an active user sort. */
|
|
221
|
+
defaultSort: SortableTableDefaultSort;
|
|
222
|
+
/** Initial visible user sort state. */
|
|
177
223
|
defaultSortKey?: string;
|
|
178
224
|
defaultSortDirection?: SortDirection;
|
|
179
225
|
sortKey?: string | null;
|
|
180
226
|
sortDirection?: SortDirection;
|
|
181
227
|
onSortChange?: (key: string | null, direction: SortDirection) => void;
|
|
182
228
|
highlightRow?: (row: T, index: number) => boolean;
|
|
229
|
+
/** Invoked when a row is selected. Enables pointer and keyboard row activation. */
|
|
230
|
+
onRowClick?: (row: T, index: number) => void;
|
|
231
|
+
/** Directional affordance displayed over the right edge of an interactive row. */
|
|
232
|
+
rowAction?: SortableTableRowAction<T>;
|
|
183
233
|
}
|
|
184
|
-
declare function SortableTable<T>({ columns, data, emptyMessage, header, size, className, defaultSortKey, defaultSortDirection, sortKey: controlledKey, sortDirection: controlledDirection, onSortChange, highlightRow, }: SortableTableProps<T>): React.JSX.Element;
|
|
234
|
+
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
235
|
|
|
186
236
|
interface TabItem {
|
|
187
237
|
id: string;
|
|
@@ -189,6 +239,7 @@ interface TabItem {
|
|
|
189
239
|
content: ReactNode;
|
|
190
240
|
disabled?: boolean;
|
|
191
241
|
}
|
|
242
|
+
type TabsVariant = 'line' | 'surface';
|
|
192
243
|
interface TabsProps {
|
|
193
244
|
items: TabItem[];
|
|
194
245
|
defaultValue?: string;
|
|
@@ -196,8 +247,27 @@ interface TabsProps {
|
|
|
196
247
|
onValueChange?: (id: string) => void;
|
|
197
248
|
className?: string;
|
|
198
249
|
ariaLabel?: string;
|
|
250
|
+
/** Extends a subtle divider across the entire tab list. */
|
|
251
|
+
divider?: boolean;
|
|
252
|
+
/** Visual treatment. Surface tabs sit on a full-width secondary surface with the active tab connected to its panel. */
|
|
253
|
+
variant?: TabsVariant;
|
|
254
|
+
}
|
|
255
|
+
declare function Tabs({ items, defaultValue, value: controlledValue, onValueChange, className, ariaLabel, divider, variant, }: TabsProps): React.JSX.Element;
|
|
256
|
+
|
|
257
|
+
interface ContentSwitcherItem {
|
|
258
|
+
value: string;
|
|
259
|
+
label: React.ReactNode;
|
|
260
|
+
disabled?: boolean;
|
|
199
261
|
}
|
|
200
|
-
|
|
262
|
+
interface ContentSwitcherProps {
|
|
263
|
+
items: ContentSwitcherItem[];
|
|
264
|
+
value: string;
|
|
265
|
+
onValueChange: (value: string) => void;
|
|
266
|
+
ariaLabel: string;
|
|
267
|
+
fullWidth?: boolean;
|
|
268
|
+
className?: string;
|
|
269
|
+
}
|
|
270
|
+
declare function ContentSwitcher({ items, value, onValueChange, ariaLabel, fullWidth, className }: ContentSwitcherProps): React.JSX.Element;
|
|
201
271
|
|
|
202
272
|
interface DisclosureProps {
|
|
203
273
|
title: ReactNode;
|
|
@@ -206,18 +276,134 @@ interface DisclosureProps {
|
|
|
206
276
|
defaultOpen?: boolean;
|
|
207
277
|
open?: boolean;
|
|
208
278
|
onOpenChange?: (open: boolean) => void;
|
|
279
|
+
disabled?: boolean;
|
|
209
280
|
className?: string;
|
|
210
281
|
variant?: 'card' | 'plain';
|
|
211
282
|
}
|
|
212
|
-
declare function Disclosure({ title, meta, children, defaultOpen, open: controlledOpen, onOpenChange, className, variant, }: DisclosureProps): React.JSX.Element;
|
|
283
|
+
declare function Disclosure({ title, meta, children, defaultOpen, open: controlledOpen, onOpenChange, disabled, className, variant, }: DisclosureProps): React.JSX.Element;
|
|
284
|
+
|
|
285
|
+
interface LatticeLoaderProps extends HTMLAttributes<HTMLSpanElement> {
|
|
286
|
+
label?: string;
|
|
287
|
+
}
|
|
288
|
+
declare function LatticeLoader({ className, label, ...props }: LatticeLoaderProps): React.JSX.Element;
|
|
289
|
+
|
|
290
|
+
type UILoaderTone = 'neutral' | 'blue' | 'green';
|
|
291
|
+
interface UILoaderProps {
|
|
292
|
+
/** Visual height. Width follows the mark's aspect ratio. */
|
|
293
|
+
size?: number | string;
|
|
294
|
+
tone?: UILoaderTone;
|
|
295
|
+
className?: string;
|
|
296
|
+
style?: CSSProperties;
|
|
297
|
+
label?: string;
|
|
298
|
+
/** Use when another nearby element already announces loading. */
|
|
299
|
+
ariaHidden?: boolean;
|
|
300
|
+
}
|
|
301
|
+
/** A branded shine loader for whole UI surfaces, not component-level content. */
|
|
302
|
+
declare function UILoader({ size, tone, className, style, label, ariaHidden }: UILoaderProps): React.JSX.Element;
|
|
303
|
+
|
|
304
|
+
type GhostLength = number | string;
|
|
305
|
+
interface GhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
306
|
+
/** Width of the placeholder. Numbers are interpreted as pixels. */
|
|
307
|
+
width?: GhostLength;
|
|
308
|
+
/** Height of the placeholder. Numbers are interpreted as pixels. */
|
|
309
|
+
height?: GhostLength;
|
|
310
|
+
/** Border radius override. */
|
|
311
|
+
radius?: GhostLength;
|
|
312
|
+
}
|
|
313
|
+
interface GhostLineProps extends Omit<GhostProps, 'height'> {
|
|
314
|
+
/** Text-line size. */
|
|
315
|
+
size?: 'sm' | 'md' | 'lg';
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* An intentionally content-free, shimmering placeholder. Use the composed
|
|
319
|
+
* ghosts below for standard Fractal components; use this primitive for custom
|
|
320
|
+
* product layouts.
|
|
321
|
+
*/
|
|
322
|
+
declare function Ghost({ className, width, height, radius, style, ...props }: GhostProps): React.JSX.Element;
|
|
323
|
+
declare function GhostLine({ className, size, width, ...props }: GhostLineProps): React.JSX.Element;
|
|
324
|
+
interface ButtonGhostProps extends Omit<GhostProps, 'height'> {
|
|
325
|
+
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
326
|
+
iconOnly?: boolean;
|
|
327
|
+
}
|
|
328
|
+
declare function ButtonGhost({ className, size, iconOnly, width, ...props }: ButtonGhostProps): React.JSX.Element;
|
|
329
|
+
interface CardGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
330
|
+
lines?: number;
|
|
331
|
+
showHeader?: boolean;
|
|
332
|
+
}
|
|
333
|
+
declare function CardGhost({ className, lines, showHeader, ...props }: CardGhostProps): React.JSX.Element;
|
|
334
|
+
interface DataTableGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
335
|
+
/** Display placeholder cells for a header that is itself still loading. */
|
|
336
|
+
showHeader?: boolean;
|
|
337
|
+
/** Static header labels to retain while only rows are loading. */
|
|
338
|
+
headers?: ReactNode[];
|
|
339
|
+
/** Number of column placeholders. */
|
|
340
|
+
columns?: number;
|
|
341
|
+
/** Number of data row placeholders. */
|
|
342
|
+
rows?: number;
|
|
343
|
+
/** Optional CSS widths mirroring the eventual table columns. */
|
|
344
|
+
columnWidths?: string[];
|
|
345
|
+
size?: 'sm' | 'md' | 'lg';
|
|
346
|
+
}
|
|
347
|
+
declare function DataTableGhost({ className, showHeader, headers, columns, rows, columnWidths, size, ...props }: DataTableGhostProps): React.JSX.Element;
|
|
348
|
+
interface FormFieldGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
349
|
+
labelWidth?: GhostLength;
|
|
350
|
+
multiline?: boolean;
|
|
351
|
+
}
|
|
352
|
+
declare function InputGhost({ className, labelWidth, ...props }: FormFieldGhostProps): React.JSX.Element;
|
|
353
|
+
declare function TextareaGhost({ className, labelWidth, ...props }: FormFieldGhostProps): React.JSX.Element;
|
|
354
|
+
declare function LabelGhost({ className, width, ...props }: Omit<GhostLineProps, 'size'>): React.JSX.Element;
|
|
355
|
+
declare function AlertGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
356
|
+
declare function CheckboxGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
357
|
+
declare const ToggleGhost: typeof CheckboxGhost;
|
|
358
|
+
declare function ChipGhost({ className, width, ...props }: Omit<GhostProps, 'height'>): React.JSX.Element;
|
|
359
|
+
declare function LinkGhost({ className, width, ...props }: Omit<GhostLineProps, 'size'>): React.JSX.Element;
|
|
360
|
+
declare const TextButtonGhost: typeof LinkGhost;
|
|
361
|
+
declare function DropdownGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
362
|
+
declare function ContentSwitcherGhost({ className, options, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
363
|
+
options?: number;
|
|
364
|
+
}): React.JSX.Element;
|
|
365
|
+
declare const TabsGhost: typeof ContentSwitcherGhost;
|
|
366
|
+
declare function DisclosureGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
367
|
+
declare function PaginationGhost({ className, pages, ...props }: HTMLAttributes<HTMLDivElement> & {
|
|
368
|
+
pages?: number;
|
|
369
|
+
}): React.JSX.Element;
|
|
370
|
+
declare function FileDropzoneGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
371
|
+
declare function PromptCardGhost({ className, ...props }: HTMLAttributes<HTMLDivElement>): React.JSX.Element;
|
|
372
|
+
declare function SortableTableGhost(props: DataTableGhostProps): React.JSX.Element;
|
|
373
|
+
interface SidebarGhostProps extends HTMLAttributes<HTMLDivElement> {
|
|
374
|
+
items?: number;
|
|
375
|
+
}
|
|
376
|
+
declare function SidebarGhost({ className, items, ...props }: SidebarGhostProps): React.JSX.Element;
|
|
377
|
+
interface SurfaceGhostProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
378
|
+
title?: ReactNode;
|
|
379
|
+
lines?: number;
|
|
380
|
+
}
|
|
381
|
+
declare function ModalGhost({ className, title, lines, ...props }: SurfaceGhostProps): React.JSX.Element;
|
|
382
|
+
declare function SidePanelGhost({ className, title, lines, ...props }: SurfaceGhostProps): React.JSX.Element;
|
|
213
383
|
|
|
214
384
|
interface SidebarProps extends React.HTMLAttributes<HTMLElement> {
|
|
215
385
|
/** Fixed sidebar width. Defaults to the standard application width. */
|
|
216
386
|
width?: string;
|
|
387
|
+
/** Collapses the sidebar to an icon rail until it is hovered or receives focus. */
|
|
388
|
+
compact?: boolean;
|
|
217
389
|
}
|
|
218
390
|
declare const Sidebar: React.ForwardRefExoticComponent<SidebarProps & React.RefAttributes<HTMLElement>>;
|
|
219
391
|
declare const SidebarHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
220
392
|
declare const SidebarBrand: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
393
|
+
interface SidebarAccountMenuProps {
|
|
394
|
+
/** Person or workspace label shown in the sidebar header. */
|
|
395
|
+
name: string;
|
|
396
|
+
/** Available account actions. */
|
|
397
|
+
items: DropdownItem[];
|
|
398
|
+
/** Invoked when an account action is selected. */
|
|
399
|
+
onSelect: (value: string) => void;
|
|
400
|
+
/** Accessible label for the account actions menu. */
|
|
401
|
+
triggerLabel?: string;
|
|
402
|
+
/** Leading profile or workspace mark. */
|
|
403
|
+
icon?: React.ReactNode;
|
|
404
|
+
className?: string;
|
|
405
|
+
}
|
|
406
|
+
declare function SidebarAccountMenu({ name, items, onSelect, triggerLabel, icon, className, }: SidebarAccountMenuProps): React.JSX.Element;
|
|
221
407
|
declare const SidebarNav: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
|
|
222
408
|
declare const SidebarSection: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
223
409
|
interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -231,15 +417,62 @@ interface SidebarNavItemProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
231
417
|
declare const SidebarNavItem: React.ForwardRefExoticComponent<SidebarNavItemProps & React.RefAttributes<HTMLButtonElement>>;
|
|
232
418
|
declare const SidebarFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
233
419
|
|
|
234
|
-
interface
|
|
235
|
-
|
|
420
|
+
interface SidePanelProps {
|
|
421
|
+
open: boolean;
|
|
422
|
+
onClose: () => void;
|
|
236
423
|
title: React.ReactNode;
|
|
237
|
-
/** Optional supporting context for the page. */
|
|
238
424
|
description?: React.ReactNode;
|
|
239
|
-
|
|
240
|
-
|
|
425
|
+
children: React.ReactNode;
|
|
426
|
+
footer?: React.ReactNode;
|
|
427
|
+
/** Panel width: sm (420px), md (540px), lg (680px), or xl (960px). */
|
|
428
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
429
|
+
/** Replaces the body with a whole-surface loading state while retaining the panel header. */
|
|
430
|
+
loading?: boolean;
|
|
431
|
+
loadingLabel?: string;
|
|
432
|
+
className?: string;
|
|
433
|
+
}
|
|
434
|
+
declare function SidePanel({ open, onClose, title, description, children, footer, size, loading, loadingLabel, className }: SidePanelProps): React.ReactPortal | null;
|
|
435
|
+
|
|
436
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
437
|
+
}
|
|
438
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
439
|
+
|
|
440
|
+
type TextButtonSize = 'sm' | 'md';
|
|
441
|
+
type TextButtonIconPosition = 'start' | 'end';
|
|
442
|
+
type TextButtonTone = 'primary' | 'secondary';
|
|
443
|
+
interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
444
|
+
icon?: React.ReactNode;
|
|
445
|
+
iconPosition?: TextButtonIconPosition;
|
|
446
|
+
size?: TextButtonSize;
|
|
447
|
+
tone?: TextButtonTone;
|
|
448
|
+
}
|
|
449
|
+
declare const TextButton: React.ForwardRefExoticComponent<TextButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
450
|
+
|
|
451
|
+
interface FileDropzoneProps {
|
|
452
|
+
files: File[];
|
|
453
|
+
onFilesChange: (files: File[]) => void;
|
|
454
|
+
accept?: string;
|
|
455
|
+
multiple?: boolean;
|
|
456
|
+
disabled?: boolean;
|
|
457
|
+
title?: React.ReactNode;
|
|
458
|
+
description?: React.ReactNode;
|
|
459
|
+
className?: string;
|
|
460
|
+
}
|
|
461
|
+
declare function FileDropzone({ files, onFilesChange, accept, multiple, disabled, title, description, className, }: FileDropzoneProps): React.JSX.Element;
|
|
462
|
+
|
|
463
|
+
interface PaginationProps {
|
|
464
|
+
/** One-based active page. */
|
|
465
|
+
page: number;
|
|
466
|
+
pageSize: number;
|
|
467
|
+
totalItems: number;
|
|
468
|
+
onPageChange: (page: number) => void;
|
|
469
|
+
/** Optional page sizes, rendered as an unframed selector in the pagination footer. */
|
|
470
|
+
pageSizeOptions?: number[];
|
|
471
|
+
onPageSizeChange?: (pageSize: number) => void;
|
|
472
|
+
ariaLabel?: string;
|
|
473
|
+
className?: string;
|
|
241
474
|
}
|
|
242
|
-
declare
|
|
475
|
+
declare function Pagination({ page, pageSize, totalItems, onPageChange, pageSizeOptions, onPageSizeChange, ariaLabel, className, }: PaginationProps): React.JSX.Element;
|
|
243
476
|
|
|
244
477
|
/**
|
|
245
478
|
* Register an Escape-key dismiss handler with the global priority stack.
|
|
@@ -252,4 +485,4 @@ declare function useEscapeDismiss(priority: number, handler: () => void, enabled
|
|
|
252
485
|
|
|
253
486
|
declare function cn(...inputs: ClassValue[]): string;
|
|
254
487
|
|
|
255
|
-
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,
|
|
488
|
+
export { Alert, AlertDescription, AlertGhost, AlertTitle, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, 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, NumberInput, type NumberInputProps, 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, type TabsVariant, 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 };
|