@actioneer/ads 1.0.7 → 1.0.8

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 (71) hide show
  1. package/DESIGN.md +80 -86
  2. package/README.md +6 -0
  3. package/components/ai-elements/chart.js +20 -20
  4. package/components/ai-elements/inline-citation.js +50 -50
  5. package/components/ai-elements/message.js +1 -1
  6. package/components/ai-elements/tool.js +5 -5
  7. package/components/alert.d.ts +3 -2
  8. package/components/alert.js +25 -25
  9. package/components/answer.js +1 -1
  10. package/components/assistant-ui/action-bar.js +1 -1
  11. package/components/assistant-ui/attachment.js +68 -49
  12. package/components/assistant-ui/composer-add-context.js +1 -1
  13. package/components/assistant-ui/composer-trigger-popover.js +1 -1
  14. package/components/assistant-ui/composer.js +13 -13
  15. package/components/assistant-ui/message-timing.js +6 -6
  16. package/components/assistant-ui/selection-toolbar.js +5 -5
  17. package/components/assistant-ui/sources.js +15 -15
  18. package/components/assistant-ui/tooltip-icon-button.js +18 -14
  19. package/components/audio-waveform.d.ts +21 -8
  20. package/components/audio-waveform.js +371 -94
  21. package/components/autocomplete.js +9 -9
  22. package/components/breadcrumbs.js +32 -38
  23. package/components/button.js +83 -73
  24. package/components/card.js +1 -1
  25. package/components/chart.js +732 -673
  26. package/components/chip.js +37 -35
  27. package/components/command-palette.js +12 -12
  28. package/components/connector-card.d.ts +1 -2
  29. package/components/connector-card.js +17 -17
  30. package/components/date-range-picker.js +1 -2
  31. package/components/drawer.js +9 -10
  32. package/components/dropdown.js +1 -1
  33. package/components/empty-state.d.ts +2 -0
  34. package/components/empty-state.js +17 -15
  35. package/components/field.js +9 -10
  36. package/components/file-dropzone.d.ts +6 -3
  37. package/components/file-dropzone.js +72 -60
  38. package/components/infinite-canvas.js +9 -9
  39. package/components/modal.js +1 -1
  40. package/components/page-body.js +8 -8
  41. package/components/popover.js +11 -11
  42. package/components/progress-circle.d.ts +1 -1
  43. package/components/progress-circle.js +57 -48
  44. package/components/segmented.d.ts +1 -0
  45. package/components/segmented.js +34 -36
  46. package/components/select.js +2 -2
  47. package/components/selection-action-bar.js +32 -31
  48. package/components/setting-row.js +10 -10
  49. package/components/slider.js +5 -5
  50. package/components/stepper.d.ts +1 -1
  51. package/components/stepper.js +1 -1
  52. package/components/switch.js +10 -10
  53. package/components/table.d.ts +2 -2
  54. package/components/table.js +177 -170
  55. package/components/tabs.js +41 -35
  56. package/components/timeline.js +3 -3
  57. package/components/toast.js +53 -56
  58. package/components/ui/button.js +4 -4
  59. package/components/ui/dialog.js +1 -1
  60. package/components/viz-charts.js +263 -221
  61. package/examples/README.md +30 -0
  62. package/examples/agents-screen.tsx +477 -0
  63. package/examples/settings-screen.tsx +90 -0
  64. package/examples/workspace-header.tsx +71 -0
  65. package/lib/icons.d.ts +8 -0
  66. package/lib/icons.js +171 -118
  67. package/llms.txt +14 -14
  68. package/manifest.json +77 -48
  69. package/package.json +1 -1
  70. package/styles.css +55 -68
  71. package/theme.css +50 -59
@@ -1,22 +1,24 @@
1
1
  "use client";
2
- import { jsxs as a, jsx as r, Fragment as f } from "react/jsx-runtime";
3
- import * as i from "react";
4
- import { cva as C } from "class-variance-authority";
5
- import { cn as v } from "../lib/cn.js";
6
- import { Button as D } from "./button.js";
7
- import { FileText as R, Close as B, Upload as w } from "../lib/icons.js";
8
- const T = C(
9
- v(
10
- "flex w-full cursor-pointer flex-col items-center justify-center gap-2 rounded-xl px-6 py-8 text-center",
11
- "border border-dashed border-border-strong bg-surface outline-none",
2
+ import { jsxs as t, jsx as r, Fragment as m } from "react/jsx-runtime";
3
+ import * as s from "react";
4
+ import { cva as R } from "class-variance-authority";
5
+ import { cn as p } from "../lib/cn.js";
6
+ import { Button as v } from "./button.js";
7
+ import { FileText as j, Upload as B } from "../lib/icons.js";
8
+ const C = R(
9
+ p(
10
+ "flex w-full cursor-pointer rounded-lg border bg-card outline-none",
12
11
  "transition-[background-color,border-color,transform] duration-150 ease-out",
13
- "hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring",
14
- "active:scale-[0.97] motion-reduce:transition-none"
12
+ "focus-visible:ring-3 focus-visible:ring-ring motion-reduce:transition-none"
15
13
  ),
16
14
  {
17
15
  variants: {
16
+ hasFiles: {
17
+ true: "flex-row items-center justify-between gap-4 border-solid border-border p-3 text-left",
18
+ false: "flex-col items-center justify-center gap-3 border-dashed border-border-strong px-6 py-7 text-center hover:bg-wg1 active:scale-[0.99] motion-reduce:active:scale-100"
19
+ },
18
20
  isDragging: {
19
- true: "border-ring bg-accent",
21
+ true: "border-dashed border-field-focus bg-t1 hover:bg-t1",
20
22
  false: ""
21
23
  },
22
24
  isDisabled: {
@@ -24,33 +26,33 @@ const T = C(
24
26
  false: ""
25
27
  }
26
28
  },
27
- defaultVariants: { isDragging: !1, isDisabled: !1 }
29
+ defaultVariants: { hasFiles: !1, isDragging: !1, isDisabled: !1 }
28
30
  }
29
- ), j = (t) => t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${Math.round(t / 1024)} KB` : `${(t / (1024 * 1024)).toFixed(1)} MB`, $ = i.forwardRef(
31
+ ), N = "inline-flex size-9 shrink-0 items-center justify-center rounded-md border border-border bg-card text-muted-foreground [&>svg]:size-4.5", F = (a) => a < 1024 ? `${a} B` : a < 1024 * 1024 ? `${Math.round(a / 1024)} KB` : `${(a / (1024 * 1024)).toFixed(1)} MB`, T = s.forwardRef(
30
32
  ({
31
- className: t,
32
- accept: b,
33
+ className: a,
34
+ accept: y,
33
35
  multiple: c = !1,
34
36
  disabled: n = !1,
35
37
  onFiles: l,
36
- files: s,
38
+ files: i,
37
39
  onClear: g,
38
- label: N,
39
- hint: p,
40
- ...y
41
- }, z) => {
42
- const m = i.useRef(null), [h, d] = i.useState(!1), o = i.useRef(0), x = (e) => {
40
+ label: w,
41
+ hint: h,
42
+ ...z
43
+ }, k) => {
44
+ const x = s.useRef(null), [d, f] = s.useState(!1), o = s.useRef(0), b = (e) => {
43
45
  e != null && e.length && (l == null || l(c ? Array.from(e) : [e[0]]));
44
46
  }, u = () => {
45
47
  var e;
46
- return (e = m.current) == null ? void 0 : e.click();
47
- }, k = !!(s != null && s.length);
48
- return /* @__PURE__ */ a(
48
+ return (e = x.current) == null ? void 0 : e.click();
49
+ }, D = !!(i != null && i.length);
50
+ return /* @__PURE__ */ t(
49
51
  "div",
50
52
  {
51
- ref: z,
53
+ ref: k,
52
54
  "data-slot": "file-dropzone",
53
- "data-dragging": h || void 0,
55
+ "data-dragging": d || void 0,
54
56
  role: "button",
55
57
  tabIndex: n ? -1 : 0,
56
58
  "aria-disabled": n || void 0,
@@ -59,51 +61,52 @@ const T = C(
59
61
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), u());
60
62
  },
61
63
  onDragEnter: (e) => {
62
- e.preventDefault(), o.current += 1, d(!0);
64
+ e.preventDefault(), o.current += 1, f(!0);
63
65
  },
64
66
  onDragOver: (e) => e.preventDefault(),
65
67
  onDragLeave: () => {
66
- o.current -= 1, o.current <= 0 && (o.current = 0, d(!1));
68
+ o.current -= 1, o.current <= 0 && (o.current = 0, f(!1));
67
69
  },
68
70
  onDrop: (e) => {
69
- e.preventDefault(), o.current = 0, d(!1), n || x(e.dataTransfer.files);
71
+ e.preventDefault(), o.current = 0, f(!1), n || b(e.dataTransfer.files);
70
72
  },
71
- className: v(
72
- T({ isDragging: h, isDisabled: n }),
73
- t
73
+ className: p(
74
+ C({ hasFiles: D, isDragging: d, isDisabled: n }),
75
+ a
74
76
  ),
75
- ...y,
77
+ ...z,
76
78
  children: [
77
79
  /* @__PURE__ */ r(
78
80
  "input",
79
81
  {
80
- ref: m,
82
+ ref: x,
81
83
  hidden: !0,
82
84
  type: "file",
83
- accept: b,
85
+ accept: y,
84
86
  multiple: c,
85
87
  disabled: n,
86
88
  onChange: (e) => {
87
- x(e.currentTarget.files), e.currentTarget.value = "";
89
+ b(e.currentTarget.files), e.currentTarget.value = "";
88
90
  }
89
91
  }
90
92
  ),
91
- k ? /* @__PURE__ */ a(f, { children: [
92
- /* @__PURE__ */ r("span", { "aria-hidden": !0, className: "text-tertiary [&>svg]:size-6", children: /* @__PURE__ */ r(R, {}) }),
93
- /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: s.map((e) => /* @__PURE__ */ a("span", { className: "text-base text-foreground", children: [
94
- e.name,
95
- /* @__PURE__ */ r("span", { className: "ml-2 text-s text-tertiary tabular-nums", children: j(e.size) })
93
+ D ? /* @__PURE__ */ t(m, { children: [
94
+ /* @__PURE__ */ r("div", { className: "flex min-w-0 flex-1 flex-col gap-2.5", children: i.map((e) => /* @__PURE__ */ t("span", { className: "flex min-w-0 items-center gap-3", children: [
95
+ /* @__PURE__ */ r("span", { "aria-hidden": !0, className: N, children: /* @__PURE__ */ r(j, {}) }),
96
+ /* @__PURE__ */ t("span", { className: "flex min-w-0 flex-col", children: [
97
+ /* @__PURE__ */ r("span", { className: "truncate text-m font-medium text-foreground", children: e.name }),
98
+ /* @__PURE__ */ r("span", { className: "text-s text-tertiary tabular-nums", children: F(e.size) })
99
+ ] })
96
100
  ] }, e.name)) }),
97
- /* @__PURE__ */ a("div", { className: "mt-1 flex items-center gap-2", children: [
98
- /* @__PURE__ */ r(D, { size: "sm", variant: "secondary", onClick: (e) => {
101
+ /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-1", children: [
102
+ /* @__PURE__ */ r(v, { size: "sm", variant: "outline", onClick: (e) => {
99
103
  e.stopPropagation(), u();
100
104
  }, children: "Replace" }),
101
105
  g && /* @__PURE__ */ r(
102
- D,
106
+ v,
103
107
  {
104
108
  size: "sm",
105
109
  variant: "ghost",
106
- startContent: /* @__PURE__ */ r(B, {}),
107
110
  onClick: (e) => {
108
111
  e.stopPropagation(), g();
109
112
  },
@@ -111,24 +114,33 @@ const T = C(
111
114
  }
112
115
  )
113
116
  ] })
114
- ] }) : /* @__PURE__ */ a(f, { children: [
115
- /* @__PURE__ */ r("span", { "aria-hidden": !0, className: "text-tertiary [&>svg]:size-6", children: /* @__PURE__ */ r(w, {}) }),
116
- /* @__PURE__ */ r("span", { className: "text-base text-foreground", children: N ?? /* @__PURE__ */ a(f, { children: [
117
- "Drop ",
118
- c ? "files" : "a file",
119
- " here, or",
120
- " ",
121
- /* @__PURE__ */ r("span", { className: "underline underline-offset-4", children: "browse" })
122
- ] }) }),
123
- p && /* @__PURE__ */ r("span", { className: "text-s text-tertiary", children: p })
117
+ ] }) : /* @__PURE__ */ t(m, { children: [
118
+ /* @__PURE__ */ r(
119
+ "span",
120
+ {
121
+ "aria-hidden": !0,
122
+ className: p(N, d && "text-action-primary"),
123
+ children: /* @__PURE__ */ r(B, {})
124
+ }
125
+ ),
126
+ /* @__PURE__ */ t("span", { className: "flex flex-col items-center gap-0.5", children: [
127
+ /* @__PURE__ */ r("span", { className: "text-m font-medium text-foreground", children: w ?? /* @__PURE__ */ t(m, { children: [
128
+ "Drop ",
129
+ c ? "files" : "a file",
130
+ " here, or",
131
+ " ",
132
+ /* @__PURE__ */ r("span", { className: "text-action-primary-text", children: "browse" })
133
+ ] }) }),
134
+ h && /* @__PURE__ */ r("span", { className: "text-s text-tertiary", children: h })
135
+ ] })
124
136
  ] })
125
137
  ]
126
138
  }
127
139
  );
128
140
  }
129
141
  );
130
- $.displayName = "FileDropzone";
142
+ T.displayName = "FileDropzone";
131
143
  export {
132
- $ as FileDropzone,
133
- T as fileDropzoneVariants
144
+ T as FileDropzone,
145
+ C as fileDropzoneVariants
134
146
  };
@@ -2,20 +2,20 @@
2
2
  import { jsx as e, jsxs as b } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
4
  import { MarkerType as U, ReactFlow as Z, Background as j, BackgroundVariant as H, Panel as h, useReactFlow as K, useStore as V } from "@xyflow/react";
5
- import { BaseEdge as he, EdgeLabelRenderer as xe, Handle as Ee, MarkerType as ye, Position as De, ReactFlowProvider as ke, addEdge as _e, getBezierPath as we, getSmoothStepPath as Ie, getStraightPath as Re, useEdgesState as Se, useNodesState as Ae, useReactFlow as Ce } from "@xyflow/react";
5
+ import { BaseEdge as he, EdgeLabelRenderer as xe, Handle as Ee, MarkerType as ye, Position as De, ReactFlowProvider as ke, addEdge as _e, getBezierPath as Ie, getSmoothStepPath as we, getStraightPath as Re, useEdgesState as Se, useNodesState as Ae, useReactFlow as Ce } from "@xyflow/react";
6
6
  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 = "var(--text-xs)", I = 150, ae = 200, ne = 0.28, R = "var(--canvas-edge)";
10
+ const x = 16, Y = 1.2, $ = [x, x], ee = 1.4, I = 18, oe = 2, te = [8, 4], re = "var(--text-xs)", w = 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
  }
14
14
  const le = {
15
15
  markerEnd: {
16
16
  type: U.ArrowClosed,
17
- width: w,
18
- height: w,
17
+ width: I,
18
+ height: I,
19
19
  color: R
20
20
  },
21
21
  style: { stroke: R, strokeWidth: ee },
@@ -49,7 +49,7 @@ function S({
49
49
  h,
50
50
  {
51
51
  position: "bottom-right",
52
- className: "m-3 flex items-center gap-0.5 rounded-lg border border-border bg-elevated p-1 shadow-elevation",
52
+ className: "m-3 flex items-center gap-0.5 rounded-lg border border-border bg-elevated p-1",
53
53
  children: [
54
54
  /* @__PURE__ */ e(
55
55
  a,
@@ -58,7 +58,7 @@ function S({
58
58
  size: "icon-xs",
59
59
  variant: "ghost",
60
60
  "aria-label": "Zoom out",
61
- onClick: () => void c({ duration: v(I) }),
61
+ onClick: () => void c({ duration: v(w) }),
62
62
  children: /* @__PURE__ */ e(q, {})
63
63
  }
64
64
  ),
@@ -80,7 +80,7 @@ function S({
80
80
  size: "icon-xs",
81
81
  variant: "ghost",
82
82
  "aria-label": "Zoom in",
83
- onClick: () => void s({ duration: v(I) }),
83
+ onClick: () => void s({ duration: v(w) }),
84
84
  children: /* @__PURE__ */ e(J, {})
85
85
  }
86
86
  ),
@@ -206,8 +206,8 @@ export {
206
206
  De as Position,
207
207
  ke as ReactFlowProvider,
208
208
  _e as addEdge,
209
- we as getBezierPath,
210
- Ie as getSmoothStepPath,
209
+ Ie as getBezierPath,
210
+ we as getSmoothStepPath,
211
211
  Re as getStraightPath,
212
212
  Se as useEdgesState,
213
213
  Ae as useNodesState,
@@ -11,7 +11,7 @@ const A = H(
11
11
  [
12
12
  "pointer-events-auto relative flex w-full min-w-0 flex-col overflow-hidden",
13
13
  "max-h-[calc(100dvh-2rem)] bg-elevated text-foreground outline-none",
14
- "rounded-xl shadow-400",
14
+ "rounded-xl shadow-overlay",
15
15
  "max-sm:max-h-[calc(100dvh-1rem)] max-sm:rounded-lg"
16
16
  ],
17
17
  {
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  import * as e from "react";
3
- import { cn as r } from "../lib/cn.js";
4
- const d = e.forwardRef(
5
- ({ as: a = "main", className: o, ...l }, t) => e.createElement(a, {
6
- ref: t,
3
+ import { cn as t } from "../lib/cn.js";
4
+ const m = e.forwardRef(
5
+ ({ as: a = "main", className: o, ...l }, r) => e.createElement(a, {
6
+ ref: r,
7
7
  "data-slot": "page-body",
8
- className: r(
9
- "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-card shadow-elevation",
8
+ className: t(
9
+ "relative flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden bg-card",
10
10
  o
11
11
  ),
12
12
  ...l
13
13
  })
14
14
  );
15
- d.displayName = "PageBody";
15
+ m.displayName = "PageBody";
16
16
  export {
17
- d as PageBody
17
+ m as PageBody
18
18
  };
@@ -18,13 +18,13 @@ function E(i) {
18
18
  return e;
19
19
  }
20
20
  function W({ children: i, defaultOpen: e = !1 }) {
21
- const [c, l] = n.useState(e), d = n.useRef(null);
22
- return /* @__PURE__ */ g(P.Provider, { value: { open: c, setOpen: l, triggerRef: d }, children: i });
21
+ const [c, a] = n.useState(e), d = n.useRef(null);
22
+ return /* @__PURE__ */ g(P.Provider, { value: { open: c, setOpen: a, triggerRef: d }, children: i });
23
23
  }
24
24
  function K({ children: i }) {
25
- const { open: e, setOpen: c, triggerRef: l } = E("PopoverTrigger"), d = i;
25
+ const { open: e, setOpen: c, triggerRef: a } = E("PopoverTrigger"), d = i;
26
26
  return n.cloneElement(d, {
27
- ref: l,
27
+ ref: a,
28
28
  "aria-expanded": e,
29
29
  "aria-haspopup": !0,
30
30
  onClick: (w) => {
@@ -37,7 +37,7 @@ function N({
37
37
  className: i,
38
38
  align: e = "start",
39
39
  sideOffset: c = 8,
40
- children: l,
40
+ children: a,
41
41
  "aria-label": d = "Popover",
42
42
  ...w
43
43
  }) {
@@ -49,8 +49,8 @@ function N({
49
49
  const o = () => {
50
50
  var m;
51
51
  const t = f.getBoundingClientRect(), p = ((m = h.current) == null ? void 0 : m.offsetWidth) ?? 0;
52
- let a = t.left;
53
- e === "center" ? a = t.left + t.width / 2 - p / 2 : e === "end" && (a = t.right - p), b({ top: t.bottom + c, left: a });
52
+ let l = t.left;
53
+ e === "center" ? l = t.left + t.width / 2 - p / 2 : e === "end" && (l = t.right - p), b({ top: t.bottom + c, left: l });
54
54
  };
55
55
  return o(), window.addEventListener("resize", o), window.addEventListener("scroll", o, !0), () => {
56
56
  window.removeEventListener("resize", o), window.removeEventListener("scroll", o, !0);
@@ -60,9 +60,9 @@ function N({
60
60
  const f = (t) => {
61
61
  t.key === "Escape" && u(!1);
62
62
  }, o = (t) => {
63
- var a, m;
63
+ var l, m;
64
64
  const p = t.target;
65
- (a = h.current) != null && a.contains(p) || (m = v.current) != null && m.contains(p) || u(!1);
65
+ (l = h.current) != null && l.contains(p) || (m = v.current) != null && m.contains(p) || u(!1);
66
66
  };
67
67
  return document.addEventListener("keydown", f), document.addEventListener("pointerdown", o), () => {
68
68
  document.removeEventListener("keydown", f), document.removeEventListener("pointerdown", o);
@@ -87,13 +87,13 @@ function N({
87
87
  },
88
88
  className: z(
89
89
  "relative z-50 min-w-44 rounded-lg border border-border bg-elevated p-3",
90
- "text-xs text-foreground shadow-elevation",
90
+ "text-xs text-foreground",
91
91
  i
92
92
  ),
93
93
  ...w,
94
94
  children: [
95
95
  /* @__PURE__ */ g(j, { origin: x[e] }),
96
- l
96
+ a
97
97
  ]
98
98
  }
99
99
  ) }) }),
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  export interface ProgressCircleProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  value?: number;
4
4
  max?: number;
5
- /** Diameter in pixels. */
5
+ /** Outer width/height in pixels. */
6
6
  size?: number;
7
7
  strokeWidth?: number;
8
8
  isIndeterminate?: boolean;
@@ -1,69 +1,78 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as v } from "react/jsx-runtime";
3
- import * as x from "react";
4
- import { MotionConfig as w, motion as y } from "motion/react";
5
- import { cn as l } from "../lib/cn.js";
6
- import { springProgress as M } from "../lib/motion.js";
7
- const N = x.forwardRef(
2
+ import { jsx as i, jsxs as x } from "react/jsx-runtime";
3
+ import * as p from "react";
4
+ import { MotionConfig as L, motion as N } from "motion/react";
5
+ import { cn as u } from "../lib/cn.js";
6
+ import { springProgress as b } from "../lib/motion.js";
7
+ const M = 4, g = 96;
8
+ function w(s, e) {
9
+ const t = [];
10
+ for (let o = 0; o <= g; o++) {
11
+ const n = -Math.PI / 2 + o / g * Math.PI * 2, a = Math.cos(n), r = Math.sin(n), c = s + e * Math.sign(a) * Math.abs(a) ** (2 / M), l = s + e * Math.sign(r) * Math.abs(r) ** (2 / M);
12
+ t.push(`${c.toFixed(2)},${l.toFixed(2)}`);
13
+ }
14
+ return `M${t.join(" L")} Z`;
15
+ }
16
+ const j = p.forwardRef(
8
17
  ({
9
- className: m,
10
- value: f = 0,
11
- max: e = 100,
12
- size: r = 40,
13
- strokeWidth: i = 4,
14
- isIndeterminate: n = !1,
15
- label: d,
16
- ...p
17
- }, h) => {
18
- const c = Math.min(Math.max(f, 0), e), u = e > 0 ? c / e : 0, s = (r - i) / 2, t = 2 * Math.PI * s, g = n ? t * 0.75 : t * (1 - u), a = r / 2;
19
- return /* @__PURE__ */ o(
18
+ className: s,
19
+ value: e = 0,
20
+ max: t = 100,
21
+ size: o = 40,
22
+ strokeWidth: n = 4,
23
+ isIndeterminate: a = !1,
24
+ label: r,
25
+ ...c
26
+ }, l) => {
27
+ const h = Math.min(Math.max(e, 0), t), v = t > 0 ? h / t : 0, m = o / 2, d = (o - n) / 2, f = p.useMemo(() => w(m, d), [m, d]), P = a ? 75 : 100 - v * 100;
28
+ return /* @__PURE__ */ i(
20
29
  "div",
21
30
  {
22
- ref: h,
31
+ ref: l,
23
32
  role: "progressbar",
24
- "aria-label": d,
33
+ "aria-label": r,
25
34
  "aria-valuemin": 0,
26
- "aria-valuemax": e,
27
- "aria-valuenow": n ? void 0 : c,
28
- className: l("inline-flex", m),
29
- style: { width: r, height: r },
30
- ...p,
31
- children: /* @__PURE__ */ v(
35
+ "aria-valuemax": t,
36
+ "aria-valuenow": a ? void 0 : h,
37
+ className: u("inline-flex", s),
38
+ style: { width: o, height: o },
39
+ ...c,
40
+ children: /* @__PURE__ */ x(
32
41
  "svg",
33
42
  {
34
- width: r,
35
- height: r,
36
- viewBox: `0 0 ${r} ${r}`,
37
- className: l(
38
- "-rotate-90",
39
- n && "animate-[ads-spin_800ms_linear_infinite]"
43
+ width: o,
44
+ height: o,
45
+ viewBox: `0 0 ${o} ${o}`,
46
+ "aria-hidden": "true",
47
+ className: u(
48
+ "overflow-visible",
49
+ a && "animate-[ads-spin_800ms_linear_infinite] motion-reduce:animate-none"
40
50
  ),
41
51
  children: [
42
- /* @__PURE__ */ o(
43
- "circle",
52
+ /* @__PURE__ */ i(
53
+ "path",
44
54
  {
45
55
  className: "stroke-muted",
46
56
  fill: "none",
47
- cx: a,
48
- cy: a,
49
- r: s,
50
- strokeWidth: i
57
+ d: f,
58
+ strokeWidth: n,
59
+ strokeLinejoin: "round"
51
60
  }
52
61
  ),
53
- /* @__PURE__ */ o(w, { reducedMotion: "user", children: /* @__PURE__ */ o(
54
- y.circle,
62
+ /* @__PURE__ */ i(L, { reducedMotion: "user", children: /* @__PURE__ */ i(
63
+ N.path,
55
64
  {
56
65
  className: "stroke-brand",
57
66
  fill: "none",
58
- cx: a,
59
- cy: a,
60
- r: s,
61
- strokeWidth: i,
67
+ d: f,
68
+ pathLength: 100,
69
+ strokeWidth: n,
62
70
  strokeLinecap: "round",
63
- strokeDasharray: t,
71
+ strokeLinejoin: "round",
72
+ strokeDasharray: "100 100",
64
73
  initial: !1,
65
- animate: { strokeDashoffset: g },
66
- transition: M
74
+ animate: { strokeDashoffset: P },
75
+ transition: b
67
76
  }
68
77
  ) })
69
78
  ]
@@ -73,7 +82,7 @@ const N = x.forwardRef(
73
82
  );
74
83
  }
75
84
  );
76
- N.displayName = "ProgressCircle";
85
+ j.displayName = "ProgressCircle";
77
86
  export {
78
- N as ProgressCircle
87
+ j as ProgressCircle
79
88
  };
@@ -14,6 +14,7 @@ export interface SegmentedControlProps extends Omit<React.HTMLAttributes<HTMLDiv
14
14
  options: SegmentedOption[];
15
15
  value: string;
16
16
  onChange: (value: string) => void;
17
+ /** @deprecated No effect: the active thumb is always flat (ADS 1.0.8). */
17
18
  elevated?: boolean;
18
19
  }
19
20
  export declare const SegmentedControl: React.ForwardRefExoticComponent<SegmentedControlProps & React.RefAttributes<HTMLDivElement>>;