@vllnt/ui 0.1.0 → 0.1.1

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.ts CHANGED
@@ -628,6 +628,7 @@ type ContentCardPost = {
628
628
  slug: string;
629
629
  tags?: string[];
630
630
  title: string;
631
+ updatedDate?: string;
631
632
  };
632
633
  type ContentCardProps = {
633
634
  formatDate?: (date: string, lang: string) => string;
@@ -639,8 +640,9 @@ type ContentCardProps = {
639
640
  showBadge?: boolean;
640
641
  showDate?: boolean;
641
642
  showReadMore?: boolean;
643
+ updatedLabel?: string;
642
644
  };
643
- declare function ContentCard({ formatDate, href, lang, post, readMoreLabel, showBadge, showDate, showReadMore, }: ContentCardProps): react_jsx_runtime.JSX.Element;
645
+ declare function ContentCard({ formatDate, href, lang, post, readMoreLabel, showBadge, showDate, showReadMore, updatedLabel, }: ContentCardProps): react_jsx_runtime.JSX.Element;
644
646
  declare const BlogCard: typeof ContentCard;
645
647
 
646
648
  type CategoryFilterProps = {
package/dist/index.js CHANGED
@@ -3107,16 +3107,22 @@ function ContentCard({
3107
3107
  readMoreLabel,
3108
3108
  showBadge = true,
3109
3109
  showDate = true,
3110
- showReadMore = true
3110
+ showReadMore = true,
3111
+ updatedLabel
3111
3112
  }) {
3112
3113
  const shouldShowBadge = showBadge && post.tags && post.tags.length > 0;
3113
3114
  const shouldShowDate = showDate && post.date && formatDate && lang;
3114
- const shouldShowHeaderMeta = shouldShowBadge || shouldShowDate;
3115
+ const shouldShowUpdatedDate = showDate && post.updatedDate && formatDate && lang;
3116
+ const shouldShowHeaderMeta = shouldShowBadge || shouldShowDate || shouldShowUpdatedDate;
3115
3117
  return /* @__PURE__ */ jsx(Link7, { className: "block h-full", href, children: /* @__PURE__ */ jsxs(Card, { className: "h-full flex flex-col hover:shadow-lg transition-shadow cursor-pointer", children: [
3116
3118
  /* @__PURE__ */ jsxs(CardHeader, { children: [
3117
3119
  shouldShowHeaderMeta ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 mb-2", children: [
3118
3120
  shouldShowBadge ? /* @__PURE__ */ jsx(Badge, { className: "text-xs", variant: "secondary", children: post.tags?.[0] }) : null,
3119
- shouldShowDate && post.date && lang ? /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: formatDate(post.date, lang) }) : null
3121
+ shouldShowDate && post.date && lang ? /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: formatDate(post.date, lang) }) : null,
3122
+ shouldShowUpdatedDate && post.updatedDate && lang ? /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
3123
+ updatedLabel ? `${updatedLabel} ` : "",
3124
+ formatDate(post.updatedDate, lang)
3125
+ ] }) : null
3120
3126
  ] }) : null,
3121
3127
  /* @__PURE__ */ jsx(CardTitle, { className: "text-lg line-clamp-2", children: post.title }),
3122
3128
  /* @__PURE__ */ jsx(CardDescription, { className: "line-clamp-3", children: post.description })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vllnt/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "React component library — 93 components built on Radix UI, Tailwind CSS, and CVA",
5
5
  "license": "MIT",
6
6
  "author": "vllnt",