@estiva-app/ui 0.39.0 → 0.41.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/dist/Chip.d.ts +10 -2
- package/dist/Chip.d.ts.map +1 -1
- package/dist/Link.d.ts +15 -1
- package/dist/Link.d.ts.map +1 -1
- package/dist/RichText.d.ts +78 -0
- package/dist/RichText.d.ts.map +1 -0
- package/dist/eslint/index.js +2 -1
- package/dist/eslint/index.js.map +2 -2
- package/dist/eslint/no-restyled-part.d.ts.map +1 -1
- package/dist/gates/app-checks.d.ts.map +1 -1
- package/dist/gates/index.js +25 -1
- package/dist/gates/index.js.map +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +365 -220
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
- package/registry.json +117 -7
- package/src/Chip.mdx +13 -2
- package/src/Chip.stories.tsx +2 -0
- package/src/Chip.test.tsx +36 -0
- package/src/Chip.tsx +17 -5
- package/src/Link.mdx +32 -0
- package/src/Link.stories.tsx +49 -0
- package/src/Link.test.tsx +15 -0
- package/src/Link.tsx +23 -2
- package/src/RichText.mdx +79 -0
- package/src/RichText.stories.tsx +91 -0
- package/src/RichText.test.tsx +149 -0
- package/src/RichText.tsx +294 -0
- package/src/eslint/index.test.ts +1 -1
- package/src/eslint/no-restyled-part.test.ts +5 -5
- package/src/eslint/no-restyled-part.ts +2 -1
- package/src/gates/app-checks.ts +21 -0
- package/src/gates/create-app.test.ts +7 -2
- package/src/index.ts +1 -0
- package/src/registry/registry.test.ts +5 -5
- package/stories/Choosing.mdx +1 -0
- package/tailwind-preset.js +1 -0
- package/tokens.css +15 -0
package/dist/index.js
CHANGED
|
@@ -37,19 +37,20 @@ function cn(...inputs) {
|
|
|
37
37
|
|
|
38
38
|
// src/Link.tsx
|
|
39
39
|
import { jsx } from "react/jsx-runtime";
|
|
40
|
+
var COVER_CLASSES = "after:absolute after:inset-0 after:rounded-md focus-visible:outline-none focus-visible:after:[outline-style:auto]";
|
|
40
41
|
var VARIANT_CLASSES = {
|
|
41
42
|
text: "text-info-default underline underline-offset-2 hover:opacity-80",
|
|
42
43
|
quiet: "hover:underline",
|
|
43
44
|
underlined: "underline underline-offset-2 hover:text-text-primary",
|
|
44
45
|
plain: ""
|
|
45
46
|
};
|
|
46
|
-
function Link({ href, variant = "text", external = false, truncate = false, className, children, ...props }) {
|
|
47
|
+
function Link({ href, variant = "text", external = false, truncate = false, cover = false, className, children, ...props }) {
|
|
47
48
|
return /* @__PURE__ */ jsx(
|
|
48
49
|
"a",
|
|
49
50
|
{
|
|
50
51
|
href,
|
|
51
52
|
...external ? { target: "_blank", rel: "noopener noreferrer" } : {},
|
|
52
|
-
className: cn(VARIANT_CLASSES[variant], truncate && "truncate", className),
|
|
53
|
+
className: cn(VARIANT_CLASSES[variant], truncate && "truncate", cover && COVER_CLASSES, className),
|
|
53
54
|
...props,
|
|
54
55
|
children
|
|
55
56
|
}
|
|
@@ -1000,7 +1001,7 @@ function Checkbox({ checked, onChange, disabled: ownDisabled = false, label, row
|
|
|
1000
1001
|
}
|
|
1001
1002
|
|
|
1002
1003
|
// src/Chip.tsx
|
|
1003
|
-
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1004
|
+
import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1004
1005
|
var typeStyles = {
|
|
1005
1006
|
neutral: "bg-bg-inset text-text-primary",
|
|
1006
1007
|
brand: "bg-accent-muted text-accent-primary signal:border signal:border-accent-outline",
|
|
@@ -1009,8 +1010,9 @@ var typeStyles = {
|
|
|
1009
1010
|
success: "bg-success-muted text-success-default signal:border signal:border-success-outline",
|
|
1010
1011
|
error: "bg-error-muted text-error-default signal:border signal:border-error-outline"
|
|
1011
1012
|
};
|
|
1012
|
-
function Chip({ type = "neutral", label, leadingIcon, trailingIcon, className }) {
|
|
1013
|
-
|
|
1013
|
+
function Chip({ type = "neutral", label, leadingIcon, trailingIcon, href, onClick, className }) {
|
|
1014
|
+
const classes = cn("inline-flex min-w-0 items-center justify-center gap-1.5 rounded-full max-h-[20px] px-2 py-1", typeStyles[type], className);
|
|
1015
|
+
const inside = /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1014
1016
|
leadingIcon && /* @__PURE__ */ jsx17("span", { className: "flex size-3 shrink-0 items-center justify-center", children: leadingIcon }),
|
|
1015
1017
|
label && // A chip given a `max-w-*` cuts a long label with an ellipsis instead
|
|
1016
1018
|
// of growing past it — Ship's project chip on an issue row
|
|
@@ -1023,6 +1025,8 @@ function Chip({ type = "neutral", label, leadingIcon, trailingIcon, className })
|
|
|
1023
1025
|
/* @__PURE__ */ jsx17("span", { className: cn("min-w-0 overflow-x-clip text-ellipsis whitespace-nowrap signal:tracking-wide", CHIP_TEXT_CLASSES), children: label }),
|
|
1024
1026
|
trailingIcon && /* @__PURE__ */ jsx17("span", { className: "flex size-3 shrink-0 items-center justify-center", children: trailingIcon })
|
|
1025
1027
|
] });
|
|
1028
|
+
if (href) return /* @__PURE__ */ jsx17("a", { href, onClick, className: cn("relative", classes), children: inside });
|
|
1029
|
+
return /* @__PURE__ */ jsx17("div", { className: classes, children: inside });
|
|
1026
1030
|
}
|
|
1027
1031
|
|
|
1028
1032
|
// src/CommandPalette.tsx
|
|
@@ -1113,7 +1117,7 @@ function SectionLabel({
|
|
|
1113
1117
|
}
|
|
1114
1118
|
|
|
1115
1119
|
// src/Menu.tsx
|
|
1116
|
-
import { Fragment as
|
|
1120
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1117
1121
|
var MenuContext = createContext4(null);
|
|
1118
1122
|
function MenuPanel({ children, className, ...props }) {
|
|
1119
1123
|
return /* @__PURE__ */ jsx20(
|
|
@@ -1252,7 +1256,7 @@ function menuItemClassName({ size, selected, className }) {
|
|
|
1252
1256
|
}
|
|
1253
1257
|
function MenuItemBody({ label, children, size = "default", description, leading, trailing, hint, shortcut, submenu, destructive, selected }) {
|
|
1254
1258
|
const edge = trailing ?? (shortcut ? /* @__PURE__ */ jsx20(Kbd, { children: shortcut }) : submenu ? /* @__PURE__ */ jsx20(IconChevronRight, { size: 16, stroke: 1.5, className: "shrink-0 text-text-muted" }) : null);
|
|
1255
|
-
return /* @__PURE__ */ jsxs13(
|
|
1259
|
+
return /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
1256
1260
|
leading && /* @__PURE__ */ jsx20("span", { className: "flex shrink-0 items-center", children: leading }),
|
|
1257
1261
|
children ?? /* @__PURE__ */ jsxs13("span", { className: cn("flex min-w-0 flex-1 flex-col", size === "tall" && "gap-[2px]"), children: [
|
|
1258
1262
|
/* @__PURE__ */ jsx20("span", { className: cn("truncate text-body-2", destructive ? "text-error-default" : "text-text-primary"), children: label }),
|
|
@@ -1622,7 +1626,7 @@ function SkeletonList({ rows = 8, className }) {
|
|
|
1622
1626
|
}
|
|
1623
1627
|
|
|
1624
1628
|
// src/CommandPalette.tsx
|
|
1625
|
-
import { Fragment as
|
|
1629
|
+
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1626
1630
|
var PaletteContext = createContext5(null);
|
|
1627
1631
|
function usePalette(part) {
|
|
1628
1632
|
const palette = useContext5(PaletteContext);
|
|
@@ -1815,7 +1819,7 @@ function CommandPaletteSearch({ query, onQueryChange, placeholder, groups, chip,
|
|
|
1815
1819
|
) }, row.id)
|
|
1816
1820
|
) })
|
|
1817
1821
|
] }, group.value) }),
|
|
1818
|
-
/* @__PURE__ */ jsx26(Autocomplete.Status, { className: "flex items-center gap-2 px-3 [&:not(:empty)]:h-8", children: pending && /* @__PURE__ */ jsxs18(
|
|
1822
|
+
/* @__PURE__ */ jsx26(Autocomplete.Status, { className: "flex items-center gap-2 px-3 [&:not(:empty)]:h-8", children: pending && /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
|
1819
1823
|
/* @__PURE__ */ jsx26(IconLoader22, { size: 12, stroke: 1.5, className: "shrink-0 animate-spin text-text-muted" }),
|
|
1820
1824
|
/* @__PURE__ */ jsx26("span", { className: "text-caption text-text-muted", children: pending })
|
|
1821
1825
|
] }) }),
|
|
@@ -1922,7 +1926,7 @@ function CommandPaletteQuote({ children }) {
|
|
|
1922
1926
|
}
|
|
1923
1927
|
|
|
1924
1928
|
// src/InlineChip.tsx
|
|
1925
|
-
import { Fragment as
|
|
1929
|
+
import { Fragment as Fragment6, jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1926
1930
|
var INLINE_CHIP_CLASSES = "inline-flex h-[1.4em] items-center gap-1 rounded-sm px-1 mx-0.5 align-top text-body-2 font-normal select-none";
|
|
1927
1931
|
var INLINE_CHIP_TONE_CLASSES = {
|
|
1928
1932
|
/** A thing or a place — anything that is not a person. */
|
|
@@ -1944,7 +1948,7 @@ function inlineChipClassName(tone, className) {
|
|
|
1944
1948
|
return cn(INLINE_CHIP_CLASSES, INLINE_CHIP_TONE_CLASSES[tone], className);
|
|
1945
1949
|
}
|
|
1946
1950
|
function InlineChip({ tone = "neutral", icon, href, className, children, ...props }) {
|
|
1947
|
-
const body = /* @__PURE__ */ jsxs19(
|
|
1951
|
+
const body = /* @__PURE__ */ jsxs19(Fragment6, { children: [
|
|
1948
1952
|
icon && /* @__PURE__ */ jsx27("span", { className: "flex size-4 shrink-0 items-center justify-center text-text-secondary", children: icon }),
|
|
1949
1953
|
children
|
|
1950
1954
|
] });
|
|
@@ -1955,19 +1959,158 @@ function InlineChip({ tone = "neutral", icon, href, className, children, ...prop
|
|
|
1955
1959
|
return /* @__PURE__ */ jsx27("a", { href, className: classes, ...props, children: body });
|
|
1956
1960
|
}
|
|
1957
1961
|
|
|
1962
|
+
// src/RichText.tsx
|
|
1963
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1964
|
+
var RICH_TEXT_CLASSES = {
|
|
1965
|
+
base: "flex flex-col gap-1 break-words text-text-secondary",
|
|
1966
|
+
/* A heading binds to what follows it: 12px above (8 and the 4px gap), 8px below (4 and the gap); two headings in a row, 12px apart. Level 3 keeps the text's colour, one step lower. */
|
|
1967
|
+
headings: "[&>:is(h1,h2,h3)]:mb-1 [&>:is(h1,h2,h3)]:mt-2 [&>:is(h1,h2,h3):first-child]:mt-0 [&>:is(h1,h2,h3):last-child]:mb-0 [&>:is(h1,h2,h3)+:is(h1,h2,h3)]:mt-1 [&>:is(h1,h2)]:text-text-primary",
|
|
1968
|
+
lists: "[&_:is(ul,ol)]:pl-5 [&_li>p]:m-0 [&_li]:break-words [&_li]:marker:text-text-muted [&_ol]:list-decimal [&_ul]:list-disc",
|
|
1969
|
+
// eslint-disable-next-line token-spacing/no-restricted-classes -- @estiva-escape: the quote line is Peek's, 3px, between the ramp's 2 and 4
|
|
1970
|
+
quote: "[&_blockquote>p]:m-0 [&_blockquote]:border-l-[3px] [&_blockquote]:border-border-strong [&_blockquote]:pl-2.5",
|
|
1971
|
+
// eslint-disable-next-line token-values/no-restricted-classes -- @estiva-escape: code is 0.9 of the text around it, so it scales with a heading and with `small`; a named size is fixed
|
|
1972
|
+
code: "[&_:not(pre)>code]:rounded-sm [&_:not(pre)>code]:bg-bg-code [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.9em] [&_code]:text-text-primary",
|
|
1973
|
+
// eslint-disable-next-line token-values/no-restricted-classes -- @estiva-escape: code is 0.9 of the text around it; the code inside the block is the block's own size, not 0.9 of it again
|
|
1974
|
+
codeBlock: "[&_pre>code]:text-[1em] [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:rounded-md [&_pre]:bg-bg-code [&_pre]:p-2 [&_pre]:font-mono [&_pre]:text-[0.9em] [&_pre]:text-text-primary",
|
|
1975
|
+
divider: "[&_hr]:border-border-default",
|
|
1976
|
+
table: "[&_:is(th,td)>p]:m-0 [&_:is(th,td)]:border [&_:is(th,td)]:border-border-default [&_:is(th,td)]:px-2 [&_:is(th,td)]:py-1 [&_:is(th,td)]:text-left [&_:is(th,td)]:align-top [&_table]:w-full [&_table]:border-collapse [&_th]:bg-bg-code [&_th]:font-medium [&_th]:text-text-primary",
|
|
1977
|
+
marks: "[&_em]:italic [&_strong]:font-semibold [&_u]:underline [&_u]:underline-offset-2",
|
|
1978
|
+
default: "text-body-2 [&>:is(h2,h3)]:text-body-2 [&>:is(h2,h3)]:font-semibold [&>h1]:text-h4",
|
|
1979
|
+
small: "text-caption leading-snug [&>:is(h2,h3)]:text-caption [&>:is(h2,h3)]:font-semibold [&>h1]:text-body-2 [&>h1]:font-semibold"
|
|
1980
|
+
};
|
|
1981
|
+
function richTextClassName(size = "default", className) {
|
|
1982
|
+
const { base, headings, lists, quote, code, codeBlock, divider, table, marks } = RICH_TEXT_CLASSES;
|
|
1983
|
+
return cn(base, headings, lists, quote, code, codeBlock, divider, table, marks, RICH_TEXT_CLASSES[size], className);
|
|
1984
|
+
}
|
|
1985
|
+
var LINK_SPLIT = /(\[[^[\]\n]+\]\((?:https?:\/\/|mailto:)[^\s)]+\)|https?:\/\/[^\s]+)/g;
|
|
1986
|
+
var WRITTEN_LINK = /^\[([^[\]\n]+)\]\(((?:https?:\/\/|mailto:)[^\s)]+)\)$/;
|
|
1987
|
+
var BARE_LINK = /^(https?:\/\/\S+?)([.,;:!?)\]]*)$/;
|
|
1988
|
+
var keepToLink = (event) => event.stopPropagation();
|
|
1989
|
+
function textWithLinks(text, renderText) {
|
|
1990
|
+
const parts = text.split(LINK_SPLIT);
|
|
1991
|
+
if (parts.length === 1) return renderText(text);
|
|
1992
|
+
return parts.map((part, i) => {
|
|
1993
|
+
const written = part.match(WRITTEN_LINK);
|
|
1994
|
+
if (written) {
|
|
1995
|
+
return /* @__PURE__ */ jsx28("span", { className: "break-words", children: /* @__PURE__ */ jsx28(Link, { href: written[2], external: true, onClick: keepToLink, children: written[1] }) }, i);
|
|
1996
|
+
}
|
|
1997
|
+
const bare = i % 2 === 1 ? part.match(BARE_LINK) : null;
|
|
1998
|
+
if (bare) {
|
|
1999
|
+
return (
|
|
2000
|
+
// An address has no spaces to wrap at, so it may break anywhere.
|
|
2001
|
+
/* @__PURE__ */ jsxs20("span", { className: "break-all", children: [
|
|
2002
|
+
/* @__PURE__ */ jsx28(Link, { href: bare[1], external: true, onClick: keepToLink, children: bare[1] }),
|
|
2003
|
+
bare[2]
|
|
2004
|
+
] }, i)
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
return part ? /* @__PURE__ */ jsx28("span", { children: renderText(part) }, i) : null;
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
function Runs({ runs, draw }) {
|
|
2011
|
+
return /* @__PURE__ */ jsx28(Fragment7, { children: (runs ?? []).map((run, i) => {
|
|
2012
|
+
if (run.reference) return /* @__PURE__ */ jsx28("span", { children: draw.renderReference(run.reference, run) }, i);
|
|
2013
|
+
if (run.marks.includes("code")) {
|
|
2014
|
+
return /* @__PURE__ */ jsx28("code", { children: run.text }, i);
|
|
2015
|
+
}
|
|
2016
|
+
let node = run.text.split("\n").map((line, j) => /* @__PURE__ */ jsxs20("span", { children: [
|
|
2017
|
+
j > 0 && /* @__PURE__ */ jsx28("br", {}),
|
|
2018
|
+
textWithLinks(line, draw.renderText)
|
|
2019
|
+
] }, j));
|
|
2020
|
+
if (run.marks.includes("underline")) node = /* @__PURE__ */ jsx28("u", { children: node });
|
|
2021
|
+
if (run.marks.includes("italic")) node = /* @__PURE__ */ jsx28("em", { children: node });
|
|
2022
|
+
if (run.marks.includes("bold")) node = /* @__PURE__ */ jsx28("strong", { children: node });
|
|
2023
|
+
return /* @__PURE__ */ jsx28("span", { children: node }, i);
|
|
2024
|
+
}) });
|
|
2025
|
+
}
|
|
2026
|
+
var named = (block) => block.typeName ?? block.type;
|
|
2027
|
+
function Table({ block, draw }) {
|
|
2028
|
+
const rows = (block.children ?? []).filter((row) => named(row) === "tableRow");
|
|
2029
|
+
if (!rows.length) return null;
|
|
2030
|
+
const cells = (row) => (row.children ?? []).map((cell, i) => {
|
|
2031
|
+
const header = named(cell) === "tableHeader";
|
|
2032
|
+
const Cell = header ? "th" : "td";
|
|
2033
|
+
const { colspan, rowspan } = cell.attrs ?? {};
|
|
2034
|
+
return /* @__PURE__ */ jsxs20(
|
|
2035
|
+
Cell,
|
|
2036
|
+
{
|
|
2037
|
+
"data-block-id": cell.id,
|
|
2038
|
+
colSpan: colspan && colspan > 1 ? colspan : void 0,
|
|
2039
|
+
rowSpan: rowspan && rowspan > 1 ? rowspan : void 0,
|
|
2040
|
+
children: [
|
|
2041
|
+
(cell.children ?? []).map((child, j) => /* @__PURE__ */ jsx28(Runs, { runs: child.inline, draw }, j)),
|
|
2042
|
+
/* @__PURE__ */ jsx28(Runs, { runs: cell.inline, draw })
|
|
2043
|
+
]
|
|
2044
|
+
},
|
|
2045
|
+
cell.id ?? i
|
|
2046
|
+
);
|
|
2047
|
+
});
|
|
2048
|
+
const first = rows[0].children ?? [];
|
|
2049
|
+
const headerRow = first.length > 0 && first.every((cell) => named(cell) === "tableHeader");
|
|
2050
|
+
return /* @__PURE__ */ jsxs20("table", { "data-block-id": block.id, children: [
|
|
2051
|
+
headerRow && /* @__PURE__ */ jsx28("thead", { children: /* @__PURE__ */ jsx28("tr", { "data-block-id": rows[0].id, children: cells(rows[0]) }) }),
|
|
2052
|
+
/* @__PURE__ */ jsx28("tbody", { children: (headerRow ? rows.slice(1) : rows).map((row, i) => /* @__PURE__ */ jsx28("tr", { "data-block-id": row.id, children: cells(row) }, row.id ?? i)) })
|
|
2053
|
+
] });
|
|
2054
|
+
}
|
|
2055
|
+
function Block({ block, draw }) {
|
|
2056
|
+
const own = draw.renderBlock?.(block);
|
|
2057
|
+
if (own !== void 0) return own;
|
|
2058
|
+
const runs = /* @__PURE__ */ jsx28(Runs, { runs: block.inline, draw });
|
|
2059
|
+
switch (block.type) {
|
|
2060
|
+
case "heading": {
|
|
2061
|
+
if (block.level === 1) return /* @__PURE__ */ jsx28("h1", { "data-block-id": block.id, children: runs });
|
|
2062
|
+
if (block.level === 3) return /* @__PURE__ */ jsx28("h3", { "data-block-id": block.id, children: runs });
|
|
2063
|
+
return /* @__PURE__ */ jsx28("h2", { "data-block-id": block.id, children: runs });
|
|
2064
|
+
}
|
|
2065
|
+
case "paragraph":
|
|
2066
|
+
return /* @__PURE__ */ jsx28("p", { "data-block-id": block.id, children: runs });
|
|
2067
|
+
case "bulletList":
|
|
2068
|
+
case "orderedList": {
|
|
2069
|
+
const items = (block.children ?? []).map((item, i) => /* @__PURE__ */ jsx28("li", { "data-block-id": item.id, children: /* @__PURE__ */ jsx28(Runs, { runs: item.inline, draw }) }, item.id ?? i));
|
|
2070
|
+
return block.type === "bulletList" ? /* @__PURE__ */ jsx28("ul", { "data-block-id": block.id, children: items }) : /* @__PURE__ */ jsx28("ol", { "data-block-id": block.id, start: block.start, children: items });
|
|
2071
|
+
}
|
|
2072
|
+
case "blockquote":
|
|
2073
|
+
return /* @__PURE__ */ jsx28("blockquote", { "data-block-id": block.id, children: runs });
|
|
2074
|
+
case "codeBlock":
|
|
2075
|
+
return /* @__PURE__ */ jsx28("pre", { "data-block-id": block.id, "data-language": block.language, children: /* @__PURE__ */ jsx28("code", { children: (block.inline ?? []).map((run) => run.text).join("") }) });
|
|
2076
|
+
case "horizontalRule":
|
|
2077
|
+
return /* @__PURE__ */ jsx28("hr", { "data-block-id": block.id });
|
|
2078
|
+
case "table": {
|
|
2079
|
+
const table = /* @__PURE__ */ jsx28(Table, { block, draw });
|
|
2080
|
+
if ((block.children ?? []).some((row) => named(row) === "tableRow")) return table;
|
|
2081
|
+
break;
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
return /* @__PURE__ */ jsxs20("div", { "data-block-id": block.id, "data-block-type": named(block), children: [
|
|
2085
|
+
runs,
|
|
2086
|
+
(block.children ?? []).map((child, i) => /* @__PURE__ */ jsx28(Block, { block: child, draw }, child.id ?? i))
|
|
2087
|
+
] });
|
|
2088
|
+
}
|
|
2089
|
+
function RichText({
|
|
2090
|
+
blocks,
|
|
2091
|
+
size = "default",
|
|
2092
|
+
renderText = (text) => text,
|
|
2093
|
+
renderReference = (_reference, run) => run.text,
|
|
2094
|
+
renderBlock
|
|
2095
|
+
}) {
|
|
2096
|
+
if (blocks.length === 0) return null;
|
|
2097
|
+
const draw = { renderText, renderReference, renderBlock };
|
|
2098
|
+
return /* @__PURE__ */ jsx28("div", { "data-rich-text": true, className: richTextClassName(size), children: blocks.map((block, i) => /* @__PURE__ */ jsx28(Block, { block, draw }, block.id ?? i)) });
|
|
2099
|
+
}
|
|
2100
|
+
|
|
1958
2101
|
// src/IdentityMenu.tsx
|
|
1959
2102
|
import { useCallback, useRef as useRef5 } from "react";
|
|
1960
2103
|
|
|
1961
2104
|
// src/Person.tsx
|
|
1962
|
-
import { jsx as
|
|
2105
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1963
2106
|
function Person({ name, picture, fallback = "\u2014", size = 20, className }) {
|
|
1964
2107
|
return (
|
|
1965
2108
|
// gap-2: the face-to-name distance is one rule (8px) wherever a person
|
|
1966
2109
|
// appears — Katerina, 2026-09-01, set on Person so PersonTrigger and every
|
|
1967
2110
|
// row agree by construction.
|
|
1968
|
-
/* @__PURE__ */
|
|
1969
|
-
/* @__PURE__ */
|
|
1970
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsxs21("span", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2112
|
+
/* @__PURE__ */ jsx29(Avatar, { name, src: picture, size }),
|
|
2113
|
+
/* @__PURE__ */ jsx29("span", { className: cn("truncate", !name && "text-text-muted"), children: name ?? fallback })
|
|
1971
2114
|
] })
|
|
1972
2115
|
);
|
|
1973
2116
|
}
|
|
@@ -1975,10 +2118,10 @@ function Person({ name, picture, fallback = "\u2014", size = 20, className }) {
|
|
|
1975
2118
|
// src/PersonTrigger.tsx
|
|
1976
2119
|
import { Button as BaseButton5 } from "@base-ui/react/button";
|
|
1977
2120
|
import { IconChevronDown } from "@tabler/icons-react";
|
|
1978
|
-
import { jsx as
|
|
2121
|
+
import { jsx as jsx30, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1979
2122
|
function PersonTrigger({ name, picture, fallback, size, open = false, compact = false, className, ...props }) {
|
|
1980
2123
|
if (compact) {
|
|
1981
|
-
return /* @__PURE__ */
|
|
2124
|
+
return /* @__PURE__ */ jsx30(
|
|
1982
2125
|
BaseButton5,
|
|
1983
2126
|
{
|
|
1984
2127
|
type: "button",
|
|
@@ -1987,13 +2130,13 @@ function PersonTrigger({ name, picture, fallback, size, open = false, compact =
|
|
|
1987
2130
|
"aria-label": props["aria-label"] ?? name ?? fallback,
|
|
1988
2131
|
className: cn("cursor-pointer rounded-full", className),
|
|
1989
2132
|
...props,
|
|
1990
|
-
children: /* @__PURE__ */
|
|
2133
|
+
children: /* @__PURE__ */ jsx30(Avatar, { name, src: picture, size: size ?? 36 })
|
|
1991
2134
|
}
|
|
1992
2135
|
);
|
|
1993
2136
|
}
|
|
1994
2137
|
return (
|
|
1995
2138
|
// @estiva-escape(no-copied-look): N5 (Katerina, 24 September: record only): a row that fills on hover, as NavItem also does
|
|
1996
|
-
/* @__PURE__ */
|
|
2139
|
+
/* @__PURE__ */ jsxs22(
|
|
1997
2140
|
BaseButton5,
|
|
1998
2141
|
{
|
|
1999
2142
|
type: "button",
|
|
@@ -2011,8 +2154,8 @@ function PersonTrigger({ name, picture, fallback, size, open = false, compact =
|
|
|
2011
2154
|
),
|
|
2012
2155
|
...props,
|
|
2013
2156
|
children: [
|
|
2014
|
-
/* @__PURE__ */
|
|
2015
|
-
/* @__PURE__ */
|
|
2157
|
+
/* @__PURE__ */ jsx30(Person, { name, picture, fallback, size: size ?? 22 }),
|
|
2158
|
+
/* @__PURE__ */ jsx30(IconChevronDown, { size: 14, stroke: 1.5, className: "shrink-0 text-text-muted" })
|
|
2016
2159
|
]
|
|
2017
2160
|
}
|
|
2018
2161
|
)
|
|
@@ -2020,10 +2163,10 @@ function PersonTrigger({ name, picture, fallback, size, open = false, compact =
|
|
|
2020
2163
|
}
|
|
2021
2164
|
|
|
2022
2165
|
// src/IdentityMenu.tsx
|
|
2023
|
-
import { Fragment as
|
|
2166
|
+
import { Fragment as Fragment8, jsx as jsx31, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2024
2167
|
function IdentityPanel({ className, onClose = () => {
|
|
2025
2168
|
}, ...rest }) {
|
|
2026
|
-
return /* @__PURE__ */
|
|
2169
|
+
return /* @__PURE__ */ jsx31(MenuPanel, { className: cn("w-72", className), children: /* @__PURE__ */ jsx31(IdentityRows, { ...rest, onClose }) });
|
|
2027
2170
|
}
|
|
2028
2171
|
function IdentityRows({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, onClose, children }) {
|
|
2029
2172
|
const act = (action) => () => {
|
|
@@ -2031,36 +2174,36 @@ function IdentityRows({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, on
|
|
|
2031
2174
|
action();
|
|
2032
2175
|
};
|
|
2033
2176
|
const appRows = typeof children === "function" ? children(onClose) : children;
|
|
2034
|
-
return /* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2036
|
-
/* @__PURE__ */
|
|
2037
|
-
/* @__PURE__ */
|
|
2038
|
-
me.email && /* @__PURE__ */
|
|
2177
|
+
return /* @__PURE__ */ jsxs23(Fragment8, { children: [
|
|
2178
|
+
/* @__PURE__ */ jsxs23(MenuSection, { label: signedIn ? "Signed in as" : "Acting as", children: [
|
|
2179
|
+
/* @__PURE__ */ jsx31(MenuRow, { children: /* @__PURE__ */ jsx31("div", { className: "flex min-w-0 text-body-2-strong", children: /* @__PURE__ */ jsx31(Person, { name: me.name, picture: me.picture, fallback: "Anonymous", size: 28 }) }) }),
|
|
2180
|
+
/* @__PURE__ */ jsx31(Note, { children: signedIn ? "Your Estiva ID. The same person you are in every Estiva app." : "A key held by this browser only. Nobody else knows who you are." }),
|
|
2181
|
+
me.email && /* @__PURE__ */ jsxs23(Note, { children: [
|
|
2039
2182
|
me.email,
|
|
2040
2183
|
" \xB7 known to Estiva, never published to the relay"
|
|
2041
2184
|
] })
|
|
2042
2185
|
] }),
|
|
2043
|
-
relayUrl && /* @__PURE__ */
|
|
2044
|
-
/* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
/* @__PURE__ */
|
|
2186
|
+
relayUrl && /* @__PURE__ */ jsxs23(Fragment8, { children: [
|
|
2187
|
+
/* @__PURE__ */ jsx31(Divider, { className: "mx-0 my-2" }),
|
|
2188
|
+
/* @__PURE__ */ jsxs23(MenuSection, { label: "Workspace", children: [
|
|
2189
|
+
/* @__PURE__ */ jsx31(MenuRow, { children: /* @__PURE__ */ jsx31("span", { className: "break-all font-mono text-caption text-text-primary", children: relayUrl }) }),
|
|
2190
|
+
/* @__PURE__ */ jsx31(Note, { children: "Everyone on this relay shares this workspace, in every app." })
|
|
2048
2191
|
] })
|
|
2049
2192
|
] }),
|
|
2050
|
-
appRows && /* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2193
|
+
appRows && /* @__PURE__ */ jsxs23(Fragment8, { children: [
|
|
2194
|
+
/* @__PURE__ */ jsx31(Divider, { className: "mx-0 my-2" }),
|
|
2052
2195
|
appRows
|
|
2053
2196
|
] }),
|
|
2054
|
-
signedIn && idBase || onCopyKey || idBase && onSignOut ? /* @__PURE__ */
|
|
2055
|
-
signedIn && idBase && /* @__PURE__ */
|
|
2197
|
+
signedIn && idBase || onCopyKey || idBase && onSignOut ? /* @__PURE__ */ jsx31(Divider, { className: "mx-0 my-2" }) : null,
|
|
2198
|
+
signedIn && idBase && /* @__PURE__ */ jsx31(
|
|
2056
2199
|
MenuItem,
|
|
2057
2200
|
{
|
|
2058
2201
|
label: "Edit your profile in Estiva ID",
|
|
2059
2202
|
onClick: act(() => window.open(idBase, "_blank", "noopener,noreferrer"))
|
|
2060
2203
|
}
|
|
2061
2204
|
),
|
|
2062
|
-
onCopyKey && /* @__PURE__ */
|
|
2063
|
-
idBase && onSignOut && /* @__PURE__ */
|
|
2205
|
+
onCopyKey && /* @__PURE__ */ jsx31(MenuItem, { label: "Copy public key", onClick: act(onCopyKey) }),
|
|
2206
|
+
idBase && onSignOut && /* @__PURE__ */ jsx31(MenuItem, { label: "Sign out", onClick: act(onSignOut) })
|
|
2064
2207
|
] });
|
|
2065
2208
|
}
|
|
2066
2209
|
function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, compact = false, className, children }) {
|
|
@@ -2071,13 +2214,13 @@ function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, co
|
|
|
2071
2214
|
to be `relative`, because the panel was positioned against it; the panel
|
|
2072
2215
|
hangs from the trigger and portals now, so a positioning context here
|
|
2073
2216
|
would only be a lie about what this box does. */
|
|
2074
|
-
/* @__PURE__ */
|
|
2217
|
+
/* @__PURE__ */ jsx31("div", { className, children: /* @__PURE__ */ jsx31(
|
|
2075
2218
|
Menu,
|
|
2076
2219
|
{
|
|
2077
2220
|
align: "right",
|
|
2078
2221
|
actionsRef: actions,
|
|
2079
2222
|
className: "w-72",
|
|
2080
|
-
trigger: /* @__PURE__ */
|
|
2223
|
+
trigger: /* @__PURE__ */ jsx31(
|
|
2081
2224
|
PersonTrigger,
|
|
2082
2225
|
{
|
|
2083
2226
|
name: me.name,
|
|
@@ -2088,7 +2231,7 @@ function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, co
|
|
|
2088
2231
|
"aria-label": compact ? "Account menu" : void 0
|
|
2089
2232
|
}
|
|
2090
2233
|
),
|
|
2091
|
-
children: /* @__PURE__ */
|
|
2234
|
+
children: /* @__PURE__ */ jsx31(
|
|
2092
2235
|
IdentityRows,
|
|
2093
2236
|
{
|
|
2094
2237
|
me,
|
|
@@ -2106,14 +2249,14 @@ function IdentityMenu({ me, signedIn, relayUrl, idBase, onCopyKey, onSignOut, co
|
|
|
2106
2249
|
);
|
|
2107
2250
|
}
|
|
2108
2251
|
function Note({ children }) {
|
|
2109
|
-
return /* @__PURE__ */
|
|
2252
|
+
return /* @__PURE__ */ jsx31("span", { className: "px-2 pb-1.5 text-caption text-text-secondary", children });
|
|
2110
2253
|
}
|
|
2111
2254
|
|
|
2112
2255
|
// src/FilePicker.tsx
|
|
2113
2256
|
import { forwardRef } from "react";
|
|
2114
|
-
import { jsx as
|
|
2257
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
2115
2258
|
var FilePicker = forwardRef(function FilePicker2({ onPick, ...props }, ref) {
|
|
2116
|
-
return /* @__PURE__ */
|
|
2259
|
+
return /* @__PURE__ */ jsx32(
|
|
2117
2260
|
"input",
|
|
2118
2261
|
{
|
|
2119
2262
|
ref,
|
|
@@ -2134,7 +2277,7 @@ var FilePicker = forwardRef(function FilePicker2({ onPick, ...props }, ref) {
|
|
|
2134
2277
|
// src/Select.tsx
|
|
2135
2278
|
import { IconCheck as IconCheck2, IconChevronDown as IconChevronDown2 } from "@tabler/icons-react";
|
|
2136
2279
|
import { Select as BaseSelect } from "@base-ui/react/select";
|
|
2137
|
-
import { jsx as
|
|
2280
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2138
2281
|
var GAP4 = 4;
|
|
2139
2282
|
var VIEWPORT_PAD4 = 8;
|
|
2140
2283
|
function Select({ value, onChange, options, size = "default", ariaLabel, placeholder = "Select\u2026", disabled, disabledReason, className, ...aria }) {
|
|
@@ -2142,7 +2285,7 @@ function Select({ value, onChange, options, size = "default", ariaLabel, placeho
|
|
|
2142
2285
|
const held = Boolean(disabledReason);
|
|
2143
2286
|
const trigger = (
|
|
2144
2287
|
// @estiva-escape(no-copied-look): N1 (Katerina, 24 September: record only): Select's box drops the hover while held, so it cannot take FIELD_SHELL_CLASSES as it is
|
|
2145
|
-
/* @__PURE__ */
|
|
2288
|
+
/* @__PURE__ */ jsxs24(
|
|
2146
2289
|
BaseSelect.Trigger,
|
|
2147
2290
|
{
|
|
2148
2291
|
"aria-label": ariaLabel,
|
|
@@ -2172,21 +2315,21 @@ function Select({ value, onChange, options, size = "default", ariaLabel, placeho
|
|
|
2172
2315
|
className
|
|
2173
2316
|
),
|
|
2174
2317
|
children: [
|
|
2175
|
-
/* @__PURE__ */
|
|
2176
|
-
selected?.leading && /* @__PURE__ */
|
|
2177
|
-
/* @__PURE__ */
|
|
2318
|
+
/* @__PURE__ */ jsxs24("span", { className: cn("flex min-w-0 items-center gap-2", !selected && "text-text-muted"), children: [
|
|
2319
|
+
selected?.leading && /* @__PURE__ */ jsx33("span", { className: "flex shrink-0 items-center", children: selected.leading }),
|
|
2320
|
+
/* @__PURE__ */ jsx33(BaseSelect.Value, { className: "truncate", children: () => selected?.label ?? placeholder })
|
|
2178
2321
|
] }),
|
|
2179
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ jsx33(
|
|
2180
2323
|
BaseSelect.Icon,
|
|
2181
2324
|
{
|
|
2182
|
-
render: /* @__PURE__ */
|
|
2325
|
+
render: /* @__PURE__ */ jsx33(IconChevronDown2, { size: size === "small" ? 14 : 16, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
2183
2326
|
}
|
|
2184
2327
|
)
|
|
2185
2328
|
]
|
|
2186
2329
|
}
|
|
2187
2330
|
)
|
|
2188
2331
|
);
|
|
2189
|
-
return /* @__PURE__ */
|
|
2332
|
+
return /* @__PURE__ */ jsxs24(
|
|
2190
2333
|
BaseSelect.Root,
|
|
2191
2334
|
{
|
|
2192
2335
|
value,
|
|
@@ -2198,8 +2341,8 @@ function Select({ value, onChange, options, size = "default", ariaLabel, placeho
|
|
|
2198
2341
|
disabled: disabled && !held,
|
|
2199
2342
|
modal: false,
|
|
2200
2343
|
children: [
|
|
2201
|
-
held ? /* @__PURE__ */
|
|
2202
|
-
/* @__PURE__ */
|
|
2344
|
+
held ? /* @__PURE__ */ jsx33(TooltipTrigger, { label: disabledReason ?? "", children: trigger }) : trigger,
|
|
2345
|
+
/* @__PURE__ */ jsx33(BaseSelect.Portal, { children: /* @__PURE__ */ jsx33(
|
|
2203
2346
|
BaseSelect.Positioner,
|
|
2204
2347
|
{
|
|
2205
2348
|
side: "bottom",
|
|
@@ -2208,25 +2351,25 @@ function Select({ value, onChange, options, size = "default", ariaLabel, placeho
|
|
|
2208
2351
|
collisionPadding: VIEWPORT_PAD4,
|
|
2209
2352
|
alignItemWithTrigger: false,
|
|
2210
2353
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
2211
|
-
children: /* @__PURE__ */
|
|
2354
|
+
children: /* @__PURE__ */ jsx33(
|
|
2212
2355
|
BaseSelect.Popup,
|
|
2213
2356
|
{
|
|
2214
|
-
render: /* @__PURE__ */
|
|
2357
|
+
render: /* @__PURE__ */ jsx33(MenuPanel, {}),
|
|
2215
2358
|
className: "min-w-[var(--anchor-width)] p-0",
|
|
2216
|
-
children: /* @__PURE__ */
|
|
2359
|
+
children: /* @__PURE__ */ jsx33(ScrollArea, { viewportClassName: "max-h-[min(288px,var(--available-height))]", contentClassName: "flex flex-col p-2", children: options.map((option) => /* @__PURE__ */ jsxs24(
|
|
2217
2360
|
BaseSelect.Item,
|
|
2218
2361
|
{
|
|
2219
2362
|
value: option.value,
|
|
2220
2363
|
className: cn(menuItemClassName({ size: "default" }), "justify-between data-[selected]:font-medium"),
|
|
2221
2364
|
children: [
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
option.leading && /* @__PURE__ */
|
|
2224
|
-
/* @__PURE__ */
|
|
2365
|
+
/* @__PURE__ */ jsxs24("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2366
|
+
option.leading && /* @__PURE__ */ jsx33("span", { className: "flex shrink-0 items-center", children: option.leading }),
|
|
2367
|
+
/* @__PURE__ */ jsx33(BaseSelect.ItemText, { className: "truncate text-body-2 text-text-primary", children: option.label })
|
|
2225
2368
|
] }),
|
|
2226
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx33(
|
|
2227
2370
|
BaseSelect.ItemIndicator,
|
|
2228
2371
|
{
|
|
2229
|
-
render: /* @__PURE__ */
|
|
2372
|
+
render: /* @__PURE__ */ jsx33(IconCheck2, { size: 16, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
2230
2373
|
}
|
|
2231
2374
|
)
|
|
2232
2375
|
]
|
|
@@ -2245,9 +2388,9 @@ function Select({ value, onChange, options, size = "default", ariaLabel, placeho
|
|
|
2245
2388
|
// src/TextInput.tsx
|
|
2246
2389
|
import { forwardRef as forwardRef2 } from "react";
|
|
2247
2390
|
import { Input } from "@base-ui/react/input";
|
|
2248
|
-
import { jsx as
|
|
2391
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
2249
2392
|
var TextInput = forwardRef2(function TextInput2({ className, type = "text", size = "default", ...props }, ref) {
|
|
2250
|
-
return /* @__PURE__ */
|
|
2393
|
+
return /* @__PURE__ */ jsx34(
|
|
2251
2394
|
Input,
|
|
2252
2395
|
{
|
|
2253
2396
|
ref,
|
|
@@ -2273,13 +2416,13 @@ var TextInput = forwardRef2(function TextInput2({ className, type = "text", size
|
|
|
2273
2416
|
// src/Textarea.tsx
|
|
2274
2417
|
import { forwardRef as forwardRef3 } from "react";
|
|
2275
2418
|
import { Field as BaseField3 } from "@base-ui/react/field";
|
|
2276
|
-
import { jsx as
|
|
2419
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
2277
2420
|
var Textarea = forwardRef3(function Textarea2({ className, ...props }, ref) {
|
|
2278
|
-
return /* @__PURE__ */
|
|
2421
|
+
return /* @__PURE__ */ jsx35(
|
|
2279
2422
|
BaseField3.Control,
|
|
2280
2423
|
{
|
|
2281
2424
|
ref,
|
|
2282
|
-
render: /* @__PURE__ */
|
|
2425
|
+
render: /* @__PURE__ */ jsx35("textarea", {}),
|
|
2283
2426
|
className: cn(
|
|
2284
2427
|
// The border strengthens on hover, as Select's and ChipInput's do (Katerina, 16 September:
|
|
2285
2428
|
// "aren't there hover states in text input and text area?"). Focus comes after hover in
|
|
@@ -2308,33 +2451,33 @@ import { IconX as IconX5 } from "@tabler/icons-react";
|
|
|
2308
2451
|
|
|
2309
2452
|
// src/ContainerHeader.tsx
|
|
2310
2453
|
import { IconChevronDown as IconChevronDown3 } from "@tabler/icons-react";
|
|
2311
|
-
import { jsx as
|
|
2454
|
+
import { jsx as jsx36, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2312
2455
|
function ContainerHeader({ title, chevron = false, actions, className }) {
|
|
2313
2456
|
const text = typeof title === "string";
|
|
2314
|
-
return /* @__PURE__ */
|
|
2315
|
-
/* @__PURE__ */
|
|
2316
|
-
text ? /* @__PURE__ */
|
|
2317
|
-
chevron && /* @__PURE__ */
|
|
2457
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn("flex h-12 shrink-0 items-center justify-between overflow-hidden border-b border-border-subtle py-2 pr-4 pl-5", className), children: [
|
|
2458
|
+
/* @__PURE__ */ jsx36("div", { className: cn("flex items-center gap-2 overflow-hidden", text ? "shrink-0" : "min-w-0 flex-1"), children: /* @__PURE__ */ jsxs25("div", { className: cn("flex items-center gap-1", text ? "shrink-0" : "min-w-0 flex-1"), children: [
|
|
2459
|
+
text ? /* @__PURE__ */ jsx36("span", { className: "whitespace-nowrap text-body-2-strong text-text-primary", children: title }) : /* @__PURE__ */ jsx36("div", { className: "min-w-0 flex-1", children: title }),
|
|
2460
|
+
chevron && /* @__PURE__ */ jsx36(IconChevronDown3, { size: 12, stroke: 1.5, className: "shrink-0 text-text-secondary" })
|
|
2318
2461
|
] }) }),
|
|
2319
|
-
actions && /* @__PURE__ */
|
|
2462
|
+
actions && /* @__PURE__ */ jsx36("div", { className: "flex shrink-0 items-center justify-end gap-3", children: /* @__PURE__ */ jsx36("div", { className: "flex shrink-0 items-center gap-1", children: actions }) })
|
|
2320
2463
|
] });
|
|
2321
2464
|
}
|
|
2322
2465
|
|
|
2323
2466
|
// src/DialogShell.tsx
|
|
2324
|
-
import { jsx as
|
|
2467
|
+
import { jsx as jsx37, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2325
2468
|
function DialogShell({ title, onClose, headerContent, footer, children, bodyClassName, bodyMaxHeight, width = 502, alert = false }) {
|
|
2326
2469
|
const Parts = alert ? AlertDialog : Dialog3;
|
|
2327
2470
|
const popupRef = useRef6(null);
|
|
2328
|
-
return /* @__PURE__ */
|
|
2471
|
+
return /* @__PURE__ */ jsx37(
|
|
2329
2472
|
Parts.Root,
|
|
2330
2473
|
{
|
|
2331
2474
|
open: true,
|
|
2332
2475
|
onOpenChange: (open) => {
|
|
2333
2476
|
if (!open) onClose();
|
|
2334
2477
|
},
|
|
2335
|
-
children: /* @__PURE__ */
|
|
2336
|
-
/* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2478
|
+
children: /* @__PURE__ */ jsxs26(Parts.Portal, { children: [
|
|
2479
|
+
/* @__PURE__ */ jsx37(Parts.Backdrop, { className: "fixed inset-0 z-40 bg-scrim" }),
|
|
2480
|
+
/* @__PURE__ */ jsx37("div", { className: "fixed inset-0 z-50 flex items-center justify-center pointer-events-none", children: /* @__PURE__ */ jsxs26(
|
|
2338
2481
|
Parts.Popup,
|
|
2339
2482
|
{
|
|
2340
2483
|
ref: popupRef,
|
|
@@ -2343,10 +2486,10 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
2343
2486
|
className: "bg-bg-elevated border border-border-subtle rounded-lg shadow-lg pointer-events-auto flex flex-col overflow-hidden outline-none",
|
|
2344
2487
|
style: { width },
|
|
2345
2488
|
children: [
|
|
2346
|
-
/* @__PURE__ */
|
|
2489
|
+
/* @__PURE__ */ jsx37(
|
|
2347
2490
|
ContainerHeader,
|
|
2348
2491
|
{
|
|
2349
|
-
title: headerContent ?? /* @__PURE__ */
|
|
2492
|
+
title: headerContent ?? /* @__PURE__ */ jsx37(Parts.Title, { className: "text-h4 text-text-primary", render: /* @__PURE__ */ jsx37("span", {}), children: title }),
|
|
2350
2493
|
actions: (
|
|
2351
2494
|
/*
|
|
2352
2495
|
The ✕ IS the `Close` part now, rather than a button that calls
|
|
@@ -2360,10 +2503,10 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
2360
2503
|
so the ✕, Escape and the outside press are one path with one
|
|
2361
2504
|
reason attached, instead of one of the three going around.
|
|
2362
2505
|
*/
|
|
2363
|
-
/* @__PURE__ */
|
|
2506
|
+
/* @__PURE__ */ jsx37(
|
|
2364
2507
|
Parts.Close,
|
|
2365
2508
|
{
|
|
2366
|
-
render: /* @__PURE__ */
|
|
2509
|
+
render: /* @__PURE__ */ jsx37(IconButton, { tooltip: "Close", "aria-label": "Close", children: /* @__PURE__ */ jsx37(IconX5, { size: 16, stroke: 1.5 }) })
|
|
2367
2510
|
}
|
|
2368
2511
|
)
|
|
2369
2512
|
)
|
|
@@ -2371,9 +2514,9 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
2371
2514
|
),
|
|
2372
2515
|
bodyMaxHeight ? (
|
|
2373
2516
|
// The line above the footer on a box of the shell's own, not pushed into ScrollArea (UIG-9).
|
|
2374
|
-
/* @__PURE__ */
|
|
2375
|
-
) : /* @__PURE__ */
|
|
2376
|
-
footer != null && /* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ jsx37("div", { className: cn(footer != null && "border-b border-border-subtle"), children: /* @__PURE__ */ jsx37(ScrollArea, { viewportClassName: bodyMaxHeight, contentClassName: cn("pl-5 pr-4 py-4", bodyClassName), children }) })
|
|
2518
|
+
) : /* @__PURE__ */ jsx37("div", { className: cn("pl-5 pr-4 py-4", footer != null && "border-b border-border-subtle", bodyClassName), children }),
|
|
2519
|
+
footer != null && /* @__PURE__ */ jsx37("div", { className: "h-12 flex items-center justify-end gap-2 pl-5 pr-4 shrink-0", children: footer })
|
|
2377
2520
|
]
|
|
2378
2521
|
}
|
|
2379
2522
|
) })
|
|
@@ -2383,7 +2526,7 @@ function DialogShell({ title, onClose, headerContent, footer, children, bodyClas
|
|
|
2383
2526
|
}
|
|
2384
2527
|
|
|
2385
2528
|
// src/ConfirmDialog.tsx
|
|
2386
|
-
import { Fragment as
|
|
2529
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2387
2530
|
function ConfirmDialog({ title, children, confirmLabel, destructive = false, onConfirm, onClose }) {
|
|
2388
2531
|
const [busy, setBusy] = useState4(false);
|
|
2389
2532
|
const confirm = async () => {
|
|
@@ -2395,17 +2538,17 @@ function ConfirmDialog({ title, children, confirmLabel, destructive = false, onC
|
|
|
2395
2538
|
setBusy(false);
|
|
2396
2539
|
}
|
|
2397
2540
|
};
|
|
2398
|
-
return /* @__PURE__ */
|
|
2541
|
+
return /* @__PURE__ */ jsx38(
|
|
2399
2542
|
DialogShell,
|
|
2400
2543
|
{
|
|
2401
2544
|
alert: true,
|
|
2402
2545
|
title,
|
|
2403
2546
|
onClose,
|
|
2404
|
-
footer: /* @__PURE__ */
|
|
2405
|
-
/* @__PURE__ */
|
|
2406
|
-
/* @__PURE__ */
|
|
2547
|
+
footer: /* @__PURE__ */ jsxs27(Fragment9, { children: [
|
|
2548
|
+
/* @__PURE__ */ jsx38(Button, { variant: "muted", onClick: onClose, disabled: busy, children: "Cancel" }),
|
|
2549
|
+
/* @__PURE__ */ jsx38(Button, { variant: destructive ? "destructive" : "primary", onClick: () => void confirm(), disabled: busy, children: confirmLabel })
|
|
2407
2550
|
] }),
|
|
2408
|
-
children: /* @__PURE__ */
|
|
2551
|
+
children: /* @__PURE__ */ jsx38("div", { className: "flex flex-col gap-3 text-body-2 text-text-primary", children })
|
|
2409
2552
|
}
|
|
2410
2553
|
);
|
|
2411
2554
|
}
|
|
@@ -2414,7 +2557,7 @@ function ConfirmDialog({ title, children, confirmLabel, destructive = false, onC
|
|
|
2414
2557
|
import { useEffect as useEffect3, useRef as useRef7, useState as useState5 } from "react";
|
|
2415
2558
|
import { Field as BaseField4 } from "@base-ui/react/field";
|
|
2416
2559
|
import { Input as Input2 } from "@base-ui/react/input";
|
|
2417
|
-
import { jsx as
|
|
2560
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
2418
2561
|
function EditableText({ value, display, displayNode, placeholder, onCommit, multiline = false, className, label, readOnly = false }) {
|
|
2419
2562
|
const [editing, setEditing] = useState5(false);
|
|
2420
2563
|
const [draft, setDraft] = useState5(value);
|
|
@@ -2472,7 +2615,7 @@ function EditableText({ value, display, displayNode, placeholder, onCommit, mult
|
|
|
2472
2615
|
written and never read. Read-only, this is a line of text: whatever
|
|
2473
2616
|
names the region around it (a `Field`, a `Property`) names this too.
|
|
2474
2617
|
*/
|
|
2475
|
-
/* @__PURE__ */
|
|
2618
|
+
/* @__PURE__ */ jsx39(
|
|
2476
2619
|
"div",
|
|
2477
2620
|
{
|
|
2478
2621
|
className: cn("w-full px-2 py-1", multiline && !displayNode && "whitespace-pre-wrap", display ?? value ? "text-text-primary" : "text-text-muted", className),
|
|
@@ -2482,11 +2625,11 @@ function EditableText({ value, display, displayNode, placeholder, onCommit, mult
|
|
|
2482
2625
|
);
|
|
2483
2626
|
}
|
|
2484
2627
|
if (editing) {
|
|
2485
|
-
return multiline ? /* @__PURE__ */
|
|
2628
|
+
return multiline ? /* @__PURE__ */ jsx39(
|
|
2486
2629
|
BaseField4.Control,
|
|
2487
2630
|
{
|
|
2488
2631
|
ref: fieldRef,
|
|
2489
|
-
render: /* @__PURE__ */
|
|
2632
|
+
render: /* @__PURE__ */ jsx39("textarea", { rows: 4 }),
|
|
2490
2633
|
"aria-label": label,
|
|
2491
2634
|
value: draft,
|
|
2492
2635
|
disabled: busy,
|
|
@@ -2495,7 +2638,7 @@ function EditableText({ value, display, displayNode, placeholder, onCommit, mult
|
|
|
2495
2638
|
onBlur: () => void commit(),
|
|
2496
2639
|
className: fieldClass
|
|
2497
2640
|
}
|
|
2498
|
-
) : /* @__PURE__ */
|
|
2641
|
+
) : /* @__PURE__ */ jsx39(
|
|
2499
2642
|
Input2,
|
|
2500
2643
|
{
|
|
2501
2644
|
ref: fieldRef,
|
|
@@ -2509,7 +2652,7 @@ function EditableText({ value, display, displayNode, placeholder, onCommit, mult
|
|
|
2509
2652
|
}
|
|
2510
2653
|
);
|
|
2511
2654
|
}
|
|
2512
|
-
return /* @__PURE__ */
|
|
2655
|
+
return /* @__PURE__ */ jsx39(
|
|
2513
2656
|
"button",
|
|
2514
2657
|
{
|
|
2515
2658
|
type: "button",
|
|
@@ -2529,7 +2672,7 @@ function EditableText({ value, display, displayNode, placeholder, onCommit, mult
|
|
|
2529
2672
|
// src/ErrorBoundary.tsx
|
|
2530
2673
|
import { Component } from "react";
|
|
2531
2674
|
import { IconAlertTriangle as IconAlertTriangle2 } from "@tabler/icons-react";
|
|
2532
|
-
import { jsx as
|
|
2675
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
2533
2676
|
var ErrorBoundary = class extends Component {
|
|
2534
2677
|
state = { hasError: false };
|
|
2535
2678
|
static getDerivedStateFromError() {
|
|
@@ -2540,22 +2683,22 @@ var ErrorBoundary = class extends Component {
|
|
|
2540
2683
|
}
|
|
2541
2684
|
render() {
|
|
2542
2685
|
if (!this.state.hasError) return this.props.children;
|
|
2543
|
-
const message = /* @__PURE__ */
|
|
2686
|
+
const message = /* @__PURE__ */ jsx40(
|
|
2544
2687
|
EmptyState,
|
|
2545
2688
|
{
|
|
2546
|
-
icon: /* @__PURE__ */
|
|
2689
|
+
icon: /* @__PURE__ */ jsx40(IconAlertTriangle2, { size: 16, stroke: 1.5 }),
|
|
2547
2690
|
message: `Something went wrong${this.props.label ? ` in the ${this.props.label}` : ""}. Your data is safe \u2014 try again.`,
|
|
2548
2691
|
action: { label: "Try again", onClick: () => this.setState({ hasError: false }) }
|
|
2549
2692
|
}
|
|
2550
2693
|
);
|
|
2551
2694
|
if (this.props.frame) return this.props.frame(message);
|
|
2552
|
-
return this.props.fallbackClassName ? /* @__PURE__ */
|
|
2695
|
+
return this.props.fallbackClassName ? /* @__PURE__ */ jsx40("div", { className: this.props.fallbackClassName, children: message }) : message;
|
|
2553
2696
|
}
|
|
2554
2697
|
};
|
|
2555
2698
|
|
|
2556
2699
|
// src/ProgressBar.tsx
|
|
2557
2700
|
import { Progress } from "@base-ui/react/progress";
|
|
2558
|
-
import { jsx as
|
|
2701
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
2559
2702
|
var TRACK_CLASSES = {
|
|
2560
2703
|
default: "h-1.5 w-full overflow-hidden rounded-full bg-bg-inset",
|
|
2561
2704
|
// 4px, Katerina's ruling of 14 September; Peek's own bar is 3px until it takes this one.
|
|
@@ -2568,13 +2711,13 @@ var INDICATOR_CLASSES = {
|
|
|
2568
2711
|
function ProgressBar({ value, max, label, variant = "default", className }) {
|
|
2569
2712
|
return (
|
|
2570
2713
|
// `max={0}` needs no guard: Base UI reads the 0/0 share as an empty bar.
|
|
2571
|
-
/* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ jsx41(Progress.Root, { value, max, "aria-label": label, className, children: /* @__PURE__ */ jsx41(Progress.Track, { className: TRACK_CLASSES[variant], children: /* @__PURE__ */ jsx41(Progress.Indicator, { className: INDICATOR_CLASSES[variant] }) }) })
|
|
2572
2715
|
);
|
|
2573
2716
|
}
|
|
2574
2717
|
|
|
2575
2718
|
// src/Breadcrumb.tsx
|
|
2576
|
-
import { Fragment as
|
|
2577
|
-
import { jsx as
|
|
2719
|
+
import { Fragment as Fragment10, useCallback as useCallback2, useLayoutEffect as useLayoutEffect4, useRef as useRef8, useState as useState6 } from "react";
|
|
2720
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
2578
2721
|
function Breadcrumb({ items, className }) {
|
|
2579
2722
|
const navRef = useRef8(null);
|
|
2580
2723
|
const labelRefs = useRef8([]);
|
|
@@ -2594,7 +2737,7 @@ function Breadcrumb({ items, className }) {
|
|
|
2594
2737
|
observer.observe(nav);
|
|
2595
2738
|
return () => observer.disconnect();
|
|
2596
2739
|
}, [measure, items]);
|
|
2597
|
-
return /* @__PURE__ */
|
|
2740
|
+
return /* @__PURE__ */ jsx42("nav", { ref: navRef, "aria-label": "Breadcrumb", className: cn("flex min-w-0 items-center gap-1.5 text-body-2", className), children: items.map((item, index) => {
|
|
2598
2741
|
const last = index === items.length - 1;
|
|
2599
2742
|
const tone = item.muted || last && item.mono ? "text-text-muted" : last ? "text-text-primary" : "text-text-secondary";
|
|
2600
2743
|
const text = cn(
|
|
@@ -2615,27 +2758,27 @@ function Breadcrumb({ items, className }) {
|
|
|
2615
2758
|
// on a box around it, which the link takes them from, rather than
|
|
2616
2759
|
// pushed into it (UIG-9); the link is still the one element that
|
|
2617
2760
|
// truncates and is measured.
|
|
2618
|
-
/* @__PURE__ */
|
|
2619
|
-
) : /* @__PURE__ */
|
|
2620
|
-
return /* @__PURE__ */
|
|
2621
|
-
index > 0 && /* @__PURE__ */
|
|
2622
|
-
item.icon && /* @__PURE__ */
|
|
2761
|
+
/* @__PURE__ */ jsx42("span", { className: cn("flex min-w-0", item.mono && "shrink-0 font-mono text-caption", tone, "hover:text-text-primary"), children: /* @__PURE__ */ jsx42(Link, { ref: setLabelRef, variant: "plain", truncate: true, href: item.href, onClick: item.onClick, children: item.label }) })
|
|
2762
|
+
) : /* @__PURE__ */ jsx42("span", { ref: setLabelRef, className: text, "aria-current": last ? "page" : void 0, children: item.label });
|
|
2763
|
+
return /* @__PURE__ */ jsxs28(Fragment10, { children: [
|
|
2764
|
+
index > 0 && /* @__PURE__ */ jsx42("span", { "aria-hidden": "true", className: "shrink-0 text-text-muted", children: "/" }),
|
|
2765
|
+
item.icon && /* @__PURE__ */ jsx42("span", { "aria-hidden": "true", className: cn("flex shrink-0", tone), children: item.icon }),
|
|
2623
2766
|
truncated.has(index) ? (
|
|
2624
2767
|
// `min-w-0 shrink` undoes the wrapper's own shrink-0 — the crumb
|
|
2625
2768
|
// must keep truncating inside it, or wrapping it would widen the
|
|
2626
2769
|
// trail and the tooltip would never be needed again.
|
|
2627
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ jsx42(WithTooltip, { label: item.label, wrapperClassName: "min-w-0 shrink", children: crumb })
|
|
2628
2771
|
) : crumb
|
|
2629
2772
|
] }, `${item.label}-${index}`);
|
|
2630
2773
|
}) });
|
|
2631
2774
|
}
|
|
2632
2775
|
|
|
2633
2776
|
// src/NavItem.tsx
|
|
2634
|
-
import { jsx as
|
|
2777
|
+
import { jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
2635
2778
|
function NavItem({ label, href, count, countLabel, active = false, icon, className, ...props }) {
|
|
2636
2779
|
return (
|
|
2637
2780
|
// @estiva-escape(no-copied-look): N5 (Katerina, 24 September: record only): a row that fills on hover, as PersonTrigger's row also does
|
|
2638
|
-
/* @__PURE__ */
|
|
2781
|
+
/* @__PURE__ */ jsxs29(
|
|
2639
2782
|
"a",
|
|
2640
2783
|
{
|
|
2641
2784
|
href,
|
|
@@ -2650,9 +2793,9 @@ function NavItem({ label, href, count, countLabel, active = false, icon, classNa
|
|
|
2650
2793
|
),
|
|
2651
2794
|
...props,
|
|
2652
2795
|
children: [
|
|
2653
|
-
icon && /* @__PURE__ */
|
|
2654
|
-
/* @__PURE__ */
|
|
2655
|
-
count ? /* @__PURE__ */
|
|
2796
|
+
icon && /* @__PURE__ */ jsx43("span", { className: "flex shrink-0 items-center", children: icon }),
|
|
2797
|
+
/* @__PURE__ */ jsx43("span", { className: "flex-1 truncate", children: label }),
|
|
2798
|
+
count ? /* @__PURE__ */ jsx43(WithTooltip, { label: countLabel ?? `${count} open`, children: /* @__PURE__ */ jsx43("span", { className: "min-w-4 shrink-0 text-center font-mono text-caption tabular-nums text-text-muted", children: count }) }) : null
|
|
2656
2799
|
]
|
|
2657
2800
|
}
|
|
2658
2801
|
)
|
|
@@ -2662,7 +2805,7 @@ function NavItem({ label, href, count, countLabel, active = false, icon, classNa
|
|
|
2662
2805
|
// src/Popover.tsx
|
|
2663
2806
|
import { useMemo as useMemo3 } from "react";
|
|
2664
2807
|
import { Popover as BasePopover } from "@base-ui/react/popover";
|
|
2665
|
-
import { jsx as
|
|
2808
|
+
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2666
2809
|
var GAP5 = 4;
|
|
2667
2810
|
var VIEWPORT_PAD5 = 8;
|
|
2668
2811
|
function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpenChange, finalFocus, actionsRef, ariaLabel, children, className, contentClassName, maxHeight }) {
|
|
@@ -2671,7 +2814,7 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
2671
2814
|
if (anchor instanceof Element) return anchor;
|
|
2672
2815
|
return { getBoundingClientRect: () => anchor };
|
|
2673
2816
|
}, [anchor]);
|
|
2674
|
-
return /* @__PURE__ */
|
|
2817
|
+
return /* @__PURE__ */ jsxs30(
|
|
2675
2818
|
BasePopover.Root,
|
|
2676
2819
|
{
|
|
2677
2820
|
open,
|
|
@@ -2679,8 +2822,8 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
2679
2822
|
actionsRef,
|
|
2680
2823
|
modal: false,
|
|
2681
2824
|
children: [
|
|
2682
|
-
trigger && /* @__PURE__ */
|
|
2683
|
-
/* @__PURE__ */
|
|
2825
|
+
trigger && /* @__PURE__ */ jsx44(BasePopover.Trigger, { render: trigger, disabled: triggerDisabled(trigger) }),
|
|
2826
|
+
/* @__PURE__ */ jsx44(BasePopover.Portal, { children: /* @__PURE__ */ jsx44(
|
|
2684
2827
|
BasePopover.Positioner,
|
|
2685
2828
|
{
|
|
2686
2829
|
anchor: anchorTarget,
|
|
@@ -2689,20 +2832,20 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
2689
2832
|
sideOffset: GAP5,
|
|
2690
2833
|
collisionPadding: VIEWPORT_PAD5,
|
|
2691
2834
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
2692
|
-
children: /* @__PURE__ */
|
|
2835
|
+
children: /* @__PURE__ */ jsx44(
|
|
2693
2836
|
BasePopover.Popup,
|
|
2694
2837
|
{
|
|
2695
2838
|
"aria-label": ariaLabel,
|
|
2696
2839
|
initialFocus: trigger ? void 0 : false,
|
|
2697
2840
|
finalFocus,
|
|
2698
2841
|
className: cn("min-w-[180px] outline-none p-0", className),
|
|
2699
|
-
render: /* @__PURE__ */
|
|
2700
|
-
children: /* @__PURE__ */
|
|
2842
|
+
render: /* @__PURE__ */ jsx44(MenuPanel, {}),
|
|
2843
|
+
children: /* @__PURE__ */ jsx44(
|
|
2701
2844
|
ScrollArea,
|
|
2702
2845
|
{
|
|
2703
2846
|
viewportClassName: maxHeight ?? "max-h-[var(--available-height)]",
|
|
2704
2847
|
contentClassName: cn("flex flex-col p-2", contentClassName),
|
|
2705
|
-
children: /* @__PURE__ */
|
|
2848
|
+
children: /* @__PURE__ */ jsx44(DividerInPanel.Provider, { value: true, children })
|
|
2706
2849
|
}
|
|
2707
2850
|
)
|
|
2708
2851
|
}
|
|
@@ -2716,9 +2859,9 @@ function Popover({ trigger, anchor, align = "left", side = "bottom", open, onOpe
|
|
|
2716
2859
|
|
|
2717
2860
|
// src/Toolbar.tsx
|
|
2718
2861
|
import { Toolbar as BaseToolbar } from "@base-ui/react/toolbar";
|
|
2719
|
-
import { jsx as
|
|
2862
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
2720
2863
|
function Toolbar({ "aria-label": ariaLabel, orientation = "horizontal", loopFocus = true, surface = true, children, className }) {
|
|
2721
|
-
const strip = /* @__PURE__ */
|
|
2864
|
+
const strip = /* @__PURE__ */ jsx45(
|
|
2722
2865
|
BaseToolbar.Root,
|
|
2723
2866
|
{
|
|
2724
2867
|
"aria-label": ariaLabel,
|
|
@@ -2729,27 +2872,27 @@ function Toolbar({ "aria-label": ariaLabel, orientation = "horizontal", loopFocu
|
|
|
2729
2872
|
}
|
|
2730
2873
|
);
|
|
2731
2874
|
if (!surface) return strip;
|
|
2732
|
-
return /* @__PURE__ */
|
|
2875
|
+
return /* @__PURE__ */ jsx45(MenuPanel, { className: "w-fit p-1", children: strip });
|
|
2733
2876
|
}
|
|
2734
2877
|
function ToolbarButton({ ref, disabled, disabledReason, ...props }) {
|
|
2735
|
-
return /* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ jsx45(
|
|
2736
2879
|
BaseToolbar.Button,
|
|
2737
2880
|
{
|
|
2738
2881
|
ref,
|
|
2739
2882
|
disabled: disabled || !!disabledReason,
|
|
2740
2883
|
focusableWhenDisabled: true,
|
|
2741
|
-
render: /* @__PURE__ */
|
|
2884
|
+
render: /* @__PURE__ */ jsx45(IconButton, { disabled, disabledReason, ...props })
|
|
2742
2885
|
}
|
|
2743
2886
|
);
|
|
2744
2887
|
}
|
|
2745
2888
|
function ToolbarLink({ ref, href, ...props }) {
|
|
2746
|
-
return /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ jsx45(BaseToolbar.Link, { ref, render: /* @__PURE__ */ jsx45(IconButton, { href, ...props }) });
|
|
2747
2890
|
}
|
|
2748
2891
|
function ToolbarInput({ size, ...props }) {
|
|
2749
|
-
return /* @__PURE__ */
|
|
2892
|
+
return /* @__PURE__ */ jsx45(BaseToolbar.Input, { render: /* @__PURE__ */ jsx45(TextInput, { size }), ...props });
|
|
2750
2893
|
}
|
|
2751
2894
|
function ToolbarSeparator({ className }) {
|
|
2752
|
-
return /* @__PURE__ */
|
|
2895
|
+
return /* @__PURE__ */ jsx45(
|
|
2753
2896
|
BaseToolbar.Separator,
|
|
2754
2897
|
{
|
|
2755
2898
|
orientation: "vertical",
|
|
@@ -2759,9 +2902,9 @@ function ToolbarSeparator({ className }) {
|
|
|
2759
2902
|
}
|
|
2760
2903
|
|
|
2761
2904
|
// src/ReactionPicker.tsx
|
|
2762
|
-
import { jsx as
|
|
2905
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
2763
2906
|
function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reactions", surface = true, className }) {
|
|
2764
|
-
return /* @__PURE__ */
|
|
2907
|
+
return /* @__PURE__ */ jsx46(Toolbar, { "aria-label": ariaLabel, surface, className: cn("gap-0.5", className), children: options.map((option) => (
|
|
2765
2908
|
/*
|
|
2766
2909
|
A `ToolbarButton`, not a button in a tooltip wrapper. The wrapper
|
|
2767
2910
|
would become the toolbar's item and the button inside it would never
|
|
@@ -2771,14 +2914,14 @@ function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reaction
|
|
|
2771
2914
|
The tooltip names it for a pointer, `aria-label` for everything else,
|
|
2772
2915
|
and both say the meaning rather than the glyph.
|
|
2773
2916
|
*/
|
|
2774
|
-
/* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ jsx46(
|
|
2775
2918
|
ToolbarButton,
|
|
2776
2919
|
{
|
|
2777
2920
|
"aria-label": option.label,
|
|
2778
2921
|
tooltip: option.label,
|
|
2779
2922
|
onClick: () => onSelect(option.emoji),
|
|
2780
2923
|
className: "size-7",
|
|
2781
|
-
children: /* @__PURE__ */
|
|
2924
|
+
children: /* @__PURE__ */ jsx46("span", { "aria-hidden": "true", className: "text-h3 leading-none", children: option.emoji })
|
|
2782
2925
|
},
|
|
2783
2926
|
option.emoji
|
|
2784
2927
|
)
|
|
@@ -2787,23 +2930,23 @@ function ReactionPicker({ options, onSelect, "aria-label": ariaLabel = "Reaction
|
|
|
2787
2930
|
|
|
2788
2931
|
// src/PreviewCard.tsx
|
|
2789
2932
|
import { PreviewCard as BasePreviewCard } from "@base-ui/react/preview-card";
|
|
2790
|
-
import { jsx as
|
|
2933
|
+
import { jsx as jsx47, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2791
2934
|
var GAP6 = 12;
|
|
2792
2935
|
var VIEWPORT_PAD6 = 8;
|
|
2793
2936
|
var OPEN_DELAY2 = 350;
|
|
2794
2937
|
var CLOSE_DELAY = 200;
|
|
2795
2938
|
function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, closeDelay = CLOSE_DELAY, className, contentClassName, wrapperClassName }) {
|
|
2796
|
-
return /* @__PURE__ */
|
|
2797
|
-
/* @__PURE__ */
|
|
2939
|
+
return /* @__PURE__ */ jsxs31(BasePreviewCard.Root, { children: [
|
|
2940
|
+
/* @__PURE__ */ jsx47(
|
|
2798
2941
|
BasePreviewCard.Trigger,
|
|
2799
2942
|
{
|
|
2800
2943
|
delay,
|
|
2801
2944
|
closeDelay,
|
|
2802
|
-
render: /* @__PURE__ */
|
|
2945
|
+
render: /* @__PURE__ */ jsx47("span", { className: cn("inline-flex", wrapperClassName) }),
|
|
2803
2946
|
children
|
|
2804
2947
|
}
|
|
2805
2948
|
),
|
|
2806
|
-
/* @__PURE__ */
|
|
2949
|
+
/* @__PURE__ */ jsx47(BasePreviewCard.Portal, { children: /* @__PURE__ */ jsx47(
|
|
2807
2950
|
BasePreviewCard.Positioner,
|
|
2808
2951
|
{
|
|
2809
2952
|
side,
|
|
@@ -2811,12 +2954,12 @@ function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, c
|
|
|
2811
2954
|
sideOffset: GAP6,
|
|
2812
2955
|
collisionPadding: VIEWPORT_PAD6,
|
|
2813
2956
|
className: "z-50 data-[anchor-hidden]:hidden",
|
|
2814
|
-
children: /* @__PURE__ */
|
|
2957
|
+
children: /* @__PURE__ */ jsx47(
|
|
2815
2958
|
BasePreviewCard.Popup,
|
|
2816
2959
|
{
|
|
2817
2960
|
className: cn("w-[360px] p-0 outline-none", className),
|
|
2818
|
-
render: /* @__PURE__ */
|
|
2819
|
-
children: /* @__PURE__ */
|
|
2961
|
+
render: /* @__PURE__ */ jsx47(MenuPanel, {}),
|
|
2962
|
+
children: /* @__PURE__ */ jsx47(ScrollArea, { viewportClassName: "max-h-[min(300px,var(--available-height))]", contentClassName: cn("flex flex-col gap-3 p-3", contentClassName), children: content })
|
|
2820
2963
|
}
|
|
2821
2964
|
)
|
|
2822
2965
|
}
|
|
@@ -2825,15 +2968,15 @@ function PreviewCard({ content, children, side = "right", delay = OPEN_DELAY2, c
|
|
|
2825
2968
|
}
|
|
2826
2969
|
|
|
2827
2970
|
// src/Rail.tsx
|
|
2828
|
-
import { jsx as
|
|
2971
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
2829
2972
|
function Rail({ "aria-label": ariaLabel = "Navigation", children, className }) {
|
|
2830
|
-
return /* @__PURE__ */
|
|
2973
|
+
return /* @__PURE__ */ jsx48("nav", { "aria-label": ariaLabel, className: cn("flex w-16 shrink-0 flex-col items-start gap-2 px-2 py-3", className), children });
|
|
2831
2974
|
}
|
|
2832
2975
|
|
|
2833
2976
|
// src/RailItem.tsx
|
|
2834
|
-
import { jsx as
|
|
2977
|
+
import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2835
2978
|
function RailItem({ href, icon, label, active = false, className, ...props }) {
|
|
2836
|
-
return /* @__PURE__ */
|
|
2979
|
+
return /* @__PURE__ */ jsxs32(
|
|
2837
2980
|
"a",
|
|
2838
2981
|
{
|
|
2839
2982
|
href,
|
|
@@ -2841,14 +2984,14 @@ function RailItem({ href, icon, label, active = false, className, ...props }) {
|
|
|
2841
2984
|
className: cn("group flex h-12 w-full shrink-0 flex-col items-center gap-0.5 px-2 py-0.5", className),
|
|
2842
2985
|
...props,
|
|
2843
2986
|
children: [
|
|
2844
|
-
/* @__PURE__ */
|
|
2987
|
+
/* @__PURE__ */ jsx49(
|
|
2845
2988
|
"div",
|
|
2846
2989
|
{
|
|
2847
2990
|
className: cn(
|
|
2848
2991
|
"flex items-center justify-center rounded-lg p-2 transition-colors",
|
|
2849
2992
|
active ? "bg-bg-selected" : "group-hover:bg-bg-hover"
|
|
2850
2993
|
),
|
|
2851
|
-
children: /* @__PURE__ */
|
|
2994
|
+
children: /* @__PURE__ */ jsx49(
|
|
2852
2995
|
"span",
|
|
2853
2996
|
{
|
|
2854
2997
|
className: cn(
|
|
@@ -2860,14 +3003,14 @@ function RailItem({ href, icon, label, active = false, className, ...props }) {
|
|
|
2860
3003
|
)
|
|
2861
3004
|
}
|
|
2862
3005
|
),
|
|
2863
|
-
/* @__PURE__ */
|
|
3006
|
+
/* @__PURE__ */ jsx49("span", { className: cn("text-center text-menu", active ? "text-text-primary" : "text-text-secondary"), children: label })
|
|
2864
3007
|
]
|
|
2865
3008
|
}
|
|
2866
3009
|
);
|
|
2867
3010
|
}
|
|
2868
3011
|
|
|
2869
3012
|
// src/Property.tsx
|
|
2870
|
-
import { jsx as
|
|
3013
|
+
import { jsx as jsx50, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2871
3014
|
var VALUE_CLASSES = "contents";
|
|
2872
3015
|
function Property({ label, layout = "row", children, className }) {
|
|
2873
3016
|
if (layout === "stacked") {
|
|
@@ -2875,25 +3018,25 @@ function Property({ label, layout = "row", children, className }) {
|
|
|
2875
3018
|
// gap-3 — the one label-above-content distance (Katerina, 2026-09-01):
|
|
2876
3019
|
// Peek's topic-details sections already sit at 12px, Ship's rail was
|
|
2877
3020
|
// 6px, and unifying means the bigger, calmer one.
|
|
2878
|
-
/* @__PURE__ */
|
|
2879
|
-
/* @__PURE__ */
|
|
2880
|
-
/* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ jsxs33("dl", { className: cn("flex flex-col gap-3", className), children: [
|
|
3022
|
+
/* @__PURE__ */ jsx50("dt", { className: "text-menu uppercase tracking-widest text-text-secondary", children: label }),
|
|
3023
|
+
/* @__PURE__ */ jsx50("dd", { className: VALUE_CLASSES, children })
|
|
2881
3024
|
] })
|
|
2882
3025
|
);
|
|
2883
3026
|
}
|
|
2884
|
-
return /* @__PURE__ */
|
|
2885
|
-
/* @__PURE__ */
|
|
2886
|
-
/* @__PURE__ */
|
|
3027
|
+
return /* @__PURE__ */ jsxs33("dl", { className: cn("flex items-center gap-2", className), children: [
|
|
3028
|
+
/* @__PURE__ */ jsx50("dt", { className: "w-[68px] shrink-0 text-caption text-text-secondary", children: label }),
|
|
3029
|
+
/* @__PURE__ */ jsx50("dd", { className: VALUE_CLASSES, children })
|
|
2887
3030
|
] });
|
|
2888
3031
|
}
|
|
2889
3032
|
|
|
2890
3033
|
// src/Reaction.tsx
|
|
2891
3034
|
import { Toggle } from "@base-ui/react/toggle";
|
|
2892
|
-
import { jsx as
|
|
3035
|
+
import { jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2893
3036
|
function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
2894
3037
|
return (
|
|
2895
3038
|
// @estiva-escape(no-copied-look): W1 (Katerina, 24 September: leave alone): a reaction pill shares four words with a field's box by coincidence
|
|
2896
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ jsxs34(
|
|
2897
3040
|
Toggle,
|
|
2898
3041
|
{
|
|
2899
3042
|
pressed,
|
|
@@ -2915,8 +3058,8 @@ function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
|
2915
3058
|
),
|
|
2916
3059
|
...props,
|
|
2917
3060
|
children: [
|
|
2918
|
-
/* @__PURE__ */
|
|
2919
|
-
/* @__PURE__ */
|
|
3061
|
+
/* @__PURE__ */ jsx51("span", { "aria-hidden": "true", className: "shrink-0 text-body-1 leading-none", children: emoji }),
|
|
3062
|
+
/* @__PURE__ */ jsx51("span", { className: CHIP_TEXT_CLASSES, children: count })
|
|
2920
3063
|
]
|
|
2921
3064
|
}
|
|
2922
3065
|
)
|
|
@@ -2926,9 +3069,9 @@ function Reaction({ emoji, count, pressed = false, className, ...props }) {
|
|
|
2926
3069
|
// src/SearchInput.tsx
|
|
2927
3070
|
import "react";
|
|
2928
3071
|
import { Input as Input3 } from "@base-ui/react/input";
|
|
2929
|
-
import { jsx as
|
|
3072
|
+
import { jsx as jsx52, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2930
3073
|
function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...props }) {
|
|
2931
|
-
return /* @__PURE__ */
|
|
3074
|
+
return /* @__PURE__ */ jsxs35(
|
|
2932
3075
|
"div",
|
|
2933
3076
|
{
|
|
2934
3077
|
className: cn(
|
|
@@ -2940,7 +3083,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
2940
3083
|
className
|
|
2941
3084
|
),
|
|
2942
3085
|
children: [
|
|
2943
|
-
/* @__PURE__ */
|
|
3086
|
+
/* @__PURE__ */ jsx52(
|
|
2944
3087
|
Input3,
|
|
2945
3088
|
{
|
|
2946
3089
|
className: cn("flex-1 min-w-0 text-input-value", BARE_INPUT_CLASSES),
|
|
@@ -2948,7 +3091,7 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
2948
3091
|
...props
|
|
2949
3092
|
}
|
|
2950
3093
|
),
|
|
2951
|
-
shortcut && /* @__PURE__ */
|
|
3094
|
+
shortcut && /* @__PURE__ */ jsx52(Kbd, { children: shortcut })
|
|
2952
3095
|
]
|
|
2953
3096
|
}
|
|
2954
3097
|
);
|
|
@@ -2957,17 +3100,17 @@ function SearchInput({ shortcut, className, placeholder = "Search\u2026", ...pro
|
|
|
2957
3100
|
// src/SectionHeader.tsx
|
|
2958
3101
|
import { IconChevronRight as IconChevronRight2 } from "@tabler/icons-react";
|
|
2959
3102
|
import { useRender } from "@base-ui/react/use-render";
|
|
2960
|
-
import { Fragment as
|
|
3103
|
+
import { Fragment as Fragment11, jsx as jsx53, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2961
3104
|
function SectionHeader({ title, chevron = false, isExpanded = true, onToggle, trailing, actions, showActions = "hover", hover = "fill", render, className }) {
|
|
2962
3105
|
const titleElement = useRender({
|
|
2963
|
-
render: render ?? (chevron ? /* @__PURE__ */
|
|
3106
|
+
render: render ?? (chevron ? /* @__PURE__ */ jsx53("button", { type: "button", onClick: onToggle, "aria-expanded": isExpanded }) : /* @__PURE__ */ jsx53("span", {})),
|
|
2964
3107
|
props: {
|
|
2965
3108
|
// `text-left`: a button centres its text. `h-full` and `flex-1`: the
|
|
2966
3109
|
// whole row up to the actions is the hit target, as it was when the
|
|
2967
3110
|
// row itself carried the click.
|
|
2968
3111
|
className: "flex h-full min-w-0 flex-1 items-center gap-1 text-left",
|
|
2969
|
-
children: /* @__PURE__ */
|
|
2970
|
-
chevron && /* @__PURE__ */
|
|
3112
|
+
children: /* @__PURE__ */ jsxs36(Fragment11, { children: [
|
|
3113
|
+
chevron && /* @__PURE__ */ jsx53(
|
|
2971
3114
|
IconChevronRight2,
|
|
2972
3115
|
{
|
|
2973
3116
|
size: 12,
|
|
@@ -2975,11 +3118,11 @@ function SectionHeader({ title, chevron = false, isExpanded = true, onToggle, tr
|
|
|
2975
3118
|
className: cn("shrink-0 text-text-secondary transition-transform duration-150", isExpanded && "rotate-90")
|
|
2976
3119
|
}
|
|
2977
3120
|
),
|
|
2978
|
-
/* @__PURE__ */
|
|
3121
|
+
/* @__PURE__ */ jsx53(SectionLabel, { children: title })
|
|
2979
3122
|
] })
|
|
2980
3123
|
}
|
|
2981
3124
|
});
|
|
2982
|
-
return /* @__PURE__ */
|
|
3125
|
+
return /* @__PURE__ */ jsxs36(
|
|
2983
3126
|
"div",
|
|
2984
3127
|
{
|
|
2985
3128
|
className: cn(
|
|
@@ -2992,15 +3135,15 @@ function SectionHeader({ title, chevron = false, isExpanded = true, onToggle, tr
|
|
|
2992
3135
|
),
|
|
2993
3136
|
children: [
|
|
2994
3137
|
titleElement,
|
|
2995
|
-
trailing != null && /* @__PURE__ */
|
|
2996
|
-
actions && actions.length > 0 && /* @__PURE__ */
|
|
3138
|
+
trailing != null && /* @__PURE__ */ jsx53("div", { className: "flex shrink-0 items-center", children: trailing }),
|
|
3139
|
+
actions && actions.length > 0 && /* @__PURE__ */ jsx53(
|
|
2997
3140
|
"div",
|
|
2998
3141
|
{
|
|
2999
3142
|
className: cn(
|
|
3000
3143
|
"-mr-1 flex shrink-0 items-center gap-1",
|
|
3001
3144
|
showActions === "hover" && "opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100"
|
|
3002
3145
|
),
|
|
3003
|
-
children: actions.map((action) => /* @__PURE__ */
|
|
3146
|
+
children: actions.map((action) => /* @__PURE__ */ jsx53(IconButton, { tooltip: action.tooltip, "aria-label": action.tooltip, onClick: action.onClick, children: action.icon }, action.tooltip))
|
|
3004
3147
|
}
|
|
3005
3148
|
)
|
|
3006
3149
|
]
|
|
@@ -3009,35 +3152,35 @@ function SectionHeader({ title, chevron = false, isExpanded = true, onToggle, tr
|
|
|
3009
3152
|
}
|
|
3010
3153
|
|
|
3011
3154
|
// src/Panel.tsx
|
|
3012
|
-
import { jsx as
|
|
3155
|
+
import { jsx as jsx54, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3013
3156
|
function Frame({ title, chevron = false, actions, children, footer, bodyClassName, bodyRef, onBodyScroll, className, broken = false }) {
|
|
3014
|
-
return /* @__PURE__ */
|
|
3015
|
-
/* @__PURE__ */
|
|
3157
|
+
return /* @__PURE__ */ jsxs37("div", { className: cn("flex h-full min-h-0 flex-1 flex-col", className), children: [
|
|
3158
|
+
/* @__PURE__ */ jsx54(ContainerHeader, { title, chevron, actions }),
|
|
3016
3159
|
broken ? (
|
|
3017
3160
|
// The message takes the room the body had and centres itself in it.
|
|
3018
|
-
/* @__PURE__ */
|
|
3019
|
-
) : /* @__PURE__ */
|
|
3020
|
-
!broken && footer && /* @__PURE__ */
|
|
3161
|
+
/* @__PURE__ */ jsx54("div", { className: "flex min-h-0 flex-1 flex-col px-4", children })
|
|
3162
|
+
) : /* @__PURE__ */ jsx54(ScrollArea, { className: "min-h-0 flex-1", contentClassName: bodyClassName, viewportRef: bodyRef, onScroll: onBodyScroll, children }),
|
|
3163
|
+
!broken && footer && /* @__PURE__ */ jsx54("div", { className: "shrink-0", children: footer })
|
|
3021
3164
|
] });
|
|
3022
3165
|
}
|
|
3023
3166
|
function Panel(props) {
|
|
3024
|
-
return /* @__PURE__ */
|
|
3167
|
+
return /* @__PURE__ */ jsx54(
|
|
3025
3168
|
ErrorBoundary,
|
|
3026
3169
|
{
|
|
3027
3170
|
label: "panel",
|
|
3028
3171
|
frame: (message) => (
|
|
3029
3172
|
// Only the name comes back with the message: the actions and the footer may be what threw.
|
|
3030
|
-
/* @__PURE__ */
|
|
3173
|
+
/* @__PURE__ */ jsx54(Frame, { title: props.title, chevron: props.chevron, className: props.className, broken: true, children: message })
|
|
3031
3174
|
),
|
|
3032
|
-
children: /* @__PURE__ */
|
|
3175
|
+
children: /* @__PURE__ */ jsx54(Frame, { ...props })
|
|
3033
3176
|
}
|
|
3034
3177
|
);
|
|
3035
3178
|
}
|
|
3036
3179
|
|
|
3037
3180
|
// src/ListColumn.tsx
|
|
3038
|
-
import { jsx as
|
|
3181
|
+
import { jsx as jsx55, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3039
3182
|
function Column({ title, chevron = false, actions, above, collapsed = false, children, className, broken = false }) {
|
|
3040
|
-
return /* @__PURE__ */
|
|
3183
|
+
return /* @__PURE__ */ jsxs38(
|
|
3041
3184
|
"div",
|
|
3042
3185
|
{
|
|
3043
3186
|
className: cn(
|
|
@@ -3048,26 +3191,26 @@ function Column({ title, chevron = false, actions, above, collapsed = false, chi
|
|
|
3048
3191
|
),
|
|
3049
3192
|
"data-collapsed": collapsed || void 0,
|
|
3050
3193
|
children: [
|
|
3051
|
-
/* @__PURE__ */
|
|
3194
|
+
/* @__PURE__ */ jsx55(ContainerHeader, { title, chevron, actions }),
|
|
3052
3195
|
above,
|
|
3053
3196
|
broken ? (
|
|
3054
3197
|
// The message takes the room the list had and centres itself in it (Katerina, 19 September).
|
|
3055
|
-
/* @__PURE__ */
|
|
3056
|
-
) : /* @__PURE__ */
|
|
3198
|
+
/* @__PURE__ */ jsx55("div", { className: "flex min-h-0 flex-1 flex-col px-3", children })
|
|
3199
|
+
) : /* @__PURE__ */ jsx55(ScrollArea, { className: "flex-1", contentClassName: "flex flex-col gap-0.5 px-3 pt-4 pb-3", children })
|
|
3057
3200
|
]
|
|
3058
3201
|
}
|
|
3059
3202
|
);
|
|
3060
3203
|
}
|
|
3061
3204
|
function ListColumn(props) {
|
|
3062
|
-
return /* @__PURE__ */
|
|
3205
|
+
return /* @__PURE__ */ jsx55(
|
|
3063
3206
|
ErrorBoundary,
|
|
3064
3207
|
{
|
|
3065
3208
|
label: "list panel",
|
|
3066
3209
|
frame: (message) => (
|
|
3067
3210
|
// Only the name comes back with the message: the actions and the row above may be what threw.
|
|
3068
|
-
/* @__PURE__ */
|
|
3211
|
+
/* @__PURE__ */ jsx55(Column, { title: props.title, chevron: props.chevron, collapsed: props.collapsed, className: props.className, broken: true, children: message })
|
|
3069
3212
|
),
|
|
3070
|
-
children: /* @__PURE__ */
|
|
3213
|
+
children: /* @__PURE__ */ jsx55(Column, { ...props })
|
|
3071
3214
|
}
|
|
3072
3215
|
);
|
|
3073
3216
|
}
|
|
@@ -3075,7 +3218,7 @@ function ListColumn(props) {
|
|
|
3075
3218
|
// src/CollapsibleSection.tsx
|
|
3076
3219
|
import { useState as useState7 } from "react";
|
|
3077
3220
|
import { Collapsible } from "@base-ui/react/collapsible";
|
|
3078
|
-
import { jsx as
|
|
3221
|
+
import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3079
3222
|
var OPEN = "open";
|
|
3080
3223
|
var CLOSED = "closed";
|
|
3081
3224
|
function readStored(key) {
|
|
@@ -3102,14 +3245,14 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
3102
3245
|
writeStored(storageKey, next);
|
|
3103
3246
|
onOpenChange?.(next);
|
|
3104
3247
|
};
|
|
3105
|
-
return /* @__PURE__ */
|
|
3106
|
-
/* @__PURE__ */
|
|
3107
|
-
/* @__PURE__ */
|
|
3248
|
+
return /* @__PURE__ */ jsxs39(Collapsible.Root, { open, onOpenChange: setOpen, className: cn("flex flex-col", className), children: [
|
|
3249
|
+
/* @__PURE__ */ jsx56(SectionHeader, { title, chevron: true, isExpanded: open, trailing, actions, showActions, className: "shrink-0", render: /* @__PURE__ */ jsx56(Collapsible.Trigger, {}) }),
|
|
3250
|
+
/* @__PURE__ */ jsx56(
|
|
3108
3251
|
Collapsible.Panel,
|
|
3109
3252
|
{
|
|
3110
3253
|
hiddenUntilFound: true,
|
|
3111
3254
|
className: "h-[var(--collapsible-panel-height)] overflow-hidden transition-[height] duration-150 ease-out motion-reduce:transition-none data-[starting-style]:h-0 data-[ending-style]:h-0",
|
|
3112
|
-
children: /* @__PURE__ */
|
|
3255
|
+
children: /* @__PURE__ */ jsx56("div", { className: cn("flex flex-col", contentClassName), children })
|
|
3113
3256
|
}
|
|
3114
3257
|
)
|
|
3115
3258
|
] });
|
|
@@ -3117,9 +3260,9 @@ function CollapsibleSection({ title, defaultOpen = true, open: openProp, onOpenC
|
|
|
3117
3260
|
|
|
3118
3261
|
// src/Tabs.tsx
|
|
3119
3262
|
import { Tabs as BaseTabs } from "@base-ui/react/tabs";
|
|
3120
|
-
import { jsx as
|
|
3263
|
+
import { jsx as jsx57, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3121
3264
|
function Tabs({ tabs, active, onChange, size = "default", className, ...aria }) {
|
|
3122
|
-
return /* @__PURE__ */
|
|
3265
|
+
return /* @__PURE__ */ jsx57(
|
|
3123
3266
|
BaseTabs.Root,
|
|
3124
3267
|
{
|
|
3125
3268
|
value: active,
|
|
@@ -3127,14 +3270,14 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
3127
3270
|
if (details.reason === "none") onChange(value);
|
|
3128
3271
|
},
|
|
3129
3272
|
className,
|
|
3130
|
-
children: /* @__PURE__ */
|
|
3273
|
+
children: /* @__PURE__ */ jsx57(
|
|
3131
3274
|
BaseTabs.List,
|
|
3132
3275
|
{
|
|
3133
3276
|
activateOnFocus: true,
|
|
3134
3277
|
"aria-label": aria["aria-label"],
|
|
3135
3278
|
"aria-labelledby": aria["aria-labelledby"],
|
|
3136
3279
|
className: "flex items-center gap-2",
|
|
3137
|
-
children: tabs.map((tab) => /* @__PURE__ */
|
|
3280
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsxs40(
|
|
3138
3281
|
BaseTabs.Tab,
|
|
3139
3282
|
{
|
|
3140
3283
|
value: tab.id,
|
|
@@ -3147,9 +3290,9 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
3147
3290
|
),
|
|
3148
3291
|
children: [
|
|
3149
3292
|
tab.icon,
|
|
3150
|
-
/* @__PURE__ */
|
|
3293
|
+
/* @__PURE__ */ jsxs40("span", { className: "flex items-baseline", children: [
|
|
3151
3294
|
tab.label,
|
|
3152
|
-
tab.count !== void 0 ? /* @__PURE__ */
|
|
3295
|
+
tab.count !== void 0 ? /* @__PURE__ */ jsx57("span", { className: "ml-2.5 font-mono text-caption tabular-nums text-text-secondary", children: tab.count }) : null
|
|
3153
3296
|
] })
|
|
3154
3297
|
]
|
|
3155
3298
|
},
|
|
@@ -3165,7 +3308,7 @@ function Tabs({ tabs, active, onChange, size = "default", className, ...aria })
|
|
|
3165
3308
|
import { createContext as createContext6, useContext as useContext6, useMemo as useMemo4 } from "react";
|
|
3166
3309
|
import { Toast as BaseToast } from "@base-ui/react/toast";
|
|
3167
3310
|
import { IconAlertCircle as IconAlertCircle2, IconCircleCheck, IconCircleX } from "@tabler/icons-react";
|
|
3168
|
-
import { jsx as
|
|
3311
|
+
import { jsx as jsx58, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
3169
3312
|
var SURFACE_STYLES = {
|
|
3170
3313
|
success: "bg-success-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md leaf:bg-bg-inset leaf:border leaf:border-border-default leaf:shadow-md",
|
|
3171
3314
|
brand: "bg-accent-muted signal:bg-bg-inset signal:border signal:border-border-default signal:shadow-md leaf:bg-bg-inset leaf:border leaf:border-border-default leaf:shadow-md",
|
|
@@ -3201,16 +3344,16 @@ var pillClassName = (type, hasAction, className) => cn(
|
|
|
3201
3344
|
);
|
|
3202
3345
|
function LeadingIcon({ type }) {
|
|
3203
3346
|
const Icon = ICONS[type];
|
|
3204
|
-
return /* @__PURE__ */
|
|
3347
|
+
return /* @__PURE__ */ jsx58(Icon, { size: 16, stroke: 1.5, className: cn("text-text-primary shrink-0", ICON_STYLES[type]) });
|
|
3205
3348
|
}
|
|
3206
3349
|
function Toast({ label, type = "neutral", leadingIcon = true, actionLabel, onAction, className }) {
|
|
3207
3350
|
const hasAction = !!(actionLabel && onAction);
|
|
3208
|
-
return /* @__PURE__ */
|
|
3209
|
-
/* @__PURE__ */
|
|
3210
|
-
leadingIcon && /* @__PURE__ */
|
|
3211
|
-
/* @__PURE__ */
|
|
3351
|
+
return /* @__PURE__ */ jsxs41("div", { className: pillClassName(type, hasAction, className), children: [
|
|
3352
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
3353
|
+
leadingIcon && /* @__PURE__ */ jsx58(LeadingIcon, { type }),
|
|
3354
|
+
/* @__PURE__ */ jsx58("span", { className: LABEL_CLASSES, children: label })
|
|
3212
3355
|
] }),
|
|
3213
|
-
hasAction && /* @__PURE__ */
|
|
3356
|
+
hasAction && /* @__PURE__ */ jsx58(Button, { variant: "outlined", size: "small", onClick: onAction, children: actionLabel })
|
|
3214
3357
|
] });
|
|
3215
3358
|
}
|
|
3216
3359
|
var ToastContext = createContext6(null);
|
|
@@ -3231,9 +3374,9 @@ function ToastProvider({ children }) {
|
|
|
3231
3374
|
}),
|
|
3232
3375
|
[manager]
|
|
3233
3376
|
);
|
|
3234
|
-
return /* @__PURE__ */
|
|
3377
|
+
return /* @__PURE__ */ jsx58(ToastContext.Provider, { value, children: /* @__PURE__ */ jsxs41(BaseToast.Provider, { toastManager: manager, limit: VISIBLE_TOASTS, children: [
|
|
3235
3378
|
children,
|
|
3236
|
-
/* @__PURE__ */
|
|
3379
|
+
/* @__PURE__ */ jsx58(BaseToast.Portal, { children: /* @__PURE__ */ jsx58(BaseToast.Viewport, { className: "fixed bottom-4 left-4 z-[100] flex flex-col-reverse items-start gap-2 pointer-events-none", children: /* @__PURE__ */ jsx58(ToastList, {}) }) })
|
|
3237
3380
|
] }) });
|
|
3238
3381
|
}
|
|
3239
3382
|
function ToastList() {
|
|
@@ -3241,25 +3384,25 @@ function ToastList() {
|
|
|
3241
3384
|
return toasts.map((toast) => {
|
|
3242
3385
|
const type = toast.type ?? "neutral";
|
|
3243
3386
|
const { leadingIcon = true, actionLabel, onAction } = toast.data ?? {};
|
|
3244
|
-
return /* @__PURE__ */
|
|
3387
|
+
return /* @__PURE__ */ jsxs41(
|
|
3245
3388
|
BaseToast.Root,
|
|
3246
3389
|
{
|
|
3247
3390
|
toast,
|
|
3248
3391
|
swipeDirection: ["left", "down"],
|
|
3249
3392
|
className: pillClassName(type, !!actionLabel, "pointer-events-auto data-[limited]:hidden"),
|
|
3250
3393
|
children: [
|
|
3251
|
-
/* @__PURE__ */
|
|
3252
|
-
leadingIcon && /* @__PURE__ */
|
|
3253
|
-
/* @__PURE__ */
|
|
3394
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
3395
|
+
leadingIcon && /* @__PURE__ */ jsx58(LeadingIcon, { type }),
|
|
3396
|
+
/* @__PURE__ */ jsx58(BaseToast.Title, { render: /* @__PURE__ */ jsx58("span", {}), className: LABEL_CLASSES })
|
|
3254
3397
|
] }),
|
|
3255
|
-
actionLabel && /* @__PURE__ */
|
|
3398
|
+
actionLabel && /* @__PURE__ */ jsx58(
|
|
3256
3399
|
BaseToast.Action,
|
|
3257
3400
|
{
|
|
3258
3401
|
onClick: () => {
|
|
3259
3402
|
onAction?.();
|
|
3260
3403
|
close(toast.id);
|
|
3261
3404
|
},
|
|
3262
|
-
render: /* @__PURE__ */
|
|
3405
|
+
render: /* @__PURE__ */ jsx58(Button, { variant: "outlined", size: "small", children: actionLabel })
|
|
3263
3406
|
}
|
|
3264
3407
|
)
|
|
3265
3408
|
]
|
|
@@ -3334,6 +3477,7 @@ export {
|
|
|
3334
3477
|
RailItem,
|
|
3335
3478
|
Reaction,
|
|
3336
3479
|
ReactionPicker,
|
|
3480
|
+
RichText,
|
|
3337
3481
|
ScrollArea,
|
|
3338
3482
|
SearchInput,
|
|
3339
3483
|
SectionHeader,
|
|
@@ -3361,6 +3505,7 @@ export {
|
|
|
3361
3505
|
hueFor,
|
|
3362
3506
|
initialsFor,
|
|
3363
3507
|
inlineChipClassName,
|
|
3508
|
+
richTextClassName,
|
|
3364
3509
|
useToast
|
|
3365
3510
|
};
|
|
3366
3511
|
//# sourceMappingURL=index.js.map
|