@tfehotels/tfe-gatsby-library 1.0.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.
Files changed (84) hide show
  1. package/README.md +41 -0
  2. package/lib/index.browser.cjs +2 -0
  3. package/lib/index.browser.cjs.map +1 -0
  4. package/lib/index.browser.d.ts +640 -0
  5. package/lib/index.browser.esm.js +2 -0
  6. package/lib/index.browser.esm.js.map +1 -0
  7. package/lib/index.node.cjs +2 -0
  8. package/lib/index.node.cjs.map +1 -0
  9. package/lib/index.node.d.ts +116 -0
  10. package/lib/index.node.esm.js +2 -0
  11. package/lib/index.node.esm.js.map +1 -0
  12. package/package.json +84 -0
  13. package/src/browser/api/button/index.tsx +16 -0
  14. package/src/browser/api/button/types.ts +7 -0
  15. package/src/browser/api/checkbox/index.tsx +74 -0
  16. package/src/browser/api/checkbox/types.tsx +21 -0
  17. package/src/browser/api/country-prefix/index.tsx +150 -0
  18. package/src/browser/api/country-prefix/types.tsx +17 -0
  19. package/src/browser/api/form/index.tsx +330 -0
  20. package/src/browser/api/form/types.ts +31 -0
  21. package/src/browser/api/google-places/index.tsx +90 -0
  22. package/src/browser/api/google-places/types.ts +24 -0
  23. package/src/browser/api/icon/index.tsx +26 -0
  24. package/src/browser/api/icon/types.tsx +24 -0
  25. package/src/browser/api/image/index.tsx +91 -0
  26. package/src/browser/api/image/types.ts +11 -0
  27. package/src/browser/api/input/index.tsx +44 -0
  28. package/src/browser/api/input/types.ts +10 -0
  29. package/src/browser/api/link/index.tsx +54 -0
  30. package/src/browser/api/link/types.ts +24 -0
  31. package/src/browser/api/linklist/index.tsx +17 -0
  32. package/src/browser/api/linklist/types.ts +6 -0
  33. package/src/browser/api/select/index.tsx +99 -0
  34. package/src/browser/api/select/types.ts +24 -0
  35. package/src/browser/api/svg/index.tsx +8 -0
  36. package/src/browser/api/svg/types.ts +8 -0
  37. package/src/browser/api/text/index.tsx +14 -0
  38. package/src/browser/api/text/types.ts +12 -0
  39. package/src/browser/api/textarea/index.tsx +12 -0
  40. package/src/browser/api/title/index.tsx +19 -0
  41. package/src/browser/api/title/types.ts +10 -0
  42. package/src/browser/api/types.ts +245 -0
  43. package/src/browser/carousel/buttons/index.tsx +81 -0
  44. package/src/browser/carousel/buttons/types.ts +15 -0
  45. package/src/browser/carousel/dots/index.tsx +53 -0
  46. package/src/browser/carousel/dots/types.ts +14 -0
  47. package/src/browser/carousel/index.tsx +131 -0
  48. package/src/browser/carousel/types.ts +21 -0
  49. package/src/browser/markdown/index.tsx +41 -0
  50. package/src/browser/markdown/types.ts +11 -0
  51. package/src/browser/modal/index.tsx +35 -0
  52. package/src/browser/modal/types.ts +9 -0
  53. package/src/browser/spinner/index.tsx +19 -0
  54. package/src/browser/spinner/types.ts +5 -0
  55. package/src/browser/toast/index.tsx +84 -0
  56. package/src/browser/use_viewport/index.tsx +34 -0
  57. package/src/browser/use_viewport/types.ts +5 -0
  58. package/src/browser/utils/animation.ts +12 -0
  59. package/src/browser/utils/booking_engine.ts +180 -0
  60. package/src/browser/utils/eclub.ts +30 -0
  61. package/src/browser/utils/forms.ts +76 -0
  62. package/src/browser/utils/hotel.ts +25 -0
  63. package/src/browser/utils/image.ts +63 -0
  64. package/src/browser/utils/location.ts +213 -0
  65. package/src/browser/utils/notifications.tsx +25 -0
  66. package/src/browser/utils/number.ts +6 -0
  67. package/src/browser/utils/requests.ts +2 -0
  68. package/src/browser/utils/search.ts +25 -0
  69. package/src/browser/utils/string.ts +9 -0
  70. package/src/browser/utils/types.ts +106 -0
  71. package/src/browser/utils/url.ts +116 -0
  72. package/src/browser/utils/viewport.ts +59 -0
  73. package/src/index.browser.ts +103 -0
  74. package/src/index.node.ts +16 -0
  75. package/src/node/api/index.ts +174 -0
  76. package/src/node/api/types.ts +19 -0
  77. package/src/node/build/index.ts +142 -0
  78. package/src/node/build/types.ts +5 -0
  79. package/src/node/config/index.ts +149 -0
  80. package/src/node/form/index.ts +23 -0
  81. package/src/node/form/types.ts +3 -0
  82. package/src/node/property/index.ts +78 -0
  83. package/src/node/property/types.ts +25 -0
  84. package/src/node/url/index.ts +8 -0
@@ -0,0 +1,640 @@
1
+ /// <reference types="react" />
2
+ /// <reference types="googlemaps" />
3
+ import { Stage } from 'transition-hook';
4
+ import { IGatsbyImageData } from 'gatsby-plugin-image';
5
+ import React$1, { ReactNode, MouseEventHandler, ChangeEventHandler, FC } from 'react';
6
+ import OptionTypeBase, { Props } from 'react-select';
7
+ import { EmblaCarouselType, EmblaOptionsType } from 'embla-carousel';
8
+ import { ToastPosition } from 'react-hot-toast';
9
+
10
+ declare const animateJSX: (transition: {
11
+ stage: Stage;
12
+ shouldMount: boolean;
13
+ }, animation?: string) => string;
14
+
15
+ interface DataAttributeType {
16
+ [key: string]: any;
17
+ }
18
+ interface IconType$1 {
19
+ icon: string;
20
+ group: string;
21
+ }
22
+ interface ElementType {
23
+ name?: string;
24
+ data: DataAttributeType;
25
+ icon?: IconType$1;
26
+ }
27
+ interface TitleType extends ElementType {
28
+ type: "title";
29
+ title: string;
30
+ }
31
+ interface UserType {
32
+ loyaltyprofileId: string;
33
+ profile_id: string;
34
+ title: string;
35
+ first_name: string;
36
+ last_name: string;
37
+ email: string;
38
+ zip: string;
39
+ country_code: string;
40
+ MobilePhoneCountryCode: string;
41
+ mobile: string;
42
+ date_of_birth: string;
43
+ language: string;
44
+ }
45
+ interface ImageType {
46
+ type: "image";
47
+ url: string;
48
+ optimized: boolean;
49
+ name: string;
50
+ alt: string | null;
51
+ caption: string | null;
52
+ width: number;
53
+ height: number;
54
+ extension: string;
55
+ }
56
+ interface FileType {
57
+ url: string;
58
+ size: number;
59
+ label: string;
60
+ extension: string;
61
+ }
62
+ interface MediaType extends ElementType {
63
+ type: "file" | "instagram" | "image" | "video";
64
+ title: string;
65
+ loading: "eager" | "lazy";
66
+ image?: ImageType;
67
+ mobile_image?: ImageType;
68
+ file?: FileType;
69
+ mobile_file?: FileType;
70
+ alt?: string;
71
+ external_link?: string;
72
+ page_slug?: string;
73
+ page?: string;
74
+ }
75
+ interface ImageMediaType extends MediaType {
76
+ type: "image";
77
+ imageData?: IGatsbyImageData;
78
+ }
79
+ interface FileMediaType extends MediaType {
80
+ type: "file";
81
+ file: FileType;
82
+ }
83
+ interface VideoMediaType extends MediaType {
84
+ type: "video";
85
+ }
86
+ interface TextType extends ElementType {
87
+ type: "text";
88
+ text: string;
89
+ }
90
+ interface LinkType extends ElementType {
91
+ type: "link";
92
+ tag: "a";
93
+ target?: "_blank" | "_parent" | "_top";
94
+ text?: string;
95
+ group?: string;
96
+ page?: string;
97
+ page_slug?: string;
98
+ external_link?: string;
99
+ }
100
+ interface LinkListType extends ElementType {
101
+ pk: number;
102
+ type: "linklist";
103
+ links: LinkType[];
104
+ }
105
+ interface InputType extends ElementType {
106
+ type: "input";
107
+ input_name: string;
108
+ input_type: "text" | "textarea" | "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "recaptcha2" | "search" | "submit" | "tel" | "time" | "url" | "week" | "google-places";
109
+ label?: string;
110
+ min?: string;
111
+ placeholder?: string;
112
+ required?: boolean;
113
+ disabled?: boolean;
114
+ value?: string;
115
+ iconOnClick?: Function;
116
+ description?: string;
117
+ }
118
+ interface SelectType extends Omit<InputType, "type" | "input_type"> {
119
+ type: "select";
120
+ input_type: "select";
121
+ input_name: string;
122
+ options: {
123
+ [value: string]: string;
124
+ };
125
+ }
126
+ interface CheckboxType extends Omit<InputType, "type" | "input_type"> {
127
+ type: "checkbox";
128
+ input_type: "checkbox";
129
+ }
130
+ interface RecaptchaType extends Omit<InputType, "type" | "input_type"> {
131
+ type: "recaptcha2";
132
+ input_type: "recaptcha2";
133
+ }
134
+ interface GoogleSitesType extends Omit<InputType, "type" | "input_type"> {
135
+ type: "google-places";
136
+ input_type: "google-places";
137
+ }
138
+ interface ButtonType extends Omit<InputType, "type"> {
139
+ type: "button";
140
+ input_type: "button";
141
+ }
142
+ interface SectionType extends ElementType {
143
+ type: "section";
144
+ tag?: "section" | "form" | "header" | "footer" | "div" | "nav";
145
+ pk: number;
146
+ children?: (TitleType | TextType | LinkType | LinkListType | InputType | ButtonType | SectionType | SelectType | MediaType)[];
147
+ }
148
+ interface ElementDataType extends ElementType {
149
+ type: "data";
150
+ children: any[];
151
+ }
152
+ type AnyElementType = LinkType | LinkListType | InputType | ButtonType | SectionType | MediaType;
153
+ interface PageParamsType {
154
+ data: any;
155
+ hotel: null | string;
156
+ tags: {
157
+ [k: string]: string;
158
+ };
159
+ }
160
+ interface LocationType {
161
+ hash: string;
162
+ host: string;
163
+ hostname: string;
164
+ href: string;
165
+ key: string;
166
+ origin: string;
167
+ pathname: string;
168
+ port: string;
169
+ protocol: string;
170
+ search: string;
171
+ }
172
+ interface DefaultPropsType extends Omit<SectionType, "children"> {
173
+ className: string;
174
+ children: AnyElementType[];
175
+ pageParams: PageParamsType;
176
+ location: LocationType;
177
+ user: null | UserType;
178
+ }
179
+
180
+ interface SearchParamsType {
181
+ check_in: Date;
182
+ check_out: Date;
183
+ adult_count: number;
184
+ child_count: number;
185
+ promo_codes: string[];
186
+ rate_codes: string[];
187
+ hotel_codes: string[];
188
+ selected_hotel: string | null;
189
+ }
190
+ interface HotelPagesType {
191
+ [hotel_code: string]: {
192
+ name: string;
193
+ city: string;
194
+ sort: number;
195
+ link: string;
196
+ };
197
+ }
198
+ interface CachedSearchParamsType {
199
+ check_in: Date;
200
+ check_out: Date;
201
+ adult_count: number;
202
+ child_count: number;
203
+ rate_codes: string[];
204
+ promo_codes: string[];
205
+ }
206
+ interface HotelOptionsByCityType {
207
+ label: string;
208
+ options: {
209
+ value: string;
210
+ label: string;
211
+ }[];
212
+ }
213
+ interface FormFieldsType {
214
+ [field: string]: InputType | TitleType | TextType | LinkType | ImageType | SelectType | RecaptchaType | CheckboxType | GoogleSitesType;
215
+ }
216
+ interface FormSettingsType {
217
+ pk: number;
218
+ name: string;
219
+ form_method: "get" | "post";
220
+ form_recipient?: number;
221
+ form_submit: string;
222
+ form_redirection?: string | null;
223
+ form_success_msg?: string | null;
224
+ form_ajax_request?: boolean | null;
225
+ recaptcha_v3: boolean;
226
+ recaptcha_action: string;
227
+ }
228
+ type FormItemType = string | FormSectionFieldType;
229
+ interface FormSectionFieldType {
230
+ name: string;
231
+ children: FormItemType[];
232
+ }
233
+ interface FormType {
234
+ settings: FormSettingsType;
235
+ fields: FormFieldsType;
236
+ items: FormItemType[];
237
+ }
238
+ interface BookingURLType {
239
+ date_format: string;
240
+ locale: string;
241
+ mobile_url: string;
242
+ mobile_url_no_availability: string;
243
+ url: string;
244
+ url_no_availability: string;
245
+ variables: string;
246
+ }
247
+ interface BookingURLsType {
248
+ name: string;
249
+ booking_urls: BookingURLType;
250
+ }
251
+
252
+ declare const BookingUrl: (hotel_code: string, urls: BookingURLsType["booking_urls"], searchParams: SearchParamsType, hasAvailability: boolean, rate_code?: string | null, room_code?: string | null) => void;
253
+ /**
254
+ *
255
+ * Returns Select options sorting by the cities with more hotels, otherwise alphabetically.
256
+ *
257
+ * For instance:
258
+ *
259
+ * [
260
+ * {
261
+ * label: 'Sydney',
262
+ * options: [
263
+ * { label: 'Vibe Hotel Sydney', value: "58443" },
264
+ * { label: 'Vibe Hotel Sydney Darling Harbour', value: "8565" }
265
+ * ]
266
+ * },
267
+ * {
268
+ * label: 'Mebourne',
269
+ * options: [
270
+ * { label: 'Vibe Hotel Melbourne', value: "9969" },
271
+ * ]
272
+ * },
273
+ * ]
274
+ */
275
+ declare const hotelOptionsByCity: (hotelPages: HotelPagesType) => HotelOptionsByCityType[];
276
+ declare const SearchAvailability: (check_in: Date, check_out: Date, adult_count: number, child_count: number, promo_codes: string[], rate_codes: string[], hotel_codes: string[]) => Promise<any>;
277
+ declare const pricePerNight: (total: string, nights: number) => string;
278
+
279
+ declare const saveUserSession: (data: any) => void;
280
+ declare const loadUserSession: () => UserType | null;
281
+ declare const deleteUserSession: () => void;
282
+
283
+ interface RequestParamsType {
284
+ [param: string]: string | number | null;
285
+ }
286
+ interface HeadersType {
287
+ [param: string]: string;
288
+ }
289
+ interface APIResponseType {
290
+ success?: boolean;
291
+ errors?: {
292
+ [input: string]: string[];
293
+ };
294
+ error?: string;
295
+ msg?: string;
296
+ status: number;
297
+ [k: string]: any;
298
+ }
299
+ declare const json_request: (url: string, params: RequestParamsType, method?: "get" | "post", headers?: HeadersType) => Promise<APIResponseType>;
300
+ declare const getInputEventValue: (inputType: string, event: any) => any;
301
+ declare const getInputHumanValue: (inputType: string, value: any) => any;
302
+
303
+ declare const joinAddress: (addressParams: (string | null)[]) => string;
304
+ interface PageTagsType {
305
+ [k: string]: string;
306
+ }
307
+ declare const tagExists: (pageTags: PageTagsType, ...tags: string[]) => boolean;
308
+
309
+ declare const preloadImages: (images: string[]) => Promise<void>;
310
+ declare const optimizedThumb: (img: ImageType) => string;
311
+ declare const getThumb: (img: {
312
+ image?: ImageType;
313
+ mobile_image?: ImageType;
314
+ }) => string;
315
+ declare const toImageElement: (obj: any, keyMap?: any) => ImageMediaType;
316
+ declare const minimumSlides: (slidesToShow: number, slides: any[]) => any[];
317
+ declare const tripadvisorRatingURL: (score: string) => string;
318
+
319
+ declare const countryPrefixes: string[][];
320
+
321
+ declare const toastMsg: (msg: string | ReactNode, variant?: "error" | "info" | "success", duration?: number) => void;
322
+
323
+ declare function human_number(n: number, decimals?: number): string;
324
+
325
+ declare const ssoURL: (path: string) => string;
326
+
327
+ declare const cachedSearchParams: () => CachedSearchParamsType | null;
328
+ declare const cacheSearchParams: (searchParams: CachedSearchParamsType) => void;
329
+
330
+ declare function randomString(length?: number): string;
331
+
332
+ interface QueryParamsType {
333
+ [key: string]: string;
334
+ }
335
+ declare const siteUrl: (path?: string) => string;
336
+ /**
337
+ * Extracts query params from an URL
338
+ *
339
+ * @param queryString String with query params
340
+ * @param rename Object for renaming params, e.g: {"oldParam": "newParam"}
341
+ * @returns Object with the parsed params
342
+ */
343
+ declare function parseQueryParams(queryString: string, rename?: {
344
+ [k: string]: string;
345
+ }): QueryParamsType;
346
+ declare const join_paths: (path1: string, path2: string) => string;
347
+ declare const api_link: (apiPath?: string, queryParams?: QueryParamsType | null) => string;
348
+ declare const hotel_page_link: (city: string, hotelName: string) => string;
349
+ /**
350
+ *
351
+ * Transforms Search params into a query string
352
+ */
353
+ declare const sp_to_qs: (check_in: Date, check_out: Date, adult_count: number, child_count: number, rate_codes: string[], promo_codes: string[]) => string;
354
+ declare const opentableLink: (id: number) => string;
355
+
356
+ declare const IsMobile: () => boolean;
357
+ declare const scrollToElement: (elementId: string) => Promise<void>;
358
+ declare const scrollToChild: (parent: HTMLElement, child: HTMLElement) => void;
359
+ declare const isIOS: () => boolean;
360
+ declare const deviceId: (width: number) => "d" | "t" | "m";
361
+ declare const classNames: (classes: {
362
+ [k: string]: boolean;
363
+ }, displayOn?: Array<string> | null) => any;
364
+
365
+ interface CheckboxPropsType {
366
+ onClick?: MouseEventHandler<HTMLLabelElement>;
367
+ onChange?: ChangeEventHandler<HTMLLabelElement>;
368
+ className?: string;
369
+ value: boolean;
370
+ width?: number;
371
+ height?: number;
372
+ id?: string;
373
+ name?: string;
374
+ input_name?: string;
375
+ color?: string;
376
+ accept?: string;
377
+ label?: string;
378
+ description?: string;
379
+ }
380
+
381
+ declare function Checkbox({ className, label, description, ...props }: CheckboxPropsType): React$1.JSX.Element;
382
+
383
+ interface PhonePropsType {
384
+ onClick?: MouseEventHandler<HTMLLabelElement>;
385
+ onChange?: ChangeEventHandler<HTMLLabelElement>;
386
+ className?: string;
387
+ value: string;
388
+ width?: number;
389
+ height?: number;
390
+ id?: string;
391
+ name?: string;
392
+ input_name?: string;
393
+ color?: string;
394
+ accept?: string;
395
+ label?: string;
396
+ description?: string;
397
+ }
398
+
399
+ declare function CountryPrefix({ className, label, description, input_name, onClick, onChange, value, ...props }: PhonePropsType): React$1.JSX.Element;
400
+
401
+ interface ErrorsType {
402
+ [field: string]: string | ReactNode;
403
+ }
404
+ interface FormPropsType {
405
+ className?: string;
406
+ form: FormType;
407
+ setForm: Function;
408
+ errors: ErrorsType;
409
+ loading?: boolean;
410
+ setErrors: Function;
411
+ beforeSubmit?: Function;
412
+ formatParams?: Function;
413
+ validate?: Function;
414
+ validateResponse?: Function;
415
+ onSuccess?: Function;
416
+ onFocus?: Function;
417
+ onBlur?: Function;
418
+ onClick?: Function;
419
+ onChange?: Function;
420
+ onError?: Function;
421
+ afterSubmit?: Function;
422
+ }
423
+
424
+ declare function Form({ className, form, setForm, errors, setErrors, beforeSubmit, formatParams, validate, validateResponse, onSuccess, onFocus, onBlur, onClick, onChange, onError, afterSubmit, loading, }: FormPropsType): React$1.JSX.Element;
425
+
426
+ interface GooglePlacesPropsType extends Omit<InputType, "type" | "data"> {
427
+ label?: string;
428
+ name?: string;
429
+ onChange: React.ChangeEventHandler<HTMLInputElement>;
430
+ onClick: React.MouseEventHandler<HTMLInputElement>;
431
+ onFocus: React.FocusEventHandler<HTMLInputElement>;
432
+ onBlur: React.FocusEventHandler<HTMLInputElement>;
433
+ value: any;
434
+ defaultCountryCode?: string;
435
+ data: {
436
+ options?: google.maps.places.AutocompleteOptions;
437
+ language?: string;
438
+ };
439
+ }
440
+
441
+ declare const GooglePlaces: ({ label, name, input_name, value, defaultCountryCode, onChange, onClick, onFocus, onBlur, data, ...props }: GooglePlacesPropsType) => React$1.JSX.Element;
442
+
443
+ interface IconType {
444
+ icon: any;
445
+ group: string;
446
+ }
447
+ interface IconPropsType {
448
+ icon: IconType;
449
+ className?: string;
450
+ width?: number;
451
+ height?: number;
452
+ color?: string;
453
+ bg?: string;
454
+ title?: string;
455
+ style?: {
456
+ [key: string]: any;
457
+ };
458
+ direction?: string;
459
+ onClick?: any;
460
+ }
461
+
462
+ declare const Icon: ({ icon, className, onClick, color }: IconPropsType) => React$1.JSX.Element;
463
+
464
+ interface ImagePropsType extends MediaType {
465
+ type: "image";
466
+ className?: string;
467
+ style?: React$1.CSSProperties;
468
+ onLoad?: any;
469
+ imageData?: IGatsbyImageData;
470
+ }
471
+
472
+ declare const Image: ({ imageData, ...props }: ImagePropsType) => React$1.JSX.Element;
473
+
474
+ interface InputPropsType extends Omit<InputType, "type" | "data"> {
475
+ type?: "input";
476
+ data?: DataAttributeType;
477
+ className?: string;
478
+ read_only?: boolean;
479
+ onChange?: ChangeEventHandler<HTMLInputElement>;
480
+ }
481
+
482
+ declare const Input: ({ label, type, input_type, description, name, input_name, icon, iconOnClick, read_only, ...props }: InputPropsType) => React$1.JSX.Element;
483
+
484
+ interface LinkPropsType extends Omit<LinkType, "type" | "tag" | "data"> {
485
+ type?: "link";
486
+ tag?: "a";
487
+ className?: string;
488
+ title?: string;
489
+ anchor?: string;
490
+ data?: DataAttributeType;
491
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
492
+ children?: React.ReactNode;
493
+ animate?: boolean;
494
+ }
495
+
496
+ declare const Link: (props: LinkPropsType) => React$1.JSX.Element;
497
+
498
+ interface LinkListPropsType extends LinkListType {
499
+ className?: string;
500
+ children?: React.ReactNode;
501
+ }
502
+
503
+ declare const LinkList: ({ pk, ...props }: LinkListPropsType) => React$1.JSX.Element;
504
+
505
+ interface OptionType {
506
+ label: string;
507
+ value: string;
508
+ }
509
+ interface GroupedOptionsType {
510
+ label: string;
511
+ options: OptionType[];
512
+ }
513
+ type OptionsType = {
514
+ [key: string]: string | {
515
+ [key: string]: string;
516
+ };
517
+ } | OptionType[] | GroupedOptionsType[];
518
+ interface SelectPropsType extends Omit<Props<OptionTypeBase>, "value" | "options"> {
519
+ className?: string;
520
+ name?: string;
521
+ value?: OptionType | string | null;
522
+ options: OptionsType;
523
+ styles?: any;
524
+ label?: string;
525
+ }
526
+
527
+ declare const Select: React$1.FC<SelectPropsType>;
528
+
529
+ interface FilePropsType extends FileMediaType {
530
+ className?: string;
531
+ style?: React$1.CSSProperties;
532
+ onLoad?: any;
533
+ }
534
+
535
+ declare const SVG: (props: FilePropsType) => React$1.JSX.Element;
536
+
537
+ interface TagAttributesType {
538
+ [tag: string]: {
539
+ [attr: string]: string;
540
+ };
541
+ }
542
+ interface MarkdownPropsType {
543
+ className?: string;
544
+ children: string;
545
+ tagAttrs?: TagAttributesType;
546
+ onClick?: MouseEventHandler<HTMLDivElement>;
547
+ }
548
+
549
+ interface TextPropsType {
550
+ className?: string;
551
+ text: string;
552
+ type?: "text";
553
+ data?: DataAttributeType;
554
+ onClick?: MouseEventHandler<HTMLAnchorElement>;
555
+ tagAttrs?: TagAttributesType;
556
+ }
557
+
558
+ declare const Text: (props: TextPropsType) => React$1.JSX.Element;
559
+
560
+ declare const TextArea: ({ label, ...props }: any) => React$1.JSX.Element;
561
+
562
+ interface TitlePropsType {
563
+ className?: string;
564
+ title: string;
565
+ type?: "title";
566
+ data?: DataAttributeType;
567
+ onClick?: MouseEventHandler<HTMLDivElement>;
568
+ }
569
+
570
+ declare const Title: (props: TitlePropsType) => React$1.JSX.Element;
571
+
572
+ interface ButtonPropsType extends ButtonType {
573
+ className?: string;
574
+ onClick?: MouseEventHandler<HTMLButtonElement>;
575
+ }
576
+
577
+ declare const Button: React$1.FC<ButtonPropsType>;
578
+
579
+ interface viewPortType {
580
+ slides: number;
581
+ media?: "max-width" | "min-width";
582
+ gap?: number;
583
+ }
584
+ interface CarouselPropsType {
585
+ id: string;
586
+ emblaRef: any;
587
+ emblaApi?: EmblaCarouselType;
588
+ slidesPerView: number;
589
+ slidesPerViewport?: {
590
+ [screenSize: number]: number | viewPortType;
591
+ };
592
+ slides: React.ReactNode[];
593
+ options?: EmblaOptionsType;
594
+ showButtons?: boolean;
595
+ showDots?: boolean;
596
+ gap?: number;
597
+ showProgress?: boolean;
598
+ }
599
+
600
+ declare const Carousel: React$1.FC<CarouselPropsType>;
601
+
602
+ declare function Markdown({ children, className, tagAttrs, onClick, }: MarkdownPropsType): React$1.JSX.Element;
603
+
604
+ interface ModalPropsType {
605
+ modalId: string;
606
+ className?: string;
607
+ show: boolean;
608
+ setShowModal: Function;
609
+ children: ReactNode;
610
+ }
611
+
612
+ declare const Modal: ({ modalId, show, className, setShowModal, children, }: ModalPropsType) => React$1.JSX.Element;
613
+
614
+ interface SpinnerPropsType {
615
+ className?: string;
616
+ color?: string;
617
+ size?: number | string;
618
+ }
619
+
620
+ declare function Spinner({ color, size, className }: SpinnerPropsType): React$1.JSX.Element;
621
+
622
+ interface ViewportType {
623
+ isMobile: boolean;
624
+ isTablet: boolean;
625
+ isDesktop: boolean;
626
+ }
627
+
628
+ declare function UseViewport(): ViewportType;
629
+
630
+ interface ToastProps {
631
+ id: string;
632
+ visible: boolean;
633
+ message: string | ReactNode;
634
+ height?: number;
635
+ position?: ToastPosition;
636
+ variant: "error" | "info" | "success";
637
+ }
638
+ declare const Toast: FC<ToastProps>;
639
+
640
+ export { type AnyElementType, type BookingURLType, BookingUrl, Button, type ButtonType, type CachedSearchParamsType, Carousel, Checkbox, CountryPrefix, type DefaultPropsType, type ElementDataType, type ErrorsType, type FileMediaType, type FileType, Form, type FormType, GooglePlaces, type HotelOptionsByCityType, Icon, Image, type ImageMediaType, type ImageType, Input, type InputType, IsMobile, Link, LinkList, type LinkListType, type LinkType, type LocationType, Markdown, type MediaType, Modal, type PageParamsType, SVG, SearchAvailability, type SectionType, Select, type SelectType, Spinner, Text, type TextType, TextArea as Textarea, Title, type TitleType, Toast, type UserType, type VideoMediaType, animateJSX, api_link, cacheSearchParams, cachedSearchParams, classNames, countryPrefixes, deleteUserSession, deviceId, getInputEventValue, getInputHumanValue, getThumb, hotelOptionsByCity, hotel_page_link, human_number, isIOS, joinAddress, join_paths, json_request, loadUserSession, minimumSlides, opentableLink, optimizedThumb, parseQueryParams, preloadImages, pricePerNight, randomString, saveUserSession, scrollToChild, scrollToElement, siteUrl, sp_to_qs, ssoURL, tagExists, toImageElement, toastMsg, tripadvisorRatingURL, UseViewport as useViewport };