@estiva-app/ui 0.121.0 → 0.122.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/ActivityLine.d.ts.map +1 -1
- package/dist/ListTable.d.ts +4 -2
- package/dist/ListTable.d.ts.map +1 -1
- package/dist/MembersPill.d.ts +7 -1
- package/dist/MembersPill.d.ts.map +1 -1
- package/dist/index.js +19 -8
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/registry.json +8 -1
- package/src/ActivityLine.mdx +3 -1
- package/src/ActivityLine.test.tsx +9 -0
- package/src/ActivityLine.tsx +6 -1
- package/src/ListTable.mdx +7 -5
- package/src/ListTable.test.tsx +17 -0
- package/src/ListTable.tsx +12 -9
- package/src/MembersPill.mdx +6 -0
- package/src/MembersPill.stories.tsx +5 -0
- package/src/MembersPill.test.tsx +38 -0
- package/src/MembersPill.tsx +18 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActivityLine.d.ts","sourceRoot":"","sources":["../src/ActivityLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAOlD,MAAM,WAAW,iBAAiB;IAChC,uCAAuC;IACvC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,OAAO,CAAA;KAAE,CAAA;IACzD,wGAAwG;IACxG,GAAG,EAAE,MAAM,CAAA;IACX,yFAAyF;IACzF,IAAI,EAAE,MAAM,CAAA;IACZ,mGAAmG;IACnG,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,uCAAuC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,2GAA2G;IAC3G,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,4GAA4G;IAC5G,IAAI,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,KAAK,IAAI,CAAA;IAClD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,kFAAkF;IAClF,CAAC,IAAI,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CACvD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,IAAY,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAwCzI"}
|
package/dist/ListTable.d.ts
CHANGED
|
@@ -59,8 +59,10 @@ export interface ListTableRowProps {
|
|
|
59
59
|
* A list of things on a page, under column headings: each row leads to its thing, with its name and what it is about,
|
|
60
60
|
* then a few short facts in columns, then an action at its end. The columns give way to the name by the list's own
|
|
61
61
|
* width, not the window's — `low` ones first, then `high` ones — so a list beside a sidebar keeps its names. The name
|
|
62
|
-
* is
|
|
63
|
-
*
|
|
62
|
+
* and what it is about take the room on the left, the facts sit together on the right before the end, 24px apart
|
|
63
|
+
* (Katerina, 17 November: "everything is crammed together on the left … the names/desc at the left and the rest on the
|
|
64
|
+
* right was a more correct way"; from 16 November the name was capped at 384px with the facts beside it). The list
|
|
65
|
+
* takes the whole width it is given, as every page's body does (16 November).
|
|
64
66
|
*
|
|
65
67
|
* Peek's Explore topics, Ship's Topics and Leaf's Explore topics each drew this by hand, class for class, and their
|
|
66
68
|
* columns hid only at the phone's width: in a narrow window the names were cut to two letters (Katerina, 16 November).
|
package/dist/ListTable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListTable.d.ts","sourceRoot":"","sources":["../src/ListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6E,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;A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EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;IACxD,oDAAoD;IACpD,CAAC,IAAI,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CACvD;AAsBD;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,EAAE,YAAY,EAAE,KAAK,EAAE,SAAkB,EAAE,OAAO,EAAE,GAAW,EAAE,QAAe,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BA8ChJ;AAED,iGAAiG;AACjG,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB,+BAkC/G"}
|
package/dist/MembersPill.d.ts
CHANGED
|
@@ -6,6 +6,12 @@ export interface MembersPillProps {
|
|
|
6
6
|
count?: number;
|
|
7
7
|
/** Opens the list — usually a `MembersDialog`. Without it the pill is disabled. */
|
|
8
8
|
onClick?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Says who is in it and is nothing to press: the pill's own look, not greyed as a disabled one — in a list's row,
|
|
11
|
+
* which opens its thing (Katerina, 17 November: "clicking on the pill should not show the members list. And we need to
|
|
12
|
+
* use the estiva ui component"). `onClick` is not taken with it.
|
|
13
|
+
*/
|
|
14
|
+
readOnly?: boolean;
|
|
9
15
|
/** The button's accessible name, when the list it opens is not "members" — "Who follows <name>: 4". Defaults to "4 members". */
|
|
10
16
|
label?: string;
|
|
11
17
|
className?: string;
|
|
@@ -20,5 +26,5 @@ export interface MembersPillProps {
|
|
|
20
26
|
* pick of 15 September). `disabled` rather than another element when there is
|
|
21
27
|
* nothing to press, so one element keeps one set of pixels.
|
|
22
28
|
*/
|
|
23
|
-
export declare function MembersPill({ members, count, onClick, label, className }: MembersPillProps): import("react").JSX.Element | null;
|
|
29
|
+
export declare function MembersPill({ members, count, onClick, readOnly, label, className }: MembersPillProps): import("react").JSX.Element | null;
|
|
24
30
|
//# sourceMappingURL=MembersPill.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MembersPill.d.ts","sourceRoot":"","sources":["../src/MembersPill.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAKnE,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,gIAAgI;IAChI,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"MembersPill.d.ts","sourceRoot":"","sources":["../src/MembersPill.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAKnE,MAAM,WAAW,gBAAgB;IAC/B,2DAA2D;IAC3D,OAAO,EAAE,iBAAiB,EAAE,CAAA;IAC5B,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gIAAgI;IAChI,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,QAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,sCAmB5G"}
|
package/dist/index.js
CHANGED
|
@@ -1202,10 +1202,20 @@ function Button({
|
|
|
1202
1202
|
|
|
1203
1203
|
// src/MembersPill.tsx
|
|
1204
1204
|
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1205
|
-
function MembersPill({ members, count, onClick, label, className }) {
|
|
1205
|
+
function MembersPill({ members, count, onClick, readOnly = false, label, className }) {
|
|
1206
1206
|
const total = count ?? members.length;
|
|
1207
1207
|
if (total === 0) return null;
|
|
1208
|
-
|
|
1208
|
+
const name = label ?? `${total} ${total === 1 ? "member" : "members"}`;
|
|
1209
|
+
if (readOnly)
|
|
1210
|
+
return (
|
|
1211
|
+
// The outlined Button's own pixels — its height, corners, line and words — with nothing to press: one picture, read as one.
|
|
1212
|
+
// @estiva-escape(no-copied-look): the read-only pill IS the outlined Button's look, drawn without a button
|
|
1213
|
+
/* @__PURE__ */ jsxs10("span", { role: "img", "aria-label": name, className: cn("inline-flex h-8 min-h-8 shrink-0 items-center gap-2 rounded-md border border-border-default pl-[3px] pr-2 font-sans font-medium text-btn-default text-text-primary", className), children: [
|
|
1214
|
+
/* @__PURE__ */ jsx16(AvatarGroup, { members }),
|
|
1215
|
+
/* @__PURE__ */ jsx16("span", { className: cn(MONO_CAPTION_CLASSES, "signal:tabular-nums"), children: total })
|
|
1216
|
+
] })
|
|
1217
|
+
);
|
|
1218
|
+
return /* @__PURE__ */ jsxs10(Button, { variant: "outlined", "aria-label": name, disabled: !onClick, onClick, className: cn("gap-2 pl-[3px] pr-2", className), children: [
|
|
1209
1219
|
/* @__PURE__ */ jsx16(AvatarGroup, { members }),
|
|
1210
1220
|
/* @__PURE__ */ jsx16("span", { className: cn(MONO_CAPTION_CLASSES, "signal:tabular-nums"), children: total })
|
|
1211
1221
|
] });
|
|
@@ -6049,7 +6059,7 @@ function ActivityLine({ person, did, time, mark, where, words, seen = false, hre
|
|
|
6049
6059
|
words
|
|
6050
6060
|
] })
|
|
6051
6061
|
] }) });
|
|
6052
|
-
const row = menuItemClassName({ size: "default", className });
|
|
6062
|
+
const row = menuItemClassName({ size: "default", className: cn(!seen && "bg-accent-wash", className) });
|
|
6053
6063
|
if (href) {
|
|
6054
6064
|
return /* @__PURE__ */ jsx78(Link, { href, variant: "plain", className: row, ...onClick ? { onClick } : {}, ...rest, children: body });
|
|
6055
6065
|
}
|
|
@@ -7635,7 +7645,7 @@ var NAME_LEAST_PX = 200;
|
|
|
7635
7645
|
var DEFAULT_WIDTH = "medium";
|
|
7636
7646
|
var sizeOf = (column) => column.width ?? DEFAULT_WIDTH;
|
|
7637
7647
|
var ROW_FRAME_PX = 24 + 16 + 12;
|
|
7638
|
-
var GAP_PX =
|
|
7648
|
+
var GAP_PX = 24;
|
|
7639
7649
|
var END_PX = 64;
|
|
7640
7650
|
var ListTableContext = createContext14(null);
|
|
7641
7651
|
var showsColumn = (column, shown2) => shown2 === "all" || shown2 === "high" && (column.keep ?? "high") === "high";
|
|
@@ -7659,8 +7669,8 @@ function ListTable({ "aria-label": label, nameLabel = "Name", columns, end = fal
|
|
|
7659
7669
|
}, [measure]);
|
|
7660
7670
|
return /* @__PURE__ */ jsx101(ListTableContext.Provider, { value: { columns, shown: shown2, end }, children: /* @__PURE__ */ jsxs78("div", { ref: box, role: "table", "aria-label": label, className: cn("flex w-full flex-col gap-2", className), children: [
|
|
7661
7671
|
columns.length > 0 && // Hidden, it is out of the flow too: the rows start where the list does, with no gap for it.
|
|
7662
|
-
/* @__PURE__ */ jsxs78("div", { role: "row", className: cn("flex items-center gap-
|
|
7663
|
-
/* @__PURE__ */ jsx101("span", { role: "columnheader", className: "min-w-0
|
|
7672
|
+
/* @__PURE__ */ jsxs78("div", { role: "row", className: cn("flex items-center gap-6 px-3 text-caption text-text-muted", !headings && "sr-only"), children: [
|
|
7673
|
+
/* @__PURE__ */ jsx101("span", { role: "columnheader", className: "min-w-0 flex-1 pl-7", children: nameLabel }),
|
|
7664
7674
|
columns.map(
|
|
7665
7675
|
(column) => showsColumn(column, shown2) ? /* @__PURE__ */ jsx101("span", { role: "columnheader", className: cn("shrink-0 truncate", WIDTH_CLASSES[sizeOf(column)]), children: column.label }, column.label) : null
|
|
7666
7676
|
),
|
|
@@ -7674,8 +7684,9 @@ function ListTableRow({ href, label, description, icon, cells, end, onClick, ...
|
|
|
7674
7684
|
if (!table) throw new Error("ListTableRow is a row of a ListTable: put it inside one.");
|
|
7675
7685
|
return (
|
|
7676
7686
|
// A row's look in every list: 8px corners, the fill under the pointer and no edge.
|
|
7677
|
-
|
|
7678
|
-
|
|
7687
|
+
// 24px between the name and each fact, and before the end (Katerina, 17 November): they touched at 12.
|
|
7688
|
+
/* @__PURE__ */ jsxs78("div", { role: "row", className: "relative flex min-w-0 items-center gap-6 rounded-lg px-3 py-2 hover:bg-bg-hover", ...rest, children: [
|
|
7689
|
+
/* @__PURE__ */ jsxs78("span", { role: "cell", className: "flex min-w-0 flex-1 items-center gap-3", children: [
|
|
7679
7690
|
icon != null && /* @__PURE__ */ jsx101("span", { className: "flex shrink-0 items-center text-text-secondary", children: icon }),
|
|
7680
7691
|
/* @__PURE__ */ jsxs78(Link, { href, variant: "plain", cover: true, className: "flex min-w-0 flex-1 flex-col gap-0.5", ...onClick ? { onClick } : {}, children: [
|
|
7681
7692
|
/* @__PURE__ */ jsx101("span", { className: "truncate text-body-2 font-medium text-text-primary", children: label }),
|