@bearmenu/ui 0.5.1 → 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 +15 -13
- 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/sticky-container.js +1 -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 +14 -12
- 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/sticky-container.tsx +1 -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 +142 -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,130 @@
|
|
|
1
|
+
import { Label } from '../chunk-4JOV7FXW.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 { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
8
|
+
var FieldContext = React.createContext({ id: "", descriptionId: "", errorId: "", hasError: false });
|
|
9
|
+
var Field = React.forwardRef(
|
|
10
|
+
(_a, ref) => {
|
|
11
|
+
var _b = _a, { id: providedId, invalid, orientation = "vertical", className, children } = _b, props = __objRest(_b, ["id", "invalid", "orientation", "className", "children"]);
|
|
12
|
+
const generatedId = React.useId();
|
|
13
|
+
const id = providedId != null ? providedId : generatedId;
|
|
14
|
+
const descriptionId = `${id}-description`;
|
|
15
|
+
const errorId = `${id}-error`;
|
|
16
|
+
return /* @__PURE__ */ jsx(FieldContext.Provider, { value: { id, descriptionId, errorId, hasError: !!invalid }, children: /* @__PURE__ */ jsx(
|
|
17
|
+
"div",
|
|
18
|
+
__spreadProps(__spreadValues({
|
|
19
|
+
ref,
|
|
20
|
+
"data-slot": "field",
|
|
21
|
+
"data-invalid": invalid || void 0,
|
|
22
|
+
className: cn(
|
|
23
|
+
"flex gap-2",
|
|
24
|
+
orientation === "vertical" ? "flex-col" : "flex-row items-center",
|
|
25
|
+
className
|
|
26
|
+
)
|
|
27
|
+
}, props), {
|
|
28
|
+
children
|
|
29
|
+
})
|
|
30
|
+
) });
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
Field.displayName = "Field";
|
|
34
|
+
var FieldLabel = React.forwardRef((_a, ref) => {
|
|
35
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
36
|
+
const { id, hasError } = React.useContext(FieldContext);
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
Label,
|
|
39
|
+
__spreadValues({
|
|
40
|
+
ref,
|
|
41
|
+
"data-slot": "field-label",
|
|
42
|
+
htmlFor: id,
|
|
43
|
+
className: cn(hasError && "text-destructive", className)
|
|
44
|
+
}, props)
|
|
45
|
+
);
|
|
46
|
+
});
|
|
47
|
+
FieldLabel.displayName = "FieldLabel";
|
|
48
|
+
var FieldControl = React.forwardRef(
|
|
49
|
+
(_a, ref) => {
|
|
50
|
+
var props = __objRest(_a, []);
|
|
51
|
+
const { id, descriptionId, errorId, hasError } = React.useContext(FieldContext);
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
Slot,
|
|
54
|
+
__spreadValues({
|
|
55
|
+
ref,
|
|
56
|
+
"data-slot": "field-control",
|
|
57
|
+
id,
|
|
58
|
+
"aria-describedby": hasError ? `${descriptionId} ${errorId}` : descriptionId,
|
|
59
|
+
"aria-invalid": hasError || void 0
|
|
60
|
+
}, props)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
FieldControl.displayName = "FieldControl";
|
|
65
|
+
var FieldDescription = React.forwardRef(
|
|
66
|
+
(_a, ref) => {
|
|
67
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
68
|
+
const { descriptionId } = React.useContext(FieldContext);
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"p",
|
|
71
|
+
__spreadValues({
|
|
72
|
+
ref,
|
|
73
|
+
id: descriptionId,
|
|
74
|
+
"data-slot": "field-description",
|
|
75
|
+
className: cn("text-sm text-muted-foreground", className)
|
|
76
|
+
}, props)
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
FieldDescription.displayName = "FieldDescription";
|
|
81
|
+
var FieldError = React.forwardRef(
|
|
82
|
+
(_a, ref) => {
|
|
83
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
84
|
+
const { errorId, hasError } = React.useContext(FieldContext);
|
|
85
|
+
if (!hasError || !children) return null;
|
|
86
|
+
return /* @__PURE__ */ jsx(
|
|
87
|
+
"p",
|
|
88
|
+
__spreadProps(__spreadValues({
|
|
89
|
+
ref,
|
|
90
|
+
id: errorId,
|
|
91
|
+
role: "alert",
|
|
92
|
+
"data-slot": "field-error",
|
|
93
|
+
className: cn("text-sm text-destructive", className)
|
|
94
|
+
}, props), {
|
|
95
|
+
children
|
|
96
|
+
})
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
FieldError.displayName = "FieldError";
|
|
101
|
+
var FieldSet = React.forwardRef(
|
|
102
|
+
(_a, ref) => {
|
|
103
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
104
|
+
return /* @__PURE__ */ jsx(
|
|
105
|
+
"fieldset",
|
|
106
|
+
__spreadValues({
|
|
107
|
+
ref,
|
|
108
|
+
"data-slot": "field-set",
|
|
109
|
+
className: cn("flex flex-col gap-3 rounded-xl border border-border p-4", className)
|
|
110
|
+
}, props)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
FieldSet.displayName = "FieldSet";
|
|
115
|
+
var FieldLegend = React.forwardRef(
|
|
116
|
+
(_a, ref) => {
|
|
117
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
118
|
+
return /* @__PURE__ */ jsx(
|
|
119
|
+
"legend",
|
|
120
|
+
__spreadValues({
|
|
121
|
+
ref,
|
|
122
|
+
"data-slot": "field-legend",
|
|
123
|
+
className: cn("px-1 text-sm font-medium text-foreground", className)
|
|
124
|
+
}, props)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
FieldLegend.displayName = "FieldLegend";
|
|
129
|
+
|
|
130
|
+
export { Field, FieldControl, FieldDescription, FieldError, FieldLabel, FieldLegend, FieldSet };
|
|
@@ -6,6 +6,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
|
|
|
6
6
|
import { Slot } from '@radix-ui/react-slot';
|
|
7
7
|
|
|
8
8
|
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: react_hook_form.FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
9
|
+
declare function FormRoot({ noValidate, className, ...props }: React.FormHTMLAttributes<HTMLFormElement>): react_jsx_runtime.JSX.Element;
|
|
9
10
|
declare const FormField: <TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>) => react_jsx_runtime.JSX.Element;
|
|
10
11
|
declare const useFormField: () => {
|
|
11
12
|
invalid: boolean;
|
|
@@ -25,4 +26,4 @@ declare function FormControl({ ...props }: React.ComponentProps<typeof Slot>): r
|
|
|
25
26
|
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
|
26
27
|
declare function FormMessage({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element | null;
|
|
27
28
|
|
|
28
|
-
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
29
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormRoot, useFormField };
|
package/dist/components/form.js
CHANGED
|
@@ -7,6 +7,16 @@ import { FormProvider, Controller, useFormContext, useFormState } from 'react-ho
|
|
|
7
7
|
import { jsx } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
var Form = FormProvider;
|
|
10
|
+
function FormRoot(_a) {
|
|
11
|
+
var _b = _a, {
|
|
12
|
+
noValidate = true,
|
|
13
|
+
className
|
|
14
|
+
} = _b, props = __objRest(_b, [
|
|
15
|
+
"noValidate",
|
|
16
|
+
"className"
|
|
17
|
+
]);
|
|
18
|
+
return /* @__PURE__ */ jsx("form", __spreadValues({ "data-slot": "form-root", noValidate, className }, props));
|
|
19
|
+
}
|
|
10
20
|
var FormFieldContext = React.createContext({});
|
|
11
21
|
var FormField = (_a) => {
|
|
12
22
|
var props = __objRest(_a, []);
|
|
@@ -94,4 +104,4 @@ function FormMessage(_a) {
|
|
|
94
104
|
);
|
|
95
105
|
}
|
|
96
106
|
|
|
97
|
-
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField };
|
|
107
|
+
export { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormRoot, useFormField };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Button } from '../chunk-
|
|
1
|
+
import { Button } from '../chunk-ZFNOCP6W.js';
|
|
2
2
|
import { useHaptic } from '../chunk-R47NEOSI.js';
|
|
3
3
|
import '../chunk-FEK5XGZW.js';
|
|
4
|
-
import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
4
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
|
|
7
7
|
function HapticButton(_a) {
|
|
@@ -11,7 +11,7 @@ function HapticButton(_a) {
|
|
|
11
11
|
trigger(hapticStyle);
|
|
12
12
|
onClick == null ? void 0 : onClick(e);
|
|
13
13
|
};
|
|
14
|
-
return /* @__PURE__ */ jsx(Button, __spreadValues({ onClick: handleClick }
|
|
14
|
+
return /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({}, props), { onClick: handleClick, haptic: false }));
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export { HapticButton };
|
|
@@ -0,0 +1,18 @@
|
|
|
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 inputGroupVariants: (props?: ({
|
|
6
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
7
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
|
+
declare const InputGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
9
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
declare const InputGroupInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
12
|
+
declare const InputGroupAddon: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
13
|
+
align?: "start" | "end";
|
|
14
|
+
asChild?: boolean;
|
|
15
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const InputGroupButton: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
|
|
18
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, inputGroupVariants };
|
|
@@ -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" | "muted" | "outline" | 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" | "muted" | "outline" | 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 };
|