@tradalab/lyra 2.1.0 → 2.2.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/README.md CHANGED
@@ -1,99 +1,99 @@
1
- # @tradalab/lyra
2
-
3
- > Tradalab's UI kit — shadcn (`radix-lyra` style) primitives, composed
4
- > components, and an app shell for **React 19 / Next 16 / Tailwind v4**.
5
-
6
- ESM-only. Extracted from Tradalab's foundation kit so every company app shares
7
- the same component surface.
8
-
9
- ## Install
10
-
11
- ```bash
12
- pnpm add @tradalab/lyra
13
- # peers: react ^19, react-dom ^19 (next ^16 only if you use /shell)
14
- ```
15
-
16
- The stylesheet pulls in Tailwind v4, so your app needs `@tailwindcss/postcss`.
17
-
18
- ```css
19
- /* app/globals.css */
20
- @import "@tradalab/lyra/styles.css";
21
- ```
22
-
23
- ## Subpaths
24
-
25
- | Subpath | Exports | Boundary |
26
- |---|---|---|
27
- | `@tradalab/lyra/utils` | `cn` | server-safe |
28
- | `@tradalab/lyra/hooks` | `useMobile` | client |
29
- | `@tradalab/lyra/ui` | 60 shadcn primitives + `AccountMenu`, `Container` | client |
30
- | `@tradalab/lyra/shell` | `AppShell`, `NavItem`, `NavGroup`, `Breadcrumbs`, `useActiveRoute` | client |
31
- | `@tradalab/lyra/styles.css` | Tailwind v4 base + `radix-lyra` tokens (light/dark) | CSS |
32
-
33
- Client subpaths carry a build-injected `"use client"`; import them inside a
34
- client tree or pass via `children` — don't import them into a Server Component's
35
- own module.
36
-
37
- ```tsx
38
- import { Button, Card, CardHeader } from "@tradalab/lyra/ui"
39
- import { AppShell, NavItem } from "@tradalab/lyra/shell"
40
- ```
41
-
42
- ## Toast
43
-
44
- `2.0.0` replaced the sonner-based toast with shadcn's Base UI Toast. `sonner` is
45
- gone — it is no longer a peer dependency, and apps should drop it.
46
-
47
- `toast` is a **manager object, not a callable**:
48
-
49
- ```tsx
50
- import { Toaster, toast } from "@tradalab/lyra/ui"
51
-
52
- toast.add({ title: "Saved" })
53
- toast.add({ title: "Upload failed", description: err.message, type: "error" })
54
- const id = toast.add({ title: "Uploading…", type: "loading", timeout: 0 })
55
- toast.close(id)
56
- ```
57
-
58
- `type` is `"success" | "error" | "info" | "warning" | "loading"` — there is no
59
- `toast.success("x")`. `timeout: 0` never auto-dismisses (sonner's `duration:
60
- Infinity`). Position belongs to the viewport this package styles, so sonner's
61
- `position` and `richColors` props have no equivalent. Mount `<Toaster/>` once —
62
- apps on `@tradalab/nekit` already get it from `NekitProvider`.
63
-
64
- ## Develop
65
-
66
- ```bash
67
- make install # pnpm install
68
- make build # tsup + inject-use-client + verify-build-output
69
- make verify # typecheck + lint + test
70
- make ui-add <name> # scaffold a shadcn primitive, adapt, rebuild barrel
71
- make ui-update <name> # overwrite a primitive with the latest upstream version
72
- make ui-sync # re-adapt every primitive + rebuild barrel
73
- make ui-diff # report which primitives changed upstream (exit 1 if any)
74
- ```
75
-
76
- **Staying current with shadcn** — `make ui-diff` compares every primitive
77
- against the live `radix-lyra` registry and exits non-zero when one has moved.
78
- It normalises away everything the CLI would rewrite anyway (icon-library
79
- placeholders, `cn-*` template classes, import aliases, prettier line-wrapping),
80
- so what it prints is real change. Prefer it over `shadcn add --diff`, which
81
- caps its output at five files per run.
82
-
83
- A primitive lyra deliberately diverges from carries a `customised` note in
84
- `primitives.lock.json`; `ui-diff` lists those separately instead of failing on
85
- them forever. Document the divergence in a JSDoc block in the file too —
86
- `make ui-update` will overwrite it, and that note is what tells the next person
87
- to put it back.
88
-
89
- **Layout** — `src/<layer>/` with a barrel `index.ts`; one tsup entry per
90
- subpath; ESM-only to `dist/`. **Layers** (enforced by `eslint-plugin-boundaries`):
91
- `utils`/`hooks` (foundation) → `ui` → `shell`. No upward imports.
92
-
93
- **`"use client"` is not in source** — it is injected onto the client entry
94
- artifacts post-build by `scripts/inject-use-client.mjs`, then asserted by
95
- `scripts/verify-build-output.mjs`. `scripts/sync-ui.mjs` adapts shadcn-CLI
96
- output to repo conventions.
97
-
98
- **Release** — `pnpm publish --no-git-checks` (the `prepublishOnly` hook builds
99
- first). Published to the npm public registry.
1
+ # @tradalab/lyra
2
+
3
+ > Tradalab's UI kit — shadcn (`radix-lyra` style) primitives, composed
4
+ > components, and an app shell for **React 19 / Next 16 / Tailwind v4**.
5
+
6
+ ESM-only. Extracted from Tradalab's foundation kit so every company app shares
7
+ the same component surface.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ pnpm add @tradalab/lyra
13
+ # peers: react ^19, react-dom ^19 (next ^16 only if you use /shell)
14
+ ```
15
+
16
+ The stylesheet pulls in Tailwind v4, so your app needs `@tailwindcss/postcss`.
17
+
18
+ ```css
19
+ /* app/globals.css */
20
+ @import "@tradalab/lyra/styles.css";
21
+ ```
22
+
23
+ ## Subpaths
24
+
25
+ | Subpath | Exports | Boundary |
26
+ |---|---|---|
27
+ | `@tradalab/lyra/utils` | `cn` | server-safe |
28
+ | `@tradalab/lyra/hooks` | `useMobile` | client |
29
+ | `@tradalab/lyra/ui` | 60 shadcn primitives + `AccountMenu`, `ActionButton`, `Container` | client |
30
+ | `@tradalab/lyra/shell` | `AppShell`, `NavItem`, `NavGroup`, `Breadcrumbs`, `useActiveRoute` | client |
31
+ | `@tradalab/lyra/styles.css` | Tailwind v4 base + `radix-lyra` tokens (light/dark) | CSS |
32
+
33
+ Client subpaths carry a build-injected `"use client"`; import them inside a
34
+ client tree or pass via `children` — don't import them into a Server Component's
35
+ own module.
36
+
37
+ ```tsx
38
+ import { Button, Card, CardHeader } from "@tradalab/lyra/ui"
39
+ import { AppShell, NavItem } from "@tradalab/lyra/shell"
40
+ ```
41
+
42
+ ## Toast
43
+
44
+ `2.0.0` replaced the sonner-based toast with shadcn's Base UI Toast. `sonner` is
45
+ gone — it is no longer a peer dependency, and apps should drop it.
46
+
47
+ `toast` is a **manager object, not a callable**:
48
+
49
+ ```tsx
50
+ import { Toaster, toast } from "@tradalab/lyra/ui"
51
+
52
+ toast.add({ title: "Saved" })
53
+ toast.add({ title: "Upload failed", description: err.message, type: "error" })
54
+ const id = toast.add({ title: "Uploading…", type: "loading", timeout: 0 })
55
+ toast.close(id)
56
+ ```
57
+
58
+ `type` is `"success" | "error" | "info" | "warning" | "loading"` — there is no
59
+ `toast.success("x")`. `timeout: 0` never auto-dismisses (sonner's `duration:
60
+ Infinity`). Position belongs to the viewport this package styles, so sonner's
61
+ `position` and `richColors` props have no equivalent. Mount `<Toaster/>` once —
62
+ apps on `@tradalab/nekit` already get it from `NekitProvider`.
63
+
64
+ ## Develop
65
+
66
+ ```bash
67
+ make install # pnpm install
68
+ make build # tsup + inject-use-client + verify-build-output
69
+ make verify # typecheck + lint + test
70
+ make ui-add <name> # scaffold a shadcn primitive, adapt, rebuild barrel
71
+ make ui-update <name> # overwrite a primitive with the latest upstream version
72
+ make ui-sync # re-adapt every primitive + rebuild barrel
73
+ make ui-diff # report which primitives changed upstream (exit 1 if any)
74
+ ```
75
+
76
+ **Staying current with shadcn** — `make ui-diff` compares every primitive
77
+ against the live `radix-lyra` registry and exits non-zero when one has moved.
78
+ It normalises away everything the CLI would rewrite anyway (icon-library
79
+ placeholders, `cn-*` template classes, import aliases, prettier line-wrapping),
80
+ so what it prints is real change. Prefer it over `shadcn add --diff`, which
81
+ caps its output at five files per run.
82
+
83
+ A primitive lyra deliberately diverges from carries a `customised` note in
84
+ `primitives.lock.json`; `ui-diff` lists those separately instead of failing on
85
+ them forever. Document the divergence in a JSDoc block in the file too —
86
+ `make ui-update` will overwrite it, and that note is what tells the next person
87
+ to put it back.
88
+
89
+ **Layout** — `src/<layer>/` with a barrel `index.ts`; one tsup entry per
90
+ subpath; ESM-only to `dist/`. **Layers** (enforced by `eslint-plugin-boundaries`):
91
+ `utils`/`hooks` (foundation) → `ui` → `shell`. No upward imports.
92
+
93
+ **`"use client"` is not in source** — it is injected onto the client entry
94
+ artifacts post-build by `scripts/inject-use-client.mjs`, then asserted by
95
+ `scripts/verify-build-output.mjs`. `scripts/sync-ui.mjs` adapts shadcn-CLI
96
+ output to repo conventions.
97
+
98
+ **Release** — `pnpm publish --no-git-checks` (the `prepublishOnly` hook builds
99
+ first). Published to the npm public registry.
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import { ComponentPropsWithoutRef, ElementType, ReactNode } from 'react';
2
+ import { ComponentProps, ReactNode, ComponentPropsWithoutRef, ElementType } from 'react';
3
3
  import { Accordion as Accordion$1, AlertDialog as AlertDialog$1, AspectRatio as AspectRatio$1, Avatar as Avatar$1, Checkbox as Checkbox$1, Collapsible as Collapsible$1, Dialog as Dialog$1, ContextMenu as ContextMenu$1, Direction, DropdownMenu as DropdownMenu$1, Label as Label$1, HoverCard as HoverCard$1, Menubar as Menubar$1, NavigationMenu as NavigationMenu$1, Popover as Popover$1, Progress as Progress$1, RadioGroup as RadioGroup$1, ScrollArea as ScrollArea$1, Select as Select$1, Slider as Slider$1, Switch as Switch$1, Tabs as Tabs$1, Toggle as Toggle$1, ToggleGroup as ToggleGroup$1 } from 'radix-ui';
4
4
  import * as class_variance_authority_types from 'class-variance-authority/types';
5
5
  import { VariantProps } from 'class-variance-authority';
@@ -595,6 +595,33 @@ declare function ToggleGroup({ className, variant, size, spacing, orientation, c
595
595
  }): React$1.JSX.Element;
596
596
  declare function ToggleGroupItem({ className, children, variant, size, ...props }: React$1.ComponentProps<typeof ToggleGroup$1.Item> & VariantProps<typeof toggleVariants>): React$1.JSX.Element;
597
597
 
598
+ interface ActionButtonProps extends Omit<ComponentProps<typeof Button>, "asChild"> {
599
+ /** Swaps `icon` for a spinner and disables the button. */
600
+ pending?: boolean;
601
+ /** Leading icon, shown when idle. */
602
+ icon?: ReactNode;
603
+ }
604
+ /**
605
+ * A `Button` that shows it is working.
606
+ *
607
+ * The spinner REPLACES `icon` rather than sitting beside it — a second glyph
608
+ * reflows the label mid-click, which reads as the button turning into a
609
+ * different button. Pending also disables: a second click on a long action
610
+ * starts a second one.
611
+ *
612
+ * `asChild` is deliberately not forwarded. `Button` renders a Radix `Slot` for
613
+ * it, which accepts exactly one child, and this always renders two.
614
+ *
615
+ * @example
616
+ * <ActionButton pending={m.isPending} icon={<TrashIcon />} onClick={run}>
617
+ * Delete
618
+ * </ActionButton>
619
+ *
620
+ * // Icon-only: omit children and use an icon size.
621
+ * <ActionButton size="icon-sm" pending={busy} icon={<RefreshCwIcon />} />
622
+ */
623
+ declare function ActionButton({ pending, icon, disabled, children, ...props }: ActionButtonProps): React$1.JSX.Element;
624
+
598
625
  /** Max content width, keyed to Tailwind's `--breakpoint-*` scale. `false` = no cap. */
599
626
  type ContainerMaxWidth = "sm" | "md" | "lg" | "xl" | "2xl" | false;
600
627
  /** Which axis the content is centred on. */
@@ -627,4 +654,4 @@ interface ContainerProps extends ComponentPropsWithoutRef<"div"> {
627
654
  */
628
655
  declare function Container({ as: Component, maxWidth, fluid, center, fullHeight, className, children, ...props }: ContainerProps): React$1.JSX.Element;
629
656
 
630
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, type ContainerCenter, type ContainerMaxWidth, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, buttonGroupVariants, createToastManager, markerVariants, navigationMenuTriggerStyle, tabsListVariants, toast, toggleVariants, useCarousel, useComboboxAnchor, useDirection, useToastManager };
657
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, type ActionButtonProps, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, type ChartConfig, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Container, type ContainerCenter, type ContainerMaxWidth, type ContainerProps, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, buttonGroupVariants, createToastManager, markerVariants, navigationMenuTriggerStyle, tabsListVariants, toast, toggleVariants, useCarousel, useComboboxAnchor, useDirection, useToastManager };
package/dist/ui/index.js CHANGED
@@ -3809,6 +3809,20 @@ function ToggleGroupItem({
3809
3809
  }
3810
3810
  );
3811
3811
  }
3812
+ function ActionButton({ pending = false, icon, disabled, children, ...props }) {
3813
+ return /* @__PURE__ */ jsxs(
3814
+ Button,
3815
+ {
3816
+ disabled: disabled || pending,
3817
+ "aria-busy": pending || void 0,
3818
+ ...props,
3819
+ children: [
3820
+ pending ? /* @__PURE__ */ jsx(Spinner, {}) : icon,
3821
+ children
3822
+ ]
3823
+ }
3824
+ );
3825
+ }
3812
3826
  var maxWidthClass = {
3813
3827
  sm: "max-w-screen-sm",
3814
3828
  md: "max-w-screen-md",
@@ -3836,6 +3850,6 @@ function Container({ as: Component = "div", maxWidth = "xl", fluid = false, cent
3836
3850
  );
3837
3851
  }
3838
3852
 
3839
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Badge, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Container, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, buttonGroupVariants, createToastManager, markerVariants, navigationMenuTriggerStyle, tabsListVariants, toast, toggleVariants, useCarousel, useComboboxAnchor, useDirection, useToastManager };
3853
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionButton, Alert, AlertAction, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AspectRatio, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, Badge, Bubble, BubbleContent, BubbleGroup, BubbleReactions, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Container, DirectionProvider, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, HoverCard, HoverCardContent, HoverCardTrigger, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Marker, MarkerContent, MarkerIcon, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, NativeSelect, NativeSelectOptGroup, NativeSelectOption, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Progress, RadioGroup, RadioGroupItem, ResizableHandle, ResizablePanel, ResizablePanelGroup, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Slider, Spinner, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastPortal, ToastProvider, ToastTitle, ToastViewport, Toaster, Toggle, ToggleGroup, ToggleGroupItem, badgeVariants, buttonGroupVariants, createToastManager, markerVariants, navigationMenuTriggerStyle, tabsListVariants, toast, toggleVariants, useCarousel, useComboboxAnchor, useDirection, useToastManager };
3840
3854
  //# sourceMappingURL=index.js.map
3841
3855
  //# sourceMappingURL=index.js.map