@qite/tide-booking-component 1.4.67 → 1.4.68

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.
@@ -45305,6 +45305,67 @@ var FAQ = function (_a) {
45305
45305
  );
45306
45306
  };
45307
45307
 
45308
+ var FeaturedTripCard = function (_a) {
45309
+ var imageSrc = _a.imageSrc,
45310
+ imageAlt = _a.imageAlt,
45311
+ title = _a.title,
45312
+ location = _a.location,
45313
+ language = _a.language,
45314
+ onButtonClick = _a.onButtonClick;
45315
+ var translations = getTranslations(language !== null && language !== void 0 ? language : 'en-GB');
45316
+ return React__default['default'].createElement(
45317
+ 'div',
45318
+ { className: 'image-card' },
45319
+ React__default['default'].createElement('img', { src: imageSrc, alt: imageAlt, className: 'image-card__image' }),
45320
+ React__default['default'].createElement(
45321
+ 'div',
45322
+ { className: 'image-card__content' },
45323
+ React__default['default'].createElement('h3', { className: 'image-card__title' }, title),
45324
+ React__default['default'].createElement(
45325
+ 'div',
45326
+ { className: 'image-card__options' },
45327
+ React__default['default'].createElement(
45328
+ 'div',
45329
+ { className: 'image-card__option' },
45330
+ React__default['default'].createElement(Icon$3, { name: 'ui-location', width: 16, height: 16 }),
45331
+ React__default['default'].createElement('span', null, location)
45332
+ )
45333
+ ),
45334
+ React__default['default'].createElement(
45335
+ 'div',
45336
+ { className: 'image-card__bottom' },
45337
+ React__default['default'].createElement('button', { className: 'cta cta--select', onClick: onButtonClick }, translations.PRODUCT.BOOK_NOW)
45338
+ )
45339
+ )
45340
+ );
45341
+ };
45342
+
45343
+ var FeaturedTrips = function (_a) {
45344
+ var title = _a.title,
45345
+ cards = _a.cards;
45346
+ return React__default['default'].createElement(
45347
+ 'div',
45348
+ { className: 'content' },
45349
+ React__default['default'].createElement(
45350
+ 'div',
45351
+ { className: 'content__container' },
45352
+ React__default['default'].createElement(
45353
+ 'div',
45354
+ { className: 'content__title__row' },
45355
+ React__default['default'].createElement('h2', { className: 'content__title' }, title)
45356
+ ),
45357
+ React__default['default'].createElement(
45358
+ 'div',
45359
+ { className: 'content__colums content__colums--4' },
45360
+ !lodash.isEmpty(cards) &&
45361
+ cards.map(function (card, idx) {
45362
+ return React__default['default'].createElement(FeaturedTripCard, __assign({ key: idx }, card));
45363
+ })
45364
+ )
45365
+ )
45366
+ );
45367
+ };
45368
+
45308
45369
  var signalR$1 = {};
45309
45370
 
45310
45371
  var jqueryDeferred$1 = { exports: {} };
@@ -49203,6 +49264,7 @@ exports.BookingProduct = BookingProduct;
49203
49264
  exports.BookingWizard = BookingWizard;
49204
49265
  exports.Breadcrumbs = Breadcrumbs;
49205
49266
  exports.FAQ = FAQ;
49267
+ exports.FeaturedTrips = FeaturedTrips;
49206
49268
  exports.Footer = Footer;
49207
49269
  exports.Header = Header;
49208
49270
  exports.ImageCardGrid = ImageCardGrid;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { FeaturedTrip } from './types';
3
+ declare const FeaturedTripCard: React.FC<FeaturedTrip>;
4
+ export default FeaturedTripCard;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { FeaturedTripsProps } from './types';
3
+ declare const FeaturedTrips: React.FC<FeaturedTripsProps>;
4
+ export default FeaturedTrips;
@@ -0,0 +1,12 @@
1
+ export interface FeaturedTripsProps {
2
+ title: string;
3
+ cards: FeaturedTrip[];
4
+ }
5
+ export interface FeaturedTrip {
6
+ imageSrc: string;
7
+ imageAlt: string;
8
+ title: string;
9
+ location: string;
10
+ language?: string;
11
+ onButtonClick?: () => void;
12
+ }
@@ -12,6 +12,7 @@ import Slider from './content/components/slider';
12
12
  import PhotoGallery from './content/components/gallery';
13
13
  import Breadcrumbs from './content/components/breadcrumb';
14
14
  import FAQ from './content/components/faq';
15
+ import FeaturedTrips from './content/featured-trips';
15
16
  export * from './content/navbar/types';
16
17
  export * from './content/header/types';
17
18
  export * from './content/footer/types';
@@ -21,6 +22,7 @@ export * from './content/image-with-text-section/types';
21
22
  export * from './search-results/types';
22
23
  export * from './qsm/types';
23
24
  export * from './shared/types';
25
+ export * from './content/featured-trips/types';
24
26
  export {
25
27
  BookingProduct,
26
28
  BookingWizard,
@@ -35,5 +37,6 @@ export {
35
37
  Slider,
36
38
  PhotoGallery,
37
39
  Breadcrumbs,
38
- FAQ
40
+ FAQ,
41
+ FeaturedTrips
39
42
  };
@@ -45008,6 +45008,63 @@ var FAQ = function (_a) {
45008
45008
  );
45009
45009
  };
45010
45010
 
45011
+ var FeaturedTripCard = function (_a) {
45012
+ var imageSrc = _a.imageSrc,
45013
+ imageAlt = _a.imageAlt,
45014
+ title = _a.title,
45015
+ location = _a.location,
45016
+ language = _a.language,
45017
+ onButtonClick = _a.onButtonClick;
45018
+ var translations = getTranslations(language !== null && language !== void 0 ? language : 'en-GB');
45019
+ return React__default.createElement(
45020
+ 'div',
45021
+ { className: 'image-card' },
45022
+ React__default.createElement('img', { src: imageSrc, alt: imageAlt, className: 'image-card__image' }),
45023
+ React__default.createElement(
45024
+ 'div',
45025
+ { className: 'image-card__content' },
45026
+ React__default.createElement('h3', { className: 'image-card__title' }, title),
45027
+ React__default.createElement(
45028
+ 'div',
45029
+ { className: 'image-card__options' },
45030
+ React__default.createElement(
45031
+ 'div',
45032
+ { className: 'image-card__option' },
45033
+ React__default.createElement(Icon$3, { name: 'ui-location', width: 16, height: 16 }),
45034
+ React__default.createElement('span', null, location)
45035
+ )
45036
+ ),
45037
+ React__default.createElement(
45038
+ 'div',
45039
+ { className: 'image-card__bottom' },
45040
+ React__default.createElement('button', { className: 'cta cta--select', onClick: onButtonClick }, translations.PRODUCT.BOOK_NOW)
45041
+ )
45042
+ )
45043
+ );
45044
+ };
45045
+
45046
+ var FeaturedTrips = function (_a) {
45047
+ var title = _a.title,
45048
+ cards = _a.cards;
45049
+ return React__default.createElement(
45050
+ 'div',
45051
+ { className: 'content' },
45052
+ React__default.createElement(
45053
+ 'div',
45054
+ { className: 'content__container' },
45055
+ React__default.createElement('div', { className: 'content__title__row' }, React__default.createElement('h2', { className: 'content__title' }, title)),
45056
+ React__default.createElement(
45057
+ 'div',
45058
+ { className: 'content__colums content__colums--4' },
45059
+ !isEmpty(cards) &&
45060
+ cards.map(function (card, idx) {
45061
+ return React__default.createElement(FeaturedTripCard, __assign({ key: idx }, card));
45062
+ })
45063
+ )
45064
+ )
45065
+ );
45066
+ };
45067
+
45011
45068
  var signalR$1 = {};
45012
45069
 
45013
45070
  var jqueryDeferred$1 = { exports: {} };
@@ -48908,6 +48965,7 @@ export {
48908
48965
  Breadcrumbs,
48909
48966
  DepartureRange,
48910
48967
  FAQ,
48968
+ FeaturedTrips,
48911
48969
  Footer,
48912
48970
  Header,
48913
48971
  ImageCardGrid,
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { FeaturedTrip } from './types';
3
+ declare const FeaturedTripCard: React.FC<FeaturedTrip>;
4
+ export default FeaturedTripCard;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { FeaturedTripsProps } from './types';
3
+ declare const FeaturedTrips: React.FC<FeaturedTripsProps>;
4
+ export default FeaturedTrips;
@@ -0,0 +1,12 @@
1
+ export interface FeaturedTripsProps {
2
+ title: string;
3
+ cards: FeaturedTrip[];
4
+ }
5
+ export interface FeaturedTrip {
6
+ imageSrc: string;
7
+ imageAlt: string;
8
+ title: string;
9
+ location: string;
10
+ language?: string;
11
+ onButtonClick?: () => void;
12
+ }
@@ -12,6 +12,7 @@ import Slider from './content/components/slider';
12
12
  import PhotoGallery from './content/components/gallery';
13
13
  import Breadcrumbs from './content/components/breadcrumb';
14
14
  import FAQ from './content/components/faq';
15
+ import FeaturedTrips from './content/featured-trips';
15
16
  export * from './content/navbar/types';
16
17
  export * from './content/header/types';
17
18
  export * from './content/footer/types';
@@ -21,6 +22,7 @@ export * from './content/image-with-text-section/types';
21
22
  export * from './search-results/types';
22
23
  export * from './qsm/types';
23
24
  export * from './shared/types';
25
+ export * from './content/featured-trips/types';
24
26
  export {
25
27
  BookingProduct,
26
28
  BookingWizard,
@@ -35,5 +37,6 @@ export {
35
37
  Slider,
36
38
  PhotoGallery,
37
39
  Breadcrumbs,
38
- FAQ
40
+ FAQ,
41
+ FeaturedTrips
39
42
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qite/tide-booking-component",
3
- "version": "1.4.67",
3
+ "version": "1.4.68",
4
4
  "description": "React Booking wizard & Booking product component for Tide",
5
5
  "main": "build/build-cjs/index.js",
6
6
  "types": "build/build-cjs/src/index.d.ts",
@@ -0,0 +1,46 @@
1
+ import React from 'react';
2
+ import { FeaturedTrip } from './types';
3
+ import Icon from '../components/icon';
4
+ import { getTranslations } from '../../shared/utils/localization-util';
5
+
6
+ const FeaturedTripCard: React.FC<FeaturedTrip> = ({ imageSrc, imageAlt, title, location, language, onButtonClick }) => {
7
+ const translations = getTranslations(language ?? 'en-GB');
8
+
9
+ return (
10
+ <div className="image-card">
11
+ <img src={imageSrc} alt={imageAlt} className="image-card__image" />
12
+ <div className="image-card__content">
13
+ <h3 className="image-card__title">{title}</h3>
14
+ <div className="image-card__options">
15
+ <div className="image-card__option">
16
+ <Icon name="ui-location" width={16} height={16} />
17
+ <span>{location}</span>
18
+ </div>
19
+ {/* <div className="image-card__option">
20
+ <Icon name="ui-moon" width={16} height={16} />
21
+ <span>2 nights</span>
22
+ </div>
23
+ <div className="image-card__option">
24
+ <Icon name="ui-plane" width={16} height={16} />
25
+ <span>3 transports</span>
26
+ </div> */}
27
+ </div>
28
+ {/* <p className="image__card__description">
29
+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat nulla aliquam, quis accusantium quae inventore, accusamus cumque culpa, quasi officia magnam suscipit laboriosam. Velit eveniet, id modi aperiam natus veritatis.
30
+ </p> */}
31
+ <div className="image-card__bottom">
32
+ {/* <div className="image-card__price">
33
+ From
34
+ <p className="image-card__price--amount">$899</p>
35
+ Per Person
36
+ </div> */}
37
+ <button className="cta cta--select" onClick={onButtonClick}>
38
+ {translations.PRODUCT.BOOK_NOW}
39
+ </button>
40
+ </div>
41
+ </div>
42
+ </div>
43
+ );
44
+ };
45
+
46
+ export default FeaturedTripCard;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { FeaturedTripsProps } from './types';
3
+ import { isEmpty } from 'lodash';
4
+ import FeaturedTripCard from './featured-trip-card';
5
+
6
+ const FeaturedTrips: React.FC<FeaturedTripsProps> = ({ title, cards }) => {
7
+ return (
8
+ <div className="content">
9
+ <div className="content__container">
10
+ <div className="content__title__row">
11
+ <h2 className="content__title">{title}</h2>
12
+ </div>
13
+ <div className="content__colums content__colums--4">{!isEmpty(cards) && cards.map((card, idx) => <FeaturedTripCard key={idx} {...card} />)}</div>
14
+ </div>
15
+ </div>
16
+ );
17
+ };
18
+
19
+ export default FeaturedTrips;
@@ -0,0 +1,13 @@
1
+ export interface FeaturedTripsProps {
2
+ title: string;
3
+ cards: FeaturedTrip[];
4
+ }
5
+
6
+ export interface FeaturedTrip {
7
+ imageSrc: string;
8
+ imageAlt: string;
9
+ title: string;
10
+ location: string;
11
+ language?: string;
12
+ onButtonClick?: () => void;
13
+ }
package/src/index.ts CHANGED
@@ -12,6 +12,7 @@ import Slider from './content/components/slider';
12
12
  import PhotoGallery from './content/components/gallery';
13
13
  import Breadcrumbs from './content/components/breadcrumb';
14
14
  import FAQ from './content/components/faq';
15
+ import FeaturedTrips from './content/featured-trips';
15
16
 
16
17
  export * from './content/navbar/types';
17
18
  export * from './content/header/types';
@@ -22,6 +23,7 @@ export * from './content/image-with-text-section/types';
22
23
  export * from './search-results/types';
23
24
  export * from './qsm/types';
24
25
  export * from './shared/types';
26
+ export * from './content/featured-trips/types';
25
27
 
26
28
  export {
27
29
  BookingProduct,
@@ -37,5 +39,6 @@ export {
37
39
  Slider,
38
40
  PhotoGallery,
39
41
  Breadcrumbs,
40
- FAQ
42
+ FAQ,
43
+ FeaturedTrips
41
44
  };