@hotelcard/ui 0.0.5 → 0.0.7

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.cts CHANGED
@@ -390,6 +390,105 @@ interface InputProps {
390
390
 
391
391
  declare const Input: React__default.FC<InputProps>;
392
392
 
393
+ interface BlockProps {
394
+ /** Type of block to render */
395
+ variant?: 'icon' | 'image';
396
+ /** Icon or image to display */
397
+ visual?: ReactNode;
398
+ /** Label/title text */
399
+ label: string;
400
+ /** Description text (for icon variant) */
401
+ description?: string;
402
+ /** Style variant for icon blocks */
403
+ style?: 'primary' | 'secondary';
404
+ /** Click handler */
405
+ onClick?: () => void;
406
+ /** Whether to show arrow (for image variant) */
407
+ showArrow?: boolean;
408
+ /** Additional CSS class names */
409
+ className?: string;
410
+ }
411
+ declare const Block: React.FC<BlockProps>;
412
+
413
+ interface ReviewCardProps {
414
+ /** Reviewer's name */
415
+ name: string;
416
+ /** Review date */
417
+ date: string;
418
+ /** Rating value (1-5) */
419
+ rating: number;
420
+ /** Review text/quote */
421
+ quote: string;
422
+ /** Additional CSS classes */
423
+ className?: string;
424
+ }
425
+ declare const ReviewCard: React.FC<ReviewCardProps>;
426
+
427
+ interface FAQItem {
428
+ question: string;
429
+ answer: string;
430
+ }
431
+ interface FAQProps {
432
+ items: FAQItem[];
433
+ defaultOpenIndex?: number | null;
434
+ allowMultiple?: boolean;
435
+ className?: string;
436
+ }
437
+ declare const FAQ: React.FC<FAQProps>;
438
+
439
+ interface BenefitItem {
440
+ icon?: string;
441
+ title: string;
442
+ description?: string;
443
+ }
444
+ interface BenefitsProps {
445
+ title?: string;
446
+ subtitle?: string;
447
+ benefits?: BenefitItem[];
448
+ contactTitle?: string;
449
+ contactDescription?: string;
450
+ contactButtonText?: string;
451
+ onContactClick?: () => void;
452
+ className?: string;
453
+ }
454
+ declare const Benefits: React.FC<BenefitsProps>;
455
+
456
+ interface PinProps {
457
+ /** Pin variant - 'price' shows currency/price, 'hotel' shows house icon */
458
+ variant?: 'price' | 'hotel';
459
+ /** Whether the hotel has been viewed (secondary style) */
460
+ viewed?: boolean;
461
+ /** Currency code to display */
462
+ currency?: string;
463
+ /** Price to display */
464
+ price?: number | string;
465
+ /** Whether to show the favorite (heart) icon */
466
+ showFavorite?: boolean;
467
+ /** Whether the pin is disabled */
468
+ disabled?: boolean;
469
+ /** Click handler */
470
+ onClick?: () => void;
471
+ /** Additional class name */
472
+ className?: string;
473
+ }
474
+ /**
475
+ * Pin Component
476
+ *
477
+ * Map marker pin with price or hotel icon variants.
478
+ * Used for displaying hotel markers on maps.
479
+ *
480
+ * @example
481
+ * // Price pin (default)
482
+ * <Pin price={150} currency="CHF" showFavorite />
483
+ *
484
+ * // Viewed price pin (secondary style)
485
+ * <Pin price={150} viewed showFavorite />
486
+ *
487
+ * // Hotel pin (for clusters)
488
+ * <Pin variant="hotel" />
489
+ */
490
+ declare const Pin: React__default.ForwardRefExoticComponent<PinProps & React__default.RefAttributes<HTMLButtonElement>>;
491
+
393
492
  interface HeartIconProps {
394
493
  filled?: boolean;
395
494
  className?: string;
@@ -437,4 +536,96 @@ declare const PinIcon: {
437
536
  displayName: string;
438
537
  };
439
538
 
440
- export { Badge, type BadgeProps, Button, type ButtonProps, Card, type CardBadge, type CardProps, type CardRatingInfo, Checkbox, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, Chip, type ChipProps, type ChipSize, type ChipState, CompactCard, type CompactCardBadge, type CompactCardProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, HeartIcon, Input, type InputProps, type InputType, Modal, type ModalProps, PinIcon, RadioButton, type RadioButtonProps, Rating, type RatingProps, SectionHeader, type SectionHeaderProps, StarIcon };
539
+ declare const useDebounce: <T>(value: T, delay: number) => T;
540
+
541
+ declare const formatPrice: (amount: number, currency?: string, locale?: string) => string;
542
+
543
+ declare const formatDate: (date: string | Date, formatStr?: string, locale?: string) => string;
544
+ declare const formatDateRange: (checkIn: string | Date, checkOut: string | Date, locale?: string) => string;
545
+
546
+ declare const calculateDiscount: (originalPrice: number, discountedPrice: number) => number;
547
+
548
+ interface Hotel {
549
+ id: number;
550
+ name: string;
551
+ location: string;
552
+ region?: string;
553
+ country?: string;
554
+ stars: number;
555
+ rating?: number;
556
+ reviewCount?: number;
557
+ imageUrl: string;
558
+ images?: string[];
559
+ priceFrom: number;
560
+ originalPrice?: number;
561
+ currency: string;
562
+ discountPercent?: number;
563
+ isFavourited?: boolean;
564
+ isNew?: boolean;
565
+ benefits?: string[];
566
+ }
567
+
568
+ interface Booking {
569
+ id: number;
570
+ confirmationNumber: string;
571
+ status: 'confirmed' | 'cancelled' | 'completed';
572
+ hotel: {
573
+ id: number;
574
+ name: string;
575
+ location: string;
576
+ imageUrl: string;
577
+ };
578
+ checkIn: string;
579
+ checkOut: string;
580
+ guests: number;
581
+ roomType: string;
582
+ totalPrice: number;
583
+ currency: string;
584
+ createdAt: string;
585
+ }
586
+
587
+ interface Address {
588
+ id?: number;
589
+ line1: string;
590
+ line2?: string;
591
+ zip: string;
592
+ city: string;
593
+ countryCode: string;
594
+ }
595
+ interface Membership {
596
+ cardNumber: string;
597
+ validFrom: string;
598
+ validUntil: string;
599
+ }
600
+ interface User {
601
+ id: number;
602
+ firstName: string;
603
+ lastName: string;
604
+ email: string;
605
+ phone?: string;
606
+ locale: string;
607
+ currency: string;
608
+ activeAddress?: Address;
609
+ membership?: Membership;
610
+ }
611
+
612
+ interface SearchParams {
613
+ destination?: string;
614
+ checkIn?: string;
615
+ checkOut?: string;
616
+ adults?: number;
617
+ children?: number;
618
+ flexibleDates?: boolean;
619
+ flexibleMonth?: string;
620
+ }
621
+ interface SearchFilters {
622
+ priceMin?: number;
623
+ priceMax?: number;
624
+ stars?: number[];
625
+ rating?: number;
626
+ amenities?: string[];
627
+ experiences?: string[];
628
+ regions?: string[];
629
+ }
630
+
631
+ 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, Chip, type ChipProps, type ChipSize, type ChipState, CompactCard, type CompactCardBadge, type CompactCardProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, FAQ, type FAQItem, type FAQProps, HeartIcon, type Hotel, Input, type InputProps, type InputType, 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 User, calculateDiscount, formatDate, formatDateRange, formatPrice, useDebounce };
package/dist/index.d.ts CHANGED
@@ -390,6 +390,105 @@ interface InputProps {
390
390
 
391
391
  declare const Input: React__default.FC<InputProps>;
392
392
 
393
+ interface BlockProps {
394
+ /** Type of block to render */
395
+ variant?: 'icon' | 'image';
396
+ /** Icon or image to display */
397
+ visual?: ReactNode;
398
+ /** Label/title text */
399
+ label: string;
400
+ /** Description text (for icon variant) */
401
+ description?: string;
402
+ /** Style variant for icon blocks */
403
+ style?: 'primary' | 'secondary';
404
+ /** Click handler */
405
+ onClick?: () => void;
406
+ /** Whether to show arrow (for image variant) */
407
+ showArrow?: boolean;
408
+ /** Additional CSS class names */
409
+ className?: string;
410
+ }
411
+ declare const Block: React.FC<BlockProps>;
412
+
413
+ interface ReviewCardProps {
414
+ /** Reviewer's name */
415
+ name: string;
416
+ /** Review date */
417
+ date: string;
418
+ /** Rating value (1-5) */
419
+ rating: number;
420
+ /** Review text/quote */
421
+ quote: string;
422
+ /** Additional CSS classes */
423
+ className?: string;
424
+ }
425
+ declare const ReviewCard: React.FC<ReviewCardProps>;
426
+
427
+ interface FAQItem {
428
+ question: string;
429
+ answer: string;
430
+ }
431
+ interface FAQProps {
432
+ items: FAQItem[];
433
+ defaultOpenIndex?: number | null;
434
+ allowMultiple?: boolean;
435
+ className?: string;
436
+ }
437
+ declare const FAQ: React.FC<FAQProps>;
438
+
439
+ interface BenefitItem {
440
+ icon?: string;
441
+ title: string;
442
+ description?: string;
443
+ }
444
+ interface BenefitsProps {
445
+ title?: string;
446
+ subtitle?: string;
447
+ benefits?: BenefitItem[];
448
+ contactTitle?: string;
449
+ contactDescription?: string;
450
+ contactButtonText?: string;
451
+ onContactClick?: () => void;
452
+ className?: string;
453
+ }
454
+ declare const Benefits: React.FC<BenefitsProps>;
455
+
456
+ interface PinProps {
457
+ /** Pin variant - 'price' shows currency/price, 'hotel' shows house icon */
458
+ variant?: 'price' | 'hotel';
459
+ /** Whether the hotel has been viewed (secondary style) */
460
+ viewed?: boolean;
461
+ /** Currency code to display */
462
+ currency?: string;
463
+ /** Price to display */
464
+ price?: number | string;
465
+ /** Whether to show the favorite (heart) icon */
466
+ showFavorite?: boolean;
467
+ /** Whether the pin is disabled */
468
+ disabled?: boolean;
469
+ /** Click handler */
470
+ onClick?: () => void;
471
+ /** Additional class name */
472
+ className?: string;
473
+ }
474
+ /**
475
+ * Pin Component
476
+ *
477
+ * Map marker pin with price or hotel icon variants.
478
+ * Used for displaying hotel markers on maps.
479
+ *
480
+ * @example
481
+ * // Price pin (default)
482
+ * <Pin price={150} currency="CHF" showFavorite />
483
+ *
484
+ * // Viewed price pin (secondary style)
485
+ * <Pin price={150} viewed showFavorite />
486
+ *
487
+ * // Hotel pin (for clusters)
488
+ * <Pin variant="hotel" />
489
+ */
490
+ declare const Pin: React__default.ForwardRefExoticComponent<PinProps & React__default.RefAttributes<HTMLButtonElement>>;
491
+
393
492
  interface HeartIconProps {
394
493
  filled?: boolean;
395
494
  className?: string;
@@ -437,4 +536,96 @@ declare const PinIcon: {
437
536
  displayName: string;
438
537
  };
439
538
 
440
- export { Badge, type BadgeProps, Button, type ButtonProps, Card, type CardBadge, type CardProps, type CardRatingInfo, Checkbox, type CheckboxProps, type CheckboxSize, ChevronLeftIcon, ChevronRightIcon, Chip, type ChipProps, type ChipSize, type ChipState, CompactCard, type CompactCardBadge, type CompactCardProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, HeartIcon, Input, type InputProps, type InputType, Modal, type ModalProps, PinIcon, RadioButton, type RadioButtonProps, Rating, type RatingProps, SectionHeader, type SectionHeaderProps, StarIcon };
539
+ declare const useDebounce: <T>(value: T, delay: number) => T;
540
+
541
+ declare const formatPrice: (amount: number, currency?: string, locale?: string) => string;
542
+
543
+ declare const formatDate: (date: string | Date, formatStr?: string, locale?: string) => string;
544
+ declare const formatDateRange: (checkIn: string | Date, checkOut: string | Date, locale?: string) => string;
545
+
546
+ declare const calculateDiscount: (originalPrice: number, discountedPrice: number) => number;
547
+
548
+ interface Hotel {
549
+ id: number;
550
+ name: string;
551
+ location: string;
552
+ region?: string;
553
+ country?: string;
554
+ stars: number;
555
+ rating?: number;
556
+ reviewCount?: number;
557
+ imageUrl: string;
558
+ images?: string[];
559
+ priceFrom: number;
560
+ originalPrice?: number;
561
+ currency: string;
562
+ discountPercent?: number;
563
+ isFavourited?: boolean;
564
+ isNew?: boolean;
565
+ benefits?: string[];
566
+ }
567
+
568
+ interface Booking {
569
+ id: number;
570
+ confirmationNumber: string;
571
+ status: 'confirmed' | 'cancelled' | 'completed';
572
+ hotel: {
573
+ id: number;
574
+ name: string;
575
+ location: string;
576
+ imageUrl: string;
577
+ };
578
+ checkIn: string;
579
+ checkOut: string;
580
+ guests: number;
581
+ roomType: string;
582
+ totalPrice: number;
583
+ currency: string;
584
+ createdAt: string;
585
+ }
586
+
587
+ interface Address {
588
+ id?: number;
589
+ line1: string;
590
+ line2?: string;
591
+ zip: string;
592
+ city: string;
593
+ countryCode: string;
594
+ }
595
+ interface Membership {
596
+ cardNumber: string;
597
+ validFrom: string;
598
+ validUntil: string;
599
+ }
600
+ interface User {
601
+ id: number;
602
+ firstName: string;
603
+ lastName: string;
604
+ email: string;
605
+ phone?: string;
606
+ locale: string;
607
+ currency: string;
608
+ activeAddress?: Address;
609
+ membership?: Membership;
610
+ }
611
+
612
+ interface SearchParams {
613
+ destination?: string;
614
+ checkIn?: string;
615
+ checkOut?: string;
616
+ adults?: number;
617
+ children?: number;
618
+ flexibleDates?: boolean;
619
+ flexibleMonth?: string;
620
+ }
621
+ interface SearchFilters {
622
+ priceMin?: number;
623
+ priceMax?: number;
624
+ stars?: number[];
625
+ rating?: number;
626
+ amenities?: string[];
627
+ experiences?: string[];
628
+ regions?: string[];
629
+ }
630
+
631
+ 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, Chip, type ChipProps, type ChipSize, type ChipState, CompactCard, type CompactCardBadge, type CompactCardProps, Divider, type DividerProps, Dropdown, type DropdownOption, type DropdownProps, FAQ, type FAQItem, type FAQProps, HeartIcon, type Hotel, Input, type InputProps, type InputType, 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 User, calculateDiscount, formatDate, formatDateRange, formatPrice, useDebounce };