@hotelcard/ui 0.0.15 → 0.0.17
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.cjs +1383 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1041 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +299 -1
- package/dist/index.d.ts +299 -1
- package/dist/index.js +1357 -17
- package/dist/index.js.map +1 -1
- package/package.json +13 -12
package/dist/index.d.cts
CHANGED
|
@@ -1342,6 +1342,304 @@ declare const HotelCardImage: React__default.FC<HotelCardImageProps>;
|
|
|
1342
1342
|
|
|
1343
1343
|
declare const HotelCardContent: React__default.FC<HotelCardContentProps>;
|
|
1344
1344
|
|
|
1345
|
+
/**
|
|
1346
|
+
* FilterCheckboxItem - Reusable filter checkbox row with proper states
|
|
1347
|
+
*
|
|
1348
|
+
* States: idle, hover, active (checked), focused, disabled
|
|
1349
|
+
*/
|
|
1350
|
+
interface FilterCheckboxItemProps {
|
|
1351
|
+
/** Unique identifier for the checkbox */
|
|
1352
|
+
id?: string;
|
|
1353
|
+
/** Display label */
|
|
1354
|
+
label: React__default.ReactNode;
|
|
1355
|
+
/** Count to display on the right */
|
|
1356
|
+
count?: number | string;
|
|
1357
|
+
/** Whether the checkbox is checked */
|
|
1358
|
+
checked: boolean;
|
|
1359
|
+
/** Whether the item is disabled */
|
|
1360
|
+
disabled?: boolean;
|
|
1361
|
+
/** Change handler */
|
|
1362
|
+
onChange: () => void;
|
|
1363
|
+
/** Additional class name */
|
|
1364
|
+
className?: string;
|
|
1365
|
+
/** Analytics tracking name (used for data-track attribute) */
|
|
1366
|
+
trackName?: string;
|
|
1367
|
+
}
|
|
1368
|
+
declare const FilterCheckboxItem: React__default.FC<FilterCheckboxItemProps>;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* CollapsibleFilterSection - Wrapper for expandable/collapsible filter sections
|
|
1372
|
+
*
|
|
1373
|
+
* Features:
|
|
1374
|
+
* - Section header with title + chevron
|
|
1375
|
+
* - Collapse/expand animation
|
|
1376
|
+
* - Optional "Show all" link for long lists
|
|
1377
|
+
* - Default collapsed state configurable
|
|
1378
|
+
*/
|
|
1379
|
+
interface CollapsibleFilterSectionProps {
|
|
1380
|
+
title: string;
|
|
1381
|
+
children: React__default.ReactNode;
|
|
1382
|
+
defaultExpanded?: boolean;
|
|
1383
|
+
showAllText?: string;
|
|
1384
|
+
showLessText?: string;
|
|
1385
|
+
hasShowAll?: boolean;
|
|
1386
|
+
initialItemsToShow?: number;
|
|
1387
|
+
className?: string;
|
|
1388
|
+
}
|
|
1389
|
+
declare const CollapsibleFilterSection: React__default.FC<CollapsibleFilterSectionProps>;
|
|
1390
|
+
|
|
1391
|
+
interface PriceRangeFilterProps {
|
|
1392
|
+
minPrice: number;
|
|
1393
|
+
maxPrice: number;
|
|
1394
|
+
value: {
|
|
1395
|
+
min: number;
|
|
1396
|
+
max: number;
|
|
1397
|
+
};
|
|
1398
|
+
onChange: (value: {
|
|
1399
|
+
min: number;
|
|
1400
|
+
max: number;
|
|
1401
|
+
}) => void;
|
|
1402
|
+
/** Called only when user finishes selecting (debounced) */
|
|
1403
|
+
onApply?: (value: {
|
|
1404
|
+
min: number;
|
|
1405
|
+
max: number;
|
|
1406
|
+
}) => void;
|
|
1407
|
+
histogram?: number[];
|
|
1408
|
+
currency?: string;
|
|
1409
|
+
/** Called when user is actively dragging */
|
|
1410
|
+
onDragStart?: () => void;
|
|
1411
|
+
onDragEnd?: () => void;
|
|
1412
|
+
/** Debounce delay in milliseconds for onApply */
|
|
1413
|
+
debounceDelay?: number;
|
|
1414
|
+
}
|
|
1415
|
+
declare const PriceRangeFilter: React__default.FC<PriceRangeFilterProps>;
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* HotelCategoryFilter - Checkbox list for hotel star ratings
|
|
1419
|
+
*
|
|
1420
|
+
* Options: 5★, 4★, 3★, 2★, Swiss Lodge, No category
|
|
1421
|
+
* Footer with HotellerieSuisse attribution
|
|
1422
|
+
*/
|
|
1423
|
+
interface CategoryOption {
|
|
1424
|
+
value: string;
|
|
1425
|
+
stars: number;
|
|
1426
|
+
label: string | null;
|
|
1427
|
+
}
|
|
1428
|
+
declare const CATEGORY_OPTIONS: CategoryOption[];
|
|
1429
|
+
interface HotelCategoryFilterProps {
|
|
1430
|
+
selected: string[];
|
|
1431
|
+
counts?: Record<string, number>;
|
|
1432
|
+
onChange: (values: string[]) => void;
|
|
1433
|
+
className?: string;
|
|
1434
|
+
}
|
|
1435
|
+
declare const HotelCategoryFilter: React__default.FC<HotelCategoryFilterProps>;
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* ReviewsFilter - Checkbox list for filtering by review rating
|
|
1439
|
+
*
|
|
1440
|
+
* Options: Excellent (4.4+), Very Good (4.1-4.3), Good (3.8-4.0), Fair (3.5-3.7), No rating
|
|
1441
|
+
* Footer: TrustYou attribution
|
|
1442
|
+
*/
|
|
1443
|
+
interface ReviewOption {
|
|
1444
|
+
value: string;
|
|
1445
|
+
labelKey: string;
|
|
1446
|
+
range: string;
|
|
1447
|
+
}
|
|
1448
|
+
declare const REVIEW_OPTIONS: ReviewOption[];
|
|
1449
|
+
interface ReviewsFilterProps {
|
|
1450
|
+
selected: string[];
|
|
1451
|
+
counts?: Record<string, number>;
|
|
1452
|
+
onChange: (values: string[]) => void;
|
|
1453
|
+
className?: string;
|
|
1454
|
+
isPlaceSearchActive?: boolean;
|
|
1455
|
+
}
|
|
1456
|
+
declare const ReviewsFilter: React__default.FC<ReviewsFilterProps>;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* ExperienceFilter - Checkbox list for experience/theme types
|
|
1460
|
+
*
|
|
1461
|
+
* Options come from API with pre-translated names
|
|
1462
|
+
* Expandable with "Show all" if more than 5 options
|
|
1463
|
+
*/
|
|
1464
|
+
interface ThemeAggregation {
|
|
1465
|
+
id: number;
|
|
1466
|
+
name: string;
|
|
1467
|
+
count: number;
|
|
1468
|
+
}
|
|
1469
|
+
interface ExperienceFilterProps {
|
|
1470
|
+
selected: string[];
|
|
1471
|
+
/** Theme aggregations from API with pre-translated names */
|
|
1472
|
+
themes?: ThemeAggregation[];
|
|
1473
|
+
onChange: (values: string[]) => void;
|
|
1474
|
+
className?: string;
|
|
1475
|
+
}
|
|
1476
|
+
declare const ExperienceFilter: React__default.FC<ExperienceFilterProps>;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* RegionsFilter - Accordion-style destinations filter
|
|
1480
|
+
*
|
|
1481
|
+
* Features:
|
|
1482
|
+
* - Country rows are accordion headers (NO checkbox on country)
|
|
1483
|
+
* - Clicking country row expands/collapses accordion
|
|
1484
|
+
* - Sub-regions appear as checkbox list when country is expanded
|
|
1485
|
+
* - Mobile-friendly "Select All" / "Reset" actions
|
|
1486
|
+
*/
|
|
1487
|
+
interface RegionOption {
|
|
1488
|
+
value: string;
|
|
1489
|
+
label: string;
|
|
1490
|
+
count?: number;
|
|
1491
|
+
subRegions?: RegionOption[];
|
|
1492
|
+
}
|
|
1493
|
+
interface RegionsFilterProps {
|
|
1494
|
+
regions: RegionOption[];
|
|
1495
|
+
selected: string[];
|
|
1496
|
+
onChange: (values: string[]) => void;
|
|
1497
|
+
className?: string;
|
|
1498
|
+
isPlaceSearchActive?: boolean;
|
|
1499
|
+
}
|
|
1500
|
+
declare const RegionsFilter: React__default.FC<RegionsFilterProps>;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* CheckboxFilter - Generic checkbox list filter
|
|
1504
|
+
*
|
|
1505
|
+
* Used for: Meals, Transport, Wellness, and other dynamic filter options
|
|
1506
|
+
* Options come from API with pre-translated names
|
|
1507
|
+
*/
|
|
1508
|
+
interface FilterOption {
|
|
1509
|
+
id: number;
|
|
1510
|
+
key: string;
|
|
1511
|
+
name: string;
|
|
1512
|
+
}
|
|
1513
|
+
interface CheckboxFilterProps {
|
|
1514
|
+
selected: string[];
|
|
1515
|
+
counts?: Record<string, number>;
|
|
1516
|
+
/** Filter options from API with pre-translated names */
|
|
1517
|
+
options?: FilterOption[];
|
|
1518
|
+
onChange: (values: string[]) => void;
|
|
1519
|
+
className?: string;
|
|
1520
|
+
/** Prefix for track names (e.g., 'meals', 'transport', 'wellness') */
|
|
1521
|
+
trackPrefix?: string;
|
|
1522
|
+
}
|
|
1523
|
+
declare const CheckboxFilter: React__default.FC<CheckboxFilterProps>;
|
|
1524
|
+
declare const MealsFilter: (props: Omit<CheckboxFilterProps, "trackPrefix">) => react_jsx_runtime.JSX.Element;
|
|
1525
|
+
declare const TransportFilter: (props: Omit<CheckboxFilterProps, "trackPrefix">) => react_jsx_runtime.JSX.Element;
|
|
1526
|
+
declare const WellnessFilter: (props: Omit<CheckboxFilterProps, "trackPrefix">) => react_jsx_runtime.JSX.Element;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* SelectedFiltersRow - Shows active filters as removable chips
|
|
1530
|
+
*
|
|
1531
|
+
* Features:
|
|
1532
|
+
* - Horizontal wrapping flex layout
|
|
1533
|
+
* - Each chip uses Chip/Filter component (small size)
|
|
1534
|
+
* - "Clear all" link at end
|
|
1535
|
+
* - Hidden when no filters active
|
|
1536
|
+
*/
|
|
1537
|
+
interface SelectedFilter {
|
|
1538
|
+
id: string;
|
|
1539
|
+
label: string;
|
|
1540
|
+
type: string;
|
|
1541
|
+
value: string;
|
|
1542
|
+
}
|
|
1543
|
+
interface SelectedFiltersRowProps {
|
|
1544
|
+
filters: SelectedFilter[];
|
|
1545
|
+
onRemove: (filter: SelectedFilter) => void;
|
|
1546
|
+
onClearAll: () => void;
|
|
1547
|
+
className?: string;
|
|
1548
|
+
}
|
|
1549
|
+
declare const SelectedFiltersRow: React__default.FC<SelectedFiltersRowProps>;
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* FilterPanel - Sidebar/modal filters for search results
|
|
1553
|
+
*
|
|
1554
|
+
* Desktop: Fixed sidebar
|
|
1555
|
+
* Mobile: Full-screen modal (use with FilterModal wrapper)
|
|
1556
|
+
*/
|
|
1557
|
+
interface FilterState {
|
|
1558
|
+
regions?: string[];
|
|
1559
|
+
experiences?: string[];
|
|
1560
|
+
priceRange?: {
|
|
1561
|
+
min: number;
|
|
1562
|
+
max: number;
|
|
1563
|
+
};
|
|
1564
|
+
discounts?: string[];
|
|
1565
|
+
options?: string[];
|
|
1566
|
+
meals?: string[];
|
|
1567
|
+
categories?: string[];
|
|
1568
|
+
ratings?: string[];
|
|
1569
|
+
transport?: string[];
|
|
1570
|
+
wellness?: string[];
|
|
1571
|
+
services?: string[];
|
|
1572
|
+
}
|
|
1573
|
+
interface FilterOptions {
|
|
1574
|
+
meals?: FilterOption[];
|
|
1575
|
+
transport?: FilterOption[];
|
|
1576
|
+
wellness?: FilterOption[];
|
|
1577
|
+
services?: FilterOption[];
|
|
1578
|
+
}
|
|
1579
|
+
interface FilterPanelProps {
|
|
1580
|
+
onFilterChange?: (filters: FilterState) => void;
|
|
1581
|
+
onViewMap?: () => void;
|
|
1582
|
+
className?: string;
|
|
1583
|
+
isLoading?: boolean;
|
|
1584
|
+
priceHistogram?: number[];
|
|
1585
|
+
minPrice?: number;
|
|
1586
|
+
maxPrice?: number;
|
|
1587
|
+
regions?: RegionOption[];
|
|
1588
|
+
discountCounts?: Record<string, number>;
|
|
1589
|
+
optionsCounts?: Record<string, number>;
|
|
1590
|
+
categoryCounts?: Record<string, number>;
|
|
1591
|
+
experienceCounts?: Record<string, number>;
|
|
1592
|
+
themes?: ThemeAggregation[];
|
|
1593
|
+
mealsCounts?: Record<string, number>;
|
|
1594
|
+
reviewsCounts?: Record<string, number>;
|
|
1595
|
+
transportCounts?: Record<string, number>;
|
|
1596
|
+
wellnessCounts?: Record<string, number>;
|
|
1597
|
+
servicesCounts?: Record<string, number>;
|
|
1598
|
+
filterOptions?: FilterOptions;
|
|
1599
|
+
selectedDiscounts?: string[];
|
|
1600
|
+
selectedOptions?: string[];
|
|
1601
|
+
selectedExperiences?: string[];
|
|
1602
|
+
selectedRegions?: string[];
|
|
1603
|
+
selectedCategories?: string[];
|
|
1604
|
+
selectedMeals?: string[];
|
|
1605
|
+
selectedReviews?: string[];
|
|
1606
|
+
selectedTransport?: string[];
|
|
1607
|
+
selectedWellness?: string[];
|
|
1608
|
+
selectedServices?: string[];
|
|
1609
|
+
selectedPriceRange?: {
|
|
1610
|
+
min: number;
|
|
1611
|
+
max: number;
|
|
1612
|
+
} | null;
|
|
1613
|
+
mapCenter?: {
|
|
1614
|
+
lat: number;
|
|
1615
|
+
lng: number;
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
declare const FilterPanel: React__default.FC<FilterPanelProps>;
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* FilterModal - Modal wrapper for FilterPanel
|
|
1622
|
+
*
|
|
1623
|
+
* Used in:
|
|
1624
|
+
* - Mobile list view
|
|
1625
|
+
* - Map view (both desktop and mobile)
|
|
1626
|
+
*
|
|
1627
|
+
* This is just a modal container - all filter logic is in FilterPanel
|
|
1628
|
+
* Selected filters chips are passed from the parent (same as list view)
|
|
1629
|
+
*/
|
|
1630
|
+
interface FilterModalProps extends Omit<FilterPanelProps, 'className' | 'onViewMap'> {
|
|
1631
|
+
isOpen: boolean;
|
|
1632
|
+
onClose: () => void;
|
|
1633
|
+
resultCount?: number;
|
|
1634
|
+
/** Selected filters to display as chips - passed from parent */
|
|
1635
|
+
selectedFilters?: SelectedFilter[];
|
|
1636
|
+
/** Handler for removing a single filter chip - passed from parent */
|
|
1637
|
+
onRemoveFilter?: (filter: SelectedFilter) => void;
|
|
1638
|
+
/** Handler for clearing all filters - passed from parent */
|
|
1639
|
+
onClearAllFilters?: () => void;
|
|
1640
|
+
}
|
|
1641
|
+
declare const FilterModal: React__default.FC<FilterModalProps>;
|
|
1642
|
+
|
|
1345
1643
|
interface HeartIconProps {
|
|
1346
1644
|
filled?: boolean;
|
|
1347
1645
|
className?: string;
|
|
@@ -1536,4 +1834,4 @@ interface SearchFilters {
|
|
|
1536
1834
|
regions?: string[];
|
|
1537
1835
|
}
|
|
1538
1836
|
|
|
1539
|
-
export { type Address, Badge, type BadgeProps, type BenefitItem, Benefits, type BenefitsProps, Block, type BlockProps, type Booking, Button, type ButtonProps, Card, type CardBadge, type CardProps, type CardRatingInfo, Checkbox, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, type ChildAgeError, Chip, type ChipProps, type ChipSize, type ChipState, type DateRange, DateSelector, type DateSelectorProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, DualCalendar, FAQ, type FAQItem, type FAQProps, GuestContent, type GuestContentProps, type GuestCounts, HeartIcon, type Hotel, HotelCard, HotelCardContent, type HotelCardContentProps, type HotelCardHotel, HotelCardImage, type HotelCardImageProps, type HotelCardProps, HotelCardUIProvider, type HotelCardUIProviderProps, Input, type InputProps, type InputType, type Locale, type Membership, Modal, type ModalProps, Pin, PinIcon, type PinProps, RadioButton, type RadioButtonProps, Rating, type RatingProps, ReviewCard, type ReviewCardProps, type SearchFilters, type SearchParams, SectionHeader, type SectionHeaderProps, StarIcon, type TranslateFunction$1 as TranslateFunction, type TranslationKeys, type UIContextValue, type User, WhenContent, type WhenContentProps, calculateDiscount, formatDate, formatDateRange, formatPrice, translations, useDebounce, useResponsive, useTranslation, useUIContext, useWindowData };
|
|
1837
|
+
export { type Address, Badge, type BadgeProps, type BenefitItem, Benefits, type BenefitsProps, Block, type BlockProps, type Booking, Button, type ButtonProps, CATEGORY_OPTIONS, Card, type CardBadge, type CardProps, type CardRatingInfo, type CategoryOption, Checkbox, CheckboxFilter, type CheckboxFilterProps, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, type ChildAgeError, Chip, type ChipProps, type ChipSize, type ChipState, CollapsibleFilterSection, type CollapsibleFilterSectionProps, type DateRange, DateSelector, type DateSelectorProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, DualCalendar, ExperienceFilter, type ExperienceFilterProps, FAQ, type FAQItem, type FAQProps, FilterCheckboxItem, type FilterCheckboxItemProps, FilterModal, type FilterModalProps, type FilterOption, type FilterOptions, FilterPanel, type FilterPanelProps, type FilterState, GuestContent, type GuestContentProps, type GuestCounts, HeartIcon, type Hotel, HotelCard, HotelCardContent, type HotelCardContentProps, type HotelCardHotel, HotelCardImage, type HotelCardImageProps, type HotelCardProps, HotelCardUIProvider, type HotelCardUIProviderProps, HotelCategoryFilter, type HotelCategoryFilterProps, Input, type InputProps, type InputType, type Locale, MealsFilter, type Membership, Modal, type ModalProps, Pin, PinIcon, type PinProps, PriceRangeFilter, type PriceRangeFilterProps, REVIEW_OPTIONS, RadioButton, type RadioButtonProps, Rating, type RatingProps, type RegionOption, RegionsFilter, type RegionsFilterProps, ReviewCard, type ReviewCardProps, type ReviewOption, ReviewsFilter, type ReviewsFilterProps, type SearchFilters, type SearchParams, SectionHeader, type SectionHeaderProps, type SelectedFilter, SelectedFiltersRow, type SelectedFiltersRowProps, StarIcon, type ThemeAggregation, type TranslateFunction$1 as TranslateFunction, type TranslationKeys, TransportFilter, type UIContextValue, type User, WellnessFilter, WhenContent, type WhenContentProps, calculateDiscount, formatDate, formatDateRange, formatPrice, translations, useDebounce, useResponsive, useTranslation, useUIContext, useWindowData };
|
package/dist/index.d.ts
CHANGED
|
@@ -1342,6 +1342,304 @@ declare const HotelCardImage: React__default.FC<HotelCardImageProps>;
|
|
|
1342
1342
|
|
|
1343
1343
|
declare const HotelCardContent: React__default.FC<HotelCardContentProps>;
|
|
1344
1344
|
|
|
1345
|
+
/**
|
|
1346
|
+
* FilterCheckboxItem - Reusable filter checkbox row with proper states
|
|
1347
|
+
*
|
|
1348
|
+
* States: idle, hover, active (checked), focused, disabled
|
|
1349
|
+
*/
|
|
1350
|
+
interface FilterCheckboxItemProps {
|
|
1351
|
+
/** Unique identifier for the checkbox */
|
|
1352
|
+
id?: string;
|
|
1353
|
+
/** Display label */
|
|
1354
|
+
label: React__default.ReactNode;
|
|
1355
|
+
/** Count to display on the right */
|
|
1356
|
+
count?: number | string;
|
|
1357
|
+
/** Whether the checkbox is checked */
|
|
1358
|
+
checked: boolean;
|
|
1359
|
+
/** Whether the item is disabled */
|
|
1360
|
+
disabled?: boolean;
|
|
1361
|
+
/** Change handler */
|
|
1362
|
+
onChange: () => void;
|
|
1363
|
+
/** Additional class name */
|
|
1364
|
+
className?: string;
|
|
1365
|
+
/** Analytics tracking name (used for data-track attribute) */
|
|
1366
|
+
trackName?: string;
|
|
1367
|
+
}
|
|
1368
|
+
declare const FilterCheckboxItem: React__default.FC<FilterCheckboxItemProps>;
|
|
1369
|
+
|
|
1370
|
+
/**
|
|
1371
|
+
* CollapsibleFilterSection - Wrapper for expandable/collapsible filter sections
|
|
1372
|
+
*
|
|
1373
|
+
* Features:
|
|
1374
|
+
* - Section header with title + chevron
|
|
1375
|
+
* - Collapse/expand animation
|
|
1376
|
+
* - Optional "Show all" link for long lists
|
|
1377
|
+
* - Default collapsed state configurable
|
|
1378
|
+
*/
|
|
1379
|
+
interface CollapsibleFilterSectionProps {
|
|
1380
|
+
title: string;
|
|
1381
|
+
children: React__default.ReactNode;
|
|
1382
|
+
defaultExpanded?: boolean;
|
|
1383
|
+
showAllText?: string;
|
|
1384
|
+
showLessText?: string;
|
|
1385
|
+
hasShowAll?: boolean;
|
|
1386
|
+
initialItemsToShow?: number;
|
|
1387
|
+
className?: string;
|
|
1388
|
+
}
|
|
1389
|
+
declare const CollapsibleFilterSection: React__default.FC<CollapsibleFilterSectionProps>;
|
|
1390
|
+
|
|
1391
|
+
interface PriceRangeFilterProps {
|
|
1392
|
+
minPrice: number;
|
|
1393
|
+
maxPrice: number;
|
|
1394
|
+
value: {
|
|
1395
|
+
min: number;
|
|
1396
|
+
max: number;
|
|
1397
|
+
};
|
|
1398
|
+
onChange: (value: {
|
|
1399
|
+
min: number;
|
|
1400
|
+
max: number;
|
|
1401
|
+
}) => void;
|
|
1402
|
+
/** Called only when user finishes selecting (debounced) */
|
|
1403
|
+
onApply?: (value: {
|
|
1404
|
+
min: number;
|
|
1405
|
+
max: number;
|
|
1406
|
+
}) => void;
|
|
1407
|
+
histogram?: number[];
|
|
1408
|
+
currency?: string;
|
|
1409
|
+
/** Called when user is actively dragging */
|
|
1410
|
+
onDragStart?: () => void;
|
|
1411
|
+
onDragEnd?: () => void;
|
|
1412
|
+
/** Debounce delay in milliseconds for onApply */
|
|
1413
|
+
debounceDelay?: number;
|
|
1414
|
+
}
|
|
1415
|
+
declare const PriceRangeFilter: React__default.FC<PriceRangeFilterProps>;
|
|
1416
|
+
|
|
1417
|
+
/**
|
|
1418
|
+
* HotelCategoryFilter - Checkbox list for hotel star ratings
|
|
1419
|
+
*
|
|
1420
|
+
* Options: 5★, 4★, 3★, 2★, Swiss Lodge, No category
|
|
1421
|
+
* Footer with HotellerieSuisse attribution
|
|
1422
|
+
*/
|
|
1423
|
+
interface CategoryOption {
|
|
1424
|
+
value: string;
|
|
1425
|
+
stars: number;
|
|
1426
|
+
label: string | null;
|
|
1427
|
+
}
|
|
1428
|
+
declare const CATEGORY_OPTIONS: CategoryOption[];
|
|
1429
|
+
interface HotelCategoryFilterProps {
|
|
1430
|
+
selected: string[];
|
|
1431
|
+
counts?: Record<string, number>;
|
|
1432
|
+
onChange: (values: string[]) => void;
|
|
1433
|
+
className?: string;
|
|
1434
|
+
}
|
|
1435
|
+
declare const HotelCategoryFilter: React__default.FC<HotelCategoryFilterProps>;
|
|
1436
|
+
|
|
1437
|
+
/**
|
|
1438
|
+
* ReviewsFilter - Checkbox list for filtering by review rating
|
|
1439
|
+
*
|
|
1440
|
+
* Options: Excellent (4.4+), Very Good (4.1-4.3), Good (3.8-4.0), Fair (3.5-3.7), No rating
|
|
1441
|
+
* Footer: TrustYou attribution
|
|
1442
|
+
*/
|
|
1443
|
+
interface ReviewOption {
|
|
1444
|
+
value: string;
|
|
1445
|
+
labelKey: string;
|
|
1446
|
+
range: string;
|
|
1447
|
+
}
|
|
1448
|
+
declare const REVIEW_OPTIONS: ReviewOption[];
|
|
1449
|
+
interface ReviewsFilterProps {
|
|
1450
|
+
selected: string[];
|
|
1451
|
+
counts?: Record<string, number>;
|
|
1452
|
+
onChange: (values: string[]) => void;
|
|
1453
|
+
className?: string;
|
|
1454
|
+
isPlaceSearchActive?: boolean;
|
|
1455
|
+
}
|
|
1456
|
+
declare const ReviewsFilter: React__default.FC<ReviewsFilterProps>;
|
|
1457
|
+
|
|
1458
|
+
/**
|
|
1459
|
+
* ExperienceFilter - Checkbox list for experience/theme types
|
|
1460
|
+
*
|
|
1461
|
+
* Options come from API with pre-translated names
|
|
1462
|
+
* Expandable with "Show all" if more than 5 options
|
|
1463
|
+
*/
|
|
1464
|
+
interface ThemeAggregation {
|
|
1465
|
+
id: number;
|
|
1466
|
+
name: string;
|
|
1467
|
+
count: number;
|
|
1468
|
+
}
|
|
1469
|
+
interface ExperienceFilterProps {
|
|
1470
|
+
selected: string[];
|
|
1471
|
+
/** Theme aggregations from API with pre-translated names */
|
|
1472
|
+
themes?: ThemeAggregation[];
|
|
1473
|
+
onChange: (values: string[]) => void;
|
|
1474
|
+
className?: string;
|
|
1475
|
+
}
|
|
1476
|
+
declare const ExperienceFilter: React__default.FC<ExperienceFilterProps>;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* RegionsFilter - Accordion-style destinations filter
|
|
1480
|
+
*
|
|
1481
|
+
* Features:
|
|
1482
|
+
* - Country rows are accordion headers (NO checkbox on country)
|
|
1483
|
+
* - Clicking country row expands/collapses accordion
|
|
1484
|
+
* - Sub-regions appear as checkbox list when country is expanded
|
|
1485
|
+
* - Mobile-friendly "Select All" / "Reset" actions
|
|
1486
|
+
*/
|
|
1487
|
+
interface RegionOption {
|
|
1488
|
+
value: string;
|
|
1489
|
+
label: string;
|
|
1490
|
+
count?: number;
|
|
1491
|
+
subRegions?: RegionOption[];
|
|
1492
|
+
}
|
|
1493
|
+
interface RegionsFilterProps {
|
|
1494
|
+
regions: RegionOption[];
|
|
1495
|
+
selected: string[];
|
|
1496
|
+
onChange: (values: string[]) => void;
|
|
1497
|
+
className?: string;
|
|
1498
|
+
isPlaceSearchActive?: boolean;
|
|
1499
|
+
}
|
|
1500
|
+
declare const RegionsFilter: React__default.FC<RegionsFilterProps>;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* CheckboxFilter - Generic checkbox list filter
|
|
1504
|
+
*
|
|
1505
|
+
* Used for: Meals, Transport, Wellness, and other dynamic filter options
|
|
1506
|
+
* Options come from API with pre-translated names
|
|
1507
|
+
*/
|
|
1508
|
+
interface FilterOption {
|
|
1509
|
+
id: number;
|
|
1510
|
+
key: string;
|
|
1511
|
+
name: string;
|
|
1512
|
+
}
|
|
1513
|
+
interface CheckboxFilterProps {
|
|
1514
|
+
selected: string[];
|
|
1515
|
+
counts?: Record<string, number>;
|
|
1516
|
+
/** Filter options from API with pre-translated names */
|
|
1517
|
+
options?: FilterOption[];
|
|
1518
|
+
onChange: (values: string[]) => void;
|
|
1519
|
+
className?: string;
|
|
1520
|
+
/** Prefix for track names (e.g., 'meals', 'transport', 'wellness') */
|
|
1521
|
+
trackPrefix?: string;
|
|
1522
|
+
}
|
|
1523
|
+
declare const CheckboxFilter: React__default.FC<CheckboxFilterProps>;
|
|
1524
|
+
declare const MealsFilter: (props: Omit<CheckboxFilterProps, "trackPrefix">) => react_jsx_runtime.JSX.Element;
|
|
1525
|
+
declare const TransportFilter: (props: Omit<CheckboxFilterProps, "trackPrefix">) => react_jsx_runtime.JSX.Element;
|
|
1526
|
+
declare const WellnessFilter: (props: Omit<CheckboxFilterProps, "trackPrefix">) => react_jsx_runtime.JSX.Element;
|
|
1527
|
+
|
|
1528
|
+
/**
|
|
1529
|
+
* SelectedFiltersRow - Shows active filters as removable chips
|
|
1530
|
+
*
|
|
1531
|
+
* Features:
|
|
1532
|
+
* - Horizontal wrapping flex layout
|
|
1533
|
+
* - Each chip uses Chip/Filter component (small size)
|
|
1534
|
+
* - "Clear all" link at end
|
|
1535
|
+
* - Hidden when no filters active
|
|
1536
|
+
*/
|
|
1537
|
+
interface SelectedFilter {
|
|
1538
|
+
id: string;
|
|
1539
|
+
label: string;
|
|
1540
|
+
type: string;
|
|
1541
|
+
value: string;
|
|
1542
|
+
}
|
|
1543
|
+
interface SelectedFiltersRowProps {
|
|
1544
|
+
filters: SelectedFilter[];
|
|
1545
|
+
onRemove: (filter: SelectedFilter) => void;
|
|
1546
|
+
onClearAll: () => void;
|
|
1547
|
+
className?: string;
|
|
1548
|
+
}
|
|
1549
|
+
declare const SelectedFiltersRow: React__default.FC<SelectedFiltersRowProps>;
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* FilterPanel - Sidebar/modal filters for search results
|
|
1553
|
+
*
|
|
1554
|
+
* Desktop: Fixed sidebar
|
|
1555
|
+
* Mobile: Full-screen modal (use with FilterModal wrapper)
|
|
1556
|
+
*/
|
|
1557
|
+
interface FilterState {
|
|
1558
|
+
regions?: string[];
|
|
1559
|
+
experiences?: string[];
|
|
1560
|
+
priceRange?: {
|
|
1561
|
+
min: number;
|
|
1562
|
+
max: number;
|
|
1563
|
+
};
|
|
1564
|
+
discounts?: string[];
|
|
1565
|
+
options?: string[];
|
|
1566
|
+
meals?: string[];
|
|
1567
|
+
categories?: string[];
|
|
1568
|
+
ratings?: string[];
|
|
1569
|
+
transport?: string[];
|
|
1570
|
+
wellness?: string[];
|
|
1571
|
+
services?: string[];
|
|
1572
|
+
}
|
|
1573
|
+
interface FilterOptions {
|
|
1574
|
+
meals?: FilterOption[];
|
|
1575
|
+
transport?: FilterOption[];
|
|
1576
|
+
wellness?: FilterOption[];
|
|
1577
|
+
services?: FilterOption[];
|
|
1578
|
+
}
|
|
1579
|
+
interface FilterPanelProps {
|
|
1580
|
+
onFilterChange?: (filters: FilterState) => void;
|
|
1581
|
+
onViewMap?: () => void;
|
|
1582
|
+
className?: string;
|
|
1583
|
+
isLoading?: boolean;
|
|
1584
|
+
priceHistogram?: number[];
|
|
1585
|
+
minPrice?: number;
|
|
1586
|
+
maxPrice?: number;
|
|
1587
|
+
regions?: RegionOption[];
|
|
1588
|
+
discountCounts?: Record<string, number>;
|
|
1589
|
+
optionsCounts?: Record<string, number>;
|
|
1590
|
+
categoryCounts?: Record<string, number>;
|
|
1591
|
+
experienceCounts?: Record<string, number>;
|
|
1592
|
+
themes?: ThemeAggregation[];
|
|
1593
|
+
mealsCounts?: Record<string, number>;
|
|
1594
|
+
reviewsCounts?: Record<string, number>;
|
|
1595
|
+
transportCounts?: Record<string, number>;
|
|
1596
|
+
wellnessCounts?: Record<string, number>;
|
|
1597
|
+
servicesCounts?: Record<string, number>;
|
|
1598
|
+
filterOptions?: FilterOptions;
|
|
1599
|
+
selectedDiscounts?: string[];
|
|
1600
|
+
selectedOptions?: string[];
|
|
1601
|
+
selectedExperiences?: string[];
|
|
1602
|
+
selectedRegions?: string[];
|
|
1603
|
+
selectedCategories?: string[];
|
|
1604
|
+
selectedMeals?: string[];
|
|
1605
|
+
selectedReviews?: string[];
|
|
1606
|
+
selectedTransport?: string[];
|
|
1607
|
+
selectedWellness?: string[];
|
|
1608
|
+
selectedServices?: string[];
|
|
1609
|
+
selectedPriceRange?: {
|
|
1610
|
+
min: number;
|
|
1611
|
+
max: number;
|
|
1612
|
+
} | null;
|
|
1613
|
+
mapCenter?: {
|
|
1614
|
+
lat: number;
|
|
1615
|
+
lng: number;
|
|
1616
|
+
};
|
|
1617
|
+
}
|
|
1618
|
+
declare const FilterPanel: React__default.FC<FilterPanelProps>;
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* FilterModal - Modal wrapper for FilterPanel
|
|
1622
|
+
*
|
|
1623
|
+
* Used in:
|
|
1624
|
+
* - Mobile list view
|
|
1625
|
+
* - Map view (both desktop and mobile)
|
|
1626
|
+
*
|
|
1627
|
+
* This is just a modal container - all filter logic is in FilterPanel
|
|
1628
|
+
* Selected filters chips are passed from the parent (same as list view)
|
|
1629
|
+
*/
|
|
1630
|
+
interface FilterModalProps extends Omit<FilterPanelProps, 'className' | 'onViewMap'> {
|
|
1631
|
+
isOpen: boolean;
|
|
1632
|
+
onClose: () => void;
|
|
1633
|
+
resultCount?: number;
|
|
1634
|
+
/** Selected filters to display as chips - passed from parent */
|
|
1635
|
+
selectedFilters?: SelectedFilter[];
|
|
1636
|
+
/** Handler for removing a single filter chip - passed from parent */
|
|
1637
|
+
onRemoveFilter?: (filter: SelectedFilter) => void;
|
|
1638
|
+
/** Handler for clearing all filters - passed from parent */
|
|
1639
|
+
onClearAllFilters?: () => void;
|
|
1640
|
+
}
|
|
1641
|
+
declare const FilterModal: React__default.FC<FilterModalProps>;
|
|
1642
|
+
|
|
1345
1643
|
interface HeartIconProps {
|
|
1346
1644
|
filled?: boolean;
|
|
1347
1645
|
className?: string;
|
|
@@ -1536,4 +1834,4 @@ interface SearchFilters {
|
|
|
1536
1834
|
regions?: string[];
|
|
1537
1835
|
}
|
|
1538
1836
|
|
|
1539
|
-
export { type Address, Badge, type BadgeProps, type BenefitItem, Benefits, type BenefitsProps, Block, type BlockProps, type Booking, Button, type ButtonProps, Card, type CardBadge, type CardProps, type CardRatingInfo, Checkbox, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, type ChildAgeError, Chip, type ChipProps, type ChipSize, type ChipState, type DateRange, DateSelector, type DateSelectorProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, DualCalendar, FAQ, type FAQItem, type FAQProps, GuestContent, type GuestContentProps, type GuestCounts, HeartIcon, type Hotel, HotelCard, HotelCardContent, type HotelCardContentProps, type HotelCardHotel, HotelCardImage, type HotelCardImageProps, type HotelCardProps, HotelCardUIProvider, type HotelCardUIProviderProps, Input, type InputProps, type InputType, type Locale, type Membership, Modal, type ModalProps, Pin, PinIcon, type PinProps, RadioButton, type RadioButtonProps, Rating, type RatingProps, ReviewCard, type ReviewCardProps, type SearchFilters, type SearchParams, SectionHeader, type SectionHeaderProps, StarIcon, type TranslateFunction$1 as TranslateFunction, type TranslationKeys, type UIContextValue, type User, WhenContent, type WhenContentProps, calculateDiscount, formatDate, formatDateRange, formatPrice, translations, useDebounce, useResponsive, useTranslation, useUIContext, useWindowData };
|
|
1837
|
+
export { type Address, Badge, type BadgeProps, type BenefitItem, Benefits, type BenefitsProps, Block, type BlockProps, type Booking, Button, type ButtonProps, CATEGORY_OPTIONS, Card, type CardBadge, type CardProps, type CardRatingInfo, type CategoryOption, Checkbox, CheckboxFilter, type CheckboxFilterProps, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, type ChildAgeError, Chip, type ChipProps, type ChipSize, type ChipState, CollapsibleFilterSection, type CollapsibleFilterSectionProps, type DateRange, DateSelector, type DateSelectorProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, DualCalendar, ExperienceFilter, type ExperienceFilterProps, FAQ, type FAQItem, type FAQProps, FilterCheckboxItem, type FilterCheckboxItemProps, FilterModal, type FilterModalProps, type FilterOption, type FilterOptions, FilterPanel, type FilterPanelProps, type FilterState, GuestContent, type GuestContentProps, type GuestCounts, HeartIcon, type Hotel, HotelCard, HotelCardContent, type HotelCardContentProps, type HotelCardHotel, HotelCardImage, type HotelCardImageProps, type HotelCardProps, HotelCardUIProvider, type HotelCardUIProviderProps, HotelCategoryFilter, type HotelCategoryFilterProps, Input, type InputProps, type InputType, type Locale, MealsFilter, type Membership, Modal, type ModalProps, Pin, PinIcon, type PinProps, PriceRangeFilter, type PriceRangeFilterProps, REVIEW_OPTIONS, RadioButton, type RadioButtonProps, Rating, type RatingProps, type RegionOption, RegionsFilter, type RegionsFilterProps, ReviewCard, type ReviewCardProps, type ReviewOption, ReviewsFilter, type ReviewsFilterProps, type SearchFilters, type SearchParams, SectionHeader, type SectionHeaderProps, type SelectedFilter, SelectedFiltersRow, type SelectedFiltersRowProps, StarIcon, type ThemeAggregation, type TranslateFunction$1 as TranslateFunction, type TranslationKeys, TransportFilter, type UIContextValue, type User, WellnessFilter, WhenContent, type WhenContentProps, calculateDiscount, formatDate, formatDateRange, formatPrice, translations, useDebounce, useResponsive, useTranslation, useUIContext, useWindowData };
|