@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,92 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var inputGroupVariants = cva(
|
|
9
|
+
"flex items-center w-full rounded-xl border border-border bg-background text-base md:text-sm text-foreground transition-colors focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50 aria-invalid:border-destructive aria-invalid:focus-within:ring-destructive/40",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
sm: "h-9",
|
|
14
|
+
default: "h-11",
|
|
15
|
+
lg: "h-12"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
size: "default"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
var InputGroupContext = React.createContext({});
|
|
24
|
+
var InputGroup = React.forwardRef((_a, ref) => {
|
|
25
|
+
var _b = _a, { className, size, children } = _b, props = __objRest(_b, ["className", "size", "children"]);
|
|
26
|
+
return /* @__PURE__ */ jsx(InputGroupContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx(
|
|
27
|
+
"div",
|
|
28
|
+
__spreadProps(__spreadValues({
|
|
29
|
+
ref,
|
|
30
|
+
"data-slot": "input-group",
|
|
31
|
+
className: cn(inputGroupVariants({ size }), className)
|
|
32
|
+
}, props), {
|
|
33
|
+
children
|
|
34
|
+
})
|
|
35
|
+
) });
|
|
36
|
+
});
|
|
37
|
+
InputGroup.displayName = "InputGroup";
|
|
38
|
+
var InputGroupInput = React.forwardRef(
|
|
39
|
+
(_a, ref) => {
|
|
40
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
"input",
|
|
43
|
+
__spreadValues({
|
|
44
|
+
ref,
|
|
45
|
+
"data-slot": "input-group-input",
|
|
46
|
+
className: cn(
|
|
47
|
+
"h-full min-w-0 flex-1 bg-transparent px-3 outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed",
|
|
48
|
+
className
|
|
49
|
+
)
|
|
50
|
+
}, props)
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
55
|
+
var InputGroupAddon = React.forwardRef((_a, ref) => {
|
|
56
|
+
var _b = _a, { className, align = "start", asChild } = _b, props = __objRest(_b, ["className", "align", "asChild"]);
|
|
57
|
+
const Comp = asChild ? Slot : "div";
|
|
58
|
+
return /* @__PURE__ */ jsx(
|
|
59
|
+
Comp,
|
|
60
|
+
__spreadValues({
|
|
61
|
+
ref,
|
|
62
|
+
"data-slot": "input-group-addon",
|
|
63
|
+
"data-align": align,
|
|
64
|
+
className: cn(
|
|
65
|
+
"inline-flex h-full items-center gap-1 text-sm text-muted-foreground",
|
|
66
|
+
align === "start" ? "pl-3 pr-1" : "pl-1 pr-3",
|
|
67
|
+
className
|
|
68
|
+
)
|
|
69
|
+
}, props)
|
|
70
|
+
);
|
|
71
|
+
});
|
|
72
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
73
|
+
var InputGroupButton = React.forwardRef(
|
|
74
|
+
(_a, ref) => {
|
|
75
|
+
var _b = _a, { className, type = "button" } = _b, props = __objRest(_b, ["className", "type"]);
|
|
76
|
+
return /* @__PURE__ */ jsx(
|
|
77
|
+
"button",
|
|
78
|
+
__spreadValues({
|
|
79
|
+
ref,
|
|
80
|
+
type,
|
|
81
|
+
"data-slot": "input-group-button",
|
|
82
|
+
className: cn(
|
|
83
|
+
"inline-flex h-7 min-w-7 cursor-pointer items-center justify-center gap-1 rounded-md px-2 text-xs font-medium text-muted-foreground transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&:has(svg:only-child)]:w-7 [&:has(svg:only-child)]:px-0 [&_svg]:size-4",
|
|
84
|
+
className
|
|
85
|
+
)
|
|
86
|
+
}, props)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
InputGroupButton.displayName = "InputGroupButton";
|
|
91
|
+
|
|
92
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, inputGroupVariants };
|
|
@@ -1,6 +1,12 @@
|
|
|
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
|
-
|
|
5
|
+
declare const inputVariants: (props?: ({
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof inputVariants> {
|
|
9
|
+
}
|
|
4
10
|
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
11
|
|
|
6
|
-
export { Input, type InputProps };
|
|
12
|
+
export { Input, type InputProps, inputVariants };
|
package/dist/components/input.js
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
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 itemVariants: (props?: ({
|
|
6
|
+
variant?: "default" | "outline" | "muted" | 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 Item: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
11
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
12
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
13
|
+
interactive?: boolean | null | undefined;
|
|
14
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
declare const ItemMedia: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const ItemContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const ItemTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const ItemDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const ItemActions: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
|
|
23
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle, itemVariants };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
5
|
+
import { cva } from 'class-variance-authority';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var itemVariants = cva(
|
|
9
|
+
"flex w-full items-center gap-3 rounded-xl text-sm text-foreground transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default: "bg-transparent",
|
|
14
|
+
muted: "bg-muted",
|
|
15
|
+
outline: "border border-border bg-transparent"
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
sm: "px-3 py-2",
|
|
19
|
+
default: "px-4 py-3",
|
|
20
|
+
lg: "px-5 py-4"
|
|
21
|
+
},
|
|
22
|
+
interactive: {
|
|
23
|
+
true: "cursor-pointer hover:bg-accent hover:text-accent-foreground active:scale-[0.99]",
|
|
24
|
+
false: ""
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default",
|
|
29
|
+
size: "default",
|
|
30
|
+
interactive: false
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
var Item = React.forwardRef(
|
|
35
|
+
(_a, ref) => {
|
|
36
|
+
var _b = _a, { className, variant, size, interactive, asChild } = _b, props = __objRest(_b, ["className", "variant", "size", "interactive", "asChild"]);
|
|
37
|
+
const Comp = asChild ? Slot : "div";
|
|
38
|
+
return /* @__PURE__ */ jsx(
|
|
39
|
+
Comp,
|
|
40
|
+
__spreadValues({
|
|
41
|
+
ref,
|
|
42
|
+
"data-slot": "item",
|
|
43
|
+
className: cn(itemVariants({ variant, size, interactive }), className)
|
|
44
|
+
}, props)
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
Item.displayName = "Item";
|
|
49
|
+
var ItemMedia = React.forwardRef(
|
|
50
|
+
(_a, ref) => {
|
|
51
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"div",
|
|
54
|
+
__spreadValues({
|
|
55
|
+
ref,
|
|
56
|
+
"data-slot": "item-media",
|
|
57
|
+
className: cn("inline-flex shrink-0 items-center justify-center text-muted-foreground", className)
|
|
58
|
+
}, props)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
ItemMedia.displayName = "ItemMedia";
|
|
63
|
+
var ItemContent = React.forwardRef(
|
|
64
|
+
(_a, ref) => {
|
|
65
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
66
|
+
return /* @__PURE__ */ jsx(
|
|
67
|
+
"div",
|
|
68
|
+
__spreadValues({
|
|
69
|
+
ref,
|
|
70
|
+
"data-slot": "item-content",
|
|
71
|
+
className: cn("flex min-w-0 flex-1 flex-col gap-0.5", className)
|
|
72
|
+
}, props)
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
ItemContent.displayName = "ItemContent";
|
|
77
|
+
var ItemTitle = React.forwardRef(
|
|
78
|
+
(_a, ref) => {
|
|
79
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
80
|
+
return /* @__PURE__ */ jsx(
|
|
81
|
+
"div",
|
|
82
|
+
__spreadValues({
|
|
83
|
+
ref,
|
|
84
|
+
"data-slot": "item-title",
|
|
85
|
+
className: cn("truncate text-sm font-medium text-foreground", className)
|
|
86
|
+
}, props)
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
ItemTitle.displayName = "ItemTitle";
|
|
91
|
+
var ItemDescription = React.forwardRef(
|
|
92
|
+
(_a, ref) => {
|
|
93
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
94
|
+
return /* @__PURE__ */ jsx(
|
|
95
|
+
"div",
|
|
96
|
+
__spreadValues({
|
|
97
|
+
ref,
|
|
98
|
+
"data-slot": "item-description",
|
|
99
|
+
className: cn("truncate text-xs text-muted-foreground", className)
|
|
100
|
+
}, props)
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
ItemDescription.displayName = "ItemDescription";
|
|
105
|
+
var ItemActions = React.forwardRef(
|
|
106
|
+
(_a, ref) => {
|
|
107
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
108
|
+
return /* @__PURE__ */ jsx(
|
|
109
|
+
"div",
|
|
110
|
+
__spreadValues({
|
|
111
|
+
ref,
|
|
112
|
+
"data-slot": "item-actions",
|
|
113
|
+
className: cn("ml-auto inline-flex shrink-0 items-center gap-1", className)
|
|
114
|
+
}, props)
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
ItemActions.displayName = "ItemActions";
|
|
119
|
+
|
|
120
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemMedia, ItemTitle, itemVariants };
|
|
@@ -0,0 +1,13 @@
|
|
|
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 kbdVariants: (props?: ({
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare const Kbd: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLElement> & VariantProps<(props?: ({
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLElement>>;
|
|
11
|
+
declare const KbdGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
|
|
13
|
+
export { Kbd, KbdGroup, kbdVariants };
|
|
@@ -0,0 +1,49 @@
|
|
|
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 kbdVariants = cva(
|
|
8
|
+
"inline-flex select-none items-center justify-center gap-1 rounded-md border border-border bg-muted font-mono font-medium text-muted-foreground shadow-[0_1px_0_0_var(--border)]",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
sm: "h-5 min-w-5 px-1 text-[10px]",
|
|
13
|
+
default: "h-6 min-w-6 px-1.5 text-xs",
|
|
14
|
+
lg: "h-7 min-w-7 px-2 text-sm"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
size: "default"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
var Kbd = React.forwardRef((_a, ref) => {
|
|
23
|
+
var _b = _a, { className, size } = _b, props = __objRest(_b, ["className", "size"]);
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"kbd",
|
|
26
|
+
__spreadValues({
|
|
27
|
+
ref,
|
|
28
|
+
"data-slot": "kbd",
|
|
29
|
+
className: cn(kbdVariants({ size }), className)
|
|
30
|
+
}, props)
|
|
31
|
+
);
|
|
32
|
+
});
|
|
33
|
+
Kbd.displayName = "Kbd";
|
|
34
|
+
var KbdGroup = React.forwardRef(
|
|
35
|
+
(_a, ref) => {
|
|
36
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"span",
|
|
39
|
+
__spreadValues({
|
|
40
|
+
ref,
|
|
41
|
+
"data-slot": "kbd-group",
|
|
42
|
+
className: cn("inline-flex items-center gap-1", className)
|
|
43
|
+
}, props)
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
KbdGroup.displayName = "KbdGroup";
|
|
48
|
+
|
|
49
|
+
export { Kbd, KbdGroup, kbdVariants };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import { Components } from 'react-markdown';
|
|
3
4
|
|
|
4
5
|
type LazyMarkdownProps = {
|
|
5
6
|
content: string;
|
|
6
7
|
className?: string;
|
|
7
8
|
components?: Components;
|
|
9
|
+
fallback?: React.ReactNode;
|
|
8
10
|
};
|
|
9
|
-
declare function LazyMarkdown(props: LazyMarkdownProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare function LazyMarkdown({ fallback, ...props }: LazyMarkdownProps): react_jsx_runtime.JSX.Element;
|
|
10
12
|
|
|
11
13
|
export { LazyMarkdown };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
2
|
-
import
|
|
1
|
+
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
() => import('./markdown-renderer.js').then((m) => m.MarkdownRenderer)
|
|
7
|
-
{ ssr: false }
|
|
5
|
+
var MarkdownRendererLazy = React.lazy(
|
|
6
|
+
() => import('./markdown-renderer.js').then((m) => ({ default: m.MarkdownRenderer }))
|
|
8
7
|
);
|
|
9
|
-
function LazyMarkdown(
|
|
10
|
-
|
|
8
|
+
function LazyMarkdown(_a) {
|
|
9
|
+
var _b = _a, { fallback = null } = _b, props = __objRest(_b, ["fallback"]);
|
|
10
|
+
return /* @__PURE__ */ jsx(React.Suspense, { fallback, children: /* @__PURE__ */ jsx(MarkdownRendererLazy, __spreadValues({}, props)) });
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export { LazyMarkdown };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import
|
|
5
|
-
import { Button } from '../chunk-
|
|
1
|
+
import { Checkbox } from '../chunk-D5QHEHXJ.js';
|
|
2
|
+
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-UUJVXN2O.js';
|
|
3
|
+
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-PSR7N36A.js';
|
|
4
|
+
import '../chunk-WKMLZDUT.js';
|
|
5
|
+
import { Button } from '../chunk-ZFNOCP6W.js';
|
|
6
6
|
import '../chunk-R47NEOSI.js';
|
|
7
|
+
import { Badge } from '../chunk-YJ6OBKZJ.js';
|
|
7
8
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
8
9
|
import '../chunk-3GWWZKX7.js';
|
|
9
10
|
import * as React from 'react';
|
|
10
|
-
import {
|
|
11
|
-
import { jsxs, jsx
|
|
11
|
+
import { ChevronsUpDown, X } from 'lucide-react';
|
|
12
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
12
13
|
|
|
13
14
|
function MultiSelectCombobox({
|
|
14
15
|
options,
|
|
@@ -25,89 +26,97 @@ function MultiSelectCombobox({
|
|
|
25
26
|
shouldFilter = true
|
|
26
27
|
}) {
|
|
27
28
|
const [open, setOpen] = React.useState(false);
|
|
29
|
+
const listboxId = React.useId();
|
|
28
30
|
const handleSelect = (value) => {
|
|
29
31
|
const newSelected = selected.includes(value) ? selected.filter((item) => item !== value) : [...selected, value];
|
|
30
32
|
onSelectionChange(newSelected);
|
|
31
33
|
};
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
34
|
+
const visible = selected.slice(0, maxDisplay);
|
|
35
|
+
const remaining = selected.length - maxDisplay;
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col gap-2", className), children: [
|
|
37
|
+
/* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
38
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
39
|
+
Button,
|
|
40
|
+
{
|
|
41
|
+
variant: "outline",
|
|
42
|
+
role: "combobox",
|
|
43
|
+
"aria-expanded": open,
|
|
44
|
+
"aria-haspopup": "listbox",
|
|
45
|
+
"aria-controls": open ? listboxId : void 0,
|
|
46
|
+
className: cn(
|
|
47
|
+
"w-full justify-between font-normal",
|
|
48
|
+
selected.length === 0 && "text-muted-foreground"
|
|
49
|
+
),
|
|
50
|
+
disabled,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: selected.length === 0 ? placeholder : `${selected.length} selected` }),
|
|
53
|
+
/* @__PURE__ */ jsx(ChevronsUpDown, { className: "size-4 shrink-0 opacity-50" })
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
) }),
|
|
57
|
+
/* @__PURE__ */ jsx(
|
|
58
|
+
PopoverContent,
|
|
59
|
+
{
|
|
60
|
+
id: listboxId,
|
|
61
|
+
className: "w-[var(--radix-popover-trigger-width)] p-0",
|
|
62
|
+
align: "start",
|
|
63
|
+
children: /* @__PURE__ */ jsxs(Command, { shouldFilter, children: [
|
|
64
|
+
/* @__PURE__ */ jsx(CommandInput, { placeholder: searchPlaceholder, onValueChange: onSearchChange }),
|
|
65
|
+
/* @__PURE__ */ jsxs(CommandList, { children: [
|
|
66
|
+
/* @__PURE__ */ jsx(CommandEmpty, { children: loading ? "Loading\u2026" : emptyText }),
|
|
67
|
+
/* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => {
|
|
68
|
+
const isSelected = selected.includes(option.value);
|
|
69
|
+
return /* @__PURE__ */ jsxs(
|
|
70
|
+
CommandItem,
|
|
71
|
+
{
|
|
72
|
+
value: option.value,
|
|
73
|
+
onSelect: () => handleSelect(option.value),
|
|
74
|
+
className: "gap-2",
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
Checkbox,
|
|
78
|
+
{
|
|
79
|
+
checked: isSelected,
|
|
80
|
+
tabIndex: -1,
|
|
81
|
+
"aria-hidden": true,
|
|
82
|
+
className: "pointer-events-none"
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
option.label
|
|
86
|
+
]
|
|
70
87
|
},
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
)
|
|
74
|
-
] }, selected[i])),
|
|
75
|
-
remainingCount > 0 && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "text-xs", children: [
|
|
76
|
-
"+",
|
|
77
|
-
remainingCount,
|
|
78
|
-
" more"
|
|
88
|
+
option.value
|
|
89
|
+
);
|
|
90
|
+
}) })
|
|
79
91
|
] })
|
|
80
|
-
] })
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
option.value
|
|
108
|
-
)) })
|
|
92
|
+
] })
|
|
93
|
+
}
|
|
94
|
+
)
|
|
95
|
+
] }),
|
|
96
|
+
selected.length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1", children: [
|
|
97
|
+
visible.map((value) => {
|
|
98
|
+
var _a;
|
|
99
|
+
const label = ((_a = options.find((opt) => opt.value === value)) == null ? void 0 : _a.label) || value;
|
|
100
|
+
return /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "gap-1 pr-1", children: [
|
|
101
|
+
label,
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
"button",
|
|
104
|
+
{
|
|
105
|
+
type: "button",
|
|
106
|
+
"aria-label": `Remove ${label}`,
|
|
107
|
+
onClick: () => onSelectionChange(selected.filter((item) => item !== value)),
|
|
108
|
+
className: "rounded-full p-0.5 hover:bg-foreground/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring transition-colors",
|
|
109
|
+
children: /* @__PURE__ */ jsx(X, { className: "size-3" })
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
] }, value);
|
|
113
|
+
}),
|
|
114
|
+
remaining > 0 && /* @__PURE__ */ jsxs(Badge, { variant: "secondary", children: [
|
|
115
|
+
"+",
|
|
116
|
+
remaining,
|
|
117
|
+
" more"
|
|
109
118
|
] })
|
|
110
|
-
] })
|
|
119
|
+
] })
|
|
111
120
|
] });
|
|
112
121
|
}
|
|
113
122
|
|
|
@@ -10,14 +10,10 @@ interface MultiSelectMenuProps {
|
|
|
10
10
|
options: MultiSelectMenuOption[];
|
|
11
11
|
selected: string[];
|
|
12
12
|
onSelectedChange: (values: string[]) => void;
|
|
13
|
-
/** Trigger element rendered via Radix `asChild` — typically a Button. */
|
|
14
13
|
trigger: React.ReactNode;
|
|
15
|
-
/** Optional heading rendered above the option list. */
|
|
16
14
|
label?: string;
|
|
17
15
|
align?: "start" | "center" | "end";
|
|
18
|
-
/** Pixel width of the popover content. Defaults to 220. */
|
|
19
16
|
width?: number;
|
|
20
|
-
/** className for the popover content. */
|
|
21
17
|
contentClassName?: string;
|
|
22
18
|
emptyText?: string;
|
|
23
19
|
}
|