@semics-tech/emdash-events 1.0.0-rc.3 → 1.0.0-rc.31
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/README.md +1 -1
- package/dist/index.mjs +6 -2
- package/dist/manifest.json +6 -5
- package/dist/plugin.mjs +7 -6
- package/dist/ts/astro/lib/call.d.ts +2 -0
- package/dist/ts/astro/lib/call.js +2 -0
- package/dist/ts/astro/lib/page.d.ts +44 -0
- package/dist/ts/astro/lib/page.js +123 -0
- package/dist/ts/integration/index.d.ts +15 -1
- package/dist/ts/integration/index.js +21 -1
- package/emdash-plugin.jsonc +8 -3
- package/package.json +6 -1
- package/src/astro/AttendeeList.astro +36 -15
- package/src/astro/BookingPage.astro +72 -10
- package/src/astro/BookingStatus.astro +209 -54
- package/src/astro/BookingWidget.astro +284 -59
- package/src/astro/CancelBooking.astro +80 -0
- package/src/astro/PageBrand.astro +18 -0
- package/src/astro/PageOrganiser.astro +22 -0
- package/src/astro/SetupPage.astro +88 -0
- package/src/astro/TicketPass.astro +131 -33
- package/src/astro/checkout-endpoint.ts +21 -3
- package/src/astro/lib/attendees.ts +76 -10
- package/src/astro/lib/book-link.ts +46 -0
- package/src/astro/lib/call.ts +4 -0
- package/src/astro/lib/checkout-form.ts +49 -1
- package/src/astro/lib/encryption.ts +67 -0
- package/src/astro/lib/list.ts +22 -0
- package/src/astro/lib/mapping.ts +106 -0
- package/src/astro/lib/page.ts +143 -0
- package/src/astro/lib/pass.ts +9 -0
- package/src/astro/lib/payment.ts +6 -10
- package/src/astro/lib/setup.ts +129 -0
- package/src/astro/lib/widget.ts +172 -7
- package/src/astro/virtual.d.ts +25 -1
- package/src/client/booking.ts +42 -6
- package/src/client/forget-form.ts +16 -0
- package/src/client/picker.ts +20 -9
- package/src/client/print.ts +12 -0
- package/src/i18n/ar.ts +55 -1
- package/src/i18n/en.ts +57 -1
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import { pluginId } from "virtual:semics-events/config";
|
|
7
7
|
|
|
8
8
|
import { pickLocale, translator } from "../i18n/index";
|
|
9
|
+
import { bookAnchor, presetTicketType, presetVoucher } from "./lib/book-link";
|
|
9
10
|
import { callPublicRoute } from "./lib/call";
|
|
10
11
|
import { CHECKOUT_PATH, QTY_PREFIX } from "./lib/checkout-form";
|
|
11
12
|
import { pickerFetchFrom, pickerHref, pickerParam, pickerView, usesPicker } from "./lib/picker";
|
|
@@ -20,6 +21,8 @@ import {
|
|
|
20
21
|
newIdempotencyKey,
|
|
21
22
|
type PublicEvent,
|
|
22
23
|
readWidgetState,
|
|
24
|
+
requestDates,
|
|
25
|
+
requestWindows,
|
|
23
26
|
safeReturnTo,
|
|
24
27
|
type WidgetField,
|
|
25
28
|
} from "./lib/widget";
|
|
@@ -61,6 +64,9 @@ const id = anchorId(eventId);
|
|
|
61
64
|
// Promo codes are Events Pro's (T078): the field shows only when the core says it takes them. An
|
|
62
65
|
// applied code lives in an HttpOnly cookie (`/_events/promo`), never the URL, and is checked again here.
|
|
63
66
|
const takesCodes = data?.promoCodes === true;
|
|
67
|
+
// Gift vouchers (T166): only Events Pro paired with Vouchers says so. The code goes with the order; the
|
|
68
|
+
// checkout holds it with Vouchers between reserve and continue, and never puts it in a URL.
|
|
69
|
+
const takesVouchers = data?.vouchers === true;
|
|
64
70
|
let promo: PromoView | null = Astro.props.promo ?? null;
|
|
65
71
|
if (takesCodes && Astro.props.promo === undefined) {
|
|
66
72
|
let code = "";
|
|
@@ -82,13 +88,39 @@ const ticketTypes = [
|
|
|
82
88
|
...(data?.ticketTypes ?? []),
|
|
83
89
|
...(takesCodes ? (promo?.hiddenTypes ?? []) : []).filter((t) => !listed.has(t.id)),
|
|
84
90
|
] as PublicEvent["ticketTypes"];
|
|
85
|
-
|
|
91
|
+
// Per-person add-ons (Events Pro, T174d) are not places: listed under the tickets, capped by the places chosen.
|
|
92
|
+
const placeTypes = ticketTypes.filter((t) => !t.addon);
|
|
93
|
+
const addonTypes = ticketTypes.filter((t) => t.addon);
|
|
94
|
+
const onSale = data?.status === "on_sale" && placeTypes.length > 0;
|
|
95
|
+
// "Book with this voucher" (T171): the voucher page left the code in an HttpOnly cookie (never a URL) and may
|
|
96
|
+
// name a ticket type, which starts at one ticket. A page that filled in a code must not be cached.
|
|
97
|
+
let presetCode = "";
|
|
98
|
+
if (takesVouchers) {
|
|
99
|
+
presetCode = presetVoucher(Astro.cookies);
|
|
100
|
+
if (presetCode) {
|
|
101
|
+
try {
|
|
102
|
+
Astro.response.headers.set("Cache-Control", "private, no-store");
|
|
103
|
+
} catch {
|
|
104
|
+
// Headers already sent: the cookie only reaches the buyer who has it.
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
const presetType = presetTicketType(
|
|
109
|
+
Astro.url,
|
|
110
|
+
ticketTypes.filter((t) => t.available !== 0).map((t) => t.id),
|
|
111
|
+
);
|
|
86
112
|
// Many dates a day, or a slot schedule (T130): a month calendar of days, then the day's times. Without
|
|
87
113
|
// JavaScript the same month's dates show as a select grouped by day.
|
|
88
114
|
const zone = data?.timezone ?? "UTC";
|
|
89
115
|
const picker = usesPicker(data, zone)
|
|
90
116
|
? pickerView(occurrences, { zone, locale, start: pickerStart, now: Date.now(), more: data?.more === true })
|
|
91
117
|
: null;
|
|
118
|
+
// Booking requests (T174a): the dates the event takes (allowed weekdays, notice, days ahead, not closed) as a
|
|
119
|
+
// select that works without JavaScript, then the time windows as radios; the form posts `request`.
|
|
120
|
+
const requests = data?.requests;
|
|
121
|
+
const requestDays = requests ? requestDates(requests, zone, Date.now(), locale) : [];
|
|
122
|
+
// T176: every window (the rules' too); the server refuses one the date does not offer.
|
|
123
|
+
const requestWindowList = requests ? requestWindows(requests) : [];
|
|
92
124
|
const pickerIds = new Set(picker?.days.flatMap((d) => d.slots.map((s) => s.id)));
|
|
93
125
|
const monthId = `${id}-month`;
|
|
94
126
|
// The waitlist (T081): offered when the core takes one and the tickets, or some dates, are sold out.
|
|
@@ -96,8 +128,8 @@ const fullDates = occurrences.filter((o) => o.available === 0 && (!picker || pic
|
|
|
96
128
|
const waitlist =
|
|
97
129
|
onSale &&
|
|
98
130
|
data?.waitlist === true &&
|
|
99
|
-
(
|
|
100
|
-
const waitlistDates =
|
|
131
|
+
(placeTypes.every((t) => t.available === 0) || fullDates.length > 0);
|
|
132
|
+
const waitlistDates = placeTypes.every((t) => t.available === 0)
|
|
101
133
|
? occurrences.filter((o) => !picker || pickerIds.has(o.id))
|
|
102
134
|
: fullDates;
|
|
103
135
|
const waitlistOutcome = readWaitlistState(Astro.url, eventId);
|
|
@@ -130,6 +162,7 @@ const when = (iso: string) => {
|
|
|
130
162
|
</form>
|
|
131
163
|
)}
|
|
132
164
|
<form
|
|
165
|
+
id={bookAnchor(eventId)}
|
|
133
166
|
method="post"
|
|
134
167
|
action={CHECKOUT_PATH}
|
|
135
168
|
data-semics-booking
|
|
@@ -140,6 +173,11 @@ const when = (iso: string) => {
|
|
|
140
173
|
data-turnstile-message={siteKey ? t("widget.turnstile") : undefined}
|
|
141
174
|
>
|
|
142
175
|
<p class="semics-form-alert" role="alert" data-form-alert hidden={!formAlert}>{formAlert}</p>
|
|
176
|
+
{takesVouchers && (
|
|
177
|
+
<p class="semics-have-voucher">
|
|
178
|
+
<a href={`#${id}-voucher`} data-testid="have-voucher">{t("widget.voucher.have")}</a>
|
|
179
|
+
</p>
|
|
180
|
+
)}
|
|
143
181
|
<input type="hidden" name="eventId" value={eventId} />
|
|
144
182
|
<input type="hidden" name="returnTo" value={returnTo} />
|
|
145
183
|
<input type="hidden" name="idempotencyKey" value={newIdempotencyKey()} />
|
|
@@ -181,7 +219,7 @@ const when = (iso: string) => {
|
|
|
181
219
|
aria-invalid={invalid("occurrence")}
|
|
182
220
|
aria-describedby={errId("occurrence")}
|
|
183
221
|
>
|
|
184
|
-
<legend>{t("widget.date")}</legend>
|
|
222
|
+
<legend class="semics-visually-hidden">{t("widget.date")}</legend>
|
|
185
223
|
<table role="grid" class="semics-calendar" aria-labelledby={monthId}>
|
|
186
224
|
<thead>
|
|
187
225
|
<tr>
|
|
@@ -267,6 +305,40 @@ const when = (iso: string) => {
|
|
|
267
305
|
</div>
|
|
268
306
|
)}
|
|
269
307
|
|
|
308
|
+
{requests && (
|
|
309
|
+
<>
|
|
310
|
+
<div class="semics-field">
|
|
311
|
+
<input type="hidden" name="needsRequest" value="1" />
|
|
312
|
+
<label for={`${id}-occurrence`}>{t("widget.date")}</label>
|
|
313
|
+
<select
|
|
314
|
+
id={`${id}-occurrence`}
|
|
315
|
+
name="requestDate"
|
|
316
|
+
required
|
|
317
|
+
data-field="occurrence"
|
|
318
|
+
aria-invalid={invalid("occurrence")}
|
|
319
|
+
aria-describedby={errId("occurrence")}
|
|
320
|
+
>
|
|
321
|
+
<option value="">{t("widget.chooseDate")}</option>
|
|
322
|
+
{requestDays.map((d) => <option value={d.value} data-windows={d.windows.join(" ")}>{d.label}</option>)}
|
|
323
|
+
</select>
|
|
324
|
+
<p class="semics-field-error" id={errId("occurrence")} data-error-for="occurrence" data-message={fieldText("occurrence")}>
|
|
325
|
+
{bad("occurrence") ? fieldText("occurrence") : ""}
|
|
326
|
+
</p>
|
|
327
|
+
</div>
|
|
328
|
+
<fieldset class="semics-windows" data-testid="booking-windows">
|
|
329
|
+
<legend>{t("widget.window")}</legend>
|
|
330
|
+
{requestWindowList.map((w) => (
|
|
331
|
+
<div class="semics-field semics-check">
|
|
332
|
+
<input id={`${id}-window-${w.id}`} type="radio" name="requestWindow" value={w.id} required checked={requestWindowList.length === 1} />
|
|
333
|
+
<label for={`${id}-window-${w.id}`}>{w.label} ({w.start}–{w.end})</label>
|
|
334
|
+
</div>
|
|
335
|
+
))}
|
|
336
|
+
</fieldset>
|
|
337
|
+
{/* T176: with JavaScript, only the chosen date's windows (each date option lists them). */}
|
|
338
|
+
<script is:inline>(function (s) { var f = s.previousElementSibling, d = f.previousElementSibling.querySelector("select"); function u() { var o = d.options[d.selectedIndex], w = o && o.dataset.windows, shown = []; f.querySelectorAll("input").forEach(function (i) { var off = w != null && w.split(" ").indexOf(i.value) < 0; i.parentNode.style.display = off ? "none" : ""; i.disabled = off; if (off) i.checked = false; else shown.push(i); }); if (shown.length === 1) shown[0].checked = true; } d.addEventListener("change", u); u(); })(document.currentScript);</script>
|
|
339
|
+
</>
|
|
340
|
+
)}
|
|
341
|
+
|
|
270
342
|
{takesCodes && (
|
|
271
343
|
<div class="semics-field semics-promo">
|
|
272
344
|
{promo && <input type="hidden" name="promoCode" value={promo.code} />}
|
|
@@ -301,16 +373,45 @@ const when = (iso: string) => {
|
|
|
301
373
|
</div>
|
|
302
374
|
)}
|
|
303
375
|
|
|
376
|
+
{takesVouchers && (
|
|
377
|
+
<div class="semics-field semics-voucher">
|
|
378
|
+
<label for={`${id}-voucher`}>{t("widget.voucher.label")}</label>
|
|
379
|
+
<input
|
|
380
|
+
id={`${id}-voucher`}
|
|
381
|
+
name="voucherCode"
|
|
382
|
+
type="text"
|
|
383
|
+
autocomplete="off"
|
|
384
|
+
autocapitalize="characters"
|
|
385
|
+
spellcheck="false"
|
|
386
|
+
maxlength="64"
|
|
387
|
+
value={presetCode || undefined}
|
|
388
|
+
data-field="voucher"
|
|
389
|
+
aria-invalid={invalid("voucher")}
|
|
390
|
+
aria-describedby={errId("voucher")}
|
|
391
|
+
/>
|
|
392
|
+
<p class="semics-field-error" id={errId("voucher")} data-error-for="voucher" data-message={fieldText("voucher")}>
|
|
393
|
+
{bad("voucher") ? fieldText("voucher") : ""}
|
|
394
|
+
</p>
|
|
395
|
+
</div>
|
|
396
|
+
)}
|
|
397
|
+
|
|
304
398
|
<fieldset class="semics-tickets" data-field="tickets" aria-invalid={invalid("tickets")} aria-describedby={errId("tickets")}>
|
|
305
399
|
<legend>{t("widget.tickets")}</legend>
|
|
306
|
-
{
|
|
400
|
+
{placeTypes.map((type) => {
|
|
307
401
|
const soldOut = type.available === 0;
|
|
308
402
|
const max = Math.min(type.maxPerOrder ?? 50, type.available ?? 50, 50);
|
|
403
|
+
// Its fewest per order (T174g): the script refuses fewer, but not none, before sending.
|
|
404
|
+
const min = type.minPerOrder ?? 1;
|
|
405
|
+
const price = formatMoney(type.priceMinor, data?.currency ?? "GBP", locale);
|
|
406
|
+
// A party package (Events Pro, T174f): one price for the group; its quantity is the people.
|
|
309
407
|
return (
|
|
310
408
|
<div class="semics-ticket">
|
|
311
409
|
<label for={`${id}-qty-${type.id}`}>
|
|
312
410
|
<span class="semics-ticket-name">{type.name}</span>
|
|
313
|
-
<span class="semics-ticket-price">{
|
|
411
|
+
<span class="semics-ticket-price">{type.package ? t("widget.packagePrice", { price }) : price}</span>
|
|
412
|
+
{type.package && (
|
|
413
|
+
<span class="semics-hint">{t("widget.packagePeople", { min: String(min), max: String(max) })}</span>
|
|
414
|
+
)}
|
|
314
415
|
{soldOut && <span class="semics-ticket-soldout">{t("widget.soldOut")}</span>}
|
|
315
416
|
</label>
|
|
316
417
|
<input
|
|
@@ -318,10 +419,13 @@ const when = (iso: string) => {
|
|
|
318
419
|
type="number"
|
|
319
420
|
inputmode="numeric"
|
|
320
421
|
name={`${QTY_PREFIX}${type.id}`}
|
|
321
|
-
value="0"
|
|
422
|
+
value={type.id === presetType ? "1" : "0"}
|
|
322
423
|
min="0"
|
|
323
424
|
max={String(max)}
|
|
324
425
|
disabled={soldOut}
|
|
426
|
+
data-package={type.package ? "" : undefined}
|
|
427
|
+
data-min={min > 1 ? String(min) : undefined}
|
|
428
|
+
data-min-message={min > 1 ? t("widget.field.minimum", { min: String(min), name: type.name }) : undefined}
|
|
325
429
|
data-price-minor={String(type.priceMinor)}
|
|
326
430
|
/>
|
|
327
431
|
</div>
|
|
@@ -332,6 +436,39 @@ const when = (iso: string) => {
|
|
|
332
436
|
</p>
|
|
333
437
|
</fieldset>
|
|
334
438
|
|
|
439
|
+
{addonTypes.length > 0 && (
|
|
440
|
+
<fieldset class="semics-tickets" data-testid="booking-addons">
|
|
441
|
+
<legend>{t("widget.addons")}</legend>
|
|
442
|
+
<p class="semics-hint">{t("widget.addonsHint")}</p>
|
|
443
|
+
{addonTypes.map((type) => {
|
|
444
|
+
const soldOut = type.available === 0;
|
|
445
|
+
const max = Math.min(type.maxPerOrder ?? 50, type.available ?? 50, 50);
|
|
446
|
+
return (
|
|
447
|
+
<div class="semics-ticket">
|
|
448
|
+
<label for={`${id}-qty-${type.id}`}>
|
|
449
|
+
<span class="semics-ticket-name">{type.name}</span>
|
|
450
|
+
<span class="semics-ticket-price">{t("widget.addonPrice", { price: formatMoney(type.priceMinor, data?.currency ?? "GBP", locale) })}</span>
|
|
451
|
+
{soldOut && <span class="semics-ticket-soldout">{t("widget.soldOut")}</span>}
|
|
452
|
+
</label>
|
|
453
|
+
<input
|
|
454
|
+
id={`${id}-qty-${type.id}`}
|
|
455
|
+
type="number"
|
|
456
|
+
inputmode="numeric"
|
|
457
|
+
name={`${QTY_PREFIX}${type.id}`}
|
|
458
|
+
value="0"
|
|
459
|
+
min="0"
|
|
460
|
+
max={String(max)}
|
|
461
|
+
disabled={soldOut}
|
|
462
|
+
data-addon=""
|
|
463
|
+
data-max={String(max)}
|
|
464
|
+
data-price-minor={String(type.priceMinor)}
|
|
465
|
+
/>
|
|
466
|
+
</div>
|
|
467
|
+
);
|
|
468
|
+
})}
|
|
469
|
+
</fieldset>
|
|
470
|
+
)}
|
|
471
|
+
|
|
335
472
|
<div class="semics-field">
|
|
336
473
|
<label for={`${id}-name`}>{t("widget.name")}</label>
|
|
337
474
|
<input
|
|
@@ -439,9 +576,9 @@ const when = (iso: string) => {
|
|
|
439
576
|
|
|
440
577
|
{siteKey && (
|
|
441
578
|
<>
|
|
442
|
-
<div class="cf-turnstile" data-sitekey={siteKey}></div>
|
|
443
|
-
{/* Turnstile is 300 px wide
|
|
444
|
-
<script is:inline>(function (s) { var t = s && s.previousElementSibling
|
|
579
|
+
<div class="cf-turnstile" data-sitekey={siteKey} data-theme="light"></div>
|
|
580
|
+
{/* Turnstile is 300 px wide: compact when the form has less room, so a 320 px screen never scrolls sideways (WCAG 1.4.10). The form is measured, not the empty box; a form not laid out yet (0 px) falls back to the screen less the card's padding (T158). Light, like the card. */}
|
|
581
|
+
<script is:inline>(function (s) { var t = s && s.previousElementSibling, f = t && t.closest("form"), w = f ? f.clientWidth : 0; if (!w) w = document.documentElement.clientWidth - 48; if (t && w < 300) t.setAttribute("data-size", "compact"); })(document.currentScript);</script>
|
|
445
582
|
<noscript>
|
|
446
583
|
<p class="semics-needs-js" data-testid="booking-needs-js">{t("widget.needsJs")}</p>
|
|
447
584
|
</noscript>
|
|
@@ -470,12 +607,12 @@ const when = (iso: string) => {
|
|
|
470
607
|
</select>
|
|
471
608
|
</div>
|
|
472
609
|
)}
|
|
473
|
-
{
|
|
610
|
+
{placeTypes.length > 1 && (
|
|
474
611
|
<div class="semics-field">
|
|
475
612
|
<label for={`${id}-wl-type`}>{t("waitlist.ticket")}</label>
|
|
476
613
|
<select id={`${id}-wl-type`} name="ticketTypeId">
|
|
477
614
|
<option value="">{t("waitlist.anyTicket")}</option>
|
|
478
|
-
{
|
|
615
|
+
{placeTypes.map((type) => <option value={type.id}>{type.name}</option>)}
|
|
479
616
|
</select>
|
|
480
617
|
</div>
|
|
481
618
|
)}
|
|
@@ -493,8 +630,8 @@ const when = (iso: string) => {
|
|
|
493
630
|
</div>
|
|
494
631
|
{siteKey && (
|
|
495
632
|
<>
|
|
496
|
-
<div class="cf-turnstile" data-sitekey={siteKey}></div>
|
|
497
|
-
<script is:inline>(function (s) { var t = s && s.previousElementSibling
|
|
633
|
+
<div class="cf-turnstile" data-sitekey={siteKey} data-theme="light"></div>
|
|
634
|
+
<script is:inline>(function (s) { var t = s && s.previousElementSibling, f = t && t.closest("form"), w = f ? f.clientWidth : 0; if (!w) w = document.documentElement.clientWidth - 48; if (t && w < 300) t.setAttribute("data-size", "compact"); })(document.currentScript);</script>
|
|
498
635
|
</>
|
|
499
636
|
)}
|
|
500
637
|
<button type="submit" class="semics-secondary">{t("waitlist.button")}</button>
|
|
@@ -510,23 +647,31 @@ const when = (iso: string) => {
|
|
|
510
647
|
import "../client/picker.ts";
|
|
511
648
|
</script>
|
|
512
649
|
|
|
650
|
+
|
|
513
651
|
<style>
|
|
652
|
+
/* One card with even, generous padding; groups read as sections with small headings, not boxes (T157). */
|
|
514
653
|
.semics-booking-widget {
|
|
515
654
|
--_fg: var(--events-fg, #1a1a1a);
|
|
516
655
|
--_muted: var(--events-muted, #4a4a4a);
|
|
517
656
|
--_bg: var(--events-bg, #ffffff);
|
|
518
657
|
--_border: var(--events-border, #6b6b6b);
|
|
658
|
+
--_line: color-mix(in srgb, var(--_border) 30%, transparent);
|
|
659
|
+
--_tint: color-mix(in srgb, var(--_accent) 7%, var(--_bg));
|
|
519
660
|
--_accent: var(--events-accent, #0b57d0);
|
|
520
661
|
--_accent-fg: var(--events-accent-fg, #ffffff);
|
|
521
662
|
--_error: var(--events-error, #b3261e);
|
|
522
663
|
--_radius: var(--events-radius, 6px);
|
|
664
|
+
--_pad: clamp(1.25rem, 0.75rem + 2.5vw, 2rem);
|
|
523
665
|
box-sizing: border-box;
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
border
|
|
666
|
+
/* The host sets the width: the widget fills its column, up to `--events-widget-max` when set (T158). */
|
|
667
|
+
max-inline-size: var(--events-widget-max, none);
|
|
668
|
+
padding: var(--_pad);
|
|
669
|
+
border: 1px solid var(--_line);
|
|
670
|
+
border-radius: calc(var(--_radius) + 6px);
|
|
528
671
|
background: var(--_bg);
|
|
672
|
+
box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 6px 24px rgb(0 0 0 / 0.06);
|
|
529
673
|
color: var(--_fg);
|
|
674
|
+
line-height: 1.5;
|
|
530
675
|
overflow-wrap: anywhere;
|
|
531
676
|
}
|
|
532
677
|
.semics-booking-widget *,
|
|
@@ -535,37 +680,41 @@ const when = (iso: string) => {
|
|
|
535
680
|
box-sizing: border-box;
|
|
536
681
|
}
|
|
537
682
|
.semics-booking-widget h2 {
|
|
538
|
-
margin: 0 0
|
|
539
|
-
font-size: 1.
|
|
683
|
+
margin: 0 0 1.25rem;
|
|
684
|
+
font-size: 1.375rem;
|
|
685
|
+
line-height: 1.25;
|
|
540
686
|
}
|
|
541
687
|
.semics-booking-widget form {
|
|
542
688
|
display: grid;
|
|
543
689
|
grid-template-columns: minmax(0, 1fr);
|
|
544
|
-
gap:
|
|
690
|
+
gap: 1.25rem;
|
|
545
691
|
}
|
|
546
692
|
.semics-booking-widget .semics-waitlist {
|
|
547
|
-
margin-block-start: 1.
|
|
548
|
-
padding-block-start:
|
|
549
|
-
border-block-start: 1px solid var(--
|
|
693
|
+
margin-block-start: 1.5rem;
|
|
694
|
+
padding-block-start: 1.5rem;
|
|
695
|
+
border-block-start: 1px solid var(--_line);
|
|
550
696
|
}
|
|
551
697
|
.semics-waitlist h3,
|
|
552
698
|
.semics-waitlist p {
|
|
553
699
|
margin: 0;
|
|
554
700
|
}
|
|
555
|
-
.semics-
|
|
556
|
-
margin: 0;
|
|
557
|
-
padding: 0
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
701
|
+
.semics-booking-widget legend {
|
|
702
|
+
margin: 0 0 0.5rem;
|
|
703
|
+
padding: 0;
|
|
704
|
+
font-size: 0.8125rem;
|
|
705
|
+
font-weight: 700;
|
|
706
|
+
letter-spacing: 0.06em;
|
|
707
|
+
text-transform: uppercase;
|
|
708
|
+
color: var(--_muted);
|
|
561
709
|
}
|
|
710
|
+
.semics-tickets,
|
|
711
|
+
.semics-windows,
|
|
562
712
|
.semics-questions {
|
|
563
713
|
display: grid;
|
|
564
714
|
gap: 0.75rem;
|
|
565
715
|
margin: 0;
|
|
566
|
-
padding: 0
|
|
567
|
-
border:
|
|
568
|
-
border-radius: var(--_radius);
|
|
716
|
+
padding: 0;
|
|
717
|
+
border: 0;
|
|
569
718
|
min-inline-size: 0;
|
|
570
719
|
}
|
|
571
720
|
.semics-check {
|
|
@@ -580,51 +729,70 @@ const when = (iso: string) => {
|
|
|
580
729
|
min-block-size: 1.25rem;
|
|
581
730
|
inline-size: 1.25rem;
|
|
582
731
|
margin: 0;
|
|
732
|
+
accent-color: var(--_accent);
|
|
583
733
|
}
|
|
584
734
|
.semics-hint {
|
|
585
735
|
color: var(--_muted);
|
|
586
736
|
}
|
|
737
|
+
.semics-picker-field {
|
|
738
|
+
gap: 0.75rem;
|
|
739
|
+
}
|
|
587
740
|
.semics-picker-nav {
|
|
741
|
+
max-inline-size: var(--events-calendar-max, 26rem);
|
|
588
742
|
display: flex;
|
|
589
743
|
flex-wrap: wrap;
|
|
590
|
-
align-items:
|
|
591
|
-
gap: 0.
|
|
744
|
+
align-items: center;
|
|
745
|
+
gap: 0.5rem;
|
|
592
746
|
}
|
|
593
747
|
.semics-picker-month {
|
|
594
748
|
margin: 0;
|
|
595
749
|
margin-inline-end: auto;
|
|
596
|
-
font-
|
|
750
|
+
font-size: 1.125rem;
|
|
751
|
+
font-weight: 700;
|
|
597
752
|
}
|
|
598
753
|
.semics-picker-nav a {
|
|
754
|
+
display: inline-flex;
|
|
755
|
+
align-items: center;
|
|
756
|
+
min-block-size: 2.25rem;
|
|
757
|
+
padding: 0.25rem 0.875rem;
|
|
758
|
+
border: 1px solid var(--_line);
|
|
759
|
+
border-radius: 999px;
|
|
599
760
|
color: var(--_accent);
|
|
600
|
-
|
|
761
|
+
font-size: 0.9375rem;
|
|
762
|
+
text-decoration: none;
|
|
763
|
+
}
|
|
764
|
+
.semics-picker-nav a:hover {
|
|
765
|
+
border-color: var(--_accent);
|
|
601
766
|
}
|
|
602
767
|
.semics-picker {
|
|
603
768
|
display: grid;
|
|
604
|
-
gap:
|
|
769
|
+
gap: 1rem;
|
|
605
770
|
margin: 0;
|
|
606
|
-
padding: 0
|
|
607
|
-
border:
|
|
608
|
-
border-radius: var(--_radius);
|
|
771
|
+
padding: 0;
|
|
772
|
+
border: 0;
|
|
609
773
|
min-inline-size: 0;
|
|
610
774
|
}
|
|
611
775
|
.semics-picker p {
|
|
612
776
|
margin: 0;
|
|
613
777
|
}
|
|
778
|
+
/* Room between the days: cells 6px apart, buttons at least 44px tall. The calendar keeps its size in a wide host column:
|
|
779
|
+
at most `--events-calendar-max` (26rem, days about 54px) while the rest of the widget fills the column (T159). */
|
|
614
780
|
.semics-calendar {
|
|
615
|
-
inline-size: 100
|
|
616
|
-
|
|
781
|
+
inline-size: calc(min(100%, var(--events-calendar-max, 26rem)) + 0.75rem);
|
|
782
|
+
margin: -0.375rem;
|
|
783
|
+
border-collapse: separate;
|
|
784
|
+
border-spacing: 0.375rem;
|
|
617
785
|
table-layout: fixed;
|
|
618
786
|
text-align: center;
|
|
619
787
|
}
|
|
620
788
|
.semics-calendar th {
|
|
621
|
-
padding-block: 0.25rem;
|
|
622
|
-
font-weight:
|
|
623
|
-
font-size: 0.
|
|
789
|
+
padding-block: 0 0.25rem;
|
|
790
|
+
font-weight: 600;
|
|
791
|
+
font-size: 0.8125rem;
|
|
624
792
|
color: var(--_muted);
|
|
625
793
|
}
|
|
626
794
|
.semics-calendar td {
|
|
627
|
-
padding:
|
|
795
|
+
padding: 0;
|
|
628
796
|
}
|
|
629
797
|
.semics-booking-widget .semics-calendar button,
|
|
630
798
|
.semics-booking-widget .semics-times button {
|
|
@@ -633,11 +801,24 @@ const when = (iso: string) => {
|
|
|
633
801
|
border: 1px solid var(--_accent);
|
|
634
802
|
background: var(--_bg);
|
|
635
803
|
color: var(--_accent);
|
|
804
|
+
font-weight: 600;
|
|
805
|
+
}
|
|
806
|
+
.semics-booking-widget .semics-calendar button {
|
|
807
|
+
block-size: clamp(2.75rem, 2rem + 2vw, 3.25rem);
|
|
808
|
+
}
|
|
809
|
+
/* Hover is its own, lighter state: a tint and a ring, the text stays the accent; only the chosen day or time
|
|
810
|
+
is filled (T158). */
|
|
811
|
+
.semics-booking-widget .semics-calendar button:not([aria-pressed="true"], .semics-day-full):hover,
|
|
812
|
+
.semics-booking-widget .semics-times button:not([aria-disabled="true"], [aria-checked="true"]):hover {
|
|
813
|
+
background: var(--_tint);
|
|
814
|
+
box-shadow: inset 0 0 0 1px var(--_accent);
|
|
815
|
+
color: var(--_accent);
|
|
636
816
|
}
|
|
637
817
|
.semics-booking-widget .semics-calendar button.semics-day-full,
|
|
638
818
|
.semics-booking-widget .semics-times button[aria-disabled="true"] {
|
|
639
|
-
border-color: var(--
|
|
819
|
+
border-color: var(--_line);
|
|
640
820
|
color: var(--_muted);
|
|
821
|
+
font-weight: 400;
|
|
641
822
|
text-decoration: line-through;
|
|
642
823
|
}
|
|
643
824
|
.semics-booking-widget .semics-times button[aria-disabled="true"] {
|
|
@@ -647,39 +828,50 @@ const when = (iso: string) => {
|
|
|
647
828
|
.semics-booking-widget .semics-times button[aria-checked="true"] {
|
|
648
829
|
background: var(--_accent);
|
|
649
830
|
color: var(--_accent-fg);
|
|
831
|
+
box-shadow: none;
|
|
650
832
|
}
|
|
651
833
|
.semics-day-none {
|
|
652
|
-
display:
|
|
653
|
-
|
|
834
|
+
display: grid;
|
|
835
|
+
place-items: center;
|
|
836
|
+
block-size: clamp(2.75rem, 2rem + 2vw, 3.25rem);
|
|
654
837
|
color: var(--_muted);
|
|
655
838
|
}
|
|
656
839
|
.semics-times {
|
|
657
840
|
display: grid;
|
|
658
|
-
grid-template-columns: repeat(auto-fill, minmax(
|
|
841
|
+
grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
|
|
659
842
|
gap: 0.5rem;
|
|
660
843
|
}
|
|
661
844
|
.semics-booking-widget .semics-times button {
|
|
662
845
|
display: grid;
|
|
663
846
|
justify-items: center;
|
|
847
|
+
padding: 0.5rem;
|
|
664
848
|
}
|
|
665
849
|
.semics-places {
|
|
666
|
-
font-size: 0.
|
|
850
|
+
font-size: 0.8125rem;
|
|
851
|
+
font-weight: 400;
|
|
667
852
|
}
|
|
668
853
|
.semics-ticket {
|
|
669
854
|
display: flex;
|
|
670
855
|
flex-wrap: wrap;
|
|
671
856
|
align-items: center;
|
|
672
857
|
justify-content: space-between;
|
|
673
|
-
gap: 0.5rem;
|
|
674
|
-
padding-block: 0.
|
|
858
|
+
gap: 0.5rem 1rem;
|
|
859
|
+
padding-block: 0.5rem;
|
|
860
|
+
border-block-end: 1px solid var(--_line);
|
|
861
|
+
}
|
|
862
|
+
.semics-ticket:last-of-type {
|
|
863
|
+
border-block-end: 0;
|
|
675
864
|
}
|
|
676
865
|
.semics-ticket label {
|
|
677
866
|
display: flex;
|
|
678
867
|
flex-wrap: wrap;
|
|
679
|
-
gap: 0 0.
|
|
868
|
+
gap: 0 0.75rem;
|
|
680
869
|
flex: 1 1 10rem;
|
|
681
870
|
min-inline-size: 0;
|
|
682
871
|
}
|
|
872
|
+
.semics-ticket-name {
|
|
873
|
+
font-weight: 600;
|
|
874
|
+
}
|
|
683
875
|
.semics-ticket-price,
|
|
684
876
|
.semics-ticket-soldout {
|
|
685
877
|
color: var(--_muted);
|
|
@@ -690,7 +882,10 @@ const when = (iso: string) => {
|
|
|
690
882
|
.semics-field {
|
|
691
883
|
display: grid;
|
|
692
884
|
grid-template-columns: minmax(0, 1fr);
|
|
693
|
-
gap: 0.
|
|
885
|
+
gap: 0.375rem;
|
|
886
|
+
}
|
|
887
|
+
.semics-field > label {
|
|
888
|
+
font-weight: 500;
|
|
694
889
|
}
|
|
695
890
|
.semics-field select {
|
|
696
891
|
inline-size: 100%;
|
|
@@ -704,7 +899,7 @@ const when = (iso: string) => {
|
|
|
704
899
|
}
|
|
705
900
|
.semics-booking-widget input,
|
|
706
901
|
.semics-booking-widget select {
|
|
707
|
-
padding: 0.
|
|
902
|
+
padding: 0.5rem 0.75rem;
|
|
708
903
|
border: 1px solid var(--_border);
|
|
709
904
|
border-radius: var(--_radius);
|
|
710
905
|
background: var(--_bg);
|
|
@@ -723,7 +918,7 @@ const when = (iso: string) => {
|
|
|
723
918
|
display: none;
|
|
724
919
|
}
|
|
725
920
|
.semics-form-alert {
|
|
726
|
-
padding: 0.
|
|
921
|
+
padding: 0.75rem 1rem;
|
|
727
922
|
border: 1px solid var(--_error);
|
|
728
923
|
border-radius: var(--_radius);
|
|
729
924
|
}
|
|
@@ -731,16 +926,28 @@ const when = (iso: string) => {
|
|
|
731
926
|
margin: 0;
|
|
732
927
|
font-weight: 600;
|
|
733
928
|
}
|
|
929
|
+
/* The summary above Book. */
|
|
734
930
|
.semics-total {
|
|
931
|
+
display: flex;
|
|
932
|
+
flex-wrap: wrap;
|
|
933
|
+
justify-content: space-between;
|
|
934
|
+
gap: 0.25rem 1rem;
|
|
735
935
|
margin: 0;
|
|
936
|
+
padding: 1rem 1.25rem;
|
|
937
|
+
border-radius: var(--_radius);
|
|
938
|
+
background: var(--_tint);
|
|
939
|
+
}
|
|
940
|
+
.semics-total strong {
|
|
941
|
+
font-size: 1.125rem;
|
|
736
942
|
}
|
|
737
943
|
.semics-booking-widget button {
|
|
738
944
|
justify-self: start;
|
|
739
|
-
padding: 0.
|
|
945
|
+
padding: 0.75rem 2rem;
|
|
740
946
|
border: 0;
|
|
741
947
|
border-radius: var(--_radius);
|
|
742
948
|
background: var(--_accent);
|
|
743
949
|
color: var(--_accent-fg);
|
|
950
|
+
font-weight: 600;
|
|
744
951
|
cursor: pointer;
|
|
745
952
|
}
|
|
746
953
|
.semics-promo-row {
|
|
@@ -758,6 +965,16 @@ const when = (iso: string) => {
|
|
|
758
965
|
background: var(--_bg);
|
|
759
966
|
color: var(--_accent);
|
|
760
967
|
}
|
|
968
|
+
.semics-have-voucher {
|
|
969
|
+
margin: 0;
|
|
970
|
+
}
|
|
971
|
+
.semics-have-voucher a {
|
|
972
|
+
color: var(--_accent);
|
|
973
|
+
}
|
|
974
|
+
.semics-booking-widget input:target {
|
|
975
|
+
outline: 3px solid var(--_accent);
|
|
976
|
+
outline-offset: 2px;
|
|
977
|
+
}
|
|
761
978
|
.semics-promo-note {
|
|
762
979
|
margin: 0;
|
|
763
980
|
color: var(--_muted);
|
|
@@ -770,6 +987,14 @@ const when = (iso: string) => {
|
|
|
770
987
|
outline: 3px solid var(--_accent);
|
|
771
988
|
outline-offset: 2px;
|
|
772
989
|
}
|
|
990
|
+
.semics-visually-hidden {
|
|
991
|
+
position: absolute;
|
|
992
|
+
inline-size: 1px;
|
|
993
|
+
block-size: 1px;
|
|
994
|
+
overflow: hidden;
|
|
995
|
+
clip-path: inset(50%);
|
|
996
|
+
white-space: nowrap;
|
|
997
|
+
}
|
|
773
998
|
[hidden] {
|
|
774
999
|
display: none !important;
|
|
775
1000
|
}
|