@siyahi/ui 0.1.9-next.33 → 0.1.9-next.35

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 (106) hide show
  1. package/DESIGN.md +21 -7
  2. package/README.md +5 -5
  3. package/agents/examples/app-sidebar.tsx +0 -2
  4. package/agents/examples/chart-panels-three.tsx +51 -0
  5. package/agents/examples/context-menu.tsx +14 -4
  6. package/agents/examples/overview-dashboard.tsx +2 -2
  7. package/agents/examples/{page-hero.tsx → page-header.tsx} +4 -4
  8. package/agents/examples/select.tsx +2 -1
  9. package/agents/manifest.json +16 -5
  10. package/dist/components/registry/charts/area-chart-card.js +1 -0
  11. package/dist/components/registry/charts/bar-chart-card.js +0 -2
  12. package/dist/components/registry/heatmap/calendar-heatmap.js +1 -1
  13. package/dist/components/registry/heatmap/status-heatmap.js +1 -1
  14. package/dist/components/registry/heatmap/weekday-heatmap.js +1 -1
  15. package/dist/components/registry/niko-table/core/data-table-error-boundary.js +1 -1
  16. package/dist/components/registry/niko-table/core/data-table-structure.js +6 -0
  17. package/dist/components/registry/niko-table/core/data-table.js +1 -1
  18. package/dist/components/registry/niko-table/filters/table-column-sort.js +2 -2
  19. package/dist/components/registry/niko-table/filters/table-faceted-filter.js +3 -3
  20. package/dist/components/registry/niko-table/lib/column-resize-handle.js +1 -1
  21. package/dist/components/registry/sidebar-07/nav-user.js +16 -19
  22. package/dist/components/siyahi/{page-hero.d.ts → page-header.d.ts} +3 -3
  23. package/dist/components/siyahi/{page-hero.js → page-header.js} +4 -4
  24. package/dist/components/siyahi/panel-grid.d.ts +5 -2
  25. package/dist/components/siyahi/panel-grid.js +1 -1
  26. package/dist/components/siyahi/range-position.js +1 -1
  27. package/dist/components/siyahi/scatter-chart.js +15 -2
  28. package/dist/components/siyahi/status-badge.js +1 -0
  29. package/dist/components/siyahi/target-rows.js +2 -2
  30. package/dist/components/siyahi/treemap.js +0 -3
  31. package/dist/components/ui/alert-dialog.d.ts +20 -0
  32. package/dist/components/ui/alert-dialog.js +94 -0
  33. package/dist/components/ui/aspect-ratio.d.ts +6 -0
  34. package/dist/components/ui/aspect-ratio.js +13 -0
  35. package/dist/components/ui/attachment.d.ts +25 -0
  36. package/dist/components/ui/attachment.js +104 -0
  37. package/dist/components/ui/bubble.d.ts +18 -0
  38. package/dist/components/ui/bubble.js +73 -0
  39. package/dist/components/ui/button-group.d.ts +12 -0
  40. package/dist/components/ui/button-group.js +41 -0
  41. package/dist/components/ui/button.d.ts +1 -1
  42. package/dist/components/ui/button.js +1 -1
  43. package/dist/components/ui/carousel.d.ts +30 -0
  44. package/dist/components/ui/carousel.js +131 -0
  45. package/dist/components/ui/checkbox.d.ts +5 -0
  46. package/dist/components/ui/checkbox.js +20 -0
  47. package/dist/components/ui/combobox.d.ts +26 -0
  48. package/dist/components/ui/combobox.js +162 -0
  49. package/dist/components/ui/command.js +1 -1
  50. package/dist/components/ui/direction.d.ts +2 -0
  51. package/dist/components/ui/direction.js +1 -0
  52. package/dist/components/ui/drawer.d.ts +18 -0
  53. package/dist/components/ui/drawer.js +123 -0
  54. package/dist/components/ui/empty.d.ts +13 -0
  55. package/dist/components/ui/empty.js +59 -0
  56. package/dist/components/ui/field.js +1 -1
  57. package/dist/components/ui/hover-card.d.ts +7 -0
  58. package/dist/components/ui/hover-card.js +36 -0
  59. package/dist/components/ui/input-otp.d.ts +13 -0
  60. package/dist/components/ui/input-otp.js +46 -0
  61. package/dist/components/ui/item.d.ts +24 -0
  62. package/dist/components/ui/item.js +121 -0
  63. package/dist/components/ui/kbd.d.ts +5 -0
  64. package/dist/components/ui/kbd.js +19 -0
  65. package/dist/components/ui/marker.d.ts +12 -0
  66. package/dist/components/ui/marker.js +43 -0
  67. package/dist/components/ui/menubar.d.ts +31 -0
  68. package/dist/components/ui/menubar.js +136 -0
  69. package/dist/components/ui/message-scroller.d.ts +12 -0
  70. package/dist/components/ui/message-scroller.js +60 -0
  71. package/dist/components/ui/message.d.ts +12 -0
  72. package/dist/components/ui/message.js +49 -0
  73. package/dist/components/ui/native-select.d.ts +10 -0
  74. package/dist/components/ui/native-select.js +38 -0
  75. package/dist/components/ui/navigation-menu.d.ts +13 -0
  76. package/dist/components/ui/navigation-menu.js +82 -0
  77. package/dist/components/ui/pagination.d.ts +19 -0
  78. package/dist/components/ui/pagination.js +80 -0
  79. package/dist/components/ui/questionnaire.d.ts +21 -0
  80. package/dist/components/ui/questionnaire.js +170 -0
  81. package/dist/components/ui/radio-group.d.ts +7 -0
  82. package/dist/components/ui/radio-group.js +26 -0
  83. package/dist/components/ui/resizable.d.ts +9 -0
  84. package/dist/components/ui/resizable.js +28 -0
  85. package/dist/components/ui/sidebar.js +1 -1
  86. package/dist/components/ui/spinner.d.ts +4 -0
  87. package/dist/components/ui/spinner.js +15 -0
  88. package/dist/components/ui/switch.d.ts +7 -0
  89. package/dist/components/ui/switch.js +19 -0
  90. package/dist/components/ui/toast.d.ts +18 -0
  91. package/dist/components/ui/toast.js +123 -0
  92. package/dist/components/ui/trace.d.ts +20 -0
  93. package/dist/components/ui/trace.js +75 -0
  94. package/dist/index.d.ts +32 -2
  95. package/dist/index.js +35 -5
  96. package/dist/lib/chart-frame.d.ts +37 -9
  97. package/dist/lib/chart-frame.js +60 -30
  98. package/dist/lib/chart-series.d.ts +3 -2
  99. package/dist/lib/ticks.d.ts +9 -0
  100. package/dist/lib/ticks.js +25 -3
  101. package/dist/lib/use-render-when-fonts-load.d.ts +11 -0
  102. package/dist/lib/use-render-when-fonts-load.js +49 -0
  103. package/package.json +5 -3
  104. package/styles/siyahi.css +224 -26
  105. package/agents/report-rules.json +0 -7
  106. package/report.css +0 -145
@@ -0,0 +1,13 @@
1
+ import * as React$1 from "react";
2
+ import { OTPInput } from "input-otp";
3
+ //#region src/components/ui/input-otp.d.ts
4
+ declare function InputOTP({ className, containerClassName, ...props }: React$1.ComponentProps<typeof OTPInput> & {
5
+ containerClassName?: string;
6
+ }): React$1.JSX.Element;
7
+ declare function InputOTPGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
8
+ declare function InputOTPSlot({ index, className, ...props }: React$1.ComponentProps<"div"> & {
9
+ index: number;
10
+ }): React$1.JSX.Element;
11
+ declare function InputOTPSeparator({ ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
12
+ //#endregion
13
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,46 @@
1
+ import { cn } from "cn";
2
+ import { MinusIcon } from "lucide-react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ import * as React$1 from "react";
5
+ import { OTPInput, OTPInputContext } from "input-otp";
6
+ //#region src/components/ui/input-otp.tsx
7
+ function InputOTP({ className, containerClassName, ...props }) {
8
+ return /* @__PURE__ */ jsx(OTPInput, {
9
+ "data-slot": "input-otp",
10
+ containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName),
11
+ spellCheck: false,
12
+ className: cn("disabled:cursor-not-allowed", className),
13
+ ...props
14
+ });
15
+ }
16
+ function InputOTPGroup({ className, ...props }) {
17
+ return /* @__PURE__ */ jsx("div", {
18
+ "data-slot": "input-otp-group",
19
+ className: cn("flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40", className),
20
+ ...props
21
+ });
22
+ }
23
+ function InputOTPSlot({ index, className, ...props }) {
24
+ const { char, hasFakeCaret, isActive } = React$1.useContext(OTPInputContext)?.slots[index] ?? {};
25
+ return /* @__PURE__ */ jsxs("div", {
26
+ "data-slot": "input-otp-slot",
27
+ "data-active": isActive,
28
+ className: cn("relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40", className),
29
+ ...props,
30
+ children: [char, hasFakeCaret && /* @__PURE__ */ jsx("div", {
31
+ className: "pointer-events-none absolute inset-0 flex items-center justify-center",
32
+ children: /* @__PURE__ */ jsx("div", { className: "h-4 w-px animate-caret-blink bg-foreground duration-1000" })
33
+ })]
34
+ });
35
+ }
36
+ function InputOTPSeparator({ ...props }) {
37
+ return /* @__PURE__ */ jsx("div", {
38
+ "data-slot": "input-otp-separator",
39
+ className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
40
+ role: "separator",
41
+ ...props,
42
+ children: /* @__PURE__ */ jsx(MinusIcon, {})
43
+ });
44
+ }
45
+ //#endregion
46
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,24 @@
1
+ import { Separator } from "./separator.js";
2
+ import * as React$1 from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+ import { useRender } from "@base-ui/react/use-render";
5
+ //#region src/components/ui/item.d.ts
6
+ declare function ItemGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
7
+ declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): React$1.JSX.Element;
8
+ declare const itemVariants: (props?: ({
9
+ variant?: "default" | "muted" | "outline" | null | undefined;
10
+ size?: "default" | "sm" | "xs" | null | undefined;
11
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
12
+ declare function Item({ className, variant, size, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof itemVariants>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
13
+ declare const itemMediaVariants: (props?: ({
14
+ variant?: "default" | "icon" | "image" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ declare function ItemMedia({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React$1.JSX.Element;
17
+ declare function ItemContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
18
+ declare function ItemTitle({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
19
+ declare function ItemDescription({ className, ...props }: React$1.ComponentProps<"p">): React$1.JSX.Element;
20
+ declare function ItemActions({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
21
+ declare function ItemHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
22
+ declare function ItemFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
23
+ //#endregion
24
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
@@ -0,0 +1,121 @@
1
+ import { Separator } from "./separator.js";
2
+ import { cn } from "cn";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import "react";
5
+ import { cva } from "class-variance-authority";
6
+ import { mergeProps } from "@base-ui/react/merge-props";
7
+ import { useRender } from "@base-ui/react/use-render";
8
+ //#region src/components/ui/item.tsx
9
+ function ItemGroup({ className, ...props }) {
10
+ return /* @__PURE__ */ jsx("div", {
11
+ role: "list",
12
+ "data-slot": "item-group",
13
+ className: cn("group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2", className),
14
+ ...props
15
+ });
16
+ }
17
+ function ItemSeparator({ className, ...props }) {
18
+ return /* @__PURE__ */ jsx(Separator, {
19
+ "data-slot": "item-separator",
20
+ orientation: "horizontal",
21
+ className: cn("my-2", className),
22
+ ...props
23
+ });
24
+ }
25
+ const itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
26
+ variants: {
27
+ variant: {
28
+ default: "border-transparent",
29
+ outline: "border-border",
30
+ muted: "border-transparent bg-muted/50"
31
+ },
32
+ size: {
33
+ default: "gap-2.5 px-3 py-2.5",
34
+ sm: "gap-2.5 px-3 py-2.5",
35
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
36
+ }
37
+ },
38
+ defaultVariants: {
39
+ variant: "default",
40
+ size: "default"
41
+ }
42
+ });
43
+ function Item({ className, variant = "default", size = "default", render, ...props }) {
44
+ return useRender({
45
+ defaultTagName: "div",
46
+ props: mergeProps({ className: cn(itemVariants({
47
+ variant,
48
+ size,
49
+ className
50
+ })) }, props),
51
+ render,
52
+ state: {
53
+ slot: "item",
54
+ variant,
55
+ size
56
+ }
57
+ });
58
+ }
59
+ const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none", {
60
+ variants: { variant: {
61
+ default: "bg-transparent",
62
+ icon: "[&_svg:not([class*='size-'])]:size-4",
63
+ image: "size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover"
64
+ } },
65
+ defaultVariants: { variant: "default" }
66
+ });
67
+ function ItemMedia({ className, variant = "default", ...props }) {
68
+ return /* @__PURE__ */ jsx("div", {
69
+ "data-slot": "item-media",
70
+ "data-variant": variant,
71
+ className: cn(itemMediaVariants({
72
+ variant,
73
+ className
74
+ })),
75
+ ...props
76
+ });
77
+ }
78
+ function ItemContent({ className, ...props }) {
79
+ return /* @__PURE__ */ jsx("div", {
80
+ "data-slot": "item-content",
81
+ className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
82
+ ...props
83
+ });
84
+ }
85
+ function ItemTitle({ className, ...props }) {
86
+ return /* @__PURE__ */ jsx("div", {
87
+ "data-slot": "item-title",
88
+ className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
89
+ ...props
90
+ });
91
+ }
92
+ function ItemDescription({ className, ...props }) {
93
+ return /* @__PURE__ */ jsx("p", {
94
+ "data-slot": "item-description",
95
+ className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
96
+ ...props
97
+ });
98
+ }
99
+ function ItemActions({ className, ...props }) {
100
+ return /* @__PURE__ */ jsx("div", {
101
+ "data-slot": "item-actions",
102
+ className: cn("flex items-center gap-2", className),
103
+ ...props
104
+ });
105
+ }
106
+ function ItemHeader({ className, ...props }) {
107
+ return /* @__PURE__ */ jsx("div", {
108
+ "data-slot": "item-header",
109
+ className: cn("flex basis-full items-center justify-between gap-2", className),
110
+ ...props
111
+ });
112
+ }
113
+ function ItemFooter({ className, ...props }) {
114
+ return /* @__PURE__ */ jsx("div", {
115
+ "data-slot": "item-footer",
116
+ className: cn("flex basis-full items-center justify-between gap-2", className),
117
+ ...props
118
+ });
119
+ }
120
+ //#endregion
121
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
@@ -0,0 +1,5 @@
1
+ //#region src/components/ui/kbd.d.ts
2
+ declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): import("react").JSX.Element;
3
+ declare function KbdGroup({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
4
+ //#endregion
5
+ export { Kbd, KbdGroup };
@@ -0,0 +1,19 @@
1
+ import { cn } from "cn";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/components/ui/kbd.tsx
4
+ function Kbd({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx("kbd", {
6
+ "data-slot": "kbd",
7
+ 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 in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3", className),
8
+ ...props
9
+ });
10
+ }
11
+ function KbdGroup({ className, ...props }) {
12
+ return /* @__PURE__ */ jsx("kbd", {
13
+ "data-slot": "kbd-group",
14
+ className: cn("inline-flex items-center gap-1", className),
15
+ ...props
16
+ });
17
+ }
18
+ //#endregion
19
+ export { Kbd, KbdGroup };
@@ -0,0 +1,12 @@
1
+ import * as React$1 from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ //#region src/components/ui/marker.d.ts
5
+ declare const markerVariants: (props?: ({
6
+ variant?: "border" | "default" | "separator" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ declare function Marker({ className, variant, render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
9
+ declare function MarkerIcon({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
10
+ declare function MarkerContent({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
11
+ //#endregion
12
+ export { Marker, MarkerContent, MarkerIcon, markerVariants };
@@ -0,0 +1,43 @@
1
+ import { cn } from "cn";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import "react";
4
+ import { cva } from "class-variance-authority";
5
+ import { mergeProps } from "@base-ui/react/merge-props";
6
+ import { useRender } from "@base-ui/react/use-render";
7
+ //#region src/components/ui/marker.tsx
8
+ const markerVariants = cva("group/marker relative flex min-h-4 w-full items-center gap-2 text-left text-sm text-muted-foreground [&_svg:not([class*='size-'])]:size-4 [a]:underline [a]:underline-offset-3 [a]:hover:text-foreground", { variants: { variant: {
9
+ default: "",
10
+ separator: "before:mr-1 before:h-px before:min-w-0 before:flex-1 before:bg-border after:ml-1 after:h-px after:min-w-0 after:flex-1 after:bg-border",
11
+ border: "border-b border-border pb-2"
12
+ } } });
13
+ function Marker({ className, variant = "default", render, ...props }) {
14
+ return useRender({
15
+ defaultTagName: "div",
16
+ props: mergeProps({ className: cn(markerVariants({
17
+ variant,
18
+ className
19
+ })) }, props),
20
+ render,
21
+ state: {
22
+ slot: "marker",
23
+ variant
24
+ }
25
+ });
26
+ }
27
+ function MarkerIcon({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx("span", {
29
+ "data-slot": "marker-icon",
30
+ "aria-hidden": "true",
31
+ className: cn("size-4 shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
32
+ ...props
33
+ });
34
+ }
35
+ function MarkerContent({ className, ...props }) {
36
+ return /* @__PURE__ */ jsx("span", {
37
+ "data-slot": "marker-content",
38
+ className: cn("min-w-0 wrap-break-word group-data-[variant=separator]/marker:flex-none group-data-[variant=separator]/marker:text-center *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
39
+ ...props
40
+ });
41
+ }
42
+ //#endregion
43
+ export { Marker, MarkerContent, MarkerIcon, markerVariants };
@@ -0,0 +1,31 @@
1
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
2
+ import * as React$1 from "react";
3
+ import { Menu } from "@base-ui/react/menu";
4
+ import { Menubar as Menubar$1 } from "@base-ui/react/menubar";
5
+ //#region src/components/ui/menubar.d.ts
6
+ declare function Menubar({ className, ...props }: Menubar$1.Props): React$1.JSX.Element;
7
+ declare function MenubarMenu({ ...props }: React$1.ComponentProps<typeof DropdownMenu>): React$1.JSX.Element;
8
+ declare function MenubarGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuGroup>): React$1.JSX.Element;
9
+ declare function MenubarPortal({ ...props }: React$1.ComponentProps<typeof DropdownMenuPortal>): React$1.JSX.Element;
10
+ declare function MenubarTrigger({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuTrigger>): React$1.JSX.Element;
11
+ declare function MenubarContent({ className, align, alignOffset, sideOffset, ...props }: React$1.ComponentProps<typeof DropdownMenuContent>): React$1.JSX.Element;
12
+ declare function MenubarItem({ className, inset, variant, ...props }: React$1.ComponentProps<typeof DropdownMenuItem>): React$1.JSX.Element;
13
+ declare function MenubarCheckboxItem({ className, children, checked, inset, ...props }: Menu.CheckboxItem.Props & {
14
+ inset?: boolean;
15
+ }): React$1.JSX.Element;
16
+ declare function MenubarRadioGroup({ ...props }: React$1.ComponentProps<typeof DropdownMenuRadioGroup>): React$1.JSX.Element;
17
+ declare function MenubarRadioItem({ className, children, inset, ...props }: Menu.RadioItem.Props & {
18
+ inset?: boolean;
19
+ }): React$1.JSX.Element;
20
+ declare function MenubarLabel({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenuLabel> & {
21
+ inset?: boolean;
22
+ }): React$1.JSX.Element;
23
+ declare function MenubarSeparator({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuSeparator>): React$1.JSX.Element;
24
+ declare function MenubarShortcut({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuShortcut>): React$1.JSX.Element;
25
+ declare function MenubarSub({ ...props }: React$1.ComponentProps<typeof DropdownMenuSub>): React$1.JSX.Element;
26
+ declare function MenubarSubTrigger({ className, inset, ...props }: React$1.ComponentProps<typeof DropdownMenuSubTrigger> & {
27
+ inset?: boolean;
28
+ }): React$1.JSX.Element;
29
+ declare function MenubarSubContent({ className, ...props }: React$1.ComponentProps<typeof DropdownMenuSubContent>): React$1.JSX.Element;
30
+ //#endregion
31
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
@@ -0,0 +1,136 @@
1
+ "use client";
2
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./dropdown-menu.js";
3
+ import { cn } from "cn";
4
+ import { CheckIcon } from "lucide-react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import "react";
7
+ import { Menu } from "@base-ui/react/menu";
8
+ import { Menubar as Menubar$1 } from "@base-ui/react/menubar";
9
+ //#region src/components/ui/menubar.tsx
10
+ function Menubar({ className, ...props }) {
11
+ return /* @__PURE__ */ jsx(Menubar$1, {
12
+ "data-slot": "menubar",
13
+ className: cn("flex h-8 items-center gap-0.5 rounded-lg border p-[3px]", className),
14
+ ...props
15
+ });
16
+ }
17
+ function MenubarMenu({ ...props }) {
18
+ return /* @__PURE__ */ jsx(DropdownMenu, {
19
+ "data-slot": "menubar-menu",
20
+ ...props
21
+ });
22
+ }
23
+ function MenubarGroup({ ...props }) {
24
+ return /* @__PURE__ */ jsx(DropdownMenuGroup, {
25
+ "data-slot": "menubar-group",
26
+ ...props
27
+ });
28
+ }
29
+ function MenubarPortal({ ...props }) {
30
+ return /* @__PURE__ */ jsx(DropdownMenuPortal, {
31
+ "data-slot": "menubar-portal",
32
+ ...props
33
+ });
34
+ }
35
+ function MenubarTrigger({ className, ...props }) {
36
+ return /* @__PURE__ */ jsx(DropdownMenuTrigger, {
37
+ "data-slot": "menubar-trigger",
38
+ className: cn("flex items-center rounded-sm px-1.5 py-[2px] text-sm font-medium outline-hidden select-none hover:bg-muted aria-expanded:bg-muted", className),
39
+ ...props
40
+ });
41
+ }
42
+ function MenubarContent({ className, align = "start", alignOffset = -4, sideOffset = 8, ...props }) {
43
+ return /* @__PURE__ */ jsx(DropdownMenuContent, {
44
+ "data-slot": "menubar-content",
45
+ align,
46
+ alignOffset,
47
+ sideOffset,
48
+ className: cn("min-w-36 rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95", className),
49
+ ...props
50
+ });
51
+ }
52
+ function MenubarItem({ className, inset, variant = "default", ...props }) {
53
+ return /* @__PURE__ */ jsx(DropdownMenuItem, {
54
+ "data-slot": "menubar-item",
55
+ "data-inset": inset,
56
+ "data-variant": variant,
57
+ className: cn("group/menubar-item gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive!", className),
58
+ ...props
59
+ });
60
+ }
61
+ function MenubarCheckboxItem({ className, children, checked, inset, ...props }) {
62
+ return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
63
+ "data-slot": "menubar-checkbox-item",
64
+ "data-inset": inset,
65
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
66
+ checked,
67
+ ...props,
68
+ children: [/* @__PURE__ */ jsx("span", {
69
+ className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
70
+ children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
71
+ }), children]
72
+ });
73
+ }
74
+ function MenubarRadioGroup({ ...props }) {
75
+ return /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
76
+ "data-slot": "menubar-radio-group",
77
+ ...props
78
+ });
79
+ }
80
+ function MenubarRadioItem({ className, children, inset, ...props }) {
81
+ return /* @__PURE__ */ jsxs(Menu.RadioItem, {
82
+ "data-slot": "menubar-radio-item",
83
+ "data-inset": inset,
84
+ className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
85
+ ...props,
86
+ children: [/* @__PURE__ */ jsx("span", {
87
+ className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center [&_svg:not([class*='size-'])]:size-4",
88
+ children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
89
+ }), children]
90
+ });
91
+ }
92
+ function MenubarLabel({ className, inset, ...props }) {
93
+ return /* @__PURE__ */ jsx(DropdownMenuLabel, {
94
+ "data-slot": "menubar-label",
95
+ "data-inset": inset,
96
+ className: cn("px-1.5 py-1 text-sm font-medium data-inset:pl-7", className),
97
+ ...props
98
+ });
99
+ }
100
+ function MenubarSeparator({ className, ...props }) {
101
+ return /* @__PURE__ */ jsx(DropdownMenuSeparator, {
102
+ "data-slot": "menubar-separator",
103
+ className: cn("-mx-1 my-1 h-px bg-border", className),
104
+ ...props
105
+ });
106
+ }
107
+ function MenubarShortcut({ className, ...props }) {
108
+ return /* @__PURE__ */ jsx(DropdownMenuShortcut, {
109
+ "data-slot": "menubar-shortcut",
110
+ className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/menubar-item:text-accent-foreground", className),
111
+ ...props
112
+ });
113
+ }
114
+ function MenubarSub({ ...props }) {
115
+ return /* @__PURE__ */ jsx(DropdownMenuSub, {
116
+ "data-slot": "menubar-sub",
117
+ ...props
118
+ });
119
+ }
120
+ function MenubarSubTrigger({ className, inset, ...props }) {
121
+ return /* @__PURE__ */ jsx(DropdownMenuSubTrigger, {
122
+ "data-slot": "menubar-sub-trigger",
123
+ "data-inset": inset,
124
+ className: cn("gap-1.5 rounded-md px-1.5 py-1 text-sm focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg:not([class*='size-'])]:size-4", className),
125
+ ...props
126
+ });
127
+ }
128
+ function MenubarSubContent({ className, ...props }) {
129
+ return /* @__PURE__ */ jsx(DropdownMenuSubContent, {
130
+ "data-slot": "menubar-sub-content",
131
+ className: cn("min-w-32 rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
132
+ ...props
133
+ });
134
+ }
135
+ //#endregion
136
+ export { Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
@@ -0,0 +1,12 @@
1
+ import { Button } from "./button.js";
2
+ import * as React$1 from "react";
3
+ import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
4
+ //#region src/components/ui/message-scroller.d.ts
5
+ declare function MessageScrollerProvider(props: React$1.ComponentProps<typeof MessageScroller$1.Provider>): React$1.JSX.Element;
6
+ declare function MessageScroller({ className, ...props }: React$1.ComponentProps<typeof MessageScroller$1.Root>): React$1.JSX.Element;
7
+ declare function MessageScrollerViewport({ className, ...props }: React$1.ComponentProps<typeof MessageScroller$1.Viewport>): React$1.JSX.Element;
8
+ declare function MessageScrollerContent({ className, ...props }: React$1.ComponentProps<typeof MessageScroller$1.Content>): React$1.JSX.Element;
9
+ declare function MessageScrollerItem({ className, scrollAnchor, ...props }: React$1.ComponentProps<typeof MessageScroller$1.Item>): React$1.JSX.Element;
10
+ declare function MessageScrollerButton({ direction, className, children, render, variant, size, ...props }: React$1.ComponentProps<typeof MessageScroller$1.Button> & Pick<React$1.ComponentProps<typeof Button>, "variant" | "size">): React$1.JSX.Element;
11
+ //#endregion
12
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
@@ -0,0 +1,60 @@
1
+ import { Button } from "./button.js";
2
+ import { cn } from "cn";
3
+ import { ArrowDownIcon } from "lucide-react";
4
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
+ import "react";
6
+ import { MessageScroller as MessageScroller$1, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility } from "@shadcn/react/message-scroller";
7
+ //#region src/components/ui/message-scroller.tsx
8
+ function MessageScrollerProvider(props) {
9
+ return /* @__PURE__ */ jsx(MessageScroller$1.Provider, { ...props });
10
+ }
11
+ function MessageScroller({ className, ...props }) {
12
+ return /* @__PURE__ */ jsx(MessageScroller$1.Root, {
13
+ "data-slot": "message-scroller",
14
+ className: cn("group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden", className),
15
+ ...props
16
+ });
17
+ }
18
+ function MessageScrollerViewport({ className, ...props }) {
19
+ return /* @__PURE__ */ jsx(MessageScroller$1.Viewport, {
20
+ "data-slot": "message-scroller-viewport",
21
+ className: cn("size-full min-h-0 min-w-0 scroll-fade-b scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent data-pending-scroll:invisible", className),
22
+ ...props
23
+ });
24
+ }
25
+ function MessageScrollerContent({ className, ...props }) {
26
+ return /* @__PURE__ */ jsx(MessageScroller$1.Content, {
27
+ "data-slot": "message-scroller-content",
28
+ className: cn("flex h-max min-h-full flex-col gap-6", className),
29
+ ...props
30
+ });
31
+ }
32
+ function MessageScrollerItem({ className, scrollAnchor = false, ...props }) {
33
+ return /* @__PURE__ */ jsx(MessageScroller$1.Item, {
34
+ "data-slot": "message-scroller-item",
35
+ scrollAnchor,
36
+ className: cn("min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]", className),
37
+ ...props
38
+ });
39
+ }
40
+ function MessageScrollerButton({ direction = "end", className, children, render, variant = "secondary", size = "icon-sm", ...props }) {
41
+ return /* @__PURE__ */ jsx(MessageScroller$1.Button, {
42
+ "data-slot": "message-scroller-button",
43
+ "data-direction": direction,
44
+ "data-variant": variant,
45
+ "data-size": size,
46
+ direction,
47
+ className: cn("absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[active=true]:ease-[cubic-bezier(0.23,1,0.32,1)] data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180", className),
48
+ render: render ?? /* @__PURE__ */ jsx(Button, {
49
+ variant,
50
+ size
51
+ }),
52
+ ...props,
53
+ children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(ArrowDownIcon, {}), /* @__PURE__ */ jsx("span", {
54
+ className: "sr-only",
55
+ children: direction === "end" ? "Scroll to end" : "Scroll to start"
56
+ })] })
57
+ });
58
+ }
59
+ //#endregion
60
+ export { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerProvider, MessageScrollerViewport, useMessageScroller, useMessageScrollerScrollable, useMessageScrollerVisibility };
@@ -0,0 +1,12 @@
1
+ import * as React$1 from "react";
2
+ //#region src/components/ui/message.d.ts
3
+ declare function MessageGroup({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
4
+ declare function Message({ className, align, ...props }: React$1.ComponentProps<"div"> & {
5
+ align?: "start" | "end";
6
+ }): React$1.JSX.Element;
7
+ declare function MessageAvatar({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
8
+ declare function MessageContent({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
9
+ declare function MessageHeader({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
10
+ declare function MessageFooter({ className, ...props }: React$1.ComponentProps<"div">): React$1.JSX.Element;
11
+ //#endregion
12
+ export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
@@ -0,0 +1,49 @@
1
+ import { cn } from "cn";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import "react";
4
+ //#region src/components/ui/message.tsx
5
+ function MessageGroup({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx("div", {
7
+ "data-slot": "message-group",
8
+ className: cn("flex min-w-0 flex-col gap-2", className),
9
+ ...props
10
+ });
11
+ }
12
+ function Message({ className, align = "start", ...props }) {
13
+ return /* @__PURE__ */ jsx("div", {
14
+ "data-slot": "message",
15
+ "data-align": align,
16
+ className: cn("group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse", className),
17
+ ...props
18
+ });
19
+ }
20
+ function MessageAvatar({ className, ...props }) {
21
+ return /* @__PURE__ */ jsx("div", {
22
+ "data-slot": "message-avatar",
23
+ className: cn("flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8", className),
24
+ ...props
25
+ });
26
+ }
27
+ function MessageContent({ className, ...props }) {
28
+ return /* @__PURE__ */ jsx("div", {
29
+ "data-slot": "message-content",
30
+ 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),
31
+ ...props
32
+ });
33
+ }
34
+ function MessageHeader({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx("div", {
36
+ "data-slot": "message-header",
37
+ 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),
38
+ ...props
39
+ });
40
+ }
41
+ function MessageFooter({ className, ...props }) {
42
+ return /* @__PURE__ */ jsx("div", {
43
+ "data-slot": "message-footer",
44
+ 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),
45
+ ...props
46
+ });
47
+ }
48
+ //#endregion
49
+ export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
@@ -0,0 +1,10 @@
1
+ import * as React$1 from "react";
2
+ //#region src/components/ui/native-select.d.ts
3
+ type NativeSelectProps = Omit<React$1.ComponentProps<"select">, "size"> & {
4
+ size?: "sm" | "default";
5
+ };
6
+ declare function NativeSelect({ className, size, ...props }: NativeSelectProps): React$1.JSX.Element;
7
+ declare function NativeSelectOption({ className, ...props }: React$1.ComponentProps<"option">): React$1.JSX.Element;
8
+ declare function NativeSelectOptGroup({ className, ...props }: React$1.ComponentProps<"optgroup">): React$1.JSX.Element;
9
+ //#endregion
10
+ export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };