@bearmenu/ui 0.8.12 → 0.8.13
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-24RFI4RQ.js → chunk-3NMG3KNA.js} +1 -1
- package/dist/{chunk-DTXNDLSE.js → chunk-FKNBZF5T.js} +15 -0
- package/dist/{chunk-7A42J73Q.js → chunk-P7XTW2CG.js} +1 -1
- package/dist/components/alert.d.ts +2 -2
- 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-rail.js +2 -2
- package/dist/components/concept-compare.js +2 -2
- package/dist/components/date-input.d.ts +1 -1
- package/dist/components/item.d.ts +2 -2
- package/dist/components/menu-family-block.js +1 -1
- package/dist/components/menu-index-list.d.ts +7 -7
- package/dist/components/menu-kitchen-list.js +1 -1
- package/dist/components/snap-rail.d.ts +0 -5
- package/dist/components/snap-rail.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 +3 -3
- package/package.json +1 -1
- package/src/components/menu-index-list.tsx +7 -7
- package/src/components/menu-kitchen-list.tsx +4 -1
- package/src/components/snap-rail.tsx +19 -0
|
@@ -72,7 +72,7 @@ function KitchenRow({
|
|
|
72
72
|
)
|
|
73
73
|
] }),
|
|
74
74
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5 lg:w-[226px] lg:flex-none", children: [
|
|
75
|
-
/* @__PURE__ */ jsx("span", { className: "truncate text-[14.5px] font-bold tracking-[-0.01em] lg:text-[15.5px]", children: place.name }),
|
|
75
|
+
/* @__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 }),
|
|
76
76
|
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1 truncate text-xs text-muted-foreground", children: [
|
|
77
77
|
place.rating && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
78
78
|
/* @__PURE__ */ jsx(Star, { className: "h-[11px] w-[11px] shrink-0", "aria-hidden": true }),
|
|
@@ -105,11 +105,26 @@ var SnapRail = React.forwardRef(
|
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
SnapRail.displayName = "SnapRail";
|
|
108
|
+
var MAX_DOTS = 12;
|
|
108
109
|
function SnapRailDots({
|
|
109
110
|
count,
|
|
110
111
|
active,
|
|
111
112
|
className
|
|
112
113
|
}) {
|
|
114
|
+
if (count > MAX_DOTS) {
|
|
115
|
+
return /* @__PURE__ */ jsxs(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
"aria-hidden": true,
|
|
119
|
+
className: cn("flex justify-center text-[11px] tabular-nums text-muted-foreground", className),
|
|
120
|
+
children: [
|
|
121
|
+
active + 1,
|
|
122
|
+
" / ",
|
|
123
|
+
count
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
113
128
|
return /* @__PURE__ */ jsx("div", { "aria-hidden": true, className: cn("flex justify-center gap-1.5", className), children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ jsx(
|
|
114
129
|
"span",
|
|
115
130
|
{
|
|
@@ -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" | "destructive" | "
|
|
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" | "destructive" | "
|
|
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>>;
|
|
@@ -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" | "warning" | "success" | "outline" | "secondary" | "glass" | "overlay" | "brown" | 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?: "default" | "destructive" | "link" | "outline" | "secondary" | "ghost" | "glass" | "overlay" | "ink" | "brown" | "antagonist" | 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?: "muted" | "outline" | "glass" | "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" | "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>,
|
|
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" | "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>,
|
|
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" | "disabled" | "value"> & {
|
|
86
86
|
disabled?: boolean;
|
|
87
87
|
onSelect?: (value: string) => void;
|
|
88
88
|
value?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ConceptCompareRail } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { ConceptCompareRail } from '../chunk-P7XTW2CG.js';
|
|
2
|
+
import '../chunk-FKNBZF5T.js';
|
|
3
3
|
import '../chunk-CNJQUHCU.js';
|
|
4
4
|
import '../chunk-FEK5XGZW.js';
|
|
5
5
|
import '../chunk-3GWWZKX7.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Separator } from '../chunk-WSRWFA6K.js';
|
|
2
|
-
import { ConceptCompareRail } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { ConceptCompareRail } from '../chunk-P7XTW2CG.js';
|
|
3
|
+
import '../chunk-FKNBZF5T.js';
|
|
4
4
|
import { PhotoGround, PHOTO_GROUND } from '../chunk-CNJQUHCU.js';
|
|
5
5
|
import { Skeleton } from '../chunk-QXHMPJ35.js';
|
|
6
6
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
declare const DateInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "
|
|
3
|
+
declare const DateInput: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "type"> & {
|
|
4
4
|
/** Native input type. Defaults to "date". */
|
|
5
5
|
type?: "date" | "datetime-local" | "time" | "month" | "week";
|
|
6
6
|
size?: "sm" | "default" | "lg";
|
|
@@ -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,4 +1,4 @@
|
|
|
1
|
-
import { MenuKitchenList } from '../chunk-
|
|
1
|
+
import { MenuKitchenList } from '../chunk-3NMG3KNA.js';
|
|
2
2
|
import { HueChip } from '../chunk-CLLY6XB3.js';
|
|
3
3
|
import { Separator } from '../chunk-WSRWFA6K.js';
|
|
4
4
|
import { PhotoGround, PHOTO_GROUND } from '../chunk-CNJQUHCU.js';
|
|
@@ -9,19 +9,19 @@ import './place-types.js';
|
|
|
9
9
|
* ## This block is why the page can afford to be progressive
|
|
10
10
|
*
|
|
11
11
|
* It carries a crawlable link to EVERY destination the city has — all
|
|
12
|
-
* thirty-eight cuisines,
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* thirty-eight cuisines, in the markup at every width. That makes it the
|
|
13
|
+
* page's entire link-equity job, which in turn means the rich cards above
|
|
14
|
+
* are free to be a swipe rail on a phone: nothing a crawler needs waits on a
|
|
15
|
+
* swipe, because it is all here.
|
|
16
16
|
*
|
|
17
17
|
* The phone's own "show all" is CSS, not markup: every row is in the DOM and
|
|
18
18
|
* the ones past `collapsedCount` are hidden below `lg` until the button is
|
|
19
19
|
* pressed. A list that mounted its tail on tap would have taken twenty-six
|
|
20
20
|
* links out of the page for the crawler that never taps.
|
|
21
21
|
*
|
|
22
|
-
* Get this backwards —
|
|
23
|
-
*
|
|
24
|
-
*
|
|
22
|
+
* Get this backwards — mount the rows behind the expander on tap — and the
|
|
23
|
+
* page silently stops linking to twenty-six pages it is supposed to be the
|
|
24
|
+
* index for.
|
|
25
25
|
*
|
|
26
26
|
* ## Ordered by count, and the counts overlap
|
|
27
27
|
*
|
|
@@ -63,11 +63,6 @@ declare const SnapRail: React.ForwardRefExoticComponent<React.HTMLAttributes<HTM
|
|
|
63
63
|
*/
|
|
64
64
|
onActiveChange?: (index: number) => void;
|
|
65
65
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
66
|
-
/**
|
|
67
|
-
* The page dots on their own, for a caller that tracks the rail through
|
|
68
|
-
* `onActiveChange` and wants the dots somewhere other than directly under it —
|
|
69
|
-
* inside a foot band, say. Decorative, as on the rail: the rail is the control.
|
|
70
|
-
*/
|
|
71
66
|
declare function SnapRailDots({ count, active, className, }: {
|
|
72
67
|
count: number;
|
|
73
68
|
active: number;
|
|
@@ -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?: "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?: "
|
|
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" | "destructive" | "
|
|
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" | "destructive" | "
|
|
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;
|
|
@@ -22,9 +22,9 @@ 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?: "
|
|
27
|
-
weight?: "bold" | "
|
|
25
|
+
variant?: "small" | "display" | "h1" | "h2" | "h3" | "h4" | "body-lg" | "body" | "body-sm" | "caption" | "label" | "overline" | null | undefined;
|
|
26
|
+
color?: "default" | "destructive" | "inherit" | "muted" | "primary" | "primary-foreground" | null | undefined;
|
|
27
|
+
weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
|
|
28
28
|
leading?: "none" | "normal" | "tight" | "snug" | "relaxed" | "loose" | null | undefined;
|
|
29
29
|
tracking?: "normal" | "tight" | "wide" | "wider" | null | undefined;
|
|
30
30
|
wrap?: "balance" | "pretty" | "nowrap" | null | undefined;
|
package/package.json
CHANGED
|
@@ -14,19 +14,19 @@ import type { MenuIndexEntry, MenuLinkComponent, MenuLinkProps } from "./menu-ty
|
|
|
14
14
|
* ## This block is why the page can afford to be progressive
|
|
15
15
|
*
|
|
16
16
|
* It carries a crawlable link to EVERY destination the city has — all
|
|
17
|
-
* thirty-eight cuisines,
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* thirty-eight cuisines, in the markup at every width. That makes it the
|
|
18
|
+
* page's entire link-equity job, which in turn means the rich cards above
|
|
19
|
+
* are free to be a swipe rail on a phone: nothing a crawler needs waits on a
|
|
20
|
+
* swipe, because it is all here.
|
|
21
21
|
*
|
|
22
22
|
* The phone's own "show all" is CSS, not markup: every row is in the DOM and
|
|
23
23
|
* the ones past `collapsedCount` are hidden below `lg` until the button is
|
|
24
24
|
* pressed. A list that mounted its tail on tap would have taken twenty-six
|
|
25
25
|
* links out of the page for the crawler that never taps.
|
|
26
26
|
*
|
|
27
|
-
* Get this backwards —
|
|
28
|
-
*
|
|
29
|
-
*
|
|
27
|
+
* Get this backwards — mount the rows behind the expander on tap — and the
|
|
28
|
+
* page silently stops linking to twenty-six pages it is supposed to be the
|
|
29
|
+
* index for.
|
|
30
30
|
*
|
|
31
31
|
* ## Ordered by count, and the counts overlap
|
|
32
32
|
*
|
|
@@ -150,7 +150,10 @@ function KitchenRow({
|
|
|
150
150
|
</span>
|
|
151
151
|
|
|
152
152
|
<div className="flex min-w-0 flex-1 flex-col gap-0.5 lg:w-[226px] lg:flex-none">
|
|
153
|
-
|
|
153
|
+
{/* One line with an ellipsis on a phone, where the row is the whole
|
|
154
|
+
width; two lines from `lg`, where the column is 226px and
|
|
155
|
+
"ADRIATICA GELATERIA ITALIANA" would otherwise lose its half. */}
|
|
156
|
+
<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">
|
|
154
157
|
{place.name}
|
|
155
158
|
</span>
|
|
156
159
|
<span className="flex items-center gap-1 truncate text-xs text-muted-foreground">
|
|
@@ -166,6 +166,14 @@ SnapRail.displayName = "SnapRail";
|
|
|
166
166
|
* `onActiveChange` and wants the dots somewhere other than directly under it —
|
|
167
167
|
* inside a foot band, say. Decorative, as on the rail: the rail is the control.
|
|
168
168
|
*/
|
|
169
|
+
/**
|
|
170
|
+
* Past this many pages the dots stop being a picture of the rail — twelve
|
|
171
|
+
* 6px dots with their gaps already run 138px, and a cuisines index has
|
|
172
|
+
* thirty-six — so the row becomes a counter, "7 / 36", which says the same
|
|
173
|
+
* two things (where, and how far) at any length.
|
|
174
|
+
*/
|
|
175
|
+
const MAX_DOTS = 12;
|
|
176
|
+
|
|
169
177
|
export function SnapRailDots({
|
|
170
178
|
count,
|
|
171
179
|
active,
|
|
@@ -175,6 +183,17 @@ export function SnapRailDots({
|
|
|
175
183
|
active: number;
|
|
176
184
|
className?: string;
|
|
177
185
|
}) {
|
|
186
|
+
if (count > MAX_DOTS) {
|
|
187
|
+
return (
|
|
188
|
+
<div
|
|
189
|
+
aria-hidden
|
|
190
|
+
className={cn("flex justify-center text-[11px] tabular-nums text-muted-foreground", className)}
|
|
191
|
+
>
|
|
192
|
+
{active + 1} / {count}
|
|
193
|
+
</div>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
|
|
178
197
|
return (
|
|
179
198
|
<div aria-hidden className={cn("flex justify-center gap-1.5", className)}>
|
|
180
199
|
{Array.from({ length: count }, (_, index) => (
|