@sesionario/blocks 1.14.0 → 1.16.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/index.cjs CHANGED
@@ -957,6 +957,38 @@ function DropdownMenuItem({
957
957
  }
958
958
  );
959
959
  }
960
+ function DropdownMenuRadioGroup({
961
+ ...props
962
+ }) {
963
+ return /* @__PURE__ */ jsxRuntime.jsx(
964
+ DropdownMenuPrimitive__namespace.RadioGroup,
965
+ {
966
+ "data-slot": "dropdown-menu-radio-group",
967
+ ...props
968
+ }
969
+ );
970
+ }
971
+ function DropdownMenuRadioItem({
972
+ className,
973
+ children,
974
+ ...props
975
+ }) {
976
+ return /* @__PURE__ */ jsxRuntime.jsxs(
977
+ DropdownMenuPrimitive__namespace.RadioItem,
978
+ {
979
+ "data-slot": "dropdown-menu-radio-item",
980
+ className: cn(
981
+ "relative flex cursor-default select-none items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[highlighted]:[&_svg:not([class*='text-'])]:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
982
+ className
983
+ ),
984
+ ...props,
985
+ children: [
986
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CircleIcon, { className: "size-2 fill-current" }) }) }),
987
+ children
988
+ ]
989
+ }
990
+ );
991
+ }
960
992
  function DropdownMenuLabel({
961
993
  className,
962
994
  inset,
@@ -1004,6 +1036,50 @@ function DropdownMenuShortcut({
1004
1036
  }
1005
1037
  );
1006
1038
  }
1039
+ function DropdownMenuSub({
1040
+ ...props
1041
+ }) {
1042
+ return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
1043
+ }
1044
+ function DropdownMenuSubTrigger({
1045
+ className,
1046
+ inset,
1047
+ children,
1048
+ ...props
1049
+ }) {
1050
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1051
+ DropdownMenuPrimitive__namespace.SubTrigger,
1052
+ {
1053
+ "data-slot": "dropdown-menu-sub-trigger",
1054
+ "data-inset": inset,
1055
+ className: cn(
1056
+ "flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden data-[inset]:pl-8 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground data-[highlighted]:[&_svg:not([class*='text-'])]:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:[&_svg:not([class*='text-'])]:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:[&_svg:not([class*='text-'])]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
1057
+ className
1058
+ ),
1059
+ ...props,
1060
+ children: [
1061
+ children,
1062
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "ml-auto size-4" })
1063
+ ]
1064
+ }
1065
+ );
1066
+ }
1067
+ function DropdownMenuSubContent({
1068
+ className,
1069
+ ...props
1070
+ }) {
1071
+ return /* @__PURE__ */ jsxRuntime.jsx(
1072
+ DropdownMenuPrimitive__namespace.SubContent,
1073
+ {
1074
+ "data-slot": "dropdown-menu-sub-content",
1075
+ className: cn(
1076
+ "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg",
1077
+ className
1078
+ ),
1079
+ ...props
1080
+ }
1081
+ );
1082
+ }
1007
1083
  var defaultLabels = {
1008
1084
  theme: "Theme",
1009
1085
  system: "System",
@@ -1496,7 +1572,7 @@ function LanguageSwitcher({
1496
1572
  const sizes = sizeClasses2[size];
1497
1573
  const shapeClass = shapeClasses2[shape];
1498
1574
  const reduceMotion = framerMotion.useReducedMotion();
1499
- const defaultLabels5 = {
1575
+ const defaultLabels6 = {
1500
1576
  language: labels.language ?? "Language"
1501
1577
  };
1502
1578
  if (variant === "mini") {
@@ -1506,7 +1582,7 @@ function LanguageSwitcher({
1506
1582
  {
1507
1583
  variant: "ghost",
1508
1584
  size: "icon",
1509
- "aria-label": defaultLabels5.language,
1585
+ "aria-label": defaultLabels6.language,
1510
1586
  className: cn(sizes.buttonMini, shapeClass, className),
1511
1587
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Languages, { className: sizes.iconMini })
1512
1588
  }
@@ -1597,6 +1673,440 @@ function LanguageSwitcher({
1597
1673
  }
1598
1674
  );
1599
1675
  }
1676
+ var SCROLL_EDGE_EPSILON_PX = 1;
1677
+ function measureScrollEdges(el) {
1678
+ const { scrollLeft, scrollWidth, clientWidth } = el;
1679
+ return {
1680
+ canScrollLeft: scrollLeft > SCROLL_EDGE_EPSILON_PX,
1681
+ canScrollRight: scrollLeft + clientWidth < scrollWidth - SCROLL_EDGE_EPSILON_PX
1682
+ };
1683
+ }
1684
+ function useScrollFadeXEdges(enabled = true) {
1685
+ const scrollerRef = React7.useRef(null);
1686
+ const [edges, setEdges] = React7.useState({
1687
+ canScrollLeft: false,
1688
+ canScrollRight: false
1689
+ });
1690
+ React7.useEffect(() => {
1691
+ if (!enabled) {
1692
+ setEdges({ canScrollLeft: false, canScrollRight: false });
1693
+ return;
1694
+ }
1695
+ const el = scrollerRef.current;
1696
+ if (!el) return;
1697
+ function updateEdges() {
1698
+ const scroller = scrollerRef.current;
1699
+ if (!scroller) return;
1700
+ const next = measureScrollEdges(scroller);
1701
+ setEdges(
1702
+ (prev) => prev.canScrollLeft === next.canScrollLeft && prev.canScrollRight === next.canScrollRight ? prev : next
1703
+ );
1704
+ }
1705
+ updateEdges();
1706
+ el.addEventListener("scroll", updateEdges, { passive: true });
1707
+ const resizeObserver = new ResizeObserver(updateEdges);
1708
+ resizeObserver.observe(el);
1709
+ const mutationObserver = new MutationObserver(updateEdges);
1710
+ mutationObserver.observe(el, { childList: true, subtree: true });
1711
+ return () => {
1712
+ el.removeEventListener("scroll", updateEdges);
1713
+ resizeObserver.disconnect();
1714
+ mutationObserver.disconnect();
1715
+ };
1716
+ }, [enabled]);
1717
+ const fadeStyle = {
1718
+ "--scroll-fade-left": edges.canScrollLeft ? "transparent" : "#000",
1719
+ "--scroll-fade-right": edges.canScrollRight ? "transparent" : "#000"
1720
+ };
1721
+ return { scrollerRef, fadeStyle, edges };
1722
+ }
1723
+ function PlatformNavbar({
1724
+ logo,
1725
+ leading,
1726
+ center,
1727
+ right,
1728
+ className,
1729
+ innerClassName
1730
+ }) {
1731
+ const hasCenter = center != null && center !== false;
1732
+ const { scrollerRef, fadeStyle } = useScrollFadeXEdges(hasCenter);
1733
+ return /* @__PURE__ */ jsxRuntime.jsx(
1734
+ "header",
1735
+ {
1736
+ className: cn(
1737
+ "sticky top-0 z-30 shrink-0 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",
1738
+ className
1739
+ ),
1740
+ "data-testid": "platform-navbar",
1741
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
1742
+ "div",
1743
+ {
1744
+ className: cn(
1745
+ "flex h-14 min-h-14 items-center gap-2 px-4 md:px-6",
1746
+ innerClassName
1747
+ ),
1748
+ children: [
1749
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: logo }),
1750
+ leading ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: leading }) : null,
1751
+ /* @__PURE__ */ jsxRuntime.jsx(
1752
+ "div",
1753
+ {
1754
+ ref: scrollerRef,
1755
+ className: "flex min-w-0 flex-1 items-center overflow-x-auto scroll-fade-x-edges scrollbar-none",
1756
+ style: fadeStyle,
1757
+ children: center
1758
+ }
1759
+ ),
1760
+ right ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex shrink-0 items-center gap-2", children: right }) : null
1761
+ ]
1762
+ }
1763
+ )
1764
+ }
1765
+ );
1766
+ }
1767
+ var LABELS = {
1768
+ verified: "M\xE9dico verificado",
1769
+ pending_review: "Verificaci\xF3n en revisi\xF3n"
1770
+ };
1771
+ var sizeClasses3 = {
1772
+ sm: {
1773
+ icon: "size-3.5",
1774
+ text: "text-xs",
1775
+ gap: "gap-1",
1776
+ padding: "px-1.5 py-0.5"
1777
+ },
1778
+ md: {
1779
+ icon: "size-4",
1780
+ text: "text-sm",
1781
+ gap: "gap-1.5",
1782
+ padding: "px-2 py-0.5"
1783
+ }
1784
+ };
1785
+ function VerifiedProfessionalBadge({
1786
+ status,
1787
+ size = "md",
1788
+ showLabel = false,
1789
+ className
1790
+ }) {
1791
+ if (status === "unverified" || status === "pending_review" && !showLabel) {
1792
+ return null;
1793
+ }
1794
+ const label = LABELS[status];
1795
+ const sizes = sizeClasses3[size];
1796
+ const Icon = status === "verified" ? lucideReact.BadgeCheck : lucideReact.Clock;
1797
+ const colorClass = status === "verified" ? "text-primary" : "text-muted-foreground";
1798
+ if (!showLabel) {
1799
+ return /* @__PURE__ */ jsxRuntime.jsx(
1800
+ Icon,
1801
+ {
1802
+ className: cn(sizes.icon, colorClass, className),
1803
+ "aria-label": label,
1804
+ children: /* @__PURE__ */ jsxRuntime.jsx("title", { children: label })
1805
+ }
1806
+ );
1807
+ }
1808
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1809
+ "span",
1810
+ {
1811
+ title: label,
1812
+ "aria-label": label,
1813
+ className: cn(
1814
+ "inline-flex w-fit items-center rounded-full font-medium",
1815
+ sizes.gap,
1816
+ sizes.text,
1817
+ sizes.padding,
1818
+ status === "verified" ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground",
1819
+ className
1820
+ ),
1821
+ children: [
1822
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: sizes.icon, "aria-hidden": "true" }),
1823
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
1824
+ ]
1825
+ }
1826
+ );
1827
+ }
1828
+ var defaultLabels3 = {
1829
+ accountMenu: "Account menu",
1830
+ settingsMenu: "Settings",
1831
+ personalProfile: "Personal profile",
1832
+ activity: "Activity",
1833
+ professionalProfile: "Professional profile",
1834
+ mainApp: "Main app",
1835
+ orgManagement: "Organization management",
1836
+ backoffice: "Backoffice",
1837
+ memberOrgs: "My organizations",
1838
+ managementOrgs: "Management team",
1839
+ language: "Language",
1840
+ theme: "Theme",
1841
+ themeLight: "Light",
1842
+ themeDark: "Dark",
1843
+ themeSystem: "System",
1844
+ signIn: "Sign in",
1845
+ signOut: "Sign out",
1846
+ signingOut: "Signing out\u2026",
1847
+ accountSettings: "Account settings"
1848
+ };
1849
+ function MenuAvatar({
1850
+ name,
1851
+ image,
1852
+ sizeClass
1853
+ }) {
1854
+ const initials = getInitials(name);
1855
+ return /* @__PURE__ */ jsxRuntime.jsx(
1856
+ "span",
1857
+ {
1858
+ className: cn(
1859
+ "relative flex shrink-0 overflow-hidden rounded-full",
1860
+ sizeClass
1861
+ ),
1862
+ children: image ? /* @__PURE__ */ jsxRuntime.jsx(
1863
+ "img",
1864
+ {
1865
+ src: image,
1866
+ alt: "",
1867
+ className: "aspect-square size-full object-cover"
1868
+ }
1869
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1870
+ "span",
1871
+ {
1872
+ className: "flex size-full items-center justify-center text-xs font-semibold",
1873
+ style: avatarFallbackStyle(name),
1874
+ children: initials
1875
+ }
1876
+ )
1877
+ }
1878
+ );
1879
+ }
1880
+ function LanguageThemeSubs({
1881
+ languages,
1882
+ currentLanguage,
1883
+ onLanguageChange,
1884
+ labels
1885
+ }) {
1886
+ const { theme, setTheme } = nextThemes.useTheme();
1887
+ const themeValue = theme ?? "system";
1888
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1889
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
1890
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
1891
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Languages, { className: "size-4" }),
1892
+ labels.language
1893
+ ] }),
1894
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { className: "min-w-40", children: /* @__PURE__ */ jsxRuntime.jsx(
1895
+ DropdownMenuRadioGroup,
1896
+ {
1897
+ value: currentLanguage,
1898
+ onValueChange: onLanguageChange,
1899
+ children: languages.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioItem, { value: lang.key, children: lang.nativeName }, lang.key))
1900
+ }
1901
+ ) })
1902
+ ] }),
1903
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
1904
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
1905
+ themeValue === "light" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "size-4" }) : themeValue === "dark" ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Moon, { className: "size-4" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Monitor, { className: "size-4" }),
1906
+ labels.theme
1907
+ ] }),
1908
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { className: "min-w-40", children: /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuRadioGroup, { value: themeValue, onValueChange: setTheme, children: [
1909
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioItem, { value: "system", children: labels.themeSystem }),
1910
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioItem, { value: "light", children: labels.themeLight }),
1911
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioItem, { value: "dark", children: labels.themeDark })
1912
+ ] }) })
1913
+ ] })
1914
+ ] });
1915
+ }
1916
+ function PlatformAccountMenu({
1917
+ variant = "platform",
1918
+ isPending = false,
1919
+ user = null,
1920
+ isAdmin = false,
1921
+ verificationStatus = "unverified",
1922
+ urls,
1923
+ memberOrgs = [],
1924
+ manageableOrgs = [],
1925
+ languages = defaultLanguages,
1926
+ currentLanguage,
1927
+ onLanguageChange,
1928
+ labels: labelsProp,
1929
+ onSignOut,
1930
+ extraItems,
1931
+ trigger: triggerProp,
1932
+ contentSide,
1933
+ contentAlign = "end",
1934
+ contentSideOffset,
1935
+ contentClassName,
1936
+ className
1937
+ }) {
1938
+ const labels = { ...defaultLabels3, ...labelsProp };
1939
+ const [signingOut, setSigningOut] = React7.useState(false);
1940
+ const loginHref = `${urls.authAppUrl}${urls.loginPath ?? "/login"}`;
1941
+ const accountHref = `${urls.authAppUrl}${urls.accountPath ?? "/account"}`;
1942
+ const activityHref = `${urls.authAppUrl}${urls.activityPath ?? "/account/activity"}`;
1943
+ const profileHref = `${urls.appUrl}${urls.professionalProfilePath ?? "/profile"}`;
1944
+ async function handleSignOut() {
1945
+ if (!onSignOut) return;
1946
+ setSigningOut(true);
1947
+ try {
1948
+ await onSignOut();
1949
+ } finally {
1950
+ setSigningOut(false);
1951
+ }
1952
+ }
1953
+ if (isPending) {
1954
+ return /* @__PURE__ */ jsxRuntime.jsx(
1955
+ "div",
1956
+ {
1957
+ className: cn(
1958
+ "size-9 shrink-0 animate-pulse rounded-full bg-muted",
1959
+ className
1960
+ ),
1961
+ "aria-hidden": true
1962
+ }
1963
+ );
1964
+ }
1965
+ const defaultTrigger = user ? /* @__PURE__ */ jsxRuntime.jsx(
1966
+ Button,
1967
+ {
1968
+ variant: "ghost",
1969
+ size: "icon",
1970
+ className: cn("size-9 rounded-full", className),
1971
+ "aria-label": labels.accountMenu,
1972
+ children: /* @__PURE__ */ jsxRuntime.jsx(MenuAvatar, { name: user.name, image: user.image, sizeClass: "size-8" })
1973
+ }
1974
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1975
+ Button,
1976
+ {
1977
+ variant: "ghost",
1978
+ size: "icon",
1979
+ className: cn("size-9", className),
1980
+ "aria-label": labels.settingsMenu,
1981
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4" })
1982
+ }
1983
+ );
1984
+ return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
1985
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuTrigger, { asChild: true, children: triggerProp ?? defaultTrigger }),
1986
+ /* @__PURE__ */ jsxRuntime.jsx(
1987
+ DropdownMenuContent,
1988
+ {
1989
+ side: contentSide,
1990
+ align: contentAlign,
1991
+ sideOffset: contentSideOffset,
1992
+ className: cn("min-w-60 rounded-lg", contentClassName),
1993
+ children: user ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1994
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuLabel, { className: "flex items-center gap-3 p-2 font-normal", children: [
1995
+ /* @__PURE__ */ jsxRuntime.jsx(
1996
+ MenuAvatar,
1997
+ {
1998
+ name: user.name,
1999
+ image: user.image,
2000
+ sizeClass: "size-9"
2001
+ }
2002
+ ),
2003
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
2004
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5 truncate text-sm font-medium leading-tight", children: [
2005
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: user.name }),
2006
+ variant === "platform" ? /* @__PURE__ */ jsxRuntime.jsx(
2007
+ VerifiedProfessionalBadge,
2008
+ {
2009
+ status: verificationStatus,
2010
+ className: "shrink-0"
2011
+ }
2012
+ ) : null
2013
+ ] }),
2014
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-muted-foreground leading-tight", children: user.email })
2015
+ ] })
2016
+ ] }),
2017
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2018
+ variant === "platform" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2019
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: accountHref, children: [
2020
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-4" }),
2021
+ labels.personalProfile
2022
+ ] }) }),
2023
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: activityHref, children: [
2024
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Activity, { className: "size-4" }),
2025
+ labels.activity
2026
+ ] }) }),
2027
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: profileHref, children: [
2028
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "size-4" }),
2029
+ labels.professionalProfile
2030
+ ] }) }),
2031
+ memberOrgs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
2032
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
2033
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Users, { className: "size-4" }),
2034
+ labels.memberOrgs
2035
+ ] }),
2036
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { className: "min-w-48 max-h-64 overflow-y-auto scroll-fade-b", children: memberOrgs.map((org) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `${urls.appUrl}/o/${org.slug}`, children: org.name }) }, org.id)) })
2037
+ ] }) : null,
2038
+ manageableOrgs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
2039
+ /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { className: "gap-2", children: [
2040
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Building2, { className: "size-4" }),
2041
+ labels.managementOrgs
2042
+ ] }),
2043
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { className: "min-w-48 max-h-64 overflow-y-auto scroll-fade-b", children: manageableOrgs.map((org) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2044
+ "a",
2045
+ {
2046
+ href: `${urls.adminUrl}/api/auth/org/select?id=${encodeURIComponent(org.id)}`,
2047
+ children: org.name
2048
+ }
2049
+ ) }, org.id)) })
2050
+ ] }) : null,
2051
+ extraItems,
2052
+ isAdmin && urls.backofficeUrl ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: urls.backofficeUrl, children: [
2053
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LayoutDashboard, { className: "size-4" }),
2054
+ labels.backoffice
2055
+ ] }) }) : null,
2056
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
2057
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2058
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: accountHref, children: [
2059
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Settings, { className: "size-4" }),
2060
+ labels.accountSettings
2061
+ ] }) }),
2062
+ extraItems,
2063
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
2064
+ ] }),
2065
+ /* @__PURE__ */ jsxRuntime.jsx(
2066
+ LanguageThemeSubs,
2067
+ {
2068
+ languages,
2069
+ currentLanguage,
2070
+ onLanguageChange,
2071
+ labels
2072
+ }
2073
+ ),
2074
+ /* @__PURE__ */ jsxRuntime.jsxs(
2075
+ DropdownMenuItem,
2076
+ {
2077
+ variant: "destructive",
2078
+ className: "gap-2",
2079
+ disabled: signingOut || !onSignOut,
2080
+ onSelect: (event) => {
2081
+ event.preventDefault();
2082
+ void handleSignOut();
2083
+ },
2084
+ children: [
2085
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "size-4" }),
2086
+ signingOut ? labels.signingOut : labels.signOut
2087
+ ]
2088
+ }
2089
+ )
2090
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2091
+ /* @__PURE__ */ jsxRuntime.jsx(
2092
+ LanguageThemeSubs,
2093
+ {
2094
+ languages,
2095
+ currentLanguage,
2096
+ onLanguageChange,
2097
+ labels
2098
+ }
2099
+ ),
2100
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {}),
2101
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: true, className: "gap-2", children: /* @__PURE__ */ jsxRuntime.jsxs("a", { href: loginHref, children: [
2102
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogIn, { className: "size-4" }),
2103
+ labels.signIn
2104
+ ] }) })
2105
+ ] })
2106
+ }
2107
+ )
2108
+ ] });
2109
+ }
1600
2110
  function Slider({
1601
2111
  className,
1602
2112
  defaultValue,
@@ -4915,7 +5425,7 @@ function SearchablePickerList({
4915
5425
  ] })
4916
5426
  ] });
4917
5427
  }
4918
- var defaultLabels3 = {
5428
+ var defaultLabels4 = {
4919
5429
  placeholder: "Seleccionar\u2026",
4920
5430
  searchPlaceholder: "Buscar\u2026",
4921
5431
  empty: "No se encontraron resultados",
@@ -4988,7 +5498,7 @@ function SearchablePicker(props) {
4988
5498
  "aria-label": ariaLabel
4989
5499
  } = props;
4990
5500
  const mode = props.mode ?? "single";
4991
- const labels = { ...defaultLabels3, ...userLabels };
5501
+ const labels = { ...defaultLabels4, ...userLabels };
4992
5502
  const resolvedEmptyLabel = emptyLabel ?? labels.emptyOption;
4993
5503
  const isMobile = useMediaQuery2("(max-width: 767px)");
4994
5504
  const generatedId = React7.useId();
@@ -5328,7 +5838,7 @@ function SearchablePicker(props) {
5328
5838
  clearButton
5329
5839
  ] });
5330
5840
  }
5331
- var defaultLabels4 = {
5841
+ var defaultLabels5 = {
5332
5842
  placeholder: "Buscar en toda la plataforma\u2026",
5333
5843
  dialogTitle: "Buscar",
5334
5844
  dialogDescription: "Busca funcionalidades, eventos, documentos y m\xE1s",
@@ -5362,7 +5872,7 @@ function SearchCommand({
5362
5872
  debounceMs = 200,
5363
5873
  className
5364
5874
  }) {
5365
- const labels = { ...defaultLabels4, ...userLabels };
5875
+ const labels = { ...defaultLabels5, ...userLabels };
5366
5876
  const [query, setQuery] = React7.useState("");
5367
5877
  const [hits, setHits] = React7.useState([]);
5368
5878
  const [isLoading, setIsLoading] = React7.useState(false);
@@ -5804,67 +6314,6 @@ function MexicoMap({ selected, onToggle, className }) {
5804
6314
  }
5805
6315
  );
5806
6316
  }
5807
- var LABELS = {
5808
- verified: "M\xE9dico verificado",
5809
- pending_review: "Verificaci\xF3n en revisi\xF3n"
5810
- };
5811
- var sizeClasses3 = {
5812
- sm: {
5813
- icon: "size-3.5",
5814
- text: "text-xs",
5815
- gap: "gap-1",
5816
- padding: "px-1.5 py-0.5"
5817
- },
5818
- md: {
5819
- icon: "size-4",
5820
- text: "text-sm",
5821
- gap: "gap-1.5",
5822
- padding: "px-2 py-0.5"
5823
- }
5824
- };
5825
- function VerifiedProfessionalBadge({
5826
- status,
5827
- size = "md",
5828
- showLabel = false,
5829
- className
5830
- }) {
5831
- if (status === "unverified" || status === "pending_review" && !showLabel) {
5832
- return null;
5833
- }
5834
- const label = LABELS[status];
5835
- const sizes = sizeClasses3[size];
5836
- const Icon = status === "verified" ? lucideReact.BadgeCheck : lucideReact.Clock;
5837
- const colorClass = status === "verified" ? "text-primary" : "text-muted-foreground";
5838
- if (!showLabel) {
5839
- return /* @__PURE__ */ jsxRuntime.jsx(
5840
- Icon,
5841
- {
5842
- className: cn(sizes.icon, colorClass, className),
5843
- "aria-label": label,
5844
- children: /* @__PURE__ */ jsxRuntime.jsx("title", { children: label })
5845
- }
5846
- );
5847
- }
5848
- return /* @__PURE__ */ jsxRuntime.jsxs(
5849
- "span",
5850
- {
5851
- title: label,
5852
- "aria-label": label,
5853
- className: cn(
5854
- "inline-flex w-fit items-center rounded-full font-medium",
5855
- sizes.gap,
5856
- sizes.text,
5857
- sizes.padding,
5858
- status === "verified" ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground",
5859
- className
5860
- ),
5861
- children: [
5862
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: sizes.icon, "aria-hidden": "true" }),
5863
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: label })
5864
- ]
5865
- }
5866
- );
5867
- }
5868
6317
  function MessageGroup({ className, ...props }) {
5869
6318
  return /* @__PURE__ */ jsxRuntime.jsx(
5870
6319
  "div",
@@ -7198,6 +7647,8 @@ exports.BubbleGroup = BubbleGroup;
7198
7647
  exports.BubbleReactions = BubbleReactions;
7199
7648
  exports.ChatMessageList = ChatMessageList;
7200
7649
  exports.ConfirmDestructiveDialog = ConfirmDestructiveDialog;
7650
+ exports.DropdownMenuItem = DropdownMenuItem;
7651
+ exports.DropdownMenuSeparator = DropdownMenuSeparator;
7201
7652
  exports.EmojiInput = EmojiInput;
7202
7653
  exports.EmojiPicker = EmojiPicker;
7203
7654
  exports.EmojiPickerPopover = EmojiPickerPopover;
@@ -7236,6 +7687,8 @@ exports.MessageScrollerViewport = MessageScrollerViewport;
7236
7687
  exports.MexicoMap = MexicoMap;
7237
7688
  exports.OrgSwitcher = OrgSwitcher;
7238
7689
  exports.PhoneInput = PhoneInput;
7690
+ exports.PlatformAccountMenu = PlatformAccountMenu;
7691
+ exports.PlatformNavbar = PlatformNavbar;
7239
7692
  exports.SearchCommand = SearchCommand;
7240
7693
  exports.SearchablePicker = SearchablePicker;
7241
7694
  exports.SupportMessengerProvider = SupportMessengerProvider;
@@ -7265,6 +7718,7 @@ exports.useLanguageContext = useLanguageContext;
7265
7718
  exports.useMediaQuery = useMediaQuery2;
7266
7719
  exports.usePlaybackStats = usePlaybackStats;
7267
7720
  exports.useRealtimeChannel = useRealtimeChannel;
7721
+ exports.useScrollFadeXEdges = useScrollFadeXEdges;
7268
7722
  exports.useSearchHotkey = useSearchHotkey;
7269
7723
  exports.useSupportConversation = useSupportConversation;
7270
7724
  exports.useSupportMessenger = useSupportMessenger;