@devalok/shilp-sutra 0.17.2 → 0.18.1
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/framer.js +1376 -0
- package/dist/_chunks/link-context.js +19 -0
- package/dist/_chunks/motion-provider.js +24 -0
- package/dist/_chunks/primitives.js +3499 -3920
- package/dist/_chunks/tiptap.js +1 -1
- package/dist/_chunks/tree-view.js +183 -181
- package/dist/_chunks/use-calendar.js +531 -515
- package/dist/_chunks/vendor-client.js +1792 -1049
- package/dist/_chunks/vendor-utils.js +5123 -1169
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +75 -78
- package/dist/composed/avatar-group.js +33 -33
- package/dist/composed/command-palette.d.ts +1 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +207 -158
- package/dist/composed/confirm-dialog.d.ts +3 -5
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +47 -42
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +30 -30
- package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts +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 +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/presets.d.ts +1 -1
- package/dist/composed/date-picker/presets.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/empty-state.d.ts +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +51 -47
- package/dist/composed/error-boundary.d.ts +1 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +48 -48
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
- package/dist/composed/global-loading.d.ts +1 -1
- package/dist/composed/global-loading.d.ts.map +1 -1
- package/dist/composed/global-loading.js +22 -19
- package/dist/composed/index.d.ts +2 -4
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +26 -29
- package/dist/composed/lib/string-utils.d.ts +0 -1
- package/dist/composed/lib/string-utils.js +0 -1
- package/dist/composed/loading-skeleton.d.ts +1 -1
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js +92 -87
- package/dist/composed/member-picker.d.ts +1 -1
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js +47 -43
- package/dist/composed/page-header.js +36 -36
- package/dist/composed/page-skeletons.d.ts +9 -3
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js +58 -58
- package/dist/composed/priority-indicator.js +24 -24
- package/dist/composed/rich-text-editor.d.ts +3 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +317 -310
- package/dist/composed/schedule-view.js +84 -84
- package/dist/composed/simple-tooltip.d.ts +2 -5
- package/dist/composed/simple-tooltip.d.ts.map +1 -1
- package/dist/composed/simple-tooltip.js +19 -14
- package/dist/composed/status-badge.d.ts +2 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +81 -68
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -4
- package/dist/hooks/use-toast.d.ts +15 -45
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +2 -95
- package/dist/motion/index.d.ts +4 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +12 -0
- package/dist/motion/motion-provider.d.ts +18 -0
- package/dist/motion/motion-provider.d.ts.map +1 -0
- package/dist/motion/primitives-index.d.ts +3 -0
- package/dist/motion/primitives-index.d.ts.map +1 -0
- package/dist/motion/primitives-index.js +187 -0
- package/dist/motion/primitives.d.ts +38 -0
- package/dist/motion/primitives.d.ts.map +1 -0
- package/dist/shell/app-command-palette.d.ts +14 -5
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +152 -130
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +90 -92
- package/dist/shell/command-registry.d.ts +23 -0
- package/dist/shell/command-registry.d.ts.map +1 -0
- package/dist/shell/command-registry.js +18 -0
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -11
- package/dist/shell/link-context.d.ts +6 -10
- package/dist/shell/link-context.d.ts.map +1 -1
- package/dist/shell/link-context.js +3 -16
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +129 -124
- package/dist/shell/notification-preferences.d.ts +10 -5
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +169 -165
- package/dist/shell/sidebar.js +104 -104
- package/dist/shell/top-bar.js +67 -67
- package/dist/tailwind/index.cjs +118 -297
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +118 -297
- package/dist/tokens/generate-scale.d.ts +86 -0
- package/dist/tokens/generate-scale.d.ts.map +1 -0
- package/dist/tokens/primitives.css +415 -187
- package/dist/tokens/semantic.css +244 -270
- package/dist/tokens/typography.css +6 -6
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +34 -24
- package/dist/ui/alert-dialog.d.ts +4 -1
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +115 -74
- package/dist/ui/alert.d.ts +6 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +65 -50
- package/dist/ui/aspect-ratio.d.ts +2 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +14 -4
- package/dist/ui/autocomplete.d.ts +11 -2
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +85 -60
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +46 -35
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +72 -67
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +54 -40
- package/dist/ui/breadcrumb.d.ts +2 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +19 -19
- package/dist/ui/button-group.js +4 -4
- package/dist/ui/button.d.ts +10 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +102 -66
- package/dist/ui/card.d.ts +2 -2
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +61 -53
- package/dist/ui/charts/_internal/animation.d.ts +1 -1
- package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
- package/dist/ui/charts/area-chart.d.ts +3 -5
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +3 -5
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -5
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/gauge-chart.d.ts +3 -5
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
- package/dist/ui/charts/index.js +1204 -1095
- package/dist/ui/charts/line-chart.d.ts +3 -5
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -5
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +3 -5
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.d.ts +5 -5
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +31 -19
- package/dist/ui/chip.d.ts +3 -2
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +58 -50
- package/dist/ui/code.js +16 -16
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +23 -15
- package/dist/ui/color-input.d.ts +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +27 -27
- package/dist/ui/combobox.d.ts +2 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +177 -166
- package/dist/ui/container.js +4 -4
- package/dist/ui/context-menu.d.ts +4 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +147 -87
- package/dist/ui/data-table-toolbar.d.ts +3 -2
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +65 -63
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +275 -240
- package/dist/ui/dialog.d.ts +3 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +114 -74
- package/dist/ui/dropdown-menu.d.ts +5 -3
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +151 -90
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +170 -128
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +30 -27
- package/dist/ui/hover-card.d.ts +1 -1
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +53 -21
- package/dist/ui/icon-button.js +9 -9
- package/dist/ui/index.d.ts +18 -18
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +322 -533
- package/dist/ui/input-otp.d.ts +2 -0
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +8 -8
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +35 -33
- package/dist/ui/label.js +12 -12
- package/dist/ui/lib/date-utils.d.ts +5 -0
- package/dist/ui/lib/date-utils.d.ts.map +1 -0
- package/dist/ui/lib/date-utils.js +12 -0
- package/dist/ui/lib/index.d.ts +7 -0
- package/dist/ui/lib/index.d.ts.map +1 -0
- package/dist/ui/lib/link-context.d.ts +13 -0
- package/dist/ui/lib/link-context.d.ts.map +1 -0
- package/dist/ui/lib/motion.d.ts +44 -9
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +34 -0
- package/dist/ui/lib/use-ripple.d.ts.map +1 -1
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/link.js +11 -11
- package/dist/ui/menubar.d.ts +4 -2
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +142 -98
- package/dist/ui/navigation-menu.d.ts +2 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +176 -73
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +58 -51
- package/dist/ui/pagination.js +23 -23
- package/dist/ui/popover.d.ts +2 -1
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +54 -22
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +58 -42
- package/dist/ui/radio.js +15 -15
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +28 -33
- package/dist/ui/segmented-control.d.ts +4 -2
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +146 -123
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +75 -64
- package/dist/ui/separator.js +12 -12
- package/dist/ui/sheet.d.ts +1 -1
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +111 -75
- package/dist/ui/sidebar.d.ts +6 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +574 -36
- package/dist/ui/skeleton.js +2 -2
- package/dist/ui/slider.d.ts +9 -0
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +33 -27
- package/dist/ui/spinner.d.ts +32 -25
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +199 -40
- package/dist/ui/stack.js +1 -1
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +181 -114
- package/dist/ui/stepper.d.ts +23 -4
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +126 -48
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +39 -26
- package/dist/ui/table.d.ts +3 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +29 -29
- package/dist/ui/tabs.d.ts +4 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +94 -44
- package/dist/ui/text.d.ts +3 -3
- package/dist/ui/text.js +2 -2
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +27 -25
- package/dist/ui/toast-types.d.ts +43 -0
- package/dist/ui/toast-types.d.ts.map +1 -0
- package/dist/ui/toast-types.js +2 -0
- package/dist/ui/toast.d.ts +60 -26
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +535 -89
- package/dist/ui/toaster.d.ts +19 -23
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +31 -21
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +29 -26
- package/dist/ui/toggle.d.ts +2 -2
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +21 -17
- package/dist/ui/tooltip.d.ts +2 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +58 -21
- package/dist/ui/tree-view/tree-view.d.ts +1 -1
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
- package/dist/ui/visually-hidden.js +3 -3
- package/llms-full.txt +3440 -1528
- package/llms.txt +67 -14
- package/package.json +50 -9
- package/dist/_chunks/avatar.js +0 -50
- package/dist/_chunks/button.js +0 -95
- package/dist/_chunks/checkbox.js +0 -14
- package/dist/_chunks/form.js +0 -27
- package/dist/_chunks/sidebar.js +0 -592
- package/dist/_chunks/spinner.js +0 -34
- package/dist/_chunks/switch.js +0 -10
- package/dist/_chunks/tooltip.js +0 -13
- package/dist/_chunks/utils.js +0 -17
- package/dist/composed/upload-progress.d.ts +0 -33
- package/dist/composed/upload-progress.d.ts.map +0 -1
- package/dist/composed/upload-progress.js +0 -386
- package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
- package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
- package/dist/ui/transitions.d.ts +0 -17
- package/dist/ui/transitions.d.ts.map +0 -1
- package/dist/ui/transitions.js +0 -111
package/dist/shell/sidebar.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as s, jsx as e, Fragment as L } from "react/jsx-runtime";
|
|
3
3
|
import * as m from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { u as R } from "../_chunks/link-context.js";
|
|
5
|
+
import { Sidebar as T, SidebarHeader as z, SidebarSeparator as f, SidebarContent as H, SidebarGroup as U, SidebarGroupLabel as $, SidebarGroupAction as q, SidebarGroupContent as E, SidebarMenu as J, SidebarFooter as M, SidebarMenuItem as A, SidebarMenuButton as I, SidebarMenuBadge as j, SidebarMenuSub as K, SidebarMenuSubItem as Q, SidebarMenuSubButton as V } from "../ui/sidebar.js";
|
|
6
6
|
import { Collapsible as X, CollapsibleTrigger as Y, CollapsibleContent as Z } from "../ui/collapsible.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
7
|
+
import { Avatar as _, AvatarImage as P, AvatarFallback as ee } from "../ui/avatar.js";
|
|
8
|
+
import { cn as b } from "../ui/lib/utils.js";
|
|
9
9
|
function ae({ className: r }) {
|
|
10
10
|
return /* @__PURE__ */ e(
|
|
11
11
|
"svg",
|
|
@@ -25,7 +25,7 @@ function ae({ className: r }) {
|
|
|
25
25
|
);
|
|
26
26
|
}
|
|
27
27
|
function re({ className: r }) {
|
|
28
|
-
return /* @__PURE__ */
|
|
28
|
+
return /* @__PURE__ */ s(
|
|
29
29
|
"svg",
|
|
30
30
|
{
|
|
31
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -45,35 +45,35 @@ 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-
|
|
49
|
-
function
|
|
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-2 hover:text-surface-fg";
|
|
49
|
+
function se({
|
|
50
50
|
item: r,
|
|
51
|
-
isActive:
|
|
52
|
-
isPathActive:
|
|
51
|
+
isActive: t,
|
|
52
|
+
isPathActive: u
|
|
53
53
|
}) {
|
|
54
54
|
const h = R(), 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
|
-
const
|
|
57
|
-
(l) =>
|
|
58
|
-
),
|
|
59
|
-
return /* @__PURE__ */ e(X, { defaultOpen:
|
|
60
|
-
/* @__PURE__ */
|
|
56
|
+
const d = r.children.some(
|
|
57
|
+
(l) => u(l.href, l.exact)
|
|
58
|
+
), g = d || t || (r.defaultOpen ?? !1);
|
|
59
|
+
return /* @__PURE__ */ e(X, { defaultOpen: g, className: "group/collapsible", children: /* @__PURE__ */ s(A, { children: [
|
|
60
|
+
/* @__PURE__ */ s("div", { className: "relative", children: [
|
|
61
61
|
/* @__PURE__ */ e(
|
|
62
|
-
|
|
62
|
+
I,
|
|
63
63
|
{
|
|
64
64
|
asChild: !0,
|
|
65
|
-
isActive:
|
|
65
|
+
isActive: t || d,
|
|
66
66
|
tooltip: r.title,
|
|
67
|
-
className:
|
|
67
|
+
className: b(
|
|
68
68
|
B,
|
|
69
|
-
|
|
69
|
+
t || d ? F : G
|
|
70
70
|
),
|
|
71
|
-
children: /* @__PURE__ */
|
|
71
|
+
children: /* @__PURE__ */ s(
|
|
72
72
|
h,
|
|
73
73
|
{
|
|
74
74
|
href: r.href,
|
|
75
75
|
"aria-label": r.title,
|
|
76
|
-
"aria-current":
|
|
76
|
+
"aria-current": t ? "page" : void 0,
|
|
77
77
|
children: [
|
|
78
78
|
/* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: r.icon }),
|
|
79
79
|
/* @__PURE__ */ e("span", { className: "text-ds-base", children: r.title })
|
|
@@ -82,24 +82,24 @@ function te({
|
|
|
82
82
|
)
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
|
-
i && /* @__PURE__ */ e(
|
|
85
|
+
i && /* @__PURE__ */ e(j, { children: i }),
|
|
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-
|
|
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-2 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
|
}
|
|
93
93
|
) })
|
|
94
94
|
] }),
|
|
95
|
-
/* @__PURE__ */ e(Z, {
|
|
96
|
-
const a =
|
|
95
|
+
/* @__PURE__ */ e(Z, { children: /* @__PURE__ */ e(K, { children: r.children.map((l) => {
|
|
96
|
+
const a = u(l.href, l.exact);
|
|
97
97
|
return /* @__PURE__ */ e(Q, { children: /* @__PURE__ */ e(
|
|
98
98
|
V,
|
|
99
99
|
{
|
|
100
100
|
asChild: !0,
|
|
101
101
|
isActive: a,
|
|
102
|
-
children: /* @__PURE__ */
|
|
102
|
+
children: /* @__PURE__ */ s(
|
|
103
103
|
h,
|
|
104
104
|
{
|
|
105
105
|
href: l.href,
|
|
@@ -115,23 +115,23 @@ function te({
|
|
|
115
115
|
}) }) })
|
|
116
116
|
] }) });
|
|
117
117
|
}
|
|
118
|
-
return /* @__PURE__ */
|
|
118
|
+
return /* @__PURE__ */ s(A, { children: [
|
|
119
119
|
/* @__PURE__ */ e(
|
|
120
|
-
|
|
120
|
+
I,
|
|
121
121
|
{
|
|
122
122
|
asChild: !0,
|
|
123
|
-
isActive:
|
|
123
|
+
isActive: t,
|
|
124
124
|
tooltip: r.title,
|
|
125
|
-
className:
|
|
125
|
+
className: b(
|
|
126
126
|
B,
|
|
127
|
-
|
|
127
|
+
t ? F : G
|
|
128
128
|
),
|
|
129
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ s(
|
|
130
130
|
h,
|
|
131
131
|
{
|
|
132
132
|
href: r.href,
|
|
133
133
|
"aria-label": r.title,
|
|
134
|
-
"aria-current":
|
|
134
|
+
"aria-current": t ? "page" : void 0,
|
|
135
135
|
children: [
|
|
136
136
|
/* @__PURE__ */ e("span", { className: "[&>svg]:h-ico-md [&>svg]:w-ico-md shrink-0", "aria-hidden": "true", children: r.icon }),
|
|
137
137
|
/* @__PURE__ */ e("span", { className: "text-ds-base", children: r.title })
|
|
@@ -140,147 +140,147 @@ function te({
|
|
|
140
140
|
)
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
|
-
i && /* @__PURE__ */ e(
|
|
143
|
+
i && /* @__PURE__ */ e(j, { children: i })
|
|
144
144
|
] });
|
|
145
145
|
}
|
|
146
|
-
const
|
|
146
|
+
const ne = m.forwardRef(
|
|
147
147
|
({
|
|
148
148
|
currentPath: r = "/",
|
|
149
|
-
user:
|
|
150
|
-
navGroups:
|
|
149
|
+
user: t,
|
|
150
|
+
navGroups: u = [],
|
|
151
151
|
logo: h,
|
|
152
152
|
headerSlot: i,
|
|
153
|
-
preFooterSlot:
|
|
154
|
-
preFooterClassName:
|
|
153
|
+
preFooterSlot: d,
|
|
154
|
+
preFooterClassName: g,
|
|
155
155
|
footerLinks: l = [],
|
|
156
156
|
footer: a,
|
|
157
|
-
renderItem:
|
|
157
|
+
renderItem: x,
|
|
158
158
|
className: D,
|
|
159
159
|
...O
|
|
160
160
|
}, W) => {
|
|
161
|
-
var N, w,
|
|
162
|
-
const
|
|
163
|
-
return /* @__PURE__ */
|
|
161
|
+
var N, w, C, S;
|
|
162
|
+
const p = R(), v = (n, c = !1) => c || n === "/" ? r === n : r.startsWith(n);
|
|
163
|
+
return /* @__PURE__ */ s(
|
|
164
164
|
T,
|
|
165
165
|
{
|
|
166
166
|
...O,
|
|
167
167
|
ref: W,
|
|
168
168
|
"aria-label": "Main navigation",
|
|
169
|
-
className:
|
|
170
|
-
"z-raised hidden h-full flex-col border-r border-border bg-
|
|
169
|
+
className: b(
|
|
170
|
+
"z-raised hidden h-full flex-col border-r border-surface-border-strong bg-surface-1 md:flex",
|
|
171
171
|
D
|
|
172
172
|
),
|
|
173
173
|
children: [
|
|
174
|
-
/* @__PURE__ */ e(z, { className: "px-ds-06 py-ds-06", children: h ?? /* @__PURE__ */ e("span", { className: "text-ds-lg font-semibold text-
|
|
175
|
-
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
|
|
178
|
-
/* @__PURE__ */ e(ee, { className: "bg-
|
|
174
|
+
/* @__PURE__ */ e(z, { className: "px-ds-06 py-ds-06", children: h ?? /* @__PURE__ */ e("span", { className: "text-ds-lg font-semibold text-surface-fg", children: "Logo" }) }),
|
|
175
|
+
t && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04 px-ds-06 pb-ds-05", children: [
|
|
176
|
+
/* @__PURE__ */ s(_, { className: "h-ds-sm-plus w-ds-sm-plus", children: [
|
|
177
|
+
t.image ? /* @__PURE__ */ e(P, { src: t.image, alt: t.name }) : null,
|
|
178
|
+
/* @__PURE__ */ e(ee, { className: "bg-surface-3 text-surface-fg", children: (N = t.name) == null ? void 0 : N.charAt(0).toUpperCase() })
|
|
179
179
|
] }),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */ e("span", { className: "truncate text-ds-md text-
|
|
182
|
-
/* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-
|
|
180
|
+
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-col", children: [
|
|
181
|
+
/* @__PURE__ */ e("span", { className: "truncate text-ds-md text-surface-fg", children: t.name }),
|
|
182
|
+
/* @__PURE__ */ e("span", { className: "truncate text-ds-sm text-surface-fg-subtle", children: t.designation || t.role })
|
|
183
183
|
] })
|
|
184
184
|
] }),
|
|
185
|
-
/* @__PURE__ */ e(
|
|
186
|
-
i && /* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ e(f, {}),
|
|
186
|
+
i && /* @__PURE__ */ s(L, { children: [
|
|
187
187
|
i,
|
|
188
|
-
/* @__PURE__ */ e(
|
|
188
|
+
/* @__PURE__ */ e(f, {})
|
|
189
189
|
] }),
|
|
190
|
-
/* @__PURE__ */ e(H, { className: "no-scrollbar px-ds-04", children:
|
|
191
|
-
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
-
/* @__PURE__ */ e($, { className: "px-ds-04 text-ds-sm text-
|
|
194
|
-
|
|
195
|
-
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(J, { children:
|
|
196
|
-
const
|
|
197
|
-
|
|
190
|
+
/* @__PURE__ */ e(H, { className: "no-scrollbar px-ds-04", children: u.map((n, c) => /* @__PURE__ */ s("div", { children: [
|
|
191
|
+
c > 0 && /* @__PURE__ */ e(f, {}),
|
|
192
|
+
/* @__PURE__ */ s(U, { children: [
|
|
193
|
+
/* @__PURE__ */ e($, { className: "px-ds-04 text-ds-sm text-surface-fg-subtle", children: n.label }),
|
|
194
|
+
n.action && /* @__PURE__ */ e(q, { asChild: !0, children: n.action }),
|
|
195
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(J, { children: n.items.map((o) => {
|
|
196
|
+
const k = () => /* @__PURE__ */ e(
|
|
197
|
+
se,
|
|
198
198
|
{
|
|
199
199
|
item: o,
|
|
200
|
-
isActive:
|
|
201
|
-
isPathActive:
|
|
200
|
+
isActive: v(o.href, o.exact),
|
|
201
|
+
isPathActive: v
|
|
202
202
|
}
|
|
203
203
|
);
|
|
204
|
-
if (
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
return /* @__PURE__ */ e(m.Fragment, { children:
|
|
204
|
+
if (x) {
|
|
205
|
+
const y = x(o, k);
|
|
206
|
+
if (y !== null)
|
|
207
|
+
return /* @__PURE__ */ e(m.Fragment, { children: y }, o.href);
|
|
208
208
|
}
|
|
209
|
-
return /* @__PURE__ */ e(m.Fragment, { children:
|
|
209
|
+
return /* @__PURE__ */ e(m.Fragment, { children: k() }, o.href);
|
|
210
210
|
}) }) })
|
|
211
211
|
] })
|
|
212
|
-
] },
|
|
213
|
-
|
|
214
|
-
/* @__PURE__ */ e(
|
|
215
|
-
/* @__PURE__ */ e("div", { className:
|
|
212
|
+
] }, n.label)) }),
|
|
213
|
+
d && /* @__PURE__ */ s(L, { children: [
|
|
214
|
+
/* @__PURE__ */ e(f, {}),
|
|
215
|
+
/* @__PURE__ */ e("div", { className: g, children: d })
|
|
216
216
|
] }),
|
|
217
|
-
a ? /* @__PURE__ */
|
|
217
|
+
a ? /* @__PURE__ */ s(M, { className: "gap-ds-03 px-ds-06 py-ds-05", children: [
|
|
218
218
|
a.slot && /* @__PURE__ */ e("div", { children: a.slot }),
|
|
219
|
-
a.promo && /* @__PURE__ */
|
|
219
|
+
a.promo && /* @__PURE__ */ s("div", { className: "relative rounded-ds-lg border border-surface-border bg-surface-2 p-ds-04", children: [
|
|
220
220
|
a.promo.onDismiss && /* @__PURE__ */ e(
|
|
221
221
|
"button",
|
|
222
222
|
{
|
|
223
223
|
onClick: a.promo.onDismiss,
|
|
224
224
|
"aria-label": "Dismiss",
|
|
225
|
-
className: "absolute right-ds-02 top-ds-02 flex h-5 w-5 items-center justify-center rounded-ds-md text-
|
|
225
|
+
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-3 hover:text-surface-fg",
|
|
226
226
|
children: /* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" })
|
|
227
227
|
}
|
|
228
228
|
),
|
|
229
|
-
/* @__PURE__ */
|
|
230
|
-
a.promo.icon && /* @__PURE__ */ e("span", { className: "text-
|
|
231
|
-
/* @__PURE__ */
|
|
232
|
-
/* @__PURE__ */ e("p", { className: "text-ds-sm text-
|
|
229
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-03", children: [
|
|
230
|
+
a.promo.icon && /* @__PURE__ */ e("span", { className: "text-accent-11 [&>svg]:h-ico-md [&>svg]:w-ico-md", "aria-hidden": "true", children: a.promo.icon }),
|
|
231
|
+
/* @__PURE__ */ s("div", { className: "flex min-w-0 flex-col gap-ds-03", children: [
|
|
232
|
+
/* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg", children: a.promo.text }),
|
|
233
233
|
a.promo.action && (a.promo.action.href ? /* @__PURE__ */ e(
|
|
234
|
-
|
|
234
|
+
p,
|
|
235
235
|
{
|
|
236
236
|
href: a.promo.action.href,
|
|
237
237
|
onClick: a.promo.action.onClick,
|
|
238
|
-
className: "inline-flex self-start rounded-ds-md bg-
|
|
238
|
+
className: "inline-flex self-start rounded-ds-md bg-accent-9 px-ds-04 py-ds-02 text-ds-sm font-medium text-accent-fg transition-colors hover:bg-accent-10",
|
|
239
239
|
children: a.promo.action.label
|
|
240
240
|
}
|
|
241
241
|
) : /* @__PURE__ */ e(
|
|
242
242
|
"button",
|
|
243
243
|
{
|
|
244
244
|
onClick: a.promo.action.onClick,
|
|
245
|
-
className: "inline-flex self-start rounded-ds-md bg-
|
|
245
|
+
className: "inline-flex self-start rounded-ds-md bg-accent-9 px-ds-04 py-ds-02 text-ds-sm font-medium text-accent-fg transition-colors hover:bg-accent-10",
|
|
246
246
|
children: a.promo.action.label
|
|
247
247
|
}
|
|
248
248
|
))
|
|
249
249
|
] })
|
|
250
250
|
] })
|
|
251
251
|
] }),
|
|
252
|
-
(((w = a.links) == null ? void 0 : w.length) || a.version) && /* @__PURE__ */
|
|
253
|
-
(
|
|
254
|
-
|
|
252
|
+
(((w = a.links) == null ? void 0 : w.length) || a.version) && /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 text-ds-sm text-surface-fg-subtle", children: [
|
|
253
|
+
(C = a.links) == null ? void 0 : C.map((n, c) => /* @__PURE__ */ s(m.Fragment, { children: [
|
|
254
|
+
c > 0 && /* @__PURE__ */ e("span", { children: "·" }),
|
|
255
255
|
/* @__PURE__ */ e(
|
|
256
|
-
|
|
256
|
+
p,
|
|
257
257
|
{
|
|
258
|
-
className: "transition-colors hover:text-
|
|
259
|
-
href:
|
|
260
|
-
children:
|
|
258
|
+
className: "transition-colors hover:text-accent-11",
|
|
259
|
+
href: n.href,
|
|
260
|
+
children: n.label
|
|
261
261
|
}
|
|
262
262
|
)
|
|
263
|
-
] },
|
|
264
|
-
((
|
|
265
|
-
a.version && (typeof a.version == "string" ? /* @__PURE__ */ e("span", { children: a.version }) : /* @__PURE__ */ e(
|
|
263
|
+
] }, n.href)),
|
|
264
|
+
((S = a.links) == null ? void 0 : S.length) && a.version && /* @__PURE__ */ e("span", { children: "·" }),
|
|
265
|
+
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
266
|
] })
|
|
267
|
-
] }) : l.length > 0 ? /* @__PURE__ */ e(
|
|
268
|
-
|
|
267
|
+
] }) : l.length > 0 ? /* @__PURE__ */ e(M, { 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
|
+
c > 0 && /* @__PURE__ */ e("span", { children: "·" }),
|
|
269
269
|
/* @__PURE__ */ e(
|
|
270
|
-
|
|
270
|
+
p,
|
|
271
271
|
{
|
|
272
|
-
className: "transition-colors hover:text-
|
|
273
|
-
href:
|
|
274
|
-
children:
|
|
272
|
+
className: "transition-colors hover:text-accent-11",
|
|
273
|
+
href: n.href,
|
|
274
|
+
children: n.label
|
|
275
275
|
}
|
|
276
276
|
)
|
|
277
|
-
] },
|
|
277
|
+
] }, n.href)) }) }) : null
|
|
278
278
|
]
|
|
279
279
|
}
|
|
280
280
|
);
|
|
281
281
|
}
|
|
282
282
|
);
|
|
283
|
-
|
|
283
|
+
ne.displayName = "AppSidebar";
|
|
284
284
|
export {
|
|
285
|
-
|
|
285
|
+
ne as AppSidebar
|
|
286
286
|
};
|
package/dist/shell/top-bar.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as s, jsx as e, Fragment as
|
|
3
|
-
import * as
|
|
4
|
-
import { useColorMode as
|
|
5
|
-
import {
|
|
6
|
-
import { DropdownMenu as U, DropdownMenuTrigger as B, DropdownMenuContent as E, DropdownMenuItem as a, DropdownMenuSeparator as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import { jsxs as s, jsx as e, Fragment as I } from "react/jsx-runtime";
|
|
3
|
+
import * as w from "react";
|
|
4
|
+
import { useColorMode as j } from "../hooks/use-color-mode.js";
|
|
5
|
+
import { Avatar as A, AvatarImage as K, AvatarFallback as F } from "../ui/avatar.js";
|
|
6
|
+
import { DropdownMenu as U, DropdownMenuTrigger as B, DropdownMenuContent as E, DropdownMenuItem as a, DropdownMenuSeparator as N } from "../ui/dropdown-menu.js";
|
|
7
|
+
import { Tooltip as t, TooltipTrigger as n, TooltipContent as i } from "../ui/tooltip.js";
|
|
8
|
+
import { SidebarTrigger as R } from "../ui/sidebar.js";
|
|
9
9
|
import { IconSearch as z, IconSparkles as L, IconUser as O, IconSun as P, IconMoon as q, IconLogout as G } from "@tabler/icons-react";
|
|
10
|
-
import {
|
|
11
|
-
const H =
|
|
10
|
+
import { cn as l } from "../ui/lib/utils.js";
|
|
11
|
+
const H = w.forwardRef(
|
|
12
12
|
({
|
|
13
13
|
pageTitle: m = "",
|
|
14
|
-
user:
|
|
15
|
-
onNavigate:
|
|
16
|
-
onLogout:
|
|
17
|
-
onSearchClick:
|
|
18
|
-
onAiChatClick:
|
|
19
|
-
mobileLogo:
|
|
20
|
-
notificationSlot:
|
|
14
|
+
user: c,
|
|
15
|
+
onNavigate: d,
|
|
16
|
+
onLogout: f,
|
|
17
|
+
onSearchClick: u,
|
|
18
|
+
onAiChatClick: p,
|
|
19
|
+
mobileLogo: h,
|
|
20
|
+
notificationSlot: y,
|
|
21
21
|
userMenuItems: o,
|
|
22
22
|
className: C,
|
|
23
23
|
...k
|
|
24
24
|
}, v) => {
|
|
25
|
-
var
|
|
26
|
-
const { colorMode:
|
|
27
|
-
|
|
25
|
+
var g;
|
|
26
|
+
const { colorMode: b, toggleColorMode: M } = j(), S = () => {
|
|
27
|
+
u ? u() : document.dispatchEvent(
|
|
28
28
|
new KeyboardEvent("keydown", {
|
|
29
29
|
key: "k",
|
|
30
30
|
ctrlKey: !0,
|
|
@@ -37,98 +37,98 @@ const H = g.forwardRef(
|
|
|
37
37
|
{
|
|
38
38
|
...k,
|
|
39
39
|
ref: v,
|
|
40
|
-
className:
|
|
41
|
-
"z-sticky flex w-full items-center border-b border-border bg-
|
|
40
|
+
className: l(
|
|
41
|
+
"z-sticky flex w-full items-center border-b border-surface-border-strong bg-surface-1 px-ds-05 py-ds-04 md:px-ds-06",
|
|
42
42
|
C
|
|
43
43
|
),
|
|
44
44
|
children: [
|
|
45
45
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-04", children: [
|
|
46
|
-
/* @__PURE__ */ e(R, { className: "hidden text-
|
|
47
|
-
|
|
48
|
-
m && /* @__PURE__ */ e("h2", { className: "hidden text-ds-lg text-
|
|
46
|
+
/* @__PURE__ */ e(R, { className: "hidden text-surface-fg-muted md:flex" }),
|
|
47
|
+
h && /* @__PURE__ */ e("div", { className: "md:hidden", children: h }),
|
|
48
|
+
m && /* @__PURE__ */ e("h2", { className: "hidden text-ds-lg text-surface-fg md:block", children: m })
|
|
49
49
|
] }),
|
|
50
50
|
/* @__PURE__ */ s("div", { className: "ml-auto flex items-center gap-ds-03 md:gap-ds-05", children: [
|
|
51
|
-
/* @__PURE__ */ s(
|
|
51
|
+
/* @__PURE__ */ s(t, { children: [
|
|
52
52
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e(
|
|
53
53
|
"button",
|
|
54
54
|
{
|
|
55
55
|
type: "button",
|
|
56
56
|
onClick: S,
|
|
57
57
|
"aria-label": "Search (Ctrl+K)",
|
|
58
|
-
className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-border bg-
|
|
58
|
+
className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-surface-border-strong bg-surface-2 text-surface-fg-muted transition-colors hover:bg-surface-3",
|
|
59
59
|
children: /* @__PURE__ */ e(z, { className: "h-ico-sm w-ico-sm", "aria-hidden": "true" })
|
|
60
60
|
}
|
|
61
61
|
) }),
|
|
62
62
|
/* @__PURE__ */ e(i, { side: "bottom", align: "center", children: "Search (Ctrl+K)" })
|
|
63
63
|
] }),
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
y,
|
|
65
|
+
p && /* @__PURE__ */ s(t, { children: [
|
|
66
66
|
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
69
69
|
type: "button",
|
|
70
|
-
onClick:
|
|
70
|
+
onClick: p,
|
|
71
71
|
"aria-label": "AI Chat",
|
|
72
|
-
className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-border bg-
|
|
72
|
+
className: "flex h-ds-sm-plus w-ds-sm-plus items-center justify-center rounded-ds-full border border-surface-border-strong bg-surface-2 text-surface-fg-muted transition-colors hover:bg-surface-3",
|
|
73
73
|
children: /* @__PURE__ */ e(L, { className: "h-ico-sm w-ico-sm", "aria-hidden": "true" })
|
|
74
74
|
}
|
|
75
75
|
) }),
|
|
76
76
|
/* @__PURE__ */ e(i, { side: "bottom", align: "center", children: "AI Chat" })
|
|
77
77
|
] }),
|
|
78
|
-
|
|
79
|
-
/* @__PURE__ */ s(
|
|
80
|
-
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", className: "flex items-center gap-ds-03 outline-none", children: /* @__PURE__ */ s(
|
|
81
|
-
|
|
82
|
-
/* @__PURE__ */ e(F, { className: "bg-
|
|
78
|
+
c && /* @__PURE__ */ s(U, { children: [
|
|
79
|
+
/* @__PURE__ */ s(t, { children: [
|
|
80
|
+
/* @__PURE__ */ e(n, { asChild: !0, children: /* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", className: "flex items-center gap-ds-03 outline-none", children: /* @__PURE__ */ s(A, { className: "h-ds-sm-plus w-ds-sm-plus cursor-pointer", children: [
|
|
81
|
+
c.image ? /* @__PURE__ */ e(K, { src: c.image, alt: c.name }) : null,
|
|
82
|
+
/* @__PURE__ */ e(F, { className: "bg-surface-2 text-surface-fg", children: (g = c.name) == null ? void 0 : g.charAt(0).toUpperCase() })
|
|
83
83
|
] }) }) }) }),
|
|
84
84
|
/* @__PURE__ */ e(i, { side: "bottom", align: "center", children: "User Menu" })
|
|
85
85
|
] }),
|
|
86
86
|
/* @__PURE__ */ s(
|
|
87
87
|
E,
|
|
88
88
|
{
|
|
89
|
-
className: "w-[200px] rounded-ds-xl border border-border bg-
|
|
89
|
+
className: "w-[200px] rounded-ds-xl border border-surface-border-strong bg-surface-1 p-0 shadow-03",
|
|
90
90
|
sideOffset: 8,
|
|
91
91
|
align: "end",
|
|
92
92
|
children: [
|
|
93
|
-
/* @__PURE__ */ s("div", { className: "border-b border-border px-ds-05 py-ds-04", children: [
|
|
94
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-
|
|
95
|
-
|
|
93
|
+
/* @__PURE__ */ s("div", { className: "border-b border-surface-border-strong px-ds-05 py-ds-04", children: [
|
|
94
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg", children: c.name }),
|
|
95
|
+
c.email && /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg-subtle", children: c.email })
|
|
96
96
|
] }),
|
|
97
97
|
/* @__PURE__ */ s(
|
|
98
98
|
a,
|
|
99
99
|
{
|
|
100
|
-
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-
|
|
101
|
-
onClick: () =>
|
|
100
|
+
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
101
|
+
onClick: () => d == null ? void 0 : d("/profile"),
|
|
102
102
|
children: [
|
|
103
|
-
/* @__PURE__ */ e(O, { className: "h-ico-sm w-ico-sm text-
|
|
104
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-
|
|
103
|
+
/* @__PURE__ */ e(O, { className: "h-ico-sm w-ico-sm text-surface-fg-muted" }),
|
|
104
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-muted", children: "Profile" })
|
|
105
105
|
]
|
|
106
106
|
}
|
|
107
107
|
),
|
|
108
108
|
o == null ? void 0 : o.map((r, T) => {
|
|
109
|
-
const
|
|
110
|
-
error: "text-error",
|
|
111
|
-
success: "text-success",
|
|
112
|
-
warning: "text-warning",
|
|
113
|
-
info: "text-info"
|
|
114
|
-
},
|
|
115
|
-
return /* @__PURE__ */ s(
|
|
116
|
-
r.separator && /* @__PURE__ */ e(
|
|
109
|
+
const D = {
|
|
110
|
+
error: "text-error-11",
|
|
111
|
+
success: "text-success-11",
|
|
112
|
+
warning: "text-warning-11",
|
|
113
|
+
info: "text-info-11"
|
|
114
|
+
}, x = r.color ? D[r.color] ?? "text-surface-fg-muted" : "text-surface-fg-muted";
|
|
115
|
+
return /* @__PURE__ */ s(w.Fragment, { children: [
|
|
116
|
+
r.separator && /* @__PURE__ */ e(N, { className: "bg-surface-border" }),
|
|
117
117
|
/* @__PURE__ */ s(
|
|
118
118
|
a,
|
|
119
119
|
{
|
|
120
|
-
className:
|
|
121
|
-
"flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-
|
|
122
|
-
r.disabled && "pointer-events-none opacity-
|
|
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
123
|
),
|
|
124
124
|
disabled: r.disabled,
|
|
125
125
|
onClick: () => {
|
|
126
|
-
r.disabled || (r.onClick ? r.onClick() : r.href && (
|
|
126
|
+
r.disabled || (r.onClick ? r.onClick() : r.href && (d == null || d(r.href)));
|
|
127
127
|
},
|
|
128
128
|
children: [
|
|
129
|
-
r.icon && /* @__PURE__ */ e("span", { className:
|
|
130
|
-
/* @__PURE__ */ e("span", { className:
|
|
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 px-ds-02 text-[10px] font-semibold leading-none text-
|
|
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
132
|
]
|
|
133
133
|
}
|
|
134
134
|
)
|
|
@@ -137,24 +137,24 @@ const H = g.forwardRef(
|
|
|
137
137
|
/* @__PURE__ */ s(
|
|
138
138
|
a,
|
|
139
139
|
{
|
|
140
|
-
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-
|
|
140
|
+
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
141
141
|
onClick: M,
|
|
142
142
|
children: [
|
|
143
|
-
|
|
144
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-
|
|
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
145
|
]
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
|
|
149
|
-
/* @__PURE__ */ e(
|
|
148
|
+
f && /* @__PURE__ */ s(I, { children: [
|
|
149
|
+
/* @__PURE__ */ e(N, { className: "bg-surface-border" }),
|
|
150
150
|
/* @__PURE__ */ s(
|
|
151
151
|
a,
|
|
152
152
|
{
|
|
153
|
-
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-
|
|
154
|
-
onClick:
|
|
153
|
+
className: "flex w-full cursor-pointer items-center gap-ds-03 px-ds-05 py-ds-04 hover:bg-surface-2",
|
|
154
|
+
onClick: f,
|
|
155
155
|
children: [
|
|
156
|
-
/* @__PURE__ */ e(G, { className: "h-ico-sm w-ico-sm text-error" }),
|
|
157
|
-
/* @__PURE__ */ e("span", { className: "text-ds-md text-error", children: "Logout" })
|
|
156
|
+
/* @__PURE__ */ e(G, { className: "h-ico-sm w-ico-sm text-error-11" }),
|
|
157
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-error-11", children: "Logout" })
|
|
158
158
|
]
|
|
159
159
|
}
|
|
160
160
|
)
|