@lrnwebcomponents/parallax-image
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -20,3 +20,3 @@ { | ||
}, | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "Automated conversion of parallax-image/", | ||
@@ -47,8 +47,8 @@ "repository": { | ||
"dependencies": { | ||
"@lrnwebcomponents/schema-behaviors": "^4.0.0", | ||
"lit": "2.0.0-rc.2" | ||
"@lrnwebcomponents/schema-behaviors": "^4.0.1", | ||
"lit": "2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@lrnwebcomponents/deduping-fix": "^4.0.0", | ||
"@lrnwebcomponents/storybook-utilities": "^4.0.0", | ||
"@lrnwebcomponents/storybook-utilities": "^4.0.1", | ||
"@open-wc/testing": "2.5.33", | ||
@@ -61,3 +61,3 @@ "@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
"@web/test-runner-puppeteer": "0.10.0", | ||
"@webcomponents/webcomponentsjs": "2.5.0", | ||
"@webcomponents/webcomponentsjs": "2.6.0", | ||
"concurrently": "5.3.0", | ||
@@ -78,3 +78,3 @@ "gulp-babel": "8.0.0", | ||
], | ||
"gitHead": "e877f54ece91fb0b2f7aba62f9f9fd15060600f2" | ||
"gitHead": "4056b357dd00c362ba23128a37a60153101b15b9" | ||
} |
@@ -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)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function p(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var d,b,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)}(g,e);var n,r,i,s=u(g);function g(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(e=s.call(this)).imageBg="",e}return n=g,i=[{key:"styles",get:function(){return[t.css(b||(b=p(['\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(g),"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(d||(d=p(['\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(g.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(g.prototype),"disconnectedCallback",this).call(this)}}])&&o(n.prototype,r),i&&o(n,i),g}(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)})(e)}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(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,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=c(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}function p(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var d,b,y=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)}(y,e);var n,r,i,s=u(y);function y(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),(e=s.call(this)).imageBg="",e}return n=y,i=[{key:"styles",get:function(){return[t.css(b||(b=p(['\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(y),"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(d||(d=p(['\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(y.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(y.prototype),"disconnectedCallback",this).call(this)}}])&&o(n.prototype,r),i&&o(n,i),y}(n.SchemaBehaviors(t.LitElement));window.customElements.define(y.tag,y),e.ParallaxImage=y,Object.defineProperty(e,"__esModule",{value:!0})})); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
61552
+ Addedlit@2.0.0(transitive)
- Removedlit@2.0.0-rc.2(transitive)
Updatedlit@2.0.0