@actioneer/ads 0.8.0 → 1.0.1

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.
@@ -7,7 +7,7 @@ import "@xyflow/react/dist/style.css";
7
7
  import { cn as W } from "../lib/cn.js";
8
8
  import { Minus as q, Plus as J, Maximize as Q, Magnet as X } from "../lib/icons.js";
9
9
  import { Button as a } from "./button.js";
10
- const x = 16, Y = 1.2, $ = [x, x], ee = 1.4, w = 18, oe = 2, te = [8, 4], re = 11, I = 150, ae = 200, ne = 0.28, R = "var(--canvas-edge)";
10
+ const x = 16, Y = 1.2, $ = [x, x], ee = 1.4, w = 18, oe = 2, te = [8, 4], re = "var(--text-xs)", I = 150, ae = 200, ne = 0.28, R = "var(--canvas-edge)";
11
11
  function v(o) {
12
12
  return typeof window > "u" || !window.matchMedia ? o : window.matchMedia("(prefers-reduced-motion: reduce)").matches ? 0 : o;
13
13
  }
@@ -182,7 +182,7 @@ const F = r.forwardRef(({ className: o, ...e }, a) => /* @__PURE__ */ t(
182
182
  F.displayName = "ModalHeader";
183
183
  const G = r.forwardRef(({ className: o, id: e, ...a }, i) => {
184
184
  const l = r.useContext(x), d = n(
185
- "text-[15px] font-semibold leading-5 text-foreground",
185
+ "text-l font-semibold leading-5 text-foreground",
186
186
  o
187
187
  );
188
188
  return l ? /* @__PURE__ */ t(
@@ -37,7 +37,7 @@ const x = o.forwardRef(
37
37
  }
38
38
  ),
39
39
  /* @__PURE__ */ t("div", { className: "min-w-0", children: [
40
- /* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-xl font-medium tracking-tight text-foreground", children: s }),
40
+ /* @__PURE__ */ e("h1", { className: "flex min-h-8 items-center text-2xl font-medium tracking-tight text-foreground", children: s }),
41
41
  r && /* @__PURE__ */ e("p", { className: "mt-1 max-w-2xl text-xs text-muted-foreground", children: r })
42
42
  ] })
43
43
  ] }),
@@ -0,0 +1,18 @@
1
+ import { HTMLMotionProps } from 'motion/react';
2
+ import * as React from "react";
3
+ export interface SearchDisclosureProps extends Omit<HTMLMotionProps<"div">, "onChange"> {
4
+ value: string;
5
+ onValueChange: (value: string) => void;
6
+ open?: boolean;
7
+ defaultOpen?: boolean;
8
+ onOpenChange?: (open: boolean) => void;
9
+ placeholder?: string;
10
+ inputLabel?: string;
11
+ triggerLabel?: string;
12
+ }
13
+ /**
14
+ * A compact search action that reveals an inline field from its anchored right
15
+ * edge. The field keeps its full width while the container clips it, avoiding
16
+ * squeezed text and malformed borders during the disclosure spring.
17
+ */
18
+ export declare const SearchDisclosure: React.ForwardRefExoticComponent<Omit<SearchDisclosureProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,106 @@
1
+ "use client";
2
+ import { jsx as e } from "react/jsx-runtime";
3
+ import * as o from "react";
4
+ import { MotionConfig as S, motion as n, AnimatePresence as g } from "motion/react";
5
+ import { Close as k, Search as u } from "../lib/icons.js";
6
+ import { springDisclosure as s } from "../lib/motion.js";
7
+ import { cn as D } from "../lib/cn.js";
8
+ import { Button as C } from "./button.js";
9
+ import { Input as z } from "./input.js";
10
+ import { Tooltip as j } from "./tooltip.js";
11
+ const I = o.forwardRef(
12
+ ({
13
+ className: f,
14
+ value: c,
15
+ onValueChange: h,
16
+ open: l,
17
+ defaultOpen: p = !1,
18
+ onOpenChange: t,
19
+ placeholder: y = "Search…",
20
+ inputLabel: v = "Search",
21
+ triggerLabel: m = "Search",
22
+ ...b
23
+ }, x) => {
24
+ const [w, N] = o.useState(p), r = l !== void 0, d = r ? l : w, a = o.useCallback(
25
+ (i) => {
26
+ r || N(i), t == null || t(i);
27
+ },
28
+ [r, t]
29
+ );
30
+ return /* @__PURE__ */ e(S, { reducedMotion: "user", children: /* @__PURE__ */ e(
31
+ n.div,
32
+ {
33
+ ref: x,
34
+ initial: !1,
35
+ animate: { width: d ? 256 : 32 },
36
+ transition: s,
37
+ className: D("relative h-8 shrink-0 overflow-hidden", f),
38
+ ...b,
39
+ children: /* @__PURE__ */ e(g, { initial: !1, mode: "popLayout", children: d ? /* @__PURE__ */ e(
40
+ n.div,
41
+ {
42
+ initial: { opacity: 0 },
43
+ animate: { opacity: 1 },
44
+ exit: { opacity: 0 },
45
+ transition: s,
46
+ className: "absolute inset-y-0 right-0 w-64",
47
+ children: /* @__PURE__ */ e(
48
+ z,
49
+ {
50
+ autoFocus: !0,
51
+ type: "search",
52
+ size: "sm",
53
+ className: "w-full",
54
+ startContent: /* @__PURE__ */ e(u, { "aria-hidden": "true" }),
55
+ endContent: /* @__PURE__ */ e(
56
+ "button",
57
+ {
58
+ type: "button",
59
+ "aria-label": "Close search",
60
+ onClick: () => a(!1),
61
+ className: "-mr-1 inline-flex size-6 items-center justify-center rounded-xs outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring",
62
+ children: /* @__PURE__ */ e(k, { "aria-hidden": "true" })
63
+ }
64
+ ),
65
+ value: c,
66
+ onChange: (i) => h(i.currentTarget.value),
67
+ onKeyDown: (i) => {
68
+ i.key === "Escape" && (i.preventDefault(), a(!1));
69
+ },
70
+ placeholder: y,
71
+ "aria-label": v
72
+ }
73
+ )
74
+ },
75
+ "search-field"
76
+ ) : /* @__PURE__ */ e(
77
+ n.div,
78
+ {
79
+ initial: { opacity: 0 },
80
+ animate: { opacity: 1 },
81
+ exit: { opacity: 0 },
82
+ transition: s,
83
+ className: "absolute inset-y-0 right-0 w-8",
84
+ children: /* @__PURE__ */ e(j, { content: m, children: /* @__PURE__ */ e(
85
+ C,
86
+ {
87
+ variant: "outline",
88
+ size: "icon-sm",
89
+ "aria-label": m,
90
+ "data-active": c.trim() || void 0,
91
+ onClick: () => a(!0),
92
+ className: "data-[active=true]:text-action-primary-text",
93
+ children: /* @__PURE__ */ e(u, { "aria-hidden": "true" })
94
+ }
95
+ ) })
96
+ },
97
+ "search-trigger"
98
+ ) })
99
+ }
100
+ ) });
101
+ }
102
+ );
103
+ I.displayName = "SearchDisclosure";
104
+ export {
105
+ I as SearchDisclosure
106
+ };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as r, jsxs as c } from "react/jsx-runtime";
3
3
  import * as s from "react";
4
- import { MotionConfig as z, motion as _ } from "motion/react";
5
- import { User as j, PanelLeft as E } from "../lib/icons.js";
4
+ import { MotionConfig as z, motion as j } from "motion/react";
5
+ import { User as _, PanelLeft as E } from "../lib/icons.js";
6
6
  import { cn as n } from "../lib/cn.js";
7
7
  import { springSidebar as H } from "../lib/motion.js";
8
8
  import { Tooltip as I } from "./tooltip.js";
@@ -48,7 +48,7 @@ const K = s.forwardRef(
48
48
  [u, h, g]
49
49
  );
50
50
  return /* @__PURE__ */ r(R.Provider, { value: x, children: /* @__PURE__ */ r(z, { reducedMotion: "user", children: /* @__PURE__ */ r(
51
- _.aside,
51
+ j.aside,
52
52
  {
53
53
  ref: m,
54
54
  "data-collapsed": u ? "true" : "false",
@@ -177,7 +177,7 @@ const A = s.forwardRef(
177
177
  A.displayName = "SidebarNav";
178
178
  const B = s.forwardRef(
179
179
  ({ className: t, label: e, children: a, ...i }, o) => /* @__PURE__ */ c("div", { ref: o, className: t, ...i, children: [
180
- e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s leading-[var(--text-s--line-height)] font-medium text-on-warm-grey-secondary group-data-[collapsed=true]/sidebar:hidden", children: e }),
180
+ e && /* @__PURE__ */ r("div", { className: "mb-1.5 px-3 text-s font-normal uppercase leading-4 tracking-wider text-tertiary group-data-[collapsed=true]/sidebar:hidden", children: e }),
181
181
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 group-data-[collapsed=true]/sidebar:gap-2", children: a })
182
182
  ] })
183
183
  );
@@ -190,17 +190,24 @@ const D = s.forwardRef(
190
190
  "aria-current": a ? "page" : void 0,
191
191
  title: d ?? (typeof o == "string" ? o : void 0),
192
192
  className: n(
193
- "flex h-9 items-center gap-2.5 rounded-md border border-transparent px-3 text-m leading-[var(--text-m--line-height)] font-normal text-wg12 transition-colors",
193
+ "group/sidebar-item flex h-9 items-center gap-2.5 rounded-md border border-transparent px-3 text-m leading-[var(--text-m--line-height)] font-normal text-wg12",
194
+ "transition-[background-color,border-color,color] duration-150 ease-out motion-reduce:transition-none",
194
195
  "outline-none focus-visible:ring-3 focus-visible:ring-ring",
195
- "[&_svg]:size-4 [&_svg]:shrink-0",
196
196
  // Collapsed: a centered square (--sidebar-item) so every rail item lines up.
197
197
  "group-data-[collapsed=true]/sidebar:mx-auto group-data-[collapsed=true]/sidebar:size-(--sidebar-item) group-data-[collapsed=true]/sidebar:justify-center group-data-[collapsed=true]/sidebar:p-0",
198
- a ? "border-wg4 bg-card" : "hover:bg-sidebar-accent/60",
198
+ a ? "bg-sidebar-accent" : "hover:bg-sidebar-accent/60",
199
199
  t
200
200
  ),
201
201
  ...l,
202
202
  children: [
203
- a && s.isValidElement(e) ? s.cloneElement(e, { weight: "fill" }) : e,
203
+ e && /* @__PURE__ */ r(
204
+ "span",
205
+ {
206
+ "aria-hidden": !0,
207
+ className: "flex shrink-0 items-center justify-center transition-transform duration-150 ease-out group-hover/sidebar-item:scale-110 motion-reduce:transition-none motion-reduce:group-hover/sidebar-item:scale-100 [&_svg]:size-4 [&_svg]:shrink-0",
208
+ children: a && s.isValidElement(e) ? s.cloneElement(e, { weight: "fill" }) : e
209
+ }
210
+ ),
204
211
  /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate group-data-[collapsed=true]/sidebar:hidden", children: o }),
205
212
  i && /* @__PURE__ */ r("span", { className: "shrink-0 group-data-[collapsed=true]/sidebar:hidden", children: i })
206
213
  ]
@@ -372,7 +379,7 @@ const P = s.forwardRef(
372
379
  children: [
373
380
  !o && /* @__PURE__ */ r(L, { size: "sm", name: e, src: i }),
374
381
  o && /* @__PURE__ */ r(
375
- j,
382
+ _,
376
383
  {
377
384
  "aria-hidden": !0,
378
385
  className: "hidden size-4 shrink-0 text-muted-foreground group-data-[collapsed=true]/sidebar:block"
@@ -81,7 +81,7 @@ export declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttrib
81
81
  export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
82
82
  /** Stable key for selection (required on body rows to be selectable). */
83
83
  rowKey?: string;
84
- /** Explicitly marks a row as opening or expanding something. */
84
+ /** @deprecated Existing visual-only marker. New rows should pass an action via onClick. */
85
85
  isInteractive?: boolean;
86
86
  }
87
87
  export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;