@bearmenu/ui 0.8.8 → 0.8.9

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 (113) hide show
  1. package/dist/chunk-62ES6N32.js +27 -0
  2. package/dist/chunk-AXV5O2IZ.js +58 -0
  3. package/dist/chunk-Q6QH52LJ.js +38 -0
  4. package/dist/chunk-TH6W2PWG.js +213 -0
  5. package/dist/chunk-THOVPZNN.js +37 -0
  6. package/dist/chunk-YS6BHKZO.js +92 -0
  7. package/dist/components/alert.d.ts +2 -2
  8. package/dist/components/badge.d.ts +1 -1
  9. package/dist/components/button.d.ts +1 -1
  10. package/dist/components/command.d.ts +7 -7
  11. package/dist/components/concept-compare.d.ts +73 -0
  12. package/dist/components/concept-compare.js +162 -0
  13. package/dist/components/event-card.js +1 -1
  14. package/dist/components/event-compact-row.d.ts +1 -1
  15. package/dist/components/event-compact-row.js +1 -1
  16. package/dist/components/event-detail-panel.d.ts +171 -25
  17. package/dist/components/event-detail-panel.js +471 -174
  18. package/dist/components/event-list-row-wide.js +1 -1
  19. package/dist/components/event-list-row.js +1 -1
  20. package/dist/components/hub-surface.d.ts +27 -0
  21. package/dist/components/hub-surface.js +20 -0
  22. package/dist/components/menu-family-card.d.ts +59 -0
  23. package/dist/components/menu-family-card.js +121 -0
  24. package/dist/components/menu-field.d.ts +57 -0
  25. package/dist/components/menu-field.js +3 -0
  26. package/dist/components/menu-hub-hero.d.ts +65 -0
  27. package/dist/components/menu-hub-hero.js +103 -0
  28. package/dist/components/menu-intent-tiles.d.ts +31 -0
  29. package/dist/components/menu-intent-tiles.js +50 -0
  30. package/dist/components/menu-item.d.ts +127 -0
  31. package/dist/components/menu-item.js +5 -0
  32. package/dist/components/menu-mocks.d.ts +55 -0
  33. package/dist/components/menu-mocks.js +379 -0
  34. package/dist/components/menu-types.d.ts +245 -0
  35. package/dist/components/menu-types.js +1 -0
  36. package/dist/components/motion-icon-set.js +15 -3
  37. package/dist/components/open-now-list.d.ts +40 -0
  38. package/dist/components/open-now-list.js +69 -0
  39. package/dist/components/place-types.d.ts +112 -1
  40. package/dist/components/ranked-venue-list.d.ts +49 -0
  41. package/dist/components/ranked-venue-list.js +87 -0
  42. package/dist/components/signature-chip.d.ts +37 -0
  43. package/dist/components/signature-chip.js +4 -0
  44. package/dist/components/signature-line-list.d.ts +45 -0
  45. package/dist/components/signature-line-list.js +99 -0
  46. package/dist/components/snap-rail.d.ts +24 -4
  47. package/dist/components/snap-rail.js +66 -8
  48. package/dist/components/spinner.d.ts +2 -2
  49. package/dist/components/stat-banner.d.ts +47 -0
  50. package/dist/components/stat-banner.js +61 -0
  51. package/dist/components/tag.d.ts +2 -2
  52. package/dist/components/text.d.ts +3 -3
  53. package/dist/components/venue-busyness-strip.d.ts +35 -0
  54. package/dist/components/venue-busyness-strip.js +37 -0
  55. package/dist/components/venue-grade-dimensions.d.ts +36 -0
  56. package/dist/components/venue-grade-dimensions.js +3 -0
  57. package/dist/components/venue-quotes.d.ts +32 -0
  58. package/dist/components/venue-quotes.js +3 -0
  59. package/dist/components/venue-signature-block.d.ts +39 -0
  60. package/dist/components/venue-signature-block.js +6 -0
  61. package/dist/components/venue-spotlight.d.ts +74 -0
  62. package/dist/components/venue-spotlight.js +138 -0
  63. package/dist/components/venue-wall.d.ts +41 -0
  64. package/dist/components/venue-wall.js +118 -0
  65. package/dist/components/weekday-theme-banner.d.ts +70 -0
  66. package/dist/components/weekday-theme-banner.js +127 -0
  67. package/package.json +1 -1
  68. package/src/components/colour-dictionary.stories.tsx +227 -0
  69. package/src/components/concept-compare.stories.tsx +104 -0
  70. package/src/components/concept-compare.tsx +276 -0
  71. package/src/components/event-compact-row.tsx +1 -1
  72. package/src/components/event-detail-panel.stories.tsx +205 -97
  73. package/src/components/event-detail-panel.test.tsx +181 -0
  74. package/src/components/event-detail-panel.tsx +703 -185
  75. package/src/components/hub-surface.stories.tsx +68 -0
  76. package/src/components/hub-surface.tsx +40 -0
  77. package/src/components/menu-family-card.stories.tsx +112 -0
  78. package/src/components/menu-family-card.tsx +211 -0
  79. package/src/components/menu-field.stories.tsx +74 -0
  80. package/src/components/menu-field.tsx +199 -0
  81. package/src/components/menu-hub-hero.stories.tsx +92 -0
  82. package/src/components/menu-hub-hero.tsx +187 -0
  83. package/src/components/menu-intent-tiles.stories.tsx +54 -0
  84. package/src/components/menu-intent-tiles.tsx +76 -0
  85. package/src/components/menu-item.tsx +416 -0
  86. package/src/components/menu-mocks.ts +417 -0
  87. package/src/components/menu-types.ts +259 -0
  88. package/src/components/motion-icon-set.tsx +30 -3
  89. package/src/components/open-now-list.stories.tsx +76 -0
  90. package/src/components/open-now-list.tsx +127 -0
  91. package/src/components/place-types.ts +112 -0
  92. package/src/components/ranked-venue-list.stories.tsx +80 -0
  93. package/src/components/ranked-venue-list.tsx +177 -0
  94. package/src/components/signature-chip.tsx +77 -0
  95. package/src/components/signature-line-list.stories.tsx +85 -0
  96. package/src/components/signature-line-list.tsx +136 -0
  97. package/src/components/snap-rail.tsx +90 -9
  98. package/src/components/stat-banner.stories.tsx +100 -0
  99. package/src/components/stat-banner.tsx +117 -0
  100. package/src/components/venue-busyness-strip.stories.tsx +66 -0
  101. package/src/components/venue-busyness-strip.tsx +64 -0
  102. package/src/components/venue-grade-dimensions.stories.tsx +83 -0
  103. package/src/components/venue-grade-dimensions.tsx +91 -0
  104. package/src/components/venue-quotes.stories.tsx +59 -0
  105. package/src/components/venue-quotes.tsx +64 -0
  106. package/src/components/venue-signature-block.stories.tsx +68 -0
  107. package/src/components/venue-signature-block.tsx +71 -0
  108. package/src/components/venue-spotlight.stories.tsx +141 -0
  109. package/src/components/venue-spotlight.tsx +236 -0
  110. package/src/components/venue-wall.stories.tsx +78 -0
  111. package/src/components/venue-wall.tsx +185 -0
  112. package/src/components/weekday-theme-banner.stories.tsx +113 -0
  113. package/src/components/weekday-theme-banner.tsx +231 -0
@@ -2,250 +2,547 @@ import { Separator } from '../chunk-WSRWFA6K.js';
2
2
  import { resolveEventEntryFee } from '../chunk-DNSXMHYX.js';
3
3
  import { EventPosterFallback } from '../chunk-FDITZ2VM.js';
4
4
  import { Skeleton } from '../chunk-QXHMPJ35.js';
5
+ import { Button } from '../chunk-H3BV4VAG.js';
6
+ import '../chunk-R47NEOSI.js';
5
7
  import { cn } from '../chunk-FEK5XGZW.js';
6
- import { __objRest, __spreadValues } from '../chunk-3GWWZKX7.js';
7
- import { Star, ChevronRight, Calendar, Radio } from 'lucide-react';
8
- import { jsxs, jsx } from 'react/jsx-runtime';
8
+ import { __spreadProps, __spreadValues, __objRest } from '../chunk-3GWWZKX7.js';
9
+ import * as React from 'react';
10
+ import { Calendar, User, CalendarX, Unplug, RefreshCw, Timer, Gift, Ticket, MapPin, Star, ChevronRight } from 'lucide-react';
11
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
9
12
 
10
13
  function DefaultLink(_a) {
11
14
  var _b = _a, { href } = _b, props = __objRest(_b, ["href"]);
12
15
  return /* @__PURE__ */ jsx("a", __spreadValues({ href }, props));
13
16
  }
14
- var CHIP = "inline-flex items-center gap-1 rounded-full border border-border px-2.5 text-xs";
17
+ var DESCRIPTION_CLAMP_CHARS = 220;
18
+ var CHIP = "inline-flex h-6 items-center gap-1 whitespace-nowrap rounded-full border border-border bg-card px-2.5 text-[11.5px] font-semibold text-muted-foreground";
19
+ var SECTION_HEADING = "text-[13px] font-extrabold tracking-[-0.01em] text-foreground";
20
+ function heroHeightStyle(heroHeight) {
21
+ return heroHeight === "aspect" ? void 0 : { height: heroHeight };
22
+ }
15
23
  function EventDetailPanel({
16
24
  event,
17
25
  labels,
18
26
  formatters,
19
27
  dateLine,
28
+ dateTime,
29
+ status = "upcoming",
30
+ soonLabel,
31
+ hype,
20
32
  venue,
21
33
  tags,
22
- isLive,
34
+ performers,
35
+ performersPreview = 5,
36
+ showAllPerformersLabel,
23
37
  headerActions,
24
38
  footer,
25
39
  externalLink,
40
+ heroHeight,
26
41
  size = "default",
27
42
  linkComponent: LinkComponent = DefaultLink,
28
43
  className,
29
44
  fallback = /* @__PURE__ */ jsx(EventPosterFallback, {})
30
45
  }) {
46
+ var _a, _b, _c;
31
47
  const compact = size === "compact";
32
- const fee = resolveEventEntryFee(event);
33
- const venueCard = venue && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-[13px] border border-border p-2.5", children: [
34
- /* @__PURE__ */ jsx(
35
- "div",
36
- {
37
- className: cn(
38
- "shrink-0 overflow-hidden rounded-[10px] bg-muted",
39
- compact ? "h-12 w-12" : "h-[52px] w-[52px]"
40
- ),
41
- children: venue.thumbnailUrl && // eslint-disable-next-line @next/next/no-img-element
42
- /* @__PURE__ */ jsx(
43
- "img",
44
- {
45
- src: venue.thumbnailUrl,
46
- alt: "",
47
- className: "h-full w-full object-cover",
48
- loading: "lazy",
49
- decoding: "async"
50
- }
51
- )
52
- }
53
- ),
54
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
55
- /* @__PURE__ */ jsx("div", { className: cn("font-bold", compact ? "text-[13.5px]" : "text-sm"), children: venue.name }),
56
- venue.meta && /* @__PURE__ */ jsx("div", { className: cn("text-muted-foreground", compact ? "text-[11.5px]" : "text-xs"), children: venue.meta }),
57
- venue.ratingLabel && /* @__PURE__ */ jsxs("div", { className: "mt-0.5 flex items-center gap-1 text-xs font-bold", children: [
58
- /* @__PURE__ */ jsx(Star, { className: "h-3 w-3", "aria-hidden": true }),
59
- venue.ratingLabel
60
- ] })
61
- ] }),
62
- /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4 shrink-0 text-muted-foreground", "aria-hidden": true })
63
- ] });
64
- return /* @__PURE__ */ jsxs("div", { className: cn("flex h-full flex-col overflow-hidden bg-card", className), children: [
65
- /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto", children: [
66
- /* @__PURE__ */ jsxs("div", { className: "relative aspect-[4/5] shrink-0 overflow-hidden bg-muted", children: [
67
- event.poster_url ? (
68
- // eslint-disable-next-line @next/next/no-img-element
69
- /* @__PURE__ */ jsx(
70
- "img",
48
+ const cap = heroHeight != null ? heroHeight : compact ? 318 : 300;
49
+ resolveEventEntryFee(event);
50
+ const isEnded = status === "ended";
51
+ const [descriptionExpanded, setDescriptionExpanded] = React.useState(false);
52
+ const [performersExpanded, setPerformersExpanded] = React.useState(false);
53
+ const description = (_b = (_a = event.description) == null ? void 0 : _a.trim()) != null ? _b : "";
54
+ const clampDescription = description.length > DESCRIPTION_CLAMP_CHARS && !descriptionExpanded;
55
+ const shownPerformers = performers && !performersExpanded ? performers.slice(0, performersPreview) : performers != null ? performers : [];
56
+ const hiddenPerformers = ((_c = performers == null ? void 0 : performers.length) != null ? _c : 0) - shownPerformers.length;
57
+ return /* @__PURE__ */ jsxs(
58
+ "div",
59
+ {
60
+ className: cn("flex h-full flex-col overflow-hidden bg-card", className),
61
+ children: [
62
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto", children: [
63
+ /* @__PURE__ */ jsxs(
64
+ "div",
71
65
  {
72
- src: event.poster_url,
73
- alt: event.title,
74
- className: "h-full w-full object-cover",
75
- loading: "eager",
76
- decoding: "async"
66
+ className: cn(
67
+ "relative shrink-0 overflow-hidden bg-muted",
68
+ cap === "aspect" && "aspect-[4/5]",
69
+ !event.poster_url && "bg-[image:var(--gradient-primary)]",
70
+ isEnded && "saturate-[.35] brightness-[.82]"
71
+ ),
72
+ style: heroHeightStyle(cap),
73
+ children: [
74
+ event.poster_url ? (
75
+ // eslint-disable-next-line @next/next/no-img-element
76
+ /* @__PURE__ */ jsx(
77
+ "img",
78
+ {
79
+ src: event.poster_url,
80
+ alt: event.title,
81
+ className: "h-full w-full object-cover",
82
+ loading: "eager",
83
+ decoding: "async"
84
+ }
85
+ )
86
+ ) : fallback,
87
+ /* @__PURE__ */ jsx(
88
+ "div",
89
+ {
90
+ "aria-hidden": true,
91
+ className: "pointer-events-none absolute inset-x-0 bottom-0 h-[34%] bg-gradient-to-t from-card via-card/50 to-transparent"
92
+ }
93
+ ),
94
+ headerActions && /* @__PURE__ */ jsx("div", { className: "absolute inset-x-3 top-3 z-[2] flex items-center gap-2", children: headerActions })
95
+ ]
77
96
  }
78
- )
79
- ) : fallback,
80
- headerActions
81
- ] }),
82
- /* @__PURE__ */ jsxs(
83
- "div",
84
- {
85
- className: cn(
86
- "flex flex-col gap-3.5",
87
- compact ? "px-4 pt-4" : "px-[22px] pt-5"
88
97
  ),
89
- children: [
98
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[13px] px-[18px] pt-3.5", children: [
90
99
  /* @__PURE__ */ jsx(
91
100
  "h2",
92
101
  {
93
102
  className: cn(
94
- "font-extrabold leading-[1.25] tracking-[-0.02em]",
95
- compact ? "text-xl" : "text-[21px]"
103
+ "line-clamp-2 text-[21px] font-extrabold leading-[1.25] tracking-[-0.025em]",
104
+ isEnded ? "text-muted-foreground" : "text-foreground"
96
105
  ),
97
106
  children: event.title
98
107
  }
99
108
  ),
100
- /* @__PURE__ */ jsxs(
101
- "div",
109
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-1.5 text-[13px] text-muted-foreground", children: [
110
+ /* @__PURE__ */ jsx(Calendar, { className: "h-3.5 w-3.5 shrink-0", "aria-hidden": true }),
111
+ dateTime ? /* @__PURE__ */ jsx("time", { dateTime, children: dateLine }) : dateLine
112
+ ] }),
113
+ /* @__PURE__ */ jsx(
114
+ EventDetailChipRow,
102
115
  {
103
- className: cn(
104
- "flex items-center gap-1.5 text-muted-foreground",
105
- compact ? "text-[12.5px]" : "text-[13px]"
106
- ),
107
- children: [
108
- /* @__PURE__ */ jsx(Calendar, { className: compact ? "h-3.5 w-3.5" : "h-4 w-4", "aria-hidden": true }),
109
- dateLine
110
- ]
116
+ event,
117
+ labels,
118
+ formatters,
119
+ status,
120
+ soonLabel,
121
+ hype,
122
+ tags
111
123
  }
112
124
  ),
113
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
114
- isLive && /* @__PURE__ */ jsxs(
115
- "span",
116
- {
117
- className: cn(
118
- CHIP,
119
- "h-7 border-success/30 bg-success/10 font-semibold text-success"
120
- ),
121
- children: [
122
- /* @__PURE__ */ jsx(Radio, { className: "h-3 w-3", "aria-hidden": true }),
123
- labels.liveNow
124
- ]
125
- }
126
- ),
127
- tags == null ? void 0 : tags.map((tag) => /* @__PURE__ */ jsx("span", { className: cn(CHIP, "h-7"), children: tag }, tag)),
128
- fee.kind === "free" && /* @__PURE__ */ jsx("span", { className: cn(CHIP, "h-7 border-success/40 font-semibold text-success"), children: labels.free }),
129
- fee.kind === "paid" && /* @__PURE__ */ jsx("span", { className: cn(CHIP, "h-7"), children: formatters.price(fee.amountRon) })
130
- ] }),
131
125
  venue && /* @__PURE__ */ jsxs("div", { children: [
132
- /* @__PURE__ */ jsx("div", { className: "pb-2 text-[13px] font-extrabold", children: labels.venueHeading }),
133
- venue.href ? /* @__PURE__ */ jsx(LinkComponent, { href: venue.href, className: "block", children: venueCard }) : venueCard
134
- ] }),
135
- event.description && /* @__PURE__ */ jsxs("div", { children: [
136
- /* @__PURE__ */ jsx("div", { className: "pb-1.5 text-[13px] font-extrabold", children: labels.aboutHeading }),
126
+ /* @__PURE__ */ jsx("div", { className: cn(SECTION_HEADING, "pb-2"), children: labels.venueHeading }),
137
127
  /* @__PURE__ */ jsx(
138
- "p",
128
+ EventDetailVenueCard,
139
129
  {
140
- className: cn(
141
- "leading-[1.6] text-muted-foreground",
142
- compact ? "text-[13px]" : "text-[13.5px]"
143
- ),
144
- children: event.description
130
+ venue,
131
+ labels,
132
+ linkComponent: LinkComponent
145
133
  }
146
134
  )
147
135
  ] }),
136
+ performers && performers.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
137
+ /* @__PURE__ */ jsx("div", { className: cn(SECTION_HEADING, "pb-2"), children: labels.lineupHeading }),
138
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-[7px]", children: [
139
+ shownPerformers.map((name) => /* @__PURE__ */ jsxs(
140
+ "span",
141
+ {
142
+ className: "inline-flex h-[26px] items-center gap-1.5 rounded-full bg-muted px-2.5 text-xs font-semibold text-foreground",
143
+ children: [
144
+ /* @__PURE__ */ jsx(
145
+ User,
146
+ {
147
+ className: "h-3 w-3 text-muted-foreground",
148
+ "aria-hidden": true
149
+ }
150
+ ),
151
+ name
152
+ ]
153
+ },
154
+ name
155
+ )),
156
+ hiddenPerformers > 0 && showAllPerformersLabel && /* @__PURE__ */ jsx(
157
+ "button",
158
+ {
159
+ type: "button",
160
+ onClick: () => setPerformersExpanded(true),
161
+ className: "inline-flex h-[26px] cursor-pointer items-center rounded-full border border-dashed border-border px-2.5 text-xs font-medium text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
162
+ children: showAllPerformersLabel
163
+ }
164
+ )
165
+ ] })
166
+ ] }),
167
+ /* @__PURE__ */ jsxs("div", { children: [
168
+ /* @__PURE__ */ jsx("div", { className: cn(SECTION_HEADING, "pb-1.5"), children: labels.aboutHeading }),
169
+ description ? /* @__PURE__ */ jsxs(Fragment, { children: [
170
+ /* @__PURE__ */ jsx(
171
+ "p",
172
+ {
173
+ className: cn(
174
+ "whitespace-pre-line text-[13.5px] leading-[1.6] text-foreground/85",
175
+ clampDescription && "line-clamp-4"
176
+ ),
177
+ children: description
178
+ }
179
+ ),
180
+ description.length > DESCRIPTION_CLAMP_CHARS && /* @__PURE__ */ jsx(
181
+ "button",
182
+ {
183
+ type: "button",
184
+ onClick: () => setDescriptionExpanded((current) => !current),
185
+ "aria-expanded": descriptionExpanded,
186
+ className: "mt-1.5 cursor-pointer text-[13px] font-bold text-accent hover:underline focus-visible:outline-none focus-visible:underline",
187
+ children: descriptionExpanded ? labels.readLess : labels.readMore
188
+ }
189
+ )
190
+ ] }) : /* @__PURE__ */ jsx("p", { className: "text-[13.5px] italic leading-[1.6] text-muted-foreground", children: labels.noDescription })
191
+ ] }),
148
192
  externalLink,
149
- /* @__PURE__ */ jsx("div", { className: "h-2", "aria-hidden": true })
150
- ]
193
+ /* @__PURE__ */ jsx("div", { className: "h-1.5", "aria-hidden": true })
194
+ ] })
195
+ ] }),
196
+ footer
197
+ ]
198
+ }
199
+ );
200
+ }
201
+ function EventDetailFooter({
202
+ primary,
203
+ ghosts = [],
204
+ className
205
+ }) {
206
+ const visible = ghosts.filter(Boolean);
207
+ return /* @__PURE__ */ jsxs(
208
+ "div",
209
+ {
210
+ className: cn(
211
+ "relative flex shrink-0 flex-col gap-0.5 bg-card/95 px-3 pt-3 pb-[max(0.875rem,env(safe-area-inset-bottom))] backdrop-blur-sm",
212
+ className
213
+ ),
214
+ children: [
215
+ /* @__PURE__ */ jsx(Separator, { className: "absolute inset-x-0 top-0" }),
216
+ visible.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex items-stretch", children: visible.map((ghost, index) => /* @__PURE__ */ jsxs(React.Fragment, { children: [
217
+ index > 0 && /* @__PURE__ */ jsx(Separator, { orientation: "vertical", className: "my-2 h-auto" }),
218
+ ghost
219
+ ] }, index)) }),
220
+ primary
221
+ ]
222
+ }
223
+ );
224
+ }
225
+ var GHOST_CLASS = "flex h-10 min-w-0 flex-1 cursor-pointer items-center justify-center gap-[7px] rounded-[10px] text-[13px] font-semibold text-muted-foreground transition-colors duration-150 hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring motion-reduce:transition-none";
226
+ function EventDetailGhostAction({
227
+ icon,
228
+ children,
229
+ href,
230
+ linkComponent: LinkComponent = DefaultLink,
231
+ onClick,
232
+ target,
233
+ rel,
234
+ className
235
+ }) {
236
+ const body = /* @__PURE__ */ jsxs(Fragment, { children: [
237
+ icon,
238
+ /* @__PURE__ */ jsx("span", { className: "truncate", children })
239
+ ] });
240
+ if (href) {
241
+ if (target) {
242
+ return /* @__PURE__ */ jsx(
243
+ "a",
244
+ {
245
+ href,
246
+ target,
247
+ rel,
248
+ onClick,
249
+ className: cn(GHOST_CLASS, className),
250
+ children: body
151
251
  }
152
- )
153
- ] }),
154
- footer && /* @__PURE__ */ jsxs(
155
- "div",
252
+ );
253
+ }
254
+ return /* @__PURE__ */ jsx(
255
+ LinkComponent,
156
256
  {
157
- className: cn(
158
- "sticky bottom-0 flex shrink-0 gap-2.5 bg-card",
159
- compact ? "px-4 pt-3 pb-[max(1.375rem,env(safe-area-inset-bottom))]" : "px-[22px] pt-4 pb-[max(1.25rem,env(safe-area-inset-bottom))]"
160
- ),
161
- children: [
162
- /* @__PURE__ */ jsx(Separator, { className: "absolute inset-x-0 top-0" }),
163
- footer
164
- ]
257
+ href,
258
+ onClick,
259
+ className: cn(GHOST_CLASS, className),
260
+ children: body
165
261
  }
166
- )
167
- ] });
262
+ );
263
+ }
264
+ return /* @__PURE__ */ jsx(
265
+ "button",
266
+ {
267
+ type: "button",
268
+ onClick,
269
+ className: cn(GHOST_CLASS, className),
270
+ children: body
271
+ }
272
+ );
273
+ }
274
+ function EventDetailPanelError({
275
+ title,
276
+ description,
277
+ retryLabel,
278
+ onRetry,
279
+ secondaryLabel,
280
+ secondaryHref,
281
+ onSecondary,
282
+ linkComponent: LinkComponent = DefaultLink,
283
+ headerActions,
284
+ className
285
+ }) {
286
+ return /* @__PURE__ */ jsxs(
287
+ "div",
288
+ {
289
+ className: cn("flex h-full flex-col overflow-hidden bg-card", className),
290
+ children: [
291
+ /* @__PURE__ */ jsxs("div", { className: "relative flex aspect-video shrink-0 items-center justify-center bg-[image:var(--gradient-primary)] text-primary-foreground/90", children: [
292
+ /* @__PURE__ */ jsx(CalendarX, { className: "h-12 w-12", "aria-hidden": true }),
293
+ headerActions && /* @__PURE__ */ jsx("div", { className: "absolute inset-x-3 top-3 z-[2] flex items-center gap-2", children: headerActions })
294
+ ] }),
295
+ /* @__PURE__ */ jsxs(
296
+ "div",
297
+ {
298
+ role: "alert",
299
+ className: "flex flex-1 flex-col items-center justify-center gap-3 px-6 py-8 text-center",
300
+ children: [
301
+ /* @__PURE__ */ jsx("span", { className: "flex h-[62px] w-[62px] items-center justify-center rounded-full bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx(Unplug, { className: "h-[26px] w-[26px]", "aria-hidden": true }) }),
302
+ /* @__PURE__ */ jsx("h2", { className: "text-[17px] font-extrabold tracking-[-0.02em]", children: title }),
303
+ /* @__PURE__ */ jsx("p", { className: "text-[13.5px] leading-[1.6] text-muted-foreground", children: description }),
304
+ /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col gap-[9px] pt-1", children: [
305
+ /* @__PURE__ */ jsxs(Button, { onClick: onRetry, fullWidth: true, children: [
306
+ /* @__PURE__ */ jsx(RefreshCw, { "aria-hidden": true }),
307
+ retryLabel
308
+ ] }),
309
+ secondaryLabel && (secondaryHref ? /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", fullWidth: true, children: /* @__PURE__ */ jsx(LinkComponent, { href: secondaryHref, children: secondaryLabel }) }) : /* @__PURE__ */ jsx(Button, { variant: "outline", fullWidth: true, onClick: onSecondary, children: secondaryLabel }))
310
+ ] })
311
+ ]
312
+ }
313
+ )
314
+ ]
315
+ }
316
+ );
168
317
  }
169
318
  function EventDetailPanelSkeleton({
170
319
  size = "default",
320
+ heroHeight,
171
321
  headerActions,
322
+ label,
172
323
  className
173
324
  }) {
174
- const compact = size === "compact";
325
+ const cap = heroHeight != null ? heroHeight : size === "compact" ? 318 : 300;
175
326
  return /* @__PURE__ */ jsxs(
176
327
  "div",
177
- {
178
- "aria-hidden": "true",
328
+ __spreadProps(__spreadValues({}, label ? { role: "status", "aria-busy": true, "aria-label": label } : { "aria-hidden": true }), {
179
329
  className: cn("flex h-full flex-col overflow-hidden bg-card", className),
180
330
  children: [
181
331
  /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto", children: [
182
- /* @__PURE__ */ jsx("div", { className: "relative aspect-[4/5] shrink-0 overflow-hidden bg-muted", children: headerActions }),
183
- /* @__PURE__ */ jsxs(
332
+ /* @__PURE__ */ jsx(
184
333
  "div",
185
334
  {
186
335
  className: cn(
187
- "flex flex-col gap-3.5",
188
- compact ? "px-4 pt-4" : "px-[22px] pt-5"
336
+ "relative shrink-0 bg-muted",
337
+ cap === "aspect" && "aspect-[4/5]"
189
338
  ),
190
- children: [
191
- /* @__PURE__ */ jsx(Skeleton, { className: cn("w-3/4", compact ? "h-5" : "h-[21px]") }),
192
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
193
- /* @__PURE__ */ jsx(Skeleton, { className: cn("shrink-0 rounded-full", compact ? "h-3.5 w-3.5" : "h-4 w-4") }),
194
- /* @__PURE__ */ jsx(Skeleton, { className: cn("w-48", compact ? "h-[12.5px]" : "h-[13px]") })
195
- ] }),
196
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap gap-1.5", children: [
197
- /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-20 rounded-full" }),
198
- /* @__PURE__ */ jsx(Skeleton, { className: "h-7 w-16 rounded-full" })
199
- ] }),
200
- /* @__PURE__ */ jsxs("div", { children: [
201
- /* @__PURE__ */ jsx(Skeleton, { className: "mb-2 h-[13px] w-28" }),
202
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-[13px] border border-border p-2.5", children: [
203
- /* @__PURE__ */ jsx(
204
- Skeleton,
205
- {
206
- className: cn(
207
- "shrink-0 rounded-[10px]",
208
- compact ? "h-12 w-12" : "h-[52px] w-[52px]"
209
- )
210
- }
211
- ),
212
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
213
- /* @__PURE__ */ jsx(Skeleton, { className: cn("w-1/2", compact ? "h-[13.5px]" : "h-3.5") }),
214
- /* @__PURE__ */ jsx(Skeleton, { className: cn("mt-1 w-3/4", compact ? "h-[11.5px]" : "h-3") })
215
- ] }),
216
- /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4 shrink-0 rounded-full" })
217
- ] })
218
- ] }),
219
- /* @__PURE__ */ jsxs("div", { children: [
220
- /* @__PURE__ */ jsx(Skeleton, { className: "mb-1.5 h-[13px] w-32" }),
221
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
222
- /* @__PURE__ */ jsx(Skeleton, { className: cn("w-full", compact ? "h-[13px]" : "h-[13.5px]") }),
223
- /* @__PURE__ */ jsx(Skeleton, { className: cn("w-full", compact ? "h-[13px]" : "h-[13.5px]") }),
224
- /* @__PURE__ */ jsx(Skeleton, { className: cn("w-2/3", compact ? "h-[13px]" : "h-[13.5px]") })
225
- ] })
226
- ] }),
227
- /* @__PURE__ */ jsx("div", { className: "h-2", "aria-hidden": true })
228
- ]
339
+ style: heroHeightStyle(cap),
340
+ children: headerActions && /* @__PURE__ */ jsx("div", { className: "absolute inset-x-3 top-3 z-[2] flex items-center gap-2", children: headerActions })
341
+ }
342
+ ),
343
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-[13px] px-[18px] pt-3.5", children: [
344
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
345
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[22px] w-[86%]" }),
346
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[22px] w-[58%]" })
347
+ ] }),
348
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-3.5 w-[54%]" }),
349
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-[7px]", children: [
350
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-[74px] rounded-full" }),
351
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-[88px] rounded-full" }),
352
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-[66px] rounded-full" })
353
+ ] }),
354
+ /* @__PURE__ */ jsxs("div", { children: [
355
+ /* @__PURE__ */ jsx(Skeleton, { className: "mb-2 h-3.5 w-24" }),
356
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[74px] w-full rounded-[13px]" })
357
+ ] }),
358
+ /* @__PURE__ */ jsxs("div", { children: [
359
+ /* @__PURE__ */ jsx(Skeleton, { className: "mb-2 h-3.5 w-[70px]" }),
360
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-[7px]", children: [
361
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[26px] w-[92px] rounded-full" }),
362
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[26px] w-[104px] rounded-full" })
363
+ ] })
364
+ ] }),
365
+ /* @__PURE__ */ jsxs("div", { children: [
366
+ /* @__PURE__ */ jsx(Skeleton, { className: "mb-1.5 h-3.5 w-[120px]" }),
367
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
368
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[13px] w-full" }),
369
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[13px] w-full" }),
370
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-[13px] w-[72%]" })
371
+ ] })
372
+ ] }),
373
+ /* @__PURE__ */ jsx("div", { className: "h-1.5", "aria-hidden": true })
374
+ ] })
375
+ ] }),
376
+ /* @__PURE__ */ jsxs("div", { className: "relative flex shrink-0 flex-col gap-0.5 bg-card/95 px-3 pt-3 pb-[max(0.875rem,env(safe-area-inset-bottom))]", children: [
377
+ /* @__PURE__ */ jsx(Separator, { className: "absolute inset-x-0 top-0" }),
378
+ /* @__PURE__ */ jsxs("div", { className: "flex items-stretch gap-2 py-0.5", children: [
379
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 flex-1 rounded-[10px]" }),
380
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-9 flex-1 rounded-[10px]" })
381
+ ] }),
382
+ /* @__PURE__ */ jsx(Skeleton, { className: "h-11 w-full rounded-xl" })
383
+ ] })
384
+ ]
385
+ })
386
+ );
387
+ }
388
+ function EventDetailChipRow({
389
+ event,
390
+ labels,
391
+ formatters,
392
+ status = "upcoming",
393
+ soonLabel,
394
+ hype,
395
+ tags,
396
+ className
397
+ }) {
398
+ const fee = resolveEventEntryFee(event);
399
+ return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap gap-[7px]", className), children: [
400
+ status === "live" && /* @__PURE__ */ jsxs(
401
+ "span",
402
+ {
403
+ className: cn(
404
+ CHIP,
405
+ "border-success/30 bg-success/10 font-bold text-success"
406
+ ),
407
+ children: [
408
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "h-1.5 w-1.5 rounded-full bg-success" }),
409
+ labels.liveNow
410
+ ]
411
+ }
412
+ ),
413
+ status === "soon" && soonLabel && /* @__PURE__ */ jsxs(
414
+ "span",
415
+ {
416
+ className: cn(
417
+ CHIP,
418
+ "border-accent/30 bg-accent-subtle font-bold text-accent"
419
+ ),
420
+ children: [
421
+ /* @__PURE__ */ jsx(Timer, { className: "h-3 w-3", "aria-hidden": true }),
422
+ soonLabel
423
+ ]
424
+ }
425
+ ),
426
+ status === "ended" && /* @__PURE__ */ jsx(
427
+ "span",
428
+ {
429
+ className: cn(
430
+ CHIP,
431
+ "border-transparent bg-muted font-bold text-muted-foreground"
432
+ ),
433
+ children: labels.ended
434
+ }
435
+ ),
436
+ fee.kind === "free" && /* @__PURE__ */ jsxs(
437
+ "span",
438
+ {
439
+ className: cn(
440
+ CHIP,
441
+ "border-success/30 bg-success/10 font-bold text-success"
442
+ ),
443
+ children: [
444
+ /* @__PURE__ */ jsx(Gift, { className: "h-3 w-3", "aria-hidden": true }),
445
+ labels.free
446
+ ]
447
+ }
448
+ ),
449
+ fee.kind === "paid" && /* @__PURE__ */ jsxs("span", { className: cn(CHIP, "text-foreground"), children: [
450
+ /* @__PURE__ */ jsx(Ticket, { className: "h-3 w-3", "aria-hidden": true }),
451
+ formatters.price(fee.amountRon)
452
+ ] }),
453
+ hype,
454
+ tags == null ? void 0 : tags.map((tag) => /* @__PURE__ */ jsx("span", { className: CHIP, children: tag }, tag))
455
+ ] });
456
+ }
457
+ function EventDetailVenueCard({
458
+ venue,
459
+ labels,
460
+ linkComponent: LinkComponent = DefaultLink,
461
+ thumbnailSize = 52,
462
+ action,
463
+ className
464
+ }) {
465
+ const meta = venue.href && (venue.address || venue.ratingLabel || venue.openLabel);
466
+ const main = /* @__PURE__ */ jsxs(Fragment, { children: [
467
+ /* @__PURE__ */ jsxs(
468
+ "div",
469
+ {
470
+ className: cn(
471
+ "relative shrink-0 overflow-hidden rounded-[11px] bg-muted",
472
+ thumbnailSize === 64 ? "h-16 w-16" : "h-[52px] w-[52px]",
473
+ !venue.thumbnailUrl && "flex items-center justify-center text-muted-foreground"
474
+ ),
475
+ children: [
476
+ venue.thumbnailUrl ? (
477
+ // eslint-disable-next-line @next/next/no-img-element
478
+ /* @__PURE__ */ jsx(
479
+ "img",
480
+ {
481
+ src: venue.thumbnailUrl,
482
+ alt: "",
483
+ className: "h-full w-full object-cover",
484
+ loading: "lazy",
485
+ decoding: "async"
486
+ }
487
+ )
488
+ ) : /* @__PURE__ */ jsx(MapPin, { className: "h-5 w-5", "aria-hidden": true }),
489
+ venue.isOpenNow && /* @__PURE__ */ jsx(
490
+ "span",
491
+ {
492
+ "aria-hidden": true,
493
+ className: "absolute right-1 top-1 h-[7px] w-[7px] rounded-full bg-success ring-2 ring-card"
229
494
  }
230
495
  )
496
+ ]
497
+ }
498
+ ),
499
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
500
+ /* @__PURE__ */ jsx("div", { className: "truncate text-sm font-bold", children: venue.name }),
501
+ venue.href ? meta && /* @__PURE__ */ jsxs("div", { className: "mt-0.5 flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground", children: [
502
+ venue.address && /* @__PURE__ */ jsx("span", { className: "truncate", children: venue.address }),
503
+ venue.address && venue.ratingLabel && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-border", children: "\xB7" }),
504
+ venue.ratingLabel && /* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
505
+ /* @__PURE__ */ jsx(Star, { className: "h-[11px] w-[11px]", "aria-hidden": true }),
506
+ venue.ratingLabel
231
507
  ] }),
232
- /* @__PURE__ */ jsxs(
233
- "div",
508
+ venue.openLabel && /* @__PURE__ */ jsxs(Fragment, { children: [
509
+ /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-border", children: "\xB7" }),
510
+ /* @__PURE__ */ jsx("span", { className: "shrink-0", children: venue.openLabel })
511
+ ] })
512
+ ] }) : /* @__PURE__ */ jsx("div", { className: "mt-0.5 text-xs text-muted-foreground", children: labels.venueNoPage })
513
+ ] }),
514
+ venue.href && /* @__PURE__ */ jsx(
515
+ ChevronRight,
516
+ {
517
+ className: "h-[17px] w-[17px] shrink-0 text-muted-foreground",
518
+ "aria-hidden": true
519
+ }
520
+ )
521
+ ] });
522
+ const MAIN_CLASS = "flex min-w-0 flex-1 items-center gap-3";
523
+ return /* @__PURE__ */ jsxs(
524
+ "div",
525
+ {
526
+ className: cn(
527
+ "flex items-center gap-3 rounded-[13px] border border-border bg-card p-2.5",
528
+ className
529
+ ),
530
+ children: [
531
+ venue.href ? /* @__PURE__ */ jsx(
532
+ LinkComponent,
234
533
  {
534
+ href: venue.href,
235
535
  className: cn(
236
- "sticky bottom-0 flex shrink-0 gap-2.5 bg-card",
237
- compact ? "px-4 pt-3 pb-[max(1.375rem,env(safe-area-inset-bottom))]" : "px-[22px] pt-4 pb-[max(1.25rem,env(safe-area-inset-bottom))]"
536
+ MAIN_CLASS,
537
+ "-m-1 rounded-[11px] p-1 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
238
538
  ),
239
- children: [
240
- /* @__PURE__ */ jsx(Separator, { className: "absolute inset-x-0 top-0" }),
241
- /* @__PURE__ */ jsx(Skeleton, { className: "h-[46px] flex-1 rounded-xl" }),
242
- /* @__PURE__ */ jsx(Skeleton, { className: "h-[46px] w-24 rounded-xl" })
243
- ]
539
+ children: main
244
540
  }
245
- )
541
+ ) : /* @__PURE__ */ jsx("div", { className: MAIN_CLASS, children: main }),
542
+ action
246
543
  ]
247
544
  }
248
545
  );
249
546
  }
250
547
 
251
- export { EventDetailPanel, EventDetailPanelSkeleton };
548
+ export { EventDetailChipRow, EventDetailFooter, EventDetailGhostAction, EventDetailPanel, EventDetailPanelError, EventDetailPanelSkeleton, EventDetailVenueCard };