@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,72 @@
1
+ "use client";
2
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
3
+ import * as u from "react";
4
+ import { ArrowUpRight as t } from "../lib/icons.js";
5
+ import { cn as d } from "../lib/cn.js";
6
+ const c = {
7
+ default: "text-foreground",
8
+ muted: "text-muted-foreground",
9
+ primary: "text-brand"
10
+ }, f = u.forwardRef(
11
+ ({ className: n, color: a = "default", isExternal: r = !1, children: i, ...s }, l) => /* @__PURE__ */ o(
12
+ "a",
13
+ {
14
+ ref: l,
15
+ target: r ? "_blank" : void 0,
16
+ rel: r ? "noopener noreferrer" : void 0,
17
+ className: d(
18
+ // Links read as links by WEIGHT at rest (bold against body copy);
19
+ // the underline is a hover/focus affordance. Underline spec: dotted,
20
+ // 12% thickness, 24% offset, skip-ink, auto (current) color.
21
+ "group/link inline-flex items-center gap-1 rounded-xs font-bold",
22
+ "hover:underline focus-visible:underline decoration-dotted decoration-[0.12em] underline-offset-[0.24em]",
23
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
24
+ c[a],
25
+ n
26
+ ),
27
+ ...s,
28
+ children: [
29
+ i,
30
+ r && // Two arrows stacked in a clipped box, driven by a single group-hover
31
+ // CSS var (`--arrow-out`). At rest, arrow A sits centered and arrow B
32
+ // is parked bottom-left off the viewport (--arrow-out = 0). On hover,
33
+ // --arrow-out = 1: A slides up-right out of the frame, B slides in to
34
+ // take its place. The swap reads as the arrow flying toward the
35
+ // destination. Space is reserved so the label never shifts.
36
+ // (Inline style — Tailwind's arbitrary translate utilities weren't
37
+ // being generated by the JIT for these specific values.)
38
+ /* @__PURE__ */ o(
39
+ "span",
40
+ {
41
+ "aria-hidden": !0,
42
+ className: "relative inline-block size-3.5 overflow-hidden [--arrow-out:0] group-hover/link:[--arrow-out:1] group-focus-visible/link:[--arrow-out:1]",
43
+ children: [
44
+ /* @__PURE__ */ e(
45
+ t,
46
+ {
47
+ className: "absolute inset-0 size-full transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
48
+ style: {
49
+ transform: "translate(calc(var(--arrow-out) * 100%), calc(var(--arrow-out) * -100%))"
50
+ }
51
+ }
52
+ ),
53
+ /* @__PURE__ */ e(
54
+ t,
55
+ {
56
+ className: "absolute inset-0 size-full transition-transform duration-(--duration-fast) ease-out motion-reduce:transition-none",
57
+ style: {
58
+ transform: "translate(calc((var(--arrow-out) - 1) * 100%), calc((1 - var(--arrow-out)) * 100%))"
59
+ }
60
+ }
61
+ )
62
+ ]
63
+ }
64
+ )
65
+ ]
66
+ }
67
+ )
68
+ );
69
+ f.displayName = "Link";
70
+ export {
71
+ f as Link
72
+ };
@@ -0,0 +1,18 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ declare const panelVariants: (props?: ({
4
+ size?: "sm" | "md" | "lg" | "xl" | null | undefined;
5
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
+ export interface ModalProps extends VariantProps<typeof panelVariants> {
7
+ open: boolean;
8
+ onOpenChange: (open: boolean) => void;
9
+ className?: string;
10
+ children: React.ReactNode;
11
+ }
12
+ export declare function Modal({ open, onOpenChange, size, className, children }: ModalProps): React.ReactPortal;
13
+ export declare const ModalHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const ModalTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
15
+ export declare const ModalDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
16
+ export declare const ModalBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
17
+ export declare const ModalFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
18
+ export {};
@@ -0,0 +1,156 @@
1
+ "use client";
2
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
3
+ import * as i from "react";
4
+ import { createPortal as y } from "react-dom";
5
+ import { MotionConfig as b, AnimatePresence as g, motion as f } from "motion/react";
6
+ import { Close as w } from "../lib/icons.js";
7
+ import { cva as h } from "class-variance-authority";
8
+ import { cn as n } from "../lib/cn.js";
9
+ import { backdropVariants as N, modalPanelVariants as M } from "../lib/motion.js";
10
+ const k = h(
11
+ [
12
+ "relative flex w-full flex-col",
13
+ "bg-elevated text-foreground",
14
+ "rounded-xl shadow-elevation"
15
+ ],
16
+ {
17
+ variants: {
18
+ size: {
19
+ sm: "max-w-sm",
20
+ md: "max-w-md",
21
+ lg: "max-w-lg",
22
+ xl: "max-w-2xl"
23
+ }
24
+ },
25
+ defaultVariants: { size: "md" }
26
+ }
27
+ );
28
+ function L({ open: o, onOpenChange: e, size: t, className: u, children: p }) {
29
+ const s = i.useRef(null), l = i.useRef(null);
30
+ return i.useEffect(() => {
31
+ if (!o) return;
32
+ l.current = document.activeElement;
33
+ const x = document.body.style.overflow;
34
+ document.body.style.overflow = "hidden";
35
+ const d = (a) => {
36
+ a.key === "Escape" && (a.stopPropagation(), e(!1));
37
+ };
38
+ document.addEventListener("keydown", d);
39
+ const v = requestAnimationFrame(() => {
40
+ var a;
41
+ (a = s.current) == null || a.focus();
42
+ });
43
+ return () => {
44
+ var a, c;
45
+ document.removeEventListener("keydown", d), document.body.style.overflow = x, cancelAnimationFrame(v), (c = (a = l.current) == null ? void 0 : a.focus) == null || c.call(a);
46
+ };
47
+ }, [o, e]), y(
48
+ /* @__PURE__ */ r(b, { reducedMotion: "user", children: /* @__PURE__ */ r(g, { children: o && /* @__PURE__ */ m("div", { className: "fixed inset-0 z-50 flex items-center justify-center p-4", children: [
49
+ /* @__PURE__ */ r(
50
+ f.div,
51
+ {
52
+ variants: N,
53
+ initial: "hidden",
54
+ animate: "visible",
55
+ exit: "hidden",
56
+ className: "absolute inset-0 bg-overlay",
57
+ onClick: () => e(!1),
58
+ "aria-hidden": !0
59
+ },
60
+ "backdrop"
61
+ ),
62
+ /* @__PURE__ */ m(
63
+ f.div,
64
+ {
65
+ ref: s,
66
+ variants: M,
67
+ initial: "hidden",
68
+ animate: "visible",
69
+ exit: "hidden",
70
+ role: "dialog",
71
+ "aria-modal": "true",
72
+ tabIndex: -1,
73
+ className: n(k({ size: t }), "outline-none", u),
74
+ children: [
75
+ /* @__PURE__ */ r(
76
+ "button",
77
+ {
78
+ type: "button",
79
+ onClick: () => e(!1),
80
+ "aria-label": "Close",
81
+ className: n(
82
+ "absolute right-4 top-4 inline-flex size-8 items-center justify-center",
83
+ "rounded-md text-muted-foreground",
84
+ "transition-[background,color,transform] duration-(--duration-fast) ease-out hover:bg-muted hover:text-foreground",
85
+ "active:scale-(--scale-press)",
86
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
87
+ "[&_svg]:size-4 [&_svg]:shrink-0"
88
+ ),
89
+ children: /* @__PURE__ */ r(w, { "aria-hidden": !0 })
90
+ }
91
+ ),
92
+ p
93
+ ]
94
+ },
95
+ "panel"
96
+ )
97
+ ] }) }) }),
98
+ document.body
99
+ );
100
+ }
101
+ const R = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
102
+ "div",
103
+ {
104
+ ref: t,
105
+ className: n("flex flex-col gap-1 px-6 pt-6 pr-14", o),
106
+ ...e
107
+ }
108
+ ));
109
+ R.displayName = "ModalHeader";
110
+ const j = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
111
+ "h2",
112
+ {
113
+ ref: t,
114
+ className: n("text-lg font-semibold text-foreground", o),
115
+ ...e
116
+ }
117
+ ));
118
+ j.displayName = "ModalTitle";
119
+ const z = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
120
+ "p",
121
+ {
122
+ ref: t,
123
+ className: n("text-xs text-muted-foreground", o),
124
+ ...e
125
+ }
126
+ ));
127
+ z.displayName = "ModalDescription";
128
+ const E = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
129
+ "div",
130
+ {
131
+ ref: t,
132
+ className: n("px-6 py-4 text-xs text-foreground", o),
133
+ ...e
134
+ }
135
+ ));
136
+ E.displayName = "ModalBody";
137
+ const F = i.forwardRef(({ className: o, ...e }, t) => /* @__PURE__ */ r(
138
+ "div",
139
+ {
140
+ ref: t,
141
+ className: n(
142
+ "flex items-center justify-end gap-2 px-6 pb-6 pt-2",
143
+ o
144
+ ),
145
+ ...e
146
+ }
147
+ ));
148
+ F.displayName = "ModalFooter";
149
+ export {
150
+ L as Modal,
151
+ E as ModalBody,
152
+ z as ModalDescription,
153
+ F as ModalFooter,
154
+ R as ModalHeader,
155
+ j as ModalTitle
156
+ };
@@ -0,0 +1,15 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ import * as React from "react";
3
+ export declare const Navbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & React.RefAttributes<HTMLElement>>;
4
+ export declare const NavbarBrand: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const navbarContentVariants: (props?: ({
6
+ justify?: "center" | "end" | "start" | null | undefined;
7
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
8
+ export interface NavbarContentProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof navbarContentVariants> {
9
+ }
10
+ export declare const NavbarContent: React.ForwardRefExoticComponent<NavbarContentProps & React.RefAttributes<HTMLDivElement>>;
11
+ export interface NavbarItemProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
12
+ isActive?: boolean;
13
+ }
14
+ export declare const NavbarItem: React.ForwardRefExoticComponent<NavbarItemProps & React.RefAttributes<HTMLAnchorElement>>;
15
+ export {};
@@ -0,0 +1,68 @@
1
+ "use client";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { cva as i } from "class-variance-authority";
5
+ import { cn as n } from "../lib/cn.js";
6
+ const m = o.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
7
+ "nav",
8
+ {
9
+ ref: e,
10
+ className: n(
11
+ "sticky top-0 z-40 flex h-16 items-center gap-4 px-4",
12
+ "bg-background/80 backdrop-blur",
13
+ r
14
+ ),
15
+ ...a
16
+ }
17
+ ));
18
+ m.displayName = "Navbar";
19
+ const d = o.forwardRef(({ className: r, ...a }, e) => /* @__PURE__ */ t(
20
+ "div",
21
+ {
22
+ ref: e,
23
+ className: n(
24
+ "flex items-center gap-2 font-semibold text-foreground",
25
+ r
26
+ ),
27
+ ...a
28
+ }
29
+ ));
30
+ d.displayName = "NavbarBrand";
31
+ const c = i("flex items-center gap-1", {
32
+ variants: {
33
+ justify: {
34
+ start: "mr-auto",
35
+ center: "mx-auto",
36
+ end: "ml-auto"
37
+ }
38
+ }
39
+ }), f = o.forwardRef(({ className: r, justify: a, ...e }, s) => /* @__PURE__ */ t(
40
+ "div",
41
+ {
42
+ ref: s,
43
+ className: n(c({ justify: a }), r),
44
+ ...e
45
+ }
46
+ ));
47
+ f.displayName = "NavbarContent";
48
+ const l = o.forwardRef(({ className: r, isActive: a, ...e }, s) => /* @__PURE__ */ t(
49
+ "a",
50
+ {
51
+ ref: s,
52
+ "aria-current": a ? "page" : void 0,
53
+ className: n(
54
+ "rounded-md px-2 py-1 text-xs transition-colors",
55
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
56
+ a ? "text-foreground" : "text-muted-foreground hover:text-foreground",
57
+ r
58
+ ),
59
+ ...e
60
+ }
61
+ ));
62
+ l.displayName = "NavbarItem";
63
+ export {
64
+ m as Navbar,
65
+ d as NavbarBrand,
66
+ f as NavbarContent,
67
+ l as NavbarItem
68
+ };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ export interface NumberFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "onChange" | "type" | "min" | "max" | "step"> {
3
+ value?: number;
4
+ onChange?: (value: number) => void;
5
+ min?: number;
6
+ max?: number;
7
+ step?: number;
8
+ size?: "sm" | "md" | "lg";
9
+ isInvalid?: boolean;
10
+ }
11
+ export declare const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,89 @@
1
+ "use client";
2
+ import { jsxs as k, jsx as r } from "react/jsx-runtime";
3
+ import * as M from "react";
4
+ import { Minus as _, Plus as j } from "../lib/icons.js";
5
+ import { cn as c } from "../lib/cn.js";
6
+ import { inputBaseClass as h } from "./field.js";
7
+ const D = {
8
+ sm: { field: "h-8 text-xs", btn: "size-8 [&_svg]:size-3.5" },
9
+ md: { field: "h-10 text-xs", btn: "size-10 [&_svg]:size-4" },
10
+ lg: { field: "h-11 text-base", btn: "size-11 [&_svg]:size-4" }
11
+ }, F = M.forwardRef(
12
+ ({
13
+ className: v,
14
+ value: l,
15
+ onChange: t,
16
+ min: i,
17
+ max: s,
18
+ step: d = 1,
19
+ size: x = "md",
20
+ isInvalid: N,
21
+ disabled: o,
22
+ ...z
23
+ }, w) => {
24
+ const u = D[x], b = (n) => {
25
+ let e = n;
26
+ return i !== void 0 && (e = Math.max(i, e)), s !== void 0 && (e = Math.min(s, e)), e;
27
+ }, a = l ?? 0, y = !o && (i === void 0 || a > i), g = !o && (s === void 0 || a < s), p = (n) => t == null ? void 0 : t(b(a + n * d)), m = c(
28
+ "inline-flex items-center justify-center rounded-md border border-input bg-elevated text-foreground",
29
+ "transition-[background,box-shadow] duration-(--duration-fast) hover:bg-muted",
30
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
31
+ "disabled:pointer-events-none disabled:opacity-50",
32
+ u.btn
33
+ );
34
+ return /* @__PURE__ */ k("div", { className: c("inline-flex items-center gap-1.5", v), children: [
35
+ /* @__PURE__ */ r(
36
+ "button",
37
+ {
38
+ type: "button",
39
+ "aria-label": "Decrease",
40
+ disabled: !y,
41
+ onClick: () => p(-1),
42
+ className: m,
43
+ children: /* @__PURE__ */ r(_, {})
44
+ }
45
+ ),
46
+ /* @__PURE__ */ r(
47
+ "input",
48
+ {
49
+ ref: w,
50
+ type: "number",
51
+ inputMode: "numeric",
52
+ value: l ?? "",
53
+ min: i,
54
+ max: s,
55
+ step: d,
56
+ disabled: o,
57
+ "aria-invalid": N || void 0,
58
+ onChange: (n) => {
59
+ const e = n.target.value;
60
+ if (e === "") return;
61
+ const f = Number(e);
62
+ Number.isNaN(f) || t == null || t(b(f));
63
+ },
64
+ className: c(
65
+ h,
66
+ "w-20 text-center [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
67
+ u.field
68
+ ),
69
+ ...z
70
+ }
71
+ ),
72
+ /* @__PURE__ */ r(
73
+ "button",
74
+ {
75
+ type: "button",
76
+ "aria-label": "Increase",
77
+ disabled: !g,
78
+ onClick: () => p(1),
79
+ className: m,
80
+ children: /* @__PURE__ */ r(j, {})
81
+ }
82
+ )
83
+ ] });
84
+ }
85
+ );
86
+ F.displayName = "NumberField";
87
+ export {
88
+ F as NumberField
89
+ };
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
3
+ /** Total number of pages. */
4
+ total: number;
5
+ /** Current 1-based page. */
6
+ page: number;
7
+ onChange: (page: number) => void;
8
+ /** Pages shown on each side of the current page. */
9
+ siblings?: number;
10
+ /** Compact variant for table footers. */
11
+ size?: "sm" | "md";
12
+ /**
13
+ * Left-side summary ("1 to 8 of 14 results"). When set, the nav spans
14
+ * full width with the summary left and the controls right — the HeroUI
15
+ * pagination anatomy (Summary + Content).
16
+ */
17
+ summary?: React.ReactNode;
18
+ /** Show "Prev" / "Next" text labels on the nav buttons. */
19
+ labels?: boolean;
20
+ /**
21
+ * Rows-per-page control. Pass all three to render a "Rows per page"
22
+ * select beside the controls; the consumer owns the slicing.
23
+ */
24
+ pageSize?: number;
25
+ pageSizeOptions?: number[];
26
+ onPageSizeChange?: (size: number) => void;
27
+ }
28
+ export declare const Pagination: React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLElement>>;
@@ -0,0 +1,179 @@
1
+ "use client";
2
+ import { jsxs as u, jsx as l } from "react/jsx-runtime";
3
+ import * as j from "react";
4
+ import { ChevronLeft as L, MoreHorizontal as k, ChevronRight as G } from "../lib/icons.js";
5
+ import { cn as a } from "../lib/cn.js";
6
+ import { Select as M } from "./select.js";
7
+ function p(e, r) {
8
+ const t = [];
9
+ for (let i = e; i <= r; i += 1) t.push(i);
10
+ return t;
11
+ }
12
+ function E(e, r, t) {
13
+ if (t * 2 + 5 >= e)
14
+ return p(1, e);
15
+ const m = Math.max(r - t, 1), n = Math.min(r + t, e), d = m > 2, o = n < e - 1;
16
+ if (!d && o) {
17
+ const c = t * 2 + 3;
18
+ return [...p(1, c), "end-ellipsis", e];
19
+ }
20
+ if (d && !o) {
21
+ const c = t * 2 + 3;
22
+ return [1, "start-ellipsis", ...p(e - c + 1, e)];
23
+ }
24
+ return [
25
+ 1,
26
+ "start-ellipsis",
27
+ ...p(m, n),
28
+ "end-ellipsis",
29
+ e
30
+ ];
31
+ }
32
+ const A = (e) => a(
33
+ "inline-flex items-center justify-center rounded-md font-medium",
34
+ "outline-none focus-visible:ring-3 focus-visible:ring-ring",
35
+ "transition active:scale-(--scale-press)",
36
+ "disabled:pointer-events-none disabled:opacity-40",
37
+ e === "sm" ? "size-7 text-xs" : "size-9 text-xs"
38
+ ), N = (e) => e === "sm" ? "w-auto gap-1.5 px-2" : "w-auto gap-1.5 px-2.5", F = j.forwardRef(
39
+ ({
40
+ className: e,
41
+ total: r,
42
+ page: t,
43
+ onChange: i,
44
+ siblings: m = 1,
45
+ size: n = "md",
46
+ summary: d,
47
+ labels: o = !1,
48
+ pageSize: c,
49
+ pageSizeOptions: w,
50
+ onPageSizeChange: g,
51
+ ...C
52
+ }, y) => {
53
+ if (r <= 0) return null;
54
+ const P = E(r, t, m), R = t <= 1, S = t >= r, f = A(n), x = n === "sm" ? "size-3.5" : "size-4", h = c != null && !!g, b = d != null || h;
55
+ return /* @__PURE__ */ u(
56
+ "nav",
57
+ {
58
+ ref: y,
59
+ "aria-label": "Pagination",
60
+ className: a(
61
+ "flex items-center",
62
+ b ? "w-full justify-between gap-4" : "gap-1",
63
+ e
64
+ ),
65
+ ...C,
66
+ children: [
67
+ b && /* @__PURE__ */ l(
68
+ "span",
69
+ {
70
+ className: a(
71
+ "text-muted-foreground",
72
+ "text-xs"
73
+ ),
74
+ children: d
75
+ }
76
+ ),
77
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-4", children: [
78
+ h && /* @__PURE__ */ u(
79
+ "label",
80
+ {
81
+ className: a(
82
+ "flex items-center gap-2 text-muted-foreground",
83
+ "text-xs"
84
+ ),
85
+ children: [
86
+ "Rows per page",
87
+ /* @__PURE__ */ l(
88
+ M,
89
+ {
90
+ size: "sm",
91
+ className: "w-18",
92
+ placement: "top",
93
+ items: (w ?? [8, 16, 32]).map((s) => ({
94
+ label: String(s),
95
+ value: String(s)
96
+ })),
97
+ value: String(c),
98
+ onChange: (s) => g(Number(s))
99
+ }
100
+ )
101
+ ]
102
+ }
103
+ ),
104
+ /* @__PURE__ */ u("div", { className: "flex items-center gap-1", children: [
105
+ /* @__PURE__ */ u(
106
+ "button",
107
+ {
108
+ type: "button",
109
+ "aria-label": "Go to previous page",
110
+ disabled: R,
111
+ onClick: () => i(t - 1),
112
+ className: a(
113
+ f,
114
+ "text-foreground hover:bg-muted",
115
+ o && N(n)
116
+ ),
117
+ children: [
118
+ /* @__PURE__ */ l(L, { className: x, "aria-hidden": !0 }),
119
+ o && "Prev"
120
+ ]
121
+ }
122
+ ),
123
+ P.map((s) => {
124
+ if (s === "start-ellipsis" || s === "end-ellipsis")
125
+ return /* @__PURE__ */ l(
126
+ "span",
127
+ {
128
+ "aria-hidden": !0,
129
+ className: a(f, "text-muted-foreground"),
130
+ children: /* @__PURE__ */ l(k, { className: x })
131
+ },
132
+ s
133
+ );
134
+ const v = s === t;
135
+ return /* @__PURE__ */ l(
136
+ "button",
137
+ {
138
+ type: "button",
139
+ "aria-label": `Go to page ${s}`,
140
+ "aria-current": v ? "page" : void 0,
141
+ onClick: () => i(s),
142
+ className: a(
143
+ f,
144
+ v ? "bg-brand text-brand-foreground" : "text-foreground hover:bg-muted"
145
+ ),
146
+ children: s
147
+ },
148
+ s
149
+ );
150
+ }),
151
+ /* @__PURE__ */ u(
152
+ "button",
153
+ {
154
+ type: "button",
155
+ "aria-label": "Go to next page",
156
+ disabled: S,
157
+ onClick: () => i(t + 1),
158
+ className: a(
159
+ f,
160
+ "text-foreground hover:bg-muted",
161
+ o && N(n)
162
+ ),
163
+ children: [
164
+ o && "Next",
165
+ /* @__PURE__ */ l(G, { className: x, "aria-hidden": !0 })
166
+ ]
167
+ }
168
+ )
169
+ ] })
170
+ ] })
171
+ ]
172
+ }
173
+ );
174
+ }
175
+ );
176
+ F.displayName = "Pagination";
177
+ export {
178
+ F as Pagination
179
+ };
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ /**
3
+ * Panel — a bordered surface region with an optional fixed header/footer and a
4
+ * scrollable body. The building block for app frames: editors, previews, side
5
+ * columns, tool windows. Compose: Panel > PanelHeader (PanelTitle + PanelToolbar)
6
+ * + PanelBody + PanelFooter.
7
+ */
8
+ export declare const Panel: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
9
+ export declare const PanelHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const PanelTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
11
+ /** Right-aligned actions area for a PanelHeader. */
12
+ export declare const PanelToolbar: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
13
+ export declare const PanelBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
14
+ export declare const PanelFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;