@bearmenu/ui 0.8.9 → 0.8.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/chunk-24RFI4RQ.js +167 -0
  2. package/dist/{chunk-UKBNQO6Q.js → chunk-2CXU5WZO.js} +1 -1
  3. package/dist/chunk-2XCZJWTV.js +121 -0
  4. package/dist/{chunk-62ES6N32.js → chunk-43RC7MHY.js} +1 -1
  5. package/dist/chunk-5RWTOT5Y.js +72 -0
  6. package/dist/{chunk-Q6QH52LJ.js → chunk-6TEEY5YA.js} +2 -2
  7. package/dist/{chunk-AXV5O2IZ.js → chunk-AKQ57NXY.js} +3 -3
  8. package/dist/chunk-CLLY6XB3.js +41 -0
  9. package/dist/chunk-DTXNDLSE.js +125 -0
  10. package/dist/chunk-F6FMZJDG.js +113 -0
  11. package/dist/{chunk-2WDJR6K7.js → chunk-G7IFL4Z4.js} +4 -1
  12. package/dist/chunk-H3ZZDX5L.js +61 -0
  13. package/dist/{chunk-H3BV4VAG.js → chunk-JS3EINZD.js} +2 -2
  14. package/dist/chunk-MZL7CGCL.js +109 -0
  15. package/dist/{chunk-TH6W2PWG.js → chunk-UDTG3RSE.js} +1 -1
  16. package/dist/chunk-WCTHZKU7.js +37 -0
  17. package/dist/{chunk-TT3WFS6S.js → chunk-YOKHBAIH.js} +11 -11
  18. package/dist/components/alert-dialog.js +1 -1
  19. package/dist/components/alert.d.ts +2 -2
  20. package/dist/components/avatar.d.ts +3 -3
  21. package/dist/components/badge.d.ts +1 -1
  22. package/dist/components/badge.js +1 -1
  23. package/dist/components/button.d.ts +2 -2
  24. package/dist/components/button.js +1 -1
  25. package/dist/components/calendar.js +1 -1
  26. package/dist/components/card.d.ts +4 -4
  27. package/dist/components/carousel.js +1 -1
  28. package/dist/components/combobox.js +1 -1
  29. package/dist/components/command.d.ts +2 -2
  30. package/dist/components/concept-compare-rail.d.ts +50 -0
  31. package/dist/components/concept-compare-rail.js +5 -0
  32. package/dist/components/concept-compare.d.ts +75 -38
  33. package/dist/components/concept-compare.js +209 -133
  34. package/dist/components/concept-convergence.d.ts +41 -0
  35. package/dist/components/concept-convergence.js +53 -0
  36. package/dist/components/convergence.d.ts +25 -0
  37. package/dist/components/convergence.js +4 -0
  38. package/dist/components/dialog.d.ts +2 -2
  39. package/dist/components/empty-state.js +1 -1
  40. package/dist/components/event-card.js +1 -1
  41. package/dist/components/event-compact-row.js +1 -1
  42. package/dist/components/event-detail-panel.js +2 -2
  43. package/dist/components/event-index-row.js +1 -1
  44. package/dist/components/event-list-row-wide.js +2 -2
  45. package/dist/components/event-list-row.js +2 -2
  46. package/dist/components/explainer-steps.d.ts +34 -0
  47. package/dist/components/explainer-steps.js +36 -0
  48. package/dist/components/filter-category-row.js +1 -1
  49. package/dist/components/glass-ground.d.ts +61 -0
  50. package/dist/components/glass-ground.js +3 -0
  51. package/dist/components/haptic-button.js +1 -1
  52. package/dist/components/hub-surface.js +11 -1
  53. package/dist/components/hue-chip.d.ts +70 -0
  54. package/dist/components/hue-chip.js +3 -0
  55. package/dist/components/input-group.d.ts +2 -2
  56. package/dist/components/input.d.ts +1 -1
  57. package/dist/components/item.d.ts +4 -4
  58. package/dist/components/kbd.d.ts +2 -2
  59. package/dist/components/kitchen-dossier.d.ts +88 -0
  60. package/dist/components/kitchen-dossier.js +186 -0
  61. package/dist/components/link-button.js +1 -1
  62. package/dist/components/menu-dead-end.d.ts +56 -0
  63. package/dist/components/menu-dead-end.js +49 -0
  64. package/dist/components/menu-family-block.d.ts +98 -0
  65. package/dist/components/menu-family-block.js +153 -0
  66. package/dist/components/menu-family-card.d.ts +33 -27
  67. package/dist/components/menu-family-card.js +41 -85
  68. package/dist/components/menu-field.js +92 -2
  69. package/dist/components/menu-filter-chips.d.ts +86 -0
  70. package/dist/components/menu-filter-chips.js +122 -0
  71. package/dist/components/menu-group-rows.d.ts +53 -0
  72. package/dist/components/menu-group-rows.js +67 -0
  73. package/dist/components/menu-hub-hero.js +10 -5
  74. package/dist/components/menu-index-header.d.ts +37 -0
  75. package/dist/components/menu-index-header.js +68 -0
  76. package/dist/components/menu-index-list.d.ts +48 -0
  77. package/dist/components/menu-index-list.js +96 -0
  78. package/dist/components/menu-intent-hero.d.ts +69 -0
  79. package/dist/components/menu-intent-hero.js +87 -0
  80. package/dist/components/menu-item.js +3 -3
  81. package/dist/components/menu-kitchen-list.d.ts +82 -0
  82. package/dist/components/menu-kitchen-list.js +5 -0
  83. package/dist/components/menu-mocks.d.ts +37 -2
  84. package/dist/components/menu-mocks.js +152 -27
  85. package/dist/components/menu-types.d.ts +182 -6
  86. package/dist/components/motion-icon-controls.js +2 -2
  87. package/dist/components/motion-icon-set.js +6 -6
  88. package/dist/components/motion-icon.d.ts +22 -1
  89. package/dist/components/motion-icon.js +1 -1
  90. package/dist/components/multi-select-combobox.js +2 -2
  91. package/dist/components/native-select.d.ts +2 -2
  92. package/dist/components/pagination.js +1 -1
  93. package/dist/components/photo-ground.d.ts +64 -0
  94. package/dist/components/photo-ground.js +3 -0
  95. package/dist/components/place-about-tab.js +2 -2
  96. package/dist/components/place-details-mobile.js +3 -3
  97. package/dist/components/place-types.d.ts +2 -2
  98. package/dist/components/qa-block.d.ts +36 -0
  99. package/dist/components/qa-block.js +24 -0
  100. package/dist/components/scroll-fade.js +3 -121
  101. package/dist/components/searchable-select.js +1 -1
  102. package/dist/components/select.d.ts +1 -1
  103. package/dist/components/signature-chip.d.ts +2 -2
  104. package/dist/components/signature-chip.js +2 -2
  105. package/dist/components/sliding-panels.js +1 -1
  106. package/dist/components/snap-rail.d.ts +26 -3
  107. package/dist/components/snap-rail.js +3 -109
  108. package/dist/components/spinner.d.ts +4 -4
  109. package/dist/components/story.d.ts +34 -0
  110. package/dist/components/story.js +3 -0
  111. package/dist/components/tag.d.ts +4 -4
  112. package/dist/components/text.d.ts +5 -5
  113. package/dist/components/toggle.d.ts +1 -1
  114. package/dist/components/top-comparison.d.ts +28 -0
  115. package/dist/components/top-comparison.js +76 -0
  116. package/dist/components/top-cross-link.d.ts +34 -0
  117. package/dist/components/top-cross-link.js +101 -0
  118. package/dist/components/top-ranking-entry.d.ts +53 -0
  119. package/dist/components/top-ranking-entry.js +217 -0
  120. package/dist/components/top-ranking-hero.d.ts +61 -0
  121. package/dist/components/top-ranking-hero.js +99 -0
  122. package/dist/components/top-ranking-legend.d.ts +69 -0
  123. package/dist/components/top-ranking-legend.js +124 -0
  124. package/dist/components/top-types.d.ts +109 -0
  125. package/dist/components/top-types.js +1 -0
  126. package/dist/components/venue-grade-dimensions.d.ts +3 -1
  127. package/dist/components/venue-grade-dimensions.js +1 -1
  128. package/dist/components/venue-quotes.d.ts +1 -1
  129. package/dist/components/venue-quotes.js +1 -1
  130. package/dist/components/venue-wall.js +5 -3
  131. package/dist/components/weekday-theme-banner.js +1 -1
  132. package/dist/components/weekend-panel.js +2 -2
  133. package/package.json +1 -1
  134. package/src/components/badge.tsx +1 -1
  135. package/src/components/button.tsx +2 -2
  136. package/src/components/concept-compare-rail.tsx +132 -0
  137. package/src/components/concept-compare.stories.tsx +122 -54
  138. package/src/components/concept-compare.tsx +368 -196
  139. package/src/components/concept-convergence.stories.tsx +53 -0
  140. package/src/components/concept-convergence.tsx +90 -0
  141. package/src/components/convergence.stories.tsx +54 -0
  142. package/src/components/convergence.tsx +177 -0
  143. package/src/components/explainer-steps.stories.tsx +46 -0
  144. package/src/components/explainer-steps.tsx +74 -0
  145. package/src/components/glass-ground.tsx +104 -0
  146. package/src/components/hub-surface.tsx +11 -1
  147. package/src/components/hue-chip.stories.tsx +76 -0
  148. package/src/components/hue-chip.test.tsx +62 -0
  149. package/src/components/hue-chip.tsx +99 -0
  150. package/src/components/kitchen-dossier.stories.tsx +108 -0
  151. package/src/components/kitchen-dossier.tsx +321 -0
  152. package/src/components/menu-dead-end.stories.tsx +67 -0
  153. package/src/components/menu-dead-end.tsx +127 -0
  154. package/src/components/menu-family-block.stories.tsx +91 -0
  155. package/src/components/menu-family-block.tsx +303 -0
  156. package/src/components/menu-family-card.stories.tsx +43 -35
  157. package/src/components/menu-family-card.tsx +115 -142
  158. package/src/components/menu-filter-chips.stories.tsx +107 -0
  159. package/src/components/menu-filter-chips.tsx +238 -0
  160. package/src/components/menu-group-rows.stories.tsx +54 -0
  161. package/src/components/menu-group-rows.tsx +133 -0
  162. package/src/components/menu-hub-hero.test.tsx +39 -0
  163. package/src/components/menu-hub-hero.tsx +17 -5
  164. package/src/components/menu-index-header.stories.tsx +72 -0
  165. package/src/components/menu-index-header.tsx +125 -0
  166. package/src/components/menu-index-list.stories.tsx +50 -0
  167. package/src/components/menu-index-list.tsx +149 -0
  168. package/src/components/menu-intent-hero.stories.tsx +67 -0
  169. package/src/components/menu-intent-hero.tsx +189 -0
  170. package/src/components/menu-kitchen-list.stories.tsx +67 -0
  171. package/src/components/menu-kitchen-list.test.tsx +78 -0
  172. package/src/components/menu-kitchen-list.tsx +284 -0
  173. package/src/components/menu-mocks.ts +198 -23
  174. package/src/components/menu-types.ts +189 -6
  175. package/src/components/motion-icon-controls.tsx +11 -11
  176. package/src/components/motion-icon-set.tsx +6 -5
  177. package/src/components/motion-icon.test.tsx +23 -1
  178. package/src/components/motion-icon.tsx +20 -0
  179. package/src/components/photo-ground.tsx +147 -0
  180. package/src/components/place-types.ts +2 -2
  181. package/src/components/qa-block.stories.tsx +43 -0
  182. package/src/components/qa-block.tsx +60 -0
  183. package/src/components/signature-chip.tsx +3 -3
  184. package/src/components/snap-rail.tsx +58 -15
  185. package/src/components/story.tsx +225 -0
  186. package/src/components/top-comparison.stories.tsx +78 -0
  187. package/src/components/top-comparison.tsx +151 -0
  188. package/src/components/top-cross-link.stories.tsx +84 -0
  189. package/src/components/top-cross-link.tsx +171 -0
  190. package/src/components/top-ranking-entry.stories.tsx +171 -0
  191. package/src/components/top-ranking-entry.test.tsx +105 -0
  192. package/src/components/top-ranking-entry.tsx +425 -0
  193. package/src/components/top-ranking-hero.stories.tsx +76 -0
  194. package/src/components/top-ranking-hero.tsx +218 -0
  195. package/src/components/top-ranking-legend.stories.tsx +78 -0
  196. package/src/components/top-ranking-legend.tsx +239 -0
  197. package/src/components/top-types.ts +110 -0
  198. package/src/components/venue-grade-dimensions.tsx +2 -2
  199. package/src/components/venue-quotes.stories.tsx +1 -1
  200. package/src/components/venue-quotes.tsx +4 -2
  201. package/src/components/venue-wall.tsx +9 -4
  202. package/src/components/weekday-theme-banner.tsx +1 -1
  203. package/dist/chunk-THOVPZNN.js +0 -37
  204. package/dist/chunk-YS6BHKZO.js +0 -92
  205. package/dist/components/ranked-venue-list.d.ts +0 -49
  206. package/dist/components/ranked-venue-list.js +0 -87
  207. package/dist/components/signature-line-list.d.ts +0 -45
  208. package/dist/components/signature-line-list.js +0 -99
  209. package/dist/components/venue-busyness-strip.d.ts +0 -35
  210. package/dist/components/venue-busyness-strip.js +0 -37
  211. package/dist/components/venue-signature-block.d.ts +0 -39
  212. package/dist/components/venue-signature-block.js +0 -6
  213. package/dist/components/venue-spotlight.d.ts +0 -74
  214. package/dist/components/venue-spotlight.js +0 -138
  215. package/src/components/ranked-venue-list.stories.tsx +0 -80
  216. package/src/components/ranked-venue-list.tsx +0 -177
  217. package/src/components/signature-line-list.stories.tsx +0 -85
  218. package/src/components/signature-line-list.tsx +0 -136
  219. package/src/components/venue-busyness-strip.stories.tsx +0 -66
  220. package/src/components/venue-busyness-strip.tsx +0 -64
  221. package/src/components/venue-signature-block.stories.tsx +0 -68
  222. package/src/components/venue-signature-block.tsx +0 -71
  223. package/src/components/venue-spotlight.stories.tsx +0 -141
  224. package/src/components/venue-spotlight.tsx +0 -236
  225. package/dist/{chunk-XWMRABZW.js → chunk-HSIYYA2E.js} +1 -1
@@ -1,35 +1,108 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react";
2
- import { Button } from "./button";
3
2
  import { ConceptCompare } from "./concept-compare";
4
- import { mockConcept, mockGradients } from "./menu-mocks";
3
+ import { mockConcept } from "./menu-mocks";
4
+ import type { MenuConceptRow } from "./menu-types";
5
5
 
6
6
  const labels = {
7
7
  kind: "DISH CONCEPT",
8
- alias: "ON THEIR MENU AS",
9
- perPortion: "per portion",
10
- cheapest: "cheapest shown",
11
- };
12
-
13
- const itemLabels = {
14
- currency: "lei",
8
+ cheapest: "Cheapest",
15
9
  mentions: (count: number) => `${count} mentions`,
16
- signature: "SIGNATURE",
17
- mentioned: "MENTIONED",
10
+ openRoom: (alias: string, venue: string) => `${alias} at ${venue}`,
18
11
  };
19
12
 
20
13
  const formatPrice = (amount: number) => `${amount} lei`;
21
14
 
22
- const hrefs = Object.fromEntries(
23
- (mockConcept.rows ?? []).map((row) => [row.place_slug, `/places/${row.place_slug}`])
15
+ /** A stand-in venue photograph with enough variance that the ink bands have something to sit on. */
16
+ function room(hue: number, label: string) {
17
+ return (
18
+ "data:image/svg+xml;utf8," +
19
+ encodeURIComponent(
20
+ `<svg xmlns="http://www.w3.org/2000/svg" width="480" height="640"><defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="hsl(${hue} 28% 60%)"/><stop offset="1" stop-color="hsl(${hue} 22% 26%)"/></linearGradient></defs><rect width="480" height="640" fill="url(#g)"/><circle cx="140" cy="150" r="70" fill="hsl(${hue} 40% 82%)" opacity=".55"/><rect x="240" y="360" width="200" height="140" fill="hsl(${hue} 15% 18%)" opacity=".7"/><text x="50%" y="92%" font-family="monospace" font-size="20" fill="#fff" text-anchor="middle">${label}</text></svg>`
21
+ )
22
+ );
23
+ }
24
+
25
+ const rooms: MenuConceptRow[] = [
26
+ {
27
+ place_slug: "casa-maramureseana",
28
+ place_name: "Casa Maramureșeană",
29
+ alias: "Papanași cu Smântână și Dulceață",
30
+ price: 29,
31
+ mentions: 12,
32
+ rating: 4.5,
33
+ place_area: "Centru",
34
+ place_thumbnail_url: room(30, "room 1"),
35
+ },
36
+ {
37
+ place_slug: "maimuta-plangatoare",
38
+ place_name: "Maimuța Plângătoare",
39
+ alias: "Papanasi cu Gem si Smantana",
40
+ price: 31,
41
+ mentions: 19,
42
+ rating: 4.5,
43
+ place_area: "Centru",
44
+ place_thumbnail_url: room(200, "room 2"),
45
+ },
46
+ {
47
+ place_slug: "cafe-bulgakov",
48
+ place_name: "Café Bulgakov",
49
+ alias: "Papanași",
50
+ price: 32,
51
+ mentions: 12,
52
+ rating: 4.6,
53
+ place_area: "Centru",
54
+ place_thumbnail_url: room(90, "room 3"),
55
+ },
56
+ {
57
+ place_slug: "garlic",
58
+ place_name: "GARLIC - bites&tales",
59
+ alias: "Papanași în Țeapă",
60
+ price: 38,
61
+ mentions: 12,
62
+ rating: 4.7,
63
+ place_area: "Centru",
64
+ place_thumbnail_url: room(300, "room 4"),
65
+ },
66
+ ];
67
+
68
+ const concept = { ...mockConcept, slug: "papanasi", title: "Papanași", rows: rooms };
69
+
70
+ const figures = [
71
+ { value: "45", label: "kitchens" },
72
+ { value: "29–52", label: "lei across them", accent: true },
73
+ { value: "167", label: "mentions" },
74
+ { value: "8", label: "names" },
75
+ ];
76
+
77
+ const hrefs = Object.fromEntries(rooms.map((r) => [r.place_slug, `/places/${r.place_slug}`]));
78
+
79
+ const seeAll = (
80
+ <a
81
+ href="/menu/dishes/papanasi"
82
+ className="inline-flex h-10 items-center justify-center gap-1.5 rounded-full border border-white/20 bg-white/[0.16] px-4 text-[13.5px] font-bold text-white"
83
+ >
84
+ See all 45 kitchens
85
+ </a>
24
86
  );
25
87
 
26
88
  const meta: Meta<typeof ConceptCompare> = {
27
89
  title: "Menu/ConceptCompare",
28
90
  component: ConceptCompare,
29
91
  tags: ["autodocs"],
92
+ args: {
93
+ concept,
94
+ labels,
95
+ lede: "45 kitchens make it, and they do not agree on the name",
96
+ formatPrice,
97
+ figures,
98
+ hrefs,
99
+ footnote:
100
+ "The four cheapest of the 45, priced from each menu as it stands — the dearest is 52 lei. One photograph per kitchen; no room here is a room that does not serve it.",
101
+ actions: seeAll,
102
+ },
30
103
  decorators: [
31
104
  (Story) => (
32
- <div className="w-[1000px] bg-background p-4">
105
+ <div className="w-[1100px] bg-background p-6">
33
106
  <Story />
34
107
  </div>
35
108
  ),
@@ -38,7 +111,7 @@ const meta: Meta<typeof ConceptCompare> = {
38
111
  docs: {
39
112
  description: {
40
113
  component:
41
- "One dish or drink across every kitchen that makes it, under whatever name each of them uses. The row is PLACE-LED: it leads with the venue photograph, which is real and licensed, because the reader is choosing between restaurants. A price bar was drawn here first and measured the one value already printed beside it in words. From `lg` the rows are a comparison table; below it they become the production `MenuItem`, with the kitchen's own wording as the name.",
114
+ "One dish across the kitchens that make it and **no surfaces at all**. The card is a contact sheet of venue photographs, one per room, and the three readable things float on it on ink bands: the identity across the top, each kitchen's line over its own photograph, the foot along the bottom. Read ACROSS, not down: four rooms side by side, each with its own name and price. The photographs are placed as cells of the same grid as the rooms, spanning from the head down, so the head's ink fades into them and every seam lands on a room boundary. Nothing in it is themed the edge is the only thing that adapts to the page.",
42
115
  },
43
116
  },
44
117
  },
@@ -47,39 +120,48 @@ const meta: Meta<typeof ConceptCompare> = {
47
120
  export default meta;
48
121
  type Story = StoryObj<typeof ConceptCompare>;
49
122
 
50
- export const Default: Story = {
123
+ export const Default: Story = {};
124
+
125
+ /** The same card on a dark page: identical inside, a light hairline and deeper shadow outside. */
126
+ export const DarkPage: Story = {
127
+ decorators: [
128
+ (Story) => (
129
+ <div className="dark w-[1100px] bg-background p-6">
130
+ <Story />
131
+ </div>
132
+ ),
133
+ ],
134
+ };
135
+
136
+ /** Three rooms: one across on the phone, then two. */
137
+ export const ThreeRooms: Story = {
51
138
  args: {
52
- concept: mockConcept,
53
- labels,
54
- itemLabels,
55
- formatPrice,
56
- gradient: mockGradients.pasta,
139
+ concept: { ...concept, title: "Kürtőskalács", rows: rooms.slice(0, 3) },
140
+ lede: "Three kitchens in the city make it",
57
141
  figures: [
58
- { value: "44", label: "kitchens" },
59
- { value: "8—44", label: "lei" },
60
- { value: "168", label: "mentions" },
142
+ { value: "3", label: "kitchens" },
143
+ { value: "14–19", label: "lei across them", accent: true },
144
+ { value: "11", label: "mentions" },
145
+ { value: "3", label: "names" },
61
146
  ],
62
- hrefs,
63
- footnote: "Prices read from each menu as it stands. Portions normalised where the menu states them.",
64
- actions: <Button size="sm">See all 44</Button>,
147
+ footnote:
148
+ "All three kitchens, all three rooms so the spread above is the whole spread. A concept this thin has no tail to open.",
149
+ actions: undefined,
65
150
  },
66
151
  };
67
152
 
68
- /** Below `lg` every row is a `MenuItem`, the alias leading. */
69
- export const Mobile: Story = {
153
+ /** A room with no photograph: the ground with the venue's initial, never a grey box. */
154
+ export const MissingPhoto: Story = {
70
155
  args: {
71
- concept: mockConcept,
72
- labels,
73
- itemLabels,
74
- formatPrice,
75
- gradient: mockGradients.pasta,
76
- figures: [
77
- { value: "44", label: "kitchens" },
78
- { value: "8—44", label: "lei" },
79
- { value: "168", label: "mentions" },
80
- ],
81
- hrefs,
156
+ concept: {
157
+ ...concept,
158
+ rows: rooms.map((r, i) => (i === 2 ? { ...r, place_thumbnail_url: undefined } : r)),
159
+ },
82
160
  },
161
+ };
162
+
163
+ /** 2×2 on the phone — the reading turns from across to around, but it is still four rooms in one view. */
164
+ export const Mobile: Story = {
83
165
  decorators: [
84
166
  (Story) => (
85
167
  <div className="w-[390px] bg-background p-3">
@@ -88,17 +170,3 @@ export const Mobile: Story = {
88
170
  ),
89
171
  ],
90
172
  };
91
-
92
- /** With the concept's own photograph — the one item surface that shows one. */
93
- export const WithPhoto: Story = {
94
- args: {
95
- concept: mockConcept,
96
- labels,
97
- itemLabels,
98
- formatPrice,
99
- gradient: mockGradients.pasta,
100
- imageUrl: "https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=200&h=200&fit=crop",
101
- figures: [{ value: "44", label: "kitchens" }],
102
- hrefs,
103
- },
104
- };