@qite/tide-booking-component 1.4.61 → 1.4.63
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/build/build-cjs/index.js +93 -0
- package/build/build-cjs/src/content/components/image-with-text.d.ts +2 -1
- package/build/build-cjs/src/content/image-with-text-section/card.d.ts +4 -0
- package/build/build-cjs/src/content/image-with-text-section/index.d.ts +4 -0
- package/build/build-cjs/src/content/image-with-text-section/types.d.ts +19 -0
- package/build/build-cjs/src/index.d.ts +3 -1
- package/build/build-esm/index.js +93 -1
- package/build/build-esm/src/content/components/image-with-text.d.ts +2 -1
- package/build/build-esm/src/content/image-with-text-section/card.d.ts +4 -0
- package/build/build-esm/src/content/image-with-text-section/index.d.ts +4 -0
- package/build/build-esm/src/content/image-with-text-section/types.d.ts +19 -0
- package/build/build-esm/src/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/content/components/image-with-text.tsx +8 -6
- package/src/content/image-with-text-section/card.tsx +58 -0
- package/src/content/image-with-text-section/index.tsx +22 -0
- package/src/content/image-with-text-section/types.ts +20 -0
- package/src/index.ts +3 -1
- package/src/qsm/components/QSMContainer/qsm-container.tsx +8 -0
- package/styles/components/_image-with-text.scss +31 -34
package/build/build-cjs/index.js
CHANGED
|
@@ -32964,6 +32964,14 @@ var QSMContainer = function () {
|
|
|
32964
32964
|
return field !== undefined;
|
|
32965
32965
|
});
|
|
32966
32966
|
addSearchFieldsToPayload(payload, searchFields, qsmState);
|
|
32967
|
+
if (destination) {
|
|
32968
|
+
var option = destination.options.find(function (opt) {
|
|
32969
|
+
return opt.value === qsmState[destination.fieldKey];
|
|
32970
|
+
});
|
|
32971
|
+
if (option) {
|
|
32972
|
+
payload.destinationType = option === null || option === void 0 ? void 0 : option.type;
|
|
32973
|
+
}
|
|
32974
|
+
}
|
|
32967
32975
|
onSubmit(payload);
|
|
32968
32976
|
console.log('Submitted QSM data:', payload);
|
|
32969
32977
|
};
|
|
@@ -44909,6 +44917,90 @@ var Login = function (_a) {
|
|
|
44909
44917
|
);
|
|
44910
44918
|
};
|
|
44911
44919
|
|
|
44920
|
+
var ImageWithTextCard = function (_a) {
|
|
44921
|
+
var noCard = _a.noCard,
|
|
44922
|
+
fullImage = _a.fullImage,
|
|
44923
|
+
reverse = _a.reverse,
|
|
44924
|
+
imageSrc = _a.imageSrc,
|
|
44925
|
+
imageAlt = _a.imageAlt,
|
|
44926
|
+
title = _a.title,
|
|
44927
|
+
section1Title = _a.section1Title,
|
|
44928
|
+
section1Text = _a.section1Text,
|
|
44929
|
+
section2Title = _a.section2Title,
|
|
44930
|
+
section2Text = _a.section2Text,
|
|
44931
|
+
buttonText = _a.buttonText,
|
|
44932
|
+
onButtonClick = _a.onButtonClick;
|
|
44933
|
+
var cardClassName = 'image-with-text__card';
|
|
44934
|
+
if (noCard) {
|
|
44935
|
+
cardClassName += ' image-with-text__card--no-card';
|
|
44936
|
+
}
|
|
44937
|
+
if (fullImage) {
|
|
44938
|
+
cardClassName += ' image-with-text__card--full-image';
|
|
44939
|
+
}
|
|
44940
|
+
if (reverse) {
|
|
44941
|
+
cardClassName += ' image-with-text__card--reverse';
|
|
44942
|
+
}
|
|
44943
|
+
return React__default['default'].createElement(
|
|
44944
|
+
'div',
|
|
44945
|
+
{ className: cardClassName },
|
|
44946
|
+
React__default['default'].createElement(
|
|
44947
|
+
'div',
|
|
44948
|
+
{ className: 'image-with-text__card__image__wrapper' },
|
|
44949
|
+
React__default['default'].createElement('img', { src: imageSrc, alt: imageAlt, className: 'image-with-text__card__image' })
|
|
44950
|
+
),
|
|
44951
|
+
React__default['default'].createElement(
|
|
44952
|
+
'div',
|
|
44953
|
+
{ className: 'image-with-text__card__content' },
|
|
44954
|
+
React__default['default'].createElement('h3', { className: 'image-with-text__card__title' }, title),
|
|
44955
|
+
React__default['default'].createElement(
|
|
44956
|
+
'div',
|
|
44957
|
+
{ className: 'image-with-text__card__description' },
|
|
44958
|
+
React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, section1Title),
|
|
44959
|
+
React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, section1Text)
|
|
44960
|
+
),
|
|
44961
|
+
React__default['default'].createElement(
|
|
44962
|
+
'div',
|
|
44963
|
+
{ className: 'image-with-text__card__description' },
|
|
44964
|
+
React__default['default'].createElement('h5', { className: 'image-with-text__card__description__title' }, section2Title),
|
|
44965
|
+
React__default['default'].createElement('p', { className: 'image-with-text__card__description__text' }, section2Text)
|
|
44966
|
+
),
|
|
44967
|
+
React__default['default'].createElement(
|
|
44968
|
+
'div',
|
|
44969
|
+
{ className: 'image-with-text__card__btn' },
|
|
44970
|
+
React__default['default'].createElement('button', { type: 'button', className: 'cta cta--select', onClick: onButtonClick }, buttonText)
|
|
44971
|
+
)
|
|
44972
|
+
)
|
|
44973
|
+
);
|
|
44974
|
+
};
|
|
44975
|
+
|
|
44976
|
+
var ImageWithTextSection = function (_a) {
|
|
44977
|
+
var title = _a.title,
|
|
44978
|
+
hasBackground = _a.hasBackground,
|
|
44979
|
+
cards = _a.cards;
|
|
44980
|
+
var className = 'image-with-text '.concat(hasBackground ? 'image-with-text--background' : '');
|
|
44981
|
+
return React__default['default'].createElement(
|
|
44982
|
+
'div',
|
|
44983
|
+
{ className: className },
|
|
44984
|
+
React__default['default'].createElement(
|
|
44985
|
+
'div',
|
|
44986
|
+
{ className: 'image-with-text__container' },
|
|
44987
|
+
React__default['default'].createElement(
|
|
44988
|
+
'div',
|
|
44989
|
+
{ className: 'image-with-text__title__row' },
|
|
44990
|
+
React__default['default'].createElement('h2', { className: 'image-with-text__title' }, title)
|
|
44991
|
+
),
|
|
44992
|
+
React__default['default'].createElement(
|
|
44993
|
+
'div',
|
|
44994
|
+
{ className: 'image-with-text__card__wrapper' },
|
|
44995
|
+
!lodash.isEmpty(cards) &&
|
|
44996
|
+
cards.map(function (card, index) {
|
|
44997
|
+
return React__default['default'].createElement(ImageWithTextCard, __assign({ key: index }, card));
|
|
44998
|
+
})
|
|
44999
|
+
)
|
|
45000
|
+
)
|
|
45001
|
+
);
|
|
45002
|
+
};
|
|
45003
|
+
|
|
44912
45004
|
var signalR$1 = {};
|
|
44913
45005
|
|
|
44914
45006
|
var jqueryDeferred$1 = { exports: {} };
|
|
@@ -48808,6 +48900,7 @@ exports.BookingWizard = BookingWizard;
|
|
|
48808
48900
|
exports.Footer = Footer;
|
|
48809
48901
|
exports.Header = Header;
|
|
48810
48902
|
exports.ImageCardGrid = ImageCardGrid;
|
|
48903
|
+
exports.ImageWithTextSection = ImageWithTextSection;
|
|
48811
48904
|
exports.Login = Login;
|
|
48812
48905
|
exports.Navbar = Navbar;
|
|
48813
48906
|
exports.QSM = QSM;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type Variant = 'image-with-
|
|
2
|
+
type Variant = 'image-with-text__card--no-card' | 'image-with-text__card--full-img';
|
|
3
3
|
interface ImageWithTextCardProps {
|
|
4
|
+
variant?: Variant;
|
|
4
5
|
reverse?: boolean;
|
|
5
6
|
imageSrc: string;
|
|
6
7
|
imageAlt: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ImageWithTextSectionProps {
|
|
2
|
+
title: string;
|
|
3
|
+
hasBackground?: boolean;
|
|
4
|
+
cards: ImageWithTextCardProps[];
|
|
5
|
+
}
|
|
6
|
+
export interface ImageWithTextCardProps {
|
|
7
|
+
imageSrc: string;
|
|
8
|
+
imageAlt: string;
|
|
9
|
+
title: string;
|
|
10
|
+
section1Title: string;
|
|
11
|
+
section1Text: string;
|
|
12
|
+
section2Title: string;
|
|
13
|
+
section2Text: string;
|
|
14
|
+
buttonText: string;
|
|
15
|
+
onButtonClick?: () => void;
|
|
16
|
+
noCard?: boolean;
|
|
17
|
+
fullImage?: boolean;
|
|
18
|
+
reverse?: boolean;
|
|
19
|
+
}
|
|
@@ -7,12 +7,14 @@ import QSM from './qsm';
|
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
8
|
import ImageCardGrid from './content/image-card-grid';
|
|
9
9
|
import Login from './content/login';
|
|
10
|
+
import ImageWithTextSection from './content/image-with-text-section';
|
|
10
11
|
export * from './content/navbar/types';
|
|
11
12
|
export * from './content/header/types';
|
|
12
13
|
export * from './content/footer/types';
|
|
13
14
|
export * from './content/image-card-grid/types';
|
|
14
15
|
export * from './content/login/types';
|
|
16
|
+
export * from './content/image-with-text-section/types';
|
|
15
17
|
export * from './search-results/types';
|
|
16
18
|
export * from './qsm/types';
|
|
17
19
|
export * from './shared/types';
|
|
18
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login };
|
|
20
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection };
|
package/build/build-esm/index.js
CHANGED
|
@@ -32833,6 +32833,14 @@ var QSMContainer = function () {
|
|
|
32833
32833
|
return field !== undefined;
|
|
32834
32834
|
});
|
|
32835
32835
|
addSearchFieldsToPayload(payload, searchFields, qsmState);
|
|
32836
|
+
if (destination) {
|
|
32837
|
+
var option = destination.options.find(function (opt) {
|
|
32838
|
+
return opt.value === qsmState[destination.fieldKey];
|
|
32839
|
+
});
|
|
32840
|
+
if (option) {
|
|
32841
|
+
payload.destinationType = option === null || option === void 0 ? void 0 : option.type;
|
|
32842
|
+
}
|
|
32843
|
+
}
|
|
32836
32844
|
onSubmit(payload);
|
|
32837
32845
|
console.log('Submitted QSM data:', payload);
|
|
32838
32846
|
};
|
|
@@ -44617,6 +44625,90 @@ var Login = function (_a) {
|
|
|
44617
44625
|
);
|
|
44618
44626
|
};
|
|
44619
44627
|
|
|
44628
|
+
var ImageWithTextCard = function (_a) {
|
|
44629
|
+
var noCard = _a.noCard,
|
|
44630
|
+
fullImage = _a.fullImage,
|
|
44631
|
+
reverse = _a.reverse,
|
|
44632
|
+
imageSrc = _a.imageSrc,
|
|
44633
|
+
imageAlt = _a.imageAlt,
|
|
44634
|
+
title = _a.title,
|
|
44635
|
+
section1Title = _a.section1Title,
|
|
44636
|
+
section1Text = _a.section1Text,
|
|
44637
|
+
section2Title = _a.section2Title,
|
|
44638
|
+
section2Text = _a.section2Text,
|
|
44639
|
+
buttonText = _a.buttonText,
|
|
44640
|
+
onButtonClick = _a.onButtonClick;
|
|
44641
|
+
var cardClassName = 'image-with-text__card';
|
|
44642
|
+
if (noCard) {
|
|
44643
|
+
cardClassName += ' image-with-text__card--no-card';
|
|
44644
|
+
}
|
|
44645
|
+
if (fullImage) {
|
|
44646
|
+
cardClassName += ' image-with-text__card--full-image';
|
|
44647
|
+
}
|
|
44648
|
+
if (reverse) {
|
|
44649
|
+
cardClassName += ' image-with-text__card--reverse';
|
|
44650
|
+
}
|
|
44651
|
+
return React__default.createElement(
|
|
44652
|
+
'div',
|
|
44653
|
+
{ className: cardClassName },
|
|
44654
|
+
React__default.createElement(
|
|
44655
|
+
'div',
|
|
44656
|
+
{ className: 'image-with-text__card__image__wrapper' },
|
|
44657
|
+
React__default.createElement('img', { src: imageSrc, alt: imageAlt, className: 'image-with-text__card__image' })
|
|
44658
|
+
),
|
|
44659
|
+
React__default.createElement(
|
|
44660
|
+
'div',
|
|
44661
|
+
{ className: 'image-with-text__card__content' },
|
|
44662
|
+
React__default.createElement('h3', { className: 'image-with-text__card__title' }, title),
|
|
44663
|
+
React__default.createElement(
|
|
44664
|
+
'div',
|
|
44665
|
+
{ className: 'image-with-text__card__description' },
|
|
44666
|
+
React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, section1Title),
|
|
44667
|
+
React__default.createElement('p', { className: 'image-with-text__card__description__text' }, section1Text)
|
|
44668
|
+
),
|
|
44669
|
+
React__default.createElement(
|
|
44670
|
+
'div',
|
|
44671
|
+
{ className: 'image-with-text__card__description' },
|
|
44672
|
+
React__default.createElement('h5', { className: 'image-with-text__card__description__title' }, section2Title),
|
|
44673
|
+
React__default.createElement('p', { className: 'image-with-text__card__description__text' }, section2Text)
|
|
44674
|
+
),
|
|
44675
|
+
React__default.createElement(
|
|
44676
|
+
'div',
|
|
44677
|
+
{ className: 'image-with-text__card__btn' },
|
|
44678
|
+
React__default.createElement('button', { type: 'button', className: 'cta cta--select', onClick: onButtonClick }, buttonText)
|
|
44679
|
+
)
|
|
44680
|
+
)
|
|
44681
|
+
);
|
|
44682
|
+
};
|
|
44683
|
+
|
|
44684
|
+
var ImageWithTextSection = function (_a) {
|
|
44685
|
+
var title = _a.title,
|
|
44686
|
+
hasBackground = _a.hasBackground,
|
|
44687
|
+
cards = _a.cards;
|
|
44688
|
+
var className = 'image-with-text '.concat(hasBackground ? 'image-with-text--background' : '');
|
|
44689
|
+
return React__default.createElement(
|
|
44690
|
+
'div',
|
|
44691
|
+
{ className: className },
|
|
44692
|
+
React__default.createElement(
|
|
44693
|
+
'div',
|
|
44694
|
+
{ className: 'image-with-text__container' },
|
|
44695
|
+
React__default.createElement(
|
|
44696
|
+
'div',
|
|
44697
|
+
{ className: 'image-with-text__title__row' },
|
|
44698
|
+
React__default.createElement('h2', { className: 'image-with-text__title' }, title)
|
|
44699
|
+
),
|
|
44700
|
+
React__default.createElement(
|
|
44701
|
+
'div',
|
|
44702
|
+
{ className: 'image-with-text__card__wrapper' },
|
|
44703
|
+
!isEmpty(cards) &&
|
|
44704
|
+
cards.map(function (card, index) {
|
|
44705
|
+
return React__default.createElement(ImageWithTextCard, __assign({ key: index }, card));
|
|
44706
|
+
})
|
|
44707
|
+
)
|
|
44708
|
+
)
|
|
44709
|
+
);
|
|
44710
|
+
};
|
|
44711
|
+
|
|
44620
44712
|
var signalR$1 = {};
|
|
44621
44713
|
|
|
44622
44714
|
var jqueryDeferred$1 = { exports: {} };
|
|
@@ -48511,4 +48603,4 @@ var signalR = /*#__PURE__*/ _mergeNamespaces(
|
|
|
48511
48603
|
[signalR$1]
|
|
48512
48604
|
);
|
|
48513
48605
|
|
|
48514
|
-
export { BookingProduct, BookingWizard, DepartureRange, Footer, Header, ImageCardGrid, Login, Navbar, QSM, SearchResults };
|
|
48606
|
+
export { BookingProduct, BookingWizard, DepartureRange, Footer, Header, ImageCardGrid, ImageWithTextSection, Login, Navbar, QSM, SearchResults };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type Variant = 'image-with-
|
|
2
|
+
type Variant = 'image-with-text__card--no-card' | 'image-with-text__card--full-img';
|
|
3
3
|
interface ImageWithTextCardProps {
|
|
4
|
+
variant?: Variant;
|
|
4
5
|
reverse?: boolean;
|
|
5
6
|
imageSrc: string;
|
|
6
7
|
imageAlt: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ImageWithTextSectionProps {
|
|
2
|
+
title: string;
|
|
3
|
+
hasBackground?: boolean;
|
|
4
|
+
cards: ImageWithTextCardProps[];
|
|
5
|
+
}
|
|
6
|
+
export interface ImageWithTextCardProps {
|
|
7
|
+
imageSrc: string;
|
|
8
|
+
imageAlt: string;
|
|
9
|
+
title: string;
|
|
10
|
+
section1Title: string;
|
|
11
|
+
section1Text: string;
|
|
12
|
+
section2Title: string;
|
|
13
|
+
section2Text: string;
|
|
14
|
+
buttonText: string;
|
|
15
|
+
onButtonClick?: () => void;
|
|
16
|
+
noCard?: boolean;
|
|
17
|
+
fullImage?: boolean;
|
|
18
|
+
reverse?: boolean;
|
|
19
|
+
}
|
|
@@ -7,12 +7,14 @@ import QSM from './qsm';
|
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
8
|
import ImageCardGrid from './content/image-card-grid';
|
|
9
9
|
import Login from './content/login';
|
|
10
|
+
import ImageWithTextSection from './content/image-with-text-section';
|
|
10
11
|
export * from './content/navbar/types';
|
|
11
12
|
export * from './content/header/types';
|
|
12
13
|
export * from './content/footer/types';
|
|
13
14
|
export * from './content/image-card-grid/types';
|
|
14
15
|
export * from './content/login/types';
|
|
16
|
+
export * from './content/image-with-text-section/types';
|
|
15
17
|
export * from './search-results/types';
|
|
16
18
|
export * from './qsm/types';
|
|
17
19
|
export * from './shared/types';
|
|
18
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login };
|
|
20
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection };
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
|
|
3
|
-
type Variant = 'image-with-
|
|
3
|
+
type Variant = 'image-with-text__card--no-card' | 'image-with-text__card--full-img';
|
|
4
4
|
|
|
5
5
|
interface ImageWithTextCardProps {
|
|
6
|
+
variant?: Variant;
|
|
6
7
|
reverse?: boolean;
|
|
7
8
|
imageSrc: string;
|
|
8
9
|
imageAlt: string;
|
|
@@ -16,6 +17,7 @@ interface ImageWithTextCardProps {
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
|
|
20
|
+
variant,
|
|
19
21
|
reverse,
|
|
20
22
|
imageSrc,
|
|
21
23
|
imageAlt,
|
|
@@ -27,7 +29,7 @@ const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
|
|
|
27
29
|
buttonText,
|
|
28
30
|
onButtonClick
|
|
29
31
|
}) => (
|
|
30
|
-
<div className={`image-with-text__card ${reverse ? 'image-with-text__card--reverse' : ''}`}>
|
|
32
|
+
<div className={`image-with-text__card ${reverse ? 'image-with-text__card--reverse' : ''} ${variant ? variant.toString() : ''}`}>
|
|
31
33
|
<div className="image-with-text__card__image__wrapper">
|
|
32
34
|
<img src={imageSrc} alt={imageAlt} className="image-with-text__card__image" />
|
|
33
35
|
</div>
|
|
@@ -62,8 +64,8 @@ interface ImageWithTextSectionProps {
|
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
export const ImageWithTextSection: React.FC<ImageWithTextSectionProps> = ({ variant, sectionTitle, hasBackground = true, cards }) => {
|
|
65
|
-
const className =
|
|
66
|
-
|
|
67
|
+
const className = ['image-with-text', hasBackground && 'image-with-text--background'].filter(Boolean).join(' ');
|
|
68
|
+
console.log('variant', variant);
|
|
67
69
|
return (
|
|
68
70
|
<div className={className}>
|
|
69
71
|
<div className="image-with-text__container">
|
|
@@ -72,8 +74,8 @@ export const ImageWithTextSection: React.FC<ImageWithTextSectionProps> = ({ vari
|
|
|
72
74
|
</div>
|
|
73
75
|
|
|
74
76
|
<div className="image-with-text__card__wrapper">
|
|
75
|
-
<ImageWithTextCard {...cards[0]} />
|
|
76
|
-
<ImageWithTextCard {...cards[1]} reverse />
|
|
77
|
+
<ImageWithTextCard {...cards[0]} variant={variant} />
|
|
78
|
+
<ImageWithTextCard {...cards[1]} reverse variant={variant} />
|
|
77
79
|
</div>
|
|
78
80
|
</div>
|
|
79
81
|
</div>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageWithTextCardProps } from './types';
|
|
3
|
+
|
|
4
|
+
const ImageWithTextCard: React.FC<ImageWithTextCardProps> = ({
|
|
5
|
+
noCard,
|
|
6
|
+
fullImage,
|
|
7
|
+
reverse,
|
|
8
|
+
imageSrc,
|
|
9
|
+
imageAlt,
|
|
10
|
+
title,
|
|
11
|
+
section1Title,
|
|
12
|
+
section1Text,
|
|
13
|
+
section2Title,
|
|
14
|
+
section2Text,
|
|
15
|
+
buttonText,
|
|
16
|
+
onButtonClick
|
|
17
|
+
}) => {
|
|
18
|
+
let cardClassName = 'image-with-text__card';
|
|
19
|
+
if (noCard) {
|
|
20
|
+
cardClassName += ' image-with-text__card--no-card';
|
|
21
|
+
}
|
|
22
|
+
if (fullImage) {
|
|
23
|
+
cardClassName += ' image-with-text__card--full-image';
|
|
24
|
+
}
|
|
25
|
+
if (reverse) {
|
|
26
|
+
cardClassName += ' image-with-text__card--reverse';
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<div className={cardClassName}>
|
|
31
|
+
<div className="image-with-text__card__image__wrapper">
|
|
32
|
+
<img src={imageSrc} alt={imageAlt} className="image-with-text__card__image" />
|
|
33
|
+
</div>
|
|
34
|
+
|
|
35
|
+
<div className="image-with-text__card__content">
|
|
36
|
+
<h3 className="image-with-text__card__title">{title}</h3>
|
|
37
|
+
|
|
38
|
+
<div className="image-with-text__card__description">
|
|
39
|
+
<h5 className="image-with-text__card__description__title">{section1Title}</h5>
|
|
40
|
+
<p className="image-with-text__card__description__text">{section1Text}</p>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div className="image-with-text__card__description">
|
|
44
|
+
<h5 className="image-with-text__card__description__title">{section2Title}</h5>
|
|
45
|
+
<p className="image-with-text__card__description__text">{section2Text}</p>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div className="image-with-text__card__btn">
|
|
49
|
+
<button type="button" className="cta cta--select" onClick={onButtonClick}>
|
|
50
|
+
{buttonText}
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default ImageWithTextCard;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageWithTextSectionProps } from './types';
|
|
3
|
+
import ImageWithTextCard from './card';
|
|
4
|
+
import { isEmpty } from 'lodash';
|
|
5
|
+
|
|
6
|
+
const ImageWithTextSection: React.FC<ImageWithTextSectionProps> = ({ title, hasBackground, cards }) => {
|
|
7
|
+
const className = `image-with-text ${hasBackground ? 'image-with-text--background' : ''}`;
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<div className={className}>
|
|
11
|
+
<div className="image-with-text__container">
|
|
12
|
+
<div className="image-with-text__title__row">
|
|
13
|
+
<h2 className="image-with-text__title">{title}</h2>
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<div className="image-with-text__card__wrapper">{!isEmpty(cards) && cards.map((card, index) => <ImageWithTextCard key={index} {...card} />)}</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default ImageWithTextSection;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface ImageWithTextSectionProps {
|
|
2
|
+
title: string;
|
|
3
|
+
hasBackground?: boolean;
|
|
4
|
+
cards: ImageWithTextCardProps[];
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface ImageWithTextCardProps {
|
|
8
|
+
imageSrc: string;
|
|
9
|
+
imageAlt: string;
|
|
10
|
+
title: string;
|
|
11
|
+
section1Title: string;
|
|
12
|
+
section1Text: string;
|
|
13
|
+
section2Title: string;
|
|
14
|
+
section2Text: string;
|
|
15
|
+
buttonText: string;
|
|
16
|
+
onButtonClick?: () => void;
|
|
17
|
+
noCard?: boolean;
|
|
18
|
+
fullImage?: boolean;
|
|
19
|
+
reverse?: boolean;
|
|
20
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -7,14 +7,16 @@ import QSM from './qsm';
|
|
|
7
7
|
import SearchResults from './search-results';
|
|
8
8
|
import ImageCardGrid from './content/image-card-grid';
|
|
9
9
|
import Login from './content/login';
|
|
10
|
+
import ImageWithTextSection from './content/image-with-text-section';
|
|
10
11
|
|
|
11
12
|
export * from './content/navbar/types';
|
|
12
13
|
export * from './content/header/types';
|
|
13
14
|
export * from './content/footer/types';
|
|
14
15
|
export * from './content/image-card-grid/types';
|
|
15
16
|
export * from './content/login/types';
|
|
17
|
+
export * from './content/image-with-text-section/types';
|
|
16
18
|
export * from './search-results/types';
|
|
17
19
|
export * from './qsm/types';
|
|
18
20
|
export * from './shared/types';
|
|
19
21
|
|
|
20
|
-
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login };
|
|
22
|
+
export { BookingProduct, BookingWizard, QSM, SearchResults, Navbar, Header, Footer, ImageCardGrid, Login, ImageWithTextSection };
|
|
@@ -100,6 +100,14 @@ const QSMContainer: React.FC = () => {
|
|
|
100
100
|
// Filter out undefined fields before passing to addSearchFieldsToPayload
|
|
101
101
|
const searchFields = [departureAirport, destinationAirport, returnAirport, destination].filter((field): field is BaseFieldConfig => field !== undefined);
|
|
102
102
|
addSearchFieldsToPayload(payload, searchFields, qsmState);
|
|
103
|
+
|
|
104
|
+
if (destination) {
|
|
105
|
+
const option = destination.options.find((opt) => opt.value === qsmState[destination.fieldKey]);
|
|
106
|
+
if (option) {
|
|
107
|
+
payload.destinationType = option?.type;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
103
111
|
onSubmit(payload);
|
|
104
112
|
console.log('Submitted QSM data:', payload);
|
|
105
113
|
};
|
|
@@ -108,6 +108,7 @@
|
|
|
108
108
|
|
|
109
109
|
&__description {
|
|
110
110
|
margin-bottom: 15px;
|
|
111
|
+
|
|
111
112
|
&__title {
|
|
112
113
|
color: var(--tide-booking-image-with-text-card-description-title-color);
|
|
113
114
|
font-family: var(--tide-booking-image-with-text-card-description-title-font-family);
|
|
@@ -141,30 +142,14 @@
|
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
&--no-card {
|
|
147
|
-
.image-with-text__card__content {
|
|
148
|
-
@include mixins.media-md {
|
|
149
|
-
padding: 50px 30px;
|
|
150
|
-
padding-left: 0px;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.image-with-text__card__image {
|
|
155
|
-
&__wrapper {
|
|
156
|
-
border-radius: 16px;
|
|
157
|
-
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
145
|
|
|
161
|
-
|
|
146
|
+
&--no-card {
|
|
162
147
|
padding: 0px;
|
|
163
148
|
box-shadow: none;
|
|
164
149
|
border: none;
|
|
165
150
|
overflow: visible;
|
|
166
151
|
|
|
167
|
-
|
|
152
|
+
&.image-with-text__card--reverse {
|
|
168
153
|
.image-with-text__card__content {
|
|
169
154
|
@include mixins.media-md {
|
|
170
155
|
padding: 50px 30px;
|
|
@@ -172,31 +157,27 @@
|
|
|
172
157
|
}
|
|
173
158
|
}
|
|
174
159
|
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
&--full-img {
|
|
179
|
-
.image-with-text__card__content {
|
|
180
|
-
padding: 20px;
|
|
181
|
-
padding-top: 0px;
|
|
182
160
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
161
|
+
.image-with-text__card__content {
|
|
162
|
+
@include mixins.media-md {
|
|
163
|
+
padding: 50px 30px;
|
|
164
|
+
padding-left: 0px;
|
|
165
|
+
}
|
|
186
166
|
}
|
|
187
|
-
}
|
|
188
167
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
168
|
+
.image-with-text__card__image {
|
|
169
|
+
&__wrapper {
|
|
170
|
+
border-radius: 16px;
|
|
171
|
+
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
|
|
172
|
+
}
|
|
192
173
|
}
|
|
193
174
|
}
|
|
194
175
|
|
|
195
|
-
|
|
176
|
+
&--full-img {
|
|
196
177
|
padding: 0px;
|
|
197
178
|
border: none;
|
|
198
179
|
|
|
199
|
-
|
|
180
|
+
&.image-with-text__card--reverse {
|
|
200
181
|
.image-with-text__card__content {
|
|
201
182
|
@include mixins.media-md {
|
|
202
183
|
padding: 50px 30px;
|
|
@@ -204,6 +185,22 @@
|
|
|
204
185
|
}
|
|
205
186
|
}
|
|
206
187
|
}
|
|
188
|
+
|
|
189
|
+
.image-with-text__card__content {
|
|
190
|
+
padding: 20px;
|
|
191
|
+
padding-top: 0px;
|
|
192
|
+
|
|
193
|
+
@include mixins.media-md {
|
|
194
|
+
padding: 50px 30px;
|
|
195
|
+
padding-left: 0px;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.image-with-text__card__image {
|
|
200
|
+
&__wrapper {
|
|
201
|
+
border-radius: 0px;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
207
204
|
}
|
|
208
205
|
}
|
|
209
206
|
}
|