@bearmenu/ui 0.8.34 → 0.8.36
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-EGU6EG73.js +39 -0
- package/dist/{chunk-NIAL4ZU2.js → chunk-FQAIYKAS.js} +45 -8
- package/dist/{chunk-6W25S5CF.js → chunk-KGXTBTCJ.js} +1 -1
- package/dist/chunk-LAEVMNJN.js +135 -0
- package/dist/{chunk-XNBDACL7.js → chunk-ZUBBMLBD.js} +1 -1
- package/dist/components/badge.d.ts +8 -2
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.d.ts +17 -2
- package/dist/components/banner.js +10 -7
- package/dist/components/booking-row.d.ts +11 -1
- package/dist/components/booking-row.js +4 -1
- package/dist/components/button-group.js +3 -39
- package/dist/components/concept-convergence.js +1 -1
- package/dist/components/filter-category-row.js +1 -1
- package/dist/components/menu-item.js +3 -3
- package/dist/components/multi-select-combobox.js +8 -3
- package/dist/components/pan-zoom-viewport.d.ts +137 -0
- package/dist/components/pan-zoom-viewport.js +531 -0
- package/dist/components/place-card.js +2 -2
- package/dist/components/place-details-mobile.js +1 -1
- package/dist/components/responsive-overlay.d.ts +29 -1
- package/dist/components/responsive-overlay.js +45 -6
- package/dist/components/sheet.d.ts +6 -0
- package/dist/components/sheet.js +3 -133
- package/dist/components/signature-chip.js +2 -2
- package/dist/components/tabs.d.ts +16 -1
- package/dist/components/tabs.js +21 -3
- package/dist/components/top-ranking-entry.js +3 -3
- package/package.json +23 -216
- package/src/components/badge.stories.tsx +32 -1
- package/src/components/badge.test.tsx +45 -0
- package/src/components/badge.tsx +41 -3
- package/src/components/banner.stories.tsx +32 -0
- package/src/components/banner.test.tsx +58 -0
- package/src/components/banner.tsx +28 -4
- package/src/components/booking-row.tsx +13 -0
- package/src/components/multi-select-combobox.tsx +7 -1
- package/src/components/pan-zoom-viewport.stories.tsx +134 -0
- package/src/components/pan-zoom-viewport.test.tsx +381 -0
- package/src/components/pan-zoom-viewport.tsx +727 -0
- package/src/components/responsive-overlay.stories.tsx +61 -0
- package/src/components/responsive-overlay.test.tsx +104 -0
- package/src/components/responsive-overlay.tsx +87 -22
- package/src/components/sheet.tsx +14 -3
- package/src/components/tabs.stories.tsx +23 -0
- package/src/components/tabs.test.tsx +64 -0
- package/src/components/tabs.tsx +36 -3
|
@@ -23,6 +23,32 @@ type ResponsiveOverlayProps = {
|
|
|
23
23
|
closeLabel?: string;
|
|
24
24
|
/** Widths for the desktop dialog. Mobile is always the full-width drawer. */
|
|
25
25
|
size?: React.ComponentPropsWithoutRef<typeof DialogContent>["size"];
|
|
26
|
+
/**
|
|
27
|
+
* The container on a wide screen. `dialog` (the default) is the centred box.
|
|
28
|
+
* `sheet` is a right rail: an inset panel held 12px off the top, right and
|
|
29
|
+
* bottom, 420px wide — the booking pages' table sheet, booking details,
|
|
30
|
+
* guest panel and create forms (floor/14-w1, calendar/07-n1, guests/07-g6).
|
|
31
|
+
* Narrow screens get the bottom drawer either way.
|
|
32
|
+
*/
|
|
33
|
+
desktop?: "dialog" | "sheet";
|
|
34
|
+
/**
|
|
35
|
+
* Whether the wide `sheet` dims and locks the page. `true` (the default)
|
|
36
|
+
* is a form rail: a scrim, focus held inside, the page inert. `false` is a
|
|
37
|
+
* working rail: no scrim, no focus trap, and the page behind stays live —
|
|
38
|
+
* clicking another table on the floor does NOT close it, so the caller can
|
|
39
|
+
* swap what it shows. Escape and the close button still close it.
|
|
40
|
+
*
|
|
41
|
+
* Applies to `desktop="sheet"` only. The dialog is always modal, and so is
|
|
42
|
+
* the phone drawer: at 390 the rail covers most of the page, and a page
|
|
43
|
+
* that stays live under a sheet the thumb cannot see past is a trap.
|
|
44
|
+
*/
|
|
45
|
+
modal?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Where the wide container takes over from the drawer. `md` (768, the
|
|
48
|
+
* default) for most overlays; `lg` (1024) where the page beside the rail
|
|
49
|
+
* needs the room — the floor plan's rails switch there.
|
|
50
|
+
*/
|
|
51
|
+
wideFrom?: "md" | "lg";
|
|
26
52
|
/** Classes for the panel itself — the dialog box or the drawer sheet. */
|
|
27
53
|
className?: string;
|
|
28
54
|
/** Classes for the scrolling body. */
|
|
@@ -30,7 +56,9 @@ type ResponsiveOverlayProps = {
|
|
|
30
56
|
};
|
|
31
57
|
/**
|
|
32
58
|
* ResponsiveOverlay — one overlay authored once: a `Drawer` under md, a
|
|
33
|
-
* `Dialog` from md
|
|
59
|
+
* `Dialog` from md — or, with `desktop="sheet"`, an inset right rail that can
|
|
60
|
+
* leave the page live (`modal={false}`), switching at md or at lg
|
|
61
|
+
* (`wideFrom`).
|
|
34
62
|
*
|
|
35
63
|
* The shared-table board draws the same chrome on T1, T3, T5, T6 and T8
|
|
36
64
|
* (16-shared-table.html) and the two widths never disagree about it: the
|
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
import { useMediaQuery } from '../chunk-OPVKL4VS.js';
|
|
1
|
+
import { useMediaQuery, DESKTOP_MEDIA_QUERY } from '../chunk-OPVKL4VS.js';
|
|
2
|
+
import { Sheet, SheetContent, SheetTitle, SheetDescription } from '../chunk-LAEVMNJN.js';
|
|
2
3
|
import { Drawer, DrawerContent, DrawerTitle, DrawerDescription } from '../chunk-XLHMF6F5.js';
|
|
3
4
|
import { Dialog, DialogContent, DialogTitle, DialogDescription } from '../chunk-TVEIUTBQ.js';
|
|
4
5
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
5
|
-
import '../chunk-MMUBH76A.js';
|
|
6
|
+
import { __spreadProps, __spreadValues } from '../chunk-MMUBH76A.js';
|
|
6
7
|
import * as React from 'react';
|
|
7
8
|
import { X } from 'lucide-react';
|
|
8
9
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
10
|
|
|
10
11
|
var MD_MEDIA_QUERY = "(min-width: 768px)";
|
|
12
|
+
var CONTAINER_TITLE = { drawer: DrawerTitle, dialog: DialogTitle, sheet: SheetTitle };
|
|
13
|
+
var CONTAINER_DESCRIPTION = {
|
|
14
|
+
drawer: DrawerDescription,
|
|
15
|
+
dialog: DialogDescription,
|
|
16
|
+
sheet: SheetDescription
|
|
17
|
+
};
|
|
11
18
|
function useFocusReturn(open) {
|
|
12
19
|
const openerRef = React.useRef(null);
|
|
13
20
|
const wasOpen = React.useRef(false);
|
|
@@ -44,17 +51,23 @@ var ResponsiveOverlay = React.forwardRef(
|
|
|
44
51
|
footer,
|
|
45
52
|
closeLabel = "Close",
|
|
46
53
|
size = "lg",
|
|
54
|
+
desktop = "dialog",
|
|
55
|
+
modal = true,
|
|
56
|
+
wideFrom = "md",
|
|
47
57
|
className,
|
|
48
58
|
bodyClassName
|
|
49
59
|
}, ref) => {
|
|
50
|
-
const isWide = useMediaQuery(MD_MEDIA_QUERY);
|
|
60
|
+
const isWide = useMediaQuery(wideFrom === "lg" ? DESKTOP_MEDIA_QUERY : MD_MEDIA_QUERY);
|
|
61
|
+
const container = isWide ? desktop : "drawer";
|
|
51
62
|
const titleId = React.useId();
|
|
52
63
|
const subtitleId = React.useId();
|
|
53
64
|
useFocusReturn(open);
|
|
65
|
+
const Title = CONTAINER_TITLE[container];
|
|
66
|
+
const Description = CONTAINER_DESCRIPTION[container];
|
|
54
67
|
const header = /* @__PURE__ */ jsxs("div", { "data-slot": "responsive-overlay-header", className: "flex items-start gap-3 px-5 pt-5", children: [
|
|
55
68
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
56
|
-
|
|
57
|
-
subtitle ?
|
|
69
|
+
/* @__PURE__ */ jsx(Title, { id: titleId, className: "text-[19px] font-bold leading-tight", children: title }),
|
|
70
|
+
subtitle ? /* @__PURE__ */ jsx(Description, { id: subtitleId, className: "mt-1 text-[13px] text-muted-foreground", children: subtitle }) : null
|
|
58
71
|
] }),
|
|
59
72
|
/* @__PURE__ */ jsxs(
|
|
60
73
|
"button",
|
|
@@ -86,7 +99,33 @@ var ResponsiveOverlay = React.forwardRef(
|
|
|
86
99
|
children: footer
|
|
87
100
|
}
|
|
88
101
|
) : null;
|
|
89
|
-
if (
|
|
102
|
+
if (container === "sheet") {
|
|
103
|
+
return /* @__PURE__ */ jsx(Sheet, { open, onOpenChange, modal, children: /* @__PURE__ */ jsxs(
|
|
104
|
+
SheetContent,
|
|
105
|
+
__spreadProps(__spreadValues({
|
|
106
|
+
ref,
|
|
107
|
+
side: "right",
|
|
108
|
+
attachment: "inset",
|
|
109
|
+
hideClose: true,
|
|
110
|
+
overlayClassName: "bg-scrim-overlay backdrop-blur-none",
|
|
111
|
+
"aria-labelledby": titleId,
|
|
112
|
+
"aria-describedby": subtitle ? subtitleId : void 0,
|
|
113
|
+
"data-slot": "responsive-overlay-sheet",
|
|
114
|
+
"data-modal": modal ? "true" : "false"
|
|
115
|
+
}, modal ? {} : { onInteractOutside: (event) => event.preventDefault() }), {
|
|
116
|
+
className: cn(
|
|
117
|
+
"flex w-[420px] max-w-[calc(100vw-1.5rem)] flex-col gap-0 bg-card p-0",
|
|
118
|
+
className
|
|
119
|
+
),
|
|
120
|
+
children: [
|
|
121
|
+
header,
|
|
122
|
+
body,
|
|
123
|
+
foot
|
|
124
|
+
]
|
|
125
|
+
})
|
|
126
|
+
) });
|
|
127
|
+
}
|
|
128
|
+
if (container === "dialog") {
|
|
90
129
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs(
|
|
91
130
|
DialogContent,
|
|
92
131
|
{
|
|
@@ -36,6 +36,12 @@ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof Dialog
|
|
|
36
36
|
* buttons in the same corner.
|
|
37
37
|
*/
|
|
38
38
|
hideClose?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Classes for the scrim. The default `bg-black/50` is kept for every
|
|
41
|
+
* existing caller; pass `bg-scrim-overlay` for the themed dim, as `Drawer`
|
|
42
|
+
* and `Dialog` already allow. A non-modal sheet renders no scrim at all.
|
|
43
|
+
*/
|
|
44
|
+
overlayClassName?: string;
|
|
39
45
|
}
|
|
40
46
|
declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
41
47
|
declare const SheetHeader: {
|
package/dist/components/sheet.js
CHANGED
|
@@ -1,133 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import * as SheetPrimitive from '@radix-ui/react-dialog';
|
|
5
|
-
import { cva } from 'class-variance-authority';
|
|
6
|
-
import { X } from 'lucide-react';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
-
|
|
9
|
-
var Sheet = SheetPrimitive.Root;
|
|
10
|
-
var SheetTrigger = SheetPrimitive.Trigger;
|
|
11
|
-
var SheetClose = SheetPrimitive.Close;
|
|
12
|
-
var SheetPortal = SheetPrimitive.Portal;
|
|
13
|
-
var SheetOverlay = React.forwardRef((_a, ref) => {
|
|
14
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
15
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
-
SheetPrimitive.Overlay,
|
|
17
|
-
__spreadProps(__spreadValues({
|
|
18
|
-
className: cn(
|
|
19
|
-
"fixed inset-0 z-[1000] bg-black/50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
20
|
-
className
|
|
21
|
-
)
|
|
22
|
-
}, props), {
|
|
23
|
-
ref
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
});
|
|
27
|
-
SheetOverlay.displayName = SheetPrimitive.Overlay.displayName;
|
|
28
|
-
var sheetVariants = cva(
|
|
29
|
-
"fixed z-[1000] gap-4 bg-background border-border shadow-[var(--shadow-overlay)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:duration-[var(--duration-deliberate)] data-[state=closed]:duration-[var(--duration-exit-standard)] data-[state=open]:ease-[var(--ease-enter)] data-[state=closed]:ease-[var(--ease-exit)]",
|
|
30
|
-
{
|
|
31
|
-
variants: {
|
|
32
|
-
side: {
|
|
33
|
-
top: "inset-x-0 top-0 data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
34
|
-
bottom: "inset-x-0 bottom-0 data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
35
|
-
left: "inset-y-0 left-0 h-full w-3/4 data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left",
|
|
36
|
-
right: "inset-y-0 right-0 h-full w-3/4 data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right"
|
|
37
|
-
},
|
|
38
|
-
attachment: {
|
|
39
|
-
edge: "p-6",
|
|
40
|
-
// Padding is the caller's business here: a detail surface runs a gallery
|
|
41
|
-
// and a sticky action bar to the panel edge, and a fixed p-6 would inset
|
|
42
|
-
// both. `edge` keeps its p-6 so nothing already shipped shifts.
|
|
43
|
-
inset: "rounded-2xl overflow-hidden"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
compoundVariants: [
|
|
47
|
-
// `edge` restates exactly what each side carried before `attachment`
|
|
48
|
-
// existed — the seam border and the two inward-facing corners. Kept as
|
|
49
|
-
// compounds rather than left on `side` so `inset` is not fighting them
|
|
50
|
-
// through class-merge order.
|
|
51
|
-
// `sm:max-w-sm` lives here, not on `side`: an inset panel is sized by its
|
|
52
|
-
// caller, and a responsive cap left on `side` cannot be overridden from
|
|
53
|
-
// className — tailwind-merge scopes `sm:max-w-*` and `max-w-*` to
|
|
54
|
-
// different groups, so `max-w-none` loses to it at every width ≥ sm.
|
|
55
|
-
{ side: "top", attachment: "edge", class: "border-b" },
|
|
56
|
-
{ side: "bottom", attachment: "edge", class: "border-t rounded-t-2xl" },
|
|
57
|
-
{ side: "left", attachment: "edge", class: "border-r rounded-r-2xl sm:max-w-sm" },
|
|
58
|
-
{ side: "right", attachment: "edge", class: "border-l rounded-l-2xl sm:max-w-sm" },
|
|
59
|
-
// The inset offsets live here rather than on `attachment` because each
|
|
60
|
-
// side has to give up its own edge: a right-side panel clears top, right
|
|
61
|
-
// and bottom but is still anchored to the right.
|
|
62
|
-
{ side: "right", attachment: "inset", class: "inset-y-3 right-3 h-auto" },
|
|
63
|
-
{ side: "left", attachment: "inset", class: "inset-y-3 left-3 h-auto" },
|
|
64
|
-
{ side: "top", attachment: "inset", class: "inset-x-3 top-3" },
|
|
65
|
-
{ side: "bottom", attachment: "inset", class: "inset-x-3 bottom-3" }
|
|
66
|
-
],
|
|
67
|
-
defaultVariants: {
|
|
68
|
-
side: "right",
|
|
69
|
-
attachment: "edge"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
var SheetContent = React.forwardRef((_a, ref) => {
|
|
74
|
-
var _b = _a, { side = "right", attachment = "edge", className, children, hideClose } = _b, props = __objRest(_b, ["side", "attachment", "className", "children", "hideClose"]);
|
|
75
|
-
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
76
|
-
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
77
|
-
/* @__PURE__ */ jsxs(
|
|
78
|
-
SheetPrimitive.Content,
|
|
79
|
-
__spreadProps(__spreadValues({
|
|
80
|
-
ref,
|
|
81
|
-
className: cn(sheetVariants({ side, attachment }), className)
|
|
82
|
-
}, props), {
|
|
83
|
-
children: [
|
|
84
|
-
children,
|
|
85
|
-
!hideClose && /* @__PURE__ */ jsxs(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-lg opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary glass-hover p-2", children: [
|
|
86
|
-
/* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
|
|
87
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
|
|
88
|
-
] })
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
)
|
|
92
|
-
] });
|
|
93
|
-
});
|
|
94
|
-
SheetContent.displayName = SheetPrimitive.Content.displayName;
|
|
95
|
-
var SheetHeader = (_a) => {
|
|
96
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
97
|
-
return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col space-y-2 text-center sm:text-left", className) }, props));
|
|
98
|
-
};
|
|
99
|
-
SheetHeader.displayName = "SheetHeader";
|
|
100
|
-
var SheetFooter = (_a) => {
|
|
101
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
102
|
-
return /* @__PURE__ */ jsx(
|
|
103
|
-
"div",
|
|
104
|
-
__spreadValues({
|
|
105
|
-
className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className)
|
|
106
|
-
}, props)
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
SheetFooter.displayName = "SheetFooter";
|
|
110
|
-
var SheetTitle = React.forwardRef((_a, ref) => {
|
|
111
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
112
|
-
return /* @__PURE__ */ jsx(
|
|
113
|
-
SheetPrimitive.Title,
|
|
114
|
-
__spreadValues({
|
|
115
|
-
ref,
|
|
116
|
-
className: cn("text-lg font-semibold text-foreground", className)
|
|
117
|
-
}, props)
|
|
118
|
-
);
|
|
119
|
-
});
|
|
120
|
-
SheetTitle.displayName = SheetPrimitive.Title.displayName;
|
|
121
|
-
var SheetDescription = React.forwardRef((_a, ref) => {
|
|
122
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
123
|
-
return /* @__PURE__ */ jsx(
|
|
124
|
-
SheetPrimitive.Description,
|
|
125
|
-
__spreadValues({
|
|
126
|
-
ref,
|
|
127
|
-
className: cn("text-sm text-muted-foreground", className)
|
|
128
|
-
}, props)
|
|
129
|
-
);
|
|
130
|
-
});
|
|
131
|
-
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
132
|
-
|
|
133
|
-
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
1
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from '../chunk-LAEVMNJN.js';
|
|
2
|
+
import '../chunk-FEK5XGZW.js';
|
|
3
|
+
import '../chunk-MMUBH76A.js';
|
|
@@ -8,7 +8,22 @@ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsL
|
|
|
8
8
|
/** Make horizontal lists scrollable when overflowing. Default true for underline, false for pill. */
|
|
9
9
|
scrollable?: boolean;
|
|
10
10
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> &
|
|
11
|
+
declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
|
|
12
|
+
/**
|
|
13
|
+
* A count after the label — "Today 3", "Queue 2" (today/03-d0). `null`
|
|
14
|
+
* means the count is unknown (still loading, or its read failed) and draws
|
|
15
|
+
* an em dash, "Queue —" (today/04-d3); `undefined` draws nothing.
|
|
16
|
+
* Tabular figures, so the strip does not shift as a count ticks.
|
|
17
|
+
*/
|
|
18
|
+
count?: number | null;
|
|
19
|
+
/**
|
|
20
|
+
* What a screen reader hears for the count, in place of the bare figure —
|
|
21
|
+
* "3 waiting", "count unavailable". Injected, like every label here: the
|
|
22
|
+
* design system holds no copy. Without it the figure is read as is and the
|
|
23
|
+
* dash is silent.
|
|
24
|
+
*/
|
|
25
|
+
countLabel?: string;
|
|
26
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
12
27
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
28
|
|
|
14
29
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
package/dist/components/tabs.js
CHANGED
|
@@ -4,7 +4,7 @@ import { __objRest, __spreadValues, __spreadProps } from '../chunk-MMUBH76A.js';
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
6
6
|
import { motion } from 'framer-motion';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
|
|
9
9
|
var TabsContext = React.createContext({
|
|
10
10
|
variant: "pill",
|
|
@@ -50,7 +50,7 @@ var TabsList = React.forwardRef((_a, ref) => {
|
|
|
50
50
|
});
|
|
51
51
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
52
52
|
var TabsTrigger = React.forwardRef((_a, ref) => {
|
|
53
|
-
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
53
|
+
var _b = _a, { className, children, count, countLabel } = _b, props = __objRest(_b, ["className", "children", "count", "countLabel"]);
|
|
54
54
|
const { variant, orientation, indicatorId } = React.useContext(TabsContext);
|
|
55
55
|
const triggerRef = React.useRef(null);
|
|
56
56
|
const [isActive, setIsActive] = React.useState(false);
|
|
@@ -111,7 +111,25 @@ var TabsTrigger = React.forwardRef((_a, ref) => {
|
|
|
111
111
|
)
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
|
-
/* @__PURE__ */
|
|
114
|
+
/* @__PURE__ */ jsxs("span", { className: "relative z-10 flex items-center gap-2", children: [
|
|
115
|
+
children,
|
|
116
|
+
count !== void 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
117
|
+
" ",
|
|
118
|
+
/* @__PURE__ */ jsx(
|
|
119
|
+
"span",
|
|
120
|
+
{
|
|
121
|
+
"data-slot": "tabs-trigger-count",
|
|
122
|
+
"aria-hidden": countLabel !== void 0 || count === null ? true : void 0,
|
|
123
|
+
className: "tabular-nums",
|
|
124
|
+
children: count === null ? "\u2014" : count
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
countLabel !== void 0 ? /* @__PURE__ */ jsxs("span", { className: "sr-only", children: [
|
|
128
|
+
" ",
|
|
129
|
+
countLabel
|
|
130
|
+
] }) : null
|
|
131
|
+
] }) : null
|
|
132
|
+
] })
|
|
115
133
|
]
|
|
116
134
|
})
|
|
117
135
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { MenuItem } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { MenuItem } from '../chunk-ZUBBMLBD.js';
|
|
2
|
+
import '../chunk-KGXTBTCJ.js';
|
|
3
3
|
import { Separator } from '../chunk-NWZGSLPU.js';
|
|
4
4
|
import { Skeleton } from '../chunk-XBBEX4SF.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-FQAIYKAS.js';
|
|
6
6
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
7
7
|
import { __objRest, __spreadValues } from '../chunk-MMUBH76A.js';
|
|
8
8
|
import { MapPin, Star, MessageSquareQuote } from 'lucide-react';
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bearmenu/ui",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"packageManager": "pnpm@10.28.1",
|
|
3
|
+
"version": "0.8.36",
|
|
5
4
|
"description": "BearMenu design system — shared UI tokens, primitives, and components",
|
|
6
5
|
"license": "UNLICENSED",
|
|
7
6
|
"repository": {
|
|
@@ -17,222 +16,20 @@
|
|
|
17
16
|
"src"
|
|
18
17
|
],
|
|
19
18
|
"exports": {
|
|
20
|
-
"./components/accordion": "./src/components/accordion.tsx",
|
|
21
|
-
"./components/action-bar": "./src/components/action-bar.tsx",
|
|
22
|
-
"./components/activity-row": "./src/components/activity-row.tsx",
|
|
23
|
-
"./components/alert": "./src/components/alert.tsx",
|
|
24
|
-
"./components/alert-dialog": "./src/components/alert-dialog.tsx",
|
|
25
|
-
"./components/aspect-ratio": "./src/components/aspect-ratio.tsx",
|
|
26
|
-
"./components/avatar": "./src/components/avatar.tsx",
|
|
27
|
-
"./components/badge": "./src/components/badge.tsx",
|
|
28
|
-
"./components/banner": "./src/components/banner.tsx",
|
|
29
|
-
"./components/booking-row": "./src/components/booking-row.tsx",
|
|
30
|
-
"./components/booking-summary-card": "./src/components/booking-summary-card.tsx",
|
|
31
|
-
"./components/breadcrumb": "./src/components/breadcrumb.tsx",
|
|
32
|
-
"./components/button": "./src/components/button.tsx",
|
|
33
|
-
"./components/button-group": "./src/components/button-group.tsx",
|
|
34
|
-
"./components/calendar": "./src/components/calendar.tsx",
|
|
35
|
-
"./components/card": "./src/components/card.tsx",
|
|
36
|
-
"./components/carousel": "./src/components/carousel.tsx",
|
|
37
|
-
"./components/category-deck": "./src/components/category-deck.tsx",
|
|
38
|
-
"./components/checkbox": "./src/components/checkbox.tsx",
|
|
39
|
-
"./components/circular-progress": "./src/components/circular-progress.tsx",
|
|
40
|
-
"./components/coach-marks": "./src/components/coach-marks.tsx",
|
|
41
|
-
"./components/collapsible": "./src/components/collapsible.tsx",
|
|
42
|
-
"./components/combobox": "./src/components/combobox.tsx",
|
|
43
|
-
"./components/command": "./src/components/command.tsx",
|
|
44
|
-
"./components/concept-card": "./src/components/concept-card.tsx",
|
|
45
|
-
"./components/concept-compare": "./src/components/concept-compare.tsx",
|
|
46
|
-
"./components/concept-compare-rail": "./src/components/concept-compare-rail.tsx",
|
|
47
|
-
"./components/concept-convergence": "./src/components/concept-convergence.tsx",
|
|
48
|
-
"./components/convergence": "./src/components/convergence.tsx",
|
|
49
|
-
"./components/coverflow": "./src/components/coverflow.tsx",
|
|
50
|
-
"./components/currency-input": "./src/components/currency-input.tsx",
|
|
51
|
-
"./components/date-input": "./src/components/date-input.tsx",
|
|
52
|
-
"./components/day-rail-chip": "./src/components/day-rail-chip.tsx",
|
|
53
|
-
"./components/description-list": "./src/components/description-list.tsx",
|
|
54
|
-
"./components/dialog": "./src/components/dialog.tsx",
|
|
55
|
-
"./components/doorway-tiles": "./src/components/doorway-tiles.tsx",
|
|
56
|
-
"./components/drawer": "./src/components/drawer.tsx",
|
|
57
|
-
"./components/drift-rail": "./src/components/drift-rail.tsx",
|
|
58
|
-
"./components/dropdown-menu": "./src/components/dropdown-menu.tsx",
|
|
59
|
-
"./components/empty-state": "./src/components/empty-state.tsx",
|
|
60
|
-
"./components/event-card": "./src/components/event-card.tsx",
|
|
61
|
-
"./components/event-compact-row": "./src/components/event-compact-row.tsx",
|
|
62
|
-
"./components/event-day-header": "./src/components/event-day-header.tsx",
|
|
63
|
-
"./components/event-day-separator": "./src/components/event-day-separator.tsx",
|
|
64
|
-
"./components/event-detail-panel": "./src/components/event-detail-panel.tsx",
|
|
65
|
-
"./components/event-hub-hero": "./src/components/event-hub-hero.tsx",
|
|
66
|
-
"./components/event-index-row": "./src/components/event-index-row.tsx",
|
|
67
|
-
"./components/event-list-row": "./src/components/event-list-row.tsx",
|
|
68
|
-
"./components/event-list-row-wide": "./src/components/event-list-row-wide.tsx",
|
|
69
|
-
"./components/event-poster-fallback": "./src/components/event-poster-fallback.tsx",
|
|
70
|
-
"./components/event-tonight-strip": "./src/components/event-tonight-strip.tsx",
|
|
71
|
-
"./components/event-types": "./src/components/event-types.ts",
|
|
72
|
-
"./components/events-empty-state": "./src/components/events-empty-state.tsx",
|
|
73
|
-
"./components/explainer-steps": "./src/components/explainer-steps.tsx",
|
|
74
|
-
"./components/facet-group": "./src/components/facet-group.tsx",
|
|
75
|
-
"./components/featured-rail-item": "./src/components/featured-rail-item.tsx",
|
|
76
|
-
"./components/field": "./src/components/field.tsx",
|
|
77
|
-
"./components/filter-category-row": "./src/components/filter-category-row.tsx",
|
|
78
|
-
"./components/form": "./src/components/form.tsx",
|
|
79
|
-
"./components/glass-ground": "./src/components/glass-ground.tsx",
|
|
80
|
-
"./components/grade-atom": "./src/components/grade-atom.tsx",
|
|
81
|
-
"./components/haptic-switch": "./src/components/haptic-switch.tsx",
|
|
82
|
-
"./components/hold-countdown": "./src/components/hold-countdown.tsx",
|
|
83
|
-
"./components/hub-surface": "./src/components/hub-surface.tsx",
|
|
84
|
-
"./components/hue-chip": "./src/components/hue-chip.tsx",
|
|
85
|
-
"./components/icon": "./src/components/icon.tsx",
|
|
86
|
-
"./components/input": "./src/components/input.tsx",
|
|
87
|
-
"./components/input-group": "./src/components/input-group.tsx",
|
|
88
|
-
"./components/input-otp": "./src/components/input-otp.tsx",
|
|
89
|
-
"./components/item": "./src/components/item.tsx",
|
|
90
|
-
"./components/kbd": "./src/components/kbd.tsx",
|
|
91
|
-
"./components/label": "./src/components/label.tsx",
|
|
92
|
-
"./components/kitchen-dossier": "./src/components/kitchen-dossier.tsx",
|
|
93
|
-
"./components/lazy-markdown": "./src/components/lazy-markdown.tsx",
|
|
94
|
-
"./components/link-button": "./src/components/link-button.tsx",
|
|
95
|
-
"./components/markdown-renderer": "./src/components/markdown-renderer.tsx",
|
|
96
|
-
"./components/menu-dead-end": "./src/components/menu-dead-end.tsx",
|
|
97
|
-
"./components/menu-family-block": "./src/components/menu-family-block.tsx",
|
|
98
|
-
"./components/menu-family-card": "./src/components/menu-family-card.tsx",
|
|
99
|
-
"./components/menu-field": "./src/components/menu-field.tsx",
|
|
100
|
-
"./components/menu-filter-chips": "./src/components/menu-filter-chips.tsx",
|
|
101
|
-
"./components/menu-group-rows": "./src/components/menu-group-rows.tsx",
|
|
102
|
-
"./components/menu-hub-hero": "./src/components/menu-hub-hero.tsx",
|
|
103
|
-
"./components/menu-index-header": "./src/components/menu-index-header.tsx",
|
|
104
|
-
"./components/menu-index-list": "./src/components/menu-index-list.tsx",
|
|
105
|
-
"./components/menu-intent-hero": "./src/components/menu-intent-hero.tsx",
|
|
106
|
-
"./components/menu-item": "./src/components/menu-item.tsx",
|
|
107
|
-
"./components/menu-pick-row": "./src/components/menu-pick-row.tsx",
|
|
108
|
-
"./components/menu-kitchen-list": "./src/components/menu-kitchen-list.tsx",
|
|
109
|
-
"./components/menu-mocks": "./src/components/menu-mocks.ts",
|
|
110
|
-
"./components/menu-types": "./src/components/menu-types.ts",
|
|
111
|
-
"./components/motion-icon": "./src/components/motion-icon.tsx",
|
|
112
|
-
"./components/motion-icon-actions": "./src/components/motion-icon-actions.tsx",
|
|
113
|
-
"./components/motion-icon-controls": "./src/components/motion-icon-controls.tsx",
|
|
114
|
-
"./components/motion-icon-set": "./src/components/motion-icon-set.tsx",
|
|
115
|
-
"./components/multi-select-combobox": "./src/components/multi-select-combobox.tsx",
|
|
116
|
-
"./components/multi-select-menu": "./src/components/multi-select-menu.tsx",
|
|
117
|
-
"./components/native-select": "./src/components/native-select.tsx",
|
|
118
|
-
"./components/open-now-list": "./src/components/open-now-list.tsx",
|
|
119
|
-
"./components/pagination": "./src/components/pagination.tsx",
|
|
120
|
-
"./components/party-counter": "./src/components/party-counter.tsx",
|
|
121
|
-
"./components/phone-frame": "./src/components/phone-frame.tsx",
|
|
122
|
-
"./components/photo-ground": "./src/components/photo-ground.tsx",
|
|
123
|
-
"./components/place-about-tab": "./src/components/place-about-tab.tsx",
|
|
124
|
-
"./components/place-card": "./src/components/place-card.tsx",
|
|
125
|
-
"./components/place-details-mobile": "./src/components/place-details-mobile.tsx",
|
|
126
|
-
"./components/place-schedule-week": "./src/components/place-schedule-week.tsx",
|
|
127
|
-
"./components/place-types": "./src/components/place-types.ts",
|
|
128
|
-
"./components/popover": "./src/components/popover.tsx",
|
|
129
|
-
"./components/poster-stack": "./src/components/poster-stack.tsx",
|
|
130
|
-
"./components/poster-tape": "./src/components/poster-tape.tsx",
|
|
131
|
-
"./components/poster-wall": "./src/components/poster-wall.tsx",
|
|
132
|
-
"./components/progress": "./src/components/progress.tsx",
|
|
133
|
-
"./components/qa-block": "./src/components/qa-block.tsx",
|
|
134
|
-
"./components/qr-panel": "./src/components/qr-panel.tsx",
|
|
135
|
-
"./components/quiet-stretch": "./src/components/quiet-stretch.tsx",
|
|
136
|
-
"./components/radio-group": "./src/components/radio-group.tsx",
|
|
137
|
-
"./components/reconcile-bar": "./src/components/reconcile-bar.tsx",
|
|
138
|
-
"./components/responsive-overlay": "./src/components/responsive-overlay.tsx",
|
|
139
|
-
"./components/rating": "./src/components/rating.tsx",
|
|
140
|
-
"./components/scroll-area": "./src/components/scroll-area.tsx",
|
|
141
|
-
"./components/scroll-fade": "./src/components/scroll-fade.tsx",
|
|
142
|
-
"./components/search-bar": "./src/components/search-bar.tsx",
|
|
143
|
-
"./components/searchable-select": "./src/components/searchable-select.tsx",
|
|
144
|
-
"./components/section-header": "./src/components/section-header.tsx",
|
|
145
|
-
"./components/segmented-nav": "./src/components/segmented-nav.tsx",
|
|
146
|
-
"./components/select": "./src/components/select.tsx",
|
|
147
|
-
"./components/selection-bar": "./src/components/selection-bar.tsx",
|
|
148
|
-
"./components/separator": "./src/components/separator.tsx",
|
|
149
|
-
"./components/sheet": "./src/components/sheet.tsx",
|
|
150
|
-
"./components/signature-chip": "./src/components/signature-chip.tsx",
|
|
151
|
-
"./components/skeleton": "./src/components/skeleton.tsx",
|
|
152
|
-
"./components/skeleton-card": "./src/components/skeleton-card.tsx",
|
|
153
|
-
"./components/slider": "./src/components/slider.tsx",
|
|
154
|
-
"./components/sliding-panels": "./src/components/sliding-panels.tsx",
|
|
155
|
-
"./components/sonner": "./src/components/sonner.tsx",
|
|
156
|
-
"./components/sort-option-list": "./src/components/sort-option-list.tsx",
|
|
157
|
-
"./components/spinner": "./src/components/spinner.tsx",
|
|
158
|
-
"./components/split-share-row": "./src/components/split-share-row.tsx",
|
|
159
|
-
"./components/stat-banner": "./src/components/stat-banner.tsx",
|
|
160
|
-
"./components/stepper": "./src/components/stepper.tsx",
|
|
161
|
-
"./components/sticky-container": "./src/components/sticky-container.tsx",
|
|
162
|
-
"./components/story": "./src/components/story.tsx",
|
|
163
|
-
"./components/switch": "./src/components/switch.tsx",
|
|
164
|
-
"./components/table": "./src/components/table.tsx",
|
|
165
|
-
"./components/table-ledger-card": "./src/components/table-ledger-card.tsx",
|
|
166
|
-
"./components/table-trigger-band": "./src/components/table-trigger-band.tsx",
|
|
167
|
-
"./components/tabs": "./src/components/tabs.tsx",
|
|
168
|
-
"./components/tag": "./src/components/tag.tsx",
|
|
169
|
-
"./components/tag-group": "./src/components/tag-group.tsx",
|
|
170
|
-
"./components/text": "./src/components/text.tsx",
|
|
171
|
-
"./components/textarea": "./src/components/textarea.tsx",
|
|
172
|
-
"./components/time-slot": "./src/components/time-slot.tsx",
|
|
173
|
-
"./components/timeline-day": "./src/components/timeline-day.tsx",
|
|
174
|
-
"./components/timeline-hour": "./src/components/timeline-hour.tsx",
|
|
175
|
-
"./components/timeline-hour-puck": "./src/components/timeline-hour-puck.tsx",
|
|
176
|
-
"./components/toggle": "./src/components/toggle.tsx",
|
|
177
|
-
"./components/toggle-group": "./src/components/toggle-group.tsx",
|
|
178
|
-
"./components/tooltip": "./src/components/tooltip.tsx",
|
|
179
|
-
"./components/top-comparison": "./src/components/top-comparison.tsx",
|
|
180
|
-
"./components/top-cross-link": "./src/components/top-cross-link.tsx",
|
|
181
|
-
"./components/top-ranking-entry": "./src/components/top-ranking-entry.tsx",
|
|
182
|
-
"./components/top-ranking-hero": "./src/components/top-ranking-hero.tsx",
|
|
183
|
-
"./components/top-ranking-legend": "./src/components/top-ranking-legend.tsx",
|
|
184
|
-
"./components/top-types": "./src/components/top-types.ts",
|
|
185
|
-
"./components/use-mobile": "./src/components/use-mobile.tsx",
|
|
186
|
-
"./components/venue-events-block": "./src/components/venue-events-block.tsx",
|
|
187
|
-
"./components/venue-grade-dimensions": "./src/components/venue-grade-dimensions.tsx",
|
|
188
|
-
"./components/venue-quotes": "./src/components/venue-quotes.tsx",
|
|
189
|
-
"./components/venue-wall": "./src/components/venue-wall.tsx",
|
|
190
|
-
"./components/weekday-chip": "./src/components/weekday-chip.tsx",
|
|
191
|
-
"./components/weekday-theme-banner": "./src/components/weekday-theme-banner.tsx",
|
|
192
|
-
"./components/weekend-panel": "./src/components/weekend-panel.tsx",
|
|
193
19
|
"./globals.css": "./src/globals.css",
|
|
194
|
-
"./
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"./hooks
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
"./lib
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
"./lib/overlay-pill": "./src/lib/overlay-pill.ts",
|
|
206
|
-
"./lib/utils": "./src/lib/utils.ts"
|
|
207
|
-
},
|
|
208
|
-
"publishConfig": {
|
|
209
|
-
"exports": {
|
|
210
|
-
"./globals.css": "./src/globals.css",
|
|
211
|
-
"./components/*": {
|
|
212
|
-
"types": "./dist/components/*.d.ts",
|
|
213
|
-
"import": "./dist/components/*.js"
|
|
214
|
-
},
|
|
215
|
-
"./hooks/*": {
|
|
216
|
-
"types": "./dist/hooks/*.d.ts",
|
|
217
|
-
"import": "./dist/hooks/*.js"
|
|
218
|
-
},
|
|
219
|
-
"./lib/*": {
|
|
220
|
-
"types": "./dist/lib/*.d.ts",
|
|
221
|
-
"import": "./dist/lib/*.js"
|
|
222
|
-
}
|
|
20
|
+
"./components/*": {
|
|
21
|
+
"types": "./dist/components/*.d.ts",
|
|
22
|
+
"import": "./dist/components/*.js"
|
|
23
|
+
},
|
|
24
|
+
"./hooks/*": {
|
|
25
|
+
"types": "./dist/hooks/*.d.ts",
|
|
26
|
+
"import": "./dist/hooks/*.js"
|
|
27
|
+
},
|
|
28
|
+
"./lib/*": {
|
|
29
|
+
"types": "./dist/lib/*.d.ts",
|
|
30
|
+
"import": "./dist/lib/*.js"
|
|
223
31
|
}
|
|
224
32
|
},
|
|
225
|
-
"scripts": {
|
|
226
|
-
"storybook": "storybook dev -p 6006",
|
|
227
|
-
"build-storybook": "storybook build",
|
|
228
|
-
"build": "tsup",
|
|
229
|
-
"dev": "tsup --watch",
|
|
230
|
-
"typecheck": "tsc --noEmit",
|
|
231
|
-
"test": "vitest run",
|
|
232
|
-
"test:watch": "vitest",
|
|
233
|
-
"clean": "rm -rf dist",
|
|
234
|
-
"prepublishOnly": "pnpm run build"
|
|
235
|
-
},
|
|
236
33
|
"peerDependencies": {
|
|
237
34
|
"@hookform/resolvers": "^3.0.0 || ^5.0.0",
|
|
238
35
|
"@radix-ui/react-accordion": "*",
|
|
@@ -341,5 +138,15 @@
|
|
|
341
138
|
"vaul": "^1.1.2",
|
|
342
139
|
"vitest": "^4.1.5",
|
|
343
140
|
"zod": "^3.25.67"
|
|
141
|
+
},
|
|
142
|
+
"scripts": {
|
|
143
|
+
"storybook": "storybook dev -p 6006",
|
|
144
|
+
"build-storybook": "storybook build",
|
|
145
|
+
"build": "tsup",
|
|
146
|
+
"dev": "tsup --watch",
|
|
147
|
+
"typecheck": "tsc --noEmit",
|
|
148
|
+
"test": "vitest run",
|
|
149
|
+
"test:watch": "vitest",
|
|
150
|
+
"clean": "rm -rf dist"
|
|
344
151
|
}
|
|
345
|
-
}
|
|
152
|
+
}
|