@protobase/ui 0.10.0 → 0.11.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/app/app.js +54 -26
- package/dist/app/bottom-bar-from-meta.js +9 -2
- package/dist/app/breadcrumb-for.js +18 -9
- package/dist/app/create/create-page.js +12 -6
- package/dist/app/current-address.d.ts +26 -0
- package/dist/app/current-address.js +41 -0
- package/dist/app/custom-section.js +37 -0
- package/dist/app/displays/cards-display.js +76 -0
- package/dist/app/displays/custom-display.js +28 -0
- package/dist/app/displays/display-context.d.ts +21 -0
- package/dist/app/displays/display-context.js +21 -0
- package/dist/app/displays/display-controls.js +55 -0
- package/dist/app/displays/display-frame.js +30 -0
- package/dist/app/displays/list-displays.d.ts +11 -0
- package/dist/app/displays/list-displays.js +62 -0
- package/dist/app/displays/record-link.d.ts +19 -0
- package/dist/app/displays/record-link.js +25 -0
- package/dist/app/displays/use-display-rows.js +28 -0
- package/dist/app/field-editor.js +4 -4
- package/dist/app/list-page.js +87 -37
- package/dist/app/main.js +3 -2
- package/dist/app/nav-from-meta.js +9 -2
- package/dist/app/nav-recent.js +6 -2
- package/dist/app/pages/action-href.js +1 -3
- package/dist/app/pages/blocks/card-row.js +1 -1
- package/dist/app/pages/blocks/link.js +20 -11
- package/dist/app/pages/blocks/modal-form.js +1 -1
- package/dist/app/pages/blocks/record-card.js +1 -1
- package/dist/app/pages/blocks/stat.js +7 -4
- package/dist/app/pages/blocks/table.js +1 -1
- package/dist/app/pages/field-value.js +8 -4
- package/dist/app/pages/merge-ui.js +3 -1
- package/dist/app/pages/problem.js +10 -0
- package/dist/app/pages/project-ui.d.ts +12 -4
- package/dist/app/pages/record-actions.js +6 -3
- package/dist/app/pages/record-table.js +7 -3
- package/dist/app/pages/render-node.js +3 -6
- package/dist/app/pages/ui-from-module.d.ts +9 -0
- package/dist/app/pages/ui-from-module.js +23 -0
- package/dist/app/pages/use-run-action.js +7 -7
- package/dist/app/record-page.js +45 -22
- package/dist/app/related-section.js +1 -1
- package/dist/app/router.js +4 -20
- package/dist/app/search/search-model.js +6 -2
- package/dist/app/search/use-global-search.js +1 -1
- package/dist/app/use-app-address.d.ts +24 -0
- package/dist/app/use-app-address.js +47 -0
- package/dist/app/use-related-records.js +8 -2
- package/dist/app/user-menu-from-meta.js +9 -2
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -1
- package/dist/live/use-live-rows.js +7 -2
- package/dist/primitives/segmented.js +8 -5
- package/package.json +4 -4
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { cn } from "../lib/cn.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
//#region src/primitives/segmented.tsx
|
|
4
|
-
const Segmented = ({ value, options, onChange }) => /* @__PURE__ */ jsx("span", {
|
|
4
|
+
const Segmented = ({ value, options, onChange, label }) => /* @__PURE__ */ jsx("span", {
|
|
5
|
+
role: "group",
|
|
6
|
+
"aria-label": label,
|
|
5
7
|
className: "inline-flex h-7 rounded-md bg-muted p-0.5",
|
|
6
|
-
children: options.map((option) => /* @__PURE__ */
|
|
8
|
+
children: options.map((option) => /* @__PURE__ */ jsxs("button", {
|
|
7
9
|
type: "button",
|
|
10
|
+
"aria-pressed": option.value === value,
|
|
8
11
|
onClick: () => onChange(option.value),
|
|
9
|
-
className: cn("rounded px-2.5 text-xs font-medium transition-colors", option.value === value ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"),
|
|
10
|
-
children: option.label
|
|
12
|
+
className: cn("inline-flex items-center gap-1.5 rounded px-2.5 text-xs font-medium transition-colors", option.value === value ? "bg-background text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"),
|
|
13
|
+
children: [option.icon && /* @__PURE__ */ jsx(option.icon, { className: "size-3.5" }), option.label]
|
|
11
14
|
}, option.value))
|
|
12
15
|
});
|
|
13
16
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "The Protobase admin app and the React hooks and components for custom UI.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@dnd-kit/core": "^6.3.1",
|
|
36
36
|
"@dnd-kit/sortable": "^10.0.0",
|
|
37
|
-
"@protobase/client": "0.
|
|
38
|
-
"@protobase/layout": "0.
|
|
39
|
-
"@protobase/schema": "0.
|
|
37
|
+
"@protobase/client": "0.11.0",
|
|
38
|
+
"@protobase/layout": "0.11.0",
|
|
39
|
+
"@protobase/schema": "0.11.0",
|
|
40
40
|
"@tanstack/react-query": "^5.104.1",
|
|
41
41
|
"@tanstack/react-table": "^9.2.6",
|
|
42
42
|
"@tanstack/react-virtual": "^3.14.13",
|