@nicertravel/ui 0.0.0 → 1.3.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.
@@ -0,0 +1,1058 @@
1
+ import { ButtonHTMLAttributes, ComponentType, Dispatch, HTMLAttributes, InputHTMLAttributes, MouseEvent, PointerEvent, ReactNode, RefObject, SelectHTMLAttributes, SetStateAction, TextareaHTMLAttributes } from "react";
2
+ import { Step } from "react-joyride";
3
+ interface OptionsProps$1 {
4
+ action: () => void;
5
+ destructive?: boolean;
6
+ disabled?: boolean;
7
+ hidden?: boolean;
8
+ icon?: string;
9
+ label: string;
10
+ }
11
+ interface ActionsProps {
12
+ options: OptionsProps$1[];
13
+ setVisible: (state: boolean) => void;
14
+ triggerRef: RefObject<HTMLElement | null>;
15
+ visible: boolean;
16
+ }
17
+ declare function Actions({ options, visible, setVisible, triggerRef }: ActionsProps): import("react").ReactPortal | null;
18
+ export interface DropdownOption<T> {
19
+ /** A second, softer line under the label: what tells two alike apart. */
20
+ description?: string;
21
+ endDecorator?: React.ReactNode;
22
+ label: string;
23
+ /**
24
+ * The heading this option sits under. A heading prints wherever the
25
+ * section changes, so options arrive already grouped.
26
+ */
27
+ section?: string;
28
+ startDecorator?: React.ReactNode;
29
+ value?: T;
30
+ }
31
+ export interface DropdownProps<T> {
32
+ /**
33
+ * An anchor narrower than its list, on the right half of the screen, gets
34
+ * the list under it ending where it ends instead of starting where it
35
+ * starts: a toolbar's select at the content's right edge keeps its list
36
+ * inside the content.
37
+ */
38
+ alignEnd?: boolean;
39
+ anchorEl?: React.RefObject<HTMLElement | null>;
40
+ onSelect?: (value?: T) => void;
41
+ options: DropdownOption<T>[];
42
+ /**
43
+ * A field over the options, this its placeholder, that narrows them as
44
+ * you type, by the label or the line under it; the arrows move and Enter
45
+ * picks the first match. For a long list opened from a button.
46
+ */
47
+ search?: string;
48
+ selectedOptions?: T[];
49
+ setVisible: (state: boolean) => void;
50
+ /**
51
+ * Every option shows its box, empty until it is the chosen one, so the
52
+ * rows line up and the choice reads as one of them. For a list of
53
+ * choices opened from a button.
54
+ */
55
+ showChecks?: boolean;
56
+ /**
57
+ * The keyboard picks, as in a native select: typing jumps to the first
58
+ * option that starts with it, the arrows move, Enter picks and Escape
59
+ * closes. For a list opened from a button — under a text input the typing
60
+ * belongs to the input.
61
+ */
62
+ typeAhead?: boolean;
63
+ visible: boolean;
64
+ }
65
+ declare function Dropdown<T>({ alignEnd, options, visible, setVisible, onSelect, search, selectedOptions, anchorEl, showChecks, typeAhead }: DropdownProps<T>): import("react").JSX.Element | null;
66
+ interface OptionsProps<T> {
67
+ /** The keyboard is on it (`typeAhead`). */
68
+ active?: boolean;
69
+ checked?: boolean;
70
+ /** Its place in the list, for the keyboard to scroll to. */
71
+ index?: number;
72
+ onClick?: () => void;
73
+ option: DropdownOption<T>;
74
+ /** Its box shows unchecked too (`showChecks`). */
75
+ showCheck?: boolean;
76
+ }
77
+ export declare function Option<T>({ active, checked, index, option, onClick, showCheck }: OptionsProps<T>): import("react").JSX.Element;
78
+ interface AutocompleteProps<T> extends InputHTMLAttributes<HTMLInputElement> {
79
+ defaultOptions?: DropdownOption<T>[];
80
+ /** What is wrong with the choice, under the field as a text input's. */
81
+ error?: string;
82
+ icon?: string;
83
+ inputValue?: string;
84
+ isLoading?: boolean;
85
+ label?: string;
86
+ onInputChange?: (value: string) => void;
87
+ onSelectOption?: (value?: T) => void;
88
+ options: DropdownOption<T>[];
89
+ required?: boolean;
90
+ selectedOptions?: T[];
91
+ }
92
+ declare function Autocomplete<T>({ label, options, onInputChange, onSelectOption, selectedOptions, inputValue, required, isLoading, onBlur, onFocus, defaultOptions, icon, ...rest }: AutocompleteProps<T>): import("react").JSX.Element;
93
+ export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
94
+ buttonType: "primary" | "secondary" | "tertiary" | "destructive";
95
+ dropdown?: boolean;
96
+ iconLeft?: string;
97
+ /** Defaults to the kit's 10px, small for a plain glyph like `plus`. */
98
+ iconSize?: number;
99
+ label: string;
100
+ size: "l" | "m" | "s";
101
+ state?: "loading" | "success" | "error" | "disabled";
102
+ }
103
+ declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
104
+ interface CalendarProps {
105
+ defaultFrom?: string;
106
+ defaultTo?: string;
107
+ double?: boolean;
108
+ maxDate?: string;
109
+ minDate?: string;
110
+ onChange: (from: string | null, to: string | null) => void;
111
+ setVisible: (state: boolean) => void;
112
+ visible: boolean;
113
+ }
114
+ declare function Calendar({ defaultFrom, defaultTo, double, onChange, visible, setVisible, minDate, maxDate }: CalendarProps): false | import("react").JSX.Element;
115
+ export interface CalendarPropsV2 {
116
+ /**
117
+ * A click on the picked day unpicks it (one day only, not a range): Done
118
+ * then reads as no date.
119
+ */
120
+ clearable?: boolean;
121
+ defaultFrom?: string;
122
+ defaultTo?: string;
123
+ double?: boolean;
124
+ initialViewDate?: string;
125
+ maxDate?: string;
126
+ minDate?: string;
127
+ onChange: (from: string | null, to: string | null) => void;
128
+ /**
129
+ * Done, and only Done: a click outside closes the calendar too, which a
130
+ * host that applies the picked range on Done reads as leaving it be.
131
+ */
132
+ onDone?: () => void;
133
+ setVisible: (state: boolean) => void;
134
+ visible: boolean;
135
+ }
136
+ export declare const CalendarV2: ({ clearable, defaultFrom, defaultTo, double, initialViewDate, onChange, onDone, visible, setVisible, minDate, maxDate }: CalendarPropsV2) => import("react").JSX.Element | null;
137
+ type CardBrand = "amex" | "applePay" | "cartes_bancaires" | "diners" | "discover" | "eftpos_au" | "googlePay" | "hiper" | "hipercard" | "interac" | "jcb" | "maestro" | "mastercard" | "unionpay" | "unknown" | "visa";
138
+ declare const cards: Record<CardBrand, string>;
139
+ interface CardInputValues {
140
+ brand?: CardBrand;
141
+ cvv?: string | null;
142
+ date?: string | null;
143
+ number?: string | null;
144
+ }
145
+ export interface CardInputProps {
146
+ data?: CardInputValues;
147
+ disabled?: boolean;
148
+ includeCvv?: boolean;
149
+ setData?: (data: CardInputValues) => void;
150
+ }
151
+ declare const CardInput: ({ data, setData, disabled, includeCvv }: CardInputProps) => import("react").JSX.Element;
152
+ interface CheckProps extends InputHTMLAttributes<HTMLInputElement> {
153
+ circle?: boolean;
154
+ /**
155
+ * Some of what it stands for is chosen, not all: drawn checked with a
156
+ * dash instead of a tick (a group whose items are partly selected).
157
+ */
158
+ partial?: boolean;
159
+ }
160
+ declare function Check({ circle, partial, ...rest }: CheckProps): import("react").JSX.Element;
161
+ interface DateInputProps {
162
+ defaultDate?: string;
163
+ disabled?: boolean;
164
+ id?: string;
165
+ key?: string;
166
+ label?: string;
167
+ maxDate?: string;
168
+ minDate?: string;
169
+ name?: string;
170
+ onChange?: (value: string) => void;
171
+ required?: boolean;
172
+ }
173
+ declare function DateInput({ id, defaultDate, disabled, label, name, onChange, required, key, minDate, maxDate }: DateInputProps): import("react").JSX.Element;
174
+ export interface DateInputV2Props extends InputHTMLAttributes<HTMLInputElement> {
175
+ /** What is wrong with the date, under the field as a text input's. */
176
+ error?: string;
177
+ label?: string;
178
+ /**
179
+ * The latest and earliest days a typed date may be (YYYY-MM-DD), as the
180
+ * calendar's own bounds: a whole day outside them isn't handed on, and
181
+ * a bubble under the field says which days are while it has the cursor.
182
+ * A host that words its own range error leaves them out.
183
+ */
184
+ maxDate?: string;
185
+ minDate?: string;
186
+ /**
187
+ * Typed as well as picked: the field takes MM-DD-YYYY from the keyboard,
188
+ * its dashes added as the digits come, and hands each whole, real day on
189
+ * as YYYY-MM-DD (null once emptied). A click puts the cursor in it; the
190
+ * calendar opens from its button. Without it the field is the
191
+ * calendar's alone, and a click opens it.
192
+ */
193
+ onType?: (value: string | null) => void;
194
+ setCalendarVisible: Dispatch<SetStateAction<boolean>>;
195
+ }
196
+ /** "12-24-2026" → "2026-12-24", or null while it isn't a whole, real day. */
197
+ export declare const typedDate: (text: string) => string | null;
198
+ export declare const DateInputV2: ({ error, label, maxDate, minDate, onType, placeholder, setCalendarVisible, ...rest }: DateInputV2Props) => import("react").JSX.Element;
199
+ interface DialogProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
200
+ actions: DialogAction[];
201
+ children?: React.ReactNode;
202
+ description?: string;
203
+ setVisible: (state: boolean) => void;
204
+ /**
205
+ * The heading, in the header beside the close button as the Modal sets
206
+ * it; the content scrolls under it. It used to fall through to the box as
207
+ * a tooltip, so every titled dialog opened without one.
208
+ */
209
+ title?: string;
210
+ }
211
+ interface DialogAction {
212
+ disabled?: boolean;
213
+ hierarchy: ButtonProps["buttonType"];
214
+ label: string;
215
+ onClick: () => void;
216
+ }
217
+ declare const Dialog: ({ actions, description, setVisible, children, title, ...rest }: DialogProps) => import("react").JSX.Element;
218
+ export interface DetailDrawerProps {
219
+ buttons: ButtonProps[];
220
+ children: ReactNode;
221
+ /**
222
+ * Adds a share button beside the close X. The drawer only reports the tap —
223
+ * what gets shared (and how: native sheet vs clipboard) is the caller's.
224
+ */
225
+ onShare?: () => void;
226
+ setVisible: Dispatch<SetStateAction<boolean>>;
227
+ }
228
+ /**
229
+ * THE detail side panel — every search result, itinerary segment, order and
230
+ * form drawer in the apps opens in this: a 640px panel sliding in from the
231
+ * right over a dimmed page, scrolling content, and its actions pinned in the
232
+ * footer. On a phone it takes the whole screen and rises from below.
233
+ */
234
+ declare function DetailDrawer({ buttons, children, onShare, setVisible }: DetailDrawerProps): import("react").JSX.Element;
235
+ export interface EmptyStateProps {
236
+ /** What to do about it, under the text. */
237
+ button?: ButtonProps;
238
+ description: string;
239
+ icon: string;
240
+ title?: string;
241
+ }
242
+ /**
243
+ * "Nothing here yet": a muted round icon, an optional bold title and a short
244
+ * description, centred in whatever hosts it.
245
+ */
246
+ declare function EmptyState({ button, description, icon, title }: EmptyStateProps): import("react").JSX.Element;
247
+ interface Props$2 {
248
+ children: ReactNode;
249
+ /** Headline shown in place of the app. */
250
+ message?: string;
251
+ }
252
+ /**
253
+ * Root boundary for the SPAs. Catches render errors, takes over the screen
254
+ * with the fallback and reports the error to CloudWatch RUM.
255
+ *
256
+ * Event-handler and async errors are not caught here — RUM's `errors`
257
+ * telemetry picks those up from `onerror` / `unhandledrejection`.
258
+ */
259
+ declare function ErrorBoundary({ children, message }: Props$2): import("react").JSX.Element;
260
+ interface FieldErrorProps {
261
+ children: ReactNode;
262
+ /** Where a host places it: over a save bar, under a field of its own. */
263
+ className?: string;
264
+ id?: string;
265
+ }
266
+ /**
267
+ * What is wrong with a field, the same everywhere: the alert icon and one
268
+ * short line, in the negative tone. Every field's `error` renders it, and a
269
+ * host that checks a field of its own puts it under that field. The `error`
270
+ * class stays for the hosts that already style a field's error by it.
271
+ */
272
+ export declare function FieldError({ children, className, id }: FieldErrorProps): import("react").JSX.Element;
273
+ interface FileInputProps extends InputHTMLAttributes<HTMLInputElement> {
274
+ /** The picker button's words. */
275
+ browseLabel?: string;
276
+ /**
277
+ * Something held over the host's module rather than the box: the host
278
+ * takes the drop, the box only answers. Leave it out and the box takes
279
+ * its own drops.
280
+ */
281
+ dragging?: {
282
+ files: number;
283
+ } | null;
284
+ icon?: string;
285
+ inputValue?: File | File[];
286
+ /** What it takes and how big, under the prompt. */
287
+ label?: string;
288
+ linkLabel?: string;
289
+ /** Words for one and for several, as in "Drop to upload 2 files". */
290
+ noun?: readonly [string, string];
291
+ /** The files picked or dropped, besides `onChange`. */
292
+ onFiles?: (files: File[]) => void;
293
+ /** Offers Add a link, which turns the box into the field. */
294
+ onLink?: (url: string) => void;
295
+ /** The words over the hint; by default it asks for the file. */
296
+ prompt?: string;
297
+ }
298
+ /**
299
+ * THE way to hand files over, in every app: one dashed box that takes a
300
+ * drop, the picker and, when the host offers it, a link. It keeps one height
301
+ * in every state, so nothing under it moves: dragging lifts the arrow, and
302
+ * Add a link turns the box itself into the field.
303
+ */
304
+ declare function FileInput({ browseLabel, dragging, icon, inputValue, label, linkLabel, noun, onFiles, onLink, prompt, ...rest }: FileInputProps): import("react").JSX.Element;
305
+ interface IconProps extends HTMLAttributes<HTMLElement> {
306
+ misc?: boolean;
307
+ name: string;
308
+ size?: number;
309
+ }
310
+ declare function Icon({ misc, name, size, className, ...rest }: IconProps): import("react").JSX.Element;
311
+ export interface IconButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
312
+ buttonType: "primary" | "secondary" | "tertiary" | "destructive";
313
+ circle?: boolean;
314
+ icon: string;
315
+ size: "l" | "m" | "s";
316
+ }
317
+ declare const IconButton: import("react").ForwardRefExoticComponent<IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
318
+ interface Props$1 {
319
+ /** The app's API origin (VITE_APP_API_URL). Empty disables the gate. */
320
+ apiUrl: string;
321
+ /** This deployment protects config reads with Cognito. Guests skip the gate. */
322
+ getToken?: () => Promise<string | null | void>;
323
+ children: ReactNode;
324
+ }
325
+ /**
326
+ * The web twin of the native app's version gate: a kill switch for deploys.
327
+ *
328
+ * Reads authenticated `GET /config/AppVersion/web` — the same config resource
329
+ * the native app checks at cold start — and takes over the screen while its
330
+ * `isUnderMaintenance` flag is on. Ops flips the flag with the admin
331
+ * `POST /config/AppVersion` (versionCode "web"); no frontend deploy involved.
332
+ *
333
+ * Fails OPEN, like the native gate: a network error, a missing row or an
334
+ * unexpected payload renders the app normally. Being unable to read the flag
335
+ * must never take the product down. While mounted it keeps polling, so
336
+ * browsers left open drop into (and come back out of) maintenance on their
337
+ * own.
338
+ */
339
+ declare function MaintenanceGate({ apiUrl, children, getToken }: Props$1): import("react").JSX.Element;
340
+ interface ModalProps extends HTMLAttributes<HTMLDivElement> {
341
+ button?: ButtonProps;
342
+ children: ReactNode;
343
+ hideCloseButton?: boolean;
344
+ setVisible: (state: boolean) => void;
345
+ title?: string;
346
+ visible: boolean;
347
+ }
348
+ declare function Modal({ button, children, title, visible, hideCloseButton, setVisible, className, ...rest }: ModalProps): false | import("react").JSX.Element;
349
+ interface NavButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
350
+ buttonType: "back" | "forward" | "cancel" | "more" | "less";
351
+ size: "l" | "s";
352
+ }
353
+ declare function NavButton({ size, buttonType, ...rest }: NavButtonProps): import("react").JSX.Element;
354
+ interface NumberInputProps {
355
+ defaultValue?: number | string;
356
+ disabled?: boolean;
357
+ /** What is wrong with the number, under the field as a text input's. */
358
+ error?: string;
359
+ id?: string;
360
+ /**
361
+ * Its name, read inside the empty field past the minus button and on its
362
+ * border once it holds a number, as a text input's label.
363
+ */
364
+ label?: string;
365
+ maxValue?: number;
366
+ minValue?: number;
367
+ name?: string;
368
+ onChange?: (value: number | string) => void;
369
+ /**
370
+ * It may hold no number: it starts empty without a default, minus from
371
+ * the least empties it, and leaving it empty keeps it so.
372
+ */
373
+ optional?: boolean;
374
+ required?: boolean;
375
+ /** What each button adds or takes away; a fraction lets decimals in. */
376
+ step?: number;
377
+ unit?: {
378
+ singular: string;
379
+ plural: string;
380
+ };
381
+ /** Given, the host holds the number: a reset from outside shows. */
382
+ value?: number;
383
+ }
384
+ declare function NumberInput({ id, defaultValue, disabled, error, label, minValue, maxValue, name, onChange, optional, required, step, unit, value: held }: NumberInputProps): import("react").JSX.Element;
385
+ interface OverlayProps extends HTMLAttributes<HTMLDivElement> {
386
+ children: ReactNode;
387
+ onClose?: (state: boolean) => void;
388
+ }
389
+ declare function Overlay({ children, onClose, ...rest }: OverlayProps): import("react").JSX.Element;
390
+ interface PaginatorProps extends HTMLAttributes<HTMLDivElement> {
391
+ currentPage: number;
392
+ onNextPage: () => void;
393
+ onPageChange: (page: number) => void;
394
+ onPrevPage: () => void;
395
+ resultsPerPage: number;
396
+ totalPages: number;
397
+ totalResults: number;
398
+ }
399
+ declare function Paginator({ totalPages, currentPage, onPageChange, totalResults, resultsPerPage, onPrevPage, onNextPage, ...rest }: PaginatorProps): import("react").JSX.Element;
400
+ export interface Phone {
401
+ completeNumber: string;
402
+ dialCode: string;
403
+ number: string;
404
+ }
405
+ interface PhoneInputProps {
406
+ /** The dial code a known number starts with, e.g. "+51"; else the visitor's. */
407
+ defaultDialCode?: string;
408
+ /** The national number, without its dial code. */
409
+ defaultValue?: string;
410
+ disabled?: boolean;
411
+ /** Under the field, as TextInput shows one. */
412
+ error?: string;
413
+ id?: string;
414
+ /**
415
+ * Names the field on its top border, from the start: the dial code holds
416
+ * the spot a TextInput's resting label would take. For two phone fields
417
+ * side by side (a phone and a WhatsApp).
418
+ */
419
+ label?: string;
420
+ name?: string;
421
+ /** Focus left the field: the number and its dial code alike. */
422
+ onBlur?: () => void;
423
+ onChange?: (phone?: Phone) => void;
424
+ /** What the empty number field shows; "Phone" by default. */
425
+ placeholder?: string;
426
+ readOnly?: boolean;
427
+ required?: boolean;
428
+ }
429
+ declare function PhoneInput({ id, defaultDialCode, defaultValue, disabled, error, label, name, onBlur, onChange, placeholder, required, readOnly }: PhoneInputProps): import("react").JSX.Element;
430
+ export type SignInMethod = "email" | "phone";
431
+ export type SignInStep = "code" | "contact";
432
+ export interface SignInCardProps {
433
+ /**
434
+ * The agency whose own host this is (`portal.agency.com`): the screen
435
+ * welcomes to it and wears its mark and sign-in photo in place of Nicer's.
436
+ * Nicer's terms still govern, so the terms line names Nicer.
437
+ */
438
+ agency?: {
439
+ logoUrl?: string;
440
+ name: string;
441
+ photoUrl?: string;
442
+ };
443
+ /** A code is being asked for or checked: the button waits. */
444
+ busy?: boolean;
445
+ /** The CAPTCHA widget the host's sign-in renders under the fields. */
446
+ captcha?: ReactNode;
447
+ /** More links of the code step, after Resend code: another channel. */
448
+ codeLinks?: ReactNode;
449
+ /** The card's top right corner: the portal's Register link. */
450
+ corner?: ReactNode;
451
+ email: string;
452
+ /** The square Nicer mark for the app's theme. */
453
+ logoSrc: string;
454
+ method: SignInMethod;
455
+ /** Back to the contact step, to type another phone or email. */
456
+ onChangeContact: () => void;
457
+ /** The digits typed so far; anything else is dropped as it is typed. */
458
+ onCode: (code: string) => void;
459
+ onEmail: (email: string) => void;
460
+ onMethod: (method: SignInMethod) => void;
461
+ onPhone: (phone?: Phone) => void;
462
+ onResend: () => void;
463
+ /** Continue on the contact step, Sign in on the code step. */
464
+ onSubmit: () => void;
465
+ step: SignInStep;
466
+ /** The drawn wordmark a phone shows in the upper half of the screen. */
467
+ wordmarkSrc: string;
468
+ }
469
+ /** The length of the code the sign-in sends. */
470
+ export declare const SIGN_IN_CODE_LENGTH = 6;
471
+ /**
472
+ * Sign-in for the apps Nicer's own people use (portal and Octopus): the card
473
+ * inside the brand photo on a desktop, the native app's plain screen on a
474
+ * phone. The host owns the challenge and what follows it; this owns the
475
+ * screen, so every app signs in on the same one.
476
+ */
477
+ declare function SignInCard({ agency, busy, captcha, codeLinks, corner, email, logoSrc, method, onChangeContact, onCode, onEmail, onMethod, onPhone, onResend, onSubmit, step, wordmarkSrc }: SignInCardProps): import("react").JSX.Element;
478
+ export interface AgencyMarkProps {
479
+ /** The agency's logo; without one, or when it fails to load, its initial. */
480
+ logoUrl?: string;
481
+ /** The agency's name, whose first letter stands in for the logo. */
482
+ name: string;
483
+ /**
484
+ * 24px (`s`), 32px (`m`, the default), or the whole of a tile the host
485
+ * frames (`fill`), as a detail page's 64px one.
486
+ */
487
+ size?: "fill" | "m" | "s";
488
+ }
489
+ /**
490
+ * An agency's mark: its logo over a neutral tile holding its initial. The
491
+ * logo shows once it has loaded, so a broken or missing one leaves the
492
+ * initial instead of the browser's broken image; never Nicer's own mark.
493
+ */
494
+ declare function AgencyMark({ logoUrl, name, size }: AgencyMarkProps): import("react").JSX.Element;
495
+ export interface SideNavItem {
496
+ /** A count on the page's mark, as Community's unread messages. */
497
+ badge?: number;
498
+ icon: string;
499
+ /**
500
+ * Names the page from one render to the next: its place in what the
501
+ * person arranged, its slide, and its tour step (`nav-<key>`).
502
+ */
503
+ key: string;
504
+ label: string;
505
+ route: string;
506
+ }
507
+ /** What the rail asks of the host's router link. */
508
+ export interface SideNavLinkProps {
509
+ children: ReactNode;
510
+ className?: string;
511
+ "data-flip"?: string;
512
+ onClick?: (event: MouseEvent<HTMLAnchorElement>) => void;
513
+ to: string;
514
+ }
515
+ export interface SideNavProps {
516
+ /**
517
+ * Every page the rail can hold, in their default order, so a page this
518
+ * person can't see now (another role's, a feature off) keeps its place in
519
+ * what they arranged. The pages' own keys by default.
520
+ */
521
+ allKeys?: readonly string[];
522
+ /**
523
+ * Where this person's arrangement is kept on this device, one per person.
524
+ * Without it there is no Edit menu.
525
+ */
526
+ arrangementKey?: string;
527
+ /** Keeps the rail open, as while a menu in its header is. */
528
+ expanded?: boolean;
529
+ /** After the pages, sliding with them: a divider, links out. */
530
+ footer?: ReactNode;
531
+ /** The pages this person may see, in their default order; none until known. */
532
+ items: SideNavItem[];
533
+ /** The host router's link. */
534
+ Link: ComponentType<SideNavLinkProps>;
535
+ /**
536
+ * The rail's top: the agency switcher, or a link holding the mark and,
537
+ * shown as the rail opens, a `.label`.
538
+ */
539
+ logo: ReactNode;
540
+ /** A page's link clicked: the host may keep it from navigating. */
541
+ onNavigate?: (item: SideNavItem, event: MouseEvent<HTMLAnchorElement>) => void;
542
+ pathname: string;
543
+ }
544
+ /**
545
+ * The apps' left rail: the pages, open over the page on hover, and Edit menu,
546
+ * where a person hides pages and drags the rest into their order, kept per
547
+ * person on this device.
548
+ */
549
+ declare function SideNav({ allKeys, arrangementKey, expanded, footer, items, Link, logo, onNavigate, pathname }: SideNavProps): import("react").JSX.Element;
550
+ /** Six dots, the grip a row or a card is dragged by: the kit has no such icon. */
551
+ declare function Grip(): import("react").JSX.Element;
552
+ /**
553
+ * How a person arranged a board's columns (their order, and which are off
554
+ * it), kept per person on this device. The pipeline's stages, My tasks' due
555
+ * dates and the sidebar's pages keep theirs this way, each under its own key.
556
+ */
557
+ export interface Arrangement<Id extends string> {
558
+ /** Every column, in the board's order. */
559
+ columns: Id[];
560
+ /** The columns off the board. */
561
+ hidden: Id[];
562
+ }
563
+ /** The board as it comes: every column, in its own order. */
564
+ export declare const defaultArrangement: <Id extends string>(all: readonly Id[]) => Arrangement<Id>;
565
+ export declare const isDefaultArrangement: <Id extends string>(arrangement: Arrangement<Id>, all: readonly Id[]) => boolean;
566
+ /**
567
+ * A saved arrangement as the board reads it now: columns it no longer has
568
+ * are dropped, and one it has that the saved order lacks goes after the
569
+ * one it follows in the board's own order. Anything else reads as nothing
570
+ * arranged.
571
+ */
572
+ export declare const arrangementFrom: <Id extends string>(saved: unknown, all: readonly Id[]) => Arrangement<Id>;
573
+ /** No storage at all (a private window) reads as nothing arranged. */
574
+ export declare const loadArrangement: <Id extends string>(key: string, all: readonly Id[]) => Arrangement<Id>;
575
+ export declare const saveArrangement: <Id extends string>(key: string, arrangement: Arrangement<Id>) => void;
576
+ /**
577
+ * The whole order with the ones this person sees put in their new order,
578
+ * the ones they can't see (another role's, a feature off) where they were.
579
+ */
580
+ export declare const withShownOrder: <Id extends string>(order: readonly Id[], shown: readonly Id[], next: readonly Id[]) => Id[];
581
+ /**
582
+ * When the container's items change (`keys`: one taken out, put in, or
583
+ * reordered), slides each that stayed from where it showed to where it
584
+ * is: down a column (`y`) or across a board (`x`). Where they showed is
585
+ * read as the render starts, while the page still shows them: an item
586
+ * that left by its own motion, or a scroll the browser kept in place,
587
+ * moves nothing. The items are the container's children with `data-flip`,
588
+ * the key that names the same item from one render to the next. One moved
589
+ * further than half again its size fades in where it lands instead. With
590
+ * `enter`, an item put in fades in where it lands (not the first ones the
591
+ * container shows).
592
+ */
593
+ export declare function useFlip(ref: RefObject<HTMLElement | null>, keys: string[], axis?: "x" | "y", { enter }?: {
594
+ enter?: boolean;
595
+ }): void;
596
+ interface LiftedRow {
597
+ /** Draws the copy with its top at `top`, kept within the list. */
598
+ follow: (top: number) => void;
599
+ /** Let go: the copy settles onto the row's place, then goes. */
600
+ land: (row: HTMLElement | null) => void;
601
+ }
602
+ /**
603
+ * A row picked up to be dragged into a new order, as Trello lifts a card: a
604
+ * copy of it rises over the list and follows the pointer, never past the
605
+ * list's ends, while the row itself stays in the list as the empty place it
606
+ * will drop into (its host draws its `held` class as that place) and the
607
+ * other rows slide to open it. Let go, the copy settles into the place.
608
+ * `within` is the list's box, read as it moves (it may scroll). `pad` is
609
+ * room above and below a row drawn tight to its content (the sidebar's),
610
+ * so the copy reads as a card around it; its host draws the place as tall.
611
+ */
612
+ export declare const liftRow: (row: HTMLElement, within: () => DOMRect | null, { pad }?: {
613
+ pad?: number;
614
+ }) => LiftedRow;
615
+ /**
616
+ * A copy of an element as it looks now, for something carried over the page
617
+ * (a dragged card, a row being reordered): every element with its computed
618
+ * styles written on it, so it keeps its look away from the styles that drew
619
+ * it in its place. It never takes the pointer, nothing in it animates, and a
620
+ * row drawn on its list's background gets its own, to be lifted on.
621
+ */
622
+ export declare const snapshot: (source: HTMLElement) => HTMLElement;
623
+ /**
624
+ * A list's rows dragged into a new order where they stand, as the Columns
625
+ * menu's: a copy of the row in hand follows the pointer (`liftRow`) while
626
+ * the row itself shows as the empty place it will drop into (`heldId`, for
627
+ * the host to draw), the others make room (the list slides them with
628
+ * `useFlip`), and dropped, the copy settles into the place and `onMove`
629
+ * takes the new order once. Each row carries `data-row`; the one in hand
630
+ * drops its `data-flip`, so the slides leave it alone. The list's first row
631
+ * starts at the list's top. `pad` gives the copy room around a row drawn
632
+ * tight to its content (`liftRow`).
633
+ */
634
+ export declare function useDragOrder<Id extends string>(listRef: RefObject<HTMLElement | null>, settled: readonly Id[], onMove: (order: Id[]) => void, { pad }?: {
635
+ pad?: number;
636
+ }): {
637
+ heldId: Id | undefined;
638
+ moveBy: (id: Id, step: -1 | 1) => void;
639
+ order: readonly Id[];
640
+ take: (id: Id, event: PointerEvent<HTMLElement>) => void;
641
+ };
642
+ interface PriceProps {
643
+ /** Names the field when no visible label is tied to it. */
644
+ "aria-label"?: string;
645
+ currencySelector?: boolean;
646
+ defaultCurrency?: string;
647
+ defaultValue?: string;
648
+ disabled?: boolean;
649
+ /** What is wrong with the amount, under the field as a text input's. */
650
+ error?: string;
651
+ id?: string;
652
+ max?: number;
653
+ min?: number;
654
+ name?: string;
655
+ onChange?: (value: string) => void;
656
+ onCurrencyChange?: (curency: string) => void;
657
+ options?: {
658
+ label: string;
659
+ value: string;
660
+ }[];
661
+ required?: boolean;
662
+ }
663
+ declare function PriceInput({ "aria-label": ariaLabel, id, options, currencySelector, defaultCurrency, defaultValue, disabled, error, name, onChange, onCurrencyChange, required, min, max }: PriceProps): import("react").JSX.Element;
664
+ interface RadioButtonProps extends InputHTMLAttributes<HTMLInputElement> {}
665
+ declare function RadioButton({ ...rest }: RadioButtonProps): import("react").JSX.Element;
666
+ export interface SelectOption {
667
+ defaultValue?: string;
668
+ /**
669
+ * A softer line under the label, searched as well: what tells two alike
670
+ * apart, as an email under a name. Only the app's list shows it.
671
+ */
672
+ description?: string;
673
+ label: string;
674
+ selected?: boolean;
675
+ value: string;
676
+ }
677
+ export interface SelectProps extends SelectHTMLAttributes<HTMLSelectElement> {
678
+ defaultValue?: string;
679
+ /** What is wrong with the choice, under the select as a text input's. */
680
+ error?: string;
681
+ options?: SelectOption[];
682
+ placeholder?: string;
683
+ readOnly?: boolean;
684
+ /**
685
+ * The list opens with its search whatever its length, and on a touch
686
+ * screen too: a roster of people, where one is found by typing and names
687
+ * alike read apart by their description.
688
+ */
689
+ searchable?: boolean;
690
+ /**
691
+ * "standard" is the compact select of a toolbar ("Sorted by", "Currency"):
692
+ * its choice underlined with a chevron, as wide as what it reads.
693
+ */
694
+ variant?: "outlined" | "standard";
695
+ }
696
+ /**
697
+ * One option out of a list known up front. On a computer it opens the app's
698
+ * own list, the same everywhere, with a search over it once the list is
699
+ * long or `searchable`; on a touch screen a short list opens the device's
700
+ * own picker. A choice that searches the server or takes free text is an
701
+ * Autocomplete instead. Several at once stay the native select.
702
+ */
703
+ declare function Select({ error, searchable, ...props }: SelectProps): import("react").JSX.Element;
704
+ interface RangeSliderProps {
705
+ /** Names each thumb for screen readers: "Minimum price", "Maximum price". */
706
+ labels?: [string, string];
707
+ max: number;
708
+ min: number;
709
+ onChange: (value: [number, number]) => void;
710
+ step?: number;
711
+ value: [number, number];
712
+ }
713
+ /**
714
+ * Two thumbs on one track, for picking a range (a price band). Two native
715
+ * range inputs stacked on the `.ui-slider` track: keyboard and touch come
716
+ * for free, and the thumbs can't cross — each one stops at the other.
717
+ */
718
+ declare function RangeSlider({ labels, max, min, onChange, step, value }: RangeSliderProps): import("react").JSX.Element;
719
+ export interface SeparatorProps {
720
+ orientation: "vertical" | "horizontal";
721
+ }
722
+ declare function Separator({ orientation }: SeparatorProps): import("react").JSX.Element;
723
+ interface SpinnerProps {
724
+ color?: "dark" | "light";
725
+ size?: number;
726
+ }
727
+ declare function Spinner({ size }: SpinnerProps): import("react").JSX.Element;
728
+ interface Props {
729
+ children: ReactNode;
730
+ }
731
+ /** Provides `StatusContext` and renders the toast its `setStatus` raises. */
732
+ declare function StatusManager({ children }: Props): import("react").JSX.Element;
733
+ interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onChange"> {
734
+ defaultChecked?: boolean;
735
+ onChange?: (checked: boolean) => void;
736
+ size: "l" | "s";
737
+ }
738
+ declare function Switch({ defaultChecked, onChange, size, ...rest }: SwitchProps): import("react").JSX.Element;
739
+ interface Tab {
740
+ /** Shown as a small badge after the label (e.g. a queue size, or "10,000+"). */
741
+ count?: number | string;
742
+ label: string;
743
+ /** A small dot after the label: something in the tab waits, unsaved. */
744
+ mark?: boolean;
745
+ onClick: () => void;
746
+ }
747
+ interface TabsProps extends HTMLAttributes<HTMLDivElement> {
748
+ /** Selected tab when the parent owns the selection (e.g. it lives in the URL). */
749
+ activeIndex?: number;
750
+ tabs: Tab[];
751
+ }
752
+ declare function Tabs({ activeIndex, tabs, ...rest }: TabsProps): import("react").JSX.Element;
753
+ interface TagProps extends HTMLAttributes<HTMLParagraphElement> {
754
+ disabled?: boolean;
755
+ label: string;
756
+ onRemove?: () => void;
757
+ type: "default" | "positive" | "warning" | "negative" | "disabled";
758
+ }
759
+ declare function Tag({ disabled: _disabled, label, type, onRemove, ...rest }: TagProps): import("react").JSX.Element;
760
+ interface TextAreaProps extends TextareaHTMLAttributes<HTMLTextAreaElement> {
761
+ /**
762
+ * Grows with its text, from about two lines to a ceiling, then scrolls:
763
+ * a long note reads whole instead of hiding under the box's edge.
764
+ */
765
+ autoGrow?: boolean;
766
+ /** What is wrong with the text, under the box as a text input's. */
767
+ error?: string;
768
+ label?: string;
769
+ }
770
+ declare function TextArea({ autoGrow, error, label, defaultValue, ...rest }: TextAreaProps): import("react").JSX.Element;
771
+ interface TextInputProps extends InputHTMLAttributes<HTMLInputElement> {
772
+ error?: string;
773
+ icon?: string;
774
+ isLoading?: boolean;
775
+ label?: string;
776
+ }
777
+ declare function TextInput({ icon, id, isLoading, label, error, ...rest }: TextInputProps): import("react").JSX.Element;
778
+ export type ThemeName = "dark" | "light";
779
+ /**
780
+ * Shows `theme` and saves it as the visitor's choice. With `persist: false`
781
+ * it is shown and not saved: a look one page asks for (an agency's own mode)
782
+ * must not become the choice the next page starts from.
783
+ */
784
+ export type SetTheme = (theme: ThemeName, options?: {
785
+ persist?: boolean;
786
+ }) => void;
787
+ export type ThemeContextValue = [ThemeName, SetTheme];
788
+ /** `[theme, setTheme]`, provided by `ThemeProvider`. */
789
+ export declare const ThemeContext: import("react").Context<ThemeContextValue>;
790
+ export interface ThemeProviderProps {
791
+ /**
792
+ * Apply the class and save the choice inside `setTheme`, before React
793
+ * re-renders: consumers that read the computed tokens while rendering
794
+ * (charts) must already get the new theme's values.
795
+ */
796
+ applyBeforeRender?: boolean;
797
+ children: ReactNode;
798
+ /** With no saved choice, follow the device (`prefers-color-scheme`). */
799
+ followSystem?: boolean;
800
+ /**
801
+ * Repaint `<meta name="theme-color">` with the theme's `--bgPrimary`: the
802
+ * browser paints the installed app's status-bar strip from it.
803
+ */
804
+ syncThemeColor?: boolean;
805
+ }
806
+ /**
807
+ * The visitor's own theme: the one they chose, else the device's when the
808
+ * app follows it, else light. What a page that showed another look goes back to.
809
+ */
810
+ export declare const savedTheme: (followSystem?: boolean) => ThemeName;
811
+ /**
812
+ * Owns the light/dark theme: the `light`/`dark` class on <body>, the choice
813
+ * saved under `localStorage.theme`, and `ThemeContext`.
814
+ */
815
+ declare function ThemeProvider({ applyBeforeRender, children, followSystem, syncThemeColor }: ThemeProviderProps): import("react").JSX.Element;
816
+ /**
817
+ * The light/dark toggle: a 56×32 pill whose knob slides between the moon and
818
+ * the sun (300ms easeOutExpo) and shrinks on hover.
819
+ */
820
+ declare function ThemeSwitch(): import("react").JSX.Element;
821
+ interface TimeInputProps {
822
+ defaultTime?: string;
823
+ disabled?: boolean;
824
+ id?: string;
825
+ maxTime?: string;
826
+ minTime?: string;
827
+ name?: string;
828
+ onChange?: (time: string) => void;
829
+ required?: boolean;
830
+ }
831
+ declare function TimeInput({ id, defaultTime, disabled, name, onChange, required, minTime, maxTime }: TimeInputProps): import("react").JSX.Element;
832
+ export interface ToastAction {
833
+ /** Its mark before the label, as Undo's rotate-left. */
834
+ icon?: string;
835
+ label: string;
836
+ onClick: () => void;
837
+ }
838
+ export interface ToastProps {
839
+ /** One thing to do about it, before the ring or the close: Undo. */
840
+ action?: ToastAction;
841
+ autoClose?: boolean;
842
+ description: string;
843
+ setVisible: (state: boolean) => void;
844
+ type: "info" | "success" | "warning" | "error";
845
+ visible: boolean;
846
+ }
847
+ declare function Toast({ action, autoClose, description, type, visible, setVisible }: ToastProps): false | import("react").JSX.Element;
848
+ export type TourStep = Omit<Step, "skipBeacon"> & {
849
+ /**
850
+ * When set, the Tour adds the `tour-highlighted` class to the step's target
851
+ * while the step is active (and removes it when the step changes or the tour
852
+ * closes). Useful for elements that need extra visual emphasis beyond the
853
+ * spotlight hole — e.g. revealing hidden actions on hover-only menus.
854
+ */
855
+ highlight?: boolean;
856
+ /**
857
+ * "compact" sizes the hole to the target's CONTENT (measured with a
858
+ * Range) instead of its padded box — for anchors like the bottom tabs,
859
+ * which stretch a third of the screen while their icon + label sit in a
860
+ * small centred cluster.
861
+ */
862
+ spotlight?: "compact";
863
+ /**
864
+ * Alternative takes on the same step, in order of preference: of the steps
865
+ * sharing a `oneOf` key, only the first whose target is visible survives.
866
+ * For a target that may or may not be there (a photo grid that only exists
867
+ * once there are photos) with a fallback anchor that always is.
868
+ */
869
+ oneOf?: string;
870
+ /**
871
+ * Set when `onBeforeStep` is what PUTS the target on screen (switching a
872
+ * tab, opening a panel). Such a step survives the "is the target visible"
873
+ * filter below, since the check runs before the callback — only set it
874
+ * when the callback guarantees the target.
875
+ */
876
+ bringsOwnTarget?: boolean;
877
+ /** How long a `bringsOwnTarget` step waits for its target, then is passed over. */
878
+ targetWaitMs?: number;
879
+ /**
880
+ * Clicking the target moves the tour on, as Next does: for a step that asks
881
+ * the person to click it (a menu, then the option it opens).
882
+ */
883
+ advanceOnTargetClick?: boolean;
884
+ /** Glides the target into view, if it isn't, before the step shows. */
885
+ scrollToTarget?: boolean;
886
+ /**
887
+ * Runs just before the step is shown: switching to the tab the target
888
+ * lives on, scrolling it into view — whatever the step needs the screen to
889
+ * be doing.
890
+ */
891
+ onBeforeStep?: () => void;
892
+ };
893
+ interface TourProps {
894
+ onClose?: () => void;
895
+ run: boolean;
896
+ setRun: (run: boolean) => void;
897
+ steps: TourStep[];
898
+ }
899
+ declare function Tour({ steps, run, setRun, onClose }: TourProps): import("react").JSX.Element | null;
900
+ interface ToggleOption {
901
+ /** Something after the label, such as an unread mark. */
902
+ icon?: React.ReactNode;
903
+ /** A kit icon before the label, as a view switch shows each view. */
904
+ iconLeft?: string;
905
+ label: string;
906
+ onClick: () => void;
907
+ }
908
+ interface ToggleProps extends HTMLAttributes<HTMLDivElement> {
909
+ /** A negative index selects nothing — no option is highlighted. */
910
+ defaultSelected?: number;
911
+ disabled?: boolean;
912
+ options: ToggleOption[];
913
+ size?: "l" | "s" | "xl";
914
+ }
915
+ declare function Toggle({ options, defaultSelected, disabled, size, ...rest }: ToggleProps): import("react").JSX.Element;
916
+ interface TooltipProps {
917
+ children: React.ReactNode;
918
+ className?: string;
919
+ /** Off: no bubble and no help cursor — a label only worth showing sometimes. */
920
+ disabled?: boolean;
921
+ /** Usually a line of text; a list when there is more than one thing to say. */
922
+ label: React.ReactNode;
923
+ }
924
+ interface TooltipBubbleProps {
925
+ /** What the bubble is about: it opens next to it, its arrow at its middle. */
926
+ anchor: RefObject<HTMLElement | null>;
927
+ className?: string;
928
+ id?: string;
929
+ label: React.ReactNode;
930
+ /** "alert" for a bubble that says something went wrong, read out at once. */
931
+ role?: "alert" | "tooltip";
932
+ }
933
+ /**
934
+ * The bubble alone, open while it is rendered: a Tooltip's, or one a field
935
+ * opens on its own (a typed date out of range). It renders on
936
+ * `document.body` at fixed viewport coordinates, so a scrolling rail or a
937
+ * card with `overflow: hidden` can't clip it. It opens below the anchor,
938
+ * left edges aligned; it moves above when there is no room below and
939
+ * slides left to stay on screen. Its arrow points at the anchor's middle,
940
+ * wherever the bubble slid to. Content that needs its own styles must
941
+ * carry them (a styled element as `label`), since the bubble doesn't sit
942
+ * inside the host's markup.
943
+ */
944
+ export declare function TooltipBubble({ anchor, className, id, label, role }: TooltipBubbleProps): import("react").ReactPortal;
945
+ /**
946
+ * A hover label: its bubble opens while the pointer or the focus is on what
947
+ * it wraps.
948
+ */
949
+ declare function Tag$1({ label, children, className, disabled, ...rest }: TooltipProps): import("react").JSX.Element;
950
+ export interface StatusProps {
951
+ /**
952
+ * One thing to do about what the toast says, as Undo: a click does it
953
+ * and closes the toast.
954
+ */
955
+ action?: ToastProps["action"];
956
+ autoClose?: boolean;
957
+ description: string;
958
+ type: ToastProps["type"];
959
+ }
960
+ export type SetStatus = (status: StatusProps) => void;
961
+ /** `setStatus` — raises a toast from anywhere under `StatusManager`. */
962
+ export declare const StatusContext: import("react").Context<SetStatus>;
963
+ export type HapticKind = "error" | "success" | "tap";
964
+ /**
965
+ * A short haptic for the few moments that deserve one: approving, saving,
966
+ * committing to a booking ("tap"), a payment that went through ("success"),
967
+ * a booking that could not be confirmed ("error").
968
+ *
969
+ * The web has no haptics API that reaches both phones, so there are two
970
+ * paths. Where the Vibration API exists (Android), `navigator.vibrate`. iOS
971
+ * has none, but since iOS 18 toggling a switch (`<input type="checkbox"
972
+ * switch>`) plays the system haptic, also through a click on its label — so a
973
+ * hidden one is toggled and dropped. That path is a WebKit quirk, not an API:
974
+ * it only plays inside the user's tap (one tick, whatever the kind), Apple
975
+ * reportedly closed it in iOS 26.5, and where it plays nothing it changes
976
+ * nothing.
977
+ *
978
+ * Call it synchronously from the tap's handler, before any `await`. A caller
979
+ * outside a tap (an effect, a timer) passes `{ inGesture: false }` and gets
980
+ * the vibration only. It never throws: a haptic must not break the action.
981
+ */
982
+ export declare const haptic: (kind?: HapticKind, { inGesture }?: {
983
+ inGesture?: boolean;
984
+ }) => void;
985
+ /**
986
+ * Which placeholder a failed photo shows: a hotel's blurred room, a person's
987
+ * silhouette, or a picture glyph for everything else (trip covers, places).
988
+ */
989
+ export type ImageKind = "avatar" | "lodging" | "photo";
990
+ /**
991
+ * The media proxy answers a photo it can't serve (expired, deleted, from
992
+ * another environment) with 200 and a 1×1 pixel, so `error` never fires: the
993
+ * size is what gives it away. Exactly 1×1 — an SVG without a size of its own
994
+ * loads as 0×0 and is a real image.
995
+ */
996
+ export declare const isPlaceholderPixel: (image: HTMLImageElement) => boolean;
997
+ /**
998
+ * Whether an <img> gave up on its photo and shows a placeholder — true from
999
+ * inside its own `onError`/`onLoad`, since the document listener runs first.
1000
+ */
1001
+ export declare const showsImageFallback: (image: HTMLImageElement) => boolean;
1002
+ /**
1003
+ * Every <img> that fails to load, or loads the media proxy's 1×1 pixel, shows
1004
+ * the placeholder instead of a broken icon, its alt text or a solid block.
1005
+ * `load` and `error` don't bubble, so one capture listener on the document
1006
+ * sees every image; a component's own `onError` still runs after it and wins.
1007
+ * Returns the uninstall.
1008
+ */
1009
+ export declare const installImageFallbacks: () => (() => void);
1010
+ /** Reload once when a tab from a previous release requests a removed lazy chunk. */
1011
+ export declare const recoverStaleAssets: () => void;
1012
+ /**
1013
+ * The photo once it loaded as a real image, for a CSS background — which has
1014
+ * no `error` to fall back on and paints the proxy's pixel as a solid block.
1015
+ * Nothing while it loads or when it failed, so the element keeps its own
1016
+ * background; `onBroken` hears of a photo that failed or came back as the
1017
+ * proxy's pixel.
1018
+ */
1019
+ export declare const useLoadedImage: (src?: string, onBroken?: () => void) => string | undefined;
1020
+ type SessionAttributes = Record<string, string | number | boolean | undefined>;
1021
+ /**
1022
+ * Starts CloudWatch RUM for one app. No-op locally and whenever the app
1023
+ * monitor id is missing, which is also the kill switch: the id stays unset in
1024
+ * Amplify until the API is deployed with `X-Amzn-Trace-Id` allowed by CORS.
1025
+ */
1026
+ export declare const initRum: (app: string, appMonitorId: string | undefined, releaseId: string) => void;
1027
+ export declare const recordError: (error: unknown) => void;
1028
+ /** Attributes are searchable in Transaction Search. Never email or name. */
1029
+ export declare const tagSession: (attributes: SessionAttributes) => void;
1030
+ /**
1031
+ * Browser glue for a booking-site theme. The theme itself (which variables,
1032
+ * which values) is computed by `siteThemeVars` in `@nicer/catalog`; this module
1033
+ * only writes it into the document, so `@nicer/ui` stays free of contracts.
1034
+ */
1035
+ type StyleTarget = {
1036
+ style: {
1037
+ setProperty: (name: string, value: string) => void;
1038
+ removeProperty: (name: string) => string;
1039
+ };
1040
+ };
1041
+ /**
1042
+ * Sets `vars` on `target` (the body by default) and clears every name in
1043
+ * `managed` that this theme no longer sets, so switching themes never leaves
1044
+ * a stale color behind. The body, not the root: dark mode redefines the same
1045
+ * tokens on `body.dark`, which hid every color set on <html> but the brand's.
1046
+ */
1047
+ export declare const applyCssVars: (vars: Record<string, string>, managed?: readonly string[], target?: StyleTarget) => void;
1048
+ /** One `<link id="site-font">`; `null` removes it. */
1049
+ export declare const setFontStylesheet: (href: string | null) => void;
1050
+ export declare const setFavicon: (href: string) => void;
1051
+ /** `<meta name=…>`; created when missing. */
1052
+ export declare const setMetaContent: (name: string, content: string) => void;
1053
+ /**
1054
+ * The JSON the page renderer inlines as `<script type="application/json"
1055
+ * id="nicer-site">`. `undefined` when the page was not served by the renderer.
1056
+ */
1057
+ export declare const readInlineJson: <T>(id: string) => T | undefined;
1058
+ export { Actions, AgencyMark, Autocomplete, Button, Calendar, type CardBrand, CardInput, Check, DateInput, DetailDrawer, Dialog, Dropdown, EmptyState, ErrorBoundary, FileInput, Grip, Icon, IconButton, type LiftedRow, MaintenanceGate, Modal, NavButton, NumberInput, Overlay, Paginator, PhoneInput, PriceInput, RadioButton, RangeSlider, Select, Separator, SideNav, SignInCard, Spinner, StatusManager, Switch, Tabs, Tag, TextArea, TextInput, ThemeProvider, ThemeSwitch, TimeInput, Toast, Toggle, Tag$1 as Tooltip, Tour, cards };