@saasflare/ui 3.0.2 → 3.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/button-0Bdl7Nqm.d.ts +87 -0
- package/dist/button-Brb4BhPO.d.mts +87 -0
- package/dist/{chunk-XXT4HKND.js → chunk-4BOMMZEY.js} +20 -13
- package/dist/{chunk-YAE5VBWJ.js → chunk-D5LKWKG7.js} +96 -152
- package/dist/chunk-DNLCSV5M.js +151 -0
- package/dist/{chunk-W53NTFPB.mjs → chunk-EJHYM2HP.mjs} +7 -16
- package/dist/chunk-FT66KYRN.js +30 -0
- package/dist/{chunk-2DNKXA5A.mjs → chunk-RW2S3KNB.mjs} +14 -7
- package/dist/chunk-WPOOC2FX.mjs +128 -0
- package/dist/{chunk-ORB66UYT.mjs → chunk-WRONFPRI.mjs} +66 -121
- package/dist/{dialog-CwyBJeNl.d.mts → dialog-BmY55WSX.d.ts} +4 -1
- package/dist/{dialog-CwyBJeNl.d.ts → dialog-CcaHMAsS.d.mts} +4 -1
- package/dist/entries/calendar.d.mts +5 -3
- package/dist/entries/calendar.d.ts +5 -3
- package/dist/entries/calendar.js +44 -36
- package/dist/entries/calendar.mjs +11 -3
- package/dist/entries/carousel.d.mts +4 -3
- package/dist/entries/carousel.d.ts +4 -3
- package/dist/entries/carousel.js +18 -11
- package/dist/entries/carousel.mjs +11 -4
- package/dist/entries/chart.d.mts +4 -2
- package/dist/entries/chart.d.ts +4 -2
- package/dist/entries/chart.js +17 -10
- package/dist/entries/chart.mjs +8 -1
- package/dist/entries/command.d.mts +5 -2
- package/dist/entries/command.d.ts +5 -2
- package/dist/entries/command.js +25 -18
- package/dist/entries/command.mjs +12 -5
- package/dist/entries/drawer.d.mts +4 -1
- package/dist/entries/drawer.d.ts +4 -1
- package/dist/entries/drawer.js +15 -8
- package/dist/entries/drawer.mjs +9 -2
- package/dist/entries/input-otp.d.mts +4 -2
- package/dist/entries/input-otp.d.ts +4 -2
- package/dist/entries/input-otp.js +13 -6
- package/dist/entries/input-otp.mjs +10 -3
- package/dist/entries/resizable.d.mts +3 -1
- package/dist/entries/resizable.d.ts +3 -1
- package/dist/entries/resizable.js +12 -5
- package/dist/entries/resizable.mjs +10 -3
- package/dist/index.d.mts +181 -79
- package/dist/index.d.ts +181 -79
- package/dist/index.js +806 -476
- package/dist/index.mjs +497 -171
- package/dist/{button-DUQJ0X7e.d.mts → use-saasflare-props-NrM2Glmp.d.mts} +1 -86
- package/dist/{button-DUQJ0X7e.d.ts → use-saasflare-props-NrM2Glmp.d.ts} +1 -86
- package/package.json +1 -1
- package/dist/chunk-BIU2MD4T.mjs +0 -56
- package/dist/chunk-CWW36RYE.js +0 -59
- package/dist/chunk-M3ICCPCU.js +0 -60
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { buttonVariants, Button
|
|
3
|
-
export { Button,
|
|
4
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './chunk-
|
|
5
|
-
import {
|
|
6
|
-
export { fadeIn, noMotion, scaleIn, slideDown, slideUp, spring, springBouncy, springGentle, springStiff,
|
|
7
|
-
import { cn } from './chunk-
|
|
8
|
-
export { cn } from './chunk-
|
|
2
|
+
import { buttonVariants, Button } from './chunk-WPOOC2FX.mjs';
|
|
3
|
+
export { Button, buttonVariants } from './chunk-WPOOC2FX.mjs';
|
|
4
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './chunk-RW2S3KNB.mjs';
|
|
5
|
+
import { useSaasflareMotion, springGentle, springBouncy, spring } from './chunk-EJHYM2HP.mjs';
|
|
6
|
+
export { fadeIn, noMotion, scaleIn, slideDown, slideUp, spring, springBouncy, springGentle, springStiff, useSaasflareMotion } from './chunk-EJHYM2HP.mjs';
|
|
7
|
+
import { useSaasflareProps, cn } from './chunk-WRONFPRI.mjs';
|
|
8
|
+
export { SaasflareProvider, SaasflareScript, SaasflareShell, SmoothScrollProvider, cn, useAnimation, useReducedMotion, useSaasflareProps, useSaasflareTheme } from './chunk-WRONFPRI.mjs';
|
|
9
9
|
import * as React5 from 'react';
|
|
10
10
|
import React5__default, { useState, useCallback, useMemo, useRef, useEffect, Suspense } from 'react';
|
|
11
11
|
import { m, useMotionValue, useSpring, useTransform, AnimatePresence } from 'motion/react';
|
|
@@ -177,19 +177,23 @@ function usePagination(options) {
|
|
|
177
177
|
}, [activePage, safeTotal, siblings, boundaries]);
|
|
178
178
|
return { activePage, range, setPage, next, previous, first, last };
|
|
179
179
|
}
|
|
180
|
-
function Card({ className, ...props }) {
|
|
181
|
-
const
|
|
180
|
+
function Card({ className, surface, radius, animated, ...props }) {
|
|
181
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
182
|
+
const motion = useSaasflareMotion(sf.animated, springGentle);
|
|
182
183
|
return /* @__PURE__ */ jsx(
|
|
183
184
|
m.div,
|
|
184
185
|
{
|
|
186
|
+
...props,
|
|
185
187
|
"data-slot": "card",
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
"data-surface": sf.surface,
|
|
189
|
+
"data-radius": sf.radius,
|
|
190
|
+
"data-animated": String(sf.animated),
|
|
191
|
+
whileHover: motion.disabled ? void 0 : { y: -2, boxShadow: "0 8px 30px rgba(0,0,0,0.08)" },
|
|
192
|
+
transition: motion.transition,
|
|
188
193
|
className: cn(
|
|
189
194
|
"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",
|
|
190
195
|
className
|
|
191
|
-
)
|
|
192
|
-
...props
|
|
196
|
+
)
|
|
193
197
|
}
|
|
194
198
|
);
|
|
195
199
|
}
|
|
@@ -293,24 +297,31 @@ function AlertDialogOverlay({
|
|
|
293
297
|
function AlertDialogContent({
|
|
294
298
|
className,
|
|
295
299
|
children,
|
|
300
|
+
surface,
|
|
301
|
+
radius,
|
|
302
|
+
animated,
|
|
296
303
|
...props
|
|
297
304
|
}) {
|
|
298
|
-
const
|
|
305
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
306
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
299
307
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [
|
|
300
308
|
/* @__PURE__ */ jsx(AlertDialogOverlay, {}),
|
|
301
309
|
/* @__PURE__ */ jsx(
|
|
302
310
|
AlertDialogPrimitive.Content,
|
|
303
311
|
{
|
|
312
|
+
...props,
|
|
304
313
|
"data-slot": "alert-dialog-content",
|
|
305
314
|
asChild: true,
|
|
306
|
-
...props,
|
|
307
315
|
children: /* @__PURE__ */ jsx(
|
|
308
316
|
m.div,
|
|
309
317
|
{
|
|
310
|
-
|
|
318
|
+
"data-surface": sf.surface,
|
|
319
|
+
"data-radius": sf.radius,
|
|
320
|
+
"data-animated": String(sf.animated),
|
|
321
|
+
initial: motion.disabled ? { opacity: 1 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
311
322
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
312
|
-
exit:
|
|
313
|
-
transition:
|
|
323
|
+
exit: motion.disabled ? { opacity: 0 } : { opacity: 0, scale: 0.95, y: 10 },
|
|
324
|
+
transition: motion.transition,
|
|
314
325
|
className: cn(
|
|
315
326
|
"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",
|
|
316
327
|
className
|
|
@@ -401,14 +412,21 @@ function Accordion({
|
|
|
401
412
|
}
|
|
402
413
|
function AccordionItem({
|
|
403
414
|
className,
|
|
415
|
+
surface,
|
|
416
|
+
radius,
|
|
417
|
+
animated,
|
|
404
418
|
...props
|
|
405
419
|
}) {
|
|
420
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
406
421
|
return /* @__PURE__ */ jsx(
|
|
407
422
|
AccordionPrimitive.Item,
|
|
408
423
|
{
|
|
424
|
+
...props,
|
|
409
425
|
"data-slot": "accordion-item",
|
|
410
|
-
|
|
411
|
-
|
|
426
|
+
"data-surface": sf.surface,
|
|
427
|
+
"data-radius": sf.radius,
|
|
428
|
+
"data-animated": String(sf.animated),
|
|
429
|
+
className: cn("border-b last:border-b-0", className)
|
|
412
430
|
}
|
|
413
431
|
);
|
|
414
432
|
}
|
|
@@ -417,16 +435,17 @@ function AccordionTrigger({
|
|
|
417
435
|
children,
|
|
418
436
|
...props
|
|
419
437
|
}) {
|
|
420
|
-
const
|
|
438
|
+
const sf = useSaasflareProps();
|
|
439
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
421
440
|
return /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
422
441
|
AccordionPrimitive.Trigger,
|
|
423
442
|
{
|
|
443
|
+
...props,
|
|
424
444
|
"data-slot": "accordion-trigger",
|
|
425
445
|
className: cn(
|
|
426
446
|
"flex flex-1 cursor-pointer items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
427
447
|
className
|
|
428
448
|
),
|
|
429
|
-
...props,
|
|
430
449
|
children: [
|
|
431
450
|
children,
|
|
432
451
|
/* @__PURE__ */ jsx(
|
|
@@ -434,7 +453,7 @@ function AccordionTrigger({
|
|
|
434
453
|
{
|
|
435
454
|
className: "pointer-events-none shrink-0 translate-y-0.5 text-muted-foreground",
|
|
436
455
|
animate: { rotate: 0 },
|
|
437
|
-
transition:
|
|
456
|
+
transition: motion.transition,
|
|
438
457
|
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
439
458
|
}
|
|
440
459
|
)
|
|
@@ -447,19 +466,20 @@ function AccordionContent({
|
|
|
447
466
|
children,
|
|
448
467
|
...props
|
|
449
468
|
}) {
|
|
450
|
-
const
|
|
469
|
+
const sf = useSaasflareProps();
|
|
470
|
+
const motion = useSaasflareMotion(sf.animated, { delay: 0.1, duration: 0.2 });
|
|
451
471
|
return /* @__PURE__ */ jsx(
|
|
452
472
|
AccordionPrimitive.Content,
|
|
453
473
|
{
|
|
474
|
+
...props,
|
|
454
475
|
"data-slot": "accordion-content",
|
|
455
476
|
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",
|
|
456
|
-
...props,
|
|
457
477
|
children: /* @__PURE__ */ jsx(
|
|
458
478
|
m.div,
|
|
459
479
|
{
|
|
460
|
-
initial:
|
|
480
|
+
initial: motion.disabled ? false : { opacity: 0 },
|
|
461
481
|
animate: { opacity: 1 },
|
|
462
|
-
transition:
|
|
482
|
+
transition: motion.transition,
|
|
463
483
|
className: cn("pt-0 pb-4", className),
|
|
464
484
|
children
|
|
465
485
|
}
|
|
@@ -470,19 +490,26 @@ function AccordionContent({
|
|
|
470
490
|
function Tabs({
|
|
471
491
|
className,
|
|
472
492
|
orientation = "horizontal",
|
|
493
|
+
surface,
|
|
494
|
+
radius,
|
|
495
|
+
animated,
|
|
473
496
|
...props
|
|
474
497
|
}) {
|
|
498
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
475
499
|
return /* @__PURE__ */ jsx(
|
|
476
500
|
TabsPrimitive.Root,
|
|
477
501
|
{
|
|
502
|
+
...props,
|
|
478
503
|
"data-slot": "tabs",
|
|
479
504
|
"data-orientation": orientation,
|
|
505
|
+
"data-surface": sf.surface,
|
|
506
|
+
"data-radius": sf.radius,
|
|
507
|
+
"data-animated": String(sf.animated),
|
|
480
508
|
orientation,
|
|
481
509
|
className: cn(
|
|
482
510
|
"group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",
|
|
483
511
|
className
|
|
484
|
-
)
|
|
485
|
-
...props
|
|
512
|
+
)
|
|
486
513
|
}
|
|
487
514
|
);
|
|
488
515
|
}
|
|
@@ -507,7 +534,8 @@ function TabsList({
|
|
|
507
534
|
...props
|
|
508
535
|
}) {
|
|
509
536
|
const listRef = React5.useRef(null);
|
|
510
|
-
const
|
|
537
|
+
const sf = useSaasflareProps();
|
|
538
|
+
const motion = useSaasflareMotion(sf.animated, spring);
|
|
511
539
|
const [pos, setPos] = React5.useState(null);
|
|
512
540
|
React5.useLayoutEffect(() => {
|
|
513
541
|
const list = listRef.current;
|
|
@@ -567,7 +595,7 @@ function TabsList({
|
|
|
567
595
|
width: pos.width,
|
|
568
596
|
height: pos.height
|
|
569
597
|
},
|
|
570
|
-
transition:
|
|
598
|
+
transition: motion.transition,
|
|
571
599
|
className: "pointer-events-none absolute top-0 left-0 rounded-md bg-background shadow-sm dark:border dark:border-input dark:bg-input/30",
|
|
572
600
|
style: { zIndex: 0 }
|
|
573
601
|
}
|
|
@@ -609,55 +637,73 @@ function TabsContent({
|
|
|
609
637
|
}
|
|
610
638
|
);
|
|
611
639
|
}
|
|
612
|
-
function Input({ className, type, ...props }) {
|
|
640
|
+
function Input({ className, type, surface, radius, animated, ...props }) {
|
|
641
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
642
|
+
const motion = useSaasflareMotion(sf.animated, { type: "spring", stiffness: 300, damping: 20 });
|
|
613
643
|
return /* @__PURE__ */ jsx(
|
|
614
644
|
m.input,
|
|
615
645
|
{
|
|
646
|
+
...props,
|
|
616
647
|
type,
|
|
617
648
|
"data-slot": "input",
|
|
618
|
-
|
|
619
|
-
|
|
649
|
+
"data-surface": sf.surface,
|
|
650
|
+
"data-radius": sf.radius,
|
|
651
|
+
"data-animated": String(sf.animated),
|
|
652
|
+
whileFocus: motion.disabled ? void 0 : { boxShadow: "0 0 0 3px hsl(var(--ring) / 0.3)" },
|
|
653
|
+
transition: motion.transition,
|
|
620
654
|
className: cn(
|
|
621
655
|
"h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,border-color] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
622
656
|
"focus-visible:border-ring",
|
|
623
657
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
624
658
|
className
|
|
625
|
-
)
|
|
626
|
-
...props
|
|
659
|
+
)
|
|
627
660
|
}
|
|
628
661
|
);
|
|
629
662
|
}
|
|
630
|
-
function Textarea({ className, ...props }) {
|
|
663
|
+
function Textarea({ className, surface, radius, animated, ...props }) {
|
|
664
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
665
|
+
const motion = useSaasflareMotion(sf.animated, { type: "spring", stiffness: 300, damping: 20 });
|
|
631
666
|
return /* @__PURE__ */ jsx(
|
|
632
667
|
m.textarea,
|
|
633
668
|
{
|
|
669
|
+
...props,
|
|
634
670
|
"data-slot": "textarea",
|
|
635
|
-
|
|
636
|
-
|
|
671
|
+
"data-surface": sf.surface,
|
|
672
|
+
"data-radius": sf.radius,
|
|
673
|
+
"data-animated": String(sf.animated),
|
|
674
|
+
whileFocus: motion.disabled ? void 0 : { boxShadow: "0 0 0 3px hsl(var(--ring) / 0.3)" },
|
|
675
|
+
transition: motion.transition,
|
|
637
676
|
className: cn(
|
|
638
677
|
"w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,border-color] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30",
|
|
639
678
|
"field-sizing-content min-h-16",
|
|
640
679
|
"focus-visible:border-ring",
|
|
641
680
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
642
681
|
className
|
|
643
|
-
)
|
|
644
|
-
...props
|
|
682
|
+
)
|
|
645
683
|
}
|
|
646
684
|
);
|
|
647
685
|
}
|
|
648
686
|
function Checkbox({
|
|
649
687
|
className,
|
|
688
|
+
surface,
|
|
689
|
+
radius,
|
|
690
|
+
animated,
|
|
650
691
|
...props
|
|
651
692
|
}) {
|
|
693
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
694
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
652
695
|
return /* @__PURE__ */ jsx(
|
|
653
696
|
CheckboxPrimitive.Root,
|
|
654
697
|
{
|
|
698
|
+
...props,
|
|
655
699
|
"data-slot": "checkbox",
|
|
700
|
+
"data-surface": sf.surface,
|
|
701
|
+
"data-radius": sf.radius,
|
|
702
|
+
"data-animated": String(sf.animated),
|
|
656
703
|
className: cn(
|
|
657
704
|
"peer size-4 shrink-0 cursor-pointer rounded-lg border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",
|
|
658
705
|
className
|
|
659
706
|
),
|
|
660
|
-
...props,
|
|
661
707
|
children: /* @__PURE__ */ jsx(
|
|
662
708
|
CheckboxPrimitive.Indicator,
|
|
663
709
|
{
|
|
@@ -667,10 +713,10 @@ function Checkbox({
|
|
|
667
713
|
children: /* @__PURE__ */ jsx(
|
|
668
714
|
m.span,
|
|
669
715
|
{
|
|
670
|
-
initial: { scale: 0, opacity: 0 },
|
|
716
|
+
initial: motion.disabled ? false : { scale: 0, opacity: 0 },
|
|
671
717
|
animate: { scale: 1, opacity: 1 },
|
|
672
|
-
exit: { scale: 0, opacity: 0 },
|
|
673
|
-
transition:
|
|
718
|
+
exit: motion.disabled ? void 0 : { scale: 0, opacity: 0 },
|
|
719
|
+
transition: motion.transition,
|
|
674
720
|
children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
|
|
675
721
|
}
|
|
676
722
|
)
|
|
@@ -682,19 +728,27 @@ function Checkbox({
|
|
|
682
728
|
function Switch({
|
|
683
729
|
className,
|
|
684
730
|
size = "default",
|
|
731
|
+
surface,
|
|
732
|
+
radius,
|
|
733
|
+
animated,
|
|
685
734
|
...props
|
|
686
735
|
}) {
|
|
736
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
737
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
687
738
|
return /* @__PURE__ */ jsx(
|
|
688
739
|
SwitchPrimitive.Root,
|
|
689
740
|
{
|
|
741
|
+
...props,
|
|
690
742
|
"data-slot": "switch",
|
|
691
743
|
"data-size": size,
|
|
744
|
+
"data-surface": sf.surface,
|
|
745
|
+
"data-radius": sf.radius,
|
|
746
|
+
"data-animated": String(sf.animated),
|
|
692
747
|
className: cn(
|
|
693
748
|
"peer group/switch inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",
|
|
694
749
|
"transition-colors duration-200",
|
|
695
750
|
className
|
|
696
751
|
),
|
|
697
|
-
...props,
|
|
698
752
|
children: /* @__PURE__ */ jsx(
|
|
699
753
|
SwitchPrimitive.Thumb,
|
|
700
754
|
{
|
|
@@ -704,8 +758,8 @@ function Switch({
|
|
|
704
758
|
m.span,
|
|
705
759
|
{
|
|
706
760
|
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",
|
|
707
|
-
layout: true,
|
|
708
|
-
transition:
|
|
761
|
+
layout: motion.disabled ? false : true,
|
|
762
|
+
transition: motion.transition
|
|
709
763
|
}
|
|
710
764
|
)
|
|
711
765
|
}
|
|
@@ -716,25 +770,32 @@ function Switch({
|
|
|
716
770
|
function Progress({
|
|
717
771
|
className,
|
|
718
772
|
value,
|
|
773
|
+
surface,
|
|
774
|
+
radius,
|
|
775
|
+
animated,
|
|
719
776
|
...props
|
|
720
777
|
}) {
|
|
721
|
-
const
|
|
778
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
779
|
+
const motion = useSaasflareMotion(sf.animated, spring);
|
|
722
780
|
return /* @__PURE__ */ jsx(
|
|
723
781
|
ProgressPrimitive.Root,
|
|
724
782
|
{
|
|
783
|
+
...props,
|
|
725
784
|
"data-slot": "progress",
|
|
785
|
+
"data-surface": sf.surface,
|
|
786
|
+
"data-radius": sf.radius,
|
|
787
|
+
"data-animated": String(sf.animated),
|
|
726
788
|
className: cn(
|
|
727
789
|
"relative h-2 w-full overflow-hidden rounded-full bg-primary/20",
|
|
728
790
|
className
|
|
729
791
|
),
|
|
730
|
-
...props,
|
|
731
792
|
children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, { "data-slot": "progress-indicator", asChild: true, children: /* @__PURE__ */ jsx(
|
|
732
793
|
m.div,
|
|
733
794
|
{
|
|
734
795
|
className: "h-full bg-primary",
|
|
735
|
-
initial: { width: "0%" },
|
|
796
|
+
initial: motion.disabled ? false : { width: "0%" },
|
|
736
797
|
animate: { width: `${value ?? 0}%` },
|
|
737
|
-
transition:
|
|
798
|
+
transition: motion.transition
|
|
738
799
|
}
|
|
739
800
|
) })
|
|
740
801
|
}
|
|
@@ -771,9 +832,13 @@ function Badge({
|
|
|
771
832
|
size = "md",
|
|
772
833
|
intent: intentProp = "primary",
|
|
773
834
|
asChild = false,
|
|
835
|
+
surface,
|
|
836
|
+
radius,
|
|
837
|
+
animated,
|
|
774
838
|
...props
|
|
775
839
|
}) {
|
|
776
|
-
const
|
|
840
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
841
|
+
const motion = useSaasflareMotion(sf.animated, spring);
|
|
777
842
|
let resolvedVariant = variantProp;
|
|
778
843
|
let resolvedIntent = intentProp;
|
|
779
844
|
const legacy = LEGACY_VARIANT_MAP[variantProp];
|
|
@@ -787,24 +852,30 @@ function Badge({
|
|
|
787
852
|
return /* @__PURE__ */ jsx(
|
|
788
853
|
Slot7.Root,
|
|
789
854
|
{
|
|
855
|
+
...props,
|
|
790
856
|
"data-slot": "badge",
|
|
791
857
|
"data-variant": resolvedVariant,
|
|
792
858
|
"data-intent": resolvedIntent,
|
|
793
|
-
|
|
794
|
-
|
|
859
|
+
"data-surface": sf.surface,
|
|
860
|
+
"data-radius": sf.radius,
|
|
861
|
+
"data-animated": String(sf.animated),
|
|
862
|
+
className: cn(badgeVariants({ variant: resolvedVariant, size }), className)
|
|
795
863
|
}
|
|
796
864
|
);
|
|
797
865
|
}
|
|
798
866
|
return /* @__PURE__ */ jsx(
|
|
799
867
|
m.span,
|
|
800
868
|
{
|
|
869
|
+
...props,
|
|
801
870
|
"data-slot": "badge",
|
|
802
871
|
"data-variant": resolvedVariant,
|
|
803
872
|
"data-intent": resolvedIntent,
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
873
|
+
"data-surface": sf.surface,
|
|
874
|
+
"data-radius": sf.radius,
|
|
875
|
+
"data-animated": String(sf.animated),
|
|
876
|
+
whileHover: motion.disabled ? void 0 : { scale: 1.05 },
|
|
877
|
+
transition: motion.transition,
|
|
878
|
+
className: cn(badgeVariants({ variant: resolvedVariant, size }), className)
|
|
808
879
|
}
|
|
809
880
|
);
|
|
810
881
|
}
|
|
@@ -835,22 +906,30 @@ function TooltipContent({
|
|
|
835
906
|
className,
|
|
836
907
|
sideOffset = 6,
|
|
837
908
|
children,
|
|
909
|
+
surface,
|
|
910
|
+
radius,
|
|
911
|
+
animated,
|
|
838
912
|
...props
|
|
839
913
|
}) {
|
|
914
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
915
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
840
916
|
return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
841
917
|
TooltipPrimitive.Content,
|
|
842
918
|
{
|
|
919
|
+
...props,
|
|
843
920
|
"data-slot": "tooltip-content",
|
|
844
921
|
sideOffset,
|
|
845
922
|
asChild: true,
|
|
846
|
-
...props,
|
|
847
923
|
children: /* @__PURE__ */ jsx(
|
|
848
924
|
m.div,
|
|
849
925
|
{
|
|
850
|
-
|
|
926
|
+
"data-surface": sf.surface,
|
|
927
|
+
"data-radius": sf.radius,
|
|
928
|
+
"data-animated": String(sf.animated),
|
|
929
|
+
initial: motion.disabled ? false : { opacity: 0, scale: 0.92, y: 2 },
|
|
851
930
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
852
|
-
exit: { opacity: 0, scale: 0.92 },
|
|
853
|
-
transition:
|
|
931
|
+
exit: motion.disabled ? void 0 : { opacity: 0, scale: 0.92 },
|
|
932
|
+
transition: motion.transition,
|
|
854
933
|
className: cn(
|
|
855
934
|
"z-50 w-fit overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground shadow-md",
|
|
856
935
|
className
|
|
@@ -880,23 +959,31 @@ function PopoverContent({
|
|
|
880
959
|
className,
|
|
881
960
|
align = "center",
|
|
882
961
|
sideOffset = 4,
|
|
962
|
+
surface,
|
|
963
|
+
radius,
|
|
964
|
+
animated,
|
|
883
965
|
...props
|
|
884
966
|
}) {
|
|
967
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
968
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
885
969
|
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
886
970
|
PopoverPrimitive.Content,
|
|
887
971
|
{
|
|
972
|
+
...props,
|
|
888
973
|
"data-slot": "popover-content",
|
|
889
974
|
align,
|
|
890
975
|
sideOffset,
|
|
891
976
|
asChild: true,
|
|
892
|
-
...props,
|
|
893
977
|
children: /* @__PURE__ */ jsx(
|
|
894
978
|
m.div,
|
|
895
979
|
{
|
|
896
|
-
|
|
980
|
+
"data-surface": sf.surface,
|
|
981
|
+
"data-radius": sf.radius,
|
|
982
|
+
"data-animated": String(sf.animated),
|
|
983
|
+
initial: motion.disabled ? false : { opacity: 0, scale: 0.95, y: -4 },
|
|
897
984
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
898
|
-
exit: { opacity: 0, scale: 0.95, y: -4 },
|
|
899
|
-
transition:
|
|
985
|
+
exit: motion.disabled ? void 0 : { opacity: 0, scale: 0.95, y: -4 },
|
|
986
|
+
transition: motion.transition,
|
|
900
987
|
className: cn(
|
|
901
988
|
"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",
|
|
902
989
|
className
|
|
@@ -920,23 +1007,31 @@ function HoverCardContent({
|
|
|
920
1007
|
className,
|
|
921
1008
|
align = "center",
|
|
922
1009
|
sideOffset = 4,
|
|
1010
|
+
surface,
|
|
1011
|
+
radius,
|
|
1012
|
+
animated,
|
|
923
1013
|
...props
|
|
924
1014
|
}) {
|
|
1015
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1016
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
925
1017
|
return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
926
1018
|
HoverCardPrimitive.Content,
|
|
927
1019
|
{
|
|
1020
|
+
...props,
|
|
928
1021
|
"data-slot": "hover-card-content",
|
|
929
1022
|
align,
|
|
930
1023
|
sideOffset,
|
|
931
1024
|
asChild: true,
|
|
932
|
-
...props,
|
|
933
1025
|
children: /* @__PURE__ */ jsx(
|
|
934
1026
|
m.div,
|
|
935
1027
|
{
|
|
936
|
-
|
|
1028
|
+
"data-surface": sf.surface,
|
|
1029
|
+
"data-radius": sf.radius,
|
|
1030
|
+
"data-animated": String(sf.animated),
|
|
1031
|
+
initial: motion.disabled ? false : { opacity: 0, scale: 0.95, y: 4 },
|
|
937
1032
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
938
|
-
exit: { opacity: 0, scale: 0.95 },
|
|
939
|
-
transition:
|
|
1033
|
+
exit: motion.disabled ? void 0 : { opacity: 0, scale: 0.95 },
|
|
1034
|
+
transition: motion.transition,
|
|
940
1035
|
className: cn(
|
|
941
1036
|
"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",
|
|
942
1037
|
className
|
|
@@ -989,21 +1084,29 @@ function SelectContent({
|
|
|
989
1084
|
className,
|
|
990
1085
|
children,
|
|
991
1086
|
position = "popper",
|
|
1087
|
+
surface,
|
|
1088
|
+
radius,
|
|
1089
|
+
animated,
|
|
992
1090
|
...props
|
|
993
1091
|
}) {
|
|
1092
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1093
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
994
1094
|
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
995
1095
|
SelectPrimitive.Content,
|
|
996
1096
|
{
|
|
1097
|
+
...props,
|
|
997
1098
|
"data-slot": "select-content",
|
|
998
1099
|
position,
|
|
999
1100
|
asChild: true,
|
|
1000
|
-
...props,
|
|
1001
1101
|
children: /* @__PURE__ */ jsxs(
|
|
1002
1102
|
m.div,
|
|
1003
1103
|
{
|
|
1004
|
-
|
|
1104
|
+
"data-surface": sf.surface,
|
|
1105
|
+
"data-radius": sf.radius,
|
|
1106
|
+
"data-animated": String(sf.animated),
|
|
1107
|
+
initial: motion.disabled ? false : { opacity: 0, scale: 0.96, y: -4 },
|
|
1005
1108
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1006
|
-
transition:
|
|
1109
|
+
transition: motion.transition,
|
|
1007
1110
|
className: cn(
|
|
1008
1111
|
"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",
|
|
1009
1112
|
position === "popper" && "w-full min-w-[var(--radix-select-trigger-width)]",
|
|
@@ -1124,22 +1227,30 @@ function DropdownMenuRadioGroup({ ...props }) {
|
|
|
1124
1227
|
function DropdownMenuContent({
|
|
1125
1228
|
className,
|
|
1126
1229
|
sideOffset = 4,
|
|
1230
|
+
surface,
|
|
1231
|
+
radius,
|
|
1232
|
+
animated,
|
|
1127
1233
|
...props
|
|
1128
1234
|
}) {
|
|
1235
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1236
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
1129
1237
|
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1130
1238
|
DropdownMenuPrimitive.Content,
|
|
1131
1239
|
{
|
|
1240
|
+
...props,
|
|
1132
1241
|
"data-slot": "dropdown-menu-content",
|
|
1133
1242
|
sideOffset,
|
|
1134
1243
|
asChild: true,
|
|
1135
|
-
...props,
|
|
1136
1244
|
children: /* @__PURE__ */ jsx(
|
|
1137
1245
|
m.div,
|
|
1138
1246
|
{
|
|
1139
|
-
|
|
1247
|
+
"data-surface": sf.surface,
|
|
1248
|
+
"data-radius": sf.radius,
|
|
1249
|
+
"data-animated": String(sf.animated),
|
|
1250
|
+
initial: motion.disabled ? false : { opacity: 0, scale: 0.95, y: -4 },
|
|
1140
1251
|
animate: { opacity: 1, scale: 1, y: 0 },
|
|
1141
|
-
exit: { opacity: 0, scale: 0.95, y: -4 },
|
|
1142
|
-
transition:
|
|
1252
|
+
exit: motion.disabled ? void 0 : { opacity: 0, scale: 0.95, y: -4 },
|
|
1253
|
+
transition: motion.transition,
|
|
1143
1254
|
className: cn(
|
|
1144
1255
|
"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",
|
|
1145
1256
|
className
|
|
@@ -1300,14 +1411,22 @@ function SheetContent({
|
|
|
1300
1411
|
children,
|
|
1301
1412
|
side = "right",
|
|
1302
1413
|
showCloseButton = true,
|
|
1414
|
+
surface,
|
|
1415
|
+
radius,
|
|
1416
|
+
animated,
|
|
1303
1417
|
...props
|
|
1304
1418
|
}) {
|
|
1419
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1305
1420
|
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
1306
1421
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
1307
1422
|
/* @__PURE__ */ jsxs(
|
|
1308
1423
|
SheetPrimitive.Content,
|
|
1309
1424
|
{
|
|
1425
|
+
...props,
|
|
1310
1426
|
"data-slot": "sheet-content",
|
|
1427
|
+
"data-surface": sf.surface,
|
|
1428
|
+
"data-radius": sf.radius,
|
|
1429
|
+
"data-animated": String(sf.animated),
|
|
1311
1430
|
className: cn(
|
|
1312
1431
|
"fixed z-50 flex flex-col gap-4 bg-background shadow-lg transition ease-in-out data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:animate-in data-[state=open]:duration-500",
|
|
1313
1432
|
side === "right" && "inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm",
|
|
@@ -1316,7 +1435,6 @@ function SheetContent({
|
|
|
1316
1435
|
side === "bottom" && "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
1317
1436
|
className
|
|
1318
1437
|
),
|
|
1319
|
-
...props,
|
|
1320
1438
|
children: [
|
|
1321
1439
|
children,
|
|
1322
1440
|
showCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
@@ -1380,8 +1498,13 @@ function Slider({
|
|
|
1380
1498
|
value,
|
|
1381
1499
|
min = 0,
|
|
1382
1500
|
max = 100,
|
|
1501
|
+
surface,
|
|
1502
|
+
radius,
|
|
1503
|
+
animated,
|
|
1383
1504
|
...props
|
|
1384
1505
|
}) {
|
|
1506
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1507
|
+
const motion = useSaasflareMotion(sf.animated, springBouncy);
|
|
1385
1508
|
const _values = React5.useMemo(
|
|
1386
1509
|
() => value ?? defaultValue ?? [min],
|
|
1387
1510
|
[value, defaultValue, min]
|
|
@@ -1389,7 +1512,11 @@ function Slider({
|
|
|
1389
1512
|
return /* @__PURE__ */ jsxs(
|
|
1390
1513
|
SliderPrimitive.Root,
|
|
1391
1514
|
{
|
|
1515
|
+
...props,
|
|
1392
1516
|
"data-slot": "slider",
|
|
1517
|
+
"data-surface": sf.surface,
|
|
1518
|
+
"data-radius": sf.radius,
|
|
1519
|
+
"data-animated": String(sf.animated),
|
|
1393
1520
|
defaultValue,
|
|
1394
1521
|
value,
|
|
1395
1522
|
min,
|
|
@@ -1398,7 +1525,6 @@ function Slider({
|
|
|
1398
1525
|
"relative flex w-full touch-none items-center select-none data-[orientation=horizontal]:h-5 data-[orientation=vertical]:h-full data-[orientation=vertical]:min-h-44 data-[orientation=vertical]:w-5 data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col data-[disabled]:opacity-50",
|
|
1399
1526
|
className
|
|
1400
1527
|
),
|
|
1401
|
-
...props,
|
|
1402
1528
|
children: [
|
|
1403
1529
|
/* @__PURE__ */ jsx(
|
|
1404
1530
|
SliderPrimitive.Track,
|
|
@@ -1423,9 +1549,9 @@ function Slider({
|
|
|
1423
1549
|
m.span,
|
|
1424
1550
|
{
|
|
1425
1551
|
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",
|
|
1426
|
-
whileHover: { scale: 1.2 },
|
|
1427
|
-
whileTap: { scale: 0.9 },
|
|
1428
|
-
transition:
|
|
1552
|
+
whileHover: motion.disabled ? void 0 : { scale: 1.2 },
|
|
1553
|
+
whileTap: motion.disabled ? void 0 : { scale: 0.9 },
|
|
1554
|
+
transition: motion.transition
|
|
1429
1555
|
}
|
|
1430
1556
|
)
|
|
1431
1557
|
},
|
|
@@ -1447,8 +1573,12 @@ function Alert({
|
|
|
1447
1573
|
className,
|
|
1448
1574
|
intent: intentProp,
|
|
1449
1575
|
variant,
|
|
1576
|
+
surface,
|
|
1577
|
+
radius,
|
|
1578
|
+
animated,
|
|
1450
1579
|
...props
|
|
1451
1580
|
}) {
|
|
1581
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1452
1582
|
let resolvedIntent = intentProp ?? "neutral";
|
|
1453
1583
|
if (!intentProp && variant === "destructive") {
|
|
1454
1584
|
resolvedIntent = "danger";
|
|
@@ -1457,15 +1587,18 @@ function Alert({
|
|
|
1457
1587
|
return /* @__PURE__ */ jsx(
|
|
1458
1588
|
"div",
|
|
1459
1589
|
{
|
|
1590
|
+
...props,
|
|
1460
1591
|
"data-slot": "alert",
|
|
1461
1592
|
"data-intent": resolvedIntent !== "neutral" ? resolvedIntent : void 0,
|
|
1593
|
+
"data-surface": sf.surface,
|
|
1594
|
+
"data-radius": sf.radius,
|
|
1595
|
+
"data-animated": String(sf.animated),
|
|
1462
1596
|
role: "alert",
|
|
1463
1597
|
className: cn(
|
|
1464
1598
|
"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",
|
|
1465
1599
|
intentStyle,
|
|
1466
1600
|
className
|
|
1467
|
-
)
|
|
1468
|
-
...props
|
|
1601
|
+
)
|
|
1469
1602
|
}
|
|
1470
1603
|
);
|
|
1471
1604
|
}
|
|
@@ -1501,18 +1634,25 @@ function AlertDescription({
|
|
|
1501
1634
|
function Avatar({
|
|
1502
1635
|
className,
|
|
1503
1636
|
size = "default",
|
|
1637
|
+
surface,
|
|
1638
|
+
radius,
|
|
1639
|
+
animated,
|
|
1504
1640
|
...props
|
|
1505
1641
|
}) {
|
|
1642
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1506
1643
|
return /* @__PURE__ */ jsx(
|
|
1507
1644
|
AvatarPrimitive.Root,
|
|
1508
1645
|
{
|
|
1646
|
+
...props,
|
|
1509
1647
|
"data-slot": "avatar",
|
|
1510
1648
|
"data-size": size,
|
|
1649
|
+
"data-surface": sf.surface,
|
|
1650
|
+
"data-radius": sf.radius,
|
|
1651
|
+
"data-animated": String(sf.animated),
|
|
1511
1652
|
className: cn(
|
|
1512
1653
|
"group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none transition-transform duration-200 hover:scale-105 data-[size=lg]:size-10 data-[size=sm]:size-6",
|
|
1513
1654
|
className
|
|
1514
|
-
)
|
|
1515
|
-
...props
|
|
1655
|
+
)
|
|
1516
1656
|
}
|
|
1517
1657
|
);
|
|
1518
1658
|
}
|
|
@@ -1667,17 +1807,24 @@ function ContextMenuSubContent({
|
|
|
1667
1807
|
}
|
|
1668
1808
|
function ContextMenuContent({
|
|
1669
1809
|
className,
|
|
1810
|
+
surface,
|
|
1811
|
+
radius,
|
|
1812
|
+
animated,
|
|
1670
1813
|
...props
|
|
1671
1814
|
}) {
|
|
1815
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1672
1816
|
return /* @__PURE__ */ jsx(ContextMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
1673
1817
|
ContextMenuPrimitive.Content,
|
|
1674
1818
|
{
|
|
1819
|
+
...props,
|
|
1675
1820
|
"data-slot": "context-menu-content",
|
|
1821
|
+
"data-surface": sf.surface,
|
|
1822
|
+
"data-radius": sf.radius,
|
|
1823
|
+
"data-animated": String(sf.animated),
|
|
1676
1824
|
className: cn(
|
|
1677
1825
|
"z-50 max-h-(--radix-context-menu-content-available-height) min-w-[8rem] origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1678
1826
|
className
|
|
1679
|
-
)
|
|
1680
|
-
...props
|
|
1827
|
+
)
|
|
1681
1828
|
}
|
|
1682
1829
|
) });
|
|
1683
1830
|
}
|
|
@@ -1794,17 +1941,24 @@ function ContextMenuShortcut({
|
|
|
1794
1941
|
}
|
|
1795
1942
|
function Menubar({
|
|
1796
1943
|
className,
|
|
1944
|
+
surface,
|
|
1945
|
+
radius,
|
|
1946
|
+
animated,
|
|
1797
1947
|
...props
|
|
1798
1948
|
}) {
|
|
1949
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1799
1950
|
return /* @__PURE__ */ jsx(
|
|
1800
1951
|
MenubarPrimitive.Root,
|
|
1801
1952
|
{
|
|
1953
|
+
...props,
|
|
1802
1954
|
"data-slot": "menubar",
|
|
1955
|
+
"data-surface": sf.surface,
|
|
1956
|
+
"data-radius": sf.radius,
|
|
1957
|
+
"data-animated": String(sf.animated),
|
|
1803
1958
|
className: cn(
|
|
1804
1959
|
"flex h-9 items-center gap-1 rounded-md border bg-background p-1 shadow-xs",
|
|
1805
1960
|
className
|
|
1806
|
-
)
|
|
1807
|
-
...props
|
|
1961
|
+
)
|
|
1808
1962
|
}
|
|
1809
1963
|
);
|
|
1810
1964
|
}
|
|
@@ -1849,20 +2003,27 @@ function MenubarContent({
|
|
|
1849
2003
|
align = "start",
|
|
1850
2004
|
alignOffset = -4,
|
|
1851
2005
|
sideOffset = 8,
|
|
2006
|
+
surface,
|
|
2007
|
+
radius,
|
|
2008
|
+
animated,
|
|
1852
2009
|
...props
|
|
1853
2010
|
}) {
|
|
2011
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
1854
2012
|
return /* @__PURE__ */ jsx(MenubarPortal, { children: /* @__PURE__ */ jsx(
|
|
1855
2013
|
MenubarPrimitive.Content,
|
|
1856
2014
|
{
|
|
2015
|
+
...props,
|
|
1857
2016
|
"data-slot": "menubar-content",
|
|
2017
|
+
"data-surface": sf.surface,
|
|
2018
|
+
"data-radius": sf.radius,
|
|
2019
|
+
"data-animated": String(sf.animated),
|
|
1858
2020
|
align,
|
|
1859
2021
|
alignOffset,
|
|
1860
2022
|
sideOffset,
|
|
1861
2023
|
className: cn(
|
|
1862
2024
|
"z-50 min-w-[12rem] origin-(--radix-menubar-content-transform-origin) overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",
|
|
1863
2025
|
className
|
|
1864
|
-
)
|
|
1865
|
-
...props
|
|
2026
|
+
)
|
|
1866
2027
|
}
|
|
1867
2028
|
) });
|
|
1868
2029
|
}
|
|
@@ -2025,18 +2186,25 @@ function NavigationMenu({
|
|
|
2025
2186
|
className,
|
|
2026
2187
|
children,
|
|
2027
2188
|
viewport = true,
|
|
2189
|
+
surface,
|
|
2190
|
+
radius,
|
|
2191
|
+
animated,
|
|
2028
2192
|
...props
|
|
2029
2193
|
}) {
|
|
2194
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
2030
2195
|
return /* @__PURE__ */ jsxs(
|
|
2031
2196
|
NavigationMenuPrimitive.Root,
|
|
2032
2197
|
{
|
|
2198
|
+
...props,
|
|
2033
2199
|
"data-slot": "navigation-menu",
|
|
2034
2200
|
"data-viewport": viewport,
|
|
2201
|
+
"data-surface": sf.surface,
|
|
2202
|
+
"data-radius": sf.radius,
|
|
2203
|
+
"data-animated": String(sf.animated),
|
|
2035
2204
|
className: cn(
|
|
2036
2205
|
"group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
|
|
2037
2206
|
className
|
|
2038
2207
|
),
|
|
2039
|
-
...props,
|
|
2040
2208
|
children: [
|
|
2041
2209
|
children,
|
|
2042
2210
|
viewport && /* @__PURE__ */ jsx(NavigationMenuViewport, {})
|
|
@@ -2180,19 +2348,22 @@ var RADIUS_BY_AS = {
|
|
|
2180
2348
|
text: "var(--radius-sm)",
|
|
2181
2349
|
card: "var(--radius-lg)"
|
|
2182
2350
|
};
|
|
2183
|
-
function Skeleton({ as, className, style, ...props }) {
|
|
2351
|
+
function Skeleton({ as, className, style, surface, radius, animated, ...props }) {
|
|
2352
|
+
const sf = useSaasflareProps({ radius, animated });
|
|
2184
2353
|
const radiusStyle = as ? { borderRadius: RADIUS_BY_AS[as], ...style } : style;
|
|
2185
2354
|
return /* @__PURE__ */ jsx(
|
|
2186
2355
|
"div",
|
|
2187
2356
|
{
|
|
2357
|
+
...props,
|
|
2188
2358
|
"data-slot": "skeleton",
|
|
2359
|
+
"data-radius": sf.radius,
|
|
2360
|
+
"data-animated": String(sf.animated),
|
|
2189
2361
|
className: cn(
|
|
2190
2362
|
!as && "rounded-md",
|
|
2191
2363
|
"bg-gradient-to-r from-accent/80 via-accent/40 to-accent/80 bg-[length:200%_100%] animate-[shimmer_2s_ease-in-out_infinite] motion-reduce:animate-none motion-reduce:bg-accent/60",
|
|
2192
2364
|
className
|
|
2193
2365
|
),
|
|
2194
|
-
style: radiusStyle
|
|
2195
|
-
...props
|
|
2366
|
+
style: radiusStyle
|
|
2196
2367
|
}
|
|
2197
2368
|
);
|
|
2198
2369
|
}
|
|
@@ -2220,14 +2391,21 @@ function Toggle({
|
|
|
2220
2391
|
className,
|
|
2221
2392
|
variant,
|
|
2222
2393
|
size,
|
|
2394
|
+
surface,
|
|
2395
|
+
radius,
|
|
2396
|
+
animated,
|
|
2223
2397
|
...props
|
|
2224
2398
|
}) {
|
|
2399
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
2225
2400
|
return /* @__PURE__ */ jsx(
|
|
2226
2401
|
TogglePrimitive.Root,
|
|
2227
2402
|
{
|
|
2403
|
+
...props,
|
|
2228
2404
|
"data-slot": "toggle",
|
|
2229
|
-
|
|
2230
|
-
|
|
2405
|
+
"data-surface": sf.surface,
|
|
2406
|
+
"data-radius": sf.radius,
|
|
2407
|
+
"data-animated": String(sf.animated),
|
|
2408
|
+
className: cn(toggleVariants({ variant, size, className }))
|
|
2231
2409
|
}
|
|
2232
2410
|
);
|
|
2233
2411
|
}
|
|
@@ -2242,21 +2420,28 @@ function ToggleGroup({
|
|
|
2242
2420
|
size,
|
|
2243
2421
|
spacing = 0,
|
|
2244
2422
|
children,
|
|
2423
|
+
surface,
|
|
2424
|
+
radius,
|
|
2425
|
+
animated,
|
|
2245
2426
|
...props
|
|
2246
2427
|
}) {
|
|
2428
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
2247
2429
|
return /* @__PURE__ */ jsx(
|
|
2248
2430
|
ToggleGroupPrimitive.Root,
|
|
2249
2431
|
{
|
|
2432
|
+
...props,
|
|
2250
2433
|
"data-slot": "toggle-group",
|
|
2251
2434
|
"data-variant": variant,
|
|
2252
2435
|
"data-size": size,
|
|
2253
2436
|
"data-spacing": spacing,
|
|
2437
|
+
"data-surface": sf.surface,
|
|
2438
|
+
"data-radius": sf.radius,
|
|
2439
|
+
"data-animated": String(sf.animated),
|
|
2254
2440
|
style: { "--gap": spacing },
|
|
2255
2441
|
className: cn(
|
|
2256
2442
|
"group/toggle-group flex w-fit items-center gap-[--spacing(var(--gap))] rounded-md data-[spacing=default]:data-[variant=outline]:shadow-xs",
|
|
2257
2443
|
className
|
|
2258
2444
|
),
|
|
2259
|
-
...props,
|
|
2260
2445
|
children: /* @__PURE__ */ jsx(ToggleGroupContext.Provider, { value: { variant, size, spacing }, children })
|
|
2261
2446
|
}
|
|
2262
2447
|
);
|
|
@@ -2292,14 +2477,21 @@ function ToggleGroupItem({
|
|
|
2292
2477
|
}
|
|
2293
2478
|
function RadioGroup4({
|
|
2294
2479
|
className,
|
|
2480
|
+
surface,
|
|
2481
|
+
radius,
|
|
2482
|
+
animated,
|
|
2295
2483
|
...props
|
|
2296
2484
|
}) {
|
|
2485
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
2297
2486
|
return /* @__PURE__ */ jsx(
|
|
2298
2487
|
RadioGroupPrimitive.Root,
|
|
2299
2488
|
{
|
|
2489
|
+
...props,
|
|
2300
2490
|
"data-slot": "radio-group",
|
|
2301
|
-
|
|
2302
|
-
|
|
2491
|
+
"data-surface": sf.surface,
|
|
2492
|
+
"data-radius": sf.radius,
|
|
2493
|
+
"data-animated": String(sf.animated),
|
|
2494
|
+
className: cn("grid gap-3", className)
|
|
2303
2495
|
}
|
|
2304
2496
|
);
|
|
2305
2497
|
}
|
|
@@ -2344,38 +2536,55 @@ function CollapsibleTrigger2({
|
|
|
2344
2536
|
);
|
|
2345
2537
|
}
|
|
2346
2538
|
function CollapsibleContent2({
|
|
2539
|
+
surface,
|
|
2540
|
+
radius,
|
|
2541
|
+
animated,
|
|
2347
2542
|
...props
|
|
2348
2543
|
}) {
|
|
2544
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
2349
2545
|
return /* @__PURE__ */ jsx(
|
|
2350
2546
|
CollapsiblePrimitive.CollapsibleContent,
|
|
2351
2547
|
{
|
|
2548
|
+
...props,
|
|
2352
2549
|
"data-slot": "collapsible-content",
|
|
2353
|
-
|
|
2550
|
+
"data-surface": sf.surface,
|
|
2551
|
+
"data-radius": sf.radius,
|
|
2552
|
+
"data-animated": String(sf.animated)
|
|
2354
2553
|
}
|
|
2355
2554
|
);
|
|
2356
2555
|
}
|
|
2357
|
-
function Spinner({ className, ...props }) {
|
|
2556
|
+
function Spinner({ className, surface, radius, animated, ...props }) {
|
|
2557
|
+
const sf = useSaasflareProps({ animated });
|
|
2358
2558
|
return /* @__PURE__ */ jsx(
|
|
2359
2559
|
Loader2Icon,
|
|
2360
2560
|
{
|
|
2561
|
+
...props,
|
|
2361
2562
|
role: "status",
|
|
2362
2563
|
"aria-label": "Loading",
|
|
2363
|
-
|
|
2364
|
-
|
|
2564
|
+
"data-slot": "spinner",
|
|
2565
|
+
"data-animated": String(sf.animated),
|
|
2566
|
+
className: cn("size-4 animate-spin", className)
|
|
2365
2567
|
}
|
|
2366
2568
|
);
|
|
2367
2569
|
}
|
|
2368
2570
|
function ScrollArea({
|
|
2369
2571
|
className,
|
|
2370
2572
|
children,
|
|
2573
|
+
surface,
|
|
2574
|
+
radius,
|
|
2575
|
+
animated,
|
|
2371
2576
|
...props
|
|
2372
2577
|
}) {
|
|
2578
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
2373
2579
|
return /* @__PURE__ */ jsxs(
|
|
2374
2580
|
ScrollAreaPrimitive.Root,
|
|
2375
2581
|
{
|
|
2582
|
+
...props,
|
|
2376
2583
|
"data-slot": "scroll-area",
|
|
2584
|
+
"data-surface": sf.surface,
|
|
2585
|
+
"data-radius": sf.radius,
|
|
2586
|
+
"data-animated": String(sf.animated),
|
|
2377
2587
|
className: cn("relative", className),
|
|
2378
|
-
...props,
|
|
2379
2588
|
children: [
|
|
2380
2589
|
/* @__PURE__ */ jsx(
|
|
2381
2590
|
ScrollAreaPrimitive.Viewport,
|
|
@@ -3498,11 +3707,16 @@ var Toaster = /* @__PURE__ */ React5__default.forwardRef(function Toaster2(props
|
|
|
3498
3707
|
}))
|
|
3499
3708
|
);
|
|
3500
3709
|
});
|
|
3501
|
-
var Toaster3 = ({ ...props }) => {
|
|
3710
|
+
var Toaster3 = ({ surface, radius, animated, ...props }) => {
|
|
3502
3711
|
const { theme = "system" } = useTheme();
|
|
3712
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
3503
3713
|
return /* @__PURE__ */ jsx(
|
|
3504
3714
|
Toaster,
|
|
3505
3715
|
{
|
|
3716
|
+
"data-slot": "toaster",
|
|
3717
|
+
"data-surface": sf.surface,
|
|
3718
|
+
"data-radius": sf.radius,
|
|
3719
|
+
"data-animated": String(sf.animated),
|
|
3506
3720
|
theme,
|
|
3507
3721
|
className: "toaster group",
|
|
3508
3722
|
icons: {
|
|
@@ -3527,8 +3741,19 @@ function AspectRatio({
|
|
|
3527
3741
|
}) {
|
|
3528
3742
|
return /* @__PURE__ */ jsx(AspectRatioPrimitive.Root, { "data-slot": "aspect-ratio", ...props });
|
|
3529
3743
|
}
|
|
3530
|
-
function Breadcrumb({ ...props }) {
|
|
3531
|
-
|
|
3744
|
+
function Breadcrumb({ surface, radius, animated, ...props }) {
|
|
3745
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
3746
|
+
return /* @__PURE__ */ jsx(
|
|
3747
|
+
"nav",
|
|
3748
|
+
{
|
|
3749
|
+
...props,
|
|
3750
|
+
"aria-label": "breadcrumb",
|
|
3751
|
+
"data-slot": "breadcrumb",
|
|
3752
|
+
"data-surface": sf.surface,
|
|
3753
|
+
"data-radius": sf.radius,
|
|
3754
|
+
"data-animated": String(sf.animated)
|
|
3755
|
+
}
|
|
3756
|
+
);
|
|
3532
3757
|
}
|
|
3533
3758
|
function BreadcrumbList({ className, ...props }) {
|
|
3534
3759
|
return /* @__PURE__ */ jsx(
|
|
@@ -3853,16 +4078,20 @@ function DirectionProvider2({
|
|
|
3853
4078
|
return /* @__PURE__ */ jsx(Direction.DirectionProvider, { dir: direction ?? dir, children });
|
|
3854
4079
|
}
|
|
3855
4080
|
var useDirection2 = Direction.useDirection;
|
|
3856
|
-
function Empty({ className, ...props }) {
|
|
4081
|
+
function Empty({ className, surface, radius, animated, ...props }) {
|
|
4082
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
3857
4083
|
return /* @__PURE__ */ jsx(
|
|
3858
4084
|
"div",
|
|
3859
4085
|
{
|
|
4086
|
+
...props,
|
|
3860
4087
|
"data-slot": "empty",
|
|
4088
|
+
"data-surface": sf.surface,
|
|
4089
|
+
"data-radius": sf.radius,
|
|
4090
|
+
"data-animated": String(sf.animated),
|
|
3861
4091
|
className: cn(
|
|
3862
4092
|
"flex min-w-0 flex-1 flex-col items-center justify-center gap-6 rounded-lg border-dashed p-6 text-center text-balance md:p-12",
|
|
3863
4093
|
className
|
|
3864
|
-
)
|
|
3865
|
-
...props
|
|
4094
|
+
)
|
|
3866
4095
|
}
|
|
3867
4096
|
);
|
|
3868
4097
|
}
|
|
@@ -4753,18 +4982,22 @@ function ItemFooter({ className, ...props }) {
|
|
|
4753
4982
|
}
|
|
4754
4983
|
);
|
|
4755
4984
|
}
|
|
4756
|
-
function Kbd({ className, ...props }) {
|
|
4985
|
+
function Kbd({ className, surface, radius, animated, ...props }) {
|
|
4986
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
4757
4987
|
return /* @__PURE__ */ jsx(
|
|
4758
4988
|
"kbd",
|
|
4759
4989
|
{
|
|
4990
|
+
...props,
|
|
4760
4991
|
"data-slot": "kbd",
|
|
4992
|
+
"data-surface": sf.surface,
|
|
4993
|
+
"data-radius": sf.radius,
|
|
4994
|
+
"data-animated": String(sf.animated),
|
|
4761
4995
|
className: cn(
|
|
4762
4996
|
"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none",
|
|
4763
4997
|
"[&_svg:not([class*='size-'])]:size-3",
|
|
4764
4998
|
"[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
|
|
4765
4999
|
className
|
|
4766
|
-
)
|
|
4767
|
-
...props
|
|
5000
|
+
)
|
|
4768
5001
|
}
|
|
4769
5002
|
);
|
|
4770
5003
|
}
|
|
@@ -4781,8 +5014,12 @@ function KbdGroup({ className, ...props }) {
|
|
|
4781
5014
|
function NativeSelect({
|
|
4782
5015
|
className,
|
|
4783
5016
|
size = "default",
|
|
5017
|
+
surface,
|
|
5018
|
+
radius,
|
|
5019
|
+
animated,
|
|
4784
5020
|
...props
|
|
4785
5021
|
}) {
|
|
5022
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
4786
5023
|
return /* @__PURE__ */ jsxs(
|
|
4787
5024
|
"div",
|
|
4788
5025
|
{
|
|
@@ -4792,15 +5029,18 @@ function NativeSelect({
|
|
|
4792
5029
|
/* @__PURE__ */ jsx(
|
|
4793
5030
|
"select",
|
|
4794
5031
|
{
|
|
5032
|
+
...props,
|
|
4795
5033
|
"data-slot": "native-select",
|
|
4796
5034
|
"data-size": size,
|
|
5035
|
+
"data-surface": sf.surface,
|
|
5036
|
+
"data-radius": sf.radius,
|
|
5037
|
+
"data-animated": String(sf.animated),
|
|
4797
5038
|
className: cn(
|
|
4798
5039
|
"h-9 w-full min-w-0 appearance-none rounded-md border border-input bg-transparent px-3 py-2 pr-9 text-sm shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed data-[size=sm]:h-8 data-[size=sm]:py-1 dark:bg-input/30 dark:hover:bg-input/50",
|
|
4799
5040
|
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
4800
5041
|
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
4801
5042
|
className
|
|
4802
|
-
)
|
|
4803
|
-
...props
|
|
5043
|
+
)
|
|
4804
5044
|
}
|
|
4805
5045
|
),
|
|
4806
5046
|
/* @__PURE__ */ jsx(
|
|
@@ -4936,7 +5176,8 @@ function PaginationEllipsis({
|
|
|
4936
5176
|
}
|
|
4937
5177
|
);
|
|
4938
5178
|
}
|
|
4939
|
-
function Table({ className, ...props }) {
|
|
5179
|
+
function Table({ className, surface, radius, animated, ...props }) {
|
|
5180
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
4940
5181
|
return /* @__PURE__ */ jsx(
|
|
4941
5182
|
"div",
|
|
4942
5183
|
{
|
|
@@ -4945,9 +5186,12 @@ function Table({ className, ...props }) {
|
|
|
4945
5186
|
children: /* @__PURE__ */ jsx(
|
|
4946
5187
|
"table",
|
|
4947
5188
|
{
|
|
5189
|
+
...props,
|
|
4948
5190
|
"data-slot": "table",
|
|
4949
|
-
|
|
4950
|
-
|
|
5191
|
+
"data-surface": sf.surface,
|
|
5192
|
+
"data-radius": sf.radius,
|
|
5193
|
+
"data-animated": String(sf.animated),
|
|
5194
|
+
className: cn("w-full caption-bottom text-sm", className)
|
|
4951
5195
|
}
|
|
4952
5196
|
)
|
|
4953
5197
|
}
|
|
@@ -5039,8 +5283,11 @@ function TableCaption({
|
|
|
5039
5283
|
);
|
|
5040
5284
|
}
|
|
5041
5285
|
var AnimatedTooltip = ({
|
|
5042
|
-
items
|
|
5286
|
+
items,
|
|
5287
|
+
animated
|
|
5043
5288
|
}) => {
|
|
5289
|
+
const sf = useSaasflareProps({ animated });
|
|
5290
|
+
const motion = useSaasflareMotion(sf.animated, { type: "spring", stiffness: 260, damping: 10 });
|
|
5044
5291
|
const [hoveredIndex, setHoveredIndex] = useState(null);
|
|
5045
5292
|
const springConfig = { stiffness: 100, damping: 5 };
|
|
5046
5293
|
const x = useMotionValue(0);
|
|
@@ -5060,18 +5307,16 @@ var AnimatedTooltip = ({
|
|
|
5060
5307
|
/* @__PURE__ */ jsx(AnimatePresence, { children: hoveredIndex === item.id && /* @__PURE__ */ jsxs(
|
|
5061
5308
|
m.div,
|
|
5062
5309
|
{
|
|
5063
|
-
|
|
5310
|
+
"data-slot": "animated-tooltip",
|
|
5311
|
+
"data-animated": String(sf.animated),
|
|
5312
|
+
initial: motion.disabled ? false : { opacity: 0, y: 20, scale: 0.6 },
|
|
5064
5313
|
animate: {
|
|
5065
5314
|
opacity: 1,
|
|
5066
5315
|
y: 0,
|
|
5067
5316
|
scale: 1,
|
|
5068
|
-
transition:
|
|
5069
|
-
type: "spring",
|
|
5070
|
-
stiffness: 260,
|
|
5071
|
-
damping: 10
|
|
5072
|
-
}
|
|
5317
|
+
transition: motion.transition
|
|
5073
5318
|
},
|
|
5074
|
-
exit: { opacity: 0, y: 20, scale: 0.6 },
|
|
5319
|
+
exit: motion.disabled ? void 0 : { opacity: 0, y: 20, scale: 0.6 },
|
|
5075
5320
|
style: {
|
|
5076
5321
|
translateX,
|
|
5077
5322
|
rotate,
|
|
@@ -5107,15 +5352,18 @@ function TypewriterText({
|
|
|
5107
5352
|
wordDelay = 40,
|
|
5108
5353
|
skipAnimation = false,
|
|
5109
5354
|
onComplete,
|
|
5110
|
-
className
|
|
5355
|
+
className,
|
|
5356
|
+
animated
|
|
5111
5357
|
}) {
|
|
5358
|
+
const sf = useSaasflareProps({ animated });
|
|
5359
|
+
const effectiveSkip = skipAnimation || !sf.animated;
|
|
5112
5360
|
const [displayedWords, setDisplayedWords] = useState([]);
|
|
5113
|
-
const [isComplete, setIsComplete] = useState(
|
|
5361
|
+
const [isComplete, setIsComplete] = useState(effectiveSkip);
|
|
5114
5362
|
const words = useRef(text.split(" "));
|
|
5115
5363
|
const timeoutRef = useRef(null);
|
|
5116
5364
|
useEffect(() => {
|
|
5117
5365
|
words.current = text.split(" ");
|
|
5118
|
-
if (
|
|
5366
|
+
if (effectiveSkip) {
|
|
5119
5367
|
setDisplayedWords(words.current);
|
|
5120
5368
|
setIsComplete(true);
|
|
5121
5369
|
return;
|
|
@@ -5139,11 +5387,19 @@ function TypewriterText({
|
|
|
5139
5387
|
clearTimeout(timeoutRef.current);
|
|
5140
5388
|
}
|
|
5141
5389
|
};
|
|
5142
|
-
}, [text, wordDelay,
|
|
5143
|
-
return /* @__PURE__ */ jsxs(
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5390
|
+
}, [text, wordDelay, effectiveSkip, onComplete]);
|
|
5391
|
+
return /* @__PURE__ */ jsxs(
|
|
5392
|
+
"span",
|
|
5393
|
+
{
|
|
5394
|
+
"data-slot": "typewriter-text",
|
|
5395
|
+
"data-animated": String(sf.animated),
|
|
5396
|
+
className: cn("inline", className),
|
|
5397
|
+
children: [
|
|
5398
|
+
displayedWords.join(" "),
|
|
5399
|
+
!isComplete && /* @__PURE__ */ jsx("span", { className: "inline-block w-0.5 h-4 bg-primary ml-0.5 animate-pulse" })
|
|
5400
|
+
]
|
|
5401
|
+
}
|
|
5402
|
+
);
|
|
5147
5403
|
}
|
|
5148
5404
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
5149
5405
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
@@ -5280,19 +5536,26 @@ function Sidebar({
|
|
|
5280
5536
|
collapsible = "offcanvas",
|
|
5281
5537
|
className,
|
|
5282
5538
|
children,
|
|
5539
|
+
surface,
|
|
5540
|
+
radius,
|
|
5541
|
+
animated,
|
|
5283
5542
|
...props
|
|
5284
5543
|
}) {
|
|
5285
5544
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
5545
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5286
5546
|
if (collapsible === "none") {
|
|
5287
5547
|
return /* @__PURE__ */ jsx(
|
|
5288
5548
|
"div",
|
|
5289
5549
|
{
|
|
5550
|
+
...props,
|
|
5290
5551
|
"data-slot": "sidebar",
|
|
5552
|
+
"data-surface": sf.surface,
|
|
5553
|
+
"data-radius": sf.radius,
|
|
5554
|
+
"data-animated": String(sf.animated),
|
|
5291
5555
|
className: cn(
|
|
5292
5556
|
"bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",
|
|
5293
5557
|
className
|
|
5294
5558
|
),
|
|
5295
|
-
...props,
|
|
5296
5559
|
children
|
|
5297
5560
|
}
|
|
5298
5561
|
);
|
|
@@ -5328,6 +5591,9 @@ function Sidebar({
|
|
|
5328
5591
|
"data-variant": variant,
|
|
5329
5592
|
"data-side": side,
|
|
5330
5593
|
"data-slot": "sidebar",
|
|
5594
|
+
"data-surface": sf.surface,
|
|
5595
|
+
"data-radius": sf.radius,
|
|
5596
|
+
"data-animated": String(sf.animated),
|
|
5331
5597
|
children: [
|
|
5332
5598
|
/* @__PURE__ */ jsx(
|
|
5333
5599
|
"div",
|
|
@@ -5770,14 +6036,21 @@ function PageHeader({
|
|
|
5770
6036
|
breadcrumbs,
|
|
5771
6037
|
actions,
|
|
5772
6038
|
className,
|
|
6039
|
+
surface,
|
|
6040
|
+
radius,
|
|
6041
|
+
animated,
|
|
5773
6042
|
...props
|
|
5774
6043
|
}) {
|
|
6044
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5775
6045
|
return /* @__PURE__ */ jsxs(
|
|
5776
6046
|
"div",
|
|
5777
6047
|
{
|
|
6048
|
+
...props,
|
|
5778
6049
|
"data-slot": "page-header",
|
|
6050
|
+
"data-surface": sf.surface,
|
|
6051
|
+
"data-radius": sf.radius,
|
|
6052
|
+
"data-animated": String(sf.animated),
|
|
5779
6053
|
className: cn("flex flex-col gap-1", className),
|
|
5780
|
-
...props,
|
|
5781
6054
|
children: [
|
|
5782
6055
|
breadcrumbs && /* @__PURE__ */ jsx("div", { "data-slot": "page-header-breadcrumbs", className: "mb-2", children: breadcrumbs }),
|
|
5783
6056
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
@@ -5798,17 +6071,24 @@ function SectionCard({
|
|
|
5798
6071
|
headerAction,
|
|
5799
6072
|
className,
|
|
5800
6073
|
children,
|
|
6074
|
+
surface,
|
|
6075
|
+
radius,
|
|
6076
|
+
animated,
|
|
5801
6077
|
...props
|
|
5802
6078
|
}) {
|
|
6079
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5803
6080
|
return /* @__PURE__ */ jsxs(
|
|
5804
6081
|
"div",
|
|
5805
6082
|
{
|
|
6083
|
+
...props,
|
|
5806
6084
|
"data-slot": "section-card",
|
|
6085
|
+
"data-surface": sf.surface,
|
|
6086
|
+
"data-radius": sf.radius,
|
|
6087
|
+
"data-animated": String(sf.animated),
|
|
5807
6088
|
className: cn(
|
|
5808
6089
|
"rounded-xl border bg-card text-card-foreground shadow-sm",
|
|
5809
6090
|
className
|
|
5810
6091
|
),
|
|
5811
|
-
...props,
|
|
5812
6092
|
children: [
|
|
5813
6093
|
/* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4 border-b px-6 py-4", children: [
|
|
5814
6094
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
@@ -5846,17 +6126,24 @@ function MetricCard({
|
|
|
5846
6126
|
trend,
|
|
5847
6127
|
icon,
|
|
5848
6128
|
className,
|
|
6129
|
+
surface,
|
|
6130
|
+
radius,
|
|
6131
|
+
animated,
|
|
5849
6132
|
...props
|
|
5850
6133
|
}) {
|
|
6134
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5851
6135
|
return /* @__PURE__ */ jsxs(
|
|
5852
6136
|
"div",
|
|
5853
6137
|
{
|
|
6138
|
+
...props,
|
|
5854
6139
|
"data-slot": "metric-card",
|
|
6140
|
+
"data-surface": sf.surface,
|
|
6141
|
+
"data-radius": sf.radius,
|
|
6142
|
+
"data-animated": String(sf.animated),
|
|
5855
6143
|
className: cn(
|
|
5856
6144
|
"flex flex-col gap-2 rounded-xl border bg-card p-6 text-card-foreground shadow-sm",
|
|
5857
6145
|
className
|
|
5858
6146
|
),
|
|
5859
|
-
...props,
|
|
5860
6147
|
children: [
|
|
5861
6148
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
5862
6149
|
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-muted-foreground", children: label }),
|
|
@@ -5881,17 +6168,24 @@ function EmptyState({
|
|
|
5881
6168
|
description,
|
|
5882
6169
|
action,
|
|
5883
6170
|
className,
|
|
6171
|
+
surface,
|
|
6172
|
+
radius,
|
|
6173
|
+
animated,
|
|
5884
6174
|
...props
|
|
5885
6175
|
}) {
|
|
6176
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5886
6177
|
return /* @__PURE__ */ jsxs(
|
|
5887
6178
|
"div",
|
|
5888
6179
|
{
|
|
6180
|
+
...props,
|
|
5889
6181
|
"data-slot": "empty-state",
|
|
6182
|
+
"data-surface": sf.surface,
|
|
6183
|
+
"data-radius": sf.radius,
|
|
6184
|
+
"data-animated": String(sf.animated),
|
|
5890
6185
|
className: cn(
|
|
5891
6186
|
"flex flex-col items-center justify-center gap-4 py-12 text-center",
|
|
5892
6187
|
className
|
|
5893
6188
|
),
|
|
5894
|
-
...props,
|
|
5895
6189
|
children: [
|
|
5896
6190
|
icon && /* @__PURE__ */ jsx("div", { className: "text-muted-foreground [&_svg]:size-12", children: icon }),
|
|
5897
6191
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
@@ -5908,50 +6202,71 @@ function SearchField({
|
|
|
5908
6202
|
loading = false,
|
|
5909
6203
|
onClear,
|
|
5910
6204
|
value,
|
|
6205
|
+
surface,
|
|
6206
|
+
radius,
|
|
6207
|
+
animated,
|
|
5911
6208
|
...props
|
|
5912
6209
|
}) {
|
|
6210
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5913
6211
|
const hasValue = typeof value === "string" ? value.length > 0 : false;
|
|
5914
|
-
return /* @__PURE__ */ jsxs(
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
"
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
6212
|
+
return /* @__PURE__ */ jsxs(
|
|
6213
|
+
"div",
|
|
6214
|
+
{
|
|
6215
|
+
"data-slot": "search-field",
|
|
6216
|
+
"data-surface": sf.surface,
|
|
6217
|
+
"data-radius": sf.radius,
|
|
6218
|
+
"data-animated": String(sf.animated),
|
|
6219
|
+
className: cn("relative", className),
|
|
6220
|
+
children: [
|
|
6221
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground", children: loading ? /* @__PURE__ */ jsx(Loader2Icon, { className: "size-4 animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ jsx(SearchIcon, { className: "size-4", "aria-hidden": "true" }) }),
|
|
6222
|
+
/* @__PURE__ */ jsx(
|
|
6223
|
+
"input",
|
|
6224
|
+
{
|
|
6225
|
+
type: "search",
|
|
6226
|
+
"data-slot": "search-field-input",
|
|
6227
|
+
className: "h-9 w-full rounded-md border border-input bg-background pl-9 pr-9 text-sm outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50",
|
|
6228
|
+
value,
|
|
6229
|
+
...props
|
|
6230
|
+
}
|
|
6231
|
+
),
|
|
6232
|
+
hasValue && onClear && /* @__PURE__ */ jsx(
|
|
6233
|
+
"button",
|
|
6234
|
+
{
|
|
6235
|
+
type: "button",
|
|
6236
|
+
"data-slot": "search-field-clear",
|
|
6237
|
+
onClick: onClear,
|
|
6238
|
+
className: "absolute right-2 top-1/2 -translate-y-1/2 rounded-sm p-0.5 text-muted-foreground transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
6239
|
+
"aria-label": "Clear search",
|
|
6240
|
+
children: /* @__PURE__ */ jsx(XIcon, { className: "size-3.5" })
|
|
6241
|
+
}
|
|
6242
|
+
)
|
|
6243
|
+
]
|
|
6244
|
+
}
|
|
6245
|
+
);
|
|
5938
6246
|
}
|
|
5939
6247
|
function SettingsSection({
|
|
5940
6248
|
label,
|
|
5941
6249
|
description,
|
|
5942
6250
|
className,
|
|
5943
6251
|
children,
|
|
6252
|
+
surface,
|
|
6253
|
+
radius,
|
|
6254
|
+
animated,
|
|
5944
6255
|
...props
|
|
5945
6256
|
}) {
|
|
6257
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5946
6258
|
return /* @__PURE__ */ jsxs(
|
|
5947
6259
|
"div",
|
|
5948
6260
|
{
|
|
6261
|
+
...props,
|
|
5949
6262
|
"data-slot": "settings-section",
|
|
6263
|
+
"data-surface": sf.surface,
|
|
6264
|
+
"data-radius": sf.radius,
|
|
6265
|
+
"data-animated": String(sf.animated),
|
|
5950
6266
|
className: cn(
|
|
5951
6267
|
"flex flex-col gap-3 py-4 sm:flex-row sm:items-center sm:justify-between sm:gap-6",
|
|
5952
6268
|
className
|
|
5953
6269
|
),
|
|
5954
|
-
...props,
|
|
5955
6270
|
children: [
|
|
5956
6271
|
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
5957
6272
|
/* @__PURE__ */ jsx("div", { className: "text-sm font-medium", children: label }),
|
|
@@ -5971,18 +6286,25 @@ function PricingCard({
|
|
|
5971
6286
|
cta,
|
|
5972
6287
|
featured = false,
|
|
5973
6288
|
className,
|
|
6289
|
+
surface,
|
|
6290
|
+
radius,
|
|
6291
|
+
animated,
|
|
5974
6292
|
...props
|
|
5975
6293
|
}) {
|
|
6294
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
5976
6295
|
return /* @__PURE__ */ jsxs(
|
|
5977
6296
|
"div",
|
|
5978
6297
|
{
|
|
6298
|
+
...props,
|
|
5979
6299
|
"data-slot": "pricing-card",
|
|
6300
|
+
"data-surface": sf.surface,
|
|
6301
|
+
"data-radius": sf.radius,
|
|
6302
|
+
"data-animated": String(sf.animated),
|
|
5980
6303
|
className: cn(
|
|
5981
6304
|
"relative flex flex-col rounded-xl border bg-card p-6 text-card-foreground shadow-sm",
|
|
5982
6305
|
featured && "border-primary shadow-md ring-1 ring-primary/20",
|
|
5983
6306
|
className
|
|
5984
6307
|
),
|
|
5985
|
-
...props,
|
|
5986
6308
|
children: [
|
|
5987
6309
|
featured && /* @__PURE__ */ jsx("div", { className: "absolute -top-3 left-1/2 -translate-x-1/2 rounded-full bg-primary px-3 py-0.5 text-xs font-medium text-primary-foreground", children: "Recommended" }),
|
|
5988
6310
|
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
@@ -6005,16 +6327,20 @@ function PricingCard({
|
|
|
6005
6327
|
}
|
|
6006
6328
|
);
|
|
6007
6329
|
}
|
|
6008
|
-
function DataToolbar({ className, ...props }) {
|
|
6330
|
+
function DataToolbar({ className, surface, radius, animated, ...props }) {
|
|
6331
|
+
const sf = useSaasflareProps({ surface, radius, animated });
|
|
6009
6332
|
return /* @__PURE__ */ jsx(
|
|
6010
6333
|
"div",
|
|
6011
6334
|
{
|
|
6335
|
+
...props,
|
|
6012
6336
|
"data-slot": "data-toolbar",
|
|
6337
|
+
"data-surface": sf.surface,
|
|
6338
|
+
"data-radius": sf.radius,
|
|
6339
|
+
"data-animated": String(sf.animated),
|
|
6013
6340
|
className: cn(
|
|
6014
6341
|
"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",
|
|
6015
6342
|
className
|
|
6016
|
-
)
|
|
6017
|
-
...props
|
|
6343
|
+
)
|
|
6018
6344
|
}
|
|
6019
6345
|
);
|
|
6020
6346
|
}
|