tembro 5.0.0 → 6.0.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/CHANGELOG.md +14 -0
- package/dist/components/charts/progress-circle.d.ts +12 -3
- package/dist/components/data-table/data-table.d.ts +2 -2
- package/dist/components/feedback/index.d.ts +0 -2
- package/dist/components/layout/section.d.ts +1 -8
- package/dist/components/ui/number-field/index.cjs +1 -0
- package/dist/components/ui/number-field/index.d.ts +18 -0
- package/dist/components/ui/number-field/index.js +1 -0
- package/dist/components/ui/toggle-group/index.cjs +1 -0
- package/dist/components/ui/toggle-group/index.d.ts +13 -0
- package/dist/components/ui/toggle-group/index.js +1 -0
- package/dist/components/ui/toolbar/index.cjs +1 -0
- package/dist/components/ui/toolbar/index.d.ts +14 -0
- package/dist/components/ui/toolbar/index.js +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/src/components/charts/progress-circle.cjs +1 -1
- package/dist/src/components/charts/progress-circle.js +57 -3
- package/dist/src/components/data-table/data-table.cjs +1 -1
- package/dist/src/components/data-table/data-table.js +102 -100
- package/dist/src/components/feedback/index.cjs +1 -1
- package/dist/src/components/feedback/index.js +2 -4
- package/dist/src/components/layout/index.cjs +1 -1
- package/dist/src/components/layout/index.js +3 -3
- package/dist/src/components/layout/public.cjs +1 -1
- package/dist/src/components/layout/public.js +3 -3
- package/dist/src/components/layout/section.cjs +1 -1
- package/dist/src/components/layout/section.js +2 -26
- package/dist/src/components/ui/number-field/index.cjs +1 -0
- package/dist/src/components/ui/number-field/index.js +73 -0
- package/dist/src/components/ui/toggle-group/index.cjs +1 -0
- package/dist/src/components/ui/toggle-group/index.js +32 -0
- package/dist/src/components/ui/toolbar/index.cjs +1 -0
- package/dist/src/components/ui/toolbar/index.js +50 -0
- package/dist/src/index.cjs +1 -1
- package/dist/src/index.js +92 -91
- package/dist/src/public-component-surface.cjs +1 -1
- package/dist/src/public-component-surface.js +15 -0
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +63 -63
- package/packages/cli/vendor/src/components/charts/progress-circle.tsx +78 -3
- package/packages/cli/vendor/src/components/data-table/data-table.tsx +4 -4
- package/packages/cli/vendor/src/components/feedback/index.ts +0 -2
- package/packages/cli/vendor/src/components/layout/section.tsx +1 -28
- package/packages/cli/vendor/src/components/ui/number-field/index.tsx +89 -0
- package/packages/cli/vendor/src/components/ui/toggle-group/index.tsx +72 -0
- package/packages/cli/vendor/src/components/ui/toolbar/index.tsx +67 -0
- package/packages/cli/vendor/src/index.ts +6 -3
- package/packages/cli/vendor/src/public-component-surface.ts +3 -0
- package/packages/cli/vendor/templates/showcase/src/showcase/data/registry.ts +4 -2
- package/packages/cli/vendor/templates/showcase/src/showcase/layout/HeroSection.tsx +2 -2
- package/packages/cli/vendor/templates/showcase/src/showcase/layout/WorkbenchSidebar.tsx +1 -1
- package/packages/cli/vendor/templates/showcase/src/showcase/sections/ComponentLivePreview.tsx +2 -2
- package/packages/cli/vendor/templates/showcase/src/showcase/sections/FormsSection.tsx +2 -2
- package/packages/cli/vendor/templates/styles/globals.css +5 -5
- package/registry.json +962 -431
- package/dist/components/charts/progress-ring.cjs +0 -1
- package/dist/components/charts/progress-ring.d.ts +0 -13
- package/dist/components/charts/progress-ring.js +0 -1
- package/dist/components/feedback/loading-state.cjs +0 -1
- package/dist/components/feedback/loading-state.d.ts +0 -9
- package/dist/components/feedback/loading-state.js +0 -1
- package/dist/components/feedback/page-state.cjs +0 -1
- package/dist/components/feedback/page-state.d.ts +0 -18
- package/dist/components/feedback/page-state.js +0 -1
- package/dist/components/layout/page-container.cjs +0 -1
- package/dist/components/layout/page-container.d.ts +0 -7
- package/dist/components/layout/page-container.js +0 -1
- package/dist/components/layout/page-header.cjs +0 -1
- package/dist/components/layout/page-header.d.ts +0 -23
- package/dist/components/layout/page-header.js +0 -1
- package/dist/components/layout/section-header.cjs +0 -1
- package/dist/components/layout/section-header.d.ts +0 -14
- package/dist/components/layout/section-header.js +0 -1
- package/dist/components/layout/sidebar-nav.cjs +0 -1
- package/dist/components/layout/sidebar-nav.d.ts +0 -37
- package/dist/components/layout/sidebar-nav.js +0 -1
- package/dist/components/layout/sticky-footer-bar.cjs +0 -1
- package/dist/components/layout/sticky-footer-bar.d.ts +0 -7
- package/dist/components/layout/sticky-footer-bar.js +0 -1
- package/dist/src/components/charts/progress-ring.cjs +0 -1
- package/dist/src/components/charts/progress-ring.js +0 -57
- package/dist/src/components/feedback/loading-state.cjs +0 -1
- package/dist/src/components/feedback/loading-state.js +0 -15
- package/dist/src/components/feedback/page-state.cjs +0 -1
- package/dist/src/components/feedback/page-state.js +0 -28
- package/dist/src/components/layout/page-container.cjs +0 -1
- package/dist/src/components/layout/page-container.js +0 -21
- package/dist/src/components/layout/page-header.cjs +0 -1
- package/dist/src/components/layout/page-header.js +0 -92
- package/dist/src/components/layout/section-header.cjs +0 -1
- package/dist/src/components/layout/section-header.js +0 -44
- package/dist/src/components/layout/sidebar-nav.cjs +0 -1
- package/dist/src/components/layout/sidebar-nav.js +0 -220
- package/dist/src/components/layout/sticky-footer-bar.cjs +0 -1
- package/dist/src/components/layout/sticky-footer-bar.js +0 -20
- package/packages/cli/vendor/src/components/charts/progress-ring.tsx +0 -56
- package/packages/cli/vendor/src/components/feedback/loading-state.tsx +0 -15
- package/packages/cli/vendor/src/components/feedback/page-state.tsx +0 -29
- package/packages/cli/vendor/src/components/layout/page-container.tsx +0 -30
- package/packages/cli/vendor/src/components/layout/page-header.tsx +0 -104
- package/packages/cli/vendor/src/components/layout/section-header.tsx +0 -56
- package/packages/cli/vendor/src/components/layout/sidebar-nav.tsx +0 -377
- package/packages/cli/vendor/src/components/layout/sticky-footer-bar.tsx +0 -23
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/charts/progress-ring.cjs")
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type ProgressRingProps = React.ComponentProps<"svg"> & {
|
|
3
|
-
value: number;
|
|
4
|
-
max?: number;
|
|
5
|
-
size?: number;
|
|
6
|
-
strokeWidth?: number;
|
|
7
|
-
label?: React.ReactNode;
|
|
8
|
-
description?: React.ReactNode;
|
|
9
|
-
tone?: "default" | "success" | "warning" | "danger";
|
|
10
|
-
loading?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare function ProgressRing({ value, max, size, strokeWidth, label, description, tone, loading, className, ...props }: ProgressRingProps): React.JSX.Element;
|
|
13
|
-
export { ProgressRing };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/charts/progress-ring.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/feedback/loading-state.cjs")
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type StateViewProps } from "./state-view";
|
|
3
|
-
export type LoadingStateProps = Omit<StateViewProps, "status" | "title" | "loadingVariant" | "variant" | "slot"> & {
|
|
4
|
-
label?: React.ReactNode;
|
|
5
|
-
variant?: "spinner" | "skeleton" | "progress";
|
|
6
|
-
};
|
|
7
|
-
/** @deprecated Use StateView with status="loading". */
|
|
8
|
-
declare function LoadingState({ label, variant, ...props }: LoadingStateProps): React.JSX.Element;
|
|
9
|
-
export { LoadingState };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/feedback/loading-state.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/feedback/page-state.cjs")
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type StateViewProps, type StateViewStatus } from "./state-view";
|
|
3
|
-
export type PageStateTone = Extract<StateViewStatus, "empty" | "loading" | "error" | "success" | "info">;
|
|
4
|
-
export type PageStateProps = Omit<StateViewProps, "status" | "size" | "variant" | "tone" | "actions" | "slot"> & {
|
|
5
|
-
tone?: PageStateTone;
|
|
6
|
-
action?: React.ReactNode;
|
|
7
|
-
extra?: React.ReactNode;
|
|
8
|
-
compact?: boolean;
|
|
9
|
-
};
|
|
10
|
-
/** @deprecated Use StateView. */
|
|
11
|
-
declare function PageState({ tone, action, extra, compact, className, ...props }: PageStateProps): React.JSX.Element;
|
|
12
|
-
export type InlineStateProps = Omit<PageStateProps, "compact"> & {
|
|
13
|
-
retryLabel?: React.ReactNode;
|
|
14
|
-
onRetry?: () => void;
|
|
15
|
-
};
|
|
16
|
-
/** @deprecated Use StateView with variant="inline". */
|
|
17
|
-
declare function InlineState({ tone, action, className, ...props }: InlineStateProps): React.JSX.Element;
|
|
18
|
-
export { InlineState, PageState };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/feedback/page-state.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/layout/page-container.cjs")
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type PageContainerSize = "default" | "sm" | "md" | "lg" | "xl" | "full";
|
|
3
|
-
export type PageContainerProps = React.ComponentProps<"div"> & {
|
|
4
|
-
size?: PageContainerSize;
|
|
5
|
-
};
|
|
6
|
-
declare function PageContainer({ className, size, ...props }: PageContainerProps): React.JSX.Element;
|
|
7
|
-
export { PageContainer };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/layout/page-container.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/layout/page-header.cjs")
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const pageHeaderVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "outline" | "ghost" | "elevated" | "soft" | null | undefined;
|
|
5
|
-
size?: "default" | "sm" | "lg" | null | undefined;
|
|
6
|
-
tone?: "warning" | "neutral" | "info" | "success" | "danger" | null | undefined;
|
|
7
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
-
export type PageHeaderProps = React.ComponentProps<"div"> & VariantProps<typeof pageHeaderVariants> & {
|
|
9
|
-
title?: React.ReactNode;
|
|
10
|
-
description?: React.ReactNode;
|
|
11
|
-
eyebrow?: React.ReactNode;
|
|
12
|
-
breadcrumbs?: React.ReactNode;
|
|
13
|
-
actions?: React.ReactNode;
|
|
14
|
-
meta?: React.ReactNode;
|
|
15
|
-
leading?: React.ReactNode;
|
|
16
|
-
footer?: React.ReactNode;
|
|
17
|
-
sticky?: boolean;
|
|
18
|
-
titleClassName?: string;
|
|
19
|
-
descriptionClassName?: string;
|
|
20
|
-
actionsClassName?: string;
|
|
21
|
-
};
|
|
22
|
-
declare function PageHeader({ className, variant, size, tone, title, description, eyebrow, breadcrumbs, actions, meta, leading, footer, sticky, titleClassName, descriptionClassName, actionsClassName, children, ...props }: PageHeaderProps): React.JSX.Element;
|
|
23
|
-
export { PageHeader, pageHeaderVariants };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/layout/page-header.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/layout/section-header.cjs")
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type SectionHeaderProps = React.ComponentProps<"div"> & {
|
|
3
|
-
eyebrow?: React.ReactNode;
|
|
4
|
-
title?: React.ReactNode;
|
|
5
|
-
description?: React.ReactNode;
|
|
6
|
-
actions?: React.ReactNode;
|
|
7
|
-
meta?: React.ReactNode;
|
|
8
|
-
align?: "start" | "center";
|
|
9
|
-
size?: "sm" | "default" | "lg";
|
|
10
|
-
titleClassName?: string;
|
|
11
|
-
descriptionClassName?: string;
|
|
12
|
-
};
|
|
13
|
-
declare function SectionHeader({ className, eyebrow, title, description, actions, meta, align, size, titleClassName, descriptionClassName, children, ...props }: SectionHeaderProps): React.JSX.Element;
|
|
14
|
-
export { SectionHeader };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/layout/section-header.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/layout/sidebar-nav.cjs")
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type SidebarNavItem = {
|
|
3
|
-
key: string;
|
|
4
|
-
label: React.ReactNode;
|
|
5
|
-
icon?: React.ReactNode;
|
|
6
|
-
badge?: React.ReactNode;
|
|
7
|
-
href?: string;
|
|
8
|
-
items?: SidebarNavItem[];
|
|
9
|
-
active?: boolean;
|
|
10
|
-
current?: React.AriaAttributes["aria-current"];
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
hidden?: boolean;
|
|
13
|
-
sectionLabel?: React.ReactNode;
|
|
14
|
-
defaultExpanded?: boolean;
|
|
15
|
-
expanded?: boolean;
|
|
16
|
-
onExpandedChange?: (expanded: boolean) => void;
|
|
17
|
-
tooltip?: React.ReactNode;
|
|
18
|
-
onSelect?: () => void;
|
|
19
|
-
};
|
|
20
|
-
export type SidebarNavProps = React.ComponentProps<"nav"> & {
|
|
21
|
-
items: SidebarNavItem[];
|
|
22
|
-
collapsed?: boolean;
|
|
23
|
-
scrollable?: boolean;
|
|
24
|
-
tooltipOnCollapsed?: boolean;
|
|
25
|
-
showSectionLabels?: boolean;
|
|
26
|
-
itemSize?: "sm" | "md" | "lg";
|
|
27
|
-
activeIndicator?: "none" | "bar" | "pill";
|
|
28
|
-
itemClassName?: string;
|
|
29
|
-
activeItemClassName?: string;
|
|
30
|
-
renderItem?: (item: SidebarNavItem, element: React.ReactNode) => React.ReactNode;
|
|
31
|
-
renderLink?: (props: React.ComponentProps<"a"> & {
|
|
32
|
-
item: SidebarNavItem;
|
|
33
|
-
[key: `data-${string}`]: string | boolean | undefined;
|
|
34
|
-
}) => React.ReactNode;
|
|
35
|
-
};
|
|
36
|
-
declare function SidebarNav({ className, items, collapsed, scrollable, showSectionLabels, itemSize, activeIndicator, itemClassName, activeItemClassName, renderItem, renderLink, ...props }: SidebarNavProps): React.JSX.Element;
|
|
37
|
-
export { SidebarNav };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/layout/sidebar-nav.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
module.exports = require("../../src/components/layout/sticky-footer-bar.cjs")
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export type StickyFooterBarProps = React.ComponentProps<"div"> & {
|
|
3
|
-
start?: React.ReactNode;
|
|
4
|
-
end?: React.ReactNode;
|
|
5
|
-
};
|
|
6
|
-
declare function StickyFooterBar({ start, end, className, children, ...props }: StickyFooterBarProps): React.JSX.Element;
|
|
7
|
-
export { StickyFooterBar };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "../../src/components/layout/sticky-footer-bar.js"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");function i({value:e,max:n=100,size:i=120,strokeWidth:a=10,label:o,description:s,tone:c=`default`,loading:l=!1,className:u,...d}){let f=(i-a)/2,p=2*Math.PI*f,m=p-(n>0?Math.min(Math.max(e/n,0),1):0)*p,h=c===`success`?`var(--color-chart-3, var(--primary))`:c===`warning`?`var(--color-chart-4, var(--primary))`:c===`danger`?`var(--destructive)`:`var(--primary)`;return(0,r.jsxs)(`svg`,{"data-slot":`progress-ring`,viewBox:`0 0 ${i} ${i}`,className:t.cn(`h-auto w-full max-w-32`,u),role:`img`,...d,children:[(0,r.jsx)(`circle`,{cx:i/2,cy:i/2,r:f,fill:`none`,stroke:`var(--muted)`,strokeWidth:a}),(0,r.jsx)(`circle`,{cx:i/2,cy:i/2,r:f,fill:`none`,stroke:h,strokeWidth:a,strokeLinecap:`round`,strokeDasharray:p,strokeDashoffset:l?p*.45:m,transform:`rotate(-90 ${i/2} ${i/2})`,className:l?`animate-pulse`:void 0}),(o||s)&&(0,r.jsxs)(`text`,{x:`50%`,y:`50%`,textAnchor:`middle`,dominantBaseline:`middle`,fill:`var(--foreground)`,children:[o&&(0,r.jsx)(`tspan`,{x:`50%`,dy:s?`-0.15em`:`0`,className:`text-base font-semibold`,children:o}),s&&(0,r.jsx)(`tspan`,{x:`50%`,dy:`1.25em`,className:`text-xs fill-muted-foreground`,children:s})]})]})}exports.ProgressRing=i;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/charts/progress-ring.tsx
|
|
5
|
-
function r({ value: r, max: i = 100, size: a = 120, strokeWidth: o = 10, label: s, description: c, tone: l = "default", loading: u = !1, className: d, ...f }) {
|
|
6
|
-
let p = (a - o) / 2, m = 2 * Math.PI * p, h = m - (i > 0 ? Math.min(Math.max(r / i, 0), 1) : 0) * m, g = l === "success" ? "var(--color-chart-3, var(--primary))" : l === "warning" ? "var(--color-chart-4, var(--primary))" : l === "danger" ? "var(--destructive)" : "var(--primary)";
|
|
7
|
-
return /* @__PURE__ */ n("svg", {
|
|
8
|
-
"data-slot": "progress-ring",
|
|
9
|
-
viewBox: `0 0 ${a} ${a}`,
|
|
10
|
-
className: e("h-auto w-full max-w-32", d),
|
|
11
|
-
role: "img",
|
|
12
|
-
...f,
|
|
13
|
-
children: [
|
|
14
|
-
/* @__PURE__ */ t("circle", {
|
|
15
|
-
cx: a / 2,
|
|
16
|
-
cy: a / 2,
|
|
17
|
-
r: p,
|
|
18
|
-
fill: "none",
|
|
19
|
-
stroke: "var(--muted)",
|
|
20
|
-
strokeWidth: o
|
|
21
|
-
}),
|
|
22
|
-
/* @__PURE__ */ t("circle", {
|
|
23
|
-
cx: a / 2,
|
|
24
|
-
cy: a / 2,
|
|
25
|
-
r: p,
|
|
26
|
-
fill: "none",
|
|
27
|
-
stroke: g,
|
|
28
|
-
strokeWidth: o,
|
|
29
|
-
strokeLinecap: "round",
|
|
30
|
-
strokeDasharray: m,
|
|
31
|
-
strokeDashoffset: u ? m * .45 : h,
|
|
32
|
-
transform: `rotate(-90 ${a / 2} ${a / 2})`,
|
|
33
|
-
className: u ? "animate-pulse" : void 0
|
|
34
|
-
}),
|
|
35
|
-
(s || c) && /* @__PURE__ */ n("text", {
|
|
36
|
-
x: "50%",
|
|
37
|
-
y: "50%",
|
|
38
|
-
textAnchor: "middle",
|
|
39
|
-
dominantBaseline: "middle",
|
|
40
|
-
fill: "var(--foreground)",
|
|
41
|
-
children: [s && /* @__PURE__ */ t("tspan", {
|
|
42
|
-
x: "50%",
|
|
43
|
-
dy: c ? "-0.15em" : "0",
|
|
44
|
-
className: "text-base font-semibold",
|
|
45
|
-
children: s
|
|
46
|
-
}), c && /* @__PURE__ */ t("tspan", {
|
|
47
|
-
x: "50%",
|
|
48
|
-
dy: "1.25em",
|
|
49
|
-
className: "text-xs fill-muted-foreground",
|
|
50
|
-
children: c
|
|
51
|
-
})]
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
57
|
-
export { r as ProgressRing };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("./state-view.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");function i({label:e=`Loading...`,variant:n=`spinner`,...i}){return(0,r.jsx)(t.StateView,{status:`loading`,title:e,loadingVariant:n,slot:`loading-state`,...i})}exports.LoadingState=i;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StateView as e } from "./state-view.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/feedback/loading-state.tsx
|
|
5
|
-
function n({ label: n = "Loading...", variant: r = "spinner", ...i }) {
|
|
6
|
-
return /* @__PURE__ */ t(e, {
|
|
7
|
-
status: "loading",
|
|
8
|
-
title: n,
|
|
9
|
-
loadingVariant: r,
|
|
10
|
-
slot: "loading-state",
|
|
11
|
-
...i
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
//#endregion
|
|
15
|
-
export { n as LoadingState };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("./state-view.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");function a({tone:e=`empty`,action:t,extra:r,compact:a=!1,className:o,...s}){return(0,i.jsx)(n.StateView,{status:e,size:a?`compact`:`page`,actions:(0,i.jsxs)(i.Fragment,{children:[t,r]}),slot:`page-state`,className:o,...s})}function o({tone:e=`empty`,action:r,className:a,...o}){return(0,i.jsx)(n.StateView,{variant:`inline`,size:`compact`,actions:r,slot:`inline-state`,className:t.cn(`min-h-0`,a),...o,status:e})}exports.InlineState=o,exports.PageState=a;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import { StateView as t } from "./state-view.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/feedback/page-state.tsx
|
|
6
|
-
function a({ tone: e = "empty", action: a, extra: o, compact: s = !1, className: c, ...l }) {
|
|
7
|
-
return /* @__PURE__ */ r(t, {
|
|
8
|
-
status: e,
|
|
9
|
-
size: s ? "compact" : "page",
|
|
10
|
-
actions: /* @__PURE__ */ i(n, { children: [a, o] }),
|
|
11
|
-
slot: "page-state",
|
|
12
|
-
className: c,
|
|
13
|
-
...l
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function o({ tone: n = "empty", action: i, className: a, ...o }) {
|
|
17
|
-
return /* @__PURE__ */ r(t, {
|
|
18
|
-
variant: "inline",
|
|
19
|
-
size: "compact",
|
|
20
|
-
actions: i,
|
|
21
|
-
slot: "inline-state",
|
|
22
|
-
className: e("min-h-0", a),
|
|
23
|
-
...o,
|
|
24
|
-
status: n
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { o as InlineState, a as PageState };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i={sm:`max-w-3xl`,md:`max-w-5xl`,lg:`max-w-6xl`,xl:`max-w-7xl`,default:`max-w-7xl`,full:`max-w-none`};function a({className:e,size:n=`default`,...a}){return(0,r.jsx)(`div`,{"data-slot":`page-container`,className:t.cn(`mx-auto flex w-full flex-col gap-4`,i[n],e),...a})}exports.PageContainer=a;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/layout/page-container.tsx
|
|
5
|
-
var n = {
|
|
6
|
-
sm: "max-w-3xl",
|
|
7
|
-
md: "max-w-5xl",
|
|
8
|
-
lg: "max-w-6xl",
|
|
9
|
-
xl: "max-w-7xl",
|
|
10
|
-
default: "max-w-7xl",
|
|
11
|
-
full: "max-w-none"
|
|
12
|
-
};
|
|
13
|
-
function r({ className: r, size: i = "default", ...a }) {
|
|
14
|
-
return /* @__PURE__ */ t("div", {
|
|
15
|
-
"data-slot": "page-container",
|
|
16
|
-
className: e("mx-auto flex w-full flex-col gap-4", n[i], r),
|
|
17
|
-
...a
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { r as PageContainer };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("class-variance-authority"),i=require("react/jsx-runtime");var a=(0,r.cva)(`flex flex-col border transition-[background-color,border-color,box-shadow]`,{variants:{variant:{default:`border-border/75 bg-card/96 shadow-sm ring-1 ring-foreground/5`,elevated:`border-border/70 bg-card shadow-[0_1px_2px_rgba(15,23,42,0.06),0_18px_45px_rgba(15,23,42,0.08)] ring-1 ring-foreground/5`,outline:`border-border bg-transparent shadow-none`,ghost:`border-transparent bg-transparent shadow-none`,soft:`border-transparent bg-muted/45 shadow-none`},size:{sm:`gap-3 rounded-[var(--radius-2xl)] p-4`,default:`gap-4 rounded-[var(--radius-3xl)] p-5`,lg:`gap-5 rounded-[calc(var(--radius-3xl)*1.1)] p-6`},tone:{neutral:``,info:`border-blue-500/20 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),oklch(0.94_0.03_235)_28%),var(--card))]`,success:`border-emerald-500/20 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),oklch(0.94_0.04_155)_30%),var(--card))]`,warning:`border-amber-500/24 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),oklch(0.94_0.05_85)_30%),var(--card))]`,danger:`border-destructive/24 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),var(--destructive)_8%),var(--card))]`}},defaultVariants:{variant:`default`,size:`default`,tone:`neutral`}});function o({className:e,variant:n,size:r,tone:o,title:s,description:c,eyebrow:l,breadcrumbs:u,actions:d,meta:f,leading:p,footer:m,sticky:h=!1,titleClassName:g,descriptionClassName:_,actionsClassName:v,children:y,...b}){return(0,i.jsxs)(`div`,{"data-slot":`page-header`,"data-sticky":h||void 0,className:t.cn(a({variant:n,size:r,tone:o}),h&&`sticky top-0 z-30 bg-background/92 backdrop-blur supports-[backdrop-filter]:bg-background/78`,e),...b,children:[u&&(0,i.jsx)(`div`,{className:`text-sm text-muted-foreground/95`,children:u}),(0,i.jsxs)(`div`,{className:`flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between`,children:[(0,i.jsxs)(`div`,{className:`flex min-w-0 gap-4`,children:[p?(0,i.jsx)(`div`,{className:`shrink-0`,children:p}):null,(0,i.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[l&&(0,i.jsx)(`div`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] text-muted-foreground`,children:l}),s&&(0,i.jsx)(`h1`,{className:t.cn(`truncate text-3xl font-semibold tracking-[-0.03em] text-foreground`,r===`sm`&&`text-2xl`,r===`lg`&&`text-4xl`,g),children:s}),c&&(0,i.jsx)(`p`,{className:t.cn(`max-w-3xl text-sm leading-7 text-muted-foreground`,_),children:c}),f&&(0,i.jsx)(`div`,{className:`pt-1 text-sm text-muted-foreground`,children:f})]})]}),d&&(0,i.jsx)(`div`,{className:t.cn(`flex shrink-0 flex-wrap items-center gap-2.5`,v),children:d})]}),y,m&&(0,i.jsx)(`div`,{"data-slot":`page-header-footer`,className:`border-t border-border/70 pt-4`,children:m})]})}exports.PageHeader=o,exports.pageHeaderVariants=a;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { cva as t } from "class-variance-authority";
|
|
4
|
-
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/layout/page-header.tsx
|
|
6
|
-
var i = t("flex flex-col border transition-[background-color,border-color,box-shadow]", {
|
|
7
|
-
variants: {
|
|
8
|
-
variant: {
|
|
9
|
-
default: "border-border/75 bg-card/96 shadow-sm ring-1 ring-foreground/5",
|
|
10
|
-
elevated: "border-border/70 bg-card shadow-[0_1px_2px_rgba(15,23,42,0.06),0_18px_45px_rgba(15,23,42,0.08)] ring-1 ring-foreground/5",
|
|
11
|
-
outline: "border-border bg-transparent shadow-none",
|
|
12
|
-
ghost: "border-transparent bg-transparent shadow-none",
|
|
13
|
-
soft: "border-transparent bg-muted/45 shadow-none"
|
|
14
|
-
},
|
|
15
|
-
size: {
|
|
16
|
-
sm: "gap-3 rounded-[var(--radius-2xl)] p-4",
|
|
17
|
-
default: "gap-4 rounded-[var(--radius-3xl)] p-5",
|
|
18
|
-
lg: "gap-5 rounded-[calc(var(--radius-3xl)*1.1)] p-6"
|
|
19
|
-
},
|
|
20
|
-
tone: {
|
|
21
|
-
neutral: "",
|
|
22
|
-
info: "border-blue-500/20 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),oklch(0.94_0.03_235)_28%),var(--card))]",
|
|
23
|
-
success: "border-emerald-500/20 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),oklch(0.94_0.04_155)_30%),var(--card))]",
|
|
24
|
-
warning: "border-amber-500/24 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),oklch(0.94_0.05_85)_30%),var(--card))]",
|
|
25
|
-
danger: "border-destructive/24 bg-[linear-gradient(180deg,color-mix(in_oklch,var(--card),var(--destructive)_8%),var(--card))]"
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
defaultVariants: {
|
|
29
|
-
variant: "default",
|
|
30
|
-
size: "default",
|
|
31
|
-
tone: "neutral"
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
function a({ className: t, variant: a, size: o, tone: s, title: c, description: l, eyebrow: u, breadcrumbs: d, actions: f, meta: p, leading: m, footer: h, sticky: g = !1, titleClassName: _, descriptionClassName: v, actionsClassName: y, children: b, ...x }) {
|
|
35
|
-
return /* @__PURE__ */ r("div", {
|
|
36
|
-
"data-slot": "page-header",
|
|
37
|
-
"data-sticky": g || void 0,
|
|
38
|
-
className: e(i({
|
|
39
|
-
variant: a,
|
|
40
|
-
size: o,
|
|
41
|
-
tone: s
|
|
42
|
-
}), g && "sticky top-0 z-30 bg-background/92 backdrop-blur supports-[backdrop-filter]:bg-background/78", t),
|
|
43
|
-
...x,
|
|
44
|
-
children: [
|
|
45
|
-
d && /* @__PURE__ */ n("div", {
|
|
46
|
-
className: "text-sm text-muted-foreground/95",
|
|
47
|
-
children: d
|
|
48
|
-
}),
|
|
49
|
-
/* @__PURE__ */ r("div", {
|
|
50
|
-
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
51
|
-
children: [/* @__PURE__ */ r("div", {
|
|
52
|
-
className: "flex min-w-0 gap-4",
|
|
53
|
-
children: [m ? /* @__PURE__ */ n("div", {
|
|
54
|
-
className: "shrink-0",
|
|
55
|
-
children: m
|
|
56
|
-
}) : null, /* @__PURE__ */ r("div", {
|
|
57
|
-
className: "min-w-0 space-y-2",
|
|
58
|
-
children: [
|
|
59
|
-
u && /* @__PURE__ */ n("div", {
|
|
60
|
-
className: "text-[11px] font-semibold uppercase tracking-[0.24em] text-muted-foreground",
|
|
61
|
-
children: u
|
|
62
|
-
}),
|
|
63
|
-
c && /* @__PURE__ */ n("h1", {
|
|
64
|
-
className: e("truncate text-3xl font-semibold tracking-[-0.03em] text-foreground", o === "sm" && "text-2xl", o === "lg" && "text-4xl", _),
|
|
65
|
-
children: c
|
|
66
|
-
}),
|
|
67
|
-
l && /* @__PURE__ */ n("p", {
|
|
68
|
-
className: e("max-w-3xl text-sm leading-7 text-muted-foreground", v),
|
|
69
|
-
children: l
|
|
70
|
-
}),
|
|
71
|
-
p && /* @__PURE__ */ n("div", {
|
|
72
|
-
className: "pt-1 text-sm text-muted-foreground",
|
|
73
|
-
children: p
|
|
74
|
-
})
|
|
75
|
-
]
|
|
76
|
-
})]
|
|
77
|
-
}), f && /* @__PURE__ */ n("div", {
|
|
78
|
-
className: e("flex shrink-0 flex-wrap items-center gap-2.5", y),
|
|
79
|
-
children: f
|
|
80
|
-
})]
|
|
81
|
-
}),
|
|
82
|
-
b,
|
|
83
|
-
h && /* @__PURE__ */ n("div", {
|
|
84
|
-
"data-slot": "page-header-footer",
|
|
85
|
-
className: "border-t border-border/70 pt-4",
|
|
86
|
-
children: h
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
export { a as PageHeader, i as pageHeaderVariants };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react/jsx-runtime");var i={sm:`text-xl`,default:`text-2xl`,lg:`text-3xl`};function a({className:e,eyebrow:n,title:a,description:o,actions:s,meta:c,align:l=`start`,size:u=`default`,titleClassName:d,descriptionClassName:f,children:p,...m}){return(0,r.jsxs)(`div`,{"data-slot":`section-header`,"data-align":l,className:t.cn(`flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between`,l===`center`&&`text-center sm:flex-col sm:items-center`,e),...m,children:[(0,r.jsxs)(`div`,{className:t.cn(`min-w-0 space-y-2`,l===`center`&&`mx-auto max-w-2xl`),children:[n?(0,r.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] text-muted-foreground`,children:n}):null,a?(0,r.jsx)(`h2`,{className:t.cn(`font-semibold tracking-[-0.03em] text-foreground`,i[u],d),children:a}):null,o?(0,r.jsx)(`p`,{className:t.cn(`max-w-3xl text-sm leading-7 text-muted-foreground`,f),children:o}):null,c?(0,r.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:c}):null,p]}),s?(0,r.jsx)(`div`,{className:`flex shrink-0 flex-wrap items-center gap-2.5`,children:s}):null]})}exports.SectionHeader=a;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { cn as e } from "../../lib/utils.js";
|
|
2
|
-
import "react";
|
|
3
|
-
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/layout/section-header.tsx
|
|
5
|
-
var r = {
|
|
6
|
-
sm: "text-xl",
|
|
7
|
-
default: "text-2xl",
|
|
8
|
-
lg: "text-3xl"
|
|
9
|
-
};
|
|
10
|
-
function i({ className: i, eyebrow: a, title: o, description: s, actions: c, meta: l, align: u = "start", size: d = "default", titleClassName: f, descriptionClassName: p, children: m, ...h }) {
|
|
11
|
-
return /* @__PURE__ */ n("div", {
|
|
12
|
-
"data-slot": "section-header",
|
|
13
|
-
"data-align": u,
|
|
14
|
-
className: e("flex flex-col gap-4 sm:flex-row sm:items-end sm:justify-between", u === "center" && "text-center sm:flex-col sm:items-center", i),
|
|
15
|
-
...h,
|
|
16
|
-
children: [/* @__PURE__ */ n("div", {
|
|
17
|
-
className: e("min-w-0 space-y-2", u === "center" && "mx-auto max-w-2xl"),
|
|
18
|
-
children: [
|
|
19
|
-
a ? /* @__PURE__ */ t("p", {
|
|
20
|
-
className: "text-xs font-semibold uppercase tracking-[0.24em] text-muted-foreground",
|
|
21
|
-
children: a
|
|
22
|
-
}) : null,
|
|
23
|
-
o ? /* @__PURE__ */ t("h2", {
|
|
24
|
-
className: e("font-semibold tracking-[-0.03em] text-foreground", r[d], f),
|
|
25
|
-
children: o
|
|
26
|
-
}) : null,
|
|
27
|
-
s ? /* @__PURE__ */ t("p", {
|
|
28
|
-
className: e("max-w-3xl text-sm leading-7 text-muted-foreground", p),
|
|
29
|
-
children: s
|
|
30
|
-
}) : null,
|
|
31
|
-
l ? /* @__PURE__ */ t("div", {
|
|
32
|
-
className: "text-sm text-muted-foreground",
|
|
33
|
-
children: l
|
|
34
|
-
}) : null,
|
|
35
|
-
m
|
|
36
|
-
]
|
|
37
|
-
}), c ? /* @__PURE__ */ t("div", {
|
|
38
|
-
className: "flex shrink-0 flex-wrap items-center gap-2.5",
|
|
39
|
-
children: c
|
|
40
|
-
}) : null]
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
//#endregion
|
|
44
|
-
export { i as SectionHeader };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/badge/index.cjs"),r=require("./controllable-details.cjs"),i=require("../ui/tooltip/index.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");function s(e){return e.items?.some(e=>!e.hidden)??!1}function c(e){return e.active?!0:e.items?.some(e=>c(e))??!1}function l({item:e,collapsed:r,depth:a,itemSize:s,activeIndicator:c,itemClassName:l,activeItemClassName:u,renderLink:d}){let f=e.current??(e.active?`page`:void 0),p=(0,o.jsxs)(o.Fragment,{children:[e.icon&&(0,o.jsx)(`span`,{className:`shrink-0 [&_svg]:size-4`,children:e.icon}),!r&&(0,o.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!r&&e.badge&&(0,o.jsx)(n.Badge,{variant:`secondary`,className:`ml-auto h-5 shrink-0 px-1.5`,children:e.badge})]}),m=t.cn(`group flex items-center gap-2 border border-transparent text-sm font-medium transition-[background-color,border-color,color,box-shadow] data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50`,r&&`justify-center px-0`,a>0&&!r&&`pl-3`,l,e.active&&u),h=t=>r?(0,o.jsx)(i.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,o.jsx)(`span`,{className:`block`,children:t})}):t;return e.href&&e.href.startsWith(`/`)?h(d?d({item:e,href:e.href,"data-slot":`sidebar-nav-item`,"data-depth":String(a),"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,"data-size":s,"data-active-indicator":c,"aria-current":f,className:m,onClick:t=>{if(e.disabled){t.preventDefault();return}e.onSelect?.()},children:p}):(0,o.jsx)(`a`,{href:e.href,"data-slot":`sidebar-nav-item`,"data-depth":a,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,"data-size":s,"data-active-indicator":c,"aria-current":f,className:m,onClick:t=>{if(e.disabled){t.preventDefault();return}e.onSelect?.()},children:p})):e.href?h((0,o.jsx)(`button`,{type:`button`,"data-slot":`sidebar-nav-item`,"data-depth":a,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,"data-size":s,"data-active-indicator":c,"aria-current":f,className:t.cn(`w-full text-left`,m),onClick:()=>{if(e.disabled)return;let t=e.href;if(t){if(e.onSelect?.(),t.startsWith(`http`)){window.open(t,`_blank`,`noopener,noreferrer`);return}window.location.assign(t)}},children:p})):h((0,o.jsx)(`button`,{type:`button`,"data-slot":`sidebar-nav-item`,"data-depth":a,"data-active":e.active||void 0,"data-disabled":e.disabled||void 0,"data-size":s,"data-active-indicator":c,"aria-current":f,disabled:e.disabled,className:t.cn(`w-full text-left`,m),onClick:e.onSelect,children:p}))}function u({items:e,collapsed:d,depth:f,showSectionLabels:p,itemSize:m,activeIndicator:h,itemClassName:g,activeItemClassName:_,renderItem:v,renderLink:y}){return e.map(e=>{if(e.hidden)return null;let b=p&&!d&&f===0&&e.sectionLabel;if(!s(e)){let t=(0,o.jsx)(l,{item:e,collapsed:d,depth:f,itemSize:m,activeIndicator:h,itemClassName:g,activeItemClassName:_,renderLink:y});return(0,o.jsxs)(a.Fragment,{children:[b?(0,o.jsx)(`div`,{"data-slot":`sidebar-nav-group-label`,className:`px-2 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground first:pt-0`,children:e.sectionLabel}):null,v?v(e,t):t]},e.key)}let x=e.defaultExpanded??c(e),S=(0,o.jsxs)(`summary`,{"data-slot":`sidebar-nav-group-trigger`,className:t.cn(`flex min-h-9 list-none items-center gap-2 rounded-xl border border-transparent px-2.5 text-sm font-medium text-[color:var(--aui-page-muted-strong,var(--muted-foreground))] transition-[background-color,border-color,color,box-shadow] hover:border-[color:var(--aui-divider)] hover:bg-[color:var(--aui-page-bg-alt)] hover:text-[color:var(--aui-page-foreground)]`,d?`justify-center px-0`:`px-2`),children:[e.icon?d?(0,o.jsx)(i.Tooltip,{content:e.tooltip??e.label,side:`right`,children:(0,o.jsx)(`span`,{className:`shrink-0 [&_svg]:size-4`,children:e.icon})}):(0,o.jsx)(`span`,{className:`shrink-0 [&_svg]:size-4`,children:e.icon}):null,!d&&(0,o.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),!d&&e.badge?(0,o.jsx)(n.Badge,{variant:`secondary`,className:`h-5 shrink-0 px-1.5`,children:e.badge}):null,!d&&(0,o.jsx)(`span`,{"data-slot":`sidebar-nav-group-chevron`,className:`ml-auto text-xs text-muted-foreground transition-transform group-open/sidebar-nav-details:rotate-90`,children:`›`})]}),C=(0,o.jsxs)(`div`,{"data-slot":`sidebar-nav-group`,"data-depth":f,children:[b?(0,o.jsx)(`div`,{"data-slot":`sidebar-nav-group-label`,className:`px-2 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground first:pt-0`,children:e.sectionLabel}):null,(0,o.jsxs)(r.ControllableDetails,{"data-slot":`sidebar-nav-group-details`,open:e.expanded,defaultOpen:x,className:`group/sidebar-nav-details`,onOpenChange:e.onExpandedChange,children:[S,(0,o.jsx)(`div`,{"data-slot":`sidebar-nav-group-content`,className:t.cn(`mt-1 grid gap-1`,!d&&`ml-3 border-l border-border/55 pl-2`),children:(0,o.jsx)(u,{items:e.items??[],collapsed:d,depth:f+1,showSectionLabels:p,itemSize:m,activeIndicator:h,itemClassName:g,activeItemClassName:_,renderItem:v,renderLink:y})})]})]});return v?(0,o.jsx)(a.Fragment,{children:v(e,C)},e.key):(0,o.jsx)(a.Fragment,{children:C},e.key)})}function d({className:e,items:n,collapsed:r=!1,scrollable:i=!0,showSectionLabels:a=!0,itemSize:s=`md`,activeIndicator:c=`bar`,itemClassName:l,activeItemClassName:d,renderItem:f,renderLink:p,...m}){let h=n.filter(e=>!e.hidden);return(0,o.jsx)(`nav`,{"aria-label":`Primary navigation`,"data-slot":`sidebar-nav`,"data-collapsed":r||void 0,className:t.cn(`grid min-h-0 gap-1`,i?`overflow-y-auto overscroll-contain`:null,e),...m,children:(0,o.jsx)(u,{items:h,collapsed:r,depth:0,showSectionLabels:a,itemSize:s,activeIndicator:c,itemClassName:l,activeItemClassName:d,renderItem:f,renderLink:p})})}exports.SidebarNav=d;
|