@sesionario/blocks 1.35.1 → 1.35.2

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.d.cts CHANGED
@@ -517,9 +517,11 @@ interface VerifiedProfessionalBadgeProps {
517
517
  size?: "sm" | "md";
518
518
  /** Icon-only with title/aria-label when false (default). */
519
519
  showLabel?: boolean;
520
+ /** Catalog display name (e.g. "Médico"). Verified copy becomes "{label} verificado". */
521
+ professionLabel?: string;
520
522
  className?: string;
521
523
  }
522
- declare function VerifiedProfessionalBadge({ status, size, showLabel, className, }: VerifiedProfessionalBadgeProps): React.JSX.Element | null;
524
+ declare function VerifiedProfessionalBadge({ status, size, showLabel, professionLabel, className, }: VerifiedProfessionalBadgeProps): React.JSX.Element | null;
523
525
 
524
526
  type PlatformAccountMenuVariant = "platform" | "professional";
525
527
  type PlatformAccountMenuUser = {
@@ -571,12 +573,14 @@ declare const PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = 4;
571
573
  * `canManage` is true when the org appears in `manageableOrgs`.
572
574
  */
573
575
  declare function mergePlatformAccountOrgs(memberOrgs: PlatformAccountMenuOrg[], manageableOrgs: PlatformAccountMenuOrg[]): MergedPlatformAccountOrg[];
574
- type PlatformAccountMenuProps = {
576
+ interface PlatformAccountMenuProps {
575
577
  variant?: PlatformAccountMenuVariant;
576
578
  /** While session is resolving. */
577
579
  isPending?: boolean;
578
580
  user?: PlatformAccountMenuUser | null;
579
581
  verificationStatus?: ProfessionalVerificationStatus;
582
+ /** Catalog display name for the verified badge (e.g. "Médico"). */
583
+ professionLabel?: string;
580
584
  urls: PlatformAccountMenuUrls;
581
585
  memberOrgs?: PlatformAccountMenuOrg[];
582
586
  manageableOrgs?: PlatformAccountMenuOrg[];
@@ -598,12 +602,12 @@ type PlatformAccountMenuProps = {
598
602
  contentSideOffset?: number;
599
603
  contentClassName?: string;
600
604
  className?: string;
601
- };
605
+ }
602
606
  /**
603
607
  * Cross-app account / settings menu. Guest trigger is a settings cog;
604
608
  * signed-in trigger is the user avatar.
605
609
  */
606
- declare function PlatformAccountMenu({ variant, isPending, user, verificationStatus, urls, memberOrgs, manageableOrgs, languages, currentLanguage, onLanguageChange, labels: labelsProp, onSignOut, extraItems, trigger: triggerProp, contentSide, contentAlign, contentSideOffset, contentClassName, className, }: PlatformAccountMenuProps): React.JSX.Element;
610
+ declare function PlatformAccountMenu({ variant, isPending, user, verificationStatus, professionLabel, urls, memberOrgs, manageableOrgs, languages, currentLanguage, onLanguageChange, labels: labelsProp, onSignOut, extraItems, trigger: triggerProp, contentSide, contentAlign, contentSideOffset, contentClassName, className, }: PlatformAccountMenuProps): React.JSX.Element;
607
611
 
608
612
  declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
609
613
  inset?: boolean;
package/dist/index.d.ts CHANGED
@@ -517,9 +517,11 @@ interface VerifiedProfessionalBadgeProps {
517
517
  size?: "sm" | "md";
518
518
  /** Icon-only with title/aria-label when false (default). */
519
519
  showLabel?: boolean;
520
+ /** Catalog display name (e.g. "Médico"). Verified copy becomes "{label} verificado". */
521
+ professionLabel?: string;
520
522
  className?: string;
521
523
  }
522
- declare function VerifiedProfessionalBadge({ status, size, showLabel, className, }: VerifiedProfessionalBadgeProps): React.JSX.Element | null;
524
+ declare function VerifiedProfessionalBadge({ status, size, showLabel, professionLabel, className, }: VerifiedProfessionalBadgeProps): React.JSX.Element | null;
523
525
 
524
526
  type PlatformAccountMenuVariant = "platform" | "professional";
525
527
  type PlatformAccountMenuUser = {
@@ -571,12 +573,14 @@ declare const PLATFORM_ACCOUNT_ORG_COLLAPSE_AT = 4;
571
573
  * `canManage` is true when the org appears in `manageableOrgs`.
572
574
  */
573
575
  declare function mergePlatformAccountOrgs(memberOrgs: PlatformAccountMenuOrg[], manageableOrgs: PlatformAccountMenuOrg[]): MergedPlatformAccountOrg[];
574
- type PlatformAccountMenuProps = {
576
+ interface PlatformAccountMenuProps {
575
577
  variant?: PlatformAccountMenuVariant;
576
578
  /** While session is resolving. */
577
579
  isPending?: boolean;
578
580
  user?: PlatformAccountMenuUser | null;
579
581
  verificationStatus?: ProfessionalVerificationStatus;
582
+ /** Catalog display name for the verified badge (e.g. "Médico"). */
583
+ professionLabel?: string;
580
584
  urls: PlatformAccountMenuUrls;
581
585
  memberOrgs?: PlatformAccountMenuOrg[];
582
586
  manageableOrgs?: PlatformAccountMenuOrg[];
@@ -598,12 +602,12 @@ type PlatformAccountMenuProps = {
598
602
  contentSideOffset?: number;
599
603
  contentClassName?: string;
600
604
  className?: string;
601
- };
605
+ }
602
606
  /**
603
607
  * Cross-app account / settings menu. Guest trigger is a settings cog;
604
608
  * signed-in trigger is the user avatar.
605
609
  */
606
- declare function PlatformAccountMenu({ variant, isPending, user, verificationStatus, urls, memberOrgs, manageableOrgs, languages, currentLanguage, onLanguageChange, labels: labelsProp, onSignOut, extraItems, trigger: triggerProp, contentSide, contentAlign, contentSideOffset, contentClassName, className, }: PlatformAccountMenuProps): React.JSX.Element;
610
+ declare function PlatformAccountMenu({ variant, isPending, user, verificationStatus, professionLabel, urls, memberOrgs, manageableOrgs, languages, currentLanguage, onLanguageChange, labels: labelsProp, onSignOut, extraItems, trigger: triggerProp, contentSide, contentAlign, contentSideOffset, contentClassName, className, }: PlatformAccountMenuProps): React.JSX.Element;
607
611
 
608
612
  declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
609
613
  inset?: boolean;
package/dist/index.js CHANGED
@@ -2552,10 +2552,6 @@ function PlatformNavbar({
2552
2552
  }
2553
2553
  );
2554
2554
  }
2555
- var LABELS = {
2556
- verified: "M\xE9dico verificado",
2557
- pending_review: "Verificaci\xF3n en revisi\xF3n"
2558
- };
2559
2555
  var sizeClasses3 = {
2560
2556
  sm: {
2561
2557
  icon: "size-3.5",
@@ -2570,16 +2566,22 @@ var sizeClasses3 = {
2570
2566
  padding: "px-2 py-0.5"
2571
2567
  }
2572
2568
  };
2569
+ function verifiedLabel(professionLabel) {
2570
+ const trimmed = professionLabel?.trim();
2571
+ if (trimmed) return `${trimmed} verificado`;
2572
+ return "Profesional verificado";
2573
+ }
2573
2574
  function VerifiedProfessionalBadge({
2574
2575
  status,
2575
2576
  size = "md",
2576
2577
  showLabel = false,
2578
+ professionLabel,
2577
2579
  className
2578
2580
  }) {
2579
2581
  if (status === "unverified" || status === "pending_review" && !showLabel) {
2580
2582
  return null;
2581
2583
  }
2582
- const label = LABELS[status];
2584
+ const label = status === "verified" ? verifiedLabel(professionLabel) : "Verificaci\xF3n en revisi\xF3n";
2583
2585
  const sizes = sizeClasses3[size];
2584
2586
  const Icon = status === "verified" ? BadgeCheck : Clock;
2585
2587
  const colorClass = status === "verified" ? "text-primary" : "text-muted-foreground";
@@ -2802,6 +2804,7 @@ function PlatformAccountMenu({
2802
2804
  isPending = false,
2803
2805
  user = null,
2804
2806
  verificationStatus = "unverified",
2807
+ professionLabel,
2805
2808
  urls,
2806
2809
  memberOrgs = [],
2807
2810
  manageableOrgs = [],
@@ -2895,6 +2898,7 @@ function PlatformAccountMenu({
2895
2898
  VerifiedProfessionalBadge,
2896
2899
  {
2897
2900
  status: verificationStatus,
2901
+ professionLabel,
2898
2902
  className: "shrink-0"
2899
2903
  }
2900
2904
  ) : null