@webjet/react 4.0.11 → 4.0.13
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/components/date-picker-input.js +1 -1
- package/components/date-picker.js +1 -1
- package/components/date-range-picker-input.js +1 -1
- package/components/date-range-picker.js +1 -1
- package/components/drawer.js +1 -1
- package/components/flight-card-header.js +1 -1
- package/components/flight-card-info.js +1 -1
- package/components/payment-confirmation-panel.js +1 -1
- package/components/product-navigation-drawer.js +1 -1
- package/components/slider.js +1 -1
- package/components/textfield.js +1 -1
- package/package.json +2 -1
package/components/textfield.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={8627:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ErrorMessageField=void 0;var n=o(r(2015)),i=(o(r(9825)),r(4144)),a=t.ErrorMessageField=function(e){var t=e.children,r=void 0===t?null:t;return r&&n.default.createElement(i.ErrorMessage,{"data-testid":"error-message",role:"error-message"},r)};t.default=a},4144:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessage=void 0;var n=o(r(2770)),i=r(3290);t.ErrorMessage=n.default.label.withConfig({displayName:"ErrorMessageFieldstyle__ErrorMessage",componentId:"sc-s1cvz0-0"})(["&&{"," display:block;position:relative;margin-top:10px;background:",";padding:6px 8px 6px 8px;border-radius:",";font-size:14px;color:",";line-height:130%;text-align:left;font-weight:normal;box-sizing:border-box;&:before{width:0;top:-8px;z-index:1;position:absolute;content:'';height:0;left:0;right:0;text-align:center;margin:0 auto;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:10px solid #f2dede;}}"],i.mixins.globalStyles,i.theme.validationColors.inputErrorBackground,i.theme.borderRadius,i.theme.validationColors.inputErrorText)},1792:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(8627));t.default=n.default},2078:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(2770)),i=r(3290),a=n.default.span.withConfig({displayName:"Iconstyle__Icon",componentId:"sc-1gq7yvz-0"})(["font-family:",";display:inline-block;font-size:16px;font-weight:normal;-webkit-font-smoothing:antialiased;&:after{content:'","';}"],i.theme.fontFamily.icon,(function(e){var t=e.iconName;return l(t)})),l=function(e){switch(e){case"wj-alt-cross":return"\\E027";case"wj-caret-up":return"\\E001";case"wj-caret-right":return"\\E002";case"wj-caret-down":return"\\E003";case"wj-caret-left":return"\\E004";case"wj-check":return"\\E028";case"wj-cross":return"\\E016";case"wj-destination-search":return"\\F094";case"wj-calendar":return"\\F012";case"wj-dbl-calendar":return"\\F026";case"wj-depart":return"\\F018";case"wj-arrival":return"\\F019";case"wj-dollar":return"\\E059";case"wj-expand":return"\\E01F";case"wj-time":return"\\E021";case"wj-arrow-left":return"\\E00C";case"wj-arrow-right":return"\\E00A";case"wj-arrow-previous":return"\\F01D";case"wj-arrow-next":return"\\F01E";case"wj-mappin":return"\\E01D";case"wj-car-pickup":return"\\F074";case"wj-car-dropoff":return"\\F075";case"wj-alt-info":return"\\F01A";case"wj-alt-plus":return"\\E025";case"wj-tag":return"\\E023";case"wj-unlock":return"\\F072"}return""};t.default=a},2846:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6031)),i=o(r(2462)),a=o(r(2015)),l=(o(r(9825)),o(r(2078))),c=["name"];t.default=function(e){var t=e.name,r=(0,i.default)(e,c);return a.default.createElement(l.default,(0,n.default)({iconName:t},r))}},9473:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9825)),i=function(e){var t=e.condition,r=void 0!==t&&t,o=e.children;return!0===r?o:null};i.propTypes={condition:n.default.bool},t.default=i},3080:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9473));t.default=n.default},509:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={greys:{white:"#FFFFFF",offWhite:"#FFEADC",grey50:"#F5F5F5",grey100:"#EBEBEB",grey200:"#DFDFDF",grey300:"#CCCCCC",grey400:"#BFBFBF",grey500:"#999999",grey600:"#878787",grey700:"#646464",grey800:"#4D4D4D",grey900:"#333333",black:"#000000"}}},9090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},4341:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={elevation01:"0px 1px 2px 0px rgba(51, 51, 51, 0.08)",elevation02:"0px 2px 4px 0px rgba(51, 51, 51, 0.10)",elevation03:"0px 6px 8px 0px rgba(51, 51, 51, 0.10)",elevation04:"0px 10px 16px 0px rgba(51, 51, 51, 0.10)",elevation05:"0px 16px 32px 0px rgba(51, 51, 51, 0.16)"}},5050:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"},webjetRed:"#DC140A"}},3290:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"color",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"elevation",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var n=o(r(1267)),i=o(r(492)),a=o(r(9098)),l=o(r(9090)),c=o(r(5050)),s=o(r(509)),u=o(r(4341))},9098:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2770),i=o(r(1267)),a=(0,n.css)(["font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontSize,i.default.fontColor);t.default={globalStyles:a}},492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962","#FEFAFA","#C81209","#BD1109","#E44C45"],o={fontFamily:{primary:"inherit",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",tabletAndSmallDesktop:"only screen and (min-width: 768px) and (max-width: 1199px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},1267:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962","#FEFAFA"],o={fontFamily:{icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},2730:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(1116)),l=o(r(7826)),c=o(r(2462)),s=v(r(2015)),u=(o(r(9825)),o(r(1792))),d=v(r(2650)),p=r(3465),f=o(r(3080)),g=r(7236),h=["maxLength","type","className","hasClearBtn","value","icon","iconColor","iconBackground","onChange","onClearBtnClick","size","state","errorMessage","disabled","labelText","gaProps","onBlur","onFocus"],b=["event"];function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(m=function(e){return e?r:t})(e)}function v(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=n(e)&&"function"!=typeof e)return{default:e};var r=m(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var w=s.default.forwardRef((function(e,t){var r=e.maxLength,o=void 0===r?512:r,n=e.type,a=void 0===n?"text":n,m=e.className,v=e.hasClearBtn,x=void 0===v||v,w=e.value,E=void 0===w?"":w,F=e.icon,C=e.iconColor,k=e.iconBackground,B=e.onChange,S=(e.onClearBtnClick,e.size),D=void 0===S?"lg":S,O=e.state,j=void 0===O?"initial":O,I=e.errorMessage,M=void 0===I?null:I,P=e.disabled,_=e.labelText,A=e.gaProps,T=e.onBlur,z=e.onFocus,H=(0,c.default)(e,h),N=(0,s.useState)(E),R=(0,l.default)(N,2),L=R[0],W=R[1];(0,s.useEffect)((function(){return W(E)}),[E]);var q=!!(0,p.isValidIconElement)(F)&&F,J=!!(0,p.isValidIconName)(F)&&F,V=o;o=512;var Y=s.default.createRef(),G=A||{},X=G.event,U=(0,c.default)(G,b);return s.default.createElement(s.default.Fragment,null,s.default.createElement(d.InputWrapper,{ref:t,className:m,state:j,disabled:P},s.default.createElement(f.default,{condition:(null==_?void 0:_.length)>0},s.default.createElement(d.StyledLabel,null,_)),s.default.createElement(d.default,(0,i.default)({type:"text",ref:Y,icon:q||J,value:L,onChange:function(e){var t=e.target.value;if("number"===a&&!/^\d*$/.test(t)){var r=t.replace(/\s/g,"").replace(/\D/g,",").split(",").filter((function(e){return e}));if(r.length<1)return;t=r.sort((function(e,t){return t.length-e.length}))[0]}t&&t.length>V&&(t=t.substring(0,V)),W(t),B&&B(t)},onBlur:function(e){X&&(0,g.pushGAEvent)(X,y({action:"blur",value:e.target.value,type:"text-input"},U)),T&&T(e)},onFocus:function(e){X&&(0,g.pushGAEvent)(X,y({action:"focus",value:e.target.value,type:"text-input"},U)),z&&z(e)},size:D,state:j,disabled:P,hasClearBtn:x},H)),x&&L&&!P&&s.default.createElement(d.ClearBtnIcon,{"data-testid":"clear-icon",role:"input-clear",onClick:function(e){W(""),B&&B(""),Y.current.focus()},fieldsize:D}),q&&s.default.createElement(d.InputSvgIcon,{iconColor:C,iconBackground:k,"data-testid":"input-icon",role:"input-icon",size:D},s.default.createElement(q,null)),!q&&J&&s.default.createElement(d.InputIcon,{"data-testid":"input-icon",name:J,iconColor:C,iconBackground:k,size:D,role:"input-icon"})),"error"===j&&M&&s.default.createElement(u.default,null,M))}));t.default=w},2650:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StyledLabel=t.InputWrapper=t.InputSvgIcon=t.InputIcon=t.ClearBtnIcon=void 0;var i=o(r(2846)),a=o(r(1642)),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(2770)),c=r(3290),s=r(7427);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}t.ClearBtnIcon=(0,l.default)(a.default).withConfig({displayName:"Textfieldstyle__ClearBtnIcon",componentId:"sc-13wk8xr-0"})((function(e){var t=e.fieldsize,r=(0,s.isSizeSm)(t),o=(0,s.isSizeXs)(t);return(0,l.css)(["position:absolute;bottom:23px;right:6px;transform:translateY(50%);fill:",";font-size:16px;padding-right:inherit;cursor:pointer;",""],c.theme.inputCrossBtn,(r||o)&&(0,l.css)(["bottom:20px;"]))}));var d=t.InputIcon=(0,l.default)(i.default).withConfig({displayName:"Textfieldstyle__InputIcon",componentId:"sc-13wk8xr-1"})((function(e){var t=e.iconColor,r=e.iconBackground,o=e.size,n=(0,s.isSizeSm)(o),i=(0,s.isSizeXs)(o);return(0,l.css)(["&&{box-sizing:border-box;position:absolute;top:0;left:0;background:",";color:",";font-size:32px;width:46px;height:46px;line-height:1;border:1px solid ",";border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;pointer-events:none;display:flex;justify-content:space-around;align-items:center;"," "," ","}"],c.theme.color[2],c.theme.inputIcon,c.theme.color[4],(n||i)&&(0,l.css)(["width:40px;height:40px;line-height:40px;"]),t&&(0,l.css)(["color:",";"],t),r&&(0,l.css)(["background:",";"],r))})),p=t.InputSvgIcon=l.default.span.withConfig({displayName:"Textfieldstyle__InputSvgIcon",componentId:"sc-13wk8xr-2"})((function(e){var t=e.iconColor,r=e.iconBackground,o=e.size,n=(0,s.isSizeSm)(o),i=(0,s.isSizeXs)(o);return(0,l.css)(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;position:absolute;bottom:0;left:0;background:",";font-size:24px;width:46px;height:46px;border:1px solid ",";border-right:0;border-top-left-radius:",";border-bottom-left-radius:",";pointer-events:none;"," "," svg{fill:",";}"],c.theme.color[2],c.theme.color[4],c.theme.borderRadius,c.theme.borderRadius,(n||i)&&(0,l.css)(["width:40px;height:40px;line-height:40px;"]),r&&(0,l.css)(["background:",";"],r),t||c.theme.inputIcon)})),f=l.default.input.withConfig({displayName:"Textfieldstyle__StyledTextfield",componentId:"sc-13wk8xr-3"})((function(e){var t=e.disabled,r=e.icon,o=e.size,n=e.hasClearBtn,i=(0,s.isSizeSm)(o),a=(0,s.isSizeXs)(o);return(0,l.css)([""," appearance:none;font-size:16px;height:46px;line-height:normal;padding:",";margin:0;border-radius:",";background:",";border:1px solid ",";outline:none;cursor:pointer;width:100%;"," &::-ms-clear,&::-ms-reveal{display:none;}&::-moz-selection{background:rgba(99,158,200,0.5);}&::selection{background:rgba(99,158,200,0.5);}&::placeholder{color:",";}"," "," "," "," ",""],c.mixins.globalStyles,n?"0 28px 0 9px":"0 9px 0 9px",c.theme.borderRadius,c.theme.color[11],c.theme.color[4],(i||a)&&(0,l.css)(["height:40px;"]),c.theme.color[6],!t&&(0,l.css)(["&:active,&:focus{background:",";}&:focus{box-shadow:",";}"],c.theme.inputHoverBackground,c.theme.activeItemOutline),t&&(0,l.css)(["box-shadow:none;opacity:0.5;cursor:default;~ ","{opacity:0.5;}"],d),r&&(0,l.css)(["padding-left:59px;"," ",""],!t&&(0,l.css)(["&:focus{~ ","{background:",";}}"],d,c.theme.btnStandardHover),(i||a)&&(0,l.css)(["padding-left:53px;"])),(function(e){return"error"===e.state&&(0,l.css)(["&&:focus,&&:active{background-color:",";~ ","{background:",";}}"],c.theme.validationColors.inputErrorHoverBackground,d,c.theme.validationColors.inputErrorIconHoverBackground)}),(function(e){return"success"===e.state&&(0,l.css)(["&&:active,&&:focus{filter:brightness(97%);background:",";}"],c.theme.successBackground)}))}));t.InputWrapper=l.default.div.withConfig({displayName:"Textfieldstyle__InputWrapper",componentId:"sc-13wk8xr-4"})(["display:inline-block;width:100%;position:relative;vertical-align:top;"," "," ",""],(function(e){return"error"===e.state&&(0,l.css)(["","{background-color:",";color:",";}","{background:",";color:",";}","{background:",";svg{fill:",";}}&&&:hover{","{background-color:",";}","{background:",";}","{background:",";}}"],f,c.theme.validationColors.inputErrorBackground,c.theme.validationColors.inputErrorText,d,c.theme.validationColors.inputErrorIconBackground,c.theme.validationColors.inputErrorIcon,p,c.theme.validationColors.inputErrorIconBackground,c.theme.validationColors.inputErrorIcon,f,c.theme.validationColors.inputErrorHoverBackground,d,c.theme.validationColors.inputErrorIconHoverBackground,p,c.theme.validationColors.inputErrorIconHoverBackground)}),(function(e){return"success"===e.state&&(0,l.css)(["","{background:",";color:",";}&&&:hover{","{filter:brightness(97%);background:",";}}"],f,c.theme.successBackground,c.theme.successText,f,c.theme.successBackground)}),(function(e){return!e.disabled&&(0,l.css)(["&&:hover{","{background:",";}","{background:",";}","{background:",";}}"],f,c.theme.inputHoverBackground,d,c.theme.btnStandardHover,p,c.theme.btnStandardHover)})),t.StyledLabel=l.default.label.withConfig({displayName:"Textfieldstyle__StyledLabel",componentId:"sc-13wk8xr-5"})(["color:",";font-size:14px;line-height:20px;padding-bottom:8px;display:inline-block;"],c.theme.color[10]),t.default=f},3465:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getDateWithoutTime=t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(e,t){return t-e},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getRandomArrayItem=t.getMonthName=t.getLoggedInUserDetails=t.getFormattedDate=void 0;var o=r(4513),n=t.BREAKPOINTS={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199},i=t.isMatchMedia=function(e){return window.matchMedia(e).matches},a=(t.isMobile=function(){return i("(max-width: ".concat(n.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(n.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(n.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,r=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!r&&/(iPhone\sOS)\s([\d_]+)/.test(t)||r,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.getLoggedInUserDetails=function(){var e=(0,o.getAllCookiesStorage)("customer-soft-id"),t={};if((null==e?void 0:e.length)>0)for(var r=0;r<e.length;r++){var n,i=null===(n=window.atob(e[r].split(".")[1]))||void 0===n?void 0:n.toString("ascii"),a=JSON.parse(i),l=a.firstName,c=a.email,s=a.dev;window.location.hostname.includes("dev.webjet")&&!s||(t={firstName:l,email:c})}return t}),l=(t.isUserLoggedIn=function(){return!!a().firstName},t.setTwoDirectionStickyPanel=function(e){if(e){var t=window.innerHeight-e.offsetHeight,r=window.scrollY,o=window.innerHeight,n=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){o=window.innerHeight,n=e.offsetHeight})),document.addEventListener("scroll",(function(){n=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||n<=o?e.style.top="0px":window.scrollY<r?i<0?e.style.top=i+r-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+r-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),r=window.scrollY}),{capture:!0,passive:!0})}});t.setTwoDirectionStickyPanelById=function(e){l(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.scrollTop,o=e.clientHeight,n=t-r;return n>=o-1&&n<=o+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.clientHeight;return!(t>=r-1&&t<=r+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:r,top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}},t.getMonthName=function(e){return null==e?void 0:e.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(e){return"".concat(e.getDate(),"/").concat(e.getMonth()+1,"/").concat(e.getFullYear())},t.getDateWithoutTime=function(e){return new Date(e.toDateString())},t.getRandomArrayItem=function(e){return Array.isArray(e)&&e.length>0?e[Math.floor(Math.random()*e.length)]:null}},7236:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.pushGAEvent=t.gaAttributes=void 0;var n=o(r(1116)),i=o(r(7826));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}t.gaAttributes=function(e){var t={};return Object.entries(e).forEach((function(e){var r=(0,i.default)(e,2),o=r[0],n=r[1];null!=n&&(t["data-ga-".concat(o)]=String(n))})),t},t.pushGAEvent=function(e,t){var r=window.dataLayer;e&&r&&r.push(l(e,t))};var l=function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({event:e},t)}},7427:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSizeXs=t.isSizeSm=void 0,t.isSizeSm=function(e){return"sm"===e},t.isSizeXs=function(e){return"xs"===e}},4513:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=t.getAllCookiesStorage=void 0;var r=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}},o=(t.getSessionStorage=function(e){if(e&&r())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&r())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){var t=o(e);return t.length>0?t[0]:null},t.getAllCookiesStorage=function(e){for(var t=e+"=",r=document.cookie.split(";"),o=[],n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1,i.length);0===i.indexOf(t)&&o.push(i.substring(t.length,i.length))}return o});t.setCookieStorage=function(e,t,r){var o=window.location.hostname,n="localhost"===o?o:o.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(n,"; Path=/; Max-Age=").concat(r||86400)}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},7826:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},8063:e=>{e.exports=require("@babel/runtime/helpers/typeof")},1642:e=>{e.exports=require("@webjet/react-icons/common/x-circle-fill")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},2770:e=>{e.exports=require("styled-components")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}var o={};(()=>{var e=o,t=r(3751);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(2730));e.default=n.default})(),module.exports=o})();
|
|
1
|
+
(()=>{"use strict";var e={8627:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ErrorMessageField=void 0;var n=o(r(2015)),i=(o(r(9825)),r(4144)),a=t.ErrorMessageField=function(e){var t=e.children,r=void 0===t?null:t;return r&&n.default.createElement(i.ErrorMessage,{"data-testid":"error-message",role:"error-message"},r)};t.default=a},4144:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorMessage=void 0;var n=o(r(2770)),i=r(3290);t.ErrorMessage=n.default.label.withConfig({displayName:"ErrorMessageFieldstyle__ErrorMessage",componentId:"sc-s1cvz0-0"})(["&&{"," display:block;position:relative;margin-top:10px;background:",";padding:6px 8px 6px 8px;border-radius:",";font-size:14px;color:",";line-height:130%;text-align:left;font-weight:normal;box-sizing:border-box;&:before{width:0;top:-8px;z-index:1;position:absolute;content:'';height:0;left:0;right:0;text-align:center;margin:0 auto;border-left:12px solid transparent;border-right:12px solid transparent;border-bottom:10px solid #f2dede;}}"],i.mixins.globalStyles,i.theme.validationColors.inputErrorBackground,i.theme.borderRadius,i.theme.validationColors.inputErrorText)},1792:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(8627));t.default=n.default},2078:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(2770)),i=r(3290),a=n.default.span.withConfig({displayName:"Iconstyle__Icon",componentId:"sc-1gq7yvz-0"})(["font-family:",";display:inline-block;font-size:16px;font-weight:normal;-webkit-font-smoothing:antialiased;&:after{content:'","';}"],i.theme.fontFamily.icon,(function(e){var t=e.iconName;return l(t)})),l=function(e){switch(e){case"wj-alt-cross":return"\\E027";case"wj-caret-up":return"\\E001";case"wj-caret-right":return"\\E002";case"wj-caret-down":return"\\E003";case"wj-caret-left":return"\\E004";case"wj-check":return"\\E028";case"wj-cross":return"\\E016";case"wj-destination-search":return"\\F094";case"wj-calendar":return"\\F012";case"wj-dbl-calendar":return"\\F026";case"wj-depart":return"\\F018";case"wj-arrival":return"\\F019";case"wj-dollar":return"\\E059";case"wj-expand":return"\\E01F";case"wj-time":return"\\E021";case"wj-arrow-left":return"\\E00C";case"wj-arrow-right":return"\\E00A";case"wj-arrow-previous":return"\\F01D";case"wj-arrow-next":return"\\F01E";case"wj-mappin":return"\\E01D";case"wj-car-pickup":return"\\F074";case"wj-car-dropoff":return"\\F075";case"wj-alt-info":return"\\F01A";case"wj-alt-plus":return"\\E025";case"wj-tag":return"\\E023";case"wj-unlock":return"\\F072"}return""};t.default=a},2846:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(6031)),i=o(r(2462)),a=o(r(2015)),l=(o(r(9825)),o(r(2078))),c=["name"];t.default=function(e){var t=e.name,r=(0,i.default)(e,c);return a.default.createElement(l.default,(0,n.default)({iconName:t},r))}},9473:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9825)),i=function(e){var t=e.condition,r=void 0!==t&&t,o=e.children;return!0===r?o:null};i.propTypes={condition:n.default.bool},t.default=i},3080:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(9473));t.default=n.default},509:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={greys:{white:"#FFFFFF",offWhite:"#FFEADC",grey50:"#F5F5F5",grey100:"#EBEBEB",grey200:"#DFDFDF",grey300:"#CCCCCC",grey400:"#BFBFBF",grey500:"#999999",grey600:"#878787",grey700:"#646464",grey800:"#4D4D4D",grey900:"#333333",black:"#000000"}}},9090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={dateFormatExtraShort:"d MMM",dateFormatShort:"E d MMM",dateFormat:"E d MMM yyyy",dateFormatLong:"E d MMMM yyyy",timeFormat:"h:mm a",dayLabelFormat:"E MMM dd yyyy",weekStartsOn:1,weekFormat:"E",scrollToViewOptions:{behavior:"smooth",block:"end",scrollMode:"if-needed"}}},4341:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={elevation01:"0px 1px 2px 0px rgba(51, 51, 51, 0.08)",elevation02:"0px 2px 4px 0px rgba(51, 51, 51, 0.10)",elevation03:"0px 6px 8px 0px rgba(51, 51, 51, 0.10)",elevation04:"0px 10px 16px 0px rgba(51, 51, 51, 0.10)",elevation05:"0px 16px 32px 0px rgba(51, 51, 51, 0.16)"}},5050:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default={notification:{success:{color:"#149000",backgroundColor:"#EEF7EB"},error:{color:"#BE0000",backgroundColor:"#F2DEDE"},warning:{color:"#FF5C00",backgroundColor:"#F6EDE6"},info:{color:"#3D9AF2",backgroundColor:"#ECF5FE"},notice:{color:"#FEB42B",backgroundColor:"#FFF3CD"}},textLink:{color:"#0060BB",hoverColor:"#00509C"},webjetRed:"#DC140A"}},3290:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"color",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"config",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"elevation",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"identifiers",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"mixins",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"theme",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"themeV2",{enumerable:!0,get:function(){return i.default}});var n=o(r(1267)),i=o(r(492)),a=o(r(9098)),l=o(r(9090)),c=o(r(5050)),s=o(r(509)),u=o(r(4341))},9098:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(2770),i=o(r(1267)),a=(0,n.css)(["font-size:",";color:",";&,> *,> *:before,> *:after{box-sizing:border-box;}"],i.default.fontSize,i.default.fontColor);t.default={globalStyles:a}},492:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962","#FEFAFA","#C81209","#BD1109","#E44C45"],o={fontFamily:{primary:"inherit",icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",tabletAndSmallDesktop:"only screen and (min-width: 768px) and (max-width: 1199px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},1267:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=["#DC140A","#F5F5F5","#DFDFDF","#EBEBEB","#CCCCCC","#BFBFBF","#999999","#878787","#646464","#4D4D4D","#333333","#FFFFFF","#000000","#3D9AF2","#0060BB","#00509C","#FF8C00","#2DB300","#B0CFE2","#3587D4","#E07B00","#29A300","#D5EFCC","#F6F2E6","#CFCFCF","#454545","#F2DEDE","#B13312","#FFF3CD","#7A7A7A","#FEB42B","#E96962","#FEFAFA"],o={fontFamily:{icon:"WebjetIcons"},fontSize:"13px",fontColor:r[10],gutterWidth:"12px",halfGutterWidth:"6px",borderRadius:"4px",borderColor:r[5],hoverColor:r[6],hoverDarkColor:r[7],textHighlight:r[18],activeItemOutline:"0 0 0 4px rgba(135, 135, 135, 0.75)",dropdownShadow:"0 2px 6px rgba(0, 0, 0, 0.7)",userSelection:r[16],inputHoverBackground:"#F6F2E7",inputActiveBackground:r[5],inputIcon:r[9],inputIconBackground:r[2],inputIconHoverBackground:r[5],inputCrossBtn:"#a8a8a8",btnStandard:r[2],btnStandardHover:r[5],btnAction:r[17],btnActionHover:"#259400",btnActive:r[13],btnActiveHover:r[19],btnSelection:r[16],btnSelectionHover:r[20],successBackground:r[22],successText:r[21],errorBackground:r[26],errorText:r[27],sliderPrimary:r[13],color:r,media:{smallMobilePortrait:"only screen and (max-width: 374px)",mobilePortrait:"only screen and (max-width: 567px)",mobileLandscape:"only screen and (min-width: 567px) and (max-width: 767px)",mobile:"only screen and (max-width: 767px)",notMobile:"only screen and (min-width: 768px)",tablet:"only screen and (min-width: 768px) and (max-width: 991px)",mobileAndTablet:"only screen and (max-width: 991px)",tabletAndDesktop:"only screen and (min-width: 768px)",desktop:"only screen and (min-width: 992px) and (max-width: 1199px)",desktopAndWideDesktop:"only screen and (min-width: 992px)",wideDesktop:"only screen and (min-width: 1200px)"},validationColors:{inputErrorBackground:"#F2DEDE",inputErrorHoverBackground:"#E8D5D5",inputErrorText:r[27],inputErrorIcon:"#A1605F",inputErrorIconBackground:"#D4C3C3",inputErrorIconHoverBackground:"#BFB0B0",inputErrorCrossBtn:"#858585"}};t.default=o},2730:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(r(6031)),a=o(r(1116)),l=o(r(7826)),c=o(r(2462)),s=x(r(2015)),u=o(r(3892)),d=(o(r(9825)),o(r(1792))),p=x(r(2650)),f=r(3465),g=o(r(3080)),h=r(7236),b=["maxLength","type","className","hasClearBtn","value","icon","iconColor","iconBackground","onChange","onClearBtnClick","size","state","errorMessage","disabled","labelText","gaProps","onBlur","onFocus"],m=["event"];function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(v=function(e){return e?r:t})(e)}function x(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=n(e)&&"function"!=typeof e)return{default:e};var r=v(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function w(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E=s.default.forwardRef((function(e,t){var r=e.maxLength,o=void 0===r?512:r,n=e.type,a=void 0===n?"text":n,v=e.className,x=e.hasClearBtn,y=void 0===x||x,E=e.value,F=void 0===E?"":E,C=e.icon,k=e.iconColor,B=e.iconBackground,S=e.onChange,D=e.onClearBtnClick,O=e.size,j=void 0===O?"lg":O,I=e.state,M=void 0===I?"initial":I,P=e.errorMessage,_=void 0===P?null:P,A=e.disabled,T=e.labelText,z=e.gaProps,H=e.onBlur,N=e.onFocus,R=(0,c.default)(e,b),L=(0,s.useState)(F),W=(0,l.default)(L,2),q=W[0],J=W[1];(0,s.useEffect)((function(){return J(F)}),[F]);var V=!!(0,f.isValidIconElement)(C)&&C,Y=!!(0,f.isValidIconName)(C)&&C,G=o;o=512;var X=s.default.createRef(),U=z||{},$=U.event,K=(0,c.default)(U,m);return s.default.createElement(s.default.Fragment,null,s.default.createElement(p.InputWrapper,{ref:t,className:(0,u.default)(v,{hidden:"hidden"===a}),state:M,disabled:A},s.default.createElement(g.default,{condition:(null==T?void 0:T.length)>0},s.default.createElement(p.StyledLabel,null,T)),s.default.createElement(p.default,(0,i.default)({type:"text",ref:X,icon:V||Y,value:q,onChange:function(e){var t=e.target.value;if(["number","tel"].includes(a)&&!/^\d*$/.test(t)){var r=t.replace(/\s/g,"").replace(/\D/g,",").split(",").filter((function(e){return e}));if(r.length<1)return;t=r.sort((function(e,t){return t.length-e.length}))[0]}t&&t.length>G&&(t=t.substring(0,G)),J(t),S&&S(t)},onBlur:function(e){$&&(0,h.pushGAEvent)($,w({action:"blur",value:e.target.value,type:"text-input"},K)),H&&H(e)},onFocus:function(e){$&&(0,h.pushGAEvent)($,w({action:"focus",value:e.target.value,type:"text-input"},K)),N&&N(e)},size:j,state:M,disabled:A,hasClearBtn:y},R)),y&&q&&!A&&s.default.createElement(p.ClearBtnIcon,{"data-testid":"clear-icon",role:"input-clear",onClick:function(e){J(""),S&&S(""),D&&D(e),X.current.focus()},fieldsize:j}),V&&s.default.createElement(p.InputSvgIcon,{iconColor:k,iconBackground:B,"data-testid":"input-icon",role:"input-icon",size:j},s.default.createElement(V,null)),!V&&Y&&s.default.createElement(p.InputIcon,{"data-testid":"input-icon",name:Y,iconColor:k,iconBackground:B,size:j,role:"input-icon"})),"error"===M&&_&&s.default.createElement(d.default,null,_))}));t.default=E},2650:(e,t,r)=>{var o=r(3751),n=r(8063);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StyledLabel=t.InputWrapper=t.InputSvgIcon=t.InputIcon=t.ClearBtnIcon=void 0;var i=o(r(2846)),a=o(r(1642)),l=function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!=n(e)&&"function"!=typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&{}.hasOwnProperty.call(e,a)){var l=i?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(o,a,l):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}(r(2770)),c=r(3290),s=r(7427);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}t.ClearBtnIcon=(0,l.default)(a.default).withConfig({displayName:"Textfieldstyle__ClearBtnIcon",componentId:"sc-13wk8xr-0"})((function(e){var t=e.fieldsize,r=(0,s.isSizeSm)(t),o=(0,s.isSizeXs)(t);return(0,l.css)(["position:absolute;bottom:23px;right:6px;transform:translateY(50%);fill:",";font-size:16px;padding-right:inherit;cursor:pointer;",""],c.theme.inputCrossBtn,(r||o)&&(0,l.css)(["bottom:20px;"]))}));var d=t.InputIcon=(0,l.default)(i.default).withConfig({displayName:"Textfieldstyle__InputIcon",componentId:"sc-13wk8xr-1"})((function(e){var t=e.iconColor,r=e.iconBackground,o=e.size,n=(0,s.isSizeSm)(o),i=(0,s.isSizeXs)(o);return(0,l.css)(["&&{box-sizing:border-box;position:absolute;top:0;left:0;background:",";color:",";font-size:32px;width:46px;height:46px;line-height:1;border:1px solid ",";border-right:0;border-top-left-radius:3px;border-bottom-left-radius:3px;pointer-events:none;display:flex;justify-content:space-around;align-items:center;"," "," ","}"],c.theme.color[2],c.theme.inputIcon,c.theme.color[4],(n||i)&&(0,l.css)(["width:40px;height:40px;line-height:40px;"]),t&&(0,l.css)(["color:",";"],t),r&&(0,l.css)(["background:",";"],r))})),p=t.InputSvgIcon=l.default.span.withConfig({displayName:"Textfieldstyle__InputSvgIcon",componentId:"sc-13wk8xr-2"})((function(e){var t=e.iconColor,r=e.iconBackground,o=e.size,n=(0,s.isSizeSm)(o),i=(0,s.isSizeXs)(o);return(0,l.css)(["display:flex;align-items:center;justify-content:center;box-sizing:border-box;position:absolute;bottom:0;left:0;background:",";font-size:24px;width:46px;height:46px;border:1px solid ",";border-right:0;border-top-left-radius:",";border-bottom-left-radius:",";pointer-events:none;"," "," svg{fill:",";}"],c.theme.color[2],c.theme.color[4],c.theme.borderRadius,c.theme.borderRadius,(n||i)&&(0,l.css)(["width:40px;height:40px;line-height:40px;"]),r&&(0,l.css)(["background:",";"],r),t||c.theme.inputIcon)})),f=l.default.input.withConfig({displayName:"Textfieldstyle__StyledTextfield",componentId:"sc-13wk8xr-3"})((function(e){var t=e.disabled,r=e.icon,o=e.size,n=e.hasClearBtn,i=(0,s.isSizeSm)(o),a=(0,s.isSizeXs)(o);return(0,l.css)([""," appearance:none;font-size:16px;height:46px;line-height:normal;padding:",";margin:0;border-radius:",";background:",";border:1px solid ",";outline:none;cursor:pointer;width:100%;"," &::-ms-clear,&::-ms-reveal{display:none;}&::-moz-selection{background:rgba(99,158,200,0.5);}&::selection{background:rgba(99,158,200,0.5);}&::placeholder{color:",";}"," "," "," "," ",""],c.mixins.globalStyles,n?"0 28px 0 9px":"0 9px 0 9px",c.theme.borderRadius,c.theme.color[11],c.theme.color[4],(i||a)&&(0,l.css)(["height:40px;"]),c.theme.color[6],!t&&(0,l.css)(["&:active,&:focus{background:",";}&:focus{box-shadow:",";}"],c.theme.inputHoverBackground,c.theme.activeItemOutline),t&&(0,l.css)(["box-shadow:none;opacity:0.5;cursor:default;~ ","{opacity:0.5;}"],d),r&&(0,l.css)(["padding-left:59px;"," ",""],!t&&(0,l.css)(["&:focus{~ ","{background:",";}}"],d,c.theme.btnStandardHover),(i||a)&&(0,l.css)(["padding-left:53px;"])),(function(e){return"error"===e.state&&(0,l.css)(["&&:focus,&&:active{background-color:",";~ ","{background:",";}}"],c.theme.validationColors.inputErrorHoverBackground,d,c.theme.validationColors.inputErrorIconHoverBackground)}),(function(e){return"success"===e.state&&(0,l.css)(["&&:active,&&:focus{filter:brightness(97%);background:",";}"],c.theme.successBackground)}))}));t.InputWrapper=l.default.div.withConfig({displayName:"Textfieldstyle__InputWrapper",componentId:"sc-13wk8xr-4"})(["display:inline-block;width:100%;position:relative;vertical-align:top;"," "," ",""],(function(e){return"error"===e.state&&(0,l.css)(["","{background-color:",";color:",";}","{background:",";color:",";}","{background:",";svg{fill:",";}}&&&:hover{","{background-color:",";}","{background:",";}","{background:",";}}"],f,c.theme.validationColors.inputErrorBackground,c.theme.validationColors.inputErrorText,d,c.theme.validationColors.inputErrorIconBackground,c.theme.validationColors.inputErrorIcon,p,c.theme.validationColors.inputErrorIconBackground,c.theme.validationColors.inputErrorIcon,f,c.theme.validationColors.inputErrorHoverBackground,d,c.theme.validationColors.inputErrorIconHoverBackground,p,c.theme.validationColors.inputErrorIconHoverBackground)}),(function(e){return"success"===e.state&&(0,l.css)(["","{background:",";color:",";}&&&:hover{","{filter:brightness(97%);background:",";}}"],f,c.theme.successBackground,c.theme.successText,f,c.theme.successBackground)}),(function(e){return!e.disabled&&(0,l.css)(["&&:hover{","{background:",";}","{background:",";}","{background:",";}}"],f,c.theme.inputHoverBackground,d,c.theme.btnStandardHover,p,c.theme.btnStandardHover)})),t.StyledLabel=l.default.label.withConfig({displayName:"Textfieldstyle__StyledLabel",componentId:"sc-13wk8xr-5"})(["color:",";font-size:14px;line-height:20px;padding-bottom:8px;display:inline-block;"],c.theme.color[10]),t.default=f},3465:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.escapeRegExp=t.detectOS=t.BREAKPOINTS=void 0,t.fetchDateInMilliseconds=function(){return(new Date).getTime()},t.getDateWithoutTime=t.getBoundingClientInfo=t.formatNumber=void 0,t.getDurationInMiliSeconds=function(e,t){return t-e},t.withScroll=t.setTwoDirectionStickyPanelById=t.setTwoDirectionStickyPanel=t.scrollTo=t.sanitiseInputText=t.removeHtmlTags=t.isValidIconName=t.isValidIconElement=t.isUserLoggedIn=t.isTouchDevice=t.isMobileTablet=t.isMobilePortrait=t.isMobile=t.isMatchMedia=t.hasScrollReachedBottom=t.getRandomArrayItem=t.getMonthName=t.getLoggedInUserDetails=t.getFormattedDate=void 0;var o=r(4513),n=t.BREAKPOINTS={MOBILE_PORTRAIT:567,MOBILE:767,TABLET:991,DESKTOP:1199},i=t.isMatchMedia=function(e){return window.matchMedia(e).matches},a=(t.isMobile=function(){return i("(max-width: ".concat(n.MOBILE,"px)"))},t.isMobileTablet=function(){return i("(max-width: ".concat(n.TABLET,"px)"))},t.isMobilePortrait=function(){return i("(max-width: ".concat(n.MOBILE_PORTRAIT,"px)"))},t.isTouchDevice=function(){return window.matchMedia("(pointer: coarse)").matches},t.detectOS=function(e){var t=e||navigator.userAgent,r=/(iPad).*OS\s([\d_]+)/.test(t);return{ios:!r&&/(iPhone\sOS)\s([\d_]+)/.test(t)||r,android:/(Android);?[\s/]+([\d.]+)?/.test(t)}},t.getLoggedInUserDetails=function(){var e=(0,o.getAllCookiesStorage)("customer-soft-id"),t={};if((null==e?void 0:e.length)>0)for(var r=0;r<e.length;r++){var n,i=null===(n=window.atob(e[r].split(".")[1]))||void 0===n?void 0:n.toString("ascii"),a=JSON.parse(i),l=a.firstName,c=a.email,s=a.dev;window.location.hostname.includes("dev.webjet")&&!s||(t={firstName:l,email:c})}return t}),l=(t.isUserLoggedIn=function(){return!!a().firstName},t.setTwoDirectionStickyPanel=function(e){if(e){var t=window.innerHeight-e.offsetHeight,r=window.scrollY,o=window.innerHeight,n=e.offsetHeight;e.style.top="0px",window.addEventListener("resize",(function(){o=window.innerHeight,n=e.offsetHeight})),document.addEventListener("scroll",(function(){n=e.offsetHeight,t=window.innerHeight-e.offsetHeight;var i=parseInt(e.style.top.replace("px;",""));0===window.scrollY||n<=o?e.style.top="0px":window.scrollY<r?i<0?e.style.top=i+r-window.scrollY+"px":i>=0&&0!==i&&(e.style.top="0px"):i>t?e.style.top=i+r-window.scrollY+"px":i<t&&i!==t&&(e.style.top=t+"px"),r=window.scrollY}),{capture:!0,passive:!0})}});t.setTwoDirectionStickyPanelById=function(e){l(document.getElementById(e))},t.hasScrollReachedBottom=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.scrollTop,o=e.clientHeight,n=t-r;return n>=o-1&&n<=o+1},t.withScroll=function(e){if(!e)return!1;var t=e.scrollHeight,r=e.clientHeight;return!(t>=r-1&&t<=r+1)},t.escapeRegExp=function(e){return"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):""},t.sanitiseInputText=function(e){return"string"==typeof e?e.replace(/[^a-zA-Z0-9\s,\\(\\)]/g,""):""},t.removeHtmlTags=function(e){return"string"==typeof e?String(e).replace(/(<([^>]+)>)/gi,""):e},t.isValidIconElement=function(e){var t;return"function"==typeof e&&"svg"===(null===(t=e())||void 0===t?void 0:t.type)},t.isValidIconName=function(e){return!!e&&"string"==typeof e},t.formatNumber=function(e,t){return e.toLocaleString("en-AU",{minimumFractionDigits:t,maximumFractionDigits:t})||0},t.scrollTo=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"smooth";"function"==typeof(null==e?void 0:e.scrollTo)&&e.scrollTo({behavior:r,top:t.top,left:t.left})},t.getBoundingClientInfo=function(e){return{height:Math.round(e.getBoundingClientRect().height),top:Math.round(e.getBoundingClientRect().top),bottom:Math.round(e.getBoundingClientRect().bottom),left:Math.round(e.getBoundingClientRect().left),right:Math.round(e.getBoundingClientRect().right)}},t.getMonthName=function(e){return null==e?void 0:e.toLocaleDateString(void 0,{month:"long"})},t.getFormattedDate=function(e){return"".concat(e.getDate(),"/").concat(e.getMonth()+1,"/").concat(e.getFullYear())},t.getDateWithoutTime=function(e){return new Date(e.toDateString())},t.getRandomArrayItem=function(e){return Array.isArray(e)&&e.length>0?e[Math.floor(Math.random()*e.length)]:null}},7236:(e,t,r)=>{var o=r(3751);Object.defineProperty(t,"__esModule",{value:!0}),t.pushGAEvent=t.gaAttributes=void 0;var n=o(r(1116)),i=o(r(7826));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}t.gaAttributes=function(e){var t={};return Object.entries(e).forEach((function(e){var r=(0,i.default)(e,2),o=r[0],n=r[1];null!=n&&(t["data-ga-".concat(o)]=String(n))})),t},t.pushGAEvent=function(e,t){var r=window.dataLayer;e&&r&&r.push(l(e,t))};var l=function(e,t){return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){(0,n.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({event:e},t)}},7427:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSizeXs=t.isSizeSm=void 0,t.isSizeSm=function(e){return"sm"===e},t.isSizeXs=function(e){return"xs"===e}},4513:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setSessionStorageJson=t.setSessionStorage=t.setCookieStorage=t.getSessionStorageJson=t.getSessionStorage=t.getCookieStorage=t.getAllCookiesStorage=void 0;var r=function(){var e="WJtestStorage";try{return!!window.sessionStorage&&(window.sessionStorage.setItem(e,1),window.sessionStorage.removeItem(e),!0)}catch(e){return!1}},o=(t.getSessionStorage=function(e){if(e&&r())try{return window.sessionStorage.getItem(e)}catch(e){return}},t.setSessionStorage=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,t)}catch(e){return}},t.getSessionStorageJson=function(e){if(e&&r())try{return JSON.parse(window.sessionStorage.getItem(e))}catch(e){return}},t.setSessionStorageJson=function(e,t){if(e&&r())try{return window.sessionStorage.setItem(e,JSON.stringify(t))}catch(e){return}},t.getCookieStorage=function(e){var t=o(e);return t.length>0?t[0]:null},t.getAllCookiesStorage=function(e){for(var t=e+"=",r=document.cookie.split(";"),o=[],n=0;n<r.length;n++){for(var i=r[n];" "===i.charAt(0);)i=i.substring(1,i.length);0===i.indexOf(t)&&o.push(i.substring(t.length,i.length))}return o});t.setCookieStorage=function(e,t,r){var o=window.location.hostname,n="localhost"===o?o:o.match(/(\.\w+){3}$/g);document.cookie="".concat(e,"=").concat(t,"; Domain=").concat(n,"; Path=/; Max-Age=").concat(r||86400)}},1116:e=>{e.exports=require("@babel/runtime/helpers/defineProperty")},6031:e=>{e.exports=require("@babel/runtime/helpers/extends")},3751:e=>{e.exports=require("@babel/runtime/helpers/interopRequireDefault")},2462:e=>{e.exports=require("@babel/runtime/helpers/objectWithoutProperties")},7826:e=>{e.exports=require("@babel/runtime/helpers/slicedToArray")},8063:e=>{e.exports=require("@babel/runtime/helpers/typeof")},1642:e=>{e.exports=require("@webjet/react-icons/common/x-circle-fill")},3892:e=>{e.exports=require("classnames")},9825:e=>{e.exports=require("prop-types")},2015:e=>{e.exports=require("react")},2770:e=>{e.exports=require("styled-components")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}var o={};(()=>{var e=o,t=r(3751);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=t(r(2730));e.default=n.default})(),module.exports=o})();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webjet/react",
|
|
3
3
|
"side-effects": false,
|
|
4
|
-
"version": "4.0.
|
|
4
|
+
"version": "4.0.13",
|
|
5
5
|
"description": "Common react components",
|
|
6
6
|
"main": "components/index.js",
|
|
7
7
|
"scripts": {
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@webjet/react-icons": "^3.7.10",
|
|
35
35
|
"classnames": "^2.3.2",
|
|
36
36
|
"dompurify": "3.2.5",
|
|
37
|
+
"focus-trap-react": "^11.0.3",
|
|
37
38
|
"marked": "^4.0.12",
|
|
38
39
|
"ncp": "^2.0.0",
|
|
39
40
|
"polished": "^4.1.4",
|