@bearmenu/ui 0.8.22 → 0.8.24
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-AHL45DD2.js → chunk-I4RUOAU7.js} +38 -11
- package/dist/{chunk-DJD3EMPK.js → chunk-YE4ZQUTI.js} +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/card.d.ts +2 -2
- package/dist/components/command.d.ts +15 -15
- package/dist/components/concept-compare.d.ts +1 -1
- package/dist/components/doorway-tiles.d.ts +1 -1
- package/dist/components/drift-rail.d.ts +29 -2
- package/dist/components/drift-rail.js +3 -1
- package/dist/components/grade-atom.d.ts +1 -1
- package/dist/components/grade-atom.js +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 +1 -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 +1 -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 +1 -1
- 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/poster-tape.d.ts +15 -2
- package/dist/components/poster-tape.js +12 -3
- 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-BHdeMMiG.d.ts → place-types-C4rR3LTs.d.ts} +7 -0
- package/package.json +1 -1
- package/src/components/drift-rail.stories.tsx +29 -1
- package/src/components/drift-rail.test.tsx +125 -0
- package/src/components/drift-rail.tsx +71 -4
- package/src/components/grade-atom.test.tsx +32 -0
- package/src/components/grade-atom.tsx +8 -1
- package/src/components/poster-tape.stories.tsx +29 -0
- package/src/components/poster-tape.test.tsx +42 -0
- package/src/components/poster-tape.tsx +21 -5
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { MotionPlayPause } from './chunk-4OF4T4AI.js';
|
|
1
2
|
import { cn } from './chunk-FEK5XGZW.js';
|
|
2
3
|
import { useRef, useState, useEffect } from 'react';
|
|
3
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
6
|
var DRIFT_RAIL_DEFAULT_DURATION_SECONDS = 42;
|
|
6
7
|
var DRIFT_RAIL_RESUME_DELAY_MS = 3e3;
|
|
@@ -9,6 +10,7 @@ function DriftRail({
|
|
|
9
10
|
reverse = false,
|
|
10
11
|
durationSeconds = DRIFT_RAIL_DEFAULT_DURATION_SECONDS,
|
|
11
12
|
pauseOnHover = true,
|
|
13
|
+
labels,
|
|
12
14
|
className
|
|
13
15
|
}) {
|
|
14
16
|
const scrollerRef = useRef(null);
|
|
@@ -16,6 +18,8 @@ function DriftRail({
|
|
|
16
18
|
const [isHovered, setIsHovered] = useState(false);
|
|
17
19
|
const [inView, setInView] = useState(true);
|
|
18
20
|
const [reducedMotion, setReducedMotion] = useState(false);
|
|
21
|
+
const [isManuallyPaused, setIsManuallyPaused] = useState(false);
|
|
22
|
+
const [playPauseReplayToken, setPlayPauseReplayToken] = useState(0);
|
|
19
23
|
const heldUntil = useRef(0);
|
|
20
24
|
const mouseDrag = useRef(null);
|
|
21
25
|
const position = useRef(0);
|
|
@@ -37,14 +41,14 @@ function DriftRail({
|
|
|
37
41
|
return () => observer.disconnect();
|
|
38
42
|
}, []);
|
|
39
43
|
useEffect(() => {
|
|
40
|
-
const
|
|
44
|
+
const scroller2 = scrollerRef.current;
|
|
41
45
|
const track = trackRef.current;
|
|
42
|
-
if (!
|
|
46
|
+
if (!scroller2 || !track) return void 0;
|
|
43
47
|
let frame = 0;
|
|
44
48
|
let last = performance.now();
|
|
45
|
-
const drifting = !reducedMotion && inView && !(pauseOnHover && isHovered);
|
|
46
|
-
if (reverse &&
|
|
47
|
-
position.current =
|
|
49
|
+
const drifting = !reducedMotion && !isManuallyPaused && inView && !(pauseOnHover && isHovered);
|
|
50
|
+
if (reverse && scroller2.scrollLeft === 0) scroller2.scrollLeft = track.scrollWidth / 2;
|
|
51
|
+
position.current = scroller2.scrollLeft;
|
|
48
52
|
const tick = (now) => {
|
|
49
53
|
const half = track.scrollWidth / 2;
|
|
50
54
|
if (half > 0) {
|
|
@@ -54,7 +58,7 @@ function DriftRail({
|
|
|
54
58
|
const delta = perSecond * (now - last) / 1e3;
|
|
55
59
|
position.current += reverse ? -delta : delta;
|
|
56
60
|
} else {
|
|
57
|
-
position.current =
|
|
61
|
+
position.current = scroller2.scrollLeft;
|
|
58
62
|
}
|
|
59
63
|
let wrapped = false;
|
|
60
64
|
if (position.current >= half) {
|
|
@@ -64,14 +68,14 @@ function DriftRail({
|
|
|
64
68
|
position.current += half;
|
|
65
69
|
wrapped = true;
|
|
66
70
|
}
|
|
67
|
-
if (driftingNow || wrapped)
|
|
71
|
+
if (driftingNow || wrapped) scroller2.scrollLeft = position.current;
|
|
68
72
|
}
|
|
69
73
|
last = now;
|
|
70
74
|
frame = requestAnimationFrame(tick);
|
|
71
75
|
};
|
|
72
76
|
frame = requestAnimationFrame(tick);
|
|
73
77
|
return () => cancelAnimationFrame(frame);
|
|
74
|
-
}, [durationSeconds, inView, isHovered, pauseOnHover, reducedMotion, reverse]);
|
|
78
|
+
}, [durationSeconds, inView, isHovered, isManuallyPaused, pauseOnHover, reducedMotion, reverse]);
|
|
75
79
|
const hold = () => {
|
|
76
80
|
heldUntil.current = Number.POSITIVE_INFINITY;
|
|
77
81
|
};
|
|
@@ -114,7 +118,7 @@ function DriftRail({
|
|
|
114
118
|
event.stopPropagation();
|
|
115
119
|
}
|
|
116
120
|
};
|
|
117
|
-
|
|
121
|
+
const scroller = /* @__PURE__ */ jsx(
|
|
118
122
|
"div",
|
|
119
123
|
{
|
|
120
124
|
ref: scrollerRef,
|
|
@@ -136,10 +140,33 @@ function DriftRail({
|
|
|
136
140
|
),
|
|
137
141
|
children: /* @__PURE__ */ jsxs("div", { ref: trackRef, className: "flex w-max items-stretch gap-3.5", children: [
|
|
138
142
|
children,
|
|
139
|
-
/* @__PURE__ */ jsx("div", { className: "contents", "aria-hidden": "true", children })
|
|
143
|
+
/* @__PURE__ */ jsx("div", { className: "contents", "aria-hidden": "true", inert: true, children })
|
|
140
144
|
] })
|
|
141
145
|
}
|
|
142
146
|
);
|
|
147
|
+
if (!labels || reducedMotion) return scroller;
|
|
148
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
149
|
+
scroller,
|
|
150
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
|
|
151
|
+
"button",
|
|
152
|
+
{
|
|
153
|
+
type: "button",
|
|
154
|
+
onClick: () => setIsManuallyPaused((current) => !current),
|
|
155
|
+
onPointerDown: () => setPlayPauseReplayToken((n) => n + 1),
|
|
156
|
+
"aria-label": isManuallyPaused ? labels.play : labels.pause,
|
|
157
|
+
"aria-pressed": isManuallyPaused,
|
|
158
|
+
className: "flex h-11 w-11 shrink-0 cursor-pointer items-center justify-center rounded-full 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 focus-visible:ring-offset-2 motion-reduce:transition-none",
|
|
159
|
+
children: /* @__PURE__ */ jsx(
|
|
160
|
+
MotionPlayPause,
|
|
161
|
+
{
|
|
162
|
+
active: !isManuallyPaused,
|
|
163
|
+
replayToken: playPauseReplayToken,
|
|
164
|
+
className: "size-4"
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
}
|
|
168
|
+
) })
|
|
169
|
+
] });
|
|
143
170
|
}
|
|
144
171
|
|
|
145
172
|
export { DriftRail };
|
|
@@ -94,7 +94,7 @@ function GradeAtom({
|
|
|
94
94
|
);
|
|
95
95
|
}
|
|
96
96
|
const band = resolveGradeBand(overall);
|
|
97
|
-
const value = formatGrade(overall);
|
|
97
|
+
const value = labels.value ? labels.value(Math.round(Math.min(10, Math.max(1, overall)) * 10) / 10) : formatGrade(overall);
|
|
98
98
|
const descriptor = labels.bands[band];
|
|
99
99
|
const showDesc = sz.showDesc && !hideDescriptor;
|
|
100
100
|
const photo = onPhoto ? BAND_CLASSES_PHOTO[band] : null;
|
|
@@ -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" | "destructive" | "
|
|
7
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | "glass" | "overlay" | "brown" | "warning" | "success" | "onPrimary" | null | undefined;
|
|
8
8
|
live?: boolean | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | "glass" | "overlay" | "ink" | "brown" | "warning" | null | undefined;
|
|
7
7
|
size?: "default" | "xs" | "sm" | "lg" | "pill" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
8
8
|
fullWidth?: boolean | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
@@ -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" | "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" | "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>>;
|
|
@@ -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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
7
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
8
8
|
ref?: React.Ref<HTMLDivElement>;
|
|
9
9
|
} & {
|
|
10
10
|
asChild?: boolean;
|
|
11
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
11
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
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
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
37
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
38
38
|
ref?: React.Ref<HTMLDivElement>;
|
|
39
39
|
} & {
|
|
40
40
|
asChild?: boolean;
|
|
41
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
41
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
46
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
47
47
|
ref?: React.Ref<HTMLDivElement>;
|
|
48
48
|
} & {
|
|
49
49
|
asChild?: boolean;
|
|
50
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
50
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & 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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
53
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
54
54
|
ref?: React.Ref<HTMLDivElement>;
|
|
55
55
|
} & {
|
|
56
56
|
asChild?: boolean;
|
|
57
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
57
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
63
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
64
64
|
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
} & {
|
|
66
66
|
asChild?: boolean;
|
|
67
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
67
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
72
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
73
73
|
ref?: React.Ref<HTMLDivElement>;
|
|
74
74
|
} & {
|
|
75
75
|
asChild?: boolean;
|
|
76
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
76
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
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>, keyof React.HTMLAttributes<HTMLDivElement
|
|
81
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
82
82
|
ref?: React.Ref<HTMLDivElement>;
|
|
83
83
|
} & {
|
|
84
84
|
asChild?: boolean;
|
|
85
|
-
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild"
|
|
85
|
+
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
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-C4rR3LTs.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -26,7 +26,28 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
26
26
|
* work nobody can see. `prefers-reduced-motion` removes the drift entirely;
|
|
27
27
|
* the rail stays scrollable by hand, which is more than the static strip it
|
|
28
28
|
* used to collapse to.
|
|
29
|
+
*
|
|
30
|
+
* THE READER CAN STOP IT FOR GOOD. Hover and touch are holds; a rail that
|
|
31
|
+
* drifts for longer than five seconds also needs a control the reader can
|
|
32
|
+
* press (WCAG 2.2.2), and a low-vision reader who cannot follow the motion
|
|
33
|
+
* needs it to stay stopped. Pass `labels` and the rail renders a pause/play
|
|
34
|
+
* toggle under its right edge — the same latch, glyph and 44px target as
|
|
35
|
+
* `WeekendPanel`'s, so the hub's rails all answer to one control. It is not
|
|
36
|
+
* rendered under `prefers-reduced-motion`, where there is nothing to stop.
|
|
37
|
+
*
|
|
38
|
+
* THE DUPLICATE IS INERT. The second copy is what makes the loop seamless,
|
|
39
|
+
* but its links are the same links again: `aria-hidden` kept them out of the
|
|
40
|
+
* accessibility tree and left them in the tab order, so a keyboard reader
|
|
41
|
+
* tabbed through every item twice. `inert` removes them from focus and
|
|
42
|
+
* hit-testing as well.
|
|
29
43
|
*/
|
|
44
|
+
/** Accessible names for the pause/play toggle, injected so the DS owns no copy. */
|
|
45
|
+
type DriftRailLabels = {
|
|
46
|
+
/** Name announced while the rail drifts (the button pauses it). */
|
|
47
|
+
pause: string;
|
|
48
|
+
/** Name announced while the rail is paused (the button resumes it). */
|
|
49
|
+
play: string;
|
|
50
|
+
};
|
|
30
51
|
type DriftRailProps = {
|
|
31
52
|
children: React.ReactNode;
|
|
32
53
|
/** Runs the loop right-to-left instead of left-to-right. */
|
|
@@ -35,8 +56,14 @@ type DriftRailProps = {
|
|
|
35
56
|
durationSeconds?: number;
|
|
36
57
|
/** Pauses the loop while the pointer hovers the rail. */
|
|
37
58
|
pauseOnHover?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Accessible names for the pause/play toggle. When given, the toggle
|
|
61
|
+
* renders whenever the rail drifts (never under `prefers-reduced-motion`);
|
|
62
|
+
* without it there is no control, as before.
|
|
63
|
+
*/
|
|
64
|
+
labels?: DriftRailLabels;
|
|
38
65
|
className?: string;
|
|
39
66
|
};
|
|
40
|
-
declare function DriftRail({ children, reverse, durationSeconds, pauseOnHover, className, }: DriftRailProps): react_jsx_runtime.JSX.Element;
|
|
67
|
+
declare function DriftRail({ children, reverse, durationSeconds, pauseOnHover, labels, className, }: DriftRailProps): react_jsx_runtime.JSX.Element;
|
|
41
68
|
|
|
42
|
-
export { DriftRail, type DriftRailProps };
|
|
69
|
+
export { DriftRail, type DriftRailLabels, type DriftRailProps };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import '../lib/grade.js';
|
|
3
|
-
export { G as GradeAtom, h as GradeAtomLabels, i as GradeAtomProps, j as GradeAtomSize } from '../place-types-
|
|
3
|
+
export { G as GradeAtom, h as GradeAtomLabels, i as GradeAtomProps, j as GradeAtomSize } from '../place-types-C4rR3LTs.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" | "outline" | "muted" | 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" | "outline" | "muted" | 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, a as PlaceGradeDimensions } from '../place-types-
|
|
4
|
+
import { P as PlacePreview, C as CitedText, a as PlaceGradeDimensions } from '../place-types-C4rR3LTs.js';
|
|
5
5
|
import { VenueGradeDimensionKey } from './venue-grade-dimensions.js';
|
|
6
6
|
import '../lib/grade.js';
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ 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
4
|
import 'react';
|
|
5
|
-
import '../place-types-
|
|
5
|
+
import '../place-types-C4rR3LTs.js';
|
|
6
6
|
import '../lib/grade.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -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-C4rR3LTs.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-C4rR3LTs.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-C4rR3LTs.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-C4rR3LTs.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 { MenuKitchenPreview, MenuLinkComponent, MenuLinkProps } from './menu-types.js';
|
|
3
3
|
import 'react';
|
|
4
|
-
import '../place-types-
|
|
4
|
+
import '../place-types-C4rR3LTs.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -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-C4rR3LTs.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-C4rR3LTs.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-C4rR3LTs.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, b as PlaceAboutTabLabels, c as PlaceLinkKind } from '../place-types-
|
|
2
|
+
import { P as PlacePreview, b as PlaceAboutTabLabels, c as PlaceLinkKind } from '../place-types-C4rR3LTs.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, d as PlaceCardLabels } from '../place-types-
|
|
4
|
+
import { P as PlacePreview, d as PlaceCardLabels } from '../place-types-C4rR3LTs.js';
|
|
5
5
|
import '../lib/grade.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OVERLAY_PILL } from '../chunk-EZG2NELX.js';
|
|
2
2
|
import { HOVER_IMAGE_MOTION, HOVER_IMAGE_WRAPPER, HOVER_MOTION, HOVER_LIFT_GRID_GROUP } from '../chunk-XCB3F6SF.js';
|
|
3
3
|
import { NEUTRAL_ICON_FILTER } from '../chunk-LQWGZIYA.js';
|
|
4
|
-
import { GradeAtom } from '../chunk-
|
|
4
|
+
import { GradeAtom } from '../chunk-YE4ZQUTI.js';
|
|
5
5
|
import { showsGradeAtom } from '../chunk-I5V446BX.js';
|
|
6
6
|
import { Separator } from '../chunk-NWZGSLPU.js';
|
|
7
7
|
import { springSnappy } from '../chunk-OIV7B44M.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { P as PlacePreview, e as PlaceDetailsMobileLabels } from '../place-types-
|
|
2
|
+
import { P as PlacePreview, e as PlaceDetailsMobileLabels } from '../place-types-C4rR3LTs.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 { f as PlaceSchedule, g as PlaceScheduleWeekLabels } from '../place-types-
|
|
2
|
+
import { f as PlaceSchedule, g as PlaceScheduleWeekLabels } from '../place-types-C4rR3LTs.js';
|
|
3
3
|
import '../lib/grade.js';
|
|
4
4
|
|
|
5
5
|
interface PlaceScheduleWeekProps {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { C as CitedText, k as CitedValue, M as MenuSizeAndPrice, b as PlaceAboutTabLabels, d as PlaceCardLabels, e as PlaceDetailsMobileLabels, l as PlaceGrade, a as PlaceGradeDimensions, m as PlaceHourBlock, c as PlaceLinkKind, n as PlaceMustTry, P as PlacePreview, o as PlacePriceRange, p as PlaceReviewsDigest, f as PlaceSchedule, g as PlaceScheduleWeekLabels, W as WeekdayKey } from '../place-types-
|
|
1
|
+
export { C as CitedText, k as CitedValue, M as MenuSizeAndPrice, b as PlaceAboutTabLabels, d as PlaceCardLabels, e as PlaceDetailsMobileLabels, l as PlaceGrade, a as PlaceGradeDimensions, m as PlaceHourBlock, c as PlaceLinkKind, n as PlaceMustTry, P as PlacePreview, o as PlacePriceRange, p as PlaceReviewsDigest, f as PlaceSchedule, g as PlaceScheduleWeekLabels, W as WeekdayKey } from '../place-types-C4rR3LTs.js';
|
|
2
2
|
import 'react/jsx-runtime';
|
|
3
3
|
import '../lib/grade.js';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { DriftRailLabels } from './drift-rail.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* PosterTape — the closing marquee: small 4:5 posters drifting past at a
|
|
@@ -12,8 +13,18 @@ import { ReactNode } from 'react';
|
|
|
12
13
|
type PosterTapeItem = {
|
|
13
14
|
id: string;
|
|
14
15
|
title: string;
|
|
15
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Caller-composed, e.g. "Sat 5" — or "Sat 5 · 20:00" when `time` is not
|
|
18
|
+
* given. Rendered as mono, small, and truncated at the tape's width.
|
|
19
|
+
*/
|
|
16
20
|
meta: string;
|
|
21
|
+
/**
|
|
22
|
+
* The time, e.g. "20:00", rendered after `meta` and never truncated. The
|
|
23
|
+
* tape is 132px wide and a long localised date ("sâm., 5 sept. · 17:00")
|
|
24
|
+
* used to clip to "17:…" — the one figure the reader came for. Split it out
|
|
25
|
+
* and the date is what gives way.
|
|
26
|
+
*/
|
|
27
|
+
time?: string;
|
|
17
28
|
posterUrl?: string;
|
|
18
29
|
href?: string;
|
|
19
30
|
/** Rendered instead of the poster when it's absent or failed to load. Defaults to `<EventPosterFallback />`. */
|
|
@@ -29,8 +40,10 @@ type PosterTapeProps = {
|
|
|
29
40
|
/** Defaults to a plain `<a>`. Pass `next/link` in a Next app. */
|
|
30
41
|
linkComponent?: React.ComponentType<PosterTapeLinkProps>;
|
|
31
42
|
durationSeconds?: number;
|
|
43
|
+
/** Forwarded to `<DriftRail>`: names for its pause/play toggle, which renders only when given. */
|
|
44
|
+
labels?: DriftRailLabels;
|
|
32
45
|
className?: string;
|
|
33
46
|
};
|
|
34
|
-
declare function PosterTape({ items, linkComponent: LinkComponent, durationSeconds, className, }: PosterTapeProps): react_jsx_runtime.JSX.Element;
|
|
47
|
+
declare function PosterTape({ items, linkComponent: LinkComponent, durationSeconds, labels, className, }: PosterTapeProps): react_jsx_runtime.JSX.Element;
|
|
35
48
|
|
|
36
49
|
export { PosterTape, type PosterTapeItem, type PosterTapeLinkProps, type PosterTapeProps };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { DriftRail } from '../chunk-
|
|
1
|
+
import { DriftRail } from '../chunk-I4RUOAU7.js';
|
|
2
|
+
import '../chunk-4OF4T4AI.js';
|
|
3
|
+
import '../chunk-L3VEMP5A.js';
|
|
2
4
|
import { EventPosterFallback } from '../chunk-FDITZ2VM.js';
|
|
3
5
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
4
6
|
import { __objRest, __spreadValues } from '../chunk-MMUBH76A.js';
|
|
@@ -34,7 +36,13 @@ function PosterTapeItemCard({
|
|
|
34
36
|
)
|
|
35
37
|
) : (_a = item.fallback) != null ? _a : /* @__PURE__ */ jsx(EventPosterFallback, {}) }),
|
|
36
38
|
/* @__PURE__ */ jsx("div", { className: "mt-1.5 text-[11px] font-semibold leading-[1.3] sm:mt-[7px] sm:text-[11.5px]", children: item.title }),
|
|
37
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "mt-0.5 flex gap-1 font-mono text-[10px] text-muted-foreground sm:text-[10.5px]", children: [
|
|
40
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: item.meta }),
|
|
41
|
+
item.time && /* @__PURE__ */ jsxs("span", { className: "shrink-0", children: [
|
|
42
|
+
"\xB7 ",
|
|
43
|
+
item.time
|
|
44
|
+
] })
|
|
45
|
+
] })
|
|
38
46
|
] });
|
|
39
47
|
const itemClasses = "block w-[132px] shrink-0";
|
|
40
48
|
if (item.href) {
|
|
@@ -56,9 +64,10 @@ function PosterTape({
|
|
|
56
64
|
items,
|
|
57
65
|
linkComponent: LinkComponent = DefaultLink,
|
|
58
66
|
durationSeconds = POSTER_TAPE_DEFAULT_DURATION_SECONDS,
|
|
67
|
+
labels,
|
|
59
68
|
className
|
|
60
69
|
}) {
|
|
61
|
-
return /* @__PURE__ */ jsx(DriftRail, { durationSeconds, className, children: items.map((item) => /* @__PURE__ */ jsx(PosterTapeItemCard, { item, LinkComponent }, item.id)) });
|
|
70
|
+
return /* @__PURE__ */ jsx(DriftRail, { durationSeconds, labels, className, children: items.map((item) => /* @__PURE__ */ jsx(PosterTapeItemCard, { item, LinkComponent }, item.id)) });
|
|
62
71
|
}
|
|
63
72
|
|
|
64
73
|
export { PosterTape };
|