nexoreui 1.8.4 → 1.8.6

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
@@ -10,11 +10,11 @@ function cn(...inputs) {
10
10
  }
11
11
 
12
12
  // src/components/button.tsx
13
- import { motion } from "framer-motion";
13
+ import { motion, useReducedMotion } from "framer-motion";
14
14
  import { Loader2 } from "lucide-react";
15
15
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
16
16
  var buttonVariants = cva(
17
- "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-95",
17
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-95",
18
18
  {
19
19
  variants: {
20
20
  variant: {
@@ -37,9 +37,9 @@ var buttonVariants = cva(
37
37
  },
38
38
  size: {
39
39
  default: "h-10 px-5 py-2",
40
- sm: "h-9 rounded-lg px-3 text-xs",
41
- lg: "h-11 rounded-xl px-8 text-base",
42
- icon: "h-10 w-10 rounded-full"
40
+ sm: "h-9 rounded-sm px-3 text-xs",
41
+ lg: "h-11 rounded-lg px-8 text-base",
42
+ icon: "h-10 w-10 rounded-md"
43
43
  }
44
44
  },
45
45
  defaultVariants: {
@@ -105,7 +105,9 @@ var Button = React.forwardRef(
105
105
  isShimmer && "relative overflow-hidden",
106
106
  isGlow && "shadow-[0_0_var(--glow-radius)_rgba(var(--glow-color),var(--glow-strength))]"
107
107
  );
108
- if (!animate) {
108
+ const shouldReduceMotion = useReducedMotion();
109
+ const shouldAnimate = animate && !shouldReduceMotion;
110
+ if (!shouldAnimate) {
109
111
  return /* @__PURE__ */ jsx(
110
112
  "button",
111
113
  {
@@ -264,11 +266,11 @@ GlassButton.displayName = "GlassButton";
264
266
 
265
267
  // src/components/card.tsx
266
268
  import * as React2 from "react";
267
- import { motion as motion2 } from "framer-motion";
269
+ import { motion as motion2, useReducedMotion as useReducedMotion2 } from "framer-motion";
268
270
  import { cva as cva2 } from "class-variance-authority";
269
271
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
270
272
  var cardVariants = cva2(
271
- "rounded-2xl text-card-foreground transition-all duration-300 overflow-hidden",
273
+ "rounded-xl text-card-foreground transition-all duration-300 overflow-hidden",
272
274
  {
273
275
  variants: {
274
276
  variant: {
@@ -349,8 +351,8 @@ var Card = React2.forwardRef(
349
351
  animate: { rotateY: isFlipped ? 180 : 0 },
350
352
  transition: { type: "spring", stiffness: 300, damping: 22 },
351
353
  children: [
352
- /* @__PURE__ */ jsx2("div", { className: "absolute inset-0 backface-hidden border bg-card text-card-foreground rounded-2xl shadow-sm flex flex-col justify-between overflow-hidden", children }),
353
- /* @__PURE__ */ jsx2("div", { className: "absolute inset-0 backface-hidden rotate-y-180 border bg-linear-to-br from-primary/10 to-primary/5 text-card-foreground rounded-2xl shadow-sm flex flex-col p-6 items-center justify-center text-center overflow-hidden", children: backContent || /* @__PURE__ */ jsx2("div", { className: "text-sm font-medium text-muted-foreground", children: "Flip side content placeholder" }) })
354
+ /* @__PURE__ */ jsx2("div", { className: "absolute inset-0 backface-hidden border bg-card text-card-foreground rounded-xl shadow-sm flex flex-col justify-between overflow-hidden", children }),
355
+ /* @__PURE__ */ jsx2("div", { className: "absolute inset-0 backface-hidden rotate-y-180 border bg-linear-to-br from-primary/10 to-primary/5 text-card-foreground rounded-xl shadow-sm flex flex-col p-6 items-center justify-center text-center overflow-hidden", children: backContent || /* @__PURE__ */ jsx2("div", { className: "text-sm font-medium text-muted-foreground", children: "Flip side content placeholder" }) })
354
356
  ]
355
357
  }
356
358
  )
@@ -360,14 +362,16 @@ var Card = React2.forwardRef(
360
362
  const spotlightEffect = isSpotlight && /* @__PURE__ */ jsx2(
361
363
  "div",
362
364
  {
363
- className: "pointer-events-none absolute -inset-px rounded-2xl opacity-0 hover:opacity-100 group-hover:opacity-100 transition-opacity duration-300",
365
+ className: "pointer-events-none absolute -inset-px rounded-xl opacity-0 hover:opacity-100 group-hover:opacity-100 transition-opacity duration-300",
364
366
  style: {
365
367
  background: `radial-gradient(400px circle at ${mousePos.x}px ${mousePos.y}px, ${spotlightColor}, transparent 80%)`
366
368
  }
367
369
  }
368
370
  );
369
371
  const cardClass = cn(cardVariants({ variant, hover: isFlip || isTilt ? "none" : hover, className }), isSpotlight && "group");
370
- if (animate || isTilt) {
372
+ const shouldReduceMotion = useReducedMotion2();
373
+ const shouldAnimate = animate && !shouldReduceMotion || isTilt;
374
+ if (shouldAnimate) {
371
375
  return /* @__PURE__ */ jsxs2(
372
376
  motion2.div,
373
377
  {
@@ -4311,7 +4315,7 @@ function Divider({ orientation = "horizontal", className, ...props }) {
4311
4315
 
4312
4316
  // src/components/aurora-border-card.tsx
4313
4317
  import * as React26 from "react";
4314
- import { motion as motion19, useReducedMotion } from "framer-motion";
4318
+ import { motion as motion19, useReducedMotion as useReducedMotion3 } from "framer-motion";
4315
4319
  import { Sparkles, ArrowRight } from "lucide-react";
4316
4320
  import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
4317
4321
  var radiusMap = {
@@ -4362,7 +4366,7 @@ var AuroraBorderCard = React26.forwardRef(
4362
4366
  children,
4363
4367
  ...props
4364
4368
  }, ref) => {
4365
- const shouldReduceMotion = useReducedMotion();
4369
+ const shouldReduceMotion = useReducedMotion3();
4366
4370
  const duration = speedDurations[speed] || 2.5;
4367
4371
  const radiusConfig = radiusMap[radius] || radiusMap.xl;
4368
4372
  const colors = variantColorStops[variant] || variantColorStops.aurora;
@@ -4546,7 +4550,7 @@ AuroraBorderCard.displayName = "AuroraBorderCard";
4546
4550
 
4547
4551
  // src/components/ai-prompt-input.tsx
4548
4552
  import * as React27 from "react";
4549
- import { motion as motion20, AnimatePresence as AnimatePresence5, useReducedMotion as useReducedMotion2 } from "framer-motion";
4553
+ import { motion as motion20, AnimatePresence as AnimatePresence5, useReducedMotion as useReducedMotion4 } from "framer-motion";
4550
4554
  import {
4551
4555
  Send,
4552
4556
  Square,
@@ -4627,7 +4631,7 @@ var AiPromptInput = React27.forwardRef(
4627
4631
  const [internalFiles, setInternalFiles] = React27.useState([]);
4628
4632
  const fileInputRef = React27.useRef(null);
4629
4633
  const textareaRef = React27.useRef(null);
4630
- const shouldReduceMotion = useReducedMotion2();
4634
+ const shouldReduceMotion = useReducedMotion4();
4631
4635
  const id = React27.useId().replace(/:/g, "");
4632
4636
  const isControlled = controlledValue !== void 0;
4633
4637
  const value = isControlled ? controlledValue : internalValue;