@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/avl/index.js
CHANGED
|
@@ -136,7 +136,7 @@ var init_types = __esm({
|
|
|
136
136
|
}
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
-
// node_modules
|
|
139
|
+
// node_modules/clsx/dist/clsx.mjs
|
|
140
140
|
function r(e) {
|
|
141
141
|
var t, f, n = "";
|
|
142
142
|
if ("string" == typeof e || "number" == typeof e) n += e;
|
|
@@ -151,11 +151,11 @@ function clsx() {
|
|
|
151
151
|
return n;
|
|
152
152
|
}
|
|
153
153
|
var init_clsx = __esm({
|
|
154
|
-
"node_modules
|
|
154
|
+
"node_modules/clsx/dist/clsx.mjs"() {
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
-
// node_modules
|
|
158
|
+
// node_modules/tailwind-merge/dist/bundle-mjs.mjs
|
|
159
159
|
function twJoin() {
|
|
160
160
|
let index = 0;
|
|
161
161
|
let argument;
|
|
@@ -199,7 +199,7 @@ function createTailwindMerge(createConfigFirst, ...createConfigRest) {
|
|
|
199
199
|
}
|
|
200
200
|
var CLASS_PART_SEPARATOR, createClassGroupUtils, getGroupRecursive, arbitraryPropertyRegex, getGroupIdForArbitraryProperty, createClassMap, processClassesRecursively, getPart, isThemeGetter, getPrefixedClassGroupEntries, createLruCache, IMPORTANT_MODIFIER, createParseClassName, sortModifiers, createConfigUtils, SPLIT_CLASSES_REGEX, mergeClassList, toValue, fromTheme, arbitraryValueRegex, fractionRegex, stringLengths, tshirtUnitRegex, lengthUnitRegex, colorFunctionRegex, shadowRegex, imageRegex, isLength, isArbitraryLength, isNumber, isArbitraryNumber, isInteger, isPercent, isArbitraryValue, isTshirtSize, sizeLabels, isArbitrarySize, isArbitraryPosition, imageLabels, isArbitraryImage, isArbitraryShadow, isAny, getIsArbitraryValue, isLengthOnly, isNever, isShadow, isImage, getDefaultConfig, twMerge;
|
|
201
201
|
var init_bundle_mjs = __esm({
|
|
202
|
-
"node_modules
|
|
202
|
+
"node_modules/tailwind-merge/dist/bundle-mjs.mjs"() {
|
|
203
203
|
CLASS_PART_SEPARATOR = "-";
|
|
204
204
|
createClassGroupUtils = (config) => {
|
|
205
205
|
const classMap = createClassMap(config);
|
|
@@ -12792,9 +12792,9 @@ var init_ScaledDiagram = __esm({
|
|
|
12792
12792
|
}
|
|
12793
12793
|
});
|
|
12794
12794
|
|
|
12795
|
-
// node_modules
|
|
12795
|
+
// node_modules/katex/dist/katex.min.css
|
|
12796
12796
|
var init_katex_min = __esm({
|
|
12797
|
-
"node_modules
|
|
12797
|
+
"node_modules/katex/dist/katex.min.css"() {
|
|
12798
12798
|
}
|
|
12799
12799
|
});
|
|
12800
12800
|
var MarkdownContent;
|
|
@@ -20622,265 +20622,255 @@ var init_DashboardLayout = __esm({
|
|
|
20622
20622
|
const user = userProp || (null);
|
|
20623
20623
|
const { t } = useTranslate();
|
|
20624
20624
|
const handleSignOut = onSignOutProp || authSignOut;
|
|
20625
|
-
return /* @__PURE__ */ jsxs(
|
|
20626
|
-
|
|
20627
|
-
|
|
20628
|
-
|
|
20629
|
-
|
|
20630
|
-
|
|
20631
|
-
|
|
20632
|
-
|
|
20633
|
-
|
|
20634
|
-
|
|
20635
|
-
|
|
20636
|
-
|
|
20625
|
+
return /* @__PURE__ */ jsxs(Box, { className: "min-h-screen bg-background dark:bg-background", children: [
|
|
20626
|
+
sidebarOpen && /* @__PURE__ */ jsx(
|
|
20627
|
+
Box,
|
|
20628
|
+
{
|
|
20629
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
20630
|
+
onClick: () => setSidebarOpen(false)
|
|
20631
|
+
}
|
|
20632
|
+
),
|
|
20633
|
+
/* @__PURE__ */ jsxs(
|
|
20634
|
+
Box,
|
|
20635
|
+
{
|
|
20636
|
+
as: "aside",
|
|
20637
|
+
className: cn(
|
|
20638
|
+
"fixed inset-y-0 left-0 z-30 w-64 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
20639
|
+
"transform transition-transform duration-200 ease-in-out lg:translate-x-0",
|
|
20640
|
+
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
20637
20641
|
),
|
|
20638
|
-
|
|
20639
|
-
|
|
20640
|
-
|
|
20641
|
-
|
|
20642
|
-
|
|
20643
|
-
|
|
20644
|
-
"
|
|
20645
|
-
|
|
20646
|
-
|
|
20647
|
-
|
|
20648
|
-
|
|
20649
|
-
|
|
20650
|
-
|
|
20651
|
-
|
|
20642
|
+
children: [
|
|
20643
|
+
/* @__PURE__ */ jsxs(
|
|
20644
|
+
HStack,
|
|
20645
|
+
{
|
|
20646
|
+
align: "center",
|
|
20647
|
+
justify: "between",
|
|
20648
|
+
className: "h-16 px-4 border-b border-border dark:border-border",
|
|
20649
|
+
children: [
|
|
20650
|
+
/* @__PURE__ */ jsxs(Link, { to: "/", className: "flex items-center gap-2", children: [
|
|
20651
|
+
logo || /* @__PURE__ */ jsx(Box, { className: "w-8 h-8 bg-primary-600 rounded-lg flex items-center justify-center", children: /* @__PURE__ */ jsx(
|
|
20652
|
+
Typography,
|
|
20653
|
+
{
|
|
20654
|
+
variant: "small",
|
|
20655
|
+
className: "text-white font-bold text-sm",
|
|
20656
|
+
as: "span",
|
|
20657
|
+
children: appName.charAt(0).toUpperCase()
|
|
20658
|
+
}
|
|
20659
|
+
) }),
|
|
20660
|
+
/* @__PURE__ */ jsx(
|
|
20661
|
+
Typography,
|
|
20662
|
+
{
|
|
20663
|
+
variant: "label",
|
|
20664
|
+
className: "font-semibold text-foreground dark:text-foreground",
|
|
20665
|
+
as: "span",
|
|
20666
|
+
children: appName
|
|
20667
|
+
}
|
|
20668
|
+
)
|
|
20669
|
+
] }),
|
|
20670
|
+
/* @__PURE__ */ jsx(
|
|
20671
|
+
Button,
|
|
20672
|
+
{
|
|
20673
|
+
variant: "ghost",
|
|
20674
|
+
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20675
|
+
onClick: () => setSidebarOpen(false),
|
|
20676
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
20677
|
+
}
|
|
20678
|
+
)
|
|
20679
|
+
]
|
|
20680
|
+
}
|
|
20681
|
+
),
|
|
20682
|
+
/* @__PURE__ */ jsx(
|
|
20683
|
+
VStack,
|
|
20684
|
+
{
|
|
20685
|
+
as: "nav",
|
|
20686
|
+
gap: "none",
|
|
20687
|
+
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
20688
|
+
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
20689
|
+
NavLink,
|
|
20652
20690
|
{
|
|
20653
|
-
|
|
20654
|
-
|
|
20655
|
-
|
|
20656
|
-
|
|
20657
|
-
|
|
20658
|
-
|
|
20659
|
-
|
|
20660
|
-
|
|
20661
|
-
|
|
20662
|
-
|
|
20663
|
-
|
|
20664
|
-
|
|
20665
|
-
|
|
20666
|
-
|
|
20667
|
-
|
|
20668
|
-
|
|
20669
|
-
|
|
20670
|
-
|
|
20671
|
-
|
|
20672
|
-
|
|
20673
|
-
|
|
20691
|
+
item,
|
|
20692
|
+
currentPath: location.pathname
|
|
20693
|
+
},
|
|
20694
|
+
item.href
|
|
20695
|
+
))
|
|
20696
|
+
}
|
|
20697
|
+
),
|
|
20698
|
+
sidebarFooter && /* @__PURE__ */ jsx(Box, { className: "p-4 border-t border-border dark:border-border", children: sidebarFooter })
|
|
20699
|
+
]
|
|
20700
|
+
}
|
|
20701
|
+
),
|
|
20702
|
+
/* @__PURE__ */ jsxs(Box, { className: "lg:pl-64", children: [
|
|
20703
|
+
/* @__PURE__ */ jsx(
|
|
20704
|
+
Box,
|
|
20705
|
+
{
|
|
20706
|
+
as: "header",
|
|
20707
|
+
className: "sticky top-0 z-20 h-16 bg-card dark:bg-card border-b border-border dark:border-border",
|
|
20708
|
+
children: /* @__PURE__ */ jsxs(
|
|
20709
|
+
HStack,
|
|
20710
|
+
{
|
|
20711
|
+
align: "center",
|
|
20712
|
+
justify: "between",
|
|
20713
|
+
className: "h-full px-4 gap-4",
|
|
20714
|
+
children: [
|
|
20715
|
+
/* @__PURE__ */ jsx(
|
|
20716
|
+
Button,
|
|
20717
|
+
{
|
|
20718
|
+
variant: "ghost",
|
|
20719
|
+
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",
|
|
20720
|
+
onClick: () => setSidebarOpen(true),
|
|
20721
|
+
"aria-label": "Open sidebar",
|
|
20722
|
+
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
20723
|
+
}
|
|
20724
|
+
),
|
|
20725
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20726
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20727
|
+
/* @__PURE__ */ jsx(
|
|
20728
|
+
Input,
|
|
20729
|
+
{
|
|
20730
|
+
type: "search",
|
|
20731
|
+
placeholder: t("common.search"),
|
|
20732
|
+
className: "pl-10 w-full",
|
|
20733
|
+
onKeyDown: (e) => {
|
|
20734
|
+
if (e.key === "Enter") {
|
|
20735
|
+
handleSearchSubmit(e.target.value);
|
|
20674
20736
|
}
|
|
20675
|
-
)
|
|
20676
|
-
] }),
|
|
20677
|
-
/* @__PURE__ */ jsx(
|
|
20678
|
-
Button,
|
|
20679
|
-
{
|
|
20680
|
-
variant: "ghost",
|
|
20681
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20682
|
-
onClick: () => setSidebarOpen(false),
|
|
20683
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
20684
20737
|
}
|
|
20685
|
-
|
|
20686
|
-
|
|
20687
|
-
}
|
|
20688
|
-
|
|
20689
|
-
|
|
20690
|
-
|
|
20691
|
-
|
|
20692
|
-
|
|
20693
|
-
gap: "none",
|
|
20694
|
-
className: "flex-1 px-3 py-4 space-y-1 overflow-y-auto",
|
|
20695
|
-
children: navItems.map((item) => /* @__PURE__ */ jsx(
|
|
20696
|
-
NavLink,
|
|
20738
|
+
}
|
|
20739
|
+
)
|
|
20740
|
+
] }) }),
|
|
20741
|
+
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
20742
|
+
headerActions,
|
|
20743
|
+
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
20744
|
+
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
20745
|
+
Button,
|
|
20697
20746
|
{
|
|
20698
|
-
|
|
20699
|
-
|
|
20747
|
+
variant: "ghost",
|
|
20748
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20749
|
+
onClick: () => handleTopBarActionClick(action.event),
|
|
20750
|
+
"aria-label": action.label ?? action.icon,
|
|
20751
|
+
children: [
|
|
20752
|
+
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20753
|
+
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
20754
|
+
Box,
|
|
20755
|
+
{
|
|
20756
|
+
as: "span",
|
|
20757
|
+
className: cn(
|
|
20758
|
+
"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",
|
|
20759
|
+
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
20760
|
+
),
|
|
20761
|
+
children: action.badge
|
|
20762
|
+
}
|
|
20763
|
+
)
|
|
20764
|
+
]
|
|
20700
20765
|
},
|
|
20701
|
-
|
|
20702
|
-
))
|
|
20703
|
-
|
|
20704
|
-
|
|
20705
|
-
|
|
20706
|
-
|
|
20707
|
-
|
|
20708
|
-
|
|
20709
|
-
|
|
20710
|
-
|
|
20711
|
-
|
|
20712
|
-
|
|
20713
|
-
|
|
20714
|
-
|
|
20715
|
-
|
|
20716
|
-
|
|
20717
|
-
|
|
20718
|
-
|
|
20719
|
-
|
|
20720
|
-
|
|
20721
|
-
|
|
20722
|
-
|
|
20766
|
+
`${action.event}-${idx}`
|
|
20767
|
+
)),
|
|
20768
|
+
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
20769
|
+
Button,
|
|
20770
|
+
{
|
|
20771
|
+
variant: "ghost",
|
|
20772
|
+
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20773
|
+
onClick: handleNotificationClick,
|
|
20774
|
+
"aria-label": t("common.notifications"),
|
|
20775
|
+
children: [
|
|
20776
|
+
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20777
|
+
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
20778
|
+
Box,
|
|
20779
|
+
{
|
|
20780
|
+
as: "span",
|
|
20781
|
+
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",
|
|
20782
|
+
children: unreadCount > 99 ? "99+" : unreadCount
|
|
20783
|
+
}
|
|
20784
|
+
)
|
|
20785
|
+
]
|
|
20786
|
+
}
|
|
20787
|
+
),
|
|
20788
|
+
user && /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20789
|
+
/* @__PURE__ */ jsxs(
|
|
20723
20790
|
Button,
|
|
20724
20791
|
{
|
|
20725
20792
|
variant: "ghost",
|
|
20726
|
-
className: "
|
|
20727
|
-
onClick: () =>
|
|
20728
|
-
|
|
20729
|
-
|
|
20793
|
+
className: "flex items-center gap-2 p-2 rounded-lg hover:bg-muted dark:hover:bg-muted",
|
|
20794
|
+
onClick: () => setUserMenuOpen(!userMenuOpen),
|
|
20795
|
+
children: [
|
|
20796
|
+
/* @__PURE__ */ jsx(
|
|
20797
|
+
Avatar,
|
|
20798
|
+
{
|
|
20799
|
+
src: user.avatar,
|
|
20800
|
+
alt: user.name,
|
|
20801
|
+
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
20802
|
+
size: "sm"
|
|
20803
|
+
}
|
|
20804
|
+
),
|
|
20805
|
+
/* @__PURE__ */ jsx(
|
|
20806
|
+
Typography,
|
|
20807
|
+
{
|
|
20808
|
+
variant: "small",
|
|
20809
|
+
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20810
|
+
as: "span",
|
|
20811
|
+
children: user.name
|
|
20812
|
+
}
|
|
20813
|
+
),
|
|
20814
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20815
|
+
]
|
|
20730
20816
|
}
|
|
20731
20817
|
),
|
|
20732
|
-
|
|
20733
|
-
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20818
|
+
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20734
20819
|
/* @__PURE__ */ jsx(
|
|
20735
|
-
|
|
20736
|
-
{
|
|
20737
|
-
type: "search",
|
|
20738
|
-
placeholder: t("common.search"),
|
|
20739
|
-
className: "pl-10 w-full",
|
|
20740
|
-
onKeyDown: (e) => {
|
|
20741
|
-
if (e.key === "Enter") {
|
|
20742
|
-
handleSearchSubmit(e.target.value);
|
|
20743
|
-
}
|
|
20744
|
-
}
|
|
20745
|
-
}
|
|
20746
|
-
)
|
|
20747
|
-
] }) }),
|
|
20748
|
-
!searchEnabled && /* @__PURE__ */ jsx(Box, { className: "flex-1" }),
|
|
20749
|
-
/* @__PURE__ */ jsxs(HStack, { align: "center", gap: "xs", children: [
|
|
20750
|
-
headerActions,
|
|
20751
|
-
showThemeToggle && /* @__PURE__ */ jsx(ThemeToggle, {}),
|
|
20752
|
-
topBarActions.map((action, idx) => /* @__PURE__ */ jsxs(
|
|
20753
|
-
Button,
|
|
20820
|
+
Box,
|
|
20754
20821
|
{
|
|
20755
|
-
|
|
20756
|
-
|
|
20757
|
-
onClick: () => handleTopBarActionClick(action.event),
|
|
20758
|
-
"aria-label": action.label ?? action.icon,
|
|
20759
|
-
children: [
|
|
20760
|
-
/* @__PURE__ */ jsx(Icon, { name: action.icon, className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20761
|
-
action.badge !== void 0 && action.badge !== null && action.badge !== 0 && action.badge !== "" && /* @__PURE__ */ jsx(
|
|
20762
|
-
Box,
|
|
20763
|
-
{
|
|
20764
|
-
as: "span",
|
|
20765
|
-
className: cn(
|
|
20766
|
-
"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",
|
|
20767
|
-
action.variant === "danger" ? "bg-error" : action.variant === "primary" ? "bg-primary" : "bg-foreground"
|
|
20768
|
-
),
|
|
20769
|
-
children: action.badge
|
|
20770
|
-
}
|
|
20771
|
-
)
|
|
20772
|
-
]
|
|
20773
|
-
},
|
|
20774
|
-
`${action.event}-${idx}`
|
|
20775
|
-
)),
|
|
20776
|
-
notificationsEnabled && /* @__PURE__ */ jsxs(
|
|
20777
|
-
Button,
|
|
20778
|
-
{
|
|
20779
|
-
variant: "ghost",
|
|
20780
|
-
className: "relative p-2 rounded-full hover:bg-muted dark:hover:bg-muted",
|
|
20781
|
-
onClick: handleNotificationClick,
|
|
20782
|
-
"aria-label": t("common.notifications"),
|
|
20783
|
-
children: [
|
|
20784
|
-
/* @__PURE__ */ jsx(Bell, { className: "h-5 w-5 text-muted-foreground dark:text-muted-foreground" }),
|
|
20785
|
-
unreadCount > 0 && /* @__PURE__ */ jsx(
|
|
20786
|
-
Box,
|
|
20787
|
-
{
|
|
20788
|
-
as: "span",
|
|
20789
|
-
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",
|
|
20790
|
-
children: unreadCount > 99 ? "99+" : unreadCount
|
|
20791
|
-
}
|
|
20792
|
-
)
|
|
20793
|
-
]
|
|
20822
|
+
className: "fixed inset-0 z-20",
|
|
20823
|
+
onClick: () => setUserMenuOpen(false)
|
|
20794
20824
|
}
|
|
20795
20825
|
),
|
|
20796
|
-
|
|
20826
|
+
/* @__PURE__ */ 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: [
|
|
20827
|
+
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
20828
|
+
/* @__PURE__ */ jsx(
|
|
20829
|
+
Typography,
|
|
20830
|
+
{
|
|
20831
|
+
variant: "small",
|
|
20832
|
+
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
20833
|
+
as: "p",
|
|
20834
|
+
children: user.name
|
|
20835
|
+
}
|
|
20836
|
+
),
|
|
20837
|
+
/* @__PURE__ */ jsx(
|
|
20838
|
+
Typography,
|
|
20839
|
+
{
|
|
20840
|
+
variant: "caption",
|
|
20841
|
+
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
20842
|
+
as: "p",
|
|
20843
|
+
children: user.email
|
|
20844
|
+
}
|
|
20845
|
+
)
|
|
20846
|
+
] }),
|
|
20797
20847
|
/* @__PURE__ */ jsxs(
|
|
20798
20848
|
Button,
|
|
20799
20849
|
{
|
|
20800
20850
|
variant: "ghost",
|
|
20801
|
-
|
|
20802
|
-
|
|
20851
|
+
onClick: () => {
|
|
20852
|
+
setUserMenuOpen(false);
|
|
20853
|
+
handleSignOut?.();
|
|
20854
|
+
},
|
|
20855
|
+
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",
|
|
20803
20856
|
children: [
|
|
20804
|
-
/* @__PURE__ */ jsx(
|
|
20805
|
-
|
|
20806
|
-
{
|
|
20807
|
-
src: user.avatar,
|
|
20808
|
-
alt: user.name,
|
|
20809
|
-
initials: user.name.split(" ").map((n) => n[0]).join("").substring(0, 2),
|
|
20810
|
-
size: "sm"
|
|
20811
|
-
}
|
|
20812
|
-
),
|
|
20813
|
-
/* @__PURE__ */ jsx(
|
|
20814
|
-
Typography,
|
|
20815
|
-
{
|
|
20816
|
-
variant: "small",
|
|
20817
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20818
|
-
as: "span",
|
|
20819
|
-
children: user.name
|
|
20820
|
-
}
|
|
20821
|
-
),
|
|
20822
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20857
|
+
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
20858
|
+
t("auth.signOut")
|
|
20823
20859
|
]
|
|
20824
20860
|
}
|
|
20825
|
-
)
|
|
20826
|
-
userMenuOpen && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20827
|
-
/* @__PURE__ */ jsx(
|
|
20828
|
-
Box,
|
|
20829
|
-
{
|
|
20830
|
-
className: "fixed inset-0 z-20",
|
|
20831
|
-
onClick: () => setUserMenuOpen(false)
|
|
20832
|
-
}
|
|
20833
|
-
),
|
|
20834
|
-
/* @__PURE__ */ 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: [
|
|
20835
|
-
/* @__PURE__ */ jsxs(Box, { className: "px-4 py-2 border-b border-border dark:border-border", children: [
|
|
20836
|
-
/* @__PURE__ */ jsx(
|
|
20837
|
-
Typography,
|
|
20838
|
-
{
|
|
20839
|
-
variant: "small",
|
|
20840
|
-
className: "text-sm font-medium text-foreground dark:text-foreground",
|
|
20841
|
-
as: "p",
|
|
20842
|
-
children: user.name
|
|
20843
|
-
}
|
|
20844
|
-
),
|
|
20845
|
-
/* @__PURE__ */ jsx(
|
|
20846
|
-
Typography,
|
|
20847
|
-
{
|
|
20848
|
-
variant: "caption",
|
|
20849
|
-
className: "text-xs text-muted-foreground dark:text-muted-foreground",
|
|
20850
|
-
as: "p",
|
|
20851
|
-
children: user.email
|
|
20852
|
-
}
|
|
20853
|
-
)
|
|
20854
|
-
] }),
|
|
20855
|
-
/* @__PURE__ */ jsxs(
|
|
20856
|
-
Button,
|
|
20857
|
-
{
|
|
20858
|
-
variant: "ghost",
|
|
20859
|
-
onClick: () => {
|
|
20860
|
-
setUserMenuOpen(false);
|
|
20861
|
-
handleSignOut?.();
|
|
20862
|
-
},
|
|
20863
|
-
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",
|
|
20864
|
-
children: [
|
|
20865
|
-
/* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
20866
|
-
t("auth.signOut")
|
|
20867
|
-
]
|
|
20868
|
-
}
|
|
20869
|
-
)
|
|
20870
|
-
] })
|
|
20871
|
-
] })
|
|
20861
|
+
)
|
|
20872
20862
|
] })
|
|
20873
20863
|
] })
|
|
20874
|
-
]
|
|
20875
|
-
}
|
|
20876
|
-
|
|
20864
|
+
] })
|
|
20865
|
+
] })
|
|
20866
|
+
]
|
|
20877
20867
|
}
|
|
20878
|
-
)
|
|
20879
|
-
|
|
20880
|
-
|
|
20881
|
-
|
|
20882
|
-
}
|
|
20883
|
-
);
|
|
20868
|
+
)
|
|
20869
|
+
}
|
|
20870
|
+
),
|
|
20871
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "p-4 sm:p-6", children })
|
|
20872
|
+
] })
|
|
20873
|
+
] });
|
|
20884
20874
|
};
|
|
20885
20875
|
DashboardLayout.displayName = "DashboardLayout";
|
|
20886
20876
|
NavLink = ({
|
|
@@ -48969,7 +48959,7 @@ init_logger();
|
|
|
48969
48959
|
|
|
48970
48960
|
// runtime/createClientEffectHandlers.ts
|
|
48971
48961
|
function createClientEffectHandlers(options) {
|
|
48972
|
-
const { eventBus, slotSetter, navigate, notify
|
|
48962
|
+
const { eventBus, slotSetter, navigate, notify } = options;
|
|
48973
48963
|
return {
|
|
48974
48964
|
emit: (event, payload) => {
|
|
48975
48965
|
const prefixedEvent = event.startsWith("UI:") ? event : `UI:${event}`;
|
|
@@ -48981,24 +48971,9 @@ function createClientEffectHandlers(options) {
|
|
|
48981
48971
|
set: () => {
|
|
48982
48972
|
console.warn("[ClientEffectHandlers] set is server-side only, ignored on client");
|
|
48983
48973
|
},
|
|
48984
|
-
callService: async (
|
|
48985
|
-
|
|
48986
|
-
|
|
48987
|
-
const paramsEcho = {};
|
|
48988
|
-
if (params) {
|
|
48989
|
-
for (const [k, v] of Object.entries(params)) {
|
|
48990
|
-
if (v !== void 0 && (typeof v === "string" || typeof v === "number" || typeof v === "boolean" || v === null || v instanceof Date)) {
|
|
48991
|
-
paramsEcho[k] = v;
|
|
48992
|
-
}
|
|
48993
|
-
}
|
|
48994
|
-
}
|
|
48995
|
-
return {
|
|
48996
|
-
id: mockId,
|
|
48997
|
-
clientSecret: `secret_${mockId}`,
|
|
48998
|
-
success: true,
|
|
48999
|
-
status: "succeeded",
|
|
49000
|
-
...paramsEcho
|
|
49001
|
-
};
|
|
48974
|
+
callService: async () => {
|
|
48975
|
+
console.warn("[ClientEffectHandlers] callService is server-side only, ignored on client");
|
|
48976
|
+
return {};
|
|
49002
48977
|
},
|
|
49003
48978
|
renderUI: (slot, pattern, props) => {
|
|
49004
48979
|
if (pattern === null) {
|
|
@@ -49381,8 +49356,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
|
|
|
49381
49356
|
}
|
|
49382
49357
|
},
|
|
49383
49358
|
navigate: optionsRef.current?.navigate,
|
|
49384
|
-
notify: optionsRef.current?.notify
|
|
49385
|
-
callService: optionsRef.current?.callService
|
|
49359
|
+
notify: optionsRef.current?.notify
|
|
49386
49360
|
});
|
|
49387
49361
|
const persistence = optionsRef.current?.persistence;
|
|
49388
49362
|
let handlers = clientHandlers;
|