@devalok/shilp-sutra 0.28.0 → 0.29.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/_chunks/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +5 -5
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +73 -73
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.js +134 -134
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +28 -28
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +41 -27
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle.js +4 -4
- package/dist/ui/tooltip.js +40 -40
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +666 -40
- package/llms.txt +37 -18
- package/package.json +7 -2
package/dist/shell/sidebar.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as s, jsx as e, Fragment as
|
|
2
|
+
import { jsxs as s, jsx as e, Fragment as C } from "react/jsx-runtime";
|
|
3
3
|
import * as m from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { Avatar as _, AvatarImage as P, AvatarFallback as ee } from "../ui/avatar.js";
|
|
4
|
+
import { Sidebar as R, SidebarHeader as D, SidebarSeparator as f, SidebarContent as O, SidebarGroup as W, SidebarGroupLabel as T, SidebarGroupAction as z, SidebarGroupContent as H, SidebarMenu as U, SidebarFooter as S, SidebarMenuItem as k, SidebarMenuButton as y, SidebarMenuBadge as L, SidebarMenuSub as $, SidebarMenuSubItem as q, SidebarMenuSubButton as E } from "../ui/sidebar.js";
|
|
5
|
+
import { Collapsible as J, CollapsibleTrigger as K, CollapsibleContent as Q } from "../ui/collapsible.js";
|
|
6
|
+
import { Avatar as V, AvatarImage as X, AvatarFallback as Y } from "../ui/avatar.js";
|
|
8
7
|
import { cn as b } from "../ui/lib/utils.js";
|
|
9
|
-
|
|
8
|
+
import { u as j } from "../_chunks/link-context.js";
|
|
9
|
+
function Z({ className: r }) {
|
|
10
10
|
return /* @__PURE__ */ e(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -24,7 +24,7 @@ function ae({ className: r }) {
|
|
|
24
24
|
}
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function _({ className: r }) {
|
|
28
28
|
return /* @__PURE__ */ s(
|
|
29
29
|
"svg",
|
|
30
30
|
{
|
|
@@ -45,28 +45,28 @@ function re({ className: r }) {
|
|
|
45
45
|
}
|
|
46
46
|
);
|
|
47
47
|
}
|
|
48
|
-
const
|
|
49
|
-
function
|
|
48
|
+
const M = "relative gap-ds-04 rounded-ds-lg px-ds-04 py-ds-03 transition-colors duration-fast-02", A = "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-['']", I = "text-surface-fg-subtle hover:bg-surface-raised-hover hover:text-surface-fg";
|
|
49
|
+
function P({
|
|
50
50
|
item: r,
|
|
51
51
|
isActive: t,
|
|
52
52
|
isPathActive: u
|
|
53
53
|
}) {
|
|
54
|
-
const h =
|
|
54
|
+
const h = j(), i = r.badge != null ? typeof r.badge == "number" && r.badge > 99 ? "99+" : String(r.badge) : null;
|
|
55
55
|
if (r.children && r.children.length > 0) {
|
|
56
56
|
const d = r.children.some(
|
|
57
57
|
(l) => u(l.href, l.exact)
|
|
58
58
|
), g = d || t || (r.defaultOpen ?? !1);
|
|
59
|
-
return /* @__PURE__ */ e(
|
|
59
|
+
return /* @__PURE__ */ e(J, { defaultOpen: g, className: "group/collapsible", children: /* @__PURE__ */ s(k, { children: [
|
|
60
60
|
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
61
61
|
/* @__PURE__ */ e(
|
|
62
|
-
|
|
62
|
+
y,
|
|
63
63
|
{
|
|
64
64
|
asChild: !0,
|
|
65
65
|
isActive: t || d,
|
|
66
66
|
tooltip: r.title,
|
|
67
67
|
className: b(
|
|
68
|
-
|
|
69
|
-
t || d ?
|
|
68
|
+
M,
|
|
69
|
+
t || d ? A : I
|
|
70
70
|
),
|
|
71
71
|
children: /* @__PURE__ */ s(
|
|
72
72
|
h,
|
|
@@ -82,20 +82,20 @@ function se({
|
|
|
82
82
|
)
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
i && /* @__PURE__ */ e(
|
|
86
|
-
/* @__PURE__ */ e(
|
|
85
|
+
i && /* @__PURE__ */ e(L, { children: i }),
|
|
86
|
+
/* @__PURE__ */ e(K, { asChild: !0, children: /* @__PURE__ */ e(
|
|
87
87
|
"button",
|
|
88
88
|
{
|
|
89
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-raised-hover hover:text-surface-fg group-data-[collapsible=icon]:hidden",
|
|
90
90
|
"aria-label": `Toggle ${r.title}`,
|
|
91
|
-
children: /* @__PURE__ */ e(
|
|
91
|
+
children: /* @__PURE__ */ e(Z, { className: "h-4 w-4 transition-transform duration-fast-02 ease-productive-standard group-data-[state=open]/collapsible:rotate-90" })
|
|
92
92
|
}
|
|
93
93
|
) })
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */ e(
|
|
95
|
+
/* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e($, { children: r.children.map((l) => {
|
|
96
96
|
const a = u(l.href, l.exact);
|
|
97
|
-
return /* @__PURE__ */ e(
|
|
98
|
-
|
|
97
|
+
return /* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
|
|
98
|
+
E,
|
|
99
99
|
{
|
|
100
100
|
asChild: !0,
|
|
101
101
|
isActive: a,
|
|
@@ -115,16 +115,16 @@ function se({
|
|
|
115
115
|
}) }) })
|
|
116
116
|
] }) });
|
|
117
117
|
}
|
|
118
|
-
return /* @__PURE__ */ s(
|
|
118
|
+
return /* @__PURE__ */ s(k, { children: [
|
|
119
119
|
/* @__PURE__ */ e(
|
|
120
|
-
|
|
120
|
+
y,
|
|
121
121
|
{
|
|
122
122
|
asChild: !0,
|
|
123
123
|
isActive: t,
|
|
124
124
|
tooltip: r.title,
|
|
125
125
|
className: b(
|
|
126
|
-
|
|
127
|
-
t ?
|
|
126
|
+
M,
|
|
127
|
+
t ? A : I
|
|
128
128
|
),
|
|
129
129
|
children: /* @__PURE__ */ s(
|
|
130
130
|
h,
|
|
@@ -140,10 +140,10 @@ function se({
|
|
|
140
140
|
)
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
|
-
i && /* @__PURE__ */ e(
|
|
143
|
+
i && /* @__PURE__ */ e(L, { children: i })
|
|
144
144
|
] });
|
|
145
145
|
}
|
|
146
|
-
const
|
|
146
|
+
const ee = m.forwardRef(
|
|
147
147
|
({
|
|
148
148
|
currentPath: r = "/",
|
|
149
149
|
user: t,
|
|
@@ -155,27 +155,26 @@ const ne = m.forwardRef(
|
|
|
155
155
|
footerLinks: l = [],
|
|
156
156
|
footer: a,
|
|
157
157
|
renderItem: x,
|
|
158
|
-
className:
|
|
159
|
-
...
|
|
160
|
-
},
|
|
161
|
-
|
|
162
|
-
const p = R(), v = (n, c = !1) => c || n === "/" ? r === n : r.startsWith(n);
|
|
158
|
+
className: B,
|
|
159
|
+
...F
|
|
160
|
+
}, G) => {
|
|
161
|
+
const p = j(), v = (n, c = !1) => c || n === "/" ? r === n : r.startsWith(n);
|
|
163
162
|
return /* @__PURE__ */ s(
|
|
164
|
-
|
|
163
|
+
R,
|
|
165
164
|
{
|
|
166
|
-
...
|
|
167
|
-
ref:
|
|
165
|
+
...F,
|
|
166
|
+
ref: G,
|
|
168
167
|
"aria-label": "Main navigation",
|
|
169
168
|
className: b(
|
|
170
169
|
"z-raised hidden h-full flex-col border-r border-surface-border-strong bg-surface-raised md:flex",
|
|
171
|
-
|
|
170
|
+
B
|
|
172
171
|
),
|
|
173
172
|
children: [
|
|
174
|
-
/* @__PURE__ */ e(
|
|
173
|
+
/* @__PURE__ */ e(D, { className: "px-ds-06 py-ds-06", children: h ?? /* @__PURE__ */ e("span", { className: "text-ds-lg font-semibold text-surface-fg", children: "Logo" }) }),
|
|
175
174
|
t && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04 px-ds-06 pb-ds-05", children: [
|
|
176
|
-
/* @__PURE__ */ s(
|
|
177
|
-
t.image ? /* @__PURE__ */ e(
|
|
178
|
-
/* @__PURE__ */ e(
|
|
175
|
+
/* @__PURE__ */ s(V, { className: "h-ds-sm-plus w-ds-sm-plus", children: [
|
|
176
|
+
t.image ? /* @__PURE__ */ e(X, { src: t.image, alt: t.name }) : null,
|
|
177
|
+
/* @__PURE__ */ e(Y, { className: "bg-surface-raised-hover text-surface-fg", children: t.name?.charAt(0).toUpperCase() })
|
|
179
178
|
] }),
|
|
180
179
|
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-col", children: [
|
|
181
180
|
/* @__PURE__ */ e("span", { className: "truncate text-ds-md text-surface-fg", children: t.name }),
|
|
@@ -183,18 +182,18 @@ const ne = m.forwardRef(
|
|
|
183
182
|
] })
|
|
184
183
|
] }),
|
|
185
184
|
/* @__PURE__ */ e(f, {}),
|
|
186
|
-
i && /* @__PURE__ */ s(
|
|
185
|
+
i && /* @__PURE__ */ s(C, { children: [
|
|
187
186
|
i,
|
|
188
187
|
/* @__PURE__ */ e(f, {})
|
|
189
188
|
] }),
|
|
190
|
-
/* @__PURE__ */ e(
|
|
189
|
+
/* @__PURE__ */ e(O, { className: "no-scrollbar px-ds-04", children: u.map((n, c) => /* @__PURE__ */ s("div", { children: [
|
|
191
190
|
c > 0 && /* @__PURE__ */ e(f, {}),
|
|
192
|
-
/* @__PURE__ */ s(
|
|
193
|
-
/* @__PURE__ */ e(
|
|
194
|
-
n.action && /* @__PURE__ */ e(
|
|
195
|
-
/* @__PURE__ */ e(
|
|
196
|
-
const
|
|
197
|
-
|
|
191
|
+
/* @__PURE__ */ s(W, { children: [
|
|
192
|
+
/* @__PURE__ */ e(T, { className: "px-ds-04 text-ds-sm text-surface-fg-subtle", children: n.label }),
|
|
193
|
+
n.action && /* @__PURE__ */ e(z, { asChild: !0, children: n.action }),
|
|
194
|
+
/* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(U, { children: n.items.map((o) => {
|
|
195
|
+
const N = () => /* @__PURE__ */ e(
|
|
196
|
+
P,
|
|
198
197
|
{
|
|
199
198
|
item: o,
|
|
200
199
|
isActive: v(o.href, o.exact),
|
|
@@ -202,19 +201,19 @@ const ne = m.forwardRef(
|
|
|
202
201
|
}
|
|
203
202
|
);
|
|
204
203
|
if (x) {
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
return /* @__PURE__ */ e(m.Fragment, { children:
|
|
204
|
+
const w = x(o, N);
|
|
205
|
+
if (w !== null)
|
|
206
|
+
return /* @__PURE__ */ e(m.Fragment, { children: w }, o.href);
|
|
208
207
|
}
|
|
209
|
-
return /* @__PURE__ */ e(m.Fragment, { children:
|
|
208
|
+
return /* @__PURE__ */ e(m.Fragment, { children: N() }, o.href);
|
|
210
209
|
}) }) })
|
|
211
210
|
] })
|
|
212
211
|
] }, n.label)) }),
|
|
213
|
-
d && /* @__PURE__ */ s(
|
|
212
|
+
d && /* @__PURE__ */ s(C, { children: [
|
|
214
213
|
/* @__PURE__ */ e(f, {}),
|
|
215
214
|
/* @__PURE__ */ e("div", { className: g, children: d })
|
|
216
215
|
] }),
|
|
217
|
-
a ? /* @__PURE__ */ s(
|
|
216
|
+
a ? /* @__PURE__ */ s(S, { className: "gap-ds-03 px-ds-06 py-ds-05", children: [
|
|
218
217
|
a.slot && /* @__PURE__ */ e("div", { children: a.slot }),
|
|
219
218
|
a.promo && /* @__PURE__ */ s("div", { className: "relative rounded-ds-lg border border-surface-border bg-surface-raised p-ds-04 shadow-raised", children: [
|
|
220
219
|
a.promo.onDismiss && /* @__PURE__ */ e(
|
|
@@ -223,7 +222,7 @@ const ne = m.forwardRef(
|
|
|
223
222
|
onClick: a.promo.onDismiss,
|
|
224
223
|
"aria-label": "Dismiss",
|
|
225
224
|
className: "absolute right-ds-02 top-ds-02 flex h-5 w-5 items-center justify-center rounded-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-raised-hover hover:text-surface-fg",
|
|
226
|
-
children: /* @__PURE__ */ e(
|
|
225
|
+
children: /* @__PURE__ */ e(_, { className: "h-3.5 w-3.5" })
|
|
227
226
|
}
|
|
228
227
|
),
|
|
229
228
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-03", children: [
|
|
@@ -249,8 +248,8 @@ const ne = m.forwardRef(
|
|
|
249
248
|
] })
|
|
250
249
|
] })
|
|
251
250
|
] }),
|
|
252
|
-
(
|
|
253
|
-
|
|
251
|
+
(a.links?.length || a.version) && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle", children: [
|
|
252
|
+
a.links?.map((n, c) => /* @__PURE__ */ s(m.Fragment, { children: [
|
|
254
253
|
c > 0 && /* @__PURE__ */ e("span", { children: "·" }),
|
|
255
254
|
/* @__PURE__ */ e(
|
|
256
255
|
p,
|
|
@@ -261,10 +260,10 @@ const ne = m.forwardRef(
|
|
|
261
260
|
}
|
|
262
261
|
)
|
|
263
262
|
] }, n.href)),
|
|
264
|
-
|
|
263
|
+
a.links?.length && a.version && /* @__PURE__ */ e("span", { children: "·" }),
|
|
265
264
|
a.version && (typeof a.version == "string" ? /* @__PURE__ */ e("span", { children: a.version }) : /* @__PURE__ */ e(p, { className: "transition-colors hover:text-accent-11", href: a.version.href, children: a.version.label }))
|
|
266
265
|
] })
|
|
267
|
-
] }) : l.length > 0 ? /* @__PURE__ */ e(
|
|
266
|
+
] }) : l.length > 0 ? /* @__PURE__ */ e(S, { className: "px-ds-06 py-ds-05", children: /* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle", children: l.map((n, c) => /* @__PURE__ */ s(m.Fragment, { children: [
|
|
268
267
|
c > 0 && /* @__PURE__ */ e("span", { children: "·" }),
|
|
269
268
|
/* @__PURE__ */ e(
|
|
270
269
|
p,
|
|
@@ -280,7 +279,7 @@ const ne = m.forwardRef(
|
|
|
280
279
|
);
|
|
281
280
|
}
|
|
282
281
|
);
|
|
283
|
-
|
|
282
|
+
ee.displayName = "AppSidebar";
|
|
284
283
|
export {
|
|
285
|
-
|
|
284
|
+
ee as AppSidebar
|
|
286
285
|
};
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AAuB9B,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,65 +1,66 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as d, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import { useColorMode as
|
|
5
|
-
import { Avatar as
|
|
6
|
-
import { DropdownMenu as
|
|
7
|
-
import { Tooltip as
|
|
8
|
-
import { IconUser as
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import { jsx as e, jsxs as d, Fragment as j } from "react/jsx-runtime";
|
|
3
|
+
import * as c from "react";
|
|
4
|
+
import { useColorMode as D } from "../hooks/use-color-mode.js";
|
|
5
|
+
import { Avatar as U, AvatarImage as z, AvatarFallback as A } from "../ui/avatar.js";
|
|
6
|
+
import { DropdownMenu as L, DropdownMenuTrigger as S, DropdownMenuContent as F, DropdownMenuItem as f, DropdownMenuSeparator as x } from "../ui/dropdown-menu.js";
|
|
7
|
+
import { Tooltip as h, TooltipTrigger as b, TooltipContent as N } from "../ui/tooltip.js";
|
|
8
|
+
import { IconUser as O, IconSun as _, IconMoon as E, IconLogout as P } from "@tabler/icons-react";
|
|
9
|
+
import { Icon as p } from "../ui/icon.js";
|
|
10
|
+
import { cn as n } from "../ui/lib/utils.js";
|
|
11
|
+
const w = c.forwardRef(
|
|
12
|
+
({ className: r, children: a, ...o }, t) => {
|
|
13
|
+
const l = c.Children.toArray(a).some(
|
|
14
|
+
(i) => c.isValidElement(i) && i.type === m
|
|
14
15
|
);
|
|
15
16
|
return /* @__PURE__ */ e(
|
|
16
17
|
"div",
|
|
17
18
|
{
|
|
18
|
-
...
|
|
19
|
-
ref:
|
|
20
|
-
className:
|
|
19
|
+
...o,
|
|
20
|
+
ref: t,
|
|
21
|
+
className: n(
|
|
21
22
|
"z-sticky w-full border-b border-surface-border-strong bg-surface-raised px-ds-05 py-ds-04 md:px-ds-06",
|
|
22
|
-
|
|
23
|
+
l ? "grid grid-cols-[1fr_auto_1fr] items-center" : "flex items-center",
|
|
23
24
|
r
|
|
24
25
|
),
|
|
25
|
-
children:
|
|
26
|
+
children: a
|
|
26
27
|
}
|
|
27
28
|
);
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
|
-
|
|
31
|
-
const y =
|
|
32
|
-
({ className: r, children:
|
|
31
|
+
w.displayName = "TopBar";
|
|
32
|
+
const y = c.forwardRef(
|
|
33
|
+
({ className: r, children: a, ...o }, t) => /* @__PURE__ */ e(
|
|
33
34
|
"div",
|
|
34
35
|
{
|
|
35
|
-
ref:
|
|
36
|
-
className:
|
|
37
|
-
...
|
|
38
|
-
children:
|
|
36
|
+
ref: t,
|
|
37
|
+
className: n("flex items-center gap-ds-04", r),
|
|
38
|
+
...o,
|
|
39
|
+
children: a
|
|
39
40
|
}
|
|
40
41
|
)
|
|
41
42
|
);
|
|
42
43
|
y.displayName = "TopBar.Left";
|
|
43
|
-
const
|
|
44
|
-
({ className: r, children:
|
|
44
|
+
const m = c.forwardRef(
|
|
45
|
+
({ className: r, children: a, ...o }, t) => /* @__PURE__ */ e(
|
|
45
46
|
"div",
|
|
46
47
|
{
|
|
47
|
-
ref:
|
|
48
|
-
className:
|
|
49
|
-
...
|
|
50
|
-
children:
|
|
48
|
+
ref: t,
|
|
49
|
+
className: n("flex items-center justify-center px-ds-04", r),
|
|
50
|
+
...o,
|
|
51
|
+
children: a
|
|
51
52
|
}
|
|
52
53
|
)
|
|
53
54
|
);
|
|
54
|
-
|
|
55
|
-
const T =
|
|
56
|
-
({ className: r, children:
|
|
55
|
+
m.displayName = "TopBar.Center";
|
|
56
|
+
const T = c.forwardRef(
|
|
57
|
+
({ className: r, children: a, ...o }, t) => /* @__PURE__ */ e(
|
|
57
58
|
"div",
|
|
58
59
|
{
|
|
59
|
-
ref:
|
|
60
|
-
className:
|
|
61
|
-
...
|
|
62
|
-
children:
|
|
60
|
+
ref: t,
|
|
61
|
+
className: n("ml-auto flex items-center gap-ds-04", r),
|
|
62
|
+
...o,
|
|
63
|
+
children: a
|
|
63
64
|
}
|
|
64
65
|
)
|
|
65
66
|
);
|
|
@@ -68,72 +69,71 @@ const V = {
|
|
|
68
69
|
tight: "gap-ds-02",
|
|
69
70
|
default: "gap-ds-04",
|
|
70
71
|
loose: "gap-ds-06"
|
|
71
|
-
},
|
|
72
|
-
({ gap: r = "default", className:
|
|
72
|
+
}, v = c.forwardRef(
|
|
73
|
+
({ gap: r = "default", className: a, children: o, ...t }, l) => /* @__PURE__ */ e(
|
|
73
74
|
"div",
|
|
74
75
|
{
|
|
75
|
-
ref:
|
|
76
|
-
className:
|
|
77
|
-
...
|
|
78
|
-
children:
|
|
76
|
+
ref: l,
|
|
77
|
+
className: n("flex items-center", V[r], a),
|
|
78
|
+
...t,
|
|
79
|
+
children: o
|
|
79
80
|
}
|
|
80
81
|
)
|
|
81
82
|
);
|
|
82
|
-
|
|
83
|
-
const
|
|
83
|
+
v.displayName = "TopBar.Section";
|
|
84
|
+
const B = c.forwardRef(({ icon: r, tooltip: a, className: o, ...t }, l) => /* @__PURE__ */ d(h, { children: [
|
|
84
85
|
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(
|
|
85
86
|
"button",
|
|
86
87
|
{
|
|
87
|
-
ref:
|
|
88
|
+
ref: l,
|
|
88
89
|
type: "button",
|
|
89
|
-
className:
|
|
90
|
+
className: n(
|
|
90
91
|
"flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-surface-border-strong bg-surface-raised-hover text-surface-fg-muted transition-[color,background-color,border-color,transform] hover:bg-surface-raised-active active:scale-90 duration-fast-01 ease-productive-standard",
|
|
91
|
-
|
|
92
|
+
o
|
|
92
93
|
),
|
|
93
|
-
...
|
|
94
|
+
...t,
|
|
94
95
|
children: /* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-sm [&>svg]:w-ico-sm", "aria-hidden": "true", children: r })
|
|
95
96
|
}
|
|
96
97
|
) }),
|
|
97
|
-
/* @__PURE__ */ e(
|
|
98
|
+
/* @__PURE__ */ e(N, { side: "bottom", align: "center", children: a })
|
|
98
99
|
] }));
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
({ className: r, children:
|
|
100
|
+
B.displayName = "TopBar.IconButton";
|
|
101
|
+
const C = c.forwardRef(
|
|
102
|
+
({ className: r, children: a, ...o }, t) => /* @__PURE__ */ e(
|
|
102
103
|
"h2",
|
|
103
104
|
{
|
|
104
|
-
ref:
|
|
105
|
-
className:
|
|
105
|
+
ref: t,
|
|
106
|
+
className: n(
|
|
106
107
|
"hidden text-ds-lg text-surface-fg md:block",
|
|
107
108
|
r
|
|
108
109
|
),
|
|
109
|
-
...
|
|
110
|
-
children:
|
|
110
|
+
...o,
|
|
111
|
+
children: a
|
|
111
112
|
}
|
|
112
113
|
)
|
|
113
114
|
);
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
({ user: r, onNavigate:
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(F, { asChild: !0, children: /* @__PURE__ */ e(
|
|
115
|
+
C.displayName = "TopBar.Title";
|
|
116
|
+
const M = c.forwardRef(
|
|
117
|
+
({ user: r, onNavigate: a, onLogout: o, userMenuItems: t, className: l }, i) => {
|
|
118
|
+
const { colorMode: u, toggleColorMode: k } = D();
|
|
119
|
+
return /* @__PURE__ */ d(L, { children: [
|
|
120
|
+
/* @__PURE__ */ d(h, { children: [
|
|
121
|
+
/* @__PURE__ */ e(b, { asChild: !0, children: /* @__PURE__ */ e(S, { asChild: !0, children: /* @__PURE__ */ e(
|
|
122
122
|
"button",
|
|
123
123
|
{
|
|
124
124
|
ref: i,
|
|
125
125
|
type: "button",
|
|
126
|
-
className:
|
|
127
|
-
children: /* @__PURE__ */ d(
|
|
128
|
-
r.image ? /* @__PURE__ */ e(
|
|
129
|
-
/* @__PURE__ */ e(
|
|
126
|
+
className: n("flex items-center gap-ds-03 outline-none", l),
|
|
127
|
+
children: /* @__PURE__ */ d(U, { className: "h-ds-sm-plus w-ds-sm-plus cursor-pointer", children: [
|
|
128
|
+
r.image ? /* @__PURE__ */ e(z, { src: r.image, alt: r.name }) : null,
|
|
129
|
+
/* @__PURE__ */ e(A, { className: "bg-surface-raised-hover text-surface-fg", children: r.name?.charAt(0).toUpperCase() })
|
|
130
130
|
] })
|
|
131
131
|
}
|
|
132
132
|
) }) }),
|
|
133
|
-
/* @__PURE__ */ e(
|
|
133
|
+
/* @__PURE__ */ e(N, { side: "bottom", align: "center", children: "User Menu" })
|
|
134
134
|
] }),
|
|
135
135
|
/* @__PURE__ */ d(
|
|
136
|
-
|
|
136
|
+
F,
|
|
137
137
|
{
|
|
138
138
|
className: "w-[200px] rounded-ds-xl border border-surface-border-strong bg-surface-overlay p-0 shadow-floating",
|
|
139
139
|
sideOffset: 8,
|
|
@@ -147,71 +147,71 @@ const k = l.forwardRef(
|
|
|
147
147
|
f,
|
|
148
148
|
{
|
|
149
149
|
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-raised",
|
|
150
|
-
onClick: () =>
|
|
150
|
+
onClick: () => a?.("/profile"),
|
|
151
151
|
children: [
|
|
152
|
-
/* @__PURE__ */ e(
|
|
152
|
+
/* @__PURE__ */ e(p, { icon: O, size: "sm", className: "text-surface-fg-muted" }),
|
|
153
153
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: "Profile" })
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
|
|
158
|
-
const
|
|
157
|
+
t?.map((s, R) => {
|
|
158
|
+
const I = {
|
|
159
159
|
error: "text-error-11",
|
|
160
160
|
success: "text-success-11",
|
|
161
161
|
warning: "text-warning-11",
|
|
162
162
|
info: "text-info-11"
|
|
163
|
-
}, g =
|
|
164
|
-
return /* @__PURE__ */ d(
|
|
165
|
-
|
|
163
|
+
}, g = s.color ? I[s.color] ?? "text-surface-fg-muted" : "text-surface-fg-muted";
|
|
164
|
+
return /* @__PURE__ */ d(c.Fragment, { children: [
|
|
165
|
+
s.separator && /* @__PURE__ */ e(x, { className: "bg-surface-border" }),
|
|
166
166
|
/* @__PURE__ */ d(
|
|
167
167
|
f,
|
|
168
168
|
{
|
|
169
|
-
className:
|
|
169
|
+
className: n(
|
|
170
170
|
"flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-raised",
|
|
171
|
-
|
|
171
|
+
s.disabled && "pointer-events-none opacity-action-disabled"
|
|
172
172
|
),
|
|
173
|
-
disabled:
|
|
173
|
+
disabled: s.disabled,
|
|
174
174
|
onClick: () => {
|
|
175
|
-
|
|
175
|
+
s.disabled || (s.onClick ? s.onClick() : s.href && a?.(s.href));
|
|
176
176
|
},
|
|
177
177
|
children: [
|
|
178
|
-
|
|
178
|
+
s.icon && /* @__PURE__ */ e(
|
|
179
179
|
"span",
|
|
180
180
|
{
|
|
181
|
-
className:
|
|
181
|
+
className: n(
|
|
182
182
|
"[&>svg]:h-ico-sm [&>svg]:w-ico-sm",
|
|
183
183
|
g
|
|
184
184
|
),
|
|
185
|
-
children:
|
|
185
|
+
children: s.icon
|
|
186
186
|
}
|
|
187
187
|
),
|
|
188
|
-
/* @__PURE__ */ e("span", { className:
|
|
189
|
-
|
|
188
|
+
/* @__PURE__ */ e("span", { className: n("text-ds-md", g), children: s.label }),
|
|
189
|
+
s.badge != null && s.badge !== !1 && (typeof s.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: s.badge }) : /* @__PURE__ */ e("span", { className: "ml-auto h-[8px] w-[8px] rounded-ds-full bg-error-9" }))
|
|
190
190
|
]
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
|
-
] },
|
|
193
|
+
] }, s.label + R);
|
|
194
194
|
}),
|
|
195
195
|
/* @__PURE__ */ d(
|
|
196
196
|
f,
|
|
197
197
|
{
|
|
198
198
|
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-raised",
|
|
199
|
-
onClick:
|
|
199
|
+
onClick: k,
|
|
200
200
|
children: [
|
|
201
|
-
|
|
202
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children:
|
|
201
|
+
u === "dark" ? /* @__PURE__ */ e(p, { icon: _, size: "sm", className: "text-surface-fg-muted" }) : /* @__PURE__ */ e(p, { icon: E, size: "sm", className: "text-surface-fg-muted" }),
|
|
202
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: u === "dark" ? "Light Mode" : "Dark Mode" })
|
|
203
203
|
]
|
|
204
204
|
}
|
|
205
205
|
),
|
|
206
|
-
|
|
207
|
-
/* @__PURE__ */ e(
|
|
206
|
+
o && /* @__PURE__ */ d(j, { children: [
|
|
207
|
+
/* @__PURE__ */ e(x, { className: "bg-surface-border" }),
|
|
208
208
|
/* @__PURE__ */ d(
|
|
209
209
|
f,
|
|
210
210
|
{
|
|
211
211
|
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-raised",
|
|
212
|
-
onClick:
|
|
212
|
+
onClick: o,
|
|
213
213
|
children: [
|
|
214
|
-
/* @__PURE__ */ e(
|
|
214
|
+
/* @__PURE__ */ e(p, { icon: P, size: "sm", className: "text-error-11" }),
|
|
215
215
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-error-11", children: "Logout" })
|
|
216
216
|
]
|
|
217
217
|
}
|
|
@@ -223,16 +223,16 @@ const k = l.forwardRef(
|
|
|
223
223
|
] });
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
|
-
|
|
227
|
-
const
|
|
226
|
+
M.displayName = "TopBar.UserMenu";
|
|
227
|
+
const Y = Object.assign(w, {
|
|
228
228
|
Left: y,
|
|
229
|
-
Center:
|
|
229
|
+
Center: m,
|
|
230
230
|
Right: T,
|
|
231
|
-
Section:
|
|
232
|
-
IconButton:
|
|
233
|
-
Title:
|
|
234
|
-
UserMenu:
|
|
231
|
+
Section: v,
|
|
232
|
+
IconButton: B,
|
|
233
|
+
Title: C,
|
|
234
|
+
UserMenu: M
|
|
235
235
|
});
|
|
236
236
|
export {
|
|
237
|
-
|
|
237
|
+
Y as TopBar
|
|
238
238
|
};
|