@locusgraph/components 0.1.1 → 0.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.
Files changed (87) hide show
  1. package/dist/action/button-group.js +1 -1
  2. package/dist/action/button.js +3 -3
  3. package/dist/action/toggle-group.js +2 -2
  4. package/dist/action/toggle.js +5 -5
  5. package/dist/display/badge.d.ts +1 -1
  6. package/dist/display/badge.js +4 -1
  7. package/dist/display/chart/chart-tooltip.js +2 -2
  8. package/dist/display/chat/attachment/attachment.js +1 -1
  9. package/dist/display/chat/bubble.js +2 -2
  10. package/dist/display/chat/message-scroller.js +1 -1
  11. package/dist/display/chat/message.js +2 -2
  12. package/dist/display/content/kbd.js +1 -1
  13. package/dist/display/media/carousel-controls.js +1 -1
  14. package/dist/display/rule-grid/rule-grid.d.ts +3 -1
  15. package/dist/display/rule-grid/rule-grid.js +8 -2
  16. package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
  17. package/dist/display/skeletons/layouts/skeleton-rule-grid.js +10 -0
  18. package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
  19. package/dist/display/skeletons/layouts/skeleton-table.js +16 -0
  20. package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
  21. package/dist/display/skeletons/shapes/skeleton-avatar.js +20 -0
  22. package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
  23. package/dist/display/skeletons/shapes/skeleton-button.js +20 -0
  24. package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
  25. package/dist/display/skeletons/shapes/skeleton-text.js +13 -0
  26. package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
  27. package/dist/display/skeletons/skeleton-parts.js +11 -0
  28. package/dist/display/status/alert.d.ts +1 -1
  29. package/dist/display/status/alert.js +4 -2
  30. package/dist/display/status/empty.js +1 -1
  31. package/dist/display/status/progress.d.ts +5 -1
  32. package/dist/display/status/progress.js +19 -2
  33. package/dist/display/status/skeleton.js +1 -1
  34. package/dist/display/status/spinner.js +1 -1
  35. package/dist/display/table.js +1 -1
  36. package/dist/feedback/toaster.d.ts +1 -1
  37. package/dist/feedback/toaster.js +12 -14
  38. package/dist/form/advanced/calendar-day-button.js +1 -1
  39. package/dist/form/advanced/calendar.js +4 -4
  40. package/dist/form/advanced/combobox/combobox-chips.js +2 -2
  41. package/dist/form/advanced/combobox/combobox-items.js +2 -2
  42. package/dist/form/advanced/combobox/combobox.js +2 -2
  43. package/dist/form/advanced/input-otp.js +2 -2
  44. package/dist/form/choice/checkbox.js +3 -3
  45. package/dist/form/choice/radio-group.js +2 -2
  46. package/dist/form/choice/select.js +5 -5
  47. package/dist/form/choice/slider.js +1 -1
  48. package/dist/form/choice/switch.js +1 -1
  49. package/dist/form/field/field.js +3 -3
  50. package/dist/form/hook-form/form.js +1 -1
  51. package/dist/form/input-group.js +4 -4
  52. package/dist/form/native-select.js +2 -2
  53. package/dist/index.d.ts +6 -0
  54. package/dist/index.js +6 -0
  55. package/dist/layout/accordion.js +3 -3
  56. package/dist/layout/resizable.js +1 -1
  57. package/dist/layout/scroll/scroll-area.d.ts +1 -1
  58. package/dist/layout/scroll/scroll-area.js +3 -3
  59. package/dist/layout/sidebar/sidebar-sections.js +1 -1
  60. package/dist/layout/sidebar/sidebar.js +1 -1
  61. package/dist/layout/tabs.js +3 -3
  62. package/dist/navigation/breadcrumb.js +1 -1
  63. package/dist/navigation/menubar/menubar-items.js +2 -2
  64. package/dist/navigation/menubar/menubar-sub.js +2 -2
  65. package/dist/navigation/menubar/menubar.js +2 -2
  66. package/dist/navigation/navigation-menu.js +3 -3
  67. package/dist/navigation/pagination.js +5 -4
  68. package/dist/overlay/alert-dialog.js +3 -3
  69. package/dist/overlay/context-menu/context-menu-items.js +2 -2
  70. package/dist/overlay/context-menu/context-menu-sub.js +2 -2
  71. package/dist/overlay/context-menu/context-menu.js +1 -1
  72. package/dist/overlay/dialog.js +4 -4
  73. package/dist/overlay/floating/command.js +5 -5
  74. package/dist/overlay/floating/drawer.js +5 -5
  75. package/dist/overlay/floating/hover-card.js +2 -2
  76. package/dist/overlay/menu/dropdown-menu-choice.js +1 -1
  77. package/dist/overlay/menu/dropdown-menu-item.js +1 -1
  78. package/dist/overlay/menu/dropdown-menu-sub.js +2 -2
  79. package/dist/overlay/menu/dropdown-menu.js +2 -2
  80. package/dist/overlay/popover.js +2 -2
  81. package/dist/overlay/sheet.js +7 -7
  82. package/dist/shell/breadcrumbs.js +1 -1
  83. package/dist/shell/docs/docs-header.js +1 -1
  84. package/dist/shell/docs/docs-sidebar.js +2 -2
  85. package/dist/shell/docs/on-this-page.js +1 -1
  86. package/dist/shell/theme-toggle.js +1 -1
  87. package/package.json +4 -4
@@ -6,7 +6,7 @@ import { Separator } from "../display/separator.js";
6
6
  const buttonGroupVariants = cva("flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", {
7
7
  variants: {
8
8
  orientation: {
9
- horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
9
+ horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none [&>input:first-child]:rounded-l-full [&>input:first-child]:pl-4",
10
10
  vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none",
11
11
  },
12
12
  },
@@ -5,9 +5,9 @@ import * as Slot from "radix-ui/slot";
5
5
  const buttonVariants = cva("inline-flex shrink-0 items-center justify-center gap-2 rounded-full text-sm font-medium whitespace-nowrap transition-[color,background-color,border-color,box-shadow] duration-150 ease-out outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
6
6
  variants: {
7
7
  variant: {
8
- default: "bg-primary text-primary-foreground shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.14)] hover:bg-primary/90",
9
- destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",
10
- outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
8
+ default: "bg-primary text-primary-foreground shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.14)] hover:bg-primary/90 disabled:bg-transparent disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-none disabled:ring-1 disabled:ring-input disabled:ring-inset",
9
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 disabled:bg-transparent disabled:text-muted-foreground disabled:opacity-100 disabled:ring-1 disabled:ring-input disabled:ring-inset",
10
+ outline: "border bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
11
11
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
12
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
13
13
  link: "text-primary underline-offset-4 hover:underline",
@@ -10,13 +10,13 @@ const ToggleGroupContext = React.createContext({
10
10
  spacing: 0,
11
11
  });
12
12
  function ToggleGroup({ className, variant, size, spacing = 0, children, ...props }) {
13
- return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { "--gap": spacing }, className: cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs", className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
13
+ return (_jsx(ToggleGroupPrimitive.Root, { "data-slot": "toggle-group", "data-variant": variant, "data-size": size, "data-spacing": spacing, style: { "--gap": spacing }, className: cn("group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-full data-[spacing=default]:data-[variant=outline]:shadow-xs", className), ...props, children: _jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children: children }) }));
14
14
  }
15
15
  function ToggleGroupItem({ className, children, variant, size, ...props }) {
16
16
  const context = React.useContext(ToggleGroupContext);
17
17
  return (_jsx(ToggleGroupPrimitive.Item, { "data-slot": "toggle-group-item", "data-variant": context.variant || variant, "data-size": context.size || size, "data-spacing": context.spacing, className: cn(toggleVariants({
18
18
  variant: context.variant || variant,
19
19
  size: context.size || size,
20
- }), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", className), ...props, children: children }));
20
+ }), "w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10", "data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-full data-[spacing=0]:last:rounded-r-full data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l", className), ...props, children: children }));
21
21
  }
22
22
  export { ToggleGroup, ToggleGroupItem };
@@ -3,16 +3,16 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cva } from "class-variance-authority";
4
4
  import { cn } from "cn";
5
5
  import * as TogglePrimitive from "radix-ui/toggle";
6
- const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
6
+ const toggleVariants = cva("inline-flex items-center justify-center gap-2 rounded-full text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/70 focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=on]:bg-foreground/10 data-[state=on]:text-foreground dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
7
7
  variants: {
8
8
  variant: {
9
9
  default: "bg-transparent",
10
- outline: "border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground",
10
+ outline: "border border-input bg-transparent shadow-xs hover:bg-muted hover:text-foreground data-[state=on]:border-foreground/30",
11
11
  },
12
12
  size: {
13
- default: "h-9 min-w-9 px-2",
14
- sm: "h-8 min-w-8 px-1.5",
15
- lg: "h-10 min-w-10 px-2.5",
13
+ default: "h-9 min-w-9 px-2.5",
14
+ sm: "h-8 min-w-8 px-2",
15
+ lg: "h-10 min-w-10 px-3",
16
16
  },
17
17
  },
18
18
  defaultVariants: {
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const badgeVariants: (props?: ({
4
- variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "secondary" | null | undefined;
4
+ variant?: "default" | "destructive" | "destructive-soft" | "ghost" | "link" | "outline" | "secondary" | "success" | "warning" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
7
7
  asChild?: boolean;
@@ -7,7 +7,10 @@ const badgeVariants = cva("inline-flex w-fit shrink-0 items-center justify-cente
7
7
  variant: {
8
8
  default: "bg-primary text-primary-foreground [a&]:hover:bg-primary/90",
9
9
  secondary: "bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",
10
- destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
10
+ destructive: "bg-destructive text-white focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",
11
+ success: "bg-good/10 text-good [a&]:hover:bg-good/15",
12
+ warning: "bg-warn/10 text-warn [a&]:hover:bg-warn/15",
13
+ "destructive-soft": "bg-destructive/10 text-destructive [a&]:hover:bg-destructive/15",
11
14
  outline: "border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
12
15
  ghost: "[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",
13
16
  link: "text-primary underline-offset-4 [a&]:hover:underline",
@@ -27,7 +27,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
27
27
  return null;
28
28
  }
29
29
  const nestLabel = payload.length === 1 && indicator !== "dot";
30
- return (_jsxs("div", { className: cn("grid min-w-[8rem] items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
30
+ return (_jsxs("div", { className: cn("grid min-w-[8rem] items-start gap-1.5 bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-overlay ring-1 ring-border", className), children: [!nestLabel ? tooltipLabel : null, _jsx("div", { className: "grid gap-1.5", children: payload
31
31
  .filter((item) => item.type !== "none")
32
32
  .map((item, index) => {
33
33
  const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
@@ -41,7 +41,7 @@ function ChartTooltipContent({ active, payload, className, indicator = "dot", hi
41
41
  }), style: {
42
42
  "--color-bg": indicatorColor,
43
43
  "--color-border": indicatorColor,
44
- } }))), _jsxs("div", { className: cn("flex flex-1 justify-between leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })] }), item.value != null && (_jsx("span", { className: "font-mono font-medium text-foreground tabular-nums", children: typeof item.value === "number"
44
+ } }))), _jsxs("div", { className: cn("flex flex-1 justify-between gap-4 leading-none", nestLabel ? "items-end" : "items-center"), children: [_jsxs("div", { className: "grid gap-1.5", children: [nestLabel ? tooltipLabel : null, _jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })] }), item.value != null && (_jsx("span", { className: "font-mono font-medium text-foreground tabular-nums", children: typeof item.value === "number"
45
45
  ? item.value.toLocaleString()
46
46
  : String(item.value) }))] })] })) }, key));
47
47
  }) })] }));
@@ -10,7 +10,7 @@ const attachmentVariants = cva("group/attachment relative flex w-fit max-w-full
10
10
  },
11
11
  orientation: {
12
12
  horizontal: "min-w-40 items-center",
13
- vertical: "w-24 flex-col has-data-[slot=attachment-content]:w-30",
13
+ vertical: "w-28 flex-col has-data-[slot=attachment-content]:w-36",
14
14
  },
15
15
  },
16
16
  });
@@ -11,9 +11,9 @@ const bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0
11
11
  default: "*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",
12
12
  secondary: "*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",
13
13
  muted: "*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
14
- tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",
14
+ tinted: "*:data-[slot=bubble-content]:bg-muted *:data-[slot=bubble-content]:text-foreground *:data-[slot=bubble-content]:ring-1 *:data-[slot=bubble-content]:ring-border [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",
15
15
  outline: "*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",
16
- ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
16
+ ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:py-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",
17
17
  destructive: "*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30",
18
18
  },
19
19
  },
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ArrowDown as ArrowDownIcon } from "@carbon/icons-react";
3
4
  import { MessageScroller as MessageScrollerPrimitive, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility, } from "@shadcn/react/message-scroller";
4
5
  import { cn } from "cn";
5
- import { ArrowDownIcon } from "lucide-react";
6
6
  import { Button } from "../../action/button.js";
7
7
  function MessageScrollerProvider(props) {
8
8
  return _jsx(MessageScrollerPrimitive.Provider, { ...props });
@@ -13,9 +13,9 @@ function MessageContent({ className, ...props }) {
13
13
  return (_jsx("div", { "data-slot": "message-content", className: cn("flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end", className), ...props }));
14
14
  }
15
15
  function MessageHeader({ className, ...props }) {
16
- return (_jsx("div", { "data-slot": "message-header", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0", className), ...props }));
16
+ return (_jsx("div", { "data-slot": "message-header", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground", className), ...props }));
17
17
  }
18
18
  function MessageFooter({ className, ...props }) {
19
- return (_jsx("div", { "data-slot": "message-footer", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end", className), ...props }));
19
+ return (_jsx("div", { "data-slot": "message-footer", className: cn("flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-data-[align=end]/message:justify-end", className), ...props }));
20
20
  }
21
21
  export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "cn";
3
3
  function Kbd({ className, ...props }) {
4
- return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className), ...props }));
4
+ return (_jsx("kbd", { "data-slot": "kbd", className: cn("pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-foreground/80 ring-1 ring-border ring-inset select-none", "[&_svg:not([class*='size-'])]:size-3", "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:ring-0 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10", className), ...props }));
5
5
  }
6
6
  function KbdGroup({ className, ...props }) {
7
7
  return (_jsx("kbd", { "data-slot": "kbd-group", className: cn("inline-flex items-center gap-1", className), ...props }));
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ArrowLeft, ArrowRight } from "@carbon/icons-react";
3
4
  import { cn } from "cn";
4
- import { ArrowLeft, ArrowRight } from "lucide-react";
5
5
  import { Button } from "../../action/button.js";
6
6
  import { useCarousel } from "./carousel.js";
7
7
  function CarouselPrevious({ className, variant = "outline", size = "icon", ...props }) {
@@ -8,7 +8,9 @@ declare function RuleGridCell({ className, asChild, interactive, ...props }: Rea
8
8
  asChild?: boolean;
9
9
  interactive?: boolean;
10
10
  }): React.JSX.Element;
11
+ declare function RuleGridHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function RuleGridFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
13
  declare function RuleGridLabel({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
12
14
  declare function RuleGridTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
13
15
  declare function RuleGridDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
14
- export { RuleGrid, RuleGridCell, RuleGridDescription, RuleGridLabel, RuleGridTitle, ruleGridVariants, };
16
+ export { RuleGrid, RuleGridCell, RuleGridDescription, RuleGridFooter, RuleGridHeader, RuleGridLabel, RuleGridTitle, ruleGridVariants, };
@@ -23,8 +23,14 @@ function RuleGridCell({ className, asChild = false, interactive = false, ...prop
23
23
  return (_jsx(Comp, { "data-slot": "rule-grid-cell", "data-interactive": interactive || undefined, className: cn("flex min-w-0 flex-col gap-2 bg-card p-6 text-card-foreground ring-1 ring-border", interactive &&
24
24
  "transition-colors duration-150 ease-out outline-none hover:bg-accent/60 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-ring active:bg-accent", className), ...props }));
25
25
  }
26
+ function RuleGridHeader({ className, ...props }) {
27
+ return (_jsx("div", { "data-slot": "rule-grid-header", className: cn("-mx-6 -mt-6 mb-2 flex min-h-11 items-center gap-2 border-b bg-muted/35 px-6 py-2.5", className), ...props }));
28
+ }
29
+ function RuleGridFooter({ className, ...props }) {
30
+ return (_jsx("div", { "data-slot": "rule-grid-footer", className: cn("-mx-6 mt-auto -mb-6 flex min-h-12 flex-wrap items-center gap-2 border-t bg-muted/70 px-6 py-3", className), ...props }));
31
+ }
26
32
  function RuleGridLabel({ className, ...props }) {
27
- return (_jsx("span", { "data-slot": "rule-grid-label", className: cn("font-mono text-[11.5px] text-muted-foreground", className), ...props }));
33
+ return _jsx("span", { "data-slot": "rule-grid-label", className: cn("eyebrow", className), ...props });
28
34
  }
29
35
  function RuleGridTitle({ className, ...props }) {
30
36
  return (_jsx("div", { "data-slot": "rule-grid-title", className: cn("text-[15px] font-medium tracking-[-0.01em]", className), ...props }));
@@ -32,4 +38,4 @@ function RuleGridTitle({ className, ...props }) {
32
38
  function RuleGridDescription({ className, ...props }) {
33
39
  return (_jsx("p", { "data-slot": "rule-grid-description", className: cn("text-sm text-muted-foreground", className), ...props }));
34
40
  }
35
- export { RuleGrid, RuleGridCell, RuleGridDescription, RuleGridLabel, RuleGridTitle, ruleGridVariants, };
41
+ export { RuleGrid, RuleGridCell, RuleGridDescription, RuleGridFooter, RuleGridHeader, RuleGridLabel, RuleGridTitle, ruleGridVariants, };
@@ -0,0 +1,8 @@
1
+ import type * as React from "react";
2
+ import { RuleGrid } from "../../rule-grid/rule-grid.js";
3
+ type SkeletonRuleGridProps = Omit<React.ComponentProps<typeof RuleGrid>, "children"> & {
4
+ cells?: number;
5
+ label?: string;
6
+ };
7
+ declare function SkeletonRuleGrid({ cells, columns, label, ...props }: SkeletonRuleGridProps): React.JSX.Element;
8
+ export { SkeletonRuleGrid };
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { RuleGrid, RuleGridCell } from "../../rule-grid/rule-grid.js";
3
+ import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
4
+ function SkeletonRuleGrid({ cells = 3, columns = 3, label, ...props }) {
5
+ const count = Math.max(1, Math.floor(cells));
6
+ return (_jsxs(RuleGrid, { "data-slot": "skeleton-rule-grid", columns: columns, ...skeletonRootProps, ...props, children: [Array.from({ length: count }, (_, index) => (_jsxs(RuleGridCell
7
+ // biome-ignore lint/suspicious/noArrayIndexKey: placeholder cells have no identity
8
+ , { "data-slot": "skeleton-rule-grid-cell", "aria-hidden": "true", className: "gap-3", children: [_jsx(SkeletonBar, { className: "h-3 w-20" }), _jsx(SkeletonBar, { className: "h-7 w-28" })] }, index))), _jsx(SkeletonLoadingLabel, { children: label })] }));
9
+ }
10
+ export { SkeletonRuleGrid };
@@ -0,0 +1,8 @@
1
+ import type * as React from "react";
2
+ type SkeletonTableProps = React.ComponentProps<"div"> & {
3
+ rows?: number;
4
+ columns?: number;
5
+ label?: string;
6
+ };
7
+ declare function SkeletonTable({ rows, columns, label, className, ...props }: SkeletonTableProps): React.JSX.Element;
8
+ export { SkeletonTable };
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "cn";
3
+ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "../../table.js";
4
+ import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
5
+ const cellWidths = ["w-24", "w-32", "w-20", "w-28", "w-16"];
6
+ function cellWidth(column) {
7
+ return cellWidths[column % cellWidths.length];
8
+ }
9
+ function indexes(count) {
10
+ return Array.from({ length: Math.max(1, Math.floor(count)) }, (_, index) => index);
11
+ }
12
+ function SkeletonTable({ rows = 5, columns = 4, label, className, ...props }) {
13
+ const columnIndexes = indexes(columns);
14
+ return (_jsxs("div", { "data-slot": "skeleton-table", ...skeletonRootProps, className: cn("w-full", className), ...props, children: [_jsxs(Table, { "aria-hidden": "true", children: [_jsx(TableHeader, { children: _jsx(TableRow, { className: "hover:bg-transparent", children: columnIndexes.map((column) => (_jsx(TableHead, { children: _jsx(SkeletonBar, { className: "h-3 w-16" }) }, column))) }) }), _jsx(TableBody, { children: indexes(rows).map((row) => (_jsx(TableRow, { "data-slot": "skeleton-table-row", className: "hover:bg-transparent", children: columnIndexes.map((column) => (_jsx(TableCell, { children: _jsx(SkeletonBar, { className: cn("h-4", cellWidth(column)) }) }, column))) }, row))) })] }), _jsx(SkeletonLoadingLabel, { children: label })] }));
15
+ }
16
+ export { SkeletonTable };
@@ -0,0 +1,10 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type * as React from "react";
3
+ declare const skeletonAvatarVariants: (props?: ({
4
+ size?: "lg" | "md" | "sm" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ type SkeletonAvatarProps = React.ComponentProps<"div"> & VariantProps<typeof skeletonAvatarVariants> & {
7
+ label?: string;
8
+ };
9
+ declare function SkeletonAvatar({ size, label, className, ...props }: SkeletonAvatarProps): React.JSX.Element;
10
+ export { SkeletonAvatar, skeletonAvatarVariants };
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "cn";
4
+ import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
5
+ const skeletonAvatarVariants = cva("rounded-full", {
6
+ variants: {
7
+ size: {
8
+ sm: "size-6",
9
+ md: "size-8",
10
+ lg: "size-10",
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ size: "md",
15
+ },
16
+ });
17
+ function SkeletonAvatar({ size = "md", label, className, ...props }) {
18
+ return (_jsxs("div", { "data-slot": "skeleton-avatar", "data-size": size, ...skeletonRootProps, className: cn("inline-flex shrink-0", className), ...props, children: [_jsx(SkeletonBar, { className: skeletonAvatarVariants({ size }) }), _jsx(SkeletonLoadingLabel, { children: label })] }));
19
+ }
20
+ export { SkeletonAvatar, skeletonAvatarVariants };
@@ -0,0 +1,10 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type * as React from "react";
3
+ declare const skeletonButtonVariants: (props?: ({
4
+ size?: "default" | "lg" | "sm" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ type SkeletonButtonProps = React.ComponentProps<"div"> & VariantProps<typeof skeletonButtonVariants> & {
7
+ label?: string;
8
+ };
9
+ declare function SkeletonButton({ size, label, className, ...props }: SkeletonButtonProps): React.JSX.Element;
10
+ export { SkeletonButton, skeletonButtonVariants };
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "cn";
4
+ import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
5
+ const skeletonButtonVariants = cva("rounded-full", {
6
+ variants: {
7
+ size: {
8
+ sm: "h-8 w-20",
9
+ default: "h-9 w-24",
10
+ lg: "h-10 w-28",
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ size: "default",
15
+ },
16
+ });
17
+ function SkeletonButton({ size = "default", label, className, ...props }) {
18
+ return (_jsxs("div", { "data-slot": "skeleton-button", "data-size": size, ...skeletonRootProps, className: cn("inline-flex shrink-0", className), ...props, children: [_jsx(SkeletonBar, { className: skeletonButtonVariants({ size }) }), _jsx(SkeletonLoadingLabel, { children: label })] }));
19
+ }
20
+ export { SkeletonButton, skeletonButtonVariants };
@@ -0,0 +1,7 @@
1
+ import type * as React from "react";
2
+ type SkeletonTextProps = React.ComponentProps<"div"> & {
3
+ lines?: number;
4
+ label?: string;
5
+ };
6
+ declare function SkeletonText({ lines, label, className, ...props }: SkeletonTextProps): React.JSX.Element;
7
+ export { SkeletonText };
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "cn";
3
+ import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
4
+ function lineWidth(index, lines) {
5
+ return lines > 1 && index === lines - 1 ? "w-3/5" : "w-full";
6
+ }
7
+ function SkeletonText({ lines = 3, label, className, ...props }) {
8
+ const count = Math.max(1, Math.floor(lines));
9
+ return (_jsxs("div", { "data-slot": "skeleton-text", ...skeletonRootProps, className: cn("flex w-full flex-col gap-2", className), ...props, children: [Array.from({ length: count }, (_, index) => (_jsx(SkeletonBar
10
+ // biome-ignore lint/suspicious/noArrayIndexKey: placeholder lines have no identity
11
+ , { "data-slot": "skeleton-text-line", className: cn("h-4", lineWidth(index, count)) }, index))), _jsx(SkeletonLoadingLabel, { children: label })] }));
12
+ }
13
+ export { SkeletonText };
@@ -0,0 +1,11 @@
1
+ import type * as React from "react";
2
+ import { Skeleton } from "../status/skeleton.js";
3
+ declare function SkeletonBar({ className, ...props }: React.ComponentProps<typeof Skeleton>): React.JSX.Element;
4
+ declare function SkeletonLoadingLabel({ children }: {
5
+ children?: React.ReactNode;
6
+ }): React.JSX.Element;
7
+ declare const skeletonRootProps: {
8
+ readonly role: "status";
9
+ readonly "aria-busy": true;
10
+ };
11
+ export { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps };
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "cn";
3
+ import { Skeleton } from "../status/skeleton.js";
4
+ function SkeletonBar({ className, ...props }) {
5
+ return (_jsx(Skeleton, { "aria-hidden": "true", className: cn("rounded-none bg-skeleton motion-reduce:animate-none", className), ...props }));
6
+ }
7
+ function SkeletonLoadingLabel({ children = "Loading…" }) {
8
+ return (_jsx("span", { "data-slot": "skeleton-loading-label", className: "sr-only", children: children }));
9
+ }
10
+ const skeletonRootProps = { role: "status", "aria-busy": true };
11
+ export { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps };
@@ -1,7 +1,7 @@
1
1
  import { type VariantProps } from "class-variance-authority";
2
2
  import * as React from "react";
3
3
  declare const alertVariants: (props?: ({
4
- variant?: "default" | "destructive" | null | undefined;
4
+ variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
5
5
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
6
  declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
7
7
  declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "cn";
4
- const alertVariants = cva("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current", {
4
+ const alertVariants = cva("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5", {
5
5
  variants: {
6
6
  variant: {
7
7
  default: "bg-card text-card-foreground",
8
- destructive: "bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current",
8
+ success: "border-good/30 bg-good/5 text-card-foreground [&>svg]:text-good",
9
+ warning: "border-warn/30 bg-warn/5 text-card-foreground [&>svg]:text-warn",
10
+ destructive: "border-destructive/30 bg-destructive/5 text-card-foreground [&>svg]:text-destructive *:data-[slot=alert-title]:text-destructive",
9
11
  },
10
12
  },
11
13
  defaultVariants: {
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cva } from "class-variance-authority";
3
3
  import { cn } from "cn";
4
4
  function Empty({ className, ...props }) {
5
- return (_jsx("div", { "data-slot": "empty", className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12", className), ...props }));
5
+ return (_jsx("div", { "data-slot": "empty", className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-6 p-6 text-center text-balance md:p-12", className), ...props }));
6
6
  }
7
7
  function EmptyHeader({ className, ...props }) {
8
8
  return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className), ...props }));
@@ -1,4 +1,8 @@
1
1
  import * as ProgressPrimitive from "radix-ui/progress";
2
2
  import * as React from "react";
3
- declare function Progress({ className, value, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root>): React.JSX.Element;
3
+ type ProgressTone = "default" | "good" | "warn" | "destructive" | "auto";
4
+ declare function Progress({ className, value, max, tone, ...props }: React.ComponentProps<typeof ProgressPrimitive.Root> & {
5
+ tone?: ProgressTone;
6
+ }): React.JSX.Element;
7
+ export type { ProgressTone };
4
8
  export { Progress };
@@ -2,7 +2,24 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { cn } from "cn";
4
4
  import * as ProgressPrimitive from "radix-ui/progress";
5
- function Progress({ className, value, ...props }) {
6
- return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: "h-full w-full flex-1 bg-primary transition-all", style: { transform: `translateX(-${100 - (value || 0)}%)` } }) }));
5
+ const indicatorToneClass = {
6
+ default: "bg-primary",
7
+ good: "bg-good",
8
+ warn: "bg-warn",
9
+ destructive: "bg-destructive",
10
+ };
11
+ function resolveTone(tone, percent) {
12
+ if (tone !== "auto")
13
+ return tone;
14
+ if (percent >= 100)
15
+ return "destructive";
16
+ if (percent >= 80)
17
+ return "warn";
18
+ return "default";
19
+ }
20
+ function Progress({ className, value, max = 100, tone = "default", ...props }) {
21
+ const percent = max > 0 ? ((value ?? 0) / max) * 100 : 0;
22
+ const resolvedTone = resolveTone(tone, percent);
23
+ return (_jsx(ProgressPrimitive.Root, { "data-slot": "progress", "data-tone": resolvedTone, value: value, max: max, className: cn("relative h-2 w-full overflow-hidden rounded-full bg-primary/20", className), ...props, children: _jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", className: cn("h-full w-full flex-1 transition-all", indicatorToneClass[resolvedTone]), style: { transform: `translateX(-${100 - Math.min(percent, 100)}%)` } }) }));
7
24
  }
8
25
  export { Progress };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cn } from "cn";
3
3
  function Skeleton({ className, ...props }) {
4
- return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-accent", className), ...props }));
4
+ return (_jsx("div", { "data-slot": "skeleton", className: cn("animate-pulse rounded-md bg-skeleton", className), ...props }));
5
5
  }
6
6
  export { Skeleton };
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { InProgress as Loader2Icon } from "@carbon/icons-react";
2
3
  import { cn } from "cn";
3
- import { Loader2Icon } from "lucide-react";
4
4
  function Spinner({ className, ...props }) {
5
5
  return (_jsx(Loader2Icon, { role: "status", "aria-label": "Loading", className: cn("size-4 animate-spin", className), ...props }));
6
6
  }
@@ -16,7 +16,7 @@ function TableRow({ className, ...props }) {
16
16
  return (_jsx("tr", { "data-slot": "table-row", className: cn("border-b transition-colors duration-150 ease-out hover:bg-muted/40 has-aria-expanded:bg-muted/50 data-[state=selected]:bg-muted", className), ...props }));
17
17
  }
18
18
  function TableHead({ className, ...props }) {
19
- return (_jsx("th", { "data-slot": "table-head", className: cn("h-9 px-3 text-left align-middle font-mono sm:px-4 text-[11.5px] font-normal whitespace-nowrap text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
19
+ return (_jsx("th", { "data-slot": "table-head", className: cn("eyebrow h-9 px-3 text-left align-middle font-normal whitespace-nowrap sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
20
20
  }
21
21
  function TableCell({ className, ...props }) {
22
22
  return (_jsx("td", { "data-slot": "table-cell", className: cn("px-3 py-2.5 align-middle whitespace-nowrap tabular-nums sm:px-4 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className), ...props }));
@@ -1,5 +1,5 @@
1
1
  import type * as React from "react";
2
2
  import { type ToasterProps } from "sonner";
3
- declare function Toaster({ theme, ...props }: ToasterProps): React.JSX.Element;
3
+ declare function Toaster({ theme, toastOptions, ...props }: ToasterProps): React.JSX.Element;
4
4
  export { toast } from "sonner";
5
5
  export { Toaster };
@@ -1,26 +1,24 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { CircleCheckIcon, InfoIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, } from "lucide-react";
3
+ import { CheckmarkOutline as CircleCheckIcon, Information as InfoIcon, InProgress as Loader2Icon, ErrorOutline as OctagonXIcon, WarningAlt as TriangleAlertIcon, } from "@carbon/icons-react";
4
4
  import { Toaster as Sonner } from "sonner";
5
- function statusColors(type, color) {
6
- return {
7
- [`--${type}-bg`]: `color-mix(in srgb, var(${color}) 8%, var(--popover))`,
8
- [`--${type}-border`]: `color-mix(in srgb, var(${color}) 30%, var(--popover))`,
9
- [`--${type}-text`]: `var(${color})`,
10
- };
11
- }
12
5
  const toasterColors = {
13
6
  "--normal-bg": "var(--popover)",
14
7
  "--normal-text": "var(--popover-foreground)",
15
8
  "--normal-border": "var(--border)",
16
9
  "--border-radius": "var(--radius)",
17
- ...statusColors("success", "--good"),
18
- ...statusColors("info", "--info"),
19
- ...statusColors("warning", "--warn"),
20
- ...statusColors("error", "--bad"),
21
10
  };
22
- function Toaster({ theme = "system", ...props }) {
23
- return (_jsx(Sonner, { theme: theme, richColors: true, className: "toaster group", icons: {
11
+ const statusRuleClassNames = {
12
+ success: "border-l-2! border-l-good! [&_[data-icon]]:text-good",
13
+ info: "border-l-2! border-l-info! [&_[data-icon]]:text-info",
14
+ warning: "border-l-2! border-l-warn! [&_[data-icon]]:text-warn",
15
+ error: "border-l-2! border-l-destructive! [&_[data-icon]]:text-destructive",
16
+ };
17
+ function Toaster({ theme = "system", toastOptions, ...props }) {
18
+ return (_jsx(Sonner, { theme: theme, className: "toaster group", toastOptions: {
19
+ ...toastOptions,
20
+ classNames: { ...statusRuleClassNames, ...toastOptions?.classNames },
21
+ }, icons: {
24
22
  success: _jsx(CircleCheckIcon, { className: "size-4" }),
25
23
  info: _jsx(InfoIcon, { className: "size-4" }),
26
24
  warning: _jsx(TriangleAlertIcon, { className: "size-4" }),
@@ -14,6 +14,6 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
14
14
  return (_jsx(Button, { ref: ref, variant: "ghost", size: "icon", "data-day": day.date.toLocaleDateString(), "data-selected-single": modifiers.selected &&
15
15
  !modifiers.range_start &&
16
16
  !modifiers.range_end &&
17
- !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className), ...props }));
17
+ !modifiers.range_middle, "data-range-start": modifiers.range_start, "data-range-end": modifiers.range_end, "data-range-middle": modifiers.range_middle, className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-2 group-data-[focused=true]/day:ring-ring/70 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:rounded-none data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className), ...props }));
18
18
  }
19
19
  export { CalendarDayButton };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ChevronDown as ChevronDownIcon, ChevronLeft as ChevronLeftIcon, ChevronRight as ChevronRightIcon, } from "@carbon/icons-react";
3
4
  import { cn } from "cn";
4
- import { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
5
5
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
6
6
  import { buttonVariants } from "../../action/button.js";
7
7
  import { CalendarDayButton } from "./calendar-day-button.js";
@@ -19,17 +19,17 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
19
19
  button_next: cn(buttonVariants({ variant: buttonVariant }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
20
20
  month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
21
21
  dropdowns: cn("flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium", defaultClassNames.dropdowns),
22
- dropdown_root: cn("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50", defaultClassNames.dropdown_root),
22
+ dropdown_root: cn("relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-1 has-focus:ring-ring", defaultClassNames.dropdown_root),
23
23
  dropdown: cn("absolute inset-0 bg-popover opacity-0", defaultClassNames.dropdown),
24
24
  caption_label: cn("font-medium select-none", captionLayout === "label"
25
25
  ? "text-sm"
26
26
  : "flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground", defaultClassNames.caption_label),
27
27
  month_grid: cn("w-full border-collapse", defaultClassNames.month_grid),
28
28
  weekdays: cn("flex", defaultClassNames.weekdays),
29
- weekday: cn("flex-1 rounded-md text-[0.8rem] font-normal text-muted-foreground select-none", defaultClassNames.weekday),
29
+ weekday: cn("flex-1 rounded-md text-xs font-normal text-muted-foreground select-none", defaultClassNames.weekday),
30
30
  week: cn("mt-2 flex w-full", defaultClassNames.week),
31
31
  week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
32
- week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
32
+ week_number: cn("text-xs text-muted-foreground select-none", defaultClassNames.week_number),
33
33
  day: cn("group/day relative aspect-square h-full w-full p-0 text-center select-none [&:last-child[data-selected=true]_button]:rounded-r-md", props.showWeekNumber
34
34
  ? "[&:nth-child(2)[data-selected=true]_button]:rounded-l-md"
35
35
  : "[&:first-child[data-selected=true]_button]:rounded-l-md", defaultClassNames.day),