@ikas/loyalty-widget-renderer 1.0.0-alpha.47 → 1.0.0-alpha.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/renderer/screens/main-screen/header/index.js +1 -1
- package/build/renderer/screens/main-screen/header/style.d.ts +3 -1
- package/build/renderer/screens/main-screen/header/style.js +1 -1
- package/build/storefront-widget-script-injector.iife.js +1 -1
- package/build/storefront-widget-script-injector.iife.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{observer as e}from"mobx-react";import
|
|
1
|
+
import{observer as e}from"mobx-react";import r from"react";import{XClose as t}from"../../../../assets/icons/x-close.js";import{ImageTypeEnum as o}from"../../../../models/loyalty-widget/types/index.js";import n from"./auth-user-section/index.js";import i from"./logo-section/index.js";import l from"./title-section/index.js";import a from"./user-logged-section/index.js";import{Container as s,TopSection as c,CloseButton as d,Content as m,Card as f}from"./style.js";var u=e(function(e){var u,g=e.viewModel,p=e.onClose,v=e.onCardHeightChange,h=e.headerGap,y=g.loyaltyWidget,E=g.user,b=y.header.background,x=b.bgColor,C=b.type,j=(null===(u=b.image)||void 0===u?void 0:u.src)||null,R=r.useRef(null);return r.useEffect(function(){if(v){var e=R.current;if(e){var r=function(){v(Math.round(e.getBoundingClientRect().height))};if(r(),"undefined"!=typeof ResizeObserver){var t=new ResizeObserver(function(){r()});return t.observe(e),function(){t.disconnect()}}}}},[v]),r.createElement(s,null,r.createElement(c,{$bgColor:x,$bgType:C,$bgImageSrc:j,$gap:h},y.header.logo.type===o.SHOW&&y.header.logo.src&&r.createElement(i,{logo:y.header.logo}),r.createElement(l,{layout:y}),r.createElement(d,{onClick:p,$color:y.header.textColor||"#f7f5ff"},r.createElement(t,null))),r.createElement(m,null,r.createElement(f,{ref:R,$borderRadius:y.settings.cartBorderRadius},E?r.createElement(a,{viewModel:g}):r.createElement(n,{viewModel:g}))))});export{u as default};
|
|
@@ -12,5 +12,7 @@ export declare const Content: import("styled-components").StyledComponent<"div",
|
|
|
12
12
|
export declare const Card: import("styled-components").StyledComponent<"div", any, {
|
|
13
13
|
$borderRadius: number;
|
|
14
14
|
}, never>;
|
|
15
|
-
export declare const CloseButton: import("styled-components").StyledComponent<"div", any, {
|
|
15
|
+
export declare const CloseButton: import("styled-components").StyledComponent<"div", any, {
|
|
16
|
+
$color: string;
|
|
17
|
+
}, never>;
|
|
16
18
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__makeTemplateObject as n}from'./../../../../ext/tslib/tslib.es6.mjs.js';import e,{css as o}from"styled-components";import{HeaderBackgroundTypeEnum as
|
|
1
|
+
import{__makeTemplateObject as n}from'./../../../../ext/tslib/tslib.es6.mjs.js';import e,{css as o}from"styled-components";import{HeaderBackgroundTypeEnum as r}from"../../../../models/loyalty-widget/types/index.js";var i,t,p,a,d,l,c,x,s,g,b=48,u=e.div(i||(i=n(["\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: visible;\n"],["\n position: relative;\n display: flex;\n flex-direction: column;\n overflow: visible;\n"]))),f=e.div(c||(c=n(["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: ",";\n padding: 24px 20px ","px 24px;\n width: 100%;\n\n ","\n"],["\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n gap: ",";\n padding: 24px 20px ","px 24px;\n width: 100%;\n\n ","\n"])),function(n){var e=n.$gap;return void 0!==e?"".concat(e,"px"):"16px"},48,function(e){var i=e.$bgType,c=e.$bgColor,x=e.$bgImageSrc;return i===r.IMAGE?x?o(p||(p=n(["\n background-image: url(",");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n "],["\n background-image: url(",");\n background-position: center;\n background-repeat: no-repeat;\n background-size: cover;\n "])),x):o(t||(t=n([""],[""]))):c?i===r.GRADIENT?o(d||(d=n(["\n background:\n radial-gradient(92.35% 100% at 50% 0%, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%), ",";\n "],["\n background:\n radial-gradient(92.35% 100% at 50% 0%, rgba(255, 255, 255, 0.5) 0%, rgba(0, 0, 0, 0.5) 100%), ",";\n "])),c):o(l||(l=n(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),c):o(a||(a=n([""],[""])))}),m=e.div(x||(x=n(["\n position: absolute;\n left: 16px;\n right: 16px;\n top: calc(100% - ","px);\n display: flex;\n z-index: 10;\n"],["\n position: absolute;\n left: 16px;\n right: 16px;\n top: calc(100% - ","px);\n display: flex;\n z-index: 10;\n"])),48),v=e.div(s||(s=n(["\n display: flex;\n flex-direction: column;\n width: 100%;\n background: white;\n border: 1px solid #eef2f6;\n border-radius: ",";\n box-shadow:\n 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02),\n 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n background: white;\n border: 1px solid #eef2f6;\n border-radius: ",";\n box-shadow:\n 0 5px 2px 0 rgba(0, 0, 0, 0.01),\n 0 3px 2px 0 rgba(0, 0, 0, 0.02),\n 0 1px 1px 0 rgba(0, 0, 0, 0.03),\n 0 0 1px 0 rgba(0, 0, 0, 0.04);\n"])),function(n){var e=n.$borderRadius;return"".concat(e,"px")}),y=e.div(g||(g=n(["\n position: absolute;\n right: 20px;\n top: 24px;\n display: flex;\n padding: 4px;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n svg {\n color: ",";\n }\n"],["\n position: absolute;\n right: 20px;\n top: 24px;\n display: flex;\n padding: 4px;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n\n svg {\n color: ",";\n }\n"])),function(n){return n.$color});export{b as CARD_OVERLAP_TOP,v as Card,y as CloseButton,u as Container,m as Content,f as TopSection};
|