Socket
Socket
Sign inDemoInstall

@lrnwebcomponents/parallax-image

Package Overview
Dependencies
8
Maintainers
4
Versions
113
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.8 to 4.0.11

16

package.json

@@ -20,3 +20,3 @@ {

},
"version": "4.0.8",
"version": "4.0.11",
"description": "Automated conversion of parallax-image/",

@@ -46,14 +46,14 @@ "repository": {

"dependencies": {
"@lrnwebcomponents/schema-behaviors": "^4.0.8",
"lit": "^2.1.4"
"@lrnwebcomponents/schema-behaviors": "^4.0.11",
"lit": "^2.2.0"
},
"devDependencies": {
"@lrnwebcomponents/deduping-fix": "^4.0.0",
"@lrnwebcomponents/storybook-utilities": "^4.0.8",
"@open-wc/testing": "3.0.3",
"@lrnwebcomponents/storybook-utilities": "^4.0.11",
"@open-wc/testing": "3.0.4",
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page",
"@polymer/iron-demo-helpers": "3.1.0",
"@web/dev-server": "0.1.28",
"@web/dev-server": "0.1.30",
"@webcomponents/webcomponentsjs": "2.6.0",
"concurrently": "5.3.0",
"concurrently": "7.0.0",
"gulp-babel": "8.0.0",

@@ -72,3 +72,3 @@ "lodash": "^4.17.21",

],
"gitHead": "546e19dc98d156fe786ad6410a8229e3a4167deb"
"gitHead": "c1e94ecfc66f79da031bf277e9afa654e23143b7"
}

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lit"),require("@lrnwebcomponents/schema-behaviors/schema-behaviors.js")):"function"==typeof define&&define.amd?define(["exports","lit","@lrnwebcomponents/schema-behaviors/schema-behaviors.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ParallaxImage={},e.lit,e.schemaBehaviors_js)}(this,(function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function s(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var a=c(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return s(this,n)}}function f(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=f(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},p.apply(this,arguments)}function d(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var b,y,g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(f,e);var n,r,i,s=u(f);function f(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(e=s.call(this)).imageBg="",e}return n=f,i=[{key:"styles",get:function(){return[t.css(y||(y=d(['\n :host {\n display: block;\n --parallax-image-background: "";\n --parallax-title-background: rgba(0, 0, 0, 0.3);\n --parallax-title-font: #fff;\n }\n\n .parallax_container {\n height: 400px;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n }\n\n .parallax {\n background-image: var(--parallax-image-background);\n background-attachment: fixed;\n background-position: top center;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n height: 100%;\n justify-content: center;\n }\n\n #bgParallax {\n display: flex;\n align-items: center;\n }\n\n .title {\n background: var(--parallax-title-background);\n display: block;\n padding: 20px 15px;\n text-align: center;\n width: 40%;\n color: var(--parallax-title-font);\n font-size: 32px;\n position: absolute;\n margin-top: 120px;\n }\n\n @media screen and (max-width: 900px) {\n .title {\n font-size: 16px;\n }\n }\n '])))]}},{key:"tag",get:function(){return"parallax-image"}},{key:"properties",get:function(){return a(a({},p(c(f),"properties",this)),{},{imageBg:{type:String,attribute:"image-bg",reflect:!0},describedBy:{type:String,attribute:"described-by"}})}},{key:"haxProperties",get:function(){return{canScale:!0,canPosition:!0,canEditSource:!0,gizmo:{title:"Parallax image",description:"Image scroll by",icon:"av:play-circle-filled",color:"grey",groups:["Image","Media"],handles:[{type:"image",url:"source",ariaDescribedby:"describedBy"}],meta:{author:"ELMS:LN"}},settings:{configure:[{property:"imageBg",title:"Image",description:"image to be involved in the background",inputMethod:"haxupload"},{slot:"parallax_heading",title:"Heading area",description:"Heading text area",inputMethod:"textarea"}],advanced:[{property:"describedBy",title:"aria-describedby",description:"Space-separated list of IDs for elements that describe the image.",inputMethod:"textfield"}]}}}}],(r=[{key:"render",value:function(){return t.html(b||(b=d(['\n <div\n class="parallax_container"\n aria-describedby="','"\n >\n <div id="bgParallax" class="parallax">\n <div class="title" id="titleParallax">\n <slot name="parallax_heading"></slot>\n </div>\n </div>\n </div>\n '])),this.describedBy||"")}},{key:"updated",value:function(e){var t=this;e.forEach((function(e,n){"imageBg"==n&&t.style.setProperty("--parallax-image-background","url(".concat(t.imageBg,")"))}))}},{key:"scrollBy",value:function(e){var t=this.shadowRoot.querySelector("#bgParallax"),n=this.shadowRoot.querySelector("#titleParallax"),r=-.2*window.scrollY,a=1.4*r;t.style.backgroundPosition="center ".concat(r,"px"),n.style.transform="translate3D(0, ".concat(a,"px, 0)")}},{key:"connectedCallback",value:function(){var e=this;p(c(f.prototype),"connectedCallback",this).call(this),setTimeout((function(){window.addEventListener("scroll",e.scrollBy.bind(e))}),0)}},{key:"disconnectedCallback",value:function(){window.removeEventListener("scroll",this.scrollBy.bind(this)),p(c(f.prototype),"disconnectedCallback",this).call(this)}}])&&o(n.prototype,r),i&&o(n,i),f}(n.SchemaBehaviors(t.LitElement));window.customElements.define(g.tag,g),e.ParallaxImage=g,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lit"),require("@lrnwebcomponents/schema-behaviors/schema-behaviors.js")):"function"==typeof define&&define.amd?define(["exports","lit","@lrnwebcomponents/schema-behaviors/schema-behaviors.js"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ParallaxImage={},e.lit,e.schemaBehaviors_js)}(this,(function(e,t,n){"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function s(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=c(e);if(t){var a=c(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return s(this,n)}}function p(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=p(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(arguments.length<3?e:n):a.value}},f.apply(this,arguments)}function d(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var b,y,g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(p,e);var n,r,i,s=u(p);function p(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(e=s.call(this)).imageBg="",e}return n=p,i=[{key:"styles",get:function(){return[t.css(y||(y=d(['\n :host {\n display: block;\n --parallax-image-background: "";\n --parallax-title-background: rgba(0, 0, 0, 0.3);\n --parallax-title-font: #fff;\n }\n\n .parallax_container {\n height: 400px;\n width: 100%;\n overflow: hidden;\n display: flex;\n justify-content: center;\n }\n\n .parallax {\n background-image: var(--parallax-image-background);\n background-attachment: fixed;\n background-position: top center;\n background-repeat: no-repeat;\n background-size: cover;\n width: 100%;\n height: 100%;\n justify-content: center;\n }\n\n #bgParallax {\n display: flex;\n align-items: center;\n }\n\n .title {\n background: var(--parallax-title-background);\n display: block;\n padding: 20px 15px;\n text-align: center;\n width: 40%;\n color: var(--parallax-title-font);\n font-size: 32px;\n position: absolute;\n margin-top: 120px;\n }\n\n @media screen and (max-width: 900px) {\n .title {\n font-size: 16px;\n }\n }\n '])))]}},{key:"tag",get:function(){return"parallax-image"}},{key:"properties",get:function(){return a(a({},f(c(p),"properties",this)),{},{imageBg:{type:String,attribute:"image-bg",reflect:!0},describedBy:{type:String,attribute:"described-by"}})}},{key:"haxProperties",get:function(){return{canScale:!0,canPosition:!0,canEditSource:!0,gizmo:{title:"Parallax image",description:"Image scroll by",icon:"av:play-circle-filled",color:"grey",groups:["Image","Media"],handles:[{type:"image",url:"source",ariaDescribedby:"describedBy"}],meta:{author:"ELMS:LN"}},settings:{configure:[{property:"imageBg",title:"Image",description:"image to be involved in the background",inputMethod:"haxupload"},{slot:"parallax_heading",title:"Heading area",description:"Heading text area",inputMethod:"textarea"}],advanced:[{property:"describedBy",title:"aria-describedby",description:"Space-separated list of IDs for elements that describe the image.",inputMethod:"textfield"}]}}}}],(r=[{key:"render",value:function(){return t.html(b||(b=d(['\n <div\n class="parallax_container"\n aria-describedby="','"\n >\n <div id="bgParallax" class="parallax">\n <div class="title" id="titleParallax">\n <slot name="parallax_heading"></slot>\n </div>\n </div>\n </div>\n '])),this.describedBy||"")}},{key:"updated",value:function(e){var t=this;e.forEach((function(e,n){"imageBg"==n&&t.style.setProperty("--parallax-image-background","url(".concat(t.imageBg,")"))}))}},{key:"scrollBy",value:function(e){var t=this.shadowRoot.querySelector("#bgParallax"),n=this.shadowRoot.querySelector("#titleParallax"),r=-.2*window.scrollY,a=1.4*r;t.style.backgroundPosition="center ".concat(r,"px"),n.style.transform="translate3D(0, ".concat(a,"px, 0)")}},{key:"connectedCallback",value:function(){var e=this;f(c(p.prototype),"connectedCallback",this).call(this),setTimeout((function(){window.addEventListener("scroll",e.scrollBy.bind(e))}),0)}},{key:"disconnectedCallback",value:function(){window.removeEventListener("scroll",this.scrollBy.bind(this)),f(c(p.prototype),"disconnectedCallback",this).call(this)}}])&&o(n.prototype,r),i&&o(n,i),Object.defineProperty(n,"prototype",{writable:!1}),p}(n.SchemaBehaviors(t.LitElement));window.customElements.define(g.tag,g),e.ParallaxImage=g,Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -43,2 +43,2 @@ {

"valueSets": []
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc