@lanaco/lnc-react-ui 4.0.150 → 4.0.152
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AdBannerSection.cjs +3 -3
- package/dist/AdBannerSection.js +16 -16
- package/dist/BannerSectionBasic.cjs +4 -4
- package/dist/BannerSectionBasic.js +33 -32
- package/dist/BannerSectionGrid.cjs +3 -3
- package/dist/BannerSectionGrid.js +33 -33
- package/dist/BlogCardsSponsoredSection.cjs +3 -3
- package/dist/BlogCardsSponsoredSection.js +15 -15
- package/dist/BlogCategoryCardsSection.cjs +1 -1
- package/dist/BlogCategoryCardsSection.js +12 -12
- package/dist/BlogExploreSection.cjs +4 -4
- package/dist/BlogExploreSection.js +30 -30
- package/dist/BlogListSection.cjs +2 -2
- package/dist/BlogListSection.js +28 -28
- package/dist/BlogProductCardsSection.cjs +1 -1
- package/dist/BlogProductCardsSection.js +20 -19
- package/dist/BlogShopCardsSection.cjs +1 -1
- package/dist/BlogShopCardsSection.js +22 -22
- package/dist/BrandHitsSection.cjs +7 -7
- package/dist/BrandHitsSection.js +24 -24
- package/dist/CustomLoanMapSection.cjs +1 -1
- package/dist/CustomLoanMapSection.js +1 -1
- package/dist/{DailyMotion-CPQ6kDJJ.cjs → DailyMotion-BaFUcQKQ.cjs} +1 -1
- package/dist/{DailyMotion-BrbMSyj1.js → DailyMotion-ByXblnua.js} +1 -1
- package/dist/DetailedProductsInfinitiveSection.cjs +3 -3
- package/dist/DetailedProductsInfinitiveSection.js +53 -84
- package/dist/DetailedProductsSection.cjs +1 -1
- package/dist/DetailedProductsSection.js +1 -1
- package/dist/{Facebook-Dw3my9_4.js → Facebook-BCqiOWZO.js} +1 -1
- package/dist/{Facebook-DKhRiODC.cjs → Facebook-D9wwecSW.cjs} +1 -1
- package/dist/FaqSection.cjs +2 -2
- package/dist/FaqSection.js +2 -2
- package/dist/FieldOfInterestsMasonrySection.cjs +6 -6
- package/dist/FieldOfInterestsMasonrySection.js +65 -48
- package/dist/FieldOfInterestsWithAvatarsCardsSection.cjs +3 -3
- package/dist/FieldOfInterestsWithAvatarsCardsSection.js +27 -25
- package/dist/FieldOfInterestsWithTagsCardsSection.cjs +6 -6
- package/dist/FieldOfInterestsWithTagsCardsSection.js +40 -32
- package/dist/{FilePlayer-DlCyGLHB.cjs → FilePlayer-DB6jnpeC.cjs} +1 -1
- package/dist/{FilePlayer-Ckx8dmB0.js → FilePlayer-ktaNhf3p.js} +1 -1
- package/dist/GeneralWithTagsCardsSection.cjs +9 -9
- package/dist/GeneralWithTagsCardsSection.js +15 -15
- package/dist/{Kaltura-31Xm8S1J.cjs → Kaltura-CCdXLzOa.cjs} +1 -1
- package/dist/{Kaltura-qHdDvnjZ.js → Kaltura-CvlN0HDg.js} +1 -1
- package/dist/LoanCalculatorSection.cjs +2 -2
- package/dist/LoanCalculatorSection.js +89 -88
- package/dist/LocationFinderSection.cjs +1 -1
- package/dist/LocationFinderSection.js +1 -1
- package/dist/{Mixcloud-DvH0vfg5.js → Mixcloud-Bb8MTclI.js} +1 -1
- package/dist/{Mixcloud-CP9Zq_TX.cjs → Mixcloud-nG_VyBNt.cjs} +1 -1
- package/dist/{Mux-BlblTeid.cjs → Mux-BgB2a8kM.cjs} +1 -1
- package/dist/{Mux--JeF6dPG.js → Mux-DfYpGTiP.js} +1 -1
- package/dist/OverlayGeneralCardsSection.cjs +5 -5
- package/dist/OverlayGeneralCardsSection.js +11 -11
- package/dist/ProductsWithBannerSection.cjs +1 -1
- package/dist/ProductsWithBannerSection.js +1 -1
- package/dist/QuattroCardsSection.cjs +5 -5
- package/dist/QuattroCardsSection.js +7 -7
- package/dist/QuizSection.cjs +7 -7
- package/dist/QuizSection.js +51 -51
- package/dist/SalesCampaignsSection.cjs +1 -1
- package/dist/SalesCampaignsSection.js +2 -1
- package/dist/SearchSection-BcbHP6QF.cjs +161 -0
- package/dist/{SearchSection-CsfURtvf.js → SearchSection-DDQ_K98T.js} +52 -52
- package/dist/SearchSection.cjs +1 -1
- package/dist/SearchSection.js +1 -1
- package/dist/SimpleCategoriesSection.cjs +1 -1
- package/dist/SimpleCategoriesSection.js +1 -1
- package/dist/SimpleProductsSection.cjs +1 -1
- package/dist/SimpleProductsSection.js +2 -2
- package/dist/{SoundCloud-1hd9TBSO.cjs → SoundCloud-C86xwUG6.cjs} +1 -1
- package/dist/{SoundCloud-CKaavZky.js → SoundCloud-DG91z39R.js} +1 -1
- package/dist/StatsSection.cjs +5 -5
- package/dist/StatsSection.js +22 -22
- package/dist/{Streamable-DLxq1ZNX.cjs → Streamable-4uAnb3WN.cjs} +1 -1
- package/dist/{Streamable-CZEPghiG.js → Streamable-BAIWLgyD.js} +1 -1
- package/dist/ToggleSection.cjs +3 -3
- package/dist/ToggleSection.js +10 -10
- package/dist/{Twitch-Bb8e342z.cjs → Twitch-CVAj24ti.cjs} +1 -1
- package/dist/{Twitch-BJeGquex.js → Twitch-DfXeW5Xs.js} +1 -1
- package/dist/UrgentSaleProductsSection.cjs +1 -1
- package/dist/UrgentSaleProductsSection.js +1 -1
- package/dist/{Vidyard-WNQdOeK1.cjs → Vidyard-DaCcaaH4.cjs} +1 -1
- package/dist/{Vidyard-CuGoX_VE.js → Vidyard-De3pges0.js} +1 -1
- package/dist/{Vimeo-Da2vBv-V.cjs → Vimeo-8wXdCXGs.cjs} +1 -1
- package/dist/{Vimeo-B9eKoxWn.js → Vimeo-N6I2qi_h.js} +1 -1
- package/dist/{Wistia-ZPcGhh1L.cjs → Wistia-BrUzHQoq.cjs} +1 -1
- package/dist/{Wistia-BB50IUif.js → Wistia-dlV6n6tO.js} +1 -1
- package/dist/{YouTube-4RMnpdLL.cjs → YouTube-Cfsj4ZaP.cjs} +1 -1
- package/dist/{YouTube-CG6JL2_w.js → YouTube-DNJxWqRm.js} +1 -1
- package/dist/{index-DzYKmmn2.js → index-BGY3PSA-.js} +18 -18
- package/dist/{index-Djw_s9eq.js → index-C0SKNFzP.js} +15 -15
- package/dist/{index-cd9auaNr.cjs → index-CLoINIGC.cjs} +3 -3
- package/dist/{index-GxCvHDwv.cjs → index-ELUMKl0N.cjs} +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{suspense-categories-card-simple-DuKEj9IU.js → suspense-categories-card-simple-BGj475Ca.js} +11 -10
- package/dist/{suspense-categories-card-simple-DaA0JGJJ.cjs → suspense-categories-card-simple-CjGtzfzp.cjs} +1 -1
- package/dist/suspense-product-card-detailed-BJ-HBkBc.js +577 -0
- package/dist/suspense-product-card-detailed-wPRUytSf.cjs +263 -0
- package/dist/{suspense-product-card-simple-D2m3NcrV.js → suspense-product-card-simple-CLJjab5B.js} +1 -1
- package/dist/{suspense-product-card-simple-BWxWMag0.cjs → suspense-product-card-simple-CrqjSxHI.cjs} +1 -1
- package/dist/{tag-CtleOqEC.js → tag-cRMfP-SZ.js} +9 -9
- package/dist/{tag-Bov1gw34.cjs → tag-yputMSpE.cjs} +4 -4
- package/package.json +1 -1
- package/dist/SearchSection-BGK1Fxaj.cjs +0 -161
- package/dist/suspense-product-card-detailed-C-ZCjG5p.js +0 -538
- package/dist/suspense-product-card-detailed-FuxsUusc.cjs +0 -260
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),l=require("react"),p=require("./index-
|
|
1
|
+
"use strict";const s=require("react/jsx-runtime"),l=require("react"),p=require("./index-ELUMKl0N.cjs"),d=l.forwardRef((e,t)=>{const{locationFinderTitle:n,locationFinderPlaceholder:o,openMapText:i,onOpenMap:r=()=>{},mapFilters:c,inputComponent:a}=e;return s.jsx(p.LocationFinder,{ref:t,title:n,placeholderText:o,onOpenMap:r,openMapText:i,mapFilters:c,inputComponent:a})});module.exports=d;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as y } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
2
2
|
import f from "react";
|
|
3
|
-
import { u as m, p as g } from "./SearchSection-
|
|
3
|
+
import { u as m, p as g } from "./SearchSection-DDQ_K98T.js";
|
|
4
4
|
function v(t, e) {
|
|
5
5
|
for (var r = 0; r < e.length; r++) {
|
|
6
6
|
const s = e[r];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const f=require("./_commonjsHelpers-DwTZ_eVU.cjs"),m=require("react"),c=require("./SearchSection-
|
|
1
|
+
"use strict";const f=require("./_commonjsHelpers-DwTZ_eVU.cjs"),m=require("react"),c=require("./SearchSection-BcbHP6QF.cjs");function g(t,e){for(var r=0;r<e.length;r++){const s=e[r];if(typeof s!="string"&&!Array.isArray(s)){for(const o in s)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(s,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>s[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var v=Object.create,a=Object.defineProperty,P=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,b=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty,x=(t,e,r)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e)=>{for(var r in e)a(t,r,{get:e[r],enumerable:!0})},d=(t,e,r,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of O(e))!M.call(t,o)&&o!==r&&a(t,o,{get:()=>e[o],enumerable:!(s=P(e,o))||s.enumerable});return t},j=(t,e,r)=>(r=t!=null?v(b(t)):{},d(!t||!t.__esModule?a(r,"default",{value:t,enumerable:!0}):r,t)),S=t=>d(a({},"__esModule",{value:!0}),t),n=(t,e,r)=>(x(t,typeof e!="symbol"?e+"":e,r),r),h={};w(h,{default:()=>l});var y=S(h),p=j(m),u=c.utils,_=c.patterns;const D="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends p.Component{constructor(){super(...arguments),n(this,"callPlayer",u.callPlayer),n(this,"duration",null),n(this,"currentTime",null),n(this,"secondsLoaded",null),n(this,"mute",()=>{}),n(this,"unmute",()=>{}),n(this,"ref",e=>{this.iframe=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(D,L).then(r=>{this.player=r.PlayerWidget(this.iframe),this.player.ready.then(()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on((s,o)=>{this.currentTime=s,this.duration=o}),this.props.onReady()})},this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,r=!0){this.callPlayer("seek",e),r||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:r}=this.props,s=e.match(_.MATCH_URL_MIXCLOUD)[1],o={width:"100%",height:"100%"},i=(0,u.queryString)({...r.options,feed:`/${s}/`});return p.default.createElement("iframe",{key:s,ref:this.ref,style:o,src:`https://player-widget.mixcloud.com/widget/iframe/?${i}`,frameBorder:"0",allow:"autoplay"})}}n(l,"displayName","Mixcloud");n(l,"canPlay",_.canPlay.mixcloud);n(l,"loopOnEnded",!0);const T=f.getDefaultExportFromCjs(y),C=g({__proto__:null,default:T},[y]);exports.Mixcloud=C;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const P=require("./_commonjsHelpers-DwTZ_eVU.cjs"),g=require("react"),E=require("./SearchSection-
|
|
1
|
+
"use strict";const P=require("./_commonjsHelpers-DwTZ_eVU.cjs"),g=require("react"),E=require("./SearchSection-BcbHP6QF.cjs");function b(r,e){for(var t=0;t<e.length;t++){const i=e[t];if(typeof i!="string"&&!Array.isArray(i)){for(const s in i)if(s!=="default"&&!(s in r)){const o=Object.getOwnPropertyDescriptor(i,s);o&&Object.defineProperty(r,s,o.get?o:{enumerable:!0,get:()=>i[s]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var _=Object.create,a=Object.defineProperty,L=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,I=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,M=(r,e,t)=>e in r?a(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,x=(r,e)=>{for(var t in e)a(r,t,{get:e[t],enumerable:!0})},f=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of k(e))!O.call(r,s)&&s!==t&&a(r,s,{get:()=>e[s],enumerable:!(i=L(e,s))||i.enumerable});return r},R=(r,e,t)=>(t=r!=null?_(I(r)):{},f(!r||!r.__esModule?a(t,"default",{value:r,enumerable:!0}):t,r)),w=r=>f(a({},"__esModule",{value:!0}),r),n=(r,e,t)=>(M(r,typeof e!="symbol"?e+"":e,t),t),y={};x(y,{default:()=>l});var m=w(y),v=R(g),p=E.patterns;const S="https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs";class l extends v.Component{constructor(){super(...arguments),n(this,"onReady",(...e)=>this.props.onReady(...e)),n(this,"onPlay",(...e)=>this.props.onPlay(...e)),n(this,"onBuffer",(...e)=>this.props.onBuffer(...e)),n(this,"onBufferEnd",(...e)=>this.props.onBufferEnd(...e)),n(this,"onPause",(...e)=>this.props.onPause(...e)),n(this,"onEnded",(...e)=>this.props.onEnded(...e)),n(this,"onError",(...e)=>this.props.onError(...e)),n(this,"onPlayBackRateChange",e=>this.props.onPlaybackRateChange(e.target.playbackRate)),n(this,"onEnablePIP",(...e)=>this.props.onEnablePIP(...e)),n(this,"onSeek",e=>{this.props.onSeek(e.target.currentTime)}),n(this,"onDurationChange",()=>{const e=this.getDuration();this.props.onDuration(e)}),n(this,"mute",()=>{this.player.muted=!0}),n(this,"unmute",()=>{this.player.muted=!1}),n(this,"ref",e=>{this.player=e})}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getPlaybackId(this.props.url);e&&(this.player.playbackId=e)}componentWillUnmount(){this.player.playbackId=null,this.removeListeners(this.player)}addListeners(e){const{playsinline:t}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),e.addEventListener("canplay",this.onReady),t&&e.setAttribute("playsinline","")}removeListeners(e){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("canplay",this.onReady)}async load(e){var t;const{onError:i,config:s}=this.props;if(!((t=globalThis.customElements)!=null&&t.get("mux-player")))try{await import(`${S.replace("VERSION",s.version)}`),this.props.onLoaded()}catch(u){i(u)}const[,o]=e.match(p.MATCH_URL_MUX);this.player.playbackId=o}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.playbackId=null}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player&&this.player.requestPictureInPicture()}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player&&document.exitPictureInPicture()}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(e.length===0)return 0;const t=e.end(e.length-1),i=this.getDuration();return t>i?i:t}getPlaybackId(e){const[,t]=e.match(p.MATCH_URL_MUX);return t}render(){const{url:e,playing:t,loop:i,controls:s,muted:o,config:u,width:c,height:h}=this.props,d={width:c==="auto"?c:"100%",height:h==="auto"?h:"100%"};return s===!1&&(d["--controls"]="none"),v.default.createElement("mux-player",{ref:this.ref,"playback-id":this.getPlaybackId(e),style:d,preload:"auto",autoPlay:t||void 0,muted:o?"":void 0,loop:i?"":void 0,...u.attributes})}}n(l,"displayName","Mux");n(l,"canPlay",p.canPlay.mux);const j=P.getDefaultExportFromCjs(m),D=b({__proto__:null,default:j},[m]);exports.Mux=D;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as P } from "./_commonjsHelpers-BkfeUUK-.js";
|
|
2
2
|
import g from "react";
|
|
3
|
-
import { p as E } from "./SearchSection-
|
|
3
|
+
import { p as E } from "./SearchSection-DDQ_K98T.js";
|
|
4
4
|
function b(r, e) {
|
|
5
5
|
for (var t = 0; t < e.length; t++) {
|
|
6
6
|
const i = e[t];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),d=require("react"),t=require("./index-BpbMKBf_.cjs"),u=require("./Button.cjs"),
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),d=require("react"),t=require("./index-BpbMKBf_.cjs"),u=require("./Button.cjs"),g=require("./emotion-styled.browser.esm-BtEseadx.cjs"),f=require("./consts-goSZX3xP.cjs"),_=g.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 28.75rem;
|
|
4
4
|
padding: 2.25rem;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
@media (max-width: ${
|
|
63
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
64
64
|
padding: 2rem;
|
|
65
65
|
min-height: 17.5rem;
|
|
66
66
|
width: 100%;
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
`,h=d.forwardRef(({title:r,description:o,buttonText:i,imageUrl:s,backgroundColor:
|
|
86
|
+
`,h=d.forwardRef(({title:r,description:o,buttonText:i,imageUrl:s,backgroundColor:l="none",handleSelectCard:e=()=>{},handleButtonAction:a=()=>{}},m)=>n.jsxs(_,{backgroundImage:s,backgroundColor:l,onClick:e,children:[n.jsxs("div",{className:"section__text",children:[r&&n.jsx("div",{className:"section__title",children:r}),o&&n.jsx("div",{className:"section__description",children:o})]}),n.jsx(u,{text:i,onClick:c=>{c==null||c.stopPropagation(),a()},borderRadius:"regular",color:"gray",className:"section__action"})]}));h.propTypes={title:t.PropTypes.string,description:t.PropTypes.string,buttonText:t.PropTypes.string,imageUrl:t.PropTypes.string,backgroundColor:t.PropTypes.string,handleSelectCard:t.PropTypes.func,handleButtonAction:t.PropTypes.func};const x=g.styled.div`
|
|
87
87
|
display: flex;
|
|
88
88
|
flex-direction: column;
|
|
89
89
|
align-items: flex-start;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
@media (max-width: ${
|
|
125
|
+
@media (max-width: ${f.MOBILE_SIZE_PX+"px"}) {
|
|
126
126
|
& .section__title {
|
|
127
127
|
font-size: 1.375rem;
|
|
128
128
|
line-height: 1.75rem;
|
|
@@ -132,4 +132,4 @@
|
|
|
132
132
|
flex-direction: column;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
`,p=d.forwardRef(({title:r,items:o,onSelectCard:i=()=>{},onButtonAction:s=()=>{}},
|
|
135
|
+
`,p=d.forwardRef(({title:r,items:o,onSelectCard:i=()=>{},onButtonAction:s=()=>{}},l)=>n.jsxs(x,{ref:l,children:[n.jsx("div",{className:"section__title",children:r}),n.jsx("div",{className:"section__items",children:o==null?void 0:o.map((e,a)=>n.jsx(h,{title:e==null?void 0:e.title,description:e==null?void 0:e.description,imageUrl:e==null?void 0:e.imageUrl,buttonText:e==null?void 0:e.buttonText,backgroundColor:e==null?void 0:e.backgroundColor,handleSelectCard:()=>i(e),handleButtonAction:()=>s(e)},`overlay-general-card__${a+1}`))})]}));module.exports=p;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as f } from "react";
|
|
3
3
|
import { P as t } from "./index-CblbdqjE.js";
|
|
4
4
|
import _ from "./Button.js";
|
|
@@ -95,19 +95,19 @@ const u = g.div`
|
|
|
95
95
|
description: n,
|
|
96
96
|
buttonText: i,
|
|
97
97
|
imageUrl: a,
|
|
98
|
-
backgroundColor:
|
|
98
|
+
backgroundColor: l = "none",
|
|
99
99
|
handleSelectCard: e = () => {
|
|
100
100
|
},
|
|
101
|
-
handleButtonAction:
|
|
101
|
+
handleButtonAction: s = () => {
|
|
102
102
|
}
|
|
103
|
-
}, p) => /* @__PURE__ */
|
|
103
|
+
}, p) => /* @__PURE__ */ d(
|
|
104
104
|
u,
|
|
105
105
|
{
|
|
106
106
|
backgroundImage: a,
|
|
107
|
-
backgroundColor:
|
|
107
|
+
backgroundColor: l,
|
|
108
108
|
onClick: e,
|
|
109
109
|
children: [
|
|
110
|
-
/* @__PURE__ */
|
|
110
|
+
/* @__PURE__ */ d("div", { className: "section__text", children: [
|
|
111
111
|
r && /* @__PURE__ */ o("div", { className: "section__title", children: r }),
|
|
112
112
|
n && /* @__PURE__ */ o("div", { className: "section__description", children: n })
|
|
113
113
|
] }),
|
|
@@ -115,8 +115,8 @@ const u = g.div`
|
|
|
115
115
|
_,
|
|
116
116
|
{
|
|
117
117
|
text: i,
|
|
118
|
-
onClick: (
|
|
119
|
-
|
|
118
|
+
onClick: (c) => {
|
|
119
|
+
c == null || c.stopPropagation(), s();
|
|
120
120
|
},
|
|
121
121
|
borderRadius: "regular",
|
|
122
122
|
color: "gray",
|
|
@@ -188,9 +188,9 @@ const x = g.div`
|
|
|
188
188
|
`, z = f(
|
|
189
189
|
({ title: r, items: n, onSelectCard: i = () => {
|
|
190
190
|
}, onButtonAction: a = () => {
|
|
191
|
-
} },
|
|
191
|
+
} }, l) => /* @__PURE__ */ d(x, { ref: l, children: [
|
|
192
192
|
/* @__PURE__ */ o("div", { className: "section__title", children: r }),
|
|
193
|
-
/* @__PURE__ */ o("div", { className: "section__items", children: n == null ? void 0 : n.map((e,
|
|
193
|
+
/* @__PURE__ */ o("div", { className: "section__items", children: n == null ? void 0 : n.map((e, s) => /* @__PURE__ */ o(
|
|
194
194
|
m,
|
|
195
195
|
{
|
|
196
196
|
title: e == null ? void 0 : e.title,
|
|
@@ -201,7 +201,7 @@ const x = g.div`
|
|
|
201
201
|
handleSelectCard: () => i(e),
|
|
202
202
|
handleButtonAction: () => a(e)
|
|
203
203
|
},
|
|
204
|
-
`overlay-general-card__${
|
|
204
|
+
`overlay-general-card__${s + 1}`
|
|
205
205
|
)) })
|
|
206
206
|
] })
|
|
207
207
|
);
|
|
@@ -81,4 +81,4 @@
|
|
|
81
81
|
object-fit: cover;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
`,N=a.forwardRef((t,o)=>{const{uuid:n,title:i,image:s,sellerUuid:g,onSelectCard:d=()=>{},imageComponent:c}=t;return r.jsxs(b,{className:"product-card",onClick:d,children:[l.isDefined(c)?c:r.jsx(y.ProductImageWrapper,{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),$=a.forwardRef(({},t)=>r.jsxs(b,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),q=({limit:t=4,isLoading:o=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx($,{isLoading:o},`${n}-skeleton-product-card-${s}`))}),I=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:i,keyPrefix:s})=>r.jsx(a.Suspense,{fallbackComponent:o,children:n===!0?r.jsx(q,{isLoading:n,limit:i,keyPrefix:s}):t}),f=a.memo(N),U=a.forwardRef((t,o)=>{const{icon:n,items:i,limit:s=4,imageUrl:g,onSelectCard:d=()=>{},title:c="Season inspiration",isLoading:w=!1,getImage:p=()=>{}}=t,h=k.useDetectMobile(),S=a.useMemo(()=>r.jsx(r.Fragment,{children:h===!0?i==null?void 0:i.map((e,m)=>r.jsx(f,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>d({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m)):i==null?void 0:i.slice(0,s).map((e,m)=>r.jsx(f,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>d({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m))}),[i,h,s]);return r.jsxs(v.RegulatTitleSectionWrapper,{ref:o,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(n)&&r.jsx("i",{className:n}),r.jsx("span",{children:c})]})}),r.jsx(C,{className:"products-banner",children:r.jsx("img",{src:g})}),r.jsx(P,{limit:s,children:r.jsx(I,{isLoading:w,limit:s,keyPrefix:"explore-landing",children:S})})]})});module.exports=U;
|
|
84
|
+
`,N=a.forwardRef((t,o)=>{const{uuid:n,title:i,image:s,sellerUuid:g,onSelectCard:d=()=>{},imageComponent:c}=t;return r.jsxs(b,{ref:o,className:"product-card",onClick:d,children:[l.isDefined(c)?c:r.jsx(y.ProductImageWrapper,{src:s}),r.jsx("div",{className:"card-title",children:i})]})}),$=a.forwardRef(({},t)=>r.jsxs(b,{className:"product-card",children:[r.jsx("img",{className:"skeleton-img"}),r.jsx("div",{className:"skeleton-title"})]})),q=({limit:t=4,isLoading:o=!1,keyPrefix:n})=>r.jsx(r.Fragment,{children:Array.from({length:t},(i,s)=>r.jsx($,{isLoading:o},`${n}-skeleton-product-card-${s}`))}),I=({children:t,fallbackComponent:o=r.jsx(r.Fragment,{}),isLoading:n=!1,limit:i,keyPrefix:s})=>r.jsx(a.Suspense,{fallbackComponent:o,children:n===!0?r.jsx(q,{isLoading:n,limit:i,keyPrefix:s}):t}),f=a.memo(N),U=a.forwardRef((t,o)=>{const{icon:n,items:i,limit:s=4,imageUrl:g,onSelectCard:d=()=>{},title:c="Season inspiration",isLoading:w=!1,getImage:p=()=>{}}=t,h=k.useDetectMobile(),S=a.useMemo(()=>r.jsx(r.Fragment,{children:h===!0?i==null?void 0:i.map((e,m)=>r.jsx(f,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>d({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m)):i==null?void 0:i.slice(0,s).map((e,m)=>r.jsx(f,{title:e==null?void 0:e.name,sellerUuid:e==null?void 0:e.sellerUuid,uuid:e==null?void 0:e.uuid,onSelectCard:()=>d({uuid:e==null?void 0:e.uuid,nameSlug:e==null?void 0:e.nameSlug}),image:p(e==null?void 0:e.image,e==null?void 0:e.uuid,e==null?void 0:e.sellerUuid)||null},m))}),[i,h,s]);return r.jsxs(v.RegulatTitleSectionWrapper,{ref:o,children:[r.jsx("div",{className:"regular-title",children:r.jsxs("div",{className:"regular-title-text",children:[l.isDefinedNotEmptyString(n)&&r.jsx("i",{className:n}),r.jsx("span",{children:c})]})}),r.jsx(C,{className:"products-banner",children:r.jsx("img",{src:g})}),r.jsx(P,{limit:s,children:r.jsx(I,{isLoading:w,limit:s,keyPrefix:"explore-landing",children:S})})]})});module.exports=U;
|
|
@@ -99,7 +99,7 @@ const E = p.div`
|
|
|
99
99
|
},
|
|
100
100
|
imageComponent: d
|
|
101
101
|
} = t;
|
|
102
|
-
return /* @__PURE__ */ s(k, { className: "product-card", onClick: n, children: [
|
|
102
|
+
return /* @__PURE__ */ s(k, { ref: l, className: "product-card", onClick: n, children: [
|
|
103
103
|
M(d) ? d : /* @__PURE__ */ r(j, { src: a }),
|
|
104
104
|
/* @__PURE__ */ r("div", { className: "card-title", children: i })
|
|
105
105
|
] });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),n=require("react"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),n=require("react"),l=require("./utils-Dl9xPH4c.cjs"),c=require("./emotion-styled.browser.esm-BtEseadx.cjs"),m=require("./consts-goSZX3xP.cjs"),g=require("./emotion-element-f0de968e.browser.esm-B7k6i6lC.cjs"),u=require("./styled-components.browser.esm-CvykQBGY.cjs"),_=c.styled.div`
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
font-style: normal;
|
|
80
80
|
font-weight: 600;
|
|
81
81
|
line-height: 1.75rem;
|
|
82
|
-
${
|
|
82
|
+
${l.truncateText()}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
& .quattro-card__description {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
font-style: normal;
|
|
88
88
|
font-weight: 500;
|
|
89
89
|
line-height: 1.25rem;
|
|
90
|
-
${
|
|
90
|
+
${l.truncateTextInRows(2)}
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
display: block;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
`,h=n.forwardRef(({title:o,description:r,imageUrl:i,onSelectCard:s=()=>{}},
|
|
111
|
+
`,h=n.forwardRef(({title:o,description:r,imageUrl:i,onSelectCard:s=()=>{}},d)=>{const{theme:a}=g.useTheme();return e.jsxs(f,{ref:d,theme:a,onClick:s,children:[e.jsx("img",{loading:"lazy",src:i}),e.jsx(_,{theme:a,className:"quattro-card__gradient",children:e.jsxs("div",{className:"quattro-card__text",children:[e.jsx("div",{className:"quattro-card__title",children:o}),e.jsx("div",{className:"quattro-card__description",children:r})]})})]})}),b=u.qe.div`
|
|
112
112
|
display: flex;
|
|
113
113
|
flex-direction: column;
|
|
114
114
|
align-items: flex-start;
|
|
@@ -160,4 +160,4 @@
|
|
|
160
160
|
gap: 1rem;
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
`,w=n.memo(h),x=n.forwardRef(({title:o,items:r,onSelectCard:i=()=>{}},s)=>{const
|
|
163
|
+
`,w=n.memo(h),x=n.forwardRef(({title:o,items:r,onSelectCard:i=()=>{}},s)=>{const d=n.useMemo(()=>{var a;return(a=r==null?void 0:r.slice(0,4))==null?void 0:a.map((t,p)=>e.jsx(w,{title:t==null?void 0:t.title,description:t==null?void 0:t.description,imageUrl:t==null?void 0:t.imageUrl,onSelectCard:()=>i==null?void 0:i(t)},`quattro-card__${p+1}`))},[r]);return e.jsxs(b,{ref:s,children:[e.jsx("div",{className:"wrapper__heading",children:e.jsx("div",{className:"wrapper__title",children:l.isDefinedNotEmptyString(o)&&e.jsx("div",{className:"title__text",children:e.jsx("span",{children:o})})})}),e.jsx("div",{className:"wrapper__cards",children:d})]})});module.exports=x;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as l, memo as g, useMemo as f } from "react";
|
|
3
3
|
import { t as h, p as u, k as _ } from "./utils-BdsZgOUE.js";
|
|
4
4
|
import { s as c } from "./emotion-styled.browser.esm-BNN1dTl3.js";
|
|
@@ -117,11 +117,11 @@ const y = c.div`
|
|
|
117
117
|
}
|
|
118
118
|
`, x = l(
|
|
119
119
|
({ title: o, description: e, imageUrl: i, onSelectCard: n = () => {
|
|
120
|
-
} },
|
|
120
|
+
} }, d) => {
|
|
121
121
|
const { theme: a } = b();
|
|
122
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ s(v, { ref: d, theme: a, onClick: n, children: [
|
|
123
123
|
/* @__PURE__ */ r("img", { loading: "lazy", src: i }),
|
|
124
|
-
/* @__PURE__ */ r(y, { theme: a, className: "quattro-card__gradient", children: /* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ r(y, { theme: a, className: "quattro-card__gradient", children: /* @__PURE__ */ s("div", { className: "quattro-card__text", children: [
|
|
125
125
|
/* @__PURE__ */ r("div", { className: "quattro-card__title", children: o }),
|
|
126
126
|
/* @__PURE__ */ r("div", { className: "quattro-card__description", children: e })
|
|
127
127
|
] }) })
|
|
@@ -182,7 +182,7 @@ const y = c.div`
|
|
|
182
182
|
`, k = g(x), I = l(
|
|
183
183
|
({ title: o, items: e, onSelectCard: i = () => {
|
|
184
184
|
} }, n) => {
|
|
185
|
-
const
|
|
185
|
+
const d = f(() => {
|
|
186
186
|
var a;
|
|
187
187
|
return (a = e == null ? void 0 : e.slice(0, 4)) == null ? void 0 : a.map((t, p) => /* @__PURE__ */ r(
|
|
188
188
|
k,
|
|
@@ -195,9 +195,9 @@ const y = c.div`
|
|
|
195
195
|
`quattro-card__${p + 1}`
|
|
196
196
|
));
|
|
197
197
|
}, [e]);
|
|
198
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ s(q, { ref: n, children: [
|
|
199
199
|
/* @__PURE__ */ r("div", { className: "wrapper__heading", children: /* @__PURE__ */ r("div", { className: "wrapper__title", children: _(o) && /* @__PURE__ */ r("div", { className: "title__text", children: /* @__PURE__ */ r("span", { children: o }) }) }) }),
|
|
200
|
-
/* @__PURE__ */ r("div", { className: "wrapper__cards", children:
|
|
200
|
+
/* @__PURE__ */ r("div", { className: "wrapper__cards", children: d })
|
|
201
201
|
] });
|
|
202
202
|
}
|
|
203
203
|
);
|
package/dist/QuizSection.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),i=require("react"),N=require("./utils-Dl9xPH4c.cjs"),k=require("./Button.cjs"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),i=require("react"),N=require("./utils-Dl9xPH4c.cjs"),k=require("./Button.cjs"),T=require("./emotion-styled.browser.esm-BtEseadx.cjs"),g=require("./consts-goSZX3xP.cjs"),M=require("./Icon.cjs"),K=require("./ProgressBar.cjs"),V=T.styled.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
justify-content: center;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
@media (max-width: ${
|
|
52
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
53
53
|
& .wrapper__title {
|
|
54
54
|
font-size: 1.375rem;
|
|
55
55
|
line-height: 1.75rem;
|
|
@@ -250,7 +250,7 @@
|
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
-
@media (max-width: ${
|
|
253
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
254
254
|
& .wrapper__content {
|
|
255
255
|
& .wrapper__item {
|
|
256
256
|
& .wrapper__answers {
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
351
|
|
|
352
|
-
@media (max-width: ${
|
|
352
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
353
353
|
width: 100%;
|
|
354
354
|
|
|
355
355
|
& .wrapper__actions {
|
|
@@ -359,7 +359,7 @@
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
|
-
`,ee=i.forwardRef(({title:
|
|
362
|
+
`,ee=i.forwardRef(({title:f,description:c,startQuizText:h="Start quiz",onStartQuiz:x=()=>{}},o)=>e.jsxs(V,{ref:o,children:[e.jsxs("div",{className:"wrapper__content",children:[e.jsx("div",{className:"wrapper__title",children:f}),e.jsx("div",{className:"wrapper__description",children:c})]}),e.jsx(k,{text:h,size:"medium",className:"wrapper__action",onClick:x})]})),re=i.forwardRef(({questionNoText:f,questionNo:c,totalQuestions:h,text:x,options:o,correctAnswerIndex:n,selectedAnswer:r,secondsPerQuestion:C,nextText:z="Next",giveUpText:Q="Give up",nextDisabled:U=!0,onSelectAnswer:Z=()=>{},onGiveUp:L=()=>{},onNext:$=()=>{},selectedAnswerIndex:p},R)=>{const[d,b]=i.useState(C),[u,E]=i.useState(!0),w=i.useRef(null);i.useEffect(()=>(u&&d>0&&(w.current=setInterval(()=>{b(m=>m>0?m-1:0)},1e3)),()=>clearInterval(w.current)),[u,d]);const W=d>0?d/C*g.CIRCLE_CIRCUMFERENCE:0;return e.jsxs(Y,{ref:R,children:[e.jsxs("div",{className:"wrapper__headline",children:[e.jsxs("div",{className:"wrapper__question-no",children:[e.jsx("div",{className:"question-no__text",children:`${f} ${c} / ${h}`}),e.jsx(K,{progressPercentage:c/h*100,className:"question-no__progress-bar"})]}),e.jsxs("div",{className:"wrapper__timer",children:[e.jsxs("svg",{className:"timer__ring",width:"60",height:"60",children:[e.jsx("circle",{className:"ring__progres-background",cx:"30",cy:"30",r:g.CIRCLE_RADIUS,stroke:"#e0e0e0",strokeWidth:"4",fill:"transparent"}),e.jsx("circle",{className:"ring__progres",cx:"30",cy:"30",r:g.CIRCLE_RADIUS,stroke:"#d97706",strokeWidth:"4",fill:"transparent",strokeLinecap:"round",transform:"rotate(-90 30 30)",strokeDasharray:g.CIRCLE_CIRCUMFERENCE,strokeDashoffset:g.CIRCLE_CIRCUMFERENCE-W})]}),e.jsx("div",{className:"timer__display",children:e.jsx("span",{className:"timer__text",children:N.formatTimerText(d)})})]})]}),e.jsxs("div",{className:"wrapper__content",children:[e.jsxs("div",{className:"wrapper__item",children:[e.jsx("div",{className:"wrapper__text",children:x}),e.jsx("div",{className:"wrapper__answers",children:o==null?void 0:o.map((m,a)=>e.jsxs("div",{className:`wrapper__answer ${n===a&&n===p?"active":N.isDefinedNotEmptyString(r)&&n!==p&&p===a?"incorrect":""}`,onClick:()=>Z(m,a),children:[`${String.fromCharCode(65+a)}: ${m}`,n===a&&n===p&&e.jsx(M,{icon:" mng-lnc-checkmark--filled",sizeInUnits:"1.25rem",className:"wrapper__icon"}),p>=0&&n!==p&&p===a&&e.jsx(M,{icon:" mng-lnc-close--filled",sizeInUnits:"1.25rem",className:"wrapper__icon__incorrect"})]},`quiz-answer__${a+1}`))})]}),e.jsxs("div",{className:"wrapper__actions",children:[e.jsx(k,{text:Q,borderRadius:"curved",size:"medium",className:"wrapper__action action__give-up",onClick:L}),e.jsx(k,{text:z,borderRadius:"curved",size:"medium",className:"wrapper__action action__next",disabled:U,onClick:$})]})]})]})}),te=i.forwardRef(({title:f,description:c,continueText:h="Continue",endQuizText:x="End quiz",onContinue:o=()=>{},onEndQuiz:n=()=>{}},r)=>e.jsxs(q,{ref:r,children:[e.jsxs("div",{className:"wrapper__content",children:[e.jsx(M,{icon:" mng-lnc-checkmark--outline",color:"success",sizeInUnits:"4rem",className:"wrapper__icon"}),e.jsxs("div",{className:"wrapper__info",children:[f&&e.jsx("div",{className:"wrapper__title",children:f}),c&&e.jsx("div",{className:"wrapper__description",children:c})]})]}),e.jsxs("div",{className:"wrapper__actions",children:[e.jsx(k,{text:h,borderRadius:"curved",size:"medium",className:"wrapper__action action__continue",onClick:o}),e.jsx(k,{text:x,borderRadius:"curved",size:"medium",className:"wrapper__action action__end-quiz",onClick:n})]})]})),l={START_QUIZ:0,QUIZ:1,CORRECT_ANSWER:2},ae=T.styled.div`
|
|
363
363
|
display: flex;
|
|
364
364
|
width: 100%;
|
|
365
365
|
align-items: center;
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
border-radius: 0.75rem;
|
|
384
384
|
}
|
|
385
385
|
|
|
386
|
-
@media (max-width: ${
|
|
386
|
+
@media (max-width: ${g.MOBILE_SIZE_PX+"px"}) {
|
|
387
387
|
& .wrapper__outlet {
|
|
388
388
|
padding: 0;
|
|
389
389
|
}
|
|
@@ -392,4 +392,4 @@
|
|
|
392
392
|
display: none;
|
|
393
393
|
}
|
|
394
394
|
}
|
|
395
|
-
`,ie=i.forwardRef(({title:
|
|
395
|
+
`,ie=i.forwardRef(({title:f,subtitle:c,endTitle:h,endDescription:x,imageUrl:o,imageComponent:n,questions:r,secondsPerQuestion:C,numberOfCredits:z,startQuizText:Q="Start quiz",nextText:U="Next",giveUpText:Z="Give up",questionNoText:L="Question",continueText:$="Continue",endQuizText:p="End quiz",onStartQuiz:R=()=>{},onSelectAnswer:d=()=>{},onGiveUp:b=()=>{},onNext:u=()=>{},onContinue:E=()=>{},onEndQuiz:w=()=>{}},W)=>{const[m,a]=i.useState(l.START_QUIZ),[_,v]=i.useState(0),[t,D]=i.useState(null),[O,y]=i.useState(null),[P,j]=i.useState(null),A=i.useRef([]),I=i.useRef(0),B=()=>{var s;a(l.QUIZ),D((s=r==null?void 0:r.at)==null?void 0:s.call(r,_)),R==null||R()},X=(s,S)=>{j(S),y(s),d==null||d()},F=()=>{a(l.START_QUIZ),v(0),y(null),j(null),b==null||b()},G=()=>{var S;const s=P===(t==null?void 0:t.correctAnswerIndex);s?(a(l.CORRECT_ANSWER),I.current+=z||(t==null?void 0:t.numberOfCredits)):_===(r==null?void 0:r.length)-1?(a(l.START_QUIZ),v(0),y(null),j(null)):(v(_+1),D((S=r==null?void 0:r.at)==null?void 0:S.call(r,_+1)),y(null),j(null)),A.current=[...A.current,{question:t,selectedAnswer:O,isCorrect:s}],u==null||u()},H=()=>{var s;_===(r==null?void 0:r.length)-1?(a(l.START_QUIZ),v(0)):(a(l.QUIZ),v(_+1),D((s=r==null?void 0:r.at)==null?void 0:s.call(r,_+1))),y(null),j(null),E==null||E(I==null?void 0:I.current)},J=()=>{a(l.START_QUIZ),v(0),y(null),j(null),w==null||w()};return e.jsxs(ae,{ref:W,children:[e.jsxs("div",{className:"wrapper__outlet",children:[m===l.START_QUIZ&&e.jsx(ee,{title:f,description:c,startQuizText:Q,onStartQuiz:B}),m===l.QUIZ&&t&&e.jsx(re,{questionNoText:L,questionNo:_,totalQuestions:(r==null?void 0:r.length)||0,text:t==null?void 0:t.questionText,options:t==null?void 0:t.options,secondsPerQuestion:C||(t==null?void 0:t.secondsPerQuestion),correctAnswerIndex:t==null?void 0:t.correctAnswerIndex,selectedAnswer:O,nextText:U,giveUpText:Z,nextDisabled:!N.isDefined(O),onSelectAnswer:X,onGiveUp:F,onNext:G,selectedAnswerIndex:P},`quiz-question__${_}`),m===l.CORRECT_ANSWER&&e.jsx(te,{title:h,description:N.formatString(x,z||(t==null?void 0:t.numberOfCredits)),continueText:$,endQuizText:p,onContinue:H,onEndQuiz:J})]}),N.isDefined(n)?n:e.jsx("img",{src:o,className:"wrapper__image"})]})});module.exports=ie;
|