@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
@@ -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
  });
@@ -9,6 +9,8 @@ interface RatingProps {
9
9
  readonly?: boolean;
10
10
  onRatingChange?: (rating: number) => void;
11
11
  className?: string;
12
+ /** Accessible label for the rating control. Defaults to "Rating". */
13
+ label?: string;
12
14
  }
13
15
  declare const Rating: React.ForwardRefExoticComponent<RatingProps & React.RefAttributes<HTMLDivElement>>;
14
16
 
@@ -4,6 +4,18 @@ import * as React from 'react';
4
4
  import { Star, StarHalf } from 'lucide-react';
5
5
  import { jsxs, jsx } from 'react/jsx-runtime';
6
6
 
7
+ var sizeClasses = {
8
+ sm: "size-3",
9
+ md: "size-4",
10
+ lg: "size-5"
11
+ };
12
+ var textSizeClasses = {
13
+ sm: "text-xs",
14
+ md: "text-sm",
15
+ lg: "text-base"
16
+ };
17
+ var FILLED_CLASSES = "fill-amber-400 text-amber-400";
18
+ var EMPTY_CLASSES = "fill-transparent text-muted-foreground/40";
7
19
  var Rating = React.forwardRef(
8
20
  (_a, ref) => {
9
21
  var _b = _a, {
@@ -14,7 +26,8 @@ var Rating = React.forwardRef(
14
26
  reviewCount,
15
27
  readonly = true,
16
28
  onRatingChange,
17
- className
29
+ className,
30
+ label = "Rating"
18
31
  } = _b, props = __objRest(_b, [
19
32
  "value",
20
33
  "max",
@@ -23,89 +36,94 @@ var Rating = React.forwardRef(
23
36
  "reviewCount",
24
37
  "readonly",
25
38
  "onRatingChange",
26
- "className"
39
+ "className",
40
+ "label"
27
41
  ]);
28
42
  const [hoverValue, setHoverValue] = React.useState(null);
29
- const sizeClasses = {
30
- sm: "h-3 w-3",
31
- md: "h-4 w-4",
32
- lg: "h-5 w-5"
33
- };
34
- const textSizeClasses = {
35
- sm: "text-xs",
36
- md: "text-sm",
37
- lg: "text-base"
38
- };
39
- const handleClick = (rating) => {
40
- if (!readonly && onRatingChange) {
41
- onRatingChange(rating);
42
- }
43
- };
44
- const handleMouseEnter = (rating) => {
45
- if (!readonly) {
46
- setHoverValue(rating);
47
- }
48
- };
49
- const handleMouseLeave = () => {
50
- if (!readonly) {
51
- setHoverValue(null);
43
+ const displayValue = hoverValue != null ? hoverValue : value;
44
+ if (readonly) {
45
+ const fullStars = Math.floor(displayValue);
46
+ const hasHalfStar = displayValue % 1 !== 0;
47
+ const emptyStars = max - fullStars - (hasHalfStar ? 1 : 0);
48
+ return /* @__PURE__ */ jsxs(
49
+ "div",
50
+ __spreadProps(__spreadValues({
51
+ ref,
52
+ role: "img",
53
+ "aria-label": `${label}: ${value} out of ${max}`,
54
+ className: cn("flex items-center gap-1", className)
55
+ }, props), {
56
+ children: [
57
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
58
+ Array.from({ length: fullStars }).map((_, i) => /* @__PURE__ */ jsx(Star, { className: cn(sizeClasses[size], FILLED_CLASSES) }, `full-${i}`)),
59
+ hasHalfStar && /* @__PURE__ */ jsx(StarHalf, { className: cn(sizeClasses[size], FILLED_CLASSES) }),
60
+ Array.from({ length: emptyStars }).map((_, i) => /* @__PURE__ */ jsx(Star, { className: cn(sizeClasses[size], EMPTY_CLASSES) }, `empty-${i}`))
61
+ ] }),
62
+ showCount && reviewCount !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn("ml-1 text-muted-foreground", textSizeClasses[size]), children: [
63
+ "(",
64
+ reviewCount,
65
+ ")"
66
+ ] })
67
+ ]
68
+ })
69
+ );
70
+ }
71
+ const handleKeyDown = (e) => {
72
+ if (!onRatingChange) return;
73
+ if (e.key === "ArrowRight" || e.key === "ArrowUp") {
74
+ e.preventDefault();
75
+ onRatingChange(Math.min(max, value + 1));
76
+ } else if (e.key === "ArrowLeft" || e.key === "ArrowDown") {
77
+ e.preventDefault();
78
+ onRatingChange(Math.max(0, value - 1));
79
+ } else if (e.key === "Home") {
80
+ e.preventDefault();
81
+ onRatingChange(0);
82
+ } else if (e.key === "End") {
83
+ e.preventDefault();
84
+ onRatingChange(max);
52
85
  }
53
86
  };
54
- const displayValue = hoverValue != null ? hoverValue : value;
55
- const fullStars = Math.floor(displayValue);
56
- const hasHalfStar = displayValue % 1 !== 0;
57
- const emptyStars = max - fullStars - (hasHalfStar ? 1 : 0);
58
87
  return /* @__PURE__ */ jsxs(
59
88
  "div",
60
89
  __spreadProps(__spreadValues({
61
90
  ref,
62
- className: cn("flex items-center gap-1", !readonly && "cursor-pointer", className)
91
+ role: "radiogroup",
92
+ "aria-label": label,
93
+ onKeyDown: handleKeyDown,
94
+ className: cn("flex items-center gap-1", className)
63
95
  }, props), {
64
96
  children: [
65
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5", children: [
66
- Array.from({ length: fullStars }).map((_, i) => /* @__PURE__ */ jsx(
67
- Star,
68
- {
69
- className: cn(
70
- sizeClasses[size],
71
- "fill-primary text-primary transition-colors",
72
- !readonly && "hover:fill-primary/80"
73
- ),
74
- onClick: () => handleClick(i + 1),
75
- onMouseEnter: () => handleMouseEnter(i + 1),
76
- onMouseLeave: handleMouseLeave
77
- },
78
- `full-${i}`
79
- )),
80
- hasHalfStar && /* @__PURE__ */ jsx(
81
- StarHalf,
82
- {
83
- className: cn(
84
- sizeClasses[size],
85
- "fill-primary text-primary transition-colors",
86
- !readonly && "hover:fill-primary/80"
87
- ),
88
- onClick: () => handleClick(fullStars + 1),
89
- onMouseEnter: () => handleMouseEnter(fullStars + 1),
90
- onMouseLeave: handleMouseLeave
91
- }
92
- ),
93
- Array.from({ length: emptyStars }).map((_, i) => /* @__PURE__ */ jsx(
94
- Star,
97
+ /* @__PURE__ */ jsx("div", { className: "flex items-center gap-0.5", onMouseLeave: () => setHoverValue(null), children: Array.from({ length: max }).map((_, i) => {
98
+ const starValue = i + 1;
99
+ const isActive = starValue <= displayValue;
100
+ return /* @__PURE__ */ jsx(
101
+ "button",
95
102
  {
103
+ type: "button",
104
+ role: "radio",
105
+ "aria-checked": value === starValue,
106
+ "aria-label": `${starValue} star${starValue === 1 ? "" : "s"}`,
107
+ onClick: () => onRatingChange == null ? void 0 : onRatingChange(starValue),
108
+ onMouseEnter: () => setHoverValue(starValue),
96
109
  className: cn(
97
- sizeClasses[size],
98
- "text-muted-foreground/30 transition-colors",
99
- !readonly && "hover:text-primary/50"
110
+ "rounded-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1"
100
111
  ),
101
- onClick: () => handleClick(fullStars + (hasHalfStar ? 1 : 0) + i + 1),
102
- onMouseEnter: () => handleMouseEnter(fullStars + (hasHalfStar ? 1 : 0) + i + 1),
103
- onMouseLeave: handleMouseLeave
112
+ children: /* @__PURE__ */ jsx(
113
+ Star,
114
+ {
115
+ className: cn(
116
+ sizeClasses[size],
117
+ isActive ? FILLED_CLASSES : EMPTY_CLASSES,
118
+ "transition-colors"
119
+ )
120
+ }
121
+ )
104
122
  },
105
- `empty-${i}`
106
- ))
107
- ] }),
108
- showCount && reviewCount !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn("text-muted-foreground ml-1", textSizeClasses[size]), children: [
123
+ starValue
124
+ );
125
+ }) }),
126
+ showCount && reviewCount !== void 0 && /* @__PURE__ */ jsxs("span", { className: cn("ml-1 text-muted-foreground", textSizeClasses[size]), children: [
109
127
  "(",
110
128
  reviewCount,
111
129
  ")"
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+
3
+ type Orientation = "vertical" | "horizontal";
4
+ type FadeColor = "background" | "card" | "muted";
5
+ type Size = "sm" | "md" | "lg";
6
+ interface ScrollFadeProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ orientation?: Orientation;
8
+ fadeColor?: FadeColor;
9
+ size?: Size;
10
+ /** Class names applied to the inner scrollable element (where overflow lives). */
11
+ scrollClassName?: string;
12
+ }
13
+ declare const ScrollFade: React.ForwardRefExoticComponent<ScrollFadeProps & React.RefAttributes<HTMLDivElement>>;
14
+
15
+ export { ScrollFade, type ScrollFadeProps };