@devalok/shilp-sutra 0.18.2 → 0.19.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/shell/bottom-navbar.js +4 -4
- package/dist/shell/sidebar.js +2 -2
- package/dist/shell/top-bar.d.ts +45 -20
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +222 -159
- package/dist/tokens/semantic.css +5 -5
- package/dist/ui/sidebar.js +11 -11
- package/docs/components/_header.md +7 -5
- package/docs/components/composed/activity-feed.md +4 -4
- package/docs/components/composed/command-palette.md +2 -2
- package/docs/components/composed/confirm-dialog.md +1 -1
- package/docs/components/composed/date-picker.md +13 -13
- package/docs/components/composed/schedule-view.md +2 -2
- package/docs/components/composed/status-badge.md +1 -0
- package/docs/components/shell/bottom-navbar.md +4 -0
- package/docs/components/shell/notification-center.md +15 -15
- package/docs/components/shell/sidebar.md +5 -1
- package/docs/components/shell/top-bar.md +101 -24
- package/docs/components/ui/autocomplete.md +1 -1
- package/docs/components/ui/banner.md +1 -0
- package/docs/components/ui/chip.md +1 -0
- package/docs/components/ui/combobox.md +2 -2
- package/docs/components/ui/input.md +1 -1
- package/docs/components/ui/spinner.md +1 -0
- package/docs/components/ui/tabs.md +1 -1
- package/llms-full.txt +164 -73
- package/llms.txt +1 -1
- package/package.json +699 -699
|
@@ -82,7 +82,7 @@ const B = w.forwardRef(
|
|
|
82
82
|
/* @__PURE__ */ t(
|
|
83
83
|
"div",
|
|
84
84
|
{
|
|
85
|
-
className: "absolute bottom-[72px] left-0 right-0 rounded-t-ds-2xl border-t border-surface-border-strong bg-surface-
|
|
85
|
+
className: "absolute bottom-[72px] left-0 right-0 rounded-t-ds-2xl border-t border-surface-border-strong bg-surface-2 p-ds-05 pb-ds-03",
|
|
86
86
|
onClick: (e) => e.stopPropagation(),
|
|
87
87
|
onKeyDown: (e) => e.stopPropagation(),
|
|
88
88
|
children: [
|
|
@@ -93,7 +93,7 @@ const B = w.forwardRef(
|
|
|
93
93
|
{
|
|
94
94
|
onClick: () => c(!1),
|
|
95
95
|
"aria-label": "Close more menu",
|
|
96
|
-
className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-full hover:bg-surface-
|
|
96
|
+
className: "flex h-ds-sm w-ds-sm items-center justify-center rounded-ds-full hover:bg-surface-3",
|
|
97
97
|
children: /* @__PURE__ */ s(k, { className: "h-ico-sm w-ico-sm text-surface-fg-muted", "aria-hidden": "true" })
|
|
98
98
|
}
|
|
99
99
|
)
|
|
@@ -105,7 +105,7 @@ const B = w.forwardRef(
|
|
|
105
105
|
onClick: () => c(!1),
|
|
106
106
|
className: o(
|
|
107
107
|
"flex flex-col items-center gap-ds-02b rounded-ds-xl p-ds-04 text-ds-sm transition-colors",
|
|
108
|
-
m(e.href, e.exact) ? "bg-surface-
|
|
108
|
+
m(e.href, e.exact) ? "bg-surface-3 text-accent-11" : "text-surface-fg-subtle hover:bg-surface-3"
|
|
109
109
|
),
|
|
110
110
|
children: [
|
|
111
111
|
/* @__PURE__ */ s("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md", children: e.icon }),
|
|
@@ -127,7 +127,7 @@ const B = w.forwardRef(
|
|
|
127
127
|
ref: b,
|
|
128
128
|
"aria-label": "Mobile navigation",
|
|
129
129
|
className: o(
|
|
130
|
-
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-
|
|
130
|
+
"fixed bottom-0 left-0 right-0 z-sticky flex w-full flex-row items-start justify-between border-t border-surface-border-strong bg-surface-2 px-ds-05 pb-ds-05b pt-0 md:hidden",
|
|
131
131
|
h
|
|
132
132
|
),
|
|
133
133
|
children: [
|
package/dist/shell/sidebar.js
CHANGED
|
@@ -45,7 +45,7 @@ function re({ className: r }) {
|
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
const B = "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors", F = "bg-accent-2 text-accent-11 after:absolute after:right-0 after:top-0 after:h-full after:w-ds-01 after:rounded-l-ds-full after:bg-accent-9 after:content-['']", G = "text-surface-fg-subtle hover:bg-surface-
|
|
48
|
+
const B = "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors", F = "bg-accent-2 text-accent-11 after:absolute after:right-0 after:top-0 after:h-full after:w-ds-01 after:rounded-l-ds-full after:bg-accent-9 after:content-['']", G = "text-surface-fg-subtle hover:bg-surface-3 hover:text-surface-fg";
|
|
49
49
|
function se({
|
|
50
50
|
item: r,
|
|
51
51
|
isActive: t,
|
|
@@ -86,7 +86,7 @@ function se({
|
|
|
86
86
|
/* @__PURE__ */ e(Y, { asChild: !0, children: /* @__PURE__ */ e(
|
|
87
87
|
"button",
|
|
88
88
|
{
|
|
89
|
-
className: "absolute right-ds-02 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-
|
|
89
|
+
className: "absolute right-ds-02 top-1/2 flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-3 hover:text-surface-fg group-data-[collapsible=icon]:hidden",
|
|
90
90
|
"aria-label": `Toggle ${r.title}`,
|
|
91
91
|
children: /* @__PURE__ */ e(ae, { className: "h-4 w-4 transition-transform duration-fast-02 ease-productive-standard group-data-[state=open]/collapsible:rotate-90" })
|
|
92
92
|
}
|
package/dist/shell/top-bar.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
/**
|
|
3
|
-
* TopBar
|
|
4
|
-
*
|
|
3
|
+
* TopBar v2 — Composition-based application top bar.
|
|
4
|
+
*
|
|
5
|
+
* Subcomponents: TopBar.Left, TopBar.Center, TopBar.Right,
|
|
6
|
+
* TopBar.Section, TopBar.IconButton, TopBar.Title, TopBar.UserMenu.
|
|
5
7
|
*/
|
|
6
8
|
import * as React from 'react';
|
|
7
9
|
export interface TopBarUser {
|
|
@@ -27,28 +29,51 @@ export interface UserMenuItem {
|
|
|
27
29
|
/** Whether the item is disabled */
|
|
28
30
|
disabled?: boolean;
|
|
29
31
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
interface TopBarRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
interface TopBarLeftProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
}
|
|
39
|
+
interface TopBarCenterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
}
|
|
42
|
+
interface TopBarRightProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
}
|
|
45
|
+
declare const gapMap: {
|
|
46
|
+
readonly tight: "gap-ds-02";
|
|
47
|
+
readonly default: "gap-ds-04";
|
|
48
|
+
readonly loose: "gap-ds-06";
|
|
49
|
+
};
|
|
50
|
+
interface TopBarSectionProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
51
|
+
gap?: keyof typeof gapMap;
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
}
|
|
54
|
+
interface TopBarIconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
55
|
+
icon: React.ReactNode;
|
|
56
|
+
tooltip: string;
|
|
57
|
+
}
|
|
58
|
+
interface TopBarTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
|
|
59
|
+
children: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
interface TopBarUserMenuProps {
|
|
62
|
+
user: TopBarUser;
|
|
36
63
|
onNavigate?: (path: string) => void;
|
|
37
|
-
/** Called when the user clicks the logout button */
|
|
38
64
|
onLogout?: () => void;
|
|
39
|
-
/** Called when the search button is clicked */
|
|
40
|
-
onSearchClick?: () => void;
|
|
41
|
-
/** Called when the AI chat button is clicked */
|
|
42
|
-
onAiChatClick?: () => void;
|
|
43
|
-
/** Optional mobile logo element */
|
|
44
|
-
mobileLogo?: React.ReactNode;
|
|
45
|
-
/** Notification center slot -- render your NotificationCenter here */
|
|
46
|
-
notificationSlot?: React.ReactNode;
|
|
47
|
-
/** Custom menu items rendered between Profile and Dark/Light Mode */
|
|
48
65
|
userMenuItems?: UserMenuItem[];
|
|
49
|
-
/** Additional className */
|
|
50
66
|
className?: string;
|
|
51
67
|
}
|
|
52
|
-
|
|
68
|
+
export type TopBarProps = TopBarRootProps;
|
|
69
|
+
declare const TopBar: React.ForwardRefExoticComponent<TopBarRootProps & React.RefAttributes<HTMLDivElement>> & {
|
|
70
|
+
Left: React.ForwardRefExoticComponent<TopBarLeftProps & React.RefAttributes<HTMLDivElement>>;
|
|
71
|
+
Center: React.ForwardRefExoticComponent<TopBarCenterProps & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
+
Right: React.ForwardRefExoticComponent<TopBarRightProps & React.RefAttributes<HTMLDivElement>>;
|
|
73
|
+
Section: React.ForwardRefExoticComponent<TopBarSectionProps & React.RefAttributes<HTMLDivElement>>;
|
|
74
|
+
IconButton: React.ForwardRefExoticComponent<TopBarIconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
Title: React.ForwardRefExoticComponent<TopBarTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
76
|
+
UserMenu: React.ForwardRefExoticComponent<TopBarUserMenuProps & React.RefAttributes<HTMLButtonElement>>;
|
|
77
|
+
};
|
|
53
78
|
export { TopBar };
|
|
54
79
|
//# sourceMappingURL=top-bar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../src/shell/top-bar.tsx"],"names":[],"mappings":"AAEA
|
|
1
|
+
{"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../src/shell/top-bar.tsx"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,gCAAgC;IAChC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2BAA2B;IAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IACxB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAMD,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAgCD,UAAU,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACpE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAmBD,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAmBD,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAmBD,QAAA,MAAM,MAAM;;;;CAIF,CAAA;AAEV,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACvE,GAAG,CAAC,EAAE,MAAM,OAAO,MAAM,CAAA;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAmBD,UAAU,qBACR,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,OAAO,EAAE,MAAM,CAAA;CAChB;AAiCD,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,kBAAkB,CAAC;IACzE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAsBD,UAAU,mBAAmB;IAC3B,IAAI,EAAE,UAAU,CAAA;IAChB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAiJD,MAAM,MAAM,WAAW,GAAG,eAAe,CAAA;AAEzC,QAAA,MAAM,MAAM;;;;;;;;CAQV,CAAA;AAEF,OAAO,EAAE,MAAM,EAAE,CAAA"}
|
package/dist/shell/top-bar.js
CHANGED
|
@@ -1,175 +1,238 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import * as
|
|
4
|
-
import { useColorMode as
|
|
5
|
-
import { Avatar as A, AvatarImage as
|
|
6
|
-
import { DropdownMenu as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
onLogout: f,
|
|
17
|
-
onSearchClick: u,
|
|
18
|
-
onAiChatClick: p,
|
|
19
|
-
mobileLogo: h,
|
|
20
|
-
notificationSlot: y,
|
|
21
|
-
userMenuItems: o,
|
|
22
|
-
className: C,
|
|
23
|
-
...k
|
|
24
|
-
}, v) => {
|
|
25
|
-
var g;
|
|
26
|
-
const { colorMode: b, toggleColorMode: M } = j(), S = () => {
|
|
27
|
-
u ? u() : document.dispatchEvent(
|
|
28
|
-
new KeyboardEvent("keydown", {
|
|
29
|
-
key: "k",
|
|
30
|
-
ctrlKey: !0,
|
|
31
|
-
bubbles: !0
|
|
32
|
-
})
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
return /* @__PURE__ */ s(
|
|
2
|
+
import { jsx as e, jsxs as c, Fragment as D } from "react/jsx-runtime";
|
|
3
|
+
import * as l from "react";
|
|
4
|
+
import { useColorMode as U } from "../hooks/use-color-mode.js";
|
|
5
|
+
import { Avatar as A, AvatarImage as I, AvatarFallback as L } from "../ui/avatar.js";
|
|
6
|
+
import { DropdownMenu as S, DropdownMenuTrigger as F, DropdownMenuContent as O, DropdownMenuItem as f, DropdownMenuSeparator as h } from "../ui/dropdown-menu.js";
|
|
7
|
+
import { Tooltip as x, TooltipTrigger as b, TooltipContent as w } from "../ui/tooltip.js";
|
|
8
|
+
import { IconUser as _, IconSun as z, IconMoon as E, IconLogout as P } from "@tabler/icons-react";
|
|
9
|
+
import { cn as d } from "../ui/lib/utils.js";
|
|
10
|
+
const N = l.forwardRef(
|
|
11
|
+
({ className: r, children: s, ...t }, a) => {
|
|
12
|
+
const n = l.Children.toArray(s).some(
|
|
13
|
+
(i) => l.isValidElement(i) && i.type === p
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ e(
|
|
36
16
|
"div",
|
|
37
17
|
{
|
|
38
|
-
...
|
|
39
|
-
ref:
|
|
40
|
-
className:
|
|
41
|
-
"z-sticky
|
|
42
|
-
|
|
18
|
+
...t,
|
|
19
|
+
ref: a,
|
|
20
|
+
className: d(
|
|
21
|
+
"z-sticky w-full border-b border-surface-border-strong bg-surface-2 px-ds-05 py-ds-04 md:px-ds-06",
|
|
22
|
+
n ? "grid grid-cols-[1fr_auto_1fr] items-center" : "flex items-center",
|
|
23
|
+
r
|
|
43
24
|
),
|
|
44
|
-
children:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
25
|
+
children: s
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
N.displayName = "TopBar";
|
|
31
|
+
const T = l.forwardRef(
|
|
32
|
+
({ className: r, children: s, ...t }, a) => /* @__PURE__ */ e(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
ref: a,
|
|
36
|
+
className: d("flex items-center gap-ds-04", r),
|
|
37
|
+
...t,
|
|
38
|
+
children: s
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
);
|
|
42
|
+
T.displayName = "TopBar.Left";
|
|
43
|
+
const p = l.forwardRef(
|
|
44
|
+
({ className: r, children: s, ...t }, a) => /* @__PURE__ */ e(
|
|
45
|
+
"div",
|
|
46
|
+
{
|
|
47
|
+
ref: a,
|
|
48
|
+
className: d("flex items-center justify-center px-ds-04", r),
|
|
49
|
+
...t,
|
|
50
|
+
children: s
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
p.displayName = "TopBar.Center";
|
|
55
|
+
const y = l.forwardRef(
|
|
56
|
+
({ className: r, children: s, ...t }, a) => /* @__PURE__ */ e(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
ref: a,
|
|
60
|
+
className: d("ml-auto flex items-center gap-ds-04", r),
|
|
61
|
+
...t,
|
|
62
|
+
children: s
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
y.displayName = "TopBar.Right";
|
|
67
|
+
const V = {
|
|
68
|
+
tight: "gap-ds-02",
|
|
69
|
+
default: "gap-ds-04",
|
|
70
|
+
loose: "gap-ds-06"
|
|
71
|
+
}, B = l.forwardRef(
|
|
72
|
+
({ gap: r = "default", className: s, children: t, ...a }, n) => /* @__PURE__ */ e(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
ref: n,
|
|
76
|
+
className: d("flex items-center", V[r], s),
|
|
77
|
+
...a,
|
|
78
|
+
children: t
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
);
|
|
82
|
+
B.displayName = "TopBar.Section";
|
|
83
|
+
const C = l.forwardRef(({ icon: r, tooltip: s, className: t, ...a }, n) => /* @__PURE__ */ c(x, { children: [
|
|
84
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(
|
|
85
|
+
"button",
|
|
86
|
+
{
|
|
87
|
+
ref: n,
|
|
88
|
+
type: "button",
|
|
89
|
+
className: d(
|
|
90
|
+
"flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-surface-border-strong bg-surface-3 text-surface-fg-muted transition-colors hover:bg-surface-4",
|
|
91
|
+
t
|
|
92
|
+
),
|
|
93
|
+
...a,
|
|
94
|
+
children: /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm", "aria-hidden": "true", children: r })
|
|
95
|
+
}
|
|
96
|
+
) }),
|
|
97
|
+
/* @__PURE__ */ e(w, { side: "bottom", align: "center", children: s })
|
|
98
|
+
] }));
|
|
99
|
+
C.displayName = "TopBar.IconButton";
|
|
100
|
+
const M = l.forwardRef(
|
|
101
|
+
({ className: r, children: s, ...t }, a) => /* @__PURE__ */ e(
|
|
102
|
+
"h2",
|
|
103
|
+
{
|
|
104
|
+
ref: a,
|
|
105
|
+
className: d(
|
|
106
|
+
"hidden text-ds-lg text-surface-fg md:block",
|
|
107
|
+
r
|
|
108
|
+
),
|
|
109
|
+
...t,
|
|
110
|
+
children: s
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
);
|
|
114
|
+
M.displayName = "TopBar.Title";
|
|
115
|
+
const R = l.forwardRef(
|
|
116
|
+
({ user: r, onNavigate: s, onLogout: t, userMenuItems: a, className: n }, i) => {
|
|
117
|
+
var u;
|
|
118
|
+
const { colorMode: m, toggleColorMode: k } = U();
|
|
119
|
+
return /* @__PURE__ */ c(S, { children: [
|
|
120
|
+
/* @__PURE__ */ c(x, { children: [
|
|
121
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(F, { asChild: !0, children: /* @__PURE__ */ e(
|
|
122
|
+
"button",
|
|
123
|
+
{
|
|
124
|
+
ref: i,
|
|
125
|
+
type: "button",
|
|
126
|
+
className: d("flex items-center gap-ds-03 outline-none", n),
|
|
127
|
+
children: /* @__PURE__ */ c(A, { className: "h-ds-sm-plus w-ds-sm-plus cursor-pointer", children: [
|
|
128
|
+
r.image ? /* @__PURE__ */ e(I, { src: r.image, alt: r.name }) : null,
|
|
129
|
+
/* @__PURE__ */ e(L, { className: "bg-surface-3 text-surface-fg", children: (u = r.name) == null ? void 0 : u.charAt(0).toUpperCase() })
|
|
130
|
+
] })
|
|
131
|
+
}
|
|
132
|
+
) }) }),
|
|
133
|
+
/* @__PURE__ */ e(w, { side: "bottom", align: "center", children: "User Menu" })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ c(
|
|
136
|
+
O,
|
|
137
|
+
{
|
|
138
|
+
className: "w-[200px] rounded-ds-xl border border-surface-border-strong bg-surface-1 p-0 shadow-03",
|
|
139
|
+
sideOffset: 8,
|
|
140
|
+
align: "end",
|
|
141
|
+
children: [
|
|
142
|
+
/* @__PURE__ */ c("div", { className: "border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
|
|
143
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg", children: r.name }),
|
|
144
|
+
r.email && /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: r.email })
|
|
77
145
|
] }),
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: "Profile" })
|
|
105
|
-
]
|
|
106
|
-
}
|
|
146
|
+
/* @__PURE__ */ c(
|
|
147
|
+
f,
|
|
148
|
+
{
|
|
149
|
+
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
150
|
+
onClick: () => s == null ? void 0 : s("/profile"),
|
|
151
|
+
children: [
|
|
152
|
+
/* @__PURE__ */ e(_, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }),
|
|
153
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: "Profile" })
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
),
|
|
157
|
+
a == null ? void 0 : a.map((o, v) => {
|
|
158
|
+
const j = {
|
|
159
|
+
error: "text-error-11",
|
|
160
|
+
success: "text-success-11",
|
|
161
|
+
warning: "text-warning-11",
|
|
162
|
+
info: "text-info-11"
|
|
163
|
+
}, g = o.color ? j[o.color] ?? "text-surface-fg-muted" : "text-surface-fg-muted";
|
|
164
|
+
return /* @__PURE__ */ c(l.Fragment, { children: [
|
|
165
|
+
o.separator && /* @__PURE__ */ e(h, { className: "bg-surface-border" }),
|
|
166
|
+
/* @__PURE__ */ c(
|
|
167
|
+
f,
|
|
168
|
+
{
|
|
169
|
+
className: d(
|
|
170
|
+
"flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
171
|
+
o.disabled && "pointer-events-none opacity-action-disabled"
|
|
107
172
|
),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return /* @__PURE__ */ s(w.Fragment, { children: [
|
|
116
|
-
r.separator && /* @__PURE__ */ e(N, { className: "bg-surface-border" }),
|
|
117
|
-
/* @__PURE__ */ s(
|
|
118
|
-
a,
|
|
119
|
-
{
|
|
120
|
-
className: l(
|
|
121
|
-
"flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
122
|
-
r.disabled && "pointer-events-none opacity-action-disabled"
|
|
123
|
-
),
|
|
124
|
-
disabled: r.disabled,
|
|
125
|
-
onClick: () => {
|
|
126
|
-
r.disabled || (r.onClick ? r.onClick() : r.href && (d == null || d(r.href)));
|
|
127
|
-
},
|
|
128
|
-
children: [
|
|
129
|
-
r.icon && /* @__PURE__ */ e("span", { className: l("[&>svg]:h-ico-sm [&>svg]:w-ico-sm", x), children: r.icon }),
|
|
130
|
-
/* @__PURE__ */ e("span", { className: l("text-ds-md", x), children: r.label }),
|
|
131
|
-
r.badge != null && r.badge !== !1 && (typeof r.badge == "string" ? /* @__PURE__ */ e("span", { className: "ml-auto inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-ds-full bg-error-9 px-ds-02 text-[10px] font-semibold leading-none text-accent-fg", children: r.badge }) : /* @__PURE__ */ e("span", { className: "ml-auto h-[8px] w-[8px] rounded-ds-full bg-error-9" }))
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
)
|
|
135
|
-
] }, r.label + T);
|
|
136
|
-
}),
|
|
137
|
-
/* @__PURE__ */ s(
|
|
138
|
-
a,
|
|
139
|
-
{
|
|
140
|
-
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
141
|
-
onClick: M,
|
|
142
|
-
children: [
|
|
143
|
-
b === "dark" ? /* @__PURE__ */ e(P, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }) : /* @__PURE__ */ e(q, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }),
|
|
144
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: b === "dark" ? "Light Mode" : "Dark Mode" })
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
),
|
|
148
|
-
f && /* @__PURE__ */ s(I, { children: [
|
|
149
|
-
/* @__PURE__ */ e(N, { className: "bg-surface-border" }),
|
|
150
|
-
/* @__PURE__ */ s(
|
|
151
|
-
a,
|
|
173
|
+
disabled: o.disabled,
|
|
174
|
+
onClick: () => {
|
|
175
|
+
o.disabled || (o.onClick ? o.onClick() : o.href && (s == null || s(o.href)));
|
|
176
|
+
},
|
|
177
|
+
children: [
|
|
178
|
+
o.icon && /* @__PURE__ */ e(
|
|
179
|
+
"span",
|
|
152
180
|
{
|
|
153
|
-
className:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
]
|
|
181
|
+
className: d(
|
|
182
|
+
"[&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
183
|
+
g
|
|
184
|
+
),
|
|
185
|
+
children: o.icon
|
|
159
186
|
}
|
|
160
|
-
)
|
|
161
|
-
|
|
187
|
+
),
|
|
188
|
+
/* @__PURE__ */ e("span", { className: d("text-ds-md", g), children: o.label }),
|
|
189
|
+
o.badge != null && o.badge !== !1 && (typeof o.badge == "string" ? /* @__PURE__ */ e("span", { className: "ml-auto inline-flex h-[18px] min-w-[18px] items-center justify-center rounded-ds-full bg-error-9 px-ds-02 text-[10px] font-semibold leading-none text-accent-fg", children: o.badge }) : /* @__PURE__ */ e("span", { className: "ml-auto h-[8px] w-[8px] rounded-ds-full bg-error-9" }))
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
)
|
|
193
|
+
] }, o.label + v);
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ c(
|
|
196
|
+
f,
|
|
197
|
+
{
|
|
198
|
+
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
199
|
+
onClick: k,
|
|
200
|
+
children: [
|
|
201
|
+
m === "dark" ? /* @__PURE__ */ e(z, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }) : /* @__PURE__ */ e(E, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }),
|
|
202
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: m === "dark" ? "Light Mode" : "Dark Mode" })
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
),
|
|
206
|
+
t && /* @__PURE__ */ c(D, { children: [
|
|
207
|
+
/* @__PURE__ */ e(h, { className: "bg-surface-border" }),
|
|
208
|
+
/* @__PURE__ */ c(
|
|
209
|
+
f,
|
|
210
|
+
{
|
|
211
|
+
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
212
|
+
onClick: t,
|
|
213
|
+
children: [
|
|
214
|
+
/* @__PURE__ */ e(P, { className: "h-ico-sm w-ico-sm text-error-11" }),
|
|
215
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-error-11", children: "Logout" })
|
|
162
216
|
]
|
|
163
217
|
}
|
|
164
218
|
)
|
|
165
219
|
] })
|
|
166
|
-
]
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
);
|
|
220
|
+
]
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
] });
|
|
170
224
|
}
|
|
171
225
|
);
|
|
172
|
-
|
|
226
|
+
R.displayName = "TopBar.UserMenu";
|
|
227
|
+
const X = Object.assign(N, {
|
|
228
|
+
Left: T,
|
|
229
|
+
Center: p,
|
|
230
|
+
Right: y,
|
|
231
|
+
Section: B,
|
|
232
|
+
IconButton: C,
|
|
233
|
+
Title: M,
|
|
234
|
+
UserMenu: R
|
|
235
|
+
});
|
|
173
236
|
export {
|
|
174
|
-
|
|
237
|
+
X as TopBar
|
|
175
238
|
};
|
package/dist/tokens/semantic.css
CHANGED
|
@@ -104,8 +104,8 @@
|
|
|
104
104
|
--color-surface-fg: var(--neutral-12);
|
|
105
105
|
--color-surface-fg-muted: var(--neutral-11);
|
|
106
106
|
--color-surface-fg-subtle: var(--neutral-8);
|
|
107
|
-
--color-surface-border: var(--neutral-
|
|
108
|
-
--color-surface-border-strong: var(--neutral-
|
|
107
|
+
--color-surface-border: var(--neutral-5);
|
|
108
|
+
--color-surface-border-strong: var(--neutral-6);
|
|
109
109
|
|
|
110
110
|
/* ═══════════════════════════════════════════════════════════
|
|
111
111
|
STATUS — Error
|
|
@@ -353,9 +353,9 @@
|
|
|
353
353
|
--color-info-fg: var(--neutral-12);
|
|
354
354
|
|
|
355
355
|
/* Dark mode borders need lower contrast — bright borders look harsh.
|
|
356
|
-
Drop
|
|
357
|
-
--color-surface-border: var(--neutral-
|
|
358
|
-
--color-surface-border-strong: var(--neutral-
|
|
356
|
+
Drop to step 3/4 for subtle resting borders that don't overpower surfaces */
|
|
357
|
+
--color-surface-border: var(--neutral-3);
|
|
358
|
+
--color-surface-border-strong: var(--neutral-4);
|
|
359
359
|
|
|
360
360
|
/* Overlay */
|
|
361
361
|
--color-overlay: oklch(0 0 0 / 0.70);
|