@bearmenu/ui 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-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 +5 -2
- 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 +4 -2
- 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 +29 -16
- 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/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 +3 -3
- 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 +44 -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/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
|
@@ -22,12 +22,12 @@ var ToastViewport = React.forwardRef((_a, ref) => {
|
|
|
22
22
|
});
|
|
23
23
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
24
24
|
var toastVariants = cva(
|
|
25
|
-
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-xl
|
|
25
|
+
"group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-xl p-6 pr-8 shadow-2xl transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
26
26
|
{
|
|
27
27
|
variants: {
|
|
28
28
|
variant: {
|
|
29
|
-
default: "
|
|
30
|
-
destructive: "destructive border-destructive/
|
|
29
|
+
default: "glass text-foreground border border-border/50",
|
|
30
|
+
destructive: "destructive border border-destructive/60 bg-destructive text-destructive-foreground"
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
defaultVariants: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Card, CardHeader, CardTitle, CardContent } from './chunk-
|
|
2
|
-
import { Text } from './chunk-
|
|
3
|
-
import { Badge } from './chunk-
|
|
1
|
+
import { Card, CardHeader, CardTitle, CardContent } from './chunk-XK2ZDQVE.js';
|
|
2
|
+
import { Text } from './chunk-Y5D5LP4A.js';
|
|
3
|
+
import { Badge } from './chunk-YJ6OBKZJ.js';
|
|
4
4
|
import { cn } from './chunk-FEK5XGZW.js';
|
|
5
5
|
import { __spreadProps, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
6
6
|
import { Info, MapPin, Phone, Globe, Clock, UtensilsCrossed, CreditCard, Shield, Car, Building2 } from 'lucide-react';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
5
|
+
import { Minus, Check } from 'lucide-react';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var Checkbox = React.forwardRef((_a, ref) => {
|
|
9
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
CheckboxPrimitive.Root,
|
|
12
|
+
__spreadProps(__spreadValues({
|
|
13
|
+
ref,
|
|
14
|
+
"data-slot": "checkbox",
|
|
15
|
+
className: cn(
|
|
16
|
+
"peer size-5 shrink-0 rounded-md border border-border bg-background transition-all duration-150 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary hover:border-primary/50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
|
|
17
|
+
className
|
|
18
|
+
)
|
|
19
|
+
}, props), {
|
|
20
|
+
children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, { className: cn("flex items-center justify-center text-current"), children: props.checked === "indeterminate" ? /* @__PURE__ */ jsx(Minus, { className: "size-3.5 animate-in fade-in-0 zoom-in-50 duration-200 ease-out", strokeWidth: 3 }) : /* @__PURE__ */ jsx(Check, { className: "size-3.5 animate-in fade-in-0 zoom-in-50 duration-200 ease-out", strokeWidth: 3 }) })
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
});
|
|
24
|
+
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
25
|
+
|
|
26
|
+
export { Checkbox };
|
|
@@ -9,8 +9,8 @@ function Skeleton(_a) {
|
|
|
9
9
|
__spreadValues({
|
|
10
10
|
"data-slot": "skeleton",
|
|
11
11
|
className: cn(
|
|
12
|
-
"
|
|
13
|
-
"before:absolute before:inset-0 before:-translate-x-full before:animate-[shimmer_2s_infinite] before:bg-gradient-to-r before:from-transparent before:via-
|
|
12
|
+
"relative overflow-hidden rounded-xl bg-muted",
|
|
13
|
+
"before:absolute before:inset-0 before:-translate-x-full before:animate-[shimmer_2s_infinite] before:bg-gradient-to-r before:from-transparent before:via-foreground/[0.04] before:to-transparent",
|
|
14
14
|
className
|
|
15
15
|
)
|
|
16
16
|
}, props)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dialog, DialogContent } from './chunk-
|
|
1
|
+
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from './chunk-WKMLZDUT.js';
|
|
2
2
|
import { cn } from './chunk-FEK5XGZW.js';
|
|
3
3
|
import { __objRest, __spreadValues, __spreadProps } from './chunk-3GWWZKX7.js';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -12,8 +12,9 @@ var Command = React.forwardRef((_a, ref) => {
|
|
|
12
12
|
Command$1,
|
|
13
13
|
__spreadValues({
|
|
14
14
|
ref,
|
|
15
|
+
"data-slot": "command",
|
|
15
16
|
className: cn(
|
|
16
|
-
"flex h-full w-full flex-col overflow-hidden rounded-xl
|
|
17
|
+
"flex h-full w-full flex-col overflow-hidden rounded-xl bg-popover text-popover-foreground",
|
|
17
18
|
className
|
|
18
19
|
)
|
|
19
20
|
}, props)
|
|
@@ -21,19 +22,33 @@ var Command = React.forwardRef((_a, ref) => {
|
|
|
21
22
|
});
|
|
22
23
|
Command.displayName = Command$1.displayName;
|
|
23
24
|
var CommandDialog = (_a) => {
|
|
24
|
-
var _b = _a, {
|
|
25
|
-
|
|
25
|
+
var _b = _a, {
|
|
26
|
+
title = "Command palette",
|
|
27
|
+
description = "Search for commands and actions",
|
|
28
|
+
children
|
|
29
|
+
} = _b, props = __objRest(_b, [
|
|
30
|
+
"title",
|
|
31
|
+
"description",
|
|
32
|
+
"children"
|
|
33
|
+
]);
|
|
34
|
+
return /* @__PURE__ */ jsx(Dialog, __spreadProps(__spreadValues({}, props), { children: /* @__PURE__ */ jsxs(DialogContent, { className: "overflow-hidden p-0", children: [
|
|
35
|
+
/* @__PURE__ */ jsxs(DialogHeader, { className: "sr-only", children: [
|
|
36
|
+
/* @__PURE__ */ jsx(DialogTitle, { children: title }),
|
|
37
|
+
/* @__PURE__ */ jsx(DialogDescription, { children: description })
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsx(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
40
|
+
] }) }));
|
|
26
41
|
};
|
|
27
42
|
var CommandInput = React.forwardRef((_a, ref) => {
|
|
28
43
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
29
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-border
|
|
30
|
-
/* @__PURE__ */ jsx(Search, { className: "mr-2
|
|
44
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b border-border px-3", "cmdk-input-wrapper": "", children: [
|
|
45
|
+
/* @__PURE__ */ jsx(Search, { className: "mr-2 size-4 shrink-0 opacity-50" }),
|
|
31
46
|
/* @__PURE__ */ jsx(
|
|
32
47
|
Command$1.Input,
|
|
33
48
|
__spreadValues({
|
|
34
49
|
ref,
|
|
35
50
|
className: cn(
|
|
36
|
-
"flex h-11 w-full rounded-md bg-transparent py-3 text-
|
|
51
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
37
52
|
className
|
|
38
53
|
)
|
|
39
54
|
}, props)
|
|
@@ -58,11 +73,22 @@ var CommandEmpty = React.forwardRef((_a, ref) => {
|
|
|
58
73
|
Command$1.Empty,
|
|
59
74
|
__spreadValues({
|
|
60
75
|
ref,
|
|
61
|
-
className: cn("py-6 text-center text-sm", className)
|
|
76
|
+
className: cn("py-6 text-center text-sm text-muted-foreground", className)
|
|
62
77
|
}, props)
|
|
63
78
|
);
|
|
64
79
|
});
|
|
65
80
|
CommandEmpty.displayName = Command$1.Empty.displayName;
|
|
81
|
+
var CommandLoading = React.forwardRef((_a, ref) => {
|
|
82
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
83
|
+
return /* @__PURE__ */ jsx(
|
|
84
|
+
Command$1.Loading,
|
|
85
|
+
__spreadValues({
|
|
86
|
+
ref,
|
|
87
|
+
className: cn("py-6 text-center text-sm text-muted-foreground", className)
|
|
88
|
+
}, props)
|
|
89
|
+
);
|
|
90
|
+
});
|
|
91
|
+
CommandLoading.displayName = "CommandLoading";
|
|
66
92
|
var CommandGroup = React.forwardRef((_a, ref) => {
|
|
67
93
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
68
94
|
return /* @__PURE__ */ jsx(
|
|
@@ -95,7 +121,9 @@ var CommandItem = React.forwardRef((_a, ref) => {
|
|
|
95
121
|
__spreadValues({
|
|
96
122
|
ref,
|
|
97
123
|
className: cn(
|
|
98
|
-
"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none
|
|
124
|
+
"relative flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors",
|
|
125
|
+
"data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground",
|
|
126
|
+
"data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
|
99
127
|
className
|
|
100
128
|
)
|
|
101
129
|
}, props)
|
|
@@ -113,4 +141,4 @@ var CommandShortcut = (_a) => {
|
|
|
113
141
|
};
|
|
114
142
|
CommandShortcut.displayName = "CommandShortcut";
|
|
115
143
|
|
|
116
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut };
|
|
144
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut };
|
|
@@ -0,0 +1,38 @@
|
|
|
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 inputVariants = cva(
|
|
8
|
+
"flex w-full rounded-xl border border-border bg-input/50 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:bg-input disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
sm: "h-9 px-3 text-base md:text-sm",
|
|
13
|
+
default: "h-11 px-4 py-2",
|
|
14
|
+
lg: "h-12 px-5 text-base"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: "default"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
var Input = React.forwardRef(
|
|
23
|
+
(_a, ref) => {
|
|
24
|
+
var _b = _a, { className, type, size } = _b, props = __objRest(_b, ["className", "type", "size"]);
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
"input",
|
|
27
|
+
__spreadValues({
|
|
28
|
+
type,
|
|
29
|
+
"data-slot": "input",
|
|
30
|
+
className: cn(inputVariants({ size }), className),
|
|
31
|
+
ref
|
|
32
|
+
}, props)
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
Input.displayName = "Input";
|
|
37
|
+
|
|
38
|
+
export { Input, inputVariants };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var Popover = PopoverPrimitive.Root;
|
|
8
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
9
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
10
|
+
var PopoverClose = PopoverPrimitive.Close;
|
|
11
|
+
var PopoverContent = React.forwardRef((_a, ref) => {
|
|
12
|
+
var _b = _a, { className, align = "center", sideOffset = 4 } = _b, props = __objRest(_b, ["className", "align", "sideOffset"]);
|
|
13
|
+
return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
14
|
+
PopoverPrimitive.Content,
|
|
15
|
+
__spreadValues({
|
|
16
|
+
ref,
|
|
17
|
+
"data-slot": "popover-content",
|
|
18
|
+
align,
|
|
19
|
+
sideOffset,
|
|
20
|
+
className: cn(
|
|
21
|
+
"z-50 w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-xl outline-none",
|
|
22
|
+
"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 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",
|
|
23
|
+
className
|
|
24
|
+
)
|
|
25
|
+
}, props)
|
|
26
|
+
) });
|
|
27
|
+
});
|
|
28
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
29
|
+
var PopoverArrow = React.forwardRef((_a, ref) => {
|
|
30
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
PopoverPrimitive.Arrow,
|
|
33
|
+
__spreadValues({
|
|
34
|
+
ref,
|
|
35
|
+
"data-slot": "popover-arrow",
|
|
36
|
+
className: cn("fill-popover stroke-border", className)
|
|
37
|
+
}, props)
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
PopoverArrow.displayName = PopoverPrimitive.Arrow.displayName;
|
|
41
|
+
var PopoverHeader = React.forwardRef(
|
|
42
|
+
(_a, ref) => {
|
|
43
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
"div",
|
|
46
|
+
__spreadValues({
|
|
47
|
+
ref,
|
|
48
|
+
"data-slot": "popover-header",
|
|
49
|
+
className: cn("flex flex-col space-y-1.5 pb-3", className)
|
|
50
|
+
}, props)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
PopoverHeader.displayName = "PopoverHeader";
|
|
55
|
+
var PopoverTitle = React.forwardRef(
|
|
56
|
+
(_a, ref) => {
|
|
57
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
"h3",
|
|
60
|
+
__spreadValues({
|
|
61
|
+
ref,
|
|
62
|
+
"data-slot": "popover-title",
|
|
63
|
+
className: cn("text-sm font-semibold leading-none", className)
|
|
64
|
+
}, props)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
69
|
+
var PopoverDescription = React.forwardRef((_a, ref) => {
|
|
70
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
71
|
+
return /* @__PURE__ */ jsx(
|
|
72
|
+
"p",
|
|
73
|
+
__spreadValues({
|
|
74
|
+
ref,
|
|
75
|
+
"data-slot": "popover-description",
|
|
76
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
77
|
+
}, props)
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
81
|
+
|
|
82
|
+
export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues, __spreadProps } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { X } from 'lucide-react';
|
|
7
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
+
|
|
9
|
+
var Dialog = DialogPrimitive.Root;
|
|
10
|
+
var DialogTrigger = DialogPrimitive.Trigger;
|
|
11
|
+
var DialogPortal = DialogPrimitive.Portal;
|
|
12
|
+
var DialogClose = DialogPrimitive.Close;
|
|
13
|
+
var DialogOverlay = React.forwardRef((_a, ref) => {
|
|
14
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
15
|
+
return /* @__PURE__ */ jsx(
|
|
16
|
+
DialogPrimitive.Overlay,
|
|
17
|
+
__spreadValues({
|
|
18
|
+
ref,
|
|
19
|
+
"data-slot": "dialog-overlay",
|
|
20
|
+
className: cn(
|
|
21
|
+
"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",
|
|
22
|
+
className
|
|
23
|
+
)
|
|
24
|
+
}, props)
|
|
25
|
+
);
|
|
26
|
+
});
|
|
27
|
+
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
28
|
+
var dialogContentVariants = cva(
|
|
29
|
+
"fixed left-[50%] top-[50%] z-[1000] grid w-full translate-x-[-50%] translate-y-[-50%] gap-4 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 rounded-2xl border border-border",
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
size: {
|
|
33
|
+
sm: "max-w-sm",
|
|
34
|
+
default: "max-w-lg",
|
|
35
|
+
lg: "max-w-2xl",
|
|
36
|
+
xl: "max-w-4xl",
|
|
37
|
+
full: "max-w-[95vw] max-h-[95vh]"
|
|
38
|
+
},
|
|
39
|
+
scrollBehavior: {
|
|
40
|
+
inside: "max-h-[85vh] overflow-hidden",
|
|
41
|
+
outside: ""
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
size: "default",
|
|
46
|
+
scrollBehavior: "outside"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
var DialogContent = React.forwardRef(
|
|
51
|
+
(_a, ref) => {
|
|
52
|
+
var _b = _a, { className, children, size, scrollBehavior, showCloseButton = true } = _b, props = __objRest(_b, ["className", "children", "size", "scrollBehavior", "showCloseButton"]);
|
|
53
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
54
|
+
/* @__PURE__ */ jsx(DialogOverlay, {}),
|
|
55
|
+
/* @__PURE__ */ jsxs(
|
|
56
|
+
DialogPrimitive.Content,
|
|
57
|
+
__spreadProps(__spreadValues({
|
|
58
|
+
ref,
|
|
59
|
+
"data-slot": "dialog-content",
|
|
60
|
+
className: cn(dialogContentVariants({ size, scrollBehavior }), className)
|
|
61
|
+
}, props), {
|
|
62
|
+
children: [
|
|
63
|
+
children,
|
|
64
|
+
showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-lg text-muted-foreground opacity-70 transition-opacity hover:bg-accent hover:text-accent-foreground hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(X, { className: "size-4" }),
|
|
66
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
67
|
+
] })
|
|
68
|
+
]
|
|
69
|
+
})
|
|
70
|
+
)
|
|
71
|
+
] });
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
75
|
+
var DialogHeader = (_a) => {
|
|
76
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
77
|
+
return /* @__PURE__ */ jsx(
|
|
78
|
+
"div",
|
|
79
|
+
__spreadValues({
|
|
80
|
+
"data-slot": "dialog-header",
|
|
81
|
+
className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className)
|
|
82
|
+
}, props)
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
DialogHeader.displayName = "DialogHeader";
|
|
86
|
+
var DialogFooter = (_a) => {
|
|
87
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
89
|
+
"div",
|
|
90
|
+
__spreadValues({
|
|
91
|
+
"data-slot": "dialog-footer",
|
|
92
|
+
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
93
|
+
}, props)
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
DialogFooter.displayName = "DialogFooter";
|
|
97
|
+
var DialogTitle = React.forwardRef((_a, ref) => {
|
|
98
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
99
|
+
return /* @__PURE__ */ jsx(
|
|
100
|
+
DialogPrimitive.Title,
|
|
101
|
+
__spreadValues({
|
|
102
|
+
ref,
|
|
103
|
+
"data-slot": "dialog-title",
|
|
104
|
+
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
105
|
+
}, props)
|
|
106
|
+
);
|
|
107
|
+
});
|
|
108
|
+
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
109
|
+
var DialogDescription = React.forwardRef((_a, ref) => {
|
|
110
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
111
|
+
return /* @__PURE__ */ jsx(
|
|
112
|
+
DialogPrimitive.Description,
|
|
113
|
+
__spreadValues({
|
|
114
|
+
ref,
|
|
115
|
+
"data-slot": "dialog-description",
|
|
116
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
117
|
+
}, props)
|
|
118
|
+
);
|
|
119
|
+
});
|
|
120
|
+
DialogDescription.displayName = DialogPrimitive.Description.displayName;
|
|
121
|
+
|
|
122
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogContentVariants };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { textVariants } from './chunk-Y5D5LP4A.js';
|
|
2
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
3
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var cardVariants = cva("rounded-3xl text-card-foreground transition-colors", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
surface: "bg-card border border-border",
|
|
12
|
+
glass: "glass",
|
|
13
|
+
outline: "bg-transparent border border-border",
|
|
14
|
+
muted: "bg-muted border border-transparent"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: "[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:p-4 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-4 [&_[data-slot=card-footer]]:pt-0",
|
|
18
|
+
default: "[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:p-6 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-6 [&_[data-slot=card-footer]]:pt-0",
|
|
19
|
+
lg: "[&_[data-slot=card-header]]:p-8 [&_[data-slot=card-content]]:p-8 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-8 [&_[data-slot=card-footer]]:pt-0"
|
|
20
|
+
},
|
|
21
|
+
interactive: {
|
|
22
|
+
true: "cursor-pointer hover:border-primary/40 hover:-translate-y-0.5 transition-[transform,border-color] duration-200",
|
|
23
|
+
false: ""
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "surface",
|
|
28
|
+
size: "default",
|
|
29
|
+
interactive: false
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
var Card = React.forwardRef((_a, ref) => {
|
|
33
|
+
var _b = _a, { className, variant, size, interactive } = _b, props = __objRest(_b, ["className", "variant", "size", "interactive"]);
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
"div",
|
|
36
|
+
__spreadValues({
|
|
37
|
+
ref,
|
|
38
|
+
"data-slot": "card",
|
|
39
|
+
className: cn(cardVariants({ variant, size, interactive }), className)
|
|
40
|
+
}, props)
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
Card.displayName = "Card";
|
|
44
|
+
var CardHeader = React.forwardRef(
|
|
45
|
+
(_a, ref) => {
|
|
46
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
"div",
|
|
49
|
+
__spreadValues({
|
|
50
|
+
ref,
|
|
51
|
+
"data-slot": "card-header",
|
|
52
|
+
className: cn("flex flex-col space-y-1.5 p-6", className)
|
|
53
|
+
}, props)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
CardHeader.displayName = "CardHeader";
|
|
58
|
+
var CardTitle = React.forwardRef(
|
|
59
|
+
(_a, ref) => {
|
|
60
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
"div",
|
|
63
|
+
__spreadValues({
|
|
64
|
+
ref,
|
|
65
|
+
"data-slot": "card-title",
|
|
66
|
+
className: cn(textVariants({ variant: "h4", wrap: "balance" }), className)
|
|
67
|
+
}, props)
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
CardTitle.displayName = "CardTitle";
|
|
72
|
+
var CardDescription = React.forwardRef(
|
|
73
|
+
(_a, ref) => {
|
|
74
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
75
|
+
return /* @__PURE__ */ jsx(
|
|
76
|
+
"div",
|
|
77
|
+
__spreadValues({
|
|
78
|
+
ref,
|
|
79
|
+
"data-slot": "card-description",
|
|
80
|
+
className: cn("text-sm", textVariants({ color: "muted", wrap: "pretty" }), className)
|
|
81
|
+
}, props)
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
CardDescription.displayName = "CardDescription";
|
|
86
|
+
var CardContent = React.forwardRef(
|
|
87
|
+
(_a, ref) => {
|
|
88
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
89
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ ref, "data-slot": "card-content", className: cn("p-6 pt-0", className) }, props));
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
CardContent.displayName = "CardContent";
|
|
93
|
+
var CardAction = React.forwardRef(
|
|
94
|
+
(_a, ref) => {
|
|
95
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
"div",
|
|
98
|
+
__spreadValues({
|
|
99
|
+
ref,
|
|
100
|
+
"data-slot": "card-action",
|
|
101
|
+
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)
|
|
102
|
+
}, props)
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
CardAction.displayName = "CardAction";
|
|
107
|
+
var CardFooter = React.forwardRef(
|
|
108
|
+
(_a, ref) => {
|
|
109
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
110
|
+
return /* @__PURE__ */ jsx(
|
|
111
|
+
"div",
|
|
112
|
+
__spreadValues({
|
|
113
|
+
ref,
|
|
114
|
+
"data-slot": "card-footer",
|
|
115
|
+
className: cn("flex items-center p-6 pt-0", className)
|
|
116
|
+
}, props)
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
CardFooter.displayName = "CardFooter";
|
|
121
|
+
|
|
122
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };
|
|
@@ -12,9 +12,10 @@ var textVariants = cva("", {
|
|
|
12
12
|
h3: "text-xl font-semibold",
|
|
13
13
|
h4: "text-lg font-semibold leading-none tracking-tight",
|
|
14
14
|
"body-lg": "text-base leading-relaxed",
|
|
15
|
-
body: "text-
|
|
15
|
+
body: "text-base leading-normal",
|
|
16
16
|
"body-sm": "text-sm leading-relaxed",
|
|
17
|
-
|
|
17
|
+
small: "text-sm text-muted-foreground",
|
|
18
|
+
caption: "text-xs leading-normal text-muted-foreground",
|
|
18
19
|
label: "text-sm font-medium",
|
|
19
20
|
overline: "text-xs font-semibold uppercase tracking-wider"
|
|
20
21
|
},
|
|
@@ -56,6 +57,20 @@ var textVariants = cva("", {
|
|
|
56
57
|
color: "inherit"
|
|
57
58
|
}
|
|
58
59
|
});
|
|
60
|
+
var defaultTagForVariant = {
|
|
61
|
+
display: "h1",
|
|
62
|
+
h1: "h1",
|
|
63
|
+
h2: "h2",
|
|
64
|
+
h3: "h3",
|
|
65
|
+
h4: "h4",
|
|
66
|
+
"body-lg": "p",
|
|
67
|
+
body: "p",
|
|
68
|
+
"body-sm": "p",
|
|
69
|
+
small: "p",
|
|
70
|
+
caption: "span",
|
|
71
|
+
label: "span",
|
|
72
|
+
overline: "span"
|
|
73
|
+
};
|
|
59
74
|
function Text(_a) {
|
|
60
75
|
var _b = _a, {
|
|
61
76
|
as,
|
|
@@ -76,7 +91,7 @@ function Text(_a) {
|
|
|
76
91
|
"wrap",
|
|
77
92
|
"className"
|
|
78
93
|
]);
|
|
79
|
-
const Comp = as != null ? as : "p";
|
|
94
|
+
const Comp = as != null ? as : variant ? defaultTagForVariant[variant] : "p";
|
|
80
95
|
return /* @__PURE__ */ jsx(
|
|
81
96
|
Comp,
|
|
82
97
|
__spreadValues({
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { jsx } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var badgeVariants = cva(
|
|
7
|
+
"inline-flex items-center rounded-lg border px-2.5 py-0.5 text-xs font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "border-transparent bg-primary text-primary-foreground",
|
|
12
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground",
|
|
13
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground",
|
|
14
|
+
outline: "text-foreground border-border",
|
|
15
|
+
overlay: "border-transparent bg-foreground/70 text-background backdrop-blur-sm",
|
|
16
|
+
glass: "glass text-foreground border-border/50",
|
|
17
|
+
success: "border-transparent bg-success text-success-foreground",
|
|
18
|
+
warning: "border-transparent bg-warning text-warning-foreground",
|
|
19
|
+
brown: "border-transparent bg-brown text-brown-foreground"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
function Badge(_a) {
|
|
28
|
+
var _b = _a, { className, variant } = _b, props = __objRest(_b, ["className", "variant"]);
|
|
29
|
+
return /* @__PURE__ */ jsx("div", __spreadValues({ "data-slot": "badge", className: cn(badgeVariants({ variant }), className) }, props));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { Badge, badgeVariants };
|
|
@@ -5,12 +5,12 @@ import { cva } from 'class-variance-authority';
|
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
var toggleVariants = cva(
|
|
8
|
-
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-
|
|
8
|
+
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-accent/50 hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 transition-colors aria-invalid:ring-2 aria-invalid:ring-destructive/40 whitespace-nowrap",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
variant: {
|
|
12
12
|
default: "bg-transparent",
|
|
13
|
-
outline: "border border-
|
|
13
|
+
outline: "border border-border bg-transparent hover:bg-accent/50 hover:text-accent-foreground data-[state=on]:border-primary"
|
|
14
14
|
},
|
|
15
15
|
size: {
|
|
16
16
|
default: "h-9 px-2 min-w-9",
|