@almadar/ui 4.32.0 → 4.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/avl/index.cjs +235 -261
- package/dist/avl/index.css +1 -1
- package/dist/avl/index.js +235 -261
- package/dist/components/index.cjs +226 -236
- package/dist/components/index.css +1 -1
- package/dist/components/index.js +226 -236
- package/dist/docs/index.cjs +2 -2
- package/dist/docs/index.js +2 -2
- package/dist/marketing/index.cjs +2 -2
- package/dist/marketing/index.js +2 -2
- package/dist/providers/index.cjs +226 -236
- package/dist/providers/index.css +1 -1
- package/dist/providers/index.js +226 -236
- package/dist/runtime/createClientEffectHandlers.d.ts +1 -9
- package/dist/runtime/index.cjs +231 -257
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/index.js +231 -257
- package/package.json +14 -8
package/dist/runtime/index.cjs
CHANGED
|
@@ -9495,9 +9495,9 @@ var init_ScaledDiagram = __esm({
|
|
|
9495
9495
|
}
|
|
9496
9496
|
});
|
|
9497
9497
|
|
|
9498
|
-
// node_modules
|
|
9498
|
+
// node_modules/katex/dist/katex.min.css
|
|
9499
9499
|
var init_katex_min = __esm({
|
|
9500
|
-
"node_modules
|
|
9500
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
9501
9501
|
}
|
|
9502
9502
|
});
|
|
9503
9503
|
var MarkdownContent;
|
|
@@ -17194,265 +17194,255 @@ var init_DashboardLayout = __esm({
|
|
|
17194
17194
|
const user = userProp || (null);
|
|
17195
17195
|
const { t } = useTranslate();
|
|
17196
17196
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
17197
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
|
|
17203
|
-
|
|
17204
|
-
|
|
17205
|
-
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17197
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
|
|
17198
|
+
sidebarOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17199
|
+
Box,
|
|
17200
|
+
{
|
|
17201
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
17202
|
+
onClick: () => setSidebarOpen(false)
|
|
17203
|
+
}
|
|
17204
|
+
),
|
|
17205
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17206
|
+
Box,
|
|
17207
|
+
{
|
|
17208
|
+
as: "aside",
|
|
17209
|
+
className: cn(
|
|
17210
|
+
"fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
17211
|
+
"transform transition-transform duration-200 ease-in-out lg:translate-x-0",
|
|
17212
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
17209
17213
|
),
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
"
|
|
17217
|
-
|
|
17218
|
-
|
|
17219
|
-
|
|
17220
|
-
|
|
17221
|
-
|
|
17222
|
-
|
|
17223
|
-
|
|
17214
|
+
children: [
|
|
17215
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17216
|
+
HStack,
|
|
17217
|
+
{
|
|
17218
|
+
align: "center",
|
|
17219
|
+
justify: "between",
|
|
17220
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
17221
|
+
children: [
|
|
17222
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactRouterDom.Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
17223
|
+
logo || /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
17224
|
+
Typography,
|
|
17225
|
+
{
|
|
17226
|
+
variant: "small",
|
|
17227
|
+
className: "text-white font-bold text-sm",
|
|
17228
|
+
as: "span",
|
|
17229
|
+
children: appName.charAt(0).toUpperCase()
|
|
17230
|
+
}
|
|
17231
|
+
) }),
|
|
17232
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17233
|
+
Typography,
|
|
17234
|
+
{
|
|
17235
|
+
variant: "label",
|
|
17236
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
17237
|
+
as: "span",
|
|
17238
|
+
children: appName
|
|
17239
|
+
}
|
|
17240
|
+
)
|
|
17241
|
+
] }),
|
|
17242
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17243
|
+
Button,
|
|
17244
|
+
{
|
|
17245
|
+
variant: "ghost",
|
|
17246
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17247
|
+
onClick: () => setSidebarOpen(false),
|
|
17248
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: "h-5 w-5" })
|
|
17249
|
+
}
|
|
17250
|
+
)
|
|
17251
|
+
]
|
|
17252
|
+
}
|
|
17253
|
+
),
|
|
17254
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17255
|
+
VStack,
|
|
17256
|
+
{
|
|
17257
|
+
as: "nav",
|
|
17258
|
+
gap: "none",
|
|
17259
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17260
|
+
children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17261
|
+
NavLink,
|
|
17224
17262
|
{
|
|
17225
|
-
|
|
17226
|
-
|
|
17227
|
-
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
|
|
17233
|
-
|
|
17234
|
-
|
|
17235
|
-
|
|
17236
|
-
|
|
17237
|
-
|
|
17238
|
-
|
|
17239
|
-
|
|
17240
|
-
|
|
17241
|
-
|
|
17242
|
-
|
|
17243
|
-
|
|
17244
|
-
|
|
17245
|
-
|
|
17263
|
+
item,
|
|
17264
|
+
currentPath: location.pathname
|
|
17265
|
+
},
|
|
17266
|
+
item.href
|
|
17267
|
+
))
|
|
17268
|
+
}
|
|
17269
|
+
),
|
|
17270
|
+
sidebarFooter && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
17271
|
+
]
|
|
17272
|
+
}
|
|
17273
|
+
),
|
|
17274
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "lg:pl-64", children: [
|
|
17275
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17276
|
+
Box,
|
|
17277
|
+
{
|
|
17278
|
+
as: "header",
|
|
17279
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
17280
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17281
|
+
HStack,
|
|
17282
|
+
{
|
|
17283
|
+
align: "center",
|
|
17284
|
+
justify: "between",
|
|
17285
|
+
className: "h-full px-4 gap-4",
|
|
17286
|
+
children: [
|
|
17287
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17288
|
+
Button,
|
|
17289
|
+
{
|
|
17290
|
+
variant: "ghost",
|
|
17291
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
17292
|
+
onClick: () => setSidebarOpen(true),
|
|
17293
|
+
"aria-label": "Open sidebar",
|
|
17294
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Menu, { className: "h-5 w-5" })
|
|
17295
|
+
}
|
|
17296
|
+
),
|
|
17297
|
+
searchEnabled && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "relative", children: [
|
|
17298
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
17299
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17300
|
+
Input,
|
|
17301
|
+
{
|
|
17302
|
+
type: "search",
|
|
17303
|
+
placeholder: t("common.search"),
|
|
17304
|
+
className: "pl-10 w-full",
|
|
17305
|
+
onKeyDown: (e) => {
|
|
17306
|
+
if (e.key === "Enter") {
|
|
17307
|
+
handleSearchSubmit(e.target.value);
|
|
17246
17308
|
}
|
|
17247
|
-
)
|
|
17248
|
-
] }),
|
|
17249
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17250
|
-
Button,
|
|
17251
|
-
{
|
|
17252
|
-
variant: "ghost",
|
|
17253
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
17254
|
-
onClick: () => setSidebarOpen(false),
|
|
17255
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: "h-5 w-5" })
|
|
17256
17309
|
}
|
|
17257
|
-
|
|
17258
|
-
|
|
17259
|
-
}
|
|
17260
|
-
|
|
17261
|
-
|
|
17262
|
-
|
|
17263
|
-
|
|
17264
|
-
|
|
17265
|
-
gap: "none",
|
|
17266
|
-
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
17267
|
-
children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
17268
|
-
NavLink,
|
|
17310
|
+
}
|
|
17311
|
+
)
|
|
17312
|
+
] }) }),
|
|
17313
|
+
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17314
|
+
headerActions,
|
|
17315
|
+
showThemeToggle && /* @__PURE__ */ jsxRuntime.jsx(ThemeToggle, {}),
|
|
17316
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17317
|
+
Button,
|
|
17269
17318
|
{
|
|
17270
|
-
|
|
17271
|
-
|
|
17319
|
+
variant: "ghost",
|
|
17320
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17321
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
17322
|
+
"aria-label": action.label ?? action.icon,
|
|
17323
|
+
children: [
|
|
17324
|
+
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17325
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17326
|
+
Box,
|
|
17327
|
+
{
|
|
17328
|
+
as: "span",
|
|
17329
|
+
className: cn(
|
|
17330
|
+
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17331
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17332
|
+
),
|
|
17333
|
+
children: action.badge
|
|
17334
|
+
}
|
|
17335
|
+
)
|
|
17336
|
+
]
|
|
17272
17337
|
},
|
|
17273
|
-
|
|
17274
|
-
))
|
|
17275
|
-
|
|
17276
|
-
|
|
17277
|
-
|
|
17278
|
-
|
|
17279
|
-
|
|
17280
|
-
|
|
17281
|
-
|
|
17282
|
-
|
|
17283
|
-
|
|
17284
|
-
|
|
17285
|
-
|
|
17286
|
-
|
|
17287
|
-
|
|
17288
|
-
|
|
17289
|
-
|
|
17290
|
-
|
|
17291
|
-
|
|
17292
|
-
|
|
17293
|
-
|
|
17294
|
-
|
|
17338
|
+
`${action.event}-${idx}`
|
|
17339
|
+
)),
|
|
17340
|
+
notificationsEnabled && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17341
|
+
Button,
|
|
17342
|
+
{
|
|
17343
|
+
variant: "ghost",
|
|
17344
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17345
|
+
onClick: handleNotificationClick,
|
|
17346
|
+
"aria-label": t("common.notifications"),
|
|
17347
|
+
children: [
|
|
17348
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17349
|
+
unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17350
|
+
Box,
|
|
17351
|
+
{
|
|
17352
|
+
as: "span",
|
|
17353
|
+
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17354
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17355
|
+
}
|
|
17356
|
+
)
|
|
17357
|
+
]
|
|
17358
|
+
}
|
|
17359
|
+
),
|
|
17360
|
+
user && /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "relative", children: [
|
|
17361
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17295
17362
|
Button,
|
|
17296
17363
|
{
|
|
17297
17364
|
variant: "ghost",
|
|
17298
|
-
className: "
|
|
17299
|
-
onClick: () =>
|
|
17300
|
-
|
|
17301
|
-
|
|
17365
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
17366
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
17367
|
+
children: [
|
|
17368
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17369
|
+
Avatar,
|
|
17370
|
+
{
|
|
17371
|
+
src: user.avatar,
|
|
17372
|
+
alt: user.name,
|
|
17373
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17374
|
+
size: "sm"
|
|
17375
|
+
}
|
|
17376
|
+
),
|
|
17377
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17378
|
+
Typography,
|
|
17379
|
+
{
|
|
17380
|
+
variant: "small",
|
|
17381
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17382
|
+
as: "span",
|
|
17383
|
+
children: user.name
|
|
17384
|
+
}
|
|
17385
|
+
),
|
|
17386
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17387
|
+
]
|
|
17302
17388
|
}
|
|
17303
17389
|
),
|
|
17304
|
-
|
|
17305
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
17390
|
+
userMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17306
17391
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17307
|
-
|
|
17392
|
+
Box,
|
|
17308
17393
|
{
|
|
17309
|
-
|
|
17310
|
-
|
|
17311
|
-
className: "pl-10 w-full",
|
|
17312
|
-
onKeyDown: (e) => {
|
|
17313
|
-
if (e.key === "Enter") {
|
|
17314
|
-
handleSearchSubmit(e.target.value);
|
|
17315
|
-
}
|
|
17316
|
-
}
|
|
17317
|
-
}
|
|
17318
|
-
)
|
|
17319
|
-
] }) }),
|
|
17320
|
-
!searchEnabled && /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "flex-1" }),
|
|
17321
|
-
/* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
17322
|
-
headerActions,
|
|
17323
|
-
showThemeToggle && /* @__PURE__ */ jsxRuntime.jsx(ThemeToggle, {}),
|
|
17324
|
-
topBarActions.map((action, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17325
|
-
Button,
|
|
17326
|
-
{
|
|
17327
|
-
variant: "ghost",
|
|
17328
|
-
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17329
|
-
onClick: () => handleTopBarActionClick(action.event),
|
|
17330
|
-
"aria-label": action.label ?? action.icon,
|
|
17331
|
-
children: [
|
|
17332
|
-
/* @__PURE__ */ jsxRuntime.jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17333
|
-
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17334
|
-
Box,
|
|
17335
|
-
{
|
|
17336
|
-
as: "span",
|
|
17337
|
-
className: cn(
|
|
17338
|
-
"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17339
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
17340
|
-
),
|
|
17341
|
-
children: action.badge
|
|
17342
|
-
}
|
|
17343
|
-
)
|
|
17344
|
-
]
|
|
17345
|
-
},
|
|
17346
|
-
`${action.event}-${idx}`
|
|
17347
|
-
)),
|
|
17348
|
-
notificationsEnabled && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17349
|
-
Button,
|
|
17350
|
-
{
|
|
17351
|
-
variant: "ghost",
|
|
17352
|
-
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
17353
|
-
onClick: handleNotificationClick,
|
|
17354
|
-
"aria-label": t("common.notifications"),
|
|
17355
|
-
children: [
|
|
17356
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
17357
|
-
unreadCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
17358
|
-
Box,
|
|
17359
|
-
{
|
|
17360
|
-
as: "span",
|
|
17361
|
-
className: "absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 bg-error rounded-full text-[10px] font-semibold text-white flex items-center justify-center",
|
|
17362
|
-
children: unreadCount > 99 ? "99+" : unreadCount
|
|
17363
|
-
}
|
|
17364
|
-
)
|
|
17365
|
-
]
|
|
17394
|
+
className: "fixed inset-0 z-20",
|
|
17395
|
+
onClick: () => setUserMenuOpen(false)
|
|
17366
17396
|
}
|
|
17367
17397
|
),
|
|
17368
|
-
|
|
17398
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
17399
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17400
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17401
|
+
Typography,
|
|
17402
|
+
{
|
|
17403
|
+
variant: "small",
|
|
17404
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17405
|
+
as: "p",
|
|
17406
|
+
children: user.name
|
|
17407
|
+
}
|
|
17408
|
+
),
|
|
17409
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17410
|
+
Typography,
|
|
17411
|
+
{
|
|
17412
|
+
variant: "caption",
|
|
17413
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17414
|
+
as: "p",
|
|
17415
|
+
children: user.email
|
|
17416
|
+
}
|
|
17417
|
+
)
|
|
17418
|
+
] }),
|
|
17369
17419
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17370
17420
|
Button,
|
|
17371
17421
|
{
|
|
17372
17422
|
variant: "ghost",
|
|
17373
|
-
|
|
17374
|
-
|
|
17423
|
+
onClick: () => {
|
|
17424
|
+
setUserMenuOpen(false);
|
|
17425
|
+
handleSignOut?.();
|
|
17426
|
+
},
|
|
17427
|
+
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
17375
17428
|
children: [
|
|
17376
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17377
|
-
|
|
17378
|
-
{
|
|
17379
|
-
src: user.avatar,
|
|
17380
|
-
alt: user.name,
|
|
17381
|
-
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
17382
|
-
size: "sm"
|
|
17383
|
-
}
|
|
17384
|
-
),
|
|
17385
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17386
|
-
Typography,
|
|
17387
|
-
{
|
|
17388
|
-
variant: "small",
|
|
17389
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
17390
|
-
as: "span",
|
|
17391
|
-
children: user.name
|
|
17392
|
-
}
|
|
17393
|
-
),
|
|
17394
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
17429
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.LogOut, { className: "h-4 w-4" }),
|
|
17430
|
+
t("auth.signOut")
|
|
17395
17431
|
]
|
|
17396
17432
|
}
|
|
17397
|
-
)
|
|
17398
|
-
userMenuOpen && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17399
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17400
|
-
Box,
|
|
17401
|
-
{
|
|
17402
|
-
className: "fixed inset-0 z-20",
|
|
17403
|
-
onClick: () => setUserMenuOpen(false)
|
|
17404
|
-
}
|
|
17405
|
-
),
|
|
17406
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "absolute right-0 mt-2 w-48 bg-card dark:bg-card rounded-lg shadow-lg border border-border dark:border-border py-1 z-30", children: [
|
|
17407
|
-
/* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
17408
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17409
|
-
Typography,
|
|
17410
|
-
{
|
|
17411
|
-
variant: "small",
|
|
17412
|
-
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
17413
|
-
as: "p",
|
|
17414
|
-
children: user.name
|
|
17415
|
-
}
|
|
17416
|
-
),
|
|
17417
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17418
|
-
Typography,
|
|
17419
|
-
{
|
|
17420
|
-
variant: "caption",
|
|
17421
|
-
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
17422
|
-
as: "p",
|
|
17423
|
-
children: user.email
|
|
17424
|
-
}
|
|
17425
|
-
)
|
|
17426
|
-
] }),
|
|
17427
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
17428
|
-
Button,
|
|
17429
|
-
{
|
|
17430
|
-
variant: "ghost",
|
|
17431
|
-
onClick: () => {
|
|
17432
|
-
setUserMenuOpen(false);
|
|
17433
|
-
handleSignOut?.();
|
|
17434
|
-
},
|
|
17435
|
-
className: "w-full flex items-center gap-2 px-4 py-2 text-sm text-error dark:text-error hover:bg-error/10 dark:hover:bg-error/20",
|
|
17436
|
-
children: [
|
|
17437
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.LogOut, { className: "h-4 w-4" }),
|
|
17438
|
-
t("auth.signOut")
|
|
17439
|
-
]
|
|
17440
|
-
}
|
|
17441
|
-
)
|
|
17442
|
-
] })
|
|
17443
|
-
] })
|
|
17433
|
+
)
|
|
17444
17434
|
] })
|
|
17445
17435
|
] })
|
|
17446
|
-
]
|
|
17447
|
-
}
|
|
17448
|
-
|
|
17436
|
+
] })
|
|
17437
|
+
] })
|
|
17438
|
+
]
|
|
17449
17439
|
}
|
|
17450
|
-
)
|
|
17451
|
-
|
|
17452
|
-
|
|
17453
|
-
|
|
17454
|
-
}
|
|
17455
|
-
);
|
|
17440
|
+
)
|
|
17441
|
+
}
|
|
17442
|
+
),
|
|
17443
|
+
/* @__PURE__ */ jsxRuntime.jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
|
|
17444
|
+
] })
|
|
17445
|
+
] });
|
|
17456
17446
|
};
|
|
17457
17447
|
DashboardLayout.displayName = "DashboardLayout";
|
|
17458
17448
|
NavLink = ({
|
|
@@ -35407,7 +35397,7 @@ init_logger();
|
|
|
35407
35397
|
|
|
35408
35398
|
// runtime/createClientEffectHandlers.ts
|
|
35409
35399
|
function createClientEffectHandlers(options) {
|
|
35410
|
-
const { eventBus, slotSetter, navigate, notify
|
|
35400
|
+
const { eventBus, slotSetter, navigate, notify } = options;
|
|
35411
35401
|
return {
|
|
35412
35402
|
emit: (event, payload) => {
|
|
35413
35403
|
const prefixedEvent = event.startsWith("UI:") ? event : `UI:${event}`;
|
|
@@ -35419,24 +35409,9 @@ function createClientEffectHandlers(options) {
|
|
|
35419
35409
|
set: () => {
|
|
35420
35410
|
console.warn("[ClientEffectHandlers] set is server-side only, ignored on client");
|
|
35421
35411
|
},
|
|
35422
|
-
callService: async (
|
|
35423
|
-
|
|
35424
|
-
|
|
35425
|
-
const paramsEcho = {};
|
|
35426
|
-
if (params) {
|
|
35427
|
-
for (const [k, v] of Object.entries(params)) {
|
|
35428
|
-
if (v !== void 0 && (typeof v === "string" || typeof v === "number" || typeof v === "boolean" || v === null || v instanceof Date)) {
|
|
35429
|
-
paramsEcho[k] = v;
|
|
35430
|
-
}
|
|
35431
|
-
}
|
|
35432
|
-
}
|
|
35433
|
-
return {
|
|
35434
|
-
id: mockId,
|
|
35435
|
-
clientSecret: `secret_${mockId}`,
|
|
35436
|
-
success: true,
|
|
35437
|
-
status: "succeeded",
|
|
35438
|
-
...paramsEcho
|
|
35439
|
-
};
|
|
35412
|
+
callService: async () => {
|
|
35413
|
+
console.warn("[ClientEffectHandlers] callService is server-side only, ignored on client");
|
|
35414
|
+
return {};
|
|
35440
35415
|
},
|
|
35441
35416
|
renderUI: (slot, pattern, props) => {
|
|
35442
35417
|
if (pattern === null) {
|
|
@@ -35930,8 +35905,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
35930
35905
|
}
|
|
35931
35906
|
},
|
|
35932
35907
|
navigate: optionsRef.current?.navigate,
|
|
35933
|
-
notify: optionsRef.current?.notify
|
|
35934
|
-
callService: optionsRef.current?.callService
|
|
35908
|
+
notify: optionsRef.current?.notify
|
|
35935
35909
|
});
|
|
35936
35910
|
const persistence = optionsRef.current?.persistence;
|
|
35937
35911
|
let handlers = clientHandlers;
|
package/dist/runtime/index.css
CHANGED