@moontra/moonui-pro 3.3.16 → 3.3.18
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/cdn/index.global.js +57 -57
- package/dist/cdn/index.global.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +34 -42
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3968,7 +3968,7 @@ interface NavbarConfig {
|
|
|
3968
3968
|
text?: string;
|
|
3969
3969
|
hover?: string;
|
|
3970
3970
|
};
|
|
3971
|
-
variant?: "default" | "floating" | "minimal" | "transparent";
|
|
3971
|
+
variant?: "default" | "floating" | "floating-centered" | "minimal" | "transparent";
|
|
3972
3972
|
size?: "sm" | "md" | "lg";
|
|
3973
3973
|
blur?: boolean;
|
|
3974
3974
|
shadow?: boolean;
|
package/dist/index.mjs
CHANGED
|
@@ -6899,7 +6899,7 @@ var MoonUISelectPro = SelectPrimitive.Root;
|
|
|
6899
6899
|
MoonUISelectPro.displayName = "MoonUISelectPro";
|
|
6900
6900
|
var MoonUISelectGroupPro = SelectPrimitive.Group;
|
|
6901
6901
|
var MoonUISelectValuePro = SelectPrimitive.Value;
|
|
6902
|
-
var MoonUISelectTriggerPro = React71.forwardRef(({ className, children, variant = "standard", size: size4 = "md", error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6902
|
+
var MoonUISelectTriggerPro = React71.forwardRef(({ className, children, variant = "standard", size: size4 = "md", error, success, loading, leftIcon, rightIcon, clearable, onClear, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6903
6903
|
SelectPrimitive.Trigger,
|
|
6904
6904
|
{
|
|
6905
6905
|
ref,
|
|
@@ -6917,10 +6917,10 @@ var MoonUISelectTriggerPro = React71.forwardRef(({ className, children, variant
|
|
|
6917
6917
|
size4 === "md" && "h-10 text-sm px-3",
|
|
6918
6918
|
size4 === "lg" && "h-12 text-base px-4",
|
|
6919
6919
|
/* Visual variants */
|
|
6920
|
-
variant === "standard" && "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-
|
|
6921
|
-
variant === "outline" && "border border-gray-300 dark:border-gray-700 bg-transparent hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/
|
|
6922
|
-
variant === "ghost" && "border-none bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/
|
|
6923
|
-
variant === "underline" && "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary",
|
|
6920
|
+
variant === "standard" && "border border-gray-300 dark:border-gray-700 bg-background dark:bg-gray-800/80 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
6921
|
+
variant === "outline" && "border border-gray-300 dark:border-gray-700 bg-transparent dark:text-gray-200 hover:border-gray-400 dark:hover:border-gray-600 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
6922
|
+
variant === "ghost" && "border-none bg-gray-100 dark:bg-gray-800 dark:shadow-inner dark:shadow-gray-950/10 dark:text-gray-200 hover:bg-gray-200 dark:hover:bg-gray-700 focus-visible:ring-2 focus-visible:ring-primary/30 dark:focus-visible:ring-primary/20",
|
|
6923
|
+
variant === "underline" && "border-t-0 border-l-0 border-r-0 border-b border-gray-300 dark:border-gray-600 rounded-none px-0 dark:text-gray-200 dark:bg-transparent hover:border-gray-400 dark:hover:border-gray-500 focus-visible:ring-0 focus-visible:border-b-2 focus-visible:border-primary dark:focus-visible:border-primary/80",
|
|
6924
6924
|
className
|
|
6925
6925
|
),
|
|
6926
6926
|
...props,
|
|
@@ -6936,6 +6936,19 @@ var MoonUISelectTriggerPro = React71.forwardRef(({ className, children, variant
|
|
|
6936
6936
|
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground dark:text-gray-400", children: "Loading..." })
|
|
6937
6937
|
] }) : children
|
|
6938
6938
|
] }),
|
|
6939
|
+
!loading && clearable && onClear && /* @__PURE__ */ jsx(
|
|
6940
|
+
"button",
|
|
6941
|
+
{
|
|
6942
|
+
type: "button",
|
|
6943
|
+
onClick: (e) => {
|
|
6944
|
+
e.stopPropagation();
|
|
6945
|
+
onClear();
|
|
6946
|
+
},
|
|
6947
|
+
className: "flex items-center justify-center opacity-60 hover:opacity-100 transition-opacity mr-1",
|
|
6948
|
+
"aria-label": "Clear selection",
|
|
6949
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-3.5 w-3.5" })
|
|
6950
|
+
}
|
|
6951
|
+
),
|
|
6939
6952
|
!loading && /* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: rightIcon ? /* @__PURE__ */ jsx("span", { className: "opacity-60", children: rightIcon }) : /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-60 transition-transform duration-200 ease-out group-data-[state=open]:rotate-180" }) })
|
|
6940
6953
|
]
|
|
6941
6954
|
}
|
|
@@ -6995,7 +7008,7 @@ var MoonUISelectContentPro = React71.forwardRef(({ className, children, position
|
|
|
6995
7008
|
[
|
|
6996
7009
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
|
|
6997
7010
|
"rounded-md border border-gray-200 dark:border-gray-700",
|
|
6998
|
-
"bg-
|
|
7011
|
+
"bg-background dark:bg-gray-800/80 backdrop-blur-sm text-foreground dark:text-gray-200",
|
|
6999
7012
|
"shadow-lg dark:shadow-gray-900/20",
|
|
7000
7013
|
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
7001
7014
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -7070,7 +7083,10 @@ var MoonUISelectItemPro = React71.forwardRef(({ className, children, variant = "
|
|
|
7070
7083
|
{
|
|
7071
7084
|
ref,
|
|
7072
7085
|
className: cn(
|
|
7073
|
-
"
|
|
7086
|
+
"moonui-theme",
|
|
7087
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm outline-none",
|
|
7088
|
+
"data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
7089
|
+
"transition-all duration-150",
|
|
7074
7090
|
/* Size variants */
|
|
7075
7091
|
size4 === "sm" && "py-1 pl-7 pr-2 text-xs",
|
|
7076
7092
|
size4 === "md" && "py-1.5 pl-8 pr-2 text-sm",
|
|
@@ -79161,9 +79177,6 @@ function NavbarInternal({
|
|
|
79161
79177
|
] }) })
|
|
79162
79178
|
] });
|
|
79163
79179
|
const getHeight = () => {
|
|
79164
|
-
if (isMinimal && minimalConfig?.heightOnScroll) {
|
|
79165
|
-
return minimalConfig.heightOnScroll;
|
|
79166
|
-
}
|
|
79167
79180
|
switch (size4) {
|
|
79168
79181
|
case "sm":
|
|
79169
79182
|
return "h-14";
|
|
@@ -79173,15 +79186,12 @@ function NavbarInternal({
|
|
|
79173
79186
|
return "h-16";
|
|
79174
79187
|
}
|
|
79175
79188
|
};
|
|
79176
|
-
const shouldHideInMinimal = (element) => {
|
|
79177
|
-
return isMinimal && minimalConfig?.hideElements?.includes(element);
|
|
79178
|
-
};
|
|
79179
79189
|
const navClasses = cn(
|
|
79180
|
-
"moonui-pro w-full transition-all",
|
|
79181
|
-
`duration-${minimalConfig?.animationDuration || 300}`,
|
|
79190
|
+
"moonui-pro w-full transition-all duration-300 ease-in-out",
|
|
79182
79191
|
// Base variant styles
|
|
79183
79192
|
variant === "default" && "border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",
|
|
79184
79193
|
variant === "floating" && "mx-4 mt-4 rounded-lg border bg-background/95 backdrop-blur shadow-lg",
|
|
79194
|
+
variant === "floating-centered" && "mx-auto my-4 max-w-5xl rounded-2xl border border-border/40 bg-background/70 backdrop-blur-xl shadow-lg shadow-black/5 dark:shadow-black/20 px-6",
|
|
79185
79195
|
variant === "minimal" && "bg-background",
|
|
79186
79196
|
variant === "transparent" && "bg-transparent",
|
|
79187
79197
|
// Sticky behavior
|
|
@@ -79190,9 +79200,6 @@ function NavbarInternal({
|
|
|
79190
79200
|
scrolled && sticky && variant !== "transparent" && "shadow-sm",
|
|
79191
79201
|
scrolled && variant === "transparent" && "bg-background/95 backdrop-blur border-b",
|
|
79192
79202
|
scrollBehavior === "hide" && hidden && "-translate-y-full",
|
|
79193
|
-
// Minimal mode styles
|
|
79194
|
-
scrollBehavior === "minimal" && isMinimal && "shadow-md border-b",
|
|
79195
|
-
scrollBehavior === "minimal" && isMinimal && minimalConfig?.centerOnScroll && "px-8",
|
|
79196
79203
|
// Glass effect
|
|
79197
79204
|
glassmorphism && "bg-background/80 backdrop-blur-xl border-white/10",
|
|
79198
79205
|
blur2 && "backdrop-blur-md",
|
|
@@ -79209,23 +79216,18 @@ function NavbarInternal({
|
|
|
79209
79216
|
"div",
|
|
79210
79217
|
{
|
|
79211
79218
|
className: cn(
|
|
79212
|
-
"flex items-center",
|
|
79219
|
+
"flex items-center transition-[height] duration-300 ease-in-out",
|
|
79213
79220
|
getHeight(),
|
|
79214
79221
|
fullWidth ? "w-full px-4 sm:px-6 lg:px-8" : maxWidth === "sm" && "container max-w-screen-sm" || maxWidth === "md" && "container max-w-screen-md" || maxWidth === "lg" && "container max-w-screen-lg" || maxWidth === "xl" && "container max-w-screen-xl" || maxWidth === "2xl" && "container max-w-screen-2xl" || maxWidth === "full" && "w-full px-4 sm:px-6 lg:px-8"
|
|
79215
79222
|
),
|
|
79216
79223
|
children: [
|
|
79217
79224
|
branding && /* @__PURE__ */ jsxs(
|
|
79218
|
-
|
|
79225
|
+
"div",
|
|
79219
79226
|
{
|
|
79220
79227
|
className: cn(
|
|
79221
79228
|
"flex items-center gap-2",
|
|
79222
|
-
logoPosition === "center" && !isMobile ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
|
|
79229
|
+
logoPosition === "center" && !isMobile && variant !== "floating-centered" ? "absolute left-1/2 -translate-x-1/2" : "mr-4"
|
|
79223
79230
|
),
|
|
79224
|
-
animate: {
|
|
79225
|
-
scale: isMinimal ? 0.9 : 1,
|
|
79226
|
-
opacity: shouldHideInMinimal("logo-text") ? 0.8 : 1
|
|
79227
|
-
},
|
|
79228
|
-
transition: { duration: minimalConfig?.animationDuration ? minimalConfig.animationDuration / 1e3 : 0.3 },
|
|
79229
79231
|
children: [
|
|
79230
79232
|
logoPosition === "left" && mobileMenuPosition === "left" && /* @__PURE__ */ jsx(MobileMenu, {}),
|
|
79231
79233
|
/* @__PURE__ */ jsxs(
|
|
@@ -79241,18 +79243,7 @@ function NavbarInternal({
|
|
|
79241
79243
|
className: "flex items-center gap-2",
|
|
79242
79244
|
children: [
|
|
79243
79245
|
branding.logo,
|
|
79244
|
-
branding.title && !isMobile &&
|
|
79245
|
-
motion.span,
|
|
79246
|
-
{
|
|
79247
|
-
className: "font-semibold text-lg",
|
|
79248
|
-
animate: {
|
|
79249
|
-
opacity: shouldHideInMinimal("logo-text") ? 0 : 1,
|
|
79250
|
-
width: shouldHideInMinimal("logo-text") ? 0 : "auto"
|
|
79251
|
-
},
|
|
79252
|
-
transition: { duration: 0.3 },
|
|
79253
|
-
children: branding.title
|
|
79254
|
-
}
|
|
79255
|
-
)
|
|
79246
|
+
branding.title && !isMobile && /* @__PURE__ */ jsx("span", { className: "font-semibold text-lg", children: branding.title })
|
|
79256
79247
|
]
|
|
79257
79248
|
}
|
|
79258
79249
|
)
|
|
@@ -79264,12 +79255,13 @@ function NavbarInternal({
|
|
|
79264
79255
|
{
|
|
79265
79256
|
className: cn(
|
|
79266
79257
|
"hidden md:flex",
|
|
79267
|
-
navItemsPosition === "center" && "flex-1 justify-center mx-4",
|
|
79258
|
+
navItemsPosition === "center" && variant !== "floating-centered" && "flex-1 justify-center mx-4",
|
|
79259
|
+
navItemsPosition === "center" && variant === "floating-centered" && "flex-1 justify-center",
|
|
79268
79260
|
navItemsPosition === "right" && "ml-auto",
|
|
79269
79261
|
navItemsPosition === "left" && "ml-4",
|
|
79270
79262
|
// Keep position consistent in minimal mode unless centerOnScroll is enabled
|
|
79271
79263
|
isMinimal && minimalConfig?.centerOnScroll && navItemsPosition !== "center" && "flex-1 justify-center",
|
|
79272
|
-
navItemsPosition === "center" && "absolute left-1/2 transform -translate-x-1/2"
|
|
79264
|
+
navItemsPosition === "center" && variant !== "floating-centered" && "absolute left-1/2 transform -translate-x-1/2"
|
|
79273
79265
|
),
|
|
79274
79266
|
children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React71__default.Fragment, { children: section.items.map((item) => {
|
|
79275
79267
|
const hasChildren = item.items && item.items.length > 0;
|
|
@@ -79339,7 +79331,7 @@ function NavbarInternal({
|
|
|
79339
79331
|
}
|
|
79340
79332
|
),
|
|
79341
79333
|
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
79342
|
-
showSearch &&
|
|
79334
|
+
showSearch && /* @__PURE__ */ jsx(Fragment, { children: isMobile ? /* @__PURE__ */ jsx(
|
|
79343
79335
|
MoonUIButtonPro,
|
|
79344
79336
|
{
|
|
79345
79337
|
variant: "ghost",
|
|
@@ -79587,7 +79579,7 @@ function NavbarInternal({
|
|
|
79587
79579
|
}
|
|
79588
79580
|
)
|
|
79589
79581
|
] }),
|
|
79590
|
-
cta &&
|
|
79582
|
+
cta && /* @__PURE__ */ jsx(
|
|
79591
79583
|
MoonUIButtonPro,
|
|
79592
79584
|
{
|
|
79593
79585
|
variant: cta.variant || "primary",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.18",
|
|
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",
|