Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@front10/basic-widget

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@front10/basic-widget - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

6

dist/basic-widget.cjs.development.js

@@ -213,3 +213,7 @@ 'use strict';

if (Component) {
return React.createElement(Component, Object.assign({}, settings));
return React.createElement(baseElements.Box, {
ml: "auto",
mr: "auto",
variant: "layout.container"
}, React.createElement(Component, Object.assign({}, settings)));
}

@@ -216,0 +220,0 @@

2

dist/basic-widget.cjs.production.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@front10/base-elements"),t=require("react"),n=require("@front10/container-elements");function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function r(e,t){if(null==e)return{};var n,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)t.indexOf(n=a[i])>=0||(r[n]=e[n]);return r}var a=function(n){var i=n.level,a=void 0===i?2:i,o=n.content,c=void 0===o?"":o,g=r(n,["level","content"]),l="h2",s="fontSize2";return 0===a||"0"===a?l="span":a>=0&&a<7&&(l="h"+a,s="fontSize"+a),t.createElement(e.Heading,Object.assign({variant:s,color:"coverHeading"},g,{as:l}),c)},o={cover:function(n){var i=n.src,o=n.backgroundColor,c=void 0===o?"white":o,g=n.backgroundPosition,l=void 0===g?"center":g,s=n.content,d=void 0===s?"":s,h=n.width,u=void 0===h?"100%":h,v=n.height,m=void 0===v?"400px":v,f=n.heading,p=n.align,b=void 0===p?"center":p,x=n.alignY,w=void 0===x?"center":x,E=n.opacity,O=void 0===E?.5:E,y=n.container,j=r(n,["src","backgroundColor","backgroundPosition","content","width","height","heading","align","alignY","opacity","container"]);return t.createElement(e.Inline,Object.assign({variant:"layout.container",m:"0"},y,{as:"figure"}),t.createElement(e.Inline,Object.assign({align:b,alignY:w,sx:{position:"relative",backgroundImage:'url("'+i+'")',backgroundColor:c,backgroundSize:"cover",backgroundPosition:l,width:u,height:m,"::before":{position:"absolute",right:0,left:0,top:0,bottom:0,minHeight:"inherit","background-color":"inherit","z-index":1,content:'""',opacity:O},"::after":{display:"block",minHeight:"inherit","font-size":0,content:"none"}}},j),t.createElement(e.Box,{sx:{zIndex:1}},t.createElement(a,Object.assign({content:d,textAlign:b,p:"1",variant:"layout.heading"},f)))))},heading:a,html:e.CustomHtml,paragraph:e.Paragraph,image:function(n){var a=n.align,o=n.width,c=n.height,g=n.sx,l=r(n,["align","width","height","sx","ref"]);return t.createElement(e.Inline,{align:a},t.createElement(e.Image,Object.assign({},l,{sx:i({width:o,height:c},g)})))},quote:e.Quote,video:function(n){var a=n.align,o=n.width,c=n.height,g=n.sx,l=r(n,["align","width","height","sx","ref"]);return t.createElement(e.Inline,{align:a},t.createElement(e.Video,Object.assign({},l,{sx:i({width:o,height:c},g)})))},embed:function(n){var i=n.width,a=void 0===i?"100%":i,o=n.height,c=void 0===o?"auto":o,g=r(n,["align","width","height","ref"]);return t.createElement(e.Container,{sx:{width:a,height:c}},t.createElement(e.Embed,Object.assign({},g)))},"link-button":function(n){var i=n.align,a=r(n,["align"]);return t.createElement(e.Inline,{align:i},t.createElement(e.LinkButton,Object.assign({},a)))},separator:e.Separator};function c(e){var n=o[e.type];return n?t.createElement(n,Object.assign({},e.settings)):null}exports.BasicWidget=n.withContainer(c,{layout:{container:{display:"flex"},quote:{variant:"text.fontSize4",paddingTop:2,paddingBottom:2,paddingLeft:4,paddingRight:4,marginBottom:4,margin:0,p:{marginBottom:3}},footer:{color:"softColor"}}});
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@front10/base-elements"),t=require("react"),n=require("@front10/container-elements");function i(){return(i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var n,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)t.indexOf(n=r[i])>=0||(a[n]=e[n]);return a}var r=function(n){var i=n.level,r=void 0===i?2:i,o=n.content,c=void 0===o?"":o,l=a(n,["level","content"]),g="h2",s="fontSize2";return 0===r||"0"===r?g="span":r>=0&&r<7&&(g="h"+r,s="fontSize"+r),t.createElement(e.Heading,Object.assign({variant:s,color:"coverHeading"},l,{as:g}),c)},o={cover:function(n){var i=n.src,o=n.backgroundColor,c=void 0===o?"white":o,l=n.backgroundPosition,g=void 0===l?"center":l,s=n.content,d=void 0===s?"":s,h=n.width,u=void 0===h?"100%":h,v=n.height,m=void 0===v?"400px":v,f=n.heading,p=n.align,b=void 0===p?"center":p,x=n.alignY,E=void 0===x?"center":x,w=n.opacity,y=void 0===w?.5:w,O=n.container,j=a(n,["src","backgroundColor","backgroundPosition","content","width","height","heading","align","alignY","opacity","container"]);return t.createElement(e.Inline,Object.assign({variant:"layout.container",m:"0"},O,{as:"figure"}),t.createElement(e.Inline,Object.assign({align:b,alignY:E,sx:{position:"relative",backgroundImage:'url("'+i+'")',backgroundColor:c,backgroundSize:"cover",backgroundPosition:g,width:u,height:m,"::before":{position:"absolute",right:0,left:0,top:0,bottom:0,minHeight:"inherit","background-color":"inherit","z-index":1,content:'""',opacity:y},"::after":{display:"block",minHeight:"inherit","font-size":0,content:"none"}}},j),t.createElement(e.Box,{sx:{zIndex:1}},t.createElement(r,Object.assign({content:d,textAlign:b,p:"1",variant:"layout.heading"},f)))))},heading:r,html:e.CustomHtml,paragraph:e.Paragraph,image:function(n){var r=n.align,o=n.width,c=n.height,l=n.sx,g=a(n,["align","width","height","sx","ref"]);return t.createElement(e.Inline,{align:r},t.createElement(e.Image,Object.assign({},g,{sx:i({width:o,height:c},l)})))},quote:e.Quote,video:function(n){var r=n.align,o=n.width,c=n.height,l=n.sx,g=a(n,["align","width","height","sx","ref"]);return t.createElement(e.Inline,{align:r},t.createElement(e.Video,Object.assign({},g,{sx:i({width:o,height:c},l)})))},embed:function(n){var i=n.width,r=void 0===i?"100%":i,o=n.height,c=void 0===o?"auto":o,l=a(n,["align","width","height","ref"]);return t.createElement(e.Container,{sx:{width:r,height:c}},t.createElement(e.Embed,Object.assign({},l)))},"link-button":function(n){var i=n.align,r=a(n,["align"]);return t.createElement(e.Inline,{align:i},t.createElement(e.LinkButton,Object.assign({},r)))},separator:e.Separator};function c(n){var i=o[n.type];return i?t.createElement(e.Box,{ml:"auto",mr:"auto",variant:"layout.container"},t.createElement(i,Object.assign({},n.settings))):null}exports.BasicWidget=n.withContainer(c,{layout:{container:{display:"flex"},quote:{variant:"text.fontSize4",paddingTop:2,paddingBottom:2,paddingLeft:4,paddingRight:4,marginBottom:4,margin:0,p:{marginBottom:3}},footer:{color:"softColor"}}});
//# sourceMappingURL=basic-widget.cjs.production.min.js.map

@@ -209,3 +209,7 @@ import { Heading as Heading$1, Inline, Box, Image as Image$1, Video as Video$1, LinkButton as LinkButton$1, Container, Embed as Embed$1, CustomHtml, Paragraph, Quote, Separator } from '@front10/base-elements';

if (Component) {
return createElement(Component, Object.assign({}, settings));
return createElement(Box, {
ml: "auto",
mr: "auto",
variant: "layout.container"
}, createElement(Component, Object.assign({}, settings)));
}

@@ -212,0 +216,0 @@

import { Quote } from "@front10/base-elements";
import * as React from "react";
declare const components: {
readonly cover: ({ src, backgroundColor, content, width, height, heading, align, alignY, ...props }: {
readonly cover: ({ src, backgroundColor, backgroundPosition, content, width, height, heading, align, alignY, opacity, container, ...props }: {
content?: string | undefined;

@@ -9,4 +9,7 @@ width?: string | undefined;

heading: import("./Heading").HeadingProps;
align: AlignSetting;
align: "left" | "right" | "center";
container: import("@front10/base-elements").InlineProps;
alignY: "bottom" | "top" | "center";
backgroundPosition: "bottom" | "top" | "center";
opacity?: number | undefined;
} & React.ClassAttributes<HTMLImageElement> & React.ImgHTMLAttributes<HTMLImageElement> & import("@theme-ui/components").BoxProps) => JSX.Element;

@@ -13,0 +16,0 @@ readonly heading: ({ level, content, ...props }: import("./Heading").HeadingProps) => JSX.Element;

{
"version": "0.5.0",
"version": "0.6.0",
"license": "",

@@ -40,7 +40,7 @@ "main": "dist/index.js",

"dependencies": {
"@front10/base-elements": "^0.5.0",
"@front10/container-elements": "^0.5.0",
"@front10/utils": "^0.5.0"
"@front10/base-elements": "^0.6.0",
"@front10/container-elements": "^0.6.0",
"@front10/utils": "^0.6.0"
},
"gitHead": "2aa40bd2b7bd1fe60a6d2b3d4b14b42a9b292c15"
"gitHead": "d7e07ed686e37945a70c8b5f0805a5d5671e6764"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc