@vezham/react 26.0.0-alpha.9 → 26.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/lib/components/command/index.js +2 -2
  2. package/dist/lib/components/menu/index.js +2 -2
  3. package/dist/lib/components/panel/footer/ai/message-actions.js +2 -2
  4. package/dist/lib/components/panel/footer/ai/mock-result.js +2 -2
  5. package/dist/lib/components/panel/footer/control-center/appearance.d.ts +2 -1
  6. package/dist/lib/components/panel/footer/control-center/appearance.d.ts.map +1 -1
  7. package/dist/lib/components/panel/footer/control-center/appearance.js +4 -3
  8. package/dist/lib/components/panel/footer/control-center/control-center.js +11 -8
  9. package/dist/lib/components/panel/footer/control-center/direction.d.ts +2 -1
  10. package/dist/lib/components/panel/footer/control-center/direction.d.ts.map +1 -1
  11. package/dist/lib/components/panel/footer/control-center/direction.js +6 -4
  12. package/dist/lib/components/panel/footer/control-center/editor.d.ts +3 -1
  13. package/dist/lib/components/panel/footer/control-center/editor.d.ts.map +1 -1
  14. package/dist/lib/components/panel/footer/control-center/editor.js +24 -6
  15. package/dist/lib/components/panel/footer/control-center/preview.d.ts +4 -2
  16. package/dist/lib/components/panel/footer/control-center/preview.d.ts.map +1 -1
  17. package/dist/lib/components/panel/footer/control-center/preview.js +4 -2
  18. package/dist/lib/components/panel/footer/control-center/tile.d.ts.map +1 -1
  19. package/dist/lib/components/panel/footer/control-center/tile.js +12 -7
  20. package/dist/lib/components/panel/footer/control-center/variant.d.ts +27 -0
  21. package/dist/lib/components/panel/footer/control-center/variant.d.ts.map +1 -1
  22. package/dist/lib/components/panel/footer/control-center/variant.js +30 -9
  23. package/dist/lib/components/panel/footer/index.js +2 -2
  24. package/dist/lib/components/panel/footer/notification-center/index.js +2 -2
  25. package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts +88 -3
  26. package/dist/lib/components/panel/footer/notification-center/widget-tiles.d.ts.map +1 -1
  27. package/dist/lib/components/panel/footer/notification-center/widget-tiles.js +63 -25
  28. package/dist/lib/components/panel/footer/user-menu.d.ts.map +1 -1
  29. package/dist/lib/components/panel/footer/user-menu.js +258 -230
  30. package/dist/lib/components/panel/header/application-menu-sheet.js +5 -5
  31. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/index.js +1 -1
  32. package/dist/lib/components/panel/header/bookmarks/bookmark-file-tree/variants.js +1 -1
  33. package/dist/lib/components/panel/header/bookmarks/favorites/grid-list.js +2 -2
  34. package/dist/lib/components/panel/header/bookmarks/index.js +2 -1
  35. package/dist/lib/components/panel/header/bookmarks/shortcut-context-menu.js +2 -1
  36. package/dist/lib/components/panel/header/bookmarks/tree-data.js +2 -1
  37. package/dist/lib/components/panel/header/index.js +5 -5
  38. package/dist/lib/components/panel/header/storage/types.d.ts +1 -1
  39. package/dist/lib/components/panel/info-panel/container.module.js +4 -2
  40. package/dist/lib/components/panel/menu/index.js +2 -2
  41. package/dist/lib/components/panel/menu/types.d.ts +1 -1
  42. package/dist/lib/layouts/menu-layout/index-md.js +3 -3
  43. package/dist/lib/layouts/menu-layout/index-sm.js +2 -2
  44. package/dist/lib/layouts/section/index.d.ts.map +1 -1
  45. package/dist/lib/layouts/section/index.js +7 -7
  46. package/dist/lib/layouts/section/sidebar.js +2 -2
  47. package/dist/lib/layouts/section/toolbar-more-sheet.js +3 -3
  48. package/dist/lib/layouts/section/toolbar.js +4 -4
  49. package/dist/lib/pages/settings/index.d.ts.map +1 -1
  50. package/dist/lib/pages/settings/index.js +72 -27
  51. package/dist/lib/pages/settings/navigation.d.ts +1 -1
  52. package/dist/lib/pages/settings/navigation.d.ts.map +1 -1
  53. package/dist/lib/pages/settings/settings-content.js +1 -1
  54. package/dist/lib/pages/settings/tile-gallery.d.ts +6 -1
  55. package/dist/lib/pages/settings/tile-gallery.d.ts.map +1 -1
  56. package/dist/lib/pages/settings/tile-gallery.js +175 -100
  57. package/dist/lib/store/useBookmarks/index.js +2 -2
  58. package/dist/lib/store/useStorage/index.js +1 -1
  59. package/package.json +2 -2
@@ -3,7 +3,7 @@ import { MenuSheet } from "../../menu/sheet.js";
3
3
  import { DEFAULT_STATUS_OPTION, STATUS_OPTIONS, STATUS_TIMING_OPTIONS, SUGGESTED_STATUS_OPTIONS, isColorStatus } from "./data.js";
4
4
  import { useState } from "react";
5
5
  import { Avatar, Badge, Button, Dropdown, Separator, Tooltip, useMediaQuery } from "@vezham/react-v3";
6
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { AltArrowLeft, AltArrowRight, Bell, CheckRead, Logout2, Settings, VezhamTamizhi } from "@vezham/icons-react";
8
8
  //#region src/lib/components/panel/footer/user-menu.tsx
9
9
  var StatusVisual = ({ status }) => {
@@ -79,6 +79,235 @@ var useAccountSections = (user) => {
79
79
  ]
80
80
  };
81
81
  };
82
+ var AccountActions = ({ actions }) => {
83
+ if (actions.length === 0) return null;
84
+ return /* @__PURE__ */ jsx("div", {
85
+ className: "flex items-center justify-center gap-2",
86
+ role: "group",
87
+ "aria-label": "Account actions",
88
+ children: actions.map((action) => /* @__PURE__ */ jsxs(Tooltip, {
89
+ delay: 0,
90
+ children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(Button, {
91
+ "aria-label": action.label,
92
+ isIconOnly: true,
93
+ size: "lg",
94
+ variant: "ghost",
95
+ onPress: action.onPress,
96
+ children: action.icon
97
+ }) }), /* @__PURE__ */ jsx(Tooltip.Content, {
98
+ placement: "top",
99
+ children: action.label
100
+ })]
101
+ }, action.label))
102
+ });
103
+ };
104
+ var AccountIdentity = ({ user, currentStatus }) => /* @__PURE__ */ jsxs("div", {
105
+ className: "flex flex-col items-center gap-2 text-center",
106
+ children: [
107
+ /* @__PURE__ */ jsxs(Badge.Anchor, { children: [/* @__PURE__ */ jsxs(Avatar, {
108
+ className: "size-20",
109
+ children: [user.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
110
+ src: user.avatar,
111
+ alt: user.name
112
+ }) : null, /* @__PURE__ */ jsx(Avatar.Fallback, {
113
+ className: "text-xl",
114
+ children: user.name?.[0]
115
+ })]
116
+ }), /* @__PURE__ */ jsx(Badge, {
117
+ placement: "bottom-right",
118
+ size: "sm",
119
+ className: "border-surface flex items-center justify-center border-2",
120
+ children: /* @__PURE__ */ jsx(StatusVisual, { status: currentStatus })
121
+ })] }),
122
+ /* @__PURE__ */ jsx("span", {
123
+ className: "text-base font-semibold",
124
+ children: user.name
125
+ }),
126
+ /* @__PURE__ */ jsxs("span", {
127
+ className: "text-muted flex items-center gap-1 text-sm",
128
+ children: [/* @__PURE__ */ jsx(StatusVisual, { status: currentStatus }), currentStatus.label]
129
+ })
130
+ ]
131
+ });
132
+ var AccountSectionItems = ({ section, onBack }) => /* @__PURE__ */ jsxs("div", {
133
+ className: "flex flex-col gap-1",
134
+ children: [/* @__PURE__ */ jsxs(Button, {
135
+ variant: "ghost",
136
+ className: "h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
137
+ onPress: onBack,
138
+ "aria-label": "Back to account menu",
139
+ children: [/* @__PURE__ */ jsx(AltArrowLeft, {
140
+ size: 18,
141
+ "aria-hidden": "true"
142
+ }), section.title]
143
+ }), section.options.map((option) => /* @__PURE__ */ jsxs(Button, {
144
+ variant: "ghost",
145
+ className: `h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start ${option.id === "clear" ? "text-danger" : ""}`,
146
+ "aria-pressed": section.selected === option.id,
147
+ onPress: () => {
148
+ section.onSelect(option.id);
149
+ onBack();
150
+ },
151
+ children: [
152
+ option.visual,
153
+ /* @__PURE__ */ jsx("span", {
154
+ className: "min-w-0 flex-1 text-start",
155
+ children: option.label
156
+ }),
157
+ section.selected === option.id ? /* @__PURE__ */ jsx(CheckRead, {
158
+ size: 16,
159
+ "aria-hidden": "true"
160
+ }) : null
161
+ ]
162
+ }, option.id))]
163
+ });
164
+ var AccountSheetContent = ({ user, currentStatus, actions, sections, onSection, onPreferences, onLogout }) => /* @__PURE__ */ jsxs("div", {
165
+ className: "flex flex-col items-center gap-5 py-2",
166
+ children: [
167
+ /* @__PURE__ */ jsx(AccountIdentity, {
168
+ user,
169
+ currentStatus
170
+ }),
171
+ /* @__PURE__ */ jsx(AccountActions, { actions }),
172
+ /* @__PURE__ */ jsx(Separator, { className: "self-stretch" }),
173
+ /* @__PURE__ */ jsxs("div", {
174
+ className: "flex w-full flex-col gap-1 p-2",
175
+ children: [
176
+ sections.map((item) => /* @__PURE__ */ jsxs(Button, {
177
+ variant: "ghost",
178
+ className: "h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
179
+ onPress: () => onSection(item.id),
180
+ children: [/* @__PURE__ */ jsx("span", {
181
+ className: "min-w-0 flex-1 truncate text-start",
182
+ children: item.label
183
+ }), /* @__PURE__ */ jsx(AltArrowRight, {
184
+ size: 16,
185
+ "aria-hidden": "true"
186
+ })]
187
+ }, item.id)),
188
+ /* @__PURE__ */ jsx(Separator, {}),
189
+ /* @__PURE__ */ jsxs(Button, {
190
+ variant: "ghost",
191
+ className: "h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
192
+ onPress: onPreferences,
193
+ children: [/* @__PURE__ */ jsx(Settings, {
194
+ size: 18,
195
+ "aria-hidden": "true"
196
+ }), "Preferences"]
197
+ }),
198
+ /* @__PURE__ */ jsxs(Button, {
199
+ variant: "ghost",
200
+ className: "text-danger h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
201
+ onPress: onLogout,
202
+ children: [/* @__PURE__ */ jsx(Logout2, {
203
+ size: 18,
204
+ "aria-hidden": "true"
205
+ }), "Logout"]
206
+ })
207
+ ]
208
+ })
209
+ ]
210
+ });
211
+ var AccountDropdownContent = ({ user, currentStatus, sections, onProfile, onPreferences, onLogout }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [
212
+ /* @__PURE__ */ jsxs("button", {
213
+ type: "button",
214
+ className: "hover:bg-default-100 flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left",
215
+ onClick: onProfile,
216
+ children: [/* @__PURE__ */ jsxs(Avatar, {
217
+ size: "sm",
218
+ children: [user.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
219
+ src: user.avatar,
220
+ alt: user.name
221
+ }) : null, /* @__PURE__ */ jsx(Avatar.Fallback, { children: user.name?.[0] })]
222
+ }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
223
+ className: "block font-medium",
224
+ children: user.name
225
+ }), /* @__PURE__ */ jsxs("span", {
226
+ className: "text-muted flex items-center gap-1 text-xs",
227
+ children: [/* @__PURE__ */ jsx(StatusVisual, { status: currentStatus }), currentStatus.label]
228
+ })] })]
229
+ }),
230
+ /* @__PURE__ */ jsx(Separator, {}),
231
+ /* @__PURE__ */ jsxs(Dropdown.Menu, {
232
+ "aria-label": "Account actions",
233
+ children: [
234
+ sections.map((item) => /* @__PURE__ */ jsxs(Dropdown.SubmenuTrigger, { children: [/* @__PURE__ */ jsxs(Dropdown.Item, {
235
+ id: item.id,
236
+ textValue: item.label,
237
+ children: [/* @__PURE__ */ jsx("span", {
238
+ className: "min-w-0 flex-1 truncate",
239
+ children: item.label
240
+ }), /* @__PURE__ */ jsx(Dropdown.SubmenuIndicator, {})]
241
+ }), /* @__PURE__ */ jsx(Dropdown.Popover, {
242
+ className: "z-90 w-64 max-w-[calc(100vw-2rem)]",
243
+ children: /* @__PURE__ */ jsx(Dropdown.Menu, {
244
+ "aria-label": item.title,
245
+ selectionMode: "single",
246
+ selectedKeys: item.selected ? [item.selected] : [],
247
+ onAction: (key) => item.onSelect(String(key)),
248
+ children: item.options.map((option) => /* @__PURE__ */ jsxs(Dropdown.Item, {
249
+ id: option.id,
250
+ textValue: option.label,
251
+ className: option.id === "clear" ? "text-danger" : "",
252
+ children: [
253
+ option.visual,
254
+ /* @__PURE__ */ jsx("span", {
255
+ className: "min-w-0 flex-1",
256
+ children: option.label
257
+ }),
258
+ /* @__PURE__ */ jsx(Dropdown.ItemIndicator, {})
259
+ ]
260
+ }, option.id))
261
+ })
262
+ })] }, item.id)),
263
+ /* @__PURE__ */ jsx(Separator, {}),
264
+ /* @__PURE__ */ jsxs(Dropdown.Item, {
265
+ id: "preferences",
266
+ onAction: onPreferences,
267
+ children: [/* @__PURE__ */ jsx(Settings, {
268
+ size: 18,
269
+ "aria-hidden": "true"
270
+ }), "Preferences"]
271
+ }),
272
+ /* @__PURE__ */ jsxs(Dropdown.Item, {
273
+ id: "logout",
274
+ variant: "danger",
275
+ onAction: onLogout,
276
+ children: [/* @__PURE__ */ jsx(Logout2, {
277
+ size: 18,
278
+ "aria-hidden": "true"
279
+ }), "Logout"]
280
+ })
281
+ ]
282
+ })
283
+ ] });
284
+ var UserMenuTrigger = ({ small, bubble, user, currentStatus, tooltipText, onPress }) => {
285
+ const Trigger = small ? Button : Dropdown.Trigger;
286
+ return /* @__PURE__ */ jsxs(Tooltip, {
287
+ delay: 0,
288
+ children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(Trigger, {
289
+ onPress: small ? onPress : void 0,
290
+ "aria-label": `Open ${user.name || "user"} menu`,
291
+ className: `button button--ghost relative flex h-12 w-12 items-center justify-center ${bubble ? "rounded-full" : "rounded-xl"}`,
292
+ children: /* @__PURE__ */ jsxs(Badge.Anchor, { children: [/* @__PURE__ */ jsxs(Avatar, {
293
+ size: "sm",
294
+ className: "h-6 w-6 rounded-md",
295
+ children: [user.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
296
+ src: user.avatar,
297
+ alt: user.name
298
+ }) : null, /* @__PURE__ */ jsx(Avatar.Fallback, { children: user.name?.[0] })]
299
+ }), /* @__PURE__ */ jsx(Badge, {
300
+ placement: "bottom-right",
301
+ size: "sm",
302
+ className: "border-background flex items-center justify-center border",
303
+ children: /* @__PURE__ */ jsx(StatusVisual, { status: currentStatus })
304
+ })] })
305
+ }) }), /* @__PURE__ */ jsx(Tooltip.Content, {
306
+ placement: bubble ? "bottom" : "right",
307
+ children: tooltipText
308
+ })]
309
+ });
310
+ };
82
311
  var UserMenu = ({ user, onLogout, onProfile, onPreferences, showAI = false, showControlCenter = false, showNotifications = false, notificationCount = 0, onAI, onControlCenter, onNotifications }) => {
83
312
  const small = useMediaQuery(APPLICATION_MENU_SHEET_MEDIA_QUERY, { initializeWithValue: false });
84
313
  const bubble = useMediaQuery(ACCOUNT_BUBBLE_MEDIA_QUERY, { initializeWithValue: false });
@@ -124,239 +353,31 @@ var UserMenu = ({ user, onLogout, onProfile, onPreferences, showAI = false, show
124
353
  onPress: onAI
125
354
  } : null
126
355
  ].filter((action) => action !== null);
127
- const compactContent = /* @__PURE__ */ jsxs("div", {
128
- className: "flex flex-col items-center gap-5 py-2",
129
- children: [
130
- /* @__PURE__ */ jsxs("div", {
131
- className: "flex flex-col items-center gap-2 text-center",
132
- children: [
133
- /* @__PURE__ */ jsxs(Badge.Anchor, { children: [/* @__PURE__ */ jsxs(Avatar, {
134
- className: "size-20",
135
- children: [user.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
136
- src: user.avatar,
137
- alt: user.name
138
- }) : null, /* @__PURE__ */ jsx(Avatar.Fallback, {
139
- className: "text-xl",
140
- children: user.name?.[0]
141
- })]
142
- }), /* @__PURE__ */ jsx(Badge, {
143
- placement: "bottom-right",
144
- size: "sm",
145
- className: "border-surface flex items-center justify-center border-2",
146
- children: /* @__PURE__ */ jsx(StatusVisual, { status: currentStatus })
147
- })] }),
148
- /* @__PURE__ */ jsx("span", {
149
- className: "text-base font-semibold",
150
- children: user.name
151
- }),
152
- /* @__PURE__ */ jsxs("span", {
153
- className: "text-muted flex items-center gap-1 text-sm",
154
- children: [/* @__PURE__ */ jsx(StatusVisual, { status: currentStatus }), currentStatus.label]
155
- })
156
- ]
157
- }),
158
- compactActions.length > 0 ? /* @__PURE__ */ jsx("div", {
159
- className: "flex items-center justify-center gap-2",
160
- role: "group",
161
- "aria-label": "Account actions",
162
- children: compactActions.map((action) => /* @__PURE__ */ jsxs(Tooltip, {
163
- delay: 0,
164
- children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(Button, {
165
- "aria-label": action.label,
166
- isIconOnly: true,
167
- size: "lg",
168
- variant: "ghost",
169
- onPress: action.onPress,
170
- children: action.icon
171
- }) }), /* @__PURE__ */ jsx(Tooltip.Content, {
172
- placement: "top",
173
- children: action.label
174
- })]
175
- }, action.label))
176
- }) : null,
177
- /* @__PURE__ */ jsx(Separator, { className: "self-stretch" }),
178
- /* @__PURE__ */ jsxs("div", {
179
- className: "flex w-full flex-col gap-1 p-2",
180
- children: [
181
- accountSections.map((item) => /* @__PURE__ */ jsxs(Button, {
182
- variant: "ghost",
183
- className: "h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
184
- onPress: () => setSection(item.id),
185
- children: [/* @__PURE__ */ jsx("span", {
186
- className: "min-w-0 flex-1 truncate text-start",
187
- children: item.label
188
- }), /* @__PURE__ */ jsx(AltArrowRight, {
189
- size: 16,
190
- "aria-hidden": "true"
191
- })]
192
- }, item.id)),
193
- /* @__PURE__ */ jsx(Separator, {}),
194
- /* @__PURE__ */ jsxs(Button, {
195
- variant: "ghost",
196
- className: "h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
197
- onPress: () => closeAndRun(onPreferences),
198
- children: [/* @__PURE__ */ jsx(Settings, {
199
- size: 18,
200
- "aria-hidden": "true"
201
- }), "Preferences"]
202
- }),
203
- /* @__PURE__ */ jsxs(Button, {
204
- variant: "ghost",
205
- className: "text-danger h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
206
- onPress: () => closeAndRun(onLogout),
207
- children: [/* @__PURE__ */ jsx(Logout2, {
208
- size: 18,
209
- "aria-hidden": "true"
210
- }), "Logout"]
211
- })
212
- ]
213
- })
214
- ]
215
- });
216
- const Trigger = small ? Button : Dropdown.Trigger;
217
- const content = /* @__PURE__ */ jsxs(Fragment, { children: [
218
- /* @__PURE__ */ jsxs("button", {
219
- type: "button",
220
- className: "hover:bg-default-100 flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left",
221
- onClick: () => {
222
- setOpen(false);
223
- onProfile?.();
224
- },
225
- children: [/* @__PURE__ */ jsxs(Avatar, {
226
- size: "sm",
227
- children: [user.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
228
- src: user.avatar,
229
- alt: user.name
230
- }) : null, /* @__PURE__ */ jsx(Avatar.Fallback, { children: user.name?.[0] })]
231
- }), /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
232
- className: "block font-medium",
233
- children: user.name
234
- }), /* @__PURE__ */ jsxs("span", {
235
- className: "text-muted flex items-center gap-1 text-xs",
236
- children: [/* @__PURE__ */ jsx(StatusVisual, { status: currentStatus }), currentStatus.label]
237
- })] })]
238
- }),
239
- /* @__PURE__ */ jsx(Separator, {}),
240
- small ? null : /* @__PURE__ */ jsxs(Dropdown.Menu, {
241
- "aria-label": "Account actions",
242
- children: [
243
- accountSections.map((item) => /* @__PURE__ */ jsxs(Dropdown.SubmenuTrigger, { children: [/* @__PURE__ */ jsxs(Dropdown.Item, {
244
- id: item.id,
245
- textValue: item.label,
246
- children: [/* @__PURE__ */ jsx("span", {
247
- className: "min-w-0 flex-1 truncate",
248
- children: item.label
249
- }), /* @__PURE__ */ jsx(Dropdown.SubmenuIndicator, {})]
250
- }), /* @__PURE__ */ jsx(Dropdown.Popover, {
251
- className: "z-90 w-64 max-w-[calc(100vw-2rem)]",
252
- children: /* @__PURE__ */ jsx(Dropdown.Menu, {
253
- "aria-label": item.title,
254
- selectionMode: "single",
255
- selectedKeys: item.selected ? [item.selected] : [],
256
- onAction: (key) => item.onSelect(String(key)),
257
- children: item.options.map((option) => /* @__PURE__ */ jsxs(Dropdown.Item, {
258
- id: option.id,
259
- textValue: option.label,
260
- className: option.id === "clear" ? "text-danger" : "",
261
- children: [
262
- option.visual,
263
- /* @__PURE__ */ jsx("span", {
264
- className: "min-w-0 flex-1",
265
- children: option.label
266
- }),
267
- /* @__PURE__ */ jsx(Dropdown.ItemIndicator, {})
268
- ]
269
- }, option.id))
270
- })
271
- })] }, item.id)),
272
- /* @__PURE__ */ jsx(Separator, {}),
273
- /* @__PURE__ */ jsxs(Dropdown.Item, {
274
- id: "preferences",
275
- onAction: () => {
276
- setOpen(false);
277
- onPreferences?.();
278
- },
279
- children: [/* @__PURE__ */ jsx(Settings, {
280
- size: 18,
281
- "aria-hidden": "true"
282
- }), "Preferences"]
283
- }),
284
- /* @__PURE__ */ jsxs(Dropdown.Item, {
285
- id: "logout",
286
- variant: "danger",
287
- onAction: () => {
288
- setOpen(false);
289
- onLogout();
290
- },
291
- children: [/* @__PURE__ */ jsx(Logout2, {
292
- size: 18,
293
- "aria-hidden": "true"
294
- }), "Logout"]
295
- })
296
- ]
297
- })
298
- ] });
299
- const trigger = /* @__PURE__ */ jsxs(Tooltip, {
300
- delay: 0,
301
- children: [/* @__PURE__ */ jsx(Tooltip.Trigger, { children: /* @__PURE__ */ jsx(Trigger, {
302
- onPress: small ? () => setOpen(true) : void 0,
303
- "aria-label": `Open ${user.name || "user"} menu`,
304
- className: `button button--ghost relative flex h-12 w-12 items-center justify-center ${bubble ? "rounded-full" : "rounded-xl"}`,
305
- children: /* @__PURE__ */ jsxs(Badge.Anchor, { children: [/* @__PURE__ */ jsxs(Avatar, {
306
- size: "sm",
307
- className: "h-6 w-6 rounded-md",
308
- children: [user.avatar ? /* @__PURE__ */ jsx(Avatar.Image, {
309
- src: user.avatar,
310
- alt: user.name
311
- }) : null, /* @__PURE__ */ jsx(Avatar.Fallback, { children: user.name?.[0] })]
312
- }), /* @__PURE__ */ jsx(Badge, {
313
- placement: "bottom-right",
314
- size: "sm",
315
- className: "border-background flex items-center justify-center border",
316
- children: /* @__PURE__ */ jsx(StatusVisual, { status: currentStatus })
317
- })] })
318
- }) }), /* @__PURE__ */ jsx(Tooltip.Content, {
319
- placement: bubble ? "bottom" : "right",
320
- children: tooltipText
321
- })]
356
+ const trigger = /* @__PURE__ */ jsx(UserMenuTrigger, {
357
+ small,
358
+ bubble,
359
+ user,
360
+ currentStatus,
361
+ tooltipText,
362
+ onPress: () => setOpen(true)
322
363
  });
323
- return small ? /* @__PURE__ */ jsxs(Fragment, { children: [trigger, /* @__PURE__ */ jsx(MenuSheet, {
364
+ return small ? /* @__PURE__ */ jsxs(Fragment$1, { children: [trigger, /* @__PURE__ */ jsx(MenuSheet, {
324
365
  title: "Account",
325
366
  hideTitle: true,
326
367
  isOpen: open,
327
368
  onOpenChange: changeOpen,
328
- children: activeSection ? /* @__PURE__ */ jsxs("div", {
329
- className: "flex flex-col gap-1",
330
- children: [/* @__PURE__ */ jsxs(Button, {
331
- variant: "ghost",
332
- className: "h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start",
333
- onPress: () => setSection(null),
334
- "aria-label": "Back to account menu",
335
- children: [/* @__PURE__ */ jsx(AltArrowLeft, {
336
- size: 18,
337
- "aria-hidden": "true"
338
- }), activeSection.title]
339
- }), activeSection.options.map((option) => /* @__PURE__ */ jsxs(Button, {
340
- variant: "ghost",
341
- className: `h-auto min-h-11 w-full justify-start gap-3 px-3 py-2 text-start ${option.id === "clear" ? "text-danger" : ""}`,
342
- "aria-pressed": activeSection.selected === option.id,
343
- onPress: () => {
344
- activeSection.onSelect(option.id);
345
- setSection(null);
346
- },
347
- children: [
348
- option.visual,
349
- /* @__PURE__ */ jsx("span", {
350
- className: "min-w-0 flex-1 text-start",
351
- children: option.label
352
- }),
353
- activeSection.selected === option.id && /* @__PURE__ */ jsx(CheckRead, {
354
- size: 16,
355
- "aria-hidden": "true"
356
- })
357
- ]
358
- }, option.id))]
359
- }) : compactContent
369
+ children: activeSection ? /* @__PURE__ */ jsx(AccountSectionItems, {
370
+ section: activeSection,
371
+ onBack: () => setSection(null)
372
+ }) : /* @__PURE__ */ jsx(AccountSheetContent, {
373
+ user,
374
+ currentStatus,
375
+ actions: compactActions,
376
+ sections: accountSections,
377
+ onSection: setSection,
378
+ onPreferences: () => closeAndRun(onPreferences),
379
+ onLogout: () => closeAndRun(onLogout)
380
+ })
360
381
  })] }) : /* @__PURE__ */ jsxs(Dropdown, {
361
382
  isOpen: open,
362
383
  onOpenChange: changeOpen,
@@ -364,7 +385,14 @@ var UserMenu = ({ user, onLogout, onProfile, onPreferences, showAI = false, show
364
385
  placement: bubble ? "bottom end" : "right",
365
386
  offset: 8,
366
387
  className: "w-72 max-w-[calc(100vw-2rem)]",
367
- children: content
388
+ children: /* @__PURE__ */ jsx(AccountDropdownContent, {
389
+ user,
390
+ currentStatus,
391
+ sections: accountSections,
392
+ onProfile: () => closeAndRun(onProfile),
393
+ onPreferences: () => closeAndRun(onPreferences),
394
+ onLogout: () => closeAndRun(onLogout)
395
+ })
368
396
  })]
369
397
  });
370
398
  };
@@ -5,7 +5,7 @@ import { MenuSheet } from "../../menu/sheet.js";
5
5
  import { ShortcutKey } from "../../shortcut-key/index.js";
6
6
  import { useState } from "react";
7
7
  import { Button, Label, Separator } from "@vezham/react-v3";
8
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { AltArrowLeft, AltArrowRight, Archive, Bookmark, SidebarMinimalistic } from "@vezham/icons-react";
10
10
  //#region src/lib/components/panel/header/application-menu-sheet.tsx
11
11
  var actionClass = "h-auto min-h-11 w-full justify-start gap-3 rounded-lg px-3 py-2 text-start";
@@ -30,7 +30,7 @@ var ApplicationMenuSheet = ({ isOpen, onOpenChange, trigger, onClose, onSearch,
30
30
  trigger,
31
31
  children: /* @__PURE__ */ jsx("div", {
32
32
  className: "flex flex-col gap-1",
33
- children: menu ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
33
+ children: menu ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Button, {
34
34
  variant: "ghost",
35
35
  className: actionClass,
36
36
  "aria-label": "Back to application menu",
@@ -65,14 +65,14 @@ var ApplicationMenuSheet = ({ isOpen, onOpenChange, trigger, onClose, onSearch,
65
65
  })
66
66
  ]
67
67
  }, action.key))]
68
- }, group.map((action) => action.key).join(":")))] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
68
+ }, group.map((action) => action.key).join(":")))] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
69
69
  /* @__PURE__ */ jsx(Button, {
70
70
  variant: "ghost",
71
71
  className: actionClass,
72
72
  onPress: close,
73
73
  children: "Back to home"
74
74
  }),
75
- showHistoryNavigation && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
75
+ showHistoryNavigation && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs(Button, {
76
76
  variant: "ghost",
77
77
  className: actionClass,
78
78
  "aria-label": "Back",
@@ -134,7 +134,7 @@ var ApplicationMenuSheet = ({ isOpen, onOpenChange, trigger, onClose, onSearch,
134
134
  /* @__PURE__ */ jsx(ShortcutKey, { shortcut: "⌘ S" })
135
135
  ]
136
136
  }),
137
- showMenuUtilities && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Separator, { className: "my-1" }), /* @__PURE__ */ jsxs(Button, {
137
+ showMenuUtilities && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Separator, { className: "my-1" }), /* @__PURE__ */ jsxs(Button, {
138
138
  variant: "ghost",
139
139
  className: actionClass,
140
140
  "aria-label": "Open command palette",
@@ -97,7 +97,7 @@ var BookmarkFileTree = ({ items, defaultExpandedKeys, getFileTreeProps, getBookm
97
97
  type: item.kind,
98
98
  item
99
99
  });
100
- setSelectedKeys(new Set([item.id]));
100
+ setSelectedKeys(/* @__PURE__ */ new Set([item.id]));
101
101
  };
102
102
  const handleAreaContextMenu = () => {
103
103
  setContextTarget({ type: "area" });
@@ -212,7 +212,7 @@ var insertTreeItemsOnTarget = (items, targetId, movedItems, existingIds) => {
212
212
  var moveTreeItemToFolder = (items, movedId, targetFolderId) => {
213
213
  if (targetFolderId && movedId === targetFolderId) return { items };
214
214
  const movedItems = [];
215
- const itemsWithoutMoved = removeTreeItems(items, new Set([movedId]), movedItems);
215
+ const itemsWithoutMoved = removeTreeItems(items, /* @__PURE__ */ new Set([movedId]), movedItems);
216
216
  if (!movedItems.length) return { items };
217
217
  if (!targetFolderId) return { items: normalizeBookmarkGroups([...itemsWithoutMoved, ...movedItems]) };
218
218
  if (!findTreeItem(itemsWithoutMoved, targetFolderId)) return { items };
@@ -4,7 +4,7 @@ import { ShortcutContextMenu } from "../shortcut-context-menu.js";
4
4
  import { tva } from "./variant.js";
5
5
  import { useMemo } from "react";
6
6
  import { Avatar, cn } from "@vezham/react-v3";
7
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
8
  import { Button as Button$1, GridList, GridListItem } from "react-aria-components";
9
9
  //#region src/lib/components/panel/header/bookmarks/favorites/grid-list.tsx
10
10
  var FavoriteGridList = ({ items = sampleFavorites, onAction, onRemove, onReorder, dragAndDropHooks, classNames, ...variantProps }) => {
@@ -35,7 +35,7 @@ var FavoriteGridList = ({ items = sampleFavorites, onAction, onRemove, onReorder
35
35
  "data-shortcut-id": item.id,
36
36
  id: item.id,
37
37
  textValue: item.name,
38
- children: ({ allowsDragging }) => /* @__PURE__ */ jsxs(Fragment, { children: [allowsDragging && /* @__PURE__ */ jsx(Button$1, {
38
+ children: ({ allowsDragging }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [allowsDragging && /* @__PURE__ */ jsx(Button$1, {
39
39
  "aria-label": `Drag ${item.name}`,
40
40
  className: slots.dragButton({ class: classNames?.dragButton }),
41
41
  slot: "drag"
@@ -137,7 +137,8 @@ var BookmarksContent = forwardRef((props, ref) => {
137
137
  setFolderModalOpen(false);
138
138
  };
139
139
  const handleBookmarkMove = (id, targetFolderId) => {
140
- handleBookmarkTreeChange(moveTreeItemToFolder(activeBookmarkTreeItems, id, targetFolderId).items);
140
+ const result = moveTreeItemToFolder(activeBookmarkTreeItems, id, targetFolderId);
141
+ handleBookmarkTreeChange(result.items);
141
142
  };
142
143
  return /* @__PURE__ */ jsxs(Component, {
143
144
  className: "h-full min-h-0",
@@ -7,7 +7,8 @@ import { ContextMenu } from "@vezham/react-pro-v3";
7
7
  var ShortcutContextMenu = ({ children, items, kind, onRemove }) => {
8
8
  const [targetId, setTargetId] = useState(null);
9
9
  const rememberTarget = (target) => {
10
- setTargetId((target instanceof Element ? target.closest("[data-shortcut-id]") : null)?.dataset.shortcutId ?? null);
10
+ const element = target instanceof Element ? target.closest("[data-shortcut-id]") : null;
11
+ setTargetId(element?.dataset.shortcutId ?? null);
11
12
  };
12
13
  const target = items.find((item) => item.id === targetId);
13
14
  const label = kind === "favorite" ? "Remove Favorite" : "Unpin";
@@ -64,7 +64,8 @@ var bookmarksToTreeItems = (bookmarks) => {
64
64
  bookmark.children?.forEach((child) => appendBookmark(child, folderPath));
65
65
  return;
66
66
  }
67
- ensureFolder(parentPath.length ? parentPath : getFolderPathFromBookmark(bookmark)).push(createBookmarkTreeNode(bookmark, idCounts));
67
+ const folderPath = parentPath.length ? parentPath : getFolderPathFromBookmark(bookmark);
68
+ ensureFolder(folderPath).push(createBookmarkTreeNode(bookmark, idCounts));
68
69
  };
69
70
  bookmarks.forEach((bookmark) => appendBookmark(bookmark));
70
71
  return treeItems;