@moontra/moonui-pro 2.18.2 → 2.18.3

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.mjs CHANGED
@@ -61911,27 +61911,48 @@ var MinimalVariant = ({ repos, stats, className }) => {
61911
61911
  if (!stats)
61912
61912
  return null;
61913
61913
  return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center gap-4 text-sm", className), children: [
61914
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
61915
- /* @__PURE__ */ jsx(Github, { className: "h-4 w-4" }),
61916
- /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
61917
- repos.length,
61918
- " repositories"
61919
- ] })
61920
- ] }),
61921
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
61922
- /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
61923
- /* @__PURE__ */ jsxs("span", { children: [
61924
- formatNumber(stats.totalStars),
61925
- " stars"
61926
- ] })
61927
- ] }),
61928
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
61929
- /* @__PURE__ */ jsx(GitFork, { className: "h-4 w-4 text-blue-500" }),
61930
- /* @__PURE__ */ jsxs("span", { children: [
61931
- formatNumber(stats.totalForks),
61932
- " forks"
61933
- ] })
61934
- ] })
61914
+ /* @__PURE__ */ jsxs(
61915
+ "button",
61916
+ {
61917
+ className: "flex items-center gap-2 hover:text-primary transition-colors",
61918
+ onClick: () => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}`, "_blank"),
61919
+ children: [
61920
+ /* @__PURE__ */ jsx(Github, { className: "h-4 w-4" }),
61921
+ /* @__PURE__ */ jsxs("span", { className: "font-medium", children: [
61922
+ repos.length,
61923
+ " repositories"
61924
+ ] })
61925
+ ]
61926
+ }
61927
+ ),
61928
+ /* @__PURE__ */ jsxs(
61929
+ "button",
61930
+ {
61931
+ className: "flex items-center gap-2 hover:text-yellow-600 transition-colors",
61932
+ onClick: () => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=stargazers`, "_blank"),
61933
+ children: [
61934
+ /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
61935
+ /* @__PURE__ */ jsxs("span", { children: [
61936
+ formatNumber(stats.totalStars),
61937
+ " stars"
61938
+ ] })
61939
+ ]
61940
+ }
61941
+ ),
61942
+ /* @__PURE__ */ jsxs(
61943
+ "button",
61944
+ {
61945
+ className: "flex items-center gap-2 hover:text-blue-600 transition-colors",
61946
+ onClick: () => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=fork&language=&sort=`, "_blank"),
61947
+ children: [
61948
+ /* @__PURE__ */ jsx(GitFork, { className: "h-4 w-4 text-blue-500" }),
61949
+ /* @__PURE__ */ jsxs("span", { children: [
61950
+ formatNumber(stats.totalForks),
61951
+ " forks"
61952
+ ] })
61953
+ ]
61954
+ }
61955
+ )
61935
61956
  ] });
61936
61957
  };
61937
61958
  var CompactVariant = ({
@@ -61953,21 +61974,35 @@ var CompactVariant = ({
61953
61974
  ] })
61954
61975
  ] }),
61955
61976
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-sm", children: [
61956
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
61957
- /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
61958
- /* @__PURE__ */ jsx("span", { children: formatNumber(stats.totalStars) })
61959
- ] }),
61960
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
61961
- /* @__PURE__ */ jsx(GitFork, { className: "h-4 w-4 text-blue-500" }),
61962
- /* @__PURE__ */ jsx("span", { children: formatNumber(stats.totalForks) })
61963
- ] })
61977
+ /* @__PURE__ */ jsxs(
61978
+ "button",
61979
+ {
61980
+ className: "flex items-center gap-1 hover:text-yellow-600 transition-colors cursor-pointer",
61981
+ onClick: () => window.open(`https://github.com/${repos[0]?.owner?.login}/${repos[0]?.name}/stargazers`, "_blank"),
61982
+ children: [
61983
+ /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
61984
+ /* @__PURE__ */ jsx("span", { children: formatNumber(stats.totalStars) })
61985
+ ]
61986
+ }
61987
+ ),
61988
+ /* @__PURE__ */ jsxs(
61989
+ "button",
61990
+ {
61991
+ className: "flex items-center gap-1 hover:text-blue-600 transition-colors cursor-pointer",
61992
+ onClick: () => window.open(`https://github.com/${repos[0]?.owner?.login}/${repos[0]?.name}/forks`, "_blank"),
61993
+ children: [
61994
+ /* @__PURE__ */ jsx(GitFork, { className: "h-4 w-4 text-blue-500" }),
61995
+ /* @__PURE__ */ jsx("span", { children: formatNumber(stats.totalForks) })
61996
+ ]
61997
+ }
61998
+ )
61964
61999
  ] })
61965
62000
  ] }),
61966
62001
  /* @__PURE__ */ jsx("div", { className: "space-y-2", children: topRepos.map((repo) => /* @__PURE__ */ jsxs(
61967
62002
  "div",
61968
62003
  {
61969
62004
  className: "flex items-center justify-between p-2 rounded-md hover:bg-accent cursor-pointer transition-colors",
61970
- onClick: () => onRepositoryClick?.(repo),
62005
+ onClick: () => window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, "_blank"),
61971
62006
  children: [
61972
62007
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
61973
62008
  /* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: repo.name }),
@@ -62009,12 +62044,15 @@ var CardVariant = ({
62009
62044
  children: /* @__PURE__ */ jsx(
62010
62045
  MoonUICardPro,
62011
62046
  {
62012
- className: "h-full hover:shadow-lg transition-shadow cursor-pointer",
62013
- onClick: () => onRepositoryClick?.(repo),
62047
+ className: "h-full hover:shadow-lg transition-shadow cursor-pointer group",
62048
+ onClick: () => window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, "_blank"),
62014
62049
  children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
62015
- /* @__PURE__ */ jsxs("div", { children: [
62016
- /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-1", children: repo.name }),
62017
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground line-clamp-2", children: repo.description || "No description available" })
62050
+ /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
62051
+ /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
62052
+ /* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-1", children: repo.name }),
62053
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground line-clamp-2", children: repo.description || "No description available" })
62054
+ ] }),
62055
+ /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" })
62018
62056
  ] }),
62019
62057
  repo.topics.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: repo.topics.slice(0, 3).map((topic) => /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "text-xs", children: topic }, topic)) }),
62020
62058
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm", children: [
@@ -62029,14 +62067,34 @@ var CardVariant = ({
62029
62067
  /* @__PURE__ */ jsx("span", { children: repo.language })
62030
62068
  ] }) }),
62031
62069
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
62032
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
62033
- /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
62034
- /* @__PURE__ */ jsx("span", { children: formatNumber(repo.stargazers_count) })
62035
- ] }),
62036
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
62037
- /* @__PURE__ */ jsx(GitFork, { className: "h-4 w-4 text-blue-500" }),
62038
- /* @__PURE__ */ jsx("span", { children: formatNumber(repo.forks_count) })
62039
- ] })
62070
+ /* @__PURE__ */ jsxs(
62071
+ "button",
62072
+ {
62073
+ className: "flex items-center gap-1 hover:text-yellow-600 transition-colors",
62074
+ onClick: (e) => {
62075
+ e.stopPropagation();
62076
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/stargazers`, "_blank");
62077
+ },
62078
+ children: [
62079
+ /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
62080
+ /* @__PURE__ */ jsx("span", { children: formatNumber(repo.stargazers_count) })
62081
+ ]
62082
+ }
62083
+ ),
62084
+ /* @__PURE__ */ jsxs(
62085
+ "button",
62086
+ {
62087
+ className: "flex items-center gap-1 hover:text-blue-600 transition-colors",
62088
+ onClick: (e) => {
62089
+ e.stopPropagation();
62090
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/forks`, "_blank");
62091
+ },
62092
+ children: [
62093
+ /* @__PURE__ */ jsx(GitFork, { className: "h-4 w-4 text-blue-500" }),
62094
+ /* @__PURE__ */ jsx("span", { children: formatNumber(repo.forks_count) })
62095
+ ]
62096
+ }
62097
+ )
62040
62098
  ] })
62041
62099
  ] })
62042
62100
  ] }) })
@@ -62056,24 +62114,38 @@ var DetailedVariant = ({
62056
62114
  if (!stats)
62057
62115
  return null;
62058
62116
  return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn("w-full", className), children: [
62059
- /* @__PURE__ */ jsx(MoonUICardHeaderPro, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
62117
+ /* @__PURE__ */ jsx(MoonUICardHeaderPro, { className: "pb-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
62060
62118
  /* @__PURE__ */ jsxs(MoonUICardTitlePro, { className: "flex items-center gap-2", children: [
62061
62119
  /* @__PURE__ */ jsx(Github, { className: "h-6 w-6" }),
62062
62120
  "GitHub Repository Analytics"
62063
62121
  ] }),
62064
- onExport && /* @__PURE__ */ jsxs(MoonUIButtonPro, { onClick: onExport, variant: "outline", size: "sm", children: [
62065
- /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
62066
- "Export"
62122
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
62123
+ repos[0] && /* @__PURE__ */ jsxs(
62124
+ MoonUIButtonPro,
62125
+ {
62126
+ onClick: () => window.open(`https://github.com/${repos[0].owner?.login}`, "_blank"),
62127
+ variant: "outline",
62128
+ size: "sm",
62129
+ children: [
62130
+ /* @__PURE__ */ jsx(Github, { className: "h-4 w-4 mr-2" }),
62131
+ "View Profile"
62132
+ ]
62133
+ }
62134
+ ),
62135
+ onExport && /* @__PURE__ */ jsxs(MoonUIButtonPro, { onClick: onExport, variant: "outline", size: "sm", children: [
62136
+ /* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
62137
+ "Export"
62138
+ ] })
62067
62139
  ] })
62068
62140
  ] }) }),
62069
- /* @__PURE__ */ jsx(MoonUICardContentPro, { children: /* @__PURE__ */ jsxs(MoonUITabsPro, { defaultValue: "overview", className: "w-full", children: [
62070
- /* @__PURE__ */ jsxs(MoonUITabsListPro, { className: "grid w-full grid-cols-4", children: [
62141
+ /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "pt-0", children: /* @__PURE__ */ jsxs(MoonUITabsPro, { defaultValue: "overview", className: "w-full mt-4", children: [
62142
+ /* @__PURE__ */ jsxs(MoonUITabsListPro, { className: "grid w-full grid-cols-4 mb-6", children: [
62071
62143
  /* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "overview", children: "Overview" }),
62072
62144
  /* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "repositories", children: "Repositories" }),
62073
62145
  /* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "languages", children: "Languages" }),
62074
62146
  /* @__PURE__ */ jsx(MoonUITabsTriggerPro, { value: "activity", children: "Activity" })
62075
62147
  ] }),
62076
- /* @__PURE__ */ jsxs(MoonUITabsContentPro, { value: "overview", className: "space-y-4", children: [
62148
+ /* @__PURE__ */ jsxs(MoonUITabsContentPro, { value: "overview", className: "space-y-6 mt-6", children: [
62077
62149
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 md:grid-cols-4 gap-4", children: [
62078
62150
  /* @__PURE__ */ jsx(
62079
62151
  StatCard,
@@ -62088,7 +62160,8 @@ var DetailedVariant = ({
62088
62160
  {
62089
62161
  icon: /* @__PURE__ */ jsx(Star, { className: "h-4 w-4 text-yellow-500" }),
62090
62162
  label: "Total Stars",
62091
- value: formatNumber(stats.totalStars)
62163
+ value: formatNumber(stats.totalStars),
62164
+ onClick: () => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=stargazers`, "_blank")
62092
62165
  }
62093
62166
  ),
62094
62167
  /* @__PURE__ */ jsx(
@@ -62108,27 +62181,40 @@ var DetailedVariant = ({
62108
62181
  }
62109
62182
  )
62110
62183
  ] }),
62111
- stats.mostStarredRepo && /* @__PURE__ */ jsx(MoonUICardPro, { children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
62112
- /* @__PURE__ */ jsxs("div", { children: [
62113
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-1", children: "Most Starred Repository" }),
62114
- /* @__PURE__ */ jsx("h4", { className: "font-semibold", children: stats.mostStarredRepo.name }),
62115
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
62116
- formatNumber(stats.mostStarredRepo.stargazers_count),
62117
- " stars"
62118
- ] })
62119
- ] }),
62120
- /* @__PURE__ */ jsx(TrendingUp, { className: "h-8 w-8 text-muted-foreground" })
62121
- ] }) }) })
62184
+ stats.mostStarredRepo && /* @__PURE__ */ jsx(
62185
+ MoonUICardPro,
62186
+ {
62187
+ className: "hover:shadow-md transition-shadow cursor-pointer",
62188
+ onClick: () => window.open(`https://github.com/${stats.mostStarredRepo.owner?.login}/${stats.mostStarredRepo.name}`, "_blank"),
62189
+ children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
62190
+ /* @__PURE__ */ jsxs("div", { children: [
62191
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "Most Starred Repository" }),
62192
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-lg mb-1", children: stats.mostStarredRepo.name }),
62193
+ /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
62194
+ formatNumber(stats.mostStarredRepo.stargazers_count),
62195
+ " stars"
62196
+ ] })
62197
+ ] }),
62198
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-2", children: [
62199
+ /* @__PURE__ */ jsx(TrendingUp, { className: "h-8 w-8 text-muted-foreground" }),
62200
+ /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4 text-muted-foreground" })
62201
+ ] })
62202
+ ] }) })
62203
+ }
62204
+ )
62122
62205
  ] }),
62123
- /* @__PURE__ */ jsx(MoonUITabsContentPro, { value: "repositories", className: "space-y-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: repos.map((repo) => /* @__PURE__ */ jsx(
62206
+ /* @__PURE__ */ jsx(MoonUITabsContentPro, { value: "repositories", className: "space-y-4 mt-6", children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: repos.map((repo) => /* @__PURE__ */ jsx(
62124
62207
  MoonUICardPro,
62125
62208
  {
62126
- className: "hover:shadow-md transition-shadow cursor-pointer",
62127
- onClick: () => onRepositoryClick?.(repo),
62128
- children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
62209
+ className: "hover:shadow-md transition-shadow cursor-pointer group",
62210
+ onClick: () => window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, "_blank"),
62211
+ children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-5", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between", children: [
62129
62212
  /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
62130
- /* @__PURE__ */ jsx("h4", { className: "font-semibold mb-1", children: repo.name }),
62131
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: repo.description || "No description" }),
62213
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
62214
+ /* @__PURE__ */ jsx("h4", { className: "font-semibold text-base", children: repo.name }),
62215
+ repo.private && /* @__PURE__ */ jsx(MoonUIBadgePro, { variant: "secondary", className: "text-xs", children: "Private" })
62216
+ ] }),
62217
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-3", children: repo.description || "No description" }),
62132
62218
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4 text-sm", children: [
62133
62219
  repo.language && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
62134
62220
  /* @__PURE__ */ jsx(
@@ -62142,67 +62228,166 @@ var DetailedVariant = ({
62142
62228
  ),
62143
62229
  /* @__PURE__ */ jsx("span", { children: repo.language })
62144
62230
  ] }),
62145
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
62146
- /* @__PURE__ */ jsx(Star, { className: "h-3 w-3" }),
62147
- /* @__PURE__ */ jsx("span", { children: formatNumber(repo.stargazers_count) })
62148
- ] }),
62149
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
62150
- /* @__PURE__ */ jsx(GitFork, { className: "h-3 w-3" }),
62151
- /* @__PURE__ */ jsx("span", { children: formatNumber(repo.forks_count) })
62152
- ] }),
62231
+ /* @__PURE__ */ jsxs(
62232
+ "button",
62233
+ {
62234
+ className: "flex items-center gap-1 hover:text-yellow-600 transition-colors",
62235
+ onClick: (e) => {
62236
+ e.stopPropagation();
62237
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/stargazers`, "_blank");
62238
+ },
62239
+ children: [
62240
+ /* @__PURE__ */ jsx(Star, { className: "h-3 w-3" }),
62241
+ /* @__PURE__ */ jsx("span", { children: formatNumber(repo.stargazers_count) })
62242
+ ]
62243
+ }
62244
+ ),
62245
+ /* @__PURE__ */ jsxs(
62246
+ "button",
62247
+ {
62248
+ className: "flex items-center gap-1 hover:text-blue-600 transition-colors",
62249
+ onClick: (e) => {
62250
+ e.stopPropagation();
62251
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/forks`, "_blank");
62252
+ },
62253
+ children: [
62254
+ /* @__PURE__ */ jsx(GitFork, { className: "h-3 w-3" }),
62255
+ /* @__PURE__ */ jsx("span", { children: formatNumber(repo.forks_count) })
62256
+ ]
62257
+ }
62258
+ ),
62259
+ /* @__PURE__ */ jsxs(
62260
+ "button",
62261
+ {
62262
+ className: "flex items-center gap-1 hover:text-purple-600 transition-colors",
62263
+ onClick: (e) => {
62264
+ e.stopPropagation();
62265
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/issues`, "_blank");
62266
+ },
62267
+ children: [
62268
+ /* @__PURE__ */ jsx(Users, { className: "h-3 w-3" }),
62269
+ /* @__PURE__ */ jsxs("span", { children: [
62270
+ repo.open_issues_count,
62271
+ " issues"
62272
+ ] })
62273
+ ]
62274
+ }
62275
+ ),
62153
62276
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
62154
62277
  /* @__PURE__ */ jsx(Calendar$1, { className: "h-3 w-3" }),
62155
62278
  /* @__PURE__ */ jsx("span", { children: formatDate2(repo.updated_at) })
62156
62279
  ] })
62157
62280
  ] })
62158
62281
  ] }),
62159
- /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4 text-muted-foreground" })
62282
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(
62283
+ MoonUIButtonPro,
62284
+ {
62285
+ size: "sm",
62286
+ variant: "ghost",
62287
+ className: "opacity-0 group-hover:opacity-100 transition-opacity",
62288
+ onClick: (e) => {
62289
+ e.stopPropagation();
62290
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, "_blank");
62291
+ },
62292
+ children: /* @__PURE__ */ jsx(ExternalLink, { className: "h-4 w-4" })
62293
+ }
62294
+ ) })
62160
62295
  ] }) })
62161
62296
  },
62162
62297
  repo.id
62163
62298
  )) }) }),
62164
- /* @__PURE__ */ jsx(MoonUITabsContentPro, { value: "languages", className: "space-y-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-3", children: stats.languages.map((lang) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
62165
- /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm", children: [
62166
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
62167
- /* @__PURE__ */ jsx(
62168
- "div",
62169
- {
62170
- className: "w-3 h-3 rounded-full",
62171
- style: { backgroundColor: lang.color }
62172
- }
62173
- ),
62174
- /* @__PURE__ */ jsx("span", { className: "font-medium", children: lang.language })
62299
+ /* @__PURE__ */ jsxs(MoonUITabsContentPro, { value: "languages", className: "space-y-6 mt-6", children: [
62300
+ /* @__PURE__ */ jsx("div", { className: "space-y-4", children: stats.languages.map((lang) => /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
62301
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-sm", children: [
62302
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
62303
+ /* @__PURE__ */ jsx(
62304
+ "div",
62305
+ {
62306
+ className: "w-3 h-3 rounded-full shadow-sm",
62307
+ style: { backgroundColor: lang.color }
62308
+ }
62309
+ ),
62310
+ /* @__PURE__ */ jsx("span", { className: "font-medium", children: lang.language })
62311
+ ] }),
62312
+ /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
62313
+ lang.count,
62314
+ " repos (",
62315
+ lang.percentage.toFixed(1),
62316
+ "%)"
62317
+ ] })
62175
62318
  ] }),
62176
- /* @__PURE__ */ jsxs("span", { className: "text-muted-foreground", children: [
62177
- lang.count,
62178
- " repos (",
62179
- lang.percentage.toFixed(1),
62180
- "%)"
62181
- ] })
62182
- ] }),
62183
- /* @__PURE__ */ jsx(MoonUIProgressPro, { value: lang.percentage, className: "h-2" })
62184
- ] }, lang.language)) }) }),
62185
- /* @__PURE__ */ jsx(MoonUITabsContentPro, { value: "activity", className: "space-y-4", children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: stats.recentActivity.map((activity, index2) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 p-3 rounded-lg bg-accent/50", children: [
62186
- /* @__PURE__ */ jsx(Activity, { className: "h-4 w-4 text-muted-foreground" }),
62187
- /* @__PURE__ */ jsxs("div", { className: "flex-1", children: [
62188
- /* @__PURE__ */ jsx("p", { className: "text-sm", children: activity.description }),
62189
- /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
62190
- activity.repository,
62191
- " \u2022 ",
62192
- formatDate2(activity.timestamp)
62193
- ] })
62194
- ] })
62195
- ] }, index2)) }) })
62319
+ /* @__PURE__ */ jsx("div", { className: "px-1", children: /* @__PURE__ */ jsx(MoonUIProgressPro, { value: lang.percentage, className: "h-2" }) })
62320
+ ] }, lang.language)) }),
62321
+ repos[0] && /* @__PURE__ */ jsx("div", { className: "pt-4 border-t", children: /* @__PURE__ */ jsxs(
62322
+ MoonUIButtonPro,
62323
+ {
62324
+ variant: "outline",
62325
+ className: "w-full",
62326
+ onClick: () => window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=`, "_blank"),
62327
+ children: [
62328
+ /* @__PURE__ */ jsx(BarChart3, { className: "h-4 w-4 mr-2" }),
62329
+ "View Language Statistics on GitHub"
62330
+ ]
62331
+ }
62332
+ ) })
62333
+ ] }),
62334
+ /* @__PURE__ */ jsxs(MoonUITabsContentPro, { value: "activity", className: "space-y-4 mt-6", children: [
62335
+ /* @__PURE__ */ jsx("div", { className: "space-y-3", children: stats.recentActivity.map((activity, index2) => {
62336
+ const repo = repos.find((r2) => r2.name === activity.repository);
62337
+ return /* @__PURE__ */ jsxs(
62338
+ "div",
62339
+ {
62340
+ className: "flex items-center gap-4 p-4 rounded-lg bg-accent/30 hover:bg-accent/50 transition-colors cursor-pointer",
62341
+ onClick: () => repo && window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, "_blank"),
62342
+ children: [
62343
+ /* @__PURE__ */ jsx(Activity, { className: "h-4 w-4 text-muted-foreground flex-shrink-0" }),
62344
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
62345
+ /* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: activity.description }),
62346
+ /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground mt-1", children: [
62347
+ activity.repository,
62348
+ " \u2022 ",
62349
+ formatDate2(activity.timestamp)
62350
+ ] })
62351
+ ] }),
62352
+ /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 text-muted-foreground flex-shrink-0" })
62353
+ ]
62354
+ },
62355
+ index2
62356
+ );
62357
+ }) }),
62358
+ repos[0] && /* @__PURE__ */ jsx("div", { className: "pt-4 border-t", children: /* @__PURE__ */ jsxs(
62359
+ MoonUIButtonPro,
62360
+ {
62361
+ variant: "outline",
62362
+ className: "w-full",
62363
+ onClick: () => window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=updated`, "_blank"),
62364
+ children: [
62365
+ /* @__PURE__ */ jsx(Activity, { className: "h-4 w-4 mr-2" }),
62366
+ "View All Activity on GitHub"
62367
+ ]
62368
+ }
62369
+ ) })
62370
+ ] })
62196
62371
  ] }) })
62197
62372
  ] });
62198
62373
  };
62199
- var StatCard = ({ icon, label, value }) => /* @__PURE__ */ jsx(MoonUICardPro, { children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
62200
- /* @__PURE__ */ jsxs("div", { children: [
62201
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: label }),
62202
- /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: value })
62203
- ] }),
62204
- icon
62205
- ] }) }) });
62374
+ var StatCard = ({ icon, label, value, onClick }) => /* @__PURE__ */ jsx(
62375
+ MoonUICardPro,
62376
+ {
62377
+ className: cn(
62378
+ "transition-all",
62379
+ onClick && "hover:shadow-md cursor-pointer hover:scale-105"
62380
+ ),
62381
+ onClick,
62382
+ children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "p-5", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
62383
+ /* @__PURE__ */ jsxs("div", { children: [
62384
+ /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-1", children: label }),
62385
+ /* @__PURE__ */ jsx("p", { className: "text-2xl font-bold", children: value })
62386
+ ] }),
62387
+ /* @__PURE__ */ jsx("div", { className: "text-muted-foreground", children: icon })
62388
+ ] }) })
62389
+ }
62390
+ );
62206
62391
  var GitHubStarsInternal = ({
62207
62392
  username = "",
62208
62393
  repository,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moontra/moonui-pro",
3
- "version": "2.18.2",
3
+ "version": "2.18.3",
4
4
  "description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
5
5
  "type": "module",
6
6
  "main": "dist/index.mjs",
@@ -38,18 +38,27 @@ export const MinimalVariant: React.FC<BaseVariantProps> = ({ repos, stats, class
38
38
 
39
39
  return (
40
40
  <div className={cn("flex items-center gap-4 text-sm", className)}>
41
- <div className="flex items-center gap-2">
41
+ <button
42
+ className="flex items-center gap-2 hover:text-primary transition-colors"
43
+ onClick={() => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}`, '_blank')}
44
+ >
42
45
  <Github className="h-4 w-4" />
43
46
  <span className="font-medium">{repos.length} repositories</span>
44
- </div>
45
- <div className="flex items-center gap-2">
47
+ </button>
48
+ <button
49
+ className="flex items-center gap-2 hover:text-yellow-600 transition-colors"
50
+ onClick={() => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=stargazers`, '_blank')}
51
+ >
46
52
  <Star className="h-4 w-4 text-yellow-500" />
47
53
  <span>{formatNumber(stats.totalStars)} stars</span>
48
- </div>
49
- <div className="flex items-center gap-2">
54
+ </button>
55
+ <button
56
+ className="flex items-center gap-2 hover:text-blue-600 transition-colors"
57
+ onClick={() => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=fork&language=&sort=`, '_blank')}
58
+ >
50
59
  <GitFork className="h-4 w-4 text-blue-500" />
51
60
  <span>{formatNumber(stats.totalForks)} forks</span>
52
- </div>
61
+ </button>
53
62
  </div>
54
63
  )
55
64
  }
@@ -75,14 +84,20 @@ export const CompactVariant: React.FC<BaseVariantProps> = ({
75
84
  <span className="font-semibold">{repos.length} Repos</span>
76
85
  </div>
77
86
  <div className="flex items-center gap-3 text-sm">
78
- <div className="flex items-center gap-1">
87
+ <button
88
+ className="flex items-center gap-1 hover:text-yellow-600 transition-colors cursor-pointer"
89
+ onClick={() => window.open(`https://github.com/${repos[0]?.owner?.login}/${repos[0]?.name}/stargazers`, '_blank')}
90
+ >
79
91
  <Star className="h-4 w-4 text-yellow-500" />
80
92
  <span>{formatNumber(stats.totalStars)}</span>
81
- </div>
82
- <div className="flex items-center gap-1">
93
+ </button>
94
+ <button
95
+ className="flex items-center gap-1 hover:text-blue-600 transition-colors cursor-pointer"
96
+ onClick={() => window.open(`https://github.com/${repos[0]?.owner?.login}/${repos[0]?.name}/forks`, '_blank')}
97
+ >
83
98
  <GitFork className="h-4 w-4 text-blue-500" />
84
99
  <span>{formatNumber(stats.totalForks)}</span>
85
- </div>
100
+ </button>
86
101
  </div>
87
102
  </div>
88
103
 
@@ -91,7 +106,7 @@ export const CompactVariant: React.FC<BaseVariantProps> = ({
91
106
  <div
92
107
  key={repo.id}
93
108
  className="flex items-center justify-between p-2 rounded-md hover:bg-accent cursor-pointer transition-colors"
94
- onClick={() => onRepositoryClick?.(repo)}
109
+ onClick={() => window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, '_blank')}
95
110
  >
96
111
  <div className="flex-1 min-w-0">
97
112
  <p className="text-sm font-medium truncate">{repo.name}</p>
@@ -137,16 +152,19 @@ export const CardVariant: React.FC<BaseVariantProps> = ({
137
152
  transition={{ delay: index * 0.05 }}
138
153
  >
139
154
  <Card
140
- className="h-full hover:shadow-lg transition-shadow cursor-pointer"
141
- onClick={() => onRepositoryClick?.(repo)}
155
+ className="h-full hover:shadow-lg transition-shadow cursor-pointer group"
156
+ onClick={() => window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, '_blank')}
142
157
  >
143
158
  <CardContent className="p-6">
144
159
  <div className="space-y-4">
145
- <div>
146
- <h3 className="font-semibold text-lg mb-1">{repo.name}</h3>
147
- <p className="text-sm text-muted-foreground line-clamp-2">
148
- {repo.description || "No description available"}
149
- </p>
160
+ <div className="flex items-start justify-between">
161
+ <div className="flex-1">
162
+ <h3 className="font-semibold text-lg mb-1">{repo.name}</h3>
163
+ <p className="text-sm text-muted-foreground line-clamp-2">
164
+ {repo.description || "No description available"}
165
+ </p>
166
+ </div>
167
+ <ExternalLink className="h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity" />
150
168
  </div>
151
169
 
152
170
  {repo.topics.length > 0 && (
@@ -172,14 +190,26 @@ export const CardVariant: React.FC<BaseVariantProps> = ({
172
190
  )}
173
191
  </div>
174
192
  <div className="flex items-center gap-3">
175
- <div className="flex items-center gap-1">
193
+ <button
194
+ className="flex items-center gap-1 hover:text-yellow-600 transition-colors"
195
+ onClick={(e) => {
196
+ e.stopPropagation()
197
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/stargazers`, '_blank')
198
+ }}
199
+ >
176
200
  <Star className="h-4 w-4 text-yellow-500" />
177
201
  <span>{formatNumber(repo.stargazers_count)}</span>
178
- </div>
179
- <div className="flex items-center gap-1">
202
+ </button>
203
+ <button
204
+ className="flex items-center gap-1 hover:text-blue-600 transition-colors"
205
+ onClick={(e) => {
206
+ e.stopPropagation()
207
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/forks`, '_blank')
208
+ }}
209
+ >
180
210
  <GitFork className="h-4 w-4 text-blue-500" />
181
211
  <span>{formatNumber(repo.forks_count)}</span>
182
- </div>
212
+ </button>
183
213
  </div>
184
214
  </div>
185
215
  </div>
@@ -203,30 +233,42 @@ export const DetailedVariant: React.FC<BaseVariantProps & { onExport?: () => voi
203
233
 
204
234
  return (
205
235
  <Card className={cn("w-full", className)}>
206
- <CardHeader>
236
+ <CardHeader className="pb-4">
207
237
  <div className="flex items-center justify-between">
208
238
  <CardTitle className="flex items-center gap-2">
209
239
  <Github className="h-6 w-6" />
210
240
  GitHub Repository Analytics
211
241
  </CardTitle>
212
- {onExport && (
213
- <Button onClick={onExport} variant="outline" size="sm">
214
- <Download className="h-4 w-4 mr-2" />
215
- Export
216
- </Button>
217
- )}
242
+ <div className="flex items-center gap-2">
243
+ {repos[0] && (
244
+ <Button
245
+ onClick={() => window.open(`https://github.com/${repos[0].owner?.login}`, '_blank')}
246
+ variant="outline"
247
+ size="sm"
248
+ >
249
+ <Github className="h-4 w-4 mr-2" />
250
+ View Profile
251
+ </Button>
252
+ )}
253
+ {onExport && (
254
+ <Button onClick={onExport} variant="outline" size="sm">
255
+ <Download className="h-4 w-4 mr-2" />
256
+ Export
257
+ </Button>
258
+ )}
259
+ </div>
218
260
  </div>
219
261
  </CardHeader>
220
- <CardContent>
221
- <Tabs defaultValue="overview" className="w-full">
222
- <TabsList className="grid w-full grid-cols-4">
262
+ <CardContent className="pt-0">
263
+ <Tabs defaultValue="overview" className="w-full mt-4">
264
+ <TabsList className="grid w-full grid-cols-4 mb-6">
223
265
  <TabsTrigger value="overview">Overview</TabsTrigger>
224
266
  <TabsTrigger value="repositories">Repositories</TabsTrigger>
225
267
  <TabsTrigger value="languages">Languages</TabsTrigger>
226
268
  <TabsTrigger value="activity">Activity</TabsTrigger>
227
269
  </TabsList>
228
270
 
229
- <TabsContent value="overview" className="space-y-4">
271
+ <TabsContent value="overview" className="space-y-6 mt-6">
230
272
  <div className="grid grid-cols-2 md:grid-cols-4 gap-4">
231
273
  <StatCard
232
274
  icon={<Package className="h-4 w-4" />}
@@ -237,6 +279,7 @@ export const DetailedVariant: React.FC<BaseVariantProps & { onExport?: () => voi
237
279
  icon={<Star className="h-4 w-4 text-yellow-500" />}
238
280
  label="Total Stars"
239
281
  value={formatNumber(stats.totalStars)}
282
+ onClick={() => repos[0] && window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=stargazers`, '_blank')}
240
283
  />
241
284
  <StatCard
242
285
  icon={<GitFork className="h-4 w-4 text-blue-500" />}
@@ -251,36 +294,47 @@ export const DetailedVariant: React.FC<BaseVariantProps & { onExport?: () => voi
251
294
  </div>
252
295
 
253
296
  {stats.mostStarredRepo && (
254
- <Card>
255
- <CardContent className="p-4">
297
+ <Card
298
+ className="hover:shadow-md transition-shadow cursor-pointer"
299
+ onClick={() => window.open(`https://github.com/${stats.mostStarredRepo.owner?.login}/${stats.mostStarredRepo.name}`, '_blank')}
300
+ >
301
+ <CardContent className="p-6">
256
302
  <div className="flex items-center justify-between">
257
303
  <div>
258
- <p className="text-sm text-muted-foreground mb-1">Most Starred Repository</p>
259
- <h4 className="font-semibold">{stats.mostStarredRepo.name}</h4>
304
+ <p className="text-sm text-muted-foreground mb-2">Most Starred Repository</p>
305
+ <h4 className="font-semibold text-lg mb-1">{stats.mostStarredRepo.name}</h4>
260
306
  <p className="text-sm text-muted-foreground">
261
307
  {formatNumber(stats.mostStarredRepo.stargazers_count)} stars
262
308
  </p>
263
309
  </div>
264
- <TrendingUp className="h-8 w-8 text-muted-foreground" />
310
+ <div className="flex flex-col items-center gap-2">
311
+ <TrendingUp className="h-8 w-8 text-muted-foreground" />
312
+ <ExternalLink className="h-4 w-4 text-muted-foreground" />
313
+ </div>
265
314
  </div>
266
315
  </CardContent>
267
316
  </Card>
268
317
  )}
269
318
  </TabsContent>
270
319
 
271
- <TabsContent value="repositories" className="space-y-4">
272
- <div className="space-y-2">
320
+ <TabsContent value="repositories" className="space-y-4 mt-6">
321
+ <div className="space-y-3">
273
322
  {repos.map((repo) => (
274
323
  <Card
275
324
  key={repo.id}
276
- className="hover:shadow-md transition-shadow cursor-pointer"
277
- onClick={() => onRepositoryClick?.(repo)}
325
+ className="hover:shadow-md transition-shadow cursor-pointer group"
326
+ onClick={() => window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, '_blank')}
278
327
  >
279
- <CardContent className="p-4">
328
+ <CardContent className="p-5">
280
329
  <div className="flex items-start justify-between">
281
330
  <div className="flex-1">
282
- <h4 className="font-semibold mb-1">{repo.name}</h4>
283
- <p className="text-sm text-muted-foreground mb-2">
331
+ <div className="flex items-center gap-2 mb-2">
332
+ <h4 className="font-semibold text-base">{repo.name}</h4>
333
+ {repo.private && (
334
+ <Badge variant="secondary" className="text-xs">Private</Badge>
335
+ )}
336
+ </div>
337
+ <p className="text-sm text-muted-foreground mb-3">
284
338
  {repo.description || "No description"}
285
339
  </p>
286
340
  <div className="flex items-center gap-4 text-sm">
@@ -295,21 +349,55 @@ export const DetailedVariant: React.FC<BaseVariantProps & { onExport?: () => voi
295
349
  <span>{repo.language}</span>
296
350
  </div>
297
351
  )}
298
- <div className="flex items-center gap-1">
352
+ <button
353
+ className="flex items-center gap-1 hover:text-yellow-600 transition-colors"
354
+ onClick={(e) => {
355
+ e.stopPropagation()
356
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/stargazers`, '_blank')
357
+ }}
358
+ >
299
359
  <Star className="h-3 w-3" />
300
360
  <span>{formatNumber(repo.stargazers_count)}</span>
301
- </div>
302
- <div className="flex items-center gap-1">
361
+ </button>
362
+ <button
363
+ className="flex items-center gap-1 hover:text-blue-600 transition-colors"
364
+ onClick={(e) => {
365
+ e.stopPropagation()
366
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/forks`, '_blank')
367
+ }}
368
+ >
303
369
  <GitFork className="h-3 w-3" />
304
370
  <span>{formatNumber(repo.forks_count)}</span>
305
- </div>
371
+ </button>
372
+ <button
373
+ className="flex items-center gap-1 hover:text-purple-600 transition-colors"
374
+ onClick={(e) => {
375
+ e.stopPropagation()
376
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}/issues`, '_blank')
377
+ }}
378
+ >
379
+ <Users className="h-3 w-3" />
380
+ <span>{repo.open_issues_count} issues</span>
381
+ </button>
306
382
  <div className="flex items-center gap-1">
307
383
  <Calendar className="h-3 w-3" />
308
384
  <span>{formatDate(repo.updated_at)}</span>
309
385
  </div>
310
386
  </div>
311
387
  </div>
312
- <ExternalLink className="h-4 w-4 text-muted-foreground" />
388
+ <div className="flex items-center gap-2">
389
+ <Button
390
+ size="sm"
391
+ variant="ghost"
392
+ className="opacity-0 group-hover:opacity-100 transition-opacity"
393
+ onClick={(e) => {
394
+ e.stopPropagation()
395
+ window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, '_blank')
396
+ }}
397
+ >
398
+ <ExternalLink className="h-4 w-4" />
399
+ </Button>
400
+ </div>
313
401
  </div>
314
402
  </CardContent>
315
403
  </Card>
@@ -317,14 +405,14 @@ export const DetailedVariant: React.FC<BaseVariantProps & { onExport?: () => voi
317
405
  </div>
318
406
  </TabsContent>
319
407
 
320
- <TabsContent value="languages" className="space-y-4">
321
- <div className="space-y-3">
408
+ <TabsContent value="languages" className="space-y-6 mt-6">
409
+ <div className="space-y-4">
322
410
  {stats.languages.map((lang) => (
323
411
  <div key={lang.language} className="space-y-2">
324
412
  <div className="flex items-center justify-between text-sm">
325
413
  <div className="flex items-center gap-2">
326
414
  <div
327
- className="w-3 h-3 rounded-full"
415
+ className="w-3 h-3 rounded-full shadow-sm"
328
416
  style={{ backgroundColor: lang.color }}
329
417
  />
330
418
  <span className="font-medium">{lang.language}</span>
@@ -333,26 +421,62 @@ export const DetailedVariant: React.FC<BaseVariantProps & { onExport?: () => voi
333
421
  {lang.count} repos ({lang.percentage.toFixed(1)}%)
334
422
  </span>
335
423
  </div>
336
- <Progress value={lang.percentage} className="h-2" />
424
+ <div className="px-1">
425
+ <Progress value={lang.percentage} className="h-2" />
426
+ </div>
337
427
  </div>
338
428
  ))}
339
429
  </div>
430
+
431
+ {repos[0] && (
432
+ <div className="pt-4 border-t">
433
+ <Button
434
+ variant="outline"
435
+ className="w-full"
436
+ onClick={() => window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=`, '_blank')}
437
+ >
438
+ <BarChart3 className="h-4 w-4 mr-2" />
439
+ View Language Statistics on GitHub
440
+ </Button>
441
+ </div>
442
+ )}
340
443
  </TabsContent>
341
444
 
342
- <TabsContent value="activity" className="space-y-4">
343
- <div className="space-y-2">
344
- {stats.recentActivity.map((activity, index) => (
345
- <div key={index} className="flex items-center gap-3 p-3 rounded-lg bg-accent/50">
346
- <Activity className="h-4 w-4 text-muted-foreground" />
347
- <div className="flex-1">
348
- <p className="text-sm">{activity.description}</p>
349
- <p className="text-xs text-muted-foreground">
350
- {activity.repository} {formatDate(activity.timestamp)}
351
- </p>
445
+ <TabsContent value="activity" className="space-y-4 mt-6">
446
+ <div className="space-y-3">
447
+ {stats.recentActivity.map((activity, index) => {
448
+ const repo = repos.find(r => r.name === activity.repository)
449
+ return (
450
+ <div
451
+ key={index}
452
+ className="flex items-center gap-4 p-4 rounded-lg bg-accent/30 hover:bg-accent/50 transition-colors cursor-pointer"
453
+ onClick={() => repo && window.open(`https://github.com/${repo.owner?.login}/${repo.name}`, '_blank')}
454
+ >
455
+ <Activity className="h-4 w-4 text-muted-foreground flex-shrink-0" />
456
+ <div className="flex-1 min-w-0">
457
+ <p className="text-sm font-medium">{activity.description}</p>
458
+ <p className="text-xs text-muted-foreground mt-1">
459
+ {activity.repository} • {formatDate(activity.timestamp)}
460
+ </p>
461
+ </div>
462
+ <ExternalLink className="h-3 w-3 text-muted-foreground flex-shrink-0" />
352
463
  </div>
353
- </div>
354
- ))}
464
+ )
465
+ })}
355
466
  </div>
467
+
468
+ {repos[0] && (
469
+ <div className="pt-4 border-t">
470
+ <Button
471
+ variant="outline"
472
+ className="w-full"
473
+ onClick={() => window.open(`https://github.com/${repos[0].owner?.login}?tab=repositories&q=&type=&language=&sort=updated`, '_blank')}
474
+ >
475
+ <Activity className="h-4 w-4 mr-2" />
476
+ View All Activity on GitHub
477
+ </Button>
478
+ </div>
479
+ )}
356
480
  </TabsContent>
357
481
  </Tabs>
358
482
  </CardContent>
@@ -365,15 +489,24 @@ const StatCard: React.FC<{
365
489
  icon: React.ReactNode
366
490
  label: string
367
491
  value: string | number
368
- }> = ({ icon, label, value }) => (
369
- <Card>
370
- <CardContent className="p-4">
492
+ onClick?: () => void
493
+ }> = ({ icon, label, value, onClick }) => (
494
+ <Card
495
+ className={cn(
496
+ "transition-all",
497
+ onClick && "hover:shadow-md cursor-pointer hover:scale-105"
498
+ )}
499
+ onClick={onClick}
500
+ >
501
+ <CardContent className="p-5">
371
502
  <div className="flex items-center justify-between">
372
503
  <div>
373
- <p className="text-sm text-muted-foreground">{label}</p>
504
+ <p className="text-sm text-muted-foreground mb-1">{label}</p>
374
505
  <p className="text-2xl font-bold">{value}</p>
375
506
  </div>
376
- {icon}
507
+ <div className="text-muted-foreground">
508
+ {icon}
509
+ </div>
377
510
  </div>
378
511
  </CardContent>
379
512
  </Card>