@saasflare/ui 1.0.2 → 1.1.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/{chunk-7UB3R5JU.js → chunk-O3CFRMDK.js} +4 -4
- package/dist/{chunk-P2JF7JDY.mjs → chunk-QEKYM3BT.mjs} +1 -1
- package/dist/entries/carousel.js +3 -3
- package/dist/entries/carousel.mjs +1 -1
- package/dist/index.js +80 -80
- package/dist/index.mjs +3 -3
- package/package.json +13 -5
- package/styles/motion.css +154 -2
- package/styles/theme.css +0 -1
|
@@ -6,7 +6,7 @@ var React = require('react');
|
|
|
6
6
|
var classVarianceAuthority = require('class-variance-authority');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
8
|
var nextThemes = require('next-themes');
|
|
9
|
-
var
|
|
9
|
+
var react = require('motion/react');
|
|
10
10
|
var lucideReact = require('lucide-react');
|
|
11
11
|
var Slot = require('@radix-ui/react-slot');
|
|
12
12
|
|
|
@@ -359,7 +359,7 @@ function SaasflareProvider({
|
|
|
359
359
|
root.setAttribute(SAASFLARE_DATA_ATTR.radius, currentRadius);
|
|
360
360
|
root.setAttribute(SAASFLARE_DATA_ATTR.animated, String(effectiveAnimated));
|
|
361
361
|
}, [currentPalette, currentStyle, currentRadius, effectiveAnimated]);
|
|
362
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
362
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domAnimation, strict: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
363
363
|
nextThemes.ThemeProvider,
|
|
364
364
|
{
|
|
365
365
|
attribute: "class",
|
|
@@ -454,7 +454,7 @@ function useSaasflareProps(props = {}) {
|
|
|
454
454
|
palette: ctx.palette
|
|
455
455
|
};
|
|
456
456
|
}
|
|
457
|
-
var MotionSlot =
|
|
457
|
+
var MotionSlot = react.m.create(Slot__namespace.Root);
|
|
458
458
|
var LEGACY_VARIANT_MAP = {
|
|
459
459
|
default: { variant: "solid", intent: "primary" },
|
|
460
460
|
destructive: { variant: "solid", intent: "danger" },
|
|
@@ -542,7 +542,7 @@ function Button({
|
|
|
542
542
|
);
|
|
543
543
|
}
|
|
544
544
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
545
|
-
|
|
545
|
+
react.m.button,
|
|
546
546
|
{
|
|
547
547
|
"data-slot": "button",
|
|
548
548
|
"data-variant": resolvedVariant,
|
|
@@ -5,7 +5,7 @@ import { createContext, useContext, useEffect, useCallback, useRef, useState } f
|
|
|
5
5
|
import { cva } from 'class-variance-authority';
|
|
6
6
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
7
7
|
import { ThemeProvider, useTheme } from 'next-themes';
|
|
8
|
-
import { m, LazyMotion, domAnimation } from '
|
|
8
|
+
import { m, LazyMotion, domAnimation } from 'motion/react';
|
|
9
9
|
import { Loader2Icon } from 'lucide-react';
|
|
10
10
|
import * as Slot from '@radix-ui/react-slot';
|
|
11
11
|
|
package/dist/entries/carousel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkO3CFRMDK_js = require('../chunk-O3CFRMDK.js');
|
|
4
4
|
var chunkJOVJRQO3_js = require('../chunk-JOVJRQO3.js');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var useEmblaCarousel = require('embla-carousel-react');
|
|
@@ -167,7 +167,7 @@ function CarouselPrevious({
|
|
|
167
167
|
}) {
|
|
168
168
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
169
169
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
170
|
-
|
|
170
|
+
chunkO3CFRMDK_js.Button,
|
|
171
171
|
{
|
|
172
172
|
"data-slot": "carousel-previous",
|
|
173
173
|
variant,
|
|
@@ -195,7 +195,7 @@ function CarouselNext({
|
|
|
195
195
|
}) {
|
|
196
196
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
197
197
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
198
|
-
|
|
198
|
+
chunkO3CFRMDK_js.Button,
|
|
199
199
|
{
|
|
200
200
|
"data-slot": "carousel-next",
|
|
201
201
|
variant,
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkO3CFRMDK_js = require('./chunk-O3CFRMDK.js');
|
|
5
5
|
var chunkJOVJRQO3_js = require('./chunk-JOVJRQO3.js');
|
|
6
6
|
var React9 = require('react');
|
|
7
|
-
var
|
|
7
|
+
var react = require('motion/react');
|
|
8
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
9
|
var DialogPrimitive = require('@radix-ui/react-dialog');
|
|
10
10
|
var lucideReact = require('lucide-react');
|
|
@@ -229,13 +229,13 @@ function usePagination(options) {
|
|
|
229
229
|
return { activePage, range, setPage, next, previous, first, last };
|
|
230
230
|
}
|
|
231
231
|
function Card({ className, ...props }) {
|
|
232
|
-
const reduced =
|
|
232
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
233
233
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
234
|
-
|
|
234
|
+
react.m.div,
|
|
235
235
|
{
|
|
236
236
|
"data-slot": "card",
|
|
237
237
|
whileHover: reduced ? void 0 : { y: -2, boxShadow: "0 8px 30px rgba(0,0,0,0.08)" },
|
|
238
|
-
transition: reduced ?
|
|
238
|
+
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.springGentle,
|
|
239
239
|
className: chunkJOVJRQO3_js.cn(
|
|
240
240
|
"flex flex-col gap-6 rounded-xl border bg-card py-6 text-card-foreground shadow-sm transition-[border-color] duration-300 hover:border-primary/20",
|
|
241
241
|
className
|
|
@@ -351,7 +351,7 @@ function DialogContent({
|
|
|
351
351
|
children,
|
|
352
352
|
...props
|
|
353
353
|
}) {
|
|
354
|
-
const reduced =
|
|
354
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
355
355
|
return /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
356
356
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
357
357
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -361,12 +361,12 @@ function DialogContent({
|
|
|
361
361
|
asChild: true,
|
|
362
362
|
...props,
|
|
363
363
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
364
|
-
|
|
364
|
+
react.m.div,
|
|
365
365
|
{
|
|
366
366
|
initial: reduced ? { opacity: 1 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
367
367
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
368
368
|
exit: reduced ? { opacity: 0 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
369
|
-
transition: reduced ?
|
|
369
|
+
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.springBouncy,
|
|
370
370
|
className: chunkJOVJRQO3_js.cn(
|
|
371
371
|
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",
|
|
372
372
|
className
|
|
@@ -466,7 +466,7 @@ function AlertDialogContent({
|
|
|
466
466
|
children,
|
|
467
467
|
...props
|
|
468
468
|
}) {
|
|
469
|
-
const reduced =
|
|
469
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
470
470
|
return /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
471
471
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
472
472
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -476,12 +476,12 @@ function AlertDialogContent({
|
|
|
476
476
|
asChild: true,
|
|
477
477
|
...props,
|
|
478
478
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
|
-
|
|
479
|
+
react.m.div,
|
|
480
480
|
{
|
|
481
481
|
initial: reduced ? { opacity: 1 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
482
482
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
483
483
|
exit: reduced ? { opacity: 0 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
484
|
-
transition: reduced ?
|
|
484
|
+
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.springBouncy,
|
|
485
485
|
className: chunkJOVJRQO3_js.cn(
|
|
486
486
|
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg sm:max-w-lg",
|
|
487
487
|
className
|
|
@@ -547,7 +547,7 @@ function AlertDialogAction({
|
|
|
547
547
|
AlertDialogPrimitive__namespace.Action,
|
|
548
548
|
{
|
|
549
549
|
"data-intent": "primary",
|
|
550
|
-
className: chunkJOVJRQO3_js.cn(
|
|
550
|
+
className: chunkJOVJRQO3_js.cn(chunkO3CFRMDK_js.buttonVariants({ variant: "solid" }), className),
|
|
551
551
|
...props
|
|
552
552
|
}
|
|
553
553
|
);
|
|
@@ -560,7 +560,7 @@ function AlertDialogCancel({
|
|
|
560
560
|
AlertDialogPrimitive__namespace.Cancel,
|
|
561
561
|
{
|
|
562
562
|
"data-intent": "neutral",
|
|
563
|
-
className: chunkJOVJRQO3_js.cn(
|
|
563
|
+
className: chunkJOVJRQO3_js.cn(chunkO3CFRMDK_js.buttonVariants({ variant: "outline" }), className),
|
|
564
564
|
...props
|
|
565
565
|
}
|
|
566
566
|
);
|
|
@@ -588,7 +588,7 @@ function AccordionTrigger({
|
|
|
588
588
|
children,
|
|
589
589
|
...props
|
|
590
590
|
}) {
|
|
591
|
-
const reduced =
|
|
591
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
592
592
|
return /* @__PURE__ */ jsxRuntime.jsx(AccordionPrimitive__namespace.Header, { className: "flex", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
593
593
|
AccordionPrimitive__namespace.Trigger,
|
|
594
594
|
{
|
|
@@ -601,11 +601,11 @@ function AccordionTrigger({
|
|
|
601
601
|
children: [
|
|
602
602
|
children,
|
|
603
603
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
604
|
-
|
|
604
|
+
react.m.div,
|
|
605
605
|
{
|
|
606
606
|
className: "pointer-events-none shrink-0 translate-y-0.5 text-muted-foreground",
|
|
607
607
|
animate: { rotate: 0 },
|
|
608
|
-
transition: reduced ? { duration: 0 } :
|
|
608
|
+
transition: reduced ? { duration: 0 } : chunkO3CFRMDK_js.springBouncy,
|
|
609
609
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDownIcon, { className: "size-4" })
|
|
610
610
|
}
|
|
611
611
|
)
|
|
@@ -618,7 +618,7 @@ function AccordionContent({
|
|
|
618
618
|
children,
|
|
619
619
|
...props
|
|
620
620
|
}) {
|
|
621
|
-
const reduced =
|
|
621
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
622
622
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
623
623
|
AccordionPrimitive__namespace.Content,
|
|
624
624
|
{
|
|
@@ -626,7 +626,7 @@ function AccordionContent({
|
|
|
626
626
|
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
627
627
|
...props,
|
|
628
628
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
629
|
-
|
|
629
|
+
react.m.div,
|
|
630
630
|
{
|
|
631
631
|
initial: reduced ? false : { opacity: 0 },
|
|
632
632
|
animate: { opacity: 1 },
|
|
@@ -678,7 +678,7 @@ function TabsList({
|
|
|
678
678
|
...props
|
|
679
679
|
}) {
|
|
680
680
|
const listRef = React9__namespace.useRef(null);
|
|
681
|
-
const reduced =
|
|
681
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
682
682
|
const [pos, setPos] = React9__namespace.useState(null);
|
|
683
683
|
React9__namespace.useLayoutEffect(() => {
|
|
684
684
|
const list = listRef.current;
|
|
@@ -727,7 +727,7 @@ function TabsList({
|
|
|
727
727
|
...props,
|
|
728
728
|
children: [
|
|
729
729
|
pos !== null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
730
|
-
|
|
730
|
+
react.m.div,
|
|
731
731
|
{
|
|
732
732
|
"data-slot": "tabs-indicator",
|
|
733
733
|
"aria-hidden": true,
|
|
@@ -738,7 +738,7 @@ function TabsList({
|
|
|
738
738
|
width: pos.width,
|
|
739
739
|
height: pos.height
|
|
740
740
|
},
|
|
741
|
-
transition: reduced ?
|
|
741
|
+
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.spring,
|
|
742
742
|
className: "pointer-events-none absolute top-0 left-0 rounded-md bg-background shadow-sm dark:border dark:border-input dark:bg-input/30",
|
|
743
743
|
style: { zIndex: 0 }
|
|
744
744
|
}
|
|
@@ -782,7 +782,7 @@ function TabsContent({
|
|
|
782
782
|
}
|
|
783
783
|
function Input({ className, type, ...props }) {
|
|
784
784
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
785
|
-
|
|
785
|
+
react.m.input,
|
|
786
786
|
{
|
|
787
787
|
type,
|
|
788
788
|
"data-slot": "input",
|
|
@@ -800,7 +800,7 @@ function Input({ className, type, ...props }) {
|
|
|
800
800
|
}
|
|
801
801
|
function Textarea({ className, ...props }) {
|
|
802
802
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
803
|
-
|
|
803
|
+
react.m.textarea,
|
|
804
804
|
{
|
|
805
805
|
"data-slot": "textarea",
|
|
806
806
|
whileFocus: { boxShadow: "0 0 0 3px hsl(var(--ring) / 0.3)" },
|
|
@@ -836,12 +836,12 @@ function Checkbox({
|
|
|
836
836
|
className: "grid place-content-center text-current",
|
|
837
837
|
asChild: true,
|
|
838
838
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
839
|
-
|
|
839
|
+
react.m.span,
|
|
840
840
|
{
|
|
841
841
|
initial: { scale: 0, opacity: 0 },
|
|
842
842
|
animate: { scale: 1, opacity: 1 },
|
|
843
843
|
exit: { scale: 0, opacity: 0 },
|
|
844
|
-
transition:
|
|
844
|
+
transition: chunkO3CFRMDK_js.springBouncy,
|
|
845
845
|
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "size-3.5" })
|
|
846
846
|
}
|
|
847
847
|
)
|
|
@@ -872,11 +872,11 @@ function Switch({
|
|
|
872
872
|
"data-slot": "switch-thumb",
|
|
873
873
|
asChild: true,
|
|
874
874
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
875
|
-
|
|
875
|
+
react.m.span,
|
|
876
876
|
{
|
|
877
877
|
className: "pointer-events-none block rounded-full bg-background ring-0 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground",
|
|
878
878
|
layout: true,
|
|
879
|
-
transition:
|
|
879
|
+
transition: chunkO3CFRMDK_js.springBouncy
|
|
880
880
|
}
|
|
881
881
|
)
|
|
882
882
|
}
|
|
@@ -889,7 +889,7 @@ function Progress({
|
|
|
889
889
|
value,
|
|
890
890
|
...props
|
|
891
891
|
}) {
|
|
892
|
-
const reduced =
|
|
892
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
893
893
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
894
894
|
ProgressPrimitive__namespace.Root,
|
|
895
895
|
{
|
|
@@ -900,12 +900,12 @@ function Progress({
|
|
|
900
900
|
),
|
|
901
901
|
...props,
|
|
902
902
|
children: /* @__PURE__ */ jsxRuntime.jsx(ProgressPrimitive__namespace.Indicator, { "data-slot": "progress-indicator", asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
903
|
-
|
|
903
|
+
react.m.div,
|
|
904
904
|
{
|
|
905
905
|
className: "h-full bg-primary",
|
|
906
906
|
initial: { width: "0%" },
|
|
907
907
|
animate: { width: `${value ?? 0}%` },
|
|
908
|
-
transition: reduced ?
|
|
908
|
+
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.spring
|
|
909
909
|
}
|
|
910
910
|
) })
|
|
911
911
|
}
|
|
@@ -944,7 +944,7 @@ function Badge({
|
|
|
944
944
|
asChild = false,
|
|
945
945
|
...props
|
|
946
946
|
}) {
|
|
947
|
-
const reduced =
|
|
947
|
+
const reduced = chunkO3CFRMDK_js.useReducedMotion();
|
|
948
948
|
let resolvedVariant = variantProp;
|
|
949
949
|
let resolvedIntent = intentProp;
|
|
950
950
|
const legacy = LEGACY_VARIANT_MAP[variantProp];
|
|
@@ -967,13 +967,13 @@ function Badge({
|
|
|
967
967
|
);
|
|
968
968
|
}
|
|
969
969
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
970
|
-
|
|
970
|
+
react.m.span,
|
|
971
971
|
{
|
|
972
972
|
"data-slot": "badge",
|
|
973
973
|
"data-variant": resolvedVariant,
|
|
974
974
|
"data-intent": resolvedIntent,
|
|
975
975
|
whileHover: reduced ? void 0 : { scale: 1.05 },
|
|
976
|
-
transition: reduced ?
|
|
976
|
+
transition: reduced ? chunkO3CFRMDK_js.noMotion : chunkO3CFRMDK_js.spring,
|
|
977
977
|
className: chunkJOVJRQO3_js.cn(badgeVariants({ variant: resolvedVariant, size }), className),
|
|
978
978
|
...props
|
|
979
979
|
}
|
|
@@ -1016,12 +1016,12 @@ function TooltipContent({
|
|
|
1016
1016
|
asChild: true,
|
|
1017
1017
|
...props,
|
|
1018
1018
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1019
|
-
|
|
1019
|
+
react.m.div,
|
|
1020
1020
|
{
|
|
1021
1021
|
initial: { opacity: 0, scale: 0.92, y: 2 },
|
|
1022
1022
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1023
1023
|
exit: { opacity: 0, scale: 0.92 },
|
|
1024
|
-
transition:
|
|
1024
|
+
transition: chunkO3CFRMDK_js.springBouncy,
|
|
1025
1025
|
className: chunkJOVJRQO3_js.cn(
|
|
1026
1026
|
"z-50 w-fit overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-md",
|
|
1027
1027
|
className
|
|
@@ -1062,12 +1062,12 @@ function PopoverContent({
|
|
|
1062
1062
|
asChild: true,
|
|
1063
1063
|
...props,
|
|
1064
1064
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1065
|
-
|
|
1065
|
+
react.m.div,
|
|
1066
1066
|
{
|
|
1067
1067
|
initial: { opacity: 0, scale: 0.95, y: -4 },
|
|
1068
1068
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1069
1069
|
exit: { opacity: 0, scale: 0.95, y: -4 },
|
|
1070
|
-
transition:
|
|
1070
|
+
transition: chunkO3CFRMDK_js.springBouncy,
|
|
1071
1071
|
className: chunkJOVJRQO3_js.cn(
|
|
1072
1072
|
"z-50 w-72 origin-[var(--radix-popover-content-transform-origin)] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden",
|
|
1073
1073
|
className
|
|
@@ -1102,12 +1102,12 @@ function HoverCardContent({
|
|
|
1102
1102
|
asChild: true,
|
|
1103
1103
|
...props,
|
|
1104
1104
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1105
|
-
|
|
1105
|
+
react.m.div,
|
|
1106
1106
|
{
|
|
1107
1107
|
initial: { opacity: 0, scale: 0.95, y: 4 },
|
|
1108
1108
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1109
1109
|
exit: { opacity: 0, scale: 0.95 },
|
|
1110
|
-
transition:
|
|
1110
|
+
transition: chunkO3CFRMDK_js.springBouncy,
|
|
1111
1111
|
className: chunkJOVJRQO3_js.cn(
|
|
1112
1112
|
"z-50 w-64 origin-[var(--radix-hover-card-content-transform-origin)] rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden",
|
|
1113
1113
|
className
|
|
@@ -1170,11 +1170,11 @@ function SelectContent({
|
|
|
1170
1170
|
asChild: true,
|
|
1171
1171
|
...props,
|
|
1172
1172
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1173
|
-
|
|
1173
|
+
react.m.div,
|
|
1174
1174
|
{
|
|
1175
1175
|
initial: { opacity: 0, scale: 0.96, y: -4 },
|
|
1176
1176
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1177
|
-
transition:
|
|
1177
|
+
transition: chunkO3CFRMDK_js.springBouncy,
|
|
1178
1178
|
className: chunkJOVJRQO3_js.cn(
|
|
1179
1179
|
"relative z-50 max-h-[min(var(--radix-select-content-available-height),24rem)] min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
|
|
1180
1180
|
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]",
|
|
@@ -1305,12 +1305,12 @@ function DropdownMenuContent({
|
|
|
1305
1305
|
asChild: true,
|
|
1306
1306
|
...props,
|
|
1307
1307
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1308
|
-
|
|
1308
|
+
react.m.div,
|
|
1309
1309
|
{
|
|
1310
1310
|
initial: { opacity: 0, scale: 0.95, y: -4 },
|
|
1311
1311
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1312
1312
|
exit: { opacity: 0, scale: 0.95, y: -4 },
|
|
1313
|
-
transition:
|
|
1313
|
+
transition: chunkO3CFRMDK_js.springBouncy,
|
|
1314
1314
|
className: chunkJOVJRQO3_js.cn(
|
|
1315
1315
|
"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] origin-[var(--radix-dropdown-menu-content-transform-origin)] overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
|
|
1316
1316
|
className
|
|
@@ -1697,12 +1697,12 @@ function Slider({
|
|
|
1697
1697
|
"data-slot": "slider-thumb",
|
|
1698
1698
|
asChild: true,
|
|
1699
1699
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1700
|
-
|
|
1700
|
+
react.m.span,
|
|
1701
1701
|
{
|
|
1702
1702
|
className: "block size-4 shrink-0 cursor-grab rounded-full border border-primary/50 bg-background shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring active:cursor-grabbing",
|
|
1703
1703
|
whileHover: { scale: 1.2 },
|
|
1704
1704
|
whileTap: { scale: 0.9 },
|
|
1705
|
-
transition:
|
|
1705
|
+
transition: chunkO3CFRMDK_js.springBouncy
|
|
1706
1706
|
}
|
|
1707
1707
|
)
|
|
1708
1708
|
},
|
|
@@ -2605,12 +2605,12 @@ function Calendar({
|
|
|
2605
2605
|
defaultClassNames.nav
|
|
2606
2606
|
),
|
|
2607
2607
|
button_previous: chunkJOVJRQO3_js.cn(
|
|
2608
|
-
|
|
2608
|
+
chunkO3CFRMDK_js.buttonVariants({ variant: buttonVariant }),
|
|
2609
2609
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2610
2610
|
defaultClassNames.button_previous
|
|
2611
2611
|
),
|
|
2612
2612
|
button_next: chunkJOVJRQO3_js.cn(
|
|
2613
|
-
|
|
2613
|
+
chunkO3CFRMDK_js.buttonVariants({ variant: buttonVariant }),
|
|
2614
2614
|
"size-(--cell-size) p-0 select-none aria-disabled:opacity-50",
|
|
2615
2615
|
defaultClassNames.button_next
|
|
2616
2616
|
),
|
|
@@ -2725,7 +2725,7 @@ function CalendarDayButton({
|
|
|
2725
2725
|
if (modifiers.focused) ref.current?.focus();
|
|
2726
2726
|
}, [modifiers.focused]);
|
|
2727
2727
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2728
|
-
|
|
2728
|
+
chunkO3CFRMDK_js.Button,
|
|
2729
2729
|
{
|
|
2730
2730
|
ref,
|
|
2731
2731
|
variant: "ghost",
|
|
@@ -4055,7 +4055,7 @@ function InputGroupButton({
|
|
|
4055
4055
|
...props
|
|
4056
4056
|
}) {
|
|
4057
4057
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4058
|
-
|
|
4058
|
+
chunkO3CFRMDK_js.Button,
|
|
4059
4059
|
{
|
|
4060
4060
|
type,
|
|
4061
4061
|
"data-size": size,
|
|
@@ -4453,7 +4453,7 @@ function PaginationLink({
|
|
|
4453
4453
|
"data-slot": "pagination-link",
|
|
4454
4454
|
"data-active": isActive,
|
|
4455
4455
|
className: chunkJOVJRQO3_js.cn(
|
|
4456
|
-
|
|
4456
|
+
chunkO3CFRMDK_js.buttonVariants({
|
|
4457
4457
|
variant: isActive ? "outline" : "ghost",
|
|
4458
4458
|
size
|
|
4459
4459
|
}),
|
|
@@ -4661,9 +4661,9 @@ var AnimatedTooltip = ({
|
|
|
4661
4661
|
}) => {
|
|
4662
4662
|
const [hoveredIndex, setHoveredIndex] = React9.useState(null);
|
|
4663
4663
|
const springConfig = { stiffness: 100, damping: 5 };
|
|
4664
|
-
const x =
|
|
4665
|
-
const rotate =
|
|
4666
|
-
const translateX =
|
|
4664
|
+
const x = react.useMotionValue(0);
|
|
4665
|
+
const rotate = react.useSpring(react.useTransform(x, [-100, 100], [-45, 45]), springConfig);
|
|
4666
|
+
const translateX = react.useSpring(react.useTransform(x, [-100, 100], [-50, 50]), springConfig);
|
|
4667
4667
|
const handleMouseMove = (event) => {
|
|
4668
4668
|
const halfWidth = event.target.offsetWidth / 2;
|
|
4669
4669
|
x.set(event.nativeEvent.offsetX - halfWidth);
|
|
@@ -4675,8 +4675,8 @@ var AnimatedTooltip = ({
|
|
|
4675
4675
|
onMouseEnter: () => setHoveredIndex(item.id),
|
|
4676
4676
|
onMouseLeave: () => setHoveredIndex(null),
|
|
4677
4677
|
children: [
|
|
4678
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4679
|
-
|
|
4678
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: hoveredIndex === item.id && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4679
|
+
react.m.div,
|
|
4680
4680
|
{
|
|
4681
4681
|
initial: { opacity: 0, y: 20, scale: 0.6 },
|
|
4682
4682
|
animate: {
|
|
@@ -4873,7 +4873,7 @@ function SidebarTrigger({
|
|
|
4873
4873
|
}) {
|
|
4874
4874
|
const { toggleSidebar } = useSidebar();
|
|
4875
4875
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4876
|
-
|
|
4876
|
+
chunkO3CFRMDK_js.Button,
|
|
4877
4877
|
{
|
|
4878
4878
|
"data-sidebar": "trigger",
|
|
4879
4879
|
"data-slot": "sidebar-trigger",
|
|
@@ -5704,7 +5704,7 @@ function ScrollToTopButton({
|
|
|
5704
5704
|
className,
|
|
5705
5705
|
...sfProps
|
|
5706
5706
|
}) {
|
|
5707
|
-
const { animated, surface } =
|
|
5707
|
+
const { animated, surface } = chunkO3CFRMDK_js.useSaasflareProps(sfProps);
|
|
5708
5708
|
const [isVisible, setIsVisible] = React9.useState(false);
|
|
5709
5709
|
const finalId = React9.useMemo(() => scrollContainerId ?? null, [scrollContainerId]);
|
|
5710
5710
|
const getContainer = React9.useCallback(() => {
|
|
@@ -5737,8 +5737,8 @@ function ScrollToTopButton({
|
|
|
5737
5737
|
};
|
|
5738
5738
|
const surfaceClass = surface === "glass" ? "bg-primary/85 text-primary-foreground backdrop-blur-md border border-[oklch(1_0_0_/_0.15)] shadow-[var(--surface-shadow)]" : "bg-primary text-primary-foreground shadow-lg";
|
|
5739
5739
|
const duration = animated ? 0.3 : 0;
|
|
5740
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5741
|
-
|
|
5740
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: isVisible && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5741
|
+
react.m.button,
|
|
5742
5742
|
{
|
|
5743
5743
|
onClick: scrollToTop,
|
|
5744
5744
|
"aria-label": "Scroll to top",
|
|
@@ -5772,7 +5772,7 @@ function ThemeModeToggle({
|
|
|
5772
5772
|
setTheme(theme === "dark" ? "light" : "dark");
|
|
5773
5773
|
};
|
|
5774
5774
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5775
|
-
|
|
5775
|
+
chunkO3CFRMDK_js.Button,
|
|
5776
5776
|
{
|
|
5777
5777
|
variant: "ghost",
|
|
5778
5778
|
size: showText ? "sm" : "icon",
|
|
@@ -5895,7 +5895,7 @@ function TopLoadingBar({
|
|
|
5895
5895
|
finishDelayMs,
|
|
5896
5896
|
...sfProps
|
|
5897
5897
|
}) {
|
|
5898
|
-
const { animated } =
|
|
5898
|
+
const { animated } = chunkO3CFRMDK_js.useSaasflareProps(sfProps);
|
|
5899
5899
|
if (!animated) {
|
|
5900
5900
|
return /* @__PURE__ */ jsxRuntime.jsx(React9.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5901
5901
|
TopLoadingBarStatic,
|
|
@@ -5927,79 +5927,79 @@ function UserAvatar({ src, name, initials, size = "md", className }) {
|
|
|
5927
5927
|
|
|
5928
5928
|
Object.defineProperty(exports, "Button", {
|
|
5929
5929
|
enumerable: true,
|
|
5930
|
-
get: function () { return
|
|
5930
|
+
get: function () { return chunkO3CFRMDK_js.Button; }
|
|
5931
5931
|
});
|
|
5932
5932
|
Object.defineProperty(exports, "SaasflareProvider", {
|
|
5933
5933
|
enumerable: true,
|
|
5934
|
-
get: function () { return
|
|
5934
|
+
get: function () { return chunkO3CFRMDK_js.SaasflareProvider; }
|
|
5935
5935
|
});
|
|
5936
5936
|
Object.defineProperty(exports, "SaasflareScript", {
|
|
5937
5937
|
enumerable: true,
|
|
5938
|
-
get: function () { return
|
|
5938
|
+
get: function () { return chunkO3CFRMDK_js.SaasflareScript; }
|
|
5939
5939
|
});
|
|
5940
5940
|
Object.defineProperty(exports, "SaasflareShell", {
|
|
5941
5941
|
enumerable: true,
|
|
5942
|
-
get: function () { return
|
|
5942
|
+
get: function () { return chunkO3CFRMDK_js.SaasflareShell; }
|
|
5943
5943
|
});
|
|
5944
5944
|
Object.defineProperty(exports, "SmoothScrollProvider", {
|
|
5945
5945
|
enumerable: true,
|
|
5946
|
-
get: function () { return
|
|
5946
|
+
get: function () { return chunkO3CFRMDK_js.SmoothScrollProvider; }
|
|
5947
5947
|
});
|
|
5948
5948
|
Object.defineProperty(exports, "buttonVariants", {
|
|
5949
5949
|
enumerable: true,
|
|
5950
|
-
get: function () { return
|
|
5950
|
+
get: function () { return chunkO3CFRMDK_js.buttonVariants; }
|
|
5951
5951
|
});
|
|
5952
5952
|
Object.defineProperty(exports, "fadeIn", {
|
|
5953
5953
|
enumerable: true,
|
|
5954
|
-
get: function () { return
|
|
5954
|
+
get: function () { return chunkO3CFRMDK_js.fadeIn; }
|
|
5955
5955
|
});
|
|
5956
5956
|
Object.defineProperty(exports, "noMotion", {
|
|
5957
5957
|
enumerable: true,
|
|
5958
|
-
get: function () { return
|
|
5958
|
+
get: function () { return chunkO3CFRMDK_js.noMotion; }
|
|
5959
5959
|
});
|
|
5960
5960
|
Object.defineProperty(exports, "scaleIn", {
|
|
5961
5961
|
enumerable: true,
|
|
5962
|
-
get: function () { return
|
|
5962
|
+
get: function () { return chunkO3CFRMDK_js.scaleIn; }
|
|
5963
5963
|
});
|
|
5964
5964
|
Object.defineProperty(exports, "slideDown", {
|
|
5965
5965
|
enumerable: true,
|
|
5966
|
-
get: function () { return
|
|
5966
|
+
get: function () { return chunkO3CFRMDK_js.slideDown; }
|
|
5967
5967
|
});
|
|
5968
5968
|
Object.defineProperty(exports, "slideUp", {
|
|
5969
5969
|
enumerable: true,
|
|
5970
|
-
get: function () { return
|
|
5970
|
+
get: function () { return chunkO3CFRMDK_js.slideUp; }
|
|
5971
5971
|
});
|
|
5972
5972
|
Object.defineProperty(exports, "spring", {
|
|
5973
5973
|
enumerable: true,
|
|
5974
|
-
get: function () { return
|
|
5974
|
+
get: function () { return chunkO3CFRMDK_js.spring; }
|
|
5975
5975
|
});
|
|
5976
5976
|
Object.defineProperty(exports, "springBouncy", {
|
|
5977
5977
|
enumerable: true,
|
|
5978
|
-
get: function () { return
|
|
5978
|
+
get: function () { return chunkO3CFRMDK_js.springBouncy; }
|
|
5979
5979
|
});
|
|
5980
5980
|
Object.defineProperty(exports, "springGentle", {
|
|
5981
5981
|
enumerable: true,
|
|
5982
|
-
get: function () { return
|
|
5982
|
+
get: function () { return chunkO3CFRMDK_js.springGentle; }
|
|
5983
5983
|
});
|
|
5984
5984
|
Object.defineProperty(exports, "springStiff", {
|
|
5985
5985
|
enumerable: true,
|
|
5986
|
-
get: function () { return
|
|
5986
|
+
get: function () { return chunkO3CFRMDK_js.springStiff; }
|
|
5987
5987
|
});
|
|
5988
5988
|
Object.defineProperty(exports, "useAnimation", {
|
|
5989
5989
|
enumerable: true,
|
|
5990
|
-
get: function () { return
|
|
5990
|
+
get: function () { return chunkO3CFRMDK_js.useAnimation; }
|
|
5991
5991
|
});
|
|
5992
5992
|
Object.defineProperty(exports, "useReducedMotion", {
|
|
5993
5993
|
enumerable: true,
|
|
5994
|
-
get: function () { return
|
|
5994
|
+
get: function () { return chunkO3CFRMDK_js.useReducedMotion; }
|
|
5995
5995
|
});
|
|
5996
5996
|
Object.defineProperty(exports, "useSaasflareProps", {
|
|
5997
5997
|
enumerable: true,
|
|
5998
|
-
get: function () { return
|
|
5998
|
+
get: function () { return chunkO3CFRMDK_js.useSaasflareProps; }
|
|
5999
5999
|
});
|
|
6000
6000
|
Object.defineProperty(exports, "useSaasflareTheme", {
|
|
6001
6001
|
enumerable: true,
|
|
6002
|
-
get: function () { return
|
|
6002
|
+
get: function () { return chunkO3CFRMDK_js.useSaasflareTheme; }
|
|
6003
6003
|
});
|
|
6004
6004
|
Object.defineProperty(exports, "cn", {
|
|
6005
6005
|
enumerable: true,
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useReducedMotion, noMotion, springGentle, springBouncy, buttonVariants, spring, Button, useSaasflareProps } from './chunk-
|
|
3
|
-
export { Button, SaasflareProvider, SaasflareScript, SaasflareShell, SmoothScrollProvider, buttonVariants, fadeIn, noMotion, scaleIn, slideDown, slideUp, spring, springBouncy, springGentle, springStiff, useAnimation, useReducedMotion, useSaasflareProps, useSaasflareTheme } from './chunk-
|
|
2
|
+
import { useReducedMotion, noMotion, springGentle, springBouncy, buttonVariants, spring, Button, useSaasflareProps } from './chunk-QEKYM3BT.mjs';
|
|
3
|
+
export { Button, SaasflareProvider, SaasflareScript, SaasflareShell, SmoothScrollProvider, buttonVariants, fadeIn, noMotion, scaleIn, slideDown, slideUp, spring, springBouncy, springGentle, springStiff, useAnimation, useReducedMotion, useSaasflareProps, useSaasflareTheme } from './chunk-QEKYM3BT.mjs';
|
|
4
4
|
import { cn } from './chunk-S26666D6.mjs';
|
|
5
5
|
export { cn } from './chunk-S26666D6.mjs';
|
|
6
6
|
import * as React9 from 'react';
|
|
7
7
|
import { useState, useCallback, useMemo, useRef, useEffect, Suspense } from 'react';
|
|
8
|
-
import { m, useMotionValue, useSpring, useTransform, AnimatePresence } from '
|
|
8
|
+
import { m, useMotionValue, useSpring, useTransform, AnimatePresence } from 'motion/react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
11
11
|
import { XIcon, ChevronDownIcon, CheckIcon, ChevronUpIcon, CircleIcon, ChevronRightIcon, ChevronLeftIcon, Loader2Icon, OctagonXIcon, TriangleAlertIcon, InfoIcon, CircleCheckIcon, ChevronRight, MoreHorizontal, SearchIcon, MinusIcon, MoreHorizontalIcon, GripVerticalIcon, PanelLeftIcon, ArrowUpIcon, Sun, Moon } from 'lucide-react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saasflare/ui",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Saasflare UI Components Library – Standalone components built on Radix UI + Tailwind CSS",
|
|
@@ -83,15 +83,14 @@
|
|
|
83
83
|
"cmdk": "^1.1.1",
|
|
84
84
|
"input-otp": "^1.4.2",
|
|
85
85
|
"lucide-react": "^0.577.0",
|
|
86
|
-
"tailwind-merge": "^3.5.0"
|
|
87
|
-
"tw-animate-css": "^1.4.0"
|
|
86
|
+
"tailwind-merge": "^3.5.0"
|
|
88
87
|
},
|
|
89
88
|
"peerDependencies": {
|
|
90
89
|
"@hookform/resolvers": "^5.0.0",
|
|
91
90
|
"date-fns": "^4.0.0",
|
|
92
91
|
"embla-carousel-react": "^8.0.0",
|
|
93
|
-
"
|
|
94
|
-
"next": "^16.0.0",
|
|
92
|
+
"motion": "^12.0.0",
|
|
93
|
+
"next": "^15.0.0 || ^16.0.0",
|
|
95
94
|
"next-themes": "^0.4.0",
|
|
96
95
|
"react": "^18.2.0 || ^19.0.0",
|
|
97
96
|
"react-day-picker": "^9.0.0",
|
|
@@ -113,6 +112,15 @@
|
|
|
113
112
|
"embla-carousel-react": {
|
|
114
113
|
"optional": true
|
|
115
114
|
},
|
|
115
|
+
"motion": {
|
|
116
|
+
"optional": true
|
|
117
|
+
},
|
|
118
|
+
"next": {
|
|
119
|
+
"optional": true
|
|
120
|
+
},
|
|
121
|
+
"next-themes": {
|
|
122
|
+
"optional": true
|
|
123
|
+
},
|
|
116
124
|
"react-day-picker": {
|
|
117
125
|
"optional": true
|
|
118
126
|
},
|
package/styles/motion.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview Motion tokens
|
|
2
|
+
* @fileoverview Motion tokens, animation kill-switch, and entrance/exit utilities.
|
|
3
3
|
* @module packages/ui/styles/motion
|
|
4
4
|
* @package ui
|
|
5
|
-
* @reviewed 2026-
|
|
5
|
+
* @reviewed 2026-05-06
|
|
6
6
|
*
|
|
7
7
|
* Duration and easing tokens consumed by components and utility classes.
|
|
8
8
|
* The [data-animated="false"] attribute — set by SaasflareProvider on <html> —
|
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Reduced-motion media query is an additional safety net for users with an
|
|
13
13
|
* OS-level preference, regardless of the provider's `animated` prop.
|
|
14
|
+
*
|
|
15
|
+
* Entrance/exit utilities below are derived from tw-animate-css (MIT,
|
|
16
|
+
* © 2025 Wombosvideo). Vendored to drop the runtime dependency; only the
|
|
17
|
+
* surface actually used by this package is kept (animate-in/out, fade,
|
|
18
|
+
* zoom, slide on cardinal axes, plus accordion-down/up and caret-blink).
|
|
14
19
|
*/
|
|
15
20
|
|
|
16
21
|
:root {
|
|
@@ -51,3 +56,150 @@
|
|
|
51
56
|
scroll-behavior: auto !important;
|
|
52
57
|
}
|
|
53
58
|
}
|
|
59
|
+
|
|
60
|
+
/* ============================================
|
|
61
|
+
* Entrance / Exit animations
|
|
62
|
+
*
|
|
63
|
+
* The `animate-in` / `animate-out` utilities run shared `enter` / `exit`
|
|
64
|
+
* keyframes that interpolate four CSS variables (opacity, translate-x,
|
|
65
|
+
* translate-y, scale). Modifier utilities like `fade-in-0`, `slide-in-from-top-2`,
|
|
66
|
+
* `zoom-in-95` set those variables to non-default values so the same keyframes
|
|
67
|
+
* cover every entrance/exit combination — including stacked modifiers like
|
|
68
|
+
* `animate-in fade-in-0 zoom-in-95 slide-in-from-top-2`.
|
|
69
|
+
* ============================================ */
|
|
70
|
+
|
|
71
|
+
@property --tw-enter-opacity { syntax: "*"; inherits: false; initial-value: 1; }
|
|
72
|
+
@property --tw-enter-scale { syntax: "*"; inherits: false; initial-value: 1; }
|
|
73
|
+
@property --tw-enter-translate-x { syntax: "*"; inherits: false; initial-value: 0; }
|
|
74
|
+
@property --tw-enter-translate-y { syntax: "*"; inherits: false; initial-value: 0; }
|
|
75
|
+
@property --tw-exit-opacity { syntax: "*"; inherits: false; initial-value: 1; }
|
|
76
|
+
@property --tw-exit-scale { syntax: "*"; inherits: false; initial-value: 1; }
|
|
77
|
+
@property --tw-exit-translate-x { syntax: "*"; inherits: false; initial-value: 0; }
|
|
78
|
+
@property --tw-exit-translate-y { syntax: "*"; inherits: false; initial-value: 0; }
|
|
79
|
+
|
|
80
|
+
@theme inline {
|
|
81
|
+
/* Percentage scale used by zoom-in-*, zoom-out-*, fade-in-*, fade-out-*. */
|
|
82
|
+
--percentage-0: 0;
|
|
83
|
+
--percentage-50: 0.5;
|
|
84
|
+
--percentage-90: 0.9;
|
|
85
|
+
--percentage-95: 0.95;
|
|
86
|
+
--percentage-100: 1;
|
|
87
|
+
|
|
88
|
+
/* `animate-in` / `animate-out` — run the shared enter/exit keyframes. */
|
|
89
|
+
--animate-in: enter 0.15s ease;
|
|
90
|
+
--animate-out: exit 0.15s ease;
|
|
91
|
+
|
|
92
|
+
/* Component-specific named animations. */
|
|
93
|
+
--animate-accordion-down: accordion-down 0.2s ease-out;
|
|
94
|
+
--animate-accordion-up: accordion-up 0.2s ease-out;
|
|
95
|
+
--animate-caret-blink: caret-blink 1.25s ease-out infinite;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@keyframes enter {
|
|
99
|
+
from {
|
|
100
|
+
opacity: var(--tw-enter-opacity, 1);
|
|
101
|
+
transform: translate3d(
|
|
102
|
+
var(--tw-enter-translate-x, 0),
|
|
103
|
+
var(--tw-enter-translate-y, 0),
|
|
104
|
+
0
|
|
105
|
+
)
|
|
106
|
+
scale3d(
|
|
107
|
+
var(--tw-enter-scale, 1),
|
|
108
|
+
var(--tw-enter-scale, 1),
|
|
109
|
+
var(--tw-enter-scale, 1)
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@keyframes exit {
|
|
115
|
+
to {
|
|
116
|
+
opacity: var(--tw-exit-opacity, 1);
|
|
117
|
+
transform: translate3d(
|
|
118
|
+
var(--tw-exit-translate-x, 0),
|
|
119
|
+
var(--tw-exit-translate-y, 0),
|
|
120
|
+
0
|
|
121
|
+
)
|
|
122
|
+
scale3d(
|
|
123
|
+
var(--tw-exit-scale, 1),
|
|
124
|
+
var(--tw-exit-scale, 1),
|
|
125
|
+
var(--tw-exit-scale, 1)
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@keyframes accordion-down {
|
|
131
|
+
from { height: 0; }
|
|
132
|
+
to { height: var(--radix-accordion-content-height, auto); }
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes accordion-up {
|
|
136
|
+
from { height: var(--radix-accordion-content-height, auto); }
|
|
137
|
+
to { height: 0; }
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
@keyframes caret-blink {
|
|
141
|
+
0%, 70%, 100% { opacity: 1; }
|
|
142
|
+
20%, 50% { opacity: 0; }
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Modifier utilities — set the enter/exit CSS vars consumed by the keyframes.
|
|
146
|
+
* Each parametric utility tries two resolution paths in order; CSS cascade
|
|
147
|
+
* keeps whichever resolves last. This matches tw-animate-css behavior so that
|
|
148
|
+
* both `fade-in-50` (namespace lookup → 0.5) and `fade-in-[0.7]` (arbitrary
|
|
149
|
+
* value) work. */
|
|
150
|
+
|
|
151
|
+
@utility fade-in { --tw-enter-opacity: 0; }
|
|
152
|
+
@utility fade-in-* {
|
|
153
|
+
--tw-enter-opacity: calc(--value(number)/100);
|
|
154
|
+
--tw-enter-opacity: --value(--percentage-*,[*]);
|
|
155
|
+
}
|
|
156
|
+
@utility fade-out { --tw-exit-opacity: 0; }
|
|
157
|
+
@utility fade-out-* {
|
|
158
|
+
--tw-exit-opacity: calc(--value(number)/100);
|
|
159
|
+
--tw-exit-opacity: --value(--percentage-*,[*]);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@utility zoom-in { --tw-enter-scale: 0; }
|
|
163
|
+
@utility zoom-in-* {
|
|
164
|
+
--tw-enter-scale: calc(--value(number)*1%);
|
|
165
|
+
--tw-enter-scale: --value(--percentage-*,[*]);
|
|
166
|
+
}
|
|
167
|
+
@utility zoom-out { --tw-exit-scale: 0; }
|
|
168
|
+
@utility zoom-out-* {
|
|
169
|
+
--tw-exit-scale: calc(--value(number)*1%);
|
|
170
|
+
--tw-exit-scale: --value(--percentage-*,[*]);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
@utility slide-in-from-top { --tw-enter-translate-y: -100%; }
|
|
174
|
+
@utility slide-in-from-top-* {
|
|
175
|
+
--tw-enter-translate-y: calc(--value(integer)*var(--spacing)*-1);
|
|
176
|
+
}
|
|
177
|
+
@utility slide-in-from-bottom { --tw-enter-translate-y: 100%; }
|
|
178
|
+
@utility slide-in-from-bottom-* {
|
|
179
|
+
--tw-enter-translate-y: calc(--value(integer)*var(--spacing));
|
|
180
|
+
}
|
|
181
|
+
@utility slide-in-from-left { --tw-enter-translate-x: -100%; }
|
|
182
|
+
@utility slide-in-from-left-* {
|
|
183
|
+
--tw-enter-translate-x: calc(--value(integer)*var(--spacing)*-1);
|
|
184
|
+
}
|
|
185
|
+
@utility slide-in-from-right { --tw-enter-translate-x: 100%; }
|
|
186
|
+
@utility slide-in-from-right-* {
|
|
187
|
+
--tw-enter-translate-x: calc(--value(integer)*var(--spacing));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@utility slide-out-to-top { --tw-exit-translate-y: -100%; }
|
|
191
|
+
@utility slide-out-to-top-* {
|
|
192
|
+
--tw-exit-translate-y: calc(--value(integer)*var(--spacing)*-1);
|
|
193
|
+
}
|
|
194
|
+
@utility slide-out-to-bottom { --tw-exit-translate-y: 100%; }
|
|
195
|
+
@utility slide-out-to-bottom-* {
|
|
196
|
+
--tw-exit-translate-y: calc(--value(integer)*var(--spacing));
|
|
197
|
+
}
|
|
198
|
+
@utility slide-out-to-left { --tw-exit-translate-x: -100%; }
|
|
199
|
+
@utility slide-out-to-left-* {
|
|
200
|
+
--tw-exit-translate-x: calc(--value(integer)*var(--spacing)*-1);
|
|
201
|
+
}
|
|
202
|
+
@utility slide-out-to-right { --tw-exit-translate-x: 100%; }
|
|
203
|
+
@utility slide-out-to-right-* {
|
|
204
|
+
--tw-exit-translate-x: calc(--value(integer)*var(--spacing));
|
|
205
|
+
}
|