@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.
Files changed (227) hide show
  1. package/dist/{chunk-ERMIA7NP.js → chunk-7PPCH42H.js} +3 -3
  2. package/dist/{chunk-HLQ2IRE7.js → chunk-BAZFVSSG.js} +3 -3
  3. package/dist/chunk-D5QHEHXJ.js +26 -0
  4. package/dist/{chunk-UISA4CIG.js → chunk-N2KNBPAQ.js} +2 -2
  5. package/dist/{chunk-7H54PTVH.js → chunk-PSR7N36A.js} +38 -10
  6. package/dist/chunk-RIDXFY6M.js +38 -0
  7. package/dist/chunk-UUJVXN2O.js +82 -0
  8. package/dist/chunk-WKMLZDUT.js +122 -0
  9. package/dist/chunk-XK2ZDQVE.js +122 -0
  10. package/dist/{chunk-4KOMHDZD.js → chunk-Y5D5LP4A.js} +18 -3
  11. package/dist/chunk-YJ6OBKZJ.js +32 -0
  12. package/dist/{chunk-ESO2EM3L.js → chunk-ZBBUKXM5.js} +2 -2
  13. package/dist/chunk-ZFNOCP6W.js +106 -0
  14. package/dist/components/accordion.js +11 -5
  15. package/dist/components/alert-dialog.js +5 -3
  16. package/dist/components/alert.d.ts +4 -1
  17. package/dist/components/alert.js +25 -9
  18. package/dist/components/avatar.d.ts +17 -2
  19. package/dist/components/avatar.js +91 -12
  20. package/dist/components/badge.d.ts +1 -1
  21. package/dist/components/badge.js +1 -1
  22. package/dist/components/breadcrumb.js +5 -2
  23. package/dist/components/button-group.d.ts +14 -0
  24. package/dist/components/button-group.js +39 -0
  25. package/dist/components/button.d.ts +3 -1
  26. package/dist/components/button.js +1 -1
  27. package/dist/components/calendar.js +3 -3
  28. package/dist/components/card.d.ts +13 -5
  29. package/dist/components/card.js +2 -2
  30. package/dist/components/carousel.d.ts +20 -3
  31. package/dist/components/carousel.js +72 -12
  32. package/dist/components/checkbox.js +1 -1
  33. package/dist/components/circular-progress.d.ts +16 -0
  34. package/dist/components/circular-progress.js +105 -0
  35. package/dist/components/combobox.d.ts +27 -0
  36. package/dist/components/combobox.js +102 -0
  37. package/dist/components/command.d.ts +16 -3
  38. package/dist/components/command.js +2 -2
  39. package/dist/components/currency-input.d.ts +1 -0
  40. package/dist/components/currency-input.js +73 -52
  41. package/dist/components/date-input.d.ts +10 -0
  42. package/dist/components/date-input.js +40 -0
  43. package/dist/components/description-list.d.ts +15 -0
  44. package/dist/components/description-list.js +67 -0
  45. package/dist/components/dialog.d.ts +13 -2
  46. package/dist/components/dialog.js +1 -1
  47. package/dist/components/drawer.d.ts +5 -2
  48. package/dist/components/drawer.js +47 -9
  49. package/dist/components/dropdown-menu.d.ts +7 -2
  50. package/dist/components/dropdown-menu.js +22 -6
  51. package/dist/components/empty-state.js +2 -2
  52. package/dist/components/field.d.ts +22 -0
  53. package/dist/components/field.js +130 -0
  54. package/dist/components/form.d.ts +2 -1
  55. package/dist/components/form.js +11 -1
  56. package/dist/components/haptic-button.js +3 -3
  57. package/dist/components/input-group.d.ts +18 -0
  58. package/dist/components/input-group.js +92 -0
  59. package/dist/components/input.d.ts +8 -2
  60. package/dist/components/input.js +1 -1
  61. package/dist/components/item.d.ts +23 -0
  62. package/dist/components/item.js +120 -0
  63. package/dist/components/kbd.d.ts +13 -0
  64. package/dist/components/kbd.js +49 -0
  65. package/dist/components/lazy-markdown.d.ts +3 -1
  66. package/dist/components/lazy-markdown.js +7 -7
  67. package/dist/components/link-button.js +1 -1
  68. package/dist/components/multi-select-combobox.js +92 -83
  69. package/dist/components/multi-select-menu.d.ts +0 -4
  70. package/dist/components/multi-select-menu.js +28 -17
  71. package/dist/components/native-select.d.ts +12 -0
  72. package/dist/components/native-select.js +49 -0
  73. package/dist/components/pagination.d.ts +5 -2
  74. package/dist/components/pagination.js +66 -7
  75. package/dist/components/place-about-tab.js +4 -4
  76. package/dist/components/place-card.js +1 -1
  77. package/dist/components/place-details-mobile.js +4 -4
  78. package/dist/components/popover.d.ts +7 -1
  79. package/dist/components/popover.js +1 -1
  80. package/dist/components/progress.d.ts +5 -1
  81. package/dist/components/progress.js +17 -3
  82. package/dist/components/radio-group.js +12 -3
  83. package/dist/components/rating.d.ts +2 -0
  84. package/dist/components/rating.js +88 -70
  85. package/dist/components/scroll-fade.d.ts +15 -0
  86. package/dist/components/scroll-fade.js +116 -0
  87. package/dist/components/search-bar.d.ts +1 -2
  88. package/dist/components/search-bar.js +37 -60
  89. package/dist/components/searchable-select.js +76 -72
  90. package/dist/components/select.d.ts +5 -1
  91. package/dist/components/select.js +30 -14
  92. package/dist/components/selection-bar.d.ts +11 -0
  93. package/dist/components/selection-bar.js +65 -0
  94. package/dist/components/separator.js +3 -2
  95. package/dist/components/sheet.d.ts +1 -1
  96. package/dist/components/sheet.js +1 -1
  97. package/dist/components/skeleton-card.js +1 -1
  98. package/dist/components/skeleton.js +1 -1
  99. package/dist/components/slider.js +21 -4
  100. package/dist/components/sliding-panels.js +9 -6
  101. package/dist/components/spinner.d.ts +17 -0
  102. package/dist/components/spinner.js +50 -0
  103. package/dist/components/stepper.d.ts +18 -0
  104. package/dist/components/stepper.js +199 -0
  105. package/dist/components/switch.js +4 -3
  106. package/dist/components/table.d.ts +23 -5
  107. package/dist/components/table.js +121 -35
  108. package/dist/components/tabs.d.ts +3 -1
  109. package/dist/components/tabs.js +37 -9
  110. package/dist/components/tag-group.d.ts +9 -0
  111. package/dist/components/tag-group.js +26 -0
  112. package/dist/components/tag.d.ts +17 -0
  113. package/dist/components/tag.js +61 -0
  114. package/dist/components/text.d.ts +1 -1
  115. package/dist/components/text.js +1 -1
  116. package/dist/components/textarea.js +2 -1
  117. package/dist/components/toast.js +1 -1
  118. package/dist/components/toaster.js +1 -1
  119. package/dist/components/toggle-group.js +1 -1
  120. package/dist/components/toggle.js +1 -1
  121. package/dist/components/tooltip.d.ts +3 -2
  122. package/dist/components/tooltip.js +16 -2
  123. package/package.json +45 -26
  124. package/src/components/accordion.tsx +11 -6
  125. package/src/components/alert-dialog.tsx +4 -2
  126. package/src/components/alert.tsx +20 -8
  127. package/src/components/avatar.tsx +106 -13
  128. package/src/components/badge.tsx +12 -11
  129. package/src/components/breadcrumb.tsx +5 -2
  130. package/src/components/button-group.stories.tsx +52 -0
  131. package/src/components/button-group.tsx +40 -0
  132. package/src/components/button.test.tsx +174 -0
  133. package/src/components/button.tsx +42 -19
  134. package/src/components/calendar.tsx +2 -2
  135. package/src/components/card.tsx +55 -13
  136. package/src/components/carousel.tsx +85 -13
  137. package/src/components/checkbox.test.tsx +58 -0
  138. package/src/components/checkbox.tsx +8 -3
  139. package/src/components/circular-progress.stories.tsx +39 -0
  140. package/src/components/circular-progress.tsx +102 -0
  141. package/src/components/collapsible.stories.tsx +7 -3
  142. package/src/components/combobox.stories.tsx +82 -0
  143. package/src/components/combobox.test.tsx +118 -0
  144. package/src/components/combobox.tsx +136 -0
  145. package/src/components/command.test.tsx +91 -0
  146. package/src/components/command.tsx +38 -15
  147. package/src/components/currency-input.test.tsx +63 -0
  148. package/src/components/currency-input.tsx +84 -66
  149. package/src/components/date-input.stories.tsx +31 -0
  150. package/src/components/date-input.tsx +43 -0
  151. package/src/components/description-list.stories.tsx +62 -0
  152. package/src/components/description-list.tsx +68 -0
  153. package/src/components/dialog.test.tsx +84 -0
  154. package/src/components/dialog.tsx +64 -24
  155. package/src/components/drawer.tsx +72 -23
  156. package/src/components/dropdown-menu.test.tsx +180 -0
  157. package/src/components/dropdown-menu.tsx +31 -6
  158. package/src/components/field.stories.tsx +36 -0
  159. package/src/components/field.test.tsx +157 -0
  160. package/src/components/field.tsx +146 -0
  161. package/src/components/form.stories.tsx +3 -2
  162. package/src/components/form.test.tsx +95 -0
  163. package/src/components/form.tsx +9 -0
  164. package/src/components/haptic-button.tsx +1 -1
  165. package/src/components/input-group.stories.tsx +61 -0
  166. package/src/components/input-group.tsx +99 -0
  167. package/src/components/input.test.tsx +103 -0
  168. package/src/components/input.tsx +24 -7
  169. package/src/components/item.stories.tsx +52 -0
  170. package/src/components/item.tsx +115 -0
  171. package/src/components/kbd.stories.tsx +33 -0
  172. package/src/components/kbd.tsx +46 -0
  173. package/src/components/lazy-markdown.tsx +10 -7
  174. package/src/components/multi-select-combobox.test.tsx +101 -0
  175. package/src/components/multi-select-combobox.tsx +85 -82
  176. package/src/components/multi-select-menu.tsx +49 -41
  177. package/src/components/native-select.stories.tsx +52 -0
  178. package/src/components/native-select.tsx +45 -0
  179. package/src/components/pagination.tsx +64 -5
  180. package/src/components/popover.tsx +66 -3
  181. package/src/components/progress.tsx +27 -4
  182. package/src/components/radio-group.test.tsx +64 -0
  183. package/src/components/radio-group.tsx +11 -3
  184. package/src/components/rating.test.tsx +112 -0
  185. package/src/components/rating.tsx +97 -82
  186. package/src/components/scroll-fade.stories.tsx +98 -0
  187. package/src/components/scroll-fade.tsx +127 -0
  188. package/src/components/search-bar.stories.tsx +1 -32
  189. package/src/components/search-bar.tsx +22 -59
  190. package/src/components/searchable-select.tsx +69 -73
  191. package/src/components/select.tsx +34 -19
  192. package/src/components/selection-bar.stories.tsx +37 -0
  193. package/src/components/selection-bar.tsx +65 -0
  194. package/src/components/separator.tsx +5 -2
  195. package/src/components/sheet.tsx +1 -1
  196. package/src/components/skeleton.tsx +2 -2
  197. package/src/components/slider.test.tsx +45 -0
  198. package/src/components/slider.tsx +31 -12
  199. package/src/components/sliding-panels.tsx +8 -5
  200. package/src/components/spinner.stories.tsx +35 -0
  201. package/src/components/spinner.tsx +50 -0
  202. package/src/components/stepper.stories.tsx +71 -0
  203. package/src/components/stepper.tsx +220 -0
  204. package/src/components/switch.test.tsx +52 -0
  205. package/src/components/switch.tsx +4 -3
  206. package/src/components/table.tsx +140 -35
  207. package/src/components/tabs.test.tsx +107 -0
  208. package/src/components/tabs.tsx +70 -23
  209. package/src/components/tag-group.stories.tsx +39 -0
  210. package/src/components/tag-group.tsx +28 -0
  211. package/src/components/tag.stories.tsx +50 -0
  212. package/src/components/tag.tsx +63 -0
  213. package/src/components/text.test.tsx +1 -1
  214. package/src/components/text.tsx +19 -3
  215. package/src/components/textarea.test.tsx +48 -0
  216. package/src/components/textarea.tsx +2 -1
  217. package/src/components/toast.tsx +4 -3
  218. package/src/components/toggle.tsx +2 -2
  219. package/src/components/tooltip.tsx +12 -2
  220. package/src/globals.css +126 -90
  221. package/dist/chunk-2BMJRXQX.js +0 -80
  222. package/dist/chunk-4AVS6CV4.js +0 -89
  223. package/dist/chunk-4UO73SKC.js +0 -26
  224. package/dist/chunk-CW24PLDW.js +0 -24
  225. package/dist/chunk-IQASCH2V.js +0 -25
  226. package/dist/chunk-NKHH23YK.js +0 -31
  227. 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
- type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
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 };
@@ -1,3 +1,3 @@
1
- export { Input } from '../chunk-CW24PLDW.js';
1
+ export { Input, inputVariants } from '../chunk-RIDXFY6M.js';
2
2
  import '../chunk-FEK5XGZW.js';
3
3
  import '../chunk-3GWWZKX7.js';
@@ -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 dynamic from 'next/dynamic';
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 MarkdownRendererDynamic = dynamic(
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(props) {
10
- return /* @__PURE__ */ jsx(MarkdownRendererDynamic, __spreadValues({}, props));
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,4 +1,4 @@
1
- import { Button } from '../chunk-2BMJRXQX.js';
1
+ import { Button } from '../chunk-ZFNOCP6W.js';
2
2
  import '../chunk-R47NEOSI.js';
3
3
  import '../chunk-FEK5XGZW.js';
4
4
  import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
@@ -1,14 +1,15 @@
1
- import { Popover, PopoverTrigger, PopoverContent } from '../chunk-4UO73SKC.js';
2
- import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-7H54PTVH.js';
3
- import '../chunk-4AVS6CV4.js';
4
- import { Badge } from '../chunk-NKHH23YK.js';
5
- import { Button } from '../chunk-2BMJRXQX.js';
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 { X, ChevronsUpDown, Check } from 'lucide-react';
11
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
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 handleRemove = (value, e) => {
33
- e.stopPropagation();
34
- onSelectionChange(selected.filter((item) => item !== value));
35
- };
36
- const selectedLabels = selected.map((value) => {
37
- var _a;
38
- return ((_a = options.find((opt) => opt.value === value)) == null ? void 0 : _a.label) || value;
39
- }).slice(0, maxDisplay);
40
- const remainingCount = selected.length - maxDisplay;
41
- return /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
42
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
43
- Button,
44
- {
45
- variant: "outline",
46
- role: "combobox",
47
- "aria-expanded": open,
48
- className: cn(
49
- "w-full justify-between h-auto min-h-10 py-2",
50
- selected.length === 0 && "text-muted-foreground",
51
- className
52
- ),
53
- disabled,
54
- children: [
55
- /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1 flex-1 text-left", children: selected.length === 0 ? /* @__PURE__ */ jsx("span", { children: placeholder }) : /* @__PURE__ */ jsxs(Fragment, { children: [
56
- selectedLabels.map((label, i) => /* @__PURE__ */ jsxs(Badge, { variant: "secondary", className: "text-xs", children: [
57
- label,
58
- /* @__PURE__ */ jsx(
59
- "div",
60
- {
61
- role: "button",
62
- tabIndex: 0,
63
- className: "ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2 cursor-pointer",
64
- onClick: (e) => handleRemove(selected[i], e),
65
- onKeyDown: (e) => {
66
- if (e.key === "Enter" || e.key === " ") {
67
- e.preventDefault();
68
- handleRemove(selected[i], e);
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
- children: /* @__PURE__ */ jsx(X, { className: "h-3 w-3" })
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
- /* @__PURE__ */ jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
82
- ]
83
- }
84
- ) }),
85
- /* @__PURE__ */ jsx(PopoverContent, { className: "w-full p-0", align: "start", children: /* @__PURE__ */ jsxs(Command, { shouldFilter, children: [
86
- /* @__PURE__ */ jsx(CommandInput, { placeholder: searchPlaceholder, onValueChange: onSearchChange }),
87
- /* @__PURE__ */ jsxs(CommandList, { children: [
88
- /* @__PURE__ */ jsx(CommandEmpty, { children: loading ? "Loading..." : emptyText }),
89
- /* @__PURE__ */ jsx(CommandGroup, { children: options.map((option) => /* @__PURE__ */ jsxs(
90
- CommandItem,
91
- {
92
- value: option.value,
93
- onSelect: () => handleSelect(option.value),
94
- children: [
95
- /* @__PURE__ */ jsx(
96
- Check,
97
- {
98
- className: cn(
99
- "mr-2 h-4 w-4",
100
- selected.includes(option.value) ? "opacity-100" : "opacity-0"
101
- )
102
- }
103
- ),
104
- option.label
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
  }