@tangle-network/sandbox-ui 0.36.0 → 0.37.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/{chunk-Y2G5LHYJ.js → chunk-4PCDRCDA.js} +4 -2
- package/dist/{chunk-QHIA75U3.js → chunk-4ZZUMXPX.js} +11 -5
- package/dist/dashboard.d.ts +6 -0
- package/dist/dashboard.js +2 -2
- package/dist/index.js +2 -2
- package/dist/pages.js +1 -1
- package/dist/primitives.d.ts +23 -8
- package/dist/primitives.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Button,
|
|
3
3
|
Logo
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4ZZUMXPX.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
7
|
} from "./chunk-EI44GEQ5.js";
|
|
@@ -1498,6 +1498,7 @@ function DashboardLayoutInner({
|
|
|
1498
1498
|
LinkComponent = DefaultLink2,
|
|
1499
1499
|
logoHref = "/",
|
|
1500
1500
|
onLogoClick,
|
|
1501
|
+
logoAriaLabel = "Toggle navigation",
|
|
1501
1502
|
labeledRail = false,
|
|
1502
1503
|
footer,
|
|
1503
1504
|
railFooter,
|
|
@@ -1540,7 +1541,7 @@ function DashboardLayoutInner({
|
|
|
1540
1541
|
{
|
|
1541
1542
|
type: "button",
|
|
1542
1543
|
onClick: onLogoClick,
|
|
1543
|
-
"aria-label":
|
|
1544
|
+
"aria-label": logoAriaLabel,
|
|
1544
1545
|
className: "p-1 rounded-md transition-colors hover:bg-muted/50",
|
|
1545
1546
|
children: /* @__PURE__ */ jsx14(Logo, { variant, size: "sm", iconOnly: true })
|
|
1546
1547
|
}
|
|
@@ -1617,6 +1618,7 @@ function DashboardLayoutInner({
|
|
|
1617
1618
|
Link,
|
|
1618
1619
|
variant,
|
|
1619
1620
|
onLogoClick,
|
|
1621
|
+
logoAriaLabel,
|
|
1620
1622
|
logoHref,
|
|
1621
1623
|
labeledRail,
|
|
1622
1624
|
toggleRail,
|
|
@@ -148,8 +148,11 @@ function Logo({ variant = "sandbox", size = "md", className, iconOnly = false })
|
|
|
148
148
|
Logo.displayName = "Logo";
|
|
149
149
|
|
|
150
150
|
// src/primitives/heading.tsx
|
|
151
|
+
import {
|
|
152
|
+
forwardRef
|
|
153
|
+
} from "react";
|
|
151
154
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
152
|
-
var
|
|
155
|
+
var VARIANT_CLASS = {
|
|
153
156
|
display: "font-display font-bold text-foreground text-[length:var(--font-size-display,3rem)] leading-[var(--line-height-display,1.05)] tracking-[var(--tracking-tight,-0.02em)]",
|
|
154
157
|
hero: "font-display font-bold text-foreground text-[length:var(--font-size-hero,2.5rem)] leading-[1.1] tracking-[var(--tracking-tight,-0.02em)]",
|
|
155
158
|
page: "font-display font-semibold text-foreground text-[length:var(--font-size-3xl,1.875rem)] leading-[var(--line-height-heading,1.15)] tracking-[var(--tracking-tight,-0.02em)]",
|
|
@@ -165,10 +168,10 @@ var DEFAULT_TAG = {
|
|
|
165
168
|
subsection: "h3",
|
|
166
169
|
eyebrow: "p"
|
|
167
170
|
};
|
|
168
|
-
|
|
171
|
+
var Heading = forwardRef(function Heading2({ role, as, className, children, ...rest }, ref) {
|
|
169
172
|
const Tag = as ?? DEFAULT_TAG[role];
|
|
170
|
-
return /* @__PURE__ */ jsx2(Tag, { className: cn(
|
|
171
|
-
}
|
|
173
|
+
return /* @__PURE__ */ jsx2(Tag, { ref, className: cn(VARIANT_CLASS[role], className), ...rest, children });
|
|
174
|
+
});
|
|
172
175
|
function PageHeader({
|
|
173
176
|
title,
|
|
174
177
|
description,
|
|
@@ -218,8 +221,11 @@ function SectionTitle({
|
|
|
218
221
|
}
|
|
219
222
|
);
|
|
220
223
|
}
|
|
224
|
+
|
|
225
|
+
// src/primitives/page-shell.tsx
|
|
226
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
221
227
|
function PageShell({ children, className }) {
|
|
222
|
-
return /* @__PURE__ */
|
|
228
|
+
return /* @__PURE__ */ jsx3(
|
|
223
229
|
"div",
|
|
224
230
|
{
|
|
225
231
|
className: cn(
|
package/dist/dashboard.d.ts
CHANGED
|
@@ -665,6 +665,12 @@ interface DashboardLayoutProps {
|
|
|
665
665
|
* navigating — e.g. to toggle the sidebar. Takes precedence over logoHref.
|
|
666
666
|
*/
|
|
667
667
|
onLogoClick?: () => void;
|
|
668
|
+
/**
|
|
669
|
+
* Accessible label for the logo button when onLogoClick is set. Defaults to
|
|
670
|
+
* "Toggle navigation"; set it to match what onLogoClick actually does (e.g.
|
|
671
|
+
* "Open command palette") so screen readers don't announce a stale action.
|
|
672
|
+
*/
|
|
673
|
+
logoAriaLabel?: string;
|
|
668
674
|
/**
|
|
669
675
|
* Let the icon rail expand to a labeled rail. When true, the rail logo
|
|
670
676
|
* toggles between icon-only and labeled instead of navigating.
|
package/dist/dashboard.js
CHANGED
|
@@ -52,7 +52,7 @@ import {
|
|
|
52
52
|
canAdminSandbox,
|
|
53
53
|
parseInsufficientBalance,
|
|
54
54
|
useSidebar
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-4PCDRCDA.js";
|
|
56
56
|
import {
|
|
57
57
|
BillingDashboard,
|
|
58
58
|
InfoPanel,
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
UsageChart,
|
|
62
62
|
formatPrice
|
|
63
63
|
} from "./chunk-2XNT74ZX.js";
|
|
64
|
-
import "./chunk-
|
|
64
|
+
import "./chunk-4ZZUMXPX.js";
|
|
65
65
|
import {
|
|
66
66
|
BackendSelector,
|
|
67
67
|
HARNESS_BRAND,
|
package/dist/index.js
CHANGED
|
@@ -199,7 +199,7 @@ import {
|
|
|
199
199
|
canAdminSandbox,
|
|
200
200
|
parseInsufficientBalance,
|
|
201
201
|
useSidebar
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-4PCDRCDA.js";
|
|
203
203
|
import {
|
|
204
204
|
BillingDashboard,
|
|
205
205
|
InfoPanel,
|
|
@@ -294,7 +294,7 @@ import {
|
|
|
294
294
|
buttonVariants,
|
|
295
295
|
useTheme,
|
|
296
296
|
useToast
|
|
297
|
-
} from "./chunk-
|
|
297
|
+
} from "./chunk-4ZZUMXPX.js";
|
|
298
298
|
import {
|
|
299
299
|
BackendSelector,
|
|
300
300
|
HARNESS_BRAND,
|
package/dist/pages.js
CHANGED
package/dist/primitives.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Button, ButtonProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CodeBlock, CodeBlockProps, CopyButton, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, InlineCode, InlineCodeProps, Input, InputProps, Label, Progress, SegmentedControl, SegmentedControlOption, SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, Textarea, TextareaProps, ThemeToggle, Toast, ToastContainer, ToastProvider, UploadFile, UploadProgress, UploadProgressProps, badgeVariants, buttonVariants, useTheme, useToast } from '@tangle-network/ui/primitives';
|
|
2
2
|
export { L as Logo, a as LogoProps, T as TangleKnot } from './logo-CZ6moVvw.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { HTMLAttributes, ElementType, ReactNode } from 'react';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Canonical type roles for the Tangle design system. Every title in every
|
|
@@ -13,17 +14,28 @@ import { ElementType, ReactNode } from 'react';
|
|
|
13
14
|
*
|
|
14
15
|
* Weights are deliberately quiet (Tangle Quiet): heroes at 700, titles at 600
|
|
15
16
|
* — never extrabold.
|
|
17
|
+
*
|
|
18
|
+
* Semantic-tag invariant: both `display` and `page` default to <h1>. Use at
|
|
19
|
+
* most one of them per page (the marketing hero OR the dashboard page title);
|
|
20
|
+
* if a page needs both, override the secondary one with `as` to keep a single
|
|
21
|
+
* <h1> for accessibility and SEO.
|
|
16
22
|
*/
|
|
17
|
-
type
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
type HeadingVariant = "display" | "hero" | "page" | "section" | "subsection" | "eyebrow";
|
|
24
|
+
/** @deprecated Renamed to {@link HeadingVariant}; kept as an alias. */
|
|
25
|
+
type HeadingRole = HeadingVariant;
|
|
26
|
+
interface HeadingProps extends Omit<HTMLAttributes<HTMLElement>, "role"> {
|
|
27
|
+
/** Type role from the design system (size + weight + tracking + leading). */
|
|
28
|
+
role: HeadingVariant;
|
|
20
29
|
/** Override the rendered element (defaults to the semantic tag for the role). */
|
|
21
30
|
as?: ElementType;
|
|
22
|
-
className?: string;
|
|
23
31
|
children: ReactNode;
|
|
24
|
-
id?: string;
|
|
25
32
|
}
|
|
26
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Role-based heading. Forwards a ref to the underlying element and passes
|
|
35
|
+
* through standard HTML/ARIA/data-* attributes so it drops into tests,
|
|
36
|
+
* scroll-spy, and a11y tooling without friction.
|
|
37
|
+
*/
|
|
38
|
+
declare const Heading: React.ForwardRefExoticComponent<HeadingProps & React.RefAttributes<HTMLElement>>;
|
|
27
39
|
interface PageHeaderProps {
|
|
28
40
|
title: ReactNode;
|
|
29
41
|
description?: ReactNode;
|
|
@@ -48,6 +60,7 @@ interface SectionTitleProps {
|
|
|
48
60
|
}
|
|
49
61
|
/** Section heading inside a page — smaller than PageHeader, same rhythm. */
|
|
50
62
|
declare function SectionTitle({ title, description, action, className, }: SectionTitleProps): react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
51
64
|
interface PageShellProps {
|
|
52
65
|
children: ReactNode;
|
|
53
66
|
className?: string;
|
|
@@ -55,7 +68,9 @@ interface PageShellProps {
|
|
|
55
68
|
/**
|
|
56
69
|
* Canonical page container — one max-width, one gutter, one vertical rhythm
|
|
57
70
|
* so every page sits on the same grid. Gutter widens on large viewports.
|
|
71
|
+
* Layout primitive (not a heading); kept in its own module so consumers
|
|
72
|
+
* looking for page layout don't have to reach into the typography file.
|
|
58
73
|
*/
|
|
59
74
|
declare function PageShell({ children, className }: PageShellProps): react_jsx_runtime.JSX.Element;
|
|
60
75
|
|
|
61
|
-
export { Heading, type HeadingProps, type HeadingRole, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, SectionTitle, type SectionTitleProps };
|
|
76
|
+
export { Heading, type HeadingProps, type HeadingRole, type HeadingVariant, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, SectionTitle, type SectionTitleProps };
|
package/dist/primitives.js
CHANGED
package/package.json
CHANGED