@protobase/ui 0.19.4 → 0.19.6
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/account/account-section.js +2 -2
- package/dist/account/account-security-page.js +2 -2
- package/dist/account/backup-codes.js +3 -10
- package/dist/account/passkeys-section.js +2 -2
- package/dist/account/password-dialog.js +1 -1
- package/dist/account/sign-in-policy-form.js +2 -2
- package/dist/account/sign-in-policy-page.js +2 -2
- package/dist/account/sign-in-providers-section.js +1 -1
- package/dist/account/staff-sign-in-log.js +3 -3
- package/dist/account/two-factor-setup.js +6 -6
- package/dist/action-card/action-card.js +1 -1
- package/dist/activity-chart/activity-chart.js +2 -2
- package/dist/app/delete/dialogs.js +3 -3
- package/dist/app/displays/display-controls.js +1 -1
- package/dist/app/displays/display-frame.js +1 -1
- package/dist/app/displays/list-cards.js +1 -1
- package/dist/app/displays/list-displays.js +2 -1
- package/dist/app/displays/map-display.js +1 -1
- package/dist/app/displays/record-card.js +1 -1
- package/dist/app/embedded-list/embedded-list.js +2 -2
- package/dist/app/error-banner.js +1 -1
- package/dist/app/field-editor.js +6 -12
- package/dist/app/file-field.js +4 -4
- package/dist/app/filled-fields.js +5 -0
- package/dist/app/gallery/details-open-storage.js +10 -0
- package/dist/app/gallery/gallery-layout.js +3 -1
- package/dist/app/gallery/lightbox.js +107 -61
- package/dist/app/gallery/photo-details.js +1 -1
- package/dist/app/import/convert.js +151 -0
- package/dist/app/import/csv-parser.js +119 -0
- package/dist/app/import/failed-rows.js +21 -0
- package/dist/app/import/import-button.js +31 -0
- package/dist/app/import/import-check-step.js +123 -0
- package/dist/app/import/import-counts.js +19 -0
- package/dist/app/import/import-dialog.js +152 -0
- package/dist/app/import/import-file-step.js +65 -0
- package/dist/app/import/import-mapping-step.js +195 -0
- package/dist/app/import/import-result-step.js +86 -0
- package/dist/app/import/import-select.js +35 -0
- package/dist/app/import/locale-formats.js +15 -0
- package/dist/app/import/lookups.js +48 -0
- package/dist/app/import/mapping.js +78 -0
- package/dist/app/import/parse-worker.d.ts +1 -0
- package/dist/app/import/parse-worker.js +39 -0
- package/dist/app/import/prepare-rows.js +129 -0
- package/dist/app/import/run-import.js +130 -0
- package/dist/app/import/sheet-cell.js +17 -0
- package/dist/app/import/sheet-file.js +58 -0
- package/dist/app/import/sheet-source.js +72 -0
- package/dist/app/import/use-import-flow.js +225 -0
- package/dist/app/import/xlsx-reader.js +43 -0
- package/dist/app/import/xlsx-xml.js +169 -0
- package/dist/app/import/zip-reader.js +72 -0
- package/dist/app/list-page.js +8 -1
- package/dist/app/meta-gate.js +3 -3
- package/dist/app/named-icon.js +9 -1
- package/dist/app/pages/blocks/card-frame.js +4 -4
- package/dist/app/pages/blocks/field.js +2 -5
- package/dist/app/pages/blocks/stat.js +2 -2
- package/dist/app/pages/problem.js +1 -1
- package/dist/app/pages/render-node.js +1 -1
- package/dist/app/record-page.js +13 -4
- package/dist/app/record-row/record-row-body.js +3 -3
- package/dist/app/record-row/saved-record-row.js +1 -1
- package/dist/app/related-section.js +1 -1
- package/dist/app/relation-picker.js +1 -1
- package/dist/app/runtime/runtime-update.js +3 -3
- package/dist/app/saved/saved-list.js +1 -1
- package/dist/app/searches/saved-search-rows.js +2 -2
- package/dist/app/searches/saved-search-section.js +1 -1
- package/dist/app/searches/saved-searches.js +1 -1
- package/dist/app/searches/search-controls.js +2 -2
- package/dist/app/searches/search-name-dialog.js +1 -1
- package/dist/app/searches/update-search-dialog.js +16 -19
- package/dist/app/sensitive-field.js +1 -1
- package/dist/app/source-notice.js +3 -3
- package/dist/app/staff-banner.js +1 -1
- package/dist/app-shell/breadcrumb.js +1 -1
- package/dist/app-shell/global-search.js +1 -1
- package/dist/app-shell/page-header.js +1 -1
- package/dist/app-shell/profile-menu.js +3 -3
- package/dist/app-shell/sidebar-group.js +1 -1
- package/dist/app-shell/sidebar-item.js +1 -1
- package/dist/app-shell/sidebar.js +2 -2
- package/dist/assistant-dock/part-view.js +1 -4
- package/dist/assistant-dock/widget-view.js +1 -4
- package/dist/auth/auth-gate.js +2 -2
- package/dist/auth/auth-layout.js +1 -1
- package/dist/auth/code-form.js +2 -2
- package/dist/auth/first-run-page.js +1 -1
- package/dist/auth/forgot-password-form.js +2 -2
- package/dist/auth/provider-sign-in-page.js +1 -1
- package/dist/auth/reset-password-form.js +3 -3
- package/dist/auth/setup-required-form.js +2 -2
- package/dist/auth/setup-required-page.js +1 -1
- package/dist/auth/sign-in-form.js +5 -5
- package/dist/auth/sign-in-prompt.js +3 -3
- package/dist/auth/sign-up-details-form.js +3 -3
- package/dist/auth/sign-up-email-form.js +4 -4
- package/dist/auth/staff-sign-in-form.js +3 -3
- package/dist/auth/two-factor-form.js +5 -5
- package/dist/chat/chat-message.js +1 -1
- package/dist/chat/chat-thread.js +1 -1
- package/dist/data/api-provider.js +8 -2
- package/dist/data-grid/grid-row.js +1 -1
- package/dist/data-grid/header-menu.js +1 -1
- package/dist/data-grid/row-menu.js +1 -1
- package/dist/filter-panel/facet-combobox.js +1 -1
- package/dist/filter-panel/filter-menu.js +1 -1
- package/dist/filter-panel/filter-panel.js +2 -2
- package/dist/inline-child-table/line-menu.js +1 -1
- package/dist/inline-child-table/line-row.js +4 -4
- package/dist/inline-child-table/number-cell.js +1 -1
- package/dist/inline-child-table/totals-footer.js +2 -2
- package/dist/lib/save-file.js +12 -0
- package/dist/lib/use-focus-trap.js +7 -1
- package/dist/organizations/app-roles-picker.js +1 -1
- package/dist/organizations/invitation-page.js +3 -3
- package/dist/organizations/invitations-page.js +2 -2
- package/dist/organizations/members-page.js +2 -2
- package/dist/organizations/organization-page.js +1 -1
- package/dist/organizations/organizations-page.js +2 -2
- package/dist/package.js +1 -1
- package/dist/plugins/before-sign-in.js +1 -1
- package/dist/plugins/plugin-gate.js +1 -1
- package/dist/plugins/plugin-notice.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/dialog.js +2 -2
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu-select.js +2 -2
- package/dist/primitives/responsive-dialog.js +1 -1
- package/dist/primitives/segmented.js +1 -1
- package/dist/primitives/sheet-swipe.js +5 -0
- package/dist/primitives/sheet.js +40 -12
- package/dist/primitives/textarea.js +1 -1
- package/dist/record-view/action-rail.js +1 -1
- package/dist/record-view/field.js +1 -1
- package/dist/record-view/key-facts.js +29 -0
- package/dist/record-view/record-sidebar.js +2 -2
- package/dist/record-view/section.js +2 -2
- package/dist/record-view/spec-table.js +1 -1
- package/dist/shell/assets/app-DwKzLvfm.js +67 -0
- package/dist/shell/assets/index-CwhnZIJp.css +2 -0
- package/dist/shell/assets/{index-CEvfMgFJ.js → index-Dqgcyg7M.js} +1 -1
- package/dist/shell/assets/{maplibre-D6zfLfTV.js → maplibre-BWjNhvrH.js} +1 -1
- package/dist/shell/assets/parse-worker-BtcY0dQw.js +5 -0
- package/dist/shell/assets/{record-map-B6_rbCcG.js → record-map-m5K2uttt.js} +1 -1
- package/dist/shell/assets/{records-map-bQbuIc13.js → records-map-CA_JG9RR.js} +1 -1
- package/dist/shell/assets/{shared-protobase-ui-8pJgwjfc.js → shared-protobase-ui-BBqKlVLh.js} +1 -1
- package/dist/shell/index.html +4 -4
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/side-panel/side-panel.js +1 -1
- package/dist/step-list/step-list.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +2 -0
- package/dist/toasts/toast.js +2 -2
- package/package.json +4 -4
- package/dist/shell/assets/app-BYFiTXK6.js +0 -66
- package/dist/shell/assets/index-CiGP6kle.css +0 -2
|
@@ -46,7 +46,7 @@ const MenuSelect = ({ value, options, onChange, label }) => {
|
|
|
46
46
|
"aria-haspopup": "menu",
|
|
47
47
|
"aria-expanded": open,
|
|
48
48
|
onClick: () => setOpen(!open),
|
|
49
|
-
className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-border-strong bg-background px-2.5 text-
|
|
49
|
+
className: "inline-flex h-8 items-center gap-1.5 rounded-md border border-border-strong bg-background px-2.5 text-body font-medium shadow-sm transition-colors hover:bg-muted pointer-coarse:h-11",
|
|
50
50
|
children: [
|
|
51
51
|
current?.icon && /* @__PURE__ */ jsx(current.icon, { className: "size-3.5" }),
|
|
52
52
|
current?.label ?? label,
|
|
@@ -56,7 +56,7 @@ const MenuSelect = ({ value, options, onChange, label }) => {
|
|
|
56
56
|
role: "menu",
|
|
57
57
|
"aria-label": label,
|
|
58
58
|
onKeyDown,
|
|
59
|
-
className: "absolute right-0 top-full z-30 mt-1 min-w-40 rounded-md border bg-background py-1 text-
|
|
59
|
+
className: "absolute right-0 top-full z-30 mt-1 min-w-40 rounded-md border bg-background py-1 text-body shadow-pop",
|
|
60
60
|
children: options.map((option, index) => /* @__PURE__ */ jsx("li", {
|
|
61
61
|
role: "none",
|
|
62
62
|
children: /* @__PURE__ */ jsxs("button", {
|
|
@@ -23,7 +23,7 @@ const ResponsiveDialog = ({ title, description, open, onClose, actions, children
|
|
|
23
23
|
open: true,
|
|
24
24
|
onClose,
|
|
25
25
|
children: /* @__PURE__ */ jsxs("div", {
|
|
26
|
-
className: "pt-3
|
|
26
|
+
className: "pt-3",
|
|
27
27
|
children: [
|
|
28
28
|
description && /* @__PURE__ */ jsx("p", {
|
|
29
29
|
className: "text-muted-foreground",
|
package/dist/primitives/sheet.js
CHANGED
|
@@ -1,13 +1,31 @@
|
|
|
1
1
|
import { useFocusTrap } from "../lib/use-focus-trap.js";
|
|
2
|
+
import { closesSheet } from "./sheet-swipe.js";
|
|
2
3
|
import { useRef } from "react";
|
|
3
4
|
import { X } from "lucide-react";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
//#region src/primitives/sheet.tsx
|
|
6
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* A panel that rises from the bottom of the screen, for the filter panel on mobile screens. It closes on Escape, the
|
|
9
|
+
* close button, a press above it and a swipe down on its header. Its content scrolls inside it when taller than the
|
|
10
|
+
* panel, which stops short of the top so the screen behind stays in sight.
|
|
11
|
+
*/
|
|
7
12
|
const Sheet = ({ title, open, onClose, children }) => {
|
|
8
13
|
const panel = useRef(null);
|
|
14
|
+
const start = useRef(void 0);
|
|
9
15
|
useFocusTrap(panel, open, onClose);
|
|
10
16
|
if (!open) return null;
|
|
17
|
+
const down = (event) => {
|
|
18
|
+
if (event.pointerType === "touch") start.current = {
|
|
19
|
+
x: event.clientX,
|
|
20
|
+
y: event.clientY
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
const up = (event) => {
|
|
24
|
+
if (!start.current) return;
|
|
25
|
+
const closes = closesSheet(event.clientX - start.current.x, event.clientY - start.current.y);
|
|
26
|
+
start.current = void 0;
|
|
27
|
+
if (closes) onClose();
|
|
28
|
+
};
|
|
11
29
|
return /* @__PURE__ */ jsxs("div", {
|
|
12
30
|
className: "fixed inset-0 z-[80]",
|
|
13
31
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -22,17 +40,27 @@ const Sheet = ({ title, open, onClose, children }) => {
|
|
|
22
40
|
tabIndex: -1,
|
|
23
41
|
className: "absolute inset-x-0 bottom-0 flex max-h-[85vh] flex-col rounded-t-xl border-t bg-background shadow-pop outline-none",
|
|
24
42
|
children: [/* @__PURE__ */ jsxs("header", {
|
|
25
|
-
className: "flex shrink-0 items-center justify-between border-b px-4",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
43
|
+
className: "relative flex shrink-0 touch-none items-center justify-between border-b px-4",
|
|
44
|
+
onPointerDown: down,
|
|
45
|
+
onPointerUp: up,
|
|
46
|
+
onPointerCancel: () => start.current = void 0,
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx("span", {
|
|
49
|
+
className: "absolute left-1/2 top-1.5 h-1 w-9 -translate-x-1/2 rounded-full bg-border-strong",
|
|
50
|
+
"aria-hidden": true
|
|
51
|
+
}),
|
|
52
|
+
/* @__PURE__ */ jsx("h2", {
|
|
53
|
+
className: "text-[16px] font-semibold",
|
|
54
|
+
children: title
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ jsx("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
"aria-label": "Close",
|
|
59
|
+
onClick: onClose,
|
|
60
|
+
className: "-mr-2 inline-flex size-11 items-center justify-center rounded-md text-muted-foreground hover:bg-muted",
|
|
61
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-5" })
|
|
62
|
+
})
|
|
63
|
+
]
|
|
36
64
|
}), /* @__PURE__ */ jsx("div", {
|
|
37
65
|
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-6",
|
|
38
66
|
children
|
|
@@ -28,7 +28,7 @@ const Textarea = ({ invalid, className, rows = 3, value, ...rest }) => {
|
|
|
28
28
|
ref,
|
|
29
29
|
rows,
|
|
30
30
|
value,
|
|
31
|
-
className: cn("block w-full resize-none overflow-hidden rounded-md border bg-background px-2.5 py-1.5 text-
|
|
31
|
+
className: cn("block w-full resize-none overflow-hidden rounded-md border bg-background px-2.5 py-1.5 text-body text-foreground shadow-sm outline-none placeholder:text-faint-foreground focus:border-primary focus:ring-2 focus:ring-primary/20", invalid ? "border-danger" : "border-border-strong", className),
|
|
32
32
|
...rest
|
|
33
33
|
});
|
|
34
34
|
};
|
|
@@ -15,7 +15,7 @@ const ActionRail = ({ actions }) => /* @__PURE__ */ jsxs("div", {
|
|
|
15
15
|
className: cn("size-4 shrink-0 md:mt-0.5", tone === "danger" ? "text-danger-text" : "text-muted-foreground"),
|
|
16
16
|
"aria-hidden": true
|
|
17
17
|
}), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
-
className: cn("block
|
|
18
|
+
className: cn("block font-medium", tone === "danger" ? "text-danger-text" : "text-foreground"),
|
|
19
19
|
children: name
|
|
20
20
|
}), description && /* @__PURE__ */ jsx("span", {
|
|
21
21
|
className: "mt-0.5 hidden text-xs leading-snug text-muted-foreground md:block",
|
|
@@ -9,7 +9,7 @@ const Field = ({ label, required, help, example, error, conflict, wide, children
|
|
|
9
9
|
/* @__PURE__ */ jsxs("div", {
|
|
10
10
|
className: "mb-1.5 flex items-center gap-2",
|
|
11
11
|
children: [/* @__PURE__ */ jsxs("label", {
|
|
12
|
-
className: "
|
|
12
|
+
className: "font-medium text-foreground",
|
|
13
13
|
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
14
14
|
className: "ml-0.5 text-danger-text",
|
|
15
15
|
"aria-label": "required",
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
//#region src/record-view/key-facts.tsx
|
|
3
|
+
/**
|
|
4
|
+
* A record's key facts side by side, as the bedrooms, area and energy label of a listing on a real estate site: each
|
|
5
|
+
* value under its icon, or under its label without one, wrapping onto more rows as needed, two to a row on a mobile
|
|
6
|
+
* screen.
|
|
7
|
+
*/
|
|
8
|
+
const KeyFacts = ({ facts }) => /* @__PURE__ */ jsx("dl", {
|
|
9
|
+
className: "grid grid-cols-2 gap-x-4 gap-y-5 sm:flex sm:flex-wrap sm:gap-x-10",
|
|
10
|
+
children: facts.map(({ label, value, icon: Icon }) => /* @__PURE__ */ jsxs("div", {
|
|
11
|
+
title: label,
|
|
12
|
+
className: "flex min-w-0 flex-col gap-1.5",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
14
|
+
className: "text-muted-foreground",
|
|
15
|
+
children: Icon ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Icon, {
|
|
16
|
+
className: "size-5",
|
|
17
|
+
"aria-hidden": true
|
|
18
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "sr-only",
|
|
20
|
+
children: label
|
|
21
|
+
})] }) : label
|
|
22
|
+
}), /* @__PURE__ */ jsx("dd", {
|
|
23
|
+
className: "min-w-0 break-words text-[16px] font-semibold text-foreground",
|
|
24
|
+
children: value
|
|
25
|
+
})]
|
|
26
|
+
}, label))
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { KeyFacts };
|
|
@@ -2,7 +2,7 @@ import { ChevronRight } from "lucide-react";
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
//#region src/record-view/record-sidebar.tsx
|
|
4
4
|
const MetadataList = ({ rows }) => /* @__PURE__ */ jsx("dl", {
|
|
5
|
-
className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-2
|
|
5
|
+
className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-2",
|
|
6
6
|
children: rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
7
7
|
className: "contents",
|
|
8
8
|
children: [/* @__PURE__ */ jsx("dt", {
|
|
@@ -31,7 +31,7 @@ const RelatedRecords = ({ records, onNavigate }) => /* @__PURE__ */ jsx("ul", {
|
|
|
31
31
|
children: record.kind
|
|
32
32
|
}),
|
|
33
33
|
/* @__PURE__ */ jsx("span", {
|
|
34
|
-
className: "block truncate
|
|
34
|
+
className: "block truncate font-medium text-primary-text",
|
|
35
35
|
children: record.label
|
|
36
36
|
}),
|
|
37
37
|
record.meta && /* @__PURE__ */ jsx("span", {
|
|
@@ -3,7 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
/** A titled part of the record page; `actions` sit at the end of the title's line. */
|
|
4
4
|
const Section = ({ title, help, actions, children }) => {
|
|
5
5
|
const heading = /* @__PURE__ */ jsx("h2", {
|
|
6
|
-
className: "text-[
|
|
6
|
+
className: "text-[16px] font-semibold text-foreground",
|
|
7
7
|
children: title
|
|
8
8
|
});
|
|
9
9
|
return /* @__PURE__ */ jsxs("section", {
|
|
@@ -14,7 +14,7 @@ const Section = ({ title, help, actions, children }) => {
|
|
|
14
14
|
children: [heading, actions]
|
|
15
15
|
}) : heading,
|
|
16
16
|
help && /* @__PURE__ */ jsx("p", {
|
|
17
|
-
className: "mt-1 max-w-xl
|
|
17
|
+
className: "mt-1 max-w-xl leading-6 text-muted-foreground",
|
|
18
18
|
children: help
|
|
19
19
|
}),
|
|
20
20
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -6,7 +6,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
* site: what a record page's section shows on its read view. A wide row puts its value under the label.
|
|
7
7
|
*/
|
|
8
8
|
const SpecTable = ({ rows }) => /* @__PURE__ */ jsx("dl", {
|
|
9
|
-
className: "border-t border-border
|
|
9
|
+
className: "border-t border-border",
|
|
10
10
|
children: rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
11
11
|
className: cn("grid gap-x-4 border-b border-border py-2.5", row.wide ? "grid-cols-1 gap-y-1.5" : "grid-cols-[minmax(0,2fr)_minmax(0,3fr)]"),
|
|
12
12
|
children: [/* @__PURE__ */ jsxs("dt", {
|