@capy-vn/ui 0.1.0 → 0.1.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.cjs CHANGED
@@ -3033,16 +3033,16 @@ function NavDesktopLink({ link }) {
3033
3033
  variant: "ghost",
3034
3034
  size: "sm",
3035
3035
  className: cn(
3036
- "gap-1",
3037
- link.active && "text-foreground"
3036
+ "gap-1.5 text-muted-foreground hover:bg-transparent hover:text-foreground",
3037
+ link.active && "text-foreground font-medium"
3038
3038
  ),
3039
3039
  children: [
3040
3040
  link.label,
3041
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3.5 w-3.5 opacity-60", "aria-hidden": "true" })
3041
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-3.5 w-3.5 opacity-50", "aria-hidden": "true" })
3042
3042
  ]
3043
3043
  }
3044
3044
  ) }),
3045
- /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "start", children: link.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: !!child.href, children: child.href ? /* @__PURE__ */ jsxRuntime.jsx(
3045
+ /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuContent, { align: "center", children: link.children.map((child) => /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, { asChild: !!child.href, children: child.href ? /* @__PURE__ */ jsxRuntime.jsx(
3046
3046
  "a",
3047
3047
  {
3048
3048
  href: child.href,
@@ -3061,7 +3061,10 @@ function NavDesktopLink({ link }) {
3061
3061
  variant: "ghost",
3062
3062
  size: "sm",
3063
3063
  asChild: !!link.href,
3064
- className: cn(link.active && "text-foreground"),
3064
+ className: cn(
3065
+ "text-muted-foreground hover:bg-transparent hover:text-foreground",
3066
+ link.active && "text-foreground font-medium"
3067
+ ),
3065
3068
  onClick: !link.href ? link.onClick : void 0,
3066
3069
  children: link.href ? /* @__PURE__ */ jsxRuntime.jsx(
3067
3070
  "a",
@@ -3093,9 +3096,9 @@ function NavMobileLink({
3093
3096
  onClose();
3094
3097
  };
3095
3098
  const baseClass = cn(
3096
- "flex w-full items-center justify-between rounded-md px-3 py-2 text-sm font-medium transition-colors",
3099
+ "flex w-full items-center justify-between rounded-md px-3 py-2.5 text-sm font-medium transition-colors",
3097
3100
  "hover:bg-accent hover:text-accent-foreground",
3098
- link.active && "bg-accent text-accent-foreground",
3101
+ link.active ? "text-foreground bg-accent/60" : "text-muted-foreground",
3099
3102
  depth > 0 && "pl-6 font-normal"
3100
3103
  );
3101
3104
  return /* @__PURE__ */ jsxRuntime.jsxs("li", { children: [
@@ -3119,7 +3122,7 @@ function NavMobileLink({
3119
3122
  lucideReact.ChevronDown,
3120
3123
  {
3121
3124
  className: cn(
3122
- "h-4 w-4 opacity-60 transition-transform",
3125
+ "h-4 w-4 opacity-50 transition-transform",
3123
3126
  open && "rotate-180"
3124
3127
  ),
3125
3128
  "aria-hidden": "true"
@@ -3146,8 +3149,7 @@ var PublicNavbar = React50__namespace.forwardRef(
3146
3149
  const [scrolled, setScrolled] = React50__namespace.useState(false);
3147
3150
  const [sheetOpen, setSheetOpen] = React50__namespace.useState(false);
3148
3151
  React50__namespace.useEffect(() => {
3149
- if (!transparent) return;
3150
- const handler = () => setScrolled(window.scrollY > transparentThreshold);
3152
+ const handler = () => setScrolled(window.scrollY > (transparent ? transparentThreshold : 10));
3151
3153
  window.addEventListener("scroll", handler, { passive: true });
3152
3154
  handler();
3153
3155
  return () => window.removeEventListener("scroll", handler);
@@ -3162,41 +3164,52 @@ var PublicNavbar = React50__namespace.forwardRef(
3162
3164
  {
3163
3165
  ref,
3164
3166
  className: cn(
3165
- "z-50 w-full transition-all duration-200",
3167
+ "z-50 w-full transition-all duration-300",
3166
3168
  sticky && "sticky top-0",
3167
- isTransparent ? "bg-transparent" : "border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",
3169
+ isTransparent ? "bg-transparent" : cn(
3170
+ "border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",
3171
+ scrolled && "shadow-sm"
3172
+ ),
3168
3173
  className
3169
3174
  ),
3170
3175
  ...props,
3171
- children: /* @__PURE__ */ jsxRuntime.jsx(Container, { size: containerSize, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-16 items-center gap-6", children: [
3172
- logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: logo }),
3173
- links && links.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "hidden md:flex items-center gap-1", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(NavDesktopLink, { link }, link.label)) }),
3174
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1" }),
3175
- cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden md:flex items-center gap-3", children: cta }),
3176
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex md:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open: sheetOpen, onOpenChange: handleSheetOpen, children: [
3177
- /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3178
- Button,
3179
- {
3180
- variant: "ghost",
3181
- size: "icon",
3182
- "aria-label": "M\u1EDF menu",
3183
- className: "h-9 w-9",
3184
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-5 w-5", "aria-hidden": "true" })
3185
- }
3186
- ) }),
3187
- /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "left", className: "flex flex-col", children: [
3188
- /* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: mobileMenuTitle }) }),
3189
- links && links.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "mt-4 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-1", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
3190
- NavMobileLink,
3176
+ children: /* @__PURE__ */ jsxRuntime.jsx(Container, { size: containerSize, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid h-16 grid-cols-[auto_1fr_auto] items-center gap-4", children: [
3177
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0", children: logo }),
3178
+ /* @__PURE__ */ jsxRuntime.jsx(
3179
+ "nav",
3180
+ {
3181
+ className: "hidden items-center justify-center gap-0.5 md:flex",
3182
+ "aria-label": "Main navigation",
3183
+ children: (links ?? []).map((link) => /* @__PURE__ */ jsxRuntime.jsx(NavDesktopLink, { link }, link.label))
3184
+ }
3185
+ ),
3186
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
3187
+ cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden items-center gap-3 md:flex", children: cta }),
3188
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "md:hidden", children: /* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open: sheetOpen, onOpenChange: handleSheetOpen, children: [
3189
+ /* @__PURE__ */ jsxRuntime.jsx(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
3190
+ Button,
3191
3191
  {
3192
- link,
3193
- onClose: () => handleSheetOpen(false)
3194
- },
3195
- link.label
3196
- )) }) }),
3197
- cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto border-t pt-4", children: cta })
3198
- ] })
3199
- ] }) })
3192
+ variant: "ghost",
3193
+ size: "icon",
3194
+ "aria-label": "M\u1EDF menu",
3195
+ className: "h-9 w-9",
3196
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "h-5 w-5", "aria-hidden": "true" })
3197
+ }
3198
+ ) }),
3199
+ /* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "right", className: "flex flex-col w-72", children: [
3200
+ /* @__PURE__ */ jsxRuntime.jsx(SheetHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { children: mobileMenuTitle }) }),
3201
+ links && links.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("nav", { className: "mt-4 flex-1", "aria-label": "Mobile navigation", children: /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "space-y-0.5", children: links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
3202
+ NavMobileLink,
3203
+ {
3204
+ link,
3205
+ onClose: () => handleSheetOpen(false)
3206
+ },
3207
+ link.label
3208
+ )) }) }),
3209
+ cta && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto border-t pt-4", children: cta })
3210
+ ] })
3211
+ ] }) })
3212
+ ] })
3200
3213
  ] }) })
3201
3214
  }
3202
3215
  );
@@ -3230,31 +3243,40 @@ var PublicFooter = React50__namespace.forwardRef(
3230
3243
  ref,
3231
3244
  className: cn("border-t bg-background", className),
3232
3245
  ...props,
3233
- children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { size: containerSize, className: "py-12", children: [
3234
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap gap-10", children: [
3235
- (logo || tagline) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-[160px] flex-1 flex-col gap-3", children: [
3246
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Container, { size: containerSize, className: "py-14", children: [
3247
+ (logo || tagline || linkGroups && linkGroups.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-10 md:grid-cols-[2fr_3fr] md:gap-16", children: [
3248
+ (logo || tagline) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
3236
3249
  logo,
3237
- tagline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: tagline })
3250
+ tagline && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs text-sm leading-relaxed text-muted-foreground", children: tagline })
3238
3251
  ] }),
3239
- linkGroups && linkGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-10", children: linkGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-[120px] flex-col gap-3", children: [
3240
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold", children: group.heading }),
3241
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2", children: group.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
3242
- "a",
3243
- {
3244
- href: link.href,
3245
- target: link.external ? "_blank" : void 0,
3246
- rel: link.external ? "noopener noreferrer" : void 0,
3247
- className: "text-sm text-muted-foreground transition-colors hover:text-foreground",
3248
- children: link.label
3249
- }
3250
- ) }, link.href)) })
3251
- ] }, group.heading)) })
3252
+ linkGroups && linkGroups.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
3253
+ "div",
3254
+ {
3255
+ className: cn(
3256
+ "grid gap-8",
3257
+ linkGroups.length === 1 ? "grid-cols-1" : linkGroups.length === 2 ? "grid-cols-2" : "grid-cols-2 sm:grid-cols-3"
3258
+ ),
3259
+ children: linkGroups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
3260
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-semibold tracking-wide", children: group.heading }),
3261
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-2", children: group.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
3262
+ "a",
3263
+ {
3264
+ href: link.href,
3265
+ target: link.external ? "_blank" : void 0,
3266
+ rel: link.external ? "noopener noreferrer" : void 0,
3267
+ className: "text-sm text-muted-foreground transition-colors hover:text-foreground",
3268
+ children: link.label
3269
+ }
3270
+ ) }, link.href)) })
3271
+ ] }, group.heading))
3272
+ }
3273
+ )
3252
3274
  ] }),
3253
- newsletter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-10", children: newsletter }),
3275
+ newsletter && /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn((logo || tagline || linkGroups?.length) && "mt-10"), children: newsletter }),
3254
3276
  /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-8" }),
3255
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center justify-between gap-4", children: [
3277
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col-reverse gap-4 sm:flex-row sm:items-center sm:justify-between", children: [
3256
3278
  copyright && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: copyright }),
3257
- socialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-3", children: socialLinks.map((social) => {
3279
+ socialLinks && socialLinks.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1", children: socialLinks.map((social) => {
3258
3280
  const Icon2 = socialIconMap[social.platform];
3259
3281
  return /* @__PURE__ */ jsxRuntime.jsx(
3260
3282
  "a",
@@ -3263,7 +3285,7 @@ var PublicFooter = React50__namespace.forwardRef(
3263
3285
  target: "_blank",
3264
3286
  rel: "noopener noreferrer",
3265
3287
  "aria-label": social.label ?? social.platform,
3266
- className: "flex h-8 w-8 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-foreground",
3288
+ className: "flex h-9 w-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground",
3267
3289
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-4 w-4", "aria-hidden": "true" })
3268
3290
  },
3269
3291
  social.platform