@bearmenu/ui 0.8.38 → 0.8.40

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.
@@ -164,21 +164,27 @@ const ResponsiveOverlay = React.forwardRef<HTMLDivElement, ResponsiveOverlayProp
164
164
  ) => {
165
165
  const isWide = useMediaQuery(wideFrom === "lg" ? DESKTOP_MEDIA_QUERY : MD_MEDIA_QUERY);
166
166
  const container: "drawer" | "dialog" | "sheet" = isWide ? desktop : "drawer";
167
- const titleId = React.useId();
168
- const subtitleId = React.useId();
169
167
  useFocusReturn(open);
170
168
 
169
+ // The name and the description are Radix's own: its `Title` and
170
+ // `Description` register ids in the dialog context and `Content` points
171
+ // `aria-labelledby` / `aria-describedby` at them. Passing our own ids
172
+ // overrode the registered one, so Radix found no title under its id and
173
+ // logged "DialogContent requires a DialogTitle" in every mode. Without a subtitle, `aria-describedby={undefined}` is Radix's
174
+ // documented opt-out, rather than a pointer at an element that never renders.
175
+ const describedBy = subtitle ? {} : { "aria-describedby": undefined };
176
+
171
177
  const Title = CONTAINER_TITLE[container];
172
178
  const Description = CONTAINER_DESCRIPTION[container];
173
179
 
174
180
  const header = (
175
181
  <div data-slot="responsive-overlay-header" className="flex items-start gap-3 px-5 pt-5">
176
182
  <div className="min-w-0 flex-1">
177
- <Title id={titleId} className="text-[19px] font-bold leading-tight">
183
+ <Title className="text-[19px] font-bold leading-tight">
178
184
  {title}
179
185
  </Title>
180
186
  {subtitle ? (
181
- <Description id={subtitleId} className="mt-1 text-[13px] text-muted-foreground">
187
+ <Description className="mt-1 text-[13px] text-muted-foreground">
182
188
  {subtitle}
183
189
  </Description>
184
190
  ) : null}
@@ -226,8 +232,7 @@ const ResponsiveOverlay = React.forwardRef<HTMLDivElement, ResponsiveOverlayProp
226
232
  attachment="inset"
227
233
  hideClose
228
234
  overlayClassName="bg-scrim-overlay backdrop-blur-none"
229
- aria-labelledby={titleId}
230
- aria-describedby={subtitle ? subtitleId : undefined}
235
+ {...describedBy}
231
236
  data-slot="responsive-overlay-sheet"
232
237
  data-modal={modal ? "true" : "false"}
233
238
  // A working rail must survive the page being used: a click on the
@@ -258,8 +263,7 @@ const ResponsiveOverlay = React.forwardRef<HTMLDivElement, ResponsiveOverlayProp
258
263
  size={size}
259
264
  showCloseButton={false}
260
265
  overlayClassName="bg-scrim-overlay backdrop-blur-none"
261
- aria-labelledby={titleId}
262
- aria-describedby={subtitle ? subtitleId : undefined}
266
+ {...describedBy}
263
267
  className={cn(
264
268
  // The dialog's own `grid gap-4 p-6` would put air between the
265
269
  // header, the body and the band the frames draw flush.
@@ -280,8 +284,7 @@ const ResponsiveOverlay = React.forwardRef<HTMLDivElement, ResponsiveOverlayProp
280
284
  <DrawerContent
281
285
  ref={ref}
282
286
  overlayClassName="bg-scrim-overlay"
283
- aria-labelledby={titleId}
284
- aria-describedby={subtitle ? subtitleId : undefined}
287
+ {...describedBy}
285
288
  className={cn("flex max-h-[85vh] flex-col p-0", className)}
286
289
  >
287
290
  {header}
package/src/globals.css CHANGED
@@ -312,6 +312,70 @@ h6 {
312
312
  than a black one before it looks dirty. */
313
313
  --icon-depth-neutral: drop-shadow(0 1px 1px oklch(0.38 0 0 / 0.29))
314
314
  drop-shadow(0 2px 4px oklch(0.38 0 0 / 0.22));
315
+
316
+ /* ─── Floor plan (5a "Jewel", contrast-corrected) ─────────────────────
317
+ The table map's status palette. 5a as drawn failed contrast (white on
318
+ booked/seated/late/blocked 2.4–4.6:1, the empty seat track 1.49:1 on the
319
+ card); these keep its hue, chroma and gradient direction and correct
320
+ lightness only. Worst point over 15–85% of each gradient: text >= 4.79:1
321
+ light / 6.29:1 dark, seats >= 3.03:1 / 3.11:1 against card and room.
322
+
323
+ Per status: `-from` / `-to` are the table fill, a horizontal gradient
324
+ inside the table's rotated group (SVG `stop-color: var(--floor-…-from)`);
325
+ `-seat` is the status overlay on the chair ring, drawn over the neutral
326
+ `--floor-seat` track; `-foreground` is the label and time on the fill.
327
+ Booked, seated, late and blocked share `--floor-on-fill-foreground`.
328
+ Halos (late, over time) pulse outside the ring; `--floor-offer` is the
329
+ dashed offer ring and `--floor-selected` the solid selection ring.
330
+ `--floor-shadow` is the flood colour of the table's three drop shadows,
331
+ their alphas multiplied by `--floor-shadow-strength`.
332
+ Tailwind: `fill-floor-*`, `stroke-floor-*`, `bg-floor-*`, `text-floor-*`. */
333
+ --floor-free-from: oklch(1 0 0);
334
+ --floor-free-to: oklch(0.955 0.012 65);
335
+ --floor-free-foreground: oklch(0.22 0.025 45);
336
+ --floor-muted-foreground: oklch(0.48 0.02 45);
337
+ --floor-seat: oklch(0.66 0.012 60);
338
+ --floor-booked-from: oklch(0.47 0.13 258);
339
+ --floor-booked-to: oklch(0.555 0.115 236);
340
+ --floor-booked-seat: oklch(0.6 0.12 248);
341
+ --floor-seated-from: oklch(0.45 0.095 163);
342
+ --floor-seated-to: oklch(0.545 0.145 150);
343
+ --floor-seated-seat: oklch(0.53 0.12 158);
344
+ --floor-over-from: oklch(0.74 0.15 62);
345
+ --floor-over-to: oklch(0.85 0.15 92);
346
+ --floor-over-seat: oklch(0.64 0.145 62);
347
+ --floor-over-foreground: oklch(0.22 0.025 45);
348
+ --floor-late-from: oklch(0.5 0.19 18);
349
+ --floor-late-to: oklch(0.57 0.18 32);
350
+ --floor-late-seat: oklch(0.56 0.19 22);
351
+ --floor-blocked-from: oklch(0.48 0.015 60);
352
+ --floor-blocked-to: oklch(0.555 0.01 70);
353
+ --floor-blocked-seat: oklch(0.6 0.012 60);
354
+ --floor-out-of-service-from: oklch(0.93 0.006 60);
355
+ --floor-out-of-service-to: oklch(0.96 0.004 70);
356
+ --floor-offline-from: oklch(0.86 0.004 60);
357
+ --floor-offline-to: oklch(0.9 0.004 70);
358
+ --floor-offline-seat: oklch(0.64 0.006 60);
359
+ --floor-offline-foreground: oklch(0.3 0.012 50);
360
+ --floor-on-fill-foreground: oklch(0.99 0.005 70);
361
+ --floor-late-halo: oklch(0.56 0.2 27);
362
+ --floor-over-halo: oklch(0.64 0.145 62);
363
+ --floor-busy: oklch(0.42 0.02 45);
364
+ --floor-error: oklch(0.56 0.2 27);
365
+ --floor-error-foreground: oklch(0.99 0 0);
366
+ --floor-offer: var(--primary);
367
+ --floor-selected: oklch(0.25 0.05 35);
368
+ --floor-room: oklch(0.99 0.005 75);
369
+ --floor-wall: oklch(0.33 0.02 45);
370
+ --floor-fixture: oklch(0.62 0.018 50);
371
+ --floor-shadow: oklch(0.222 0.036 53.5);
372
+ --floor-shadow-strength: 1;
373
+ /* Per-status foreground aliases, so a status maps to one token family. */
374
+ --floor-booked-foreground: var(--floor-on-fill-foreground);
375
+ --floor-seated-foreground: var(--floor-on-fill-foreground);
376
+ --floor-late-foreground: var(--floor-on-fill-foreground);
377
+ --floor-blocked-foreground: var(--floor-on-fill-foreground);
378
+ --floor-out-of-service-foreground: var(--floor-muted-foreground);
315
379
  }
316
380
 
317
381
  .dark {
@@ -424,6 +488,57 @@ h6 {
424
488
  pushed harder since the panel absorbs most of the shadow. */
425
489
  --icon-depth-neutral: drop-shadow(0 1px 1px oklch(0 0 0 / 0.47))
426
490
  drop-shadow(0 2px 4px oklch(0 0 0 / 0.34));
491
+
492
+ /* Floor plan, dark — derived from the light set (see :root). Fills sit
493
+ deeper, seats and halos lift off the dark card, the over-time amber keeps
494
+ dark type. The shadow goes black at twice the alpha: a warm shadow has
495
+ nothing to darken on a 0.225 room. Aliases are restated, as the sidebar's
496
+ are, so a `.dark` below the root does not inherit the light values. */
497
+ --floor-free-from: oklch(0.32 0.012 60);
498
+ --floor-free-to: oklch(0.285 0.01 60);
499
+ --floor-free-foreground: oklch(0.96 0.005 60);
500
+ --floor-muted-foreground: oklch(0.76 0.01 60);
501
+ --floor-seat: oklch(0.54 0.012 60);
502
+ --floor-booked-from: oklch(0.4 0.12 258);
503
+ --floor-booked-to: oklch(0.48 0.1 236);
504
+ --floor-booked-seat: oklch(0.64 0.12 245);
505
+ --floor-seated-from: oklch(0.39 0.082 163);
506
+ --floor-seated-to: oklch(0.475 0.125 150);
507
+ --floor-seated-seat: oklch(0.66 0.15 155);
508
+ --floor-over-from: oklch(0.7 0.14 62);
509
+ --floor-over-to: oklch(0.8 0.14 88);
510
+ --floor-over-seat: oklch(0.78 0.15 78);
511
+ --floor-over-foreground: oklch(0.2 0.03 40);
512
+ --floor-late-from: oklch(0.42 0.16 18);
513
+ --floor-late-to: oklch(0.5 0.165 30);
514
+ --floor-late-seat: oklch(0.64 0.19 25);
515
+ --floor-blocked-from: oklch(0.38 0.012 60);
516
+ --floor-blocked-to: oklch(0.44 0.01 70);
517
+ --floor-blocked-seat: oklch(0.58 0.012 60);
518
+ --floor-out-of-service-from: oklch(0.26 0.006 60);
519
+ --floor-out-of-service-to: oklch(0.24 0.005 60);
520
+ --floor-offline-from: oklch(0.3 0.004 60);
521
+ --floor-offline-to: oklch(0.27 0.004 60);
522
+ --floor-offline-seat: oklch(0.52 0.004 60);
523
+ --floor-offline-foreground: oklch(0.82 0.004 60);
524
+ --floor-on-fill-foreground: oklch(0.98 0.005 70);
525
+ --floor-late-halo: oklch(0.66 0.2 25);
526
+ --floor-over-halo: oklch(0.82 0.16 82);
527
+ --floor-busy: oklch(0.82 0.01 60);
528
+ --floor-error: oklch(0.58 0.19 25);
529
+ --floor-error-foreground: oklch(0.99 0 0);
530
+ --floor-offer: var(--primary);
531
+ --floor-selected: oklch(0.96 0.005 60);
532
+ --floor-room: oklch(0.225 0.012 45);
533
+ --floor-wall: oklch(0.78 0.01 60);
534
+ --floor-fixture: oklch(0.55 0.012 60);
535
+ --floor-shadow: oklch(0 0 0);
536
+ --floor-shadow-strength: 2;
537
+ --floor-booked-foreground: var(--floor-on-fill-foreground);
538
+ --floor-seated-foreground: var(--floor-on-fill-foreground);
539
+ --floor-late-foreground: var(--floor-on-fill-foreground);
540
+ --floor-blocked-foreground: var(--floor-on-fill-foreground);
541
+ --floor-out-of-service-foreground: var(--floor-muted-foreground);
427
542
  }
428
543
 
429
544
  /* Named 11px step (`text-2xs`) for micro-labels: overlay pills, hour
@@ -477,6 +592,52 @@ h6 {
477
592
  --color-avatar-blue: var(--avatar-blue);
478
593
  --color-avatar-violet: var(--avatar-violet);
479
594
  --color-avatar-rose: var(--avatar-rose);
595
+ /* `fill-floor-booked-from`, `stroke-floor-seat`, `text-floor-on-fill-foreground` … —
596
+ the floor plan's status palette (see `--floor-*` in :root). */
597
+ --color-floor-free-from: var(--floor-free-from);
598
+ --color-floor-free-to: var(--floor-free-to);
599
+ --color-floor-free-foreground: var(--floor-free-foreground);
600
+ --color-floor-muted-foreground: var(--floor-muted-foreground);
601
+ --color-floor-seat: var(--floor-seat);
602
+ --color-floor-booked-from: var(--floor-booked-from);
603
+ --color-floor-booked-to: var(--floor-booked-to);
604
+ --color-floor-booked-seat: var(--floor-booked-seat);
605
+ --color-floor-booked-foreground: var(--floor-booked-foreground);
606
+ --color-floor-seated-from: var(--floor-seated-from);
607
+ --color-floor-seated-to: var(--floor-seated-to);
608
+ --color-floor-seated-seat: var(--floor-seated-seat);
609
+ --color-floor-seated-foreground: var(--floor-seated-foreground);
610
+ --color-floor-over-from: var(--floor-over-from);
611
+ --color-floor-over-to: var(--floor-over-to);
612
+ --color-floor-over-seat: var(--floor-over-seat);
613
+ --color-floor-over-foreground: var(--floor-over-foreground);
614
+ --color-floor-late-from: var(--floor-late-from);
615
+ --color-floor-late-to: var(--floor-late-to);
616
+ --color-floor-late-seat: var(--floor-late-seat);
617
+ --color-floor-late-foreground: var(--floor-late-foreground);
618
+ --color-floor-blocked-from: var(--floor-blocked-from);
619
+ --color-floor-blocked-to: var(--floor-blocked-to);
620
+ --color-floor-blocked-seat: var(--floor-blocked-seat);
621
+ --color-floor-blocked-foreground: var(--floor-blocked-foreground);
622
+ --color-floor-out-of-service-from: var(--floor-out-of-service-from);
623
+ --color-floor-out-of-service-to: var(--floor-out-of-service-to);
624
+ --color-floor-out-of-service-foreground: var(--floor-out-of-service-foreground);
625
+ --color-floor-offline-from: var(--floor-offline-from);
626
+ --color-floor-offline-to: var(--floor-offline-to);
627
+ --color-floor-offline-seat: var(--floor-offline-seat);
628
+ --color-floor-offline-foreground: var(--floor-offline-foreground);
629
+ --color-floor-on-fill-foreground: var(--floor-on-fill-foreground);
630
+ --color-floor-late-halo: var(--floor-late-halo);
631
+ --color-floor-over-halo: var(--floor-over-halo);
632
+ --color-floor-busy: var(--floor-busy);
633
+ --color-floor-error: var(--floor-error);
634
+ --color-floor-error-foreground: var(--floor-error-foreground);
635
+ --color-floor-offer: var(--floor-offer);
636
+ --color-floor-selected: var(--floor-selected);
637
+ --color-floor-room: var(--floor-room);
638
+ --color-floor-wall: var(--floor-wall);
639
+ --color-floor-fixture: var(--floor-fixture);
640
+ --color-floor-shadow: var(--floor-shadow);
480
641
 
481
642
  /* Radius scale */
482
643
  --radius-sm: calc(var(--radius) - 4px);