@bearmenu/ui 0.8.22 → 0.8.23

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 (46) hide show
  1. package/dist/{chunk-DJD3EMPK.js → chunk-YE4ZQUTI.js} +1 -1
  2. package/dist/components/alert.d.ts +2 -2
  3. package/dist/components/badge.d.ts +1 -1
  4. package/dist/components/button.d.ts +1 -1
  5. package/dist/components/card.d.ts +2 -2
  6. package/dist/components/command.d.ts +15 -15
  7. package/dist/components/concept-compare.d.ts +1 -1
  8. package/dist/components/doorway-tiles.d.ts +1 -1
  9. package/dist/components/grade-atom.d.ts +1 -1
  10. package/dist/components/grade-atom.js +1 -1
  11. package/dist/components/item.d.ts +2 -2
  12. package/dist/components/kitchen-dossier.d.ts +1 -1
  13. package/dist/components/menu-dead-end.d.ts +1 -1
  14. package/dist/components/menu-family-block.d.ts +1 -1
  15. package/dist/components/menu-family-card.d.ts +1 -1
  16. package/dist/components/menu-filter-chips.d.ts +1 -1
  17. package/dist/components/menu-group-rows.d.ts +1 -1
  18. package/dist/components/menu-index-header.d.ts +1 -1
  19. package/dist/components/menu-index-list.d.ts +1 -1
  20. package/dist/components/menu-intent-hero.d.ts +1 -1
  21. package/dist/components/menu-item.d.ts +1 -1
  22. package/dist/components/menu-kitchen-list.d.ts +1 -1
  23. package/dist/components/menu-mocks.d.ts +1 -1
  24. package/dist/components/menu-types.d.ts +1 -1
  25. package/dist/components/open-now-list.d.ts +1 -1
  26. package/dist/components/place-about-tab.d.ts +1 -1
  27. package/dist/components/place-card.d.ts +1 -1
  28. package/dist/components/place-card.js +1 -1
  29. package/dist/components/place-details-mobile.d.ts +1 -1
  30. package/dist/components/place-schedule-week.d.ts +1 -1
  31. package/dist/components/place-types.d.ts +1 -1
  32. package/dist/components/qa-block.d.ts +1 -1
  33. package/dist/components/tag.d.ts +2 -2
  34. package/dist/components/text.d.ts +2 -2
  35. package/dist/components/top-comparison.d.ts +1 -1
  36. package/dist/components/top-cross-link.d.ts +1 -1
  37. package/dist/components/top-ranking-entry.d.ts +1 -1
  38. package/dist/components/top-ranking-hero.d.ts +1 -1
  39. package/dist/components/top-types.d.ts +1 -1
  40. package/dist/components/venue-grade-dimensions.d.ts +1 -1
  41. package/dist/components/venue-quotes.d.ts +1 -1
  42. package/dist/components/venue-wall.d.ts +1 -1
  43. package/dist/{place-types-BHdeMMiG.d.ts → place-types-C4rR3LTs.d.ts} +7 -0
  44. package/package.json +1 -1
  45. package/src/components/grade-atom.test.tsx +32 -0
  46. package/src/components/grade-atom.tsx +8 -1
@@ -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;
@@ -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" | "warning" | "success" | null | undefined;
6
+ variant?: "default" | "destructive" | "success" | "warning" | 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" | "warning" | "success" | null | undefined;
9
+ variant?: "default" | "destructive" | "success" | "warning" | 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" | "warning" | "success" | "outline" | "secondary" | "glass" | "overlay" | "brown" | "onPrimary" | null | undefined;
7
+ variant?: "default" | "secondary" | "destructive" | "outline" | "overlay" | "glass" | "success" | "warning" | "brown" | "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?: "default" | "destructive" | "warning" | "link" | "outline" | "secondary" | "ghost" | "glass" | "overlay" | "ink" | "brown" | null | undefined;
6
+ variant?: "default" | "secondary" | "destructive" | "outline" | "overlay" | "glass" | "warning" | "brown" | "link" | "ghost" | "ink" | 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?: "muted" | "outline" | "glass" | "surface" | "elevated" | "elevatedPanel" | null | undefined;
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?: "muted" | "outline" | "glass" | "surface" | "elevated" | "elevatedPanel" | null | undefined;
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> | "key"> & {
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" | "key"> & {
11
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
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
- }, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
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> | "key"> & {
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" | "key"> & {
41
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
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> | "key"> & {
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" | "key"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
50
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & 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> | "key"> & {
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" | "key"> & {
57
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
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> | "key"> & {
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" | "key">, "heading" | "value"> & {
67
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "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> | "key"> & {
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" | "key"> & {
76
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
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> | "key"> & {
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" | "key">, "onSelect" | "disabled" | "value"> & {
85
+ }, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "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-BHdeMMiG.js';
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 { MenuLinkComponent } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
4
+ import '../place-types-C4rR3LTs.js';
5
5
  import '../lib/grade.js';
6
6
 
7
7
  /**
@@ -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-BHdeMMiG.js';
3
+ export { G as GradeAtom, h as GradeAtomLabels, i as GradeAtomProps, j as GradeAtomSize } from '../place-types-C4rR3LTs.js';
@@ -1,4 +1,4 @@
1
- export { GradeAtom } from '../chunk-DJD3EMPK.js';
1
+ export { GradeAtom } from '../chunk-YE4ZQUTI.js';
2
2
  import '../chunk-I5V446BX.js';
3
3
  import '../chunk-FEK5XGZW.js';
4
4
  import '../chunk-MMUBH76A.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" | "muted" | "outline" | null | undefined;
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" | "muted" | "outline" | null | undefined;
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-BHdeMMiG.js';
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
 
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { MenuLinkComponent, MenuLoosenOption } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
4
+ import '../place-types-C4rR3LTs.js';
5
5
  import '../lib/grade.js';
6
6
 
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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 { MenuFilterChip } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
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 { MenuLinkComponent, MenuLinkProps } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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 { MenuIntentFigure, MenuLinkComponent } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-DJD3EMPK.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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-BHdeMMiG.js';
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,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { QaItem } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
4
+ import '../place-types-C4rR3LTs.js';
5
5
  import '../lib/grade.js';
6
6
 
7
7
  /**
@@ -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" | "warning" | "success" | "primary" | "outline" | "quiet" | null | undefined;
6
+ variant?: "default" | "destructive" | "outline" | "success" | "warning" | "primary" | "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" | "warning" | "success" | "primary" | "outline" | "quiet" | null | undefined;
10
+ variant?: "default" | "destructive" | "outline" | "success" | "warning" | "primary" | "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?: "small" | "display" | "h1" | "h2" | "h3" | "h4" | "body-lg" | "body" | "body-sm" | "caption" | "label" | "overline" | null | undefined;
25
+ variant?: "small" | "display" | "h2" | "h3" | "label" | "body" | "caption" | "h1" | "h4" | "body-lg" | "body-sm" | "overline" | null | undefined;
26
26
  color?: "default" | "destructive" | "inherit" | "muted" | "primary" | "primary-foreground" | null | undefined;
27
- weight?: "bold" | "normal" | "medium" | "semibold" | null | undefined;
27
+ weight?: "medium" | "bold" | "normal" | "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;
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { MenuLinkComponent } from './menu-types.js';
3
3
  import { TopComparisonRow } from './top-types.js';
4
4
  import 'react';
5
- import '../place-types-BHdeMMiG.js';
5
+ import '../place-types-C4rR3LTs.js';
6
6
  import '../lib/grade.js';
7
7
 
8
8
  type TopComparisonLabels = {
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { MenuLinkComponent } from './menu-types.js';
3
3
  import 'react';
4
- import '../place-types-BHdeMMiG.js';
4
+ import '../place-types-C4rR3LTs.js';
5
5
  import '../lib/grade.js';
6
6
 
7
7
  type TopCrossLinkProps = {
@@ -3,7 +3,7 @@ import { MenuItemLabels } from './menu-item.js';
3
3
  import { MenuItemPreview, MenuLinkComponent } from './menu-types.js';
4
4
  import { TopRankEntry } from './top-types.js';
5
5
  import 'react';
6
- import '../place-types-BHdeMMiG.js';
6
+ import '../place-types-C4rR3LTs.js';
7
7
  import '../lib/grade.js';
8
8
 
9
9
  type TopRankingEntryLabels = {
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { MenuLinkComponent } from './menu-types.js';
3
3
  import { TopExit } from './top-types.js';
4
4
  import 'react';
5
- import '../place-types-BHdeMMiG.js';
5
+ import '../place-types-C4rR3LTs.js';
6
6
  import '../lib/grade.js';
7
7
 
8
8
  type TopRankingHeroProps = {
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { MenuItemPreview } from './menu-types.js';
3
- import '../place-types-BHdeMMiG.js';
3
+ import '../place-types-C4rR3LTs.js';
4
4
  import 'react/jsx-runtime';
5
5
  import '../lib/grade.js';
6
6
 
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { a as PlaceGradeDimensions } from '../place-types-BHdeMMiG.js';
2
+ import { a as PlaceGradeDimensions } from '../place-types-C4rR3LTs.js';
3
3
  import '../lib/grade.js';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CitedText } from '../place-types-BHdeMMiG.js';
2
+ import { C as CitedText } from '../place-types-C4rR3LTs.js';
3
3
  import '../lib/grade.js';
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { MenuLinkComponent, MenuLinkProps } from './menu-types.js';
3
- import { P as PlacePreview } from '../place-types-BHdeMMiG.js';
3
+ import { P as PlacePreview } from '../place-types-C4rR3LTs.js';
4
4
  import 'react';
5
5
  import '../lib/grade.js';
6
6
 
@@ -12,6 +12,13 @@ type GradeAtomLabels = {
12
12
  aria: (value: string) => string;
13
13
  /** Title + aria suffix when `grade.capped`, e.g. "Capped for low confidence". */
14
14
  capped: string;
15
+ /**
16
+ * The number as the locale writes it, e.g. `8,7` in Romanian. Receives the
17
+ * grade already rounded to one decimal; return the glyphs to print. Defaults
18
+ * to `formatGrade` (`8.7`, a trailing `.0` dropped). It is a label because the
19
+ * decimal mark is translation, not styling — and `aria` gets the same string.
20
+ */
21
+ value?: (overall: number) => string;
15
22
  };
16
23
  type GradeAtomProps = {
17
24
  grade: PlaceGrade;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bearmenu/ui",
3
- "version": "0.8.22",
3
+ "version": "0.8.23",
4
4
  "description": "BearMenu design system — shared UI tokens, primitives, and components",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -0,0 +1,32 @@
1
+ import { describe, it, expect } from "vitest";
2
+ import { render, screen } from "@testing-library/react";
3
+ import { GradeAtom, type GradeAtomLabels } from "./grade-atom";
4
+
5
+ const labels: GradeAtomLabels = {
6
+ soft: "Worth exploring",
7
+ bands: { exceptional: "Exceptional", great: "Great", good: "Good", decent: "Decent", weak: "Weak" },
8
+ aria: (value) => `Grade ${value} out of 10`,
9
+ capped: "Capped for low confidence",
10
+ };
11
+
12
+ describe("GradeAtom", () => {
13
+ it("prints the grade with a dot and no trailing .0 by default", () => {
14
+ render(<GradeAtom grade={{ overall: 8.74 }} labels={labels} size="md" />);
15
+ expect(screen.getByLabelText("Grade 8.7 out of 10")).toHaveTextContent("8.7");
16
+ render(<GradeAtom grade={{ overall: 9 }} labels={labels} size="md" />);
17
+ expect(screen.getByLabelText("Grade 9 out of 10")).toHaveTextContent("9");
18
+ });
19
+
20
+ it("lets the labels write the number their locale's way, in the pill and in the aria name", () => {
21
+ const ro: GradeAtomLabels = { ...labels, value: (n) => n.toFixed(1).replace(".", ","), aria: (v) => `Nota ${v} din 10` };
22
+ render(<GradeAtom grade={{ overall: 8.74 }} labels={ro} size="md" />);
23
+ expect(screen.getByLabelText("Nota 8,7 din 10")).toHaveTextContent("8,7");
24
+ });
25
+
26
+ it("hands the formatter the rounded, clamped grade", () => {
27
+ const seen: number[] = [];
28
+ const spy: GradeAtomLabels = { ...labels, value: (n) => (seen.push(n), String(n)) };
29
+ render(<GradeAtom grade={{ overall: 12.26 }} labels={spy} size="md" />);
30
+ expect(seen).toEqual([10]);
31
+ });
32
+ });
@@ -41,6 +41,13 @@ export type GradeAtomLabels = {
41
41
  aria: (value: string) => string;
42
42
  /** Title + aria suffix when `grade.capped`, e.g. "Capped for low confidence". */
43
43
  capped: string;
44
+ /**
45
+ * The number as the locale writes it, e.g. `8,7` in Romanian. Receives the
46
+ * grade already rounded to one decimal; return the glyphs to print. Defaults
47
+ * to `formatGrade` (`8.7`, a trailing `.0` dropped). It is a label because the
48
+ * decimal mark is translation, not styling — and `aria` gets the same string.
49
+ */
50
+ value?: (overall: number) => string;
44
51
  };
45
52
 
46
53
  export type GradeAtomProps = {
@@ -221,7 +228,7 @@ export function GradeAtom({
221
228
  }
222
229
 
223
230
  const band = resolveGradeBand(overall);
224
- const value = formatGrade(overall);
231
+ const value = labels.value ? labels.value(Math.round(Math.min(10, Math.max(1, overall)) * 10) / 10) : formatGrade(overall);
225
232
  const descriptor = labels.bands[band];
226
233
  const showDesc = sz.showDesc && !hideDescriptor;
227
234
  const photo = onPhoto ? BAND_CLASSES_PHOTO[band] : null;