@protobase/ui 0.19.11 → 0.19.13
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/app/list-page.js +14 -3
- package/dist/app/record-page.js +21 -30
- package/dist/app/related-dots/card-place.js +15 -0
- package/dist/app/related-dots/dot-card.js +26 -0
- package/dist/app/related-dots/dots-summary.js +15 -0
- package/dist/app/related-dots/related-dots-columns.js +38 -0
- package/dist/app/related-dots/related-dots.js +170 -0
- package/dist/live/grid-loader.js +15 -4
- package/dist/live/related-column-rows.js +70 -0
- package/dist/live/use-live-rows.js +6 -3
- package/dist/package.js +1 -1
- package/dist/primitives/badge.js +4 -3
- package/dist/record-view/record-header.js +50 -44
- package/dist/shell/assets/app-D65L8GHE.js +69 -0
- package/dist/shell/assets/index-DEEIUcYb.css +2 -0
- package/dist/shell/assets/{index-C15EeI8X.js → index-ztKNmFFb.js} +1 -1
- package/dist/shell/assets/{maplibre-CqK5gKEr.js → maplibre-CsiuejGw.js} +1 -1
- package/dist/shell/assets/{markdown-content-DS62HyvW.js → markdown-content-4BktGTHi.js} +1 -1
- package/dist/shell/assets/{record-map-Cp9MkzTk.js → record-map-De6U-Z0I.js} +1 -1
- package/dist/shell/assets/{records-map-BQm4s9Cw.js → records-map-DaIZwI2y.js} +1 -1
- package/dist/shell/assets/{shared-protobase-ui-Cqe5I8UQ.js → shared-protobase-ui-DdZuFJz6.js} +1 -1
- package/dist/shell/index.html +4 -4
- package/dist/shell/protobase.shell.json +1 -1
- package/package.json +4 -4
- package/dist/shell/assets/app-DQRL4UH0.js +0 -69
- package/dist/shell/assets/index-DxV5Rp_F.css +0 -2
|
@@ -2,49 +2,55 @@ import { AvatarStack } from "../primitives/avatar.js";
|
|
|
2
2
|
import { Badge } from "../primitives/badge.js";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
//#region src/record-view/record-header.tsx
|
|
5
|
-
const RecordHeader = ({ collection, title, status, lastEditedBy, presence = [], actions }) =>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* @__PURE__ */ jsxs("div", {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
children:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
5
|
+
const RecordHeader = ({ collection, title, titleHidden, status, lastEditedBy, presence = [], actions }) => {
|
|
6
|
+
if (titleHidden && !collection && !status && !lastEditedBy && presence.length === 0 && !actions) return /* @__PURE__ */ jsx("h1", {
|
|
7
|
+
className: "sr-only",
|
|
8
|
+
children: title
|
|
9
|
+
});
|
|
10
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
11
|
+
className: "flex flex-col gap-4 border-b border-border pb-6 md:flex-row md:items-end md:justify-between md:gap-6",
|
|
12
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [
|
|
13
|
+
collection && /* @__PURE__ */ jsx("p", {
|
|
14
|
+
className: "mb-1 text-xs text-muted-foreground",
|
|
15
|
+
children: collection
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "flex flex-wrap items-center gap-x-3 gap-y-1",
|
|
19
|
+
children: [/* @__PURE__ */ jsx("h1", {
|
|
20
|
+
className: titleHidden ? "sr-only" : "text-xl font-semibold tracking-tight text-foreground md:text-2xl",
|
|
21
|
+
children: title
|
|
22
|
+
}), status && /* @__PURE__ */ jsx(Badge, {
|
|
23
|
+
tone: status.tone,
|
|
24
|
+
children: status.label
|
|
25
|
+
})]
|
|
26
|
+
}),
|
|
27
|
+
lastEditedBy && /* @__PURE__ */ jsx("p", {
|
|
28
|
+
className: "mt-1.5 text-xs text-muted-foreground",
|
|
29
|
+
children: lastEditedBy.name ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30
|
+
"Last edited by ",
|
|
31
|
+
/* @__PURE__ */ jsx("span", {
|
|
32
|
+
className: "font-medium text-foreground",
|
|
33
|
+
children: lastEditedBy.name
|
|
34
|
+
}),
|
|
35
|
+
" ",
|
|
36
|
+
lastEditedBy.ago
|
|
37
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: ["Last updated ", lastEditedBy.ago] })
|
|
38
|
+
})
|
|
39
|
+
] }), /* @__PURE__ */ jsxs("div", {
|
|
40
|
+
className: "flex items-center gap-4",
|
|
41
|
+
children: [presence.length > 0 && /* @__PURE__ */ jsxs("span", {
|
|
42
|
+
className: "flex items-center gap-2 text-xs text-muted-foreground",
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ jsx(AvatarStack, {
|
|
45
|
+
people: presence,
|
|
46
|
+
size: "md"
|
|
47
|
+
}),
|
|
48
|
+
presence.length,
|
|
49
|
+
" viewing"
|
|
50
|
+
]
|
|
51
|
+
}), actions]
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
};
|
|
49
55
|
//#endregion
|
|
50
56
|
export { RecordHeader };
|