@bearmenu/ui 0.8.33 → 0.8.35
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-GESB7GCF.js → chunk-6W25S5CF.js} +1 -1
- package/dist/chunk-LY67SOFC.js +142 -0
- package/dist/{chunk-ZU4NAYN7.js → chunk-NIAL4ZU2.js} +13 -1
- package/dist/{chunk-JWTN7MNK.js → chunk-TVEIUTBQ.js} +2 -2
- package/dist/{chunk-ZJMCU7MI.js → chunk-VCRXL7H5.js} +1 -1
- package/dist/chunk-XLHMF6F5.js +127 -0
- package/dist/{chunk-VSRGEB36.js → chunk-XNBDACL7.js} +1 -1
- package/dist/components/action-bar.d.ts +67 -0
- package/dist/components/action-bar.js +43 -0
- package/dist/components/activity-row.d.ts +38 -0
- package/dist/components/activity-row.js +43 -0
- package/dist/components/alert.d.ts +2 -2
- package/dist/components/avatar.d.ts +4 -1
- package/dist/components/avatar.js +39 -5
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/booking-row.d.ts +11 -1
- package/dist/components/booking-row.js +4 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/combobox.js +2 -2
- package/dist/components/command.d.ts +15 -15
- package/dist/components/command.js +2 -2
- package/dist/components/concept-convergence.js +2 -2
- package/dist/components/currency-input.js +4 -142
- package/dist/components/dialog.d.ts +6 -0
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.d.ts +6 -0
- package/dist/components/drawer.js +3 -127
- package/dist/components/empty-state.d.ts +2 -2
- package/dist/components/filter-category-row.js +1 -1
- package/dist/components/menu-item.js +3 -3
- package/dist/components/menu-pick-row.d.ts +47 -0
- package/dist/components/menu-pick-row.js +49 -0
- package/dist/components/multi-select-combobox.js +3 -3
- package/dist/components/place-card.js +1 -1
- package/dist/components/place-details-mobile.js +1 -1
- package/dist/components/qr-panel.d.ts +31 -0
- package/dist/components/qr-panel.js +33 -0
- package/dist/components/reconcile-bar.d.ts +47 -0
- package/dist/components/reconcile-bar.js +60 -0
- package/dist/components/responsive-overlay.d.ts +59 -0
- package/dist/components/responsive-overlay.js +132 -0
- package/dist/components/searchable-select.js +2 -2
- package/dist/components/signature-chip.js +2 -2
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/split-share-row.d.ts +77 -0
- package/dist/components/split-share-row.js +101 -0
- package/dist/components/table-ledger-card.d.ts +80 -0
- package/dist/components/table-ledger-card.js +84 -0
- package/dist/components/table-trigger-band.d.ts +56 -0
- package/dist/components/table-trigger-band.js +43 -0
- package/dist/components/tag.d.ts +2 -2
- package/dist/components/text.d.ts +2 -2
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/top-ranking-entry.js +3 -3
- package/dist/components/venue-events-block.js +1 -1
- package/package.json +23 -207
- package/src/components/action-bar.stories.tsx +78 -0
- package/src/components/action-bar.tsx +80 -0
- package/src/components/activity-row.stories.tsx +78 -0
- package/src/components/activity-row.tsx +65 -0
- package/src/components/avatar.stories.tsx +55 -0
- package/src/components/avatar.tsx +63 -19
- package/src/components/badge.stories.tsx +41 -0
- package/src/components/badge.tsx +13 -0
- package/src/components/booking-row.tsx +13 -0
- package/src/components/dialog.tsx +8 -2
- package/src/components/drawer.tsx +8 -2
- package/src/components/menu-pick-row.stories.tsx +71 -0
- package/src/components/menu-pick-row.tsx +76 -0
- package/src/components/qr-panel.stories.tsx +39 -0
- package/src/components/qr-panel.tsx +52 -0
- package/src/components/reconcile-bar.stories.tsx +57 -0
- package/src/components/reconcile-bar.tsx +80 -0
- package/src/components/responsive-overlay.stories.tsx +91 -0
- package/src/components/responsive-overlay.test.tsx +162 -0
- package/src/components/responsive-overlay.tsx +232 -0
- package/src/components/shared-table-primitives.test.tsx +482 -0
- package/src/components/split-share-row.stories.tsx +114 -0
- package/src/components/split-share-row.tsx +150 -0
- package/src/components/table-ledger-card.stories.tsx +120 -0
- package/src/components/table-ledger-card.tsx +138 -0
- package/src/components/table-trigger-band.stories.tsx +76 -0
- package/src/components/table-trigger-band.tsx +75 -0
- package/src/globals.css +44 -0
- package/src/test/setup.ts +11 -0
|
@@ -43,12 +43,22 @@ type BookingRowProps = {
|
|
|
43
43
|
href: string;
|
|
44
44
|
/** The venue photo, rendered by the app; a quiet placeholder when absent. */
|
|
45
45
|
thumbnail?: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* One more chip about this booking, beside the status — "on this phone" for
|
|
48
|
+
* a booking the signed-in guest has not put in their account yet.
|
|
49
|
+
*
|
|
50
|
+
* A node rather than a string because the app owns what it says and how it
|
|
51
|
+
* is marked; the row only owns where it sits. It rides with the status on
|
|
52
|
+
* both layouts, so the two read as one cluster of facts about the booking
|
|
53
|
+
* rather than a second row of chrome.
|
|
54
|
+
*/
|
|
55
|
+
note?: React.ReactNode;
|
|
46
56
|
/** The next booking up — tinted on desktop. */
|
|
47
57
|
highlighted?: boolean;
|
|
48
58
|
linkComponent?: React.ComponentType<BookingRowLinkProps>;
|
|
49
59
|
className?: string;
|
|
50
60
|
};
|
|
51
|
-
declare function BookingRow({ venueName, venueType, when, party, status, statusLabel, code, href, thumbnail, highlighted, linkComponent: LinkComponent, className, }: BookingRowProps): react_jsx_runtime.JSX.Element;
|
|
61
|
+
declare function BookingRow({ venueName, venueType, when, party, status, statusLabel, code, href, thumbnail, note, highlighted, linkComponent: LinkComponent, className, }: BookingRowProps): react_jsx_runtime.JSX.Element;
|
|
52
62
|
type BookingRowListProps = {
|
|
53
63
|
children: React.ReactNode;
|
|
54
64
|
/** "Upcoming bookings" — names the list for assistive tech. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Badge } from '../chunk-
|
|
1
|
+
import { Badge } from '../chunk-NIAL4ZU2.js';
|
|
2
2
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
3
3
|
import { __objRest, __spreadValues } from '../chunk-MMUBH76A.js';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -34,6 +34,7 @@ function BookingRow({
|
|
|
34
34
|
code,
|
|
35
35
|
href,
|
|
36
36
|
thumbnail,
|
|
37
|
+
note,
|
|
37
38
|
highlighted,
|
|
38
39
|
linkComponent: LinkComponent = DefaultLink,
|
|
39
40
|
className
|
|
@@ -65,6 +66,7 @@ function BookingRow({
|
|
|
65
66
|
/* @__PURE__ */ jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-[7px]", children: [
|
|
66
67
|
/* @__PURE__ */ jsx("span", { className: "text-[12.5px] font-medium", children: when }),
|
|
67
68
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: party }),
|
|
69
|
+
note,
|
|
68
70
|
statusPill
|
|
69
71
|
] })
|
|
70
72
|
] }),
|
|
@@ -80,6 +82,7 @@ function BookingRow({
|
|
|
80
82
|
] })
|
|
81
83
|
] }),
|
|
82
84
|
/* @__PURE__ */ jsxs("span", { className: "hidden md:contents", children: [
|
|
85
|
+
note,
|
|
83
86
|
statusPill,
|
|
84
87
|
codeChip,
|
|
85
88
|
/* @__PURE__ */ jsx(ChevronRight, { "aria-hidden": true, className: "size-[15px] shrink-0 text-muted-foreground" })
|
|
@@ -3,8 +3,8 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
7
|
-
size?: "default" | "cta" | "xs" | "sm" | "lg" | "pill" | "cta-sm" | "icon
|
|
6
|
+
variant?: "secondary" | "default" | "link" | "warning" | "destructive" | "outline" | "ghost" | "glass" | "overlay" | "ink" | "brown" | "cta" | null | undefined;
|
|
7
|
+
size?: "default" | "icon" | "cta" | "xs" | "sm" | "lg" | "pill" | "cta-sm" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
8
8
|
fullWidth?: boolean | null | undefined;
|
|
9
9
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10
10
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-2ADCZXZJ.js';
|
|
2
|
-
import { Command, CommandInput, CommandList, CommandLoading, CommandEmpty, CommandGroup, CommandItem } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
2
|
+
import { Command, CommandInput, CommandList, CommandLoading, CommandEmpty, CommandGroup, CommandItem } from '../chunk-VCRXL7H5.js';
|
|
3
|
+
import '../chunk-TVEIUTBQ.js';
|
|
4
4
|
import { Button } from '../chunk-5SGKGFMN.js';
|
|
5
5
|
import '../chunk-RIH2IS7X.js';
|
|
6
6
|
import '../chunk-5YNIQ2BL.js';
|
|
@@ -4,11 +4,11 @@ import { DialogProps } from '@radix-ui/react-dialog';
|
|
|
4
4
|
|
|
5
5
|
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
7
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
8
8
|
ref?: React.Ref<HTMLDivElement>;
|
|
9
9
|
} & {
|
|
10
10
|
asChild?: boolean;
|
|
11
|
-
},
|
|
11
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
12
12
|
label?: string;
|
|
13
13
|
shouldFilter?: boolean;
|
|
14
14
|
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
@@ -28,61 +28,61 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
28
28
|
ref?: React.Ref<HTMLInputElement>;
|
|
29
29
|
} & {
|
|
30
30
|
asChild?: boolean;
|
|
31
|
-
}, "
|
|
31
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value" | "type"> & {
|
|
32
32
|
value?: string;
|
|
33
33
|
onValueChange?: (search: string) => void;
|
|
34
34
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
35
35
|
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
36
36
|
children?: React.ReactNode;
|
|
37
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
37
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
38
38
|
ref?: React.Ref<HTMLDivElement>;
|
|
39
39
|
} & {
|
|
40
40
|
asChild?: boolean;
|
|
41
|
-
},
|
|
41
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
42
42
|
label?: string;
|
|
43
43
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
44
|
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
45
45
|
children?: React.ReactNode;
|
|
46
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
46
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
47
47
|
ref?: React.Ref<HTMLDivElement>;
|
|
48
48
|
} & {
|
|
49
49
|
asChild?: boolean;
|
|
50
|
-
},
|
|
50
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
51
51
|
declare const CommandLoading: React.ForwardRefExoticComponent<Omit<{
|
|
52
52
|
children?: React.ReactNode;
|
|
53
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
53
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
54
54
|
ref?: React.Ref<HTMLDivElement>;
|
|
55
55
|
} & {
|
|
56
56
|
asChild?: boolean;
|
|
57
|
-
},
|
|
57
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
58
58
|
progress?: number;
|
|
59
59
|
label?: string;
|
|
60
60
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
61
61
|
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
62
62
|
children?: React.ReactNode;
|
|
63
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
63
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
64
64
|
ref?: React.Ref<HTMLDivElement>;
|
|
65
65
|
} & {
|
|
66
66
|
asChild?: boolean;
|
|
67
|
-
},
|
|
67
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "heading" | "value"> & {
|
|
68
68
|
heading?: React.ReactNode;
|
|
69
69
|
value?: string;
|
|
70
70
|
forceMount?: boolean;
|
|
71
71
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
72
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
72
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
73
73
|
ref?: React.Ref<HTMLDivElement>;
|
|
74
74
|
} & {
|
|
75
75
|
asChild?: boolean;
|
|
76
|
-
},
|
|
76
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key"> & {
|
|
77
77
|
alwaysRender?: boolean;
|
|
78
78
|
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
79
79
|
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
80
80
|
children?: React.ReactNode;
|
|
81
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>,
|
|
81
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof React.HTMLAttributes<HTMLDivElement> | "key"> & {
|
|
82
82
|
ref?: React.Ref<HTMLDivElement>;
|
|
83
83
|
} & {
|
|
84
84
|
asChild?: boolean;
|
|
85
|
-
},
|
|
85
|
+
}, keyof React.HTMLAttributes<HTMLDivElement> | "asChild" | "key">, "onSelect" | "value" | "disabled"> & {
|
|
86
86
|
disabled?: boolean;
|
|
87
87
|
onSelect?: (value: string) => void;
|
|
88
88
|
value?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut } from '../chunk-VCRXL7H5.js';
|
|
2
|
+
import '../chunk-TVEIUTBQ.js';
|
|
3
3
|
import '../chunk-FEK5XGZW.js';
|
|
4
4
|
import '../chunk-MMUBH76A.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { PhotoGround } from '../chunk-SWD6CJ35.js';
|
|
1
2
|
import { Convergence } from '../chunk-4XDJXMLF.js';
|
|
2
3
|
import '../chunk-OIV7B44M.js';
|
|
3
|
-
import {
|
|
4
|
-
import { Badge } from '../chunk-ZU4NAYN7.js';
|
|
4
|
+
import { Badge } from '../chunk-NIAL4ZU2.js';
|
|
5
5
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
6
6
|
import '../chunk-MMUBH76A.js';
|
|
7
7
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
@@ -1,142 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var ALLOWED_NAVIGATION_KEYS = /* @__PURE__ */ new Set([
|
|
8
|
-
"Backspace",
|
|
9
|
-
"Tab",
|
|
10
|
-
"Escape",
|
|
11
|
-
"Enter",
|
|
12
|
-
"Delete",
|
|
13
|
-
"Home",
|
|
14
|
-
"End",
|
|
15
|
-
"ArrowLeft",
|
|
16
|
-
"ArrowRight",
|
|
17
|
-
"ArrowUp",
|
|
18
|
-
"ArrowDown"
|
|
19
|
-
]);
|
|
20
|
-
var ALLOWED_SHORTCUT_KEYS = /* @__PURE__ */ new Set(["a", "c", "v", "x", "z"]);
|
|
21
|
-
var CurrencyInput = React.forwardRef(
|
|
22
|
-
(_a, ref) => {
|
|
23
|
-
var _b = _a, {
|
|
24
|
-
value,
|
|
25
|
-
onChange,
|
|
26
|
-
placeholder = "Enter amount",
|
|
27
|
-
currency = "$",
|
|
28
|
-
locale = "en-US",
|
|
29
|
-
min,
|
|
30
|
-
max,
|
|
31
|
-
disabled = false,
|
|
32
|
-
className,
|
|
33
|
-
error,
|
|
34
|
-
id: providedId
|
|
35
|
-
} = _b, props = __objRest(_b, [
|
|
36
|
-
"value",
|
|
37
|
-
"onChange",
|
|
38
|
-
"placeholder",
|
|
39
|
-
"currency",
|
|
40
|
-
"locale",
|
|
41
|
-
"min",
|
|
42
|
-
"max",
|
|
43
|
-
"disabled",
|
|
44
|
-
"className",
|
|
45
|
-
"error",
|
|
46
|
-
"id"
|
|
47
|
-
]);
|
|
48
|
-
const reactId = React.useId();
|
|
49
|
-
const id = providedId != null ? providedId : reactId;
|
|
50
|
-
const errorId = `${id}-error`;
|
|
51
|
-
const [displayValue, setDisplayValue] = React.useState("");
|
|
52
|
-
const [isFocused, setIsFocused] = React.useState(false);
|
|
53
|
-
const formatNumber = React.useCallback(
|
|
54
|
-
(num) => {
|
|
55
|
-
if (num === null || isNaN(num)) return "";
|
|
56
|
-
return new Intl.NumberFormat(locale, {
|
|
57
|
-
minimumFractionDigits: 0,
|
|
58
|
-
maximumFractionDigits: 2
|
|
59
|
-
}).format(num);
|
|
60
|
-
},
|
|
61
|
-
[locale]
|
|
62
|
-
);
|
|
63
|
-
const parseInput = (input) => {
|
|
64
|
-
const cleaned = input.replace(/[^\d.-]/g, "");
|
|
65
|
-
const parsed = parseFloat(cleaned);
|
|
66
|
-
return isNaN(parsed) ? null : parsed;
|
|
67
|
-
};
|
|
68
|
-
React.useEffect(() => {
|
|
69
|
-
if (!isFocused) {
|
|
70
|
-
setDisplayValue(formatNumber(value));
|
|
71
|
-
}
|
|
72
|
-
}, [value, isFocused, formatNumber]);
|
|
73
|
-
const handleInputChange = (e) => {
|
|
74
|
-
const inputValue = e.target.value;
|
|
75
|
-
setDisplayValue(inputValue);
|
|
76
|
-
const parsedValue = parseInput(inputValue);
|
|
77
|
-
if (parsedValue !== null) {
|
|
78
|
-
if (min !== void 0 && parsedValue < min) return;
|
|
79
|
-
if (max !== void 0 && parsedValue > max) return;
|
|
80
|
-
}
|
|
81
|
-
onChange(parsedValue);
|
|
82
|
-
};
|
|
83
|
-
const handleFocus = () => {
|
|
84
|
-
setIsFocused(true);
|
|
85
|
-
if (value !== null && value !== void 0 && !isNaN(value)) {
|
|
86
|
-
setDisplayValue(value.toString());
|
|
87
|
-
}
|
|
88
|
-
};
|
|
89
|
-
const handleBlur = () => {
|
|
90
|
-
setIsFocused(false);
|
|
91
|
-
if (value !== null && value !== void 0 && !isNaN(value)) {
|
|
92
|
-
setDisplayValue(formatNumber(value));
|
|
93
|
-
} else {
|
|
94
|
-
setDisplayValue("");
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
const handleKeyDown = (e) => {
|
|
98
|
-
if (ALLOWED_NAVIGATION_KEYS.has(e.key)) return;
|
|
99
|
-
if ((e.ctrlKey || e.metaKey) && ALLOWED_SHORTCUT_KEYS.has(e.key.toLowerCase())) return;
|
|
100
|
-
if (/^[0-9]$/.test(e.key)) return;
|
|
101
|
-
if (e.key === "." || e.key === "-") return;
|
|
102
|
-
e.preventDefault();
|
|
103
|
-
};
|
|
104
|
-
const symbolLength = currency.length;
|
|
105
|
-
const inputPaddingClass = symbolLength <= 1 ? "pl-8" : symbolLength === 2 ? "pl-10" : symbolLength === 3 ? "pl-12" : "pl-14";
|
|
106
|
-
return /* @__PURE__ */ jsxs("div", { className: "w-full", children: [
|
|
107
|
-
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
108
|
-
/* @__PURE__ */ jsx(
|
|
109
|
-
"span",
|
|
110
|
-
{
|
|
111
|
-
"aria-hidden": true,
|
|
112
|
-
className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-sm font-semibold text-muted-foreground",
|
|
113
|
-
children: currency
|
|
114
|
-
}
|
|
115
|
-
),
|
|
116
|
-
/* @__PURE__ */ jsx(
|
|
117
|
-
Input,
|
|
118
|
-
__spreadValues({
|
|
119
|
-
ref,
|
|
120
|
-
id,
|
|
121
|
-
type: "text",
|
|
122
|
-
inputMode: "decimal",
|
|
123
|
-
value: displayValue,
|
|
124
|
-
onChange: handleInputChange,
|
|
125
|
-
onFocus: handleFocus,
|
|
126
|
-
onBlur: handleBlur,
|
|
127
|
-
onKeyDown: handleKeyDown,
|
|
128
|
-
placeholder,
|
|
129
|
-
disabled,
|
|
130
|
-
"aria-invalid": error ? true : void 0,
|
|
131
|
-
"aria-describedby": error ? errorId : void 0,
|
|
132
|
-
className: cn(inputPaddingClass, className)
|
|
133
|
-
}, props)
|
|
134
|
-
)
|
|
135
|
-
] }),
|
|
136
|
-
error && /* @__PURE__ */ jsx("p", { id: errorId, className: "ml-1 mt-1 text-sm text-destructive", children: error })
|
|
137
|
-
] });
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
CurrencyInput.displayName = "CurrencyInput";
|
|
141
|
-
|
|
142
|
-
export { CurrencyInput };
|
|
1
|
+
export { CurrencyInput } from '../chunk-LY67SOFC.js';
|
|
2
|
+
import '../chunk-GTQSGDYF.js';
|
|
3
|
+
import '../chunk-FEK5XGZW.js';
|
|
4
|
+
import '../chunk-MMUBH76A.js';
|
|
@@ -18,6 +18,12 @@ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitiv
|
|
|
18
18
|
scrollBehavior?: "inside" | "outside" | null | undefined;
|
|
19
19
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & {
|
|
20
20
|
showCloseButton?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Classes for the scrim behind the dialog. The default `bg-black/50` is
|
|
23
|
+
* kept for every existing caller; pass `bg-scrim-overlay` for the themed
|
|
24
|
+
* dim (see `--scrim-overlay` in globals.css, and why it is not `--scrim`).
|
|
25
|
+
*/
|
|
26
|
+
overlayClassName?: string;
|
|
21
27
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
28
|
declare const DialogHeader: {
|
|
23
29
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogContentVariants } from '../chunk-
|
|
1
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, dialogContentVariants } from '../chunk-TVEIUTBQ.js';
|
|
2
2
|
import '../chunk-FEK5XGZW.js';
|
|
3
3
|
import '../chunk-MMUBH76A.js';
|
|
@@ -15,6 +15,12 @@ declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<DialogPri
|
|
|
15
15
|
declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
16
16
|
variant?: "flush" | "floating";
|
|
17
17
|
showHandle?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Classes for the scrim behind the sheet. The default `bg-black/60` is kept
|
|
20
|
+
* for every existing caller; pass `bg-scrim-overlay` for the themed dim (see
|
|
21
|
+
* `--scrim-overlay` in globals.css, and why it is not `--scrim`).
|
|
22
|
+
*/
|
|
23
|
+
overlayClassName?: string;
|
|
18
24
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
25
|
declare const DrawerHeader: {
|
|
20
26
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): react_jsx_runtime.JSX.Element;
|
|
@@ -1,127 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { Drawer as Drawer$1 } from 'vaul';
|
|
5
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
-
|
|
7
|
-
var DrawerDirectionContext = React.createContext("bottom");
|
|
8
|
-
var Drawer = (_a) => {
|
|
9
|
-
var _b = _a, {
|
|
10
|
-
shouldScaleBackground = false,
|
|
11
|
-
direction = "bottom"
|
|
12
|
-
} = _b, props = __objRest(_b, [
|
|
13
|
-
"shouldScaleBackground",
|
|
14
|
-
"direction"
|
|
15
|
-
]);
|
|
16
|
-
return /* @__PURE__ */ jsx(DrawerDirectionContext.Provider, { value: direction, children: /* @__PURE__ */ jsx(
|
|
17
|
-
Drawer$1.Root,
|
|
18
|
-
__spreadValues({
|
|
19
|
-
shouldScaleBackground,
|
|
20
|
-
direction
|
|
21
|
-
}, props)
|
|
22
|
-
) });
|
|
23
|
-
};
|
|
24
|
-
Drawer.displayName = "Drawer";
|
|
25
|
-
var DrawerTrigger = Drawer$1.Trigger;
|
|
26
|
-
var DrawerPortal = Drawer$1.Portal;
|
|
27
|
-
var DrawerClose = Drawer$1.Close;
|
|
28
|
-
var DrawerOverlay = React.forwardRef((_a, ref) => {
|
|
29
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
-
Drawer$1.Overlay,
|
|
32
|
-
__spreadValues({
|
|
33
|
-
ref,
|
|
34
|
-
"data-slot": "drawer-overlay",
|
|
35
|
-
className: cn("fixed inset-0 z-[1000] bg-black/60", className)
|
|
36
|
-
}, props)
|
|
37
|
-
);
|
|
38
|
-
});
|
|
39
|
-
DrawerOverlay.displayName = Drawer$1.Overlay.displayName;
|
|
40
|
-
var DrawerContent = React.forwardRef((_a, ref) => {
|
|
41
|
-
var _b = _a, { className, variant = "flush", showHandle, children } = _b, props = __objRest(_b, ["className", "variant", "showHandle", "children"]);
|
|
42
|
-
const direction = React.useContext(DrawerDirectionContext);
|
|
43
|
-
const isVertical = direction === "top" || direction === "bottom";
|
|
44
|
-
const handleEnabled = showHandle != null ? showHandle : direction === "bottom";
|
|
45
|
-
const positionClasses = direction === "bottom" ? "inset-x-0 bottom-0 flex-col rounded-t-2xl border-t [padding-bottom:max(env(safe-area-inset-bottom),0px)]" : direction === "top" ? "inset-x-0 top-0 flex-col rounded-b-2xl border-b [padding-top:max(env(safe-area-inset-top),0px)]" : direction === "left" ? "inset-y-0 left-0 h-full w-3/4 max-w-sm flex-col rounded-r-2xl border-r [padding-left:max(env(safe-area-inset-left),0px)]" : "inset-y-0 right-0 h-full w-3/4 max-w-sm flex-col rounded-l-2xl border-l [padding-right:max(env(safe-area-inset-right),0px)]";
|
|
46
|
-
return /* @__PURE__ */ jsxs(DrawerPortal, { children: [
|
|
47
|
-
/* @__PURE__ */ jsx(DrawerOverlay, {}),
|
|
48
|
-
/* @__PURE__ */ jsxs(
|
|
49
|
-
Drawer$1.Content,
|
|
50
|
-
__spreadProps(__spreadValues({
|
|
51
|
-
ref,
|
|
52
|
-
"data-slot": "drawer-content",
|
|
53
|
-
className: cn(
|
|
54
|
-
"fixed z-[1000] flex border-border bg-card shadow-[var(--shadow-overlay)]",
|
|
55
|
-
positionClasses,
|
|
56
|
-
// The single height cap for every vertical drawer. Consumers should
|
|
57
|
-
// NOT restate it: six app call sites carried an identical
|
|
58
|
-
// `!max-h-[90vh]`, so this default governed nothing and changing it
|
|
59
|
-
// here would have reached none of them.
|
|
60
|
-
isVertical ? "max-h-[85vh]" : "",
|
|
61
|
-
variant === "floating" && "m-3 rounded-2xl border",
|
|
62
|
-
className
|
|
63
|
-
)
|
|
64
|
-
}, props), {
|
|
65
|
-
children: [
|
|
66
|
-
handleEnabled && /* @__PURE__ */ jsx(
|
|
67
|
-
"div",
|
|
68
|
-
{
|
|
69
|
-
"aria-hidden": true,
|
|
70
|
-
className: "mx-auto mt-2 h-1.5 w-[60px] shrink-0 rounded-full bg-muted-foreground/30"
|
|
71
|
-
}
|
|
72
|
-
),
|
|
73
|
-
children
|
|
74
|
-
]
|
|
75
|
-
})
|
|
76
|
-
)
|
|
77
|
-
] });
|
|
78
|
-
});
|
|
79
|
-
DrawerContent.displayName = "DrawerContent";
|
|
80
|
-
var DrawerHeader = (_a) => {
|
|
81
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
82
|
-
return /* @__PURE__ */ jsx(
|
|
83
|
-
"div",
|
|
84
|
-
__spreadValues({
|
|
85
|
-
"data-slot": "drawer-header",
|
|
86
|
-
className: cn("grid gap-1.5 p-4 text-center sm:text-left", className)
|
|
87
|
-
}, props)
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
DrawerHeader.displayName = "DrawerHeader";
|
|
91
|
-
var DrawerFooter = (_a) => {
|
|
92
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
93
|
-
return /* @__PURE__ */ jsx(
|
|
94
|
-
"div",
|
|
95
|
-
__spreadValues({
|
|
96
|
-
"data-slot": "drawer-footer",
|
|
97
|
-
className: cn("mt-auto flex flex-col gap-2 p-4", className)
|
|
98
|
-
}, props)
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
DrawerFooter.displayName = "DrawerFooter";
|
|
102
|
-
var DrawerTitle = React.forwardRef((_a, ref) => {
|
|
103
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
104
|
-
return /* @__PURE__ */ jsx(
|
|
105
|
-
Drawer$1.Title,
|
|
106
|
-
__spreadValues({
|
|
107
|
-
ref,
|
|
108
|
-
"data-slot": "drawer-title",
|
|
109
|
-
className: cn("text-lg font-semibold leading-none tracking-tight", className)
|
|
110
|
-
}, props)
|
|
111
|
-
);
|
|
112
|
-
});
|
|
113
|
-
DrawerTitle.displayName = Drawer$1.Title.displayName;
|
|
114
|
-
var DrawerDescription = React.forwardRef((_a, ref) => {
|
|
115
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
116
|
-
return /* @__PURE__ */ jsx(
|
|
117
|
-
Drawer$1.Description,
|
|
118
|
-
__spreadValues({
|
|
119
|
-
ref,
|
|
120
|
-
"data-slot": "drawer-description",
|
|
121
|
-
className: cn("text-sm text-muted-foreground", className)
|
|
122
|
-
}, props)
|
|
123
|
-
);
|
|
124
|
-
});
|
|
125
|
-
DrawerDescription.displayName = Drawer$1.Description.displayName;
|
|
126
|
-
|
|
127
|
-
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
|
|
1
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from '../chunk-XLHMF6F5.js';
|
|
2
|
+
import '../chunk-FEK5XGZW.js';
|
|
3
|
+
import '../chunk-MMUBH76A.js';
|
|
@@ -16,7 +16,7 @@ interface EmptyStateProps {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
}
|
|
18
18
|
declare const EmptyState: React.ForwardRefExoticComponent<EmptyStateProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const SearchEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "
|
|
20
|
-
declare const ErrorEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "
|
|
19
|
+
declare const SearchEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "icon" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const ErrorEmptyState: React.ForwardRefExoticComponent<Omit<EmptyStateProps, "icon" | "variant"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
21
|
|
|
22
22
|
export { EmptyState, ErrorEmptyState, SearchEmptyState };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { MentionSignal, MenuItem } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
export { MentionSignal, MenuItem } from '../chunk-XNBDACL7.js';
|
|
2
|
+
import '../chunk-6W25S5CF.js';
|
|
3
|
+
import '../chunk-NIAL4ZU2.js';
|
|
4
4
|
import '../chunk-FEK5XGZW.js';
|
|
5
5
|
import '../chunk-MMUBH76A.js';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MenuPickRow — a dish in the add-an-item overlay (16-shared-table.html T3):
|
|
5
|
+
* its name, its price, and a disc that adds it.
|
|
6
|
+
*
|
|
7
|
+
* The disc is the control and the row is not: a whole-row target would make
|
|
8
|
+
* "read the menu" and "add this" the same gesture, and a reader scrolling a
|
|
9
|
+
* long menu would add things by accident. It is 44×44 as the accessibility
|
|
10
|
+
* floor asks, with the drawn 28px disc inside it.
|
|
11
|
+
*
|
|
12
|
+
* A tap adds one unit. There is no stepper and no quantity anywhere in the
|
|
13
|
+
* shared table — one row per unit, so removing one is removing one thing and
|
|
14
|
+
* never an arithmetic edit (the board's ruling 3). `selected` is therefore
|
|
15
|
+
* "this dish is on the table", not a count; a caller showing a second unit
|
|
16
|
+
* shows a second row.
|
|
17
|
+
*/
|
|
18
|
+
type MenuPickRowProps = Omit<React.HTMLAttributes<HTMLDivElement>, "onToggle"> & {
|
|
19
|
+
/** The dish. */
|
|
20
|
+
label: React.ReactNode;
|
|
21
|
+
/** Its price, formatted by the caller. */
|
|
22
|
+
price: React.ReactNode;
|
|
23
|
+
/** Is it on the table already? Fills the disc. */
|
|
24
|
+
selected?: boolean;
|
|
25
|
+
onToggle?: () => void;
|
|
26
|
+
/** The disc's accessible name when it would add — "Add Papanași". Injected. */
|
|
27
|
+
addLabel?: string;
|
|
28
|
+
/** Its name when it would remove — "Remove Papanași". Injected. */
|
|
29
|
+
removeLabel?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
};
|
|
32
|
+
declare const MenuPickRow: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<HTMLDivElement>, "onToggle"> & {
|
|
33
|
+
/** The dish. */
|
|
34
|
+
label: React.ReactNode;
|
|
35
|
+
/** Its price, formatted by the caller. */
|
|
36
|
+
price: React.ReactNode;
|
|
37
|
+
/** Is it on the table already? Fills the disc. */
|
|
38
|
+
selected?: boolean;
|
|
39
|
+
onToggle?: () => void;
|
|
40
|
+
/** The disc's accessible name when it would add — "Add Papanași". Injected. */
|
|
41
|
+
addLabel?: string;
|
|
42
|
+
/** Its name when it would remove — "Remove Papanași". Injected. */
|
|
43
|
+
removeLabel?: string;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
|
|
47
|
+
export { MenuPickRow, type MenuPickRowProps };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { cn } from '../chunk-FEK5XGZW.js';
|
|
2
|
+
import { __objRest, __spreadProps, __spreadValues } from '../chunk-MMUBH76A.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Plus } from 'lucide-react';
|
|
5
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
var MenuPickRow = React.forwardRef(
|
|
8
|
+
(_a, ref) => {
|
|
9
|
+
var _b = _a, { className, label, price, selected = false, onToggle, addLabel, removeLabel, disabled = false } = _b, props = __objRest(_b, ["className", "label", "price", "selected", "onToggle", "addLabel", "removeLabel", "disabled"]);
|
|
10
|
+
return /* @__PURE__ */ jsxs(
|
|
11
|
+
"div",
|
|
12
|
+
__spreadProps(__spreadValues({
|
|
13
|
+
ref,
|
|
14
|
+
"data-slot": "menu-pick-row",
|
|
15
|
+
"data-selected": selected ? "" : void 0,
|
|
16
|
+
className: cn("flex items-center gap-3 py-2.5", className)
|
|
17
|
+
}, props), {
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-[14px] font-bold", children: label }),
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-[14px] font-bold tabular-nums", children: price }),
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
"button",
|
|
23
|
+
{
|
|
24
|
+
type: "button",
|
|
25
|
+
onClick: onToggle,
|
|
26
|
+
disabled,
|
|
27
|
+
"aria-pressed": selected,
|
|
28
|
+
"aria-label": selected ? removeLabel : addLabel,
|
|
29
|
+
className: "grid size-11 shrink-0 place-items-center rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
30
|
+
children: /* @__PURE__ */ jsx(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
className: cn(
|
|
34
|
+
"grid size-7 place-items-center rounded-full border transition-colors",
|
|
35
|
+
selected ? "border-transparent bg-primary text-primary-foreground" : "border-border bg-background text-muted-foreground"
|
|
36
|
+
),
|
|
37
|
+
children: /* @__PURE__ */ jsx(Plus, { className: "size-4", "aria-hidden": true, strokeWidth: 2.5 })
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
]
|
|
43
|
+
})
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
MenuPickRow.displayName = "MenuPickRow";
|
|
48
|
+
|
|
49
|
+
export { MenuPickRow };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Checkbox } from '../chunk-L3CDXVEP.js';
|
|
2
2
|
import { Popover, PopoverTrigger, PopoverContent } from '../chunk-2ADCZXZJ.js';
|
|
3
|
-
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
3
|
+
import { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from '../chunk-VCRXL7H5.js';
|
|
4
|
+
import '../chunk-TVEIUTBQ.js';
|
|
5
5
|
import { Button } from '../chunk-5SGKGFMN.js';
|
|
6
6
|
import '../chunk-RIH2IS7X.js';
|
|
7
7
|
import '../chunk-5YNIQ2BL.js';
|
|
8
|
-
import { Badge } from '../chunk-
|
|
8
|
+
import { Badge } from '../chunk-NIAL4ZU2.js';
|
|
9
9
|
import { cn } from '../chunk-FEK5XGZW.js';
|
|
10
10
|
import '../chunk-MMUBH76A.js';
|
|
11
11
|
import * as React from 'react';
|