@estiva-app/ui 0.65.3 → 0.67.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/BlockNodes.d.ts +33 -0
- package/dist/BlockNodes.d.ts.map +1 -1
- package/dist/ComposerTriggers.d.ts +11 -2
- package/dist/ComposerTriggers.d.ts.map +1 -1
- package/dist/EditorTableControls.d.ts +38 -0
- package/dist/EditorTableControls.d.ts.map +1 -0
- package/dist/NavItem.d.ts +11 -1
- package/dist/NavItem.d.ts.map +1 -1
- package/dist/RichText.d.ts +13 -1
- package/dist/RichText.d.ts.map +1 -1
- package/dist/editor.d.ts +2 -1
- package/dist/editor.d.ts.map +1 -1
- package/dist/editor.js +363 -18
- package/dist/editor.js.map +4 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +71 -23
- package/dist/index.js.map +3 -3
- package/package.json +2 -1
- package/registry.json +209 -4
- package/src/BlockNodes.mdx +32 -1
- package/src/BlockNodes.stories.tsx +29 -1
- package/src/BlockNodes.test.tsx +141 -2
- package/src/BlockNodes.tsx +227 -4
- package/src/ComposerTriggers.test.tsx +23 -0
- package/src/ComposerTriggers.tsx +61 -5
- package/src/EditorTableControls.mdx +78 -0
- package/src/EditorTableControls.stories.tsx +63 -0
- package/src/EditorTableControls.test.tsx +288 -0
- package/src/EditorTableControls.tsx +255 -0
- package/src/NavItem.mdx +10 -0
- package/src/NavItem.stories.tsx +23 -1
- package/src/NavItem.test.tsx +36 -0
- package/src/NavItem.tsx +40 -16
- package/src/RichText.mdx +12 -0
- package/src/RichText.stories.tsx +50 -0
- package/src/RichText.test.tsx +56 -0
- package/src/RichText.tsx +83 -10
- package/src/editor.ts +4 -0
- package/src/index.ts +1 -1
- package/src/registry/registry.test.ts +7 -7
- package/src/registry/siblings.test.ts +2 -2
- package/stories/Choosing.mdx +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { ChipInput, InputChip, type ChipInputOption, type ChipInputProps, type I
|
|
|
27
27
|
export { INLINE_CHIP_CLASSES, INLINE_CHIP_TONE_CLASSES, InlineChip, inlineChipClassName, type InlineChipProps, type InlineChipTone, } from './InlineChip';
|
|
28
28
|
export { Lightbox, type LightboxProps } from './Lightbox';
|
|
29
29
|
export { Link, type LinkProps, type LinkVariant } from './Link';
|
|
30
|
-
export { RichText, richTextClassName, type RichTextProps, type RichTextBlock, type RichTextRun, type RichTextSize } from './RichText';
|
|
30
|
+
export { RichText, richTextClassName, calloutLook, type RichTextProps, type RichTextBlock, type RichTextRun, type RichTextSize } from './RichText';
|
|
31
31
|
export { IconButton, type IconButtonProps, type IconButtonVariant } from './IconButton';
|
|
32
32
|
export { Kbd, type KbdProps } from './Kbd';
|
|
33
33
|
export { KindIcon, thingKindOf, type KindIconProps, type ThingKind } from './KindIcon';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,YAAY,CAAA;AACzD,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACrG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AACxE,OAAO,EAAE,WAAW,EAAE,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1F,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,aAAa,EAAE,KAAK,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,KAAK,k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E,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAA;AAC5G,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AACzB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -2449,6 +2449,13 @@ var RICH_TEXT_CLASSES = {
|
|
|
2449
2449
|
/* The line in the muted text grey, not the border grey: a border grey was 1.3 : 1 in Leaf (Katerina, 9 October). */
|
|
2450
2450
|
// 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
|
|
2451
2451
|
quote: "[&_blockquote>p]:m-0 [&_blockquote]:border-l-[3px] [&_blockquote]:border-text-muted [&_blockquote]:pl-2.5",
|
|
2452
|
+
/*
|
|
2453
|
+
A checklist item: the box where the bullet was, in the list's gutter, and the words where they were (Katerina, review of #170). The item stays a list item, so a numbered list still counts it; the box sits beside the row and adds nothing to its height, the same in the editor and here.
|
|
2454
|
+
A ticked item's words grey and struck through, its links and code too (Katerina); the lists under it are not.
|
|
2455
|
+
*/
|
|
2456
|
+
checklist: "[&_li[data-checked]]:relative [&_li[data-checked]]:list-none [&_[data-checklist-box]]:absolute [&_[data-checklist-box]]:-left-5 [&_[data-checklist-box]]:top-0.5 [&_[data-checklist-box]]:flex [&_li[data-checked=true]>div>p]:text-text-muted [&_li[data-checked=true]>div>p]:line-through [&_li[data-checked=true]>div>p_a]:text-text-muted [&_li[data-checked=true]>div>p_a]:decoration-text-muted [&_li[data-checked=true]>div>p_code]:border-transparent [&_li[data-checked=true]>div>p_code]:bg-transparent [&_li[data-checked=true]>div>p_code]:text-text-muted",
|
|
2457
|
+
/* A callout: the quote's line in its tone's colour, on its tone's wash (RIC-19, to Katerina's review). `data-callout` is the tone as drawn — an unknown one is `note`. */
|
|
2458
|
+
callout: "[&_blockquote[data-callout]]:rounded-sm [&_blockquote[data-callout]]:py-2 [&_blockquote[data-callout]]:pr-3 [&_blockquote[data-callout=note]]:border-info-default [&_blockquote[data-callout=note]]:bg-info-muted [&_blockquote[data-callout=tip]]:border-success-default [&_blockquote[data-callout=tip]]:bg-success-muted [&_blockquote[data-callout=important]]:border-accent-primary [&_blockquote[data-callout=important]]:bg-accent-muted [&_blockquote[data-callout=warning]]:border-warning-default [&_blockquote[data-callout=warning]]:bg-warning-muted [&_blockquote[data-callout=caution]]:border-error-default [&_blockquote[data-callout=caution]]:bg-error-muted",
|
|
2452
2459
|
/* Code in a sentence: the code fill and a thin border, in the heading colour (Katerina, 9 October: option B; the amber of 0.64.0 was too much). */
|
|
2453
2460
|
// eslint-disable-next-line token-values/no-restricted-classes -- @estiva-escape: code is 0.85 of the text around it, so it scales with a heading and with `small`; a named size is fixed
|
|
2454
2461
|
code: "[&_:not(pre)>code]:rounded-sm [&_:not(pre)>code]:bg-bg-code [&_:not(pre)>code]:px-1 [&_:not(pre)>code]:py-0.5 [&_:not(pre)>code]:border [&_:not(pre)>code]:border-border-default [&_code]:font-mono [&_code]:text-[0.85em] [&_code]:text-text-primary",
|
|
@@ -2459,7 +2466,8 @@ var RICH_TEXT_CLASSES = {
|
|
|
2459
2466
|
syntax: "[&_:is(.hljs-keyword,.hljs-doctag,.hljs-type,.hljs-template-tag,.hljs-template-variable)]:text-syntax-keyword [&_.hljs-title]:text-syntax-function [&_:is(.hljs-number,.hljs-literal,.hljs-attr,.hljs-attribute,.hljs-meta,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id)]:text-syntax-constant [&_:is(.hljs-string,.hljs-regexp)]:text-syntax-string [&_:is(.hljs-built_in,.hljs-symbol)]:text-syntax-variable [&_.hljs-comment]:text-syntax-comment [&_:is(.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo)]:text-syntax-tag",
|
|
2460
2467
|
/* A divider splits the text in two: 16px either side (Katerina, 9 October; 4 before). */
|
|
2461
2468
|
divider: "[&_hr]:my-2 [&_hr]:border-border-default",
|
|
2462
|
-
table
|
|
2469
|
+
/* A table 16px above and below, as a divider (Katerina, 14 October; 8 before): the editor's row ➕ sits in that room, not over the next line. */
|
|
2470
|
+
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]:my-2 [&_table]:w-full [&_table]:border-collapse [&_th]:bg-bg-code [&_th]:font-medium [&_th]:text-text-primary",
|
|
2463
2471
|
/* Bold in the heading colour, not only heavier. An underlined word draws a faint line, so it does not read as a link (Katerina, 9 October). */
|
|
2464
2472
|
marks: "[&_em]:italic [&_strong]:font-semibold [&_strong]:text-text-primary [&_u]:underline [&_u]:decoration-text-muted [&_u]:underline-offset-2",
|
|
2465
2473
|
/* Lines 1.5 apart (Katerina, 9 October; 1.4 before). */
|
|
@@ -2468,8 +2476,8 @@ var RICH_TEXT_CLASSES = {
|
|
|
2468
2476
|
small: "gap-1.5 text-caption leading-snug [&>:is(h1,h2,h3)]:mb-0.5 [&>:is(h1,h2,h3)]:mt-1.5 [&>:is(h1,h2,h3)+:is(h1,h2,h3)]:mt-1 [&>:is(h1,h2,h3):last-child]:mb-0 [&>:is(h2,h3)]:text-caption [&>:is(h2,h3)]:font-semibold [&>h1]:text-body-2 [&>h1]:font-semibold"
|
|
2469
2477
|
};
|
|
2470
2478
|
function richTextClassName(size = "default", className) {
|
|
2471
|
-
const { base, headings, lists, quote, code, codeBlock, syntax, divider, table, marks } = RICH_TEXT_CLASSES;
|
|
2472
|
-
return cn(base, headings, lists, quote, code, codeBlock, syntax, divider, table, marks, RICH_TEXT_CLASSES[size], className);
|
|
2479
|
+
const { base, headings, lists, quote, checklist, callout, code, codeBlock, syntax, divider, table, marks } = RICH_TEXT_CLASSES;
|
|
2480
|
+
return cn(base, headings, lists, quote, checklist, callout, code, codeBlock, syntax, divider, table, marks, RICH_TEXT_CLASSES[size], className);
|
|
2473
2481
|
}
|
|
2474
2482
|
var LINK_SPLIT = /(\[[^[\]\n]+\]\((?:https?:\/\/|mailto:)[^\s)]+\)|https?:\/\/[^\s]+)/g;
|
|
2475
2483
|
var WRITTEN_LINK = /^\[([^[\]\n]+)\]\(((?:https?:\/\/|mailto:)[^\s)]+)\)$/;
|
|
@@ -2496,6 +2504,11 @@ function textWithLinks(text, renderText) {
|
|
|
2496
2504
|
return part ? /* @__PURE__ */ jsx34("span", { children: renderText(part) }, i) : null;
|
|
2497
2505
|
});
|
|
2498
2506
|
}
|
|
2507
|
+
var CALLOUT_TONES = /* @__PURE__ */ new Set(["note", "tip", "important", "warning", "caution"]);
|
|
2508
|
+
function calloutLook(tone) {
|
|
2509
|
+
const named2 = tone.toLowerCase();
|
|
2510
|
+
return CALLOUT_TONES.has(named2) ? named2 : "note";
|
|
2511
|
+
}
|
|
2499
2512
|
function Runs({ runs, draw: draw2 }) {
|
|
2500
2513
|
return /* @__PURE__ */ jsx34(Fragment8, { children: (runs ?? []).map((run, i) => {
|
|
2501
2514
|
if (run.reference) return /* @__PURE__ */ jsx34("span", { children: draw2.renderReference(run.reference, run) }, i);
|
|
@@ -2541,6 +2554,26 @@ function Table({ block, draw: draw2 }) {
|
|
|
2541
2554
|
/* @__PURE__ */ jsx34("tbody", { children: (headerRow ? rows.slice(1) : rows).map((row, i) => /* @__PURE__ */ jsx34("tr", { "data-block-id": row.id, children: cells(row) }, row.id ?? i)) })
|
|
2542
2555
|
] });
|
|
2543
2556
|
}
|
|
2557
|
+
var wordsOf = (item) => (item.inline ?? []).map((run) => run.text).join("").trim();
|
|
2558
|
+
function ListItem({ item, draw: draw2, below }) {
|
|
2559
|
+
if (typeof item.checked !== "boolean") {
|
|
2560
|
+
return /* @__PURE__ */ jsxs25("li", { "data-block-id": item.id, children: [
|
|
2561
|
+
/* @__PURE__ */ jsx34(Runs, { runs: item.inline, draw: draw2 }),
|
|
2562
|
+
below
|
|
2563
|
+
] });
|
|
2564
|
+
}
|
|
2565
|
+
const { onTick } = draw2;
|
|
2566
|
+
const id = item.id;
|
|
2567
|
+
const name = wordsOf(item) || "Item";
|
|
2568
|
+
const control = onTick && id ? (next) => onTick(id, next) : void 0;
|
|
2569
|
+
return /* @__PURE__ */ jsxs25("li", { "data-block-id": id, "data-checked": String(item.checked), children: [
|
|
2570
|
+
/* @__PURE__ */ jsx34("span", { "data-checklist-box": "", ...control ? {} : { role: "checkbox", "aria-checked": item.checked, "aria-readonly": true, "aria-label": name }, children: /* @__PURE__ */ jsx34(Checkbox, { checked: item.checked, onChange: control, "aria-label": name }) }),
|
|
2571
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
2572
|
+
/* @__PURE__ */ jsx34("p", { children: /* @__PURE__ */ jsx34(Runs, { runs: item.inline, draw: draw2 }) }),
|
|
2573
|
+
below
|
|
2574
|
+
] })
|
|
2575
|
+
] });
|
|
2576
|
+
}
|
|
2544
2577
|
var MAX_DEPTH = 8;
|
|
2545
2578
|
function nestItems(items) {
|
|
2546
2579
|
const top = [];
|
|
@@ -2570,15 +2603,20 @@ function Block({ block, draw: draw2 }) {
|
|
|
2570
2603
|
case "bulletList":
|
|
2571
2604
|
case "orderedList": {
|
|
2572
2605
|
const ordered = block.type === "orderedList";
|
|
2573
|
-
const items = (nodes) => nodes.map(({ item, key, below }) => /* @__PURE__ */
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2606
|
+
const items = (nodes) => nodes.map(({ item, key, below }) => /* @__PURE__ */ jsx34(
|
|
2607
|
+
ListItem,
|
|
2608
|
+
{
|
|
2609
|
+
item,
|
|
2610
|
+
draw: draw2,
|
|
2611
|
+
below: below.length > 0 && (ordered ? /* @__PURE__ */ jsx34("ol", { children: items(below) }) : /* @__PURE__ */ jsx34("ul", { children: items(below) }))
|
|
2612
|
+
},
|
|
2613
|
+
item.id ?? key
|
|
2614
|
+
));
|
|
2577
2615
|
const top = items(nestItems(block.children ?? []));
|
|
2578
2616
|
return ordered ? /* @__PURE__ */ jsx34("ol", { "data-block-id": block.id, start: block.start, children: top }) : /* @__PURE__ */ jsx34("ul", { "data-block-id": block.id, children: top });
|
|
2579
2617
|
}
|
|
2580
2618
|
case "blockquote":
|
|
2581
|
-
return /* @__PURE__ */ jsx34("blockquote", { "data-block-id": block.id, children: runs });
|
|
2619
|
+
return /* @__PURE__ */ jsx34("blockquote", { "data-block-id": block.id, "data-tone": block.tone, "data-callout": typeof block.tone === "string" ? calloutLook(block.tone) : void 0, children: runs });
|
|
2582
2620
|
case "codeBlock":
|
|
2583
2621
|
return /* @__PURE__ */ jsx34("pre", { "data-block-id": block.id, "data-language": block.language, children: /* @__PURE__ */ jsx34("code", { children: codeColours((block.inline ?? []).map((run) => run.text).join(""), block.language) }) });
|
|
2584
2622
|
case "horizontalRule":
|
|
@@ -2599,10 +2637,11 @@ function RichText({
|
|
|
2599
2637
|
size = "default",
|
|
2600
2638
|
renderText = (text) => text,
|
|
2601
2639
|
renderReference = (_reference, run) => run.text,
|
|
2602
|
-
renderBlock
|
|
2640
|
+
renderBlock,
|
|
2641
|
+
onTick
|
|
2603
2642
|
}) {
|
|
2604
2643
|
if (blocks.length === 0) return null;
|
|
2605
|
-
const draw2 = { renderText, renderReference, renderBlock };
|
|
2644
|
+
const draw2 = { renderText, renderReference, renderBlock, onTick };
|
|
2606
2645
|
return /* @__PURE__ */ jsx34("div", { "data-rich-text": true, className: richTextClassName(size), children: blocks.map((block, i) => /* @__PURE__ */ jsx34(Block, { block, draw: draw2 }, block.id ?? i)) });
|
|
2607
2646
|
}
|
|
2608
2647
|
|
|
@@ -3250,6 +3289,7 @@ function NavItem({
|
|
|
3250
3289
|
icon,
|
|
3251
3290
|
menu,
|
|
3252
3291
|
menuLabel,
|
|
3292
|
+
action,
|
|
3253
3293
|
hint,
|
|
3254
3294
|
unread = false,
|
|
3255
3295
|
urgent = false,
|
|
@@ -3270,9 +3310,10 @@ function NavItem({
|
|
|
3270
3310
|
setOpenState(next);
|
|
3271
3311
|
onOpenChange?.(next);
|
|
3272
3312
|
};
|
|
3273
|
-
const
|
|
3313
|
+
const buttons = (menu != null ? 1 : 0) + (action ? 1 : 0);
|
|
3314
|
+
const besides = buttons > 0 || hasRows;
|
|
3274
3315
|
const mark = unread ? urgent ? /* @__PURE__ */ jsx49(UrgentMark, {}) : /* @__PURE__ */ jsx49(UnreadDot, {}) : null;
|
|
3275
|
-
const stepsAside =
|
|
3316
|
+
const stepsAside = buttons > 0 && "transition-opacity group-hover/nav:opacity-0 group-has-[:focus-visible]/nav:opacity-0 group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:opacity-0 [@media(hover:none)]:opacity-0";
|
|
3276
3317
|
const row = /* @__PURE__ */ jsxs32(
|
|
3277
3318
|
"a",
|
|
3278
3319
|
{
|
|
@@ -3289,7 +3330,7 @@ function NavItem({
|
|
|
3289
3330
|
// look while the ⋮ is pointed at and while its menu is open. The same
|
|
3290
3331
|
// for the arrow.
|
|
3291
3332
|
besides && !active && "group-hover/nav:bg-bg-hover group-hover/nav:text-text-primary",
|
|
3292
|
-
|
|
3333
|
+
buttons > 0 && !active && "group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:bg-bg-hover group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:text-text-primary",
|
|
3293
3334
|
className
|
|
3294
3335
|
),
|
|
3295
3336
|
...props,
|
|
@@ -3309,6 +3350,9 @@ function NavItem({
|
|
|
3309
3350
|
/* @__PURE__ */ jsx49("span", { className: cn("flex-1 truncate", unread && "font-medium"), children: label }),
|
|
3310
3351
|
hint != null && // Takes room only while it shows, so the label gives way to it.
|
|
3311
3352
|
/* @__PURE__ */ jsx49("span", { className: "hidden shrink-0 items-center group-hover/nav:flex group-has-[:focus-visible]/nav:flex", children: hint }),
|
|
3353
|
+
buttons > 1 && // Two buttons: the second one's room (24px and the 4px between them, the
|
|
3354
|
+
// row's 8px gap making up the rest), kept only while they show.
|
|
3355
|
+
/* @__PURE__ */ jsx49("span", { "aria-hidden": "true", className: "hidden w-5 shrink-0 group-hover/nav:block group-has-[:focus-visible]/nav:block group-has-[[data-nav-menu]_[aria-expanded=true]]/nav:block [@media(hover:none)]:block" }),
|
|
3312
3356
|
count ? /* @__PURE__ */ jsx49(WithTooltip, { label: countLabel ?? `${count} open`, children: /* @__PURE__ */ jsx49(
|
|
3313
3357
|
"span",
|
|
3314
3358
|
{
|
|
@@ -3326,7 +3370,7 @@ function NavItem({
|
|
|
3326
3370
|
// of the ⋮ (8px from the edge to the 16px box), one column with a
|
|
3327
3371
|
// folder heading's dot and ⋮ (Katerina, 5 October).
|
|
3328
3372
|
/* @__PURE__ */ jsx49("span", { className: cn("-mr-1 flex shrink-0", stepsAside), children: mark })
|
|
3329
|
-
) :
|
|
3373
|
+
) : buttons > 0 && !count ? (
|
|
3330
3374
|
// Nothing at the right, but a menu: no room is kept at rest, so the
|
|
3331
3375
|
// label has the row's whole width; while the ⋮ shows, its 24px slot
|
|
3332
3376
|
// is kept, so a long label ends before it instead of running under it.
|
|
@@ -3355,7 +3399,7 @@ function NavItem({
|
|
|
3355
3399
|
children: /* @__PURE__ */ jsx49(IconChevronRight2, { size: 16, stroke: 1.5, className: cn("transition-transform duration-150", open && "rotate-90") })
|
|
3356
3400
|
}
|
|
3357
3401
|
) }),
|
|
3358
|
-
|
|
3402
|
+
buttons > 0 && // `right-1`: the 24px button's 16px icon ends 8px from the row's
|
|
3359
3403
|
// edge, where a count ends (px-2) — and where a SectionHeader's
|
|
3360
3404
|
// actions and ⋮ end, so a folder's ⋮ and its rows' ⋮ are one column
|
|
3361
3405
|
// (Katerina, 5 October: the rows move to the heading, not the
|
|
@@ -3363,14 +3407,17 @@ function NavItem({
|
|
|
3363
3407
|
// right of the slot's centre.
|
|
3364
3408
|
// On a screen with no hover it always shows: nothing there can point
|
|
3365
3409
|
// at the row, and the menu has no other way in.
|
|
3366
|
-
/* @__PURE__ */
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3410
|
+
/* @__PURE__ */ jsxs32("div", { "data-nav-menu": true, className: cn("absolute inset-y-0 right-1 flex items-center gap-1", "opacity-0 transition-opacity group-hover/nav:opacity-100 group-has-[:focus-visible]/nav:opacity-100 has-[[aria-expanded=true]]:opacity-100 [@media(hover:none)]:opacity-100"), children: [
|
|
3411
|
+
action && /* @__PURE__ */ jsx49(IconButton, { tooltip: action.tooltip, "aria-label": `${action.tooltip}: ${label}`, onClick: action.onClick, children: action.icon }),
|
|
3412
|
+
menu != null && /* @__PURE__ */ jsx49(
|
|
3413
|
+
Menu,
|
|
3414
|
+
{
|
|
3415
|
+
align: "right",
|
|
3416
|
+
trigger: /* @__PURE__ */ jsx49(IconButton, { tooltip: "More options", "aria-label": name, children: /* @__PURE__ */ jsx49(IconDotsVertical, { size: 16, stroke: 1.5 }) }),
|
|
3417
|
+
children: menu
|
|
3418
|
+
}
|
|
3419
|
+
)
|
|
3420
|
+
] })
|
|
3374
3421
|
] });
|
|
3375
3422
|
if (!hasRows) return line;
|
|
3376
3423
|
return /* @__PURE__ */ jsxs32(Collapsible.Root, { open, onOpenChange: setOpen, className: "flex shrink-0 flex-col", children: [
|
|
@@ -4395,6 +4442,7 @@ export {
|
|
|
4395
4442
|
UnreadDot,
|
|
4396
4443
|
WithTooltip,
|
|
4397
4444
|
blockAtY,
|
|
4445
|
+
calloutLook,
|
|
4398
4446
|
cn,
|
|
4399
4447
|
hueFor,
|
|
4400
4448
|
initialsFor,
|