@ai-matrx/records-ui 0.56.0 → 0.57.0

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/index.js CHANGED
@@ -8810,7 +8810,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
8810
8810
  const all = tables.data ?? [];
8811
8811
  const missingTie = ticked.filter((e) => e.namesVia.trim() === "");
8812
8812
  const ready = clientTableId !== null && ticked.length > 0 && missingTie.length === 0;
8813
- return /* @__PURE__ */ jsxs29("section", { className: cn27("flex flex-col gap-3", className), children: [
8813
+ return /* @__PURE__ */ jsxs29("section", { className: cn27("@container flex flex-col gap-3", className), children: [
8814
8814
  /* @__PURE__ */ jsxs29("header", { className: "flex items-center gap-2", children: [
8815
8815
  /* @__PURE__ */ jsx33("h3", { className: "text-sm font-medium", children: existing ? "Portal" : "New client portal" }),
8816
8816
  /* @__PURE__ */ jsx33("div", { className: "flex-1" }),
@@ -8951,7 +8951,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
8951
8951
  /* @__PURE__ */ jsx33(
8952
8952
  BasicInput8,
8953
8953
  {
8954
- className: "h-8 w-56",
8954
+ className: "h-8 w-full @md:w-56",
8955
8955
  value: inviteEmail,
8956
8956
  onChange: (e) => setInviteEmail(e.target.value)
8957
8957
  }
@@ -8962,7 +8962,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
8962
8962
  /* @__PURE__ */ jsx33(
8963
8963
  BasicInput8,
8964
8964
  {
8965
- className: "h-8 w-80",
8965
+ className: "h-8 w-full @md:w-80",
8966
8966
  placeholder: "the record id",
8967
8967
  value: inviteRecordId,
8968
8968
  onChange: (e) => setInviteRecordId(e.target.value)
@@ -9661,7 +9661,7 @@ function DigestScheduler({
9661
9661
  setPreview(answered.data);
9662
9662
  }
9663
9663
  if (views === null && !error) return /* @__PURE__ */ jsx36(Skeleton16, { className: cn30("h-56 w-full", className) });
9664
- return /* @__PURE__ */ jsxs32("section", { className: cn30("flex flex-col gap-3", className), children: [
9664
+ return /* @__PURE__ */ jsxs32("section", { className: cn30("@container flex flex-col gap-3", className), children: [
9665
9665
  /* @__PURE__ */ jsxs32("header", { className: "flex items-center gap-2", children: [
9666
9666
  /* @__PURE__ */ jsx36("h3", { className: "text-sm font-medium", children: "Send this on a schedule" }),
9667
9667
  /* @__PURE__ */ jsx36("div", { className: "flex-1" }),
@@ -9696,7 +9696,7 @@ function DigestScheduler({
9696
9696
  ),
9697
9697
  /* @__PURE__ */ jsx36("span", { className: "text-xs text-muted-foreground", children: "The first choice saves what is on screen as a view, so the summary and the screen stay the same thing." })
9698
9698
  ] }),
9699
- /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-2 gap-2", children: [
9699
+ /* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-1 gap-2 @md:grid-cols-2", children: [
9700
9700
  /* @__PURE__ */ jsxs32("label", { className: "flex flex-col gap-1", children: [
9701
9701
  /* @__PURE__ */ jsx36(Label5, { className: "text-xs font-medium", children: "How often" }),
9702
9702
  /* @__PURE__ */ jsx36(
@@ -10445,7 +10445,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, className }) {
10445
10445
  if (!rights.admin) {
10446
10446
  return /* @__PURE__ */ jsx39("p", { className: cn33("text-xs text-muted-foreground", className), children: rights.why("structure") });
10447
10447
  }
10448
- return /* @__PURE__ */ jsxs35("div", { className: cn33("flex min-h-0 gap-3", className), children: [
10448
+ return /* @__PURE__ */ jsxs35("div", { className: cn33("@container flex min-h-0 flex-col gap-3 @3xl:flex-row", className), children: [
10449
10449
  /* @__PURE__ */ jsxs35("div", { className: "flex min-w-0 flex-1 flex-col gap-2 overflow-auto", children: [
10450
10450
  /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-1 overflow-x-auto", role: "group", "aria-label": "Forms", children: [
10451
10451
  forms.map((form) => /* @__PURE__ */ jsx39(
@@ -10606,7 +10606,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, className }) {
10606
10606
  ] })
10607
10607
  ] })
10608
10608
  ] }),
10609
- draft ? /* @__PURE__ */ jsxs35("aside", { className: "w-96 shrink-0 overflow-auto rounded border p-2", children: [
10609
+ draft ? /* @__PURE__ */ jsxs35("aside", { className: "w-full shrink-0 overflow-auto rounded border p-2 @3xl:w-96", children: [
10610
10610
  /* @__PURE__ */ jsx39("h4", { className: "px-1 text-sm font-medium", children: draft.name }),
10611
10611
  /* @__PURE__ */ jsx39(FormRunner, { form: draft, preview: true })
10612
10612
  ] }) : null
@@ -12394,195 +12394,200 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, className }) {
12394
12394
  }
12395
12395
  const url = formId ? `${publicOrigin}${bookingPath(formId)}` : null;
12396
12396
  const shown = offer ?? null;
12397
- return /* @__PURE__ */ jsxs44("section", { className: cn42("flex flex-col gap-3", className), children: [
12398
- /* @__PURE__ */ jsxs44("header", { className: "flex items-center gap-2", children: [
12399
- /* @__PURE__ */ jsx48("h3", { className: "text-sm font-medium", children: existing ? "Booking page" : "New booking page" }),
12400
- /* @__PURE__ */ jsx48("div", { className: "flex-1" }),
12401
- /* @__PURE__ */ jsx48(Button39, { size: "sm", disabled: saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save" }),
12402
- onClose ? /* @__PURE__ */ jsx48(Button39, { size: "sm", variant: "ghost", onClick: onClose, children: "Close" }) : null
12403
- ] }),
12404
- error ? /* @__PURE__ */ jsx48(RefusalNotice, { error }) : null,
12405
- /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12406
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What it is called" }),
12407
- /* @__PURE__ */ jsx48(BasicInput15, { value: title, onChange: (e) => setTitle(e.target.value) })
12408
- ] }),
12409
- /* @__PURE__ */ jsxs44("div", { className: "grid grid-cols-2 gap-2", children: [
12410
- /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12411
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "How long one appointment is" }),
12412
- /* @__PURE__ */ jsx48(
12413
- "select",
12414
- {
12415
- className: "h-9 rounded border bg-background px-2 text-sm",
12416
- value: minutes,
12417
- onChange: (e) => setMinutes(Number(e.target.value)),
12418
- children: LENGTHS.map((n) => /* @__PURE__ */ jsxs44("option", { value: n, children: [
12419
- n,
12420
- " minutes"
12421
- ] }, n))
12422
- }
12423
- )
12424
- ] }),
12425
- /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12426
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Gap kept after each one" }),
12427
- /* @__PURE__ */ jsx48(
12428
- "select",
12429
- {
12430
- className: "h-9 rounded border bg-background px-2 text-sm",
12431
- value: buffer,
12432
- onChange: (e) => setBuffer(Number(e.target.value)),
12433
- children: [0, 5, 10, 15, 30].map((n) => /* @__PURE__ */ jsx48("option", { value: n, children: n === 0 ? "No gap \u2014 back to back" : `${n} minutes` }, n))
12434
- }
12435
- )
12436
- ] }),
12437
- /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12438
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Earliest somebody may book" }),
12439
- /* @__PURE__ */ jsx48(
12440
- "select",
12441
- {
12442
- className: "h-9 rounded border bg-background px-2 text-sm",
12443
- value: lead,
12444
- onChange: (e) => setLead(Number(e.target.value)),
12445
- children: [0, 60, 120, 240, 1440].map((n) => /* @__PURE__ */ jsx48("option", { value: n, children: n === 0 ? "Right away" : n === 1440 ? "A day from now" : `${n / 60} hour${n === 60 ? "" : "s"} from now` }, n))
12446
- }
12447
- )
12397
+ return (
12398
+ // THE RAIL IS 384px WIDE AND THE VIEWPORT IS NOT (walk 1, 2026-09-21):
12399
+ // every split below is a CONTAINER query, so this screen is the same
12400
+ // screen in a rail, a dialog and a full page.
12401
+ /* @__PURE__ */ jsxs44("section", { className: cn42("@container flex flex-col gap-3", className), children: [
12402
+ /* @__PURE__ */ jsxs44("header", { className: "flex items-center gap-2", children: [
12403
+ /* @__PURE__ */ jsx48("h3", { className: "text-sm font-medium", children: existing ? "Booking page" : "New booking page" }),
12404
+ /* @__PURE__ */ jsx48("div", { className: "flex-1" }),
12405
+ /* @__PURE__ */ jsx48(Button39, { size: "sm", disabled: saving, onClick: () => void save(), children: saving ? "Saving\u2026" : "Save" }),
12406
+ onClose ? /* @__PURE__ */ jsx48(Button39, { size: "sm", variant: "ghost", onClick: onClose, children: "Close" }) : null
12448
12407
  ] }),
12408
+ error ? /* @__PURE__ */ jsx48(RefusalNotice, { error }) : null,
12449
12409
  /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12450
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Most in one day" }),
12451
- /* @__PURE__ */ jsx48(
12452
- BasicInput15,
12453
- {
12454
- type: "number",
12455
- min: 1,
12456
- value: perDay,
12457
- onChange: (e) => setPerDay(Math.max(1, Number(e.target.value) || 1))
12458
- }
12459
- )
12410
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What it is called" }),
12411
+ /* @__PURE__ */ jsx48(BasicInput15, { value: title, onChange: (e) => setTitle(e.target.value) })
12460
12412
  ] }),
12461
- /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12462
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "How far ahead the page offers" }),
12463
- /* @__PURE__ */ jsx48(
12464
- "select",
12465
- {
12466
- className: "h-9 rounded border bg-background px-2 text-sm",
12467
- value: days,
12468
- onChange: (e) => setDays(Number(e.target.value)),
12469
- children: [7, 14, 30, 60, 90].map((n) => /* @__PURE__ */ jsxs44("option", { value: n, children: [
12470
- n,
12471
- " days"
12472
- ] }, n))
12473
- }
12474
- )
12475
- ] })
12476
- ] }),
12477
- /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-1.5", children: [
12478
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Hours you are free" }),
12479
- windows.map((w, i) => /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
12480
- /* @__PURE__ */ jsxs44("label", { className: "flex w-20 items-center gap-1.5 text-xs", children: [
12413
+ /* @__PURE__ */ jsxs44("div", { className: "grid grid-cols-1 gap-2 @md:grid-cols-2", children: [
12414
+ /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12415
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "How long one appointment is" }),
12481
12416
  /* @__PURE__ */ jsx48(
12482
- Checkbox7,
12417
+ "select",
12483
12418
  {
12484
- checked: w.on,
12485
- onCheckedChange: (on) => setWindows((prev) => prev.map((x, j) => i === j ? { ...x, on: Boolean(on) } : x))
12419
+ className: "h-9 rounded border bg-background px-2 text-sm",
12420
+ value: minutes,
12421
+ onChange: (e) => setMinutes(Number(e.target.value)),
12422
+ children: LENGTHS.map((n) => /* @__PURE__ */ jsxs44("option", { value: n, children: [
12423
+ n,
12424
+ " minutes"
12425
+ ] }, n))
12486
12426
  }
12487
- ),
12488
- DAYS[i]?.label
12427
+ )
12489
12428
  ] }),
12490
- w.on ? /* @__PURE__ */ jsxs44(Fragment22, { children: [
12429
+ /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12430
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Gap kept after each one" }),
12491
12431
  /* @__PURE__ */ jsx48(
12492
- BasicInput15,
12432
+ "select",
12493
12433
  {
12494
- type: "time",
12495
- className: "h-8 w-28",
12496
- value: w.from,
12497
- onChange: (e) => setWindows((prev) => prev.map((x, j) => i === j ? { ...x, from: e.target.value } : x))
12434
+ className: "h-9 rounded border bg-background px-2 text-sm",
12435
+ value: buffer,
12436
+ onChange: (e) => setBuffer(Number(e.target.value)),
12437
+ children: [0, 5, 10, 15, 30].map((n) => /* @__PURE__ */ jsx48("option", { value: n, children: n === 0 ? "No gap \u2014 back to back" : `${n} minutes` }, n))
12498
12438
  }
12499
- ),
12500
- /* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: "to" }),
12439
+ )
12440
+ ] }),
12441
+ /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12442
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Earliest somebody may book" }),
12443
+ /* @__PURE__ */ jsx48(
12444
+ "select",
12445
+ {
12446
+ className: "h-9 rounded border bg-background px-2 text-sm",
12447
+ value: lead,
12448
+ onChange: (e) => setLead(Number(e.target.value)),
12449
+ children: [0, 60, 120, 240, 1440].map((n) => /* @__PURE__ */ jsx48("option", { value: n, children: n === 0 ? "Right away" : n === 1440 ? "A day from now" : `${n / 60} hour${n === 60 ? "" : "s"} from now` }, n))
12450
+ }
12451
+ )
12452
+ ] }),
12453
+ /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12454
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Most in one day" }),
12501
12455
  /* @__PURE__ */ jsx48(
12502
12456
  BasicInput15,
12503
12457
  {
12504
- type: "time",
12505
- className: "h-8 w-28",
12506
- value: w.to,
12507
- onChange: (e) => setWindows((prev) => prev.map((x, j) => i === j ? { ...x, to: e.target.value } : x))
12458
+ type: "number",
12459
+ min: 1,
12460
+ value: perDay,
12461
+ onChange: (e) => setPerDay(Math.max(1, Number(e.target.value) || 1))
12508
12462
  }
12509
12463
  )
12510
- ] }) : /* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: "not taking bookings" })
12511
- ] }, w.weekday))
12512
- ] }),
12513
- /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-1.5", children: [
12514
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What to ask the person booking" }),
12515
- askable.length === 0 ? /* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: "This table has no fields yet, so there is nothing a booking page could ask for. Add a field first \u2014 every question is one of this table's own fields." }) : /* @__PURE__ */ jsx48("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", children: askable.map((f) => /* @__PURE__ */ jsxs44("label", { className: "flex items-center gap-1.5 text-xs", children: [
12464
+ ] }),
12465
+ /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12466
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "How far ahead the page offers" }),
12467
+ /* @__PURE__ */ jsx48(
12468
+ "select",
12469
+ {
12470
+ className: "h-9 rounded border bg-background px-2 text-sm",
12471
+ value: days,
12472
+ onChange: (e) => setDays(Number(e.target.value)),
12473
+ children: [7, 14, 30, 60, 90].map((n) => /* @__PURE__ */ jsxs44("option", { value: n, children: [
12474
+ n,
12475
+ " days"
12476
+ ] }, n))
12477
+ }
12478
+ )
12479
+ ] })
12480
+ ] }),
12481
+ /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-1.5", children: [
12482
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "Hours you are free" }),
12483
+ windows.map((w, i) => /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-2", children: [
12484
+ /* @__PURE__ */ jsxs44("label", { className: "flex w-20 items-center gap-1.5 text-xs", children: [
12485
+ /* @__PURE__ */ jsx48(
12486
+ Checkbox7,
12487
+ {
12488
+ checked: w.on,
12489
+ onCheckedChange: (on) => setWindows((prev) => prev.map((x, j) => i === j ? { ...x, on: Boolean(on) } : x))
12490
+ }
12491
+ ),
12492
+ DAYS[i]?.label
12493
+ ] }),
12494
+ w.on ? /* @__PURE__ */ jsxs44(Fragment22, { children: [
12495
+ /* @__PURE__ */ jsx48(
12496
+ BasicInput15,
12497
+ {
12498
+ type: "time",
12499
+ className: "h-8 w-28",
12500
+ value: w.from,
12501
+ onChange: (e) => setWindows((prev) => prev.map((x, j) => i === j ? { ...x, from: e.target.value } : x))
12502
+ }
12503
+ ),
12504
+ /* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: "to" }),
12505
+ /* @__PURE__ */ jsx48(
12506
+ BasicInput15,
12507
+ {
12508
+ type: "time",
12509
+ className: "h-8 w-28",
12510
+ value: w.to,
12511
+ onChange: (e) => setWindows((prev) => prev.map((x, j) => i === j ? { ...x, to: e.target.value } : x))
12512
+ }
12513
+ )
12514
+ ] }) : /* @__PURE__ */ jsx48("span", { className: "text-xs text-muted-foreground", children: "not taking bookings" })
12515
+ ] }, w.weekday))
12516
+ ] }),
12517
+ /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-1.5", children: [
12518
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What to ask the person booking" }),
12519
+ askable.length === 0 ? /* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: "This table has no fields yet, so there is nothing a booking page could ask for. Add a field first \u2014 every question is one of this table's own fields." }) : /* @__PURE__ */ jsx48("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", children: askable.map((f) => /* @__PURE__ */ jsxs44("label", { className: "flex items-center gap-1.5 text-xs", children: [
12520
+ /* @__PURE__ */ jsx48(
12521
+ Checkbox7,
12522
+ {
12523
+ checked: asked.includes(f.key),
12524
+ onCheckedChange: (on) => setAsked((prev) => on ? [...prev, f.key] : prev.filter((k) => k !== f.key))
12525
+ }
12526
+ ),
12527
+ fieldName(f)
12528
+ ] }, f.key)) }),
12529
+ /* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: "The time, whether it is booked or cancelled, and who it is with are filled in by the store \u2014 a booking page cannot ask a visitor for any of the three." })
12530
+ ] }),
12531
+ /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12532
+ /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What they see after booking" }),
12533
+ /* @__PURE__ */ jsx48(
12534
+ BasicTextarea7,
12535
+ {
12536
+ rows: 2,
12537
+ value: confirmation,
12538
+ placeholder: "You're booked. We'll send a reminder the day before \u2014 reply to that message to move it.",
12539
+ onChange: (e) => setConfirmation(e.target.value)
12540
+ }
12541
+ )
12542
+ ] }),
12543
+ shown ? /* @__PURE__ */ jsxs44("p", { className: "rounded-md border bg-muted/40 p-2.5 text-xs", children: [
12544
+ "Saved. The page offers ",
12545
+ shown.slot_minutes,
12546
+ "-minute appointments in ",
12547
+ shown.timezone,
12548
+ ", up to",
12549
+ " ",
12550
+ shown.max_per_day,
12551
+ " a day, ",
12552
+ shown.days,
12553
+ " days ahead",
12554
+ shown.buffer_minutes > 0 ? `, with ${shown.buffer_minutes} minutes between them` : "",
12555
+ ":",
12556
+ " ",
12557
+ shown.windows.map(
12558
+ (w) => `${DAYS.find((d) => d.weekday === w.weekday)?.label ?? w.weekday} ${w.from}\u2013${w.to}`
12559
+ ).join(", "),
12560
+ "."
12561
+ ] }) : null,
12562
+ url ? /* @__PURE__ */ jsxs44("div", { className: "flex flex-wrap items-center gap-2 rounded-md border p-2.5", children: [
12563
+ /* @__PURE__ */ jsx48("span", { className: "min-w-0 flex-1 break-all text-xs", children: url }),
12516
12564
  /* @__PURE__ */ jsx48(
12517
- Checkbox7,
12565
+ Button39,
12518
12566
  {
12519
- checked: asked.includes(f.key),
12520
- onCheckedChange: (on) => setAsked((prev) => on ? [...prev, f.key] : prev.filter((k) => k !== f.key))
12567
+ size: "sm",
12568
+ variant: "outline",
12569
+ onClick: () => {
12570
+ void navigator.clipboard.writeText(url).then(() => {
12571
+ setCopied(true);
12572
+ window.setTimeout(() => setCopied(false), 1600);
12573
+ }).catch(() => setCopied(false));
12574
+ },
12575
+ children: copied ? "Copied" : "Copy link"
12521
12576
  }
12522
12577
  ),
12523
- fieldName(f)
12524
- ] }, f.key)) }),
12525
- /* @__PURE__ */ jsx48("p", { className: "text-xs text-muted-foreground", children: "The time, whether it is booked or cancelled, and who it is with are filled in by the store \u2014 a booking page cannot ask a visitor for any of the three." })
12526
- ] }),
12527
- /* @__PURE__ */ jsxs44("label", { className: "flex flex-col gap-1", children: [
12528
- /* @__PURE__ */ jsx48(Label8, { className: "text-xs font-medium", children: "What they see after booking" }),
12529
- /* @__PURE__ */ jsx48(
12530
- BasicTextarea7,
12531
- {
12532
- rows: 2,
12533
- value: confirmation,
12534
- placeholder: "You're booked. We'll send a reminder the day before \u2014 reply to that message to move it.",
12535
- onChange: (e) => setConfirmation(e.target.value)
12536
- }
12537
- )
12538
- ] }),
12539
- shown ? /* @__PURE__ */ jsxs44("p", { className: "rounded-md border bg-muted/40 p-2.5 text-xs", children: [
12540
- "Saved. The page offers ",
12541
- shown.slot_minutes,
12542
- "-minute appointments in ",
12543
- shown.timezone,
12544
- ", up to",
12545
- " ",
12546
- shown.max_per_day,
12547
- " a day, ",
12548
- shown.days,
12549
- " days ahead",
12550
- shown.buffer_minutes > 0 ? `, with ${shown.buffer_minutes} minutes between them` : "",
12551
- ":",
12552
- " ",
12553
- shown.windows.map(
12554
- (w) => `${DAYS.find((d) => d.weekday === w.weekday)?.label ?? w.weekday} ${w.from}\u2013${w.to}`
12555
- ).join(", "),
12556
- "."
12557
- ] }) : null,
12558
- url ? /* @__PURE__ */ jsxs44("div", { className: "flex flex-wrap items-center gap-2 rounded-md border p-2.5", children: [
12559
- /* @__PURE__ */ jsx48("span", { className: "min-w-0 flex-1 break-all text-xs", children: url }),
12560
- /* @__PURE__ */ jsx48(
12561
- Button39,
12562
- {
12563
- size: "sm",
12564
- variant: "outline",
12565
- onClick: () => {
12566
- void navigator.clipboard.writeText(url).then(() => {
12567
- setCopied(true);
12568
- window.setTimeout(() => setCopied(false), 1600);
12569
- }).catch(() => setCopied(false));
12570
- },
12571
- children: copied ? "Copied" : "Copy link"
12572
- }
12573
- ),
12574
- /* @__PURE__ */ jsx48(
12575
- Button39,
12576
- {
12577
- size: "sm",
12578
- disabled: publishing,
12579
- onClick: () => void publish(!(existing?.published_at && !existing.closed_at)),
12580
- children: publishing ? "\u2026" : existing?.published_at && !existing.closed_at ? "Unpublish" : "Publish"
12581
- }
12582
- ),
12583
- /* @__PURE__ */ jsx48("p", { className: "w-full text-xs text-muted-foreground", children: existing?.published_at && !existing.closed_at ? "Open. Anyone with this link can book a time." : "Not open yet \u2014 the link does not take bookings until you publish it." })
12584
- ] }) : null
12585
- ] });
12578
+ /* @__PURE__ */ jsx48(
12579
+ Button39,
12580
+ {
12581
+ size: "sm",
12582
+ disabled: publishing,
12583
+ onClick: () => void publish(!(existing?.published_at && !existing.closed_at)),
12584
+ children: publishing ? "\u2026" : existing?.published_at && !existing.closed_at ? "Unpublish" : "Publish"
12585
+ }
12586
+ ),
12587
+ /* @__PURE__ */ jsx48("p", { className: "w-full text-xs text-muted-foreground", children: existing?.published_at && !existing.closed_at ? "Open. Anyone with this link can book a time." : "Not open yet \u2014 the link does not take bookings until you publish it." })
12588
+ ] }) : null
12589
+ ] })
12590
+ );
12586
12591
  }
12587
12592
 
12588
12593
  // src/BookingSlots.tsx