@magicvr/schema-ui-ui 0.1.3 → 0.1.4
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/components/data-table.js +5 -5
- package/components/ui/badge.js +1 -1
- package/components/ui/breadcrumbs.d.ts +1 -1
- package/components/ui/breadcrumbs.js +2 -2
- package/components/ui/button.js +1 -1
- package/components/ui/card.js +1 -1
- package/components/ui/index.d.ts +1 -1
- package/components/ui/input.js +1 -1
- package/components/ui/label.js +1 -1
- package/components/ui/skeleton.js +1 -1
- package/components/ui/textarea.js +1 -1
- package/package.json +2 -6
package/components/data-table.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Inbox } from "lucide-react";
|
|
3
|
-
import { resolveAsyncDisplayState } from "@magicvr/schema-ui-ui/components/ui/async-state";
|
|
4
|
-
import { Skeleton } from "@magicvr/schema-ui-ui/components/ui/skeleton";
|
|
5
|
-
import { useTranslate } from "@magicvr/schema-ui-lib/i18n/runtime";
|
|
6
|
-
import { formatDisplayTime } from "@magicvr/schema-ui-lib/lib/datetime";
|
|
7
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
3
|
+
import { resolveAsyncDisplayState } from "@magicvr/schema-ui-ui/components/ui/async-state.js";
|
|
4
|
+
import { Skeleton } from "@magicvr/schema-ui-ui/components/ui/skeleton.js";
|
|
5
|
+
import { useTranslate } from "@magicvr/schema-ui-lib/i18n/runtime.js";
|
|
6
|
+
import { formatDisplayTime } from "@magicvr/schema-ui-lib/lib/datetime.js";
|
|
7
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
8
8
|
function cellContent(column, row) {
|
|
9
9
|
if (column.render !== undefined) {
|
|
10
10
|
return column.render(row);
|
package/components/ui/badge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
3
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
4
4
|
const badgeVariants = cva("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
5
5
|
variants: {
|
|
6
6
|
variant: {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* "/" separators, brighter non-clickable current item, and an optional
|
|
16
16
|
* small circular ghost back button (semantic parent) at the far left.
|
|
17
17
|
*/
|
|
18
|
-
import { type MessageParams } from "@schema-ui
|
|
18
|
+
import { type MessageParams } from "@magicvr/schema-ui-lib/i18n/catalog.js";
|
|
19
19
|
export interface BreadcrumbEntry {
|
|
20
20
|
/** Page id (manifest pageId); group labels use the label text as key. */
|
|
21
21
|
pageId: string;
|
|
@@ -17,8 +17,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
* small circular ghost back button (semantic parent) at the far left.
|
|
18
18
|
*/
|
|
19
19
|
import { ArrowLeft } from "lucide-react";
|
|
20
|
-
import { useTranslate } from "@magicvr/schema-ui-lib/i18n/runtime";
|
|
21
|
-
import { resolveTextProp } from "@magicvr/schema-ui-lib/i18n/catalog";
|
|
20
|
+
import { useTranslate } from "@magicvr/schema-ui-lib/i18n/runtime.js";
|
|
21
|
+
import { resolveTextProp } from "@magicvr/schema-ui-lib/i18n/catalog.js";
|
|
22
22
|
export function Breadcrumbs({ entries, onNavigate, onBack, showBack = false, }) {
|
|
23
23
|
const t = useTranslate();
|
|
24
24
|
const hasTrail = entries.length > 1;
|
package/components/ui/button.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
5
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
6
6
|
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", {
|
|
7
7
|
variants: {
|
|
8
8
|
variant: {
|
package/components/ui/card.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
3
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
4
4
|
const Card = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("rounded-lg border border-border bg-card text-card-foreground shadow-sm", className), ...props })));
|
|
5
5
|
Card.displayName = "Card";
|
|
6
6
|
const CardHeader = React.forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn("flex flex-col space-y-1.5 p-6", className), ...props })));
|
package/components/ui/index.d.ts
CHANGED
package/components/ui/input.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
3
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
4
4
|
const Input = React.forwardRef(({ className, type, ...props }, ref) => {
|
|
5
5
|
return (_jsx("input", { type: type, className: cn("flex h-9 w-full rounded-md border border-input/80 bg-background px-3 py-1 text-sm shadow-sm transition-all duration-150 file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/50 hover:border-muted-foreground/30 focus-visible:outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
|
|
6
6
|
});
|
package/components/ui/label.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
3
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
4
4
|
const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx("label", { ref: ref, className: cn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", className), ...props })));
|
|
5
5
|
Label.displayName = "Label";
|
|
6
6
|
export { Label };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
2
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
3
3
|
function Skeleton({ className, ...props }) {
|
|
4
4
|
return (_jsx("div", { className: cn("animate-pulse rounded-md bg-primary/10", className), ...props }));
|
|
5
5
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import { cn } from "@magicvr/schema-ui-lib/lib/utils";
|
|
3
|
+
import { cn } from "@magicvr/schema-ui-lib/lib/utils.js";
|
|
4
4
|
const Textarea = React.forwardRef(({ className, ...props }, ref) => {
|
|
5
5
|
return (_jsx("textarea", { className: cn("flex min-h-[60px] w-full rounded-md border border-input/80 bg-background px-3 py-2 text-sm shadow-sm transition-all duration-150 placeholder:text-muted-foreground/50 hover:border-muted-foreground/30 focus-visible:outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/20 disabled:cursor-not-allowed disabled:opacity-50", className), ref: ref, ...props }));
|
|
6
6
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicvr/schema-ui-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "schema-ui-core 包面(ui)",
|
|
6
6
|
"main": "components/ui/index.js",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "components/ui/index.d.ts",
|
|
11
|
-
"import": "
|
|
11
|
+
"import": "components/ui/index.js"
|
|
12
12
|
},
|
|
13
13
|
"./*": "./*"
|
|
14
14
|
},
|
|
@@ -19,10 +19,6 @@
|
|
|
19
19
|
"lib"
|
|
20
20
|
],
|
|
21
21
|
"license": "UNLICENSED",
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"react": "^19.0.0",
|
|
24
|
-
"react-dom": "^19.0.0"
|
|
25
|
-
},
|
|
26
22
|
"publishConfig": {
|
|
27
23
|
"access": "public"
|
|
28
24
|
}
|