@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.
Files changed (225) 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 +5 -2
  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 +4 -2
  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 +29 -16
  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/search-bar.d.ts +1 -2
  86. package/dist/components/search-bar.js +37 -60
  87. package/dist/components/searchable-select.js +76 -72
  88. package/dist/components/select.d.ts +5 -1
  89. package/dist/components/select.js +30 -14
  90. package/dist/components/selection-bar.d.ts +11 -0
  91. package/dist/components/selection-bar.js +65 -0
  92. package/dist/components/separator.js +3 -2
  93. package/dist/components/sheet.d.ts +1 -1
  94. package/dist/components/sheet.js +1 -1
  95. package/dist/components/skeleton-card.js +1 -1
  96. package/dist/components/skeleton.js +1 -1
  97. package/dist/components/slider.js +21 -4
  98. package/dist/components/sliding-panels.js +15 -13
  99. package/dist/components/spinner.d.ts +17 -0
  100. package/dist/components/spinner.js +50 -0
  101. package/dist/components/stepper.d.ts +18 -0
  102. package/dist/components/stepper.js +199 -0
  103. package/dist/components/sticky-container.js +1 -0
  104. package/dist/components/switch.js +4 -3
  105. package/dist/components/table.d.ts +23 -5
  106. package/dist/components/table.js +121 -35
  107. package/dist/components/tabs.d.ts +3 -1
  108. package/dist/components/tabs.js +37 -9
  109. package/dist/components/tag-group.d.ts +9 -0
  110. package/dist/components/tag-group.js +26 -0
  111. package/dist/components/tag.d.ts +17 -0
  112. package/dist/components/tag.js +61 -0
  113. package/dist/components/text.d.ts +3 -3
  114. package/dist/components/text.js +1 -1
  115. package/dist/components/textarea.js +2 -1
  116. package/dist/components/toast.js +1 -1
  117. package/dist/components/toaster.js +1 -1
  118. package/dist/components/toggle-group.js +1 -1
  119. package/dist/components/toggle.js +1 -1
  120. package/dist/components/tooltip.d.ts +3 -2
  121. package/dist/components/tooltip.js +16 -2
  122. package/package.json +44 -26
  123. package/src/components/accordion.tsx +11 -6
  124. package/src/components/alert-dialog.tsx +4 -2
  125. package/src/components/alert.tsx +20 -8
  126. package/src/components/avatar.tsx +106 -13
  127. package/src/components/badge.tsx +12 -11
  128. package/src/components/breadcrumb.tsx +5 -2
  129. package/src/components/button-group.stories.tsx +52 -0
  130. package/src/components/button-group.tsx +40 -0
  131. package/src/components/button.test.tsx +174 -0
  132. package/src/components/button.tsx +42 -19
  133. package/src/components/calendar.tsx +2 -2
  134. package/src/components/card.tsx +55 -13
  135. package/src/components/carousel.tsx +85 -13
  136. package/src/components/checkbox.test.tsx +58 -0
  137. package/src/components/checkbox.tsx +8 -3
  138. package/src/components/circular-progress.stories.tsx +39 -0
  139. package/src/components/circular-progress.tsx +102 -0
  140. package/src/components/collapsible.stories.tsx +7 -3
  141. package/src/components/combobox.stories.tsx +82 -0
  142. package/src/components/combobox.test.tsx +118 -0
  143. package/src/components/combobox.tsx +136 -0
  144. package/src/components/command.test.tsx +91 -0
  145. package/src/components/command.tsx +38 -15
  146. package/src/components/currency-input.test.tsx +63 -0
  147. package/src/components/currency-input.tsx +84 -66
  148. package/src/components/date-input.stories.tsx +31 -0
  149. package/src/components/date-input.tsx +43 -0
  150. package/src/components/description-list.stories.tsx +62 -0
  151. package/src/components/description-list.tsx +68 -0
  152. package/src/components/dialog.test.tsx +84 -0
  153. package/src/components/dialog.tsx +64 -24
  154. package/src/components/drawer.tsx +72 -23
  155. package/src/components/dropdown-menu.test.tsx +180 -0
  156. package/src/components/dropdown-menu.tsx +31 -6
  157. package/src/components/field.stories.tsx +36 -0
  158. package/src/components/field.test.tsx +157 -0
  159. package/src/components/field.tsx +146 -0
  160. package/src/components/form.stories.tsx +3 -2
  161. package/src/components/form.test.tsx +95 -0
  162. package/src/components/form.tsx +9 -0
  163. package/src/components/haptic-button.tsx +1 -1
  164. package/src/components/input-group.stories.tsx +61 -0
  165. package/src/components/input-group.tsx +99 -0
  166. package/src/components/input.test.tsx +103 -0
  167. package/src/components/input.tsx +24 -7
  168. package/src/components/item.stories.tsx +52 -0
  169. package/src/components/item.tsx +115 -0
  170. package/src/components/kbd.stories.tsx +33 -0
  171. package/src/components/kbd.tsx +46 -0
  172. package/src/components/lazy-markdown.tsx +10 -7
  173. package/src/components/multi-select-combobox.test.tsx +101 -0
  174. package/src/components/multi-select-combobox.tsx +85 -82
  175. package/src/components/multi-select-menu.tsx +49 -41
  176. package/src/components/native-select.stories.tsx +52 -0
  177. package/src/components/native-select.tsx +45 -0
  178. package/src/components/pagination.tsx +64 -5
  179. package/src/components/popover.tsx +66 -3
  180. package/src/components/progress.tsx +27 -4
  181. package/src/components/radio-group.test.tsx +64 -0
  182. package/src/components/radio-group.tsx +11 -3
  183. package/src/components/rating.test.tsx +112 -0
  184. package/src/components/rating.tsx +97 -82
  185. package/src/components/search-bar.stories.tsx +1 -32
  186. package/src/components/search-bar.tsx +22 -59
  187. package/src/components/searchable-select.tsx +69 -73
  188. package/src/components/select.tsx +34 -19
  189. package/src/components/selection-bar.stories.tsx +37 -0
  190. package/src/components/selection-bar.tsx +65 -0
  191. package/src/components/separator.tsx +5 -2
  192. package/src/components/sheet.tsx +1 -1
  193. package/src/components/skeleton.tsx +2 -2
  194. package/src/components/slider.test.tsx +45 -0
  195. package/src/components/slider.tsx +31 -12
  196. package/src/components/sliding-panels.tsx +14 -12
  197. package/src/components/spinner.stories.tsx +35 -0
  198. package/src/components/spinner.tsx +50 -0
  199. package/src/components/stepper.stories.tsx +71 -0
  200. package/src/components/stepper.tsx +220 -0
  201. package/src/components/sticky-container.tsx +1 -0
  202. package/src/components/switch.test.tsx +52 -0
  203. package/src/components/switch.tsx +4 -3
  204. package/src/components/table.tsx +140 -35
  205. package/src/components/tabs.test.tsx +107 -0
  206. package/src/components/tabs.tsx +70 -23
  207. package/src/components/tag-group.stories.tsx +39 -0
  208. package/src/components/tag-group.tsx +28 -0
  209. package/src/components/tag.stories.tsx +50 -0
  210. package/src/components/tag.tsx +63 -0
  211. package/src/components/text.test.tsx +1 -1
  212. package/src/components/text.tsx +19 -3
  213. package/src/components/textarea.test.tsx +48 -0
  214. package/src/components/textarea.tsx +2 -1
  215. package/src/components/toast.tsx +4 -3
  216. package/src/components/toggle.tsx +2 -2
  217. package/src/components/tooltip.tsx +12 -2
  218. package/src/globals.css +142 -90
  219. package/dist/chunk-2BMJRXQX.js +0 -80
  220. package/dist/chunk-4AVS6CV4.js +0 -89
  221. package/dist/chunk-4UO73SKC.js +0 -26
  222. package/dist/chunk-CW24PLDW.js +0 -24
  223. package/dist/chunk-IQASCH2V.js +0 -25
  224. package/dist/chunk-NKHH23YK.js +0 -31
  225. package/dist/chunk-QJ54Z7TC.js +0 -83
@@ -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
  }
@@ -1,8 +1,8 @@
1
- import { Popover, PopoverTrigger, PopoverContent } from '../chunk-4UO73SKC.js';
2
- import { Checkbox } from '../chunk-IQASCH2V.js';
1
+ import { Checkbox } from '../chunk-D5QHEHXJ.js';
3
2
  import { cn } from '../chunk-FEK5XGZW.js';
4
3
  import '../chunk-3GWWZKX7.js';
5
4
  import * as React from 'react';
5
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
6
6
  import { jsxs, jsx } from 'react/jsx-runtime';
7
7
 
8
8
  function MultiSelectMenu({
@@ -26,34 +26,45 @@ function MultiSelectMenu({
26
26
  }
27
27
  onSelectedChange(Array.from(next));
28
28
  }
29
- return /* @__PURE__ */ jsxs(Popover, { children: [
30
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: trigger }),
31
- /* @__PURE__ */ jsxs(
32
- PopoverContent,
29
+ return /* @__PURE__ */ jsxs(DropdownMenuPrimitive.Root, { children: [
30
+ /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { asChild: true, children: trigger }),
31
+ /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
32
+ DropdownMenuPrimitive.Content,
33
33
  {
34
34
  align,
35
- className: cn("p-2", contentClassName),
35
+ sideOffset: 4,
36
36
  style: { width },
37
+ className: cn(
38
+ "z-50 overflow-hidden rounded-xl border border-border bg-popover p-2 text-popover-foreground shadow-xl",
39
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
40
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
41
+ contentClassName
42
+ ),
37
43
  children: [
38
- label && /* @__PURE__ */ jsx("div", { className: "text-foreground px-2 py-1.5 text-sm font-semibold", children: label }),
39
- /* @__PURE__ */ jsx("div", { role: "group", "aria-label": label, className: "flex flex-col gap-0.5", children: options.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-muted-foreground px-2 py-1.5 text-sm", children: emptyText }) : options.map((option) => {
44
+ label && /* @__PURE__ */ jsx(DropdownMenuPrimitive.Label, { className: "px-2 py-1.5 text-xs font-semibold text-muted-foreground", children: label }),
45
+ options.length === 0 ? /* @__PURE__ */ jsx("p", { className: "px-2 py-1.5 text-sm text-muted-foreground", children: emptyText }) : /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { className: "flex flex-col gap-0.5", children: options.map((option) => {
46
+ var _a;
40
47
  const checked = selectedSet.has(option.value);
41
48
  return /* @__PURE__ */ jsxs(
42
- "label",
49
+ DropdownMenuPrimitive.CheckboxItem,
43
50
  {
51
+ checked,
52
+ disabled: (_a = option.disabled) != null ? _a : false,
53
+ onSelect: (e) => e.preventDefault(),
54
+ onCheckedChange: () => handleToggle(option.value),
44
55
  className: cn(
45
- "flex cursor-pointer items-center gap-2 rounded-md px-2 py-1.5 text-sm select-none",
46
- "hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
47
- option.disabled && "pointer-events-none opacity-50"
56
+ "relative flex cursor-pointer select-none items-center gap-2 rounded-md px-2 py-1.5 text-sm outline-none",
57
+ "data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground",
58
+ "data-[disabled]:pointer-events-none data-[disabled]:opacity-50"
48
59
  ),
49
60
  children: [
50
61
  /* @__PURE__ */ jsx(
51
62
  Checkbox,
52
63
  {
53
64
  checked,
54
- onCheckedChange: () => handleToggle(option.value),
55
- disabled: option.disabled,
56
- "aria-label": typeof option.label === "string" ? option.label : option.value
65
+ tabIndex: -1,
66
+ "aria-hidden": true,
67
+ className: "pointer-events-none"
57
68
  }
58
69
  ),
59
70
  /* @__PURE__ */ jsx("span", { className: "flex-1", children: option.label })
@@ -64,7 +75,7 @@ function MultiSelectMenu({
64
75
  }) })
65
76
  ]
66
77
  }
67
- )
78
+ ) })
68
79
  ] });
69
80
  }
70
81
 
@@ -0,0 +1,12 @@
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 nativeSelectVariants: (props?: ({
6
+ size?: "default" | "sm" | "lg" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare const NativeSelect: React.ForwardRefExoticComponent<Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> & VariantProps<(props?: ({
9
+ size?: "default" | "sm" | "lg" | null | undefined;
10
+ } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLSelectElement>>;
11
+
12
+ export { NativeSelect, nativeSelectVariants };
@@ -0,0 +1,49 @@
1
+ import { cn } from '../chunk-FEK5XGZW.js';
2
+ import { __objRest, __spreadProps, __spreadValues } from '../chunk-3GWWZKX7.js';
3
+ import * as React from 'react';
4
+ import { ChevronDown } from 'lucide-react';
5
+ import { cva } from 'class-variance-authority';
6
+ import { jsxs, jsx } from 'react/jsx-runtime';
7
+
8
+ var nativeSelectVariants = cva(
9
+ "w-full appearance-none rounded-xl border border-border bg-background pr-9 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 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
10
+ {
11
+ variants: {
12
+ size: {
13
+ sm: "h-9 pl-3",
14
+ default: "h-11 pl-4",
15
+ lg: "h-12 pl-5"
16
+ }
17
+ },
18
+ defaultVariants: {
19
+ size: "default"
20
+ }
21
+ }
22
+ );
23
+ var NativeSelect = React.forwardRef(
24
+ (_a, ref) => {
25
+ var _b = _a, { className, size, children } = _b, props = __objRest(_b, ["className", "size", "children"]);
26
+ return /* @__PURE__ */ jsxs("div", { className: "relative inline-flex w-full", children: [
27
+ /* @__PURE__ */ jsx(
28
+ "select",
29
+ __spreadProps(__spreadValues({
30
+ ref,
31
+ "data-slot": "native-select",
32
+ className: cn(nativeSelectVariants({ size }), className)
33
+ }, props), {
34
+ children
35
+ })
36
+ ),
37
+ /* @__PURE__ */ jsx(
38
+ ChevronDown,
39
+ {
40
+ "aria-hidden": true,
41
+ className: "pointer-events-none absolute right-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"
42
+ }
43
+ )
44
+ ] });
45
+ }
46
+ );
47
+ NativeSelect.displayName = "NativeSelect";
48
+
49
+ export { NativeSelect, nativeSelectVariants };
@@ -9,10 +9,13 @@ declare function PaginationContent({ className, ...props }: React.ComponentProps
9
9
  declare function PaginationItem({ ...props }: React.ComponentProps<"li">): react_jsx_runtime.JSX.Element;
10
10
  type PaginationLinkProps = {
11
11
  isActive?: boolean;
12
+ disabled?: boolean;
12
13
  } & Pick<React.ComponentProps<typeof Button>, "size"> & React.ComponentProps<"a">;
13
- declare function PaginationLink({ className, isActive, size, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
14
+ declare function PaginationLink({ className, isActive, disabled, size, onClick, ...props }: PaginationLinkProps): react_jsx_runtime.JSX.Element;
15
+ declare function PaginationFirst({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
14
16
  declare function PaginationPrevious({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
15
17
  declare function PaginationNext({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
18
+ declare function PaginationLast({ className, ...props }: React.ComponentProps<typeof PaginationLink>): react_jsx_runtime.JSX.Element;
16
19
  declare function PaginationEllipsis({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
17
20
 
18
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
21
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious };
@@ -1,8 +1,8 @@
1
- import { buttonVariants } from '../chunk-2BMJRXQX.js';
1
+ import { buttonVariants } from '../chunk-ZFNOCP6W.js';
2
2
  import '../chunk-R47NEOSI.js';
3
3
  import { cn } from '../chunk-FEK5XGZW.js';
4
4
  import { __objRest, __spreadValues, __spreadProps } from '../chunk-3GWWZKX7.js';
5
- import { ChevronLeftIcon, ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
5
+ import { ChevronsLeftIcon, ChevronLeftIcon, ChevronRightIcon, ChevronsRightIcon, MoreHorizontalIcon } from 'lucide-react';
6
6
  import { jsx, jsxs } from 'react/jsx-runtime';
7
7
 
8
8
  function Pagination(_a) {
@@ -32,25 +32,63 @@ function PaginationItem(_a) {
32
32
  return /* @__PURE__ */ jsx("li", __spreadValues({ "data-slot": "pagination-item" }, props));
33
33
  }
34
34
  function PaginationLink(_a) {
35
- var _b = _a, { className, isActive, size = "icon" } = _b, props = __objRest(_b, ["className", "isActive", "size"]);
35
+ var _b = _a, {
36
+ className,
37
+ isActive,
38
+ disabled,
39
+ size = "icon",
40
+ onClick
41
+ } = _b, props = __objRest(_b, [
42
+ "className",
43
+ "isActive",
44
+ "disabled",
45
+ "size",
46
+ "onClick"
47
+ ]);
36
48
  return /* @__PURE__ */ jsx(
37
49
  "a",
38
50
  __spreadValues({
39
51
  "aria-current": isActive ? "page" : void 0,
52
+ "aria-disabled": disabled || void 0,
40
53
  "data-slot": "pagination-link",
41
54
  "data-active": isActive,
55
+ tabIndex: disabled ? -1 : void 0,
56
+ onClick: disabled ? (e) => e.preventDefault() : onClick,
42
57
  className: cn(
43
58
  buttonVariants({
44
- variant: isActive ? "outline" : "ghost",
59
+ variant: isActive ? "default" : "ghost",
45
60
  size
46
61
  }),
62
+ isActive && "pointer-events-none",
63
+ disabled && "pointer-events-none opacity-50",
47
64
  className
48
65
  )
49
66
  }, props)
50
67
  );
51
68
  }
69
+ function PaginationFirst(_a) {
70
+ var _b = _a, {
71
+ className
72
+ } = _b, props = __objRest(_b, [
73
+ "className"
74
+ ]);
75
+ return /* @__PURE__ */ jsx(
76
+ PaginationLink,
77
+ __spreadProps(__spreadValues({
78
+ "aria-label": "Go to first page",
79
+ size: "icon",
80
+ className: cn(className)
81
+ }, props), {
82
+ children: /* @__PURE__ */ jsx(ChevronsLeftIcon, {})
83
+ })
84
+ );
85
+ }
52
86
  function PaginationPrevious(_a) {
53
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
87
+ var _b = _a, {
88
+ className
89
+ } = _b, props = __objRest(_b, [
90
+ "className"
91
+ ]);
54
92
  return /* @__PURE__ */ jsxs(
55
93
  PaginationLink,
56
94
  __spreadProps(__spreadValues({
@@ -66,7 +104,11 @@ function PaginationPrevious(_a) {
66
104
  );
67
105
  }
68
106
  function PaginationNext(_a) {
69
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
107
+ var _b = _a, {
108
+ className
109
+ } = _b, props = __objRest(_b, [
110
+ "className"
111
+ ]);
70
112
  return /* @__PURE__ */ jsxs(
71
113
  PaginationLink,
72
114
  __spreadProps(__spreadValues({
@@ -81,6 +123,23 @@ function PaginationNext(_a) {
81
123
  })
82
124
  );
83
125
  }
126
+ function PaginationLast(_a) {
127
+ var _b = _a, {
128
+ className
129
+ } = _b, props = __objRest(_b, [
130
+ "className"
131
+ ]);
132
+ return /* @__PURE__ */ jsx(
133
+ PaginationLink,
134
+ __spreadProps(__spreadValues({
135
+ "aria-label": "Go to last page",
136
+ size: "icon",
137
+ className: cn(className)
138
+ }, props), {
139
+ children: /* @__PURE__ */ jsx(ChevronsRightIcon, {})
140
+ })
141
+ );
142
+ }
84
143
  function PaginationEllipsis(_a) {
85
144
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
86
145
  return /* @__PURE__ */ jsxs(
@@ -98,4 +157,4 @@ function PaginationEllipsis(_a) {
98
157
  );
99
158
  }
100
159
 
101
- export { Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious };
160
+ export { Pagination, PaginationContent, PaginationEllipsis, PaginationFirst, PaginationItem, PaginationLast, PaginationLink, PaginationNext, PaginationPrevious };
@@ -1,6 +1,6 @@
1
- export { PlaceAboutTab } from '../chunk-HLQ2IRE7.js';
2
- import '../chunk-QJ54Z7TC.js';
3
- import '../chunk-4KOMHDZD.js';
4
- import '../chunk-NKHH23YK.js';
1
+ export { PlaceAboutTab } from '../chunk-BAZFVSSG.js';
2
+ import '../chunk-XK2ZDQVE.js';
3
+ import '../chunk-Y5D5LP4A.js';
4
+ import '../chunk-YJ6OBKZJ.js';
5
5
  import '../chunk-FEK5XGZW.js';
6
6
  import '../chunk-3GWWZKX7.js';
@@ -1,4 +1,4 @@
1
- import { Text } from '../chunk-4KOMHDZD.js';
1
+ import { Text } from '../chunk-Y5D5LP4A.js';
2
2
  import { cn } from '../chunk-FEK5XGZW.js';
3
3
  import '../chunk-3GWWZKX7.js';
4
4
  import { memo, useState } from 'react';
@@ -1,7 +1,7 @@
1
- import { PlaceAboutTab } from '../chunk-HLQ2IRE7.js';
2
- import '../chunk-QJ54Z7TC.js';
3
- import { Text } from '../chunk-4KOMHDZD.js';
4
- import { Badge } from '../chunk-NKHH23YK.js';
1
+ import { PlaceAboutTab } from '../chunk-BAZFVSSG.js';
2
+ import '../chunk-XK2ZDQVE.js';
3
+ import { Text } from '../chunk-Y5D5LP4A.js';
4
+ import { Badge } from '../chunk-YJ6OBKZJ.js';
5
5
  import { cn } from '../chunk-FEK5XGZW.js';
6
6
  import '../chunk-3GWWZKX7.js';
7
7
  import { useState } from 'react';
@@ -3,6 +3,12 @@ import * as PopoverPrimitive from '@radix-ui/react-popover';
3
3
 
4
4
  declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
5
5
  declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
7
+ declare const PopoverClose: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>>;
6
8
  declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const PopoverArrow: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
10
+ declare const PopoverHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const PopoverTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
12
+ declare const PopoverDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
7
13
 
8
- export { Popover, PopoverContent, PopoverTrigger };
14
+ export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
@@ -1,3 +1,3 @@
1
- export { Popover, PopoverContent, PopoverTrigger } from '../chunk-4UO73SKC.js';
1
+ export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from '../chunk-UUJVXN2O.js';
2
2
  import '../chunk-FEK5XGZW.js';
3
3
  import '../chunk-3GWWZKX7.js';
@@ -1,6 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import * as ProgressPrimitive from '@radix-ui/react-progress';
3
3
 
4
- declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ type ProgressTone = "primary" | "success" | "warning" | "destructive";
5
+ declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
6
+ tone?: ProgressTone;
7
+ size?: "sm" | "default" | "lg";
8
+ } & React.RefAttributes<HTMLDivElement>>;
5
9
 
6
10
  export { Progress };
@@ -4,21 +4,35 @@ import * as React from 'react';
4
4
  import * as ProgressPrimitive from '@radix-ui/react-progress';
5
5
  import { jsx } from 'react/jsx-runtime';
6
6
 
7
+ var toneClasses = {
8
+ primary: "bg-primary",
9
+ success: "bg-success",
10
+ warning: "bg-warning",
11
+ destructive: "bg-destructive"
12
+ };
13
+ var sizeClasses = {
14
+ sm: "h-1",
15
+ default: "h-2",
16
+ lg: "h-3"
17
+ };
7
18
  var Progress = React.forwardRef((_a, ref) => {
8
- var _b = _a, { className, value } = _b, props = __objRest(_b, ["className", "value"]);
19
+ var _b = _a, { className, value, tone = "primary", size = "default" } = _b, props = __objRest(_b, ["className", "value", "tone", "size"]);
9
20
  return /* @__PURE__ */ jsx(
10
21
  ProgressPrimitive.Root,
11
22
  __spreadProps(__spreadValues({
12
23
  ref,
24
+ "data-slot": "progress",
13
25
  className: cn(
14
- "relative h-2 w-full overflow-hidden rounded-full glass border border-border/50",
26
+ "relative w-full overflow-hidden rounded-full bg-muted",
27
+ sizeClasses[size],
15
28
  className
16
29
  )
17
30
  }, props), {
18
31
  children: /* @__PURE__ */ jsx(
19
32
  ProgressPrimitive.Indicator,
20
33
  {
21
- className: "h-full w-full flex-1 bg-gradient-to-r from-primary to-secondary transition-all duration-500 ease-out shadow-lg",
34
+ "data-slot": "progress-indicator",
35
+ className: cn("h-full w-full flex-1 transition-transform duration-500 ease-out", toneClasses[tone]),
22
36
  style: { transform: `translateX(-${100 - (value || 0)}%)` }
23
37
  }
24
38
  )
@@ -7,7 +7,15 @@ import { jsx } from 'react/jsx-runtime';
7
7
 
8
8
  var RadioGroup = React.forwardRef((_a, ref) => {
9
9
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
10
- return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, __spreadProps(__spreadValues({ className: cn("grid gap-2", className) }, props), { ref }));
10
+ return /* @__PURE__ */ jsx(
11
+ RadioGroupPrimitive.Root,
12
+ __spreadProps(__spreadValues({
13
+ "data-slot": "radio-group",
14
+ className: cn("grid gap-2", className)
15
+ }, props), {
16
+ ref
17
+ })
18
+ );
11
19
  });
12
20
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
13
21
  var RadioGroupItem = React.forwardRef((_a, ref) => {
@@ -16,12 +24,13 @@ var RadioGroupItem = React.forwardRef((_a, ref) => {
16
24
  RadioGroupPrimitive.Item,
17
25
  __spreadProps(__spreadValues({
18
26
  ref,
27
+ "data-slot": "radio-group-item",
19
28
  className: cn(
20
- "aspect-square h-5 w-5 rounded-full border border-border glass text-primary transition-all duration-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-lg data-[state=checked]:shadow-primary/20 hover:border-accent/50 hover:shadow-md",
29
+ "aspect-square size-5 rounded-full border border-border bg-background text-primary transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary hover:border-primary/50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
21
30
  className
22
31
  )
23
32
  }, props), {
24
- children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "h-2.5 w-2.5 fill-current text-current animate-in zoom-in-50 duration-200" }) })
33
+ children: /* @__PURE__ */ jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx(Circle, { className: "size-2.5 fill-current text-primary animate-in zoom-in-50 duration-150" }) })
25
34
  })
26
35
  );
27
36
  });