@bearmenu/ui 0.6.0 → 0.7.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 (80) hide show
  1. package/dist/chunk-A5ONAJCE.js +102 -0
  2. package/dist/chunk-AV777R4G.js +43 -0
  3. package/dist/{chunk-WKMLZDUT.js → chunk-FRPPIXMY.js} +1 -1
  4. package/dist/{chunk-PSR7N36A.js → chunk-HCM6LKM5.js} +1 -1
  5. package/dist/{chunk-YJ6OBKZJ.js → chunk-TL4YU2O5.js} +10 -3
  6. package/dist/chunk-UX6SWAKH.js +320 -0
  7. package/dist/{chunk-7PPCH42H.js → chunk-VQNDZVI7.js} +1 -1
  8. package/dist/chunk-WSRWFA6K.js +26 -0
  9. package/dist/chunk-YLNYXPIH.js +61 -0
  10. package/dist/components/accordion.js +1 -1
  11. package/dist/components/alert.d.ts +2 -2
  12. package/dist/components/badge.d.ts +3 -2
  13. package/dist/components/badge.js +1 -1
  14. package/dist/components/button.d.ts +1 -1
  15. package/dist/components/card.d.ts +2 -2
  16. package/dist/components/card.js +127 -4
  17. package/dist/components/combobox.js +2 -2
  18. package/dist/components/command.d.ts +15 -15
  19. package/dist/components/command.js +2 -2
  20. package/dist/components/currency-input.js +1 -1
  21. package/dist/components/date-input.d.ts +1 -1
  22. package/dist/components/date-input.js +1 -1
  23. package/dist/components/dialog.js +1 -1
  24. package/dist/components/filter-category-row.d.ts +13 -0
  25. package/dist/components/filter-category-row.js +44 -0
  26. package/dist/components/input-group.d.ts +2 -0
  27. package/dist/components/input-group.js +10 -5
  28. package/dist/components/input.d.ts +1 -0
  29. package/dist/components/input.js +1 -1
  30. package/dist/components/item.d.ts +2 -2
  31. package/dist/components/multi-select-combobox.js +3 -3
  32. package/dist/components/phone-frame.js +1 -1
  33. package/dist/components/place-about-tab.d.ts +2 -2
  34. package/dist/components/place-about-tab.js +4 -3
  35. package/dist/components/place-details-mobile.js +5 -3
  36. package/dist/components/place-schedule-week.d.ts +19 -0
  37. package/dist/components/place-schedule-week.js +4 -0
  38. package/dist/components/place-types.d.ts +18 -9
  39. package/dist/components/scroll-fade.d.ts +15 -0
  40. package/dist/components/scroll-fade.js +121 -0
  41. package/dist/components/searchable-select.js +2 -2
  42. package/dist/components/separator.js +3 -26
  43. package/dist/components/sheet.js +1 -1
  44. package/dist/components/sliding-panels.d.ts +1 -0
  45. package/dist/components/sliding-panels.js +22 -6
  46. package/dist/components/sort-option-list.d.ts +16 -0
  47. package/dist/components/sort-option-list.js +46 -0
  48. package/dist/components/spinner.d.ts +2 -2
  49. package/dist/components/tabs.js +98 -17
  50. package/dist/components/tag.d.ts +2 -2
  51. package/dist/components/tag.js +3 -61
  52. package/dist/components/text.d.ts +3 -3
  53. package/dist/components/toast.js +1 -1
  54. package/dist/components/toaster.js +1 -1
  55. package/package.json +23 -112
  56. package/src/components/accordion.tsx +1 -1
  57. package/src/components/badge.tsx +9 -2
  58. package/src/components/card.tsx +22 -18
  59. package/src/components/dialog.tsx +1 -1
  60. package/src/components/filter-category-row.tsx +52 -0
  61. package/src/components/input-group.tsx +9 -4
  62. package/src/components/input.tsx +8 -3
  63. package/src/components/phone-frame.tsx +1 -1
  64. package/src/components/place-about-tab.stories.tsx +24 -13
  65. package/src/components/place-about-tab.test.tsx +92 -38
  66. package/src/components/place-about-tab.tsx +310 -344
  67. package/src/components/place-schedule-week.tsx +128 -0
  68. package/src/components/place-types.ts +27 -8
  69. package/src/components/scroll-fade.stories.tsx +98 -0
  70. package/src/components/scroll-fade.tsx +132 -0
  71. package/src/components/sheet.tsx +1 -1
  72. package/src/components/sliding-panels.tsx +33 -6
  73. package/src/components/sort-option-list.tsx +57 -0
  74. package/src/components/tabs.tsx +76 -11
  75. package/src/components/toast.tsx +1 -1
  76. package/src/globals.css +77 -19
  77. package/src/lib/motion.ts +137 -0
  78. package/dist/chunk-BAZFVSSG.js +0 -279
  79. package/dist/chunk-RIDXFY6M.js +0 -38
  80. package/dist/chunk-XK2ZDQVE.js +0 -122
@@ -1,279 +0,0 @@
1
- import { Card, CardHeader, CardTitle, CardContent } from './chunk-XK2ZDQVE.js';
2
- import { Text } from './chunk-Y5D5LP4A.js';
3
- import { Badge } from './chunk-YJ6OBKZJ.js';
4
- import { cn } from './chunk-FEK5XGZW.js';
5
- import { __spreadProps, __spreadValues } from './chunk-3GWWZKX7.js';
6
- import { Info, MapPin, Phone, Globe, Clock, UtensilsCrossed, CreditCard, Shield, Car, Building2 } from 'lucide-react';
7
- import { jsxs, jsx } from 'react/jsx-runtime';
8
-
9
- function Instagram(props) {
10
- return /* @__PURE__ */ jsxs(
11
- "svg",
12
- __spreadProps(__spreadValues({
13
- viewBox: "0 0 24 24",
14
- fill: "none",
15
- stroke: "currentColor",
16
- strokeWidth: "2",
17
- strokeLinecap: "round",
18
- strokeLinejoin: "round"
19
- }, props), {
20
- children: [
21
- /* @__PURE__ */ jsx("rect", { width: "20", height: "20", x: "2", y: "2", rx: "5", ry: "5" }),
22
- /* @__PURE__ */ jsx("path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z" }),
23
- /* @__PURE__ */ jsx("line", { x1: "17.5", x2: "17.51", y1: "6.5", y2: "6.5" })
24
- ]
25
- })
26
- );
27
- }
28
- function Facebook(props) {
29
- return /* @__PURE__ */ jsx(
30
- "svg",
31
- __spreadProps(__spreadValues({
32
- viewBox: "0 0 24 24",
33
- fill: "none",
34
- stroke: "currentColor",
35
- strokeWidth: "2",
36
- strokeLinecap: "round",
37
- strokeLinejoin: "round"
38
- }, props), {
39
- children: /* @__PURE__ */ jsx("path", { d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z" })
40
- })
41
- );
42
- }
43
- function formatHour(h) {
44
- return `${h.toString().padStart(2, "0")}:00`;
45
- }
46
- function humanizeEnum(value) {
47
- return value.replace(/_/g, " ");
48
- }
49
- function PlaceAboutTab({
50
- place,
51
- labels,
52
- mapSlot,
53
- busynessSlot,
54
- onLinkClick,
55
- className
56
- }) {
57
- var _a, _b, _c;
58
- const todayHours = place.hours && place.hours.length > 0 ? place.hours.map((slot) => `${formatHour(slot.opens_at)} - ${formatHour(slot.closes_at)}`) : null;
59
- const formattedAddress = (_a = place.location) == null ? void 0 : _a.address;
60
- const handleLinkClick = (kind, url) => {
61
- if (onLinkClick && url) onLinkClick(kind, url);
62
- };
63
- const getAmenityLabel = (key) => labels.amenityLabels[key] || humanizeEnum(key);
64
- const getPaymentLabel = (key) => labels.paymentLabels[key] || humanizeEnum(key);
65
- const getAccessibilityLabel = (key) => labels.accessibilityLabels[key] || humanizeEnum(key);
66
- const getParkingLabel = (key) => labels.parkingLabels[key] || humanizeEnum(key);
67
- const getTypeLabel = (key) => labels.typeLabels[key] || humanizeEnum(key);
68
- const getStatusLabel = (key) => labels.statusLabels[key] || humanizeEnum(key);
69
- return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4 pt-4 px-4", className), children: [
70
- mapSlot,
71
- (place.description || place.generative_summary || place.review_summary) && /* @__PURE__ */ jsxs(Card, { children: [
72
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
73
- /* @__PURE__ */ jsx(Info, { className: "w-5 h-5", "aria-hidden": "true" }),
74
- labels.description
75
- ] }) }),
76
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
77
- place.generative_summary && /* @__PURE__ */ jsxs("div", { children: [
78
- /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-sm", color: "muted", className: "mb-2", children: labels.overview }),
79
- /* @__PURE__ */ jsx(Text, { as: "p", color: "default", children: place.generative_summary })
80
- ] }),
81
- place.description && /* @__PURE__ */ jsxs("div", { children: [
82
- /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-sm", color: "muted", className: "mb-2", children: labels.description }),
83
- /* @__PURE__ */ jsx(Text, { as: "p", color: "default", children: place.description })
84
- ] }),
85
- place.review_summary && /* @__PURE__ */ jsxs("div", { children: [
86
- /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-sm", color: "muted", className: "mb-2", children: labels.whatPeopleSay }),
87
- /* @__PURE__ */ jsx(Text, { as: "p", color: "default", children: place.review_summary })
88
- ] })
89
- ] })
90
- ] }),
91
- /* @__PURE__ */ jsxs(Card, { children: [
92
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
93
- /* @__PURE__ */ jsx(MapPin, { className: "w-5 h-5", "aria-hidden": "true" }),
94
- labels.contactAndLocation
95
- ] }) }),
96
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
97
- formattedAddress && /* @__PURE__ */ jsxs("div", { children: [
98
- /* @__PURE__ */ jsx(Text, { as: "p", variant: "body-sm", color: "muted", className: "mb-1", children: labels.address }),
99
- /* @__PURE__ */ jsx(Text, { as: "p", color: "default", children: formattedAddress })
100
- ] }),
101
- place.phone && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
102
- /* @__PURE__ */ jsx(Phone, { className: "w-4 h-4 text-muted-foreground", "aria-hidden": "true" }),
103
- /* @__PURE__ */ jsx(
104
- "a",
105
- {
106
- href: `tel:${place.phone}`,
107
- onClick: () => handleLinkClick("phone", place.phone),
108
- className: "text-foreground hover:text-primary transition-colors",
109
- children: place.phone
110
- }
111
- )
112
- ] }),
113
- place.website_url && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
114
- /* @__PURE__ */ jsx(Globe, { className: "w-4 h-4 text-muted-foreground", "aria-hidden": "true" }),
115
- /* @__PURE__ */ jsx(
116
- "a",
117
- {
118
- href: place.website_url,
119
- target: "_blank",
120
- rel: "noopener noreferrer",
121
- onClick: () => handleLinkClick("website", place.website_url),
122
- className: "text-foreground hover:text-primary transition-colors break-all",
123
- children: place.website_url
124
- }
125
- )
126
- ] }),
127
- ((_b = place.socials) == null ? void 0 : _b.instagram_url) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
128
- /* @__PURE__ */ jsx(Instagram, { className: "w-4 h-4 text-muted-foreground", "aria-hidden": "true" }),
129
- /* @__PURE__ */ jsx(
130
- "a",
131
- {
132
- href: place.socials.instagram_url,
133
- target: "_blank",
134
- rel: "noopener noreferrer",
135
- onClick: () => {
136
- var _a2;
137
- return handleLinkClick("instagram", (_a2 = place.socials) == null ? void 0 : _a2.instagram_url);
138
- },
139
- className: "text-foreground hover:text-primary transition-colors",
140
- children: labels.instagram
141
- }
142
- )
143
- ] }),
144
- ((_c = place.socials) == null ? void 0 : _c.facebook_url) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
145
- /* @__PURE__ */ jsx(Facebook, { className: "w-4 h-4 text-muted-foreground", "aria-hidden": "true" }),
146
- /* @__PURE__ */ jsx(
147
- "a",
148
- {
149
- href: place.socials.facebook_url,
150
- target: "_blank",
151
- rel: "noopener noreferrer",
152
- onClick: () => {
153
- var _a2;
154
- return handleLinkClick("facebook", (_a2 = place.socials) == null ? void 0 : _a2.facebook_url);
155
- },
156
- className: "text-foreground hover:text-primary transition-colors",
157
- children: labels.facebook
158
- }
159
- )
160
- ] })
161
- ] })
162
- ] }),
163
- todayHours && todayHours.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
164
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
165
- /* @__PURE__ */ jsx(Clock, { className: "w-5 h-5", "aria-hidden": "true" }),
166
- labels.todayHours
167
- ] }) }),
168
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
169
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
170
- /* @__PURE__ */ jsx(
171
- "span",
172
- {
173
- className: cn(
174
- "w-2 h-2 rounded-full",
175
- place.open_now ? "bg-green-500" : "bg-muted-foreground"
176
- )
177
- }
178
- ),
179
- /* @__PURE__ */ jsx(
180
- Text,
181
- {
182
- as: "span",
183
- weight: "medium",
184
- className: place.open_now ? "text-green-600 dark:text-green-400" : "",
185
- children: place.open_now ? labels.statusOpen : labels.statusClosed
186
- }
187
- )
188
- ] }),
189
- todayHours.map((range, index) => /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx(Text, { as: "span", color: "muted", children: range }) }, index))
190
- ] }) })
191
- ] }),
192
- busynessSlot && place.busyness && place.busyness.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
193
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
194
- /* @__PURE__ */ jsx(Clock, { className: "w-5 h-5", "aria-hidden": "true" }),
195
- labels.typicalBusyness
196
- ] }) }),
197
- /* @__PURE__ */ jsx(CardContent, { children: busynessSlot })
198
- ] }),
199
- place.cuisines && place.cuisines.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
200
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
201
- /* @__PURE__ */ jsx(UtensilsCrossed, { className: "w-5 h-5", "aria-hidden": "true" }),
202
- labels.cuisines
203
- ] }) }),
204
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: place.cuisines.map((cuisine, index) => /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: cuisine.charAt(0).toUpperCase() + cuisine.slice(1) }, index)) }) })
205
- ] }),
206
- place.amenities && place.amenities.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
207
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: labels.amenities }) }),
208
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 md:grid-cols-3 gap-2", children: place.amenities.map((amenity, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
209
- /* @__PURE__ */ jsx(Text, { as: "span", color: "muted", children: "\u2022" }),
210
- /* @__PURE__ */ jsx(Text, { as: "span", color: "default", children: getAmenityLabel(amenity) })
211
- ] }, index)) }) })
212
- ] }),
213
- place.payment_options && place.payment_options.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
214
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
215
- /* @__PURE__ */ jsx(CreditCard, { className: "w-5 h-5", "aria-hidden": "true" }),
216
- labels.paymentOptions
217
- ] }) }),
218
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: place.payment_options.map((payment, index) => /* @__PURE__ */ jsx(Badge, { variant: "outline", children: getPaymentLabel(payment) }, index)) }) })
219
- ] }),
220
- place.accessibility_features && place.accessibility_features.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
221
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
222
- /* @__PURE__ */ jsx(Shield, { className: "w-5 h-5", "aria-hidden": "true" }),
223
- labels.accessibility
224
- ] }) }),
225
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: place.accessibility_features.map((feature, index) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm", children: [
226
- /* @__PURE__ */ jsx(Text, { as: "span", color: "muted", children: "\u2022" }),
227
- /* @__PURE__ */ jsx(Text, { as: "span", color: "default", children: getAccessibilityLabel(feature) })
228
- ] }, index)) }) })
229
- ] }),
230
- place.parking_options && place.parking_options.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
231
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
232
- /* @__PURE__ */ jsx(Car, { className: "w-5 h-5", "aria-hidden": "true" }),
233
- labels.parking
234
- ] }) }),
235
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: place.parking_options.map((parking, index) => /* @__PURE__ */ jsx(Badge, { variant: "outline", children: getParkingLabel(parking) }, index)) }) })
236
- ] }),
237
- place.landmarks && place.landmarks.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
238
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
239
- /* @__PURE__ */ jsx(MapPin, { className: "w-5 h-5", "aria-hidden": "true" }),
240
- labels.nearbyLandmarks
241
- ] }) }),
242
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "space-y-2", children: place.landmarks.map((landmark, index) => /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
243
- /* @__PURE__ */ jsx(Text, { as: "span", color: "default", children: landmark.name }),
244
- landmark.distance_meters !== void 0 && landmark.distance_meters !== null && /* @__PURE__ */ jsxs(Text, { as: "span", variant: "body-sm", color: "muted", children: [
245
- (landmark.distance_meters / 1e3).toFixed(1),
246
- " km"
247
- ] })
248
- ] }, index)) }) })
249
- ] }),
250
- place.areas && place.areas.length > 0 && /* @__PURE__ */ jsxs(Card, { children: [
251
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
252
- /* @__PURE__ */ jsx(Building2, { className: "w-5 h-5", "aria-hidden": "true" }),
253
- labels.neighborhood
254
- ] }) }),
255
- /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: place.areas.map((area, index) => /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: area.name }, index)) }) })
256
- ] }),
257
- (place.type || place.business_status) && /* @__PURE__ */ jsxs(Card, { children: [
258
- /* @__PURE__ */ jsx(CardHeader, { children: /* @__PURE__ */ jsx(CardTitle, { children: labels.businessInformation }) }),
259
- /* @__PURE__ */ jsxs(CardContent, { className: "space-y-2", children: [
260
- place.type && /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
261
- /* @__PURE__ */ jsx(Text, { as: "span", variant: "body-sm", color: "muted", children: labels.type }),
262
- /* @__PURE__ */ jsx(Text, { as: "span", color: "default", children: getTypeLabel(place.type) })
263
- ] }),
264
- place.business_status && /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-center", children: [
265
- /* @__PURE__ */ jsx(Text, { as: "span", variant: "body-sm", color: "muted", children: labels.status }),
266
- /* @__PURE__ */ jsx(
267
- Badge,
268
- {
269
- variant: place.business_status === "operational" ? "default" : place.business_status === "closed_temporarily" ? "secondary" : "destructive",
270
- children: getStatusLabel(place.business_status)
271
- }
272
- )
273
- ] })
274
- ] })
275
- ] })
276
- ] });
277
- }
278
-
279
- export { PlaceAboutTab };
@@ -1,38 +0,0 @@
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 inputVariants = cva(
8
- "flex w-full rounded-xl border border-border bg-input/50 text-base transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background focus-visible:bg-input disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:focus-visible:ring-destructive/40",
9
- {
10
- variants: {
11
- size: {
12
- sm: "h-9 px-3 text-base md:text-sm",
13
- default: "h-11 px-4 py-2",
14
- lg: "h-12 px-5 text-base"
15
- }
16
- },
17
- defaultVariants: {
18
- size: "default"
19
- }
20
- }
21
- );
22
- var Input = React.forwardRef(
23
- (_a, ref) => {
24
- var _b = _a, { className, type, size } = _b, props = __objRest(_b, ["className", "type", "size"]);
25
- return /* @__PURE__ */ jsx(
26
- "input",
27
- __spreadValues({
28
- type,
29
- "data-slot": "input",
30
- className: cn(inputVariants({ size }), className),
31
- ref
32
- }, props)
33
- );
34
- }
35
- );
36
- Input.displayName = "Input";
37
-
38
- export { Input, inputVariants };
@@ -1,122 +0,0 @@
1
- import { textVariants } from './chunk-Y5D5LP4A.js';
2
- import { cn } from './chunk-FEK5XGZW.js';
3
- import { __objRest, __spreadValues } from './chunk-3GWWZKX7.js';
4
- import * as React from 'react';
5
- import { cva } from 'class-variance-authority';
6
- import { jsx } from 'react/jsx-runtime';
7
-
8
- var cardVariants = cva("rounded-3xl text-card-foreground transition-colors", {
9
- variants: {
10
- variant: {
11
- surface: "bg-card border border-border",
12
- glass: "glass",
13
- outline: "bg-transparent border border-border",
14
- muted: "bg-muted border border-transparent"
15
- },
16
- size: {
17
- sm: "[&_[data-slot=card-header]]:p-4 [&_[data-slot=card-content]]:p-4 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-4 [&_[data-slot=card-footer]]:pt-0",
18
- default: "[&_[data-slot=card-header]]:p-6 [&_[data-slot=card-content]]:p-6 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-6 [&_[data-slot=card-footer]]:pt-0",
19
- lg: "[&_[data-slot=card-header]]:p-8 [&_[data-slot=card-content]]:p-8 [&_[data-slot=card-content]]:pt-0 [&_[data-slot=card-footer]]:p-8 [&_[data-slot=card-footer]]:pt-0"
20
- },
21
- interactive: {
22
- true: "cursor-pointer hover:border-primary/40 hover:-translate-y-0.5 transition-[transform,border-color] duration-200",
23
- false: ""
24
- }
25
- },
26
- defaultVariants: {
27
- variant: "surface",
28
- size: "default",
29
- interactive: false
30
- }
31
- });
32
- var Card = React.forwardRef((_a, ref) => {
33
- var _b = _a, { className, variant, size, interactive } = _b, props = __objRest(_b, ["className", "variant", "size", "interactive"]);
34
- return /* @__PURE__ */ jsx(
35
- "div",
36
- __spreadValues({
37
- ref,
38
- "data-slot": "card",
39
- className: cn(cardVariants({ variant, size, interactive }), className)
40
- }, props)
41
- );
42
- });
43
- Card.displayName = "Card";
44
- var CardHeader = React.forwardRef(
45
- (_a, ref) => {
46
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
47
- return /* @__PURE__ */ jsx(
48
- "div",
49
- __spreadValues({
50
- ref,
51
- "data-slot": "card-header",
52
- className: cn("flex flex-col space-y-1.5 p-6", className)
53
- }, props)
54
- );
55
- }
56
- );
57
- CardHeader.displayName = "CardHeader";
58
- var CardTitle = React.forwardRef(
59
- (_a, ref) => {
60
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
61
- return /* @__PURE__ */ jsx(
62
- "div",
63
- __spreadValues({
64
- ref,
65
- "data-slot": "card-title",
66
- className: cn(textVariants({ variant: "h4", wrap: "balance" }), className)
67
- }, props)
68
- );
69
- }
70
- );
71
- CardTitle.displayName = "CardTitle";
72
- var CardDescription = React.forwardRef(
73
- (_a, ref) => {
74
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
75
- return /* @__PURE__ */ jsx(
76
- "div",
77
- __spreadValues({
78
- ref,
79
- "data-slot": "card-description",
80
- className: cn("text-sm", textVariants({ color: "muted", wrap: "pretty" }), className)
81
- }, props)
82
- );
83
- }
84
- );
85
- CardDescription.displayName = "CardDescription";
86
- var CardContent = React.forwardRef(
87
- (_a, ref) => {
88
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
89
- return /* @__PURE__ */ jsx("div", __spreadValues({ ref, "data-slot": "card-content", className: cn("p-6 pt-0", className) }, props));
90
- }
91
- );
92
- CardContent.displayName = "CardContent";
93
- var CardAction = React.forwardRef(
94
- (_a, ref) => {
95
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
96
- return /* @__PURE__ */ jsx(
97
- "div",
98
- __spreadValues({
99
- ref,
100
- "data-slot": "card-action",
101
- className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className)
102
- }, props)
103
- );
104
- }
105
- );
106
- CardAction.displayName = "CardAction";
107
- var CardFooter = React.forwardRef(
108
- (_a, ref) => {
109
- var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
110
- return /* @__PURE__ */ jsx(
111
- "div",
112
- __spreadValues({
113
- ref,
114
- "data-slot": "card-footer",
115
- className: cn("flex items-center p-6 pt-0", className)
116
- }, props)
117
- );
118
- }
119
- );
120
- CardFooter.displayName = "CardFooter";
121
-
122
- export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, cardVariants };