@justanarthur/modo-ui 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/LICENSE.beui +21 -0
- package/LICENSE.fluid-functionalism +21 -0
- package/LICENSE.motion-primitives +21 -0
- package/LICENSE.sileo +21 -0
- package/README.md +608 -2
- package/dist/base.css +994 -0
- package/dist/blocks/sidebar-app/index.d.ts +34 -0
- package/dist/blocks/sidebar-app/index.js +31 -0
- package/dist/components/badge/index.d.ts +59 -0
- package/dist/components/badge/index.js +16 -0
- package/dist/components/button/index.d.ts +59 -0
- package/dist/components/button/index.js +14 -0
- package/dist/components/card/index.d.ts +141 -0
- package/dist/components/card/index.js +42 -0
- package/dist/components/inputs/checkbox-group/index.d.ts +50 -0
- package/dist/components/inputs/checkbox-group/index.js +21 -0
- package/dist/components/inputs/color-picker/index.d.ts +137 -0
- package/dist/components/inputs/color-picker/index.js +35 -0
- package/dist/components/inputs/combobox/index.d.ts +161 -0
- package/dist/components/inputs/combobox/index.js +38 -0
- package/dist/components/inputs/date-time/calendar/index.d.ts +45 -0
- package/dist/components/inputs/date-time/calendar/index.js +18 -0
- package/dist/components/inputs/date-time/date-picker/index.d.ts +82 -0
- package/dist/components/inputs/date-time/date-picker/index.js +32 -0
- package/dist/components/inputs/date-time/date-range-picker/index.d.ts +64 -0
- package/dist/components/inputs/date-time/date-range-picker/index.js +31 -0
- package/dist/components/inputs/date-time/duration-picker/index.d.ts +57 -0
- package/dist/components/inputs/date-time/duration-picker/index.js +31 -0
- package/dist/components/inputs/date-time/month-picker/index.d.ts +57 -0
- package/dist/components/inputs/date-time/month-picker/index.js +30 -0
- package/dist/components/inputs/date-time/time-picker/index.d.ts +59 -0
- package/dist/components/inputs/date-time/time-picker/index.js +31 -0
- package/dist/components/inputs/input/index.d.ts +84 -0
- package/dist/components/inputs/input/index.js +19 -0
- package/dist/components/inputs/input-copy/index.d.ts +44 -0
- package/dist/components/inputs/input-copy/index.js +16 -0
- package/dist/components/inputs/input-message/index.d.ts +125 -0
- package/dist/components/inputs/input-message/index.js +25 -0
- package/dist/components/inputs/radio-group/index.d.ts +58 -0
- package/dist/components/inputs/radio-group/index.js +20 -0
- package/dist/components/inputs/search/index.d.ts +83 -0
- package/dist/components/inputs/search/index.js +25 -0
- package/dist/components/inputs/select/index.d.ts +105 -0
- package/dist/components/inputs/select/index.js +34 -0
- package/dist/components/inputs/slider/index.d.ts +108 -0
- package/dist/components/inputs/slider/index.js +14 -0
- package/dist/components/inputs/switch/index.d.ts +43 -0
- package/dist/components/inputs/switch/index.js +14 -0
- package/dist/components/navigation/accordion/index.d.ts +117 -0
- package/dist/components/navigation/accordion/index.js +28 -0
- package/dist/components/navigation/sidebar/index.d.ts +388 -0
- package/dist/components/navigation/sidebar/index.js +99 -0
- package/dist/components/navigation/tabs/index.d.ts +70 -0
- package/dist/components/navigation/tabs/index.js +23 -0
- package/dist/components/navigation/tabs-subtle/index.d.ts +73 -0
- package/dist/components/navigation/tabs-subtle/index.js +21 -0
- package/dist/components/overlays/alert-dialog/index.d.ts +67 -0
- package/dist/components/overlays/alert-dialog/index.js +22 -0
- package/dist/components/overlays/command/index.d.ts +121 -0
- package/dist/components/overlays/command/index.js +36 -0
- package/dist/components/overlays/context-menu/index.d.ts +97 -0
- package/dist/components/overlays/context-menu/index.js +29 -0
- package/dist/components/overlays/dialog/index.d.ts +130 -0
- package/dist/components/overlays/dialog/index.js +37 -0
- package/dist/components/overlays/dropdown/index.d.ts +222 -0
- package/dist/components/overlays/dropdown/index.js +44 -0
- package/dist/components/overlays/popover/index.d.ts +87 -0
- package/dist/components/overlays/popover/index.js +26 -0
- package/dist/components/overlays/preview-card/index.d.ts +75 -0
- package/dist/components/overlays/preview-card/index.js +19 -0
- package/dist/components/overlays/sheet/index.d.ts +67 -0
- package/dist/components/overlays/sheet/index.js +24 -0
- package/dist/components/overlays/toast/index.d.ts +107 -0
- package/dist/components/overlays/toast/index.js +21 -0
- package/dist/components/overlays/tooltip/index.d.ts +75 -0
- package/dist/components/overlays/tooltip/index.js +17 -0
- package/dist/components/table/index.d.ts +44 -0
- package/dist/components/table/index.js +26 -0
- package/dist/components/thinking-indicator/index.d.ts +32 -0
- package/dist/components/thinking-indicator/index.js +13 -0
- package/dist/index.d.ts +3926 -0
- package/dist/index.js +511 -0
- package/dist/preset.d.ts +104 -0
- package/dist/preset.js +124 -0
- package/dist/primitives/code/index.d.ts +23 -0
- package/dist/primitives/code/index.js +11 -0
- package/dist/primitives/craft/index.d.ts +31 -0
- package/dist/primitives/craft/index.js +11 -0
- package/dist/primitives/fluid-hover/index.d.ts +233 -0
- package/dist/primitives/fluid-hover/index.js +25 -0
- package/dist/primitives/morph/index.d.ts +127 -0
- package/dist/primitives/morph/index.js +19 -0
- package/dist/primitives/motion/index.d.ts +115 -0
- package/dist/primitives/motion/index.js +19 -0
- package/dist/primitives/scroll-area/index.d.ts +41 -0
- package/dist/primitives/scroll-area/index.js +12 -0
- package/dist/primitives/sizes/index.d.ts +128 -0
- package/dist/primitives/sizes/index.js +21 -0
- package/dist/primitives/surface/index.d.ts +69 -0
- package/dist/primitives/surface/index.js +17 -0
- package/dist/shared/components-0ke6xada.js +123 -0
- package/dist/shared/components-0q0sqfh4.js +146 -0
- package/dist/shared/components-0sn7ypjw.js +61 -0
- package/dist/shared/components-1j9791sn.js +345 -0
- package/dist/shared/components-1rfwbyyc.js +361 -0
- package/dist/shared/components-1v7rxytx.js +30 -0
- package/dist/shared/components-1xekx2hx.js +215 -0
- package/dist/shared/components-39jq9va1.js +86 -0
- package/dist/shared/components-3gae8nta.js +719 -0
- package/dist/shared/components-3k8xpnpq.js +1759 -0
- package/dist/shared/components-3ky44908.js +9 -0
- package/dist/shared/components-3mkepka5.js +111 -0
- package/dist/shared/components-3wk0w46f.js +667 -0
- package/dist/shared/components-4cnjmgex.js +124 -0
- package/dist/shared/components-59efxjd9.js +298 -0
- package/dist/shared/components-5xc2j8jz.js +159 -0
- package/dist/shared/components-62ybc7t2.js +496 -0
- package/dist/shared/components-66mv71kx.js +262 -0
- package/dist/shared/components-7ans7ce5.js +120 -0
- package/dist/shared/components-7btqt08d.js +270 -0
- package/dist/shared/components-7r3etddy.js +171 -0
- package/dist/shared/components-7x9kawxv.js +152 -0
- package/dist/shared/components-8fpr3s4p.js +292 -0
- package/dist/shared/components-9jvzzvt1.js +198 -0
- package/dist/shared/components-apdwtweq.js +484 -0
- package/dist/shared/components-asr5pg50.js +191 -0
- package/dist/shared/components-b2wyq2cq.js +232 -0
- package/dist/shared/components-c6s6b43g.js +15 -0
- package/dist/shared/components-ca2c898n.js +1828 -0
- package/dist/shared/components-cbxjn9p8.js +141 -0
- package/dist/shared/components-chacnk61.js +216 -0
- package/dist/shared/components-cv16mryv.js +62 -0
- package/dist/shared/components-ez65vtbq.js +110 -0
- package/dist/shared/components-ezxhrmer.js +17 -0
- package/dist/shared/components-gc5vtq2f.js +149 -0
- package/dist/shared/components-gf5s6ap9.js +42 -0
- package/dist/shared/components-gvr9w41t.js +193 -0
- package/dist/shared/components-h2dpcwgc.js +137 -0
- package/dist/shared/components-hawvy2qz.js +105 -0
- package/dist/shared/components-hqeq3w9q.js +375 -0
- package/dist/shared/components-jjw69c4c.js +28 -0
- package/dist/shared/components-jwst3vtj.js +346 -0
- package/dist/shared/components-kvr7f9hy.js +45 -0
- package/dist/shared/components-men63rwj.js +9 -0
- package/dist/shared/components-mhd39z7x.js +22 -0
- package/dist/shared/components-n7mjr357.js +26 -0
- package/dist/shared/components-ng72k97e.js +128 -0
- package/dist/shared/components-nh8tma1n.js +986 -0
- package/dist/shared/components-njzgqdwy.js +445 -0
- package/dist/shared/components-ny774h8p.js +293 -0
- package/dist/shared/components-q4daerx0.js +58 -0
- package/dist/shared/components-q5xj5c16.js +79 -0
- package/dist/shared/components-rr7a6ja9.js +160 -0
- package/dist/shared/components-s2bz1xpk.js +63 -0
- package/dist/shared/components-tqvarbfv.js +288 -0
- package/dist/shared/components-v6xp325t.js +304 -0
- package/dist/shared/components-v7wtz8hk.js +144 -0
- package/dist/shared/components-vc7vq5nz.js +32 -0
- package/dist/shared/components-vfbhxf5r.js +58 -0
- package/dist/shared/components-vynjtrk6.js +19 -0
- package/dist/shared/components-wvp1m52g.js +1200 -0
- package/dist/shared/components-yh3kwdhr.js +981 -0
- package/dist/shared/components-ytb2tefr.js +291 -0
- package/dist/shared/components-zfnmn5d4.js +220 -0
- package/dist/shared/components-zrkzcayz.js +141 -0
- package/dist/shared/components-zx6b6yby.js +42 -0
- package/dist/styles.css +1949 -0
- package/dist/tailwind.css +219 -0
- package/dist/tokens.css +345 -0
- package/package.json +103 -4
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useShape
|
|
3
|
+
} from "./components-cv16mryv.js";
|
|
4
|
+
import {
|
|
5
|
+
useSize2
|
|
6
|
+
} from "./components-0sn7ypjw.js";
|
|
7
|
+
import {
|
|
8
|
+
cn2
|
|
9
|
+
} from "./components-ezxhrmer.js";
|
|
10
|
+
import {
|
|
11
|
+
button_default
|
|
12
|
+
} from "./components-b2wyq2cq.js";
|
|
13
|
+
import {
|
|
14
|
+
useIcon
|
|
15
|
+
} from "./components-zrkzcayz.js";
|
|
16
|
+
import {
|
|
17
|
+
tooltip_default
|
|
18
|
+
} from "./components-ng72k97e.js";
|
|
19
|
+
import {
|
|
20
|
+
SidebarTrigger2,
|
|
21
|
+
SidebarInput2,
|
|
22
|
+
SidebarMenu2,
|
|
23
|
+
SidebarMenuItem2,
|
|
24
|
+
SidebarMenuButton2,
|
|
25
|
+
sidebar_default
|
|
26
|
+
} from "./components-ca2c898n.js";
|
|
27
|
+
import {
|
|
28
|
+
MenuItem2,
|
|
29
|
+
DropdownMenu2,
|
|
30
|
+
DropdownTrigger2,
|
|
31
|
+
DropdownContent2
|
|
32
|
+
} from "./components-nh8tma1n.js";
|
|
33
|
+
|
|
34
|
+
// blocks/sidebar-app/index.tsx
|
|
35
|
+
import { useState } from "react";
|
|
36
|
+
|
|
37
|
+
// blocks/sidebar-app/inset-topbar.tsx
|
|
38
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
39
|
+
function SidebarInsetTopbar({ children, className }) {
|
|
40
|
+
return /* @__PURE__ */ jsxs("header", {
|
|
41
|
+
className: cn2("flex h-12 shrink-0 items-center gap-2 px-1.5", className),
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ jsx(SidebarTrigger2, {}),
|
|
44
|
+
children
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// blocks/sidebar-app/nav-data.ts
|
|
50
|
+
var NAV_SECTIONS = [
|
|
51
|
+
{
|
|
52
|
+
label: "fluid-functionalism",
|
|
53
|
+
items: [
|
|
54
|
+
{ label: "New pricing page exploration", status: "active" },
|
|
55
|
+
{ label: "Component library audit", status: "idle" },
|
|
56
|
+
{ label: "Dark mode token pass", status: "unread" }
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "portfolio-site",
|
|
61
|
+
items: [
|
|
62
|
+
{ label: "Scrollbar fade regression", status: "idle" },
|
|
63
|
+
{ label: "Registry deploy pipeline", status: "unread" }
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
// blocks/sidebar-app/search-field.tsx
|
|
69
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
70
|
+
function SidebarSearchField({ placeholder = "Search…", shortcut = "⌘K", ...props }) {
|
|
71
|
+
const iconSize = useSize2().icon;
|
|
72
|
+
const SearchIcon = useIcon("search");
|
|
73
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
74
|
+
className: "group/search relative",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsx2(SearchIcon, {
|
|
77
|
+
size: iconSize,
|
|
78
|
+
strokeWidth: 1.5,
|
|
79
|
+
className: "pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ jsx2(SidebarInput2, {
|
|
82
|
+
placeholder,
|
|
83
|
+
"aria-label": "Search",
|
|
84
|
+
className: "pl-8 pr-12",
|
|
85
|
+
...props
|
|
86
|
+
}),
|
|
87
|
+
shortcut && /* @__PURE__ */ jsx2("kbd", {
|
|
88
|
+
className: "pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 font-sans text-micro text-muted-foreground opacity-0 transition-opacity duration-fast group-hover/search:opacity-100 group-focus-within/search:opacity-100",
|
|
89
|
+
children: shortcut
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// blocks/sidebar-app/menu-grid.ts
|
|
96
|
+
var SIDEBAR_MENU_GRID = "[&_[role=menuitem]]:pl-2 [&_[role=menuitem]]:pr-1.5 [&_[role=menuitem]]:gap-2 [&_[role=menuitemradio]]:pl-2 [&_[role=menuitemradio]]:pr-1.5 [&_[role=menuitemradio]]:gap-2";
|
|
97
|
+
var SIDEBAR_MENU_POPUP = `min-w-[240px] w-[calc(var(--anchor-width)_+_10px)] ${SIDEBAR_MENU_GRID}`;
|
|
98
|
+
|
|
99
|
+
// blocks/sidebar-app/user-footer.tsx
|
|
100
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
101
|
+
function SidebarUserFooter({ name, avatar, menu, className }) {
|
|
102
|
+
const iconSize = useSize2().icon;
|
|
103
|
+
const ChevronsUpDown = useIcon("chevrons-up-down");
|
|
104
|
+
return /* @__PURE__ */ jsx3(SidebarMenu2, {
|
|
105
|
+
"aria-label": "User",
|
|
106
|
+
className: cn2(className),
|
|
107
|
+
children: /* @__PURE__ */ jsx3(SidebarMenuItem2, {
|
|
108
|
+
children: /* @__PURE__ */ jsxs3(DropdownMenu2, {
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ jsx3(DropdownTrigger2, {
|
|
111
|
+
render: /* @__PURE__ */ jsxs3(SidebarMenuButton2, {
|
|
112
|
+
"aria-label": "Open user menu",
|
|
113
|
+
children: [
|
|
114
|
+
/* @__PURE__ */ jsx3("span", {
|
|
115
|
+
className: "-ml-0.5 -mr-0.5 flex size-5 shrink-0 items-center justify-center",
|
|
116
|
+
children: avatar
|
|
117
|
+
}),
|
|
118
|
+
/* @__PURE__ */ jsx3("span", {
|
|
119
|
+
className: "min-w-0 truncate text-body text-foreground",
|
|
120
|
+
children: name
|
|
121
|
+
}),
|
|
122
|
+
/* @__PURE__ */ jsx3("span", {
|
|
123
|
+
className: "ml-auto -mr-0.5 flex size-6 shrink-0 items-center justify-center",
|
|
124
|
+
children: /* @__PURE__ */ jsx3(ChevronsUpDown, {
|
|
125
|
+
size: iconSize,
|
|
126
|
+
strokeWidth: 1.5,
|
|
127
|
+
className: "text-muted-foreground"
|
|
128
|
+
})
|
|
129
|
+
})
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
}),
|
|
133
|
+
/* @__PURE__ */ jsx3(DropdownContent2, {
|
|
134
|
+
className: SIDEBAR_MENU_POPUP,
|
|
135
|
+
side: "top",
|
|
136
|
+
align: "start",
|
|
137
|
+
sideOffset: 6,
|
|
138
|
+
children: menu
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
})
|
|
142
|
+
})
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// blocks/sidebar-app/workspace-header.tsx
|
|
147
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
148
|
+
function SidebarWorkspaceHeader({
|
|
149
|
+
name,
|
|
150
|
+
tile,
|
|
151
|
+
menu,
|
|
152
|
+
checkedIndex,
|
|
153
|
+
defaultCheckedIndex
|
|
154
|
+
}) {
|
|
155
|
+
const iconSize = useSize2().icon;
|
|
156
|
+
const ChevronDown = useIcon("chevron-down");
|
|
157
|
+
const tileSlot = /* @__PURE__ */ jsx4("span", {
|
|
158
|
+
"aria-hidden": true,
|
|
159
|
+
className: "pointer-events-none absolute left-1.5 top-1/2 -translate-y-1/2",
|
|
160
|
+
children: tile
|
|
161
|
+
});
|
|
162
|
+
const nameSpan = /* @__PURE__ */ jsx4("span", {
|
|
163
|
+
className: "min-w-0 truncate text-body weight-semibold text-foreground",
|
|
164
|
+
children: name
|
|
165
|
+
});
|
|
166
|
+
if (!menu) {
|
|
167
|
+
return /* @__PURE__ */ jsxs4("div", {
|
|
168
|
+
className: "relative flex h-8 items-center pl-8 pr-2",
|
|
169
|
+
children: [
|
|
170
|
+
tileSlot,
|
|
171
|
+
nameSpan
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return /* @__PURE__ */ jsx4(SidebarMenu2, {
|
|
176
|
+
"aria-label": "Workspace",
|
|
177
|
+
className: "@container",
|
|
178
|
+
children: /* @__PURE__ */ jsx4(SidebarMenuItem2, {
|
|
179
|
+
children: /* @__PURE__ */ jsxs4(DropdownMenu2, {
|
|
180
|
+
children: [
|
|
181
|
+
/* @__PURE__ */ jsx4(DropdownTrigger2, {
|
|
182
|
+
render: /* @__PURE__ */ jsxs4(SidebarMenuButton2, {
|
|
183
|
+
"aria-label": "Switch workspace",
|
|
184
|
+
className: "pl-8",
|
|
185
|
+
children: [
|
|
186
|
+
tileSlot,
|
|
187
|
+
nameSpan,
|
|
188
|
+
/* @__PURE__ */ jsx4("span", {
|
|
189
|
+
className: "ml-auto inline-flex @max-[7rem]:hidden",
|
|
190
|
+
children: /* @__PURE__ */ jsx4(ChevronDown, {
|
|
191
|
+
size: iconSize,
|
|
192
|
+
strokeWidth: 1.5,
|
|
193
|
+
className: "text-muted-foreground"
|
|
194
|
+
})
|
|
195
|
+
})
|
|
196
|
+
]
|
|
197
|
+
})
|
|
198
|
+
}),
|
|
199
|
+
/* @__PURE__ */ jsx4(DropdownContent2, {
|
|
200
|
+
className: SIDEBAR_MENU_POPUP,
|
|
201
|
+
align: "start",
|
|
202
|
+
sideOffset: 4,
|
|
203
|
+
checkedIndex,
|
|
204
|
+
defaultCheckedIndex,
|
|
205
|
+
children: menu
|
|
206
|
+
})
|
|
207
|
+
]
|
|
208
|
+
})
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
function WorkspaceTile({ children, className }) {
|
|
213
|
+
const shape = useShape();
|
|
214
|
+
return /* @__PURE__ */ jsx4("span", {
|
|
215
|
+
className: cn2("flex size-5 shrink-0 items-center justify-center bg-foreground text-micro-compact weight-semibold text-background", shape.bgRadius >= 20 ? "rounded-full" : "rounded-md", className),
|
|
216
|
+
children
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// blocks/sidebar-app/index.tsx
|
|
221
|
+
import { jsx as jsx5, jsxs as jsxs5, Fragment } from "react/jsx-runtime";
|
|
222
|
+
function AppSidebar({ variant, side, className, value, onValueChange }) {
|
|
223
|
+
const PlusIcon = useIcon("plus");
|
|
224
|
+
const PencilIcon = useIcon("pencil");
|
|
225
|
+
const MoreVerticalIcon = useIcon("more-vertical");
|
|
226
|
+
const LinkIcon = useIcon("link");
|
|
227
|
+
const UserIcon = useIcon("user");
|
|
228
|
+
const SettingsIcon = useIcon("settings");
|
|
229
|
+
const ArrowLeftIcon = useIcon("arrow-left");
|
|
230
|
+
const MoonIcon = useIcon("moon");
|
|
231
|
+
return /* @__PURE__ */ jsxs5(sidebar_default, {
|
|
232
|
+
variant,
|
|
233
|
+
side,
|
|
234
|
+
className,
|
|
235
|
+
value,
|
|
236
|
+
onValueChange,
|
|
237
|
+
children: [
|
|
238
|
+
/* @__PURE__ */ jsxs5(sidebar_default.Header, {
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ jsx5(SidebarWorkspaceHeader, {
|
|
241
|
+
name: "Acme Inc",
|
|
242
|
+
tile: /* @__PURE__ */ jsx5(WorkspaceTile, {
|
|
243
|
+
children: "A"
|
|
244
|
+
}),
|
|
245
|
+
defaultCheckedIndex: 0,
|
|
246
|
+
menu: /* @__PURE__ */ jsxs5(Fragment, {
|
|
247
|
+
children: [
|
|
248
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
249
|
+
index: 0,
|
|
250
|
+
label: "Acme Inc"
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
253
|
+
index: 1,
|
|
254
|
+
label: "Personal"
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
257
|
+
index: 2,
|
|
258
|
+
icon: PlusIcon,
|
|
259
|
+
label: "New workspace"
|
|
260
|
+
})
|
|
261
|
+
]
|
|
262
|
+
})
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ jsxs5("div", {
|
|
265
|
+
className: "flex flex-col gap-0.5",
|
|
266
|
+
children: [
|
|
267
|
+
/* @__PURE__ */ jsx5(SidebarSearchField, {}),
|
|
268
|
+
/* @__PURE__ */ jsx5(sidebar_default.Menu, {
|
|
269
|
+
children: /* @__PURE__ */ jsx5(sidebar_default.MenuItem, {
|
|
270
|
+
children: /* @__PURE__ */ jsxs5(sidebar_default.MenuButton, {
|
|
271
|
+
icon: PlusIcon,
|
|
272
|
+
children: [
|
|
273
|
+
"New",
|
|
274
|
+
/* @__PURE__ */ jsx5("span", {
|
|
275
|
+
className: "ml-auto inline-flex opacity-0 transition-opacity duration-fast group-hover/menu-item:opacity-100 group-focus-within/menu-item:opacity-100",
|
|
276
|
+
children: /* @__PURE__ */ jsx5("kbd", {
|
|
277
|
+
className: "font-sans text-micro text-muted-foreground",
|
|
278
|
+
children: "⇧⌘O"
|
|
279
|
+
})
|
|
280
|
+
})
|
|
281
|
+
]
|
|
282
|
+
})
|
|
283
|
+
})
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
})
|
|
287
|
+
]
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ jsx5(sidebar_default.Content, {
|
|
290
|
+
children: NAV_SECTIONS.map((section) => /* @__PURE__ */ jsxs5(sidebar_default.Group, {
|
|
291
|
+
collapsible: true,
|
|
292
|
+
children: [
|
|
293
|
+
/* @__PURE__ */ jsx5(sidebar_default.GroupLabel, {
|
|
294
|
+
children: section.label
|
|
295
|
+
}),
|
|
296
|
+
/* @__PURE__ */ jsx5(sidebar_default.GroupActions, {
|
|
297
|
+
children: /* @__PURE__ */ jsx5(tooltip_default, {
|
|
298
|
+
content: "Add item",
|
|
299
|
+
side: "top",
|
|
300
|
+
children: /* @__PURE__ */ jsx5(sidebar_default.GroupAction, {
|
|
301
|
+
"aria-label": "Add item",
|
|
302
|
+
children: /* @__PURE__ */ jsx5(PlusIcon, {})
|
|
303
|
+
})
|
|
304
|
+
})
|
|
305
|
+
}),
|
|
306
|
+
/* @__PURE__ */ jsx5(sidebar_default.Menu, {
|
|
307
|
+
children: section.items.map((item) => /* @__PURE__ */ jsxs5(sidebar_default.MenuItem, {
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ jsx5(sidebar_default.MenuButton, {
|
|
310
|
+
status: item.status,
|
|
311
|
+
value: item.label,
|
|
312
|
+
children: item.label
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ jsxs5(DropdownMenu2, {
|
|
315
|
+
children: [
|
|
316
|
+
/* @__PURE__ */ jsx5(DropdownTrigger2, {
|
|
317
|
+
render: /* @__PURE__ */ jsx5(sidebar_default.MenuAction, {
|
|
318
|
+
showOnHover: true,
|
|
319
|
+
"aria-label": "More options",
|
|
320
|
+
children: /* @__PURE__ */ jsx5(MoreVerticalIcon, {})
|
|
321
|
+
})
|
|
322
|
+
}),
|
|
323
|
+
/* @__PURE__ */ jsxs5(DropdownContent2, {
|
|
324
|
+
className: "min-w-0 w-[240px]",
|
|
325
|
+
align: "start",
|
|
326
|
+
sideOffset: 4,
|
|
327
|
+
children: [
|
|
328
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
329
|
+
index: 0,
|
|
330
|
+
icon: PencilIcon,
|
|
331
|
+
label: "Rename"
|
|
332
|
+
}),
|
|
333
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
334
|
+
index: 1,
|
|
335
|
+
icon: LinkIcon,
|
|
336
|
+
label: "Share"
|
|
337
|
+
})
|
|
338
|
+
]
|
|
339
|
+
})
|
|
340
|
+
]
|
|
341
|
+
})
|
|
342
|
+
]
|
|
343
|
+
}, item.label))
|
|
344
|
+
})
|
|
345
|
+
]
|
|
346
|
+
}, section.label))
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ jsx5(sidebar_default.Footer, {
|
|
349
|
+
children: /* @__PURE__ */ jsxs5("div", {
|
|
350
|
+
className: "flex items-center gap-1 pr-1.5",
|
|
351
|
+
children: [
|
|
352
|
+
/* @__PURE__ */ jsx5(SidebarUserFooter, {
|
|
353
|
+
name: "Jane Doe",
|
|
354
|
+
avatar: /* @__PURE__ */ jsx5("span", {
|
|
355
|
+
className: "flex size-5 items-center justify-center rounded-full bg-muted-foreground text-micro-compact text-background",
|
|
356
|
+
children: "J"
|
|
357
|
+
}),
|
|
358
|
+
className: "min-w-0 flex-1",
|
|
359
|
+
menu: /* @__PURE__ */ jsxs5(Fragment, {
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
362
|
+
index: 0,
|
|
363
|
+
icon: UserIcon,
|
|
364
|
+
label: "Profile"
|
|
365
|
+
}),
|
|
366
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
367
|
+
index: 1,
|
|
368
|
+
icon: SettingsIcon,
|
|
369
|
+
label: "Settings"
|
|
370
|
+
}),
|
|
371
|
+
/* @__PURE__ */ jsx5(MenuItem2, {
|
|
372
|
+
index: 2,
|
|
373
|
+
icon: ArrowLeftIcon,
|
|
374
|
+
label: "Log out"
|
|
375
|
+
})
|
|
376
|
+
]
|
|
377
|
+
})
|
|
378
|
+
}),
|
|
379
|
+
/* @__PURE__ */ jsx5(tooltip_default, {
|
|
380
|
+
content: "Settings",
|
|
381
|
+
side: "top",
|
|
382
|
+
children: /* @__PURE__ */ jsx5(button_default, {
|
|
383
|
+
variant: "ghost",
|
|
384
|
+
size: "icon-compact",
|
|
385
|
+
"aria-label": "Settings",
|
|
386
|
+
className: "size-6 shrink-0",
|
|
387
|
+
children: /* @__PURE__ */ jsx5(SettingsIcon, {})
|
|
388
|
+
})
|
|
389
|
+
}),
|
|
390
|
+
/* @__PURE__ */ jsx5(tooltip_default, {
|
|
391
|
+
content: "Theme",
|
|
392
|
+
side: "top",
|
|
393
|
+
children: /* @__PURE__ */ jsx5(button_default, {
|
|
394
|
+
variant: "ghost",
|
|
395
|
+
size: "icon-compact",
|
|
396
|
+
"aria-label": "Theme",
|
|
397
|
+
className: "size-6 shrink-0",
|
|
398
|
+
children: /* @__PURE__ */ jsx5(MoonIcon, {})
|
|
399
|
+
})
|
|
400
|
+
})
|
|
401
|
+
]
|
|
402
|
+
})
|
|
403
|
+
})
|
|
404
|
+
]
|
|
405
|
+
});
|
|
406
|
+
}
|
|
407
|
+
function SidebarApp2({
|
|
408
|
+
defaultOpen = false,
|
|
409
|
+
variant = "inset",
|
|
410
|
+
side = "left",
|
|
411
|
+
openOnHover = false,
|
|
412
|
+
contained = false
|
|
413
|
+
}) {
|
|
414
|
+
const [thread, setThread] = useState(NAV_SECTIONS[0]?.items[0]?.label ?? "");
|
|
415
|
+
return /* @__PURE__ */ jsxs5(sidebar_default.Provider, {
|
|
416
|
+
defaultOpen,
|
|
417
|
+
openOnHover,
|
|
418
|
+
className: contained ? "h-full min-h-0" : undefined,
|
|
419
|
+
children: [
|
|
420
|
+
/* @__PURE__ */ jsx5(AppSidebar, {
|
|
421
|
+
variant,
|
|
422
|
+
side,
|
|
423
|
+
className: contained ? "h-full" : undefined,
|
|
424
|
+
value: thread,
|
|
425
|
+
onValueChange: setThread
|
|
426
|
+
}),
|
|
427
|
+
/* @__PURE__ */ jsxs5(sidebar_default.Inset, {
|
|
428
|
+
className: cn2(contained && "min-h-0", variant === "floating" && "pt-2"),
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ jsx5(SidebarInsetTopbar, {
|
|
431
|
+
children: /* @__PURE__ */ jsx5("span", {
|
|
432
|
+
className: "truncate text-body text-muted-foreground",
|
|
433
|
+
children: thread
|
|
434
|
+
})
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ jsx5("main", {
|
|
437
|
+
className: "flex flex-1 flex-col gap-4 p-4"
|
|
438
|
+
})
|
|
439
|
+
]
|
|
440
|
+
})
|
|
441
|
+
]
|
|
442
|
+
});
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export { SidebarApp2 };
|