@marcoschwartz/lite-ui 0.16.0 → 0.18.0

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
@@ -459,11 +459,23 @@ var Navbar = ({
459
459
  logo,
460
460
  children,
461
461
  className = "",
462
- sticky = false
462
+ sticky = false,
463
+ variant = "solid"
463
464
  }) => {
464
465
  const { theme } = useTheme();
465
466
  const baseClasses = sticky ? "sticky top-0 z-40" : "";
466
- return /* @__PURE__ */ jsx5("nav", { className: `bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 ${baseClasses} ${className}`, children: /* @__PURE__ */ jsx5("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between items-center h-16", children: [
467
+ const getVariantClasses2 = () => {
468
+ switch (variant) {
469
+ case "glass":
470
+ return "bg-transparent backdrop-blur-xl";
471
+ case "transparent":
472
+ return "bg-transparent";
473
+ case "solid":
474
+ default:
475
+ return "bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700";
476
+ }
477
+ };
478
+ return /* @__PURE__ */ jsx5("nav", { className: `${getVariantClasses2()} ${baseClasses} ${className}`, children: /* @__PURE__ */ jsx5("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs4("div", { className: "flex justify-between items-center h-16", children: [
467
479
  logo && /* @__PURE__ */ jsx5("div", { className: "flex items-center", children: logo }),
468
480
  children && /* @__PURE__ */ jsx5("div", { className: "flex items-center gap-6", children })
469
481
  ] }) }) });
@@ -1082,6 +1094,17 @@ var breakpointClasses = {
1082
1094
  lg: "lg",
1083
1095
  xl: "xl"
1084
1096
  };
1097
+ var getVariantClasses = (variant) => {
1098
+ switch (variant) {
1099
+ case "glass":
1100
+ return "bg-transparent backdrop-blur-xl";
1101
+ case "transparent":
1102
+ return "bg-transparent";
1103
+ case "solid":
1104
+ default:
1105
+ return "bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700";
1106
+ }
1107
+ };
1085
1108
  var AppShell = ({
1086
1109
  children,
1087
1110
  navbar,
@@ -1118,7 +1141,7 @@ var AppShell = ({
1118
1141
  const mobileMenuClass = navbarBreakpoint === "sm" ? "sm:hidden" : navbarBreakpoint === "md" ? "md:hidden" : navbarBreakpoint === "lg" ? "lg:hidden" : "xl:hidden";
1119
1142
  const desktopNavClass = navbarBreakpoint === "sm" ? "sm:flex" : navbarBreakpoint === "md" ? "md:flex" : navbarBreakpoint === "lg" ? "lg:flex" : "xl:flex";
1120
1143
  return /* @__PURE__ */ jsxs9("div", { className: `min-h-screen flex flex-col bg-gray-50 dark:bg-gray-900 ${className}`, children: [
1121
- /* @__PURE__ */ jsx78("nav", { className: "sticky top-0 z-30 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700", children: /* @__PURE__ */ jsx78("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs9("div", { className: "flex justify-between items-center h-16", children: [
1144
+ /* @__PURE__ */ jsx78("nav", { className: `sticky top-0 z-30 ${getVariantClasses(navbar.variant)}`, children: /* @__PURE__ */ jsx78("div", { className: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8", children: /* @__PURE__ */ jsxs9("div", { className: "flex justify-between items-center h-16", children: [
1122
1145
  /* @__PURE__ */ jsx78("div", { className: "flex items-center", children: navbarLogo ? /* @__PURE__ */ jsx78("div", { children: navbarLogo }) : navbarTitle ? /* @__PURE__ */ jsx78("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: navbarTitle }) : null }),
1123
1146
  /* @__PURE__ */ jsx78("div", { className: `hidden ${desktopNavClass} items-center gap-6`, children: navbar.content }),
1124
1147
  /* @__PURE__ */ jsx78(
@@ -1172,7 +1195,7 @@ var AppShell = ({
1172
1195
  const mobileDrawerClass = navbarBreakpoint === "sm" ? "sm:hidden" : navbarBreakpoint === "md" ? "md:hidden" : navbarBreakpoint === "lg" ? "lg:hidden" : "xl:hidden";
1173
1196
  const sidebarWidthClass = navbarWidth === "sm" ? "w-48" : navbarWidth === "lg" ? "w-80" : "w-64";
1174
1197
  return /* @__PURE__ */ jsxs9("div", { className: `min-h-screen flex flex-col bg-gray-50 dark:bg-gray-900 ${className}`, children: [
1175
- /* @__PURE__ */ jsxs9("div", { className: `${mobileHeaderClass} sticky top-0 z-30 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-4 py-3 flex items-center justify-between`, children: [
1198
+ /* @__PURE__ */ jsxs9("div", { className: `${mobileHeaderClass} sticky top-0 z-30 ${getVariantClasses(navbar.variant)} px-4 py-3 flex items-center justify-between`, children: [
1176
1199
  navbarLogo ? /* @__PURE__ */ jsx78("div", { children: navbarLogo }) : navbarTitle ? /* @__PURE__ */ jsx78("span", { className: "text-xl font-bold text-gray-900 dark:text-gray-100", children: navbarTitle }) : null,
1177
1200
  /* @__PURE__ */ jsx78(
1178
1201
  "button",
@@ -1186,7 +1209,7 @@ var AppShell = ({
1186
1209
  ] }),
1187
1210
  header && /* @__PURE__ */ jsx78("div", { className: "w-full", children: header }),
1188
1211
  /* @__PURE__ */ jsxs9("div", { className: "flex flex-1 min-h-0", children: [
1189
- /* @__PURE__ */ jsx78("aside", { className: `hidden ${desktopNavbarClass} ${sidebarWidthClass} bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700 overflow-y-auto shrink-0`, children: navbar.content }),
1212
+ /* @__PURE__ */ jsx78("aside", { className: `hidden ${desktopNavbarClass} ${sidebarWidthClass} ${navbar.variant === "glass" ? "bg-transparent backdrop-blur-xl" : navbar.variant === "transparent" ? "bg-transparent" : "bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700"} overflow-y-auto shrink-0`, children: navbar.content }),
1190
1213
  isMobileNavbarOpen && /* @__PURE__ */ jsxs9(Fragment11, { children: [
1191
1214
  /* @__PURE__ */ jsx78(
1192
1215
  "div",