@estiva-app/ui 0.94.0 → 0.95.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/LinkRow.d.ts.map +1 -1
- package/dist/PartCard.d.ts +4 -7
- package/dist/PartCard.d.ts.map +1 -1
- package/dist/ShowMore.d.ts +1 -7
- package/dist/ShowMore.d.ts.map +1 -1
- package/dist/index.js +6 -12
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +1 -13
- package/src/LinkCard.test.tsx +5 -2
- package/src/LinkRow.mdx +1 -1
- package/src/LinkRow.tsx +10 -5
- package/src/PartCard.mdx +1 -1
- package/src/PartCard.stories.tsx +2 -9
- package/src/PartCard.test.tsx +13 -1
- package/src/PartCard.tsx +6 -9
- package/src/ShowMore.mdx +2 -5
- package/src/ShowMore.stories.tsx +0 -14
- package/src/ShowMore.test.tsx +0 -16
- package/src/ShowMore.tsx +2 -16
package/dist/LinkRow.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkRow.d.ts","sourceRoot":"","sources":["../src/LinkRow.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinkRow.d.ts","sourceRoot":"","sources":["../src/LinkRow.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,UAAU,CAAA;AAO3F,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,UAAU,CAAA;IAChB,sEAAsE;IACtE,IAAI,EAAE,MAAM,CAAA;IACZ,yEAAyE;IACzE,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACtC,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,oGAAoG;IACpG,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAKD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAY,EAAE,OAAe,EAAE,EAAE,oBAAoB,+BAE1G;AAED,yIAAyI;AACzI,wBAAgB,cAAc,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAY,EAAE,EAAE;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAE,+BA2BrL;AAED,sJAAsJ;AACtJ,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,UAAQ,GAAG,MAAM,CAEnE;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EAAE,GAAG,EAAE,KAAa,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,+BAOlF;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAA;IACf,+BAA+B;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,OAAc,EAAE,EAAE,YAAY,+BA+E7D"}
|
package/dist/PartCard.d.ts
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
* Look C (Katerina, 29 Oct): what it is part of as a card starts, its kind in a
|
|
9
9
|
* file's 36px tile, its title and "A part of ABC-2" under it; then the blocks
|
|
10
10
|
* behind a quote bar that starts where the tile does.
|
|
11
|
+
*
|
|
12
|
+
* The title is the way to it, in the app it lives in: no "Open in …" button
|
|
13
|
+
* beside the blocks (Katerina, 31 Oct: it said again what the title does).
|
|
11
14
|
*/
|
|
12
15
|
import { type ReactNode } from 'react';
|
|
13
16
|
import { type LinkedKind } from './linked';
|
|
@@ -38,14 +41,8 @@ export interface PartCardProps {
|
|
|
38
41
|
};
|
|
39
42
|
/** The part's blocks, drawn by the app. */
|
|
40
43
|
children?: ReactNode;
|
|
41
|
-
/**
|
|
42
|
-
* The way out to where the part lives: a small `Button` with a leading icon ("Open in Leaf"). Drawn under the
|
|
43
|
-
* blocks at the right, level with Show more, outside the quote bar (Katerina, 30 Oct: "the vertical line should not
|
|
44
|
-
* be covering the button"). Peek and Ship put it in ShowMore's row inside the blocks before.
|
|
45
|
-
*/
|
|
46
|
-
action?: ReactNode;
|
|
47
44
|
/** Cut the blocks at this height, in px, behind ShowMore's fade and its Show more. Absent, they are drawn whole. */
|
|
48
45
|
maxHeight?: number;
|
|
49
46
|
}
|
|
50
|
-
export declare function PartCard({ state, kind, heading, href, partKey, noun, openIn, children,
|
|
47
|
+
export declare function PartCard({ state, kind, heading, href, partKey, noun, openIn, children, maxHeight }: PartCardProps): import("react").JSX.Element;
|
|
51
48
|
//# sourceMappingURL=PartCard.d.ts.map
|
package/dist/PartCard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PartCard.d.ts","sourceRoot":"","sources":["../src/PartCard.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"PartCard.d.ts","sourceRoot":"","sources":["../src/PartCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKlD,OAAO,EAAY,KAAK,UAAU,EAAE,MAAM,UAAU,CAAA;AAMpD;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,eAAe,CAAA;AAE1G,MAAM,WAAW,aAAa;IAC5B,gDAAgD;IAChD,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,uCAAuC;IACvC,IAAI,EAAE,UAAU,CAAA;IAChB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8CAA8C;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,wGAAwG;IACxG,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,8EAA8E;IAC9E,MAAM,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACtC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,oHAAoH;IACpH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAe,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,+BAuC3H"}
|
package/dist/ShowMore.d.ts
CHANGED
|
@@ -14,10 +14,6 @@ import { type ReactNode } from 'react';
|
|
|
14
14
|
*
|
|
15
15
|
* Focus arriving inside the cut content opens it: a field or a link there,
|
|
16
16
|
* reached by Tab or a click, is never worked on out of sight.
|
|
17
|
-
*
|
|
18
|
-
* `action` is one more small button on the toggle's row, at its right
|
|
19
|
-
* (Katerina, 8 October: Peek's block card puts "Open in Estiva Ship" level with
|
|
20
|
-
* Show more). The row is drawn for it whether or not the content is cut.
|
|
21
17
|
*/
|
|
22
18
|
export interface ShowMoreProps {
|
|
23
19
|
children: ReactNode;
|
|
@@ -28,11 +24,9 @@ export interface ShowMoreProps {
|
|
|
28
24
|
* inset card and a selected message included. Accepted, and ignored.
|
|
29
25
|
*/
|
|
30
26
|
surface?: 'surface' | 'inset' | 'elevated';
|
|
31
|
-
/** A small muted `Button` with a leading icon, at the right of the toggle's row: the way out to where the content lives. Its words end where the content does. */
|
|
32
|
-
action?: ReactNode;
|
|
33
27
|
/** On the content alone, not the toggle's row under it: PartCard's quote bar runs beside the blocks only. */
|
|
34
28
|
contentClassName?: string;
|
|
35
29
|
className?: string;
|
|
36
30
|
}
|
|
37
|
-
export declare function ShowMore({ children, maxHeight,
|
|
31
|
+
export declare function ShowMore({ children, maxHeight, contentClassName, className }: ShowMoreProps): import("react").JSX.Element;
|
|
38
32
|
//# sourceMappingURL=ShowMore.d.ts.map
|
package/dist/ShowMore.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShowMore.d.ts","sourceRoot":"","sources":["../src/ShowMore.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKzE
|
|
1
|
+
{"version":3,"file":"ShowMore.d.ts","sourceRoot":"","sources":["../src/ShowMore.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAKzE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,SAAS,CAAA;IACnB,kFAAkF;IAClF,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAA;IAC1C,6GAA6G;IAC7G,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAKD,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAc,EAAE,gBAAgB,EAAE,SAAS,EAAE,EAAE,aAAa,+BAyBhG"}
|
package/dist/index.js
CHANGED
|
@@ -4016,7 +4016,7 @@ import { useLayoutEffect as useLayoutEffect5, useRef as useRef14, useState as us
|
|
|
4016
4016
|
import { IconChevronDown as IconChevronDown4, IconChevronUp } from "@tabler/icons-react";
|
|
4017
4017
|
import { jsx as jsx56, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4018
4018
|
var FADE = "linear-gradient(to top, transparent, black 40px)";
|
|
4019
|
-
function ShowMore({ children, maxHeight = 96,
|
|
4019
|
+
function ShowMore({ children, maxHeight = 96, contentClassName, className }) {
|
|
4020
4020
|
const box = useRef14(null);
|
|
4021
4021
|
const [open, setOpen] = useState12(false);
|
|
4022
4022
|
const [overflows, setOverflows] = useState12(false);
|
|
@@ -4033,10 +4033,7 @@ function ShowMore({ children, maxHeight = 96, action, contentClassName, classNam
|
|
|
4033
4033
|
const cut = overflows && !open;
|
|
4034
4034
|
return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col items-start", className), children: [
|
|
4035
4035
|
/* @__PURE__ */ jsx56("div", { ref: box, className: cn("relative w-full", cut && "overflow-hidden", contentClassName), style: cut ? { maxHeight, maskImage: FADE, WebkitMaskImage: FADE } : void 0, onFocus: cut ? () => setOpen(true) : void 0, children }),
|
|
4036
|
-
|
|
4037
|
-
overflows && /* @__PURE__ */ jsx56(Toggle, { open, onToggle: () => setOpen((o) => !o) }),
|
|
4038
|
-
/* @__PURE__ */ jsx56("div", { className: "-mr-2 flex shrink-0", children: action })
|
|
4039
|
-
] }) : overflows && /* @__PURE__ */ jsx56(Toggle, { open, onToggle: () => setOpen((o) => !o), className: "mt-1" })
|
|
4036
|
+
overflows && /* @__PURE__ */ jsx56(Toggle, { open, onToggle: () => setOpen((o) => !o), className: "mt-1" })
|
|
4040
4037
|
] });
|
|
4041
4038
|
}
|
|
4042
4039
|
function Toggle({ open, onToggle, className }) {
|
|
@@ -4613,6 +4610,7 @@ import { useContext as useContext9 } from "react";
|
|
|
4613
4610
|
|
|
4614
4611
|
// src/LinkRow.tsx
|
|
4615
4612
|
import { useContext as useContext8 } from "react";
|
|
4613
|
+
import { IconExternalLink } from "@tabler/icons-react";
|
|
4616
4614
|
import { jsx as jsx61, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4617
4615
|
var ROW_CLASSES2 = "flex items-center gap-3 p-1.5 pr-3";
|
|
4618
4616
|
function LinkUnavailable({ kind, noun, openIn, card = false, deleted = false }) {
|
|
@@ -4623,11 +4621,7 @@ function UnavailableRow({ kind, words, href, openIn, card = false }) {
|
|
|
4623
4621
|
return /* @__PURE__ */ jsxs42(Card, { fill: wide ? "elevated" : "inset", className: cn(card ? "flex items-center gap-3 p-3" : ROW_CLASSES2, "max-w-[480px]"), children: [
|
|
4624
4622
|
/* @__PURE__ */ jsx61("span", { className: TYPE_TILE_CLASSES, children: /* @__PURE__ */ jsx61(LinkedIcon, { kind }) }),
|
|
4625
4623
|
/* @__PURE__ */ jsx61("span", { className: "min-w-0 flex-1 truncate text-body-2 text-text-muted", children: href && !wide ? /* @__PURE__ */ jsx61(Link, { href, variant: "quiet", children: words }) : words }),
|
|
4626
|
-
openIn && /* @__PURE__ */ jsx61(
|
|
4627
|
-
"Open in ",
|
|
4628
|
-
openIn.app,
|
|
4629
|
-
" \u2197"
|
|
4630
|
-
] }) })
|
|
4624
|
+
openIn && /* @__PURE__ */ jsx61(WithTooltip, { label: `Open in ${openIn.app}`, children: /* @__PURE__ */ jsx61(Button, { href: openIn.href, external: true, size: "small", className: "shrink-0", leadingIcon: /* @__PURE__ */ jsx61(IconExternalLink, { stroke: 1.5, className: "size-3.5" }), "aria-label": `Open in ${openIn.app}`, children: "Open" }) })
|
|
4631
4625
|
] });
|
|
4632
4626
|
}
|
|
4633
4627
|
function linkMetaOf(linked, withWhen = false) {
|
|
@@ -4894,7 +4888,7 @@ function AttachedCard({ link, children, onRemove }) {
|
|
|
4894
4888
|
// src/PartCard.tsx
|
|
4895
4889
|
import { useContext as useContext11 } from "react";
|
|
4896
4890
|
import { jsx as jsx66, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
4897
|
-
function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn, children,
|
|
4891
|
+
function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn, children, maxHeight }) {
|
|
4898
4892
|
const word = noun ?? kindNounOf({ kind }) ?? "File";
|
|
4899
4893
|
const boxed = useContext11(inTheBox);
|
|
4900
4894
|
if (state === "loading") return /* @__PURE__ */ jsx66(LinkCardLoading, { kind, shape: { summary: true, rows: 0, footer: "none" } });
|
|
@@ -4913,7 +4907,7 @@ function PartCard({ state = "ready", kind, heading, href, partKey, noun, openIn,
|
|
|
4913
4907
|
/* @__PURE__ */ jsx66("span", { className: "truncate text-caption text-text-secondary", children: partKey ? `A part of ${partKey}` : `A part of this ${word.toLowerCase()}` })
|
|
4914
4908
|
] })
|
|
4915
4909
|
] }),
|
|
4916
|
-
|
|
4910
|
+
maxHeight !== void 0 ? /* @__PURE__ */ jsx66(ShowMore, { maxHeight, contentClassName: QUOTE_BAR_CLASSES, children }) : /* @__PURE__ */ jsx66("div", { className: QUOTE_BAR_CLASSES, children })
|
|
4917
4911
|
] })
|
|
4918
4912
|
);
|
|
4919
4913
|
}
|