@sdxc/ui 2026.11.18 → 2026.11.26
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 +133 -1
- package/dist/app/index.d.ts +1 -0
- package/dist/app/index.js +1 -0
- package/dist/app/mixins/command-palette.js +10 -2
- package/dist/app/mixins/log-viewer.js +17 -14
- package/dist/app/mixins/route-dialog.d.ts +17 -0
- package/dist/app/mixins/route-dialog.js +53 -0
- package/dist/app/optimistic-toggle.js +6 -0
- package/dist/app/route-dialog.d.ts +38 -0
- package/dist/app/route-dialog.js +49 -0
- package/dist/audio/equalizer.d.ts +24 -0
- package/dist/audio/equalizer.js +57 -0
- package/dist/audio/index.d.ts +16 -0
- package/dist/audio/index.js +16 -0
- package/dist/audio/media-tile.d.ts +38 -0
- package/dist/audio/media-tile.js +98 -0
- package/dist/audio/player-bar.d.ts +108 -0
- package/dist/audio/player-bar.js +338 -0
- package/dist/audio/queue-list.d.ts +56 -0
- package/dist/audio/queue-list.js +102 -0
- package/dist/audio/track-list.d.ts +91 -0
- package/dist/audio/track-list.js +226 -0
- package/dist/audio/utils/media-session.d.ts +44 -0
- package/dist/audio/utils/media-session.js +87 -0
- package/dist/audio/utils/play-queue.d.ts +98 -0
- package/dist/audio/utils/play-queue.js +149 -0
- package/dist/audio/utils/track-time.d.ts +28 -0
- package/dist/audio/utils/track-time.js +36 -0
- package/dist/chat/composer-format.d.ts +35 -0
- package/dist/chat/composer-format.js +84 -0
- package/dist/chat/index.d.ts +6 -0
- package/dist/chat/index.js +6 -0
- package/dist/chat/mention-menu.d.ts +43 -0
- package/dist/chat/mention-menu.js +70 -0
- package/dist/chat/message-group.d.ts +92 -0
- package/dist/chat/message-group.js +222 -0
- package/dist/chat/mixins/composer-format.d.ts +28 -0
- package/dist/chat/mixins/composer-format.js +80 -0
- package/dist/chat/mixins/composer-send.d.ts +2 -2
- package/dist/chat/mixins/composer-send.js +4 -2
- package/dist/chat/mixins/mention-menu.d.ts +41 -0
- package/dist/chat/mixins/mention-menu.js +213 -0
- package/dist/chat/mixins/reaction-sync.d.ts +47 -0
- package/dist/chat/mixins/reaction-sync.js +172 -0
- package/dist/chat/reaction-bar.d.ts +70 -0
- package/dist/chat/reaction-bar.js +108 -0
- package/dist/chat/typing-indicator.d.ts +42 -0
- package/dist/chat/typing-indicator.js +68 -0
- package/dist/chat/utils/composer-text.d.ts +38 -0
- package/dist/chat/utils/composer-text.js +86 -0
- package/dist/chat/utils/markdown-format.d.ts +30 -0
- package/dist/chat/utils/markdown-format.js +158 -0
- package/dist/chat/utils/mention-query.d.ts +55 -0
- package/dist/chat/utils/mention-query.js +60 -0
- package/dist/commerce/cart-drawer.d.ts +69 -0
- package/dist/commerce/cart-drawer.js +163 -0
- package/dist/commerce/cart-line.d.ts +32 -0
- package/dist/commerce/cart-line.js +43 -0
- package/dist/commerce/checkout-layout.d.ts +32 -0
- package/dist/commerce/checkout-layout.js +51 -0
- package/dist/commerce/facet-filters.d.ts +121 -0
- package/dist/commerce/facet-filters.js +318 -0
- package/dist/commerce/fulfilment-note.d.ts +28 -0
- package/dist/commerce/fulfilment-note.js +26 -0
- package/dist/commerce/index.d.ts +27 -0
- package/dist/commerce/index.js +27 -0
- package/dist/commerce/item-options-dialog.d.ts +67 -0
- package/dist/commerce/item-options-dialog.js +150 -0
- package/dist/commerce/menu-item-card.d.ts +37 -0
- package/dist/commerce/menu-item-card.js +96 -0
- package/dist/commerce/option-group.d.ts +62 -0
- package/dist/commerce/option-group.js +121 -0
- package/dist/commerce/order-summary.d.ts +42 -0
- package/dist/commerce/order-summary.js +76 -0
- package/dist/commerce/order-tracker.d.ts +80 -0
- package/dist/commerce/order-tracker.js +178 -0
- package/dist/commerce/price.d.ts +52 -0
- package/dist/commerce/price.js +108 -0
- package/dist/commerce/product-card.d.ts +53 -0
- package/dist/commerce/product-card.js +127 -0
- package/dist/commerce/product-gallery.d.ts +70 -0
- package/dist/commerce/product-gallery.js +186 -0
- package/dist/commerce/promo-code.d.ts +56 -0
- package/dist/commerce/promo-code.js +101 -0
- package/dist/commerce/quantity-stepper.d.ts +42 -0
- package/dist/commerce/quantity-stepper.js +53 -0
- package/dist/commerce/question-list.d.ts +53 -0
- package/dist/commerce/question-list.js +92 -0
- package/dist/commerce/shipping-estimate.d.ts +53 -0
- package/dist/commerce/shipping-estimate.js +39 -0
- package/dist/commerce/sort-select.d.ts +38 -0
- package/dist/commerce/sort-select.js +38 -0
- package/dist/commerce/variant-picker.d.ts +75 -0
- package/dist/commerce/variant-picker.js +135 -0
- package/dist/components/amount.d.ts +46 -0
- package/dist/components/amount.js +34 -0
- package/dist/components/autocomplete.d.ts +82 -0
- package/dist/components/autocomplete.js +114 -0
- package/dist/components/carousel.d.ts +31 -1
- package/dist/components/carousel.js +66 -3
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.js +11 -0
- package/dist/components/letterbox.d.ts +47 -0
- package/dist/components/letterbox.js +56 -0
- package/dist/components/lightbox.d.ts +88 -0
- package/dist/components/lightbox.js +224 -0
- package/dist/components/media-grid.d.ts +53 -0
- package/dist/components/media-grid.js +89 -0
- package/dist/components/range-months.d.ts +100 -0
- package/dist/components/range-months.js +274 -0
- package/dist/components/rating-input.d.ts +33 -0
- package/dist/components/rating-input.js +63 -0
- package/dist/components/rating.d.ts +38 -0
- package/dist/components/rating.js +66 -0
- package/dist/components/review-card.d.ts +39 -0
- package/dist/components/review-card.js +59 -0
- package/dist/components/section-bar.d.ts +57 -0
- package/dist/components/section-bar.js +140 -0
- package/dist/components/slider.js +7 -0
- package/dist/components/step-indicator.d.ts +46 -0
- package/dist/components/step-indicator.js +96 -0
- package/dist/finance/index.d.ts +10 -0
- package/dist/finance/index.js +10 -0
- package/dist/finance/ledger.d.ts +60 -0
- package/dist/finance/ledger.js +93 -0
- package/dist/finance/payment-card.d.ts +49 -0
- package/dist/finance/payment-card.js +115 -0
- package/dist/map/engine.d.ts +49 -0
- package/dist/map/engine.js +591 -0
- package/dist/map/index.d.ts +12 -0
- package/dist/map/index.js +12 -0
- package/dist/map/map-canvas.d.ts +101 -0
- package/dist/map/map-canvas.js +275 -0
- package/dist/map/map.d.ts +217 -0
- package/dist/map/map.js +598 -0
- package/dist/map/mixins/map-link.d.ts +30 -0
- package/dist/map/mixins/map-link.js +116 -0
- package/dist/map/utils/basemap.d.ts +88 -0
- package/dist/map/utils/basemap.js +84 -0
- package/dist/map/utils/cluster.d.ts +43 -0
- package/dist/map/utils/cluster.js +80 -0
- package/dist/map/utils/mercator.d.ts +66 -0
- package/dist/map/utils/mercator.js +92 -0
- package/dist/map/utils/stage.d.ts +24 -0
- package/dist/map/utils/stage.js +49 -0
- package/dist/mixins/autocomplete.d.ts +28 -0
- package/dist/mixins/autocomplete.js +283 -0
- package/dist/mixins/carousel-controls.d.ts +14 -3
- package/dist/mixins/carousel-controls.js +89 -30
- package/dist/mixins/index.d.ts +2 -0
- package/dist/mixins/index.js +2 -0
- package/dist/mixins/lightbox-controls.d.ts +34 -0
- package/dist/mixins/lightbox-controls.js +176 -0
- package/dist/schedule/agenda.d.ts +63 -0
- package/dist/schedule/agenda.js +221 -0
- package/dist/schedule/day-strip.d.ts +50 -0
- package/dist/schedule/day-strip.js +136 -0
- package/dist/schedule/free-busy.d.ts +96 -0
- package/dist/schedule/free-busy.js +285 -0
- package/dist/schedule/index.d.ts +15 -0
- package/dist/schedule/index.js +15 -0
- package/dist/schedule/mixins/day-strip-scroll.d.ts +16 -0
- package/dist/schedule/mixins/day-strip-scroll.js +40 -0
- package/dist/schedule/mixins/time-grid-drag.d.ts +24 -0
- package/dist/schedule/mixins/time-grid-drag.js +532 -0
- package/dist/schedule/month-view.d.ts +68 -0
- package/dist/schedule/month-view.js +301 -0
- package/dist/schedule/time-grid.d.ts +168 -0
- package/dist/schedule/time-grid.js +417 -0
- package/dist/schedule/utils/time-grid-layout.d.ts +50 -0
- package/dist/schedule/utils/time-grid-layout.js +93 -0
- package/dist/schedule/year-view.d.ts +46 -0
- package/dist/schedule/year-view.js +142 -0
- package/dist/styles/index.d.ts +1 -0
- package/dist/styles/index.js +1 -0
- package/dist/styles/typewriter-text.d.ts +20 -0
- package/dist/styles/typewriter-text.js +23 -0
- package/dist/test/map.d.ts +18 -0
- package/dist/test/map.js +96 -0
- package/dist/test/reels.d.ts +30 -0
- package/dist/test/reels.js +41 -0
- package/dist/test/stories.d.ts +31 -0
- package/dist/test/stories.js +66 -0
- package/dist/travel/boarding-pass.d.ts +107 -0
- package/dist/travel/boarding-pass.js +293 -0
- package/dist/travel/car-offer.d.ts +70 -0
- package/dist/travel/car-offer.js +127 -0
- package/dist/travel/fare-calendar.d.ts +85 -0
- package/dist/travel/fare-calendar.js +233 -0
- package/dist/travel/fare-options.d.ts +84 -0
- package/dist/travel/fare-options.js +142 -0
- package/dist/travel/flight-itinerary.d.ts +84 -0
- package/dist/travel/flight-itinerary.js +112 -0
- package/dist/travel/flight-option.d.ts +58 -0
- package/dist/travel/flight-option.js +111 -0
- package/dist/travel/flight-segment.d.ts +105 -0
- package/dist/travel/flight-segment.js +174 -0
- package/dist/travel/index.d.ts +20 -0
- package/dist/travel/index.js +20 -0
- package/dist/travel/package-savings.d.ts +74 -0
- package/dist/travel/package-savings.js +128 -0
- package/dist/travel/price-breakdown.d.ts +66 -0
- package/dist/travel/price-breakdown.js +102 -0
- package/dist/travel/rating-breakdown.d.ts +81 -0
- package/dist/travel/rating-breakdown.js +132 -0
- package/dist/travel/seat-map.d.ts +108 -0
- package/dist/travel/seat-map.js +371 -0
- package/dist/travel/trip-timeline.d.ts +84 -0
- package/dist/travel/trip-timeline.js +212 -0
- package/dist/utils/gamepad-presses.d.ts +21 -0
- package/dist/utils/gamepad-presses.js +28 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +5 -0
- package/dist/utils/move-focus.d.ts +20 -0
- package/dist/utils/move-focus.js +28 -0
- package/dist/utils/range-months.d.ts +54 -0
- package/dist/utils/range-months.js +98 -0
- package/dist/utils/swipe-direction.d.ts +23 -0
- package/dist/utils/swipe-direction.js +27 -0
- package/dist/utils/typewriter.d.ts +49 -0
- package/dist/utils/typewriter.js +171 -0
- package/dist/video/index.d.ts +6 -2
- package/dist/video/index.js +6 -2
- package/dist/video/mixins/reel-feed-sync.d.ts +41 -0
- package/dist/video/mixins/reel-feed-sync.js +430 -0
- package/dist/video/mixins/story-viewer-sync.d.ts +31 -0
- package/dist/video/mixins/story-viewer-sync.js +391 -0
- package/dist/video/reel-feed.d.ts +95 -0
- package/dist/video/reel-feed.js +124 -0
- package/dist/video/story-ring.d.ts +32 -0
- package/dist/video/story-ring.js +42 -0
- package/dist/video/story-viewer.d.ts +85 -0
- package/dist/video/story-viewer.js +250 -0
- package/package.json +21 -2
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An aircraft cabin seat picker: a fuselage with a rounded nose, column letters over a grid of
|
|
3
|
+
* seats, row numbers down the aisle and exits marked on both walls. Every seat is a native radio
|
|
4
|
+
* under one name, so a form posts the pick and arrow keys move between seats without script.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/** Prop types for {@link SeatMap} and {@link SeatMap.Legend}. */
|
|
11
|
+
export declare namespace SeatMap {
|
|
12
|
+
/** Whether a seat can be picked; `"taken"` and `"blocked"` seats render disabled. */
|
|
13
|
+
type Status = "available" | "taken" | "blocked";
|
|
14
|
+
/** What a seat offers; every kind but `"standard"` is tinted. */
|
|
15
|
+
type Kind = "standard" | "extra-legroom" | "exit" | "premium";
|
|
16
|
+
/** One seat of a row. */
|
|
17
|
+
interface Seat {
|
|
18
|
+
/** The seat's code and the value the form posts, such as "14C". */
|
|
19
|
+
id: string;
|
|
20
|
+
status: Status;
|
|
21
|
+
/** @default "standard" */
|
|
22
|
+
kind?: Kind;
|
|
23
|
+
/** The seat's surcharge, formatted by the caller, shown small under the letter. */
|
|
24
|
+
price?: RemixNode;
|
|
25
|
+
}
|
|
26
|
+
/** One row of the cabin, its seats in the order of the layout's letters. */
|
|
27
|
+
interface Row {
|
|
28
|
+
number: number;
|
|
29
|
+
seats: Seat[];
|
|
30
|
+
}
|
|
31
|
+
/** A cabin section's title, drawn across the cabin above row `from`. */
|
|
32
|
+
interface Section {
|
|
33
|
+
from: number;
|
|
34
|
+
title: RemixNode;
|
|
35
|
+
}
|
|
36
|
+
/** Words appended to a seat's spoken name, in the page's language. */
|
|
37
|
+
interface Labels {
|
|
38
|
+
/** Read after a seat that cannot be picked because someone has it, e.g. "taken". */
|
|
39
|
+
taken: string;
|
|
40
|
+
/** Read after a seat that cannot be picked for any other reason, e.g. "unavailable". */
|
|
41
|
+
blocked?: string;
|
|
42
|
+
/** Read after a seat beside an aisle, e.g. "aisle". */
|
|
43
|
+
aisle?: string;
|
|
44
|
+
/** Read after a seat against a wall, e.g. "window". */
|
|
45
|
+
window?: string;
|
|
46
|
+
/** Read after a seat in one of `exitRows`, e.g. "exit row". */
|
|
47
|
+
exit?: string;
|
|
48
|
+
/** Read after a seat of each tinted kind, e.g. `{ "extra-legroom": "extra legroom" }`. */
|
|
49
|
+
kinds?: Partial<Record<Exclude<Kind, "standard">, string>>;
|
|
50
|
+
}
|
|
51
|
+
/** Every native `<fieldset>` attribute, plus the cabin to draw. */
|
|
52
|
+
interface Props extends Omit<TagProps<"fieldset">, "children"> {
|
|
53
|
+
rows: Row[];
|
|
54
|
+
/** Seat letters in cabin order, a space for each aisle, e.g. "ABC DEF". */
|
|
55
|
+
layout: string;
|
|
56
|
+
/** The form field the picked seat's id posts under. */
|
|
57
|
+
name: string;
|
|
58
|
+
/** The seat id checked on load. */
|
|
59
|
+
selected?: string;
|
|
60
|
+
/** Names the radio group for assistive technology, e.g. "Choose a seat". */
|
|
61
|
+
label: string;
|
|
62
|
+
labels: Labels;
|
|
63
|
+
/** A visible header under the nose, such as "Main deck · Larkwing A321". */
|
|
64
|
+
deck?: RemixNode;
|
|
65
|
+
/** First and last rows the wing spans, drawn on both walls. */
|
|
66
|
+
wings?: [number, number];
|
|
67
|
+
/** Rows with an emergency exit, marked on both walls. */
|
|
68
|
+
exitRows?: number[];
|
|
69
|
+
/** Section titles, each drawn above the row it starts at. */
|
|
70
|
+
sections?: Section[];
|
|
71
|
+
/** Asks the browser to require a pick before the form submits. */
|
|
72
|
+
required?: boolean;
|
|
73
|
+
}
|
|
74
|
+
/** What one legend entry explains. */
|
|
75
|
+
type Swatch = "available" | "selected" | "taken" | "blocked" | Exclude<Kind, "standard">;
|
|
76
|
+
/** One legend entry: the swatch drawn and its caption. */
|
|
77
|
+
interface LegendItem {
|
|
78
|
+
swatch: Swatch;
|
|
79
|
+
label: RemixNode;
|
|
80
|
+
}
|
|
81
|
+
/** Every native `<ul>` attribute, plus the entries to explain. */
|
|
82
|
+
interface LegendProps extends Omit<TagProps<"ul">, "children"> {
|
|
83
|
+
items: LegendItem[];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Renders the cabin as a `<fieldset>` named by `label`. Each seat is a radio named `name` with
|
|
88
|
+
* the seat's id as its value, so the pick posts with the form and arrow keys move through the
|
|
89
|
+
* cabin natively; taken and blocked seats are disabled radios.
|
|
90
|
+
*
|
|
91
|
+
* @param handle Runtime handle carrying the cabin's props.
|
|
92
|
+
* @returns The render function producing the cabin's markup.
|
|
93
|
+
* @example
|
|
94
|
+
* <SeatMap
|
|
95
|
+
* name="seat"
|
|
96
|
+
* label="Choose a seat"
|
|
97
|
+
* labels={{ taken: "taken", aisle: "aisle", window: "window", exit: "exit row" }}
|
|
98
|
+
* layout="ABC DEF"
|
|
99
|
+
* rows={rows}
|
|
100
|
+
* selected="14C"
|
|
101
|
+
* exitRows={[12]}
|
|
102
|
+
* wings={[10, 18]}
|
|
103
|
+
* />
|
|
104
|
+
*/
|
|
105
|
+
export declare function SeatMap(handle: Handle<SeatMap.Props>): () => import("remix/component").RemixElement;
|
|
106
|
+
export declare namespace SeatMap {
|
|
107
|
+
var Legend: (handle: Handle<SeatMap.LegendProps>) => () => import("remix/component").RemixElement;
|
|
108
|
+
}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { visuallyHidden } from "@sdxc/u/a11y";
|
|
3
|
+
import { mergeMix, raw } from "@sdxc/u/general";
|
|
4
|
+
/** How tall the cabin grows before it scrolls, unless `--ui-seat-map-max-height` says otherwise. */
|
|
5
|
+
const MAX_HEIGHT = "var(--ui-seat-map-max-height, 36rem)";
|
|
6
|
+
/** A seat's height: 40px, or the 44px touch target on a coarse pointer. */
|
|
7
|
+
const SEAT_HEIGHT = "max(2.5rem, var(--ui-target-size, 0px))";
|
|
8
|
+
/** A seat column: never narrower than 32px, and no wider than a comfortable 44px. */
|
|
9
|
+
const SEAT_COLUMN = "minmax(2rem, 2.75rem)";
|
|
10
|
+
/** An aisle column, wide enough for a two-digit row number. */
|
|
11
|
+
const AISLE_COLUMN = "minmax(1.25rem, 2rem)";
|
|
12
|
+
/** The strip inside each wall where exits and the wing are drawn. */
|
|
13
|
+
const WALL_COLUMN = "0.75rem";
|
|
14
|
+
/**
|
|
15
|
+
* Reads a layout string into its columns, one per letter and one per run of spaces, so
|
|
16
|
+
* `"ABC DEF"` and `"ABC DEF"` both make a single aisle.
|
|
17
|
+
*
|
|
18
|
+
* @param layout Seat letters with spaces for aisles.
|
|
19
|
+
* @returns The columns between the two walls, in cabin order.
|
|
20
|
+
*/
|
|
21
|
+
function parseLayout(layout) {
|
|
22
|
+
let columns = [];
|
|
23
|
+
for (let character of layout.trim()) {
|
|
24
|
+
if (character.trim() === "") {
|
|
25
|
+
if (columns.at(-1)?.kind !== "aisle")
|
|
26
|
+
columns.push({ kind: "aisle" });
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
columns.push({ kind: "seat", letter: character });
|
|
30
|
+
}
|
|
31
|
+
return columns;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The seat and its spoken extras for one grid column of a row: whether it sits by an aisle or a
|
|
35
|
+
* wall, read from the columns either side of it.
|
|
36
|
+
*/
|
|
37
|
+
function seatPlacement(columns, index) {
|
|
38
|
+
return {
|
|
39
|
+
aisle: columns[index - 1]?.kind === "aisle" || columns[index + 1]?.kind === "aisle",
|
|
40
|
+
window: index === 0 || index === columns.length - 1,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Renders the cabin as a `<fieldset>` named by `label`. Each seat is a radio named `name` with
|
|
45
|
+
* the seat's id as its value, so the pick posts with the form and arrow keys move through the
|
|
46
|
+
* cabin natively; taken and blocked seats are disabled radios.
|
|
47
|
+
*
|
|
48
|
+
* @param handle Runtime handle carrying the cabin's props.
|
|
49
|
+
* @returns The render function producing the cabin's markup.
|
|
50
|
+
* @example
|
|
51
|
+
* <SeatMap
|
|
52
|
+
* name="seat"
|
|
53
|
+
* label="Choose a seat"
|
|
54
|
+
* labels={{ taken: "taken", aisle: "aisle", window: "window", exit: "exit row" }}
|
|
55
|
+
* layout="ABC DEF"
|
|
56
|
+
* rows={rows}
|
|
57
|
+
* selected="14C"
|
|
58
|
+
* exitRows={[12]}
|
|
59
|
+
* wings={[10, 18]}
|
|
60
|
+
* />
|
|
61
|
+
*/
|
|
62
|
+
export function SeatMap(handle) {
|
|
63
|
+
return () => {
|
|
64
|
+
let { rows, layout, name, selected, label, labels, deck, wings, exitRows, sections, required, mix, ...rest } = handle.props;
|
|
65
|
+
let columns = parseLayout(layout);
|
|
66
|
+
let template = [
|
|
67
|
+
WALL_COLUMN,
|
|
68
|
+
...columns.map((column) => (column.kind === "seat" ? SEAT_COLUMN : AISLE_COLUMN)),
|
|
69
|
+
WALL_COLUMN,
|
|
70
|
+
].join(" ");
|
|
71
|
+
let exits = new Set(exitRows ?? []);
|
|
72
|
+
let titles = new Map((sections ?? []).map((section) => [section.from, section.title]));
|
|
73
|
+
/** The words read after a seat's code, joined with commas. */
|
|
74
|
+
function extras(seat, row, index) {
|
|
75
|
+
let words = [];
|
|
76
|
+
let placement = seatPlacement(columns, index);
|
|
77
|
+
if (placement.window)
|
|
78
|
+
words.push(labels.window);
|
|
79
|
+
if (placement.aisle)
|
|
80
|
+
words.push(labels.aisle);
|
|
81
|
+
if (seat.kind !== undefined && seat.kind !== "standard")
|
|
82
|
+
words.push(labels.kinds?.[seat.kind]);
|
|
83
|
+
if (exits.has(row))
|
|
84
|
+
words.push(labels.exit);
|
|
85
|
+
if (seat.status === "taken")
|
|
86
|
+
words.push(labels.taken);
|
|
87
|
+
if (seat.status === "blocked")
|
|
88
|
+
words.push(labels.blocked ?? labels.taken);
|
|
89
|
+
return words
|
|
90
|
+
.filter((word) => word !== undefined && word !== "")
|
|
91
|
+
.map((word) => `, ${word}`)
|
|
92
|
+
.join("");
|
|
93
|
+
}
|
|
94
|
+
return (_jsxs("fieldset", { "data-slot": "seat-map", ...rest, mix: mergeMix([
|
|
95
|
+
raw({
|
|
96
|
+
minInlineSize: "0",
|
|
97
|
+
margin: "0",
|
|
98
|
+
padding: "0",
|
|
99
|
+
border: "0",
|
|
100
|
+
}),
|
|
101
|
+
], mix), children: [_jsx("legend", { mix: [visuallyHidden()], children: label }), _jsx("div", { "data-slot": "seat-map-cabin", mix: [
|
|
102
|
+
raw({
|
|
103
|
+
maxBlockSize: MAX_HEIGHT,
|
|
104
|
+
overflow: "auto",
|
|
105
|
+
overscrollBehavior: "contain",
|
|
106
|
+
scrollPaddingBlockStart: "2.5rem",
|
|
107
|
+
}),
|
|
108
|
+
], children: _jsxs("div", { "data-slot": "seat-map-fuselage", mix: [
|
|
109
|
+
raw({
|
|
110
|
+
position: "relative",
|
|
111
|
+
inlineSize: "fit-content",
|
|
112
|
+
minInlineSize: "100%",
|
|
113
|
+
marginInline: "auto",
|
|
114
|
+
paddingBlock: "5rem 1.5rem",
|
|
115
|
+
paddingInline: "0.25rem",
|
|
116
|
+
backgroundColor: "var(--ui-surface-raised, var(--ui-bg))",
|
|
117
|
+
border: "2px solid var(--ui-neutral-border)",
|
|
118
|
+
borderBlockEnd: "0",
|
|
119
|
+
borderStartStartRadius: "50% 4.5rem",
|
|
120
|
+
borderStartEndRadius: "50% 4.5rem",
|
|
121
|
+
}),
|
|
122
|
+
], children: [_jsx("svg", { "aria-hidden": "true", viewBox: "0 0 64 16", mix: [
|
|
123
|
+
raw({
|
|
124
|
+
position: "absolute",
|
|
125
|
+
insetBlockStart: "1.75rem",
|
|
126
|
+
insetInlineStart: "50%",
|
|
127
|
+
translate: "-50% 0",
|
|
128
|
+
inlineSize: "4rem",
|
|
129
|
+
blockSize: "1rem",
|
|
130
|
+
color: "var(--ui-neutral-border-strong)",
|
|
131
|
+
opacity: "0.5",
|
|
132
|
+
}),
|
|
133
|
+
], children: _jsx("path", { d: "M4 14 Q32 -2 60 14 L50 15 Q32 6 14 15 Z", fill: "currentColor" }) }), deck === undefined ? null : (_jsx("p", { "data-slot": "seat-map-deck", mix: [
|
|
134
|
+
raw({
|
|
135
|
+
margin: "0 0 0.75rem",
|
|
136
|
+
textAlign: "center",
|
|
137
|
+
fontSize: "0.75rem",
|
|
138
|
+
fontWeight: "600",
|
|
139
|
+
color: "var(--ui-neutral-fg)",
|
|
140
|
+
}),
|
|
141
|
+
], children: deck })), _jsxs("div", { "data-slot": "seat-map-grid", mix: [
|
|
142
|
+
raw({
|
|
143
|
+
display: "grid",
|
|
144
|
+
gridTemplateColumns: template,
|
|
145
|
+
justifyContent: "center",
|
|
146
|
+
rowGap: "0.375rem",
|
|
147
|
+
columnGap: "0.25rem",
|
|
148
|
+
}),
|
|
149
|
+
], children: [_jsxs("div", { "aria-hidden": "true", "data-slot": "seat-map-letters", mix: [
|
|
150
|
+
raw({
|
|
151
|
+
display: "grid",
|
|
152
|
+
gridColumn: "1 / -1",
|
|
153
|
+
gridTemplateColumns: "subgrid",
|
|
154
|
+
position: "sticky",
|
|
155
|
+
insetBlockStart: "0",
|
|
156
|
+
zIndex: "1",
|
|
157
|
+
paddingBlock: "0.375rem",
|
|
158
|
+
backgroundColor: "var(--ui-surface-raised, var(--ui-bg))",
|
|
159
|
+
fontSize: "0.75rem",
|
|
160
|
+
fontWeight: "600",
|
|
161
|
+
textAlign: "center",
|
|
162
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
163
|
+
}),
|
|
164
|
+
], children: [_jsx("span", {}), columns.map((column, index) => (_jsx("span", { children: column.kind === "seat" ? column.letter : null }, index))), _jsx("span", {})] }), rows.flatMap((row) => {
|
|
165
|
+
let title = titles.get(row.number);
|
|
166
|
+
let wing = wings !== undefined && row.number >= wings[0] && row.number <= wings[1];
|
|
167
|
+
let exit = exits.has(row.number);
|
|
168
|
+
let seatIndex = 0;
|
|
169
|
+
return [
|
|
170
|
+
title === undefined ? null : (_jsx("p", { "data-slot": "seat-map-section", mix: [
|
|
171
|
+
raw({
|
|
172
|
+
gridColumn: "1 / -1",
|
|
173
|
+
margin: "0.75rem 0 0.25rem",
|
|
174
|
+
paddingBlockEnd: "0.25rem",
|
|
175
|
+
borderBlockEnd: "1px solid var(--ui-neutral-border)",
|
|
176
|
+
textAlign: "center",
|
|
177
|
+
fontSize: "0.75rem",
|
|
178
|
+
fontWeight: "600",
|
|
179
|
+
color: "var(--ui-neutral-fg-emphasis)",
|
|
180
|
+
}),
|
|
181
|
+
], children: title }, `section-${row.number}`)),
|
|
182
|
+
_jsxs("div", { "data-slot": "seat-map-row", "data-row": row.number, "data-exit": exit ? "" : undefined, "data-wing": wing ? "" : undefined, mix: [
|
|
183
|
+
raw({
|
|
184
|
+
display: "grid",
|
|
185
|
+
gridColumn: "1 / -1",
|
|
186
|
+
gridTemplateColumns: "subgrid",
|
|
187
|
+
alignItems: "center",
|
|
188
|
+
}),
|
|
189
|
+
], children: [_jsx(SeatMapWall, { side: "start", exit: exit }), columns.map((column, index) => {
|
|
190
|
+
if (column.kind === "aisle") {
|
|
191
|
+
return (_jsx("span", { "aria-hidden": "true", "data-slot": "seat-map-row-number", mix: [
|
|
192
|
+
raw({
|
|
193
|
+
textAlign: "center",
|
|
194
|
+
fontSize: "0.6875rem",
|
|
195
|
+
fontVariantNumeric: "tabular-nums",
|
|
196
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
197
|
+
}),
|
|
198
|
+
], children: row.number }, `aisle-${index}`));
|
|
199
|
+
}
|
|
200
|
+
let seat = row.seats[seatIndex];
|
|
201
|
+
seatIndex += 1;
|
|
202
|
+
if (seat === undefined)
|
|
203
|
+
return _jsx("span", {}, `gap-${index}`);
|
|
204
|
+
return (_jsx(SeatMapSeat, { seat: seat, letter: column.letter, name: name, checked: seat.id === selected, required: required, extras: extras(seat, row.number, index) }, seat.id));
|
|
205
|
+
}), _jsx(SeatMapWall, { side: "end", exit: exit })] }, `row-${row.number}`),
|
|
206
|
+
];
|
|
207
|
+
})] })] }) })] }));
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* One wall cell of a row: a swept tint where the wing joins the fuselage, and an outward
|
|
212
|
+
* chevron in the success tone at an exit, mirrored on the two sides.
|
|
213
|
+
*/
|
|
214
|
+
function SeatMapWall(handle) {
|
|
215
|
+
return () => {
|
|
216
|
+
let { side, exit } = handle.props;
|
|
217
|
+
return (_jsx("span", { "aria-hidden": "true", "data-slot": "seat-map-wall", "data-side": side, mix: [
|
|
218
|
+
raw({
|
|
219
|
+
alignSelf: "stretch",
|
|
220
|
+
display: "grid",
|
|
221
|
+
placeItems: "center",
|
|
222
|
+
marginBlock: "-0.1875rem",
|
|
223
|
+
color: "var(--ui-success-fg)",
|
|
224
|
+
"[data-wing] > &": {
|
|
225
|
+
backgroundColor: "var(--ui-neutral-bg-tint-pressed)",
|
|
226
|
+
},
|
|
227
|
+
"[data-wing] > &[data-side=start]": { borderStartStartRadius: "0.5rem" },
|
|
228
|
+
"[data-wing] > &[data-side=end]": { borderStartEndRadius: "0.5rem" },
|
|
229
|
+
"&[data-side=end] svg, &[data-side=start]:dir(rtl) svg": { scale: "-1 1" },
|
|
230
|
+
"&[data-side=end]:dir(rtl) svg": { scale: "1 1" },
|
|
231
|
+
}),
|
|
232
|
+
], children: exit ? (_jsx("svg", { viewBox: "0 0 8 12", mix: [raw({ inlineSize: "0.5rem", blockSize: "0.75rem" })], children: _jsx("path", { d: "M6.5 1 L1.5 6 L6.5 11", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }) })) : null }));
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* One seat: a label drawn as a seat back around a visually hidden radio. The radio keeps focus
|
|
237
|
+
* and checkedness native, and the label's spoken name is the seat's code and its extras while
|
|
238
|
+
* the drawn letter stays out of the accessibility tree.
|
|
239
|
+
*/
|
|
240
|
+
function SeatMapSeat(handle) {
|
|
241
|
+
return () => {
|
|
242
|
+
let { seat, letter, name, checked, required, extras } = handle.props;
|
|
243
|
+
let disabled = seat.status !== "available";
|
|
244
|
+
return (_jsxs("label", { "data-slot": "seat-map-seat", "data-status": seat.status, "data-kind": seat.kind ?? "standard", mix: [seatStyle()], children: [_jsx("input", { type: "radio", name: name, value: seat.id, checked: checked ? true : undefined, disabled: disabled ? true : undefined, required: required ? true : undefined, mix: [visuallyHidden()] }), _jsx("span", { "aria-hidden": "true", "data-slot": "seat-map-letter", children: letter }), _jsx("span", { mix: [visuallyHidden()], children: `${seat.id}${extras}` }), seat.price === undefined || disabled ? null : (_jsx("span", { "data-slot": "seat-map-price", children: seat.price }))] }));
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* A seat's or a legend swatch's look, keyed off `data-status`, `data-kind` and the radio's own
|
|
249
|
+
* `:checked`: tinted kinds, a cross over a taken seat, a dashed outline for a blocked one, and the
|
|
250
|
+
* brand fill with a ring for the pick, so the pick reads by shape as well as colour.
|
|
251
|
+
*/
|
|
252
|
+
function seatStyle() {
|
|
253
|
+
return raw({
|
|
254
|
+
position: "relative",
|
|
255
|
+
display: "grid",
|
|
256
|
+
placeContent: "center",
|
|
257
|
+
justifyItems: "center",
|
|
258
|
+
gap: "0.0625rem",
|
|
259
|
+
minInlineSize: "2rem",
|
|
260
|
+
minBlockSize: SEAT_HEIGHT,
|
|
261
|
+
boxSizing: "border-box",
|
|
262
|
+
paddingBlock: "0.125rem",
|
|
263
|
+
border: "1.5px solid var(--ui-brand-border)",
|
|
264
|
+
borderStartStartRadius: "0.625rem",
|
|
265
|
+
borderStartEndRadius: "0.625rem",
|
|
266
|
+
borderEndStartRadius: "0.25rem",
|
|
267
|
+
borderEndEndRadius: "0.25rem",
|
|
268
|
+
backgroundColor: "var(--ui-surface-raised, var(--ui-bg))",
|
|
269
|
+
color: "var(--ui-brand-fg-emphasis)",
|
|
270
|
+
fontSize: "0.75rem",
|
|
271
|
+
fontWeight: "600",
|
|
272
|
+
lineHeight: "1",
|
|
273
|
+
cursor: "pointer",
|
|
274
|
+
userSelect: "none",
|
|
275
|
+
transition: "background-color 120ms ease, border-color 120ms ease, color 120ms ease",
|
|
276
|
+
"@media (prefers-reduced-motion: reduce)": { transition: "none" },
|
|
277
|
+
"& [data-slot=seat-map-price]": {
|
|
278
|
+
fontSize: "0.5625rem",
|
|
279
|
+
fontWeight: "500",
|
|
280
|
+
fontVariantNumeric: "tabular-nums",
|
|
281
|
+
whiteSpace: "nowrap",
|
|
282
|
+
color: "var(--ui-neutral-fg-muted)",
|
|
283
|
+
},
|
|
284
|
+
"&[data-kind=extra-legroom]": {
|
|
285
|
+
backgroundColor: "var(--ui-brand-bg-tint-hover)",
|
|
286
|
+
borderColor: "var(--ui-brand-border-strong)",
|
|
287
|
+
},
|
|
288
|
+
"&[data-kind=exit]": {
|
|
289
|
+
backgroundColor: "var(--ui-success-bg-tint)",
|
|
290
|
+
borderColor: "var(--ui-success-border-strong)",
|
|
291
|
+
color: "var(--ui-success-fg-emphasis)",
|
|
292
|
+
},
|
|
293
|
+
"&[data-kind=premium]": {
|
|
294
|
+
backgroundColor: "var(--ui-warning-bg-tint)",
|
|
295
|
+
borderColor: "var(--ui-warning-border-strong)",
|
|
296
|
+
color: "var(--ui-warning-fg-emphasis)",
|
|
297
|
+
},
|
|
298
|
+
"&:has(input:enabled):hover": { backgroundColor: "var(--ui-brand-bg-tint-pressed)" },
|
|
299
|
+
"&:has(input:focus-visible)": {
|
|
300
|
+
outline: "2px solid var(--ui-brand-ring)",
|
|
301
|
+
outlineOffset: "2px",
|
|
302
|
+
},
|
|
303
|
+
"&:has(input:checked), &[data-status=selected]": {
|
|
304
|
+
backgroundColor: "var(--ui-brand-bg-solid)",
|
|
305
|
+
borderColor: "var(--ui-brand-border-strong)",
|
|
306
|
+
color: "var(--ui-brand-fg-on-solid)",
|
|
307
|
+
boxShadow: "0 0 0 2px var(--ui-surface-raised, var(--ui-bg)), 0 0 0 3.5px var(--ui-brand-bg-solid)",
|
|
308
|
+
},
|
|
309
|
+
"&:has(input:checked) [data-slot=seat-map-price]": { color: "inherit", opacity: "0.85" },
|
|
310
|
+
"&[data-status=taken]": {
|
|
311
|
+
cursor: "not-allowed",
|
|
312
|
+
borderColor: "var(--ui-neutral-border)",
|
|
313
|
+
backgroundColor: "var(--ui-neutral-bg-tint-pressed)",
|
|
314
|
+
backgroundImage: "linear-gradient(45deg, transparent calc(50% - 0.75px), var(--ui-neutral-border-strong) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px)), linear-gradient(-45deg, transparent calc(50% - 0.75px), var(--ui-neutral-border-strong) calc(50% - 0.75px) calc(50% + 0.75px), transparent calc(50% + 0.75px))",
|
|
315
|
+
color: "transparent",
|
|
316
|
+
},
|
|
317
|
+
"&[data-status=blocked]": {
|
|
318
|
+
cursor: "not-allowed",
|
|
319
|
+
borderStyle: "dashed",
|
|
320
|
+
borderColor: "var(--ui-neutral-border)",
|
|
321
|
+
backgroundColor: "transparent",
|
|
322
|
+
color: "transparent",
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Renders the key to the cabin: a wrapping list of swatches drawn exactly like the seats they
|
|
328
|
+
* explain, each beside the caller's caption.
|
|
329
|
+
*
|
|
330
|
+
* @param handle Runtime handle carrying the legend's props.
|
|
331
|
+
* @returns The render function producing the legend's markup.
|
|
332
|
+
* @example
|
|
333
|
+
* <SeatMap.Legend
|
|
334
|
+
* items={[
|
|
335
|
+
* { swatch: "available", label: "Available" },
|
|
336
|
+
* { swatch: "extra-legroom", label: "Extra legroom" },
|
|
337
|
+
* { swatch: "taken", label: "Taken" },
|
|
338
|
+
* ]}
|
|
339
|
+
* />
|
|
340
|
+
*/
|
|
341
|
+
SeatMap.Legend = function SeatMapLegend(handle) {
|
|
342
|
+
return () => {
|
|
343
|
+
let { items, mix, ...rest } = handle.props;
|
|
344
|
+
return (_jsx("ul", { "data-slot": "seat-map-legend", ...rest, mix: mergeMix([
|
|
345
|
+
raw({
|
|
346
|
+
display: "flex",
|
|
347
|
+
flexWrap: "wrap",
|
|
348
|
+
gap: "0.5rem 1rem",
|
|
349
|
+
margin: "0",
|
|
350
|
+
padding: "0",
|
|
351
|
+
listStyle: "none",
|
|
352
|
+
fontSize: "0.75rem",
|
|
353
|
+
color: "var(--ui-neutral-fg)",
|
|
354
|
+
}),
|
|
355
|
+
], mix), children: items.map((item) => {
|
|
356
|
+
let status = item.swatch === "taken" || item.swatch === "blocked" || item.swatch === "selected"
|
|
357
|
+
? item.swatch
|
|
358
|
+
: "available";
|
|
359
|
+
let kind = status === "available" && item.swatch !== "available" ? item.swatch : "standard";
|
|
360
|
+
return (_jsxs("li", { "data-swatch": item.swatch, mix: [raw({ display: "flex", alignItems: "center", gap: "0.375rem" })], children: [_jsx("span", { "aria-hidden": "true", "data-slot": "seat-map-swatch", "data-status": status, "data-kind": kind, mix: [
|
|
361
|
+
seatStyle(),
|
|
362
|
+
raw({
|
|
363
|
+
minInlineSize: "1rem",
|
|
364
|
+
minBlockSize: "1.125rem",
|
|
365
|
+
inlineSize: "1rem",
|
|
366
|
+
cursor: "default",
|
|
367
|
+
}),
|
|
368
|
+
] }), _jsx("span", { children: item.label })] }, item.swatch));
|
|
369
|
+
}) }));
|
|
370
|
+
};
|
|
371
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A whole trip on one vertical timeline: days under headings, and within each day a flight,
|
|
3
|
+
* stay, car, activity or note per item, each with its icon on a connecting rail, its time,
|
|
4
|
+
* title, detail lines, a status slot and an actions slot.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import type { HeadingLevel } from "../components/heading-scope.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link TripTimeline} and its compound parts.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace TripTimeline {
|
|
15
|
+
/** What an item is, which picks its icon and tone. */
|
|
16
|
+
type Kind = "flight" | "stay" | "car" | "activity" | "note";
|
|
17
|
+
/** What {@link TripTimeline} shares with its days and items. */
|
|
18
|
+
interface Context {
|
|
19
|
+
kindLabels?: Partial<Record<Kind, string>>;
|
|
20
|
+
level?: HeadingLevel;
|
|
21
|
+
}
|
|
22
|
+
/** Every native `<ol>` attribute, plus the words for each kind. */
|
|
23
|
+
interface Props extends TagProps<"ol"> {
|
|
24
|
+
/**
|
|
25
|
+
* Hidden words read before an item's title in place of its icon, such as
|
|
26
|
+
* `{ flight: "Flight", stay: "Stay" }`.
|
|
27
|
+
*/
|
|
28
|
+
kindLabels?: Partial<Record<Kind, string>>;
|
|
29
|
+
/** The heading level of every day; the ambient level, then 3, when left out. */
|
|
30
|
+
level?: HeadingLevel;
|
|
31
|
+
/** The {@link TripTimeline.Day} items. */
|
|
32
|
+
children: RemixNode;
|
|
33
|
+
}
|
|
34
|
+
/** Every native `<li>` attribute, plus the day's heading and its items. */
|
|
35
|
+
interface DayProps extends Omit<TagProps<"li">, "children"> {
|
|
36
|
+
/** The day, formatted, such as "Fri 14 Mar". */
|
|
37
|
+
heading: RemixNode;
|
|
38
|
+
/** A machine-readable date for the `<time>` the heading sits in, such as "2026-03-14". */
|
|
39
|
+
date?: string;
|
|
40
|
+
/** Muted words after the heading, such as "Day 1 · Merrow". */
|
|
41
|
+
detail?: RemixNode;
|
|
42
|
+
/** The {@link TripTimeline.Item} entries. */
|
|
43
|
+
children: RemixNode;
|
|
44
|
+
}
|
|
45
|
+
/** Every native `<li>` attribute, plus what the item is and when. */
|
|
46
|
+
interface ItemProps extends Omit<TagProps<"li">, "children" | "title"> {
|
|
47
|
+
kind: Kind;
|
|
48
|
+
/** A glyph in place of the kind's own. */
|
|
49
|
+
icon?: RemixNode;
|
|
50
|
+
/** When it happens, formatted, such as "08:40" or "Check-in from 15:00". */
|
|
51
|
+
time?: RemixNode;
|
|
52
|
+
/** A machine-readable moment for the `<time>` the time sits in. */
|
|
53
|
+
dateTime?: string;
|
|
54
|
+
/** What it is, such as "LW 214 Merrow → Vellis". */
|
|
55
|
+
title: RemixNode;
|
|
56
|
+
/** Lines under the title, such as a terminal, a confirmation code or an address. */
|
|
57
|
+
details?: RemixNode[];
|
|
58
|
+
/** A status at the title's end, such as a `<Badge>` reading "Confirmed". */
|
|
59
|
+
status?: RemixNode;
|
|
60
|
+
/** Links or buttons under the item, such as "Add to calendar". */
|
|
61
|
+
actions?: RemixNode;
|
|
62
|
+
/** Anything else under the details, such as a small map or a note. */
|
|
63
|
+
children?: RemixNode;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Renders the trip as an `<ol>` of days. Under 30rem each item's time sits over its title; wider,
|
|
68
|
+
* times take a column before the rail so a day reads down like a schedule.
|
|
69
|
+
*
|
|
70
|
+
* @param handle Runtime handle carrying the list's props and sharing kind words and level.
|
|
71
|
+
* @returns The render function producing the timeline's markup.
|
|
72
|
+
* @example
|
|
73
|
+
* <TripTimeline aria-label="Trip to Vellis" kindLabels={{ flight: "Flight", stay: "Stay" }}>
|
|
74
|
+
* <TripTimeline.Day heading="Fri 14 Mar" date="2026-03-14" detail="Day 1">
|
|
75
|
+
* <TripTimeline.Item kind="flight" time="08:40" title="LW 214 Merrow → Vellis" status={<Badge>Confirmed</Badge>} />
|
|
76
|
+
* <TripTimeline.Item kind="stay" time="15:00" title="Check in at Hotel Saltmarsh" />
|
|
77
|
+
* </TripTimeline.Day>
|
|
78
|
+
* </TripTimeline>
|
|
79
|
+
*/
|
|
80
|
+
export declare function TripTimeline(handle: Handle<TripTimeline.Props, TripTimeline.Context>): () => import("remix/component").RemixElement;
|
|
81
|
+
export declare namespace TripTimeline {
|
|
82
|
+
var Day: (handle: Handle<TripTimeline.DayProps>) => () => import("remix/component").RemixElement;
|
|
83
|
+
var Item: (handle: Handle<TripTimeline.ItemProps>) => () => import("remix/component").RemixElement;
|
|
84
|
+
}
|