@hotelcard/ui 0.0.12 → 0.0.15
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.
Potentially problematic release.
This version of @hotelcard/ui might be problematic. Click here for more details.
- package/README.md +164 -54
- package/dist/index.cjs +1150 -370
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +381 -146
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +741 -79
- package/dist/index.d.ts +741 -79
- package/dist/index.js +1149 -372
- package/dist/index.js.map +1 -1
- package/package.json +15 -4
package/dist/index.js
CHANGED
|
@@ -1,19 +1,556 @@
|
|
|
1
1
|
// src/context/UIContext.tsx
|
|
2
|
-
import { createContext, useContext } from "react";
|
|
2
|
+
import { createContext, useContext, useMemo } from "react";
|
|
3
|
+
|
|
4
|
+
// src/locales/de.json
|
|
5
|
+
var de_default = {
|
|
6
|
+
button: {
|
|
7
|
+
order: "Bestellen",
|
|
8
|
+
"order-navigation": "Bestellen",
|
|
9
|
+
"order-hc": "HotelCard bestellen",
|
|
10
|
+
"my-account": "Mein Konto",
|
|
11
|
+
search: "Suchen",
|
|
12
|
+
"back-to-top": "Nach oben"
|
|
13
|
+
},
|
|
14
|
+
link: {
|
|
15
|
+
"member-benefits": "Member Benefits",
|
|
16
|
+
"view-all-hotels": "Alle Hoteldeals ansehen",
|
|
17
|
+
"search-by-map": "Kartenansicht",
|
|
18
|
+
"search-by-region": "Hotels nach Region",
|
|
19
|
+
"search-by-experience": "Hotels nach Erlebnis",
|
|
20
|
+
"travel-inspiration": "Reiseinspiration",
|
|
21
|
+
"booking-tips-and-tricks": "Buchungstipps",
|
|
22
|
+
home: "Startseite",
|
|
23
|
+
"all-hotel-deals": "Alle Hotelangebote",
|
|
24
|
+
"search-results": "Suchergebnisse"
|
|
25
|
+
},
|
|
26
|
+
general: {
|
|
27
|
+
"signed-out": "Anmelden und buchen",
|
|
28
|
+
"room-price": "ab CHF xxx / Zimmer",
|
|
29
|
+
guarantee: "14 Tage Geld-zur\xFCck-Garantie",
|
|
30
|
+
contact: "Weitere Fragen? Kontaktieren Sie uns.",
|
|
31
|
+
"breakfast-included": "Fr\xFChst\xFCck inbegriffen",
|
|
32
|
+
"free-cancellation": "Kostenlose Stornierung",
|
|
33
|
+
"suggested-destinations": "Vorgeschlagene Reiseziele",
|
|
34
|
+
"when-months": "Wann m\xF6chtest du reisen?",
|
|
35
|
+
"hotel-deals-found": "Hotelangebote gefunden",
|
|
36
|
+
"no-results": "Probieren Sie andere Reiseziele, \xE4ndern Sie Ihre Daten oder entfernen Sie einige Filter.",
|
|
37
|
+
"unavailable-for-selected-days": "F\xFCr die ausgew\xE4hlten Daten nicht verf\xFCgbar.",
|
|
38
|
+
"cant-accommodate-all": "Das Hotel kann nicht alle G\xE4ste beherbergen.",
|
|
39
|
+
"reset-destination": "Zielsuche zur\xFCcksetzen, um Regionen zu filtern"
|
|
40
|
+
},
|
|
41
|
+
label: {
|
|
42
|
+
"price-from": "ab ",
|
|
43
|
+
"price-for": "/ Zimmer",
|
|
44
|
+
"per-room-night": "pro Zimmer & Nacht ab",
|
|
45
|
+
new: "Neu",
|
|
46
|
+
anytime: "Jederzeit",
|
|
47
|
+
anywhere: "Alle Reiseziele",
|
|
48
|
+
dates: "Datum",
|
|
49
|
+
flexible: "Flexibel",
|
|
50
|
+
where: "Wohin",
|
|
51
|
+
when: "Wann",
|
|
52
|
+
who: "Wer",
|
|
53
|
+
nearby: "In der N\xE4he",
|
|
54
|
+
hotels: "Hotel",
|
|
55
|
+
filter: "Filter",
|
|
56
|
+
sort: "Sortieren",
|
|
57
|
+
map: "Karte",
|
|
58
|
+
rating: "Bewertung",
|
|
59
|
+
"rating-excellent": "Ausgezeichnet",
|
|
60
|
+
"rating-very-good": "Sehr gut",
|
|
61
|
+
"rating-good": "Gut",
|
|
62
|
+
"rating-fair": "Ansprechend",
|
|
63
|
+
"rating-none": "Keine Bewertung"
|
|
64
|
+
},
|
|
65
|
+
product: {
|
|
66
|
+
"6m": "6-Monatsabo",
|
|
67
|
+
"1y": "1-Jahresabo",
|
|
68
|
+
"2y": "2-Jahresabo",
|
|
69
|
+
"3y": "3-Jahresabo",
|
|
70
|
+
"price-6m": "79.-",
|
|
71
|
+
"price-6m-disc": "59.-",
|
|
72
|
+
"price-1y": "99.-",
|
|
73
|
+
"price-1y-disc": "79.-",
|
|
74
|
+
"price-2y": "198.-",
|
|
75
|
+
"price-2y-disc": "173.-",
|
|
76
|
+
"price-3y": "297.-",
|
|
77
|
+
"price-3y-disc": "247.-",
|
|
78
|
+
"price-gift": "99.-",
|
|
79
|
+
"price-gift-disc": "59.-"
|
|
80
|
+
},
|
|
81
|
+
subheadline: {
|
|
82
|
+
"your-hc": "Ihre HotelCard",
|
|
83
|
+
"popular-hotels": "Beliebte Hotelangebote",
|
|
84
|
+
"no-results": "Probieren Sie andere Reiseziele, \xE4ndern Sie Ihre Daten oder entfernen Sie einige Filter.",
|
|
85
|
+
"sort-by": "Sortieren nach"
|
|
86
|
+
},
|
|
87
|
+
form: {
|
|
88
|
+
guests: "G\xE4ste",
|
|
89
|
+
guest: "Gast",
|
|
90
|
+
adults: "Erwachsene",
|
|
91
|
+
children: "Kinder",
|
|
92
|
+
pet: "Haustier",
|
|
93
|
+
"age-of-child": "Alter des Kindes",
|
|
94
|
+
age: "Alter",
|
|
95
|
+
"age-error": "Bitte w\xE4hlen Sie das Alter aus"
|
|
96
|
+
},
|
|
97
|
+
filter: {
|
|
98
|
+
filters: "Filter",
|
|
99
|
+
destination: "Reiseziel",
|
|
100
|
+
experience: "Erlebnis",
|
|
101
|
+
"show-all": "Alle anzeigen",
|
|
102
|
+
price: "Preis",
|
|
103
|
+
discount: "Rabatt",
|
|
104
|
+
services: "Leistungen",
|
|
105
|
+
meals: "Verpflegung",
|
|
106
|
+
"hotel-category": "Hotelkategorie",
|
|
107
|
+
reviews: "Bewertungen",
|
|
108
|
+
mobility: "Mobilit\xE4t",
|
|
109
|
+
"wellness-spa": "Wellness & Spa",
|
|
110
|
+
"price-high-low": "Preis: absteigend",
|
|
111
|
+
"price-low-high": "Preis: aufsteigend",
|
|
112
|
+
"best-rating": "Beste Bewertung",
|
|
113
|
+
"most-popular": "Beliebt",
|
|
114
|
+
"newest-hotels": "Neueste",
|
|
115
|
+
relevance: "Relevanz",
|
|
116
|
+
selected: "String value",
|
|
117
|
+
"clear-all": "Alles l\xF6schen",
|
|
118
|
+
options: "Leistungen",
|
|
119
|
+
"hotellerie-suisse": "Klassifikation HotellerieSuisse",
|
|
120
|
+
trustyou: "Bewertungen von Reisenden auf Trust You\xAE",
|
|
121
|
+
"select-all": "Alle ausw\xE4hlen",
|
|
122
|
+
reset: "Zur\xFCcksetzen",
|
|
123
|
+
"breakfast-included": "Fr\xFChst\xFCck inbegriffen"
|
|
124
|
+
},
|
|
125
|
+
headline: {
|
|
126
|
+
"no-results": "Zurzeit entsprechen keine Aufenthalte Ihrer Suche"
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/locales/en.json
|
|
131
|
+
var en_default = {
|
|
132
|
+
button: {
|
|
133
|
+
order: "Order",
|
|
134
|
+
"order-navigation": "Join",
|
|
135
|
+
"order-hc": "Order HotelCard",
|
|
136
|
+
"my-account": "My account",
|
|
137
|
+
search: "Search",
|
|
138
|
+
"back-to-top": "Back to top"
|
|
139
|
+
},
|
|
140
|
+
link: {
|
|
141
|
+
"member-benefits": "Member Benefits",
|
|
142
|
+
"view-all-hotels": "View all hotel deals",
|
|
143
|
+
"search-by-map": "Map search",
|
|
144
|
+
"search-by-region": "Hotels by region",
|
|
145
|
+
"search-by-experience": "Hotels by experience",
|
|
146
|
+
"travel-inspiration": "Travel inspiration",
|
|
147
|
+
"booking-tips-and-tricks": "Booking tips",
|
|
148
|
+
home: "Home",
|
|
149
|
+
"all-hotel-deals": "All hotel deals",
|
|
150
|
+
"search-results": "Search results"
|
|
151
|
+
},
|
|
152
|
+
general: {
|
|
153
|
+
"signed-out": "Log in and book",
|
|
154
|
+
"room-price": "from CHF xxx / room",
|
|
155
|
+
guarantee: "14-day money-back guarantee",
|
|
156
|
+
contact: "More questions? Contact us.",
|
|
157
|
+
"breakfast-included": "Breakfast included",
|
|
158
|
+
"free-cancellation": "Free cancellation",
|
|
159
|
+
"suggested-destinations": "Not sure where to travel next?",
|
|
160
|
+
"when-months": "When do you want to go?",
|
|
161
|
+
"hotel-deals-found": "hotel deals found",
|
|
162
|
+
"no-results": "Explore different destinations, change your dates, or remove some filters.",
|
|
163
|
+
"unavailable-for-selected-days": "Unavailable for selected dates.",
|
|
164
|
+
"cant-accommodate-all": "Hotel can\u2019t accommodate all guests.",
|
|
165
|
+
"reset-destination": "Reset destination search to use region filters."
|
|
166
|
+
},
|
|
167
|
+
label: {
|
|
168
|
+
"price-from": "from ",
|
|
169
|
+
"price-for": "/ room",
|
|
170
|
+
"per-room-night": "per room & night from",
|
|
171
|
+
new: "New",
|
|
172
|
+
anytime: "Anytime",
|
|
173
|
+
anywhere: "All destinations",
|
|
174
|
+
dates: "Dates",
|
|
175
|
+
flexible: "Flexible",
|
|
176
|
+
where: "Where",
|
|
177
|
+
when: "When",
|
|
178
|
+
who: "Who",
|
|
179
|
+
nearby: "Nearby",
|
|
180
|
+
hotels: "Hotel",
|
|
181
|
+
filter: "Filter",
|
|
182
|
+
sort: "Sort",
|
|
183
|
+
map: "Map",
|
|
184
|
+
rating: "Rating",
|
|
185
|
+
"rating-excellent": "Excellent",
|
|
186
|
+
"rating-very-good": "Very good",
|
|
187
|
+
"rating-good": "Good",
|
|
188
|
+
"rating-fair": "Fair",
|
|
189
|
+
"rating-none": "No rating"
|
|
190
|
+
},
|
|
191
|
+
product: {
|
|
192
|
+
"6m": "6-month subscription",
|
|
193
|
+
"1y": "1-year subscription",
|
|
194
|
+
"2y": "2-year subscription",
|
|
195
|
+
"3y": "3-year subscription",
|
|
196
|
+
"price-6m": "79.-",
|
|
197
|
+
"price-6m-disc": "59.-",
|
|
198
|
+
"price-1y": "99.-",
|
|
199
|
+
"price-1y-disc": "79.-",
|
|
200
|
+
"price-2y": "198.-",
|
|
201
|
+
"price-2y-disc": "173.-",
|
|
202
|
+
"price-3y": "297.-",
|
|
203
|
+
"price-3y-disc": "247.-",
|
|
204
|
+
"price-gift": "99.-",
|
|
205
|
+
"price-gift-disc": "59.-"
|
|
206
|
+
},
|
|
207
|
+
subheadline: {
|
|
208
|
+
"your-hc": "Your HotelCard",
|
|
209
|
+
"popular-hotels": "Popular hotel deals",
|
|
210
|
+
"no-results": "Explore different destinations, change your dates, or remove some filters.",
|
|
211
|
+
"sort-by": "Sort by"
|
|
212
|
+
},
|
|
213
|
+
form: {
|
|
214
|
+
guests: "guests",
|
|
215
|
+
guest: "guest",
|
|
216
|
+
adults: "Adults",
|
|
217
|
+
children: "Children",
|
|
218
|
+
pet: "Pet",
|
|
219
|
+
"age-of-child": "Child\u2019s age",
|
|
220
|
+
age: "Age",
|
|
221
|
+
"age-error": "Please select age"
|
|
222
|
+
},
|
|
223
|
+
filter: {
|
|
224
|
+
filters: "Filters",
|
|
225
|
+
destination: "Destination",
|
|
226
|
+
experience: "Experience",
|
|
227
|
+
"show-all": "Show all",
|
|
228
|
+
price: "Price",
|
|
229
|
+
discount: "Discount",
|
|
230
|
+
services: "Services",
|
|
231
|
+
meals: "Meals",
|
|
232
|
+
"hotel-category": "Hotel category",
|
|
233
|
+
reviews: "Reviews",
|
|
234
|
+
mobility: "Mobility",
|
|
235
|
+
"wellness-spa": "Wellness & Spa",
|
|
236
|
+
"price-high-low": "Price high to low",
|
|
237
|
+
"price-low-high": "Price low to high",
|
|
238
|
+
"best-rating": "Best guest rating",
|
|
239
|
+
"most-popular": "Most popular",
|
|
240
|
+
"newest-hotels": "Newest",
|
|
241
|
+
relevance: "Relevance",
|
|
242
|
+
selected: "Selected",
|
|
243
|
+
"clear-all": "Clear all",
|
|
244
|
+
options: "Options",
|
|
245
|
+
"hotellerie-suisse": "Classification HotellerieSuisse",
|
|
246
|
+
trustyou: "Reviews from travelers on TrustYou\xAE",
|
|
247
|
+
"select-all": "Select all",
|
|
248
|
+
reset: "Reset",
|
|
249
|
+
"breakfast-included": "Breakfast included"
|
|
250
|
+
},
|
|
251
|
+
headline: {
|
|
252
|
+
"no-results": "No stays match your search right now"
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// src/locales/fr.json
|
|
257
|
+
var fr_default = {
|
|
258
|
+
button: {
|
|
259
|
+
order: "Commander",
|
|
260
|
+
"order-navigation": "Commander",
|
|
261
|
+
"order-hc": "Commander l'HotelCard",
|
|
262
|
+
"my-account": "Mon compte",
|
|
263
|
+
search: "Rechercher",
|
|
264
|
+
"back-to-top": "Haut de page"
|
|
265
|
+
},
|
|
266
|
+
link: {
|
|
267
|
+
"member-benefits": "Member Benefits",
|
|
268
|
+
"view-all-hotels": "D\xE9couvrez toutes nos offres",
|
|
269
|
+
"search-by-map": "Recherche sur la carte",
|
|
270
|
+
"search-by-region": "H\xF4tels par r\xE9gion",
|
|
271
|
+
"search-by-experience": "H\xF4tels par exp\xE9rience",
|
|
272
|
+
"travel-inspiration": "Inspiration voyage",
|
|
273
|
+
"booking-tips-and-tricks": "Conseils r\xE9servation",
|
|
274
|
+
home: "Accueil",
|
|
275
|
+
"all-hotel-deals": "Toutes les offres d\u2019h\xF4tels",
|
|
276
|
+
"search-results": "R\xE9sultats de recherche"
|
|
277
|
+
},
|
|
278
|
+
general: {
|
|
279
|
+
"signed-out": "Se connecter et r\xE9server",
|
|
280
|
+
"room-price": "\xE0 partir de CHF XXX par chambre",
|
|
281
|
+
guarantee: "Garantie de remboursement de 14 jours",
|
|
282
|
+
contact: "D\u2019autres questions ? Contactez-nous.",
|
|
283
|
+
"breakfast-included": "Petit-d\xE9jeuner inclus",
|
|
284
|
+
"free-cancellation": "Annulation gratuite",
|
|
285
|
+
"suggested-destinations": "Suggestions de destinations",
|
|
286
|
+
"when-months": "Quand souhaitez-vous partir ?",
|
|
287
|
+
"hotel-deals-found": "offres d\u2019h\xF4tel trouv\xE9es",
|
|
288
|
+
"no-results": "Explorez d\u2019autres destinations, modifiez vos dates ou retirez certains filtres.",
|
|
289
|
+
"unavailable-for-selected-days": "Indisponible aux dates s\xE9lectionn\xE9es.",
|
|
290
|
+
"cant-accommodate-all": "L\u2019h\xF4tel ne peut pas accueillir tous les voyageurs.",
|
|
291
|
+
"reset-destination": "R\xE9initialiser la destination et filtrer par r\xE9gion"
|
|
292
|
+
},
|
|
293
|
+
label: {
|
|
294
|
+
"price-from": "\xE0 partir de ",
|
|
295
|
+
"price-for": "par chambre",
|
|
296
|
+
"per-room-night": "par chambre & nuit d\xE8s",
|
|
297
|
+
new: "Nouveau",
|
|
298
|
+
anytime: "\xC0 tout moment",
|
|
299
|
+
anywhere: "Toutes les destinations",
|
|
300
|
+
dates: "Dates",
|
|
301
|
+
flexible: "Flexible",
|
|
302
|
+
where: "Destination",
|
|
303
|
+
when: "Quand",
|
|
304
|
+
who: "Voyageurs",
|
|
305
|
+
nearby: "\xC0 proximit\xE9",
|
|
306
|
+
hotels: "H\xF4tel",
|
|
307
|
+
filter: "Filtrer",
|
|
308
|
+
sort: "Trier",
|
|
309
|
+
map: "Carte",
|
|
310
|
+
rating: "Note",
|
|
311
|
+
"rating-excellent": "Excellent",
|
|
312
|
+
"rating-very-good": "Tr\xE8s bien",
|
|
313
|
+
"rating-good": "Bien",
|
|
314
|
+
"rating-fair": "Moyen",
|
|
315
|
+
"rating-none": "Aucune notation"
|
|
316
|
+
},
|
|
317
|
+
product: {
|
|
318
|
+
"6m": "Abonnement de 6 mois",
|
|
319
|
+
"1y": "Abonnement 1 an",
|
|
320
|
+
"2y": "Abonnement 2 ans",
|
|
321
|
+
"3y": "Abonnement 3 ans",
|
|
322
|
+
"price-6m": "79.-",
|
|
323
|
+
"price-6m-disc": "59.-",
|
|
324
|
+
"price-1y": "99.-",
|
|
325
|
+
"price-1y-disc": "79.-",
|
|
326
|
+
"price-2y": "198.-",
|
|
327
|
+
"price-2y-disc": "173.-",
|
|
328
|
+
"price-3y": "297.-",
|
|
329
|
+
"price-3y-disc": "247.-",
|
|
330
|
+
"price-gift": "99.-",
|
|
331
|
+
"price-gift-disc": "59.-"
|
|
332
|
+
},
|
|
333
|
+
subheadline: {
|
|
334
|
+
"your-hc": "Votre HotelCard",
|
|
335
|
+
"popular-hotels": "Offres d\u2019h\xF4tels populaires",
|
|
336
|
+
"no-results": "Explorez d\u2019autres destinations, modifiez vos dates ou retirez certains filtres.",
|
|
337
|
+
"sort-by": "Trier par"
|
|
338
|
+
},
|
|
339
|
+
form: {
|
|
340
|
+
guests: "personnes",
|
|
341
|
+
guest: "personne",
|
|
342
|
+
adults: "Adultes",
|
|
343
|
+
children: "Enfants",
|
|
344
|
+
pet: "Animal domestique",
|
|
345
|
+
"age-of-child": "\xC2ge de l\u2019enfant",
|
|
346
|
+
age: "\xC2ge",
|
|
347
|
+
"age-error": "Veuillez s\xE9lectionner l\u2019\xE2ge"
|
|
348
|
+
},
|
|
349
|
+
filter: {
|
|
350
|
+
filters: "Filtres",
|
|
351
|
+
destination: "Destination",
|
|
352
|
+
experience: "Exp\xE9rience",
|
|
353
|
+
"show-all": "Tout afficher",
|
|
354
|
+
price: "Prix",
|
|
355
|
+
discount: "R\xE9duction",
|
|
356
|
+
services: "Services",
|
|
357
|
+
meals: "Repas",
|
|
358
|
+
"hotel-category": "Cat\xE9gorie d\u2019h\xF4tel",
|
|
359
|
+
reviews: "Avis",
|
|
360
|
+
mobility: "Mobilit\xE9",
|
|
361
|
+
"wellness-spa": "Bien-\xEAtre & Spa",
|
|
362
|
+
"price-high-low": "Prix : du plus bas",
|
|
363
|
+
"price-low-high": "Prix : du plus \xE9lev\xE9",
|
|
364
|
+
"best-rating": "Meilleure note",
|
|
365
|
+
"most-popular": "Plus populaires",
|
|
366
|
+
"newest-hotels": "Plus r\xE9cents",
|
|
367
|
+
relevance: "Pertinence",
|
|
368
|
+
selected: "String value",
|
|
369
|
+
"clear-all": "Tout effacer",
|
|
370
|
+
options: "Services",
|
|
371
|
+
"hotellerie-suisse": "Classification HotellerieSuisse",
|
|
372
|
+
trustyou: "Avis de voyageurs sur TrustYou\xAE",
|
|
373
|
+
"select-all": "Tout s\xE9lectionner",
|
|
374
|
+
reset: "R\xE9initialiser",
|
|
375
|
+
"breakfast-included": "Petit-d\xE9jeuner inclus"
|
|
376
|
+
},
|
|
377
|
+
headline: {
|
|
378
|
+
"no-results": "Aucun s\xE9jour ne correspond \xE0 votre recherche pour le moment"
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
// src/locales/it.json
|
|
383
|
+
var it_default = {
|
|
384
|
+
button: {
|
|
385
|
+
order: "Ordina ora",
|
|
386
|
+
"order-navigation": "Ordina ora",
|
|
387
|
+
"order-hc": "Ordina HotelCard",
|
|
388
|
+
"my-account": "Il mio profilo",
|
|
389
|
+
search: "Cerca",
|
|
390
|
+
"back-to-top": "Torna su"
|
|
391
|
+
},
|
|
392
|
+
link: {
|
|
393
|
+
"member-benefits": "Member Benefits",
|
|
394
|
+
"view-all-hotels": "Tutte le offerte hotel",
|
|
395
|
+
"search-by-map": "Ricerca sulla mappa",
|
|
396
|
+
"search-by-region": "Hotel per regione",
|
|
397
|
+
"search-by-experience": "Hotel per esperienza",
|
|
398
|
+
"travel-inspiration": "Ispirazioni di viaggio",
|
|
399
|
+
"booking-tips-and-tricks": "Consigli prenotazione",
|
|
400
|
+
home: "Home",
|
|
401
|
+
"all-hotel-deals": "Tutte le offerte hotel",
|
|
402
|
+
"search-results": "Risultati di ricerca"
|
|
403
|
+
},
|
|
404
|
+
general: {
|
|
405
|
+
"signed-out": "Accedi e prenota",
|
|
406
|
+
"room-price": "a partire da CHF xxx per camera",
|
|
407
|
+
guarantee: "Garanzia di rimborso di 14 giorni",
|
|
408
|
+
contact: "Altre domande? Contattaci.",
|
|
409
|
+
"breakfast-included": "Colazione inclusa",
|
|
410
|
+
"free-cancellation": "Cancellazione gratuita",
|
|
411
|
+
"suggested-destinations": "Destinazioni suggerite",
|
|
412
|
+
"when-months": "Quando vuoi viaggiare?",
|
|
413
|
+
"hotel-deals-found": "offerte hotel trovate",
|
|
414
|
+
"no-results": "Prova altre destinazioni, cambia le date o rimuovi qualche filtro.",
|
|
415
|
+
"unavailable-for-selected-days": "Non disponibile per le date selezionate.",
|
|
416
|
+
"cant-accommodate-all": "L\u2019hotel non pu\xF2 accogliere tutti gli ospiti.",
|
|
417
|
+
"reset-destination": "Reimposta la destinazione e filtra per regione"
|
|
418
|
+
},
|
|
419
|
+
label: {
|
|
420
|
+
"price-from": "a partire da ",
|
|
421
|
+
"price-for": "per camera",
|
|
422
|
+
"per-room-night": "per camera e notte da",
|
|
423
|
+
new: "Nuovo",
|
|
424
|
+
anytime: "In qualsiasi momento",
|
|
425
|
+
anywhere: "Tutte le destinazioni",
|
|
426
|
+
dates: "Date",
|
|
427
|
+
flexible: "Flessibile",
|
|
428
|
+
where: "Dove",
|
|
429
|
+
when: "Date",
|
|
430
|
+
who: "Chi",
|
|
431
|
+
nearby: "Nelle vicinanze",
|
|
432
|
+
hotels: "Hotel",
|
|
433
|
+
filter: "Filtra",
|
|
434
|
+
sort: "Ordina",
|
|
435
|
+
map: "Mappa",
|
|
436
|
+
rating: "Rating",
|
|
437
|
+
"rating-excellent": "Eccellente",
|
|
438
|
+
"rating-very-good": "Ottimo",
|
|
439
|
+
"rating-good": "Buono",
|
|
440
|
+
"rating-fair": "Sufficiente",
|
|
441
|
+
"rating-none": "Nessun voto"
|
|
442
|
+
},
|
|
443
|
+
product: {
|
|
444
|
+
"6m": "Abbonamento di 6 mesi",
|
|
445
|
+
"1y": "Abbonamento 1 anno",
|
|
446
|
+
"2y": "Abbonamento 2 anni",
|
|
447
|
+
"3y": "Abbonamento 3 anni",
|
|
448
|
+
"price-6m": "79.-",
|
|
449
|
+
"price-6m-disc": "59.-",
|
|
450
|
+
"price-1y": "99.-",
|
|
451
|
+
"price-1y-disc": "79.-",
|
|
452
|
+
"price-2y": "198.-",
|
|
453
|
+
"price-2y-disc": "173.-",
|
|
454
|
+
"price-3y": "297.-",
|
|
455
|
+
"price-3y-disc": "247.-",
|
|
456
|
+
"price-gift": "99.-",
|
|
457
|
+
"price-gift-disc": "59.-"
|
|
458
|
+
},
|
|
459
|
+
subheadline: {
|
|
460
|
+
"your-hc": "La sua HotelCard",
|
|
461
|
+
"popular-hotels": "Offerte hotel popolari",
|
|
462
|
+
"no-results": "Prova altre destinazioni, cambia le date o rimuovi qualche filtro.",
|
|
463
|
+
"sort-by": "Ordina per"
|
|
464
|
+
},
|
|
465
|
+
form: {
|
|
466
|
+
guests: "ospiti",
|
|
467
|
+
guest: "ospite",
|
|
468
|
+
adults: "Adulti",
|
|
469
|
+
children: "Bambini",
|
|
470
|
+
pet: "Animale domestico",
|
|
471
|
+
"age-of-child": "L'et\xE0 del bambino",
|
|
472
|
+
age: "L'et\xE0",
|
|
473
|
+
"age-error": "Seleziona l\u2019et\xE0"
|
|
474
|
+
},
|
|
475
|
+
filter: {
|
|
476
|
+
filters: "Filtri",
|
|
477
|
+
destination: "Destinazione",
|
|
478
|
+
experience: "Esperienza",
|
|
479
|
+
"show-all": "Mostra tutto",
|
|
480
|
+
price: "Prezzo",
|
|
481
|
+
discount: "Sconto",
|
|
482
|
+
services: "Servizi",
|
|
483
|
+
meals: "Pasti",
|
|
484
|
+
"hotel-category": "Categoria hotel",
|
|
485
|
+
reviews: "Recensioni",
|
|
486
|
+
mobility: "Mobilit\xE0",
|
|
487
|
+
"wellness-spa": "Wellness & Spa",
|
|
488
|
+
"price-high-low": "Prezzo: dal pi\xF9 basso",
|
|
489
|
+
"price-low-high": "Prezzo: dal pi\xF9 alto",
|
|
490
|
+
"best-rating": "Miglior voto",
|
|
491
|
+
"most-popular": "Pi\xF9 popolari",
|
|
492
|
+
"newest-hotels": "Pi\xF9 recenti",
|
|
493
|
+
relevance: "Rilevanza",
|
|
494
|
+
selected: "String value",
|
|
495
|
+
"clear-all": "Cancella tutto",
|
|
496
|
+
options: "Servizi",
|
|
497
|
+
"hotellerie-suisse": "Classificazione HotellerieSuisse",
|
|
498
|
+
trustyou: "Recensioni dei viaggiatori su TrustYou\xAE",
|
|
499
|
+
"select-all": "Seleziona tutto",
|
|
500
|
+
reset: "Reimposta",
|
|
501
|
+
"breakfast-included": "Colazione inclusa"
|
|
502
|
+
},
|
|
503
|
+
headline: {
|
|
504
|
+
"no-results": "Al momento nessun soggiorno corrisponde alla tua ricerca"
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
// src/locales/index.ts
|
|
509
|
+
var translations = { de: de_default, en: en_default, fr: fr_default, it: it_default };
|
|
510
|
+
|
|
511
|
+
// src/context/UIContext.tsx
|
|
3
512
|
import { jsx } from "react/jsx-runtime";
|
|
513
|
+
function getNestedValue(obj, path) {
|
|
514
|
+
const keys = path.split(".");
|
|
515
|
+
let current = obj;
|
|
516
|
+
for (const key of keys) {
|
|
517
|
+
if (current === null || current === void 0 || typeof current !== "object") {
|
|
518
|
+
return void 0;
|
|
519
|
+
}
|
|
520
|
+
current = current[key];
|
|
521
|
+
}
|
|
522
|
+
return typeof current === "string" ? current : void 0;
|
|
523
|
+
}
|
|
524
|
+
function createTranslateFunction(locale) {
|
|
525
|
+
const localeTranslations = translations[locale] || translations.en;
|
|
526
|
+
return (key, fallback) => {
|
|
527
|
+
const value = getNestedValue(localeTranslations, key);
|
|
528
|
+
return value ?? fallback ?? key;
|
|
529
|
+
};
|
|
530
|
+
}
|
|
531
|
+
var defaultT = createTranslateFunction("de");
|
|
4
532
|
var defaultValue = {
|
|
5
533
|
locale: "de",
|
|
6
534
|
currency: "CHF",
|
|
7
|
-
isDesktop: false
|
|
535
|
+
isDesktop: false,
|
|
536
|
+
t: defaultT
|
|
8
537
|
};
|
|
9
538
|
var UIContext = createContext(defaultValue);
|
|
10
539
|
var HotelCardUIProvider = ({
|
|
11
540
|
locale = "de",
|
|
12
541
|
currency = "CHF",
|
|
13
542
|
isDesktop = false,
|
|
543
|
+
t: customT,
|
|
14
544
|
children
|
|
15
545
|
}) => {
|
|
16
|
-
const
|
|
546
|
+
const t = useMemo(
|
|
547
|
+
() => customT ?? createTranslateFunction(locale),
|
|
548
|
+
[locale, customT]
|
|
549
|
+
);
|
|
550
|
+
const value = useMemo(
|
|
551
|
+
() => ({ locale, currency, isDesktop, t }),
|
|
552
|
+
[locale, currency, isDesktop, t]
|
|
553
|
+
);
|
|
17
554
|
return /* @__PURE__ */ jsx(UIContext.Provider, { value, children });
|
|
18
555
|
};
|
|
19
556
|
var useUIContext = () => {
|
|
@@ -719,104 +1256,11 @@ var Card = ({
|
|
|
719
1256
|
};
|
|
720
1257
|
Card.displayName = "Card";
|
|
721
1258
|
|
|
722
|
-
// src/components/CompactCard/CompactCard.tsx
|
|
723
|
-
import { Fragment as Fragment3, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
724
|
-
var cx11 = (className) => `hc-compact-${className}`;
|
|
725
|
-
var StarIcon3 = () => /* @__PURE__ */ jsxs11("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", viewBox: "0 0 9 9", fill: "none", children: [
|
|
726
|
-
/* @__PURE__ */ jsx12("g", { clipPath: "url(#clip0_compact_star)", children: /* @__PURE__ */ jsx12(
|
|
727
|
-
"path",
|
|
728
|
-
{
|
|
729
|
-
d: "M4.80018 0.366577C4.93104 0.366577 5.05173 0.440968 5.11135 0.557659L6.18011 2.66102L8.50521 3.03152C8.63462 3.05194 8.74222 3.14383 8.78294 3.26927C8.82365 3.39472 8.79021 3.53183 8.6986 3.62518L7.03366 5.29533L7.40155 7.6277C7.42191 7.75752 7.3681 7.88879 7.26195 7.9661C7.15581 8.04341 7.01476 8.05508 6.89843 7.99528L4.80018 6.92463L2.70192 7.99528C2.58559 8.05508 2.44454 8.04341 2.33839 7.9661C2.23225 7.88879 2.17844 7.75898 2.1988 7.6277L2.56523 5.29533L0.901751 3.62518C0.808689 3.53183 0.776699 3.39472 0.817413 3.26927C0.858128 3.14383 0.964277 3.05194 1.09515 3.03152L3.42024 2.66102L4.49045 0.557659C4.55007 0.440968 4.67076 0.366577 4.80163 0.366577H4.80018Z",
|
|
730
|
-
fill: "#1F2937"
|
|
731
|
-
}
|
|
732
|
-
) }),
|
|
733
|
-
/* @__PURE__ */ jsx12("defs", { children: /* @__PURE__ */ jsx12("clipPath", { id: "clip0_compact_star", children: /* @__PURE__ */ jsx12("rect", { width: "8", height: "8", fill: "white", transform: "translate(0.800049 0.199951)" }) }) })
|
|
734
|
-
] });
|
|
735
|
-
var PLACEHOLDER2 = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" fill="%23e5e7eb"%3E%3Crect width="100" height="100" /%3E%3C/svg%3E';
|
|
736
|
-
var repeat2 = (n, renderFn) => Array.from({ length: n }, (_, i) => renderFn(i));
|
|
737
|
-
var CompactCard = ({
|
|
738
|
-
image,
|
|
739
|
-
imageAlt = "",
|
|
740
|
-
label,
|
|
741
|
-
price,
|
|
742
|
-
stars,
|
|
743
|
-
isSuperior = false,
|
|
744
|
-
badge,
|
|
745
|
-
onClick,
|
|
746
|
-
className = "",
|
|
747
|
-
swissLodgeLabel = "Swiss Lodge"
|
|
748
|
-
}) => {
|
|
749
|
-
const hasRating = stars !== void 0 && stars > 0;
|
|
750
|
-
const containerClasses = [
|
|
751
|
-
cx11("card"),
|
|
752
|
-
onClick && cx11("card--clickable"),
|
|
753
|
-
className
|
|
754
|
-
].filter(Boolean).join(" ");
|
|
755
|
-
const labelClasses = [
|
|
756
|
-
cx11("label"),
|
|
757
|
-
!hasRating && cx11("label--noRating")
|
|
758
|
-
].filter(Boolean).join(" ");
|
|
759
|
-
const priceClasses = [
|
|
760
|
-
cx11("price"),
|
|
761
|
-
!hasRating && cx11("price--noRating")
|
|
762
|
-
].filter(Boolean).join(" ");
|
|
763
|
-
const displayImage = image || PLACEHOLDER2;
|
|
764
|
-
const handleKeyDown = (e) => {
|
|
765
|
-
if (onClick && (e.key === "Enter" || e.key === " ")) {
|
|
766
|
-
e.preventDefault();
|
|
767
|
-
onClick();
|
|
768
|
-
}
|
|
769
|
-
};
|
|
770
|
-
return /* @__PURE__ */ jsxs11(
|
|
771
|
-
"div",
|
|
772
|
-
{
|
|
773
|
-
className: containerClasses,
|
|
774
|
-
onClick,
|
|
775
|
-
onKeyDown: handleKeyDown,
|
|
776
|
-
role: onClick ? "button" : void 0,
|
|
777
|
-
tabIndex: onClick ? 0 : void 0,
|
|
778
|
-
children: [
|
|
779
|
-
/* @__PURE__ */ jsxs11("div", { className: cx11("imageContainer"), children: [
|
|
780
|
-
/* @__PURE__ */ jsx12(
|
|
781
|
-
"img",
|
|
782
|
-
{
|
|
783
|
-
src: displayImage,
|
|
784
|
-
alt: imageAlt,
|
|
785
|
-
className: cx11("image"),
|
|
786
|
-
loading: "lazy"
|
|
787
|
-
}
|
|
788
|
-
),
|
|
789
|
-
/* @__PURE__ */ jsx12("div", { className: cx11("shadowOverlay") }),
|
|
790
|
-
badge && /* @__PURE__ */ jsx12("div", { className: cx11("badgeWrapper"), children: /* @__PURE__ */ jsx12(
|
|
791
|
-
"span",
|
|
792
|
-
{
|
|
793
|
-
className: `${cx11("badge")} ${badge.variant === "secondary" ? cx11("badge--secondary") : cx11("badge--primary")}`,
|
|
794
|
-
children: badge.text
|
|
795
|
-
}
|
|
796
|
-
) })
|
|
797
|
-
] }),
|
|
798
|
-
/* @__PURE__ */ jsxs11("div", { className: cx11("textContainer"), children: [
|
|
799
|
-
/* @__PURE__ */ jsx12("div", { className: cx11("starsRow"), children: stars !== void 0 && stars > 0 ? /* @__PURE__ */ jsx12(Fragment3, { children: stars === 6 ? /* @__PURE__ */ jsx12("span", { className: cx11("swissLodge"), children: swissLodgeLabel }) : /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
800
|
-
/* @__PURE__ */ jsx12("div", { className: cx11("starsContainer"), children: repeat2(Math.floor(stars), (i) => /* @__PURE__ */ jsx12(StarIcon3, {}, i)) }),
|
|
801
|
-
isSuperior && /* @__PURE__ */ jsx12("span", { className: cx11("superiorBadge"), children: "(s)" })
|
|
802
|
-
] }) }) : (
|
|
803
|
-
// Empty space to maintain alignment
|
|
804
|
-
/* @__PURE__ */ jsx12("div", { className: cx11("starsPlaceholder"), children: "\xA0" })
|
|
805
|
-
) }),
|
|
806
|
-
label && /* @__PURE__ */ jsx12("div", { className: labelClasses, children: label }),
|
|
807
|
-
price && /* @__PURE__ */ jsx12("div", { className: priceClasses, children: price })
|
|
808
|
-
] })
|
|
809
|
-
]
|
|
810
|
-
}
|
|
811
|
-
);
|
|
812
|
-
};
|
|
813
|
-
CompactCard.displayName = "CompactCard";
|
|
814
|
-
|
|
815
1259
|
// src/components/Dropdown/Dropdown.tsx
|
|
816
1260
|
import { useState as useState2, useRef as useRef2, useEffect as useEffect2 } from "react";
|
|
817
|
-
import { jsx as
|
|
818
|
-
var
|
|
819
|
-
var ChevronIcon = () => /* @__PURE__ */
|
|
1261
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1262
|
+
var cx11 = (className) => `hc-dropdown-${className}`;
|
|
1263
|
+
var ChevronIcon = () => /* @__PURE__ */ jsx12("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", children: /* @__PURE__ */ jsx12(
|
|
820
1264
|
"path",
|
|
821
1265
|
{
|
|
822
1266
|
d: "M1 1L6 6L11 1",
|
|
@@ -870,27 +1314,27 @@ var Dropdown = ({
|
|
|
870
1314
|
}
|
|
871
1315
|
};
|
|
872
1316
|
const containerClasses = [
|
|
873
|
-
|
|
874
|
-
disabled &&
|
|
1317
|
+
cx11("container"),
|
|
1318
|
+
disabled && cx11("container--disabled"),
|
|
875
1319
|
className
|
|
876
1320
|
].filter(Boolean).join(" ");
|
|
877
1321
|
const buttonClasses = [
|
|
878
|
-
|
|
879
|
-
error &&
|
|
880
|
-
isFocused && !error &&
|
|
881
|
-
disabled &&
|
|
882
|
-
isOpen &&
|
|
1322
|
+
cx11("button"),
|
|
1323
|
+
error && cx11("button--error"),
|
|
1324
|
+
isFocused && !error && cx11("button--focus"),
|
|
1325
|
+
disabled && cx11("button--disabled"),
|
|
1326
|
+
isOpen && cx11("button--open")
|
|
883
1327
|
].filter(Boolean).join(" ");
|
|
884
1328
|
const chevronClasses = [
|
|
885
|
-
|
|
886
|
-
isOpen &&
|
|
1329
|
+
cx11("chevron"),
|
|
1330
|
+
isOpen && cx11("chevron--open")
|
|
887
1331
|
].filter(Boolean).join(" ");
|
|
888
1332
|
const listClasses = [
|
|
889
|
-
|
|
890
|
-
isOpen &&
|
|
1333
|
+
cx11("list"),
|
|
1334
|
+
isOpen && cx11("list--open")
|
|
891
1335
|
].filter(Boolean).join(" ");
|
|
892
|
-
return /* @__PURE__ */
|
|
893
|
-
/* @__PURE__ */
|
|
1336
|
+
return /* @__PURE__ */ jsxs11("div", { ref: dropdownRef, className: containerClasses, children: [
|
|
1337
|
+
/* @__PURE__ */ jsxs11(
|
|
894
1338
|
"div",
|
|
895
1339
|
{
|
|
896
1340
|
className: buttonClasses,
|
|
@@ -904,23 +1348,23 @@ var Dropdown = ({
|
|
|
904
1348
|
"aria-expanded": isOpen,
|
|
905
1349
|
"aria-disabled": disabled,
|
|
906
1350
|
children: [
|
|
907
|
-
/* @__PURE__ */
|
|
908
|
-
/* @__PURE__ */
|
|
1351
|
+
/* @__PURE__ */ jsx12("span", { children: selectedLabel }),
|
|
1352
|
+
/* @__PURE__ */ jsx12("span", { className: chevronClasses, children: /* @__PURE__ */ jsx12(ChevronIcon, {}) })
|
|
909
1353
|
]
|
|
910
1354
|
}
|
|
911
1355
|
),
|
|
912
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsx12("ul", { role: "listbox", className: listClasses, children: options.map((option) => /* @__PURE__ */ jsx12(
|
|
913
1357
|
"li",
|
|
914
1358
|
{
|
|
915
1359
|
role: "option",
|
|
916
1360
|
"aria-selected": actualValue === option.value,
|
|
917
1361
|
onClick: () => handleSelect(option.value),
|
|
918
|
-
className: `${
|
|
1362
|
+
className: `${cx11("option")} ${actualValue === option.value ? cx11("option--selected") : ""}`,
|
|
919
1363
|
children: option.label
|
|
920
1364
|
},
|
|
921
1365
|
option.value
|
|
922
1366
|
)) }),
|
|
923
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ jsxs11(
|
|
924
1368
|
"select",
|
|
925
1369
|
{
|
|
926
1370
|
id,
|
|
@@ -928,10 +1372,10 @@ var Dropdown = ({
|
|
|
928
1372
|
value: actualValue,
|
|
929
1373
|
onChange: (e) => handleSelect(e.target.value),
|
|
930
1374
|
disabled,
|
|
931
|
-
className:
|
|
1375
|
+
className: cx11("hiddenSelect"),
|
|
932
1376
|
children: [
|
|
933
|
-
!actualValue && /* @__PURE__ */
|
|
934
|
-
options.map((opt) => /* @__PURE__ */
|
|
1377
|
+
!actualValue && /* @__PURE__ */ jsx12("option", { value: "", children: placeholder }),
|
|
1378
|
+
options.map((opt) => /* @__PURE__ */ jsx12("option", { value: opt.value, children: opt.label }, opt.value))
|
|
935
1379
|
]
|
|
936
1380
|
}
|
|
937
1381
|
)
|
|
@@ -941,8 +1385,8 @@ Dropdown.displayName = "Dropdown";
|
|
|
941
1385
|
|
|
942
1386
|
// src/components/Input/Input.tsx
|
|
943
1387
|
import { useState as useState3, useRef as useRef3 } from "react";
|
|
944
|
-
import { jsx as
|
|
945
|
-
var
|
|
1388
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1389
|
+
var cx12 = (className) => `hc-input-${className}`;
|
|
946
1390
|
var Input = ({
|
|
947
1391
|
label,
|
|
948
1392
|
placeholder = "Placeholder",
|
|
@@ -988,39 +1432,39 @@ var Input = ({
|
|
|
988
1432
|
setIsFocused(false);
|
|
989
1433
|
onBlur?.();
|
|
990
1434
|
};
|
|
991
|
-
const containerClasses = [
|
|
1435
|
+
const containerClasses = [cx12("container"), className].filter(Boolean).join(" ");
|
|
992
1436
|
const labelClasses = [
|
|
993
|
-
|
|
994
|
-
(disabled || readOnly) &&
|
|
1437
|
+
cx12("label"),
|
|
1438
|
+
(disabled || readOnly) && cx12("label--disabled")
|
|
995
1439
|
].filter(Boolean).join(" ");
|
|
996
1440
|
const wrapperClasses = [
|
|
997
|
-
|
|
998
|
-
isFocused &&
|
|
999
|
-
error &&
|
|
1000
|
-
(disabled || readOnly) &&
|
|
1441
|
+
cx12("wrapper"),
|
|
1442
|
+
isFocused && cx12("wrapper--focus"),
|
|
1443
|
+
error && cx12("wrapper--error"),
|
|
1444
|
+
(disabled || readOnly) && cx12("wrapper--disabled"),
|
|
1001
1445
|
wrapperClassName
|
|
1002
1446
|
].filter(Boolean).join(" ");
|
|
1003
1447
|
const inputClasses = [
|
|
1004
|
-
|
|
1005
|
-
(disabled || readOnly) &&
|
|
1448
|
+
cx12("input"),
|
|
1449
|
+
(disabled || readOnly) && cx12("input--disabled"),
|
|
1006
1450
|
inputClassName
|
|
1007
1451
|
].filter(Boolean).join(" ");
|
|
1008
1452
|
const helperClasses = [
|
|
1009
|
-
|
|
1010
|
-
error &&
|
|
1011
|
-
(disabled || readOnly) &&
|
|
1453
|
+
cx12("helper"),
|
|
1454
|
+
error && cx12("helper--error"),
|
|
1455
|
+
(disabled || readOnly) && cx12("helper--disabled")
|
|
1012
1456
|
].filter(Boolean).join(" ");
|
|
1013
|
-
return /* @__PURE__ */
|
|
1014
|
-
label && /* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1457
|
+
return /* @__PURE__ */ jsxs12("div", { className: containerClasses, children: [
|
|
1458
|
+
label && /* @__PURE__ */ jsx13("label", { htmlFor: id, className: labelClasses, children: label }),
|
|
1459
|
+
/* @__PURE__ */ jsxs12(
|
|
1016
1460
|
"div",
|
|
1017
1461
|
{
|
|
1018
1462
|
className: wrapperClasses,
|
|
1019
1463
|
onClick: () => !disabled && !readOnly && inputRef.current?.focus(),
|
|
1020
1464
|
children: [
|
|
1021
|
-
leftIcon && /* @__PURE__ */
|
|
1022
|
-
prefix && /* @__PURE__ */
|
|
1023
|
-
/* @__PURE__ */
|
|
1465
|
+
leftIcon && /* @__PURE__ */ jsx13("div", { className: cx12("icon"), children: leftIcon }),
|
|
1466
|
+
prefix && /* @__PURE__ */ jsx13("div", { className: cx12("prefix"), children: prefix }),
|
|
1467
|
+
/* @__PURE__ */ jsx13(
|
|
1024
1468
|
"input",
|
|
1025
1469
|
{
|
|
1026
1470
|
ref: inputRef,
|
|
@@ -1045,14 +1489,14 @@ var Input = ({
|
|
|
1045
1489
|
]
|
|
1046
1490
|
}
|
|
1047
1491
|
),
|
|
1048
|
-
helper && /* @__PURE__ */
|
|
1492
|
+
helper && /* @__PURE__ */ jsx13("div", { className: helperClasses, children: helper })
|
|
1049
1493
|
] });
|
|
1050
1494
|
};
|
|
1051
1495
|
Input.displayName = "Input";
|
|
1052
1496
|
|
|
1053
1497
|
// src/components/Block/Block.tsx
|
|
1054
|
-
import { jsx as
|
|
1055
|
-
var
|
|
1498
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1499
|
+
var cx13 = (className) => `hc-block-${className}`;
|
|
1056
1500
|
var Block = ({
|
|
1057
1501
|
variant = "icon",
|
|
1058
1502
|
visual,
|
|
@@ -1065,12 +1509,12 @@ var Block = ({
|
|
|
1065
1509
|
}) => {
|
|
1066
1510
|
if (variant === "icon") {
|
|
1067
1511
|
const containerClasses2 = [
|
|
1068
|
-
|
|
1069
|
-
onClick &&
|
|
1512
|
+
cx13("icon"),
|
|
1513
|
+
onClick && cx13("icon--clickable"),
|
|
1070
1514
|
className
|
|
1071
1515
|
].filter(Boolean).join(" ");
|
|
1072
|
-
const iconContainerClass = style === "primary" ?
|
|
1073
|
-
return /* @__PURE__ */
|
|
1516
|
+
const iconContainerClass = style === "primary" ? cx13("icon-container--primary") : cx13("icon-container--secondary");
|
|
1517
|
+
return /* @__PURE__ */ jsxs13(
|
|
1074
1518
|
"div",
|
|
1075
1519
|
{
|
|
1076
1520
|
className: containerClasses2,
|
|
@@ -1078,21 +1522,21 @@ var Block = ({
|
|
|
1078
1522
|
role: onClick ? "button" : void 0,
|
|
1079
1523
|
tabIndex: onClick ? 0 : void 0,
|
|
1080
1524
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
/* @__PURE__ */
|
|
1084
|
-
description && /* @__PURE__ */
|
|
1525
|
+
/* @__PURE__ */ jsx14("div", { className: iconContainerClass, children: visual }),
|
|
1526
|
+
/* @__PURE__ */ jsxs13("div", { className: cx13("text-container"), children: [
|
|
1527
|
+
/* @__PURE__ */ jsx14("div", { className: cx13("icon-label"), children: label }),
|
|
1528
|
+
description && /* @__PURE__ */ jsx14("div", { className: cx13("icon-description"), children: description })
|
|
1085
1529
|
] })
|
|
1086
1530
|
]
|
|
1087
1531
|
}
|
|
1088
1532
|
);
|
|
1089
1533
|
}
|
|
1090
1534
|
const containerClasses = [
|
|
1091
|
-
|
|
1092
|
-
onClick &&
|
|
1535
|
+
cx13("image"),
|
|
1536
|
+
onClick && cx13("image--clickable"),
|
|
1093
1537
|
className
|
|
1094
1538
|
].filter(Boolean).join(" ");
|
|
1095
|
-
return /* @__PURE__ */
|
|
1539
|
+
return /* @__PURE__ */ jsxs13(
|
|
1096
1540
|
"div",
|
|
1097
1541
|
{
|
|
1098
1542
|
className: containerClasses,
|
|
@@ -1100,10 +1544,10 @@ var Block = ({
|
|
|
1100
1544
|
role: onClick ? "button" : void 0,
|
|
1101
1545
|
tabIndex: onClick ? 0 : void 0,
|
|
1102
1546
|
children: [
|
|
1103
|
-
/* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1106
|
-
showArrow && /* @__PURE__ */
|
|
1547
|
+
/* @__PURE__ */ jsx14("div", { className: cx13("image-container"), children: visual }),
|
|
1548
|
+
/* @__PURE__ */ jsxs13("div", { className: cx13("footer"), children: [
|
|
1549
|
+
/* @__PURE__ */ jsx14("span", { className: cx13("image-label"), children: label }),
|
|
1550
|
+
showArrow && /* @__PURE__ */ jsx14("span", { className: cx13("arrow"), children: "\u2192" })
|
|
1107
1551
|
] })
|
|
1108
1552
|
]
|
|
1109
1553
|
}
|
|
@@ -1112,8 +1556,8 @@ var Block = ({
|
|
|
1112
1556
|
Block.displayName = "Block";
|
|
1113
1557
|
|
|
1114
1558
|
// src/components/ReviewCard/ReviewCard.tsx
|
|
1115
|
-
import { jsx as
|
|
1116
|
-
var
|
|
1559
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1560
|
+
var cx14 = (className) => `hc-review-${className}`;
|
|
1117
1561
|
var ReviewCard = ({
|
|
1118
1562
|
name,
|
|
1119
1563
|
date,
|
|
@@ -1121,28 +1565,28 @@ var ReviewCard = ({
|
|
|
1121
1565
|
quote,
|
|
1122
1566
|
className
|
|
1123
1567
|
}) => {
|
|
1124
|
-
const containerClasses = [
|
|
1125
|
-
return /* @__PURE__ */
|
|
1126
|
-
/* @__PURE__ */
|
|
1127
|
-
/* @__PURE__ */
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */
|
|
1568
|
+
const containerClasses = [cx14("container"), className].filter(Boolean).join(" ");
|
|
1569
|
+
return /* @__PURE__ */ jsxs14("div", { className: containerClasses, children: [
|
|
1570
|
+
/* @__PURE__ */ jsx15("div", { className: cx14("name"), children: name }),
|
|
1571
|
+
/* @__PURE__ */ jsxs14("div", { className: cx14("frame"), children: [
|
|
1572
|
+
/* @__PURE__ */ jsx15("div", { className: cx14("stars"), children: /* @__PURE__ */ jsx15(Rating, { variant: "stars", value: rating, size: "medium" }) }),
|
|
1573
|
+
/* @__PURE__ */ jsx15("div", { className: cx14("quote"), children: quote })
|
|
1130
1574
|
] }),
|
|
1131
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx15("div", { className: cx14("date"), children: date })
|
|
1132
1576
|
] });
|
|
1133
1577
|
};
|
|
1134
1578
|
ReviewCard.displayName = "ReviewCard";
|
|
1135
1579
|
|
|
1136
1580
|
// src/components/FAQ/FAQ.tsx
|
|
1137
1581
|
import { useState as useState4 } from "react";
|
|
1138
|
-
import { jsx as
|
|
1139
|
-
var
|
|
1582
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1583
|
+
var cx15 = (className) => `hc-faq-${className}`;
|
|
1140
1584
|
var ChevronIcon2 = ({ isOpen }) => {
|
|
1141
1585
|
const iconClasses = [
|
|
1142
|
-
|
|
1143
|
-
isOpen &&
|
|
1586
|
+
cx15("chevron"),
|
|
1587
|
+
isOpen && cx15("chevron--open")
|
|
1144
1588
|
].filter(Boolean).join(" ");
|
|
1145
|
-
return /* @__PURE__ */
|
|
1589
|
+
return /* @__PURE__ */ jsx16(
|
|
1146
1590
|
"svg",
|
|
1147
1591
|
{
|
|
1148
1592
|
width: "24",
|
|
@@ -1151,7 +1595,7 @@ var ChevronIcon2 = ({ isOpen }) => {
|
|
|
1151
1595
|
fill: "none",
|
|
1152
1596
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1153
1597
|
className: iconClasses,
|
|
1154
|
-
children: /* @__PURE__ */
|
|
1598
|
+
children: /* @__PURE__ */ jsx16(
|
|
1155
1599
|
"path",
|
|
1156
1600
|
{
|
|
1157
1601
|
d: "M6 9L12 15L18 9",
|
|
@@ -1187,33 +1631,33 @@ var FAQ = ({
|
|
|
1187
1631
|
return newSet;
|
|
1188
1632
|
});
|
|
1189
1633
|
};
|
|
1190
|
-
const containerClasses = [
|
|
1191
|
-
return /* @__PURE__ */
|
|
1634
|
+
const containerClasses = [cx15("container"), className].filter(Boolean).join(" ");
|
|
1635
|
+
return /* @__PURE__ */ jsx16("div", { className: containerClasses, children: items.map((item, index) => {
|
|
1192
1636
|
const isOpen = openIndices.has(index);
|
|
1193
|
-
const answerClasses = isOpen ?
|
|
1194
|
-
return /* @__PURE__ */
|
|
1195
|
-
/* @__PURE__ */
|
|
1637
|
+
const answerClasses = isOpen ? cx15("answer--open") : cx15("answer");
|
|
1638
|
+
return /* @__PURE__ */ jsxs15("div", { className: cx15("item"), children: [
|
|
1639
|
+
/* @__PURE__ */ jsx16(
|
|
1196
1640
|
Button,
|
|
1197
1641
|
{
|
|
1198
1642
|
variant: "link",
|
|
1199
1643
|
size: "medium",
|
|
1200
|
-
className:
|
|
1644
|
+
className: cx15("question-btn"),
|
|
1201
1645
|
onClick: () => toggleItem(index),
|
|
1202
1646
|
"aria-expanded": isOpen,
|
|
1203
1647
|
"aria-controls": `faq-answer-${index}`,
|
|
1204
|
-
rightIcon: /* @__PURE__ */
|
|
1205
|
-
children: /* @__PURE__ */
|
|
1648
|
+
rightIcon: /* @__PURE__ */ jsx16("div", { className: cx15("icon-container"), children: /* @__PURE__ */ jsx16(ChevronIcon2, { isOpen }) }),
|
|
1649
|
+
children: /* @__PURE__ */ jsx16("span", { className: cx15("question-text"), children: item.question })
|
|
1206
1650
|
}
|
|
1207
1651
|
),
|
|
1208
|
-
/* @__PURE__ */
|
|
1652
|
+
/* @__PURE__ */ jsx16("div", { id: `faq-answer-${index}`, className: answerClasses, children: /* @__PURE__ */ jsx16("p", { className: cx15("answer-text"), children: item.answer }) })
|
|
1209
1653
|
] }, index);
|
|
1210
1654
|
}) });
|
|
1211
1655
|
};
|
|
1212
1656
|
FAQ.displayName = "FAQ";
|
|
1213
1657
|
|
|
1214
1658
|
// src/components/Benefits/Benefits.tsx
|
|
1215
|
-
import { jsx as
|
|
1216
|
-
var
|
|
1659
|
+
import { jsx as jsx17, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1660
|
+
var cx16 = (className) => `hc-benefits-${className}`;
|
|
1217
1661
|
var Benefits = ({
|
|
1218
1662
|
title = "Ihre Vorteile mit HotelCard",
|
|
1219
1663
|
subtitle = "Mit HotelCard sparen Sie bei jedem Aufenthalt",
|
|
@@ -1241,26 +1685,26 @@ var Benefits = ({
|
|
|
1241
1685
|
onContactClick,
|
|
1242
1686
|
className
|
|
1243
1687
|
}) => {
|
|
1244
|
-
const sectionClasses = [
|
|
1245
|
-
return /* @__PURE__ */
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */
|
|
1248
|
-
subtitle && /* @__PURE__ */
|
|
1688
|
+
const sectionClasses = [cx16("section"), className].filter(Boolean).join(" ");
|
|
1689
|
+
return /* @__PURE__ */ jsx17("section", { className: sectionClasses, children: /* @__PURE__ */ jsxs16("div", { className: cx16("container"), children: [
|
|
1690
|
+
/* @__PURE__ */ jsxs16("div", { className: cx16("header"), children: [
|
|
1691
|
+
/* @__PURE__ */ jsx17("h2", { className: cx16("title"), children: title }),
|
|
1692
|
+
subtitle && /* @__PURE__ */ jsx17("p", { className: cx16("subtitle"), children: subtitle })
|
|
1249
1693
|
] }),
|
|
1250
|
-
/* @__PURE__ */
|
|
1251
|
-
/* @__PURE__ */
|
|
1252
|
-
benefit.description && /* @__PURE__ */
|
|
1694
|
+
/* @__PURE__ */ jsx17("div", { className: cx16("grid"), children: benefits.map((benefit, index) => /* @__PURE__ */ jsxs16("div", { className: cx16("item"), children: [
|
|
1695
|
+
/* @__PURE__ */ jsx17("h3", { className: cx16("item-title"), children: benefit.title }),
|
|
1696
|
+
benefit.description && /* @__PURE__ */ jsx17("p", { className: cx16("item-description"), children: benefit.description })
|
|
1253
1697
|
] }, index)) }),
|
|
1254
|
-
contactTitle && /* @__PURE__ */
|
|
1255
|
-
/* @__PURE__ */
|
|
1256
|
-
contactDescription && /* @__PURE__ */
|
|
1257
|
-
contactButtonText && /* @__PURE__ */
|
|
1698
|
+
contactTitle && /* @__PURE__ */ jsxs16("div", { className: cx16("contact-card"), children: [
|
|
1699
|
+
/* @__PURE__ */ jsx17("h3", { className: cx16("contact-title"), children: contactTitle }),
|
|
1700
|
+
contactDescription && /* @__PURE__ */ jsx17("p", { className: cx16("contact-description"), children: contactDescription }),
|
|
1701
|
+
contactButtonText && /* @__PURE__ */ jsx17(
|
|
1258
1702
|
Button,
|
|
1259
1703
|
{
|
|
1260
1704
|
variant: "secondary",
|
|
1261
1705
|
size: "medium",
|
|
1262
1706
|
onClick: onContactClick,
|
|
1263
|
-
className:
|
|
1707
|
+
className: cx16("contact-btn"),
|
|
1264
1708
|
children: contactButtonText
|
|
1265
1709
|
}
|
|
1266
1710
|
)
|
|
@@ -1271,9 +1715,9 @@ Benefits.displayName = "Benefits";
|
|
|
1271
1715
|
|
|
1272
1716
|
// src/components/Pin/Pin.tsx
|
|
1273
1717
|
import { forwardRef as forwardRef2 } from "react";
|
|
1274
|
-
import { Fragment as
|
|
1275
|
-
var
|
|
1276
|
-
var HeartIcon = ({ className }) => /* @__PURE__ */
|
|
1718
|
+
import { Fragment as Fragment3, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1719
|
+
var cx17 = (className) => `hc-pin-${className}`;
|
|
1720
|
+
var HeartIcon = ({ className }) => /* @__PURE__ */ jsx18(
|
|
1277
1721
|
"svg",
|
|
1278
1722
|
{
|
|
1279
1723
|
className,
|
|
@@ -1282,10 +1726,10 @@ var HeartIcon = ({ className }) => /* @__PURE__ */ jsx19(
|
|
|
1282
1726
|
viewBox: "0 0 16 16",
|
|
1283
1727
|
fill: "currentColor",
|
|
1284
1728
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1285
|
-
children: /* @__PURE__ */
|
|
1729
|
+
children: /* @__PURE__ */ jsx18("path", { d: "M8 14.2333L6.96667 13.2933C3.6 10.24 1.33333 8.18667 1.33333 5.66667C1.33333 3.61333 2.94667 2 5 2C6.16 2 7.27333 2.54 8 3.39333C8.72667 2.54 9.84 2 11 2C13.0533 2 14.6667 3.61333 14.6667 5.66667C14.6667 8.18667 12.4 10.24 9.03333 13.2933L8 14.2333Z" })
|
|
1286
1730
|
}
|
|
1287
1731
|
);
|
|
1288
|
-
var HomeIcon = ({ className }) => /* @__PURE__ */
|
|
1732
|
+
var HomeIcon = ({ className }) => /* @__PURE__ */ jsx18(
|
|
1289
1733
|
"svg",
|
|
1290
1734
|
{
|
|
1291
1735
|
className,
|
|
@@ -1294,7 +1738,7 @@ var HomeIcon = ({ className }) => /* @__PURE__ */ jsx19(
|
|
|
1294
1738
|
viewBox: "0 0 16 16",
|
|
1295
1739
|
fill: "currentColor",
|
|
1296
1740
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1297
|
-
children: /* @__PURE__ */
|
|
1741
|
+
children: /* @__PURE__ */ jsx18("path", { d: "M6.66667 13.3333V9.33333H9.33333V13.3333H12.6667V8H14.6667L8 2L1.33333 8H3.33333V13.3333H6.66667Z" })
|
|
1298
1742
|
}
|
|
1299
1743
|
);
|
|
1300
1744
|
var Pin = forwardRef2(
|
|
@@ -1310,13 +1754,13 @@ var Pin = forwardRef2(
|
|
|
1310
1754
|
}, ref) => {
|
|
1311
1755
|
const styleVariant = viewed ? "secondary" : "primary";
|
|
1312
1756
|
const pinClasses = [
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
variant === "hotel" &&
|
|
1757
|
+
cx17("pin"),
|
|
1758
|
+
cx17(styleVariant),
|
|
1759
|
+
variant === "hotel" && cx17("hotel"),
|
|
1316
1760
|
className
|
|
1317
1761
|
].filter(Boolean).join(" ");
|
|
1318
1762
|
const formattedPrice = typeof price === "number" ? Math.round(price).toString() : price;
|
|
1319
|
-
return /* @__PURE__ */
|
|
1763
|
+
return /* @__PURE__ */ jsxs17(
|
|
1320
1764
|
"button",
|
|
1321
1765
|
{
|
|
1322
1766
|
ref,
|
|
@@ -1325,12 +1769,12 @@ var Pin = forwardRef2(
|
|
|
1325
1769
|
disabled,
|
|
1326
1770
|
onClick,
|
|
1327
1771
|
children: [
|
|
1328
|
-
/* @__PURE__ */
|
|
1329
|
-
/* @__PURE__ */
|
|
1330
|
-
/* @__PURE__ */
|
|
1331
|
-
showFavorite && /* @__PURE__ */
|
|
1332
|
-
] }) : /* @__PURE__ */
|
|
1333
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ jsx18("div", { className: cx17("body"), children: variant === "price" ? /* @__PURE__ */ jsxs17(Fragment3, { children: [
|
|
1773
|
+
/* @__PURE__ */ jsx18("span", { className: cx17("currency"), children: currency }),
|
|
1774
|
+
/* @__PURE__ */ jsx18("span", { className: cx17("price"), children: formattedPrice }),
|
|
1775
|
+
showFavorite && /* @__PURE__ */ jsx18("div", { className: cx17("favorite-container"), children: /* @__PURE__ */ jsx18(HeartIcon, { className: cx17("favorite-icon") }) })
|
|
1776
|
+
] }) : /* @__PURE__ */ jsx18(HomeIcon, { className: cx17("hotel-icon") }) }),
|
|
1777
|
+
/* @__PURE__ */ jsx18("div", { className: cx17("pointer"), children: /* @__PURE__ */ jsx18("div", { className: cx17("pointer-inner") }) })
|
|
1334
1778
|
]
|
|
1335
1779
|
}
|
|
1336
1780
|
);
|
|
@@ -1339,7 +1783,7 @@ var Pin = forwardRef2(
|
|
|
1339
1783
|
Pin.displayName = "Pin";
|
|
1340
1784
|
|
|
1341
1785
|
// src/components/DateSelector/DateSelector.tsx
|
|
1342
|
-
import { useState as useState9, useRef as useRef4, useEffect as useEffect6, useMemo } from "react";
|
|
1786
|
+
import { useState as useState9, useRef as useRef4, useEffect as useEffect6, useMemo as useMemo2 } from "react";
|
|
1343
1787
|
|
|
1344
1788
|
// src/hooks/useDebounce.ts
|
|
1345
1789
|
import { useState as useState5, useEffect as useEffect3 } from "react";
|
|
@@ -1397,8 +1841,8 @@ import { useState as useState8, useEffect as useEffect5 } from "react";
|
|
|
1397
1841
|
|
|
1398
1842
|
// src/components/DateSelector/DualCalendar.tsx
|
|
1399
1843
|
import { useState as useState7 } from "react";
|
|
1400
|
-
import { jsx as
|
|
1401
|
-
var
|
|
1844
|
+
import { jsx as jsx19, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
1845
|
+
var cx18 = (name) => `hc-dual-calendar${name ? `__${name}` : ""}`;
|
|
1402
1846
|
var cxMod = (base, mod) => `hc-dual-calendar__${base}--${mod}`;
|
|
1403
1847
|
var DualCalendar = ({
|
|
1404
1848
|
startDate,
|
|
@@ -1456,7 +1900,7 @@ var DualCalendar = ({
|
|
|
1456
1900
|
const firstDay = getFirstDayOfMonth(date);
|
|
1457
1901
|
const days = [];
|
|
1458
1902
|
for (let i = 0; i < firstDay; i++) {
|
|
1459
|
-
days.push(/* @__PURE__ */
|
|
1903
|
+
days.push(/* @__PURE__ */ jsx19("div", { className: cx18("day") }, `empty-${i}`));
|
|
1460
1904
|
}
|
|
1461
1905
|
for (let day = 1; day <= daysInMonth; day++) {
|
|
1462
1906
|
const dateStr = `${date.getFullYear()}-${String(date.getMonth() + 1).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
|
|
@@ -1465,15 +1909,15 @@ var DualCalendar = ({
|
|
|
1465
1909
|
const end = isEndDate(dateStr);
|
|
1466
1910
|
const inRange = isMidDate(dateStr);
|
|
1467
1911
|
const classes = [
|
|
1468
|
-
|
|
1469
|
-
|
|
1912
|
+
cx18("day"),
|
|
1913
|
+
cx18("day-button"),
|
|
1470
1914
|
disabled && cxMod("day-button", "disabled"),
|
|
1471
1915
|
start && cxMod("day-button", "start"),
|
|
1472
1916
|
end && cxMod("day-button", "end"),
|
|
1473
1917
|
inRange && cxMod("day-button", "in-range")
|
|
1474
1918
|
].filter(Boolean).join(" ");
|
|
1475
1919
|
days.push(
|
|
1476
|
-
/* @__PURE__ */
|
|
1920
|
+
/* @__PURE__ */ jsx19(
|
|
1477
1921
|
"button",
|
|
1478
1922
|
{
|
|
1479
1923
|
type: "button",
|
|
@@ -1500,82 +1944,82 @@ var DualCalendar = ({
|
|
|
1500
1944
|
const maxMonth = new Date(today.getFullYear() + 1, today.getMonth(), 1);
|
|
1501
1945
|
const nextMonth = new Date(currentMonth.getFullYear(), currentMonth.getMonth() + 1, 1);
|
|
1502
1946
|
const isNextDisabled = nextMonth >= maxMonth;
|
|
1503
|
-
const PrevArrow = () => /* @__PURE__ */
|
|
1504
|
-
const NextArrow = () => /* @__PURE__ */
|
|
1947
|
+
const PrevArrow = () => /* @__PURE__ */ jsx19("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx19("path", { d: "M6.09652 9.36666C5.74908 9.71647 5.74908 10.2821 6.09652 10.6282L11.8223 16.4043C12.1698 16.7541 12.7316 16.7541 13.0754 16.4043C13.4191 16.0545 13.4228 15.4888 13.0754 15.1428L7.97791 9.9993L13.0754 4.85584C13.4228 4.50603 13.4228 3.94038 13.0754 3.59429C12.7279 3.2482 12.1661 3.24448 11.8223 3.59429L6.09652 9.36666Z", fill: "#1F2937" }) });
|
|
1948
|
+
const NextArrow = () => /* @__PURE__ */ jsx19("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx19("path", { d: "M13.9035 9.36666C14.2509 9.71647 14.2509 10.2821 13.9035 10.6282L8.17767 16.4043C7.83023 16.7541 7.2684 16.7541 6.92465 16.4043C6.5809 16.0545 6.5772 15.4888 6.92465 15.1428L12.0221 9.9993L6.92465 4.85584C6.5772 4.50603 6.5772 3.94038 6.92465 3.59429C7.27209 3.2482 7.83392 3.24448 8.17767 3.59429L13.9035 9.37039V9.36666Z", fill: "#1F2937" }) });
|
|
1505
1949
|
const navButtonClasses = (disabled) => [
|
|
1506
|
-
|
|
1950
|
+
cx18("nav-button"),
|
|
1507
1951
|
disabled && cxMod("nav-button", "disabled")
|
|
1508
1952
|
].filter(Boolean).join(" ");
|
|
1509
|
-
return /* @__PURE__ */
|
|
1510
|
-
!isDesktop && /* @__PURE__ */
|
|
1511
|
-
/* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsxs18("div", { className: `${cx18("")} ${!isDesktop ? cxMod("", "mobile") : ""}`, children: [
|
|
1954
|
+
!isDesktop && /* @__PURE__ */ jsxs18("div", { className: cx18("navigation"), children: [
|
|
1955
|
+
/* @__PURE__ */ jsx19(
|
|
1512
1956
|
"button",
|
|
1513
1957
|
{
|
|
1514
1958
|
type: "button",
|
|
1515
1959
|
className: navButtonClasses(isPrevDisabled),
|
|
1516
1960
|
onClick: handlePrevMonth,
|
|
1517
1961
|
disabled: isPrevDisabled,
|
|
1518
|
-
children: /* @__PURE__ */
|
|
1962
|
+
children: /* @__PURE__ */ jsx19(PrevArrow, {})
|
|
1519
1963
|
}
|
|
1520
1964
|
),
|
|
1521
|
-
/* @__PURE__ */
|
|
1522
|
-
/* @__PURE__ */
|
|
1965
|
+
/* @__PURE__ */ jsx19("h3", { className: `${cx18("month-title")} ${cx18("month-title--mobile")}`, children: formatMonthYear(currentMonth) }),
|
|
1966
|
+
/* @__PURE__ */ jsx19(
|
|
1523
1967
|
"button",
|
|
1524
1968
|
{
|
|
1525
1969
|
type: "button",
|
|
1526
1970
|
className: navButtonClasses(isNextDisabled),
|
|
1527
1971
|
onClick: handleNextMonth,
|
|
1528
1972
|
disabled: isNextDisabled,
|
|
1529
|
-
children: /* @__PURE__ */
|
|
1973
|
+
children: /* @__PURE__ */ jsx19(NextArrow, {})
|
|
1530
1974
|
}
|
|
1531
1975
|
)
|
|
1532
1976
|
] }),
|
|
1533
|
-
isDesktop ? /* @__PURE__ */
|
|
1534
|
-
/* @__PURE__ */
|
|
1977
|
+
isDesktop ? /* @__PURE__ */ jsxs18("div", { className: cx18("desktop-layout"), children: [
|
|
1978
|
+
/* @__PURE__ */ jsx19(
|
|
1535
1979
|
"button",
|
|
1536
1980
|
{
|
|
1537
1981
|
type: "button",
|
|
1538
1982
|
className: navButtonClasses(isPrevDisabled),
|
|
1539
1983
|
onClick: handlePrevMonth,
|
|
1540
1984
|
disabled: isPrevDisabled,
|
|
1541
|
-
children: /* @__PURE__ */
|
|
1985
|
+
children: /* @__PURE__ */ jsx19(PrevArrow, {})
|
|
1542
1986
|
}
|
|
1543
1987
|
),
|
|
1544
|
-
/* @__PURE__ */
|
|
1545
|
-
/* @__PURE__ */
|
|
1546
|
-
/* @__PURE__ */
|
|
1547
|
-
/* @__PURE__ */
|
|
1548
|
-
/* @__PURE__ */
|
|
1988
|
+
/* @__PURE__ */ jsxs18("div", { className: cx18("calendars"), children: [
|
|
1989
|
+
/* @__PURE__ */ jsxs18("div", { className: cx18("calendar"), children: [
|
|
1990
|
+
/* @__PURE__ */ jsx19("h3", { className: cx18("month-title"), children: formatMonthYear(currentMonth) }),
|
|
1991
|
+
/* @__PURE__ */ jsx19("div", { className: cx18("weekdays"), children: weekDays.map((day, i) => /* @__PURE__ */ jsx19("div", { className: `${cx18("weekday")} ${i >= 5 ? cxMod("weekday", "weekend") : ""}`, children: day }, day)) }),
|
|
1992
|
+
/* @__PURE__ */ jsx19("div", { className: cx18("days"), children: generateCalendar(0) })
|
|
1549
1993
|
] }),
|
|
1550
|
-
/* @__PURE__ */
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */
|
|
1994
|
+
/* @__PURE__ */ jsxs18("div", { className: cx18("calendar"), children: [
|
|
1995
|
+
/* @__PURE__ */ jsx19("h3", { className: cx18("month-title"), children: formatMonthYear(nextMonth) }),
|
|
1996
|
+
/* @__PURE__ */ jsx19("div", { className: cx18("weekdays"), children: weekDays.map((day, i) => /* @__PURE__ */ jsx19("div", { className: `${cx18("weekday")} ${i >= 5 ? cxMod("weekday", "weekend") : ""}`, children: day }, day)) }),
|
|
1997
|
+
/* @__PURE__ */ jsx19("div", { className: cx18("days"), children: generateCalendar(1) })
|
|
1554
1998
|
] })
|
|
1555
1999
|
] }),
|
|
1556
|
-
/* @__PURE__ */
|
|
2000
|
+
/* @__PURE__ */ jsx19(
|
|
1557
2001
|
"button",
|
|
1558
2002
|
{
|
|
1559
2003
|
type: "button",
|
|
1560
2004
|
className: navButtonClasses(isNextDisabled),
|
|
1561
2005
|
onClick: handleNextMonth,
|
|
1562
2006
|
disabled: isNextDisabled,
|
|
1563
|
-
children: /* @__PURE__ */
|
|
2007
|
+
children: /* @__PURE__ */ jsx19(NextArrow, {})
|
|
1564
2008
|
}
|
|
1565
2009
|
)
|
|
1566
2010
|
] }) : (
|
|
1567
2011
|
/* Mobile: Single calendar */
|
|
1568
|
-
/* @__PURE__ */
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
/* @__PURE__ */
|
|
2012
|
+
/* @__PURE__ */ jsx19("div", { className: `${cx18("calendars")} ${cxMod("calendars", "mobile")}`, children: /* @__PURE__ */ jsxs18("div", { className: cx18("calendar"), children: [
|
|
2013
|
+
/* @__PURE__ */ jsx19("div", { className: cx18("weekdays"), children: weekDays.map((day, i) => /* @__PURE__ */ jsx19("div", { className: `${cx18("weekday")} ${i >= 5 ? cxMod("weekday", "weekend") : ""}`, children: day }, day)) }),
|
|
2014
|
+
/* @__PURE__ */ jsx19("div", { className: cx18("days"), children: generateCalendar(0) })
|
|
1571
2015
|
] }) })
|
|
1572
2016
|
)
|
|
1573
2017
|
] });
|
|
1574
2018
|
};
|
|
1575
2019
|
|
|
1576
2020
|
// src/components/DateSelector/WhenContent.tsx
|
|
1577
|
-
import { jsx as
|
|
1578
|
-
var
|
|
2021
|
+
import { jsx as jsx20, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2022
|
+
var cx19 = (name) => `hc-when-content${name ? `__${name}` : ""}`;
|
|
1579
2023
|
var cxMod2 = (base, mod) => `hc-when-content__${base}--${mod}`;
|
|
1580
2024
|
var getDateLocale = (locale) => {
|
|
1581
2025
|
const localeMap = {
|
|
@@ -1586,14 +2030,6 @@ var getDateLocale = (locale) => {
|
|
|
1586
2030
|
};
|
|
1587
2031
|
return localeMap[locale] || "de-CH";
|
|
1588
2032
|
};
|
|
1589
|
-
var defaultLabels = {
|
|
1590
|
-
when: "When",
|
|
1591
|
-
dates: "Dates",
|
|
1592
|
-
flexible: "Flexible",
|
|
1593
|
-
apply: "Apply",
|
|
1594
|
-
selectMonths: "Select months",
|
|
1595
|
-
anytime: "Anytime"
|
|
1596
|
-
};
|
|
1597
2033
|
var WhenContent = ({
|
|
1598
2034
|
initialDateRange = { start: null, end: null },
|
|
1599
2035
|
initialMonthFilter = null,
|
|
@@ -1603,14 +2039,21 @@ var WhenContent = ({
|
|
|
1603
2039
|
showApplyButton = true,
|
|
1604
2040
|
onApply,
|
|
1605
2041
|
className = "",
|
|
1606
|
-
labels: labelsProp,
|
|
1607
2042
|
locale: localeProp
|
|
1608
2043
|
}) => {
|
|
1609
2044
|
const { locale: contextLocale } = useWindowData();
|
|
1610
2045
|
const { isDesktop } = useResponsive();
|
|
2046
|
+
const { t } = useUIContext();
|
|
1611
2047
|
const locale = localeProp || contextLocale;
|
|
1612
2048
|
const dateLocale = getDateLocale(locale);
|
|
1613
|
-
const labels = {
|
|
2049
|
+
const labels = {
|
|
2050
|
+
when: t("label.when", "When"),
|
|
2051
|
+
dates: t("label.dates", "Dates"),
|
|
2052
|
+
flexible: t("label.flexible", "Flexible"),
|
|
2053
|
+
apply: t("button.search", "Apply"),
|
|
2054
|
+
selectMonths: t("general.when-months", "Select months"),
|
|
2055
|
+
anytime: t("label.anytime", "Anytime")
|
|
2056
|
+
};
|
|
1614
2057
|
const [dateRange, setDateRange] = useState8(initialDateRange);
|
|
1615
2058
|
const [mode, setMode] = useState8(
|
|
1616
2059
|
initialDateRange.start ? "dates" : "anytime"
|
|
@@ -1709,71 +2152,71 @@ var WhenContent = ({
|
|
|
1709
2152
|
}
|
|
1710
2153
|
};
|
|
1711
2154
|
const containerClasses = [
|
|
1712
|
-
|
|
2155
|
+
cx19(""),
|
|
1713
2156
|
variant === "expanded" && cxMod2("", "expanded"),
|
|
1714
2157
|
className
|
|
1715
2158
|
].filter(Boolean).join(" ");
|
|
1716
2159
|
const monthGridClasses = [
|
|
1717
|
-
|
|
2160
|
+
cx19("month-grid"),
|
|
1718
2161
|
!isDesktop && cxMod2("month-grid", "mobile")
|
|
1719
2162
|
].filter(Boolean).join(" ");
|
|
1720
2163
|
const contentClasses = [
|
|
1721
|
-
|
|
2164
|
+
cx19("content"),
|
|
1722
2165
|
mode === "dates" && cxMod2("content", "dates")
|
|
1723
2166
|
].filter(Boolean).join(" ");
|
|
1724
|
-
return /* @__PURE__ */
|
|
1725
|
-
variant === "expanded" && /* @__PURE__ */
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
-
/* @__PURE__ */
|
|
2167
|
+
return /* @__PURE__ */ jsxs19("div", { className: containerClasses, children: [
|
|
2168
|
+
variant === "expanded" && /* @__PURE__ */ jsx20("h2", { className: cx19("section-title"), children: labels.when }),
|
|
2169
|
+
/* @__PURE__ */ jsxs19("div", { className: cx19("header"), children: [
|
|
2170
|
+
/* @__PURE__ */ jsxs19("div", { className: cx19("tabs"), children: [
|
|
2171
|
+
/* @__PURE__ */ jsx20(
|
|
1729
2172
|
"button",
|
|
1730
2173
|
{
|
|
1731
2174
|
type: "button",
|
|
1732
|
-
className: `${
|
|
2175
|
+
className: `${cx19("tab")} ${mode === "dates" ? cxMod2("tab", "active") : ""}`,
|
|
1733
2176
|
onClick: () => handleModeSwitch("dates"),
|
|
1734
2177
|
children: labels.dates
|
|
1735
2178
|
}
|
|
1736
2179
|
),
|
|
1737
|
-
/* @__PURE__ */
|
|
2180
|
+
/* @__PURE__ */ jsx20(
|
|
1738
2181
|
"button",
|
|
1739
2182
|
{
|
|
1740
2183
|
type: "button",
|
|
1741
|
-
className: `${
|
|
2184
|
+
className: `${cx19("tab")} ${mode === "anytime" ? cxMod2("tab", "active") : ""}`,
|
|
1742
2185
|
onClick: () => handleModeSwitch("anytime"),
|
|
1743
2186
|
children: labels.flexible
|
|
1744
2187
|
}
|
|
1745
2188
|
)
|
|
1746
2189
|
] }),
|
|
1747
|
-
showApplyButton && /* @__PURE__ */
|
|
2190
|
+
showApplyButton && /* @__PURE__ */ jsx20("div", { className: cx19("apply"), children: /* @__PURE__ */ jsx20(Button, { variant: "secondary", size: "medium", onClick: handleApply, children: labels.apply }) })
|
|
1748
2191
|
] }),
|
|
1749
|
-
/* @__PURE__ */
|
|
1750
|
-
/* @__PURE__ */
|
|
1751
|
-
/* @__PURE__ */
|
|
1752
|
-
/* @__PURE__ */
|
|
2192
|
+
/* @__PURE__ */ jsx20("div", { className: contentClasses, children: mode === "anytime" ? /* @__PURE__ */ jsxs19("div", { className: cx19("flexible"), children: [
|
|
2193
|
+
/* @__PURE__ */ jsx20("h3", { className: cx19("heading"), children: labels.selectMonths }),
|
|
2194
|
+
/* @__PURE__ */ jsxs19("div", { className: monthGridClasses, children: [
|
|
2195
|
+
/* @__PURE__ */ jsx20(
|
|
1753
2196
|
"button",
|
|
1754
2197
|
{
|
|
1755
2198
|
type: "button",
|
|
1756
|
-
className: `${
|
|
2199
|
+
className: `${cx19("month-button")} ${cx19("anytime-button")} ${isAnytimeSelected ? cxMod2("month-button", "selected") : ""}`,
|
|
1757
2200
|
onClick: handleAnytimeClick,
|
|
1758
|
-
children: /* @__PURE__ */
|
|
2201
|
+
children: /* @__PURE__ */ jsx20("span", { className: cx19("month-label"), children: labels.anytime })
|
|
1759
2202
|
}
|
|
1760
2203
|
),
|
|
1761
|
-
months.map((month) => /* @__PURE__ */
|
|
2204
|
+
months.map((month) => /* @__PURE__ */ jsxs19(
|
|
1762
2205
|
"button",
|
|
1763
2206
|
{
|
|
1764
2207
|
type: "button",
|
|
1765
|
-
className: `${
|
|
2208
|
+
className: `${cx19("month-button")} ${selectedMonths.includes(month.value) ? cxMod2("month-button", "selected") : ""} ${month.disabled ? cxMod2("month-button", "disabled") : ""}`,
|
|
1766
2209
|
onClick: () => !month.disabled && handleMonthToggle(month.value),
|
|
1767
2210
|
disabled: month.disabled,
|
|
1768
2211
|
children: [
|
|
1769
|
-
/* @__PURE__ */
|
|
1770
|
-
/* @__PURE__ */
|
|
2212
|
+
/* @__PURE__ */ jsx20("span", { className: cx19("month-label"), children: month.label }),
|
|
2213
|
+
/* @__PURE__ */ jsx20("span", { className: cx19("month-year"), children: month.year })
|
|
1771
2214
|
]
|
|
1772
2215
|
},
|
|
1773
2216
|
month.value
|
|
1774
2217
|
))
|
|
1775
2218
|
] })
|
|
1776
|
-
] }) : /* @__PURE__ */
|
|
2219
|
+
] }) : /* @__PURE__ */ jsx20("div", { className: cx19("dates"), children: /* @__PURE__ */ jsx20(
|
|
1777
2220
|
DualCalendar,
|
|
1778
2221
|
{
|
|
1779
2222
|
startDate: dateRange.start,
|
|
@@ -1787,8 +2230,8 @@ var WhenContent = ({
|
|
|
1787
2230
|
};
|
|
1788
2231
|
|
|
1789
2232
|
// src/components/DateSelector/DateSelector.tsx
|
|
1790
|
-
import { jsx as
|
|
1791
|
-
var
|
|
2233
|
+
import { jsx as jsx21, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2234
|
+
var cx20 = (name) => `hc-date-selector${name ? `__${name}` : ""}`;
|
|
1792
2235
|
var cxMod3 = (base, mod) => `hc-date-selector__${base}--${mod}`;
|
|
1793
2236
|
var getDateLocale2 = (locale) => {
|
|
1794
2237
|
const localeMap = {
|
|
@@ -1799,7 +2242,7 @@ var getDateLocale2 = (locale) => {
|
|
|
1799
2242
|
};
|
|
1800
2243
|
return localeMap[locale] || "de-CH";
|
|
1801
2244
|
};
|
|
1802
|
-
var CalendarIcon = () => /* @__PURE__ */
|
|
2245
|
+
var CalendarIcon = () => /* @__PURE__ */ jsx21("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx21(
|
|
1803
2246
|
"path",
|
|
1804
2247
|
{
|
|
1805
2248
|
d: "M19 4H18V2H16V4H8V2H6V4H5C3.9 4 3 4.9 3 6V20C3 21.1 3.9 22 5 22H19C20.1 22 21 21.1 21 20V6C21 4.9 20.1 4 19 4ZM19 20H5V9H19V20Z",
|
|
@@ -1816,7 +2259,7 @@ var DateSelector = ({
|
|
|
1816
2259
|
className,
|
|
1817
2260
|
icon
|
|
1818
2261
|
}) => {
|
|
1819
|
-
const { t } =
|
|
2262
|
+
const { t } = useUIContext();
|
|
1820
2263
|
const { locale } = useWindowData();
|
|
1821
2264
|
const { isDesktop } = useResponsive();
|
|
1822
2265
|
const dateLocale = getDateLocale2(locale);
|
|
@@ -1855,7 +2298,7 @@ var DateSelector = ({
|
|
|
1855
2298
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
1856
2299
|
return () => document.removeEventListener("pointerdown", handlePointerDown);
|
|
1857
2300
|
}, [isOpen, dateRange, selectedMonths, onChange, onMonthFilterChange, onClose]);
|
|
1858
|
-
const months =
|
|
2301
|
+
const months = useMemo2(() => {
|
|
1859
2302
|
const now = /* @__PURE__ */ new Date();
|
|
1860
2303
|
return Array.from({ length: 12 }, (_, i) => {
|
|
1861
2304
|
const date = new Date(now.getFullYear(), now.getMonth() + i, 1);
|
|
@@ -1873,12 +2316,12 @@ var DateSelector = ({
|
|
|
1873
2316
|
}
|
|
1874
2317
|
if (selectedMonths.length === 1) {
|
|
1875
2318
|
const month = months.find((m) => m.value === selectedMonths[0]);
|
|
1876
|
-
return month ? `${month.label} ${month.year}` : t("
|
|
2319
|
+
return month ? `${month.label} ${month.year}` : t("label.flexible", "Flexible");
|
|
1877
2320
|
}
|
|
1878
2321
|
if (selectedMonths.length > 1) {
|
|
1879
|
-
return
|
|
2322
|
+
return `${selectedMonths.length} months`;
|
|
1880
2323
|
}
|
|
1881
|
-
return t("
|
|
2324
|
+
return t("label.flexible", "Flexible");
|
|
1882
2325
|
};
|
|
1883
2326
|
const handleDateRangeChange = (range) => {
|
|
1884
2327
|
setDateRange(range ?? { start: null, end: null });
|
|
@@ -1904,17 +2347,17 @@ var DateSelector = ({
|
|
|
1904
2347
|
onClose?.(newDateRange, newMonthFilter);
|
|
1905
2348
|
};
|
|
1906
2349
|
const buttonClasses = [
|
|
1907
|
-
|
|
2350
|
+
cx20("button"),
|
|
1908
2351
|
disabled && cxMod3("button", "disabled"),
|
|
1909
2352
|
className
|
|
1910
2353
|
].filter(Boolean).join(" ");
|
|
1911
2354
|
const dropdownClasses = [
|
|
1912
|
-
|
|
2355
|
+
cx20("dropdown"),
|
|
1913
2356
|
isOpen && cxMod3("dropdown", "open"),
|
|
1914
2357
|
!isDesktop && cxMod3("dropdown", "mobile")
|
|
1915
2358
|
].filter(Boolean).join(" ");
|
|
1916
|
-
return /* @__PURE__ */
|
|
1917
|
-
/* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ jsxs20("div", { ref: dropdownRef, className: cx20(""), children: [
|
|
2360
|
+
/* @__PURE__ */ jsxs20(
|
|
1918
2361
|
"button",
|
|
1919
2362
|
{
|
|
1920
2363
|
type: "button",
|
|
@@ -1922,13 +2365,13 @@ var DateSelector = ({
|
|
|
1922
2365
|
onClick: () => !disabled && setIsOpen((v) => !v),
|
|
1923
2366
|
disabled,
|
|
1924
2367
|
children: [
|
|
1925
|
-
/* @__PURE__ */
|
|
1926
|
-
/* @__PURE__ */
|
|
2368
|
+
/* @__PURE__ */ jsx21("span", { className: cx20("icon"), children: icon || /* @__PURE__ */ jsx21(CalendarIcon, {}) }),
|
|
2369
|
+
/* @__PURE__ */ jsx21("span", { className: cx20("label"), children: formatDateDisplay() })
|
|
1927
2370
|
]
|
|
1928
2371
|
}
|
|
1929
2372
|
),
|
|
1930
|
-
isOpen && /* @__PURE__ */
|
|
1931
|
-
/* @__PURE__ */
|
|
2373
|
+
isOpen && /* @__PURE__ */ jsx21("div", { className: cx20("backdrop"), onClick: handleBackdropClick, "aria-hidden": "true" }),
|
|
2374
|
+
/* @__PURE__ */ jsx21("div", { className: dropdownClasses, children: /* @__PURE__ */ jsx21(
|
|
1932
2375
|
WhenContent,
|
|
1933
2376
|
{
|
|
1934
2377
|
initialDateRange: dateRange,
|
|
@@ -1945,10 +2388,10 @@ var DateSelector = ({
|
|
|
1945
2388
|
DateSelector.displayName = "DateSelector";
|
|
1946
2389
|
|
|
1947
2390
|
// src/components/GuestSelector/GuestContent.tsx
|
|
1948
|
-
import { jsx as
|
|
1949
|
-
var MinusIcon = () => /* @__PURE__ */
|
|
1950
|
-
var PlusIcon = () => /* @__PURE__ */
|
|
1951
|
-
var DropdownIcon = () => /* @__PURE__ */
|
|
2391
|
+
import { jsx as jsx22, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2392
|
+
var MinusIcon = () => /* @__PURE__ */ jsx22("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx22("path", { d: "M0 10C0 9.48047 0.477679 9.0625 1.07143 9.0625H18.9286C19.5223 9.0625 20 9.48047 20 10C20 10.5195 19.5223 10.9375 18.9286 10.9375H1.07143C0.477679 10.9375 0 10.5195 0 10Z", fill: "currentColor" }) });
|
|
2393
|
+
var PlusIcon = () => /* @__PURE__ */ jsx22("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx22("path", { d: "M11.0714 2.1875C11.0714 1.66797 10.5938 1.25 10 1.25C9.40625 1.25 8.92857 1.66797 8.92857 2.1875V9.0625H1.07143C0.477679 9.0625 0 9.48047 0 10C0 10.5195 0.477679 10.9375 1.07143 10.9375H8.92857V17.8125C8.92857 18.332 9.40625 18.75 10 18.75C10.5938 18.75 11.0714 18.332 11.0714 17.8125V10.9375H18.9286C19.5223 10.9375 20 10.5195 20 10C20 9.48047 19.5223 9.0625 18.9286 9.0625H11.0714V2.1875Z", fill: "currentColor" }) });
|
|
2394
|
+
var DropdownIcon = () => /* @__PURE__ */ jsx22(
|
|
1952
2395
|
"svg",
|
|
1953
2396
|
{
|
|
1954
2397
|
className: "hc-guest-content__select-icon",
|
|
@@ -1957,7 +2400,7 @@ var DropdownIcon = () => /* @__PURE__ */ jsx23(
|
|
|
1957
2400
|
height: "24",
|
|
1958
2401
|
viewBox: "0 0 24 24",
|
|
1959
2402
|
fill: "none",
|
|
1960
|
-
children: /* @__PURE__ */
|
|
2403
|
+
children: /* @__PURE__ */ jsx22(
|
|
1961
2404
|
"path",
|
|
1962
2405
|
{
|
|
1963
2406
|
d: "M11.24 16.6873C11.6598 17.1042 12.3386 17.1042 12.7539 16.6873L19.6852 9.81633C20.1049 9.39939 20.1049 8.7252 19.6852 8.3127C19.2654 7.9002 18.5866 7.89577 18.1713 8.3127L11.9992 14.4296L5.82701 8.3127C5.40724 7.89577 4.72846 7.89577 4.31316 8.3127C3.89785 8.72964 3.89338 9.40383 4.31316 9.81633L11.2445 16.6873H11.24Z",
|
|
@@ -1966,18 +2409,6 @@ var DropdownIcon = () => /* @__PURE__ */ jsx23(
|
|
|
1966
2409
|
)
|
|
1967
2410
|
}
|
|
1968
2411
|
);
|
|
1969
|
-
var defaultLabels2 = {
|
|
1970
|
-
adults: "Adults",
|
|
1971
|
-
children: "Children",
|
|
1972
|
-
pet: "Pet",
|
|
1973
|
-
ageOfChild: "Age of child",
|
|
1974
|
-
age: "Age",
|
|
1975
|
-
decreaseAdults: "Decrease adults",
|
|
1976
|
-
increaseAdults: "Increase adults",
|
|
1977
|
-
decreaseChildren: "Decrease children",
|
|
1978
|
-
increaseChildren: "Increase children",
|
|
1979
|
-
togglePets: "Toggle pets"
|
|
1980
|
-
};
|
|
1981
2412
|
var GuestContent = ({
|
|
1982
2413
|
guests,
|
|
1983
2414
|
onChange,
|
|
@@ -1986,10 +2417,21 @@ var GuestContent = ({
|
|
|
1986
2417
|
showPetToggle = true,
|
|
1987
2418
|
className = "",
|
|
1988
2419
|
childAgeErrors = [],
|
|
1989
|
-
onErrorClear
|
|
1990
|
-
labels: labelsProp
|
|
2420
|
+
onErrorClear
|
|
1991
2421
|
}) => {
|
|
1992
|
-
const
|
|
2422
|
+
const { t } = useUIContext();
|
|
2423
|
+
const labels = {
|
|
2424
|
+
adults: t("form.adults", "Adults"),
|
|
2425
|
+
children: t("form.children", "Children"),
|
|
2426
|
+
pet: t("form.pet", "Pet"),
|
|
2427
|
+
ageOfChild: t("form.age-of-child", "Age of child"),
|
|
2428
|
+
age: t("form.age", "Age"),
|
|
2429
|
+
decreaseAdults: "Decrease adults",
|
|
2430
|
+
increaseAdults: "Increase adults",
|
|
2431
|
+
decreaseChildren: "Decrease children",
|
|
2432
|
+
increaseChildren: "Increase children",
|
|
2433
|
+
togglePets: "Toggle pets"
|
|
2434
|
+
};
|
|
1993
2435
|
const childrenAges = Array.isArray(guests.childrenAges) ? guests.childrenAges : [];
|
|
1994
2436
|
const handleIncrement = (type) => {
|
|
1995
2437
|
if (type === "children" && guests.children >= 6) return;
|
|
@@ -2021,11 +2463,11 @@ var GuestContent = ({
|
|
|
2021
2463
|
onErrorClear?.(index);
|
|
2022
2464
|
};
|
|
2023
2465
|
const containerClasses = ["hc-guest-content", className].filter(Boolean).join(" ");
|
|
2024
|
-
return /* @__PURE__ */
|
|
2025
|
-
/* @__PURE__ */
|
|
2026
|
-
/* @__PURE__ */
|
|
2027
|
-
/* @__PURE__ */
|
|
2028
|
-
/* @__PURE__ */
|
|
2466
|
+
return /* @__PURE__ */ jsxs21("div", { className: containerClasses, children: [
|
|
2467
|
+
/* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__row", children: [
|
|
2468
|
+
/* @__PURE__ */ jsx22("div", { className: "hc-guest-content__label", children: /* @__PURE__ */ jsx22("span", { className: "hc-guest-content__name", children: labels.adults }) }),
|
|
2469
|
+
/* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__counter", children: [
|
|
2470
|
+
/* @__PURE__ */ jsx22(
|
|
2029
2471
|
"button",
|
|
2030
2472
|
{
|
|
2031
2473
|
type: "button",
|
|
@@ -2033,11 +2475,11 @@ var GuestContent = ({
|
|
|
2033
2475
|
onClick: () => handleDecrement("adults"),
|
|
2034
2476
|
disabled: guests.adults <= 1,
|
|
2035
2477
|
"aria-label": labels.decreaseAdults,
|
|
2036
|
-
children: /* @__PURE__ */
|
|
2478
|
+
children: /* @__PURE__ */ jsx22(MinusIcon, {})
|
|
2037
2479
|
}
|
|
2038
2480
|
),
|
|
2039
|
-
/* @__PURE__ */
|
|
2040
|
-
/* @__PURE__ */
|
|
2481
|
+
/* @__PURE__ */ jsx22("span", { className: "hc-guest-content__counter-value", children: guests.adults }),
|
|
2482
|
+
/* @__PURE__ */ jsx22(
|
|
2041
2483
|
"button",
|
|
2042
2484
|
{
|
|
2043
2485
|
type: "button",
|
|
@@ -2045,16 +2487,16 @@ var GuestContent = ({
|
|
|
2045
2487
|
onClick: () => handleIncrement("adults"),
|
|
2046
2488
|
disabled: guests.adults >= 10,
|
|
2047
2489
|
"aria-label": labels.increaseAdults,
|
|
2048
|
-
children: /* @__PURE__ */
|
|
2490
|
+
children: /* @__PURE__ */ jsx22(PlusIcon, {})
|
|
2049
2491
|
}
|
|
2050
2492
|
)
|
|
2051
2493
|
] })
|
|
2052
2494
|
] }),
|
|
2053
|
-
/* @__PURE__ */
|
|
2054
|
-
/* @__PURE__ */
|
|
2055
|
-
/* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2495
|
+
/* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__row hc-guest-content__row--children", children: [
|
|
2496
|
+
/* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__row-header", children: [
|
|
2497
|
+
/* @__PURE__ */ jsx22("div", { className: "hc-guest-content__label", children: /* @__PURE__ */ jsx22("span", { className: "hc-guest-content__name", children: labels.children }) }),
|
|
2498
|
+
/* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__counter", children: [
|
|
2499
|
+
/* @__PURE__ */ jsx22(
|
|
2058
2500
|
"button",
|
|
2059
2501
|
{
|
|
2060
2502
|
type: "button",
|
|
@@ -2062,11 +2504,11 @@ var GuestContent = ({
|
|
|
2062
2504
|
onClick: () => handleDecrement("children"),
|
|
2063
2505
|
disabled: guests.children <= 0,
|
|
2064
2506
|
"aria-label": labels.decreaseChildren,
|
|
2065
|
-
children: /* @__PURE__ */
|
|
2507
|
+
children: /* @__PURE__ */ jsx22(MinusIcon, {})
|
|
2066
2508
|
}
|
|
2067
2509
|
),
|
|
2068
|
-
/* @__PURE__ */
|
|
2069
|
-
/* @__PURE__ */
|
|
2510
|
+
/* @__PURE__ */ jsx22("span", { className: "hc-guest-content__counter-value", children: guests.children }),
|
|
2511
|
+
/* @__PURE__ */ jsx22(
|
|
2070
2512
|
"button",
|
|
2071
2513
|
{
|
|
2072
2514
|
type: "button",
|
|
@@ -2074,12 +2516,12 @@ var GuestContent = ({
|
|
|
2074
2516
|
onClick: () => handleIncrement("children"),
|
|
2075
2517
|
disabled: guests.children >= 6,
|
|
2076
2518
|
"aria-label": labels.increaseChildren,
|
|
2077
|
-
children: /* @__PURE__ */
|
|
2519
|
+
children: /* @__PURE__ */ jsx22(PlusIcon, {})
|
|
2078
2520
|
}
|
|
2079
2521
|
)
|
|
2080
2522
|
] })
|
|
2081
2523
|
] }),
|
|
2082
|
-
guests.children > 0 && /* @__PURE__ */
|
|
2524
|
+
guests.children > 0 && /* @__PURE__ */ jsx22(
|
|
2083
2525
|
"div",
|
|
2084
2526
|
{
|
|
2085
2527
|
className: "hc-guest-content__children-dropdowns",
|
|
@@ -2090,10 +2532,10 @@ var GuestContent = ({
|
|
|
2090
2532
|
const currentAge = childrenAges[index];
|
|
2091
2533
|
const hasError = childAgeErrors.some((error) => error.index === index);
|
|
2092
2534
|
const errorMessage = childAgeErrors.find((error) => error.index === index)?.message;
|
|
2093
|
-
return /* @__PURE__ */
|
|
2094
|
-
/* @__PURE__ */
|
|
2095
|
-
/* @__PURE__ */
|
|
2096
|
-
/* @__PURE__ */
|
|
2535
|
+
return /* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__child-dropdown", children: [
|
|
2536
|
+
/* @__PURE__ */ jsx22("label", { htmlFor: `child-age-${index}`, children: labels.ageOfChild }),
|
|
2537
|
+
/* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__select-wrapper", children: [
|
|
2538
|
+
/* @__PURE__ */ jsxs21(
|
|
2097
2539
|
"select",
|
|
2098
2540
|
{
|
|
2099
2541
|
id: `child-age-${index}`,
|
|
@@ -2103,23 +2545,23 @@ var GuestContent = ({
|
|
|
2103
2545
|
"aria-invalid": hasError,
|
|
2104
2546
|
"aria-describedby": hasError ? `error-${index}` : void 0,
|
|
2105
2547
|
children: [
|
|
2106
|
-
/* @__PURE__ */
|
|
2107
|
-
Array.from({ length: 18 }, (_2, age) => /* @__PURE__ */
|
|
2548
|
+
/* @__PURE__ */ jsx22("option", { value: "", children: labels.age }),
|
|
2549
|
+
Array.from({ length: 18 }, (_2, age) => /* @__PURE__ */ jsx22("option", { value: age, children: age }, age))
|
|
2108
2550
|
]
|
|
2109
2551
|
}
|
|
2110
2552
|
),
|
|
2111
|
-
/* @__PURE__ */
|
|
2553
|
+
/* @__PURE__ */ jsx22(DropdownIcon, {})
|
|
2112
2554
|
] }),
|
|
2113
|
-
hasError && /* @__PURE__ */
|
|
2555
|
+
hasError && /* @__PURE__ */ jsx22("span", { id: `error-${index}`, className: "hc-guest-content__error-text", children: errorMessage })
|
|
2114
2556
|
] }, index);
|
|
2115
2557
|
})
|
|
2116
2558
|
}
|
|
2117
2559
|
)
|
|
2118
2560
|
] }),
|
|
2119
|
-
showPetToggle && /* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
/* @__PURE__ */
|
|
2561
|
+
showPetToggle && /* @__PURE__ */ jsxs21("div", { className: "hc-guest-content__row", children: [
|
|
2562
|
+
/* @__PURE__ */ jsx22("div", { className: "hc-guest-content__label", children: /* @__PURE__ */ jsx22("span", { className: "hc-guest-content__name", children: labels.pet }) }),
|
|
2563
|
+
/* @__PURE__ */ jsx22("div", { className: "hc-guest-content__toggle-wrapper", children: /* @__PURE__ */ jsxs21("label", { className: "hc-guest-content__toggle", children: [
|
|
2564
|
+
/* @__PURE__ */ jsx22(
|
|
2123
2565
|
"input",
|
|
2124
2566
|
{
|
|
2125
2567
|
type: "checkbox",
|
|
@@ -2128,15 +2570,347 @@ var GuestContent = ({
|
|
|
2128
2570
|
"aria-label": labels.togglePets
|
|
2129
2571
|
}
|
|
2130
2572
|
),
|
|
2131
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ jsx22("span", { className: "hc-guest-content__slider" })
|
|
2132
2574
|
] }) })
|
|
2133
2575
|
] })
|
|
2134
2576
|
] });
|
|
2135
2577
|
};
|
|
2136
2578
|
|
|
2579
|
+
// src/components/HotelCard/HotelCardImage.tsx
|
|
2580
|
+
import { useState as useState10, useRef as useRef5 } from "react";
|
|
2581
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2582
|
+
var MAX_IMAGES = 5;
|
|
2583
|
+
var SWIPE_THRESHOLD = 50;
|
|
2584
|
+
var HOTEL_PLACEHOLDER = 'data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="400" height="300" fill="%23e5e7eb"%3E%3Crect width="400" height="300" /%3E%3C/svg%3E';
|
|
2585
|
+
var BuildingIcon = () => /* @__PURE__ */ jsxs22("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
2586
|
+
/* @__PURE__ */ jsx23("g", { clipPath: "url(#clip0_building)", children: /* @__PURE__ */ jsx23("path", { d: "M0.75 0C0.334375 0 0 0.334375 0 0.75C0 1.16562 0.334375 1.5 0.75 1.5H1V14.5H0.75C0.334375 14.5 0 14.8344 0 15.25C0 15.6656 0.334375 16 0.75 16H15.25C15.6656 16 16 15.6656 16 15.25C16 14.8344 15.6656 14.5 15.25 14.5H15V1.5H15.25C15.6656 1.5 16 1.16562 16 0.75C16 0.334375 15.6656 0 15.25 0H0.75ZM13.5 14.5H9V12H10.5C10.775 12 11.0031 11.775 10.9594 11.5031C10.7219 10.0844 9.4875 9 8 9C6.5125 9 5.27813 10.0813 5.04063 11.5031C4.99375 11.775 5.22188 12 5.5 12H7V14.5H2.5V1.5H13.5V14.5ZM4.5 3C4.225 3 4 3.225 4 3.5V4.5C4 4.775 4.225 5 4.5 5H5.5C5.775 5 6 4.775 6 4.5V3.5C6 3.225 5.775 3 5.5 3H4.5ZM7 3.5V4.5C7 4.775 7.225 5 7.5 5H8.5C8.775 5 9 4.775 9 4.5V3.5C9 3.225 8.775 3 8.5 3H7.5C7.225 3 7 3.225 7 3.5ZM10.5 3C10.225 3 10 3.225 10 3.5V4.5C10 4.775 10.225 5 10.5 5H11.5C11.775 5 12 4.775 12 4.5V3.5C12 3.225 11.775 3 11.5 3H10.5ZM4 6.5V7.5C4 7.775 4.225 8 4.5 8H5.5C5.775 8 6 7.775 6 7.5V6.5C6 6.225 5.775 6 5.5 6H4.5C4.225 6 4 6.225 4 6.5ZM7.5 6C7.225 6 7 6.225 7 6.5V7.5C7 7.775 7.225 8 7.5 8H8.5C8.775 8 9 7.775 9 7.5V6.5C9 6.225 8.775 6 8.5 6H7.5ZM10 6.5V7.5C10 7.775 10.225 8 10.5 8H11.5C11.775 8 12 7.775 12 7.5V6.5C12 6.225 11.775 6 11.5 6H10.5C10.225 6 10 6.225 10 6.5Z", fill: "white" }) }),
|
|
2587
|
+
/* @__PURE__ */ jsx23("defs", { children: /* @__PURE__ */ jsx23("clipPath", { id: "clip0_building", children: /* @__PURE__ */ jsx23("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
2588
|
+
] });
|
|
2589
|
+
var ArrowLeftIcon = () => /* @__PURE__ */ jsx23("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx23("path", { d: "M12.5 15L7.5 10L12.5 5", stroke: "#1F2937", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2590
|
+
var ArrowRightIcon = () => /* @__PURE__ */ jsx23("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ jsx23("path", { d: "M7.5 15L12.5 10L7.5 5", stroke: "#1F2937", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2591
|
+
var HeartIcon2 = ({ filled }) => /* @__PURE__ */ jsxs22(
|
|
2592
|
+
"svg",
|
|
2593
|
+
{
|
|
2594
|
+
width: "24",
|
|
2595
|
+
height: "24",
|
|
2596
|
+
viewBox: "0 0 24 24",
|
|
2597
|
+
fill: "none",
|
|
2598
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2599
|
+
className: filled ? "hc-hotel-card__heart-icon--filled" : "hc-hotel-card__heart-icon",
|
|
2600
|
+
children: [
|
|
2601
|
+
/* @__PURE__ */ jsxs22("g", { clipPath: "url(#clip0_heart)", children: [
|
|
2602
|
+
/* @__PURE__ */ jsx23(
|
|
2603
|
+
"path",
|
|
2604
|
+
{
|
|
2605
|
+
d: "M12.7031 4.58281C13.875 2.96094 15.7594 2 17.7609 2C21.2062 2 24 4.79375 24 8.23906C24 11.4547 21.9891 14.2812 20.2922 16.3391C18.225 18.8516 15.7313 21.0312 14.0203 22.3344C13.4438 22.775 12.7312 22.9953 12 22.9953C11.2688 22.9953 10.5562 22.775 9.97969 22.3344C8.26875 21.0312 5.775 18.8516 3.70781 16.3438C2.01094 14.2859 0 11.4547 0 8.23906C0 4.79375 2.79375 2 6.23906 2C8.24063 2 10.125 2.96094 11.2969 4.58281L12 5.55313L12.7031 4.58281Z",
|
|
2606
|
+
fill: "white"
|
|
2607
|
+
}
|
|
2608
|
+
),
|
|
2609
|
+
/* @__PURE__ */ jsx23(
|
|
2610
|
+
"path",
|
|
2611
|
+
{
|
|
2612
|
+
d: "M17.7609 4.25C16.4812 4.25 15.2766 4.86406 14.5266 5.9L12.9141 8.13125C12.7031 8.42188 12.3656 8.59531 12.0047 8.59531C11.6438 8.59531 11.3062 8.42188 11.0953 8.13125L9.48281 5.9C8.73281 4.86406 7.52813 4.25 6.24844 4.25C4.04531 4.25 2.25938 6.03594 2.25938 8.23906C2.25938 10.5781 3.75938 12.8516 5.45156 14.9094C7.37813 17.2531 9.73594 19.3156 11.3531 20.5484C11.5031 20.6609 11.7234 20.7453 12.0094 20.7453C12.2953 20.7453 12.5156 20.6609 12.6656 20.5484C14.2828 19.3156 16.6406 17.2484 18.5672 14.9094C20.2641 12.8516 21.7594 10.5781 21.7594 8.23906C21.7594 6.03594 19.9734 4.25 17.7703 4.25H17.7609ZM12.7031 4.58281C13.875 2.96094 15.7594 2 17.7609 2C21.2062 2 24 4.79375 24 8.23906C24 11.4547 21.9891 14.2812 20.2922 16.3391C18.225 18.8516 15.7313 21.0312 14.0203 22.3344C13.4438 22.775 12.7312 22.9953 12 22.9953C11.2688 22.9953 10.5562 22.775 9.97969 22.3344C8.26875 21.0312 5.775 18.8516 3.70781 16.3438C2.01094 14.2859 0 11.4547 0 8.23906C0 4.79375 2.79375 2 6.23906 2C8.24063 2 10.125 2.96094 11.2969 4.58281L12 5.55313L12.7031 4.58281Z",
|
|
2613
|
+
fill: "#4B5563"
|
|
2614
|
+
}
|
|
2615
|
+
)
|
|
2616
|
+
] }),
|
|
2617
|
+
/* @__PURE__ */ jsx23("defs", { children: /* @__PURE__ */ jsx23("clipPath", { id: "clip0_heart", children: /* @__PURE__ */ jsx23("rect", { width: "24", height: "24", fill: "white" }) }) })
|
|
2618
|
+
]
|
|
2619
|
+
}
|
|
2620
|
+
);
|
|
2621
|
+
var HotelCardImage = ({
|
|
2622
|
+
images,
|
|
2623
|
+
hotelName,
|
|
2624
|
+
badges,
|
|
2625
|
+
isFavorite,
|
|
2626
|
+
onFavoriteClick
|
|
2627
|
+
}) => {
|
|
2628
|
+
const labels = {
|
|
2629
|
+
removeFromFavorites: "Remove from favorites",
|
|
2630
|
+
addToFavorites: "Add to favorites",
|
|
2631
|
+
previousImage: "Previous image",
|
|
2632
|
+
nextImage: "Next image"
|
|
2633
|
+
};
|
|
2634
|
+
const displayImages = images.slice(0, MAX_IMAGES);
|
|
2635
|
+
const [currentImageIndex, setCurrentImageIndex] = useState10(0);
|
|
2636
|
+
const [failedImages, setFailedImages] = useState10(/* @__PURE__ */ new Set());
|
|
2637
|
+
const [touchStart, setTouchStart] = useState10(null);
|
|
2638
|
+
const [touchEnd, setTouchEnd] = useState10(null);
|
|
2639
|
+
const [isDragging, setIsDragging] = useState10(false);
|
|
2640
|
+
const imageRef = useRef5(null);
|
|
2641
|
+
const handleImageError = (index) => {
|
|
2642
|
+
setFailedImages((prev) => new Set(prev).add(index));
|
|
2643
|
+
};
|
|
2644
|
+
const getImageSrc = (index) => {
|
|
2645
|
+
if (failedImages.has(index)) return HOTEL_PLACEHOLDER;
|
|
2646
|
+
return displayImages[index] || HOTEL_PLACEHOLDER;
|
|
2647
|
+
};
|
|
2648
|
+
const goToPreviousImage = () => {
|
|
2649
|
+
setCurrentImageIndex((prev) => prev === 0 ? displayImages.length - 1 : prev - 1);
|
|
2650
|
+
};
|
|
2651
|
+
const goToNextImage = () => {
|
|
2652
|
+
setCurrentImageIndex((prev) => prev === displayImages.length - 1 ? 0 : prev + 1);
|
|
2653
|
+
};
|
|
2654
|
+
const handlePrevImage = (e) => {
|
|
2655
|
+
e.preventDefault();
|
|
2656
|
+
e.stopPropagation();
|
|
2657
|
+
goToPreviousImage();
|
|
2658
|
+
};
|
|
2659
|
+
const handleNextImage = (e) => {
|
|
2660
|
+
e.preventDefault();
|
|
2661
|
+
e.stopPropagation();
|
|
2662
|
+
goToNextImage();
|
|
2663
|
+
};
|
|
2664
|
+
const handleTouchStart = (e) => {
|
|
2665
|
+
e.stopPropagation();
|
|
2666
|
+
setTouchEnd(null);
|
|
2667
|
+
setTouchStart(e.targetTouches[0].clientX);
|
|
2668
|
+
setIsDragging(true);
|
|
2669
|
+
};
|
|
2670
|
+
const handleTouchMove = (e) => {
|
|
2671
|
+
e.stopPropagation();
|
|
2672
|
+
if (!touchStart) return;
|
|
2673
|
+
setTouchEnd(e.targetTouches[0].clientX);
|
|
2674
|
+
};
|
|
2675
|
+
const handleTouchEnd = (e) => {
|
|
2676
|
+
e.stopPropagation();
|
|
2677
|
+
setIsDragging(false);
|
|
2678
|
+
if (!touchStart || !touchEnd) return;
|
|
2679
|
+
const distance = touchStart - touchEnd;
|
|
2680
|
+
if (distance > SWIPE_THRESHOLD) goToNextImage();
|
|
2681
|
+
else if (distance < -SWIPE_THRESHOLD) goToPreviousImage();
|
|
2682
|
+
setTouchStart(null);
|
|
2683
|
+
setTouchEnd(null);
|
|
2684
|
+
};
|
|
2685
|
+
const handleFavorite = (e) => {
|
|
2686
|
+
e.preventDefault();
|
|
2687
|
+
e.stopPropagation();
|
|
2688
|
+
onFavoriteClick();
|
|
2689
|
+
};
|
|
2690
|
+
return /* @__PURE__ */ jsxs22(
|
|
2691
|
+
"div",
|
|
2692
|
+
{
|
|
2693
|
+
className: "hc-hotel-card__image-section",
|
|
2694
|
+
ref: imageRef,
|
|
2695
|
+
onTouchStart: handleTouchStart,
|
|
2696
|
+
onTouchMove: handleTouchMove,
|
|
2697
|
+
onTouchEnd: handleTouchEnd,
|
|
2698
|
+
style: { cursor: isDragging ? "grabbing" : "grab" },
|
|
2699
|
+
children: [
|
|
2700
|
+
/* @__PURE__ */ jsx23(
|
|
2701
|
+
"img",
|
|
2702
|
+
{
|
|
2703
|
+
src: getImageSrc(currentImageIndex),
|
|
2704
|
+
alt: `${hotelName} - Image ${currentImageIndex + 1} of ${displayImages.length}`,
|
|
2705
|
+
className: "hc-hotel-card__image",
|
|
2706
|
+
loading: "lazy",
|
|
2707
|
+
onError: () => handleImageError(currentImageIndex),
|
|
2708
|
+
draggable: "false"
|
|
2709
|
+
}
|
|
2710
|
+
),
|
|
2711
|
+
/* @__PURE__ */ jsx23("div", { className: "hc-hotel-card__image-overlay" }),
|
|
2712
|
+
/* @__PURE__ */ jsxs22("div", { className: "hc-hotel-card__top-overlay", children: [
|
|
2713
|
+
/* @__PURE__ */ jsx23("div", { className: "hc-hotel-card__badges-column", children: badges?.map((badge, index) => /* @__PURE__ */ jsxs22("div", { className: "hc-hotel-card__new-badge", children: [
|
|
2714
|
+
/* @__PURE__ */ jsx23(BuildingIcon, {}),
|
|
2715
|
+
/* @__PURE__ */ jsx23("span", { children: badge })
|
|
2716
|
+
] }, index)) }),
|
|
2717
|
+
/* @__PURE__ */ jsx23(
|
|
2718
|
+
"button",
|
|
2719
|
+
{
|
|
2720
|
+
className: "hc-hotel-card__favorite-button",
|
|
2721
|
+
onClick: handleFavorite,
|
|
2722
|
+
"aria-label": isFavorite ? labels.removeFromFavorites : labels.addToFavorites,
|
|
2723
|
+
type: "button",
|
|
2724
|
+
children: /* @__PURE__ */ jsx23(HeartIcon2, { filled: isFavorite })
|
|
2725
|
+
}
|
|
2726
|
+
)
|
|
2727
|
+
] }),
|
|
2728
|
+
displayImages.length > 1 && /* @__PURE__ */ jsxs22(Fragment4, { children: [
|
|
2729
|
+
/* @__PURE__ */ jsx23(
|
|
2730
|
+
"button",
|
|
2731
|
+
{
|
|
2732
|
+
className: "hc-hotel-card__nav-button hc-hotel-card__nav-button--left",
|
|
2733
|
+
onClick: handlePrevImage,
|
|
2734
|
+
"aria-label": labels.previousImage,
|
|
2735
|
+
type: "button",
|
|
2736
|
+
children: /* @__PURE__ */ jsx23(ArrowLeftIcon, {})
|
|
2737
|
+
}
|
|
2738
|
+
),
|
|
2739
|
+
/* @__PURE__ */ jsx23(
|
|
2740
|
+
"button",
|
|
2741
|
+
{
|
|
2742
|
+
className: "hc-hotel-card__nav-button hc-hotel-card__nav-button--right",
|
|
2743
|
+
onClick: handleNextImage,
|
|
2744
|
+
"aria-label": labels.nextImage,
|
|
2745
|
+
type: "button",
|
|
2746
|
+
children: /* @__PURE__ */ jsx23(ArrowRightIcon, {})
|
|
2747
|
+
}
|
|
2748
|
+
),
|
|
2749
|
+
/* @__PURE__ */ jsx23("div", { className: "hc-hotel-card__image-indicator", children: displayImages.map((_, index) => /* @__PURE__ */ jsx23(
|
|
2750
|
+
"span",
|
|
2751
|
+
{
|
|
2752
|
+
className: `hc-hotel-card__indicator-dot ${index === currentImageIndex ? "hc-hotel-card__indicator-dot--active" : ""}`
|
|
2753
|
+
},
|
|
2754
|
+
index
|
|
2755
|
+
)) })
|
|
2756
|
+
] })
|
|
2757
|
+
]
|
|
2758
|
+
}
|
|
2759
|
+
);
|
|
2760
|
+
};
|
|
2761
|
+
|
|
2762
|
+
// src/components/HotelCard/HotelCardContent.tsx
|
|
2763
|
+
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2764
|
+
var StarIcon3 = () => /* @__PURE__ */ jsxs23("svg", { xmlns: "http://www.w3.org/2000/svg", width: "9", height: "9", viewBox: "0 0 9 9", fill: "none", children: [
|
|
2765
|
+
/* @__PURE__ */ jsx24("g", { clipPath: "url(#clip0_star)", children: /* @__PURE__ */ jsx24("path", { d: "M4.80018 0.366577C4.93104 0.366577 5.05173 0.440968 5.11135 0.557659L6.18011 2.66102L8.50521 3.03152C8.63462 3.05194 8.74222 3.14383 8.78294 3.26927C8.82365 3.39472 8.79021 3.53183 8.6986 3.62518L7.03366 5.29533L7.40155 7.6277C7.42191 7.75752 7.3681 7.88879 7.26195 7.9661C7.15581 8.04341 7.01476 8.05508 6.89843 7.99528L4.80018 6.92463L2.70192 7.99528C2.58559 8.05508 2.44454 8.04341 2.33839 7.9661C2.23225 7.88879 2.17844 7.75898 2.1988 7.6277L2.56523 5.29533L0.901751 3.62518C0.808689 3.53183 0.776699 3.39472 0.817413 3.26927C0.858128 3.14383 0.964277 3.05194 1.09515 3.03152L3.42024 2.66102L4.49045 0.557659C4.55007 0.440968 4.67076 0.366577 4.80163 0.366577H4.80018Z", fill: "#1F2937" }) }),
|
|
2766
|
+
/* @__PURE__ */ jsx24("defs", { children: /* @__PURE__ */ jsx24("clipPath", { id: "clip0_star", children: /* @__PURE__ */ jsx24("rect", { width: "8", height: "8", fill: "white", transform: "translate(0.800049 0.199951)" }) }) })
|
|
2767
|
+
] });
|
|
2768
|
+
var PinIcon = () => /* @__PURE__ */ jsx24("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx24("path", { d: "M8 1.5C5.51562 1.5 3.5 3.51562 3.5 6C3.5 9.5 8 14 8 14C8 14 12.5 9.5 12.5 6C12.5 3.51562 10.4844 1.5 8 1.5ZM8 7.75C7.0325 7.75 6.25 6.9675 6.25 6C6.25 5.0325 7.0325 4.25 8 4.25C8.9675 4.25 9.75 5.0325 9.75 6C9.75 6.9675 8.9675 7.75 8 7.75Z", fill: "#6B7280" }) });
|
|
2769
|
+
var BreakfastIcon = () => /* @__PURE__ */ jsxs23("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
|
2770
|
+
/* @__PURE__ */ jsx24("g", { clipPath: "url(#clip0_breakfast)", children: /* @__PURE__ */ jsx24("path", { d: "M8 1.5C9.525 1.5 10.9281 2.025 12.0344 2.90313L9.4125 5.525L7.975 1.5H8ZM13.0969 3.96563C13.4656 4.43125 13.7719 4.94687 14.0031 5.5H11.5625L13.0969 3.96563ZM10.0594 7H14.3969C15.1875 7 15.8563 6.23438 15.5656 5.39375C14.4844 2.25625 11.5062 0 8 0C3.58125 0 0 3.58125 0 8C0 11.5062 2.25625 14.4844 5.39375 15.5656C6.23438 15.8563 7 15.1875 7 14.3969V10.0594L7.12187 9.9375L7.39375 10.0531C7.8625 10.2531 8.40938 10.15 8.76875 9.7875L9.80625 8.75C10.1469 8.40938 10.2625 7.9 10.1 7.44688L9.97188 7.0875L10.0625 6.99687L10.0594 7ZM5.6375 9.30313L2.90313 12.0344C2.025 10.925 1.5 9.52188 1.5 8C1.5 7.84375 1.50625 7.69062 1.51562 7.5375L5.63438 9.30313H5.6375ZM3.96563 13.0969L5.5 11.5625V14.0031C4.94375 13.7719 4.42813 13.4656 3.96563 13.0969ZM1.80313 6.02812C2.48438 3.8875 4.24687 2.225 6.45 1.6875L8.63437 7.80625L7.82812 8.6125L1.80313 6.03125V6.02812Z", fill: "#006962" }) }),
|
|
2771
|
+
/* @__PURE__ */ jsx24("defs", { children: /* @__PURE__ */ jsx24("clipPath", { id: "clip0_breakfast", children: /* @__PURE__ */ jsx24("rect", { width: "16", height: "16", fill: "white" }) }) })
|
|
2772
|
+
] });
|
|
2773
|
+
var FreeCancellationIcon = () => /* @__PURE__ */ jsx24("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx24("path", { d: "M0.838695 4.18584L2.62218 6.00458C2.85502 6.24202 3.23153 6.24202 3.4619 6.00458C3.69227 5.76713 3.69474 5.38317 3.4619 5.14825L2.69401 4.36518L3.66406 4.36518C3.9974 4.36518 4.33073 4.36518 4.37346 4.36518C4.66406 4.36518 4.66406 4.36518 4.9974 4.36518L5.22309 4.36518H5.22804H11.5644C11.5644 5.25687 12.2753 5.98184 13.1497 5.98184V8.61902C13.5386 8.66196 13.9151 8.83625 14.2123 9.13938L14.3387 9.26821V4.76682C14.3387 3.87513 13.6278 3.15016 12.7533 3.15016H4.37346H2.69649L3.46438 2.3671C3.69722 2.12965 3.69722 1.74569 3.46438 1.51077C3.23153 1.27585 2.85502 1.27332 2.62218 1.50825L0.838695 3.32699C0.605852 3.56443 0.605852 3.94839 0.838695 4.18331V4.18584ZM1.65612 6.73207V11.2335C1.65612 12.1251 2.36704 12.8501 3.24144 12.8501H13.3008L12.5329 13.6332C12.3 13.8706 12.3 14.2546 12.5329 14.4895C12.7657 14.7244 13.1422 14.727 13.3726 14.4895L15.1561 12.6708C15.3889 12.4333 15.3889 12.0494 15.1561 11.8144L13.3726 9.9957C13.1398 9.75826 12.7633 9.75826 12.5329 9.9957C12.3025 10.2331 12.3 10.6171 12.5329 10.852L13.3008 11.6351L12.3307 11.6351C11.974 11.6351 11.9036 11.6351 11.737 11.6351C11.6641 11.6351 11.6354 11.6351 11.5644 11.6351H4.43043C4.43043 10.7434 3.71952 10.0184 2.84511 10.0184V7.38126C2.45622 7.33832 2.0797 7.16402 1.78245 6.8609L1.65612 6.73207ZM10.3754 8.00014C10.3754 7.35699 10.1248 6.74019 9.67888 6.28541C9.23292 5.83064 8.62807 5.57515 7.9974 5.57515C7.36672 5.57515 6.76187 5.83064 6.31591 6.28541C5.86996 6.74019 5.61942 7.35699 5.61942 8.00014C5.61942 8.64329 5.86996 9.26009 6.31591 9.71486C6.76187 10.1696 7.36672 10.4251 7.9974 10.4251C8.62807 10.4251 9.23292 10.1696 9.67888 9.71486C10.1248 9.26009 10.3754 8.64329 10.3754 8.00014Z", fill: "#006962" }) });
|
|
2774
|
+
var CheckmarkIcon = () => /* @__PURE__ */ jsx24("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ jsx24("path", { d: "M13.5 4.5L6 12L2.5 8.5", stroke: "#006962", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
2775
|
+
var RatingBadgeSvg = () => /* @__PURE__ */ jsx24("svg", { width: "32", height: "24", viewBox: "0 0 36 38", fill: "#478EFA", className: "hc-hotel-card__rating-badge-bg", children: /* @__PURE__ */ jsx24("path", { d: "M4 0C1.79086 0 0 1.79086 0 4V32V38L9 32H32C34.2091 32 36 30.2091 36 28V0H4Z" }) });
|
|
2776
|
+
var HotelCardContent = ({
|
|
2777
|
+
name,
|
|
2778
|
+
stars,
|
|
2779
|
+
isSuperior = false,
|
|
2780
|
+
rating,
|
|
2781
|
+
location,
|
|
2782
|
+
benefits,
|
|
2783
|
+
price,
|
|
2784
|
+
currency = "CHF",
|
|
2785
|
+
isAvailable = true,
|
|
2786
|
+
onClick
|
|
2787
|
+
}) => {
|
|
2788
|
+
const { t } = useUIContext();
|
|
2789
|
+
const labels = {
|
|
2790
|
+
ratingExcellent: t("label.rating-excellent", "Excellent"),
|
|
2791
|
+
ratingVeryGood: t("label.rating-very-good", "Very good"),
|
|
2792
|
+
ratingGood: t("label.rating-good", "Good"),
|
|
2793
|
+
ratingFair: t("label.rating-fair", "Fair"),
|
|
2794
|
+
rating: t("label.rating", "Rating"),
|
|
2795
|
+
priceFrom: t("label.per-room-night", "per room & night from"),
|
|
2796
|
+
notAvailable: t("general.unavailable-for-selected-days", "Not available"),
|
|
2797
|
+
swissLodge: "Swiss Lodge"
|
|
2798
|
+
};
|
|
2799
|
+
const getRatingCategory = (score) => {
|
|
2800
|
+
if (score >= 4.4) return labels.ratingExcellent;
|
|
2801
|
+
if (score >= 4.1) return labels.ratingVeryGood;
|
|
2802
|
+
if (score >= 3.8) return labels.ratingGood;
|
|
2803
|
+
if (score >= 3.5) return labels.ratingFair;
|
|
2804
|
+
return labels.rating;
|
|
2805
|
+
};
|
|
2806
|
+
const getBenefitIcon = (benefitId) => {
|
|
2807
|
+
switch (benefitId) {
|
|
2808
|
+
case "free-breakfast":
|
|
2809
|
+
return /* @__PURE__ */ jsx24(BreakfastIcon, {});
|
|
2810
|
+
case "free-cancellation":
|
|
2811
|
+
return /* @__PURE__ */ jsx24(FreeCancellationIcon, {});
|
|
2812
|
+
default:
|
|
2813
|
+
return /* @__PURE__ */ jsx24(CheckmarkIcon, {});
|
|
2814
|
+
}
|
|
2815
|
+
};
|
|
2816
|
+
const getStarRating = (starRating) => {
|
|
2817
|
+
if (!starRating || starRating <= 0) return null;
|
|
2818
|
+
if (starRating === 6) return /* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__swiss-lodge", children: labels.swissLodge });
|
|
2819
|
+
const starCount = Math.min(Math.floor(starRating), 5);
|
|
2820
|
+
return /* @__PURE__ */ jsx24(Fragment5, { children: Array.from({ length: starCount }, (_, index) => /* @__PURE__ */ jsx24(StarIcon3, {}, index)) });
|
|
2821
|
+
};
|
|
2822
|
+
return /* @__PURE__ */ jsxs23(
|
|
2823
|
+
"div",
|
|
2824
|
+
{
|
|
2825
|
+
className: "hc-hotel-card__content",
|
|
2826
|
+
onClick,
|
|
2827
|
+
style: { cursor: onClick ? "pointer" : void 0 },
|
|
2828
|
+
children: [
|
|
2829
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__header-section", children: [
|
|
2830
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__rating-section", children: [
|
|
2831
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__stars", children: [
|
|
2832
|
+
getStarRating(stars),
|
|
2833
|
+
isSuperior && /* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__stars-indicator", children: "(s)" })
|
|
2834
|
+
] }),
|
|
2835
|
+
rating > 0 && /* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__rating-wrapper", children: [
|
|
2836
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__rating-text", children: getRatingCategory(rating) }),
|
|
2837
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__rating-badge", children: [
|
|
2838
|
+
/* @__PURE__ */ jsx24(RatingBadgeSvg, {}),
|
|
2839
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__rating-number", children: rating.toFixed(1) })
|
|
2840
|
+
] })
|
|
2841
|
+
] })
|
|
2842
|
+
] }),
|
|
2843
|
+
/* @__PURE__ */ jsx24("h3", { className: "hc-hotel-card__hotel-name", children: name })
|
|
2844
|
+
] }),
|
|
2845
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__location-section", children: [
|
|
2846
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__pin-icon", children: /* @__PURE__ */ jsx24(PinIcon, {}) }),
|
|
2847
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__location", children: location })
|
|
2848
|
+
] }),
|
|
2849
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__benefits-and-pricing", children: [
|
|
2850
|
+
benefits.length > 0 && /* @__PURE__ */ jsx24("div", { className: "hc-hotel-card__benefits-section", children: benefits.slice(0, 3).map((benefit, index) => /* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__benefit", children: [
|
|
2851
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__benefit-icon", children: getBenefitIcon(benefit.id) }),
|
|
2852
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__benefit-text", children: benefit.label })
|
|
2853
|
+
] }, index)) }),
|
|
2854
|
+
/* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__pricing-section", children: [
|
|
2855
|
+
isAvailable && /* @__PURE__ */ jsx24("div", { className: "hc-hotel-card__price-label", children: labels.priceFrom }),
|
|
2856
|
+
!isAvailable && /* @__PURE__ */ jsx24("div", { className: "hc-hotel-card__not-available", children: labels.notAvailable }),
|
|
2857
|
+
isAvailable && /* @__PURE__ */ jsxs23("div", { className: "hc-hotel-card__price-container", children: [
|
|
2858
|
+
/* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__current-price", children: `${currency} ${price.current}` }),
|
|
2859
|
+
price.original && price.original > price.current && /* @__PURE__ */ jsx24("span", { className: "hc-hotel-card__original-price", children: `${currency} ${price.original}` }),
|
|
2860
|
+
price.discount && price.discount > 0 && /* @__PURE__ */ jsxs23("span", { className: "hc-hotel-card__discount-badge", children: [
|
|
2861
|
+
"-",
|
|
2862
|
+
price.discount,
|
|
2863
|
+
" %"
|
|
2864
|
+
] })
|
|
2865
|
+
] })
|
|
2866
|
+
] })
|
|
2867
|
+
] })
|
|
2868
|
+
]
|
|
2869
|
+
}
|
|
2870
|
+
);
|
|
2871
|
+
};
|
|
2872
|
+
|
|
2873
|
+
// src/components/HotelCard/HotelCard.tsx
|
|
2874
|
+
import { jsx as jsx25, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2875
|
+
var HotelCard = ({
|
|
2876
|
+
hotel,
|
|
2877
|
+
onFavoriteClick,
|
|
2878
|
+
onContentClick,
|
|
2879
|
+
className
|
|
2880
|
+
}) => {
|
|
2881
|
+
return /* @__PURE__ */ jsxs24("div", { className: `hc-hotel-card ${className || ""}`, children: [
|
|
2882
|
+
/* @__PURE__ */ jsx25(
|
|
2883
|
+
HotelCardImage,
|
|
2884
|
+
{
|
|
2885
|
+
images: hotel.images,
|
|
2886
|
+
hotelName: hotel.name,
|
|
2887
|
+
badges: hotel.badges,
|
|
2888
|
+
isFavorite: hotel.isFavorite,
|
|
2889
|
+
onFavoriteClick
|
|
2890
|
+
}
|
|
2891
|
+
),
|
|
2892
|
+
hotel.usp && /* @__PURE__ */ jsx25("div", { className: "hc-hotel-card__usp-banner", children: hotel.usp }),
|
|
2893
|
+
/* @__PURE__ */ jsx25(
|
|
2894
|
+
HotelCardContent,
|
|
2895
|
+
{
|
|
2896
|
+
name: hotel.name,
|
|
2897
|
+
stars: hotel.stars,
|
|
2898
|
+
isSuperior: hotel.isSuperior,
|
|
2899
|
+
rating: hotel.rating,
|
|
2900
|
+
location: hotel.location,
|
|
2901
|
+
benefits: hotel.benefits,
|
|
2902
|
+
price: hotel.price,
|
|
2903
|
+
currency: hotel.currency,
|
|
2904
|
+
isAvailable: hotel.isAvailable,
|
|
2905
|
+
onClick: onContentClick
|
|
2906
|
+
}
|
|
2907
|
+
)
|
|
2908
|
+
] });
|
|
2909
|
+
};
|
|
2910
|
+
|
|
2137
2911
|
// src/components/icons/HeartIcon.tsx
|
|
2138
|
-
import { jsx as
|
|
2139
|
-
var
|
|
2912
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2913
|
+
var HeartIcon3 = ({ filled = false, className = "", size = 24 }) => /* @__PURE__ */ jsx26(
|
|
2140
2914
|
"svg",
|
|
2141
2915
|
{
|
|
2142
2916
|
width: size,
|
|
@@ -2148,14 +2922,14 @@ var HeartIcon2 = ({ filled = false, className = "", size = 24 }) => /* @__PURE__
|
|
|
2148
2922
|
strokeWidth: 2,
|
|
2149
2923
|
strokeLinecap: "round",
|
|
2150
2924
|
strokeLinejoin: "round",
|
|
2151
|
-
children: /* @__PURE__ */
|
|
2925
|
+
children: /* @__PURE__ */ jsx26("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
|
|
2152
2926
|
}
|
|
2153
2927
|
);
|
|
2154
|
-
|
|
2928
|
+
HeartIcon3.displayName = "HeartIcon";
|
|
2155
2929
|
|
|
2156
2930
|
// src/components/icons/StarIcon.tsx
|
|
2157
|
-
import { jsx as
|
|
2158
|
-
var StarIcon4 = ({ filled = true, className = "", size = 9 }) => /* @__PURE__ */
|
|
2931
|
+
import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2932
|
+
var StarIcon4 = ({ filled = true, className = "", size = 9 }) => /* @__PURE__ */ jsxs25(
|
|
2159
2933
|
"svg",
|
|
2160
2934
|
{
|
|
2161
2935
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2165,22 +2939,22 @@ var StarIcon4 = ({ filled = true, className = "", size = 9 }) => /* @__PURE__ */
|
|
|
2165
2939
|
fill: "none",
|
|
2166
2940
|
className,
|
|
2167
2941
|
children: [
|
|
2168
|
-
/* @__PURE__ */
|
|
2942
|
+
/* @__PURE__ */ jsx27("g", { clipPath: "url(#clip0_star_icon)", children: /* @__PURE__ */ jsx27(
|
|
2169
2943
|
"path",
|
|
2170
2944
|
{
|
|
2171
2945
|
d: "M4.80018 0.366577C4.93104 0.366577 5.05173 0.440968 5.11135 0.557659L6.18011 2.66102L8.50521 3.03152C8.63462 3.05194 8.74222 3.14383 8.78294 3.26927C8.82365 3.39472 8.79021 3.53183 8.6986 3.62518L7.03366 5.29533L7.40155 7.6277C7.42191 7.75752 7.3681 7.88879 7.26195 7.9661C7.15581 8.04341 7.01476 8.05508 6.89843 7.99528L4.80018 6.92463L2.70192 7.99528C2.58559 8.05508 2.44454 8.04341 2.33839 7.9661C2.23225 7.88879 2.17844 7.75898 2.1988 7.6277L2.56523 5.29533L0.901751 3.62518C0.808689 3.53183 0.776699 3.39472 0.817413 3.26927C0.858128 3.14383 0.964277 3.05194 1.09515 3.03152L3.42024 2.66102L4.49045 0.557659C4.55007 0.440968 4.67076 0.366577 4.80163 0.366577H4.80018Z",
|
|
2172
2946
|
fill: filled ? "#1F2937" : "#D1D5DB"
|
|
2173
2947
|
}
|
|
2174
2948
|
) }),
|
|
2175
|
-
/* @__PURE__ */
|
|
2949
|
+
/* @__PURE__ */ jsx27("defs", { children: /* @__PURE__ */ jsx27("clipPath", { id: "clip0_star_icon", children: /* @__PURE__ */ jsx27("rect", { width: "8", height: "8", fill: "white", transform: "translate(0.800049 0.199951)" }) }) })
|
|
2176
2950
|
]
|
|
2177
2951
|
}
|
|
2178
2952
|
);
|
|
2179
2953
|
StarIcon4.displayName = "StarIcon";
|
|
2180
2954
|
|
|
2181
2955
|
// src/components/icons/ChevronLeftIcon.tsx
|
|
2182
|
-
import { jsx as
|
|
2183
|
-
var ChevronLeftIcon = ({ className = "", size = 20 }) => /* @__PURE__ */
|
|
2956
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2957
|
+
var ChevronLeftIcon = ({ className = "", size = 20 }) => /* @__PURE__ */ jsx28(
|
|
2184
2958
|
"svg",
|
|
2185
2959
|
{
|
|
2186
2960
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2193,14 +2967,14 @@ var ChevronLeftIcon = ({ className = "", size = 20 }) => /* @__PURE__ */ jsx26(
|
|
|
2193
2967
|
strokeLinecap: "round",
|
|
2194
2968
|
strokeLinejoin: "round",
|
|
2195
2969
|
className,
|
|
2196
|
-
children: /* @__PURE__ */
|
|
2970
|
+
children: /* @__PURE__ */ jsx28("polyline", { points: "15 18 9 12 15 6" })
|
|
2197
2971
|
}
|
|
2198
2972
|
);
|
|
2199
2973
|
ChevronLeftIcon.displayName = "ChevronLeftIcon";
|
|
2200
2974
|
|
|
2201
2975
|
// src/components/icons/ChevronRightIcon.tsx
|
|
2202
|
-
import { jsx as
|
|
2203
|
-
var ChevronRightIcon2 = ({ className = "", size = 20 }) => /* @__PURE__ */
|
|
2976
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2977
|
+
var ChevronRightIcon2 = ({ className = "", size = 20 }) => /* @__PURE__ */ jsx29(
|
|
2204
2978
|
"svg",
|
|
2205
2979
|
{
|
|
2206
2980
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2213,14 +2987,14 @@ var ChevronRightIcon2 = ({ className = "", size = 20 }) => /* @__PURE__ */ jsx27
|
|
|
2213
2987
|
strokeLinecap: "round",
|
|
2214
2988
|
strokeLinejoin: "round",
|
|
2215
2989
|
className,
|
|
2216
|
-
children: /* @__PURE__ */
|
|
2990
|
+
children: /* @__PURE__ */ jsx29("polyline", { points: "9 18 15 12 9 6" })
|
|
2217
2991
|
}
|
|
2218
2992
|
);
|
|
2219
2993
|
ChevronRightIcon2.displayName = "ChevronRightIcon";
|
|
2220
2994
|
|
|
2221
2995
|
// src/components/icons/PinIcon.tsx
|
|
2222
|
-
import { jsx as
|
|
2223
|
-
var
|
|
2996
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2997
|
+
var PinIcon2 = ({ className = "", size = 16 }) => /* @__PURE__ */ jsxs26(
|
|
2224
2998
|
"svg",
|
|
2225
2999
|
{
|
|
2226
3000
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2230,7 +3004,7 @@ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ jsxs24(
|
|
|
2230
3004
|
fill: "none",
|
|
2231
3005
|
className,
|
|
2232
3006
|
children: [
|
|
2233
|
-
/* @__PURE__ */
|
|
3007
|
+
/* @__PURE__ */ jsx30(
|
|
2234
3008
|
"path",
|
|
2235
3009
|
{
|
|
2236
3010
|
fillRule: "evenodd",
|
|
@@ -2239,7 +3013,7 @@ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ jsxs24(
|
|
|
2239
3013
|
fill: "currentColor"
|
|
2240
3014
|
}
|
|
2241
3015
|
),
|
|
2242
|
-
/* @__PURE__ */
|
|
3016
|
+
/* @__PURE__ */ jsx30(
|
|
2243
3017
|
"path",
|
|
2244
3018
|
{
|
|
2245
3019
|
fillRule: "evenodd",
|
|
@@ -2251,7 +3025,7 @@ var PinIcon = ({ className = "", size = 16 }) => /* @__PURE__ */ jsxs24(
|
|
|
2251
3025
|
]
|
|
2252
3026
|
}
|
|
2253
3027
|
);
|
|
2254
|
-
|
|
3028
|
+
PinIcon2.displayName = "PinIcon";
|
|
2255
3029
|
|
|
2256
3030
|
// src/utils/formatPrice.ts
|
|
2257
3031
|
var formatPrice = (amount, currency = "CHF", locale = "de-CH") => {
|
|
@@ -2292,19 +3066,21 @@ export {
|
|
|
2292
3066
|
ChevronLeftIcon,
|
|
2293
3067
|
ChevronRightIcon2 as ChevronRightIcon,
|
|
2294
3068
|
Chip,
|
|
2295
|
-
CompactCard,
|
|
2296
3069
|
DateSelector,
|
|
2297
3070
|
Divider,
|
|
2298
3071
|
Dropdown,
|
|
2299
3072
|
DualCalendar,
|
|
2300
3073
|
FAQ,
|
|
2301
3074
|
GuestContent,
|
|
2302
|
-
|
|
3075
|
+
HeartIcon3 as HeartIcon,
|
|
3076
|
+
HotelCard,
|
|
3077
|
+
HotelCardContent,
|
|
3078
|
+
HotelCardImage,
|
|
2303
3079
|
HotelCardUIProvider,
|
|
2304
3080
|
Input,
|
|
2305
3081
|
Modal,
|
|
2306
3082
|
Pin,
|
|
2307
|
-
PinIcon,
|
|
3083
|
+
PinIcon2 as PinIcon,
|
|
2308
3084
|
RadioButton,
|
|
2309
3085
|
Rating,
|
|
2310
3086
|
ReviewCard,
|
|
@@ -2315,6 +3091,7 @@ export {
|
|
|
2315
3091
|
formatDate,
|
|
2316
3092
|
formatDateRange,
|
|
2317
3093
|
formatPrice,
|
|
3094
|
+
translations,
|
|
2318
3095
|
useDebounce,
|
|
2319
3096
|
useResponsive,
|
|
2320
3097
|
useTranslation,
|