@protobase/ui 0.14.4 → 0.14.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/activity-chart/activity-chart.js +1 -1
- package/dist/app/app.d.ts +2 -1
- package/dist/app/app.js +10 -3
- package/dist/app/displays/display-controls.js +1 -1
- package/dist/app/embedded-list/embedded-list.js +35 -27
- package/dist/app/index.html +10 -0
- package/dist/app/list-page.js +20 -3
- package/dist/app/menu-icons.js +2 -1
- package/dist/app/named-icon.js +3 -2
- package/dist/app/pages/blocks/field.js +2 -2
- package/dist/app/pages/blocks/progress.js +1 -1
- package/dist/app/pages/blocks/show.js +1 -1
- package/dist/app/pages/blocks/stat.js +2 -2
- package/dist/app/pages/blocks/table.js +1 -1
- package/dist/app/searches/save-search-button.js +44 -0
- package/dist/app/searches/saved-search-section.js +97 -0
- package/dist/app/searches/saved-search.js +94 -0
- package/dist/app/searches/saved-searches.js +107 -0
- package/dist/app/searches/search-controls.js +64 -0
- package/dist/app/searches/use-filter-chips.js +27 -0
- package/dist/app/searches/use-save-search.js +70 -0
- package/dist/app/searches/use-saved-searches.js +37 -0
- package/dist/app-shell/app-shell.js +4 -3
- package/dist/app-shell/drawer.js +1 -1
- package/dist/app-shell/logo.js +2 -2
- package/dist/app-shell/profile-menu.js +10 -2
- package/dist/app-shell/sidebar.js +3 -2
- package/dist/app-shell/theme-switch.js +41 -0
- package/dist/auth/auth-gate.js +0 -9
- package/dist/data-grid/data-grid.js +1 -1
- package/dist/live/use-filter-config.js +2 -6
- package/dist/live/view-fields.js +8 -1
- package/dist/package.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/responsive-dialog.d.ts +1 -2
- package/dist/primitives/responsive-dialog.js +11 -13
- package/dist/primitives/segmented.js +6 -2
- package/dist/primitives/sheet.js +39 -39
- package/dist/shell/assets/app-CYs0l-vz.js +66 -0
- package/dist/shell/assets/{index-DhgTXlZ3.js → index-BCqsBT_o.js} +1 -1
- package/dist/shell/assets/index-ibaHR5wQ.css +2 -0
- package/dist/shell/assets/{maplibre-gl-CKQN3M1I.js → maplibre-gl-CxevrnFA.js} +1 -1
- package/dist/shell/assets/{record-map-CzJ60-ux.js → record-map-Mn5aTqIF.js} +2 -2
- package/dist/shell/assets/{records-map-dch_o1ug.js → records-map-BdPiGjmg.js} +1 -1
- package/dist/shell/assets/{shared-protobase-ui-C-qDEeIK.js → shared-protobase-ui-CRhV6ipQ.js} +1 -1
- package/dist/shell/index.html +14 -4
- package/dist/shell/protobase.shell.json +1 -1
- package/dist/styles.css +5 -2
- package/dist/theme/theme-preference.js +23 -0
- package/dist/theme/theme-provider.js +43 -0
- package/dist/theme.css +4 -0
- package/dist/tokens.css +2 -0
- package/package.json +4 -5
- package/dist/shell/assets/app-CyW0VzOi.js +0 -66
- package/dist/shell/assets/index-DthLyPYI.css +0 -2
package/dist/primitives/sheet.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
+
import { useFocusTrap } from "../lib/use-focus-trap.js";
|
|
2
|
+
import { useRef } from "react";
|
|
1
3
|
import { X } from "lucide-react";
|
|
2
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Drawer } from "@base-ui/react/drawer";
|
|
4
5
|
//#region src/primitives/sheet.tsx
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
})
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
6
|
+
/** A panel that rises from the bottom of the screen, for the filter panel on phones. */
|
|
7
|
+
const Sheet = ({ title, open, onClose, children }) => {
|
|
8
|
+
const panel = useRef(null);
|
|
9
|
+
useFocusTrap(panel, open, onClose);
|
|
10
|
+
if (!open) return null;
|
|
11
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: "fixed inset-0 z-[80]",
|
|
13
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
14
|
+
className: "absolute inset-0 bg-backdrop/40",
|
|
15
|
+
onClick: onClose,
|
|
16
|
+
"aria-hidden": true
|
|
17
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
ref: panel,
|
|
19
|
+
role: "dialog",
|
|
20
|
+
"aria-modal": "true",
|
|
21
|
+
"aria-label": title,
|
|
22
|
+
tabIndex: -1,
|
|
23
|
+
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
|
+
children: [/* @__PURE__ */ jsxs("header", {
|
|
25
|
+
className: "flex shrink-0 items-center justify-between border-b px-4",
|
|
26
|
+
children: [/* @__PURE__ */ jsx("h2", {
|
|
27
|
+
className: "text-[15px] font-semibold",
|
|
28
|
+
children: title
|
|
29
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
"aria-label": "Close",
|
|
32
|
+
onClick: onClose,
|
|
33
|
+
className: "-mr-2 inline-flex size-11 items-center justify-center rounded-md text-muted-foreground hover:bg-muted",
|
|
34
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-5" })
|
|
35
|
+
})]
|
|
36
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
37
|
+
className: "min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-6",
|
|
38
|
+
children
|
|
39
|
+
})]
|
|
40
|
+
})]
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
43
|
//#endregion
|
|
44
44
|
export { Sheet };
|