@seatlayer/js 0.10.0 → 0.10.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/index.cjs +39 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -464,15 +464,28 @@ var CSS = `
|
|
|
464
464
|
.sl-picker[data-layout="narrow"] .sl-zoom [data-ref="zin"],
|
|
465
465
|
.sl-picker[data-layout="narrow"] .sl-zoom [data-ref="zout"]{display:none}
|
|
466
466
|
|
|
467
|
-
/* bottom-sheet head: grab handle + one-line summary (narrow only)
|
|
468
|
-
|
|
469
|
-
|
|
467
|
+
/* bottom-sheet head: grab handle + one-line summary (narrow only). The WHOLE
|
|
468
|
+
head is the tap/swipe toggle target (min 44px), so it reads as one control. */
|
|
469
|
+
.sl-sheet-head{display:none;flex-direction:column;justify-content:center;padding:6px 16px 8px;min-height:44px;
|
|
470
|
+
cursor:pointer;touch-action:none;user-select:none;-webkit-user-select:none;flex:none}
|
|
470
471
|
.sl-picker[data-layout="narrow"] .sl-sheet-head{display:flex}
|
|
471
472
|
.sl-sheet-grab{width:36px;height:4px;border-radius:999px;background:var(--sl-muted);opacity:.55;margin:2px auto 7px}
|
|
472
|
-
.sl-sheet-
|
|
473
|
-
|
|
473
|
+
.sl-sheet-bar{display:flex;align-items:center;gap:10px;min-height:26px}
|
|
474
|
+
.sl-sheet-peek{display:flex;align-items:center;gap:7px;flex:1;min-width:0;font-size:13px;font-weight:700;color:var(--sl-text);
|
|
475
|
+
white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
474
476
|
.sl-sheet-peek .sub{color:var(--sl-muted);font-weight:600}
|
|
475
|
-
|
|
477
|
+
/* collapsed-peek "Continue" affordance: a real accent pill, not plain text */
|
|
478
|
+
.sl-sheet-peek .go{margin-left:auto;flex:none;display:inline-flex;align-items:center;min-height:30px;
|
|
479
|
+
padding:6px 13px;border-radius:999px;background:var(--sl-accent);color:var(--sl-accent-ink);
|
|
480
|
+
font-weight:800;font-size:12.5px}
|
|
481
|
+
/* state chevron: points UP while peeking, rotates to point DOWN when open.
|
|
482
|
+
Base keeps an explicit rotate(0) \u2014 transitioning to/from a bare 'none' leaves
|
|
483
|
+
the value stuck in some engines, so both endpoints must be real transforms. */
|
|
484
|
+
.sl-sheet-chevron{flex:none;display:flex;align-items:center;justify-content:center;color:var(--sl-muted);
|
|
485
|
+
transform:rotate(0deg);transition:transform .22s ease}
|
|
486
|
+
.sl-sheet-chevron svg{width:18px;height:18px;stroke:currentColor;stroke-width:2.4;fill:none;
|
|
487
|
+
stroke-linecap:round;stroke-linejoin:round}
|
|
488
|
+
.sl-picker[data-sheet="open"] .sl-sheet-chevron{transform:rotate(180deg)}
|
|
476
489
|
|
|
477
490
|
/* consolidated Filters row inside the sheet (a11y chips + colorblind toggle
|
|
478
491
|
dock here on narrow; they live on the map / zoom column on wide) */
|
|
@@ -521,10 +534,18 @@ var CSS = `
|
|
|
521
534
|
.sl-foot{padding:12px 16px 14px;border-top:1px solid var(--sl-line);flex:none}
|
|
522
535
|
.sl-total{display:flex;justify-content:space-between;align-items:center;font-size:13px;margin-bottom:10px}
|
|
523
536
|
.sl-total b{font-size:17px;font-variant-numeric:tabular-nums}
|
|
524
|
-
.sl-
|
|
525
|
-
|
|
526
|
-
.
|
|
527
|
-
.sl-cta:
|
|
537
|
+
/* Primary checkout CTA. Scoped under .sl-picker so it OUTWEIGHS the
|
|
538
|
+
'.sl-picker button' reset (0,1,1) \u2014 an unscoped '.sl-cta' (0,1,0) loses to it
|
|
539
|
+
and the button renders as plain text with no accent fill. */
|
|
540
|
+
.sl-picker .sl-cta{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;
|
|
541
|
+
padding:12px 16px;border-radius:var(--sl-r-sm);font-weight:800;font-size:14px;line-height:1.1;
|
|
542
|
+
background:var(--sl-accent);color:var(--sl-accent-ink);
|
|
543
|
+
transition:filter .15s,background .15s,color .15s,transform .06s}
|
|
544
|
+
.sl-picker .sl-cta:hover{filter:brightness(1.08)}
|
|
545
|
+
.sl-picker .sl-cta:active{transform:translateY(1px);filter:brightness(.94)}
|
|
546
|
+
/* Disabled ("Select seats"): quieter, but still a full-width button shape. */
|
|
547
|
+
.sl-picker .sl-cta:disabled{background:var(--sl-surface);color:var(--sl-muted);opacity:1;
|
|
548
|
+
cursor:not-allowed;filter:none;transform:none}
|
|
528
549
|
|
|
529
550
|
/* Chrome anchor regions (Feature 6) \u2014 every persistent map overlay is APPENDED
|
|
530
551
|
INTO one of these positioned flex containers and flows/stacks within it, so no
|
|
@@ -956,7 +977,12 @@ var SeatPicker = class _SeatPicker {
|
|
|
956
977
|
<div class="sl-side" data-ref="side">
|
|
957
978
|
<div class="sl-sheet-head" data-ref="sheetHead">
|
|
958
979
|
<div class="sl-sheet-grab"></div>
|
|
959
|
-
<div class="sl-sheet-
|
|
980
|
+
<div class="sl-sheet-bar">
|
|
981
|
+
<div class="sl-sheet-peek" data-ref="peek"></div>
|
|
982
|
+
<span class="sl-sheet-chevron" aria-hidden="true">
|
|
983
|
+
<svg viewBox="0 0 24 24"><path d="M6 15l6-6 6 6"/></svg>
|
|
984
|
+
</span>
|
|
985
|
+
</div>
|
|
960
986
|
</div>
|
|
961
987
|
<div class="sl-sec sl-filtersec" data-ref="filtersSec">Filters</div>
|
|
962
988
|
<div class="sl-filters" data-ref="filters"></div>
|
|
@@ -1874,10 +1900,10 @@ var SeatPicker = class _SeatPicker {
|
|
|
1874
1900
|
cta.textContent = this.hold ? "Continue to checkout" : count ? "Hold seats & checkout" : "Select seats";
|
|
1875
1901
|
if (this.els.peek) {
|
|
1876
1902
|
if (count) {
|
|
1877
|
-
this.els.peek.innerHTML = `<span>${count} ${count === 1 ? "ticket" : "tickets"} \xB7 ${this.money(total)}</span><span class="go">${this.hold ? "Continue
|
|
1903
|
+
this.els.peek.innerHTML = `<span>${count} ${count === 1 ? "ticket" : "tickets"} \xB7 ${this.money(total)}</span><span class="go">${this.hold ? "Continue" : "Review"}</span>`;
|
|
1878
1904
|
} else {
|
|
1879
1905
|
const prices = (this.controller.doc?.categories ?? []).map((c) => this.catPrice(c)).filter((p) => p != null);
|
|
1880
|
-
this.els.peek.innerHTML = (prices.length ? `<span>From ${this.money(Math.min(...prices))}</span>` : "<span>Pick your seats</span>") + `<span class="sub">\xB7 Best available</span
|
|
1906
|
+
this.els.peek.innerHTML = (prices.length ? `<span>From ${this.money(Math.min(...prices))}</span>` : "<span>Pick your seats</span>") + `<span class="sub">\xB7 Best available</span>`;
|
|
1881
1907
|
}
|
|
1882
1908
|
}
|
|
1883
1909
|
if (this.root?.dataset.layout === "narrow" && count > 0 && this.lastTrayCount === 0) {
|