@bearmenu/ui 0.8.48 → 0.8.50
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-QY66ME5B.js → chunk-CZ2HC7WY.js} +24 -6
- package/dist/components/alert.d.ts +2 -2
- package/dist/components/avatar.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/command.d.ts +3 -3
- package/dist/components/concept-compare.d.ts +1 -1
- package/dist/components/doorway-tiles.d.ts +1 -1
- package/dist/components/empty-state.d.ts +2 -2
- package/dist/components/event-detail-panel.d.ts +12 -2
- package/dist/components/event-detail-panel.js +15 -3
- package/dist/components/grade-atom.d.ts +1 -1
- package/dist/components/item.d.ts +2 -2
- package/dist/components/kitchen-dossier.d.ts +1 -1
- package/dist/components/menu-dead-end.d.ts +1 -1
- package/dist/components/menu-family-block.d.ts +2 -2
- package/dist/components/menu-family-block.js +3 -1
- package/dist/components/menu-family-card.d.ts +1 -1
- package/dist/components/menu-filter-chips.d.ts +1 -1
- package/dist/components/menu-group-rows.d.ts +1 -1
- package/dist/components/menu-index-header.d.ts +1 -1
- package/dist/components/menu-index-list.d.ts +1 -1
- package/dist/components/menu-intent-hero.d.ts +1 -1
- package/dist/components/menu-item.d.ts +1 -1
- package/dist/components/menu-kitchen-list.d.ts +9 -2
- package/dist/components/menu-kitchen-list.js +3 -1
- package/dist/components/menu-mocks.d.ts +1 -1
- package/dist/components/menu-types.d.ts +1 -1
- package/dist/components/open-now-list.d.ts +1 -1
- package/dist/components/place-about-tab.d.ts +1 -1
- package/dist/components/place-card.d.ts +1 -1
- package/dist/components/place-card.js +13 -5
- package/dist/components/place-details-mobile.d.ts +1 -1
- package/dist/components/place-schedule-week.d.ts +1 -1
- package/dist/components/place-types.d.ts +1 -1
- package/dist/components/qa-block.d.ts +1 -1
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/tag.d.ts +2 -2
- package/dist/components/text.d.ts +3 -3
- package/dist/components/top-comparison.d.ts +1 -1
- package/dist/components/top-cross-link.d.ts +1 -1
- package/dist/components/top-ranking-entry.d.ts +1 -1
- package/dist/components/top-ranking-hero.d.ts +1 -1
- package/dist/components/top-types.d.ts +1 -1
- package/dist/components/venue-grade-dimensions.d.ts +1 -1
- package/dist/components/venue-quotes.d.ts +1 -1
- package/dist/components/venue-wall.d.ts +1 -1
- package/dist/{place-types-C4rR3LTs.d.ts → place-types-Dzy6FH67.d.ts} +12 -1
- package/package.json +217 -23
- package/src/components/event-detail-panel.test.tsx +35 -0
- package/src/components/event-detail-panel.tsx +32 -10
- package/src/components/menu-kitchen-list.test.tsx +39 -0
- package/src/components/menu-kitchen-list.tsx +36 -7
- package/src/components/place-card.stories.tsx +36 -0
- package/src/components/place-card.test.tsx +29 -0
- package/src/components/place-card.tsx +24 -5
- package/src/components/place-types.ts +11 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { GradeAtom } from './chunk-YE4ZQUTI.js';
|
|
2
|
+
import { showsGradeAtom } from './chunk-I5V446BX.js';
|
|
1
3
|
import { Separator } from './chunk-NWZGSLPU.js';
|
|
2
4
|
import { Skeleton } from './chunk-XBBEX4SF.js';
|
|
3
5
|
import { cn } from './chunk-FEK5XGZW.js';
|
|
4
6
|
import { __objRest, __spreadValues } from './chunk-MMUBH76A.js';
|
|
5
|
-
import {
|
|
7
|
+
import { Clock, Check, MessageSquare, ChevronRight, Star } from 'lucide-react';
|
|
6
8
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
9
|
|
|
8
10
|
function DefaultLink(_a) {
|
|
@@ -41,6 +43,25 @@ function MenuKitchenList({
|
|
|
41
43
|
)
|
|
42
44
|
] });
|
|
43
45
|
}
|
|
46
|
+
function gradeShown(place, labels) {
|
|
47
|
+
var _a;
|
|
48
|
+
return labels.grade !== void 0 && showsGradeAtom((_a = place.reviews_digest) == null ? void 0 : _a.grade, "xs");
|
|
49
|
+
}
|
|
50
|
+
function KitchenRating({
|
|
51
|
+
place,
|
|
52
|
+
labels
|
|
53
|
+
}) {
|
|
54
|
+
var _a;
|
|
55
|
+
const grade = (_a = place.reviews_digest) == null ? void 0 : _a.grade;
|
|
56
|
+
if (labels.grade && showsGradeAtom(grade, "xs")) {
|
|
57
|
+
return /* @__PURE__ */ jsx(GradeAtom, { grade, labels: labels.grade, size: "xs", className: "shrink-0" });
|
|
58
|
+
}
|
|
59
|
+
if (!place.rating) return null;
|
|
60
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
61
|
+
/* @__PURE__ */ jsx(Star, { className: "h-[11px] w-[11px] shrink-0", "aria-hidden": true }),
|
|
62
|
+
place.rating.rating
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
44
65
|
function KitchenRow({
|
|
45
66
|
kitchen,
|
|
46
67
|
labels,
|
|
@@ -99,11 +120,8 @@ function KitchenRow({
|
|
|
99
120
|
children: [
|
|
100
121
|
/* @__PURE__ */ jsx("span", { className: "truncate text-[14.5px] font-bold tracking-[-0.01em] lg:line-clamp-2 lg:whitespace-normal lg:text-[15.5px] lg:leading-tight", children: place.name }),
|
|
101
122
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 truncate text-xs text-muted-foreground", children: [
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
place.rating.rating,
|
|
105
|
-
kitchen.metaLabel && " \xB7 "
|
|
106
|
-
] }),
|
|
123
|
+
/* @__PURE__ */ jsx(KitchenRating, { place, labels }),
|
|
124
|
+
kitchen.metaLabel && (gradeShown(place, labels) || place.rating) && " \xB7 ",
|
|
107
125
|
kitchen.metaLabel
|
|
108
126
|
] }),
|
|
109
127
|
kitchen.hoursLabel && /* @__PURE__ */ jsxs(
|
|
@@ -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?: "default" | "
|
|
6
|
+
variant?: "default" | "destructive" | "warning" | "success" | 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?: "default" | "
|
|
9
|
+
variant?: "default" | "destructive" | "warning" | "success" | 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>>;
|
|
@@ -5,13 +5,13 @@ import { VariantProps } from 'class-variance-authority';
|
|
|
5
5
|
|
|
6
6
|
declare const avatarVariants: (props?: ({
|
|
7
7
|
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
8
|
-
tone?: "
|
|
8
|
+
tone?: "muted" | "brown" | "teal" | "green" | "blue" | "violet" | "rose" | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
type AvatarSize = NonNullable<VariantProps<typeof avatarVariants>["size"]>;
|
|
11
11
|
type AvatarTone = NonNullable<VariantProps<typeof avatarVariants>["tone"]>;
|
|
12
12
|
declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & VariantProps<(props?: ({
|
|
13
13
|
size?: "default" | "xs" | "sm" | "lg" | "xl" | null | undefined;
|
|
14
|
-
tone?: "
|
|
14
|
+
tone?: "muted" | "brown" | "teal" | "green" | "blue" | "violet" | "rose" | null | undefined;
|
|
15
15
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLSpanElement>>;
|
|
16
16
|
declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
|
|
17
17
|
declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -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?: "default" | "
|
|
7
|
+
variant?: "default" | "destructive" | "warning" | "success" | "secondary" | "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?: "destructive" | "warning" | "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?: "default" | "
|
|
7
|
-
size?: "
|
|
6
|
+
variant?: "default" | "destructive" | "warning" | "link" | "secondary" | "outline" | "ghost" | "glass" | "overlay" | "ink" | "brown" | "cta" | null | undefined;
|
|
7
|
+
size?: "default" | "icon" | "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?: "muted" | "outline" | "glass" | "section" | "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?: "muted" | "outline" | "glass" | "section" | "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>>;
|
|
@@ -28,7 +28,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
28
28
|
ref?: React.Ref<HTMLInputElement>;
|
|
29
29
|
} & {
|
|
30
30
|
asChild?: boolean;
|
|
31
|
-
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "
|
|
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>>;
|
|
@@ -64,7 +64,7 @@ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
|
64
64
|
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
} & {
|
|
66
66
|
asChild?: boolean;
|
|
67
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "
|
|
67
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "heading" | "value"> & {
|
|
68
68
|
heading?: React.ReactNode;
|
|
69
69
|
value?: string;
|
|
70
70
|
forceMount?: boolean;
|
|
@@ -82,7 +82,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
82
82
|
ref?: React.Ref<HTMLDivElement>;
|
|
83
83
|
} & {
|
|
84
84
|
asChild?: boolean;
|
|
85
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "
|
|
85
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "onSelect" | "value" | "disabled"> & {
|
|
86
86
|
disabled?: boolean;
|
|
87
87
|
onSelect?: (value: string) => void;
|
|
88
88
|
value?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MenuConceptPreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -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, "variant" | "icon"> & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
declare const ErrorEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "variant" | "icon"> & React.RefAttributes<HTMLDivElement>>;
|
|
58
58
|
|
|
59
59
|
export { EmptyState, ErrorEmptyState, SearchEmptyState };
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
+
import { G as GradeAtomLabels, a as PlaceGrade } from '../place-types-Dzy6FH67.js';
|
|
3
4
|
import { EventPreview, EventFormatters } from './event-types.js';
|
|
5
|
+
import '../lib/grade.js';
|
|
4
6
|
|
|
5
7
|
/**
|
|
6
8
|
* EventDetailPanel — the BODY of the event detail sheet, and the body the
|
|
@@ -51,7 +53,13 @@ type EventDetailVenue = {
|
|
|
51
53
|
name: string;
|
|
52
54
|
/** Address line, e.g. "Str. Iuliu Maniu 5". */
|
|
53
55
|
address?: string;
|
|
54
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The venue's BearMenu grade. Shown as the grade pill in the rating's place
|
|
58
|
+
* when `labels.grade` is given; the star `ratingLabel` then stays only for a
|
|
59
|
+
* venue without a grade.
|
|
60
|
+
*/
|
|
61
|
+
grade?: PlaceGrade;
|
|
62
|
+
/** e.g. "4.7" — Google's rating, rendered with a star. The fallback for an ungraded venue. */
|
|
55
63
|
ratingLabel?: string;
|
|
56
64
|
/** e.g. "open until 20:00" — appended to the meta row when given. */
|
|
57
65
|
openLabel?: string;
|
|
@@ -66,6 +74,8 @@ type EventDetailVenue = {
|
|
|
66
74
|
href?: string;
|
|
67
75
|
};
|
|
68
76
|
type EventDetailPanelLabels = {
|
|
77
|
+
/** The venue's grade pill. Optional: without it the venue shows the star, as before. */
|
|
78
|
+
grade?: GradeAtomLabels;
|
|
69
79
|
free: string;
|
|
70
80
|
liveNow: string;
|
|
71
81
|
/** The ended chip, e.g. "Ended". */
|
|
@@ -208,7 +218,7 @@ type EventDetailChipRowProps = Pick<EventDetailPanelProps, "event" | "formatters
|
|
|
208
218
|
declare function EventDetailChipRow({ event, labels, formatters, status, soonLabel, hype, tags, className, }: EventDetailChipRowProps): react_jsx_runtime.JSX.Element;
|
|
209
219
|
type EventDetailVenueCardProps = {
|
|
210
220
|
venue: EventDetailVenue;
|
|
211
|
-
labels: Pick<EventDetailPanelLabels, "venueNoPage">;
|
|
221
|
+
labels: Pick<EventDetailPanelLabels, "venueNoPage" | "grade">;
|
|
212
222
|
linkComponent?: React.ComponentType<EventDetailPanelLinkProps>;
|
|
213
223
|
/** Thumbnail size in px: 52 in the sheet, 64 on the page. */
|
|
214
224
|
thumbnailSize?: 52 | 64;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { GradeAtom } from '../chunk-YE4ZQUTI.js';
|
|
2
|
+
import { showsGradeAtom } from '../chunk-I5V446BX.js';
|
|
1
3
|
import { resolveEventEntryFee } from '../chunk-DNSXMHYX.js';
|
|
2
4
|
import { Separator } from '../chunk-NWZGSLPU.js';
|
|
3
5
|
import { EventPosterFallback } from '../chunk-FDITZ2VM.js';
|
|
@@ -463,7 +465,9 @@ function EventDetailVenueCard({
|
|
|
463
465
|
action,
|
|
464
466
|
className
|
|
465
467
|
}) {
|
|
466
|
-
const
|
|
468
|
+
const showGrade = labels.grade !== void 0 && showsGradeAtom(venue.grade, "xs");
|
|
469
|
+
const hasRating = showGrade || Boolean(venue.ratingLabel);
|
|
470
|
+
const meta = venue.href && (venue.address || hasRating || venue.openLabel);
|
|
467
471
|
const main = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
468
472
|
/* @__PURE__ */ jsxs(
|
|
469
473
|
"div",
|
|
@@ -501,8 +505,16 @@ function EventDetailVenueCard({
|
|
|
501
505
|
/* @__PURE__ */ jsx("div", { className: "truncate text-sm font-bold", children: venue.name }),
|
|
502
506
|
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: [
|
|
503
507
|
venue.address && /* @__PURE__ */ jsx("span", { className: "truncate", children: venue.address }),
|
|
504
|
-
venue.address &&
|
|
505
|
-
|
|
508
|
+
venue.address && hasRating && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-border", children: "\xB7" }),
|
|
509
|
+
showGrade && labels.grade && venue.grade ? /* @__PURE__ */ jsx(
|
|
510
|
+
GradeAtom,
|
|
511
|
+
{
|
|
512
|
+
grade: venue.grade,
|
|
513
|
+
labels: labels.grade,
|
|
514
|
+
size: "xs",
|
|
515
|
+
className: "shrink-0"
|
|
516
|
+
}
|
|
517
|
+
) : venue.ratingLabel && /* @__PURE__ */ jsxs("span", { className: "inline-flex shrink-0 items-center gap-1", children: [
|
|
506
518
|
/* @__PURE__ */ jsx(Star, { className: "h-[11px] w-[11px]", "aria-hidden": true }),
|
|
507
519
|
venue.ratingLabel
|
|
508
520
|
] }),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import '../lib/grade.js';
|
|
3
|
-
export {
|
|
3
|
+
export { i as GradeAtom, G as GradeAtomLabels, j as GradeAtomProps, k as GradeAtomSize } from '../place-types-Dzy6FH67.js';
|
|
@@ -3,12 +3,12 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const itemVariants: (props?: ({
|
|
6
|
-
variant?: "default" | "
|
|
6
|
+
variant?: "default" | "muted" | "outline" | 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 Item: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
11
|
-
variant?: "default" | "
|
|
11
|
+
variant?: "default" | "muted" | "outline" | 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> & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { MenuVenueSignature, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
4
|
-
import { P as PlacePreview, C as CitedText,
|
|
4
|
+
import { P as PlacePreview, C as CitedText, b as PlaceGradeDimensions } from '../place-types-Dzy6FH67.js';
|
|
5
5
|
import { VenueGradeDimensionKey } from './venue-grade-dimensions.js';
|
|
6
6
|
import '../lib/grade.js';
|
|
7
7
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MenuKitchenListLabels } from './menu-kitchen-list.js';
|
|
3
3
|
import { MenuFamilyBlockPreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
4
|
-
import '
|
|
5
|
-
import '../place-types-C4rR3LTs.js';
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
6
5
|
import '../lib/grade.js';
|
|
6
|
+
import 'react';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* MenuFamilyBlock — the cuisines index's family card. One photograph is the ground.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { MenuKitchenList } from '../chunk-
|
|
1
|
+
import { MenuKitchenList } from '../chunk-CZ2HC7WY.js';
|
|
2
2
|
import { HueChip } from '../chunk-6VOWT4YR.js';
|
|
3
|
+
import '../chunk-YE4ZQUTI.js';
|
|
4
|
+
import '../chunk-I5V446BX.js';
|
|
3
5
|
import { Separator } from '../chunk-NWZGSLPU.js';
|
|
4
6
|
import { PhotoGround, PHOTO_GROUND } from '../chunk-SWD6CJ35.js';
|
|
5
7
|
import { Skeleton } from '../chunk-XBBEX4SF.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MenuFamilyPreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MenuIndexEntry, MenuLinkComponent } from './menu-types.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
type MenuIndexHeaderProps = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MenuIndexEntry, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import { MenuItemPreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { G as GradeAtomLabels } from '../place-types-Dzy6FH67.js';
|
|
2
3
|
import { MenuKitchenPreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '../place-types-C4rR3LTs.js';
|
|
5
4
|
import '../lib/grade.js';
|
|
5
|
+
import 'react';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* MenuKitchenList — the intent page's spine.
|
|
@@ -53,6 +53,13 @@ type MenuKitchenListLabels = {
|
|
|
53
53
|
openNow: string;
|
|
54
54
|
/** Reveals the next page of rows, e.g. "Show 10 more". */
|
|
55
55
|
showMore?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The grade pill's labels. With them, a graded venue shows its BearMenu
|
|
58
|
+
* grade where the Google star was; the star stays only for a venue with no
|
|
59
|
+
* grade. Optional so existing callers keep compiling — without it every row
|
|
60
|
+
* shows the star, as before.
|
|
61
|
+
*/
|
|
62
|
+
grade?: GradeAtomLabels;
|
|
56
63
|
};
|
|
57
64
|
/**
|
|
58
65
|
* `wide` (default): the intent page's full-width list — from `lg` the venue
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { MenuKitchenList, MenuKitchenListSkeleton } from '../chunk-
|
|
1
|
+
export { MenuKitchenList, MenuKitchenListSkeleton } from '../chunk-CZ2HC7WY.js';
|
|
2
|
+
import '../chunk-YE4ZQUTI.js';
|
|
3
|
+
import '../chunk-I5V446BX.js';
|
|
2
4
|
import '../chunk-NWZGSLPU.js';
|
|
3
5
|
import '../chunk-XBBEX4SF.js';
|
|
4
6
|
import '../chunk-FEK5XGZW.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MenuFamilyBlockPreview, MenuConceptPreview, MenuFamilyPreview, MenuFilterChip, MenuIndexEntry, MenuIntentFigure, MenuItemPreview, MenuKitchenPreview, MenuLoosenOption, QaItem, MenuVenuePreview } from './menu-types.js';
|
|
2
2
|
import { DoorwayTile } from './doorway-tiles.js';
|
|
3
|
-
import { P as PlacePreview } from '../place-types-
|
|
3
|
+
import { P as PlacePreview } from '../place-types-Dzy6FH67.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react/jsx-runtime';
|
|
6
6
|
import '../lib/grade.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentType, CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { M as MenuSizeAndPrice, P as PlacePreview } from '../place-types-
|
|
2
|
+
import { M as MenuSizeAndPrice, P as PlacePreview } from '../place-types-Dzy6FH67.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import '../lib/grade.js';
|
|
5
5
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { MenuVenuePreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { P as PlacePreview,
|
|
2
|
+
import { P as PlacePreview, c as PlaceAboutTabLabels, d as PlaceLinkKind } from '../place-types-Dzy6FH67.js';
|
|
3
3
|
import '../lib/grade.js';
|
|
4
4
|
|
|
5
5
|
interface PlaceAboutTabProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
3
|
import { ReactNode, MouseEvent } from 'react';
|
|
4
|
-
import { P as PlacePreview,
|
|
4
|
+
import { P as PlacePreview, e as PlaceCardLabels } from '../place-types-Dzy6FH67.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -56,6 +56,10 @@ function PriceLevel({ level, label }) {
|
|
|
56
56
|
/* @__PURE__ */ jsx("span", { className: "opacity-30", children: "$".repeat(4 - filled) })
|
|
57
57
|
] });
|
|
58
58
|
}
|
|
59
|
+
function launchYear(launchedAt) {
|
|
60
|
+
const match = launchedAt ? /^(\d{4})-\d{2}$/.exec(launchedAt) : null;
|
|
61
|
+
return match ? Number(match[1]) : void 0;
|
|
62
|
+
}
|
|
59
63
|
var STATIC_ROOT_CLASSES = `group relative flex w-full select-none flex-col ${HOVER_MOTION} ${HOVER_LIFT_GRID_GROUP}`;
|
|
60
64
|
var ROOT_CLASSES = `${STATIC_ROOT_CLASSES} cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:rounded-xl`;
|
|
61
65
|
var DEFAULT_SIZES = "(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw";
|
|
@@ -72,7 +76,7 @@ var PlaceCard = memo(function PlaceCard2({
|
|
|
72
76
|
photoOverlay,
|
|
73
77
|
className
|
|
74
78
|
}) {
|
|
75
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
76
80
|
const [imgError, setImgError] = useState(false);
|
|
77
81
|
const MotionLink = useMemo(() => motion.create(LinkComponent), [LinkComponent]);
|
|
78
82
|
const coverUrl = imgError ? void 0 : place.cover_url;
|
|
@@ -81,6 +85,8 @@ var PlaceCard = memo(function PlaceCard2({
|
|
|
81
85
|
const neighbourhood = (_e = (_d = place.areas) == null ? void 0 : _d[0]) == null ? void 0 : _e.name;
|
|
82
86
|
const priceLevel = (_h = (_f = place.price_dishes) == null ? void 0 : _f.price_score) != null ? _h : (_g = place.price_drinks) == null ? void 0 : _g.price_score;
|
|
83
87
|
const showPrice = priceLevel !== void 0 && priceLevel > 0;
|
|
88
|
+
const year = labels.established ? launchYear(place.launched_at) : void 0;
|
|
89
|
+
const established = year !== void 0 ? (_i = labels.established) == null ? void 0 : _i.call(labels, year) : void 0;
|
|
84
90
|
const ariaLabel = labels.viewDetails(place.name);
|
|
85
91
|
const handleKeyDown = (e) => {
|
|
86
92
|
if (e.key === "Enter" || e.key === " ") {
|
|
@@ -145,10 +151,12 @@ var PlaceCard = memo(function PlaceCard2({
|
|
|
145
151
|
/* @__PURE__ */ jsx(HeadlineRating, { place, labels })
|
|
146
152
|
] }),
|
|
147
153
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
148
|
-
(cuisine || showPrice) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
149
|
-
cuisine && /* @__PURE__ */ jsx("span", { className: "capitalize", children: cuisine }),
|
|
150
|
-
cuisine && showPrice && /* @__PURE__ */ jsx("span", { className: "text-border", children: "\xB7" }),
|
|
151
|
-
showPrice && /* @__PURE__ */ jsx(PriceLevel, { level: priceLevel, label: labels.priceLevel(priceLevel) })
|
|
154
|
+
(cuisine || showPrice || established) && /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
155
|
+
cuisine && /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate capitalize", children: cuisine }),
|
|
156
|
+
cuisine && showPrice && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-border", children: "\xB7" }),
|
|
157
|
+
showPrice && /* @__PURE__ */ jsx("span", { className: "shrink-0", children: /* @__PURE__ */ jsx(PriceLevel, { level: priceLevel, label: labels.priceLevel(priceLevel) }) }),
|
|
158
|
+
established && (cuisine || showPrice) && /* @__PURE__ */ jsx("span", { className: "shrink-0 text-border", children: "\xB7" }),
|
|
159
|
+
established && /* @__PURE__ */ jsx("span", { className: "shrink-0 whitespace-nowrap", children: established })
|
|
152
160
|
] }),
|
|
153
161
|
distance !== void 0 ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5 text-xs text-muted-foreground", children: [
|
|
154
162
|
/* @__PURE__ */ jsx(MapPin, { className: "h-3 w-3 shrink-0", "aria-hidden": true }),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { P as PlacePreview,
|
|
2
|
+
import { P as PlacePreview, f as PlaceDetailsMobileLabels } from '../place-types-Dzy6FH67.js';
|
|
3
3
|
import '../lib/grade.js';
|
|
4
4
|
|
|
5
5
|
interface PlaceDetailsMobileProps {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { g as PlaceSchedule, h as PlaceScheduleWeekLabels } from '../place-types-Dzy6FH67.js';
|
|
3
3
|
import '../lib/grade.js';
|
|
4
4
|
|
|
5
5
|
interface PlaceScheduleWeekProps {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CitedText,
|
|
1
|
+
export { C as CitedText, l as CitedValue, M as MenuSizeAndPrice, c as PlaceAboutTabLabels, e as PlaceCardLabels, f as PlaceDetailsMobileLabels, a as PlaceGrade, b as PlaceGradeDimensions, m as PlaceHourBlock, d as PlaceLinkKind, n as PlaceMustTry, P as PlacePreview, o as PlacePriceRange, p as PlaceReviewsDigest, g as PlaceSchedule, h as PlaceScheduleWeekLabels, W as WeekdayKey } from '../place-types-Dzy6FH67.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '../lib/grade.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?: "default" | "
|
|
7
|
+
tone?: "default" | "destructive" | "inherit" | "primary" | 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?: "default" | "
|
|
11
|
+
tone?: "default" | "destructive" | "inherit" | "primary" | 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?: "default" | "
|
|
6
|
+
variant?: "default" | "destructive" | "warning" | "success" | "primary" | "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?: "default" | "
|
|
10
|
+
variant?: "default" | "destructive" | "warning" | "success" | "primary" | "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;
|