shadcn-glass-ui 2.0.6 → 2.0.9

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 (64) hide show
  1. package/README.md +159 -105
  2. package/dist/cli/index.cjs +1 -1
  3. package/dist/components.cjs +4 -4
  4. package/dist/components.d.ts +63 -322
  5. package/dist/components.js +2 -2
  6. package/dist/hooks.cjs +2 -2
  7. package/dist/index.cjs +43 -6
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.js +12 -3
  10. package/dist/index.js.map +1 -1
  11. package/dist/r/alert-glass.json +2 -1
  12. package/dist/r/avatar-glass.json +2 -3
  13. package/dist/r/button-glass.json +1 -1
  14. package/dist/r/circular-progress-glass.json +1 -1
  15. package/dist/r/combobox-glass.json +1 -1
  16. package/dist/r/dropdown-glass.json +3 -5
  17. package/dist/r/dropdown-menu-glass.json +42 -0
  18. package/dist/r/language-bar-glass.json +2 -2
  19. package/dist/r/popover-glass.json +1 -1
  20. package/dist/r/profile-avatar-glass.json +5 -3
  21. package/dist/r/rainbow-progress-glass.json +1 -1
  22. package/dist/r/registry.json +10 -4
  23. package/dist/r/sort-dropdown-glass.json +3 -4
  24. package/dist/r/tooltip-glass.json +3 -5
  25. package/dist/r/trust-score-card-glass.json +1 -1
  26. package/dist/r/trust-score-display-glass.json +1 -1
  27. package/dist/shadcn-glass-ui.css +1 -1
  28. package/dist/{theme-context-CVW50BKW.cjs → theme-context-DNe_2vWJ.cjs} +2 -2
  29. package/dist/theme-context-DNe_2vWJ.cjs.map +1 -0
  30. package/dist/{theme-context-BZoCplcU.js → theme-context-_T5r1KG4.js} +1 -1
  31. package/dist/theme-context-_T5r1KG4.js.map +1 -0
  32. package/dist/themes.cjs +1 -1
  33. package/dist/themes.d.ts +89 -1
  34. package/dist/themes.js +1 -1
  35. package/dist/{trust-score-card-glass-BcZbul0P.js → trust-score-card-glass-A7kas5OS.js} +353 -279
  36. package/dist/trust-score-card-glass-A7kas5OS.js.map +1 -0
  37. package/dist/{trust-score-card-glass-r3qM09Jp.cjs → trust-score-card-glass-Dgu46oWI.cjs} +551 -313
  38. package/dist/trust-score-card-glass-Dgu46oWI.cjs.map +1 -0
  39. package/dist/{use-focus-ZE8ozmZE.cjs → use-focus-BRkQtQCj.cjs} +2 -2
  40. package/dist/{use-focus-ZE8ozmZE.cjs.map → use-focus-BRkQtQCj.cjs.map} +1 -1
  41. package/dist/{use-wallpaper-tint-BuS80tbN.cjs → use-wallpaper-tint-CfShPBo2.cjs} +2 -2
  42. package/dist/{use-wallpaper-tint-BuS80tbN.cjs.map → use-wallpaper-tint-CfShPBo2.cjs.map} +1 -1
  43. package/dist/{utils-DLXayspX.cjs → utils-BXN7AcRu.cjs} +2 -2
  44. package/dist/{utils-DLXayspX.cjs.map → utils-BXN7AcRu.cjs.map} +1 -1
  45. package/dist/utils.cjs +1 -1
  46. package/docs/AI_USAGE.md +1 -32
  47. package/docs/API_PATTERNS_COMPARISON.md +10 -9
  48. package/docs/COMPONENTS_CATALOG.md +140 -45
  49. package/docs/DROPDOWN_ARCHITECTURE.md +290 -0
  50. package/docs/GETTING_STARTED.md +6 -5
  51. package/docs/TOKEN_ARCHITECTURE.md +100 -0
  52. package/docs/api/README.md +3 -3
  53. package/docs/migration/compound-components-v2.md +384 -0
  54. package/docs/visual-testing-guide.md +50 -12
  55. package/package.json +2 -2
  56. package/dist/theme-context-BZoCplcU.js.map +0 -1
  57. package/dist/theme-context-CVW50BKW.cjs.map +0 -1
  58. package/dist/trust-score-card-glass-BcZbul0P.js.map +0 -1
  59. package/dist/trust-score-card-glass-r3qM09Jp.cjs.map +0 -1
  60. package/docs/ADVANCED_PATTERNS.md +0 -408
  61. package/docs/BREAKING_CHANGES.md +0 -213
  62. package/docs/announcements/v1.0.5-devto.md +0 -363
  63. package/docs/announcements/v1.0.5-reddit.md +0 -115
  64. package/docs/announcements/v1.0.5-twitter.md +0 -70
@@ -1,17 +1,19 @@
1
1
  import { t as cn } from "./utils-CcyeqpKQ.js";
2
2
  import { n as useHover, t as useFocus } from "./use-focus-CX0TJJIj.js";
3
- import { o as useTheme } from "./theme-context-BZoCplcU.js";
3
+ import { o as useTheme } from "./theme-context-_T5r1KG4.js";
4
4
  import * as React from "react";
5
5
  import { Children, PureComponent, cloneElement, createContext, createElement, forwardRef, isValidElement, memo, useCallback, useContext, useEffect, useId, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from "react";
6
- import { AlertCircle, AlertTriangle, ArrowDown, ArrowUp, Calendar, Check, CheckCircle, CheckIcon, ChevronDown, ChevronRight, ChevronUp, ChevronsUpDownIcon, Clock, Code, ExternalLink, FolderGit2, GitPullRequest, Github, Info, Minus, Moon, Palette, RefreshCw, Search, SearchIcon, Sparkles, Star, Sun, Target, TrendingDown, TrendingUp, User, Users, X, Zap } from "lucide-react";
6
+ import { AlertCircle, AlertTriangle, ArrowDown, ArrowUp, Calendar, Check, CheckCircle, CheckIcon, ChevronDown, ChevronRight, ChevronRightIcon, ChevronUp, ChevronsUpDownIcon, CircleIcon, Clock, Code, ExternalLink, FolderGit2, GitPullRequest, Github, Info, Minus, Moon, Palette, RefreshCw, Search, SearchIcon, Sparkles, Star, Sun, Target, TrendingDown, TrendingUp, User, Users, X, Zap } from "lucide-react";
7
7
  import { clsx } from "clsx";
8
8
  import { cva } from "class-variance-authority";
9
9
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
10
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
10
11
  import { Slot, createSlot } from "@radix-ui/react-slot";
11
12
  import * as ReactDOM$1 from "react-dom";
12
13
  import ReactDOM, { createPortal } from "react-dom";
13
14
  import * as w$1 from "@radix-ui/react-dialog";
14
15
  import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
16
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
15
17
  var __create = Object.create;
16
18
  var __defProp = Object.defineProperty;
17
19
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -172,13 +174,14 @@ var getAlertStyles = (variant) => {
172
174
  const config = variantStyles$2[variant];
173
175
  return {
174
176
  background: config.bg,
175
- border: `1px solid ${config.border}`
177
+ border: `1px solid ${config.border}`,
178
+ color: config.text
176
179
  };
177
180
  };
178
- const AlertGlass = forwardRef(({ className, variant = "default", title, children, dismissible, onDismiss, ...props }, ref) => {
181
+ var AlertGlassRoot = forwardRef(({ className, variant = "default", dismissible, onDismiss, children, ...props }, ref) => {
179
182
  const effectiveVariant = variant ?? "default";
180
- const config = variantStyles$2[effectiveVariant];
181
183
  const Icon = iconMap[effectiveVariant];
184
+ const config = variantStyles$2[effectiveVariant];
182
185
  return /* @__PURE__ */ jsxs("div", {
183
186
  ref,
184
187
  className: cn(alertVariants({ variant: effectiveVariant }), className),
@@ -187,24 +190,17 @@ const AlertGlass = forwardRef(({ className, variant = "default", title, children
187
190
  ...props,
188
191
  children: [
189
192
  /* @__PURE__ */ jsx(Icon, {
190
- className: "w-4 h-4 md:w-5 md:h-5 flex-shrink-0 mt-0.5",
191
- style: { color: config.text }
193
+ className: "w-4 h-4 md:w-5 md:h-5 shrink-0 mt-0.5",
194
+ style: { color: config.text },
195
+ "aria-hidden": "true"
192
196
  }),
193
- /* @__PURE__ */ jsxs("div", {
197
+ /* @__PURE__ */ jsx("div", {
194
198
  className: "flex-1",
195
- children: [title && /* @__PURE__ */ jsx("p", {
196
- className: "font-medium text-xs md:text-sm mb-0.5 md:mb-1",
197
- style: { color: config.text },
198
- children: title
199
- }), /* @__PURE__ */ jsx("p", {
200
- className: "text-xs md:text-sm opacity-80",
201
- style: { color: config.text },
202
- children
203
- })]
199
+ children
204
200
  }),
205
201
  dismissible && /* @__PURE__ */ jsx("button", {
206
202
  onClick: onDismiss,
207
- className: "p-0.5 md:p-1 rounded transition-colors duration-200 hover:bg-black/5 flex-shrink-0",
203
+ className: "p-0.5 md:p-1 rounded transition-colors duration-200 hover:bg-black/5 shrink-0",
208
204
  "aria-label": "Dismiss alert",
209
205
  children: /* @__PURE__ */ jsx(X, {
210
206
  className: ICON_SIZES.md,
@@ -214,7 +210,32 @@ const AlertGlass = forwardRef(({ className, variant = "default", title, children
214
210
  ]
215
211
  });
216
212
  });
217
- AlertGlass.displayName = "AlertGlass";
213
+ AlertGlassRoot.displayName = "AlertGlass";
214
+ var AlertGlassTitle = forwardRef(({ className, style, ...props }, ref) => {
215
+ return /* @__PURE__ */ jsx("p", {
216
+ ref,
217
+ className: cn("font-medium text-xs md:text-sm mb-0.5 md:mb-1", className),
218
+ style: {
219
+ color: "inherit",
220
+ ...style
221
+ },
222
+ ...props
223
+ });
224
+ });
225
+ AlertGlassTitle.displayName = "AlertGlassTitle";
226
+ var AlertGlassDescription = forwardRef(({ className, style, ...props }, ref) => {
227
+ return /* @__PURE__ */ jsx("p", {
228
+ ref,
229
+ className: cn("text-xs md:text-sm opacity-80", className),
230
+ style: {
231
+ color: "inherit",
232
+ ...style
233
+ },
234
+ ...props
235
+ });
236
+ });
237
+ AlertGlassDescription.displayName = "AlertGlassDescription";
238
+ const AlertGlass = AlertGlassRoot;
218
239
  const avatarSizes = cva("rounded-full flex items-center justify-center font-semibold transition-all duration-300", {
219
240
  variants: { size: {
220
241
  sm: "w-7 h-7 md:w-8 md:h-8 text-[10px] md:text-xs",
@@ -233,11 +254,7 @@ const statusSizes = cva("absolute -bottom-0.5 -right-0.5 rounded-full", {
233
254
  } },
234
255
  defaultVariants: { size: "md" }
235
256
  });
236
- var getInitials = (name) => {
237
- if (!name || name.trim().length === 0) return "?";
238
- return name.split(" ").map((part) => part[0]).join("").toUpperCase().slice(0, 2);
239
- };
240
- var getStatusVars = (statusType) => {
257
+ var getStatusVars$1 = (statusType) => {
241
258
  return {
242
259
  online: {
243
260
  bg: "var(--status-online)",
@@ -257,39 +274,74 @@ var getStatusVars = (statusType) => {
257
274
  }
258
275
  }[statusType];
259
276
  };
260
- const AvatarGlass = forwardRef(({ asChild = false, name, size: size$3 = "md", status, className, ...props }, ref) => {
277
+ var AvatarGlassContext = React.createContext({ size: "md" });
278
+ var AvatarGlassRoot = React.forwardRef(({ className, size: size$3 = "md", status, glowing = false, children, ...props }, ref) => {
261
279
  const { isHovered, hoverProps } = useHover();
262
280
  const avatarStyles = {
263
281
  background: "var(--avatar-bg)",
264
- border: "2px solid var(--avatar-border)",
282
+ border: "3px solid var(--avatar-border)",
265
283
  boxShadow: isHovered ? "var(--avatar-hover-glow)" : "var(--avatar-shadow)",
266
284
  color: "var(--text-inverse)"
267
285
  };
268
- const initials = getInitials(name);
269
- return /* @__PURE__ */ jsxs(asChild ? Slot : "div", {
286
+ return /* @__PURE__ */ jsx(AvatarGlassContext.Provider, {
287
+ value: {
288
+ size: size$3,
289
+ status,
290
+ glowing
291
+ },
292
+ children: /* @__PURE__ */ jsxs("div", {
293
+ className: cn("relative inline-flex", className),
294
+ onMouseEnter: hoverProps.onMouseEnter,
295
+ onMouseLeave: hoverProps.onMouseLeave,
296
+ children: [/* @__PURE__ */ jsx(AvatarPrimitive.Root, {
297
+ ref,
298
+ className: cn(avatarSizes({ size: size$3 }), glowing && "animate-[glow-pulse_2s_ease-in-out_infinite]"),
299
+ style: avatarStyles,
300
+ ...props,
301
+ children
302
+ }), status && /* @__PURE__ */ jsx("span", {
303
+ className: cn(statusSizes({ size: size$3 })),
304
+ style: {
305
+ background: getStatusVars$1(status).bg,
306
+ boxShadow: getStatusVars$1(status).glow
307
+ },
308
+ role: "status",
309
+ "aria-label": `Status: ${status}`
310
+ })]
311
+ })
312
+ });
313
+ });
314
+ AvatarGlassRoot.displayName = "AvatarGlass";
315
+ var AvatarGlassImage = React.forwardRef(({ className, ...props }, ref) => {
316
+ return /* @__PURE__ */ jsx(AvatarPrimitive.Image, {
270
317
  ref,
271
- className: cn("relative inline-flex", className),
272
- onMouseEnter: hoverProps.onMouseEnter,
273
- onMouseLeave: hoverProps.onMouseLeave,
274
- ...props,
275
- children: [/* @__PURE__ */ jsx("div", {
276
- className: cn(avatarSizes({ size: size$3 })),
277
- style: avatarStyles,
278
- role: "img",
279
- "aria-label": `Avatar for ${name}`,
280
- children: initials
281
- }), status && /* @__PURE__ */ jsx("span", {
282
- className: cn(statusSizes({ size: size$3 })),
283
- style: {
284
- background: getStatusVars(status).bg,
285
- boxShadow: getStatusVars(status).glow
286
- },
287
- role: "status",
288
- "aria-label": `Status: ${status}`
289
- })]
318
+ className: cn("aspect-square h-full w-full object-cover", className),
319
+ ...props
320
+ });
321
+ });
322
+ AvatarGlassImage.displayName = "AvatarGlassImage";
323
+ var AvatarGlassFallback = React.forwardRef(({ className, ...props }, ref) => {
324
+ return /* @__PURE__ */ jsx(AvatarPrimitive.Fallback, {
325
+ ref,
326
+ className: cn("flex h-full w-full items-center justify-center font-semibold uppercase", className),
327
+ ...props
290
328
  });
291
329
  });
292
- AvatarGlass.displayName = "AvatarGlass";
330
+ AvatarGlassFallback.displayName = "AvatarGlassFallback";
331
+ var getInitials = (name) => {
332
+ if (!name || name.trim().length === 0) return "?";
333
+ return name.split(" ").map((part) => part[0]).join("").toUpperCase().slice(0, 2);
334
+ };
335
+ var AvatarGlassSimple = ({ name, size: size$3 = "md", status, glowing, className }) => {
336
+ return /* @__PURE__ */ jsx(AvatarGlassRoot, {
337
+ size: size$3,
338
+ status,
339
+ glowing,
340
+ className,
341
+ children: /* @__PURE__ */ jsx(AvatarGlassFallback, { children: getInitials(name) })
342
+ });
343
+ };
344
+ const AvatarGlass = AvatarGlassRoot;
293
345
  const badgeVariants = cva("inline-flex items-center gap-1 md:gap-1.5 rounded-full font-medium", {
294
346
  variants: { size: {
295
347
  sm: "px-1 py-0.5 md:px-1.5 text-[9px] md:text-[10px]",
@@ -386,7 +438,7 @@ var getVariantStyles = (variant, isHovered, isFocusVisible) => {
386
438
  background: isHovered ? "var(--btn-primary-hover-bg)" : "var(--btn-primary-bg)",
387
439
  color: "var(--btn-primary-text)",
388
440
  border: "none",
389
- boxShadow: isFocusVisible ? "var(--focus-glow)" : isHovered ? "var(--btn-primary-glow)" : "0 4px 15px oklch(48.5% 0.26 283 / 0.25)"
441
+ boxShadow: isFocusVisible ? "var(--focus-glow)" : isHovered ? "var(--btn-primary-glow)" : "var(--btn-primary-shadow)"
390
442
  },
391
443
  secondary: {
392
444
  background: isHovered ? "var(--btn-secondary-hover-bg)" : "var(--btn-secondary-bg)",
@@ -404,13 +456,13 @@ var getVariantStyles = (variant, isHovered, isFocusVisible) => {
404
456
  background: "var(--btn-destructive-bg)",
405
457
  color: "var(--btn-destructive-text)",
406
458
  border: "none",
407
- boxShadow: isFocusVisible ? "var(--focus-glow)" : isHovered ? "var(--btn-destructive-glow)" : "0 4px 15px oklch(62.8% 0.225 29 / 0.25)"
459
+ boxShadow: isFocusVisible ? "var(--focus-glow)" : isHovered ? "var(--btn-destructive-glow)" : "var(--btn-destructive-shadow)"
408
460
  },
409
461
  success: {
410
462
  background: "var(--btn-success-bg)",
411
463
  color: "var(--btn-success-text)",
412
464
  border: "none",
413
- boxShadow: isFocusVisible ? "var(--focus-glow)" : isHovered ? "var(--btn-success-glow)" : "0 4px 15px oklch(70.7% 0.143 167 / 0.25)"
465
+ boxShadow: isFocusVisible ? "var(--focus-glow)" : isHovered ? "var(--btn-success-glow)" : "var(--btn-success-shadow)"
414
466
  },
415
467
  text: {
416
468
  background: "transparent",
@@ -485,7 +537,7 @@ const ButtonGlass = forwardRef(({ asChild = false, className, variant = "primary
485
537
  }),
486
538
  isHovered && variant === "primary" && !isDisabled && /* @__PURE__ */ jsx("div", {
487
539
  className: "absolute inset-0 rounded-xl animate-glow-pulse pointer-events-none",
488
- style: { background: "radial-gradient(circle, oklch(100% 0 0 / 0.1) 0%, transparent 70%)" }
540
+ style: { background: "var(--btn-glow-radial)" }
489
541
  }),
490
542
  loading && /* @__PURE__ */ jsx(RefreshCw, { className: cn(ICON_SIZES.md, "animate-spin") }),
491
543
  !loading && Icon && iconPosition === "left" && /* @__PURE__ */ jsx(Icon, { className: ICON_SIZES.md }),
@@ -550,12 +602,12 @@ const CheckboxGlass = forwardRef(({ className, checked, onChange, label, disable
550
602
  });
551
603
  });
552
604
  CheckboxGlass.displayName = "CheckboxGlass";
553
- var circularProgressVariants = cva("relative inline-flex items-center justify-center p-2", {
605
+ var circularProgressVariants = cva("relative inline-flex items-center justify-center p-4", {
554
606
  variants: { size: {
555
- sm: "w-16 h-16",
556
- md: "w-24 h-24",
557
- lg: "w-32 h-32",
558
- xl: "w-40 h-40"
607
+ sm: "w-20 h-20",
608
+ md: "w-28 h-28",
609
+ lg: "w-36 h-36",
610
+ xl: "w-44 h-44"
559
611
  } },
560
612
  defaultVariants: { size: "md" }
561
613
  });
@@ -4349,6 +4401,7 @@ function getState(open) {
4349
4401
  return open ? "open" : "closed";
4350
4402
  }
4351
4403
  var Root2 = Popover$1;
4404
+ var Anchor2 = PopoverAnchor;
4352
4405
  var Trigger = PopoverTrigger$1;
4353
4406
  var Portal$1 = PopoverPortal;
4354
4407
  var Content2 = PopoverContent$1;
@@ -4935,8 +4988,12 @@ function getDropdownContentStyles() {
4935
4988
  };
4936
4989
  }
4937
4990
  const dropdownContentClasses = cn("min-w-40 md:min-w-[200px]", "rounded-2xl overflow-hidden", "z-[50002]", "animate-in fade-in-0 zoom-in-95", "data-[side=bottom]:slide-in-from-top-2", "data-[side=top]:slide-in-from-bottom-2");
4938
- cn("h-px my-1", "bg-[var(--dropdown-border)]");
4939
- cn("px-3 py-1.5 md:px-4 md:py-2", "text-xs font-medium", "text-[var(--text-muted)]");
4991
+ function getDropdownItemClasses(options$1) {
4992
+ const { danger, selected, highlighted } = options$1 ?? {};
4993
+ return cn("w-full px-3 py-2.5", "text-sm text-left", "flex items-center gap-2", "rounded-lg", "outline-none cursor-pointer select-none", "transition-colors duration-150", highlighted && "bg-(--dropdown-item-hover)", "data-[highlighted]:bg-(--dropdown-item-hover)", "data-[selected=true]:bg-(--dropdown-item-hover)", selected && "bg-(--select-item-selected-bg) text-(--select-item-selected-text)", danger ? "text-(--alert-danger-text) data-[highlighted]:text-(--alert-danger-text)" : "text-(--dropdown-item-text)");
4994
+ }
4995
+ const dropdownSeparatorClasses = cn("h-px my-1", "bg-[var(--dropdown-border)]");
4996
+ const dropdownLabelClasses = cn("px-3 py-1.5 md:px-4 md:py-2", "text-xs font-medium", "text-[var(--text-muted)]");
4940
4997
  function ComboBoxGlassInner({ options: options$1, value, onChange, placeholder = "Select option...", emptyText = "No results found.", searchPlaceholder = "Search...", glassVariant = "glass", disabled = false, className, popoverClassName, clearable = false, side = "bottom", align = "start", label, error, success, required = false, size: size$3 = "md", searchable = true, icon: TriggerIcon }, ref) {
4941
4998
  const [open, setOpen] = useState(false);
4942
4999
  const [search, setSearch] = useState("");
@@ -4988,7 +5045,7 @@ function ComboBoxGlassInner({ options: options$1, value, onChange, placeholder =
4988
5045
  }), /* @__PURE__ */ jsx(PopoverContent, {
4989
5046
  side,
4990
5047
  align,
4991
- className: cn("w-[--radix-popover-trigger-width] p-0 rounded-2xl overflow-hidden border-0", getGlassClass(), popoverClassName),
5048
+ className: cn(dropdownContentClasses, "w-[--radix-popover-trigger-width] p-0 border-0", getGlassClass(), popoverClassName),
4992
5049
  style: getDropdownContentStyles(),
4993
5050
  children: /* @__PURE__ */ jsxs(Command, {
4994
5051
  shouldFilter: false,
@@ -5012,7 +5069,7 @@ function ComboBoxGlassInner({ options: options$1, value, onChange, placeholder =
5012
5069
  value: String(option.value),
5013
5070
  disabled: option.disabled,
5014
5071
  onSelect: () => handleSelect(option.value),
5015
- className: cn("w-full px-3 py-2.5 text-sm flex items-center gap-2 rounded-lg", "cursor-pointer transition-colors duration-150", "text-[var(--dropdown-item-text)]", "data-[selected=true]:bg-[var(--dropdown-item-hover)]", isSelected && "bg-[var(--select-item-selected-bg)] text-[var(--select-item-selected-text)]", option.disabled && "cursor-not-allowed opacity-50"),
5072
+ className: cn(getDropdownItemClasses({ selected: isSelected }), option.disabled && "cursor-not-allowed opacity-50"),
5016
5073
  children: [
5017
5074
  /* @__PURE__ */ jsx(CheckIcon, { className: cn(ICON_SIZES.md, "shrink-0", isSelected ? "opacity-100 text-[var(--text-accent)]" : "opacity-0") }),
5018
5075
  OptionIcon && /* @__PURE__ */ jsx(OptionIcon, { className: cn(ICON_SIZES.md, "shrink-0 text-[var(--dropdown-icon)]") }),
@@ -5040,34 +5097,98 @@ function ComboBoxGlassInner({ options: options$1, value, onChange, placeholder =
5040
5097
  }
5041
5098
  const ComboBoxGlass = forwardRef(ComboBoxGlassInner);
5042
5099
  ComboBoxGlassInner.displayName = "ComboBoxGlass";
5100
+ var DropdownMenuGlass = DropdownMenuPrimitive.Root;
5101
+ var DropdownMenuGlassTrigger = DropdownMenuPrimitive.Trigger;
5102
+ var DropdownMenuGlassGroup = DropdownMenuPrimitive.Group;
5103
+ var DropdownMenuGlassPortal = DropdownMenuPrimitive.Portal;
5104
+ var DropdownMenuGlassSub = DropdownMenuPrimitive.Sub;
5105
+ var DropdownMenuGlassRadioGroup = DropdownMenuPrimitive.RadioGroup;
5106
+ var DropdownMenuGlassSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.SubTrigger, {
5107
+ ref,
5108
+ className: cn(getDropdownItemClasses(), "data-[state=open]:bg-[var(--dropdown-item-hover)]", inset && "pl-8", className),
5109
+ ...props,
5110
+ children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto h-4 w-4" })]
5111
+ }));
5112
+ DropdownMenuGlassSubTrigger.displayName = "DropdownMenuGlassSubTrigger";
5113
+ var DropdownMenuGlassSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.SubContent, {
5114
+ ref,
5115
+ className: cn(dropdownContentClasses, "p-1.5", className),
5116
+ style: getDropdownContentStyles(),
5117
+ ...props
5118
+ }));
5119
+ DropdownMenuGlassSubContent.displayName = "DropdownMenuGlassSubContent";
5120
+ var DropdownMenuGlassContent = React.forwardRef(({ className, sideOffset = 8, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
5121
+ ref,
5122
+ sideOffset,
5123
+ className: cn(dropdownContentClasses, "p-1.5", className),
5124
+ style: getDropdownContentStyles(),
5125
+ ...props
5126
+ }) }));
5127
+ DropdownMenuGlassContent.displayName = "DropdownMenuGlassContent";
5128
+ var DropdownMenuGlassItem = React.forwardRef(({ className, inset, variant = "default", ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Item, {
5129
+ ref,
5130
+ className: cn(getDropdownItemClasses({ danger: variant === "destructive" }), inset && "pl-8", className),
5131
+ ...props
5132
+ }));
5133
+ DropdownMenuGlassItem.displayName = "DropdownMenuGlassItem";
5134
+ var DropdownMenuGlassCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.CheckboxItem, {
5135
+ ref,
5136
+ className: cn(getDropdownItemClasses(), "pl-8 pr-2", className),
5137
+ checked,
5138
+ ...props,
5139
+ children: [/* @__PURE__ */ jsx("span", {
5140
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
5141
+ children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "h-4 w-4" }) })
5142
+ }), children]
5143
+ }));
5144
+ DropdownMenuGlassCheckboxItem.displayName = "DropdownMenuGlassCheckboxItem";
5145
+ var DropdownMenuGlassRadioItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DropdownMenuPrimitive.RadioItem, {
5146
+ ref,
5147
+ className: cn(getDropdownItemClasses(), "pl-8 pr-2", className),
5148
+ ...props,
5149
+ children: [/* @__PURE__ */ jsx("span", {
5150
+ className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center",
5151
+ children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CircleIcon, { className: "h-2 w-2 fill-current" }) })
5152
+ }), children]
5153
+ }));
5154
+ DropdownMenuGlassRadioItem.displayName = "DropdownMenuGlassRadioItem";
5155
+ var DropdownMenuGlassLabel = React.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, {
5156
+ ref,
5157
+ className: cn(dropdownLabelClasses, inset && "pl-8", className),
5158
+ ...props
5159
+ }));
5160
+ DropdownMenuGlassLabel.displayName = "DropdownMenuGlassLabel";
5161
+ var DropdownMenuGlassSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
5162
+ ref,
5163
+ className: cn(dropdownSeparatorClasses, "-mx-1 my-1", className),
5164
+ ...props
5165
+ }));
5166
+ DropdownMenuGlassSeparator.displayName = "DropdownMenuGlassSeparator";
5167
+ var DropdownMenuGlassShortcut = ({ className, ...props }) => {
5168
+ return /* @__PURE__ */ jsx("span", {
5169
+ className: cn("ml-auto text-xs tracking-widest text-(--text-muted)", className),
5170
+ ...props
5171
+ });
5172
+ };
5173
+ DropdownMenuGlassShortcut.displayName = "DropdownMenuGlassShortcut";
5043
5174
  const DropdownGlass = React.forwardRef(({ trigger, items, align = "left", className }, ref) => {
5044
5175
  return /* @__PURE__ */ jsx("div", {
5045
5176
  ref,
5046
5177
  className: cn("relative inline-block", className),
5047
- children: /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Root, { children: [/* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, {
5178
+ children: /* @__PURE__ */ jsxs(DropdownMenuGlass, { children: [/* @__PURE__ */ jsx(DropdownMenuGlassTrigger, {
5048
5179
  asChild: true,
5049
5180
  children: trigger
5050
- }), /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.Content, {
5181
+ }), /* @__PURE__ */ jsx(DropdownMenuGlassContent, {
5051
5182
  align: align === "left" ? "start" : "end",
5052
- sideOffset: 8,
5053
- className: dropdownContentClasses,
5054
- style: getDropdownContentStyles(),
5055
- role: "menu",
5056
- "aria-orientation": "vertical",
5057
- children: items.map((item, idx) => item.divider ? /* @__PURE__ */ jsx(DropdownMenuPrimitive.Separator, {
5058
- className: "my-2 mx-3 h-px",
5059
- style: { borderTop: "1px solid var(--dropdown-divider)" },
5060
- role: "separator"
5061
- }, `divider-${idx}`) : /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Item, {
5062
- onClick: item.onClick,
5063
- className: cn("group w-full px-3 py-2 md:px-4 md:py-2.5 text-xs md:text-sm text-left flex items-center gap-2 md:gap-3", "cursor-default select-none", "transition-colors duration-200 ease-out", "focus-visible:outline-none focus-visible:shadow-(--focus-glow)", "data-[highlighted]:bg-[var(--dropdown-item-hover)]", item.danger ? "text-[var(--alert-danger-text)] data-[highlighted]:text-[var(--alert-danger-text)]" : "text-[var(--dropdown-item-text)]"),
5064
- role: "menuitem",
5065
- children: [item.icon && /* @__PURE__ */ jsx(item.icon, { className: cn(ICON_SIZES.md, "transition-colors duration-200 ease-out shrink-0", item.danger ? "text-[var(--alert-danger-text)]" : "text-[var(--dropdown-icon)] group-data-[highlighted]:text-[var(--dropdown-icon-hover)]") }), /* @__PURE__ */ jsx("span", {
5183
+ children: items.map((item, idx) => item.divider ? /* @__PURE__ */ jsx(DropdownMenuGlassSeparator, {}, `divider-${idx}`) : /* @__PURE__ */ jsxs(DropdownMenuGlassItem, {
5184
+ variant: item.danger ? "destructive" : "default",
5185
+ onSelect: item.onClick,
5186
+ children: [item.icon && /* @__PURE__ */ jsx(item.icon, { className: cn(ICON_SIZES.md, "shrink-0", item.danger ? "text-(--alert-danger-text)" : "text-(--dropdown-icon) group-data-highlighted:text-(--dropdown-icon-hover)") }), /* @__PURE__ */ jsx("span", {
5066
5187
  className: "font-medium",
5067
5188
  children: item.label
5068
5189
  })]
5069
5190
  }, `item-${idx}`))
5070
- }) })] })
5191
+ })] })
5071
5192
  });
5072
5193
  });
5073
5194
  DropdownGlass.displayName = "DropdownGlass";
@@ -5485,7 +5606,10 @@ const NotificationGlass = forwardRef(({ variant: variantProp, type: typeProp, ti
5485
5606
  });
5486
5607
  });
5487
5608
  NotificationGlass.displayName = "NotificationGlass";
5488
- const PopoverGlass = React.forwardRef(({ trigger, children, side = "bottom", align = "center", sideOffset = 8, open, onOpenChange, showArrow = true, className }, ref) => {
5609
+ var PopoverGlassRoot = Root2;
5610
+ var PopoverGlassTrigger = Trigger;
5611
+ var PopoverGlassAnchor = Anchor2;
5612
+ var PopoverGlassContent = React.forwardRef(({ className, align = "center", sideOffset = 8, showArrow = true, children, ...props }, ref) => {
5489
5613
  const popoverStyles = {
5490
5614
  background: "var(--popover-bg)",
5491
5615
  border: "1px solid var(--popover-border)",
@@ -5494,31 +5618,42 @@ const PopoverGlass = React.forwardRef(({ trigger, children, side = "bottom", ali
5494
5618
  WebkitBackdropFilter: "blur(var(--blur-md))"
5495
5619
  };
5496
5620
  const arrowStyles = { fill: "var(--popover-arrow-bg)" };
5497
- return /* @__PURE__ */ jsxs(Root2, {
5621
+ return /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsxs(Content2, {
5622
+ ref,
5623
+ align,
5624
+ sideOffset,
5625
+ className: cn("z-50003 rounded-2xl", "animate-in fade-in-0 zoom-in-95 duration-200", "data-[side=bottom]:slide-in-from-top-2", "data-[side=top]:slide-in-from-bottom-2", "data-[side=right]:slide-in-from-left-2", "data-[side=left]:slide-in-from-right-2", "outline-none", className),
5626
+ style: popoverStyles,
5627
+ ...props,
5628
+ children: [children, showArrow && /* @__PURE__ */ jsx(Arrow2, {
5629
+ className: "fill-current",
5630
+ style: arrowStyles,
5631
+ width: 16,
5632
+ height: 8
5633
+ })]
5634
+ }) });
5635
+ });
5636
+ PopoverGlassContent.displayName = "PopoverGlassContent";
5637
+ var PopoverGlassLegacy = React.forwardRef(({ trigger, children, side = "bottom", align = "center", sideOffset = 8, open, onOpenChange, showArrow = true, className }, ref) => {
5638
+ return /* @__PURE__ */ jsxs(PopoverGlassRoot, {
5498
5639
  open,
5499
5640
  onOpenChange,
5500
- children: [/* @__PURE__ */ jsx(Trigger, {
5641
+ children: [/* @__PURE__ */ jsx(PopoverGlassTrigger, {
5501
5642
  asChild: true,
5502
5643
  children: trigger
5503
- }), /* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsxs(Content2, {
5644
+ }), /* @__PURE__ */ jsx(PopoverGlassContent, {
5504
5645
  ref,
5505
5646
  side,
5506
5647
  align,
5507
5648
  sideOffset,
5508
- className: cn("z-[50003] rounded-2xl", "animate-in fade-in-0 zoom-in-95 duration-200", "data-[side=bottom]:slide-in-from-top-2", "data-[side=top]:slide-in-from-bottom-2", "data-[side=right]:slide-in-from-left-2", "data-[side=left]:slide-in-from-right-2", "outline-none", className),
5509
- style: popoverStyles,
5510
- role: "dialog",
5511
- "aria-modal": "false",
5512
- children: [children, showArrow && /* @__PURE__ */ jsx(Arrow2, {
5513
- className: "fill-current",
5514
- style: arrowStyles,
5515
- width: 16,
5516
- height: 8
5517
- })]
5518
- }) })]
5649
+ showArrow,
5650
+ className,
5651
+ children
5652
+ })]
5519
5653
  });
5520
5654
  });
5521
- PopoverGlass.displayName = "PopoverGlass";
5655
+ PopoverGlassLegacy.displayName = "PopoverGlassLegacy";
5656
+ const PopoverGlass = PopoverGlassRoot;
5522
5657
  const skeletonVariants = cva("overflow-hidden", {
5523
5658
  variants: { variant: {
5524
5659
  text: "h-3 md:h-4 rounded",
@@ -5804,42 +5939,42 @@ const ToggleGlass = forwardRef(({ className, size: size$3 = "md", checked, onCha
5804
5939
  return toggle;
5805
5940
  });
5806
5941
  ToggleGlass.displayName = "ToggleGlass";
5807
- const tooltipPositions = cva("absolute z-50 px-2 py-1 md:px-3 md:py-1.5 rounded-lg text-[10px] md:text-xs font-medium whitespace-nowrap transition-opacity duration-200", {
5808
- variants: { position: {
5809
- top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
5810
- bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
5811
- left: "right-full top-1/2 -translate-y-1/2 mr-2",
5812
- right: "left-full top-1/2 -translate-y-1/2 ml-2"
5813
- } },
5814
- defaultVariants: { position: "top" }
5815
- });
5816
- const TooltipGlass = forwardRef(({ children, content, position = "top", className }, ref) => {
5817
- const { isHovered, hoverProps } = useHover();
5818
- const tooltipId = useId();
5819
- const tooltipStyles = {
5820
- background: "var(--tooltip-bg)",
5821
- color: "var(--tooltip-text)",
5822
- border: "1px solid var(--tooltip-border)",
5823
- boxShadow: "var(--tooltip-shadow)",
5824
- backdropFilter: "blur(var(--blur-xl))",
5825
- WebkitBackdropFilter: "blur(var(--blur-xl))"
5826
- };
5827
- return /* @__PURE__ */ jsxs("div", {
5828
- ref,
5829
- className: cn("relative inline-flex", className),
5830
- onMouseEnter: hoverProps.onMouseEnter,
5831
- onMouseLeave: hoverProps.onMouseLeave,
5832
- "aria-describedby": isHovered ? tooltipId : void 0,
5833
- children: [children, isHovered && /* @__PURE__ */ jsx("div", {
5834
- id: tooltipId,
5835
- className: cn(tooltipPositions({ position })),
5836
- style: tooltipStyles,
5837
- role: "tooltip",
5838
- children: content
5839
- })]
5942
+ var TooltipGlassProvider = ({ delayDuration = 0, ...props }) => {
5943
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
5944
+ delayDuration,
5945
+ ...props
5840
5946
  });
5947
+ };
5948
+ var TooltipGlassRoot = TooltipPrimitive.Root;
5949
+ var TooltipGlassTrigger = TooltipPrimitive.Trigger;
5950
+ var TooltipGlassContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => {
5951
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
5952
+ ref,
5953
+ sideOffset,
5954
+ className: cn("z-50 overflow-hidden rounded-md px-3 py-1.5 text-xs text-balance", "animate-in fade-in-0 zoom-in-95", "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95", "data-[side=bottom]:slide-in-from-top-2", "data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2", "data-[side=top]:slide-in-from-bottom-2", className),
5955
+ style: {
5956
+ background: "var(--tooltip-bg)",
5957
+ color: "var(--tooltip-text)",
5958
+ border: "1px solid var(--tooltip-border)",
5959
+ boxShadow: "var(--tooltip-shadow)",
5960
+ backdropFilter: "blur(var(--blur-xl))",
5961
+ WebkitBackdropFilter: "blur(var(--blur-xl))"
5962
+ },
5963
+ ...props
5964
+ }) });
5841
5965
  });
5842
- TooltipGlass.displayName = "TooltipGlass";
5966
+ TooltipGlassContent.displayName = "TooltipGlassContent";
5967
+ var TooltipGlassSimple = ({ content, children, side = "top", className }) => {
5968
+ return /* @__PURE__ */ jsxs(TooltipGlassRoot, { children: [/* @__PURE__ */ jsx(TooltipGlassTrigger, {
5969
+ asChild: true,
5970
+ children
5971
+ }), /* @__PURE__ */ jsx(TooltipGlassContent, {
5972
+ side,
5973
+ className,
5974
+ children: content
5975
+ })] });
5976
+ };
5977
+ const TooltipGlass = TooltipGlassRoot;
5843
5978
  const ExpandableHeaderGlass = forwardRef(({ title, icon: Icon, iconColor = "var(--text-accent)", expanded, onToggle, className, ...props }, ref) => {
5844
5979
  const textStyles = { color: "var(--text-primary)" };
5845
5980
  const chevronStyles = { color: "var(--text-muted)" };
@@ -6112,127 +6247,59 @@ var fieldLabels = {
6112
6247
  name: "Name",
6113
6248
  contribution: "Contribution"
6114
6249
  };
6115
- const SortDropdownGlass = forwardRef(({ sortBy: sortBy$5, sortOrder, onSortChange, options: options$1 = [
6250
+ const SortDropdownGlass = React.forwardRef(({ sortBy: sortBy$5, sortOrder, onSortChange, options: options$1 = [
6116
6251
  "commits",
6117
6252
  "stars",
6118
6253
  "name",
6119
6254
  "contribution"
6120
6255
  ], compact = false, className, ...props }, ref) => {
6121
- const [isOpen, setIsOpen] = useState(false);
6122
- const internalRef = useRef(null);
6123
- useEffect(() => {
6124
- if (!isOpen) return;
6125
- const handleClickOutside = (event) => {
6126
- if (internalRef.current && !internalRef.current.contains(event.target)) setIsOpen(false);
6127
- };
6128
- const handleEscape = (event) => {
6129
- if (event.key === "Escape") setIsOpen(false);
6130
- };
6131
- document.addEventListener("mousedown", handleClickOutside);
6132
- document.addEventListener("keydown", handleEscape);
6133
- return () => {
6134
- document.removeEventListener("mousedown", handleClickOutside);
6135
- document.removeEventListener("keydown", handleEscape);
6136
- };
6137
- }, [isOpen]);
6138
- const handleToggle = useCallback(() => {
6139
- setIsOpen((prev) => !prev);
6140
- }, []);
6141
- const handleFieldSelect = useCallback((field) => {
6256
+ const handleFieldSelect = React.useCallback((field) => {
6142
6257
  if (field === sortBy$5) onSortChange(field, sortOrder === "asc" ? "desc" : "asc");
6143
6258
  else onSortChange(field, "desc");
6144
- setIsOpen(false);
6145
6259
  }, [
6146
6260
  sortBy$5,
6147
6261
  sortOrder,
6148
6262
  onSortChange
6149
6263
  ]);
6150
- const handleKeyDown = (e$1) => {
6151
- if (e$1.key === "Enter" || e$1.key === " ") {
6152
- e$1.preventDefault();
6153
- handleToggle();
6154
- }
6155
- };
6156
- const buttonStyles = useMemo(() => ({
6157
- background: "var(--segmented-container-bg)",
6158
- border: "1px solid var(--segmented-container-border)",
6159
- color: "var(--text-primary)"
6160
- }), []);
6161
- const dropdownStyles = useMemo(() => ({
6162
- ...getDropdownContentStyles(),
6163
- animation: "dropdownFadeIn 0.2s ease-out"
6164
- }), []);
6165
6264
  const SortIcon = sortOrder === "asc" ? ArrowUp : ArrowDown;
6166
- return /* @__PURE__ */ jsxs("div", {
6167
- ref: (node) => {
6168
- internalRef.current = node;
6169
- if (typeof ref === "function") ref(node);
6170
- else if (ref) ref.current = node;
6171
- },
6265
+ return /* @__PURE__ */ jsx("div", {
6266
+ ref,
6172
6267
  className: cn("relative inline-block", className),
6173
- style: { zIndex: isOpen ? 5e4 : "auto" },
6174
6268
  ...props,
6175
- children: [/* @__PURE__ */ jsx("button", {
6176
- type: "button",
6177
- onClick: handleToggle,
6178
- onKeyDown: handleKeyDown,
6179
- className: cn("flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-xs font-medium transition-all duration-200", "hover:opacity-80 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", "sm:gap-2 sm:px-4 sm:py-2 sm:text-sm"),
6180
- style: buttonStyles,
6181
- "aria-expanded": isOpen,
6182
- "aria-haspopup": "listbox",
6183
- children: compact ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: "Sort" }), /* @__PURE__ */ jsx(SortIcon, {
6184
- className: ICON_SIZES.sm,
6185
- style: { color: "var(--text-accent)" }
6186
- })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
6187
- /* @__PURE__ */ jsx("span", {
6188
- className: "hidden sm:inline",
6189
- style: { color: "var(--text-muted)" },
6190
- children: "Sort:"
6191
- }),
6192
- /* @__PURE__ */ jsx("span", { children: fieldLabels[sortBy$5] }),
6193
- /* @__PURE__ */ jsx(SortIcon, {
6194
- className: ICON_SIZES.sm,
6195
- style: { color: "var(--text-accent)" }
6196
- }),
6197
- /* @__PURE__ */ jsx(ChevronDown, {
6198
- className: cn(ICON_SIZES.sm, "transition-transform duration-200", isOpen && "rotate-180"),
6199
- style: { color: "var(--text-muted)" }
6200
- })
6201
- ] })
6202
- }), isOpen && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
6203
- className: "fixed inset-0",
6204
- style: { zIndex: 50001 },
6205
- onClick: () => setIsOpen(false)
6206
- }), /* @__PURE__ */ jsx("div", {
6207
- className: "absolute left-0 mt-2 min-w-[140px] py-1.5 rounded-xl overflow-hidden",
6208
- style: {
6209
- ...dropdownStyles,
6210
- zIndex: 50002
6211
- },
6212
- role: "listbox",
6269
+ children: /* @__PURE__ */ jsxs(DropdownMenuGlass, { children: [/* @__PURE__ */ jsx(DropdownMenuGlassTrigger, {
6270
+ asChild: true,
6271
+ children: /* @__PURE__ */ jsx("button", {
6272
+ type: "button",
6273
+ className: cn("flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-xs font-medium", "sm:gap-2 sm:px-4 sm:py-2 sm:text-sm", "bg-(--dropdown-bg) border border-(--dropdown-border)", "backdrop-blur-md", "transition-all duration-200", "hover:opacity-90 hover:shadow-(--dropdown-glow)", "focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2", "focus-visible:ring-(--text-accent)", "text-(--dropdown-item-text)"),
6274
+ "aria-haspopup": "menu",
6275
+ children: compact ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", { children: "Sort" }), /* @__PURE__ */ jsx(SortIcon, { className: cn(ICON_SIZES.sm, "text-(--text-accent)") })] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
6276
+ /* @__PURE__ */ jsx("span", {
6277
+ className: "hidden sm:inline text-(--text-muted)",
6278
+ children: "Sort:"
6279
+ }),
6280
+ /* @__PURE__ */ jsx("span", { children: fieldLabels[sortBy$5] }),
6281
+ /* @__PURE__ */ jsx(SortIcon, { className: cn(ICON_SIZES.sm, "text-(--text-accent)") }),
6282
+ /* @__PURE__ */ jsx(ChevronDown, { className: cn(ICON_SIZES.sm, "text-(--text-muted)", "transition-transform duration-200", "group-data-[state=open]:rotate-180") })
6283
+ ] })
6284
+ })
6285
+ }), /* @__PURE__ */ jsx(DropdownMenuGlassContent, {
6286
+ align: "start",
6213
6287
  "aria-label": "Sort options",
6214
6288
  children: options$1.map((field) => {
6215
6289
  const isSelected = field === sortBy$5;
6216
- return /* @__PURE__ */ jsxs("button", {
6217
- type: "button",
6218
- onClick: () => handleFieldSelect(field),
6219
- className: cn("w-full px-3 py-2 text-xs sm:text-sm text-left flex items-center justify-between gap-2", "transition-colors duration-150 hover:bg-white/5"),
6220
- style: {
6221
- color: isSelected ? "var(--text-accent)" : "var(--text-primary)",
6222
- background: isSelected ? "var(--dropdown-item-hover)" : "transparent"
6223
- },
6224
- role: "option",
6225
- "aria-selected": isSelected,
6290
+ return /* @__PURE__ */ jsxs(DropdownMenuGlassItem, {
6291
+ onSelect: () => handleFieldSelect(field),
6292
+ className: cn("justify-between", isSelected && "bg-(--select-item-selected-bg)"),
6226
6293
  children: [/* @__PURE__ */ jsx("span", {
6227
6294
  className: "font-medium",
6228
6295
  children: fieldLabels[field]
6229
6296
  }), isSelected && /* @__PURE__ */ jsxs("div", {
6230
- className: "flex items-center gap-1",
6297
+ className: "flex items-center gap-1 text-(--text-accent)",
6231
6298
  children: [sortOrder === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: ICON_SIZES.sm }) : /* @__PURE__ */ jsx(ArrowDown, { className: ICON_SIZES.sm }), /* @__PURE__ */ jsx(Check, { className: ICON_SIZES.sm })]
6232
6299
  })]
6233
6300
  }, field);
6234
6301
  })
6235
- })] })]
6302
+ })] })
6236
6303
  });
6237
6304
  });
6238
6305
  SortDropdownGlass.displayName = "SortDropdownGlass";
@@ -6356,7 +6423,7 @@ const BaseProgressGlass = forwardRef(({ value = 0, max: max$2 = 100, className,
6356
6423
  });
6357
6424
  });
6358
6425
  BaseProgressGlass.displayName = "BaseProgressGlass";
6359
- var sizeClasses$2 = {
6426
+ var sizeClasses$1 = {
6360
6427
  normal: "w-2 h-2 md:w-2.5 md:h-2.5",
6361
6428
  large: "w-3.5 h-3.5 md:w-4 md:h-4"
6362
6429
  };
@@ -6365,7 +6432,7 @@ var statusSymbols = {
6365
6432
  yellow: "!",
6366
6433
  red: "✕"
6367
6434
  };
6368
- var statusVarMap$1 = {
6435
+ var statusVarMap = {
6369
6436
  green: {
6370
6437
  bg: "var(--status-online)",
6371
6438
  glow: "var(--status-online-glow)"
@@ -6380,14 +6447,14 @@ var statusVarMap$1 = {
6380
6447
  }
6381
6448
  };
6382
6449
  const StatusIndicatorGlass = forwardRef(({ type = "green", size: size$3 = "normal", className, ...props }, ref) => {
6383
- const colors = statusVarMap$1[type];
6450
+ const colors = statusVarMap[type];
6384
6451
  const indicatorStyles = {
6385
6452
  backgroundColor: colors.bg,
6386
6453
  boxShadow: colors.glow
6387
6454
  };
6388
6455
  return /* @__PURE__ */ jsx("div", {
6389
6456
  ref,
6390
- className: cn("rounded-full flex items-center justify-center", sizeClasses$2[size$3], className),
6457
+ className: cn("rounded-full flex items-center justify-center", sizeClasses$1[size$3], className),
6391
6458
  style: indicatorStyles,
6392
6459
  role: "status",
6393
6460
  "aria-label": `Status: ${type}`,
@@ -6441,16 +6508,16 @@ const FlagAlertGlass = forwardRef(({ type = "warning", title, description, class
6441
6508
  });
6442
6509
  FlagAlertGlass.displayName = "FlagAlertGlass";
6443
6510
  var defaultLangColors = {
6444
- TypeScript: "bg-blue-500",
6445
- JavaScript: "bg-yellow-400",
6446
- Python: "bg-emerald-500",
6447
- HTML: "bg-orange-500",
6448
- CSS: "bg-purple-500",
6449
- Java: "bg-red-500",
6450
- Go: "bg-cyan-500",
6451
- Rust: "bg-orange-600",
6452
- Ruby: "bg-red-600",
6453
- PHP: "bg-indigo-500"
6511
+ TypeScript: "var(--language-typescript)",
6512
+ JavaScript: "var(--language-javascript)",
6513
+ Python: "var(--language-python)",
6514
+ HTML: "var(--language-html)",
6515
+ CSS: "var(--language-css)",
6516
+ Java: "var(--language-java)",
6517
+ Go: "var(--language-go)",
6518
+ Rust: "var(--language-rust)",
6519
+ Ruby: "var(--language-ruby)",
6520
+ PHP: "var(--language-php)"
6454
6521
  };
6455
6522
  const LanguageBarGlass = forwardRef(({ languages = [], showLegend = true, className, ...props }, ref) => {
6456
6523
  const [hoveredLang, setHoveredLang] = useState(null);
@@ -6466,15 +6533,14 @@ const LanguageBarGlass = forwardRef(({ languages = [], showLegend = true, classN
6466
6533
  role: "group",
6467
6534
  "aria-label": "Language distribution",
6468
6535
  children: languages.map((lang, i) => {
6469
- const colorClass = lang.color ?? defaultLangColors[lang.name] ?? "bg-slate-400";
6470
- const segmentStyles = {
6471
- width: `${lang.percent}%`,
6472
- opacity: hoveredLang !== null && hoveredLang !== i ? .5 : 1,
6473
- transition: "all 0.3s"
6474
- };
6536
+ const bgColor = lang.color ?? defaultLangColors[lang.name] ?? "var(--oklch-slate-400)";
6475
6537
  return /* @__PURE__ */ jsx("div", {
6476
- className: cn(colorClass),
6477
- style: segmentStyles,
6538
+ style: {
6539
+ width: `${lang.percent}%`,
6540
+ backgroundColor: bgColor,
6541
+ opacity: hoveredLang !== null && hoveredLang !== i ? .5 : 1,
6542
+ transition: "all 0.3s"
6543
+ },
6478
6544
  role: "progressbar",
6479
6545
  "aria-label": `${lang.name}: ${lang.percent}%`,
6480
6546
  "aria-valuenow": lang.percent,
@@ -6492,7 +6558,10 @@ const LanguageBarGlass = forwardRef(({ languages = [], showLegend = true, classN
6492
6558
  onMouseEnter: () => setHoveredLang(i),
6493
6559
  onMouseLeave: () => setHoveredLang(null),
6494
6560
  children: [
6495
- /* @__PURE__ */ jsx("span", { className: cn("w-2 h-2 md:w-2.5 md:h-2.5 rounded-full", lang.color ?? defaultLangColors[lang.name] ?? "bg-slate-400") }),
6561
+ /* @__PURE__ */ jsx("span", {
6562
+ className: "w-2 h-2 md:w-2.5 md:h-2.5 rounded-full",
6563
+ style: { backgroundColor: lang.color ?? defaultLangColors[lang.name] ?? "var(--oklch-slate-400)" }
6564
+ }),
6496
6565
  lang.name,
6497
6566
  " ",
6498
6567
  lang.percent,
@@ -6504,54 +6573,57 @@ const LanguageBarGlass = forwardRef(({ languages = [], showLegend = true, classN
6504
6573
  });
6505
6574
  });
6506
6575
  LanguageBarGlass.displayName = "LanguageBarGlass";
6507
- var sizeClasses$1 = {
6576
+ var profileSizeClasses = {
6508
6577
  sm: "w-9 h-9 md:w-10 md:h-10 text-xs md:text-sm",
6509
6578
  md: "w-12 h-12 md:w-14 md:h-14 text-base md:text-lg",
6510
6579
  lg: "w-14 h-14 md:w-16 md:h-16 text-lg md:text-xl",
6511
6580
  xl: "w-18 h-18 md:w-20 md:h-20 text-xl md:text-2xl"
6512
6581
  };
6513
- var statusSizeClasses = {
6514
- sm: "w-2.5 h-2.5 md:w-3 md:h-3",
6515
- md: "w-3 h-3 md:w-3.5 md:h-3.5",
6516
- lg: "w-3.5 h-3.5 md:w-4 md:h-4",
6517
- xl: "w-4 h-4 md:w-5 md:h-5"
6518
- };
6519
- var statusPositionClasses = {
6520
- sm: "bottom-0 right-0",
6521
- md: "bottom-0 right-0",
6522
- lg: "-bottom-0.5 -right-0.5",
6523
- xl: "-bottom-1 -right-1"
6524
- };
6525
- var statusVarMap = {
6526
- online: "var(--status-online)",
6527
- offline: "var(--text-muted)",
6528
- busy: "var(--status-busy)",
6529
- away: "var(--status-away)"
6582
+ var getStatusVars = (statusType) => {
6583
+ return {
6584
+ online: {
6585
+ bg: "var(--status-online)",
6586
+ glow: "var(--status-online-glow)"
6587
+ },
6588
+ offline: {
6589
+ bg: "var(--status-offline)",
6590
+ glow: "none"
6591
+ },
6592
+ busy: {
6593
+ bg: "var(--status-busy)",
6594
+ glow: "var(--status-busy-glow)"
6595
+ },
6596
+ away: {
6597
+ bg: "var(--status-away)",
6598
+ glow: "var(--status-away-glow)"
6599
+ }
6600
+ }[statusType];
6530
6601
  };
6531
6602
  const ProfileAvatarGlass = forwardRef(({ initials, size: size$3 = "lg", status, glowing = true, className, ...props }, ref) => {
6532
- const [isHovered, setIsHovered] = useState(false);
6603
+ const { isHovered, hoverProps } = useHover();
6533
6604
  const avatarStyles = {
6534
- boxShadow: isHovered ? "var(--profile-avatar-glow)" : "none",
6535
- border: "3px solid var(--profile-avatar-border)"
6605
+ background: "var(--avatar-bg)",
6606
+ border: "3px solid var(--avatar-border)",
6607
+ boxShadow: isHovered ? "var(--avatar-hover-glow)" : "var(--avatar-shadow)",
6608
+ color: "var(--text-inverse)"
6536
6609
  };
6537
6610
  return /* @__PURE__ */ jsxs("div", {
6538
6611
  ref,
6539
6612
  className: cn("relative inline-flex", className),
6540
- onMouseEnter: () => setIsHovered(true),
6541
- onMouseLeave: () => setIsHovered(false),
6613
+ onMouseEnter: hoverProps.onMouseEnter,
6614
+ onMouseLeave: hoverProps.onMouseLeave,
6542
6615
  ...props,
6543
6616
  children: [/* @__PURE__ */ jsx("div", {
6544
- className: cn("rounded-full bg-gradient-to-br from-blue-400 via-violet-500 to-indigo-500", "flex items-center justify-center text-white font-bold transition-all duration-300", sizeClasses$1[size$3], glowing && "animate-[glow-pulse_2s_ease-in-out_infinite]"),
6617
+ className: cn("rounded-full flex items-center justify-center font-bold transition-all duration-300", profileSizeClasses[size$3], glowing && "animate-[glow-pulse_2s_ease-in-out_infinite]"),
6545
6618
  style: avatarStyles,
6546
6619
  role: "img",
6547
6620
  "aria-label": `Profile avatar with initials ${initials}`,
6548
6621
  children: initials
6549
6622
  }), status && /* @__PURE__ */ jsx("span", {
6550
- className: cn("absolute rounded-full", statusPositionClasses[size$3], statusSizeClasses[size$3]),
6623
+ className: cn(statusSizes({ size: size$3 }), "absolute -bottom-0.5 -right-0.5"),
6551
6624
  style: {
6552
- background: statusVarMap[status],
6553
- border: "none",
6554
- boxShadow: "none"
6625
+ background: getStatusVars(status).bg,
6626
+ boxShadow: getStatusVars(status).glow
6555
6627
  },
6556
6628
  role: "status",
6557
6629
  "aria-label": `Status: ${status}`
@@ -6646,7 +6718,7 @@ const RainbowProgressGlass = forwardRef(({ value, size: size$3 = "lg", showGlow
6646
6718
  const trackStyles = { background: "var(--progress-bg)" };
6647
6719
  const fillStyles = {
6648
6720
  width: `${clampedValue}%`,
6649
- background: "linear-gradient(90deg, #f59e0b, #fbbf24, #84cc16, #22c55e, #14b8a6, #06b6d4, #3b82f6)",
6721
+ background: "var(--rainbow-gradient)",
6650
6722
  boxShadow: showGlow ? "var(--rainbow-glow)" : "none",
6651
6723
  animation: showGlow ? "var(--rainbow-animation)" : "none"
6652
6724
  };
@@ -26144,7 +26216,8 @@ const TrustScoreDisplayGlass = forwardRef(({ score, maxScore = 100, title = "Ove
26144
26216
  }), /* @__PURE__ */ jsxs("div", {
26145
26217
  className: "flex items-center gap-2 animate-[score-pulse_2s_ease-in-out_infinite]",
26146
26218
  children: [/* @__PURE__ */ jsx("span", {
26147
- className: cn(sizes.score, "font-bold bg-linear-to-r from-amber-400 via-emerald-400 to-cyan-400 bg-clip-text text-transparent"),
26219
+ className: cn(sizes.score, "font-bold bg-clip-text text-transparent"),
26220
+ style: { backgroundImage: "var(--score-gradient)" },
26148
26221
  children: score
26149
26222
  }), /* @__PURE__ */ jsxs("span", {
26150
26223
  className: sizes.max,
@@ -26864,7 +26937,8 @@ const TrustScoreCardGlass = forwardRef(({ score = 72, metrics = [], className, .
26864
26937
  }), /* @__PURE__ */ jsxs("div", {
26865
26938
  className: "flex items-center gap-1.5 md:gap-2 animate-[score-pulse_2s_ease-in-out_infinite]",
26866
26939
  children: [/* @__PURE__ */ jsx("span", {
26867
- className: "text-3xl md:text-4xl font-bold bg-linear-to-r from-amber-400 via-emerald-400 to-cyan-400 bg-clip-text text-transparent",
26940
+ className: "text-3xl md:text-4xl font-bold bg-clip-text text-transparent",
26941
+ style: { backgroundImage: "var(--score-gradient)" },
26868
26942
  children: score
26869
26943
  }), /* @__PURE__ */ jsx("span", {
26870
26944
  className: "text-lg md:text-xl",
@@ -26890,6 +26964,6 @@ const TrustScoreCardGlass = forwardRef(({ score = 72, metrics = [], className, .
26890
26964
  });
26891
26965
  });
26892
26966
  TrustScoreCardGlass.displayName = "TrustScoreCardGlass";
26893
- export { BaseProgressGlass as $, useChartHeight as A, ButtonGlass as At, adaptEventsOfChild as B, TouchTarget as Bt, sparklineContainerVariants as C, GlassCard as Ct, Tooltip as D, inputVariants as Dt, Cell as E, ComboBoxGlass as Et, selectLegendPayload as F, avatarSizes as Ft, SegmentedControlGlass as G, isNumber as H, useAppDispatch as I, statusSizes as It, progressSizes as J, RainbowProgressGlass as K, useAppSelector as L, AlertGlass as Lt, useMargin as M, BadgeGlass as Mt, ResponsiveContainer as N, badgeVariants as Nt, setLegendSettings as O, CircularProgressGlass as Ot, useElementOffset as P, AvatarGlass as Pt, StatusIndicatorGlass as Q, getUniqPayload as R, InteractiveCard as Rt, sparklineBarVariants as S, InputGlass as St, Bar as T, DropdownGlass as Tt, useLegendPortal as U, Symbols as V, alertVariants as Vt, Surface as W, LanguageBarGlass as X, ProfileAvatarGlass as Y, FlagAlertGlass as Z, ContributionMetricsGlass as _, PopoverGlass as _t, HeaderBrandingGlass as a, insightCardVariants as at, AICardGlass as b, ModalGlass as bt, YearCardGlass as c, ExpandableHeaderGlass as ct, TrustScoreDisplayGlass as d, ToggleGlass as dt, ThemeToggleGlass as et, RepositoryMetadataGlass as f, toggleSizes as ft, MetricCardGlass as g, skeletonVariants as gt, MetricsGridGlass as h, SkeletonGlass as ht, HeaderNavGlass as i, InsightCardGlass as it, useChartWidth as j, buttonGlassVariants as jt, setLegendSize as k, CheckboxGlass as kt, UserStatsLineGlass as l, TooltipGlass as lt, RepositoryCardGlass as m, SliderGlass as mt, ProjectsListGlass as n, SortDropdownGlass as nt, FlagsSectionGlass as o, insightVariantConfig as ot, RepositoryHeaderGlass as p, TabsGlass as pt, ProgressGlass as q, ProfileHeaderGlass as r, SearchBoxGlass as rt, CareerStatsGlass as s, IconButtonGlass as st, TrustScoreCardGlass as t, StatItemGlass as tt, UserInfoGlass as u, tooltipPositions as ut, CircularMetricGlass as v, NotificationGlass as vt, BarChart as w, cardIntensity as wt, SparklineGlass as x, modalSizes as xt, CareerStatsHeaderGlass as y, notificationVariants as yt, resolveDefaultProps as z, FormFieldWrapper as zt };
26967
+ export { BaseProgressGlass as $, buttonGlassVariants as $t, useChartHeight as A, GlassCard as At, adaptEventsOfChild as B, DropdownMenuGlassRadioGroup as Bt, sparklineContainerVariants as C, PopoverGlassLegacy as Ct, Tooltip as D, ModalGlass as Dt, Cell as E, notificationVariants as Et, selectLegendPayload as F, DropdownMenuGlassContent as Ft, SegmentedControlGlass as G, DropdownMenuGlassSubContent as Gt, isNumber as H, DropdownMenuGlassSeparator as Ht, useAppDispatch as I, DropdownMenuGlassGroup as It, progressSizes as J, ComboBoxGlass as Jt, RainbowProgressGlass as K, DropdownMenuGlassSubTrigger as Kt, useAppSelector as L, DropdownMenuGlassItem as Lt, useMargin as M, DropdownGlass as Mt, ResponsiveContainer as N, DropdownMenuGlass as Nt, setLegendSettings as O, modalSizes as Ot, useElementOffset as P, DropdownMenuGlassCheckboxItem as Pt, StatusIndicatorGlass as Q, ButtonGlass as Qt, getUniqPayload as R, DropdownMenuGlassLabel as Rt, sparklineBarVariants as S, PopoverGlassContent as St, Bar as T, NotificationGlass as Tt, useLegendPortal as U, DropdownMenuGlassShortcut as Ut, Symbols as V, DropdownMenuGlassRadioItem as Vt, Surface as W, DropdownMenuGlassSub as Wt, LanguageBarGlass as X, CircularProgressGlass as Xt, ProfileAvatarGlass as Y, inputVariants as Yt, FlagAlertGlass as Z, CheckboxGlass as Zt, ContributionMetricsGlass as _, SliderGlass as _t, HeaderBrandingGlass as a, AvatarGlassSimple as an, insightCardVariants as at, AICardGlass as b, PopoverGlass as bt, YearCardGlass as c, AlertGlass as cn, ExpandableHeaderGlass as ct, TrustScoreDisplayGlass as d, InteractiveCard as dn, TooltipGlassProvider as dt, BadgeGlass as en, ThemeToggleGlass as et, RepositoryMetadataGlass as f, FormFieldWrapper as fn, TooltipGlassSimple as ft, MetricCardGlass as g, TabsGlass as gt, MetricsGridGlass as h, toggleSizes as ht, HeaderNavGlass as i, AvatarGlassImage as in, InsightCardGlass as it, useChartWidth as j, cardIntensity as jt, setLegendSize as k, InputGlass as kt, UserStatsLineGlass as l, AlertGlassDescription as ln, TooltipGlass as lt, RepositoryCardGlass as m, alertVariants as mn, ToggleGlass as mt, ProjectsListGlass as n, AvatarGlass as nn, SortDropdownGlass as nt, FlagsSectionGlass as o, avatarSizes as on, insightVariantConfig as ot, RepositoryHeaderGlass as p, TouchTarget as pn, TooltipGlassTrigger as pt, ProgressGlass as q, DropdownMenuGlassTrigger as qt, ProfileHeaderGlass as r, AvatarGlassFallback as rn, SearchBoxGlass as rt, CareerStatsGlass as s, statusSizes as sn, IconButtonGlass as st, TrustScoreCardGlass as t, badgeVariants as tn, StatItemGlass as tt, UserInfoGlass as u, AlertGlassTitle as un, TooltipGlassContent as ut, CircularMetricGlass as v, SkeletonGlass as vt, BarChart as w, PopoverGlassTrigger as wt, SparklineGlass as x, PopoverGlassAnchor as xt, CareerStatsHeaderGlass as y, skeletonVariants as yt, resolveDefaultProps as z, DropdownMenuGlassPortal as zt };
26894
26968
 
26895
- //# sourceMappingURL=trust-score-card-glass-BcZbul0P.js.map
26969
+ //# sourceMappingURL=trust-score-card-glass-A7kas5OS.js.map