@yomologic/react-ui 0.6.5 → 0.6.7
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.js +16 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -8
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +65 -18
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4419,6 +4419,13 @@ var Nav = import_react21.default.forwardRef(
|
|
|
4419
4419
|
lg: "px-4 py-2.5",
|
|
4420
4420
|
xl: "px-5 py-3"
|
|
4421
4421
|
};
|
|
4422
|
+
const mobilePaddingStyles = {
|
|
4423
|
+
xs: "px-3 py-2.5",
|
|
4424
|
+
sm: "px-3 py-3",
|
|
4425
|
+
md: "px-4 py-3",
|
|
4426
|
+
lg: "px-4 py-3.5",
|
|
4427
|
+
xl: "px-5 py-4"
|
|
4428
|
+
};
|
|
4422
4429
|
const fontSizeStyles = {
|
|
4423
4430
|
xs: "[font-size:var(--nav-font-size-xs)]",
|
|
4424
4431
|
sm: "[font-size:var(--nav-font-size-sm)]",
|
|
@@ -4427,16 +4434,16 @@ var Nav = import_react21.default.forwardRef(
|
|
|
4427
4434
|
xl: "[font-size:var(--nav-font-size-xl)]"
|
|
4428
4435
|
};
|
|
4429
4436
|
const variantItemStyles = {
|
|
4430
|
-
primary: "rounded-md hover:bg-(--color-primary)/10 hover:text-(--color-primary) transition-colors duration-150",
|
|
4431
|
-
secondary: "rounded-md hover:bg-(--color-muted) transition-colors duration-150",
|
|
4432
|
-
ghost: "rounded-md hover:
|
|
4433
|
-
underline: "relative hover:text-(--color-primary) transition-colors duration-150 after:content-[''] after:absolute after:bottom-0 after:left-0 after:h-0.5 after:bg-(--color-primary) after:
|
|
4437
|
+
primary: "rounded-md hover:bg-(--color-primary)/10 hover:text-(--color-primary) active:bg-(--color-primary)/20 transition-colors duration-150",
|
|
4438
|
+
secondary: "rounded-md hover:bg-(--color-muted) active:bg-(--color-muted)/80 transition-colors duration-150",
|
|
4439
|
+
ghost: "rounded-md hover:text-(--color-primary) active:text-(--color-primary) transition-colors duration-150",
|
|
4440
|
+
underline: "relative hover:text-(--color-primary) active:text-(--color-primary) transition-colors duration-150 after:content-[''] after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:bg-(--color-primary) after:scale-x-0 hover:after:scale-x-100 active:after:scale-x-100 after:transition-transform after:duration-300 after:origin-center"
|
|
4434
4441
|
};
|
|
4435
4442
|
const activeItemStyles = {
|
|
4436
|
-
primary: "bg-(--color-primary) text-white hover:bg-(--color-primary) hover:text-white",
|
|
4437
|
-
secondary: "bg-(--color-muted) text-(--color-foreground) font-semibold",
|
|
4443
|
+
primary: "bg-(--color-primary) text-white hover:bg-(--color-primary) hover:text-white active:bg-(--color-primary)/90",
|
|
4444
|
+
secondary: "bg-(--color-muted) text-(--color-foreground) font-semibold active:bg-(--color-muted)/80",
|
|
4438
4445
|
ghost: "text-(--color-primary) font-medium",
|
|
4439
|
-
underline: "text-(--color-primary) after:content-[''] after:absolute after:bottom-0 after:left-0 after:h-0.5 after:
|
|
4446
|
+
underline: "text-(--color-primary) after:content-[''] after:absolute after:bottom-0 after:left-0 after:right-0 after:h-0.5 after:scale-x-100 after:bg-(--color-primary)"
|
|
4440
4447
|
};
|
|
4441
4448
|
const breakpointClasses = {
|
|
4442
4449
|
sm: "sm:hidden",
|
|
@@ -4484,11 +4491,12 @@ var Nav = import_react21.default.forwardRef(
|
|
|
4484
4491
|
const hasChildren = item.children && item.children.length > 0;
|
|
4485
4492
|
const itemBaseStyles = cn(
|
|
4486
4493
|
"flex items-center [gap:var(--nav-gap)] font-medium text-(--color-foreground) cursor-pointer select-none",
|
|
4487
|
-
itemPaddingStyles[size],
|
|
4494
|
+
isMobile ? mobilePaddingStyles[size] : itemPaddingStyles[size],
|
|
4488
4495
|
fontSizeStyles[size],
|
|
4489
4496
|
variantItemStyles[variant],
|
|
4490
4497
|
isActive && activeItemStyles[variant],
|
|
4491
4498
|
orientation === "vertical" && "w-full",
|
|
4499
|
+
isMobile && "w-full",
|
|
4492
4500
|
item.disabled && "opacity-50 cursor-not-allowed"
|
|
4493
4501
|
);
|
|
4494
4502
|
const content = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
|