@almadar/ui 4.52.0 → 4.53.2
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/avl/index.cjs +82 -69
- package/dist/avl/index.js +82 -69
- package/dist/components/index.cjs +82 -69
- package/dist/components/index.js +82 -69
- package/dist/marketing/index.cjs +10 -1
- package/dist/marketing/index.js +10 -1
- package/dist/providers/index.cjs +82 -69
- package/dist/providers/index.js +82 -69
- package/dist/runtime/index.cjs +82 -69
- package/dist/runtime/index.js +82 -69
- package/package.json +2 -1
- package/tailwind-preset.cjs +13 -0
|
@@ -20343,12 +20343,12 @@ var init_DashboardLayout = __esm({
|
|
|
20343
20343
|
exports.HStack,
|
|
20344
20344
|
{
|
|
20345
20345
|
gap: "none",
|
|
20346
|
-
className: "min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
20346
|
+
className: "@container/dashboard min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
20347
20347
|
children: [
|
|
20348
20348
|
sidebarOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
20349
20349
|
exports.Box,
|
|
20350
20350
|
{
|
|
20351
|
-
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
20351
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 @lg/dashboard:hidden",
|
|
20352
20352
|
onClick: () => setSidebarOpen(false)
|
|
20353
20353
|
}
|
|
20354
20354
|
),
|
|
@@ -20358,7 +20358,7 @@ var init_DashboardLayout = __esm({
|
|
|
20358
20358
|
as: "aside",
|
|
20359
20359
|
className: cn(
|
|
20360
20360
|
"z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
20361
|
-
"fixed inset-y-0 left-0 lg:static lg:translate-x-0 lg:h-auto",
|
|
20361
|
+
"fixed inset-y-0 left-0 @lg/dashboard:static @lg/dashboard:translate-x-0 @lg/dashboard:h-auto",
|
|
20362
20362
|
"transform transition-transform duration-200 ease-in-out",
|
|
20363
20363
|
"flex flex-col",
|
|
20364
20364
|
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
@@ -20395,7 +20395,7 @@ var init_DashboardLayout = __esm({
|
|
|
20395
20395
|
exports.Button,
|
|
20396
20396
|
{
|
|
20397
20397
|
variant: "ghost",
|
|
20398
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20398
|
+
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20399
20399
|
onClick: () => setSidebarOpen(false),
|
|
20400
20400
|
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.X, { className: "h-5 w-5" })
|
|
20401
20401
|
}
|
|
@@ -20434,19 +20434,19 @@ var init_DashboardLayout = __esm({
|
|
|
20434
20434
|
{
|
|
20435
20435
|
align: "center",
|
|
20436
20436
|
justify: "between",
|
|
20437
|
-
className: "h-full px-3 sm:px-4 gap-2 sm:gap-4",
|
|
20437
|
+
className: "h-full px-3 @sm/dashboard:px-4 gap-2 @sm/dashboard:gap-4",
|
|
20438
20438
|
children: [
|
|
20439
20439
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20440
20440
|
exports.Button,
|
|
20441
20441
|
{
|
|
20442
20442
|
variant: "ghost",
|
|
20443
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20443
|
+
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20444
20444
|
onClick: () => setSidebarOpen(true),
|
|
20445
20445
|
"aria-label": "Open sidebar",
|
|
20446
20446
|
children: /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Menu, { className: "h-5 w-5" })
|
|
20447
20447
|
}
|
|
20448
20448
|
),
|
|
20449
|
-
searchEnabled && /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "hidden sm:block flex-1 min-w-0 xl:max-w-md", children: /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "relative", children: [
|
|
20449
|
+
searchEnabled && /* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: "hidden @sm/dashboard:block flex-1 min-w-0 @xl/dashboard:max-w-md", children: /* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "relative", children: [
|
|
20450
20450
|
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20451
20451
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
20452
20452
|
exports.Input,
|
|
@@ -20531,12 +20531,12 @@ var init_DashboardLayout = __esm({
|
|
|
20531
20531
|
exports.Typography,
|
|
20532
20532
|
{
|
|
20533
20533
|
variant: "small",
|
|
20534
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20534
|
+
className: "hidden @sm/dashboard:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20535
20535
|
as: "span",
|
|
20536
20536
|
children: user.name
|
|
20537
20537
|
}
|
|
20538
20538
|
),
|
|
20539
|
-
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20539
|
+
/* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronDown, { className: "hidden @sm/dashboard:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20540
20540
|
]
|
|
20541
20541
|
}
|
|
20542
20542
|
),
|
|
@@ -20593,7 +20593,7 @@ var init_DashboardLayout = __esm({
|
|
|
20593
20593
|
)
|
|
20594
20594
|
}
|
|
20595
20595
|
),
|
|
20596
|
-
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "main", className: "flex-1 p-3 sm:p-4 md:p-6", children })
|
|
20596
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { as: "main", className: "flex-1 p-3 @sm/dashboard:p-4 @md/dashboard:p-6", children })
|
|
20597
20597
|
] })
|
|
20598
20598
|
]
|
|
20599
20599
|
}
|
|
@@ -28442,7 +28442,16 @@ var init_StepFlow = __esm({
|
|
|
28442
28442
|
"flex items-center justify-center",
|
|
28443
28443
|
"bg-primary text-primary-foreground"
|
|
28444
28444
|
),
|
|
28445
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28445
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
28446
|
+
exports.Typography,
|
|
28447
|
+
{
|
|
28448
|
+
as: "span",
|
|
28449
|
+
variant: "small",
|
|
28450
|
+
weight: "semibold",
|
|
28451
|
+
className: "text-primary-foreground leading-none",
|
|
28452
|
+
children: step.number ?? index + 1
|
|
28453
|
+
}
|
|
28454
|
+
)
|
|
28446
28455
|
}
|
|
28447
28456
|
);
|
|
28448
28457
|
};
|
|
@@ -30167,64 +30176,68 @@ var init_PositionedCanvas = __esm({
|
|
|
30167
30176
|
},
|
|
30168
30177
|
[onSelect, selectEvent, eventBus]
|
|
30169
30178
|
);
|
|
30170
|
-
return
|
|
30171
|
-
|
|
30172
|
-
|
|
30173
|
-
|
|
30174
|
-
|
|
30175
|
-
|
|
30176
|
-
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
|
|
30181
|
-
|
|
30182
|
-
|
|
30183
|
-
|
|
30184
|
-
|
|
30185
|
-
|
|
30186
|
-
|
|
30187
|
-
|
|
30188
|
-
|
|
30189
|
-
|
|
30190
|
-
|
|
30191
|
-
|
|
30192
|
-
|
|
30193
|
-
"
|
|
30194
|
-
"
|
|
30195
|
-
|
|
30196
|
-
|
|
30197
|
-
|
|
30198
|
-
|
|
30199
|
-
|
|
30200
|
-
|
|
30201
|
-
|
|
30202
|
-
|
|
30203
|
-
|
|
30204
|
-
|
|
30205
|
-
|
|
30206
|
-
|
|
30207
|
-
|
|
30208
|
-
|
|
30209
|
-
|
|
30210
|
-
|
|
30211
|
-
|
|
30212
|
-
|
|
30213
|
-
|
|
30214
|
-
exports.
|
|
30215
|
-
{
|
|
30216
|
-
|
|
30217
|
-
|
|
30218
|
-
|
|
30219
|
-
|
|
30220
|
-
|
|
30221
|
-
|
|
30222
|
-
|
|
30223
|
-
|
|
30224
|
-
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30179
|
+
return (
|
|
30180
|
+
// Outer scroll viewport: caps the visual footprint to the parent's
|
|
30181
|
+
// available width on small screens. The inner plane keeps its fixed
|
|
30182
|
+
// {width × height} coordinate system (items are positioned by
|
|
30183
|
+
// absolute item.x/item.y), so a phone-sized viewport pans inside
|
|
30184
|
+
// the larger logical canvas rather than busting the layout.
|
|
30185
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Box, { className: cn("max-w-full overflow-auto rounded-md", className), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30186
|
+
exports.Box,
|
|
30187
|
+
{
|
|
30188
|
+
ref: containerRef,
|
|
30189
|
+
"data-testid": "positioned-canvas",
|
|
30190
|
+
className: "relative bg-background border border-border rounded-md overflow-hidden",
|
|
30191
|
+
style: { width, height },
|
|
30192
|
+
onClick: handleContainerClick,
|
|
30193
|
+
children: items.map((item) => {
|
|
30194
|
+
const status = item.status ?? "empty";
|
|
30195
|
+
const shape = item.shape ?? "round";
|
|
30196
|
+
const isSelected = selectedId === item.id;
|
|
30197
|
+
const isDragging = draggingId === item.id;
|
|
30198
|
+
const statusBadge = STATUS_BADGE[status];
|
|
30199
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
30200
|
+
exports.Box,
|
|
30201
|
+
{
|
|
30202
|
+
"data-testid": `item-node-${item.id}`,
|
|
30203
|
+
"data-status": status,
|
|
30204
|
+
className: cn(
|
|
30205
|
+
"absolute flex flex-col items-center justify-center gap-1 border-2 select-none",
|
|
30206
|
+
"transition-shadow",
|
|
30207
|
+
STATUS_CLASSES[status],
|
|
30208
|
+
getShapeClasses(shape),
|
|
30209
|
+
editable ? "cursor-move" : "cursor-pointer",
|
|
30210
|
+
isSelected && "outline outline-2 outline-offset-2 outline-primary shadow-md",
|
|
30211
|
+
isDragging && "shadow-lg z-10"
|
|
30212
|
+
),
|
|
30213
|
+
style: { left: item.x, top: item.y, touchAction: "none" },
|
|
30214
|
+
onPointerDown: (e) => handlePointerDown(e, item),
|
|
30215
|
+
onPointerMove: handlePointerMove,
|
|
30216
|
+
onPointerUp: (e) => handlePointerUp(e, item),
|
|
30217
|
+
onPointerCancel: (e) => handlePointerUp(e, item),
|
|
30218
|
+
children: [
|
|
30219
|
+
/* @__PURE__ */ jsxRuntime.jsxs(exports.Box, { className: "flex items-center gap-1", children: [
|
|
30220
|
+
getStatusIcon(status),
|
|
30221
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "body2", weight: "semibold", children: item.label })
|
|
30222
|
+
] }),
|
|
30223
|
+
/* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "secondary", children: item.partySize !== void 0 && status === "seated" ? `${item.partySize}/${item.capacity}` : `Cap ${item.capacity}` }),
|
|
30224
|
+
status === "seated" && item.serverName && /* @__PURE__ */ jsxRuntime.jsx(exports.Typography, { variant: "caption", color: "secondary", className: "truncate max-w-[80%]", children: item.serverName }),
|
|
30225
|
+
isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
30226
|
+
exports.Badge,
|
|
30227
|
+
{
|
|
30228
|
+
variant: statusBadge.variant,
|
|
30229
|
+
size: "sm",
|
|
30230
|
+
className: "absolute -top-2 -right-2",
|
|
30231
|
+
children: statusBadge.label
|
|
30232
|
+
}
|
|
30233
|
+
)
|
|
30234
|
+
]
|
|
30235
|
+
},
|
|
30236
|
+
item.id
|
|
30237
|
+
);
|
|
30238
|
+
})
|
|
30239
|
+
}
|
|
30240
|
+
) })
|
|
30228
30241
|
);
|
|
30229
30242
|
};
|
|
30230
30243
|
exports.PositionedCanvas.displayName = "PositionedCanvas";
|
package/dist/components/index.js
CHANGED
|
@@ -20297,12 +20297,12 @@ var init_DashboardLayout = __esm({
|
|
|
20297
20297
|
HStack,
|
|
20298
20298
|
{
|
|
20299
20299
|
gap: "none",
|
|
20300
|
-
className: "min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
20300
|
+
className: "@container/dashboard min-h-screen w-full bg-background dark:bg-background items-stretch",
|
|
20301
20301
|
children: [
|
|
20302
20302
|
sidebarOpen && /* @__PURE__ */ jsx(
|
|
20303
20303
|
Box,
|
|
20304
20304
|
{
|
|
20305
|
-
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 lg:hidden",
|
|
20305
|
+
className: "fixed inset-0 bg-foreground/50 dark:bg-foreground/70 z-20 @lg/dashboard:hidden",
|
|
20306
20306
|
onClick: () => setSidebarOpen(false)
|
|
20307
20307
|
}
|
|
20308
20308
|
),
|
|
@@ -20312,7 +20312,7 @@ var init_DashboardLayout = __esm({
|
|
|
20312
20312
|
as: "aside",
|
|
20313
20313
|
className: cn(
|
|
20314
20314
|
"z-30 w-64 flex-shrink-0 bg-card dark:bg-card border-r border-border dark:border-border",
|
|
20315
|
-
"fixed inset-y-0 left-0 lg:static lg:translate-x-0 lg:h-auto",
|
|
20315
|
+
"fixed inset-y-0 left-0 @lg/dashboard:static @lg/dashboard:translate-x-0 @lg/dashboard:h-auto",
|
|
20316
20316
|
"transform transition-transform duration-200 ease-in-out",
|
|
20317
20317
|
"flex flex-col",
|
|
20318
20318
|
sidebarOpen ? "translate-x-0" : "-translate-x-full"
|
|
@@ -20349,7 +20349,7 @@ var init_DashboardLayout = __esm({
|
|
|
20349
20349
|
Button,
|
|
20350
20350
|
{
|
|
20351
20351
|
variant: "ghost",
|
|
20352
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20352
|
+
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground",
|
|
20353
20353
|
onClick: () => setSidebarOpen(false),
|
|
20354
20354
|
children: /* @__PURE__ */ jsx(X, { className: "h-5 w-5" })
|
|
20355
20355
|
}
|
|
@@ -20388,19 +20388,19 @@ var init_DashboardLayout = __esm({
|
|
|
20388
20388
|
{
|
|
20389
20389
|
align: "center",
|
|
20390
20390
|
justify: "between",
|
|
20391
|
-
className: "h-full px-3 sm:px-4 gap-2 sm:gap-4",
|
|
20391
|
+
className: "h-full px-3 @sm/dashboard:px-4 gap-2 @sm/dashboard:gap-4",
|
|
20392
20392
|
children: [
|
|
20393
20393
|
/* @__PURE__ */ jsx(
|
|
20394
20394
|
Button,
|
|
20395
20395
|
{
|
|
20396
20396
|
variant: "ghost",
|
|
20397
|
-
className: "lg:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20397
|
+
className: "@lg/dashboard:hidden p-2 rounded-md hover:bg-muted dark:hover:bg-muted text-muted-foreground dark:text-muted-foreground touch-manipulation min-h-[44px] min-w-[44px] flex items-center justify-center",
|
|
20398
20398
|
onClick: () => setSidebarOpen(true),
|
|
20399
20399
|
"aria-label": "Open sidebar",
|
|
20400
20400
|
children: /* @__PURE__ */ jsx(Menu$1, { className: "h-5 w-5" })
|
|
20401
20401
|
}
|
|
20402
20402
|
),
|
|
20403
|
-
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden sm:block flex-1 min-w-0 xl:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20403
|
+
searchEnabled && /* @__PURE__ */ jsx(Box, { className: "hidden @sm/dashboard:block flex-1 min-w-0 @xl/dashboard:max-w-md", children: /* @__PURE__ */ jsxs(Box, { className: "relative", children: [
|
|
20404
20404
|
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground dark:text-muted-foreground" }),
|
|
20405
20405
|
/* @__PURE__ */ jsx(
|
|
20406
20406
|
Input,
|
|
@@ -20485,12 +20485,12 @@ var init_DashboardLayout = __esm({
|
|
|
20485
20485
|
Typography,
|
|
20486
20486
|
{
|
|
20487
20487
|
variant: "small",
|
|
20488
|
-
className: "hidden sm:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20488
|
+
className: "hidden @sm/dashboard:block text-sm font-medium text-foreground dark:text-foreground",
|
|
20489
20489
|
as: "span",
|
|
20490
20490
|
children: user.name
|
|
20491
20491
|
}
|
|
20492
20492
|
),
|
|
20493
|
-
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden sm:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20493
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "hidden @sm/dashboard:block h-4 w-4 text-muted-foreground dark:text-muted-foreground" })
|
|
20494
20494
|
]
|
|
20495
20495
|
}
|
|
20496
20496
|
),
|
|
@@ -20547,7 +20547,7 @@ var init_DashboardLayout = __esm({
|
|
|
20547
20547
|
)
|
|
20548
20548
|
}
|
|
20549
20549
|
),
|
|
20550
|
-
/* @__PURE__ */ jsx(Box, { as: "main", className: "flex-1 p-3 sm:p-4 md:p-6", children })
|
|
20550
|
+
/* @__PURE__ */ jsx(Box, { as: "main", className: "flex-1 p-3 @sm/dashboard:p-4 @md/dashboard:p-6", children })
|
|
20551
20551
|
] })
|
|
20552
20552
|
]
|
|
20553
20553
|
}
|
|
@@ -28396,7 +28396,16 @@ var init_StepFlow = __esm({
|
|
|
28396
28396
|
"flex items-center justify-center",
|
|
28397
28397
|
"bg-primary text-primary-foreground"
|
|
28398
28398
|
),
|
|
28399
|
-
children: /* @__PURE__ */ jsx(
|
|
28399
|
+
children: /* @__PURE__ */ jsx(
|
|
28400
|
+
Typography,
|
|
28401
|
+
{
|
|
28402
|
+
as: "span",
|
|
28403
|
+
variant: "small",
|
|
28404
|
+
weight: "semibold",
|
|
28405
|
+
className: "text-primary-foreground leading-none",
|
|
28406
|
+
children: step.number ?? index + 1
|
|
28407
|
+
}
|
|
28408
|
+
)
|
|
28400
28409
|
}
|
|
28401
28410
|
);
|
|
28402
28411
|
};
|
|
@@ -30121,64 +30130,68 @@ var init_PositionedCanvas = __esm({
|
|
|
30121
30130
|
},
|
|
30122
30131
|
[onSelect, selectEvent, eventBus]
|
|
30123
30132
|
);
|
|
30124
|
-
return
|
|
30125
|
-
|
|
30126
|
-
|
|
30127
|
-
|
|
30128
|
-
|
|
30129
|
-
|
|
30130
|
-
|
|
30131
|
-
|
|
30132
|
-
|
|
30133
|
-
|
|
30134
|
-
|
|
30135
|
-
|
|
30136
|
-
|
|
30137
|
-
|
|
30138
|
-
|
|
30139
|
-
|
|
30140
|
-
|
|
30141
|
-
|
|
30142
|
-
|
|
30143
|
-
|
|
30144
|
-
|
|
30145
|
-
|
|
30146
|
-
|
|
30147
|
-
"
|
|
30148
|
-
"
|
|
30149
|
-
|
|
30150
|
-
|
|
30151
|
-
|
|
30152
|
-
|
|
30153
|
-
|
|
30154
|
-
|
|
30155
|
-
|
|
30156
|
-
|
|
30157
|
-
|
|
30158
|
-
|
|
30159
|
-
|
|
30160
|
-
|
|
30161
|
-
|
|
30162
|
-
|
|
30163
|
-
|
|
30164
|
-
|
|
30165
|
-
|
|
30166
|
-
|
|
30167
|
-
|
|
30168
|
-
|
|
30169
|
-
{
|
|
30170
|
-
|
|
30171
|
-
|
|
30172
|
-
|
|
30173
|
-
|
|
30174
|
-
|
|
30175
|
-
|
|
30176
|
-
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
|
|
30181
|
-
|
|
30133
|
+
return (
|
|
30134
|
+
// Outer scroll viewport: caps the visual footprint to the parent's
|
|
30135
|
+
// available width on small screens. The inner plane keeps its fixed
|
|
30136
|
+
// {width × height} coordinate system (items are positioned by
|
|
30137
|
+
// absolute item.x/item.y), so a phone-sized viewport pans inside
|
|
30138
|
+
// the larger logical canvas rather than busting the layout.
|
|
30139
|
+
/* @__PURE__ */ jsx(Box, { className: cn("max-w-full overflow-auto rounded-md", className), children: /* @__PURE__ */ jsx(
|
|
30140
|
+
Box,
|
|
30141
|
+
{
|
|
30142
|
+
ref: containerRef,
|
|
30143
|
+
"data-testid": "positioned-canvas",
|
|
30144
|
+
className: "relative bg-background border border-border rounded-md overflow-hidden",
|
|
30145
|
+
style: { width, height },
|
|
30146
|
+
onClick: handleContainerClick,
|
|
30147
|
+
children: items.map((item) => {
|
|
30148
|
+
const status = item.status ?? "empty";
|
|
30149
|
+
const shape = item.shape ?? "round";
|
|
30150
|
+
const isSelected = selectedId === item.id;
|
|
30151
|
+
const isDragging = draggingId === item.id;
|
|
30152
|
+
const statusBadge = STATUS_BADGE[status];
|
|
30153
|
+
return /* @__PURE__ */ jsxs(
|
|
30154
|
+
Box,
|
|
30155
|
+
{
|
|
30156
|
+
"data-testid": `item-node-${item.id}`,
|
|
30157
|
+
"data-status": status,
|
|
30158
|
+
className: cn(
|
|
30159
|
+
"absolute flex flex-col items-center justify-center gap-1 border-2 select-none",
|
|
30160
|
+
"transition-shadow",
|
|
30161
|
+
STATUS_CLASSES[status],
|
|
30162
|
+
getShapeClasses(shape),
|
|
30163
|
+
editable ? "cursor-move" : "cursor-pointer",
|
|
30164
|
+
isSelected && "outline outline-2 outline-offset-2 outline-primary shadow-md",
|
|
30165
|
+
isDragging && "shadow-lg z-10"
|
|
30166
|
+
),
|
|
30167
|
+
style: { left: item.x, top: item.y, touchAction: "none" },
|
|
30168
|
+
onPointerDown: (e) => handlePointerDown(e, item),
|
|
30169
|
+
onPointerMove: handlePointerMove,
|
|
30170
|
+
onPointerUp: (e) => handlePointerUp(e, item),
|
|
30171
|
+
onPointerCancel: (e) => handlePointerUp(e, item),
|
|
30172
|
+
children: [
|
|
30173
|
+
/* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", children: [
|
|
30174
|
+
getStatusIcon(status),
|
|
30175
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", weight: "semibold", children: item.label })
|
|
30176
|
+
] }),
|
|
30177
|
+
/* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", children: item.partySize !== void 0 && status === "seated" ? `${item.partySize}/${item.capacity}` : `Cap ${item.capacity}` }),
|
|
30178
|
+
status === "seated" && item.serverName && /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "secondary", className: "truncate max-w-[80%]", children: item.serverName }),
|
|
30179
|
+
isSelected && /* @__PURE__ */ jsx(
|
|
30180
|
+
Badge,
|
|
30181
|
+
{
|
|
30182
|
+
variant: statusBadge.variant,
|
|
30183
|
+
size: "sm",
|
|
30184
|
+
className: "absolute -top-2 -right-2",
|
|
30185
|
+
children: statusBadge.label
|
|
30186
|
+
}
|
|
30187
|
+
)
|
|
30188
|
+
]
|
|
30189
|
+
},
|
|
30190
|
+
item.id
|
|
30191
|
+
);
|
|
30192
|
+
})
|
|
30193
|
+
}
|
|
30194
|
+
) })
|
|
30182
30195
|
);
|
|
30183
30196
|
};
|
|
30184
30197
|
PositionedCanvas.displayName = "PositionedCanvas";
|
package/dist/marketing/index.cjs
CHANGED
|
@@ -4108,7 +4108,16 @@ var StepCircle = ({ step, index }) => {
|
|
|
4108
4108
|
"flex items-center justify-center",
|
|
4109
4109
|
"bg-primary text-primary-foreground"
|
|
4110
4110
|
),
|
|
4111
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4111
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4112
|
+
Typography,
|
|
4113
|
+
{
|
|
4114
|
+
as: "span",
|
|
4115
|
+
variant: "small",
|
|
4116
|
+
weight: "semibold",
|
|
4117
|
+
className: "text-primary-foreground leading-none",
|
|
4118
|
+
children: step.number ?? index + 1
|
|
4119
|
+
}
|
|
4120
|
+
)
|
|
4112
4121
|
}
|
|
4113
4122
|
);
|
|
4114
4123
|
};
|
package/dist/marketing/index.js
CHANGED
|
@@ -4084,7 +4084,16 @@ var StepCircle = ({ step, index }) => {
|
|
|
4084
4084
|
"flex items-center justify-center",
|
|
4085
4085
|
"bg-primary text-primary-foreground"
|
|
4086
4086
|
),
|
|
4087
|
-
children: /* @__PURE__ */ jsx(
|
|
4087
|
+
children: /* @__PURE__ */ jsx(
|
|
4088
|
+
Typography,
|
|
4089
|
+
{
|
|
4090
|
+
as: "span",
|
|
4091
|
+
variant: "small",
|
|
4092
|
+
weight: "semibold",
|
|
4093
|
+
className: "text-primary-foreground leading-none",
|
|
4094
|
+
children: step.number ?? index + 1
|
|
4095
|
+
}
|
|
4096
|
+
)
|
|
4088
4097
|
}
|
|
4089
4098
|
);
|
|
4090
4099
|
};
|