@hotelcard/ui 0.0.39 → 0.0.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -112,6 +112,8 @@ The package includes built-in translations for `de`, `en`, `fr`, and `it` locale
112
112
  | `DualCalendar` | Calendar component for date range selection |
113
113
  | `GuestContent` | Guest selector with adults, children (with ages), and pet toggle |
114
114
  | `HotelCard` | Hotel card for search results with image carousel, rating, and pricing |
115
+ | `SearchModal` | Full-screen search modal with destination, dates, and guest selection |
116
+ | `SearchModalContent` | Content-only version for custom modal wrappers (e.g., IonModal) |
115
117
 
116
118
  ### Icons
117
119
 
@@ -288,6 +290,45 @@ const hotel: HotelCardHotel = {
288
290
 
289
291
  Translations (rating labels, price text, etc.) are handled automatically via `HotelCardUIProvider`.
290
292
 
293
+ ### SearchModal
294
+
295
+ Full-screen search modal for destination, date, and guest selection:
296
+
297
+ ```tsx
298
+ import { SearchModal, type SearchModalSearchParams } from '@hotelcard/ui';
299
+
300
+ <SearchModal
301
+ isOpen={isSearchOpen}
302
+ onSearch={(params: SearchModalSearchParams) => {
303
+ // params: { query, guests, dateRange, monthFilter }
304
+ console.log('Search:', params);
305
+ setIsSearchOpen(false);
306
+ }}
307
+ onClose={() => setIsSearchOpen(false)}
308
+ initialQuery=""
309
+ initialGuests={{ adults: 2, children: 0, childrenAges: [] }}
310
+ />
311
+ ```
312
+
313
+ #### Using SearchModalContent with custom modal wrapper (e.g., Ionic)
314
+
315
+ For apps that need custom modal handling (like Ionic's z-index management), use `SearchModalContent`:
316
+
317
+ ```tsx
318
+ import { IonModal } from '@ionic/react';
319
+ import { SearchModalContent, type SearchModalSearchParams } from '@hotelcard/ui';
320
+
321
+ <IonModal isOpen={isOpen} onDidDismiss={onClose}>
322
+ <SearchModalContent
323
+ onSearch={handleSearch}
324
+ onClose={onClose}
325
+ initialQuery={query}
326
+ initialGuests={guests}
327
+ showHeader={true} // Shows close button and header
328
+ />
329
+ </IonModal>
330
+ ```
331
+
291
332
  ### Checkbox & RadioButton
292
333
 
293
334
  ```tsx
@@ -345,6 +386,9 @@ import type {
345
386
  HotelCardHotel,
346
387
  HotelCardImageProps,
347
388
  HotelCardContentProps,
389
+ SearchModalProps,
390
+ SearchModalContentProps,
391
+ SearchModalSearchParams,
348
392
 
349
393
  // Context Types
350
394
  UIContextValue,