nexoreui-cli 1.8.5 → 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.js +34 -22
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2864,11 +2864,11 @@ var button = {
|
|
|
2864
2864
|
import * as React from 'react';
|
|
2865
2865
|
import { cva, type VariantProps } from 'class-variance-authority';
|
|
2866
2866
|
import { cn } from '../utils/cn';
|
|
2867
|
-
import { motion } from 'framer-motion';
|
|
2867
|
+
import { motion, useReducedMotion } from 'framer-motion';
|
|
2868
2868
|
import { Loader2 } from 'lucide-react';
|
|
2869
2869
|
|
|
2870
2870
|
const buttonVariants = cva(
|
|
2871
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-
|
|
2871
|
+
"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",
|
|
2872
2872
|
{
|
|
2873
2873
|
variants: {
|
|
2874
2874
|
variant: {
|
|
@@ -2891,9 +2891,9 @@ const buttonVariants = cva(
|
|
|
2891
2891
|
},
|
|
2892
2892
|
size: {
|
|
2893
2893
|
default: "h-10 px-5 py-2",
|
|
2894
|
-
sm: "h-9 rounded-
|
|
2895
|
-
lg: "h-11 rounded-
|
|
2896
|
-
icon: "h-10 w-10 rounded-
|
|
2894
|
+
sm: "h-9 rounded-sm px-3 text-xs",
|
|
2895
|
+
lg: "h-11 rounded-lg px-8 text-base",
|
|
2896
|
+
icon: "h-10 w-10 rounded-md",
|
|
2897
2897
|
},
|
|
2898
2898
|
},
|
|
2899
2899
|
defaultVariants: {
|
|
@@ -3006,7 +3006,10 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
|
|
3006
3006
|
isGlow && "shadow-[0_0_var(--glow-radius)_rgba(var(--glow-color),var(--glow-strength))]"
|
|
3007
3007
|
);
|
|
3008
3008
|
|
|
3009
|
-
|
|
3009
|
+
const shouldReduceMotion = useReducedMotion();
|
|
3010
|
+
const shouldAnimate = animate && !shouldReduceMotion;
|
|
3011
|
+
|
|
3012
|
+
if (!shouldAnimate) {
|
|
3010
3013
|
return (
|
|
3011
3014
|
<button
|
|
3012
3015
|
ref={ref}
|
|
@@ -3277,11 +3280,11 @@ var card = {
|
|
|
3277
3280
|
|
|
3278
3281
|
import * as React from "react"
|
|
3279
3282
|
import { cn } from "../utils/cn"
|
|
3280
|
-
import { motion } from "framer-motion"
|
|
3283
|
+
import { motion, useReducedMotion } from "framer-motion"
|
|
3281
3284
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
3282
3285
|
|
|
3283
3286
|
const cardVariants = cva(
|
|
3284
|
-
"rounded-
|
|
3287
|
+
"rounded-xl text-card-foreground transition-all duration-300 overflow-hidden",
|
|
3285
3288
|
{
|
|
3286
3289
|
variants: {
|
|
3287
3290
|
variant: {
|
|
@@ -3399,12 +3402,12 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
3399
3402
|
transition={{ type: "spring", stiffness: 300, damping: 22 }}
|
|
3400
3403
|
>
|
|
3401
3404
|
{/* Front Face */}
|
|
3402
|
-
<div className="absolute inset-0 backface-hidden border bg-card text-card-foreground rounded-
|
|
3405
|
+
<div className="absolute inset-0 backface-hidden border bg-card text-card-foreground rounded-xl shadow-sm flex flex-col justify-between overflow-hidden">
|
|
3403
3406
|
{children}
|
|
3404
3407
|
</div>
|
|
3405
3408
|
|
|
3406
3409
|
{/* Back Face */}
|
|
3407
|
-
<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-
|
|
3410
|
+
<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">
|
|
3408
3411
|
{backContent || (
|
|
3409
3412
|
<div className="text-sm font-medium text-muted-foreground">
|
|
3410
3413
|
Flip side content placeholder
|
|
@@ -3419,7 +3422,7 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
3419
3422
|
// Spotlight Variant Render Extra Element
|
|
3420
3423
|
const spotlightEffect = isSpotlight && (
|
|
3421
3424
|
<div
|
|
3422
|
-
className="pointer-events-none absolute -inset-px rounded-
|
|
3425
|
+
className="pointer-events-none absolute -inset-px rounded-xl opacity-0 hover:opacity-100 group-hover:opacity-100 transition-opacity duration-300"
|
|
3423
3426
|
style={{
|
|
3424
3427
|
background: \`radial-gradient(400px circle at \${mousePos.x}px \${mousePos.y}px, \${spotlightColor}, transparent 80%)\`,
|
|
3425
3428
|
}}
|
|
@@ -3429,7 +3432,10 @@ const Card = React.forwardRef<HTMLDivElement, CardProps>(
|
|
|
3429
3432
|
// Build the resolved element attributes
|
|
3430
3433
|
const cardClass = cn(cardVariants({ variant, hover: isFlip || isTilt ? "none" : hover, className }), isSpotlight && "group");
|
|
3431
3434
|
|
|
3432
|
-
|
|
3435
|
+
const shouldReduceMotion = useReducedMotion();
|
|
3436
|
+
const shouldAnimate = (animate && !shouldReduceMotion) || isTilt;
|
|
3437
|
+
|
|
3438
|
+
if (shouldAnimate) {
|
|
3433
3439
|
return (
|
|
3434
3440
|
<motion.div
|
|
3435
3441
|
ref={ref}
|
|
@@ -37834,8 +37840,9 @@ function injectThemeCss(baseDir, cssRelativePath, themeName, radiusValue, fontFa
|
|
|
37834
37840
|
--motion-ease: linear;
|
|
37835
37841
|
--motion-duration: 0s;
|
|
37836
37842
|
}
|
|
37837
|
-
button, a, input, select, textarea, [role="button"] {
|
|
37843
|
+
button, a, input, select, textarea, [role="button"], [class*="card"] {
|
|
37838
37844
|
transition-duration: 0s !important;
|
|
37845
|
+
transform: none !important;
|
|
37839
37846
|
}
|
|
37840
37847
|
`;
|
|
37841
37848
|
} else if (animationStyle === "subtle") {
|
|
@@ -37876,9 +37883,13 @@ button, a, input, select, textarea, [role="button"] {
|
|
|
37876
37883
|
--color-border: var(--border);
|
|
37877
37884
|
--color-input: var(--input);
|
|
37878
37885
|
--color-ring: var(--ring);
|
|
37886
|
+
--radius-3xl: max(0rem, calc(var(--radius) * 2));
|
|
37887
|
+
--radius-2xl: max(0rem, calc(var(--radius) * 1.5));
|
|
37888
|
+
--radius-xl: max(0rem, calc(var(--radius) * 1.25));
|
|
37879
37889
|
--radius-lg: var(--radius);
|
|
37880
|
-
--radius-md: calc(var(--radius) - 2px);
|
|
37881
|
-
--radius-sm: calc(var(--radius) - 4px);
|
|
37890
|
+
--radius-md: max(0rem, calc(var(--radius) - 2px));
|
|
37891
|
+
--radius-sm: max(0rem, calc(var(--radius) - 4px));
|
|
37892
|
+
--radius: var(--radius);
|
|
37882
37893
|
--font-sans: ${selectedFont};
|
|
37883
37894
|
}
|
|
37884
37895
|
|
|
@@ -38150,6 +38161,7 @@ async function createCommand(projectName, options = {}) {
|
|
|
38150
38161
|
} catch {
|
|
38151
38162
|
}
|
|
38152
38163
|
const appTsxPath = path6.join(targetDir, "src", "App.tsx");
|
|
38164
|
+
const isNoAnim = options.animation === "none";
|
|
38153
38165
|
const starterAppCode = `import { useState } from 'react';
|
|
38154
38166
|
import { Button } from '@/components/ui/button';
|
|
38155
38167
|
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from '@/components/ui/card';
|
|
@@ -38162,7 +38174,7 @@ export default function App() {
|
|
|
38162
38174
|
<main className="min-h-screen bg-background text-foreground flex flex-col items-center justify-center p-6 transition-colors selection:bg-primary/20">
|
|
38163
38175
|
<div className="max-w-xl w-full space-y-8 text-center">
|
|
38164
38176
|
{/* Status Badge */}
|
|
38165
|
-
<div className="inline-flex items-center gap-2 px-3.5 py-1.5 rounded-
|
|
38177
|
+
<div className="inline-flex items-center gap-2 px-3.5 py-1.5 rounded-md bg-primary/10 border border-primary/20 text-xs font-semibold text-primary shadow-xs">
|
|
38166
38178
|
<Sparkles className="h-3.5 w-3.5" />
|
|
38167
38179
|
<span>NexoreUI + Tailwind CSS v4</span>
|
|
38168
38180
|
</div>
|
|
@@ -38178,7 +38190,7 @@ export default function App() {
|
|
|
38178
38190
|
</div>
|
|
38179
38191
|
|
|
38180
38192
|
{/* Demo Interactive Card */}
|
|
38181
|
-
<Card className="max-w-md mx-auto text-left shadow-xl border-border/80">
|
|
38193
|
+
<Card ${isNoAnim ? 'hover="none" animate={false} ' : ""}className="max-w-md mx-auto text-left shadow-xl border-border/80">
|
|
38182
38194
|
<CardHeader>
|
|
38183
38195
|
<CardTitle className="text-base flex items-center gap-2">
|
|
38184
38196
|
<Layers className="h-4 w-4 text-primary" />
|
|
@@ -38189,17 +38201,17 @@ export default function App() {
|
|
|
38189
38201
|
</CardDescription>
|
|
38190
38202
|
</CardHeader>
|
|
38191
38203
|
<CardContent className="space-y-4">
|
|
38192
|
-
<div className="flex items-center justify-between p-3 rounded-
|
|
38204
|
+
<div className="flex items-center justify-between p-3 rounded-md bg-muted/50 border border-border/60">
|
|
38193
38205
|
<span className="text-xs font-medium">Click Counter</span>
|
|
38194
|
-
<span className="text-xs font-mono font-bold px-2.5 py-0.5 rounded-
|
|
38206
|
+
<span className="text-xs font-mono font-bold px-2.5 py-0.5 rounded-sm bg-primary/15 text-primary">
|
|
38195
38207
|
{count} clicks
|
|
38196
38208
|
</span>
|
|
38197
38209
|
</div>
|
|
38198
38210
|
<div className="flex items-center gap-3">
|
|
38199
|
-
<Button onClick={() => setCount((c) => c + 1)} className="flex-1">
|
|
38211
|
+
<Button ${isNoAnim ? "animate={false} " : ""}onClick={() => setCount((c) => c + 1)} className="flex-1">
|
|
38200
38212
|
Increment Count
|
|
38201
38213
|
</Button>
|
|
38202
|
-
<Button variant="outline" onClick={() => setCount(0)}>
|
|
38214
|
+
<Button ${isNoAnim ? "animate={false} " : ""}variant="outline" onClick={() => setCount(0)}>
|
|
38203
38215
|
Reset
|
|
38204
38216
|
</Button>
|
|
38205
38217
|
</div>
|
|
@@ -38207,7 +38219,7 @@ export default function App() {
|
|
|
38207
38219
|
</Card>
|
|
38208
38220
|
|
|
38209
38221
|
{/* CLI Hint */}
|
|
38210
|
-
<div className="p-3.5 rounded-
|
|
38222
|
+
<div className="p-3.5 rounded-md bg-muted/40 border border-border text-xs text-muted-foreground font-mono inline-flex items-center gap-2">
|
|
38211
38223
|
<Terminal className="h-4 w-4 text-primary shrink-0" />
|
|
38212
38224
|
<span>npx nexoreui add --all</span>
|
|
38213
38225
|
</div>
|