@actioneer/ads 0.5.7 → 0.5.9
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.
- package/bin/ads-init.mjs +6 -0
- package/components/accordion.js +50 -48
- package/components/agent-icon.d.ts +12 -0
- package/components/agent-icon.js +133 -120
- package/components/ai-elements/chain-of-thought.d.ts +1 -1
- package/components/ai-elements/chain-of-thought.js +108 -108
- package/components/ai-elements/chart.js +16 -14
- package/components/ai-elements/inline-citation.js +41 -41
- package/components/ai-elements/message.js +4 -4
- package/components/ai-elements/queue.js +7 -7
- package/components/ai-elements/research-activity.js +114 -114
- package/components/ai-elements/shimmer.d.ts +2 -2
- package/components/ai-elements/speech-input.js +28 -28
- package/components/ai-elements/task-progress.js +26 -16
- package/components/ai-elements/task.js +17 -17
- package/components/ai-elements/tool.js +6 -6
- package/components/ai-elements/transcript.js +6 -5
- package/components/ai-elements/voice.js +1 -1
- package/components/alert.js +10 -10
- package/components/answer-sources.js +1 -1
- package/components/answer.js +115 -114
- package/components/assistant-ui/action-bar.js +94 -48
- package/components/assistant-ui/attachment.js +103 -75
- package/components/assistant-ui/badge.d.ts +1 -1
- package/components/assistant-ui/badge.js +17 -17
- package/components/assistant-ui/chain-of-thought.d.ts +1 -1
- package/components/assistant-ui/composer-add-context.js +9 -9
- package/components/assistant-ui/composer-deep-research.js +5 -5
- package/components/assistant-ui/composer-harness.js +11 -9
- package/components/assistant-ui/composer-trigger-popover.js +45 -34
- package/components/assistant-ui/composer.js +59 -59
- package/components/assistant-ui/error.js +14 -14
- package/components/assistant-ui/file.d.ts +1 -1
- package/components/assistant-ui/image.d.ts +1 -1
- package/components/assistant-ui/image.js +113 -103
- package/components/assistant-ui/markdown-text.js +18 -18
- package/components/assistant-ui/message.js +46 -45
- package/components/assistant-ui/quote.js +1 -1
- package/components/assistant-ui/reasoning.d.ts +1 -1
- package/components/assistant-ui/reasoning.js +66 -77
- package/components/assistant-ui/suggestions.js +4 -4
- package/components/assistant-ui/thread.js +22 -22
- package/components/assistant-ui/tool-fallback.js +60 -63
- package/components/assistant-ui/tool-group.d.ts +1 -1
- package/components/assistant-ui/tool-group.js +36 -42
- package/components/audio-waveform.js +25 -24
- package/components/autocomplete.d.ts +1 -0
- package/components/autocomplete.js +45 -43
- package/components/avatar.d.ts +1 -0
- package/components/avatar.js +27 -26
- package/components/badge.d.ts +1 -1
- package/components/breadcrumbs.d.ts +2 -0
- package/components/breadcrumbs.js +52 -50
- package/components/button.d.ts +2 -2
- package/components/button.js +22 -20
- package/components/card.js +8 -8
- package/components/carousel.js +105 -104
- package/components/chart.d.ts +6 -0
- package/components/chart.js +743 -672
- package/components/checkbox.js +74 -38
- package/components/chip.d.ts +1 -1
- package/components/code-block.js +3 -3
- package/components/collapsible.js +67 -23
- package/components/connector-card.js +6 -6
- package/components/drawer.d.ts +18 -11
- package/components/drawer.js +81 -78
- package/components/dropdown.d.ts +2 -0
- package/components/dropdown.js +88 -79
- package/components/empty-state.d.ts +1 -1
- package/components/empty-state.js +7 -7
- package/components/field.d.ts +4 -0
- package/components/field.js +45 -34
- package/components/file-dropzone.js +12 -12
- package/components/index.d.ts +3 -0
- package/components/index.js +584 -558
- package/components/input-field.js +51 -46
- package/components/input.js +20 -20
- package/components/link.js +9 -9
- package/components/modal.d.ts +5 -1
- package/components/modal.js +121 -76
- package/components/navbar.d.ts +1 -1
- package/components/navbar.js +1 -1
- package/components/number-field.js +38 -29
- package/components/page-header.js +12 -12
- package/components/pagination.js +19 -19
- package/components/panel.js +2 -2
- package/components/pixel-blast-svg.js +3 -3
- package/components/pixel-icon.d.ts +4 -0
- package/components/pixel-icon.js +210 -164
- package/components/popover.d.ts +1 -1
- package/components/popover.js +66 -64
- package/components/progress-circle.js +36 -32
- package/components/progress.js +28 -24
- package/components/radio.js +59 -49
- package/components/resizable-panel.js +1 -1
- package/components/reveal.d.ts +2 -2
- package/components/ripple.d.ts +3 -3
- package/components/scroll-area.js +17 -16
- package/components/segmented.d.ts +1 -0
- package/components/segmented.js +39 -36
- package/components/select.d.ts +7 -0
- package/components/select.js +186 -137
- package/components/setting-row.js +45 -42
- package/components/sidebar.js +131 -127
- package/components/skeleton.js +5 -5
- package/components/spinner.d.ts +13 -4
- package/components/spinner.js +42 -42
- package/components/stepper.js +21 -21
- package/components/switch.js +41 -39
- package/components/table.d.ts +16 -0
- package/components/table.js +393 -260
- package/components/tabs.js +149 -137
- package/components/toast.js +66 -66
- package/components/tooltip.js +2 -2
- package/components/tree.js +62 -51
- package/components/typography.d.ts +2 -1
- package/components/typography.js +33 -32
- package/components/ui/button.d.ts +2 -2
- package/components/ui/button.js +19 -19
- package/components/ui/collapsible.d.ts +1 -5
- package/components/ui/dialog.d.ts +3 -3
- package/components/ui/dialog.js +95 -58
- package/components/ui/tooltip.d.ts +2 -2
- package/components/ui/tooltip.js +67 -33
- package/components/viz-charts.js +95 -95
- package/demo/components/add-to-artifact.js +363 -0
- package/demo/lib/artifact-library.js +142 -0
- package/demo/lib/artifact-pin-guard.js +12 -0
- package/fonts/aribau-grotesk-medium.woff2 +0 -0
- package/fonts/aribau-grotesk-regular.woff2 +0 -0
- package/fonts.css +11 -11
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +17 -16
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +21 -20
- package/lib/icons.d.ts +24 -0
- package/lib/icons.js +114 -108
- package/lib/motion.d.ts +42 -39
- package/lib/motion.js +112 -52
- package/lib/spinner-mark.d.ts +9 -0
- package/lib/spinner-mark.js +98 -0
- package/llms.txt +53 -19
- package/manifest.json +258 -36
- package/package.json +1 -1
- package/styles.css +143 -124
- package/theme.css +90 -93
- package/components/ui/collapsible.js +0 -35
- package/fonts/aribau-grotesk-500.otf +0 -0
- package/fonts/aribau-grotesk-600.woff2 +0 -0
package/components/skeleton.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { cn as
|
|
5
|
-
const i =
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { cn as n } from "../lib/cn.js";
|
|
5
|
+
const i = f.forwardRef(
|
|
6
6
|
({ className: e, circle: r = !1, ...t }, a) => /* @__PURE__ */ o(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
9
|
ref: a,
|
|
10
10
|
"aria-hidden": !0,
|
|
11
|
-
className:
|
|
11
|
+
className: n(
|
|
12
12
|
"relative overflow-hidden bg-muted",
|
|
13
13
|
r ? "rounded-full" : "rounded-md",
|
|
14
14
|
"after:absolute after:inset-0 after:-translate-x-full",
|
|
15
15
|
"after:bg-gradient-to-r after:from-transparent after:via-foreground/10 after:to-transparent",
|
|
16
|
-
"after:animate-[ads-
|
|
16
|
+
"after:animate-[ads-shimmer_1.5s_infinite]",
|
|
17
17
|
e
|
|
18
18
|
),
|
|
19
19
|
...t
|
package/components/spinner.d.ts
CHANGED
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { SPINNER_VARIANTS, SpinnerVariant } from '../lib/spinner-mark';
|
|
2
3
|
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
|
|
4
|
+
export { SPINNER_VARIANTS, type SpinnerVariant };
|
|
5
|
+
declare const spinnerStyles: (props?: ({
|
|
6
|
+
size?: "xs" | "sm" | "md" | "lg" | null | undefined;
|
|
5
7
|
color?: "current" | "primary" | "muted" | null | undefined;
|
|
6
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof
|
|
9
|
+
export interface SpinnerProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "color">, VariantProps<typeof spinnerStyles> {
|
|
10
|
+
/** The work scope determines the grid choreography. Defaults to action. */
|
|
11
|
+
variant?: SpinnerVariant;
|
|
12
|
+
/** Accessible status text. Defaults to “Loading”. */
|
|
8
13
|
label?: string;
|
|
9
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* A bold 3×3 loading indicator that stays legible in a native 16 px slot.
|
|
17
|
+
* Every variant uses exactly nine squircles and inherits currentColor. Under
|
|
18
|
+
* reduced motion, the grid holds a representative frame instead of moving.
|
|
19
|
+
*/
|
|
10
20
|
export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
export {};
|
package/components/spinner.js
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import * as u from "react";
|
|
4
|
+
import { cva as p } from "class-variance-authority";
|
|
5
|
+
import { cn as f } from "../lib/cn.js";
|
|
6
|
+
import { SpinnerMark as x } from "../lib/spinner-mark.js";
|
|
7
|
+
import { SPINNER_VARIANTS as k } from "../lib/spinner-mark.js";
|
|
8
|
+
const z = p("inline-block shrink-0", {
|
|
7
9
|
variants: {
|
|
8
10
|
size: {
|
|
11
|
+
xs: "size-3.5",
|
|
9
12
|
sm: "size-4",
|
|
10
13
|
md: "size-6",
|
|
11
14
|
lg: "size-8"
|
|
@@ -17,46 +20,43 @@ const r = "M12 2.5 C5 2.5 2.5 5 2.5 12 C2.5 19 5 21.5 12 21.5 C19 21.5 21.5 19 2
|
|
|
17
20
|
}
|
|
18
21
|
},
|
|
19
22
|
defaultVariants: { size: "md", color: "current" }
|
|
20
|
-
}),
|
|
21
|
-
({
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
}), N = u.forwardRef(
|
|
24
|
+
({
|
|
25
|
+
className: a,
|
|
26
|
+
size: n,
|
|
27
|
+
color: o,
|
|
28
|
+
variant: e = "action",
|
|
29
|
+
label: s,
|
|
30
|
+
role: m,
|
|
31
|
+
"aria-label": d,
|
|
32
|
+
"aria-hidden": r,
|
|
33
|
+
...l
|
|
34
|
+
}, c) => {
|
|
35
|
+
const i = r === !0 || r === "true";
|
|
36
|
+
return /* @__PURE__ */ t(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
ref: c,
|
|
40
|
+
role: i ? void 0 : m ?? "status",
|
|
41
|
+
"aria-label": i ? void 0 : d ?? s ?? "Loading",
|
|
42
|
+
"aria-hidden": r,
|
|
43
|
+
"data-variant": e,
|
|
44
|
+
className: f(z({ size: n, color: o }), a),
|
|
45
|
+
...l,
|
|
46
|
+
children: /* @__PURE__ */ t(
|
|
47
|
+
x,
|
|
32
48
|
{
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
className: "opacity-15"
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ e(
|
|
40
|
-
"g",
|
|
41
|
-
{
|
|
42
|
-
className: "origin-center animate-[ads-spin_var(--duration-spin)_linear_infinite] motion-reduce:animate-none",
|
|
43
|
-
children: /* @__PURE__ */ e(
|
|
44
|
-
"path",
|
|
45
|
-
{
|
|
46
|
-
d: r,
|
|
47
|
-
stroke: "currentColor",
|
|
48
|
-
strokeWidth: "2.5",
|
|
49
|
-
strokeLinecap: "round",
|
|
50
|
-
className: "animate-[ads-spin-head_var(--duration-spin)_var(--ease-in-out)_infinite] motion-reduce:animate-none"
|
|
51
|
-
}
|
|
52
|
-
)
|
|
49
|
+
variant: e,
|
|
50
|
+
"aria-hidden": !0,
|
|
51
|
+
className: "size-full"
|
|
53
52
|
}
|
|
54
53
|
)
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
}
|
|
58
57
|
);
|
|
59
|
-
|
|
58
|
+
N.displayName = "Spinner";
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
k as SPINNER_VARIANTS,
|
|
61
|
+
N as Spinner
|
|
62
62
|
};
|
package/components/stepper.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import * as v from "react";
|
|
4
4
|
import { cva as y } from "class-variance-authority";
|
|
5
|
-
import { cn as
|
|
5
|
+
import { cn as a } from "../lib/cn.js";
|
|
6
6
|
import { Check as p, Close as g } from "../lib/icons.js";
|
|
7
7
|
const b = y(
|
|
8
|
-
|
|
8
|
+
a(
|
|
9
9
|
"flex shrink-0 items-center justify-center rounded-full font-normal tabular-nums",
|
|
10
|
-
"transition-colors duration-
|
|
10
|
+
"transition-colors duration-150 ease-out motion-reduce:transition-none"
|
|
11
11
|
),
|
|
12
12
|
{
|
|
13
13
|
variants: {
|
|
@@ -27,31 +27,31 @@ const b = y(
|
|
|
27
27
|
), j = v.forwardRef(
|
|
28
28
|
({
|
|
29
29
|
className: x,
|
|
30
|
-
steps:
|
|
30
|
+
steps: m,
|
|
31
31
|
activeIndex: n,
|
|
32
32
|
size: i = "md",
|
|
33
33
|
onSelect: o,
|
|
34
34
|
labelPosition: h = "below",
|
|
35
|
-
...
|
|
35
|
+
...u
|
|
36
36
|
}, N) => /* @__PURE__ */ e(
|
|
37
37
|
"ol",
|
|
38
38
|
{
|
|
39
39
|
ref: N,
|
|
40
40
|
"data-slot": "stepper",
|
|
41
|
-
"aria-label":
|
|
42
|
-
className:
|
|
43
|
-
...
|
|
44
|
-
children:
|
|
45
|
-
const r =
|
|
41
|
+
"aria-label": u["aria-label"] ?? "Progress",
|
|
42
|
+
className: a("flex w-full flex-row items-start", x),
|
|
43
|
+
...u,
|
|
44
|
+
children: m.map((s, t) => {
|
|
45
|
+
const r = s.isError ? "error" : t < n ? "complete" : t === n ? "current" : "upcoming", l = t === m.length - 1, w = !!o && t < n, d = t < n && !s.isError, k = /* @__PURE__ */ e("span", { "aria-hidden": !0, className: b({ status: r, size: i }), children: r === "complete" ? /* @__PURE__ */ e(p, {}) : r === "error" ? /* @__PURE__ */ e(g, {}) : t + 1 }), f = w ? /* @__PURE__ */ e(
|
|
46
46
|
"button",
|
|
47
47
|
{
|
|
48
48
|
type: "button",
|
|
49
49
|
onClick: () => o == null ? void 0 : o(t),
|
|
50
50
|
"aria-label": `Go to step ${t + 1}`,
|
|
51
|
-
className:
|
|
51
|
+
className: a(
|
|
52
52
|
b({ status: r, size: i }),
|
|
53
53
|
"cursor-pointer outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
54
|
-
"active:scale-
|
|
54
|
+
"active:scale-[0.97]"
|
|
55
55
|
),
|
|
56
56
|
children: r === "complete" ? /* @__PURE__ */ e(p, {}) : r === "error" ? /* @__PURE__ */ e(g, {}) : t + 1
|
|
57
57
|
}
|
|
@@ -61,7 +61,7 @@ const b = y(
|
|
|
61
61
|
{
|
|
62
62
|
"data-status": r,
|
|
63
63
|
"aria-current": r === "current" ? "step" : void 0,
|
|
64
|
-
className:
|
|
64
|
+
className: a(
|
|
65
65
|
"flex min-w-0 items-center gap-2",
|
|
66
66
|
l ? "shrink-0" : "flex-1"
|
|
67
67
|
),
|
|
@@ -70,20 +70,20 @@ const b = y(
|
|
|
70
70
|
/* @__PURE__ */ e(
|
|
71
71
|
"span",
|
|
72
72
|
{
|
|
73
|
-
className:
|
|
73
|
+
className: a(
|
|
74
74
|
"truncate whitespace-nowrap",
|
|
75
75
|
i === "sm" ? "text-xs" : "text-base",
|
|
76
76
|
r === "upcoming" ? "text-tertiary" : "text-foreground",
|
|
77
77
|
r === "error" && "text-danger"
|
|
78
78
|
),
|
|
79
|
-
children:
|
|
79
|
+
children: s.label
|
|
80
80
|
}
|
|
81
81
|
),
|
|
82
82
|
!l && /* @__PURE__ */ e(
|
|
83
83
|
"span",
|
|
84
84
|
{
|
|
85
85
|
"aria-hidden": !0,
|
|
86
|
-
className:
|
|
86
|
+
className: a(
|
|
87
87
|
"h-px min-w-4 flex-1 shrink-0 bg-border",
|
|
88
88
|
d && "bg-success"
|
|
89
89
|
)
|
|
@@ -91,7 +91,7 @@ const b = y(
|
|
|
91
91
|
)
|
|
92
92
|
]
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
s.id
|
|
95
95
|
) : /* @__PURE__ */ c(
|
|
96
96
|
"li",
|
|
97
97
|
{
|
|
@@ -105,7 +105,7 @@ const b = y(
|
|
|
105
105
|
"span",
|
|
106
106
|
{
|
|
107
107
|
"aria-hidden": !0,
|
|
108
|
-
className:
|
|
108
|
+
className: a(
|
|
109
109
|
"h-px flex-1 shrink-0 bg-border",
|
|
110
110
|
d && "bg-success"
|
|
111
111
|
)
|
|
@@ -115,18 +115,18 @@ const b = y(
|
|
|
115
115
|
/* @__PURE__ */ e("div", { className: "min-w-0 pr-4", children: /* @__PURE__ */ e(
|
|
116
116
|
"div",
|
|
117
117
|
{
|
|
118
|
-
className:
|
|
118
|
+
className: a(
|
|
119
119
|
"truncate",
|
|
120
120
|
i === "sm" ? "text-xs" : "text-base",
|
|
121
121
|
r === "upcoming" ? "text-tertiary" : "text-foreground",
|
|
122
122
|
r === "error" && "text-danger"
|
|
123
123
|
),
|
|
124
|
-
children:
|
|
124
|
+
children: s.label
|
|
125
125
|
}
|
|
126
126
|
) })
|
|
127
127
|
]
|
|
128
128
|
},
|
|
129
|
-
|
|
129
|
+
s.id
|
|
130
130
|
);
|
|
131
131
|
})
|
|
132
132
|
}
|
package/components/switch.js
CHANGED
|
@@ -1,79 +1,81 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
|
|
2
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { MotionConfig as w, motion as x } from "motion/react";
|
|
5
|
+
import { cn as n } from "../lib/cn.js";
|
|
6
|
+
import { springSwitch as g } from "../lib/motion.js";
|
|
7
|
+
const v = {
|
|
6
8
|
sm: {
|
|
7
9
|
track: "h-5 w-9",
|
|
8
10
|
knob: "size-4",
|
|
9
|
-
|
|
10
|
-
off: "translate-x-0"
|
|
11
|
+
offset: 16
|
|
11
12
|
},
|
|
12
13
|
md: {
|
|
13
14
|
track: "h-6 w-11",
|
|
14
15
|
knob: "size-5",
|
|
15
|
-
|
|
16
|
-
off: "translate-x-0"
|
|
16
|
+
offset: 20
|
|
17
17
|
}
|
|
18
|
-
},
|
|
18
|
+
}, y = c.forwardRef(
|
|
19
19
|
({
|
|
20
|
-
className:
|
|
20
|
+
className: d,
|
|
21
21
|
checked: t = !1,
|
|
22
|
-
onCheckedChange:
|
|
23
|
-
size:
|
|
24
|
-
disabled:
|
|
25
|
-
children:
|
|
26
|
-
...
|
|
27
|
-
},
|
|
28
|
-
const
|
|
29
|
-
return /* @__PURE__ */
|
|
22
|
+
onCheckedChange: e,
|
|
23
|
+
size: f = "md",
|
|
24
|
+
disabled: s,
|
|
25
|
+
children: o,
|
|
26
|
+
...r
|
|
27
|
+
}, m) => {
|
|
28
|
+
const l = v[f], a = c.useId(), u = r["aria-label"] != null || r["aria-labelledby"] != null, b = o && !u ? a : void 0;
|
|
29
|
+
return /* @__PURE__ */ p(
|
|
30
30
|
"label",
|
|
31
31
|
{
|
|
32
|
-
className:
|
|
32
|
+
className: n(
|
|
33
33
|
"inline-flex items-center gap-2 text-xs text-foreground select-none",
|
|
34
|
-
|
|
34
|
+
s ? "cursor-not-allowed opacity-50" : "cursor-pointer"
|
|
35
35
|
),
|
|
36
36
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ i(
|
|
38
38
|
"button",
|
|
39
39
|
{
|
|
40
|
-
ref:
|
|
40
|
+
ref: m,
|
|
41
41
|
type: "button",
|
|
42
42
|
role: "switch",
|
|
43
43
|
"aria-checked": t,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
"aria-labelledby": b,
|
|
45
|
+
disabled: s,
|
|
46
|
+
onClick: () => e == null ? void 0 : e(!t),
|
|
47
|
+
className: n(
|
|
47
48
|
"relative inline-flex shrink-0 items-center rounded-full border border-transparent",
|
|
48
|
-
"transition-colors duration-
|
|
49
|
+
"transition-colors duration-150",
|
|
49
50
|
"outline-none focus-visible:ring-3 focus-visible:ring-ring",
|
|
50
51
|
"disabled:cursor-not-allowed",
|
|
51
52
|
t ? "bg-brand" : "bg-input",
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
l.track,
|
|
54
|
+
d
|
|
54
55
|
),
|
|
55
|
-
...
|
|
56
|
-
children: /* @__PURE__ */
|
|
57
|
-
|
|
56
|
+
...r,
|
|
57
|
+
children: /* @__PURE__ */ i(w, { reducedMotion: "user", children: /* @__PURE__ */ i(
|
|
58
|
+
x.span,
|
|
58
59
|
{
|
|
59
60
|
"aria-hidden": !0,
|
|
60
|
-
|
|
61
|
+
initial: !1,
|
|
62
|
+
animate: { x: t ? l.offset : 0 },
|
|
63
|
+
transition: g,
|
|
64
|
+
className: n(
|
|
61
65
|
"ml-0.5 inline-block rounded-full bg-elevated shadow-elevation",
|
|
62
|
-
|
|
63
|
-
r.knob,
|
|
64
|
-
t ? r.on : r.off
|
|
66
|
+
l.knob
|
|
65
67
|
)
|
|
66
68
|
}
|
|
67
|
-
)
|
|
69
|
+
) })
|
|
68
70
|
}
|
|
69
71
|
),
|
|
70
|
-
|
|
72
|
+
o && /* @__PURE__ */ i("span", { id: a, children: o })
|
|
71
73
|
]
|
|
72
74
|
}
|
|
73
75
|
);
|
|
74
76
|
}
|
|
75
77
|
);
|
|
76
|
-
|
|
78
|
+
y.displayName = "Switch";
|
|
77
79
|
export {
|
|
78
|
-
|
|
80
|
+
y as Switch
|
|
79
81
|
};
|
package/components/table.d.ts
CHANGED
|
@@ -45,6 +45,22 @@ export interface TableProps extends Omit<React.TableHTMLAttributes<HTMLTableElem
|
|
|
45
45
|
* table with row selection, sorting, or a click-through action.
|
|
46
46
|
*/
|
|
47
47
|
isStatic?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Draggable column-width handles on the header ticks (defaults to true).
|
|
50
|
+
* Dragging the tick between two headers resizes the column to its left;
|
|
51
|
+
* the handle is keyboard-operable (arrows, Shift for coarse steps) and
|
|
52
|
+
* double-click restores the automatic layout. The last column has no
|
|
53
|
+
* handle — it absorbs the remaining width. Set false for tables whose
|
|
54
|
+
* layout must stay fixed (e.g. a compact summary card).
|
|
55
|
+
*/
|
|
56
|
+
resizableColumns?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Caps the table's height: the viewport scrolls vertically inside the
|
|
59
|
+
* shell and the header row pins to its top (painted on the shell gray so
|
|
60
|
+
* body rows pass underneath). For long results read in place — an
|
|
61
|
+
* expanded board table, a log — instead of pagination.
|
|
62
|
+
*/
|
|
63
|
+
maxBodyHeight?: React.CSSProperties["maxHeight"];
|
|
48
64
|
}
|
|
49
65
|
/**
|
|
50
66
|
* Styled wrapper around a semantic `<table>` with horizontal overflow.
|