@hotelcard/ui 0.0.44 → 0.0.45

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/dist/index.d.ts CHANGED
@@ -192,6 +192,22 @@ export declare interface CardRatingInfo {
192
192
  value: string | number;
193
193
  }
194
194
 
195
+ export declare const CATEGORY_OPTIONS: CategoryOption[];
196
+
197
+ /**
198
+ * HotelCategoryFilter - Checkbox list for hotel star ratings
199
+ *
200
+ * Figma Spec:
201
+ * - Checkbox list with star icons and counts
202
+ * - Options: 5★, 4★, 3★, 2★, Swiss Lodge, No category
203
+ * - Footer with HotellerieSuisse link
204
+ */
205
+ export declare interface CategoryOption {
206
+ value: string;
207
+ stars: number;
208
+ label: string | null;
209
+ }
210
+
195
211
  export declare const Checkbox: React.FC<CheckboxProps>;
196
212
 
197
213
  export declare interface CheckboxProps {
@@ -271,6 +287,28 @@ export declare type ChipSize = 'small' | 'medium';
271
287
 
272
288
  export declare type ChipState = 'idle' | 'active' | 'disabled';
273
289
 
290
+ export declare const CollapsibleFilterSection: default_2.FC<CollapsibleFilterSectionProps>;
291
+
292
+ /**
293
+ * CollapsibleFilterSection - Wrapper for expandable/collapsible filter sections
294
+ *
295
+ * Figma Spec:
296
+ * - Section header with title + chevron
297
+ * - Collapse/expand animation
298
+ * - Optional "Show all" link for long lists
299
+ * - Default collapsed state configurable
300
+ */
301
+ declare interface CollapsibleFilterSectionProps {
302
+ title: string;
303
+ children: default_2.ReactNode;
304
+ defaultExpanded?: boolean;
305
+ showAllText?: string;
306
+ showLessText?: string;
307
+ hasShowAll?: boolean;
308
+ initialItemsToShow?: number;
309
+ className?: string;
310
+ }
311
+
274
312
  declare interface Coordinates {
275
313
  lat: number;
276
314
  lng: number;
@@ -628,6 +666,28 @@ declare interface DualCalendarProps {
628
666
  locale?: string;
629
667
  }
630
668
 
669
+ export declare const ExperienceFilter: default_2.FC<ExperienceFilterProps>;
670
+
671
+ /**
672
+ * ExperienceFilter - Checkbox list for experience types
673
+ *
674
+ * Figma Spec:
675
+ * - Checkbox list with counts
676
+ * - Options: City trip, Wellness & Spa, Design/Boutique, Water body, Hiking
677
+ * - Expandable with "Show all"
678
+ *
679
+ * Uses translated theme names from API when available
680
+ */
681
+ declare interface ExperienceFilterProps {
682
+ selected: string[];
683
+ /** Theme aggregations from API with pre-translated names */
684
+ themes?: ThemeAggregation[];
685
+ /** Legacy counts format (deprecated - use themes instead) */
686
+ counts?: Record<string, number>;
687
+ onChange: (values: string[]) => void;
688
+ className?: string;
689
+ }
690
+
631
691
  export declare const FAQ: React.FC<FAQProps>;
632
692
 
633
693
  export declare interface FAQItem {
@@ -642,6 +702,69 @@ export declare interface FAQProps {
642
702
  className?: string;
643
703
  }
644
704
 
705
+ export declare const FilterCheckboxItem: default_2.FC<FilterCheckboxItemProps>;
706
+
707
+ /**
708
+ * FilterCheckboxItem - Reusable filter checkbox row with proper states
709
+ *
710
+ * Figma Spec (714-8371 - StarsRating/Filtering/Item):
711
+ * - States: :idle, :hover, :active (checked), :focused, :disabled
712
+ * - Idle: white background, unchecked
713
+ * - Hover: gray background (#e5e7eb)
714
+ * - Active: white background, blue checked checkbox
715
+ * - Focused: white background with blue glow ring
716
+ * - Disabled: gray checkbox, muted text
717
+ */
718
+ export declare interface FilterCheckboxItemProps {
719
+ /** Unique identifier for the checkbox */
720
+ id?: string;
721
+ /** Display label */
722
+ label: default_2.ReactNode;
723
+ /** Count to display on the right */
724
+ count?: number | string;
725
+ /** Whether the checkbox is checked */
726
+ checked: boolean;
727
+ /** Whether the item is disabled */
728
+ disabled?: boolean;
729
+ /** Change handler */
730
+ onChange: () => void;
731
+ /** Additional class name */
732
+ className?: string;
733
+ /** Analytics tracking name (used for data-track attribute) */
734
+ trackName?: string;
735
+ }
736
+
737
+ export declare const FilterMinimap: default_2.FC<FilterMinimapProps>;
738
+
739
+ /**
740
+ * FilterMinimap - Map preview at top of filter sidebar
741
+ *
742
+ * Figma: Desktop List View (723-97947)
743
+ *
744
+ * Features:
745
+ * - Static map preview showing search area
746
+ * - "View in a Map" button to switch to map view
747
+ * - Only shown on desktop (hidden on mobile)
748
+ *
749
+ * Specs:
750
+ * - Height: 200px
751
+ * - Border radius: 12px
752
+ * - Button: small size, no icon
753
+ */
754
+ export declare interface FilterMinimapProps {
755
+ /** Callback when "View in a Map" is clicked */
756
+ onViewMap: () => void;
757
+ /** Optional center coordinates for the map preview */
758
+ center?: {
759
+ lat: number;
760
+ lng: number;
761
+ };
762
+ /** Optional zoom level */
763
+ zoom?: number;
764
+ /** Optional class name */
765
+ className?: string;
766
+ }
767
+
645
768
  export declare const FilterModal: default_2.FC<FilterModalProps>;
646
769
 
647
770
  /**
@@ -746,6 +869,27 @@ export declare interface FilterPanelProps {
746
869
  };
747
870
  }
748
871
 
872
+ export declare const FilterSkeleton: default_2.FC<FilterSkeletonProps>;
873
+
874
+ /**
875
+ * FilterSkeleton - Loading placeholder for filter sections
876
+ *
877
+ * Displays a shimmer animation while filter data is loading.
878
+ * Shows placeholder items for checkbox-style filters.
879
+ */
880
+ declare interface FilterSkeletonProps {
881
+ /** Number of skeleton items to show */
882
+ itemCount?: number;
883
+ /** Show expandable country/region style skeleton */
884
+ isRegionFilter?: boolean;
885
+ /** Show price range slider style skeleton */
886
+ isPriceFilter?: boolean;
887
+ /** Show discount filter (checkbox list with 3 items) skeleton */
888
+ isDiscountFilter?: boolean;
889
+ /** Show category filter (star ratings) skeleton */
890
+ isCategoryFilter?: boolean;
891
+ }
892
+
749
893
  export declare interface FilterState {
750
894
  regions?: string[];
751
895
  experiences?: string[];
@@ -987,6 +1131,15 @@ export declare interface HotelCardUIProviderProps {
987
1131
  children: ReactNode;
988
1132
  }
989
1133
 
1134
+ export declare const HotelCategoryFilter: default_2.FC<HotelCategoryFilterProps>;
1135
+
1136
+ declare interface HotelCategoryFilterProps {
1137
+ selected: string[];
1138
+ counts?: Record<string, number>;
1139
+ onChange: (values: string[]) => void;
1140
+ className?: string;
1141
+ }
1142
+
990
1143
  export declare const Input: default_2.FC<InputProps>;
991
1144
 
992
1145
  export declare interface InputProps {
@@ -1082,6 +1235,26 @@ export declare interface LocationSuggestion {
1082
1235
  longitude?: number;
1083
1236
  }
1084
1237
 
1238
+ export declare const MealsFilter: default_2.FC<MealsFilterProps>;
1239
+
1240
+ /**
1241
+ * MealsFilter - Checkbox list for meal options
1242
+ *
1243
+ * Figma Spec:
1244
+ * - Checkbox list with counts
1245
+ * - Options: Breakfast, Restaurant
1246
+ *
1247
+ * Options now come from API with pre-translated names
1248
+ */
1249
+ declare interface MealsFilterProps {
1250
+ selected: string[];
1251
+ counts?: Record<string, number>;
1252
+ /** Filter options from API with pre-translated names */
1253
+ options?: FilterOption[];
1254
+ onChange: (values: string[]) => void;
1255
+ className?: string;
1256
+ }
1257
+
1085
1258
  export declare interface Membership {
1086
1259
  cardNumber: string;
1087
1260
  validFrom: string;
@@ -1173,6 +1346,35 @@ export declare interface PinProps {
1173
1346
  className?: string;
1174
1347
  }
1175
1348
 
1349
+ export declare const PriceRangeFilter: default_2.FC<PriceRangeFilterProps>;
1350
+
1351
+ declare interface PriceRangeFilterProps {
1352
+ minPrice: number;
1353
+ maxPrice: number;
1354
+ value: {
1355
+ min: number;
1356
+ max: number;
1357
+ };
1358
+ onChange: (value: {
1359
+ min: number;
1360
+ max: number;
1361
+ }) => void;
1362
+ /** New prop: Called only when user finishes selecting (debounced) */
1363
+ onApply?: (value: {
1364
+ min: number;
1365
+ max: number;
1366
+ }) => void;
1367
+ histogram?: number[];
1368
+ currency?: string;
1369
+ /** Called when user is actively dragging (to prevent apply during drag) */
1370
+ onDragStart?: () => void;
1371
+ onDragEnd?: () => void;
1372
+ /** Show loading skeleton instead of filter */
1373
+ isLoading?: boolean;
1374
+ /** Debounce delay in milliseconds for onApply */
1375
+ debounceDelay?: number;
1376
+ }
1377
+
1176
1378
  export declare const RadioButton: default_2.FC<RadioButtonProps>;
1177
1379
 
1178
1380
  export declare interface RadioButtonProps {
@@ -1259,6 +1461,18 @@ export declare interface RegionOption {
1259
1461
  subRegions?: RegionOption[];
1260
1462
  }
1261
1463
 
1464
+ export declare const RegionsFilter: default_2.FC<RegionsFilterProps>;
1465
+
1466
+ declare interface RegionsFilterProps {
1467
+ regions: RegionOption[];
1468
+ selected: string[];
1469
+ onChange: (values: string[]) => void;
1470
+ className?: string;
1471
+ isPlaceSearchActive?: boolean;
1472
+ }
1473
+
1474
+ export declare const REVIEW_OPTIONS: ReviewOption[];
1475
+
1262
1476
  export declare const ReviewCard: React.FC<ReviewCardProps>;
1263
1477
 
1264
1478
  export declare interface ReviewCardProps {
@@ -1274,6 +1488,30 @@ export declare interface ReviewCardProps {
1274
1488
  className?: string;
1275
1489
  }
1276
1490
 
1491
+ /**
1492
+ * ReviewsFilter - Checkbox list for filtering by review rating
1493
+ *
1494
+ * Figma Spec:
1495
+ * - Checkbox list with counts
1496
+ * - Options: Excellent (4.4+), Very Good (4.1-4.3), Good (3.8-4.0), Fair (3.5-3.7), No rating
1497
+ * - Footer: TrustYou attribution
1498
+ */
1499
+ export declare interface ReviewOption {
1500
+ value: string;
1501
+ labelKey: string;
1502
+ range: string;
1503
+ }
1504
+
1505
+ export declare const ReviewsFilter: default_2.FC<ReviewsFilterProps>;
1506
+
1507
+ declare interface ReviewsFilterProps {
1508
+ selected: string[];
1509
+ counts?: Record<string, number>;
1510
+ onChange: (values: string[]) => void;
1511
+ className?: string;
1512
+ isPlaceSearchActive?: boolean;
1513
+ }
1514
+
1277
1515
  export declare const SearchControlsBar: default_2.FC<SearchControlsBarProps>;
1278
1516
 
1279
1517
  export declare interface SearchControlsBarProps {
@@ -2598,6 +2836,26 @@ export declare const translations: {
2598
2836
  };
2599
2837
  };
2600
2838
 
2839
+ export declare const TransportFilter: default_2.FC<TransportFilterProps>;
2840
+
2841
+ /**
2842
+ * TransportFilter - Checkbox list for transport/parking options
2843
+ *
2844
+ * Figma Spec:
2845
+ * - Checkbox list with counts
2846
+ * - Options: Free parking, EV charging station
2847
+ *
2848
+ * Options now come from API with pre-translated names
2849
+ */
2850
+ declare interface TransportFilterProps {
2851
+ selected: string[];
2852
+ counts?: Record<string, number>;
2853
+ /** Filter options from API with pre-translated names */
2854
+ options?: FilterOption[];
2855
+ onChange: (values: string[]) => void;
2856
+ className?: string;
2857
+ }
2858
+
2601
2859
  export declare interface UIContextValue {
2602
2860
  /** Current locale (e.g., 'de', 'en', 'fr', 'it') */
2603
2861
  locale: Locale;
@@ -2700,6 +2958,26 @@ export declare const useWindowData: () => {
2700
2958
  */
2701
2959
  export declare type ViewMode = 'list' | 'map';
2702
2960
 
2961
+ export declare const WellnessFilter: default_2.FC<WellnessFilterProps>;
2962
+
2963
+ /**
2964
+ * WellnessFilter - Checkbox list for wellness & spa amenities
2965
+ *
2966
+ * Figma Spec:
2967
+ * - Checkbox list with counts
2968
+ * - Options: Indoor pool, Outdoor pool, Sauna/Steam bath, Massage, Cosmetic treatments
2969
+ *
2970
+ * Options now come from API with pre-translated names
2971
+ */
2972
+ declare interface WellnessFilterProps {
2973
+ selected: string[];
2974
+ counts?: Record<string, number>;
2975
+ /** Filter options from API with pre-translated names */
2976
+ options?: FilterOption[];
2977
+ onChange: (values: string[]) => void;
2978
+ className?: string;
2979
+ }
2980
+
2703
2981
  /**
2704
2982
  * WhenContent - Shared date/time selection UI
2705
2983
  *
package/dist/index.js CHANGED
@@ -7408,18 +7408,24 @@ export {
7408
7408
  Es as Benefits,
7409
7409
  As as Block,
7410
7410
  De as Button,
7411
+ Yc as CATEGORY_OPTIONS,
7411
7412
  Ds as Card,
7412
7413
  Ns as Checkbox,
7413
7414
  Dd as ChevronLeftIcon,
7414
7415
  Pd as ChevronRightIcon,
7415
7416
  Qt as Chip,
7417
+ Ae as CollapsibleFilterSection,
7416
7418
  Zi as DateSelector,
7417
7419
  Cs as Divider,
7418
7420
  Bs as Dropdown,
7419
7421
  zi as DualCalendar,
7422
+ zc as ExperienceFilter,
7420
7423
  Vs as FAQ,
7424
+ Ve as FilterCheckboxItem,
7425
+ j1 as FilterMinimap,
7421
7426
  Yu as FilterModal,
7422
7427
  wd as FilterPanel,
7428
+ dt as FilterSkeleton,
7423
7429
  tn as GuestContent,
7424
7430
  Xi as GuestSelector,
7425
7431
  Sd as HeartIcon,
@@ -7427,21 +7433,29 @@ export {
7427
7433
  bl as HotelCardContent,
7428
7434
  ml as HotelCardImage,
7429
7435
  Ru as HotelCardUIProvider,
7436
+ qc as HotelCategoryFilter,
7430
7437
  Is as Input,
7431
7438
  Mo as LocationAutocomplete,
7439
+ Gc as MealsFilter,
7432
7440
  ju as MobileSortModal,
7433
7441
  xs as Modal,
7434
7442
  js as Pin,
7435
7443
  Bd as PinIcon,
7444
+ c1 as PriceRangeFilter,
7445
+ L1 as REVIEW_OPTIONS,
7436
7446
  ks as RadioButton,
7437
7447
  Xt as Rating,
7448
+ N1 as RegionsFilter,
7438
7449
  Ts as ReviewCard,
7450
+ x1 as ReviewsFilter,
7439
7451
  Ou as SearchControlsBar,
7440
7452
  Fu as SearchModal,
7441
7453
  hc as SearchModalContent,
7442
7454
  $s as SectionHeader,
7443
7455
  I1 as SelectedFiltersRow,
7444
7456
  Hd as StarIcon,
7457
+ A1 as TransportFilter,
7458
+ T1 as WellnessFilter,
7445
7459
  en as WhenContent,
7446
7460
  Ju as calculateDiscount,
7447
7461
  Yt as formatDate,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hotelcard/ui",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "type": "module",
5
5
  "description": "Shared UI components for HotelCard website and mobile app",
6
6
  "main": "dist/index.cjs",