@partrunner-ai/ui 2.0.0 → 2.1.0
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 +169 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +120 -1
- package/dist/index.d.ts +120 -1
- package/dist/index.js +166 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/styles/light.css +433 -0
- package/styles/theme.css +433 -0
- package/styles/ui.css +433 -0
package/dist/index.d.cts
CHANGED
|
@@ -1539,6 +1539,125 @@ interface TooltipProps {
|
|
|
1539
1539
|
*/
|
|
1540
1540
|
declare function Tooltip({ content, children, delay, align, disabled, className, }: TooltipProps): react.JSX.Element;
|
|
1541
1541
|
|
|
1542
|
+
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1543
|
+
/** Small uppercase label rendered above the title, in a soft chip. */
|
|
1544
|
+
eyebrow?: ReactNode;
|
|
1545
|
+
/** The page title. Rendered as an `<h1>` with display tracking. */
|
|
1546
|
+
title: ReactNode;
|
|
1547
|
+
/** Muted line rendered under the title. */
|
|
1548
|
+
subtitle?: ReactNode;
|
|
1549
|
+
/** Action area aligned to the end edge (buttons, filters, etc). */
|
|
1550
|
+
actions?: ReactNode;
|
|
1551
|
+
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Standard page header: eyebrow chip, display-tracked title, optional
|
|
1554
|
+
* subtitle and an end-aligned action row. Stacks on small screens and
|
|
1555
|
+
* spreads title/actions on `640px` and wider.
|
|
1556
|
+
*
|
|
1557
|
+
* Both consuming apps carried near-identical copies of this component
|
|
1558
|
+
* (nexus-portal `design-system/components`, sube-tu-factura
|
|
1559
|
+
* `src/components/ui`); this is the package-owned version with the audited
|
|
1560
|
+
* token colours — text colours come from `--pr-fg`/`--pr-fg-muted` rather
|
|
1561
|
+
* than fixed brand greys, so the header stays legible on any themed surface.
|
|
1562
|
+
*/
|
|
1563
|
+
declare const PageHeader: react.ForwardRefExoticComponent<PageHeaderProps & react.RefAttributes<HTMLElement>>;
|
|
1564
|
+
|
|
1565
|
+
type StatTone = 'yellow' | 'amber' | 'blue' | 'purple' | 'green' | 'rose' | 'neutral';
|
|
1566
|
+
interface StatTileProps extends HTMLAttributes<HTMLDivElement> {
|
|
1567
|
+
/** Small uppercase label above the value. */
|
|
1568
|
+
label: ReactNode;
|
|
1569
|
+
/** The metric itself. Rendered display-tracked and large. */
|
|
1570
|
+
value: ReactNode;
|
|
1571
|
+
/** Muted line under the value. */
|
|
1572
|
+
hint?: ReactNode;
|
|
1573
|
+
/** Optional lucide icon in a tone-matched chip. */
|
|
1574
|
+
icon?: LucideIcon;
|
|
1575
|
+
/** Tone palette for the card wash and the icon chip. */
|
|
1576
|
+
tone?: StatTone;
|
|
1577
|
+
/**
|
|
1578
|
+
* Trend percentage, already rounded. `null`/`undefined` hides the chip.
|
|
1579
|
+
* Positive renders green with a leading `+`, negative renders rose.
|
|
1580
|
+
*/
|
|
1581
|
+
trendValue?: number | null;
|
|
1582
|
+
/** Footer area for secondary metrics, right-aligned and truncated. */
|
|
1583
|
+
footer?: ReactNode;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Compact stat tile — the standard KPI block for dashboards.
|
|
1587
|
+
*
|
|
1588
|
+
* Colours ride the shared `--pr-tone-*` pairs, so a toned tile, the chip
|
|
1589
|
+
* inside it and a Badge with the same tone all land on the same colour in
|
|
1590
|
+
* both themes. The tone wash is a mix of the tone into the current surface,
|
|
1591
|
+
* which keeps the tile on the semantic surface instead of a fixed white.
|
|
1592
|
+
*
|
|
1593
|
+
* The trend chip is the one deliberate exception: its 11px text needs AA,
|
|
1594
|
+
* and the light-theme tone foregrounds sit around 3.3:1. It keeps an opaque
|
|
1595
|
+
* emerald/rose pair in light theme and switches to the tone tokens under
|
|
1596
|
+
* `.dark`, where the surrounding card darkens with the theme.
|
|
1597
|
+
*/
|
|
1598
|
+
declare const StatTile: react.ForwardRefExoticComponent<StatTileProps & react.RefAttributes<HTMLDivElement>>;
|
|
1599
|
+
|
|
1600
|
+
type ToolbarProps = HTMLAttributes<HTMLDivElement>;
|
|
1601
|
+
/**
|
|
1602
|
+
* Sticky-friendly filter/toolbar surface: a translucent glass bar with a
|
|
1603
|
+
* soft border that separates from the page background without weight.
|
|
1604
|
+
* Wrap inputs, selects, and buttons in it; it wraps them onto multiple
|
|
1605
|
+
* rows when narrow.
|
|
1606
|
+
*/
|
|
1607
|
+
declare const Toolbar: react.ForwardRefExoticComponent<ToolbarProps & react.RefAttributes<HTMLDivElement>>;
|
|
1608
|
+
|
|
1609
|
+
type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
1610
|
+
type IconButtonVariant = 'default' | 'primary' | 'danger' | 'ghost' | 'subtle';
|
|
1611
|
+
interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
1612
|
+
/** Accessible name. Also becomes the tooltip title unless one is passed. */
|
|
1613
|
+
label: string;
|
|
1614
|
+
/** The icon itself, or any small node rendered inside the button. */
|
|
1615
|
+
icon: ReactNode;
|
|
1616
|
+
size?: IconButtonSize;
|
|
1617
|
+
variant?: IconButtonVariant;
|
|
1618
|
+
/**
|
|
1619
|
+
* Keeps a visually compact hit area on desktop-only contexts. The touch
|
|
1620
|
+
* target stays at or above 44x44 on coarse pointers via padding.
|
|
1621
|
+
*/
|
|
1622
|
+
compact?: boolean;
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* Accessible icon-only button.
|
|
1626
|
+
*
|
|
1627
|
+
* Guarantees a WCAG-compliant touch target (at least 44x44 on small screens
|
|
1628
|
+
* for every size, and on all screens unless `compact` is set), wires
|
|
1629
|
+
* `aria-label`/`title` from `label`, and defaults `type="button"` so a
|
|
1630
|
+
* stray icon button cannot submit a form.
|
|
1631
|
+
*/
|
|
1632
|
+
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1633
|
+
|
|
1634
|
+
interface ConfirmDialogProps {
|
|
1635
|
+
open: boolean;
|
|
1636
|
+
/** Called with `false` on cancel and on dismiss. The confirm path calls `onConfirm` instead. */
|
|
1637
|
+
onOpenChange: (open: boolean) => void;
|
|
1638
|
+
title: ReactNode;
|
|
1639
|
+
description?: ReactNode;
|
|
1640
|
+
confirmLabel?: ReactNode;
|
|
1641
|
+
cancelLabel?: ReactNode;
|
|
1642
|
+
onConfirm: () => void;
|
|
1643
|
+
/** Spins the confirm button and blocks both actions. */
|
|
1644
|
+
loading?: boolean;
|
|
1645
|
+
/** Red confirm button and a stricter dialog: Escape/backdrop no longer dismiss it. */
|
|
1646
|
+
destructive?: boolean;
|
|
1647
|
+
/** Optional icon rendered in a tone-matched chip above the body. */
|
|
1648
|
+
icon?: LucideIcon;
|
|
1649
|
+
size?: DialogSize;
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Standard confirmation dialog: title, optional description and icon, and a
|
|
1653
|
+
* cancel/confirm footer. A thin composition over `Dialog` and `Button` that
|
|
1654
|
+
* fixes the choices the apps used to make independently — Spanish labels as
|
|
1655
|
+
* defaults (override with props), `loading` blocking both actions, and
|
|
1656
|
+
* `destructive` turning the confirm red and making the dialog
|
|
1657
|
+
* non-dismissible.
|
|
1658
|
+
*/
|
|
1659
|
+
declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, loading, destructive, icon: Icon, size, }: ConfirmDialogProps): react.JSX.Element;
|
|
1660
|
+
|
|
1542
1661
|
interface MenuPosition {
|
|
1543
1662
|
maxHeight: number;
|
|
1544
1663
|
top?: number;
|
|
@@ -1598,4 +1717,4 @@ declare function useAnchoredMenu<T extends HTMLElement>(options?: AnchoredMenuOp
|
|
|
1598
1717
|
/** Turns a computed position into inline styles for the fixed container. */
|
|
1599
1718
|
declare function menuStyle(pos: MenuPosition | null): CSSProperties;
|
|
1600
1719
|
|
|
1601
|
-
export { AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogMedia, type AlertDialogMediaProps, AlertDialogRoot, type AlertDialogRootProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, AmbientBackground, type AmbientBackgroundProps, type AmbientBackgroundVariant, type AnchoredMenuOptions, Badge, type BadgeProps, type BadgeSize, type BadgeTone, Button, type ButtonIcon, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarDate, type CalendarDisabledDates, type CalendarProps, type CalendarRange, type CalendarRangeProps, type CalendarSharedProps, type CalendarSingleProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, CardTitle, type CardTitleProps, type CardTone, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ChoiceGroupOrientation, type ChoiceOption, Combobox, type ComboboxOption, type ComboboxProps, CopyField, type CopyFieldProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogLayer, type DialogLayerAutoFocusEvent, type DialogLayerProps, type DialogPrimitiveSize, type DialogProps, DialogRoot, type DialogRootProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, type DropdownMenuAlign, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, FileDropzone, type FileDropzoneProps, type FileDropzoneSelectionSource, FormField, type FormFieldProps, Input, type InputProps, type InputSize, Label, type LabelProps, type MenuPosition, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiSelectVariant, type NavigationTabItem, NavigationTabs, type NavigationTabsLinkComponent, type NavigationTabsLinkProps, type NavigationTabsProps, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, type PaginationSummary, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverHeader, type PopoverHeaderProps, type PopoverPadding, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressDots, type ProgressDotsProps, ProgressRing, type ProgressRingProps, RadioGroup, type RadioGroupProps, RichSelect, RichSelectContent, type RichSelectContentProps, RichSelectEmpty, type RichSelectEmptyProps, RichSelectGroup, type RichSelectGroupProps, RichSelectItem, type RichSelectItemProps, RichSelectLabel, type RichSelectLabelProps, type RichSelectProps, RichSelectSearch, type RichSelectSearchProps, RichSelectSeparator, type RichSelectSeparatorProps, type RichSelectSize, RichSelectTrigger, type RichSelectTriggerProps, RichSelectValue, type RichSelectValueProps, Select, type SelectOption, type SelectProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetRoot, type SheetRootProps, type SheetSide, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, type SheetWidth, Skeleton, type SkeletonProps, type SkeletonShape, Slot, type SlotAllProps, type SlotProps, Spinner, type SpinnerProps, type SpinnerSize, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, type TableColumn, type TableDensity, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, type TableRootProps, TableRow, type TableRowProps, Tabs, type TabsActivationMode, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsListVariant, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type TextareaSize, Tooltip, type TooltipProps, ValidationSummary, type ValidationSummaryError, type ValidationSummaryProps, formatCalendarDate, isCalendarDate, menuStyle, parseCalendarDate, registerDialogLayerPortal, resolveActiveNavigationHref, serializeCalendarDate, useAnchoredMenu };
|
|
1720
|
+
export { AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogMedia, type AlertDialogMediaProps, AlertDialogRoot, type AlertDialogRootProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, AmbientBackground, type AmbientBackgroundProps, type AmbientBackgroundVariant, type AnchoredMenuOptions, Badge, type BadgeProps, type BadgeSize, type BadgeTone, Button, type ButtonIcon, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarDate, type CalendarDisabledDates, type CalendarProps, type CalendarRange, type CalendarRangeProps, type CalendarSharedProps, type CalendarSingleProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, CardTitle, type CardTitleProps, type CardTone, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ChoiceGroupOrientation, type ChoiceOption, Combobox, type ComboboxOption, type ComboboxProps, ConfirmDialog, type ConfirmDialogProps, CopyField, type CopyFieldProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogLayer, type DialogLayerAutoFocusEvent, type DialogLayerProps, type DialogPrimitiveSize, type DialogProps, DialogRoot, type DialogRootProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, type DropdownMenuAlign, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, FileDropzone, type FileDropzoneProps, type FileDropzoneSelectionSource, FormField, type FormFieldProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Input, type InputProps, type InputSize, Label, type LabelProps, type MenuPosition, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiSelectVariant, type NavigationTabItem, NavigationTabs, type NavigationTabsLinkComponent, type NavigationTabsLinkProps, type NavigationTabsProps, OtpInput, type OtpInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationLabels, type PaginationProps, type PaginationSummary, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverHeader, type PopoverHeaderProps, type PopoverPadding, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressDots, type ProgressDotsProps, ProgressRing, type ProgressRingProps, RadioGroup, type RadioGroupProps, RichSelect, RichSelectContent, type RichSelectContentProps, RichSelectEmpty, type RichSelectEmptyProps, RichSelectGroup, type RichSelectGroupProps, RichSelectItem, type RichSelectItemProps, RichSelectLabel, type RichSelectLabelProps, type RichSelectProps, RichSelectSearch, type RichSelectSearchProps, RichSelectSeparator, type RichSelectSeparatorProps, type RichSelectSize, RichSelectTrigger, type RichSelectTriggerProps, RichSelectValue, type RichSelectValueProps, Select, type SelectOption, type SelectProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetRoot, type SheetRootProps, type SheetSide, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, type SheetWidth, Skeleton, type SkeletonProps, type SkeletonShape, Slot, type SlotAllProps, type SlotProps, Spinner, type SpinnerProps, type SpinnerSize, StatTile, type StatTileProps, type StatTone, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, type TableColumn, type TableDensity, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, type TableRootProps, TableRow, type TableRowProps, Tabs, type TabsActivationMode, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsListVariant, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type TextareaSize, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, ValidationSummary, type ValidationSummaryError, type ValidationSummaryProps, formatCalendarDate, isCalendarDate, menuStyle, parseCalendarDate, registerDialogLayerPortal, resolveActiveNavigationHref, serializeCalendarDate, useAnchoredMenu };
|
package/dist/index.d.ts
CHANGED
|
@@ -1539,6 +1539,125 @@ interface TooltipProps {
|
|
|
1539
1539
|
*/
|
|
1540
1540
|
declare function Tooltip({ content, children, delay, align, disabled, className, }: TooltipProps): react.JSX.Element;
|
|
1541
1541
|
|
|
1542
|
+
interface PageHeaderProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
1543
|
+
/** Small uppercase label rendered above the title, in a soft chip. */
|
|
1544
|
+
eyebrow?: ReactNode;
|
|
1545
|
+
/** The page title. Rendered as an `<h1>` with display tracking. */
|
|
1546
|
+
title: ReactNode;
|
|
1547
|
+
/** Muted line rendered under the title. */
|
|
1548
|
+
subtitle?: ReactNode;
|
|
1549
|
+
/** Action area aligned to the end edge (buttons, filters, etc). */
|
|
1550
|
+
actions?: ReactNode;
|
|
1551
|
+
}
|
|
1552
|
+
/**
|
|
1553
|
+
* Standard page header: eyebrow chip, display-tracked title, optional
|
|
1554
|
+
* subtitle and an end-aligned action row. Stacks on small screens and
|
|
1555
|
+
* spreads title/actions on `640px` and wider.
|
|
1556
|
+
*
|
|
1557
|
+
* Both consuming apps carried near-identical copies of this component
|
|
1558
|
+
* (nexus-portal `design-system/components`, sube-tu-factura
|
|
1559
|
+
* `src/components/ui`); this is the package-owned version with the audited
|
|
1560
|
+
* token colours — text colours come from `--pr-fg`/`--pr-fg-muted` rather
|
|
1561
|
+
* than fixed brand greys, so the header stays legible on any themed surface.
|
|
1562
|
+
*/
|
|
1563
|
+
declare const PageHeader: react.ForwardRefExoticComponent<PageHeaderProps & react.RefAttributes<HTMLElement>>;
|
|
1564
|
+
|
|
1565
|
+
type StatTone = 'yellow' | 'amber' | 'blue' | 'purple' | 'green' | 'rose' | 'neutral';
|
|
1566
|
+
interface StatTileProps extends HTMLAttributes<HTMLDivElement> {
|
|
1567
|
+
/** Small uppercase label above the value. */
|
|
1568
|
+
label: ReactNode;
|
|
1569
|
+
/** The metric itself. Rendered display-tracked and large. */
|
|
1570
|
+
value: ReactNode;
|
|
1571
|
+
/** Muted line under the value. */
|
|
1572
|
+
hint?: ReactNode;
|
|
1573
|
+
/** Optional lucide icon in a tone-matched chip. */
|
|
1574
|
+
icon?: LucideIcon;
|
|
1575
|
+
/** Tone palette for the card wash and the icon chip. */
|
|
1576
|
+
tone?: StatTone;
|
|
1577
|
+
/**
|
|
1578
|
+
* Trend percentage, already rounded. `null`/`undefined` hides the chip.
|
|
1579
|
+
* Positive renders green with a leading `+`, negative renders rose.
|
|
1580
|
+
*/
|
|
1581
|
+
trendValue?: number | null;
|
|
1582
|
+
/** Footer area for secondary metrics, right-aligned and truncated. */
|
|
1583
|
+
footer?: ReactNode;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Compact stat tile — the standard KPI block for dashboards.
|
|
1587
|
+
*
|
|
1588
|
+
* Colours ride the shared `--pr-tone-*` pairs, so a toned tile, the chip
|
|
1589
|
+
* inside it and a Badge with the same tone all land on the same colour in
|
|
1590
|
+
* both themes. The tone wash is a mix of the tone into the current surface,
|
|
1591
|
+
* which keeps the tile on the semantic surface instead of a fixed white.
|
|
1592
|
+
*
|
|
1593
|
+
* The trend chip is the one deliberate exception: its 11px text needs AA,
|
|
1594
|
+
* and the light-theme tone foregrounds sit around 3.3:1. It keeps an opaque
|
|
1595
|
+
* emerald/rose pair in light theme and switches to the tone tokens under
|
|
1596
|
+
* `.dark`, where the surrounding card darkens with the theme.
|
|
1597
|
+
*/
|
|
1598
|
+
declare const StatTile: react.ForwardRefExoticComponent<StatTileProps & react.RefAttributes<HTMLDivElement>>;
|
|
1599
|
+
|
|
1600
|
+
type ToolbarProps = HTMLAttributes<HTMLDivElement>;
|
|
1601
|
+
/**
|
|
1602
|
+
* Sticky-friendly filter/toolbar surface: a translucent glass bar with a
|
|
1603
|
+
* soft border that separates from the page background without weight.
|
|
1604
|
+
* Wrap inputs, selects, and buttons in it; it wraps them onto multiple
|
|
1605
|
+
* rows when narrow.
|
|
1606
|
+
*/
|
|
1607
|
+
declare const Toolbar: react.ForwardRefExoticComponent<ToolbarProps & react.RefAttributes<HTMLDivElement>>;
|
|
1608
|
+
|
|
1609
|
+
type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
1610
|
+
type IconButtonVariant = 'default' | 'primary' | 'danger' | 'ghost' | 'subtle';
|
|
1611
|
+
interface IconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
1612
|
+
/** Accessible name. Also becomes the tooltip title unless one is passed. */
|
|
1613
|
+
label: string;
|
|
1614
|
+
/** The icon itself, or any small node rendered inside the button. */
|
|
1615
|
+
icon: ReactNode;
|
|
1616
|
+
size?: IconButtonSize;
|
|
1617
|
+
variant?: IconButtonVariant;
|
|
1618
|
+
/**
|
|
1619
|
+
* Keeps a visually compact hit area on desktop-only contexts. The touch
|
|
1620
|
+
* target stays at or above 44x44 on coarse pointers via padding.
|
|
1621
|
+
*/
|
|
1622
|
+
compact?: boolean;
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* Accessible icon-only button.
|
|
1626
|
+
*
|
|
1627
|
+
* Guarantees a WCAG-compliant touch target (at least 44x44 on small screens
|
|
1628
|
+
* for every size, and on all screens unless `compact` is set), wires
|
|
1629
|
+
* `aria-label`/`title` from `label`, and defaults `type="button"` so a
|
|
1630
|
+
* stray icon button cannot submit a form.
|
|
1631
|
+
*/
|
|
1632
|
+
declare const IconButton: react.ForwardRefExoticComponent<IconButtonProps & react.RefAttributes<HTMLButtonElement>>;
|
|
1633
|
+
|
|
1634
|
+
interface ConfirmDialogProps {
|
|
1635
|
+
open: boolean;
|
|
1636
|
+
/** Called with `false` on cancel and on dismiss. The confirm path calls `onConfirm` instead. */
|
|
1637
|
+
onOpenChange: (open: boolean) => void;
|
|
1638
|
+
title: ReactNode;
|
|
1639
|
+
description?: ReactNode;
|
|
1640
|
+
confirmLabel?: ReactNode;
|
|
1641
|
+
cancelLabel?: ReactNode;
|
|
1642
|
+
onConfirm: () => void;
|
|
1643
|
+
/** Spins the confirm button and blocks both actions. */
|
|
1644
|
+
loading?: boolean;
|
|
1645
|
+
/** Red confirm button and a stricter dialog: Escape/backdrop no longer dismiss it. */
|
|
1646
|
+
destructive?: boolean;
|
|
1647
|
+
/** Optional icon rendered in a tone-matched chip above the body. */
|
|
1648
|
+
icon?: LucideIcon;
|
|
1649
|
+
size?: DialogSize;
|
|
1650
|
+
}
|
|
1651
|
+
/**
|
|
1652
|
+
* Standard confirmation dialog: title, optional description and icon, and a
|
|
1653
|
+
* cancel/confirm footer. A thin composition over `Dialog` and `Button` that
|
|
1654
|
+
* fixes the choices the apps used to make independently — Spanish labels as
|
|
1655
|
+
* defaults (override with props), `loading` blocking both actions, and
|
|
1656
|
+
* `destructive` turning the confirm red and making the dialog
|
|
1657
|
+
* non-dismissible.
|
|
1658
|
+
*/
|
|
1659
|
+
declare function ConfirmDialog({ open, onOpenChange, title, description, confirmLabel, cancelLabel, onConfirm, loading, destructive, icon: Icon, size, }: ConfirmDialogProps): react.JSX.Element;
|
|
1660
|
+
|
|
1542
1661
|
interface MenuPosition {
|
|
1543
1662
|
maxHeight: number;
|
|
1544
1663
|
top?: number;
|
|
@@ -1598,4 +1717,4 @@ declare function useAnchoredMenu<T extends HTMLElement>(options?: AnchoredMenuOp
|
|
|
1598
1717
|
/** Turns a computed position into inline styles for the fixed container. */
|
|
1599
1718
|
declare function menuStyle(pos: MenuPosition | null): CSSProperties;
|
|
1600
1719
|
|
|
1601
|
-
export { AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogMedia, type AlertDialogMediaProps, AlertDialogRoot, type AlertDialogRootProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, AmbientBackground, type AmbientBackgroundProps, type AmbientBackgroundVariant, type AnchoredMenuOptions, Badge, type BadgeProps, type BadgeSize, type BadgeTone, Button, type ButtonIcon, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarDate, type CalendarDisabledDates, type CalendarProps, type CalendarRange, type CalendarRangeProps, type CalendarSharedProps, type CalendarSingleProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, CardTitle, type CardTitleProps, type CardTone, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ChoiceGroupOrientation, type ChoiceOption, Combobox, type ComboboxOption, type ComboboxProps, CopyField, type CopyFieldProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogLayer, type DialogLayerAutoFocusEvent, type DialogLayerProps, type DialogPrimitiveSize, type DialogProps, DialogRoot, type DialogRootProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, type DropdownMenuAlign, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, FileDropzone, type FileDropzoneProps, type FileDropzoneSelectionSource, FormField, type FormFieldProps, Input, type InputProps, type InputSize, Label, type LabelProps, type MenuPosition, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiSelectVariant, type NavigationTabItem, NavigationTabs, type NavigationTabsLinkComponent, type NavigationTabsLinkProps, type NavigationTabsProps, OtpInput, type OtpInputProps, Pagination, type PaginationLabels, type PaginationProps, type PaginationSummary, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverHeader, type PopoverHeaderProps, type PopoverPadding, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressDots, type ProgressDotsProps, ProgressRing, type ProgressRingProps, RadioGroup, type RadioGroupProps, RichSelect, RichSelectContent, type RichSelectContentProps, RichSelectEmpty, type RichSelectEmptyProps, RichSelectGroup, type RichSelectGroupProps, RichSelectItem, type RichSelectItemProps, RichSelectLabel, type RichSelectLabelProps, type RichSelectProps, RichSelectSearch, type RichSelectSearchProps, RichSelectSeparator, type RichSelectSeparatorProps, type RichSelectSize, RichSelectTrigger, type RichSelectTriggerProps, RichSelectValue, type RichSelectValueProps, Select, type SelectOption, type SelectProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetRoot, type SheetRootProps, type SheetSide, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, type SheetWidth, Skeleton, type SkeletonProps, type SkeletonShape, Slot, type SlotAllProps, type SlotProps, Spinner, type SpinnerProps, type SpinnerSize, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, type TableColumn, type TableDensity, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, type TableRootProps, TableRow, type TableRowProps, Tabs, type TabsActivationMode, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsListVariant, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type TextareaSize, Tooltip, type TooltipProps, ValidationSummary, type ValidationSummaryError, type ValidationSummaryProps, formatCalendarDate, isCalendarDate, menuStyle, parseCalendarDate, registerDialogLayerPortal, resolveActiveNavigationHref, serializeCalendarDate, useAnchoredMenu };
|
|
1720
|
+
export { AlertDialogAction, type AlertDialogActionProps, AlertDialogCancel, type AlertDialogCancelProps, AlertDialogContent, type AlertDialogContentProps, AlertDialogDescription, type AlertDialogDescriptionProps, AlertDialogFooter, type AlertDialogFooterProps, AlertDialogHeader, type AlertDialogHeaderProps, AlertDialogMedia, type AlertDialogMediaProps, AlertDialogRoot, type AlertDialogRootProps, AlertDialogTitle, type AlertDialogTitleProps, AlertDialogTrigger, type AlertDialogTriggerProps, AmbientBackground, type AmbientBackgroundProps, type AmbientBackgroundVariant, type AnchoredMenuOptions, Badge, type BadgeProps, type BadgeSize, type BadgeTone, Button, type ButtonIcon, type ButtonProps, type ButtonSize, type ButtonVariant, Calendar, type CalendarDate, type CalendarDisabledDates, type CalendarProps, type CalendarRange, type CalendarRangeProps, type CalendarSharedProps, type CalendarSingleProps, Card, CardContent, type CardContentProps, CardDescription, type CardDescriptionProps, CardHeader, type CardHeaderProps, type CardPadding, type CardProps, CardTitle, type CardTitleProps, type CardTone, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, type ChoiceGroupOrientation, type ChoiceOption, Combobox, type ComboboxOption, type ComboboxProps, ConfirmDialog, type ConfirmDialogProps, CopyField, type CopyFieldProps, DataTable, type DataTableProps, DatePicker, type DatePickerProps, type DatePickerRangeProps, type DatePickerSingleProps, type DatePickerSize, Dialog, DialogClose, type DialogCloseProps, DialogContent, type DialogContentProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogLayer, type DialogLayerAutoFocusEvent, type DialogLayerProps, type DialogPrimitiveSize, type DialogProps, DialogRoot, type DialogRootProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, type DropdownMenuAlign, DropdownMenuCheckboxItem, type DropdownMenuCheckboxItemProps, DropdownMenuContent, type DropdownMenuContentProps, DropdownMenuGroup, type DropdownMenuGroupProps, DropdownMenuItem, type DropdownMenuItemProps, DropdownMenuLabel, type DropdownMenuLabelProps, type DropdownMenuProps, DropdownMenuRadioGroup, type DropdownMenuRadioGroupProps, DropdownMenuRadioItem, type DropdownMenuRadioItemProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuTrigger, type DropdownMenuTriggerProps, EmptyState, type EmptyStateProps, FileDropzone, type FileDropzoneProps, type FileDropzoneSelectionSource, FormField, type FormFieldProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Input, type InputProps, type InputSize, Label, type LabelProps, type MenuPosition, MultiSelect, type MultiSelectOption, type MultiSelectProps, type MultiSelectVariant, type NavigationTabItem, NavigationTabs, type NavigationTabsLinkComponent, type NavigationTabsLinkProps, type NavigationTabsProps, OtpInput, type OtpInputProps, PageHeader, type PageHeaderProps, Pagination, type PaginationLabels, type PaginationProps, type PaginationSummary, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, PopoverHeader, type PopoverHeaderProps, type PopoverPadding, type PopoverProps, PopoverTitle, type PopoverTitleProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, ProgressDots, type ProgressDotsProps, ProgressRing, type ProgressRingProps, RadioGroup, type RadioGroupProps, RichSelect, RichSelectContent, type RichSelectContentProps, RichSelectEmpty, type RichSelectEmptyProps, RichSelectGroup, type RichSelectGroupProps, RichSelectItem, type RichSelectItemProps, RichSelectLabel, type RichSelectLabelProps, type RichSelectProps, RichSelectSearch, type RichSelectSearchProps, RichSelectSeparator, type RichSelectSeparatorProps, type RichSelectSize, RichSelectTrigger, type RichSelectTriggerProps, RichSelectValue, type RichSelectValueProps, Select, type SelectOption, type SelectProps, type SelectSize, Separator, type SeparatorOrientation, type SeparatorProps, SheetClose, type SheetCloseProps, SheetContent, type SheetContentProps, SheetDescription, type SheetDescriptionProps, SheetFooter, type SheetFooterProps, SheetHeader, type SheetHeaderProps, SheetRoot, type SheetRootProps, type SheetSide, SheetTitle, type SheetTitleProps, SheetTrigger, type SheetTriggerProps, type SheetWidth, Skeleton, type SkeletonProps, type SkeletonShape, Slot, type SlotAllProps, type SlotProps, Spinner, type SpinnerProps, type SpinnerSize, StatTile, type StatTileProps, type StatTone, Stepper, type StepperProps, type StepperStep, Switch, type SwitchProps, Table, type TableAlign, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, type TableColumn, type TableDensity, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, type TableRootProps, TableRow, type TableRowProps, Tabs, type TabsActivationMode, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsListVariant, type TabsOrientation, type TabsProps, TabsTrigger, type TabsTriggerProps, Textarea, type TextareaProps, type TextareaSize, Toolbar, type ToolbarProps, Tooltip, type TooltipProps, ValidationSummary, type ValidationSummaryError, type ValidationSummaryProps, formatCalendarDate, isCalendarDate, menuStyle, parseCalendarDate, registerDialogLayerPortal, resolveActiveNavigationHref, serializeCalendarDate, useAnchoredMenu };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { forwardRef, isValidElement, Children, cloneElement, createContext, useEffect, useId, useState, useRef, useCallback, useLayoutEffect, useContext, useMemo } from 'react';
|
|
3
|
-
import { X, Upload, FileText, Loader2, ChevronDown, Search, Check, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, Copy, CalendarDays } from 'lucide-react';
|
|
3
|
+
import { X, Upload, FileText, Loader2, ChevronDown, Search, Check, ChevronsLeft, ChevronLeft, ChevronRight, ChevronsRight, Copy, TrendingUp, TrendingDown, CalendarDays } from 'lucide-react';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
|
|
@@ -5547,7 +5547,171 @@ function Tooltip({
|
|
|
5547
5547
|
) : null
|
|
5548
5548
|
] });
|
|
5549
5549
|
}
|
|
5550
|
+
var PageHeader = forwardRef(
|
|
5551
|
+
function PageHeader2({ eyebrow, title, subtitle, actions, className, ...rest }, ref) {
|
|
5552
|
+
return /* @__PURE__ */ jsxs(
|
|
5553
|
+
"header",
|
|
5554
|
+
{
|
|
5555
|
+
ref,
|
|
5556
|
+
...rest,
|
|
5557
|
+
className: ["pr-page-header", className].filter(Boolean).join(" "),
|
|
5558
|
+
children: [
|
|
5559
|
+
/* @__PURE__ */ jsxs("div", { className: "pr-page-header__text", children: [
|
|
5560
|
+
eyebrow != null && eyebrow !== false ? /* @__PURE__ */ jsx("span", { className: "pr-page-header__eyebrow", children: eyebrow }) : null,
|
|
5561
|
+
/* @__PURE__ */ jsx("h1", { className: "pr-page-header__title", children: title }),
|
|
5562
|
+
subtitle != null ? /* @__PURE__ */ jsx("p", { className: "pr-page-header__subtitle", children: subtitle }) : null
|
|
5563
|
+
] }),
|
|
5564
|
+
actions != null ? /* @__PURE__ */ jsx("div", { className: "pr-page-header__actions", children: actions }) : null
|
|
5565
|
+
]
|
|
5566
|
+
}
|
|
5567
|
+
);
|
|
5568
|
+
}
|
|
5569
|
+
);
|
|
5570
|
+
var StatTile = forwardRef(
|
|
5571
|
+
function StatTile2({ label, value, hint, icon: Icon, tone = "neutral", trendValue, footer, className, ...rest }, ref) {
|
|
5572
|
+
const showTrend = typeof trendValue === "number" && Number.isFinite(trendValue);
|
|
5573
|
+
const trendUp = showTrend && trendValue >= 0;
|
|
5574
|
+
const TrendIcon = trendUp ? TrendingUp : TrendingDown;
|
|
5575
|
+
return /* @__PURE__ */ jsxs(
|
|
5576
|
+
"div",
|
|
5577
|
+
{
|
|
5578
|
+
ref,
|
|
5579
|
+
...rest,
|
|
5580
|
+
className: [
|
|
5581
|
+
"pr-stat-tile",
|
|
5582
|
+
`pr-stat-tile--${tone}`,
|
|
5583
|
+
className
|
|
5584
|
+
].filter(Boolean).join(" "),
|
|
5585
|
+
children: [
|
|
5586
|
+
/* @__PURE__ */ jsxs("div", { className: "pr-stat-tile__body", children: [
|
|
5587
|
+
/* @__PURE__ */ jsxs("div", { className: "pr-stat-tile__main", children: [
|
|
5588
|
+
/* @__PURE__ */ jsx("p", { className: "pr-stat-tile__label", children: label }),
|
|
5589
|
+
/* @__PURE__ */ jsx("p", { className: "pr-stat-tile__value", children: value }),
|
|
5590
|
+
hint != null ? /* @__PURE__ */ jsx("p", { className: "pr-stat-tile__hint", children: hint }) : null
|
|
5591
|
+
] }),
|
|
5592
|
+
Icon ? /* @__PURE__ */ jsx("div", { className: "pr-stat-tile__icon", children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, strokeWidth: 2.25 }) }) : null
|
|
5593
|
+
] }),
|
|
5594
|
+
showTrend || footer != null ? /* @__PURE__ */ jsxs("div", { className: "pr-stat-tile__meta", children: [
|
|
5595
|
+
showTrend ? /* @__PURE__ */ jsxs(
|
|
5596
|
+
"span",
|
|
5597
|
+
{
|
|
5598
|
+
className: [
|
|
5599
|
+
"pr-stat-tile__trend",
|
|
5600
|
+
trendUp ? "pr-stat-tile__trend--up" : "pr-stat-tile__trend--down"
|
|
5601
|
+
].filter(Boolean).join(" "),
|
|
5602
|
+
children: [
|
|
5603
|
+
/* @__PURE__ */ jsx(TrendIcon, { "aria-hidden": true, strokeWidth: 2.5 }),
|
|
5604
|
+
trendUp ? "+" : "",
|
|
5605
|
+
trendValue,
|
|
5606
|
+
"%"
|
|
5607
|
+
]
|
|
5608
|
+
}
|
|
5609
|
+
) : /* @__PURE__ */ jsx("span", {}),
|
|
5610
|
+
footer != null ? /* @__PURE__ */ jsx("div", { className: "pr-stat-tile__footer", children: footer }) : null
|
|
5611
|
+
] }) : null
|
|
5612
|
+
]
|
|
5613
|
+
}
|
|
5614
|
+
);
|
|
5615
|
+
}
|
|
5616
|
+
);
|
|
5617
|
+
var Toolbar = forwardRef(function Toolbar2({ className, ...rest }, ref) {
|
|
5618
|
+
return /* @__PURE__ */ jsx(
|
|
5619
|
+
"div",
|
|
5620
|
+
{
|
|
5621
|
+
ref,
|
|
5622
|
+
...rest,
|
|
5623
|
+
className: ["pr-toolbar", className].filter(Boolean).join(" ")
|
|
5624
|
+
}
|
|
5625
|
+
);
|
|
5626
|
+
});
|
|
5627
|
+
var IconButton = forwardRef(
|
|
5628
|
+
function IconButton2({
|
|
5629
|
+
label,
|
|
5630
|
+
icon,
|
|
5631
|
+
size = "md",
|
|
5632
|
+
variant = "default",
|
|
5633
|
+
compact = false,
|
|
5634
|
+
className,
|
|
5635
|
+
title,
|
|
5636
|
+
type = "button",
|
|
5637
|
+
...rest
|
|
5638
|
+
}, ref) {
|
|
5639
|
+
return /* @__PURE__ */ jsx(
|
|
5640
|
+
"button",
|
|
5641
|
+
{
|
|
5642
|
+
ref,
|
|
5643
|
+
...rest,
|
|
5644
|
+
type,
|
|
5645
|
+
"aria-label": label,
|
|
5646
|
+
title: title ?? label,
|
|
5647
|
+
className: [
|
|
5648
|
+
"pr-icon-btn",
|
|
5649
|
+
`pr-icon-btn--${size}`,
|
|
5650
|
+
`pr-icon-btn--${variant}`,
|
|
5651
|
+
compact ? "pr-icon-btn--compact" : null,
|
|
5652
|
+
className
|
|
5653
|
+
].filter(Boolean).join(" "),
|
|
5654
|
+
children: icon
|
|
5655
|
+
}
|
|
5656
|
+
);
|
|
5657
|
+
}
|
|
5658
|
+
);
|
|
5659
|
+
function ConfirmDialog({
|
|
5660
|
+
open,
|
|
5661
|
+
onOpenChange,
|
|
5662
|
+
title,
|
|
5663
|
+
description,
|
|
5664
|
+
confirmLabel = "Confirmar",
|
|
5665
|
+
cancelLabel = "Cancelar",
|
|
5666
|
+
onConfirm,
|
|
5667
|
+
loading = false,
|
|
5668
|
+
destructive = false,
|
|
5669
|
+
icon: Icon,
|
|
5670
|
+
size = "sm"
|
|
5671
|
+
}) {
|
|
5672
|
+
return /* @__PURE__ */ jsx(
|
|
5673
|
+
Dialog,
|
|
5674
|
+
{
|
|
5675
|
+
open,
|
|
5676
|
+
onClose: () => onOpenChange(false),
|
|
5677
|
+
size,
|
|
5678
|
+
title,
|
|
5679
|
+
description,
|
|
5680
|
+
dismissible: !destructive,
|
|
5681
|
+
footer: /* @__PURE__ */ jsxs("div", { className: "pr-confirm-dialog__actions", children: [
|
|
5682
|
+
/* @__PURE__ */ jsx(
|
|
5683
|
+
Button,
|
|
5684
|
+
{
|
|
5685
|
+
variant: "ghost",
|
|
5686
|
+
onClick: () => onOpenChange(false),
|
|
5687
|
+
disabled: loading,
|
|
5688
|
+
children: cancelLabel
|
|
5689
|
+
}
|
|
5690
|
+
),
|
|
5691
|
+
/* @__PURE__ */ jsx(
|
|
5692
|
+
Button,
|
|
5693
|
+
{
|
|
5694
|
+
variant: destructive ? "danger" : "primary",
|
|
5695
|
+
onClick: onConfirm,
|
|
5696
|
+
loading,
|
|
5697
|
+
children: confirmLabel
|
|
5698
|
+
}
|
|
5699
|
+
)
|
|
5700
|
+
] }),
|
|
5701
|
+
children: Icon ? /* @__PURE__ */ jsx("div", { className: "pr-confirm-dialog__icon-row", children: /* @__PURE__ */ jsx(
|
|
5702
|
+
"span",
|
|
5703
|
+
{
|
|
5704
|
+
className: [
|
|
5705
|
+
"pr-confirm-dialog__icon",
|
|
5706
|
+
destructive ? "pr-confirm-dialog__icon--danger" : "pr-confirm-dialog__icon--accent"
|
|
5707
|
+
].filter(Boolean).join(" "),
|
|
5708
|
+
children: /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, strokeWidth: 2.25 })
|
|
5709
|
+
}
|
|
5710
|
+
) }) : null
|
|
5711
|
+
}
|
|
5712
|
+
);
|
|
5713
|
+
}
|
|
5550
5714
|
|
|
5551
|
-
export { AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, AmbientBackground, Badge, Button, Calendar, Card, CardContent, CardDescription, CardHeader, CardTitle, Checkbox, CheckboxGroup, Combobox, CopyField, DataTable, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogLayer, DialogRoot, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, FileDropzone, FormField, Input, Label, MultiSelect, NavigationTabs, OtpInput, Pagination, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ProgressBar, ProgressDots, ProgressRing, RadioGroup, RichSelect, RichSelectContent, RichSelectEmpty, RichSelectGroup, RichSelectItem, RichSelectLabel, RichSelectSearch, RichSelectSeparator, RichSelectTrigger, RichSelectValue, Select, Separator, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetRoot, SheetTitle, SheetTrigger, Skeleton, Slot, Spinner, Stepper, Switch, Table2 as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, ValidationSummary, formatCalendarDate, isCalendarDate, menuStyle, parseCalendarDate, registerDialogLayerPortal, resolveActiveNavigationHref, serializeCalendarDate, useAnchoredMenu };
|
|
5715
|
+
export { AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogRoot, AlertDialogTitle, AlertDialogTrigger, AmbientBackground, Badge, Button, Calendar, Card, CardContent, CardDescription, CardHeader, CardTitle, Checkbox, CheckboxGroup, Combobox, ConfirmDialog, CopyField, DataTable, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogLayer, DialogRoot, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuTrigger, EmptyState, FileDropzone, FormField, IconButton, Input, Label, MultiSelect, NavigationTabs, OtpInput, PageHeader, Pagination, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, ProgressBar, ProgressDots, ProgressRing, RadioGroup, RichSelect, RichSelectContent, RichSelectEmpty, RichSelectGroup, RichSelectItem, RichSelectLabel, RichSelectSearch, RichSelectSeparator, RichSelectTrigger, RichSelectValue, Select, Separator, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetRoot, SheetTitle, SheetTrigger, Skeleton, Slot, Spinner, StatTile, Stepper, Switch, Table2 as Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toolbar, Tooltip, ValidationSummary, formatCalendarDate, isCalendarDate, menuStyle, parseCalendarDate, registerDialogLayerPortal, resolveActiveNavigationHref, serializeCalendarDate, useAnchoredMenu };
|
|
5552
5716
|
//# sourceMappingURL=index.js.map
|
|
5553
5717
|
//# sourceMappingURL=index.js.map
|