@actioneer/ads 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/LICENSE +21 -0
  2. package/bin/ads-init.mjs +314 -0
  3. package/components/accordion.d.ts +13 -0
  4. package/components/accordion.js +91 -0
  5. package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
  6. package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
  7. package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
  8. package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
  9. package/components/agents-ui/react-shader-toy.d.ts +87 -0
  10. package/components/agents-ui/react-shader-toy.js +531 -0
  11. package/components/ai-elements/chain-of-thought.d.ts +30 -0
  12. package/components/ai-elements/chain-of-thought.js +182 -0
  13. package/components/ai-elements/index.d.ts +11 -0
  14. package/components/ai-elements/inline-citation.d.ts +44 -0
  15. package/components/ai-elements/inline-citation.js +314 -0
  16. package/components/ai-elements/message.d.ts +96 -0
  17. package/components/ai-elements/message.js +308 -0
  18. package/components/ai-elements/queue.d.ts +60 -0
  19. package/components/ai-elements/queue.js +193 -0
  20. package/components/ai-elements/reasoning.d.ts +26 -0
  21. package/components/ai-elements/reasoning.js +131 -0
  22. package/components/ai-elements/shimmer.d.ts +25 -0
  23. package/components/ai-elements/shimmer.js +44 -0
  24. package/components/ai-elements/speech-input.d.ts +16 -0
  25. package/components/ai-elements/speech-input.js +151 -0
  26. package/components/ai-elements/task-progress.d.ts +41 -0
  27. package/components/ai-elements/task-progress.js +211 -0
  28. package/components/ai-elements/task.d.ts +35 -0
  29. package/components/ai-elements/task.js +73 -0
  30. package/components/ai-elements/tool.d.ts +53 -0
  31. package/components/ai-elements/tool.js +116 -0
  32. package/components/ai-elements/voice.d.ts +74 -0
  33. package/components/ai-elements/voice.js +875 -0
  34. package/components/alert.d.ts +21 -0
  35. package/components/alert.js +76 -0
  36. package/components/answer.d.ts +984 -0
  37. package/components/answer.js +543 -0
  38. package/components/assistant-ui/action-bar.d.ts +3 -0
  39. package/components/assistant-ui/action-bar.js +57 -0
  40. package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
  41. package/components/assistant-ui/answer-tool-ui.js +42 -0
  42. package/components/assistant-ui/attachment.d.ts +50 -0
  43. package/components/assistant-ui/attachment.js +353 -0
  44. package/components/assistant-ui/badge.d.ts +11 -0
  45. package/components/assistant-ui/badge.js +54 -0
  46. package/components/assistant-ui/branch-picker.d.ts +3 -0
  47. package/components/assistant-ui/branch-picker.js +36 -0
  48. package/components/assistant-ui/chain-of-thought.d.ts +46 -0
  49. package/components/assistant-ui/composer-add-context.d.ts +50 -0
  50. package/components/assistant-ui/composer-add-context.js +209 -0
  51. package/components/assistant-ui/composer-deep-research.d.ts +16 -0
  52. package/components/assistant-ui/composer-deep-research.js +38 -0
  53. package/components/assistant-ui/composer-harness.d.ts +18 -0
  54. package/components/assistant-ui/composer-harness.js +186 -0
  55. package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
  56. package/components/assistant-ui/composer-trigger-popover.js +147 -0
  57. package/components/assistant-ui/composer.d.ts +8 -0
  58. package/components/assistant-ui/composer.js +276 -0
  59. package/components/assistant-ui/directive-text.d.ts +16 -0
  60. package/components/assistant-ui/directive-text.js +40 -0
  61. package/components/assistant-ui/error.d.ts +6 -0
  62. package/components/assistant-ui/error.js +39 -0
  63. package/components/assistant-ui/file.d.ts +37 -0
  64. package/components/assistant-ui/file.js +159 -0
  65. package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
  66. package/components/assistant-ui/follow-up-suggestions.js +44 -0
  67. package/components/assistant-ui/image.d.ts +46 -0
  68. package/components/assistant-ui/image.js +351 -0
  69. package/components/assistant-ui/index.d.ts +28 -0
  70. package/components/assistant-ui/markdown-text.d.ts +1 -0
  71. package/components/assistant-ui/markdown-text.js +242 -0
  72. package/components/assistant-ui/message-timing.d.ts +25 -0
  73. package/components/assistant-ui/message-timing.js +56 -0
  74. package/components/assistant-ui/message.d.ts +4 -0
  75. package/components/assistant-ui/message.js +159 -0
  76. package/components/assistant-ui/primitives.d.ts +2 -0
  77. package/components/assistant-ui/quote.d.ts +37 -0
  78. package/components/assistant-ui/quote.js +150 -0
  79. package/components/assistant-ui/reasoning.d.ts +44 -0
  80. package/components/assistant-ui/reasoning.js +261 -0
  81. package/components/assistant-ui/selection-toolbar.d.ts +29 -0
  82. package/components/assistant-ui/selection-toolbar.js +91 -0
  83. package/components/assistant-ui/smart-message-text.d.ts +15 -0
  84. package/components/assistant-ui/smart-message-text.js +29 -0
  85. package/components/assistant-ui/sources.d.ts +17 -0
  86. package/components/assistant-ui/sources.js +121 -0
  87. package/components/assistant-ui/suggestions.d.ts +7 -0
  88. package/components/assistant-ui/suggestions.js +19 -0
  89. package/components/assistant-ui/thread-context.d.ts +37 -0
  90. package/components/assistant-ui/thread-context.js +8 -0
  91. package/components/assistant-ui/thread.d.ts +5 -0
  92. package/components/assistant-ui/thread.js +77 -0
  93. package/components/assistant-ui/tool-fallback.d.ts +36 -0
  94. package/components/assistant-ui/tool-fallback.js +428 -0
  95. package/components/assistant-ui/tool-group.d.ts +33 -0
  96. package/components/assistant-ui/tool-group.js +173 -0
  97. package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
  98. package/components/assistant-ui/tooltip-icon-button.js +31 -0
  99. package/components/assistant-ui/voice.d.ts +18 -0
  100. package/components/autocomplete.d.ts +18 -0
  101. package/components/autocomplete.js +162 -0
  102. package/components/avatar.d.ts +26 -0
  103. package/components/avatar.js +92 -0
  104. package/components/badge.d.ts +10 -0
  105. package/components/badge.js +83 -0
  106. package/components/brand-loader.d.ts +16 -0
  107. package/components/brand-loader.js +64 -0
  108. package/components/breadcrumbs.d.ts +8 -0
  109. package/components/breadcrumbs.js +58 -0
  110. package/components/button.d.ts +13 -0
  111. package/components/button.js +100 -0
  112. package/components/card.d.ts +19 -0
  113. package/components/card.js +82 -0
  114. package/components/carousel.d.ts +31 -0
  115. package/components/carousel.js +351 -0
  116. package/components/chart.d.ts +165 -0
  117. package/components/chart.js +841 -0
  118. package/components/checkbox.d.ts +13 -0
  119. package/components/checkbox.js +84 -0
  120. package/components/chip.d.ts +13 -0
  121. package/components/chip.js +112 -0
  122. package/components/collapsible.d.ts +5 -0
  123. package/components/collapsible.js +31 -0
  124. package/components/connector-card.d.ts +62 -0
  125. package/components/connector-card.js +154 -0
  126. package/components/divider.d.ts +23 -0
  127. package/components/divider.js +69 -0
  128. package/components/drawer.d.ts +45 -0
  129. package/components/drawer.js +234 -0
  130. package/components/dropdown.d.ts +33 -0
  131. package/components/dropdown.js +198 -0
  132. package/components/empty-state.d.ts +8 -0
  133. package/components/empty-state.js +30 -0
  134. package/components/field.d.ts +20 -0
  135. package/components/field.js +74 -0
  136. package/components/index.d.ts +56 -0
  137. package/components/index.js +444 -0
  138. package/components/input-field.d.ts +22 -0
  139. package/components/input-field.js +91 -0
  140. package/components/input.d.ts +8 -0
  141. package/components/input.js +61 -0
  142. package/components/kbd.d.ts +6 -0
  143. package/components/kbd.js +26 -0
  144. package/components/link.d.ts +14 -0
  145. package/components/link.js +72 -0
  146. package/components/modal.d.ts +18 -0
  147. package/components/modal.js +156 -0
  148. package/components/navbar.d.ts +15 -0
  149. package/components/navbar.js +68 -0
  150. package/components/number-field.d.ts +11 -0
  151. package/components/number-field.js +89 -0
  152. package/components/pagination.d.ts +28 -0
  153. package/components/pagination.js +179 -0
  154. package/components/panel.d.ts +14 -0
  155. package/components/panel.js +71 -0
  156. package/components/pixel-blast-svg.d.ts +22 -0
  157. package/components/pixel-blast-svg.js +154 -0
  158. package/components/popover.d.ts +20 -0
  159. package/components/popover.js +101 -0
  160. package/components/progress-circle.d.ts +11 -0
  161. package/components/progress-circle.js +75 -0
  162. package/components/progress.d.ts +22 -0
  163. package/components/progress.js +66 -0
  164. package/components/radio.d.ts +16 -0
  165. package/components/radio.js +101 -0
  166. package/components/segmented.d.ts +16 -0
  167. package/components/segmented.js +103 -0
  168. package/components/select.d.ts +28 -0
  169. package/components/select.js +180 -0
  170. package/components/selection-action-bar.d.ts +11 -0
  171. package/components/selection-action-bar.js +59 -0
  172. package/components/sidebar.d.ts +118 -0
  173. package/components/sidebar.js +375 -0
  174. package/components/skeleton.d.ts +6 -0
  175. package/components/skeleton.js +26 -0
  176. package/components/slider.d.ts +11 -0
  177. package/components/slider.js +62 -0
  178. package/components/spinner.d.ts +11 -0
  179. package/components/spinner.js +62 -0
  180. package/components/switch.d.ts +7 -0
  181. package/components/switch.js +61 -0
  182. package/components/table.d.ts +59 -0
  183. package/components/table.js +254 -0
  184. package/components/tabs.d.ts +29 -0
  185. package/components/tabs.js +371 -0
  186. package/components/textarea.d.ts +5 -0
  187. package/components/textarea.js +24 -0
  188. package/components/timeline.d.ts +7 -0
  189. package/components/timeline.js +47 -0
  190. package/components/toast.d.ts +74 -0
  191. package/components/toast.js +211 -0
  192. package/components/tooltip.d.ts +11 -0
  193. package/components/tooltip.js +143 -0
  194. package/components/tree.d.ts +42 -0
  195. package/components/tree.js +86 -0
  196. package/components/typography.d.ts +33 -0
  197. package/components/typography.js +65 -0
  198. package/components/ui/avatar.d.ts +11 -0
  199. package/components/ui/avatar.js +56 -0
  200. package/components/ui/button.d.ts +10 -0
  201. package/components/ui/button.js +57 -0
  202. package/components/ui/collapsible.d.ts +5 -0
  203. package/components/ui/collapsible.js +35 -0
  204. package/components/ui/dialog.d.ts +17 -0
  205. package/components/ui/dialog.js +93 -0
  206. package/components/ui/tabs.d.ts +22 -0
  207. package/components/ui/tooltip.d.ts +7 -0
  208. package/components/ui/tooltip.js +56 -0
  209. package/fonts/aribau-grotesk-400.otf +0 -0
  210. package/fonts/aribau-grotesk-700.otf +0 -0
  211. package/fonts.css +21 -0
  212. package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
  213. package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
  214. package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
  215. package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
  216. package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
  217. package/lib/cn.d.ts +3 -0
  218. package/lib/cn.js +9 -0
  219. package/lib/icons.d.ts +378 -0
  220. package/lib/icons.js +119 -0
  221. package/lib/interactive.d.ts +24 -0
  222. package/lib/interactive.js +36 -0
  223. package/lib/motion.d.ts +58 -0
  224. package/lib/motion.js +70 -0
  225. package/lib/router.d.ts +3 -0
  226. package/lib/utils.d.ts +6 -0
  227. package/llms.txt +537 -0
  228. package/manifest.json +5085 -0
  229. package/package.json +60 -0
  230. package/styles.css +653 -0
  231. package/theme.css +273 -0
@@ -0,0 +1,234 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as g } from "react/jsx-runtime";
3
+ import * as a from "react";
4
+ import { createPortal as E } from "react-dom";
5
+ import { MotionConfig as y, AnimatePresence as p, motion as v } from "motion/react";
6
+ import { Close as R } from "../lib/icons.js";
7
+ import { cva as j } from "class-variance-authority";
8
+ import { cn as o } from "../lib/cn.js";
9
+ import { drawerExitTransition as b, drawerOffset as m, drawerEnterTransition as z, drawerBackdropVariants as F } from "../lib/motion.js";
10
+ const N = j(
11
+ [
12
+ "relative flex flex-col",
13
+ "bg-elevated text-foreground",
14
+ "shadow-elevation"
15
+ ],
16
+ {
17
+ variants: {
18
+ side: {
19
+ right: "h-full",
20
+ left: "h-full",
21
+ bottom: "w-full"
22
+ },
23
+ size: {
24
+ sm: "",
25
+ md: "",
26
+ lg: "",
27
+ xl: ""
28
+ }
29
+ },
30
+ compoundVariants: [
31
+ { side: "right", size: "sm", class: "w-full max-w-sm" },
32
+ { side: "right", size: "md", class: "w-full max-w-md" },
33
+ { side: "right", size: "lg", class: "w-full max-w-lg" },
34
+ { side: "right", size: "xl", class: "w-full max-w-2xl" },
35
+ { side: "left", size: "sm", class: "w-full max-w-sm" },
36
+ { side: "left", size: "md", class: "w-full max-w-md" },
37
+ { side: "left", size: "lg", class: "w-full max-w-lg" },
38
+ { side: "left", size: "xl", class: "w-full max-w-2xl" },
39
+ { side: "bottom", size: "sm", class: "h-1/4" },
40
+ { side: "bottom", size: "md", class: "h-1/3" },
41
+ { side: "bottom", size: "lg", class: "h-1/2" },
42
+ { side: "bottom", size: "xl", class: "h-2/3" }
43
+ ],
44
+ defaultVariants: { side: "right", size: "md" }
45
+ }
46
+ ), A = {
47
+ right: "justify-end items-stretch",
48
+ left: "justify-start items-stretch",
49
+ bottom: "justify-center items-end"
50
+ };
51
+ function k({
52
+ onClick: t,
53
+ className: e
54
+ }) {
55
+ return /* @__PURE__ */ r(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ onClick: t,
60
+ "aria-label": "Close",
61
+ className: o(
62
+ "absolute inline-flex size-8 items-center justify-center",
63
+ "rounded-md text-muted-foreground",
64
+ "transition-[background,color,transform] duration-(--duration-fast) ease-out hover:bg-muted hover:text-foreground",
65
+ "active:scale-(--scale-press)",
66
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
67
+ "[&_svg]:size-4 [&_svg]:shrink-0",
68
+ e
69
+ ),
70
+ children: /* @__PURE__ */ r(R, { "aria-hidden": !0 })
71
+ }
72
+ );
73
+ }
74
+ function G({
75
+ open: t,
76
+ onOpenChange: e,
77
+ side: s,
78
+ size: u,
79
+ className: w,
80
+ children: x
81
+ }) {
82
+ const l = s ?? "right", n = a.useRef(null), d = a.useRef(null);
83
+ return a.useEffect(() => {
84
+ if (!t) return;
85
+ d.current = document.activeElement;
86
+ const c = document.body.style.overflow;
87
+ document.body.style.overflow = "hidden";
88
+ const f = (i) => {
89
+ i.key === "Escape" && (i.stopPropagation(), e(!1));
90
+ };
91
+ document.addEventListener("keydown", f);
92
+ const D = requestAnimationFrame(() => {
93
+ var i;
94
+ (i = n.current) == null || i.focus();
95
+ });
96
+ return () => {
97
+ var i, h;
98
+ document.removeEventListener("keydown", f), document.body.style.overflow = c, cancelAnimationFrame(D), (h = (i = d.current) == null ? void 0 : i.focus) == null || h.call(i);
99
+ };
100
+ }, [t, e]), E(
101
+ /* @__PURE__ */ r(y, { reducedMotion: "user", children: /* @__PURE__ */ r(p, { children: t && /* @__PURE__ */ g("div", { className: o("fixed inset-0 z-50 flex", A[l]), children: [
102
+ /* @__PURE__ */ r(
103
+ v.div,
104
+ {
105
+ variants: F,
106
+ initial: "hidden",
107
+ animate: "visible",
108
+ exit: "hidden",
109
+ className: "absolute inset-0 bg-overlay",
110
+ onClick: () => e(!1),
111
+ "aria-hidden": !0
112
+ },
113
+ "backdrop"
114
+ ),
115
+ /* @__PURE__ */ g(
116
+ v.div,
117
+ {
118
+ ref: n,
119
+ initial: m[l],
120
+ animate: { transform: "translate3d(0, 0, 0)", transition: z },
121
+ exit: { ...m[l], transition: b },
122
+ role: "dialog",
123
+ "aria-modal": "true",
124
+ tabIndex: -1,
125
+ className: o(N({ side: l, size: u }), "relative outline-none", w),
126
+ children: [
127
+ /* @__PURE__ */ r(
128
+ k,
129
+ {
130
+ onClick: () => e(!1),
131
+ className: "right-4 top-4"
132
+ }
133
+ ),
134
+ x
135
+ ]
136
+ },
137
+ "panel"
138
+ )
139
+ ] }) }) }),
140
+ document.body
141
+ );
142
+ }
143
+ function B({
144
+ open: t,
145
+ onOpenChange: e,
146
+ side: s,
147
+ size: u,
148
+ className: w,
149
+ children: x,
150
+ "aria-label": l
151
+ }) {
152
+ const n = s ?? "right", d = a.useRef(null);
153
+ return a.useEffect(() => {
154
+ if (!t) return;
155
+ const c = (f) => {
156
+ f.key === "Escape" && e(!1);
157
+ };
158
+ return document.addEventListener("keydown", c), () => document.removeEventListener("keydown", c);
159
+ }, [t, e]), /* @__PURE__ */ r(y, { reducedMotion: "user", children: /* @__PURE__ */ r(p, { initial: !1, children: t && /* @__PURE__ */ g(
160
+ v.aside,
161
+ {
162
+ ref: d,
163
+ initial: m[n],
164
+ animate: { transform: "translate3d(0, 0, 0)", transition: z },
165
+ exit: { ...m[n], transition: b },
166
+ role: "complementary",
167
+ "aria-label": l,
168
+ className: o(
169
+ N({ side: n, size: u }),
170
+ "relative shrink-0 overflow-hidden rounded-lg bg-card shadow-none outline-none",
171
+ w
172
+ ),
173
+ children: [
174
+ /* @__PURE__ */ r(
175
+ k,
176
+ {
177
+ onClick: () => e(!1),
178
+ className: "right-2 top-1"
179
+ }
180
+ ),
181
+ x
182
+ ]
183
+ },
184
+ "inline-drawer"
185
+ ) }) });
186
+ }
187
+ const J = B, L = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
188
+ "div",
189
+ {
190
+ ref: s,
191
+ className: o("flex flex-col gap-1 px-6 py-4 pr-14", t),
192
+ ...e
193
+ }
194
+ ));
195
+ L.displayName = "DrawerHeader";
196
+ const M = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
197
+ "h2",
198
+ {
199
+ ref: s,
200
+ className: o("text-lg font-semibold text-foreground", t),
201
+ ...e
202
+ }
203
+ ));
204
+ M.displayName = "DrawerTitle";
205
+ const T = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
206
+ "div",
207
+ {
208
+ ref: s,
209
+ className: o("flex-1 overflow-y-auto px-6 py-4 text-xs text-foreground", t),
210
+ ...e
211
+ }
212
+ ));
213
+ T.displayName = "DrawerBody";
214
+ const V = a.forwardRef(({ className: t, ...e }, s) => /* @__PURE__ */ r(
215
+ "div",
216
+ {
217
+ ref: s,
218
+ className: o(
219
+ "flex items-center justify-end gap-2 px-6 py-4",
220
+ t
221
+ ),
222
+ ...e
223
+ }
224
+ ));
225
+ V.displayName = "DrawerFooter";
226
+ export {
227
+ B as Drawer,
228
+ T as DrawerBody,
229
+ V as DrawerFooter,
230
+ L as DrawerHeader,
231
+ M as DrawerTitle,
232
+ J as InlineDrawer,
233
+ G as ModalDrawer
234
+ };
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ export interface DropdownProps {
3
+ children: React.ReactNode;
4
+ defaultOpen?: boolean;
5
+ }
6
+ export declare function Dropdown({ children, defaultOpen }: DropdownProps): React.JSX.Element;
7
+ export interface DropdownTriggerProps {
8
+ children: React.ReactElement;
9
+ }
10
+ export declare function DropdownTrigger({ children }: DropdownTriggerProps): React.ReactElement<{
11
+ ref?: React.Ref<HTMLElement>;
12
+ onClick?: (event: React.MouseEvent) => void;
13
+ "aria-expanded"?: boolean;
14
+ "aria-haspopup"?: "menu";
15
+ }, string | React.JSXElementConstructor<any>>;
16
+ export interface DropdownContentProps extends React.HTMLAttributes<HTMLDivElement> {
17
+ align?: "start" | "end";
18
+ /** Which side of the trigger the menu opens on. Default below. */
19
+ side?: "top" | "bottom";
20
+ sideOffset?: number;
21
+ /** Focus the menu surface on open without highlighting its first item. */
22
+ autoFocusFirstItem?: boolean;
23
+ }
24
+ export declare function DropdownContent({ className, align, side, sideOffset, autoFocusFirstItem, children, ...props }: DropdownContentProps): React.ReactPortal;
25
+ export interface DropdownItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onSelect"> {
26
+ startContent?: React.ReactNode;
27
+ danger?: boolean;
28
+ disabled?: boolean;
29
+ onSelect?: () => void;
30
+ }
31
+ export declare const DropdownItem: React.ForwardRefExoticComponent<DropdownItemProps & React.RefAttributes<HTMLDivElement>>;
32
+ export declare const DropdownSeparator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
33
+ export declare const DropdownLabel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,198 @@
1
+ "use client";
2
+ import { jsxs as N, jsx as w } from "react/jsx-runtime";
3
+ import * as c from "react";
4
+ import { createPortal as A } from "react-dom";
5
+ import { MotionConfig as I, AnimatePresence as P, motion as z } from "motion/react";
6
+ import { cn as D } from "../lib/cn.js";
7
+ import { floatVariants as O } from "../lib/motion.js";
8
+ const q = (r, t) => `${r === "top" ? "bottom" : "top"} ${t === "start" ? "left" : "right"}`, k = c.createContext(null);
9
+ function R(r) {
10
+ const t = c.useContext(k);
11
+ if (!t)
12
+ throw new Error(`${r} must be used within a <Dropdown>.`);
13
+ return t;
14
+ }
15
+ function B({ children: r, defaultOpen: t = !1 }) {
16
+ const [o, d] = c.useState(t), f = c.useRef(null), p = c.useRef(null);
17
+ return /* @__PURE__ */ w(k.Provider, { value: { open: o, setOpen: d, triggerRef: f, contentRef: p }, children: r });
18
+ }
19
+ function F({ children: r }) {
20
+ const { open: t, setOpen: o, triggerRef: d } = R("DropdownTrigger"), f = r;
21
+ return c.cloneElement(f, {
22
+ ref: d,
23
+ "aria-expanded": t,
24
+ "aria-haspopup": "menu",
25
+ onClick: (p) => {
26
+ var b, u;
27
+ (u = (b = f.props).onClick) == null || u.call(b, p), o(!t);
28
+ }
29
+ });
30
+ }
31
+ function U({
32
+ className: r,
33
+ align: t = "start",
34
+ side: o = "bottom",
35
+ sideOffset: d = 6,
36
+ autoFocusFirstItem: f = !0,
37
+ children: p,
38
+ ...b
39
+ }) {
40
+ const { open: u, setOpen: v, triggerRef: m, contentRef: a } = R("DropdownContent"), [i, C] = c.useState(null);
41
+ c.useLayoutEffect(() => {
42
+ if (!u) return;
43
+ const s = m.current;
44
+ if (!s) return;
45
+ const e = () => {
46
+ var h, x;
47
+ const n = s.getBoundingClientRect(), l = ((h = a.current) == null ? void 0 : h.offsetWidth) ?? 0, g = ((x = a.current) == null ? void 0 : x.offsetHeight) ?? 0, y = t === "end" ? n.right - l : n.left, E = o === "top" ? n.top - g - d : n.bottom + d;
48
+ C({ top: E, left: y });
49
+ };
50
+ return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
51
+ window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
52
+ };
53
+ }, [u, t, o, d, m, a]), c.useEffect(() => {
54
+ if (!u) return;
55
+ const s = requestAnimationFrame(() => {
56
+ var e, n;
57
+ if (f) {
58
+ const l = (e = a.current) == null ? void 0 : e.querySelector(
59
+ '[role="menuitem"]:not([aria-disabled="true"])'
60
+ );
61
+ l == null || l.focus();
62
+ } else
63
+ (n = a.current) == null || n.focus();
64
+ });
65
+ return () => cancelAnimationFrame(s);
66
+ }, [u, f, a]), c.useEffect(() => {
67
+ if (!u) return;
68
+ const s = (e) => {
69
+ var l, g;
70
+ const n = e.target;
71
+ (l = a.current) != null && l.contains(n) || (g = m.current) != null && g.contains(n) || v(!1);
72
+ };
73
+ return document.addEventListener("pointerdown", s), () => document.removeEventListener("pointerdown", s);
74
+ }, [u, v, m, a]);
75
+ const L = (s) => {
76
+ var l, g, y, E, h, x;
77
+ const e = Array.from(
78
+ ((l = a.current) == null ? void 0 : l.querySelectorAll(
79
+ '[role="menuitem"]:not([aria-disabled="true"])'
80
+ )) ?? []
81
+ );
82
+ if (e.length === 0) return;
83
+ const n = e.indexOf(document.activeElement);
84
+ switch (s.key) {
85
+ case "Escape":
86
+ s.preventDefault(), v(!1), (g = m.current) == null || g.focus();
87
+ break;
88
+ case "ArrowDown":
89
+ s.preventDefault(), (y = e[n < 0 ? 0 : (n + 1) % e.length]) == null || y.focus();
90
+ break;
91
+ case "ArrowUp":
92
+ s.preventDefault(), (E = e[n < 0 ? e.length - 1 : (n - 1 + e.length) % e.length]) == null || E.focus();
93
+ break;
94
+ case "Home":
95
+ s.preventDefault(), (h = e[0]) == null || h.focus();
96
+ break;
97
+ case "End":
98
+ s.preventDefault(), (x = e[e.length - 1]) == null || x.focus();
99
+ break;
100
+ }
101
+ };
102
+ return A(
103
+ /* @__PURE__ */ w(I, { reducedMotion: "user", children: /* @__PURE__ */ w(P, { children: u && /* @__PURE__ */ w(
104
+ z.div,
105
+ {
106
+ ref: a,
107
+ role: "menu",
108
+ tabIndex: -1,
109
+ onKeyDown: L,
110
+ variants: O,
111
+ initial: "hidden",
112
+ animate: "visible",
113
+ exit: "hidden",
114
+ style: {
115
+ position: "fixed",
116
+ top: (i == null ? void 0 : i.top) ?? 0,
117
+ left: (i == null ? void 0 : i.left) ?? 0,
118
+ visibility: i ? "visible" : "hidden",
119
+ transformOrigin: q(o, t)
120
+ },
121
+ className: D(
122
+ "z-50 min-w-44 rounded-lg border border-border bg-elevated p-1",
123
+ "text-foreground shadow-elevation outline-none",
124
+ r
125
+ ),
126
+ ...b,
127
+ children: p
128
+ }
129
+ ) }) }),
130
+ document.body
131
+ );
132
+ }
133
+ const $ = c.forwardRef(
134
+ ({ className: r, startContent: t, danger: o, disabled: d, onSelect: f, children: p, ...b }, u) => {
135
+ const { setOpen: v, triggerRef: m } = R("DropdownItem"), a = () => {
136
+ var i;
137
+ d || (f == null || f(), v(!1), (i = m.current) == null || i.focus());
138
+ };
139
+ return /* @__PURE__ */ N(
140
+ "div",
141
+ {
142
+ ref: u,
143
+ role: "menuitem",
144
+ tabIndex: -1,
145
+ "aria-disabled": d || void 0,
146
+ onClick: a,
147
+ onKeyDown: (i) => {
148
+ (i.key === "Enter" || i.key === " ") && (i.preventDefault(), a());
149
+ },
150
+ className: D(
151
+ "flex cursor-default items-center gap-2 rounded-md px-2 py-1.5 text-xs",
152
+ "outline-none transition-colors duration-(--duration-fast)",
153
+ "focus-visible:ring-3 focus-visible:ring-ring",
154
+ o ? "text-danger" : "text-foreground",
155
+ d ? "pointer-events-none opacity-50" : D("hover:bg-muted focus:bg-muted", o && "hover:bg-danger/10 focus:bg-danger/10"),
156
+ "[&_svg]:size-4 [&_svg]:shrink-0",
157
+ r
158
+ ),
159
+ ...b,
160
+ children: [
161
+ t,
162
+ /* @__PURE__ */ w("span", { className: "flex-1", children: p })
163
+ ]
164
+ }
165
+ );
166
+ }
167
+ );
168
+ $.displayName = "DropdownItem";
169
+ const j = c.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ w(
170
+ "div",
171
+ {
172
+ ref: o,
173
+ role: "separator",
174
+ className: D("my-1 h-px bg-border", r),
175
+ ...t
176
+ }
177
+ ));
178
+ j.displayName = "DropdownSeparator";
179
+ const H = c.forwardRef(({ className: r, ...t }, o) => /* @__PURE__ */ w(
180
+ "div",
181
+ {
182
+ ref: o,
183
+ className: D(
184
+ "px-2 py-1.5 text-xs font-medium text-muted-foreground select-none",
185
+ r
186
+ ),
187
+ ...t
188
+ }
189
+ ));
190
+ H.displayName = "DropdownLabel";
191
+ export {
192
+ B as Dropdown,
193
+ U as DropdownContent,
194
+ $ as DropdownItem,
195
+ H as DropdownLabel,
196
+ j as DropdownSeparator,
197
+ F as DropdownTrigger
198
+ };
@@ -0,0 +1,8 @@
1
+ import * as React from "react";
2
+ export interface EmptyStateProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
3
+ icon?: React.ReactNode;
4
+ title: React.ReactNode;
5
+ description?: React.ReactNode;
6
+ action?: React.ReactNode;
7
+ }
8
+ export declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,30 @@
1
+ "use client";
2
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
+ import * as d from "react";
4
+ import { Inbox as n } from "../lib/icons.js";
5
+ import { cn as o } from "../lib/cn.js";
6
+ const f = d.forwardRef(
7
+ ({ className: s, icon: a, title: l, description: t, action: m, ...i }, c) => /* @__PURE__ */ r(
8
+ "div",
9
+ {
10
+ ref: c,
11
+ className: o(
12
+ "flex flex-col items-center text-center gap-3 py-12",
13
+ s
14
+ ),
15
+ ...i,
16
+ children: [
17
+ /* @__PURE__ */ e("span", { className: "inline-flex items-center justify-center rounded-full bg-muted p-3 text-muted-foreground [&_svg]:size-6", children: a ?? /* @__PURE__ */ e(n, { "aria-hidden": !0 }) }),
18
+ /* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
19
+ /* @__PURE__ */ e("p", { className: "font-medium", children: l }),
20
+ t && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground max-w-sm", children: t })
21
+ ] }),
22
+ m && /* @__PURE__ */ e("div", { className: "mt-1", children: m })
23
+ ]
24
+ }
25
+ )
26
+ );
27
+ f.displayName = "EmptyState";
28
+ export {
29
+ f as EmptyState
30
+ };
@@ -0,0 +1,20 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Shared form-field primitives used by Input, Textarea, Select, NumberField, etc.
4
+ * `inputBaseClass` is the canonical text-control surface so every field looks identical.
5
+ */
6
+ export declare const inputBaseClass: string;
7
+ export declare const Label: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLLabelElement> & {
8
+ required?: boolean;
9
+ } & React.RefAttributes<HTMLLabelElement>>;
10
+ export declare const FieldDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
11
+ export declare const FieldError: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
12
+ export interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
13
+ label?: React.ReactNode;
14
+ description?: React.ReactNode;
15
+ error?: React.ReactNode;
16
+ required?: boolean;
17
+ htmlFor?: string;
18
+ }
19
+ /** Vertical stack: label · control · (description|error). */
20
+ export declare const Field: React.ForwardRefExoticComponent<FieldProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,74 @@
1
+ "use client";
2
+ import { jsxs as n, jsx as o } from "react/jsx-runtime";
3
+ import * as d from "react";
4
+ import { cn as a } from "../lib/cn.js";
5
+ import { interactive as g } from "../lib/interactive.js";
6
+ const h = a(
7
+ // Border WIDTH only — no border-color utility. ads-interactive owns the
8
+ // color (rest = --glow-border-rest below); a `border-input` utility here
9
+ // would out-cascade the hover/focus brand-black rules.
10
+ "flex w-full rounded-md border bg-elevated text-foreground",
11
+ "px-3 text-xs",
12
+ "placeholder:text-muted-foreground",
13
+ "outline-none",
14
+ "disabled:cursor-not-allowed disabled:opacity-50",
15
+ // Form controls keep a subtle stroke (the "~25%") for crisp definition;
16
+ // hover/focus snap the border to solid brand-black (no halo). The inner
17
+ // glow is a whisper of inset depth so the writing surface reads recessed —
18
+ // carried through every interactive state by the --glow-inset hook.
19
+ g({ on: "all", color: "brand", intensity: "medium", animate: !0 }),
20
+ "[--glow-border-rest:var(--input)]",
21
+ "[--glow-inset:var(--inner-glow-field)]"
22
+ ), s = d.forwardRef(({ className: t, children: e, required: r, ...l }, i) => /* @__PURE__ */ n(
23
+ "label",
24
+ {
25
+ ref: i,
26
+ className: a(
27
+ "flex items-center gap-1 text-xs font-medium text-foreground select-none",
28
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-60",
29
+ t
30
+ ),
31
+ ...l,
32
+ children: [
33
+ e,
34
+ r && /* @__PURE__ */ o("span", { className: "text-danger", children: "*" })
35
+ ]
36
+ }
37
+ ));
38
+ s.displayName = "Label";
39
+ const c = d.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ o(
40
+ "p",
41
+ {
42
+ ref: r,
43
+ className: a("text-xs text-muted-foreground", t),
44
+ ...e
45
+ }
46
+ ));
47
+ c.displayName = "FieldDescription";
48
+ const m = d.forwardRef(
49
+ ({ className: t, children: e, ...r }, l) => e ? /* @__PURE__ */ o(
50
+ "p",
51
+ {
52
+ ref: l,
53
+ className: a("text-xs font-medium text-danger", t),
54
+ ...r,
55
+ children: e
56
+ }
57
+ ) : null
58
+ );
59
+ m.displayName = "FieldError";
60
+ const b = d.forwardRef(
61
+ ({ className: t, label: e, description: r, error: l, required: i, htmlFor: f, children: p, ...x }, u) => /* @__PURE__ */ n("div", { ref: u, className: a("flex flex-col gap-1.5", t), ...x, children: [
62
+ e && /* @__PURE__ */ o(s, { htmlFor: f, required: i, children: e }),
63
+ p,
64
+ l ? /* @__PURE__ */ o(m, { children: l }) : r ? /* @__PURE__ */ o(c, { children: r }) : null
65
+ ] })
66
+ );
67
+ b.displayName = "Field";
68
+ export {
69
+ b as Field,
70
+ c as FieldDescription,
71
+ m as FieldError,
72
+ s as Label,
73
+ h as inputBaseClass
74
+ };
@@ -0,0 +1,56 @@
1
+ export { cn } from '../lib/cn';
2
+ export { interactive, type InteractiveProps } from '../lib/interactive';
3
+ export { TooltipProvider } from './ui/tooltip';
4
+ export * from './button';
5
+ export * from './spinner';
6
+ export * from './field';
7
+ export * from './typography';
8
+ export * from './link';
9
+ export * from './divider';
10
+ export * from './kbd';
11
+ export * from './input';
12
+ export * from './input-field';
13
+ export * from './textarea';
14
+ export * from './checkbox';
15
+ export * from './radio';
16
+ export * from './switch';
17
+ export * from './number-field';
18
+ export * from './select';
19
+ export * from './autocomplete';
20
+ export * from './slider';
21
+ export * from './segmented';
22
+ export * from './modal';
23
+ export * from './drawer';
24
+ export * from './popover';
25
+ export * from './tooltip';
26
+ export * from './dropdown';
27
+ export * from './toast';
28
+ export * from './answer';
29
+ export * from './card';
30
+ export * from './carousel';
31
+ export * from './chart';
32
+ export * from './connector-card';
33
+ export * from './table';
34
+ export * from './tabs';
35
+ export * from './tree';
36
+ export * from './accordion';
37
+ export * from './avatar';
38
+ export * from './badge';
39
+ export * from './chip';
40
+ export * from './timeline';
41
+ export * from './alert';
42
+ export * from './brand-loader';
43
+ export * from './pixel-blast-svg';
44
+ export * from './progress';
45
+ export * from './progress-circle';
46
+ export * from './skeleton';
47
+ export * from './empty-state';
48
+ export * from './navbar';
49
+ export * from './breadcrumbs';
50
+ export * from './pagination';
51
+ export * from './sidebar';
52
+ export * from './panel';
53
+ export * from './collapsible';
54
+ export * from './selection-action-bar';
55
+ export * from './ai-elements';
56
+ export * from './assistant-ui';