@harshit-wander/component-lib 0.1.0 → 1.0.1

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/dist/index.d.ts CHANGED
@@ -1,13 +1,26 @@
1
1
  import * as react from 'react';
2
2
  import { HTMLAttributes, FormHTMLAttributes, ReactNode, ElementType } from 'react';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import * as styled_components from 'styled-components';
5
4
 
5
+ /** A single partner brand to render as a logo card. */
6
6
  interface Brand {
7
+ /** Image URL for the brand's logo. Rendered as the `src` of an `<img>`. */
7
8
  logo: string;
9
+ /** Brand name. Used as the image `alt` text and rendered as the visible label. */
8
10
  name: string;
11
+ /**
12
+ * Optional URL. When provided, the card becomes an anchor that opens in a new
13
+ * tab with `rel="noopener noreferrer"`. Omit to render a non-interactive card.
14
+ */
9
15
  href?: string;
10
16
  }
17
+ /**
18
+ * Props for the `BrandLogo` component.
19
+ *
20
+ * Extends `HTMLAttributes<HTMLElement>` so consumers can pass standard DOM
21
+ * attributes (`className`, `style`, `aria-*`, `data-*`, event handlers). They
22
+ * are forwarded to the root element — `<a>` when `href` is set, `<div>` otherwise.
23
+ */
11
24
  interface BrandLogoProps extends HTMLAttributes<HTMLElement>, Brand {
12
25
  }
13
26
 
@@ -52,16 +65,25 @@ interface DestinationCardProps extends HTMLAttributes<HTMLElement> {
52
65
  href?: string | undefined;
53
66
  }
54
67
 
55
- declare const DestinationCard: react.ForwardRefExoticComponent<DestinationCardProps & react.RefAttributes<HTMLAnchorElement>>;
68
+ declare const DestinationCard: react.ForwardRefExoticComponent<DestinationCardProps & react.RefAttributes<HTMLElement>>;
56
69
 
57
70
  interface EventBannerProps extends HTMLAttributes<HTMLElement> {
58
- image: string;
71
+ imageUrl: string;
59
72
  alt: string;
60
73
  href?: string | undefined;
61
74
  }
62
75
 
63
76
  declare const EventBanner: react.ForwardRefExoticComponent<EventBannerProps & react.RefAttributes<HTMLDivElement>>;
64
77
 
78
+ interface EventVideoBannerProps extends HTMLAttributes<HTMLElement> {
79
+ posterUrl: string;
80
+ videoUrl: string;
81
+ alt: string;
82
+ href?: string | undefined;
83
+ }
84
+
85
+ declare const EventVideoBanner: react.ForwardRefExoticComponent<EventVideoBannerProps & react.RefAttributes<HTMLDivElement>>;
86
+
65
87
  interface ValueItem {
66
88
  title: string;
67
89
  bullets: string[];
@@ -84,7 +106,7 @@ interface ExploreCardProps extends HTMLAttributes<HTMLElement> {
84
106
  href?: string | undefined;
85
107
  }
86
108
 
87
- declare const ExploreCard: react.ForwardRefExoticComponent<ExploreCardProps & react.RefAttributes<HTMLAnchorElement>>;
109
+ declare const ExploreCard: react.ForwardRefExoticComponent<ExploreCardProps & react.RefAttributes<HTMLElement>>;
88
110
 
89
111
  interface FaqItem {
90
112
  question: string;
@@ -99,10 +121,9 @@ interface FaqExpandableProps extends Omit<HTMLAttributes<HTMLElement>, 'onToggle
99
121
  declare const FaqExpandable: react.ForwardRefExoticComponent<FaqExpandableProps & react.RefAttributes<HTMLElement>>;
100
122
 
101
123
  interface FeatureCardProps extends HTMLAttributes<HTMLElement> {
102
- title: string;
103
- description: string;
104
- illustration: string;
105
- illustrationAlt?: string | undefined;
124
+ heading: string;
125
+ description?: string | undefined;
126
+ imageUrl?: string | undefined;
106
127
  }
107
128
 
108
129
  declare const FeatureCard: react.ForwardRefExoticComponent<FeatureCardProps & react.RefAttributes<HTMLElement>>;
@@ -150,7 +171,7 @@ interface PackageCardProps extends HTMLAttributes<HTMLElement> {
150
171
  href?: string | undefined;
151
172
  }
152
173
 
153
- declare const PackageCard: react.ForwardRefExoticComponent<PackageCardProps & react.RefAttributes<HTMLAnchorElement>>;
174
+ declare const PackageCard: react.ForwardRefExoticComponent<PackageCardProps & react.RefAttributes<HTMLElement>>;
154
175
 
155
176
  type SectionHeaderAlign = 'left' | 'center';
156
177
  interface SectionHeaderProps extends HTMLAttributes<HTMLElement> {
@@ -198,7 +219,7 @@ interface TripCategoryCardProps extends HTMLAttributes<HTMLElement> {
198
219
  href?: string | undefined;
199
220
  }
200
221
 
201
- declare const TripCategoryCard: react.ForwardRefExoticComponent<TripCategoryCardProps & react.RefAttributes<HTMLAnchorElement>>;
222
+ declare const TripCategoryCard: react.ForwardRefExoticComponent<TripCategoryCardProps & react.RefAttributes<HTMLElement>>;
202
223
 
203
224
  interface Warrior {
204
225
  icon: ReactNode | string;
@@ -228,10 +249,7 @@ interface BrandsSectionProps extends HTMLAttributes<HTMLElement> {
228
249
  brands: Brand[];
229
250
  }
230
251
 
231
- declare const BrandsSection: {
232
- ({ heading, subheading, brands, ...rest }: BrandsSectionProps): react_jsx_runtime.JSX.Element;
233
- displayName: string;
234
- };
252
+ declare const BrandsSection: react.ForwardRefExoticComponent<BrandsSectionProps & react.RefAttributes<HTMLElement>>;
235
253
 
236
254
  interface NavCategoryItem {
237
255
  label: string;
@@ -257,7 +275,17 @@ interface MobileCta {
257
275
  interface CategoryNavbarProps extends HTMLAttributes<HTMLElement> {
258
276
  logo: string | ReactNode;
259
277
  logoHref?: string;
260
- categories: NavCategory[];
278
+ /**
279
+ * Categories rendered horizontally in the desktop bar (visible on `md`+ screens).
280
+ * Each entry may have its own `items[]` mega-menu dropdown.
281
+ */
282
+ desktopCategories: NavCategory[];
283
+ /**
284
+ * Categories rendered inside the mobile hamburger drawer (visible on screens
285
+ * below `md`). Independent from `desktopCategories` so the two can show
286
+ * different sets of links — typically more entries in the mobile drawer.
287
+ */
288
+ mobileCategories: NavCategory[];
261
289
  searchHref?: string;
262
290
  phoneNumber?: string | undefined;
263
291
  LinkComponent?: ElementType | undefined;
@@ -266,6 +294,12 @@ interface CategoryNavbarProps extends HTMLAttributes<HTMLElement> {
266
294
  onMobileOpenChange?: (next: boolean) => void;
267
295
  mobileFooterLinks?: MobileFooterLink[] | undefined;
268
296
  mobileCta?: MobileCta | undefined;
297
+ /**
298
+ * Whether the navbar sticks to the top of the viewport on scroll.
299
+ * Defaults to `true`. Set to `false` when composing inside a shared sticky
300
+ * parent (e.g. `SiteHeader`).
301
+ */
302
+ sticky?: boolean | undefined;
269
303
  }
270
304
 
271
305
  declare const CategoryNavbar: react.ForwardRefExoticComponent<CategoryNavbarProps & react.RefAttributes<HTMLElement>>;
@@ -311,14 +345,25 @@ interface DestinationsSectionProps extends HTMLAttributes<HTMLElement> {
311
345
 
312
346
  declare const DestinationsSection: react.ForwardRefExoticComponent<DestinationsSectionProps & react.RefAttributes<HTMLElement>>;
313
347
 
314
- interface EventCarouselItem {
315
- image: string;
348
+ interface EventCarouselImageItem {
349
+ imageUrl: string;
316
350
  alt: string;
317
351
  href?: string | undefined;
318
352
  }
319
- interface EventCarouselProps extends HTMLAttributes<HTMLElement> {
320
- events: EventCarouselItem[];
353
+ interface EventCarouselVideoItem {
354
+ posterUrl: string;
355
+ videoUrl: string;
356
+ alt: string;
357
+ href?: string | undefined;
321
358
  }
359
+ type BaseProps = HTMLAttributes<HTMLElement>;
360
+ type EventCarouselProps = (BaseProps & {
361
+ variant?: 'image';
362
+ events: EventCarouselImageItem[];
363
+ }) | (BaseProps & {
364
+ variant: 'video';
365
+ events: EventCarouselVideoItem[];
366
+ });
322
367
 
323
368
  declare const EventCarousel: react.ForwardRefExoticComponent<EventCarouselProps & react.RefAttributes<HTMLElement>>;
324
369
 
@@ -343,7 +388,7 @@ interface FaqSectionProps extends HTMLAttributes<HTMLElement> {
343
388
  }
344
389
 
345
390
  declare const FaqSection: {
346
- ({ heading, subheading, faqs, singleOpen, ...rest }: FaqSectionProps): react_jsx_runtime.JSX.Element;
391
+ ({ heading, subheading, faqs, singleOpen, className, ...rest }: FaqSectionProps): react_jsx_runtime.JSX.Element;
347
392
  displayName: string;
348
393
  };
349
394
 
@@ -416,6 +461,50 @@ type HeroProps = (HeroBase & {
416
461
 
417
462
  declare const Hero: react.ForwardRefExoticComponent<HeroProps & react.RefAttributes<HTMLElement>>;
418
463
 
464
+ interface HomeHeroReview {
465
+ /** Brand logo URL (e.g. Google, TripAdvisor, Facebook). Rendered as a 40×40 square. */
466
+ logoUrl: string;
467
+ /** Accessible label for the logo (brand name). */
468
+ alt: string;
469
+ /** Numeric rating, e.g. 4.9. Rendered to one decimal. */
470
+ rating: number;
471
+ /** Total reviews count, e.g. 6626. Rendered with thousands separators. */
472
+ reviewCount: number;
473
+ }
474
+ interface HomeHeroTypewriterOptions {
475
+ /** Milliseconds between each typed character. Default 80. */
476
+ typeSpeedMs?: number;
477
+ /** Milliseconds between each deleted character. Default 40. */
478
+ deleteSpeedMs?: number;
479
+ /** Milliseconds to hold the fully-typed phrase before deleting. Default 1500. */
480
+ pauseFullMs?: number;
481
+ /** Milliseconds to hold empty before starting the next phrase. Default 300. */
482
+ pauseEmptyMs?: number;
483
+ }
484
+ interface HomeHeroProps extends HTMLAttributes<HTMLElement> {
485
+ /** Source URL for the background `<video>`. Plays muted, autoplay, looped, inline. */
486
+ videoUrl: string;
487
+ /** Poster image URL shown before the video loads and on browsers that block autoplay. */
488
+ posterUrl: string;
489
+ /** Static heading. White, bold, large. */
490
+ title: string;
491
+ /**
492
+ * Subtitle phrases that cycle via a typewriter effect — each one types in,
493
+ * pauses, then erases before the next begins. Pass a single-element array to
494
+ * effectively get a static (non-cycling) subtitle.
495
+ */
496
+ cyclingPhrases: string[];
497
+ /** Optional fine-tuning of the typewriter timings. */
498
+ typewriter?: HomeHeroTypewriterOptions;
499
+ /**
500
+ * Brand rating badges shown in the bottom strip. Provide 0–N entries; the
501
+ * strip is hidden when empty.
502
+ */
503
+ reviews?: HomeHeroReview[];
504
+ }
505
+
506
+ declare const HomeHero: react.ForwardRefExoticComponent<HomeHeroProps & react.RefAttributes<HTMLElement>>;
507
+
419
508
  interface NavLink {
420
509
  label: string;
421
510
  href: string;
@@ -430,6 +519,12 @@ interface NavbarProps extends HTMLAttributes<HTMLElement> {
430
519
  phoneNumber?: string | undefined;
431
520
  phoneIcon?: ReactNode;
432
521
  LinkComponent?: ElementType | undefined;
522
+ /**
523
+ * Whether the navbar sticks to the top of the viewport on scroll.
524
+ * Defaults to `true`. Set to `false` when composing the navbar inside a
525
+ * shared sticky parent (e.g. `SiteHeader`).
526
+ */
527
+ sticky?: boolean | undefined;
433
528
  }
434
529
 
435
530
  declare const Navbar: react.ForwardRefExoticComponent<NavbarProps & react.RefAttributes<HTMLElement>>;
@@ -440,10 +535,7 @@ interface OfficesSectionProps extends HTMLAttributes<HTMLElement> {
440
535
  locations: LocationItem[];
441
536
  }
442
537
 
443
- declare const OfficesSection: {
444
- ({ heading, subheading, locations, ...rest }: OfficesSectionProps): react_jsx_runtime.JSX.Element;
445
- displayName: string;
446
- };
538
+ declare const OfficesSection: react.ForwardRefExoticComponent<OfficesSectionProps & react.RefAttributes<HTMLElement>>;
447
539
 
448
540
  interface PackageItem {
449
541
  image: string;
@@ -469,16 +561,33 @@ interface PackagesCarouselProps extends HTMLAttributes<HTMLElement> {
469
561
 
470
562
  declare const PackagesCarousel: react.ForwardRefExoticComponent<PackagesCarouselProps & react.RefAttributes<HTMLElement>>;
471
563
 
564
+ /**
565
+ * Stacked-navbar shell. Renders {@link Navbar} (hidden on mobile) above
566
+ * {@link CategoryNavbar}; the outer wrapper is the only sticky element so the
567
+ * two children stack together on scroll instead of overlapping.
568
+ *
569
+ * Pass props to each child via `navbar` / `categoryNavbar`. The `sticky` field
570
+ * on those nested props is ignored — it's controlled by this component.
571
+ */
572
+ interface SiteHeaderProps extends HTMLAttributes<HTMLDivElement> {
573
+ navbar: Omit<NavbarProps, 'sticky'>;
574
+ categoryNavbar: Omit<CategoryNavbarProps, 'sticky'>;
575
+ /**
576
+ * Whether the outer `<header>` itself sticks to the top of the viewport on
577
+ * scroll. Defaults to `true`.
578
+ */
579
+ sticky?: boolean | undefined;
580
+ }
581
+
582
+ declare const SiteHeader: react.ForwardRefExoticComponent<SiteHeaderProps & react.RefAttributes<HTMLDivElement>>;
583
+
472
584
  interface TeamSectionProps extends HTMLAttributes<HTMLElement> {
473
585
  heading: string;
474
586
  subheading?: string;
475
587
  members: TeamMember[];
476
588
  }
477
589
 
478
- declare const TeamSection: {
479
- ({ heading, subheading, members, ...rest }: TeamSectionProps): react_jsx_runtime.JSX.Element;
480
- displayName: string;
481
- };
590
+ declare const TeamSection: react.ForwardRefExoticComponent<TeamSectionProps & react.RefAttributes<HTMLElement>>;
482
591
 
483
592
  interface TestimonialItem {
484
593
  thumbnail: string;
@@ -536,10 +645,7 @@ interface ValuesSectionProps extends HTMLAttributes<HTMLElement> {
536
645
  singleOpen?: boolean;
537
646
  }
538
647
 
539
- declare const ValuesSection: {
540
- ({ heading, subheading, values, singleOpen, ...rest }: ValuesSectionProps): react_jsx_runtime.JSX.Element;
541
- displayName: string;
542
- };
648
+ declare const ValuesSection: react.ForwardRefExoticComponent<ValuesSectionProps & react.RefAttributes<HTMLElement>>;
543
649
 
544
650
  interface WarriorsSectionProps extends HTMLAttributes<HTMLElement> {
545
651
  heading: string;
@@ -547,16 +653,12 @@ interface WarriorsSectionProps extends HTMLAttributes<HTMLElement> {
547
653
  warriors: Warrior[];
548
654
  }
549
655
 
550
- declare const WarriorsSection: {
551
- ({ heading, subheading, warriors, ...rest }: WarriorsSectionProps): react_jsx_runtime.JSX.Element;
552
- displayName: string;
553
- };
656
+ declare const WarriorsSection: react.ForwardRefExoticComponent<WarriorsSectionProps & react.RefAttributes<HTMLElement>>;
554
657
 
555
658
  interface WhyChooseFeature {
556
- title: string;
557
- description: string;
558
- illustration: string;
559
- illustrationAlt?: string | undefined;
659
+ heading: string;
660
+ description?: string | undefined;
661
+ imageUrl?: string | undefined;
560
662
  }
561
663
  interface WhyChooseSectionProps extends HTMLAttributes<HTMLElement> {
562
664
  heading: string;
@@ -566,13 +668,6 @@ interface WhyChooseSectionProps extends HTMLAttributes<HTMLElement> {
566
668
  declare const WhyChooseSection: react.ForwardRefExoticComponent<WhyChooseSectionProps & react.RefAttributes<HTMLElement>>;
567
669
 
568
670
  declare const theme: {
569
- readonly typography: {
570
- readonly sectionHeading: styled_components.RuleSet<object>;
571
- readonly sectionSubheading: styled_components.RuleSet<object>;
572
- readonly cardTitle: styled_components.RuleSet<object>;
573
- readonly cardBody: styled_components.RuleSet<object>;
574
- readonly cardLabel: styled_components.RuleSet<object>;
575
- };
576
671
  readonly layout: {
577
672
  readonly sectionPadding: "32px 24px";
578
673
  readonly cardPadding: "24px";
@@ -628,4 +723,4 @@ declare const theme: {
628
723
  };
629
724
  type Theme = typeof theme;
630
725
 
631
- export { BottomNav, type BottomNavItem, type BottomNavProps, type Brand, BrandLogo, type BrandLogoProps, BrandsSection, type BrandsSectionProps, CategoryNavbar, type CategoryNavbarProps, ContactForm, type ContactFormCountryCode, type ContactFormDestination, type ContactFormProps, type ContactFormValues, ContactSection, type ContactSectionProps, CtaBanner, type CtaBannerCta, type CtaBannerProps, DestinationCard, type DestinationCardProps, type DestinationItem, DestinationsSection, type DestinationsSectionProps, EventBanner, type EventBannerProps, EventCarousel, type EventCarouselItem, type EventCarouselProps, ExpandableValueCard, type ExpandableValueCardProps, ExploreCard, type ExploreCardProps, type ExploreItem, ExploreSection, type ExploreSectionProps, FaqExpandable, type FaqExpandableProps, type FaqItem, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, Footer, type FooterColumn, type FooterContact, type FooterLink, type FooterProps, type FooterSocialLink, GalleryPhoto, type GalleryPhotoData, type GalleryPhotoProps, GallerySection, type GallerySectionProps, Hero, type HeroProps, type HeroReview, type HeroVariant, LocationCard, type LocationCardProps, type LocationItem, type MonthTab, MonthTabs, type MonthTabsProps, type NavCategory, type NavCategoryItem, type NavLink, Navbar, type NavbarProps, OfficesSection, type OfficesSectionProps, PackageCard, type PackageCardProps, type PackageItem, PackagesCarousel, type PackagesCarouselProps, SectionHeader, type SectionHeaderAlign, type SectionHeaderProps, TeamInfoCard, type TeamInfoCardProps, type TeamMember, TeamSection, type TeamSectionProps, type TeamSocialLink, TestimonialCard, type TestimonialCardProps, type TestimonialItem, TestimonialsCarousel, type TestimonialsCarouselProps, TextSection, type TextSectionAlign, type TextSectionProps, type Theme, TripCategoryCard, type TripCategoryCardProps, type TripsCategoryItem, TripsCategorySection, type TripsCategorySectionCta, type TripsCategorySectionProps, type ValueItem, ValuesSection, type ValuesSectionProps, type Warrior, WarriorCard, type WarriorCardProps, WarriorsSection, type WarriorsSectionProps, type WhyChooseFeature, WhyChooseSection, type WhyChooseSectionProps, theme };
726
+ export { BottomNav, type BottomNavItem, type BottomNavProps, type Brand, BrandLogo, type BrandLogoProps, BrandsSection, type BrandsSectionProps, CategoryNavbar, type CategoryNavbarProps, ContactForm, type ContactFormCountryCode, type ContactFormDestination, type ContactFormProps, type ContactFormValues, ContactSection, type ContactSectionProps, CtaBanner, type CtaBannerCta, type CtaBannerProps, DestinationCard, type DestinationCardProps, type DestinationItem, DestinationsSection, type DestinationsSectionProps, EventBanner, type EventBannerProps, EventCarousel, type EventCarouselImageItem, type EventCarouselProps, type EventCarouselVideoItem, EventVideoBanner, type EventVideoBannerProps, ExpandableValueCard, type ExpandableValueCardProps, ExploreCard, type ExploreCardProps, type ExploreItem, ExploreSection, type ExploreSectionProps, FaqExpandable, type FaqExpandableProps, type FaqItem, FaqSection, type FaqSectionProps, FeatureCard, type FeatureCardProps, Footer, type FooterColumn, type FooterContact, type FooterLink, type FooterProps, type FooterSocialLink, GalleryPhoto, type GalleryPhotoData, type GalleryPhotoProps, GallerySection, type GallerySectionProps, Hero, type HeroProps, type HeroReview, type HeroVariant, HomeHero, type HomeHeroProps, type HomeHeroReview, type HomeHeroTypewriterOptions, LocationCard, type LocationCardProps, type LocationItem, type MonthTab, MonthTabs, type MonthTabsProps, type NavCategory, type NavCategoryItem, type NavLink, Navbar, type NavbarProps, OfficesSection, type OfficesSectionProps, PackageCard, type PackageCardProps, type PackageItem, PackagesCarousel, type PackagesCarouselProps, SectionHeader, type SectionHeaderAlign, type SectionHeaderProps, SiteHeader, type SiteHeaderProps, TeamInfoCard, type TeamInfoCardProps, type TeamMember, TeamSection, type TeamSectionProps, type TeamSocialLink, TestimonialCard, type TestimonialCardProps, type TestimonialItem, TestimonialsCarousel, type TestimonialsCarouselProps, TextSection, type TextSectionAlign, type TextSectionProps, type Theme, TripCategoryCard, type TripCategoryCardProps, type TripsCategoryItem, TripsCategorySection, type TripsCategorySectionCta, type TripsCategorySectionProps, type ValueItem, ValuesSection, type ValuesSectionProps, type Warrior, WarriorCard, type WarriorCardProps, WarriorsSection, type WarriorsSectionProps, type WhyChooseFeature, WhyChooseSection, type WhyChooseSectionProps, theme };