@shellui/core 0.0.10 → 0.0.12
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/ContentView-CZG-ro_B.js +146 -0
- package/dist/ContentView-CZG-ro_B.js.map +1 -0
- package/dist/CookiePreferencesView-CIXBJWNt.js +213 -0
- package/dist/CookiePreferencesView-CIXBJWNt.js.map +1 -0
- package/dist/DefaultLayout-Bztmv2c_.js +406 -0
- package/dist/DefaultLayout-Bztmv2c_.js.map +1 -0
- package/dist/FullscreenLayout-DiX6dbkf.js +30 -0
- package/dist/FullscreenLayout-DiX6dbkf.js.map +1 -0
- package/dist/HomeView-C610YU6V.js +21 -0
- package/dist/HomeView-C610YU6V.js.map +1 -0
- package/dist/NotFoundView-D00gYlq-.js +52 -0
- package/dist/NotFoundView-D00gYlq-.js.map +1 -0
- package/dist/OverlayShell-CGjN4rTu.js +642 -0
- package/dist/OverlayShell-CGjN4rTu.js.map +1 -0
- package/dist/SettingsView-2QMtfS71.js +2207 -0
- package/dist/SettingsView-2QMtfS71.js.map +1 -0
- package/dist/ViewRoute-ChSPabOy.js +32 -0
- package/dist/ViewRoute-ChSPabOy.js.map +1 -0
- package/dist/WindowsLayout-DkSNQDSb.js +633 -0
- package/dist/WindowsLayout-DkSNQDSb.js.map +1 -0
- package/dist/index-PsePV0Ng.js +2160 -0
- package/dist/index-PsePV0Ng.js.map +1 -0
- package/dist/index.js +9 -6748
- package/dist/index.js.map +1 -1
- package/dist/sidebar-Cvm_uv4l.js +336 -0
- package/dist/sidebar-Cvm_uv4l.js.map +1 -0
- package/dist/switch-BjkiJBIa.js +44 -0
- package/dist/switch-BjkiJBIa.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i, useState as f, useCallback as v, createContext as x, useContext as h } from "react";
|
|
3
|
+
import { Slot as l } from "@radix-ui/react-slot";
|
|
4
|
+
import { cva as S } from "class-variance-authority";
|
|
5
|
+
import { c as o, Z as y } from "./index-PsePV0Ng.js";
|
|
6
|
+
const m = x(void 0), u = () => {
|
|
7
|
+
const e = h(m);
|
|
8
|
+
if (!e)
|
|
9
|
+
throw new Error("useSidebar must be used within a SidebarProvider");
|
|
10
|
+
return e;
|
|
11
|
+
}, K = ({ children: e }) => {
|
|
12
|
+
const [r, a] = f(!1), s = v(() => {
|
|
13
|
+
a((n) => !n);
|
|
14
|
+
}, []);
|
|
15
|
+
return /* @__PURE__ */ t(m.Provider, { value: { isCollapsed: r, toggle: s }, children: e });
|
|
16
|
+
}, N = i(
|
|
17
|
+
({ className: e, ...r }, a) => {
|
|
18
|
+
const { isCollapsed: s } = u();
|
|
19
|
+
return /* @__PURE__ */ t(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
ref: a,
|
|
23
|
+
"data-sidebar": "sidebar",
|
|
24
|
+
"data-collapsed": s,
|
|
25
|
+
className: o(
|
|
26
|
+
"flex h-full flex-col gap-2 border-r bg-sidebar-background p-2 text-sidebar-foreground transition-all duration-300 ease-in-out overflow-hidden",
|
|
27
|
+
s ? "w-0 border-r-0 p-0" : "w-64",
|
|
28
|
+
e
|
|
29
|
+
),
|
|
30
|
+
...r
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
N.displayName = "Sidebar";
|
|
36
|
+
const w = () => /* @__PURE__ */ d(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
width: "24",
|
|
41
|
+
height: "24",
|
|
42
|
+
viewBox: "0 0 24 24",
|
|
43
|
+
fill: "none",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
strokeWidth: "2",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round",
|
|
48
|
+
className: "h-5 w-5 transition-transform duration-300",
|
|
49
|
+
"aria-hidden": !0,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ t("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
52
|
+
/* @__PURE__ */ t("path", { d: "M9 3v18" }),
|
|
53
|
+
/* @__PURE__ */ t("path", { d: "m14 9 3 3-3 3" })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
), C = () => /* @__PURE__ */ d(
|
|
57
|
+
"svg",
|
|
58
|
+
{
|
|
59
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
60
|
+
width: "24",
|
|
61
|
+
height: "24",
|
|
62
|
+
viewBox: "0 0 24 24",
|
|
63
|
+
fill: "none",
|
|
64
|
+
stroke: "currentColor",
|
|
65
|
+
strokeWidth: "2",
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
strokeLinejoin: "round",
|
|
68
|
+
className: "h-5 w-5 transition-transform duration-300",
|
|
69
|
+
"aria-hidden": !0,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ t("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
72
|
+
/* @__PURE__ */ t("path", { d: "M9 3v18" }),
|
|
73
|
+
/* @__PURE__ */ t("path", { d: "m16 15-3-3 3-3" })
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
), M = i(
|
|
77
|
+
({ className: e, ...r }, a) => {
|
|
78
|
+
const { toggle: s, isCollapsed: n } = u();
|
|
79
|
+
return /* @__PURE__ */ t(
|
|
80
|
+
"button",
|
|
81
|
+
{
|
|
82
|
+
ref: a,
|
|
83
|
+
onClick: s,
|
|
84
|
+
className: o(
|
|
85
|
+
"relative flex items-center justify-center rounded-md p-2 text-foreground transition-colors hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring shadow-lg backdrop-blur-md cursor-pointer bg-background/95 border border-border",
|
|
86
|
+
e
|
|
87
|
+
),
|
|
88
|
+
"aria-label": n ? "Expand sidebar" : "Collapse sidebar",
|
|
89
|
+
style: { zIndex: y.SIDEBAR_TRIGGER },
|
|
90
|
+
...r,
|
|
91
|
+
children: n ? /* @__PURE__ */ t(w, {}) : /* @__PURE__ */ t(C, {})
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
M.displayName = "SidebarTrigger";
|
|
97
|
+
const k = i(
|
|
98
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
ref: a,
|
|
102
|
+
className: o("flex flex-col gap-2 p-2", e),
|
|
103
|
+
...r
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
);
|
|
107
|
+
k.displayName = "SidebarHeader";
|
|
108
|
+
const I = i(
|
|
109
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
ref: a,
|
|
113
|
+
className: o("flex flex-1 flex-col gap-2 overflow-auto", e),
|
|
114
|
+
...r
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
);
|
|
118
|
+
I.displayName = "SidebarContent";
|
|
119
|
+
const B = i(
|
|
120
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
ref: a,
|
|
124
|
+
className: o("flex flex-col gap-2 p-2", e),
|
|
125
|
+
...r
|
|
126
|
+
}
|
|
127
|
+
)
|
|
128
|
+
);
|
|
129
|
+
B.displayName = "SidebarFooter";
|
|
130
|
+
const G = i(
|
|
131
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
ref: a,
|
|
135
|
+
className: o("group/sidebar-group", e),
|
|
136
|
+
...r
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
);
|
|
140
|
+
G.displayName = "SidebarGroup";
|
|
141
|
+
const _ = i(
|
|
142
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
143
|
+
"div",
|
|
144
|
+
{
|
|
145
|
+
ref: a,
|
|
146
|
+
className: o(
|
|
147
|
+
"flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
148
|
+
e
|
|
149
|
+
),
|
|
150
|
+
style: { fontFamily: "var(--heading-font-family, inherit)" },
|
|
151
|
+
...r
|
|
152
|
+
}
|
|
153
|
+
)
|
|
154
|
+
);
|
|
155
|
+
_.displayName = "SidebarGroupLabel";
|
|
156
|
+
const j = i(({ className: e, asChild: r = !1, ...a }, s) => /* @__PURE__ */ t(
|
|
157
|
+
r ? l : "button",
|
|
158
|
+
{
|
|
159
|
+
ref: s,
|
|
160
|
+
className: o(
|
|
161
|
+
"absolute right-2 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-sidebar-foreground outline-none ring-sidebar-ring transition-opacity hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:opacity-100 focus-visible:ring-2 group-hover/sidebar-group:opacity-100 peer-data-[size=sm]/sidebar-group-action:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0",
|
|
162
|
+
e
|
|
163
|
+
),
|
|
164
|
+
...a
|
|
165
|
+
}
|
|
166
|
+
));
|
|
167
|
+
j.displayName = "SidebarGroupAction";
|
|
168
|
+
const L = i(
|
|
169
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
ref: a,
|
|
173
|
+
className: o("w-full text-sm", e),
|
|
174
|
+
...r
|
|
175
|
+
}
|
|
176
|
+
)
|
|
177
|
+
);
|
|
178
|
+
L.displayName = "SidebarGroupContent";
|
|
179
|
+
const z = S(
|
|
180
|
+
"flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent focus-visible:text-sidebar-accent-foreground focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground",
|
|
181
|
+
{
|
|
182
|
+
variants: {
|
|
183
|
+
variant: {
|
|
184
|
+
default: "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
|
|
185
|
+
outline: "bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-ring))]"
|
|
186
|
+
},
|
|
187
|
+
size: {
|
|
188
|
+
default: "h-8 text-sm",
|
|
189
|
+
sm: "h-7 text-xs",
|
|
190
|
+
lg: "h-12 text-base"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
defaultVariants: {
|
|
194
|
+
variant: "default",
|
|
195
|
+
size: "default"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
), A = i(({ className: e, variant: r, size: a, asChild: s = !1, isActive: n, children: c, ...b }, g) => {
|
|
199
|
+
const { isCollapsed: p } = u();
|
|
200
|
+
return /* @__PURE__ */ t(
|
|
201
|
+
s ? l : "button",
|
|
202
|
+
{
|
|
203
|
+
ref: g,
|
|
204
|
+
"data-active": n,
|
|
205
|
+
"data-collapsed": p,
|
|
206
|
+
className: o(
|
|
207
|
+
z({ variant: r, size: a }),
|
|
208
|
+
p && "justify-center",
|
|
209
|
+
e
|
|
210
|
+
),
|
|
211
|
+
...b,
|
|
212
|
+
children: c
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
});
|
|
216
|
+
A.displayName = "SidebarMenuButton";
|
|
217
|
+
const E = i(
|
|
218
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
219
|
+
"ul",
|
|
220
|
+
{
|
|
221
|
+
ref: a,
|
|
222
|
+
className: o("flex w-full min-w-0 flex-col gap-1", e),
|
|
223
|
+
...r
|
|
224
|
+
}
|
|
225
|
+
)
|
|
226
|
+
);
|
|
227
|
+
E.displayName = "SidebarMenu";
|
|
228
|
+
const P = i(
|
|
229
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
230
|
+
"li",
|
|
231
|
+
{
|
|
232
|
+
ref: a,
|
|
233
|
+
className: o("group/menu-item relative", e),
|
|
234
|
+
...r
|
|
235
|
+
}
|
|
236
|
+
)
|
|
237
|
+
);
|
|
238
|
+
P.displayName = "SidebarMenuItem";
|
|
239
|
+
const R = i(({ className: e, asChild: r = !1, ...a }, s) => /* @__PURE__ */ t(
|
|
240
|
+
r ? l : "button",
|
|
241
|
+
{
|
|
242
|
+
ref: s,
|
|
243
|
+
className: o(
|
|
244
|
+
"absolute right-2 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-md p-1 text-sidebar-foreground opacity-0 transition-opacity group-hover/menu-item:opacity-100 group-focus/menu-item:opacity-100 [&:has(~:hover)]:opacity-100 [&:has(~:focus)]:opacity-100",
|
|
245
|
+
e
|
|
246
|
+
),
|
|
247
|
+
...a
|
|
248
|
+
}
|
|
249
|
+
));
|
|
250
|
+
R.displayName = "SidebarMenuAction";
|
|
251
|
+
const F = i(
|
|
252
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
253
|
+
"div",
|
|
254
|
+
{
|
|
255
|
+
ref: a,
|
|
256
|
+
className: o(
|
|
257
|
+
"absolute right-2 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-md px-1.5 py-0.5 text-xs font-medium tabular-nums text-sidebar-foreground",
|
|
258
|
+
e
|
|
259
|
+
),
|
|
260
|
+
...r
|
|
261
|
+
}
|
|
262
|
+
)
|
|
263
|
+
);
|
|
264
|
+
F.displayName = "SidebarMenuBadge";
|
|
265
|
+
const T = i(({ className: e, showIcon: r = !1, ...a }, s) => /* @__PURE__ */ d(
|
|
266
|
+
"div",
|
|
267
|
+
{
|
|
268
|
+
ref: s,
|
|
269
|
+
className: o("flex items-center gap-2 px-2 py-1.5", e),
|
|
270
|
+
...a,
|
|
271
|
+
children: [
|
|
272
|
+
r && /* @__PURE__ */ t("div", { className: "flex h-4 w-4 rounded-md bg-sidebar-primary/10" }),
|
|
273
|
+
/* @__PURE__ */ d("div", { className: "flex flex-1 flex-col gap-1.5", children: [
|
|
274
|
+
/* @__PURE__ */ t("div", { className: "h-2.5 w-16 rounded-md bg-sidebar-primary/10" }),
|
|
275
|
+
/* @__PURE__ */ t("div", { className: "h-2.5 w-24 rounded-md bg-sidebar-primary/10" })
|
|
276
|
+
] })
|
|
277
|
+
]
|
|
278
|
+
}
|
|
279
|
+
));
|
|
280
|
+
T.displayName = "SidebarMenuSkeleton";
|
|
281
|
+
const D = i(
|
|
282
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
283
|
+
"ul",
|
|
284
|
+
{
|
|
285
|
+
ref: a,
|
|
286
|
+
className: o(
|
|
287
|
+
"ml-4 mt-1 flex min-w-0 flex-col gap-0.5 border-l border-sidebar-border pl-2.5",
|
|
288
|
+
e
|
|
289
|
+
),
|
|
290
|
+
...r
|
|
291
|
+
}
|
|
292
|
+
)
|
|
293
|
+
);
|
|
294
|
+
D.displayName = "SidebarMenuSub";
|
|
295
|
+
const H = i(({ className: e, asChild: r = !1, size: a = "md", isActive: s, ...n }, c) => /* @__PURE__ */ t(
|
|
296
|
+
r ? l : "a",
|
|
297
|
+
{
|
|
298
|
+
ref: c,
|
|
299
|
+
"data-size": a,
|
|
300
|
+
"data-active": s,
|
|
301
|
+
className: o(
|
|
302
|
+
"flex min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md p-2 text-sidebar-foreground outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",
|
|
303
|
+
a === "sm" && "text-xs",
|
|
304
|
+
a === "md" && "text-sm",
|
|
305
|
+
a === "lg" && "text-base",
|
|
306
|
+
e
|
|
307
|
+
),
|
|
308
|
+
...n
|
|
309
|
+
}
|
|
310
|
+
));
|
|
311
|
+
H.displayName = "SidebarMenuSubButton";
|
|
312
|
+
const V = i(
|
|
313
|
+
({ className: e, ...r }, a) => /* @__PURE__ */ t(
|
|
314
|
+
"li",
|
|
315
|
+
{
|
|
316
|
+
ref: a,
|
|
317
|
+
className: o("group/menu-sub-item relative", e),
|
|
318
|
+
...r
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
);
|
|
322
|
+
V.displayName = "SidebarMenuSubItem";
|
|
323
|
+
export {
|
|
324
|
+
K as S,
|
|
325
|
+
N as a,
|
|
326
|
+
k as b,
|
|
327
|
+
I as c,
|
|
328
|
+
B as d,
|
|
329
|
+
G as e,
|
|
330
|
+
_ as f,
|
|
331
|
+
L as g,
|
|
332
|
+
E as h,
|
|
333
|
+
P as i,
|
|
334
|
+
A as j
|
|
335
|
+
};
|
|
336
|
+
//# sourceMappingURL=sidebar-Cvm_uv4l.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sidebar-Cvm_uv4l.js","sources":["../src/components/ui/sidebar.tsx"],"sourcesContent":["import {\n createContext,\n useContext,\n useState,\n useCallback,\n forwardRef,\n type ReactNode,\n type HTMLAttributes,\n type ButtonHTMLAttributes,\n type AnchorHTMLAttributes,\n} from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '@/lib/utils';\nimport { Z_INDEX } from '@/lib/z-index';\n\ntype SidebarContextValue = {\n isCollapsed: boolean;\n toggle: () => void;\n};\n\nconst SidebarContext = createContext<SidebarContextValue | undefined>(undefined);\n\nconst useSidebar = () => {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebar must be used within a SidebarProvider');\n }\n return context;\n};\n\nconst SidebarProvider = ({ children }: { children: ReactNode }) => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n const toggle = useCallback(() => {\n setIsCollapsed((prev) => !prev);\n }, []);\n\n return (\n <SidebarContext.Provider value={{ isCollapsed, toggle }}>{children}</SidebarContext.Provider>\n );\n};\n\nconst Sidebar = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const { isCollapsed } = useSidebar();\n\n return (\n <div\n ref={ref}\n data-sidebar=\"sidebar\"\n data-collapsed={isCollapsed}\n className={cn(\n 'flex h-full flex-col gap-2 border-r bg-sidebar-background p-2 text-sidebar-foreground transition-all duration-300 ease-in-out overflow-hidden',\n isCollapsed ? 'w-0 border-r-0 p-0' : 'w-64',\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebar.displayName = 'Sidebar';\n\n/** Inline SVG: panel-left-open (expand sidebar) */\nconst PanelLeftOpenIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-5 w-5 transition-transform duration-300\"\n aria-hidden\n >\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n <path d=\"m14 9 3 3-3 3\" />\n </svg>\n);\n\n/** Inline SVG: panel-left-close (collapse sidebar) */\nconst PanelLeftCloseIcon = () => (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"h-5 w-5 transition-transform duration-300\"\n aria-hidden\n >\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n <path d=\"M9 3v18\" />\n <path d=\"m16 15-3-3 3-3\" />\n </svg>\n);\n\nconst SidebarTrigger = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n const { toggle, isCollapsed } = useSidebar();\n\n return (\n <button\n ref={ref}\n onClick={toggle}\n className={cn(\n 'relative flex items-center justify-center rounded-md p-2 text-foreground transition-colors hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring shadow-lg backdrop-blur-md cursor-pointer bg-background/95 border border-border',\n className,\n )}\n aria-label={isCollapsed ? 'Expand sidebar' : 'Collapse sidebar'}\n style={{ zIndex: Z_INDEX.SIDEBAR_TRIGGER }}\n {...props}\n >\n {isCollapsed ? <PanelLeftOpenIcon /> : <PanelLeftCloseIcon />}\n </button>\n );\n },\n);\nSidebarTrigger.displayName = 'SidebarTrigger';\n\nconst SidebarHeader = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n );\n },\n);\nSidebarHeader.displayName = 'SidebarHeader';\n\nconst SidebarContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('flex flex-1 flex-col gap-2 overflow-auto', className)}\n {...props}\n />\n );\n },\n);\nSidebarContent.displayName = 'SidebarContent';\n\nconst SidebarFooter = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('flex flex-col gap-2 p-2', className)}\n {...props}\n />\n );\n },\n);\nSidebarFooter.displayName = 'SidebarFooter';\n\nconst SidebarGroup = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('group/sidebar-group', className)}\n {...props}\n />\n );\n },\n);\nSidebarGroup.displayName = 'SidebarGroup';\n\nconst SidebarGroupLabel = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0',\n className,\n )}\n style={{ fontFamily: 'var(--heading-font-family, inherit)' }}\n {...props}\n />\n );\n },\n);\nSidebarGroupLabel.displayName = 'SidebarGroupLabel';\n\nconst SidebarGroupAction = forwardRef<\n HTMLButtonElement,\n ButtonHTMLAttributes<HTMLButtonElement> & {\n asChild?: boolean;\n }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n ref={ref}\n className={cn(\n 'absolute right-2 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-sidebar-foreground outline-none ring-sidebar-ring transition-opacity hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:opacity-100 focus-visible:ring-2 group-hover/sidebar-group:opacity-100 peer-data-[size=sm]/sidebar-group-action:opacity-0 [&>svg]:size-4 [&>svg]:shrink-0',\n className,\n )}\n {...props}\n />\n );\n});\nSidebarGroupAction.displayName = 'SidebarGroupAction';\n\nconst SidebarGroupContent = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('w-full text-sm', className)}\n {...props}\n />\n );\n },\n);\nSidebarGroupContent.displayName = 'SidebarGroupContent';\n\nconst sidebarMenuButtonVariants = cva(\n 'flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm transition-colors hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:bg-sidebar-accent focus-visible:text-sidebar-accent-foreground focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground',\n {\n variants: {\n variant: {\n default: 'hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',\n outline:\n 'bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-ring))]',\n },\n size: {\n default: 'h-8 text-sm',\n sm: 'h-7 text-xs',\n lg: 'h-12 text-base',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst SidebarMenuButton = forwardRef<\n HTMLButtonElement,\n ButtonHTMLAttributes<HTMLButtonElement> &\n VariantProps<typeof sidebarMenuButtonVariants> & {\n asChild?: boolean;\n isActive?: boolean;\n }\n>(({ className, variant, size, asChild = false, isActive, children, ...props }, ref) => {\n const { isCollapsed } = useSidebar();\n const Comp = asChild ? Slot : 'button';\n\n return (\n <Comp\n ref={ref}\n data-active={isActive}\n data-collapsed={isCollapsed}\n className={cn(\n sidebarMenuButtonVariants({ variant, size }),\n isCollapsed && 'justify-center',\n className,\n )}\n {...props}\n >\n {children}\n </Comp>\n );\n});\nSidebarMenuButton.displayName = 'SidebarMenuButton';\n\nconst SidebarMenu = forwardRef<HTMLUListElement, HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => {\n return (\n <ul\n ref={ref}\n className={cn('flex w-full min-w-0 flex-col gap-1', className)}\n {...props}\n />\n );\n },\n);\nSidebarMenu.displayName = 'SidebarMenu';\n\nconst SidebarMenuItem = forwardRef<HTMLLIElement, HTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => {\n return (\n <li\n ref={ref}\n className={cn('group/menu-item relative', className)}\n {...props}\n />\n );\n },\n);\nSidebarMenuItem.displayName = 'SidebarMenuItem';\n\nconst SidebarMenuAction = forwardRef<\n HTMLButtonElement,\n ButtonHTMLAttributes<HTMLButtonElement> & {\n asChild?: boolean;\n }\n>(({ className, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp\n ref={ref}\n className={cn(\n 'absolute right-2 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-md p-1 text-sidebar-foreground opacity-0 transition-opacity group-hover/menu-item:opacity-100 group-focus/menu-item:opacity-100 [&:has(~:hover)]:opacity-100 [&:has(~:focus)]:opacity-100',\n className,\n )}\n {...props}\n />\n );\n});\nSidebarMenuAction.displayName = 'SidebarMenuAction';\n\nconst SidebarMenuBadge = forwardRef<HTMLDivElement, HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn(\n 'absolute right-2 top-1/2 flex -translate-y-1/2 items-center justify-center rounded-md px-1.5 py-0.5 text-xs font-medium tabular-nums text-sidebar-foreground',\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarMenuBadge.displayName = 'SidebarMenuBadge';\n\nconst SidebarMenuSkeleton = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement> & {\n showIcon?: boolean;\n }\n>(({ className, showIcon = false, ...props }, ref) => {\n return (\n <div\n ref={ref}\n className={cn('flex items-center gap-2 px-2 py-1.5', className)}\n {...props}\n >\n {showIcon && <div className=\"flex h-4 w-4 rounded-md bg-sidebar-primary/10\" />}\n <div className=\"flex flex-1 flex-col gap-1.5\">\n <div className=\"h-2.5 w-16 rounded-md bg-sidebar-primary/10\" />\n <div className=\"h-2.5 w-24 rounded-md bg-sidebar-primary/10\" />\n </div>\n </div>\n );\n});\nSidebarMenuSkeleton.displayName = 'SidebarMenuSkeleton';\n\nconst SidebarMenuSub = forwardRef<HTMLUListElement, HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => {\n return (\n <ul\n ref={ref}\n className={cn(\n 'ml-4 mt-1 flex min-w-0 flex-col gap-0.5 border-l border-sidebar-border pl-2.5',\n className,\n )}\n {...props}\n />\n );\n },\n);\nSidebarMenuSub.displayName = 'SidebarMenuSub';\n\nconst SidebarMenuSubButton = forwardRef<\n HTMLAnchorElement,\n AnchorHTMLAttributes<HTMLAnchorElement> & {\n asChild?: boolean;\n size?: 'sm' | 'md' | 'lg';\n isActive?: boolean;\n }\n>(({ className, asChild = false, size = 'md', isActive, ...props }, ref) => {\n const Comp = asChild ? Slot : 'a';\n return (\n <Comp\n ref={ref}\n data-size={size}\n data-active={isActive}\n className={cn(\n 'flex min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md p-2 text-sidebar-foreground outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0',\n size === 'sm' && 'text-xs',\n size === 'md' && 'text-sm',\n size === 'lg' && 'text-base',\n className,\n )}\n {...props}\n />\n );\n});\nSidebarMenuSubButton.displayName = 'SidebarMenuSubButton';\n\nconst SidebarMenuSubItem = forwardRef<HTMLLIElement, HTMLAttributes<HTMLLIElement>>(\n ({ className, ...props }, ref) => {\n return (\n <li\n ref={ref}\n className={cn('group/menu-sub-item relative', className)}\n {...props}\n />\n );\n },\n);\nSidebarMenuSubItem.displayName = 'SidebarMenuSubItem';\n\nexport {\n Sidebar,\n SidebarProvider,\n SidebarTrigger,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarMenu,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n useSidebar,\n};\n"],"names":["SidebarContext","createContext","useSidebar","context","useContext","SidebarProvider","children","isCollapsed","setIsCollapsed","useState","toggle","useCallback","prev","jsx","Sidebar","forwardRef","className","props","ref","cn","PanelLeftOpenIcon","jsxs","PanelLeftCloseIcon","SidebarTrigger","Z_INDEX","SidebarHeader","SidebarContent","SidebarFooter","SidebarGroup","SidebarGroupLabel","SidebarGroupAction","asChild","Slot","SidebarGroupContent","sidebarMenuButtonVariants","cva","SidebarMenuButton","variant","size","isActive","SidebarMenu","SidebarMenuItem","SidebarMenuAction","SidebarMenuBadge","SidebarMenuSkeleton","showIcon","SidebarMenuSub","SidebarMenuSubButton","SidebarMenuSubItem"],"mappings":";;;;;AAqBA,MAAMA,IAAiBC,EAA+C,MAAS,GAEzEC,IAAa,MAAM;AACvB,QAAMC,IAAUC,EAAWJ,CAAc;AACzC,MAAI,CAACG;AACH,UAAM,IAAI,MAAM,kDAAkD;AAEpE,SAAOA;AACT,GAEME,IAAkB,CAAC,EAAE,UAAAC,QAAwC;AACjE,QAAM,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9CC,IAASC,EAAY,MAAM;AAC/B,IAAAH,EAAe,CAACI,MAAS,CAACA,CAAI;AAAA,EAChC,GAAG,CAAA,CAAE;AAEL,SACE,gBAAAC,EAACb,EAAe,UAAf,EAAwB,OAAO,EAAE,aAAAO,GAAa,QAAAG,KAAW,UAAAJ,GAAS;AAEvE,GAEMQ,IAAUC;AAAA,EACd,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAChC,UAAM,EAAE,aAAAX,EAAA,IAAgBL,EAAA;AAExB,WACE,gBAAAW;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAK;AAAA,QACA,gBAAa;AAAA,QACb,kBAAgBX;AAAA,QAChB,WAAWY;AAAA,UACT;AAAA,UACAZ,IAAc,uBAAuB;AAAA,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AMC,IAAuBhC,EAO3B,CAAC,EAAE,WAAAC,GAAW,SAAAe,IAAU,IAAO,MAAAO,IAAO,MAAM,UAAAC,GAAU,GAAGtB,EAAA,GAASC,MAGhE,gBAAAL;AAAA,EAFWkB,IAAUC,IAAO;AAAA,EAE3B;AAAA,IACC,KAAAd;AAAA,IACA,aAAWoB;AAAA,IACX,eAAaC;AAAA,IACb,WAAWpB;AAAA,MACT;AAAA,MACAmB,MAAS,QAAQ;AAAA,MACjBA,MAAS,QAAQ;AAAA,MACjBA,MAAS,QAAQ;AAAA,MACjBtB;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AAAA,CAGT;AACD8B,EAAqB,cAAc;AAEnC,MAAMC,IAAqBjC;AAAA,EACzB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAEtB,gBAAAL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAK;AAAA,MACA,WAAWC,EAAG,gCAAgCH,CAAS;AAAA,MACtD,GAAGC;AAAA,IAAA;AAAA,EAAA;AAIZ;AACA+B,EAAmB,cAAc;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as c } from "react";
|
|
3
|
+
import { c as n } from "./index-PsePV0Ng.js";
|
|
4
|
+
const d = c(
|
|
5
|
+
({ className: o, checked: r, onCheckedChange: t, ...a }, i) => /* @__PURE__ */ l("label", { className: "inline-flex items-center cursor-pointer", children: [
|
|
6
|
+
/* @__PURE__ */ e(
|
|
7
|
+
"input",
|
|
8
|
+
{
|
|
9
|
+
type: "checkbox",
|
|
10
|
+
ref: i,
|
|
11
|
+
checked: r,
|
|
12
|
+
onChange: (s) => {
|
|
13
|
+
t?.(s.target.checked);
|
|
14
|
+
},
|
|
15
|
+
className: "sr-only",
|
|
16
|
+
...a
|
|
17
|
+
}
|
|
18
|
+
),
|
|
19
|
+
/* @__PURE__ */ e(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: n(
|
|
23
|
+
"relative w-11 h-6 rounded-full border border-border transition-colors focus-within:outline-none focus-within:ring-2 focus-within:ring-ring",
|
|
24
|
+
r ? "bg-primary" : "bg-muted",
|
|
25
|
+
o
|
|
26
|
+
),
|
|
27
|
+
children: /* @__PURE__ */ e(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: n(
|
|
31
|
+
"absolute top-[1px] left-[1px] h-5 w-5 bg-background border border-border rounded-full transition-transform",
|
|
32
|
+
r ? "translate-x-5" : "translate-x-0"
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] })
|
|
39
|
+
);
|
|
40
|
+
d.displayName = "Switch";
|
|
41
|
+
export {
|
|
42
|
+
d as S
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=switch-BjkiJBIa.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch-BjkiJBIa.js","sources":["../src/components/ui/switch.tsx"],"sourcesContent":["import { forwardRef, type InputHTMLAttributes, type ChangeEvent } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface SwitchProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type'> {\n checked?: boolean;\n onCheckedChange?: (checked: boolean) => void;\n}\n\nconst Switch = forwardRef<HTMLInputElement, SwitchProps>(\n ({ className, checked, onCheckedChange, ...props }, ref) => {\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n onCheckedChange?.(e.target.checked);\n };\n\n return (\n <label className=\"inline-flex items-center cursor-pointer\">\n <input\n type=\"checkbox\"\n ref={ref}\n checked={checked}\n onChange={handleChange}\n className=\"sr-only\"\n {...props}\n />\n <div\n className={cn(\n 'relative w-11 h-6 rounded-full border border-border transition-colors focus-within:outline-none focus-within:ring-2 focus-within:ring-ring',\n checked ? 'bg-primary' : 'bg-muted',\n className,\n )}\n >\n <div\n className={cn(\n 'absolute top-[1px] left-[1px] h-5 w-5 bg-background border border-border rounded-full transition-transform',\n checked ? 'translate-x-5' : 'translate-x-0',\n )}\n />\n </div>\n </label>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch };\n"],"names":["Switch","forwardRef","className","checked","onCheckedChange","props","ref","jsxs","jsx","e","cn"],"mappings":";;;AAQA,MAAMA,IAASC;AAAA,EACb,CAAC,EAAE,WAAAC,GAAW,SAAAC,GAAS,iBAAAC,GAAiB,GAAGC,EAAA,GAASC,MAMhD,gBAAAC,EAAC,SAAA,EAAM,WAAU,2CACf,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,KAAAF;AAAA,QACA,SAAAH;AAAA,QACA,UAVe,CAACM,MAAqC;AACzD,UAAAL,IAAkBK,EAAE,OAAO,OAAO;AAAA,QACpC;AAAA,QASM,WAAU;AAAA,QACT,GAAGJ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEN,gBAAAG;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWE;AAAA,UACT;AAAA,UACAP,IAAU,eAAe;AAAA,UACzBD;AAAA,QAAA;AAAA,QAGF,UAAA,gBAAAM;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWE;AAAA,cACT;AAAA,cACAP,IAAU,kBAAkB;AAAA,YAAA;AAAA,UAC9B;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF,GACF;AAGN;AACAH,EAAO,cAAc;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shellui/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"description": "ShellUI Core - Core React application runtime",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"workbox-strategies": "^7.1.0",
|
|
65
65
|
"workbox-cacheable-response": "^7.1.0",
|
|
66
66
|
"workbox-expiration": "^7.1.0",
|
|
67
|
-
"@shellui/sdk": "0.0.
|
|
67
|
+
"@shellui/sdk": "0.0.12"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"react": "^18.0.0 || ^19.0.0",
|