@nextlyhq/ui 0.0.2-alpha.75 → 0.0.2-alpha.77
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 +142 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +67 -4
- package/dist/index.d.ts +67 -4
- package/dist/index.mjs +142 -35
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.scoped.css +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -311,12 +311,26 @@ interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
311
311
|
* @experimental
|
|
312
312
|
*/
|
|
313
313
|
export declare const Grid: ForwardRefExoticComponent<PropsWithoutRef<GridProps> & RefAttributes<HTMLDivElement>>;
|
|
314
|
+
/** A stat's tone: the status a dot before its value marks, as a badge's does. */
|
|
315
|
+
type StatTone = "success" | "warning" | "destructive" | "info";
|
|
314
316
|
/** @experimental */
|
|
315
317
|
interface StatProps extends HTMLAttributes<HTMLDivElement> {
|
|
316
318
|
/** Muted label above the value. */
|
|
317
319
|
label: string;
|
|
318
320
|
/** The emphasized value (string or node). */
|
|
319
321
|
value: ReactNode;
|
|
322
|
+
/**
|
|
323
|
+
* A dot before the value in a status's colour, such as `warning` beside
|
|
324
|
+
* "Should improve". It only marks the value: the value's own words say
|
|
325
|
+
* what it means, so colour is never the only sign. No dot when unset.
|
|
326
|
+
*/
|
|
327
|
+
tone?: StatTone;
|
|
328
|
+
/**
|
|
329
|
+
* `compact` draws the value smaller (20px rather than 24px), for a figure
|
|
330
|
+
* that leads a small card, with its label as the card's semibold title.
|
|
331
|
+
* Default `default`.
|
|
332
|
+
*/
|
|
333
|
+
size?: "default" | "compact";
|
|
320
334
|
}
|
|
321
335
|
/** Labelled metric block for dashboard-style plugin widgets.
|
|
322
336
|
* @experimental
|
|
@@ -3338,6 +3352,11 @@ export declare function detectApplePlatform(): boolean;
|
|
|
3338
3352
|
* @experimental
|
|
3339
3353
|
*/
|
|
3340
3354
|
type FieldWidth = "half" | "full" | "fill";
|
|
3355
|
+
/**
|
|
3356
|
+
* Where a field's label and help stand relative to its control.
|
|
3357
|
+
* @experimental
|
|
3358
|
+
*/
|
|
3359
|
+
type FieldLayout = "stacked" | "row";
|
|
3341
3360
|
/**
|
|
3342
3361
|
* The wiring `FieldShell` computes for its control: the id to attach, the
|
|
3343
3362
|
* composed `aria-describedby` (`undefined` when nothing is rendered to point
|
|
@@ -3363,8 +3382,19 @@ interface FieldShellProps {
|
|
|
3363
3382
|
description?: React.ReactNode;
|
|
3364
3383
|
/** Validation message under the control. Rendered only when present. */
|
|
3365
3384
|
error?: React.ReactNode;
|
|
3366
|
-
/**
|
|
3385
|
+
/**
|
|
3386
|
+
* Defaults to "half" in the stacked layout, where most admin inputs are
|
|
3387
|
+
* short values, and to "fill" in the row layout, whose right column is
|
|
3388
|
+
* already the control's measure.
|
|
3389
|
+
*/
|
|
3367
3390
|
width?: FieldWidth;
|
|
3391
|
+
/**
|
|
3392
|
+
* `stacked` (the default): the label above the control, the help under it.
|
|
3393
|
+
* `row`: the settings row, with the label and its help in a left column and
|
|
3394
|
+
* the control in a right one, stacking on a narrow screen. Both lay out the
|
|
3395
|
+
* same wiring; only where each part stands differs.
|
|
3396
|
+
*/
|
|
3397
|
+
layout?: FieldLayout;
|
|
3368
3398
|
htmlFor?: string;
|
|
3369
3399
|
className?: string;
|
|
3370
3400
|
/**
|
|
@@ -3400,11 +3430,44 @@ interface FormActionsProps {
|
|
|
3400
3430
|
* state that already tracks it; never computed here.
|
|
3401
3431
|
*/
|
|
3402
3432
|
dirty?: boolean;
|
|
3433
|
+
/**
|
|
3434
|
+
* What the bar says while `dirty` is true, in place of "You have unsaved
|
|
3435
|
+
* changes": a bar committing several records at once says what changed,
|
|
3436
|
+
* such as "1 page changed". Like `dirty`, the page states it from the state
|
|
3437
|
+
* that already knows; the bar never counts anything.
|
|
3438
|
+
*/
|
|
3439
|
+
message?: React.ReactNode;
|
|
3403
3440
|
className?: string;
|
|
3404
3441
|
children: React.ReactNode;
|
|
3405
3442
|
}
|
|
3406
3443
|
/** @experimental */
|
|
3407
|
-
export declare function FieldShell({ label, description, error, width, htmlFor, className, children }: FieldShellProps): JSX.Element;
|
|
3444
|
+
export declare function FieldShell({ label, description, error, width, layout, htmlFor, className, children }: FieldShellProps): JSX.Element;
|
|
3445
|
+
/** @experimental */
|
|
3446
|
+
interface FieldRowProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3447
|
+
/**
|
|
3448
|
+
* The left column: the row's label and any help under it, already rendered.
|
|
3449
|
+
* A node rather than a string because who names the control differs by
|
|
3450
|
+
* caller — a `<label for>` for one control, a `<span>` a group points
|
|
3451
|
+
* `aria-labelledby` at for several — and that choice is the caller's.
|
|
3452
|
+
*/
|
|
3453
|
+
aside: ReactNode;
|
|
3454
|
+
/** The right column: the control, or the group of controls. */
|
|
3455
|
+
children: ReactNode;
|
|
3456
|
+
}
|
|
3457
|
+
/**
|
|
3458
|
+
* The two-column settings row: label and help on the left, the control on the
|
|
3459
|
+
* right, stacking into one column on a narrow screen.
|
|
3460
|
+
*
|
|
3461
|
+
* Geometry only. It owns the grid and nothing about naming, so the rows that
|
|
3462
|
+
* differ in how they label their control — `FieldShell`'s row layout, and the
|
|
3463
|
+
* admin's form-bound and grouped settings rows — all draw this one grid rather
|
|
3464
|
+
* than three copies of it that could drift apart.
|
|
3465
|
+
*
|
|
3466
|
+
* It applies no vertical padding: `FormSection` sets the rhythm between its
|
|
3467
|
+
* rows, and a row that padded itself as well would double it.
|
|
3468
|
+
* @experimental
|
|
3469
|
+
*/
|
|
3470
|
+
export declare function FieldRow({ aside, children, className, ...props }: FieldRowProps): JSX.Element;
|
|
3408
3471
|
/** @experimental */
|
|
3409
3472
|
interface FormSectionProps {
|
|
3410
3473
|
/** Short label above the card, rendered uppercase. */
|
|
@@ -3434,7 +3497,7 @@ export declare function FormSection({ label, description, className, children }:
|
|
|
3434
3497
|
* first as soon as either changed.
|
|
3435
3498
|
* @experimental
|
|
3436
3499
|
*/
|
|
3437
|
-
export declare function FormActions({ dirty, className, children }: FormActionsProps): JSX.Element;
|
|
3500
|
+
export declare function FormActions({ dirty, message, className, children }: FormActionsProps): JSX.Element;
|
|
3438
3501
|
/** @experimental */
|
|
3439
3502
|
interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
3440
3503
|
/**
|
|
@@ -3670,5 +3733,5 @@ interface PageFrameProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3670
3733
|
* @experimental
|
|
3671
3734
|
*/
|
|
3672
3735
|
export declare const PageFrame: ForwardRefExoticComponent<PropsWithoutRef<PageFrameProps> & RefAttributes<HTMLDivElement>>;
|
|
3673
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, type ActiveShortcut, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BleedProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerProps, type ColorSwatch, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FieldShellProps, type FieldShellRenderProps, type FieldWidth, type FilterInfo, type FormActionsProps, type FormLabelWithTooltipProps, type FormSectionProps, type GridProps, type IconFieldProps, type IconGlyphProps, type IconPickerProps, type IconSource, type IconSourceIcon, Input, type InputProps, type KeyChord, type KeySequence, Label, type ListResponse, type ModifierState, type PageFrameListenerProps, type PageFrameProps, type PageHeaderProps, type PageShellProps, type PageTabProps, type PageTabsProps, type PageType, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, type ShortcutBinding, type ShortcutLayerOptions, type ShortcutManager, type ShortcutManagerOptions, type ShortcutProviderProps, type ShortcutRegistration, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderThumbProps, type SortInfo, Spinner, type SpinnerProps, type StackProps, type StatProps, Switch, Table, TableBody, TableCaption, TableCell, type TableEmptyProps, type TableErrorProps, TableFooter, TableHead, TableHeader, type TableParams, TableRow, type TableSearchProps, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, type UseShortcutsOptions, alertVariants, badgeVariants, buttonVariants, cardVariants, dialogContentVariants, inputVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, usePortalContainer };
|
|
3736
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, type ActiveShortcut, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BleedProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerProps, type ColorSwatch, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FieldLayout, type FieldRowProps, type FieldShellProps, type FieldShellRenderProps, type FieldWidth, type FilterInfo, type FormActionsProps, type FormLabelWithTooltipProps, type FormSectionProps, type GridProps, type IconFieldProps, type IconGlyphProps, type IconPickerProps, type IconSource, type IconSourceIcon, Input, type InputProps, type KeyChord, type KeySequence, Label, type ListResponse, type ModifierState, type PageFrameListenerProps, type PageFrameProps, type PageHeaderProps, type PageShellProps, type PageTabProps, type PageTabsProps, type PageType, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, type ShortcutBinding, type ShortcutLayerOptions, type ShortcutManager, type ShortcutManagerOptions, type ShortcutProviderProps, type ShortcutRegistration, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderThumbProps, type SortInfo, Spinner, type SpinnerProps, type StackProps, type StatProps, Switch, Table, TableBody, TableCaption, TableCell, type TableEmptyProps, type TableErrorProps, TableFooter, TableHead, TableHeader, type TableParams, TableRow, type TableSearchProps, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, type UseShortcutsOptions, alertVariants, badgeVariants, buttonVariants, cardVariants, dialogContentVariants, inputVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, usePortalContainer };
|
|
3674
3737
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -311,12 +311,26 @@ interface GridProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
311
311
|
* @experimental
|
|
312
312
|
*/
|
|
313
313
|
export declare const Grid: ForwardRefExoticComponent<PropsWithoutRef<GridProps> & RefAttributes<HTMLDivElement>>;
|
|
314
|
+
/** A stat's tone: the status a dot before its value marks, as a badge's does. */
|
|
315
|
+
type StatTone = "success" | "warning" | "destructive" | "info";
|
|
314
316
|
/** @experimental */
|
|
315
317
|
interface StatProps extends HTMLAttributes<HTMLDivElement> {
|
|
316
318
|
/** Muted label above the value. */
|
|
317
319
|
label: string;
|
|
318
320
|
/** The emphasized value (string or node). */
|
|
319
321
|
value: ReactNode;
|
|
322
|
+
/**
|
|
323
|
+
* A dot before the value in a status's colour, such as `warning` beside
|
|
324
|
+
* "Should improve". It only marks the value: the value's own words say
|
|
325
|
+
* what it means, so colour is never the only sign. No dot when unset.
|
|
326
|
+
*/
|
|
327
|
+
tone?: StatTone;
|
|
328
|
+
/**
|
|
329
|
+
* `compact` draws the value smaller (20px rather than 24px), for a figure
|
|
330
|
+
* that leads a small card, with its label as the card's semibold title.
|
|
331
|
+
* Default `default`.
|
|
332
|
+
*/
|
|
333
|
+
size?: "default" | "compact";
|
|
320
334
|
}
|
|
321
335
|
/** Labelled metric block for dashboard-style plugin widgets.
|
|
322
336
|
* @experimental
|
|
@@ -3338,6 +3352,11 @@ export declare function detectApplePlatform(): boolean;
|
|
|
3338
3352
|
* @experimental
|
|
3339
3353
|
*/
|
|
3340
3354
|
type FieldWidth = "half" | "full" | "fill";
|
|
3355
|
+
/**
|
|
3356
|
+
* Where a field's label and help stand relative to its control.
|
|
3357
|
+
* @experimental
|
|
3358
|
+
*/
|
|
3359
|
+
type FieldLayout = "stacked" | "row";
|
|
3341
3360
|
/**
|
|
3342
3361
|
* The wiring `FieldShell` computes for its control: the id to attach, the
|
|
3343
3362
|
* composed `aria-describedby` (`undefined` when nothing is rendered to point
|
|
@@ -3363,8 +3382,19 @@ interface FieldShellProps {
|
|
|
3363
3382
|
description?: React.ReactNode;
|
|
3364
3383
|
/** Validation message under the control. Rendered only when present. */
|
|
3365
3384
|
error?: React.ReactNode;
|
|
3366
|
-
/**
|
|
3385
|
+
/**
|
|
3386
|
+
* Defaults to "half" in the stacked layout, where most admin inputs are
|
|
3387
|
+
* short values, and to "fill" in the row layout, whose right column is
|
|
3388
|
+
* already the control's measure.
|
|
3389
|
+
*/
|
|
3367
3390
|
width?: FieldWidth;
|
|
3391
|
+
/**
|
|
3392
|
+
* `stacked` (the default): the label above the control, the help under it.
|
|
3393
|
+
* `row`: the settings row, with the label and its help in a left column and
|
|
3394
|
+
* the control in a right one, stacking on a narrow screen. Both lay out the
|
|
3395
|
+
* same wiring; only where each part stands differs.
|
|
3396
|
+
*/
|
|
3397
|
+
layout?: FieldLayout;
|
|
3368
3398
|
htmlFor?: string;
|
|
3369
3399
|
className?: string;
|
|
3370
3400
|
/**
|
|
@@ -3400,11 +3430,44 @@ interface FormActionsProps {
|
|
|
3400
3430
|
* state that already tracks it; never computed here.
|
|
3401
3431
|
*/
|
|
3402
3432
|
dirty?: boolean;
|
|
3433
|
+
/**
|
|
3434
|
+
* What the bar says while `dirty` is true, in place of "You have unsaved
|
|
3435
|
+
* changes": a bar committing several records at once says what changed,
|
|
3436
|
+
* such as "1 page changed". Like `dirty`, the page states it from the state
|
|
3437
|
+
* that already knows; the bar never counts anything.
|
|
3438
|
+
*/
|
|
3439
|
+
message?: React.ReactNode;
|
|
3403
3440
|
className?: string;
|
|
3404
3441
|
children: React.ReactNode;
|
|
3405
3442
|
}
|
|
3406
3443
|
/** @experimental */
|
|
3407
|
-
export declare function FieldShell({ label, description, error, width, htmlFor, className, children }: FieldShellProps): JSX.Element;
|
|
3444
|
+
export declare function FieldShell({ label, description, error, width, layout, htmlFor, className, children }: FieldShellProps): JSX.Element;
|
|
3445
|
+
/** @experimental */
|
|
3446
|
+
interface FieldRowProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
3447
|
+
/**
|
|
3448
|
+
* The left column: the row's label and any help under it, already rendered.
|
|
3449
|
+
* A node rather than a string because who names the control differs by
|
|
3450
|
+
* caller — a `<label for>` for one control, a `<span>` a group points
|
|
3451
|
+
* `aria-labelledby` at for several — and that choice is the caller's.
|
|
3452
|
+
*/
|
|
3453
|
+
aside: ReactNode;
|
|
3454
|
+
/** The right column: the control, or the group of controls. */
|
|
3455
|
+
children: ReactNode;
|
|
3456
|
+
}
|
|
3457
|
+
/**
|
|
3458
|
+
* The two-column settings row: label and help on the left, the control on the
|
|
3459
|
+
* right, stacking into one column on a narrow screen.
|
|
3460
|
+
*
|
|
3461
|
+
* Geometry only. It owns the grid and nothing about naming, so the rows that
|
|
3462
|
+
* differ in how they label their control — `FieldShell`'s row layout, and the
|
|
3463
|
+
* admin's form-bound and grouped settings rows — all draw this one grid rather
|
|
3464
|
+
* than three copies of it that could drift apart.
|
|
3465
|
+
*
|
|
3466
|
+
* It applies no vertical padding: `FormSection` sets the rhythm between its
|
|
3467
|
+
* rows, and a row that padded itself as well would double it.
|
|
3468
|
+
* @experimental
|
|
3469
|
+
*/
|
|
3470
|
+
export declare function FieldRow({ aside, children, className, ...props }: FieldRowProps): JSX.Element;
|
|
3408
3471
|
/** @experimental */
|
|
3409
3472
|
interface FormSectionProps {
|
|
3410
3473
|
/** Short label above the card, rendered uppercase. */
|
|
@@ -3434,7 +3497,7 @@ export declare function FormSection({ label, description, className, children }:
|
|
|
3434
3497
|
* first as soon as either changed.
|
|
3435
3498
|
* @experimental
|
|
3436
3499
|
*/
|
|
3437
|
-
export declare function FormActions({ dirty, className, children }: FormActionsProps): JSX.Element;
|
|
3500
|
+
export declare function FormActions({ dirty, message, className, children }: FormActionsProps): JSX.Element;
|
|
3438
3501
|
/** @experimental */
|
|
3439
3502
|
interface PageShellProps extends HTMLAttributes<HTMLDivElement> {
|
|
3440
3503
|
/**
|
|
@@ -3670,5 +3733,5 @@ interface PageFrameProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
3670
3733
|
* @experimental
|
|
3671
3734
|
*/
|
|
3672
3735
|
export declare const PageFrame: ForwardRefExoticComponent<PropsWithoutRef<PageFrameProps> & RefAttributes<HTMLDivElement>>;
|
|
3673
|
-
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, type ActiveShortcut, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BleedProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerProps, type ColorSwatch, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FieldShellProps, type FieldShellRenderProps, type FieldWidth, type FilterInfo, type FormActionsProps, type FormLabelWithTooltipProps, type FormSectionProps, type GridProps, type IconFieldProps, type IconGlyphProps, type IconPickerProps, type IconSource, type IconSourceIcon, Input, type InputProps, type KeyChord, type KeySequence, Label, type ListResponse, type ModifierState, type PageFrameListenerProps, type PageFrameProps, type PageHeaderProps, type PageShellProps, type PageTabProps, type PageTabsProps, type PageType, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, type ShortcutBinding, type ShortcutLayerOptions, type ShortcutManager, type ShortcutManagerOptions, type ShortcutProviderProps, type ShortcutRegistration, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderThumbProps, type SortInfo, Spinner, type SpinnerProps, type StackProps, type StatProps, Switch, Table, TableBody, TableCaption, TableCell, type TableEmptyProps, type TableErrorProps, TableFooter, TableHead, TableHeader, type TableParams, TableRow, type TableSearchProps, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, type UseShortcutsOptions, alertVariants, badgeVariants, buttonVariants, cardVariants, dialogContentVariants, inputVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, usePortalContainer };
|
|
3736
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, type ActionCallbacks, type ActiveShortcut, Alert, AlertDescription, type AlertDescriptionProps, AlertDialog, AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogOverlay, type AlertDialogOverlayProps, AlertDialogPortal, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTitleProps, Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarImageProps, type AvatarProps, Badge, type BadgeProps, type BleedProps, Button, type ButtonProps, Card, CardAction, type CardActionProps, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardFooter, type CardFooterProps, CardHeader, type CardHeaderProps, type CardProps, CardTitle, type CardTitleProps, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, type ColorPickerProps, type ColorSwatch, Command, CommandDialog, type CommandDialogProps, CommandEmpty, type CommandEmptyProps, CommandGroup, type CommandGroupProps, CommandInput, type CommandInputProps, CommandItem, type CommandItemProps, CommandList, type CommandListProps, type CommandProps, CommandSeparator, type CommandSeparatorProps, CommandShortcut, type CommandShortcutProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type DataFetcher, Dialog, DialogClose, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogOverlay, type DialogOverlayProps, DialogPortal, DialogTitle, type DialogTitleProps, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuShortcut, type DropdownMenuShortcutProps, DropdownMenuSub, DropdownMenuSubContent, type DropdownMenuSubContentProps, DropdownMenuSubTrigger, type DropdownMenuSubTriggerProps, DropdownMenuTrigger, type FieldLayout, type FieldRowProps, type FieldShellProps, type FieldShellRenderProps, type FieldWidth, type FilterInfo, type FormActionsProps, type FormLabelWithTooltipProps, type FormSectionProps, type GridProps, type IconFieldProps, type IconGlyphProps, type IconPickerProps, type IconSource, type IconSourceIcon, Input, type InputProps, type KeyChord, type KeySequence, Label, type ListResponse, type ModifierState, type PageFrameListenerProps, type PageFrameProps, type PageHeaderProps, type PageShellProps, type PageTabProps, type PageTabsProps, type PageType, type PaginationConfig, type PaginationMeta, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, type ProgressProps, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, type SelectTriggerProps, SelectValue, Separator, Sheet, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, type SheetContentRef, SheetDescription, type SheetDescriptionProps, type SheetDescriptionRef, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetOverlay, type SheetOverlayProps, type SheetOverlayRef, SheetPortal, type SheetProps, SheetTitle, type SheetTitleProps, type SheetTitleRef, SheetTrigger, type SheetTriggerProps, type ShortcutBinding, type ShortcutLayerOptions, type ShortcutManager, type ShortcutManagerOptions, type ShortcutProviderProps, type ShortcutRegistration, Skeleton, type SkeletonProps, Slider, type SliderProps, type SliderThumbProps, type SortInfo, Spinner, type SpinnerProps, type StackProps, type StatProps, Switch, Table, TableBody, TableCaption, TableCell, type TableEmptyProps, type TableErrorProps, TableFooter, TableHead, TableHeader, type TableParams, TableRow, type TableSearchProps, type TableSkeletonProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type ToasterProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type TreeNode, TreeView, type TreeViewProps, type UseShortcutsOptions, alertVariants, badgeVariants, buttonVariants, cardVariants, dialogContentVariants, inputVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, usePortalContainer };
|
|
3674
3737
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.mjs
CHANGED
|
@@ -517,21 +517,39 @@ const Grid = forwardRef(({ cols = 2, gap = 4, responsive = false, className, chi
|
|
|
517
517
|
});
|
|
518
518
|
});
|
|
519
519
|
Grid.displayName = "Grid";
|
|
520
|
+
/** Each tone's dot, in the status's solid colour (the same as `Badge`'s). */
|
|
521
|
+
const STAT_TONE_DOT = {
|
|
522
|
+
success: "bg-success-solid",
|
|
523
|
+
warning: "bg-warning-solid",
|
|
524
|
+
destructive: "bg-danger-solid",
|
|
525
|
+
info: "bg-info-solid"
|
|
526
|
+
};
|
|
520
527
|
/** Labelled metric block for dashboard-style plugin widgets.
|
|
521
528
|
* @experimental
|
|
522
529
|
*/
|
|
523
|
-
const Stat = forwardRef(({ label, value, className, ...props }, ref) =>
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
children: [/* @__PURE__ */ jsx("span", {
|
|
528
|
-
className: "text-sm text-muted-foreground",
|
|
529
|
-
children: label
|
|
530
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
531
|
-
className: "text-2xl font-semibold text-foreground",
|
|
530
|
+
const Stat = forwardRef(({ label, value, tone, size = "default", className, ...props }, ref) => {
|
|
531
|
+
const compact = size === "compact";
|
|
532
|
+
const figure = /* @__PURE__ */ jsx("span", {
|
|
533
|
+
className: cn("font-semibold text-foreground", compact ? "text-xl" : "text-2xl"),
|
|
532
534
|
children: value
|
|
533
|
-
})
|
|
534
|
-
|
|
535
|
+
});
|
|
536
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
537
|
+
ref,
|
|
538
|
+
className: cn("flex flex-col", compact ? "gap-3" : "gap-1", className),
|
|
539
|
+
...props,
|
|
540
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
541
|
+
className: cn("text-sm text-muted-foreground", compact && "font-semibold"),
|
|
542
|
+
children: label
|
|
543
|
+
}), tone === void 0 ? figure : /* @__PURE__ */ jsxs("span", {
|
|
544
|
+
className: "flex items-center gap-2.5",
|
|
545
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
546
|
+
"aria-hidden": "true",
|
|
547
|
+
"data-stat-tone": tone,
|
|
548
|
+
className: cn("size-2.5 shrink-0 rounded-full", STAT_TONE_DOT[tone])
|
|
549
|
+
}), figure]
|
|
550
|
+
})]
|
|
551
|
+
});
|
|
552
|
+
});
|
|
535
553
|
Stat.displayName = "Stat";
|
|
536
554
|
/**
|
|
537
555
|
* Alert Component - Design System Specification
|
|
@@ -6547,6 +6565,34 @@ function useActiveShortcuts() {
|
|
|
6547
6565
|
const manager = useShortcutManager();
|
|
6548
6566
|
return React.useSyncExternalStore(manager.subscribe, manager.activeBindings, manager.activeBindings);
|
|
6549
6567
|
}
|
|
6568
|
+
// src/components/field-row.tsx
|
|
6569
|
+
/**
|
|
6570
|
+
* The two-column settings row: label and help on the left, the control on the
|
|
6571
|
+
* right, stacking into one column on a narrow screen.
|
|
6572
|
+
*
|
|
6573
|
+
* Geometry only. It owns the grid and nothing about naming, so the rows that
|
|
6574
|
+
* differ in how they label their control — `FieldShell`'s row layout, and the
|
|
6575
|
+
* admin's form-bound and grouped settings rows — all draw this one grid rather
|
|
6576
|
+
* than three copies of it that could drift apart.
|
|
6577
|
+
*
|
|
6578
|
+
* It applies no vertical padding: `FormSection` sets the rhythm between its
|
|
6579
|
+
* rows, and a row that padded itself as well would double it.
|
|
6580
|
+
* @experimental
|
|
6581
|
+
*/
|
|
6582
|
+
function FieldRow({ aside, children, className, ...props }) {
|
|
6583
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
6584
|
+
"data-slot": "field-row",
|
|
6585
|
+
className: cn("grid grid-cols-1 md:grid-cols-[2fr_3fr] gap-4 md:gap-8 items-start", className),
|
|
6586
|
+
...props,
|
|
6587
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
6588
|
+
className: "flex flex-col",
|
|
6589
|
+
children: aside
|
|
6590
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
6591
|
+
className: "w-full",
|
|
6592
|
+
children
|
|
6593
|
+
})]
|
|
6594
|
+
});
|
|
6595
|
+
}
|
|
6550
6596
|
// src/components/field-shell.tsx
|
|
6551
6597
|
/**
|
|
6552
6598
|
* The width cap applies to a wrapper around the control, not to the field row.
|
|
@@ -6612,7 +6658,7 @@ function computeControlWiring(ownProps, requestedId, renderedMessageIds, hasErro
|
|
|
6612
6658
|
};
|
|
6613
6659
|
}
|
|
6614
6660
|
/** @experimental */
|
|
6615
|
-
function FieldShell({ label, description, error, width = "
|
|
6661
|
+
function FieldShell({ label, description, error, width, layout = "stacked", htmlFor, className, children }) {
|
|
6616
6662
|
const generatedControlId = useId();
|
|
6617
6663
|
const messageBaseId = useId();
|
|
6618
6664
|
const descriptionId = `${messageBaseId}-description`;
|
|
@@ -6641,27 +6687,69 @@ function FieldShell({ label, description, error, width = "half", htmlFor, classN
|
|
|
6641
6687
|
};
|
|
6642
6688
|
control = isFragmentChild ? children : cloneElement(children, controlOverrides);
|
|
6643
6689
|
}
|
|
6690
|
+
const parts = {
|
|
6691
|
+
label,
|
|
6692
|
+
description,
|
|
6693
|
+
error,
|
|
6694
|
+
controlId: wiring.id,
|
|
6695
|
+
descriptionId,
|
|
6696
|
+
errorId,
|
|
6697
|
+
width: width ?? (layout === "row" ? "fill" : "half"),
|
|
6698
|
+
className,
|
|
6699
|
+
control
|
|
6700
|
+
};
|
|
6701
|
+
return layout === "row" ? /* @__PURE__ */ jsx(RowField, { ...parts }) : /* @__PURE__ */ jsx(StackedField, { ...parts });
|
|
6702
|
+
}
|
|
6703
|
+
/**
|
|
6704
|
+
* The settings row: the label and its help on the left, the control and any
|
|
6705
|
+
* error under it on the right. The grid itself is `FieldRow`'s, so this row and
|
|
6706
|
+
* the admin's own settings rows cannot disagree about it.
|
|
6707
|
+
*/
|
|
6708
|
+
function RowField(parts) {
|
|
6709
|
+
return /* @__PURE__ */ jsxs(FieldRow, {
|
|
6710
|
+
className: parts.className,
|
|
6711
|
+
aside: /* @__PURE__ */ jsxs(Fragment$1, { children: [parts.label ? /* @__PURE__ */ jsx("label", {
|
|
6712
|
+
htmlFor: parts.controlId,
|
|
6713
|
+
className: "cursor-pointer text-sm font-semibold text-foreground",
|
|
6714
|
+
children: parts.label
|
|
6715
|
+
}) : null, parts.description ? /* @__PURE__ */ jsx("p", {
|
|
6716
|
+
id: parts.descriptionId,
|
|
6717
|
+
className: "mt-0.5 text-xs leading-relaxed text-muted-foreground",
|
|
6718
|
+
children: parts.description
|
|
6719
|
+
}) : null] }),
|
|
6720
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
6721
|
+
className: controlWidth({ width: parts.width }),
|
|
6722
|
+
children: parts.control
|
|
6723
|
+
}), parts.error ? /* @__PURE__ */ jsx("p", {
|
|
6724
|
+
id: parts.errorId,
|
|
6725
|
+
className: "mt-1.5 text-sm font-medium text-destructive",
|
|
6726
|
+
children: parts.error
|
|
6727
|
+
}) : null]
|
|
6728
|
+
});
|
|
6729
|
+
}
|
|
6730
|
+
/** The stacked field: the label, then the control, its help and any error. */
|
|
6731
|
+
function StackedField(parts) {
|
|
6644
6732
|
return /* @__PURE__ */ jsxs("div", {
|
|
6645
|
-
className: cn("flex flex-col gap-1.5", className),
|
|
6733
|
+
className: cn("flex flex-col gap-1.5", parts.className),
|
|
6646
6734
|
children: [
|
|
6647
|
-
label ? /* @__PURE__ */ jsx("label", {
|
|
6648
|
-
htmlFor:
|
|
6735
|
+
parts.label ? /* @__PURE__ */ jsx("label", {
|
|
6736
|
+
htmlFor: parts.controlId,
|
|
6649
6737
|
className: "text-sm font-medium text-foreground",
|
|
6650
|
-
children: label
|
|
6738
|
+
children: parts.label
|
|
6651
6739
|
}) : null,
|
|
6652
6740
|
/* @__PURE__ */ jsx("div", {
|
|
6653
|
-
className: controlWidth({ width }),
|
|
6654
|
-
children: control
|
|
6741
|
+
className: controlWidth({ width: parts.width }),
|
|
6742
|
+
children: parts.control
|
|
6655
6743
|
}),
|
|
6656
|
-
description ? /* @__PURE__ */ jsx("p", {
|
|
6657
|
-
id: descriptionId,
|
|
6744
|
+
parts.description ? /* @__PURE__ */ jsx("p", {
|
|
6745
|
+
id: parts.descriptionId,
|
|
6658
6746
|
className: "text-sm text-muted-foreground",
|
|
6659
|
-
children: description
|
|
6747
|
+
children: parts.description
|
|
6660
6748
|
}) : null,
|
|
6661
|
-
error ? /* @__PURE__ */ jsx("p", {
|
|
6662
|
-
id: errorId,
|
|
6749
|
+
parts.error ? /* @__PURE__ */ jsx("p", {
|
|
6750
|
+
id: parts.errorId,
|
|
6663
6751
|
className: "text-sm font-medium text-destructive",
|
|
6664
|
-
children: error
|
|
6752
|
+
children: parts.error
|
|
6665
6753
|
}) : null
|
|
6666
6754
|
]
|
|
6667
6755
|
});
|
|
@@ -6711,13 +6799,13 @@ function FormSection({ label, description, className, children }) {
|
|
|
6711
6799
|
* first as soon as either changed.
|
|
6712
6800
|
* @experimental
|
|
6713
6801
|
*/
|
|
6714
|
-
function FormActions({ dirty, className, children }) {
|
|
6802
|
+
function FormActions({ dirty, message = "You have unsaved changes", className, children }) {
|
|
6715
6803
|
return /* @__PURE__ */ jsxs("div", {
|
|
6716
6804
|
className: cn("sticky bottom-0 mt-8 flex items-center justify-end gap-3", "border-t border-border bg-background/95 py-4 backdrop-blur", className),
|
|
6717
6805
|
children: [dirty ? /* @__PURE__ */ jsx("span", {
|
|
6718
6806
|
role: "status",
|
|
6719
6807
|
className: "mr-auto text-sm text-muted-foreground",
|
|
6720
|
-
children:
|
|
6808
|
+
children: message
|
|
6721
6809
|
}) : null, children]
|
|
6722
6810
|
});
|
|
6723
6811
|
}
|
|
@@ -6973,14 +7061,33 @@ PageHeader.displayName = "PageHeader";
|
|
|
6973
7061
|
* `PageTab`.
|
|
6974
7062
|
* @experimental
|
|
6975
7063
|
*/
|
|
6976
|
-
const PageTabs = forwardRef(({ label, className, children, ...props }, ref) =>
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
})
|
|
7064
|
+
const PageTabs = forwardRef(({ label, className, children, ...props }, ref) => {
|
|
7065
|
+
const row = useRef(null);
|
|
7066
|
+
const shown = useRef(null);
|
|
7067
|
+
const setRow = useCallback((node) => {
|
|
7068
|
+
row.current = node;
|
|
7069
|
+
if (typeof ref === "function") return ref(node);
|
|
7070
|
+
if (ref) ref.current = node;
|
|
7071
|
+
}, [ref]);
|
|
7072
|
+
useEffect(() => {
|
|
7073
|
+
const nav = row.current;
|
|
7074
|
+
const current = nav?.querySelector("[aria-current=\"page\"]") ?? null;
|
|
7075
|
+
if (nav === null || current === null || current === shown.current) return;
|
|
7076
|
+
shown.current = current;
|
|
7077
|
+
const bounds = nav.getBoundingClientRect();
|
|
7078
|
+
const tab = current.getBoundingClientRect();
|
|
7079
|
+
if (tab.left < bounds.left) nav.scrollLeft -= bounds.left - tab.left;
|
|
7080
|
+
else if (tab.right > bounds.right) nav.scrollLeft += tab.right - bounds.right;
|
|
7081
|
+
});
|
|
7082
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
7083
|
+
ref: setRow,
|
|
7084
|
+
"aria-label": label,
|
|
7085
|
+
"data-slot": "page-tabs",
|
|
7086
|
+
className: cn("flex gap-1 overflow-x-auto border-b border-border", className),
|
|
7087
|
+
...props,
|
|
7088
|
+
children
|
|
7089
|
+
});
|
|
7090
|
+
});
|
|
6984
7091
|
PageTabs.displayName = "PageTabs";
|
|
6985
7092
|
/**
|
|
6986
7093
|
* One section of a `PageTabs` row: a link, underlined when current.
|
|
@@ -7071,6 +7178,6 @@ const PageFrame = forwardRef(({ type, className, children: content, ...props },
|
|
|
7071
7178
|
});
|
|
7072
7179
|
});
|
|
7073
7180
|
PageFrame.displayName = "PageFrame";
|
|
7074
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Bleed, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FieldShell, FormActions, FormLabelWithTooltip, FormSection, Grid, IconField, IconGlyph, IconPicker, Input, Label, PageFrame, PageFrameListener, PageHeader, PageShell, PageTab, PageTabs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SHELL_MEASURE, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortcutProvider, ShortcutScope, Skeleton, Slider, Spinner, Stack, Stat, Switch, TREE_INDENT_PX, Table, TableBody, TableCaption, TableCell, TableEmpty, TableError, TableFooter, TableHead, TableHeader, TableLoading, TableRow, TableSearch, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeView, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, chordMatches, commandDefaultFilter, createShortcutManager, detectApplePlatform, dialogContentVariants, inputVariants, parseKeys, progressVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, useActiveShortcuts, useCommandHighlight, useIsomorphicLayoutEffect, usePortalContainer, useShortcutManager, useShortcuts };
|
|
7181
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, Avatar, AvatarFallback, AvatarImage, Badge, Bleed, Button, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, ColorPicker, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, FieldRow, FieldShell, FormActions, FormLabelWithTooltip, FormSection, Grid, IconField, IconGlyph, IconPicker, Input, Label, PageFrame, PageFrameListener, PageHeader, PageShell, PageTab, PageTabs, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PortalProvider, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, SHELL_MEASURE, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, ShortcutProvider, ShortcutScope, Skeleton, Slider, Spinner, Stack, Stat, Switch, TREE_INDENT_PX, Table, TableBody, TableCaption, TableCell, TableEmpty, TableError, TableFooter, TableHead, TableHeader, TableLoading, TableRow, TableSearch, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TreeView, alertVariants, avatarVariants, badgeVariants, buttonVariants, cardVariants, chordMatches, commandDefaultFilter, createShortcutManager, detectApplePlatform, dialogContentVariants, inputVariants, parseKeys, progressVariants, selectTriggerVariants, sheetVariants, spinnerVariants, toast, useActiveShortcuts, useCommandHighlight, useIsomorphicLayoutEffect, usePortalContainer, useShortcutManager, useShortcuts };
|
|
7075
7182
|
|
|
7076
7183
|
//# sourceMappingURL=index.mjs.map
|