@allbluecn/ui 0.3.13 → 0.4.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 (146) hide show
  1. package/dist/ai-command-button.d.ts +10 -0
  2. package/dist/ai-command-button.js +12 -0
  3. package/dist/ai-stream-text.d.ts +9 -0
  4. package/dist/ai-stream-text.js +12 -0
  5. package/dist/alert-dialog.d.ts +20 -0
  6. package/dist/alert-dialog.js +101 -0
  7. package/dist/animated-theme-toggler.d.ts +11 -0
  8. package/dist/animated-theme-toggler.js +169 -0
  9. package/dist/auth-client.d.ts +27 -0
  10. package/dist/auth-client.js +86 -0
  11. package/dist/auth-layout.d.ts +14 -0
  12. package/dist/auth-layout.js +43 -0
  13. package/dist/avatar.d.ts +13 -0
  14. package/dist/avatar.js +51 -0
  15. package/dist/badge.d.ts +11 -0
  16. package/dist/badge.js +28 -0
  17. package/dist/button.d.ts +12 -0
  18. package/dist/button.js +48 -0
  19. package/dist/card.d.ts +13 -0
  20. package/dist/card.js +56 -0
  21. package/dist/checkbox.d.ts +6 -0
  22. package/dist/checkbox.js +22 -0
  23. package/dist/context-menu.d.ts +33 -0
  24. package/dist/context-menu.js +125 -0
  25. package/dist/dialog.d.ts +19 -0
  26. package/dist/dialog.js +95 -0
  27. package/dist/dropdown-menu.d.ts +31 -0
  28. package/dist/dropdown-menu.js +128 -0
  29. package/dist/empty.d.ts +13 -0
  30. package/dist/empty.js +59 -0
  31. package/dist/grid-pattern.d.ts +14 -0
  32. package/dist/grid-pattern.js +47 -0
  33. package/dist/icon-packs/index.d.ts +2 -0
  34. package/dist/icon-packs/index.js +4 -0
  35. package/dist/icon-packs/knowledge.d.ts +2 -0
  36. package/dist/icon-packs/knowledge.js +70 -0
  37. package/dist/icon-packs/prd.d.ts +2 -0
  38. package/dist/icon-packs/prd.js +86 -0
  39. package/dist/icon-packs/project.d.ts +2 -0
  40. package/dist/icon-packs/project.js +74 -0
  41. package/dist/icon-picker.d.ts +11 -0
  42. package/dist/icon-picker.js +39 -0
  43. package/dist/index-CQsbeClc.d.ts +17 -0
  44. package/dist/index.d.ts +7 -0
  45. package/dist/index.js +7 -0
  46. package/dist/input.d.ts +5 -0
  47. package/dist/input.js +14 -0
  48. package/dist/item.d.ts +25 -0
  49. package/dist/item.js +118 -0
  50. package/dist/kbd.d.ts +4 -0
  51. package/dist/kbd.js +12 -0
  52. package/dist/label.d.ts +6 -0
  53. package/dist/label.js +14 -0
  54. package/dist/layout-panel-top.d.ts +12 -0
  55. package/dist/layout-panel-top.js +127 -0
  56. package/dist/name-confirm-dialog.d.ts +15 -0
  57. package/dist/name-confirm-dialog.js +105 -0
  58. package/dist/nav-float-button.d.ts +12 -0
  59. package/dist/nav-float-button.js +249 -0
  60. package/dist/notion-avatar.d.ts +13 -0
  61. package/dist/notion-avatar.js +83 -0
  62. package/dist/placeholder-page.d.ts +10 -0
  63. package/dist/placeholder-page.js +28 -0
  64. package/dist/popover.d.ts +12 -0
  65. package/dist/popover.js +56 -0
  66. package/dist/reference-inline.d.ts +10 -0
  67. package/dist/reference-inline.js +35 -0
  68. package/dist/reference-search.d.ts +12 -0
  69. package/dist/reference-search.js +26 -0
  70. package/dist/resizable.d.ts +9 -0
  71. package/dist/resizable.js +28 -0
  72. package/dist/select.d.ts +17 -0
  73. package/dist/select.js +99 -0
  74. package/dist/separator.d.ts +6 -0
  75. package/dist/separator.js +17 -0
  76. package/dist/sheet.d.ts +16 -0
  77. package/dist/sheet.js +90 -0
  78. package/dist/sidebar.d.ts +71 -0
  79. package/dist/sidebar.js +369 -0
  80. package/dist/skeleton.d.ts +4 -0
  81. package/dist/skeleton.js +12 -0
  82. package/dist/sonner.d.ts +5 -0
  83. package/dist/sonner.js +19 -0
  84. package/dist/switch.d.ts +8 -0
  85. package/dist/switch.js +19 -0
  86. package/dist/textarea.d.ts +5 -0
  87. package/dist/textarea.js +13 -0
  88. package/dist/timezone-provider.d.ts +18 -0
  89. package/dist/timezone-provider.js +29 -0
  90. package/dist/tooltip.d.ts +9 -0
  91. package/dist/tooltip.js +35 -0
  92. package/dist/use-mobile.d.ts +4 -0
  93. package/dist/use-mobile.js +18 -0
  94. package/dist/user-avatar.d.ts +14 -0
  95. package/dist/user-avatar.js +34 -0
  96. package/dist/utils.d.ts +5 -0
  97. package/dist/utils.js +8 -0
  98. package/package.json +178 -49
  99. package/src/ai-command-button.tsx +0 -36
  100. package/src/ai-stream-text.tsx +0 -37
  101. package/src/alert-dialog.tsx +0 -216
  102. package/src/animated-theme-toggler.tsx +0 -272
  103. package/src/auth-client.ts +0 -108
  104. package/src/auth-layout.tsx +0 -66
  105. package/src/avatar.tsx +0 -129
  106. package/src/badge.tsx +0 -66
  107. package/src/button.tsx +0 -84
  108. package/src/card.tsx +0 -120
  109. package/src/checkbox.tsx +0 -50
  110. package/src/context-menu.tsx +0 -280
  111. package/src/dialog.tsx +0 -183
  112. package/src/dropdown-menu.tsx +0 -286
  113. package/src/empty.tsx +0 -121
  114. package/src/grid-pattern.tsx +0 -87
  115. package/src/icon-packs/index.ts +0 -27
  116. package/src/icon-packs/knowledge.ts +0 -55
  117. package/src/icon-packs/prd.ts +0 -63
  118. package/src/icon-packs/project.ts +0 -59
  119. package/src/icon-picker.tsx +0 -68
  120. package/src/index.ts +0 -23
  121. package/src/input.tsx +0 -36
  122. package/src/item.tsx +0 -213
  123. package/src/kbd.tsx +0 -33
  124. package/src/label.tsx +0 -39
  125. package/src/layout-panel-top.tsx +0 -160
  126. package/src/name-confirm-dialog.tsx +0 -153
  127. package/src/nav-float-button.tsx +0 -301
  128. package/src/notion-avatar.tsx +0 -126
  129. package/src/placeholder-page.tsx +0 -42
  130. package/src/popover.tsx +0 -106
  131. package/src/reference-inline.tsx +0 -53
  132. package/src/reference-search.tsx +0 -52
  133. package/src/resizable.tsx +0 -67
  134. package/src/select.tsx +0 -207
  135. package/src/separator.tsx +0 -45
  136. package/src/sheet.tsx +0 -164
  137. package/src/sidebar.tsx +0 -708
  138. package/src/skeleton.tsx +0 -30
  139. package/src/sonner.tsx +0 -37
  140. package/src/switch.tsx +0 -48
  141. package/src/textarea.tsx +0 -35
  142. package/src/timezone-provider.tsx +0 -55
  143. package/src/tooltip.tsx +0 -72
  144. package/src/use-mobile.ts +0 -36
  145. package/src/user-avatar.tsx +0 -79
  146. package/src/utils.ts +0 -6
package/dist/empty.js ADDED
@@ -0,0 +1,59 @@
1
+ import { cn } from "./utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ //#region src/empty.tsx
5
+ function Empty({ className, ...props }) {
6
+ return /* @__PURE__ */ jsx("div", {
7
+ "data-slot": "empty",
8
+ className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", className),
9
+ ...props
10
+ });
11
+ }
12
+ function EmptyHeader({ className, ...props }) {
13
+ return /* @__PURE__ */ jsx("div", {
14
+ "data-slot": "empty-header",
15
+ className: cn("flex max-w-sm flex-col items-center gap-2", className),
16
+ ...props
17
+ });
18
+ }
19
+ const emptyMediaVariants = cva("mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", {
20
+ variants: { variant: {
21
+ default: "bg-transparent",
22
+ icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4"
23
+ } },
24
+ defaultVariants: { variant: "default" }
25
+ });
26
+ function EmptyMedia({ className, variant = "default", ...props }) {
27
+ return /* @__PURE__ */ jsx("div", {
28
+ "data-slot": "empty-icon",
29
+ "data-variant": variant,
30
+ className: cn(emptyMediaVariants({
31
+ variant,
32
+ className
33
+ })),
34
+ ...props
35
+ });
36
+ }
37
+ function EmptyTitle({ className, ...props }) {
38
+ return /* @__PURE__ */ jsx("div", {
39
+ "data-slot": "empty-title",
40
+ className: cn("font-heading text-sm font-medium tracking-tight", className),
41
+ ...props
42
+ });
43
+ }
44
+ function EmptyDescription({ className, ...props }) {
45
+ return /* @__PURE__ */ jsx("div", {
46
+ "data-slot": "empty-description",
47
+ className: cn("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
48
+ ...props
49
+ });
50
+ }
51
+ function EmptyContent({ className, ...props }) {
52
+ return /* @__PURE__ */ jsx("div", {
53
+ "data-slot": "empty-content",
54
+ className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", className),
55
+ ...props
56
+ });
57
+ }
58
+ //#endregion
59
+ export { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle };
@@ -0,0 +1,14 @@
1
+ //#region src/grid-pattern.d.ts
2
+ interface GridPatternProps extends React.SVGProps<SVGSVGElement> {
3
+ width?: number;
4
+ height?: number;
5
+ x?: number;
6
+ y?: number;
7
+ squares?: Array<[x: number, y: number]>;
8
+ strokeDasharray?: string;
9
+ className?: string;
10
+ [key: string]: unknown;
11
+ }
12
+ declare function GridPattern({ width, height, x, y, strokeDasharray, squares, className, ...props }: GridPatternProps): import("react/jsx-runtime").JSX.Element;
13
+ //#endregion
14
+ export { GridPattern };
@@ -0,0 +1,47 @@
1
+ import { cn } from "./utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useId } from "react";
4
+ //#region src/grid-pattern.tsx
5
+ function GridPattern({ width = 40, height = 40, x = -1, y = -1, strokeDasharray = "0", squares, className, ...props }) {
6
+ const id = useId();
7
+ return /* @__PURE__ */ jsxs("svg", {
8
+ "aria-hidden": "true",
9
+ className: cn("pointer-events-none absolute inset-0 h-full w-full fill-gray-400/30 stroke-gray-400/30", className),
10
+ ...props,
11
+ children: [
12
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("pattern", {
13
+ id,
14
+ width,
15
+ height,
16
+ patternUnits: "userSpaceOnUse",
17
+ x,
18
+ y,
19
+ children: /* @__PURE__ */ jsx("path", {
20
+ d: `M.5 ${height}V.5H${width}`,
21
+ fill: "none",
22
+ strokeDasharray
23
+ })
24
+ }) }),
25
+ /* @__PURE__ */ jsx("rect", {
26
+ width: "100%",
27
+ height: "100%",
28
+ strokeWidth: 0,
29
+ fill: `url(#${id})`
30
+ }),
31
+ squares && /* @__PURE__ */ jsx("svg", {
32
+ x,
33
+ y,
34
+ className: "overflow-visible",
35
+ children: squares.map(([x, y], i) => /* @__PURE__ */ jsx("rect", {
36
+ strokeWidth: "0",
37
+ width: width - 1,
38
+ height: height - 1,
39
+ x: x * width + 1,
40
+ y: y * height + 1
41
+ }, `${i}-${x}-${y}`))
42
+ })
43
+ ]
44
+ });
45
+ }
46
+ //#endregion
47
+ export { GridPattern };
@@ -0,0 +1,2 @@
1
+ import { i as PROJECT_ICONS, n as KNOWLEDGE_ICONS, r as PRD_ICONS, t as IconItem } from "../index-CQsbeClc.js";
2
+ export { IconItem, KNOWLEDGE_ICONS, PRD_ICONS, PROJECT_ICONS };
@@ -0,0 +1,4 @@
1
+ import { PROJECT_ICONS } from "./project.js";
2
+ import { PRD_ICONS } from "./prd.js";
3
+ import { KNOWLEDGE_ICONS } from "./knowledge.js";
4
+ export { KNOWLEDGE_ICONS, PRD_ICONS, PROJECT_ICONS };
@@ -0,0 +1,2 @@
1
+ import { n as KNOWLEDGE_ICONS } from "../index-CQsbeClc.js";
2
+ export { KNOWLEDGE_ICONS };
@@ -0,0 +1,70 @@
1
+ import { Archive, BookOpen, Bookmark, Brain, FileText, Files, FolderOpen, GraduationCap, Library, Lightbulb, Newspaper, NotebookPen, PencilLine, Quote, ScrollText, Tags } from "lucide-react";
2
+ //#region src/icon-packs/knowledge.ts
3
+ const KNOWLEDGE_ICONS = [
4
+ {
5
+ value: "bookOpen",
6
+ icon: BookOpen
7
+ },
8
+ {
9
+ value: "fileText",
10
+ icon: FileText
11
+ },
12
+ {
13
+ value: "library",
14
+ icon: Library
15
+ },
16
+ {
17
+ value: "archive",
18
+ icon: Archive
19
+ },
20
+ {
21
+ value: "bookmark",
22
+ icon: Bookmark
23
+ },
24
+ {
25
+ value: "tags",
26
+ icon: Tags
27
+ },
28
+ {
29
+ value: "lightbulb",
30
+ icon: Lightbulb
31
+ },
32
+ {
33
+ value: "graduationCap",
34
+ icon: GraduationCap
35
+ },
36
+ {
37
+ value: "brain",
38
+ icon: Brain
39
+ },
40
+ {
41
+ value: "notebookPen",
42
+ icon: NotebookPen
43
+ },
44
+ {
45
+ value: "files",
46
+ icon: Files
47
+ },
48
+ {
49
+ value: "folderOpen",
50
+ icon: FolderOpen
51
+ },
52
+ {
53
+ value: "scrollText",
54
+ icon: ScrollText
55
+ },
56
+ {
57
+ value: "newspaper",
58
+ icon: Newspaper
59
+ },
60
+ {
61
+ value: "pencilLine",
62
+ icon: PencilLine
63
+ },
64
+ {
65
+ value: "quote",
66
+ icon: Quote
67
+ }
68
+ ];
69
+ //#endregion
70
+ export { KNOWLEDGE_ICONS };
@@ -0,0 +1,2 @@
1
+ import { r as PRD_ICONS } from "../index-CQsbeClc.js";
2
+ export { PRD_ICONS };
@@ -0,0 +1,86 @@
1
+ import { AppWindow, BarChart3, Bell, Calendar, FileText, Image, Layout, LayoutGrid, Mail, MessageSquare, Monitor, MousePointerClick, Search, Settings2, ShoppingCart, Smartphone, Smile, Table2, TextCursorInput, User } from "lucide-react";
2
+ //#region src/icon-packs/prd.ts
3
+ const PRD_ICONS = [
4
+ {
5
+ value: "fileText",
6
+ icon: FileText
7
+ },
8
+ {
9
+ value: "layoutGrid",
10
+ icon: LayoutGrid
11
+ },
12
+ {
13
+ value: "mousePointerClick",
14
+ icon: MousePointerClick
15
+ },
16
+ {
17
+ value: "textCursorInput",
18
+ icon: TextCursorInput
19
+ },
20
+ {
21
+ value: "table2",
22
+ icon: Table2
23
+ },
24
+ {
25
+ value: "image",
26
+ icon: Image
27
+ },
28
+ {
29
+ value: "shoppingCart",
30
+ icon: ShoppingCart
31
+ },
32
+ {
33
+ value: "user",
34
+ icon: User
35
+ },
36
+ {
37
+ value: "settings2",
38
+ icon: Settings2
39
+ },
40
+ {
41
+ value: "mail",
42
+ icon: Mail
43
+ },
44
+ {
45
+ value: "bell",
46
+ icon: Bell
47
+ },
48
+ {
49
+ value: "search",
50
+ icon: Search
51
+ },
52
+ {
53
+ value: "calendar",
54
+ icon: Calendar
55
+ },
56
+ {
57
+ value: "barChart3",
58
+ icon: BarChart3
59
+ },
60
+ {
61
+ value: "messageSquare",
62
+ icon: MessageSquare
63
+ },
64
+ {
65
+ value: "smile",
66
+ icon: Smile
67
+ },
68
+ {
69
+ value: "monitor",
70
+ icon: Monitor
71
+ },
72
+ {
73
+ value: "smartphone",
74
+ icon: Smartphone
75
+ },
76
+ {
77
+ value: "layout",
78
+ icon: Layout
79
+ },
80
+ {
81
+ value: "appWindow",
82
+ icon: AppWindow
83
+ }
84
+ ];
85
+ //#endregion
86
+ export { PRD_ICONS };
@@ -0,0 +1,2 @@
1
+ import { i as PROJECT_ICONS } from "../index-CQsbeClc.js";
2
+ export { PROJECT_ICONS };
@@ -0,0 +1,74 @@
1
+ import { BriefcaseBusiness, Compass, Contrast, FlaskConical, FolderKanban, Globe, GraduationCap, HeartPulse, Layers, MessageSquare, Rocket, ShieldCheck, ShoppingCart, Sparkles, Sprout, Terminal, Users } from "lucide-react";
2
+ //#region src/icon-packs/project.ts
3
+ const PROJECT_ICONS = [
4
+ {
5
+ value: "folder-kanban",
6
+ icon: FolderKanban
7
+ },
8
+ {
9
+ value: "briefcase-business",
10
+ icon: BriefcaseBusiness
11
+ },
12
+ {
13
+ value: "rocket",
14
+ icon: Rocket
15
+ },
16
+ {
17
+ value: "flask",
18
+ icon: FlaskConical
19
+ },
20
+ {
21
+ value: "terminal",
22
+ icon: Terminal
23
+ },
24
+ {
25
+ value: "contrast",
26
+ icon: Contrast
27
+ },
28
+ {
29
+ value: "message-square",
30
+ icon: MessageSquare
31
+ },
32
+ {
33
+ value: "graduation-cap",
34
+ icon: GraduationCap
35
+ },
36
+ {
37
+ value: "heart-pulse",
38
+ icon: HeartPulse
39
+ },
40
+ {
41
+ value: "cart",
42
+ icon: ShoppingCart
43
+ },
44
+ {
45
+ value: "layers",
46
+ icon: Layers
47
+ },
48
+ {
49
+ value: "users",
50
+ icon: Users
51
+ },
52
+ {
53
+ value: "earth",
54
+ icon: Globe
55
+ },
56
+ {
57
+ value: "sparkles",
58
+ icon: Sparkles
59
+ },
60
+ {
61
+ value: "compass",
62
+ icon: Compass
63
+ },
64
+ {
65
+ value: "shield-check",
66
+ icon: ShieldCheck
67
+ },
68
+ {
69
+ value: "sprout",
70
+ icon: Sprout
71
+ }
72
+ ];
73
+ //#endregion
74
+ export { PROJECT_ICONS };
@@ -0,0 +1,11 @@
1
+ import { t as IconItem } from "./index-CQsbeClc.js";
2
+ //#region src/icon-picker.d.ts
3
+ interface IconPickerProps {
4
+ icons: IconItem[];
5
+ value?: string;
6
+ onChange: (value: string) => void;
7
+ className?: string;
8
+ }
9
+ declare function IconPicker({ icons, value, onChange, className }: IconPickerProps): import("react/jsx-runtime").JSX.Element;
10
+ //#endregion
11
+ export { IconPicker };
@@ -0,0 +1,39 @@
1
+ import { cn } from "./utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useTranslation } from "react-i18next";
4
+ //#region src/icon-picker.tsx
5
+ function IconPicker({ icons, value, onChange, className }) {
6
+ const { t } = useTranslation("common");
7
+ const SelectedComponent = (icons.find((icon) => icon.value === value) ?? icons[0]).icon;
8
+ return /* @__PURE__ */ jsxs("div", {
9
+ className: cn("flex flex-col items-center gap-8", className),
10
+ children: [
11
+ /* @__PURE__ */ jsx("div", {
12
+ className: "flex items-center justify-center size-24 rounded-full border border-zinc-300 bg-primary/10",
13
+ children: /* @__PURE__ */ jsx(SelectedComponent, {
14
+ size: 40,
15
+ className: "text-primary"
16
+ })
17
+ }),
18
+ /* @__PURE__ */ jsx("span", {
19
+ className: "text-sm text-muted-foreground",
20
+ children: t("iconPicker.select")
21
+ }),
22
+ /* @__PURE__ */ jsx("div", {
23
+ className: "flex flex-wrap justify-center gap-2 max-w-170",
24
+ children: icons.map((item) => {
25
+ const Icon = item.icon;
26
+ const isSelected = item.value === value;
27
+ return /* @__PURE__ */ jsx("button", {
28
+ type: "button",
29
+ onClick: () => onChange(item.value),
30
+ className: cn("flex items-center justify-center w-10 h-10 rounded-lg border transition-colors", isSelected ? "border-primary bg-primary/10 text-primary" : "border-border hover:bg-muted text-muted-foreground"),
31
+ children: /* @__PURE__ */ jsx(Icon, { size: 20 })
32
+ }, item.value);
33
+ })
34
+ })
35
+ ]
36
+ });
37
+ }
38
+ //#endregion
39
+ export { IconPicker };
@@ -0,0 +1,17 @@
1
+ import { LucideIcon } from "lucide-react";
2
+ //#region src/icon-packs/project.d.ts
3
+ declare const PROJECT_ICONS: IconItem[];
4
+ //#endregion
5
+ //#region src/icon-packs/prd.d.ts
6
+ declare const PRD_ICONS: IconItem[];
7
+ //#endregion
8
+ //#region src/icon-packs/knowledge.d.ts
9
+ declare const KNOWLEDGE_ICONS: IconItem[];
10
+ //#endregion
11
+ //#region src/icon-packs/index.d.ts
12
+ interface IconItem {
13
+ value: string;
14
+ icon: LucideIcon;
15
+ }
16
+ //#endregion
17
+ export { PROJECT_ICONS as i, KNOWLEDGE_ICONS as n, PRD_ICONS as r, IconItem as t };
@@ -0,0 +1,7 @@
1
+ import { AICommandButton } from "./ai-command-button.js";
2
+ import { AIStreamText } from "./ai-stream-text.js";
3
+ import { ReferenceInline } from "./reference-inline.js";
4
+ import { ReferenceSearch } from "./reference-search.js";
5
+ import { NotionAvatar } from "./notion-avatar.js";
6
+ import { UserAvatar } from "./user-avatar.js";
7
+ export { AICommandButton, AIStreamText, NotionAvatar, ReferenceInline, ReferenceSearch, UserAvatar };
package/dist/index.js ADDED
@@ -0,0 +1,7 @@
1
+ import { AICommandButton } from "./ai-command-button.js";
2
+ import { AIStreamText } from "./ai-stream-text.js";
3
+ import { ReferenceInline } from "./reference-inline.js";
4
+ import { ReferenceSearch } from "./reference-search.js";
5
+ import { NotionAvatar } from "./notion-avatar.js";
6
+ import { UserAvatar } from "./user-avatar.js";
7
+ export { AICommandButton, AIStreamText, NotionAvatar, ReferenceInline, ReferenceSearch, UserAvatar };
@@ -0,0 +1,5 @@
1
+ import * as React$1 from "react";
2
+ //#region src/input.d.ts
3
+ declare function Input({ className, type, ...props }: React$1.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { Input };
package/dist/input.js ADDED
@@ -0,0 +1,14 @@
1
+ import { cn } from "./utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import "react";
4
+ //#region src/input.tsx
5
+ function Input({ className, type, ...props }) {
6
+ return /* @__PURE__ */ jsx("input", {
7
+ type,
8
+ "data-slot": "input",
9
+ className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 ", className),
10
+ ...props
11
+ });
12
+ }
13
+ //#endregion
14
+ export { Input };
package/dist/item.d.ts ADDED
@@ -0,0 +1,25 @@
1
+ import { Separator } from "./separator.js";
2
+ import * as React$1 from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
+ //#region src/item.d.ts
5
+ declare function ItemGroup({ className, ...props }: React$1.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function ItemSeparator({ className, ...props }: React$1.ComponentProps<typeof Separator>): import("react/jsx-runtime").JSX.Element;
7
+ declare const itemVariants: (props?: ({
8
+ variant?: "default" | "muted" | "outline" | null | undefined;
9
+ size?: "default" | "sm" | "xs" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
+ declare function Item({ className, variant, size, asChild, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
12
+ asChild?: boolean;
13
+ }): import("react/jsx-runtime").JSX.Element;
14
+ declare const itemMediaVariants: (props?: ({
15
+ variant?: "default" | "icon" | "image" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ declare function ItemMedia({ className, variant, ...props }: React$1.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): import("react/jsx-runtime").JSX.Element;
18
+ declare function ItemContent({ className, ...props }: React$1.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
19
+ declare function ItemTitle({ className, ...props }: React$1.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
20
+ declare function ItemDescription({ className, ...props }: React$1.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
21
+ declare function ItemActions({ className, ...props }: React$1.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
22
+ declare function ItemHeader({ className, ...props }: React$1.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
23
+ declare function ItemFooter({ className, ...props }: React$1.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
24
+ //#endregion
25
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
package/dist/item.js ADDED
@@ -0,0 +1,118 @@
1
+ import { cn } from "./utils.js";
2
+ import { Separator as Separator$1 } from "./separator.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import "react";
5
+ import { Slot } from "radix-ui";
6
+ import { cva } from "class-variance-authority";
7
+ //#region src/item.tsx
8
+ function ItemGroup({ className, ...props }) {
9
+ return /* @__PURE__ */ jsx("div", {
10
+ role: "list",
11
+ "data-slot": "item-group",
12
+ 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),
13
+ ...props
14
+ });
15
+ }
16
+ function ItemSeparator({ className, ...props }) {
17
+ return /* @__PURE__ */ jsx(Separator$1, {
18
+ "data-slot": "item-separator",
19
+ orientation: "horizontal",
20
+ className: cn("my-2", className),
21
+ ...props
22
+ });
23
+ }
24
+ 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", {
25
+ variants: {
26
+ variant: {
27
+ default: "border-transparent",
28
+ outline: "border-border",
29
+ muted: "border-transparent bg-muted/50"
30
+ },
31
+ size: {
32
+ default: "gap-2.5 px-3 py-2.5",
33
+ sm: "gap-2.5 px-3 py-2.5",
34
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0"
35
+ }
36
+ },
37
+ defaultVariants: {
38
+ variant: "default",
39
+ size: "default"
40
+ }
41
+ });
42
+ function Item({ className, variant = "default", size = "default", asChild = false, ...props }) {
43
+ const Comp = asChild ? Slot.Root : "div";
44
+ return /* @__PURE__ */ jsx(Comp, {
45
+ "data-slot": "item",
46
+ "data-variant": variant,
47
+ "data-size": size,
48
+ className: cn(itemVariants({
49
+ variant,
50
+ size,
51
+ className
52
+ })),
53
+ ...props
54
+ });
55
+ }
56
+ 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", {
57
+ variants: { variant: {
58
+ default: "bg-transparent",
59
+ icon: "[&_svg:not([class*='size-'])]:size-4",
60
+ 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"
61
+ } },
62
+ defaultVariants: { variant: "default" }
63
+ });
64
+ function ItemMedia({ className, variant = "default", ...props }) {
65
+ return /* @__PURE__ */ jsx("div", {
66
+ "data-slot": "item-media",
67
+ "data-variant": variant,
68
+ className: cn(itemMediaVariants({
69
+ variant,
70
+ className
71
+ })),
72
+ ...props
73
+ });
74
+ }
75
+ function ItemContent({ className, ...props }) {
76
+ return /* @__PURE__ */ jsx("div", {
77
+ "data-slot": "item-content",
78
+ className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
79
+ ...props
80
+ });
81
+ }
82
+ function ItemTitle({ className, ...props }) {
83
+ return /* @__PURE__ */ jsx("div", {
84
+ "data-slot": "item-title",
85
+ className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
86
+ ...props
87
+ });
88
+ }
89
+ function ItemDescription({ className, ...props }) {
90
+ return /* @__PURE__ */ jsx("p", {
91
+ "data-slot": "item-description",
92
+ 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),
93
+ ...props
94
+ });
95
+ }
96
+ function ItemActions({ className, ...props }) {
97
+ return /* @__PURE__ */ jsx("div", {
98
+ "data-slot": "item-actions",
99
+ className: cn("flex items-center gap-2", className),
100
+ ...props
101
+ });
102
+ }
103
+ function ItemHeader({ className, ...props }) {
104
+ return /* @__PURE__ */ jsx("div", {
105
+ "data-slot": "item-header",
106
+ className: cn("flex basis-full items-center justify-between gap-2", className),
107
+ ...props
108
+ });
109
+ }
110
+ function ItemFooter({ className, ...props }) {
111
+ return /* @__PURE__ */ jsx("div", {
112
+ "data-slot": "item-footer",
113
+ className: cn("flex basis-full items-center justify-between gap-2", className),
114
+ ...props
115
+ });
116
+ }
117
+ //#endregion
118
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
package/dist/kbd.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ //#region src/kbd.d.ts
2
+ declare function Kbd({ className, ...props }: React.ComponentProps<"kbd">): import("react/jsx-runtime").JSX.Element;
3
+ //#endregion
4
+ export { Kbd };
package/dist/kbd.js ADDED
@@ -0,0 +1,12 @@
1
+ import { cn } from "./utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region src/kbd.tsx
4
+ function Kbd({ className, ...props }) {
5
+ return /* @__PURE__ */ jsx("kbd", {
6
+ "data-slot": "kbd",
7
+ className: cn("inline-flex items-center justify-center rounded bg-muted px-1.5 py-1 font-mono text-[10px] font-medium text-muted-foreground", className),
8
+ ...props
9
+ });
10
+ }
11
+ //#endregion
12
+ export { Kbd };
@@ -0,0 +1,6 @@
1
+ import * as React$1 from "react";
2
+ import { Label as Label$1 } from "radix-ui";
3
+ //#region src/label.d.ts
4
+ declare function Label({ className, ...props }: React$1.ComponentProps<typeof Label$1.Root>): import("react/jsx-runtime").JSX.Element;
5
+ //#endregion
6
+ export { Label };
package/dist/label.js ADDED
@@ -0,0 +1,14 @@
1
+ import { cn } from "./utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import "react";
4
+ import { Label as Label$1 } from "radix-ui";
5
+ //#region src/label.tsx
6
+ function Label({ className, ...props }) {
7
+ return /* @__PURE__ */ jsx(Label$1.Root, {
8
+ "data-slot": "label",
9
+ className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className),
10
+ ...props
11
+ });
12
+ }
13
+ //#endregion
14
+ export { Label };