@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.
- package/LICENSE +21 -0
- package/bin/ads-init.mjs +314 -0
- package/components/accordion.d.ts +13 -0
- package/components/accordion.js +91 -0
- package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
- package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
- package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
- package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
- package/components/agents-ui/react-shader-toy.d.ts +87 -0
- package/components/agents-ui/react-shader-toy.js +531 -0
- package/components/ai-elements/chain-of-thought.d.ts +30 -0
- package/components/ai-elements/chain-of-thought.js +182 -0
- package/components/ai-elements/index.d.ts +11 -0
- package/components/ai-elements/inline-citation.d.ts +44 -0
- package/components/ai-elements/inline-citation.js +314 -0
- package/components/ai-elements/message.d.ts +96 -0
- package/components/ai-elements/message.js +308 -0
- package/components/ai-elements/queue.d.ts +60 -0
- package/components/ai-elements/queue.js +193 -0
- package/components/ai-elements/reasoning.d.ts +26 -0
- package/components/ai-elements/reasoning.js +131 -0
- package/components/ai-elements/shimmer.d.ts +25 -0
- package/components/ai-elements/shimmer.js +44 -0
- package/components/ai-elements/speech-input.d.ts +16 -0
- package/components/ai-elements/speech-input.js +151 -0
- package/components/ai-elements/task-progress.d.ts +41 -0
- package/components/ai-elements/task-progress.js +211 -0
- package/components/ai-elements/task.d.ts +35 -0
- package/components/ai-elements/task.js +73 -0
- package/components/ai-elements/tool.d.ts +53 -0
- package/components/ai-elements/tool.js +116 -0
- package/components/ai-elements/voice.d.ts +74 -0
- package/components/ai-elements/voice.js +875 -0
- package/components/alert.d.ts +21 -0
- package/components/alert.js +76 -0
- package/components/answer.d.ts +984 -0
- package/components/answer.js +543 -0
- package/components/assistant-ui/action-bar.d.ts +3 -0
- package/components/assistant-ui/action-bar.js +57 -0
- package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
- package/components/assistant-ui/answer-tool-ui.js +42 -0
- package/components/assistant-ui/attachment.d.ts +50 -0
- package/components/assistant-ui/attachment.js +353 -0
- package/components/assistant-ui/badge.d.ts +11 -0
- package/components/assistant-ui/badge.js +54 -0
- package/components/assistant-ui/branch-picker.d.ts +3 -0
- package/components/assistant-ui/branch-picker.js +36 -0
- package/components/assistant-ui/chain-of-thought.d.ts +46 -0
- package/components/assistant-ui/composer-add-context.d.ts +50 -0
- package/components/assistant-ui/composer-add-context.js +209 -0
- package/components/assistant-ui/composer-deep-research.d.ts +16 -0
- package/components/assistant-ui/composer-deep-research.js +38 -0
- package/components/assistant-ui/composer-harness.d.ts +18 -0
- package/components/assistant-ui/composer-harness.js +186 -0
- package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
- package/components/assistant-ui/composer-trigger-popover.js +147 -0
- package/components/assistant-ui/composer.d.ts +8 -0
- package/components/assistant-ui/composer.js +276 -0
- package/components/assistant-ui/directive-text.d.ts +16 -0
- package/components/assistant-ui/directive-text.js +40 -0
- package/components/assistant-ui/error.d.ts +6 -0
- package/components/assistant-ui/error.js +39 -0
- package/components/assistant-ui/file.d.ts +37 -0
- package/components/assistant-ui/file.js +159 -0
- package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
- package/components/assistant-ui/follow-up-suggestions.js +44 -0
- package/components/assistant-ui/image.d.ts +46 -0
- package/components/assistant-ui/image.js +351 -0
- package/components/assistant-ui/index.d.ts +28 -0
- package/components/assistant-ui/markdown-text.d.ts +1 -0
- package/components/assistant-ui/markdown-text.js +242 -0
- package/components/assistant-ui/message-timing.d.ts +25 -0
- package/components/assistant-ui/message-timing.js +56 -0
- package/components/assistant-ui/message.d.ts +4 -0
- package/components/assistant-ui/message.js +159 -0
- package/components/assistant-ui/primitives.d.ts +2 -0
- package/components/assistant-ui/quote.d.ts +37 -0
- package/components/assistant-ui/quote.js +150 -0
- package/components/assistant-ui/reasoning.d.ts +44 -0
- package/components/assistant-ui/reasoning.js +261 -0
- package/components/assistant-ui/selection-toolbar.d.ts +29 -0
- package/components/assistant-ui/selection-toolbar.js +91 -0
- package/components/assistant-ui/smart-message-text.d.ts +15 -0
- package/components/assistant-ui/smart-message-text.js +29 -0
- package/components/assistant-ui/sources.d.ts +17 -0
- package/components/assistant-ui/sources.js +121 -0
- package/components/assistant-ui/suggestions.d.ts +7 -0
- package/components/assistant-ui/suggestions.js +19 -0
- package/components/assistant-ui/thread-context.d.ts +37 -0
- package/components/assistant-ui/thread-context.js +8 -0
- package/components/assistant-ui/thread.d.ts +5 -0
- package/components/assistant-ui/thread.js +77 -0
- package/components/assistant-ui/tool-fallback.d.ts +36 -0
- package/components/assistant-ui/tool-fallback.js +428 -0
- package/components/assistant-ui/tool-group.d.ts +33 -0
- package/components/assistant-ui/tool-group.js +173 -0
- package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/components/assistant-ui/tooltip-icon-button.js +31 -0
- package/components/assistant-ui/voice.d.ts +18 -0
- package/components/autocomplete.d.ts +18 -0
- package/components/autocomplete.js +162 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.js +92 -0
- package/components/badge.d.ts +10 -0
- package/components/badge.js +83 -0
- package/components/brand-loader.d.ts +16 -0
- package/components/brand-loader.js +64 -0
- package/components/breadcrumbs.d.ts +8 -0
- package/components/breadcrumbs.js +58 -0
- package/components/button.d.ts +13 -0
- package/components/button.js +100 -0
- package/components/card.d.ts +19 -0
- package/components/card.js +82 -0
- package/components/carousel.d.ts +31 -0
- package/components/carousel.js +351 -0
- package/components/chart.d.ts +165 -0
- package/components/chart.js +841 -0
- package/components/checkbox.d.ts +13 -0
- package/components/checkbox.js +84 -0
- package/components/chip.d.ts +13 -0
- package/components/chip.js +112 -0
- package/components/collapsible.d.ts +5 -0
- package/components/collapsible.js +31 -0
- package/components/connector-card.d.ts +62 -0
- package/components/connector-card.js +154 -0
- package/components/divider.d.ts +23 -0
- package/components/divider.js +69 -0
- package/components/drawer.d.ts +45 -0
- package/components/drawer.js +234 -0
- package/components/dropdown.d.ts +33 -0
- package/components/dropdown.js +198 -0
- package/components/empty-state.d.ts +8 -0
- package/components/empty-state.js +30 -0
- package/components/field.d.ts +20 -0
- package/components/field.js +74 -0
- package/components/index.d.ts +56 -0
- package/components/index.js +444 -0
- package/components/input-field.d.ts +22 -0
- package/components/input-field.js +91 -0
- package/components/input.d.ts +8 -0
- package/components/input.js +61 -0
- package/components/kbd.d.ts +6 -0
- package/components/kbd.js +26 -0
- package/components/link.d.ts +14 -0
- package/components/link.js +72 -0
- package/components/modal.d.ts +18 -0
- package/components/modal.js +156 -0
- package/components/navbar.d.ts +15 -0
- package/components/navbar.js +68 -0
- package/components/number-field.d.ts +11 -0
- package/components/number-field.js +89 -0
- package/components/pagination.d.ts +28 -0
- package/components/pagination.js +179 -0
- package/components/panel.d.ts +14 -0
- package/components/panel.js +71 -0
- package/components/pixel-blast-svg.d.ts +22 -0
- package/components/pixel-blast-svg.js +154 -0
- package/components/popover.d.ts +20 -0
- package/components/popover.js +101 -0
- package/components/progress-circle.d.ts +11 -0
- package/components/progress-circle.js +75 -0
- package/components/progress.d.ts +22 -0
- package/components/progress.js +66 -0
- package/components/radio.d.ts +16 -0
- package/components/radio.js +101 -0
- package/components/segmented.d.ts +16 -0
- package/components/segmented.js +103 -0
- package/components/select.d.ts +28 -0
- package/components/select.js +180 -0
- package/components/selection-action-bar.d.ts +11 -0
- package/components/selection-action-bar.js +59 -0
- package/components/sidebar.d.ts +118 -0
- package/components/sidebar.js +375 -0
- package/components/skeleton.d.ts +6 -0
- package/components/skeleton.js +26 -0
- package/components/slider.d.ts +11 -0
- package/components/slider.js +62 -0
- package/components/spinner.d.ts +11 -0
- package/components/spinner.js +62 -0
- package/components/switch.d.ts +7 -0
- package/components/switch.js +61 -0
- package/components/table.d.ts +59 -0
- package/components/table.js +254 -0
- package/components/tabs.d.ts +29 -0
- package/components/tabs.js +371 -0
- package/components/textarea.d.ts +5 -0
- package/components/textarea.js +24 -0
- package/components/timeline.d.ts +7 -0
- package/components/timeline.js +47 -0
- package/components/toast.d.ts +74 -0
- package/components/toast.js +211 -0
- package/components/tooltip.d.ts +11 -0
- package/components/tooltip.js +143 -0
- package/components/tree.d.ts +42 -0
- package/components/tree.js +86 -0
- package/components/typography.d.ts +33 -0
- package/components/typography.js +65 -0
- package/components/ui/avatar.d.ts +11 -0
- package/components/ui/avatar.js +56 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +57 -0
- package/components/ui/collapsible.d.ts +5 -0
- package/components/ui/collapsible.js +35 -0
- package/components/ui/dialog.d.ts +17 -0
- package/components/ui/dialog.js +93 -0
- package/components/ui/tabs.d.ts +22 -0
- package/components/ui/tooltip.d.ts +7 -0
- package/components/ui/tooltip.js +56 -0
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
- package/fonts.css +21 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
- package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
- package/lib/cn.d.ts +3 -0
- package/lib/cn.js +9 -0
- package/lib/icons.d.ts +378 -0
- package/lib/icons.js +119 -0
- package/lib/interactive.d.ts +24 -0
- package/lib/interactive.js +36 -0
- package/lib/motion.d.ts +58 -0
- package/lib/motion.js +70 -0
- package/lib/router.d.ts +3 -0
- package/lib/utils.d.ts +6 -0
- package/llms.txt +537 -0
- package/manifest.json +5085 -0
- package/package.json +60 -0
- package/styles.css +653 -0
- package/theme.css +273 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Align = "left" | "center" | "right";
|
|
3
|
+
type Sticky = "left" | "right";
|
|
4
|
+
/** A column to sort by, plus its direction. Mirrors the React-Aria shape. */
|
|
5
|
+
export type SortDirection = "ascending" | "descending";
|
|
6
|
+
export interface SortDescriptor {
|
|
7
|
+
column: string;
|
|
8
|
+
direction: SortDirection;
|
|
9
|
+
}
|
|
10
|
+
export type SelectionMode = "none" | "single" | "multiple";
|
|
11
|
+
/** `"all"` selects every current key without enumerating them. */
|
|
12
|
+
export type Selection = Set<string> | "all";
|
|
13
|
+
export interface TableProps extends Omit<React.TableHTMLAttributes<HTMLTableElement>, "onSelect"> {
|
|
14
|
+
/** Class applied to the outer shell (the gray rounded surface). */
|
|
15
|
+
wrapperClassName?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional footer rendered inside the shell, on the gray, below the
|
|
18
|
+
* table card — the HeroUI table-footer slot. Pagination lives here.
|
|
19
|
+
*/
|
|
20
|
+
footer?: React.ReactNode;
|
|
21
|
+
selectionMode?: SelectionMode;
|
|
22
|
+
selectedKeys?: Selection;
|
|
23
|
+
onSelectionChange?: (keys: Set<string>) => void;
|
|
24
|
+
/** All row keys on the current page — powers the header "select all". */
|
|
25
|
+
rowKeys?: string[];
|
|
26
|
+
sortDescriptor?: SortDescriptor;
|
|
27
|
+
onSortChange?: (descriptor: SortDescriptor) => void;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Styled wrapper around a semantic `<table>` with horizontal overflow.
|
|
31
|
+
*
|
|
32
|
+
* Opt-in power features (all backward compatible — a plain `<Table>` is
|
|
33
|
+
* unchanged): **row selection** (`selectionMode` + `selectedKeys` /
|
|
34
|
+
* `onSelectionChange` / `rowKeys`; give each body `<TableRow>` a `rowKey`),
|
|
35
|
+
* **sorting** (`sortDescriptor` + `onSortChange`; mark columns `sortKey`),
|
|
36
|
+
* and **sticky columns** (`sticky="left" | "right"` on column/cell). Compose
|
|
37
|
+
* with `<Pagination>` below for paging.
|
|
38
|
+
*/
|
|
39
|
+
export declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
40
|
+
export declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
41
|
+
export declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
|
|
42
|
+
export interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
|
|
43
|
+
/** Stable key for selection (required on body rows to be selectable). */
|
|
44
|
+
rowKey?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
|
|
47
|
+
export interface TableColumnProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
|
|
48
|
+
align?: Align;
|
|
49
|
+
sticky?: Sticky;
|
|
50
|
+
/** Enable sorting on this column; the string is its sort key. */
|
|
51
|
+
sortKey?: string;
|
|
52
|
+
}
|
|
53
|
+
export declare const TableColumn: React.ForwardRefExoticComponent<TableColumnProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
54
|
+
export interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
|
|
55
|
+
align?: Align;
|
|
56
|
+
sticky?: Sticky;
|
|
57
|
+
}
|
|
58
|
+
export declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as y } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { cn as o } from "../lib/cn.js";
|
|
5
|
+
import { Checkbox as _ } from "./checkbox.js";
|
|
6
|
+
import { ChevronUp as F, ChevronDown as I, SortIcon as M } from "../lib/icons.js";
|
|
7
|
+
const S = (e) => e === "center" ? "text-center" : e === "right" ? "text-right" : "text-left", P = (e) => e === "left" ? "sticky left-0 z-10 shadow-[8px_0_20px_-8px_rgba(0,0,0,0.08)]" : e === "right" ? "sticky right-0 z-10 shadow-[-8px_0_20px_-8px_rgba(0,0,0,0.08)]" : void 0, q = o(
|
|
8
|
+
"bg-card align-middle transition-colors",
|
|
9
|
+
// Row separators — functional hairline, none under the last row.
|
|
10
|
+
"border-b border-border group-last/row:border-b-0",
|
|
11
|
+
// Hover/selected: translucent white over the gray shell (HeroUI's trick —
|
|
12
|
+
// the row "sinks" toward the shell instead of picking up a new tint).
|
|
13
|
+
"group-hover/row:bg-card/40",
|
|
14
|
+
"group-data-[selected]/row:bg-card/10"
|
|
15
|
+
), U = o(
|
|
16
|
+
"group-first/row:rounded-tl-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
17
|
+
"group-last/row:rounded-bl-[calc(var(--radius-2xl)-var(--spacing))]"
|
|
18
|
+
), $ = o(
|
|
19
|
+
"group-first/row:first:rounded-tl-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
20
|
+
"group-first/row:last:rounded-tr-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
21
|
+
"group-last/row:first:rounded-bl-[calc(var(--radius-2xl)-var(--spacing))]",
|
|
22
|
+
"group-last/row:last:rounded-br-[calc(var(--radius-2xl)-var(--spacing))]"
|
|
23
|
+
), A = o(
|
|
24
|
+
"after:pointer-events-none after:absolute after:right-0 after:top-1/2",
|
|
25
|
+
"after:h-4 after:w-px after:-translate-y-1/2 after:rounded-sm",
|
|
26
|
+
"after:bg-border-strong last:after:hidden"
|
|
27
|
+
), B = s.createContext(null), j = () => s.useContext(B), C = s.createContext("body"), E = s.forwardRef(
|
|
28
|
+
({
|
|
29
|
+
className: e,
|
|
30
|
+
wrapperClassName: a,
|
|
31
|
+
footer: l,
|
|
32
|
+
children: g,
|
|
33
|
+
selectionMode: p = "none",
|
|
34
|
+
selectedKeys: d,
|
|
35
|
+
onSelectionChange: i,
|
|
36
|
+
rowKeys: t,
|
|
37
|
+
sortDescriptor: n,
|
|
38
|
+
onSortChange: m,
|
|
39
|
+
...w
|
|
40
|
+
}, h) => {
|
|
41
|
+
const f = s.useMemo(() => t ?? [], [t]), b = d === "all", u = b ? null : d ?? /* @__PURE__ */ new Set(), N = s.useCallback(
|
|
42
|
+
(c) => b || !!(u != null && u.has(c)),
|
|
43
|
+
[b, u]
|
|
44
|
+
), v = f.length > 0 && (b || f.every((c) => u == null ? void 0 : u.has(c))), T = !v && (b || f.some((c) => u == null ? void 0 : u.has(c))), k = s.useCallback(
|
|
45
|
+
(c) => {
|
|
46
|
+
if (!i) return;
|
|
47
|
+
if (p === "single") {
|
|
48
|
+
i(N(c) ? /* @__PURE__ */ new Set() : /* @__PURE__ */ new Set([c]));
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
const x = new Set(b ? f : u ?? /* @__PURE__ */ new Set());
|
|
52
|
+
x.has(c) ? x.delete(c) : x.add(c), i(x);
|
|
53
|
+
},
|
|
54
|
+
[i, p, N, b, f, u]
|
|
55
|
+
), z = s.useCallback(() => {
|
|
56
|
+
i && i(v ? /* @__PURE__ */ new Set() : new Set(f));
|
|
57
|
+
}, [i, v, f]), R = s.useCallback(
|
|
58
|
+
(c) => {
|
|
59
|
+
if (!m) return;
|
|
60
|
+
const x = (n == null ? void 0 : n.column) === c && n.direction === "ascending" ? "descending" : "ascending";
|
|
61
|
+
m({ column: c, direction: x });
|
|
62
|
+
},
|
|
63
|
+
[m, n]
|
|
64
|
+
), H = s.useMemo(
|
|
65
|
+
() => ({
|
|
66
|
+
selectionMode: p,
|
|
67
|
+
isSelected: N,
|
|
68
|
+
toggleKey: k,
|
|
69
|
+
toggleAll: z,
|
|
70
|
+
allSelected: v,
|
|
71
|
+
someSelected: T,
|
|
72
|
+
sortDescriptor: n,
|
|
73
|
+
requestSort: m ? R : void 0
|
|
74
|
+
}),
|
|
75
|
+
[
|
|
76
|
+
p,
|
|
77
|
+
N,
|
|
78
|
+
k,
|
|
79
|
+
z,
|
|
80
|
+
v,
|
|
81
|
+
T,
|
|
82
|
+
n,
|
|
83
|
+
m,
|
|
84
|
+
R
|
|
85
|
+
]
|
|
86
|
+
);
|
|
87
|
+
return /* @__PURE__ */ r(B.Provider, { value: H, children: /* @__PURE__ */ y(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
className: o(
|
|
91
|
+
"overflow-clip rounded-2xl bg-muted px-1 pb-1",
|
|
92
|
+
a
|
|
93
|
+
),
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ r("div", { className: "overflow-x-auto", children: /* @__PURE__ */ r(
|
|
96
|
+
"table",
|
|
97
|
+
{
|
|
98
|
+
ref: h,
|
|
99
|
+
className: o(
|
|
100
|
+
"w-full border-separate border-spacing-0 text-xs",
|
|
101
|
+
e
|
|
102
|
+
),
|
|
103
|
+
...w,
|
|
104
|
+
children: g
|
|
105
|
+
}
|
|
106
|
+
) }),
|
|
107
|
+
l && /* @__PURE__ */ r("div", { className: "flex items-center px-4 py-2.5", children: l })
|
|
108
|
+
]
|
|
109
|
+
}
|
|
110
|
+
) });
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
E.displayName = "Table";
|
|
114
|
+
const G = s.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ r(C.Provider, { value: "header", children: /* @__PURE__ */ r(
|
|
115
|
+
"thead",
|
|
116
|
+
{
|
|
117
|
+
ref: l,
|
|
118
|
+
className: o("text-xs text-muted-foreground", e),
|
|
119
|
+
...a
|
|
120
|
+
}
|
|
121
|
+
) }));
|
|
122
|
+
G.displayName = "TableHeader";
|
|
123
|
+
const J = s.forwardRef(({ className: e, ...a }, l) => /* @__PURE__ */ r(C.Provider, { value: "body", children: /* @__PURE__ */ r("tbody", { ref: l, className: o(e), ...a }) }));
|
|
124
|
+
J.displayName = "TableBody";
|
|
125
|
+
const L = s.forwardRef(
|
|
126
|
+
({ className: e, rowKey: a, children: l, ...g }, p) => {
|
|
127
|
+
const d = j(), i = s.useContext(C), t = !!d && d.selectionMode !== "none", n = t && i === "body" && a !== void 0 ? d.isSelected(a) : !1;
|
|
128
|
+
return /* @__PURE__ */ y(
|
|
129
|
+
"tr",
|
|
130
|
+
{
|
|
131
|
+
ref: p,
|
|
132
|
+
"data-selected": n || void 0,
|
|
133
|
+
className: o("group/row", e),
|
|
134
|
+
...g,
|
|
135
|
+
children: [
|
|
136
|
+
t && (i === "header" ? /* @__PURE__ */ r(
|
|
137
|
+
"th",
|
|
138
|
+
{
|
|
139
|
+
scope: "col",
|
|
140
|
+
className: o(
|
|
141
|
+
"w-10 px-4 py-2.5",
|
|
142
|
+
A,
|
|
143
|
+
// Sticky without the baked shadow — an always-on smudge
|
|
144
|
+
// muddies the shell's corners (elevation = actionability).
|
|
145
|
+
// (sticky is positioned, so the ::after tick anchors to it —
|
|
146
|
+
// no `relative` needed, and it would conflict with sticky.)
|
|
147
|
+
"sticky left-0 z-10 bg-muted"
|
|
148
|
+
),
|
|
149
|
+
children: d.selectionMode === "multiple" && /* @__PURE__ */ r(
|
|
150
|
+
_,
|
|
151
|
+
{
|
|
152
|
+
size: "sm",
|
|
153
|
+
"aria-label": "Select all rows",
|
|
154
|
+
checked: d.allSelected,
|
|
155
|
+
indeterminate: d.someSelected,
|
|
156
|
+
onChange: d.toggleAll
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
}
|
|
160
|
+
) : /* @__PURE__ */ r(
|
|
161
|
+
"td",
|
|
162
|
+
{
|
|
163
|
+
className: o(
|
|
164
|
+
"w-10 px-4 py-3",
|
|
165
|
+
q,
|
|
166
|
+
U,
|
|
167
|
+
"sticky left-0 z-10"
|
|
168
|
+
),
|
|
169
|
+
onClick: (m) => m.stopPropagation(),
|
|
170
|
+
children: a !== void 0 && /* @__PURE__ */ r(
|
|
171
|
+
_,
|
|
172
|
+
{
|
|
173
|
+
size: "sm",
|
|
174
|
+
"aria-label": `Select ${a}`,
|
|
175
|
+
checked: n,
|
|
176
|
+
onChange: () => d.toggleKey(a)
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
)),
|
|
181
|
+
l
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
);
|
|
187
|
+
L.displayName = "TableRow";
|
|
188
|
+
const O = s.forwardRef(({ className: e, align: a, sticky: l, sortKey: g, children: p, ...d }, i) => {
|
|
189
|
+
var h, f;
|
|
190
|
+
const t = j(), n = !!g && !!(t != null && t.requestSort), m = n && ((h = t == null ? void 0 : t.sortDescriptor) == null ? void 0 : h.column) === g, w = (f = t == null ? void 0 : t.sortDescriptor) == null ? void 0 : f.direction;
|
|
191
|
+
return /* @__PURE__ */ r(
|
|
192
|
+
"th",
|
|
193
|
+
{
|
|
194
|
+
ref: i,
|
|
195
|
+
scope: "col",
|
|
196
|
+
"aria-sort": m ? w === "ascending" ? "ascending" : "descending" : n ? "none" : void 0,
|
|
197
|
+
className: o(
|
|
198
|
+
// whitespace-nowrap: header labels hug their content — the table
|
|
199
|
+
// scrolls horizontally, so wrapping "Null %" to two lines only
|
|
200
|
+
// wastes header height without saving any width.
|
|
201
|
+
"relative whitespace-nowrap px-4 py-2.5 font-medium",
|
|
202
|
+
A,
|
|
203
|
+
S(a),
|
|
204
|
+
l && o(P(l), "bg-muted"),
|
|
205
|
+
e
|
|
206
|
+
),
|
|
207
|
+
...d,
|
|
208
|
+
children: n ? /* @__PURE__ */ y(
|
|
209
|
+
"button",
|
|
210
|
+
{
|
|
211
|
+
type: "button",
|
|
212
|
+
onClick: () => t.requestSort(g),
|
|
213
|
+
className: o(
|
|
214
|
+
"group/sort -mx-1 inline-flex items-center gap-1 rounded px-1 outline-none transition-colors",
|
|
215
|
+
"hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
216
|
+
a === "right" && "flex-row-reverse",
|
|
217
|
+
m && "text-foreground"
|
|
218
|
+
),
|
|
219
|
+
children: [
|
|
220
|
+
p,
|
|
221
|
+
m ? w === "ascending" ? /* @__PURE__ */ r(F, { className: "size-3.5" }) : /* @__PURE__ */ r(I, { className: "size-3.5" }) : /* @__PURE__ */ r(M, { className: "size-3.5 opacity-0 transition-opacity group-hover/sort:opacity-60" })
|
|
222
|
+
]
|
|
223
|
+
}
|
|
224
|
+
) : p
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
});
|
|
228
|
+
O.displayName = "TableColumn";
|
|
229
|
+
const Q = s.forwardRef(
|
|
230
|
+
({ className: e, align: a, sticky: l, ...g }, p) => /* @__PURE__ */ r(
|
|
231
|
+
"td",
|
|
232
|
+
{
|
|
233
|
+
ref: p,
|
|
234
|
+
className: o(
|
|
235
|
+
"px-4 py-3",
|
|
236
|
+
q,
|
|
237
|
+
$,
|
|
238
|
+
S(a),
|
|
239
|
+
l && P(l),
|
|
240
|
+
e
|
|
241
|
+
),
|
|
242
|
+
...g
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
);
|
|
246
|
+
Q.displayName = "TableCell";
|
|
247
|
+
export {
|
|
248
|
+
E as Table,
|
|
249
|
+
J as TableBody,
|
|
250
|
+
Q as TableCell,
|
|
251
|
+
O as TableColumn,
|
|
252
|
+
G as TableHeader,
|
|
253
|
+
L as TableRow
|
|
254
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Variant = "primary" | "secondary";
|
|
3
|
+
type Orientation = "horizontal" | "vertical";
|
|
4
|
+
type Size = "sm" | "md" | "lg";
|
|
5
|
+
export interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
value?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
onValueChange?: (value: string) => void;
|
|
9
|
+
variant?: Variant;
|
|
10
|
+
orientation?: Orientation;
|
|
11
|
+
size?: Size;
|
|
12
|
+
}
|
|
13
|
+
export declare const Tabs: React.ForwardRefExoticComponent<TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export interface TabListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
}
|
|
16
|
+
export declare const TabList: React.ForwardRefExoticComponent<TabListProps & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export interface TabProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
18
|
+
value: string;
|
|
19
|
+
isDisabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const Tab: React.ForwardRefExoticComponent<TabProps & React.RefAttributes<HTMLButtonElement>>;
|
|
22
|
+
export interface TabSeparatorProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
23
|
+
}
|
|
24
|
+
export declare const TabSeparator: React.ForwardRefExoticComponent<TabSeparatorProps & React.RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
export interface TabPanelProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
26
|
+
value: string;
|
|
27
|
+
}
|
|
28
|
+
export declare const TabPanel: React.ForwardRefExoticComponent<TabPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
export {};
|