@bearmenu/ui 0.5.2 → 0.6.1
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-ERMIA7NP.js → chunk-7PPCH42H.js} +3 -3
- package/dist/{chunk-HLQ2IRE7.js → chunk-BAZFVSSG.js} +3 -3
- package/dist/chunk-D5QHEHXJ.js +26 -0
- package/dist/{chunk-UISA4CIG.js → chunk-N2KNBPAQ.js} +2 -2
- package/dist/{chunk-7H54PTVH.js → chunk-PSR7N36A.js} +38 -10
- package/dist/chunk-RIDXFY6M.js +38 -0
- package/dist/chunk-UUJVXN2O.js +82 -0
- package/dist/chunk-WKMLZDUT.js +122 -0
- package/dist/chunk-XK2ZDQVE.js +122 -0
- package/dist/{chunk-4KOMHDZD.js → chunk-Y5D5LP4A.js} +18 -3
- package/dist/chunk-YJ6OBKZJ.js +32 -0
- package/dist/{chunk-ESO2EM3L.js → chunk-ZBBUKXM5.js} +2 -2
- package/dist/chunk-ZFNOCP6W.js +106 -0
- package/dist/components/accordion.js +11 -5
- package/dist/components/alert-dialog.js +5 -3
- package/dist/components/alert.d.ts +4 -1
- package/dist/components/alert.js +25 -9
- package/dist/components/avatar.d.ts +17 -2
- package/dist/components/avatar.js +91 -12
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/breadcrumb.js +5 -2
- package/dist/components/button-group.d.ts +14 -0
- package/dist/components/button-group.js +39 -0
- package/dist/components/button.d.ts +3 -1
- package/dist/components/button.js +1 -1
- package/dist/components/calendar.js +3 -3
- package/dist/components/card.d.ts +13 -5
- package/dist/components/card.js +2 -2
- package/dist/components/carousel.d.ts +20 -3
- package/dist/components/carousel.js +72 -12
- package/dist/components/checkbox.js +1 -1
- package/dist/components/circular-progress.d.ts +16 -0
- package/dist/components/circular-progress.js +105 -0
- package/dist/components/combobox.d.ts +27 -0
- package/dist/components/combobox.js +102 -0
- package/dist/components/command.d.ts +16 -3
- package/dist/components/command.js +2 -2
- package/dist/components/currency-input.d.ts +1 -0
- package/dist/components/currency-input.js +73 -52
- package/dist/components/date-input.d.ts +10 -0
- package/dist/components/date-input.js +40 -0
- package/dist/components/description-list.d.ts +15 -0
- package/dist/components/description-list.js +67 -0
- package/dist/components/dialog.d.ts +13 -2
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +5 -2
- package/dist/components/drawer.js +47 -9
- package/dist/components/dropdown-menu.d.ts +7 -2
- package/dist/components/dropdown-menu.js +22 -6
- package/dist/components/empty-state.js +2 -2
- package/dist/components/field.d.ts +22 -0
- package/dist/components/field.js +130 -0
- package/dist/components/form.d.ts +2 -1
- package/dist/components/form.js +11 -1
- package/dist/components/haptic-button.js +3 -3
- package/dist/components/input-group.d.ts +18 -0
- package/dist/components/input-group.js +92 -0
- package/dist/components/input.d.ts +8 -2
- package/dist/components/input.js +1 -1
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.js +120 -0
- package/dist/components/kbd.d.ts +13 -0
- package/dist/components/kbd.js +49 -0
- package/dist/components/lazy-markdown.d.ts +3 -1
- package/dist/components/lazy-markdown.js +7 -7
- package/dist/components/link-button.js +1 -1
- package/dist/components/multi-select-combobox.js +92 -83
- package/dist/components/multi-select-menu.d.ts +0 -4
- package/dist/components/multi-select-menu.js +28 -17
- package/dist/components/native-select.d.ts +12 -0
- package/dist/components/native-select.js +49 -0
- package/dist/components/pagination.d.ts +5 -2
- package/dist/components/pagination.js +66 -7
- package/dist/components/place-about-tab.js +4 -4
- package/dist/components/place-card.js +1 -1
- package/dist/components/place-details-mobile.js +4 -4
- package/dist/components/popover.d.ts +7 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/progress.d.ts +5 -1
- package/dist/components/progress.js +17 -3
- package/dist/components/radio-group.js +12 -3
- package/dist/components/rating.d.ts +2 -0
- package/dist/components/rating.js +88 -70
- package/dist/components/scroll-fade.d.ts +15 -0
- package/dist/components/scroll-fade.js +116 -0
- package/dist/components/search-bar.d.ts +1 -2
- package/dist/components/search-bar.js +37 -60
- package/dist/components/searchable-select.js +76 -72
- package/dist/components/select.d.ts +5 -1
- package/dist/components/select.js +30 -14
- package/dist/components/selection-bar.d.ts +11 -0
- package/dist/components/selection-bar.js +65 -0
- package/dist/components/separator.js +3 -2
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton-card.js +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/slider.js +21 -4
- package/dist/components/sliding-panels.js +9 -6
- package/dist/components/spinner.d.ts +17 -0
- package/dist/components/spinner.js +50 -0
- package/dist/components/stepper.d.ts +18 -0
- package/dist/components/stepper.js +199 -0
- package/dist/components/switch.js +4 -3
- package/dist/components/table.d.ts +23 -5
- package/dist/components/table.js +121 -35
- package/dist/components/tabs.d.ts +3 -1
- package/dist/components/tabs.js +37 -9
- package/dist/components/tag-group.d.ts +9 -0
- package/dist/components/tag-group.js +26 -0
- package/dist/components/tag.d.ts +17 -0
- package/dist/components/tag.js +61 -0
- package/dist/components/text.d.ts +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/textarea.js +2 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toaster.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +3 -2
- package/dist/components/tooltip.js +16 -2
- package/package.json +45 -26
- package/src/components/accordion.tsx +11 -6
- package/src/components/alert-dialog.tsx +4 -2
- package/src/components/alert.tsx +20 -8
- package/src/components/avatar.tsx +106 -13
- package/src/components/badge.tsx +12 -11
- package/src/components/breadcrumb.tsx +5 -2
- package/src/components/button-group.stories.tsx +52 -0
- package/src/components/button-group.tsx +40 -0
- package/src/components/button.test.tsx +174 -0
- package/src/components/button.tsx +42 -19
- package/src/components/calendar.tsx +2 -2
- package/src/components/card.tsx +55 -13
- package/src/components/carousel.tsx +85 -13
- package/src/components/checkbox.test.tsx +58 -0
- package/src/components/checkbox.tsx +8 -3
- package/src/components/circular-progress.stories.tsx +39 -0
- package/src/components/circular-progress.tsx +102 -0
- package/src/components/collapsible.stories.tsx +7 -3
- package/src/components/combobox.stories.tsx +82 -0
- package/src/components/combobox.test.tsx +118 -0
- package/src/components/combobox.tsx +136 -0
- package/src/components/command.test.tsx +91 -0
- package/src/components/command.tsx +38 -15
- package/src/components/currency-input.test.tsx +63 -0
- package/src/components/currency-input.tsx +84 -66
- package/src/components/date-input.stories.tsx +31 -0
- package/src/components/date-input.tsx +43 -0
- package/src/components/description-list.stories.tsx +62 -0
- package/src/components/description-list.tsx +68 -0
- package/src/components/dialog.test.tsx +84 -0
- package/src/components/dialog.tsx +64 -24
- package/src/components/drawer.tsx +72 -23
- package/src/components/dropdown-menu.test.tsx +180 -0
- package/src/components/dropdown-menu.tsx +31 -6
- package/src/components/field.stories.tsx +36 -0
- package/src/components/field.test.tsx +157 -0
- package/src/components/field.tsx +146 -0
- package/src/components/form.stories.tsx +3 -2
- package/src/components/form.test.tsx +95 -0
- package/src/components/form.tsx +9 -0
- package/src/components/haptic-button.tsx +1 -1
- package/src/components/input-group.stories.tsx +61 -0
- package/src/components/input-group.tsx +99 -0
- package/src/components/input.test.tsx +103 -0
- package/src/components/input.tsx +24 -7
- package/src/components/item.stories.tsx +52 -0
- package/src/components/item.tsx +115 -0
- package/src/components/kbd.stories.tsx +33 -0
- package/src/components/kbd.tsx +46 -0
- package/src/components/lazy-markdown.tsx +10 -7
- package/src/components/multi-select-combobox.test.tsx +101 -0
- package/src/components/multi-select-combobox.tsx +85 -82
- package/src/components/multi-select-menu.tsx +49 -41
- package/src/components/native-select.stories.tsx +52 -0
- package/src/components/native-select.tsx +45 -0
- package/src/components/pagination.tsx +64 -5
- package/src/components/popover.tsx +66 -3
- package/src/components/progress.tsx +27 -4
- package/src/components/radio-group.test.tsx +64 -0
- package/src/components/radio-group.tsx +11 -3
- package/src/components/rating.test.tsx +112 -0
- package/src/components/rating.tsx +97 -82
- package/src/components/scroll-fade.stories.tsx +98 -0
- package/src/components/scroll-fade.tsx +127 -0
- package/src/components/search-bar.stories.tsx +1 -32
- package/src/components/search-bar.tsx +22 -59
- package/src/components/searchable-select.tsx +69 -73
- package/src/components/select.tsx +34 -19
- package/src/components/selection-bar.stories.tsx +37 -0
- package/src/components/selection-bar.tsx +65 -0
- package/src/components/separator.tsx +5 -2
- package/src/components/sheet.tsx +1 -1
- package/src/components/skeleton.tsx +2 -2
- package/src/components/slider.test.tsx +45 -0
- package/src/components/slider.tsx +31 -12
- package/src/components/sliding-panels.tsx +8 -5
- package/src/components/spinner.stories.tsx +35 -0
- package/src/components/spinner.tsx +50 -0
- package/src/components/stepper.stories.tsx +71 -0
- package/src/components/stepper.tsx +220 -0
- package/src/components/switch.test.tsx +52 -0
- package/src/components/switch.tsx +4 -3
- package/src/components/table.tsx +140 -35
- package/src/components/tabs.test.tsx +107 -0
- package/src/components/tabs.tsx +70 -23
- package/src/components/tag-group.stories.tsx +39 -0
- package/src/components/tag-group.tsx +28 -0
- package/src/components/tag.stories.tsx +50 -0
- package/src/components/tag.tsx +63 -0
- package/src/components/text.test.tsx +1 -1
- package/src/components/text.tsx +19 -3
- package/src/components/textarea.test.tsx +48 -0
- package/src/components/textarea.tsx +2 -1
- package/src/components/toast.tsx +4 -3
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +12 -2
- package/src/globals.css +126 -90
- package/dist/chunk-2BMJRXQX.js +0 -80
- package/dist/chunk-4AVS6CV4.js +0 -89
- package/dist/chunk-4UO73SKC.js +0 -26
- package/dist/chunk-CW24PLDW.js +0 -24
- package/dist/chunk-IQASCH2V.js +0 -25
- package/dist/chunk-NKHH23YK.js +0 -31
- package/dist/chunk-QJ54Z7TC.js +0 -83
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { useHaptic } from './chunk-R47NEOSI.js';
|
|
2
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
6
|
+
import { cva } from 'class-variance-authority';
|
|
7
|
+
import { Loader2 } from 'lucide-react';
|
|
8
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var buttonVariants = cva(
|
|
11
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer [@media(pointer:coarse)]:active:scale-95",
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
default: "bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 hover:shadow",
|
|
16
|
+
destructive: "bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/85 hover:shadow",
|
|
17
|
+
outline: "border border-border bg-background hover:bg-accent hover:text-accent-foreground hover:border-accent",
|
|
18
|
+
secondary: "bg-secondary text-secondary-foreground shadow-sm hover:bg-accent hover:text-accent-foreground border border-border hover:border-accent",
|
|
19
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
20
|
+
link: "text-primary underline-offset-4 hover:underline",
|
|
21
|
+
glass: "glass glass-hover text-foreground",
|
|
22
|
+
brown: "bg-brown text-brown-foreground shadow-sm hover:bg-brown/85 hover:shadow",
|
|
23
|
+
antagonist: "bg-primary-foreground text-primary shadow-sm hover:bg-accent hover:text-accent-foreground border border-border hover:border-accent"
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
xs: "h-8 rounded-lg px-3 text-xs [&_svg]:size-3.5",
|
|
27
|
+
sm: "h-9 rounded-lg px-4",
|
|
28
|
+
default: "h-11 px-6 py-2",
|
|
29
|
+
lg: "h-12 rounded-2xl px-8",
|
|
30
|
+
icon: "h-11 w-11 rounded-full",
|
|
31
|
+
"icon-xs": "h-8 w-8 rounded-full [&_svg]:size-3.5",
|
|
32
|
+
"icon-sm": "h-9 w-9 rounded-full",
|
|
33
|
+
"icon-lg": "h-12 w-12 rounded-full"
|
|
34
|
+
},
|
|
35
|
+
fullWidth: {
|
|
36
|
+
true: "w-full",
|
|
37
|
+
false: ""
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
variant: "default",
|
|
42
|
+
size: "default",
|
|
43
|
+
fullWidth: false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
var Button = React.forwardRef(
|
|
48
|
+
(_a, ref) => {
|
|
49
|
+
var _b = _a, {
|
|
50
|
+
className,
|
|
51
|
+
variant,
|
|
52
|
+
size,
|
|
53
|
+
fullWidth,
|
|
54
|
+
asChild = false,
|
|
55
|
+
haptic = true,
|
|
56
|
+
hapticStyle = "light",
|
|
57
|
+
isLoading = false,
|
|
58
|
+
disabled,
|
|
59
|
+
onClick,
|
|
60
|
+
children
|
|
61
|
+
} = _b, props = __objRest(_b, [
|
|
62
|
+
"className",
|
|
63
|
+
"variant",
|
|
64
|
+
"size",
|
|
65
|
+
"fullWidth",
|
|
66
|
+
"asChild",
|
|
67
|
+
"haptic",
|
|
68
|
+
"hapticStyle",
|
|
69
|
+
"isLoading",
|
|
70
|
+
"disabled",
|
|
71
|
+
"onClick",
|
|
72
|
+
"children"
|
|
73
|
+
]);
|
|
74
|
+
const Comp = asChild ? Slot : "button";
|
|
75
|
+
const { trigger } = useHaptic();
|
|
76
|
+
const [isMounted, setIsMounted] = React.useState(false);
|
|
77
|
+
React.useEffect(() => {
|
|
78
|
+
setIsMounted(true);
|
|
79
|
+
}, []);
|
|
80
|
+
const handleClick = (event) => {
|
|
81
|
+
if (haptic && isMounted) {
|
|
82
|
+
trigger(hapticStyle);
|
|
83
|
+
}
|
|
84
|
+
onClick == null ? void 0 : onClick(event);
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
Comp,
|
|
88
|
+
__spreadProps(__spreadValues({
|
|
89
|
+
"data-slot": "button",
|
|
90
|
+
className: cn(buttonVariants({ variant, size, fullWidth, className })),
|
|
91
|
+
ref,
|
|
92
|
+
onClick: handleClick,
|
|
93
|
+
disabled: disabled || isLoading,
|
|
94
|
+
"aria-busy": isLoading || void 0
|
|
95
|
+
}, props), {
|
|
96
|
+
children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
97
|
+
/* @__PURE__ */ jsx(Loader2, { className: "animate-spin", "aria-hidden": "true" }),
|
|
98
|
+
!asChild && children
|
|
99
|
+
] }) : children
|
|
100
|
+
})
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
Button.displayName = "Button";
|
|
105
|
+
|
|
106
|
+
export { Button, buttonVariants };
|
|
@@ -12,7 +12,8 @@ var AccordionItem = React.forwardRef((_a, ref) => {
|
|
|
12
12
|
AccordionPrimitive.Item,
|
|
13
13
|
__spreadValues({
|
|
14
14
|
ref,
|
|
15
|
-
|
|
15
|
+
"data-slot": "accordion-item",
|
|
16
|
+
className: cn("border-b border-border last:border-b-0", className)
|
|
16
17
|
}, props)
|
|
17
18
|
);
|
|
18
19
|
});
|
|
@@ -23,14 +24,18 @@ var AccordionTrigger = React.forwardRef((_a, ref) => {
|
|
|
23
24
|
AccordionPrimitive.Trigger,
|
|
24
25
|
__spreadProps(__spreadValues({
|
|
25
26
|
ref,
|
|
27
|
+
"data-slot": "accordion-trigger",
|
|
26
28
|
className: cn(
|
|
27
|
-
"flex flex-1 items-center justify-between py-4 font-medium
|
|
29
|
+
"flex flex-1 cursor-pointer items-center justify-between py-4 text-sm font-medium text-foreground transition-colors hover:text-foreground/80",
|
|
30
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 rounded-sm",
|
|
31
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
32
|
+
"[&[data-state=open]>svg]:rotate-180",
|
|
28
33
|
className
|
|
29
34
|
)
|
|
30
35
|
}, props), {
|
|
31
36
|
children: [
|
|
32
37
|
children,
|
|
33
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "
|
|
38
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "size-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
34
39
|
]
|
|
35
40
|
})
|
|
36
41
|
) });
|
|
@@ -42,9 +47,10 @@ var AccordionContent = React.forwardRef((_a, ref) => {
|
|
|
42
47
|
AccordionPrimitive.Content,
|
|
43
48
|
__spreadProps(__spreadValues({
|
|
44
49
|
ref,
|
|
45
|
-
|
|
50
|
+
"data-slot": "accordion-content",
|
|
51
|
+
className: "overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
|
|
46
52
|
}, props), {
|
|
47
|
-
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0
|
|
53
|
+
children: /* @__PURE__ */ jsx("div", { className: cn("pb-4 pt-0", className), children })
|
|
48
54
|
})
|
|
49
55
|
);
|
|
50
56
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buttonVariants } from '../chunk-
|
|
1
|
+
import { buttonVariants } from '../chunk-ZFNOCP6W.js';
|
|
2
2
|
import '../chunk-R47NEOSI.js';
|
|
3
3
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
4
4
|
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
@@ -14,8 +14,9 @@ var AlertDialogOverlay = React.forwardRef((_a, ref) => {
|
|
|
14
14
|
return /* @__PURE__ */ jsx(
|
|
15
15
|
AlertDialogPrimitive.Overlay,
|
|
16
16
|
__spreadProps(__spreadValues({
|
|
17
|
+
"data-slot": "alert-dialog-overlay",
|
|
17
18
|
className: cn(
|
|
18
|
-
"fixed inset-0 z-
|
|
19
|
+
"fixed inset-0 z-[1000] bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
19
20
|
className
|
|
20
21
|
)
|
|
21
22
|
}, props), {
|
|
@@ -32,8 +33,9 @@ var AlertDialogContent = React.forwardRef((_a, ref) => {
|
|
|
32
33
|
AlertDialogPrimitive.Content,
|
|
33
34
|
__spreadValues({
|
|
34
35
|
ref,
|
|
36
|
+
"data-slot": "alert-dialog-content",
|
|
35
37
|
className: cn(
|
|
36
|
-
"fixed left-[50%] top-[50%] z-
|
|
38
|
+
"fixed left-[50%] top-[50%] z-[1000] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 rounded-2xl border border-border bg-card p-6 shadow-2xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
37
39
|
className
|
|
38
40
|
)
|
|
39
41
|
}, props)
|
|
@@ -2,10 +2,13 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
|
+
declare const alertVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
5
8
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
9
|
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
7
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
8
11
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
9
12
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
10
13
|
|
|
11
|
-
export { Alert, AlertDescription, AlertTitle };
|
|
14
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants };
|
package/dist/components/alert.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { textVariants } from '../chunk-
|
|
1
|
+
import { textVariants } from '../chunk-Y5D5LP4A.js';
|
|
2
2
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
3
|
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -6,14 +6,14 @@ import { cva } from 'class-variance-authority';
|
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
var alertVariants = cva(
|
|
9
|
-
"relative w-full rounded-xl border
|
|
9
|
+
"relative w-full rounded-xl border px-4 py-3 text-sm transition-colors [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",
|
|
10
10
|
{
|
|
11
11
|
variants: {
|
|
12
12
|
variant: {
|
|
13
|
-
default: "bg-
|
|
14
|
-
destructive: "border-destructive/
|
|
15
|
-
warning: "border-
|
|
16
|
-
success: "border-
|
|
13
|
+
default: "bg-card text-card-foreground border-border [&>svg]:text-foreground",
|
|
14
|
+
destructive: "border-destructive/40 bg-destructive/10 text-destructive [&>svg]:text-destructive",
|
|
15
|
+
warning: "border-warning/40 bg-warning/10 text-warning [&>svg]:text-warning",
|
|
16
|
+
success: "border-success/40 bg-success/10 text-success [&>svg]:text-success"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
defaultVariants: {
|
|
@@ -23,7 +23,15 @@ var alertVariants = cva(
|
|
|
23
23
|
);
|
|
24
24
|
var Alert = React.forwardRef((_a, ref) => {
|
|
25
25
|
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
26
|
-
return /* @__PURE__ */ jsx(
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
__spreadValues({
|
|
29
|
+
ref,
|
|
30
|
+
role: "alert",
|
|
31
|
+
"data-slot": "alert",
|
|
32
|
+
className: cn(alertVariants({ variant }), className)
|
|
33
|
+
}, props)
|
|
34
|
+
);
|
|
27
35
|
});
|
|
28
36
|
Alert.displayName = "Alert";
|
|
29
37
|
var AlertTitle = React.forwardRef(
|
|
@@ -33,6 +41,7 @@ var AlertTitle = React.forwardRef(
|
|
|
33
41
|
"h5",
|
|
34
42
|
__spreadValues({
|
|
35
43
|
ref,
|
|
44
|
+
"data-slot": "alert-title",
|
|
36
45
|
className: cn(
|
|
37
46
|
"mb-1",
|
|
38
47
|
textVariants({ weight: "medium", leading: "none", tracking: "tight" }),
|
|
@@ -45,8 +54,15 @@ var AlertTitle = React.forwardRef(
|
|
|
45
54
|
AlertTitle.displayName = "AlertTitle";
|
|
46
55
|
var AlertDescription = React.forwardRef((_a, ref) => {
|
|
47
56
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
48
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
+
return /* @__PURE__ */ jsx(
|
|
58
|
+
"div",
|
|
59
|
+
__spreadValues({
|
|
60
|
+
ref,
|
|
61
|
+
"data-slot": "alert-description",
|
|
62
|
+
className: cn("text-sm [&_p]:leading-relaxed", className)
|
|
63
|
+
}, props)
|
|
64
|
+
);
|
|
49
65
|
});
|
|
50
66
|
AlertDescription.displayName = "AlertDescription";
|
|
51
67
|
|
|
52
|
-
export { Alert, AlertDescription, AlertTitle };
|
|
68
|
+
export { Alert, AlertDescription, AlertTitle, alertVariants };
|
|
@@ -1,8 +1,23 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
5
|
|
|
4
|
-
declare const
|
|
6
|
+
declare const avatarVariants: (props?: ({
|
|
7
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & VariantProps<(props?: ({
|
|
10
|
+
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
11
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLSpanElement>>;
|
|
5
12
|
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
6
13
|
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
declare const AvatarBadge: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & {
|
|
15
|
+
placement?: "top-right" | "bottom-right";
|
|
16
|
+
tone?: "success" | "warning" | "destructive" | "muted";
|
|
17
|
+
} & React.RefAttributes<HTMLSpanElement>>;
|
|
18
|
+
declare const AvatarGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
19
|
+
max?: number;
|
|
20
|
+
spacing?: "tight" | "default" | "loose";
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
7
22
|
|
|
8
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
23
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarImage, avatarVariants };
|
|
@@ -1,21 +1,38 @@
|
|
|
1
1
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
-
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
5
|
-
import {
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
7
|
|
|
8
|
+
var avatarVariants = cva(
|
|
9
|
+
"relative flex shrink-0 overflow-hidden rounded-full bg-muted",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
xs: "size-6 text-[10px]",
|
|
14
|
+
sm: "size-8 text-xs",
|
|
15
|
+
default: "size-10 text-sm",
|
|
16
|
+
lg: "size-12 text-base",
|
|
17
|
+
xl: "size-16 text-lg"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: "default"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
var AvatarContext = React.createContext("default");
|
|
7
26
|
var Avatar = React.forwardRef((_a, ref) => {
|
|
8
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
27
|
+
var _b = _a, { className, size = "default" } = _b, props = __objRest(_b, ["className", "size"]);
|
|
28
|
+
return /* @__PURE__ */ jsx(AvatarContext.Provider, { value: size, children: /* @__PURE__ */ jsx(
|
|
10
29
|
AvatarPrimitive.Root,
|
|
11
30
|
__spreadValues({
|
|
12
31
|
ref,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
className
|
|
16
|
-
)
|
|
32
|
+
"data-slot": "avatar",
|
|
33
|
+
className: cn(avatarVariants({ size }), className)
|
|
17
34
|
}, props)
|
|
18
|
-
);
|
|
35
|
+
) });
|
|
19
36
|
});
|
|
20
37
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
21
38
|
var AvatarImage = React.forwardRef((_a, ref) => {
|
|
@@ -24,7 +41,8 @@ var AvatarImage = React.forwardRef((_a, ref) => {
|
|
|
24
41
|
AvatarPrimitive.Image,
|
|
25
42
|
__spreadValues({
|
|
26
43
|
ref,
|
|
27
|
-
|
|
44
|
+
"data-slot": "avatar-image",
|
|
45
|
+
className: cn("aspect-square size-full object-cover", className)
|
|
28
46
|
}, props)
|
|
29
47
|
);
|
|
30
48
|
});
|
|
@@ -35,13 +53,74 @@ var AvatarFallback = React.forwardRef((_a, ref) => {
|
|
|
35
53
|
AvatarPrimitive.Fallback,
|
|
36
54
|
__spreadValues({
|
|
37
55
|
ref,
|
|
56
|
+
"data-slot": "avatar-fallback",
|
|
38
57
|
className: cn(
|
|
39
|
-
"flex
|
|
58
|
+
"flex size-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
|
|
40
59
|
className
|
|
41
60
|
)
|
|
42
61
|
}, props)
|
|
43
62
|
);
|
|
44
63
|
});
|
|
45
64
|
AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;
|
|
65
|
+
var badgeOffset = {
|
|
66
|
+
xs: "size-2 ring-1",
|
|
67
|
+
sm: "size-2.5 ring-2",
|
|
68
|
+
default: "size-3 ring-2",
|
|
69
|
+
lg: "size-3.5 ring-2",
|
|
70
|
+
xl: "size-4 ring-2"
|
|
71
|
+
};
|
|
72
|
+
var AvatarBadge = React.forwardRef((_a, ref) => {
|
|
73
|
+
var _b = _a, { className, placement = "bottom-right", tone = "success" } = _b, props = __objRest(_b, ["className", "placement", "tone"]);
|
|
74
|
+
var _a2;
|
|
75
|
+
const size = (_a2 = React.useContext(AvatarContext)) != null ? _a2 : "default";
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
"span",
|
|
78
|
+
__spreadValues({
|
|
79
|
+
ref,
|
|
80
|
+
"data-slot": "avatar-badge",
|
|
81
|
+
className: cn(
|
|
82
|
+
"absolute block rounded-full ring-background",
|
|
83
|
+
badgeOffset[size],
|
|
84
|
+
placement === "top-right" ? "right-0 top-0" : "bottom-0 right-0",
|
|
85
|
+
tone === "success" && "bg-success",
|
|
86
|
+
tone === "warning" && "bg-warning",
|
|
87
|
+
tone === "destructive" && "bg-destructive",
|
|
88
|
+
tone === "muted" && "bg-muted-foreground",
|
|
89
|
+
className
|
|
90
|
+
)
|
|
91
|
+
}, props)
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
AvatarBadge.displayName = "AvatarBadge";
|
|
95
|
+
var AvatarGroup = React.forwardRef((_a, ref) => {
|
|
96
|
+
var _b = _a, { className, children, max, spacing = "default" } = _b, props = __objRest(_b, ["className", "children", "max", "spacing"]);
|
|
97
|
+
const items = React.Children.toArray(children);
|
|
98
|
+
const visible = max ? items.slice(0, max) : items;
|
|
99
|
+
const overflow = max ? items.length - max : 0;
|
|
100
|
+
return /* @__PURE__ */ jsxs(
|
|
101
|
+
"div",
|
|
102
|
+
__spreadProps(__spreadValues({
|
|
103
|
+
ref,
|
|
104
|
+
"data-slot": "avatar-group",
|
|
105
|
+
className: cn(
|
|
106
|
+
"flex items-center",
|
|
107
|
+
spacing === "tight" && "-space-x-3",
|
|
108
|
+
spacing === "default" && "-space-x-2",
|
|
109
|
+
spacing === "loose" && "-space-x-1",
|
|
110
|
+
"[&>*]:ring-2 [&>*]:ring-background",
|
|
111
|
+
className
|
|
112
|
+
)
|
|
113
|
+
}, props), {
|
|
114
|
+
children: [
|
|
115
|
+
visible,
|
|
116
|
+
overflow > 0 && /* @__PURE__ */ jsxs("span", { className: "relative inline-flex size-10 items-center justify-center rounded-full bg-muted text-xs font-medium text-muted-foreground ring-2 ring-background", children: [
|
|
117
|
+
"+",
|
|
118
|
+
overflow
|
|
119
|
+
] })
|
|
120
|
+
]
|
|
121
|
+
})
|
|
122
|
+
);
|
|
123
|
+
});
|
|
124
|
+
AvatarGroup.displayName = "AvatarGroup";
|
|
46
125
|
|
|
47
|
-
export { Avatar, AvatarFallback, AvatarImage };
|
|
126
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarImage, avatarVariants };
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | "glass" | "success" | "warning" | "overlay" | null | undefined;
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "glass" | "brown" | "success" | "warning" | "overlay" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
package/dist/components/badge.js
CHANGED
|
@@ -44,7 +44,10 @@ function BreadcrumbLink(_a) {
|
|
|
44
44
|
Comp,
|
|
45
45
|
__spreadValues({
|
|
46
46
|
"data-slot": "breadcrumb-link",
|
|
47
|
-
className: cn(
|
|
47
|
+
className: cn(
|
|
48
|
+
"rounded-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
49
|
+
className
|
|
50
|
+
)
|
|
48
51
|
}, props)
|
|
49
52
|
);
|
|
50
53
|
}
|
|
@@ -57,7 +60,7 @@ function BreadcrumbPage(_a) {
|
|
|
57
60
|
role: "link",
|
|
58
61
|
"aria-disabled": "true",
|
|
59
62
|
"aria-current": "page",
|
|
60
|
-
className: cn("text-foreground
|
|
63
|
+
className: cn("font-medium text-foreground", className)
|
|
61
64
|
}, props)
|
|
62
65
|
);
|
|
63
66
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
declare const buttonGroupVariants: (props?: ({
|
|
6
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
7
|
+
attached?: boolean | null | undefined;
|
|
8
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
|
+
declare const ButtonGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
10
|
+
orientation?: "horizontal" | "vertical" | null | undefined;
|
|
11
|
+
attached?: boolean | null | undefined;
|
|
12
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
|
|
14
|
+
export { ButtonGroup, buttonGroupVariants };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var buttonGroupVariants = cva("inline-flex", {
|
|
8
|
+
variants: {
|
|
9
|
+
orientation: {
|
|
10
|
+
horizontal: "flex-row [&>[data-slot=button]]:rounded-none [&>[data-slot=button]:first-child]:rounded-l-xl [&>[data-slot=button]:last-child]:rounded-r-xl [&>[data-slot=button]:not(:first-child)]:-ml-px",
|
|
11
|
+
vertical: "flex-col [&>[data-slot=button]]:rounded-none [&>[data-slot=button]:first-child]:rounded-t-xl [&>[data-slot=button]:last-child]:rounded-b-xl [&>[data-slot=button]:not(:first-child)]:-mt-px"
|
|
12
|
+
},
|
|
13
|
+
attached: {
|
|
14
|
+
true: "",
|
|
15
|
+
false: "gap-1"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
orientation: "horizontal",
|
|
20
|
+
attached: true
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
var ButtonGroup = React.forwardRef(
|
|
24
|
+
(_a, ref) => {
|
|
25
|
+
var _b = _a, { className, orientation, attached } = _b, props = __objRest(_b, ["className", "orientation", "attached"]);
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
__spreadValues({
|
|
29
|
+
ref,
|
|
30
|
+
role: "group",
|
|
31
|
+
"data-slot": "button-group",
|
|
32
|
+
className: cn(buttonGroupVariants({ orientation, attached }), className)
|
|
33
|
+
}, props)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
38
|
+
|
|
39
|
+
export { ButtonGroup, buttonGroupVariants };
|
|
@@ -4,12 +4,14 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "glass" | "brown" | "antagonist" | null | undefined;
|
|
7
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
7
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
8
|
+
fullWidth?: boolean | null | undefined;
|
|
8
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
10
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
10
11
|
asChild?: boolean;
|
|
11
12
|
haptic?: boolean;
|
|
12
13
|
hapticStyle?: "light" | "medium" | "heavy";
|
|
14
|
+
isLoading?: boolean;
|
|
13
15
|
}
|
|
14
16
|
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
15
17
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buttonVariants, Button } from '../chunk-
|
|
1
|
+
import { buttonVariants, Button } from '../chunk-ZFNOCP6W.js';
|
|
2
2
|
import '../chunk-R47NEOSI.js';
|
|
3
3
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
4
4
|
import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
|
|
@@ -31,7 +31,7 @@ function Calendar(_a) {
|
|
|
31
31
|
__spreadValues({
|
|
32
32
|
showOutsideDays,
|
|
33
33
|
className: cn(
|
|
34
|
-
"group/calendar bg-background p-3 [--cell-size:--spacing(
|
|
34
|
+
"group/calendar bg-background p-3 [--cell-size:--spacing(9)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",
|
|
35
35
|
String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,
|
|
36
36
|
String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,
|
|
37
37
|
className
|
|
@@ -159,7 +159,7 @@ function CalendarDayButton(_a) {
|
|
|
159
159
|
"data-range-end": modifiers.range_end,
|
|
160
160
|
"data-range-middle": modifiers.range_middle,
|
|
161
161
|
className: cn(
|
|
162
|
-
"group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground flex aspect-square
|
|
162
|
+
"group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground flex aspect-square h-(--cell-size) w-(--cell-size) size-auto min-w-0 flex-col items-center justify-center gap-1 rounded-md p-0 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",
|
|
163
163
|
defaultClassNames.day,
|
|
164
164
|
className
|
|
165
165
|
)
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
1
2
|
import * as React from 'react';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
declare const cardVariants: (props?: ({
|
|
6
|
+
variant?: "outline" | "glass" | "muted" | "surface" | null | undefined;
|
|
7
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
|
+
interactive?: boolean | null | undefined;
|
|
9
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
|
+
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
11
|
+
variant?: "outline" | "glass" | "muted" | "surface" | null | undefined;
|
|
12
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
13
|
+
interactive?: boolean | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
7
15
|
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
16
|
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
9
17
|
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -11,4 +19,4 @@ declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<
|
|
|
11
19
|
declare const CardAction: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
12
20
|
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
13
21
|
|
|
14
|
-
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
22
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };
|
package/dist/components/card.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants } from '../chunk-XK2ZDQVE.js';
|
|
2
|
+
import '../chunk-Y5D5LP4A.js';
|
|
3
3
|
import '../chunk-FEK5XGZW.js';
|
|
4
4
|
import '../chunk-3GWWZKX7.js';
|
|
@@ -13,12 +13,29 @@ type CarouselProps = {
|
|
|
13
13
|
opts?: CarouselOptions;
|
|
14
14
|
plugins?: CarouselPlugin;
|
|
15
15
|
orientation?: "horizontal" | "vertical";
|
|
16
|
+
/** Gap between slides in pixels. Defaults to 16. */
|
|
17
|
+
gap?: number;
|
|
16
18
|
setApi?: (api: CarouselApi) => void;
|
|
17
19
|
};
|
|
18
|
-
|
|
20
|
+
type CarouselContextProps = {
|
|
21
|
+
carouselRef: ReturnType<typeof useEmblaCarousel>[0];
|
|
22
|
+
api: ReturnType<typeof useEmblaCarousel>[1];
|
|
23
|
+
scrollPrev: () => void;
|
|
24
|
+
scrollNext: () => void;
|
|
25
|
+
scrollTo: (index: number) => void;
|
|
26
|
+
canScrollPrev: boolean;
|
|
27
|
+
canScrollNext: boolean;
|
|
28
|
+
selectedIndex: number;
|
|
29
|
+
slideCount: number;
|
|
30
|
+
gap: number;
|
|
31
|
+
} & CarouselProps;
|
|
32
|
+
declare function useCarousel(): CarouselContextProps;
|
|
33
|
+
declare function Carousel({ orientation, opts, setApi, plugins, gap, className, children, ...props }: React.ComponentProps<"div"> & CarouselProps): react_jsx_runtime.JSX.Element;
|
|
19
34
|
declare function CarouselContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
20
|
-
declare function CarouselItem({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
35
|
+
declare function CarouselItem({ className, style, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
21
36
|
declare function CarouselPrevious({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
22
37
|
declare function CarouselNext({ className, variant, size, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
|
|
38
|
+
declare function CarouselDots({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element | null;
|
|
39
|
+
declare function CarouselCounter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element | null;
|
|
23
40
|
|
|
24
|
-
export { Carousel, type CarouselApi, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious };
|
|
41
|
+
export { Carousel, type CarouselApi, CarouselContent, CarouselCounter, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, useCarousel };
|