@bearmenu/ui 0.8.53 → 0.8.54
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.
- package/dist/{chunk-4WW3HPIW.js → chunk-6Z6MBILC.js} +8 -4
- package/dist/{chunk-2ADCZXZJ.js → chunk-RXXD3UYP.js} +3 -1
- package/dist/components/alert.d.ts +2 -2
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/banner.d.ts +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/card.d.ts +2 -2
- package/dist/components/combobox.js +1 -1
- package/dist/components/command.d.ts +15 -15
- package/dist/components/empty-state.d.ts +2 -2
- package/dist/components/event-detail-panel.d.ts +17 -6
- package/dist/components/event-detail-panel.js +58 -8
- package/dist/components/menu-item.d.ts +24 -3
- package/dist/components/menu-item.js +1 -1
- package/dist/components/multi-select-combobox.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/searchable-select.js +1 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/tag.d.ts +2 -2
- package/dist/components/text.d.ts +2 -2
- package/dist/components/top-ranking-entry.js +1 -1
- package/package.json +221 -24
- package/src/components/event-detail-panel.stories.tsx +16 -0
- package/src/components/event-detail-panel.test.tsx +36 -0
- package/src/components/event-detail-panel.tsx +86 -14
- package/src/components/menu-item.stories.tsx +82 -0
- package/src/components/menu-item.test.tsx +55 -1
- package/src/components/menu-item.tsx +31 -4
- package/src/components/popover.tsx +3 -1
|
@@ -2,7 +2,7 @@ import { SignatureChip } from './chunk-6PQINSAA.js';
|
|
|
2
2
|
import { cn } from './chunk-FEK5XGZW.js';
|
|
3
3
|
import { __objRest, __spreadValues } from './chunk-MMUBH76A.js';
|
|
4
4
|
import { memo } from 'react';
|
|
5
|
-
import { Star, MessageSquareQuote } from 'lucide-react';
|
|
5
|
+
import { Star, ThumbsUp, MessageSquareQuote } from 'lucide-react';
|
|
6
6
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
8
|
function DefaultLink(_a) {
|
|
@@ -13,10 +13,12 @@ function MentionSignal({
|
|
|
13
13
|
label,
|
|
14
14
|
count,
|
|
15
15
|
onMentions,
|
|
16
|
-
formatCount = String
|
|
16
|
+
formatCount = String,
|
|
17
|
+
countKind = "mentions"
|
|
17
18
|
}) {
|
|
19
|
+
const Glyph = countKind === "praise" ? ThumbsUp : MessageSquareQuote;
|
|
18
20
|
const content = /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-0.5", children: [
|
|
19
|
-
/* @__PURE__ */ jsx(
|
|
21
|
+
/* @__PURE__ */ jsx(Glyph, { className: "h-3.5 w-3.5 opacity-60", "aria-hidden": true }),
|
|
20
22
|
/* @__PURE__ */ jsx("span", { className: "tabular-nums", children: formatCount(count) })
|
|
21
23
|
] });
|
|
22
24
|
const shared = cn(
|
|
@@ -75,6 +77,7 @@ var MenuItem = memo(function MenuItem2({
|
|
|
75
77
|
signatureTier = "strong",
|
|
76
78
|
onSignatureEvidence,
|
|
77
79
|
onMentions,
|
|
80
|
+
countKind = "mentions",
|
|
78
81
|
externalRating,
|
|
79
82
|
formatRating = (score) => score.toFixed(1),
|
|
80
83
|
markGradient,
|
|
@@ -225,7 +228,8 @@ var MenuItem = memo(function MenuItem2({
|
|
|
225
228
|
label: labels.mentions(mentionCount),
|
|
226
229
|
count: mentionCount,
|
|
227
230
|
onMentions,
|
|
228
|
-
formatCount
|
|
231
|
+
formatCount,
|
|
232
|
+
countKind
|
|
229
233
|
}
|
|
230
234
|
)
|
|
231
235
|
] })
|
|
@@ -19,7 +19,9 @@ var PopoverContent = React.forwardRef((_a, ref) => {
|
|
|
19
19
|
sideOffset,
|
|
20
20
|
collisionPadding,
|
|
21
21
|
className: cn(
|
|
22
|
-
|
|
22
|
+
// Drawers and sheets use layer 1000. A body-portalled popover must
|
|
23
|
+
// clear that layer or its visible actions cannot receive a pointer.
|
|
24
|
+
"z-[1010] w-72 rounded-xl border border-border bg-popover p-4 text-popover-foreground shadow-xl outline-none",
|
|
23
25
|
"max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain",
|
|
24
26
|
"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 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",
|
|
25
27
|
className
|
|
@@ -3,10 +3,10 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const alertVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "success" | "warning" | "default" | "destructive" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8
8
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
9
|
-
variant?: "
|
|
9
|
+
variant?: "success" | "warning" | "default" | "destructive" | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
11
11
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
12
12
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "secondary" | "success" | "warning" | "default" | "destructive" | "outline" | "glass" | "overlay" | "brown" | "code" | "onPrimary" | "confirmed" | "pending" | "completed" | "assignee" | "softSuccess" | "softWarning" | "softDestructive" | "softNeutral" | null | undefined;
|
|
8
8
|
size?: "status" | "chip" | null | undefined;
|
|
9
9
|
live?: boolean | null | undefined;
|
|
10
10
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -31,7 +31,7 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
31
31
|
* right edge, centred on the text, and never wraps under it.
|
|
32
32
|
*/
|
|
33
33
|
declare const bannerVariants: (props?: ({
|
|
34
|
-
tone?: "
|
|
34
|
+
tone?: "warning" | "destructive" | "info" | null | undefined;
|
|
35
35
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
36
36
|
type BannerProps = Omit<React.HTMLAttributes<HTMLDivElement>, "title"> & VariantProps<typeof bannerVariants> & {
|
|
37
37
|
/**
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "link" | "
|
|
7
|
-
size?: "default" | "cta" | "xs" | "sm" | "lg" | "pill" | "cta-sm" | "icon
|
|
6
|
+
variant?: "secondary" | "link" | "warning" | "default" | "destructive" | "outline" | "ghost" | "glass" | "overlay" | "ink" | "brown" | "cta" | null | undefined;
|
|
7
|
+
size?: "icon" | "default" | "cta" | "xs" | "sm" | "lg" | "pill" | "cta-sm" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
8
8
|
fullWidth?: boolean | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -3,12 +3,12 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const cardVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "outline" | "glass" | "section" | "muted" | "surface" | "elevated" | "elevatedPanel" | null | undefined;
|
|
7
7
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
8
|
interactive?: boolean | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
11
|
-
variant?: "
|
|
11
|
+
variant?: "outline" | "glass" | "section" | "muted" | "surface" | "elevated" | "elevatedPanel" | null | undefined;
|
|
12
12
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
13
13
|
interactive?: boolean | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-
|
|
1
|
+
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-RXXD3UYP.js';
|
|
2
2
|
import { Command, CommandInput, CommandList, CommandLoading, CommandEmpty, CommandGroup, CommandItem } from '../chunk-PGQXVJXW.js';
|
|
3
3
|
import '../chunk-IQIJCMG2.js';
|
|
4
4
|
import { Button } from '../chunk-GHKTVHQG.js';
|
|
@@ -4,11 +4,11 @@ import { DialogProps } from '@radix-ui/react-dialog';
|
|
|
4
4
|
|
|
5
5
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
7
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
8
8
|
ref?: React.Ref<HTMLDivElement>;
|
|
9
9
|
} & {
|
|
10
10
|
asChild?: boolean;
|
|
11
|
-
},
|
|
11
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
12
12
|
label?: string;
|
|
13
13
|
shouldFilter?: boolean;
|
|
14
14
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -28,61 +28,61 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
28
28
|
ref?: React.Ref<HTMLInputElement>;
|
|
29
29
|
} & {
|
|
30
30
|
asChild?: boolean;
|
|
31
|
-
}, "
|
|
31
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
|
|
32
32
|
value?: string;
|
|
33
33
|
onValueChange?: (search: string) => void;
|
|
34
34
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
35
35
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
36
36
|
children?: React.ReactNode;
|
|
37
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
37
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
38
38
|
ref?: React.Ref<HTMLDivElement>;
|
|
39
39
|
} & {
|
|
40
40
|
asChild?: boolean;
|
|
41
|
-
},
|
|
41
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
42
42
|
label?: string;
|
|
43
43
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
45
45
|
children?: React.ReactNode;
|
|
46
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
46
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
47
47
|
ref?: React.Ref<HTMLDivElement>;
|
|
48
48
|
} & {
|
|
49
49
|
asChild?: boolean;
|
|
50
|
-
},
|
|
50
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
51
|
declare const CommandLoading: React.ForwardRefExoticComponent<Omit<{
|
|
52
52
|
children?: React.ReactNode;
|
|
53
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
53
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
54
54
|
ref?: React.Ref<HTMLDivElement>;
|
|
55
55
|
} & {
|
|
56
56
|
asChild?: boolean;
|
|
57
|
-
},
|
|
57
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
58
58
|
progress?: number;
|
|
59
59
|
label?: string;
|
|
60
60
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
61
61
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
62
62
|
children?: React.ReactNode;
|
|
63
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
63
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
64
64
|
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
} & {
|
|
66
66
|
asChild?: boolean;
|
|
67
|
-
},
|
|
67
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "heading" | "value"> & {
|
|
68
68
|
heading?: React.ReactNode;
|
|
69
69
|
value?: string;
|
|
70
70
|
forceMount?: boolean;
|
|
71
71
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
72
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
73
73
|
ref?: React.Ref<HTMLDivElement>;
|
|
74
74
|
} & {
|
|
75
75
|
asChild?: boolean;
|
|
76
|
-
},
|
|
76
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
77
77
|
alwaysRender?: boolean;
|
|
78
78
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
79
79
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
80
80
|
children?: React.ReactNode;
|
|
81
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
81
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
82
82
|
ref?: React.Ref<HTMLDivElement>;
|
|
83
83
|
} & {
|
|
84
84
|
asChild?: boolean;
|
|
85
|
-
},
|
|
85
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "onSelect" | "value" | "disabled"> & {
|
|
86
86
|
disabled?: boolean;
|
|
87
87
|
onSelect?: (value: string) => void;
|
|
88
88
|
value?: string;
|
|
@@ -53,7 +53,7 @@ interface EmptyStateProps {
|
|
|
53
53
|
* louder than a load failure the user can retry.
|
|
54
54
|
*/
|
|
55
55
|
declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
-
declare const SearchEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "
|
|
57
|
-
declare const ErrorEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "
|
|
56
|
+
declare const SearchEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "icon" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
declare const ErrorEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "icon" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
58
58
|
|
|
59
59
|
export { EmptyState, ErrorEmptyState, SearchEmptyState };
|
|
@@ -111,8 +111,19 @@ type EventDetailPanelProps = {
|
|
|
111
111
|
/** The hype tier, rendered as given (the app's own badge) in the chip row. */
|
|
112
112
|
hype?: React.ReactNode;
|
|
113
113
|
venue?: EventDetailVenue;
|
|
114
|
-
/** Activity tags
|
|
115
|
-
tags?: string
|
|
114
|
+
/** Activity tags. Pass a destination to make a tag a browse action. */
|
|
115
|
+
tags?: (string | {
|
|
116
|
+
label: string;
|
|
117
|
+
href: string;
|
|
118
|
+
onClick?: () => void;
|
|
119
|
+
})[];
|
|
120
|
+
/** Entry information opened by the price/free-entry control. */
|
|
121
|
+
entryDetails?: {
|
|
122
|
+
label: string;
|
|
123
|
+
description: string;
|
|
124
|
+
action?: React.ReactNode;
|
|
125
|
+
onOpenChange?: (open: boolean) => void;
|
|
126
|
+
};
|
|
116
127
|
/** Performer names, in the order the API gave them. */
|
|
117
128
|
performers?: string[];
|
|
118
129
|
/** How many performers to show before the "show all" chip. Default 5. */
|
|
@@ -137,7 +148,7 @@ type EventDetailPanelProps = {
|
|
|
137
148
|
/** Rendered instead of the poster when it's absent. Defaults to `<EventPosterFallback />`. */
|
|
138
149
|
fallback?: React.ReactNode;
|
|
139
150
|
};
|
|
140
|
-
declare function EventDetailPanel({ event, labels, formatters, dateLine, dateTime, status, soonLabel, hype, venue, tags, performers, performersPreview, showAllPerformersLabel, headerActions, footer, externalLink, heroHeight, size, linkComponent: LinkComponent, className, fallback, }: EventDetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
151
|
+
declare function EventDetailPanel({ event, labels, formatters, dateLine, dateTime, status, soonLabel, hype, venue, tags, entryDetails, performers, performersPreview, showAllPerformersLabel, headerActions, footer, externalLink, heroHeight, size, linkComponent: LinkComponent, className, fallback, }: EventDetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
141
152
|
type EventDetailFooterProps = {
|
|
142
153
|
/**
|
|
143
154
|
* The one primary action — a `Button` (reserve, tickets, directions when
|
|
@@ -205,17 +216,17 @@ type EventDetailPanelSkeletonProps = {
|
|
|
205
216
|
};
|
|
206
217
|
/** Mirrors `<EventDetailPanel>`'s geometry: capped hero, two title lines, when-line, chips, venue card, line-up, about, ghost row and primary. */
|
|
207
218
|
declare function EventDetailPanelSkeleton({ size, heroHeight, headerActions, label, className, }: EventDetailPanelSkeletonProps): react_jsx_runtime.JSX.Element;
|
|
208
|
-
type EventDetailChipRowProps = Pick<EventDetailPanelProps, "event" | "formatters" | "status" | "soonLabel" | "hype" | "tags"> & {
|
|
219
|
+
type EventDetailChipRowProps = Pick<EventDetailPanelProps, "event" | "formatters" | "status" | "soonLabel" | "hype" | "tags" | "entryDetails" | "linkComponent"> & {
|
|
209
220
|
/** Only the chip strings — a page rendering the row alone need not name the section headings. */
|
|
210
221
|
labels: Pick<EventDetailPanelLabels, "free" | "liveNow" | "ended">;
|
|
211
222
|
className?: string;
|
|
212
223
|
};
|
|
213
224
|
/**
|
|
214
|
-
* One wrapping row
|
|
225
|
+
* One wrapping row: metadata, entry information, then activity links. Exported
|
|
215
226
|
* so the page renders the same row above its title — it is the panel's row,
|
|
216
227
|
* not a second one.
|
|
217
228
|
*/
|
|
218
|
-
declare function EventDetailChipRow({ event, labels, formatters, status, soonLabel, hype, tags, className, }: EventDetailChipRowProps): react_jsx_runtime.JSX.Element;
|
|
229
|
+
declare function EventDetailChipRow({ event, labels, formatters, status, soonLabel, hype, tags, entryDetails, linkComponent: LinkComponent, className, }: EventDetailChipRowProps): react_jsx_runtime.JSX.Element;
|
|
219
230
|
type EventDetailVenueCardProps = {
|
|
220
231
|
venue: EventDetailVenue;
|
|
221
232
|
labels: Pick<EventDetailPanelLabels, "venueNoPage" | "grade">;
|
|
@@ -4,13 +4,14 @@ import { resolveEventEntryFee } from '../chunk-DNSXMHYX.js';
|
|
|
4
4
|
import { Separator } from '../chunk-NWZGSLPU.js';
|
|
5
5
|
import { EventPosterFallback } from '../chunk-FDITZ2VM.js';
|
|
6
6
|
import { Skeleton } from '../chunk-XBBEX4SF.js';
|
|
7
|
+
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-RXXD3UYP.js';
|
|
7
8
|
import { Button } from '../chunk-GHKTVHQG.js';
|
|
8
9
|
import '../chunk-RIH2IS7X.js';
|
|
9
10
|
import '../chunk-5YNIQ2BL.js';
|
|
10
11
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
11
12
|
import { __spreadProps, __spreadValues, __objRest } from '../chunk-MMUBH76A.js';
|
|
12
13
|
import * as React from 'react';
|
|
13
|
-
import { Calendar, User, CalendarX, Unplug, RefreshCw,
|
|
14
|
+
import { Calendar, User, CalendarX, Unplug, RefreshCw, Gift, Ticket, Timer, ChevronRight, MapPin, Star } from 'lucide-react';
|
|
14
15
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
16
|
|
|
16
17
|
function DefaultLink(_a) {
|
|
@@ -34,6 +35,7 @@ function EventDetailPanel({
|
|
|
34
35
|
hype,
|
|
35
36
|
venue,
|
|
36
37
|
tags,
|
|
38
|
+
entryDetails,
|
|
37
39
|
performers,
|
|
38
40
|
performersPreview = 5,
|
|
39
41
|
showAllPerformersLabel,
|
|
@@ -122,7 +124,9 @@ function EventDetailPanel({
|
|
|
122
124
|
status,
|
|
123
125
|
soonLabel,
|
|
124
126
|
hype,
|
|
125
|
-
tags
|
|
127
|
+
tags,
|
|
128
|
+
entryDetails,
|
|
129
|
+
linkComponent: LinkComponent
|
|
126
130
|
}
|
|
127
131
|
),
|
|
128
132
|
venue && /* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -396,10 +400,14 @@ function EventDetailChipRow({
|
|
|
396
400
|
soonLabel,
|
|
397
401
|
hype,
|
|
398
402
|
tags,
|
|
403
|
+
entryDetails,
|
|
404
|
+
linkComponent: LinkComponent = DefaultLink,
|
|
399
405
|
className
|
|
400
406
|
}) {
|
|
401
407
|
const fee = resolveEventEntryFee(event);
|
|
402
|
-
|
|
408
|
+
const priceLabel = fee.kind === "free" ? labels.free : fee.kind === "paid" ? formatters.price(fee.amountRon) : null;
|
|
409
|
+
const priceIcon = fee.kind === "free" ? /* @__PURE__ */ jsx(Gift, { className: "h-3.5 w-3.5", "aria-hidden": true }) : /* @__PURE__ */ jsx(Ticket, { className: "h-3.5 w-3.5", "aria-hidden": true });
|
|
410
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex flex-wrap items-center gap-[7px]", className), children: [
|
|
403
411
|
status === "live" && /* @__PURE__ */ jsxs(
|
|
404
412
|
"span",
|
|
405
413
|
{
|
|
@@ -436,7 +444,35 @@ function EventDetailChipRow({
|
|
|
436
444
|
children: labels.ended
|
|
437
445
|
}
|
|
438
446
|
),
|
|
439
|
-
|
|
447
|
+
priceLabel && entryDetails ? /* @__PURE__ */ jsxs(Popover, { onOpenChange: entryDetails.onOpenChange, children: [
|
|
448
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
449
|
+
Button,
|
|
450
|
+
{
|
|
451
|
+
variant: "outline",
|
|
452
|
+
size: "sm",
|
|
453
|
+
className: "min-h-11 rounded-full",
|
|
454
|
+
"aria-label": entryDetails.label,
|
|
455
|
+
children: [
|
|
456
|
+
priceIcon,
|
|
457
|
+
priceLabel,
|
|
458
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5", "aria-hidden": true })
|
|
459
|
+
]
|
|
460
|
+
}
|
|
461
|
+
) }),
|
|
462
|
+
/* @__PURE__ */ jsxs(
|
|
463
|
+
PopoverContent,
|
|
464
|
+
{
|
|
465
|
+
align: "start",
|
|
466
|
+
"aria-label": entryDetails.label,
|
|
467
|
+
className: "flex max-w-[calc(100vw-2rem)] flex-col gap-3",
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: priceLabel }),
|
|
470
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: entryDetails.description }),
|
|
471
|
+
entryDetails.action
|
|
472
|
+
]
|
|
473
|
+
}
|
|
474
|
+
)
|
|
475
|
+
] }) : fee.kind === "free" ? /* @__PURE__ */ jsxs(
|
|
440
476
|
"span",
|
|
441
477
|
{
|
|
442
478
|
className: cn(
|
|
@@ -448,13 +484,27 @@ function EventDetailChipRow({
|
|
|
448
484
|
labels.free
|
|
449
485
|
]
|
|
450
486
|
}
|
|
451
|
-
),
|
|
452
|
-
fee.kind === "paid" && /* @__PURE__ */ jsxs("span", { className: cn(CHIP, "text-foreground"), children: [
|
|
487
|
+
) : fee.kind === "paid" ? /* @__PURE__ */ jsxs("span", { className: cn(CHIP, "text-foreground"), children: [
|
|
453
488
|
/* @__PURE__ */ jsx(Ticket, { className: "h-3 w-3", "aria-hidden": true }),
|
|
454
489
|
formatters.price(fee.amountRon)
|
|
455
|
-
] }),
|
|
490
|
+
] }) : null,
|
|
456
491
|
hype,
|
|
457
|
-
tags == null ? void 0 : tags.map(
|
|
492
|
+
tags == null ? void 0 : tags.map(
|
|
493
|
+
(tag) => typeof tag === "string" ? /* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: tag }, tag) : /* @__PURE__ */ jsx(
|
|
494
|
+
Button,
|
|
495
|
+
{
|
|
496
|
+
asChild: true,
|
|
497
|
+
variant: "outline",
|
|
498
|
+
size: "sm",
|
|
499
|
+
className: "min-h-11 rounded-full",
|
|
500
|
+
children: /* @__PURE__ */ jsxs(LinkComponent, { href: tag.href, onClick: tag.onClick, children: [
|
|
501
|
+
tag.label,
|
|
502
|
+
/* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5", "aria-hidden": true })
|
|
503
|
+
] })
|
|
504
|
+
},
|
|
505
|
+
tag.href
|
|
506
|
+
)
|
|
507
|
+
)
|
|
458
508
|
] });
|
|
459
509
|
}
|
|
460
510
|
function EventDetailVenueCard({
|
|
@@ -64,6 +64,18 @@ type MenuItemLabels = {
|
|
|
64
64
|
*/
|
|
65
65
|
externalRating?: (score: string) => string;
|
|
66
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* What the count beside the row counts.
|
|
69
|
+
*
|
|
70
|
+
* - `"mentions"`: every review that named the item, complaints included. Drawn
|
|
71
|
+
* with the quote glyph.
|
|
72
|
+
* - `"praise"`: only the reviews that praised it. Drawn with a thumbs-up.
|
|
73
|
+
*
|
|
74
|
+
* The caller decides, because only the caller knows which number it passed in
|
|
75
|
+
* `item.mentions`. A thumbs-up must never sit on a count that includes
|
|
76
|
+
* complaints, so `"mentions"` is the default.
|
|
77
|
+
*/
|
|
78
|
+
type MenuItemCountKind = "praise" | "mentions";
|
|
67
79
|
type MenuItemProps = {
|
|
68
80
|
item: MenuItemPreview;
|
|
69
81
|
labels: MenuItemLabels;
|
|
@@ -85,6 +97,12 @@ type MenuItemProps = {
|
|
|
85
97
|
onSignatureEvidence?: () => void;
|
|
86
98
|
/** Opens the reviews behind the mention count. */
|
|
87
99
|
onMentions?: () => void;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the count is praise or every mention. Sets the glyph before the
|
|
102
|
+
* numeral: a thumbs-up for `"praise"`, the quote glyph for `"mentions"`.
|
|
103
|
+
* Defaults to `"mentions"`. Keep `labels.mentions` in step with it.
|
|
104
|
+
*/
|
|
105
|
+
countKind?: MenuItemCountKind;
|
|
88
106
|
/**
|
|
89
107
|
* An outside aggregate score for the item (a wine's Vivino rating, a beer's
|
|
90
108
|
* Untappd one), shown as a star and the score beside the mention count.
|
|
@@ -128,17 +146,20 @@ type MenuItemProps = {
|
|
|
128
146
|
className?: string;
|
|
129
147
|
};
|
|
130
148
|
/**
|
|
131
|
-
* The mention count: a
|
|
149
|
+
* The mention count: a glyph and the numeral, pinned right. The glyph is the
|
|
150
|
+
* quote glyph for every mention, or a thumbs-up when the count is praise only
|
|
151
|
+
* (see `MenuItemCountKind`).
|
|
132
152
|
*
|
|
133
153
|
* Deliberately NOT a badge — a chip would add a filled shape to a row that has
|
|
134
154
|
* none, and would read as a status label the venue was given rather than a
|
|
135
155
|
* count drawn from the same reviews.
|
|
136
156
|
*/
|
|
137
|
-
declare function MentionSignal({ label, count, onMentions, formatCount, }: {
|
|
157
|
+
declare function MentionSignal({ label, count, onMentions, formatCount, countKind, }: {
|
|
138
158
|
label: string;
|
|
139
159
|
count: number;
|
|
140
160
|
onMentions?: () => void;
|
|
141
161
|
formatCount?: (value: number) => string;
|
|
162
|
+
countKind?: MenuItemCountKind;
|
|
142
163
|
}): react_jsx_runtime.JSX.Element;
|
|
143
164
|
/**
|
|
144
165
|
* An external aggregate score: a star and the numeral, in the neutral muted
|
|
@@ -152,4 +173,4 @@ declare function ExternalRatingSignal({ label, value }: {
|
|
|
152
173
|
}): react_jsx_runtime.JSX.Element;
|
|
153
174
|
declare const MenuItem: React.NamedExoticComponent<MenuItemProps>;
|
|
154
175
|
|
|
155
|
-
export { ExternalRatingSignal, MentionSignal, MenuItem, type MenuItemLabels, type MenuItemLinkProps, type MenuItemProps };
|
|
176
|
+
export { ExternalRatingSignal, MentionSignal, MenuItem, type MenuItemCountKind, type MenuItemLabels, type MenuItemLinkProps, type MenuItemProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ExternalRatingSignal, MentionSignal, MenuItem } from '../chunk-
|
|
1
|
+
export { ExternalRatingSignal, MentionSignal, MenuItem } from '../chunk-6Z6MBILC.js';
|
|
2
2
|
import '../chunk-6PQINSAA.js';
|
|
3
3
|
import '../chunk-RYPPN2GZ.js';
|
|
4
4
|
import '../chunk-FEK5XGZW.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Checkbox } from '../chunk-L3CDXVEP.js';
|
|
2
|
-
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-
|
|
2
|
+
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-RXXD3UYP.js';
|
|
3
3
|
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-PGQXVJXW.js';
|
|
4
4
|
import '../chunk-IQIJCMG2.js';
|
|
5
5
|
import { Button } from '../chunk-GHKTVHQG.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from '../chunk-
|
|
1
|
+
export { Popover, PopoverAnchor, PopoverArrow, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from '../chunk-RXXD3UYP.js';
|
|
2
2
|
import '../chunk-FEK5XGZW.js';
|
|
3
3
|
import '../chunk-MMUBH76A.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-
|
|
1
|
+
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-RXXD3UYP.js';
|
|
2
2
|
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-PGQXVJXW.js';
|
|
3
3
|
import '../chunk-IQIJCMG2.js';
|
|
4
4
|
import { Button } from '../chunk-GHKTVHQG.js';
|
|
@@ -4,11 +4,11 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
|
|
5
5
|
declare const spinnerVariants: (props?: ({
|
|
6
6
|
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
7
|
-
tone?: "
|
|
7
|
+
tone?: "primary" | "inherit" | "default" | "destructive" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare const Spinner: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
10
10
|
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
11
|
-
tone?: "
|
|
11
|
+
tone?: "primary" | "inherit" | "default" | "destructive" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
13
13
|
/** Visually-hidden label for screen readers. Defaults to "Loading". */
|
|
14
14
|
label?: string;
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const tagVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "primary" | "success" | "warning" | "default" | "destructive" | "outline" | "quiet" | null | undefined;
|
|
7
7
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
declare const Tag: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLSpanElement> & VariantProps<(props?: ({
|
|
10
|
-
variant?: "
|
|
10
|
+
variant?: "primary" | "success" | "warning" | "default" | "destructive" | "outline" | "quiet" | null | undefined;
|
|
11
11
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
12
12
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
13
13
|
onRemove?: () => void;
|
|
@@ -22,8 +22,8 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
22
22
|
* Weights are 400 / 600 / 700. 500 is not in the system.
|
|
23
23
|
*/
|
|
24
24
|
declare const textVariants: (props?: ({
|
|
25
|
-
variant?: "
|
|
26
|
-
color?: "
|
|
25
|
+
variant?: "small" | "body" | "display" | "h2" | "h3" | "label" | "caption" | "h1" | "h4" | "body-lg" | "body-sm" | "overline" | null | undefined;
|
|
26
|
+
color?: "primary" | "inherit" | "default" | "destructive" | "muted" | "primary-foreground" | null | undefined;
|
|
27
27
|
weight?: "bold" | "medium" | "normal" | "semibold" | null | undefined;
|
|
28
28
|
leading?: "none" | "normal" | "tight" | "snug" | "relaxed" | "loose" | null | undefined;
|
|
29
29
|
tracking?: "normal" | "tight" | "wide" | "wider" | null | undefined;
|