@metropolle/design-system 1.2026.0-1.24.2030 → 1.2026.0-1.24.2242

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
  // =============================================================================
@@ -1623,8 +1648,8 @@ function ProfileCard({ user, variant = 'full', photoWidth, showSocial = false, s
1623
1648
  setShowVerifiedPopup(!showVerifiedPopup);
1624
1649
  setShowSocialPopup(false);
1625
1650
  }, title: "Verification Status", children: Icons.shield }), showVerifiedPopup && (jsxRuntimeExports.jsx("div", { className: "mds-profile-card__verified-popup", children: user.verification_score ? (
1626
- // FEAT-090: New 5-point verification score
1627
- jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [jsxRuntimeExports.jsxs("div", { className: "mds-profile-card__verified-header", children: ["Verification Level ", 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))) }), 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] })] })] })) : (
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 })) : (
1628
1653
  // Legacy: Old verification levels
1629
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))) }))] }))] })] }));
1630
1655
  }
@@ -3126,6 +3151,7 @@ exports.TableHeader = TableHeader;
3126
3151
  exports.TableRow = TableRow;
3127
3152
  exports.ThemeToggle = ThemeToggle;
3128
3153
  exports.Typography = Typography;
3154
+ exports.VerificationScoreCard = VerificationScoreCard;
3129
3155
  exports.auditLogTableConfig = auditLogTableConfig;
3130
3156
  exports.citiesTableConfig = citiesTableConfig;
3131
3157
  exports.cn = cn;