@metropolle/design-system 1.2026.0-1.24.1854 → 1.2026.0-1.24.2224

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.
@@ -1470,6 +1470,34 @@ const GlassCard = require$$0.forwardRef(({ glassStyle = 'liquid', intensity = 'm
1470
1470
  });
1471
1471
  GlassCard.displayName = 'GlassCard';
1472
1472
 
1473
+ // =============================================================================
1474
+ // Icons
1475
+ // =============================================================================
1476
+ const Icons$1 = {
1477
+ shield: (jsxRuntimeExports.jsx("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: jsxRuntimeExports.jsx("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" }) })),
1478
+ checkCircle: (jsxRuntimeExports.jsxs("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [jsxRuntimeExports.jsx("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), jsxRuntimeExports.jsx("polyline", { points: "22 4 12 14.01 9 11.01" })] })),
1479
+ circle: (jsxRuntimeExports.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: jsxRuntimeExports.jsx("circle", { cx: "12", cy: "12", r: "10" }) })),
1480
+ };
1481
+ function VerificationCheckItem({ check, action, variant }) {
1482
+ if (variant === 'compact') {
1483
+ // Compact version for popup - just icon + text
1484
+ return (jsxRuntimeExports.jsxs("div", { className: "mds-verification-check-item mds-verification-check-item--compact", children: [jsxRuntimeExports.jsx("span", { className: `mds-verification-check-icon ${check.passed ? 'mds-verification-check-icon--passed' : ''}`, children: check.passed ? '\u2713' : '\u2717' }), jsxRuntimeExports.jsx("span", { className: "mds-verification-check-label", children: check.description })] }));
1485
+ }
1486
+ // Card version - with points and optional action
1487
+ return (jsxRuntimeExports.jsxs("div", { className: `mds-verification-check-item ${check.passed ? 'mds-verification-check-item--passed' : ''}`, children: [jsxRuntimeExports.jsx("div", { className: "mds-verification-check-status", children: check.passed ? Icons$1.checkCircle : Icons$1.circle }), jsxRuntimeExports.jsxs("div", { className: "mds-verification-check-content", children: [jsxRuntimeExports.jsx("span", { className: "mds-verification-check-description", children: check.description }), jsxRuntimeExports.jsx("span", { className: "mds-verification-check-points", children: check.passed ? '1 point' : '0 points' })] }), action && !check.passed && (jsxRuntimeExports.jsx("button", { type: "button", className: "mds-btn mds-btn--secondary mds-btn--sm", onClick: action.onClick, disabled: action.disabled, children: action.label }))] }));
1488
+ }
1489
+ // =============================================================================
1490
+ // Main Component
1491
+ // =============================================================================
1492
+ function VerificationScoreCard({ score, maxScore = 5, checks, loading = false, error = null, variant = 'card', getCheckAction, showInfoText = true, className = '', registrationSequence, memberSince, }) {
1493
+ if (variant === 'compact') {
1494
+ // Compact popup version (used in ProfileCard)
1495
+ return (jsxRuntimeExports.jsxs("div", { className: `mds-verification-popup ${className}`, children: [jsxRuntimeExports.jsxs("div", { className: "mds-verification-popup__header", children: ["Verification Level ", loading ? '...' : score] }), jsxRuntimeExports.jsx("div", { className: "mds-verification-popup__checks", children: checks.map((check) => (jsxRuntimeExports.jsx(VerificationCheckItem, { check: check, variant: "compact" }, check.name))) }), (registrationSequence || memberSince) && (jsxRuntimeExports.jsxs("div", { className: "mds-verification-popup__footer", children: [registrationSequence && (jsxRuntimeExports.jsxs("span", { className: "mds-verification-popup__sequence", children: ["User #", registrationSequence.toLocaleString()] })), memberSince && (jsxRuntimeExports.jsxs("span", { className: "mds-verification-popup__date", children: ["since ", memberSince] }))] }))] }));
1496
+ }
1497
+ // Full card version (used in settings pages)
1498
+ return (jsxRuntimeExports.jsxs("div", { className: `mds-verification-card ${className}`, children: [jsxRuntimeExports.jsxs("div", { className: "mds-verification-card__header", children: [jsxRuntimeExports.jsxs("div", { className: "mds-verification-card__badge", children: [jsxRuntimeExports.jsx("span", { className: "mds-verification-card__badge-label", children: "Verification Level" }), jsxRuntimeExports.jsx("span", { className: "mds-verification-card__badge-score", children: loading ? '...' : score })] }), jsxRuntimeExports.jsxs("div", { className: "mds-verification-card__title", children: [jsxRuntimeExports.jsx("h4", { className: "mds-verification-card__heading", children: "Verification Score" }), jsxRuntimeExports.jsx("p", { className: "mds-verification-card__subtitle", children: "Each completed criterion adds 1 point to your verification score." })] })] }), error && (jsxRuntimeExports.jsx("div", { className: "mds-verification-card__error", children: error })), jsxRuntimeExports.jsx("div", { className: "mds-verification-card__checks", children: checks.map((check) => (jsxRuntimeExports.jsx(VerificationCheckItem, { check: check, action: getCheckAction?.(check), variant: "card" }, check.name))) }), showInfoText && (jsxRuntimeExports.jsx("p", { className: "mds-verification-card__info", children: "The Verification Score indicates your account's trustworthiness. Users with higher scores have more credibility on the platform." }))] }));
1499
+ }
1500
+
1473
1501
  // Default placeholder avatar - adapts to theme with high transparency
1474
1502
  const getPlaceholderAvatar = (isDark) => {
1475
1503
  const bgColor = isDark ? 'rgba(26, 26, 46, 0.15)' : 'rgba(255, 255, 255, 0.1)';
@@ -1510,9 +1538,6 @@ function UsernameLinks({ username, className }) {
1510
1538
  function StatItem({ label, verified }) {
1511
1539
  return (jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__stat-item", children: [jsxRuntimeExports.jsx("span", { className: "mds-profile-card__stat-label", children: label }), jsxRuntimeExports.jsx("span", { className: `mds-profile-card__stat-value ${verified ? 'mds-profile-card__stat-value--verified' : ''}`, children: verified ? 'Verified' : 'Not Verified' })] }));
1512
1540
  }
1513
- function VerificationCheckItem({ description, passed }) {
1514
- return (jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__check-item", children: [jsxRuntimeExports.jsx("span", { className: `mds-profile-card__check-icon ${passed ? 'mds-profile-card__check-icon--passed' : ''}`, children: passed ? '\u2713' : '\u2717' }), jsxRuntimeExports.jsx("span", { className: "mds-profile-card__check-label", children: description })] }));
1515
- }
1516
1541
  // =============================================================================
1517
1542
  // Main Component
1518
1543
  // =============================================================================
@@ -1544,14 +1569,23 @@ function ProfileCard({ user, variant = 'full', photoWidth, showSocial = false, s
1544
1569
  return () => observer.disconnect();
1545
1570
  }, []);
1546
1571
  // Dynamic info texts for rotating display
1547
- const infoTexts = [
1572
+ // FEAT-090: Use verification_score checks when available, fallback to legacy
1573
+ const infoTexts = user.verification_score ? [
1574
+ `Verification Level ${user.verification_score.score}`,
1575
+ `User #${user.registration_sequence?.toLocaleString() || '—'}`,
1576
+ `Member since ${new Date(user.created_at).getFullYear()}`,
1577
+ // Show passed verification checks
1578
+ ...user.verification_score.checks
1579
+ .filter(check => check.passed)
1580
+ .map(check => check.description),
1581
+ ] : [
1548
1582
  `Member since ${new Date(user.created_at).getFullYear()}`,
1549
1583
  ...(user.registration_sequence ? [`User #${user.registration_sequence.toLocaleString()}`] : []),
1550
1584
  ...(user.verified >= 1 ? ['Email Verified'] : []),
1551
1585
  ...(user.verified >= 2 ? ['Identity Verified'] : []),
1552
1586
  ...(user.verified >= 3 ? ['Area Verified'] : []),
1553
1587
  // PROC-013: Show MFA status when enabled (highlight security-conscious users)
1554
- ...(user.mfa_enabled === true ? ['2FA Ativado'] : []),
1588
+ ...(user.mfa_enabled === true ? ['2FA Enabled'] : []),
1555
1589
  ];
1556
1590
  // Rotate info text
1557
1591
  require$$0.useEffect(() => {
@@ -1613,11 +1647,11 @@ function ProfileCard({ user, variant = 'full', photoWidth, showSocial = false, s
1613
1647
  e.stopPropagation();
1614
1648
  setShowVerifiedPopup(!showVerifiedPopup);
1615
1649
  setShowSocialPopup(false);
1616
- }, title: "Verification Status", children: Icons.shield }), showVerifiedPopup && (jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-popup", children: [user.verification_score ? (
1617
- // FEAT-090: New 6-point verification score
1618
- jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-header", children: ["Verificacao: ", user.verification_score.score] }), jsxRuntimeExports.jsx("div", { className: "mds-profile-card__verified-checks", children: user.verification_score.checks.map((check) => (jsxRuntimeExports.jsx(VerificationCheckItem, { description: check.description, passed: check.passed }, check.name))) })] })) : (
1619
- // Legacy: Old verification levels
1620
- jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-header", children: ["Verification Level ", user.verified] }), jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-stats", children: [jsxRuntimeExports.jsx(StatItem, { label: "Email", verified: user.verified >= 1 }), jsxRuntimeExports.jsx(StatItem, { label: "Identity", verified: user.verified >= 2 }), jsxRuntimeExports.jsx(StatItem, { label: "Area", verified: user.verified >= 3 })] })] })), jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-footer", children: [user.registration_sequence && (jsxRuntimeExports.jsxs("span", { className: "mds-profile-card__verified-sequence", children: ["User #", user.registration_sequence.toLocaleString()] })), jsxRuntimeExports.jsxs("span", { className: "mds-profile-card__verified-date", children: ["Since ", memberSince] })] })] }))] }), showRotatingInfo && (jsxRuntimeExports.jsx("div", { className: "mds-profile-card__info-dots", children: infoTexts.map((_, index) => (jsxRuntimeExports.jsx("span", { className: `mds-profile-card__info-dot ${index === currentInfoIndex ? 'active' : ''}` }, index))) }))] }))] })] }));
1650
+ }, title: "Verification Status", children: Icons.shield }), showVerifiedPopup && (jsxRuntimeExports.jsx("div", { className: "mds-profile-card__verified-popup", children: user.verification_score ? (
1651
+ // FEAT-090: Use VerificationScoreCard component
1652
+ jsxRuntimeExports.jsx(VerificationScoreCard, { score: user.verification_score.score, maxScore: user.verification_score.max_score, checks: user.verification_score.checks, variant: "compact", registrationSequence: user.registration_sequence, memberSince: memberSince })) : (
1653
+ // Legacy: Old verification levels
1654
+ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-header", children: ["Verification Level ", user.verified] }), jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-stats", children: [jsxRuntimeExports.jsx(StatItem, { label: "Email", verified: user.verified >= 1 }), jsxRuntimeExports.jsx(StatItem, { label: "Identity", verified: user.verified >= 2 }), jsxRuntimeExports.jsx(StatItem, { label: "Area", verified: user.verified >= 3 })] }), jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-footer", children: [user.registration_sequence && (jsxRuntimeExports.jsxs("span", { className: "mds-profile-card__verified-sequence", children: ["User #", user.registration_sequence.toLocaleString()] })), jsxRuntimeExports.jsxs("span", { className: "mds-profile-card__verified-date", children: ["since ", memberSince] })] })] })) }))] }), showRotatingInfo && (jsxRuntimeExports.jsx("div", { className: "mds-profile-card__info-dots", children: infoTexts.map((_, index) => (jsxRuntimeExports.jsx("span", { className: `mds-profile-card__info-dot ${index === currentInfoIndex ? 'active' : ''}` }, index))) }))] }))] })] }));
1621
1655
  }
1622
1656
 
1623
1657
  const variantElementMap = {
@@ -3117,6 +3151,7 @@ exports.TableHeader = TableHeader;
3117
3151
  exports.TableRow = TableRow;
3118
3152
  exports.ThemeToggle = ThemeToggle;
3119
3153
  exports.Typography = Typography;
3154
+ exports.VerificationScoreCard = VerificationScoreCard;
3120
3155
  exports.auditLogTableConfig = auditLogTableConfig;
3121
3156
  exports.citiesTableConfig = citiesTableConfig;
3122
3157
  exports.cn = cn;