@lrnwebcomponents/a11y-details
Advanced tools
Comparing version 2.8.0 to 3.0.0
@@ -195,3 +195,3 @@ /** | ||
canPosition: true, | ||
canEditSource: false, | ||
canEditSource: true, | ||
gizmo: { | ||
@@ -215,3 +215,2 @@ title: "Accessible Details Button", | ||
settings: { | ||
quick: [], | ||
configure: [ | ||
@@ -218,0 +217,0 @@ { |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lit-element")):"function"==typeof define&&define.amd?define(["exports","lit-element"],t):t((e=e||self).A11yDetails={},e.litElement)}(this,function(e,t){"use strict";function n(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 r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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?i(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e){return(s=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 d(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 Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function c(e,t,n){return(c="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=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.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)}}))}function y(){var e=p(['\n :host,\ndetails {\n display: inline-flex;\n overflow: visible;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nsummary {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: var(--a11y-details-summary-fontSize, 0.8em);\n color: var(--a11y-details-summary-color, #000);\n background-color: var(--a11y-details-summary-backgroundColor, #fff);\n border-color: var(--a11y-details-summary-borderColor, #000);\n border-width: var(--a11y-details-summary-borderWidth, 1px);\n border-style: var(--a11y-details-summary-borderStyle, solid);\n border-radius: var(--a11y-details-summary-borderRadius, 3px);\n padding: var(--a11y-details-summary-padding, 0.5em);\n}\n\nsummary:focus {\n outline: var(--a11y-details-summary-focus-outline,1px solid #006688);\n color: var(--a11y-details-summary-focus-color, var(--a11y-details-summary-color,#000));\n background-color: var(--a11y-details-summary-focus-backgroundColor, var(--a11y-details-summary-backgroundColor,#fff));\n border-color: var(--a11y-details-summary-focus-borderColor, var(--a11y-details-borderColor,#000));\n border-width: var(--a11y-details-summary-focus-borderWidth, var(--a11y-details-summary-borderWidth,1px));\n border-style: var(--a11y-details-summary-focus-borderStyle, var(--a11y-details-summary-borderStyle, dotted));\n border-radius: var(--a11y-details-summary-focus-borderRadius, var(--a11y-details-summary-borderRadius, 3px));\n}\n\n#details-inner {\n position: absolute;\n display: none;\n max-height: 0px;\n transition: all 0.7s ease-in-out 0.2s;\n overflow-y: auto;\n padding: 0;\n font-size: var(--a11y-details-fontSize, 0.8em);\n color: var(--a11y-details-color,#000);\n background-color: var(--a11y-details-backgroundColor, rgba(255,255,255,0.8));\n border-color: var(--a11y-details-borderColor,#000);\n border-width: var(--a11y-details-borderWidth,1px);\n border-style: var(--a11y-details-borderStyle, solid);\n border-radius: var(--a11y-details-borderRadius, 3px);\n}\n\n::slotted(*:not[slot=summary]) {\n display: none;\n}\n\n.close-text,\ndetails[open] .open-text,\ndetails:not([open]) .has-open-text,\ndetails[open] .has-close-text {\n display: none;\n}\n\ndetails[open] .close-text {\n display: inline;\n}\n\n::slotted([slot="details"]) {\n display: block;\n height: auto;\n max-height: 0;\n overflow: hidden;\n transition: all 0.7s ease-in-out 0.2s;\n}\n\ndetails[open] ::slotted([slot="details"]) {\n max-height: var(--a11y-details-maxHeight,400px);\n transition: all 0.7s ease-in-out 0.2s;\n}\n\ndetails[open] #details-inner {\n z-index: 9999999999;\n display: block;\n left: 0;\n padding: var(--a11y-details-padding, 0.5em);\n max-height: var(--a11y-details-maxHeight,400px);\n padding: var(--a11y-details-padding, 0.5em);\n transition: all 0.7s ease-in-out 0.2s;\n}\n ']);return y=function(){return e},e}function f(){var e=p(['\n \n <details id="details">\n <summary \n @click="','" \n @keyup="','" \n tabindex="0"\n role="button">\n <span class="open-text">','</span>\n <span class="close-text">','</span>\n <slot name="summary" class="','"></slot>\n </summary>\n <div id="details-inner"><slot name="details"></slot></div>\n</details>\n<slot hidden></slot>']);return f=function(){return e},e}var h=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)}(o,t.LitElement);var n=u(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=n.call(this)).closeText="",e.openText="",e.tag=o.tag,e}return r(o,[{key:"render",value:function(){return t.html(f(),this._handleClick,this._handleKeyup,this.openText,this.closeText,this.summaryClasses)}},{key:"tag",value:function(){return"a11y-details"}}],[{key:"styles",get:function(){return[t.css(y())]}},{key:"haxProperties",get:function(){return{canScale:!0,canPosition:!0,canEditSource:!1,gizmo:{title:"Accessible Details Button",description:"Accessible progressive disclosure with detail and summary",icon:"icons:arrow-drop-down",color:"grey",groups:["11"],handles:[{type:""}],meta:{author:"nikkimk",owner:"The Pennsylvania State University"}},settings:{quick:[],configure:[{slot:"summary",title:"Button",description:'Summary of the content that if concealed, eg. "info", "medatadata", etc. ',inputMethod:"code-editor"},{slot:"details",title:"Decription",description:"Detailed description that can be hidden or shown",inputMethod:"code-editor"},{slot:"",title:"Decription Button",description:'Default for button that shows/hides description text, eg. "info", "medatadata", etc. ',inputMethod:"code-editor"}],advanced:[{property:"openText",title:"Optional summary text when details are open",inputMethod:"textfield",required:!1},{property:"closeText",title:"Optional summary text when details are closed",inputMethod:"textfield",required:!1}]},demoSchema:[{tag:"a11y-details",properties:{openText:"Show Aenean",closeText:"Hide Aenean"},content:'<div slot="summary">Show Aenean</div>\n<div slot="details">Aenean eget nisl volutpat, molestie purus eget, bibendum metus. Pellentesque magna velit, tincidunt quis pharetra id, gravida placerat erat. Maecenas id dui pretium risus pulvinar feugiat vel nec leo. Praesent non congue tellus. Suspendisse ac tincidunt purus. Donec eu dui a metus vehicula bibendum sed nec tortor. Nunc convallis justo sed nibh consectetur, at pharetra nulla accumsan.\n</div>'}]}}},{key:"properties",get:function(){return a(a({},c(s(o),"properties",this)),{},{closeText:{type:String,attribute:"close-text",reflect:!0},openText:{type:String,attribute:"open-text",reflect:!0}})}}]),r(o,[{key:"disconnectedCallback",value:function(){this.observer&&this.observer.disconnect&&this.observer.disconnect(),c(s(o.prototype),"disconnectedCallback",this).call(this)}},{key:"firstUpdated",value:function(){c(s(o.prototype),"firstUpdated",this)&&c(s(o.prototype),"firstUpdated",this).call(this),this._updateElement(),this.observer.observe(this,{childList:!0,subtree:!0})}},{key:"_handleClick",value:function(e){this.details&&void 0===this.details.open&&(this.toggleOpen(),e.preventDefault(),e.stopPropagation())}},{key:"_handleKeyup",value:function(e){(this.details&&void 0===this.details.open&&13==e.keyCode||32==e.keyCode)&&(this.toggleOpen(),e.preventDefault(),e.stopPropagation())}},{key:"toggleOpen",value:function(){this.details.hasAttribute("open")?(this.details.removeAttribute("open"),this.details.open&&(this.details.open=!1)):(this.details.setAttribute("open",""),this.details.open&&(this.details.open=!0))}},{key:"_updateElement",value:function(){var e=this.querySelector("* > details"),t=e?e.querySelector("* > summary"):void 0;if(t&&this._copyToSlot("summary",t.cloneNode(!0)),e){var n=e.cloneNode(!0),r=n.querySelectorAll("* > summary");Object.keys(r||{}).forEach(function(e){return r[e].remove()}),this._copyToSlot("details",n,"div")}}},{key:"_watchChildren",value:function(e){this._hasMutations(e)?(this._updateElement(),this.detailsObserver.observe(this.querySelector("* > details"),{childList:!0,subtree:!0,characterData:!0})):this._hasMutations(e,"removedNodes")&&!this.querySelector("* > details")&&this.detailsObserver.disconnect&&this.detailsObserver.disconnect()}},{key:"_hasMutations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"addedNodes";return Object.keys(e||{}).filter(function(n){var r=e[n][t];return Object.keys(r||{}).filter(function(e){return"DETAILS"===r[e].tagName}).length>0}).length>0}},{key:"_copyToSlot",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"span",r=Object.keys(t.childNodes||{}).filter(function(e){var n=t.childNodes[e];return!!n.tagName||n.textContent.trim().length>0}).map(function(e){return t.childNodes[parseInt(e)]});1===r.length&&r[0].tagName&&(n=(t=r[0]).tagName),this._getSlot(e,n).innerHTML=t.innerHTML,t.remove()}},{key:"_getSlot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span",n=this.querySelector("[slot=".concat(e,"]"));return n&&n.tagName!==t&&n.remove(),n||((n=document.createElement(t)).slot=e,this.append(n)),n}},{key:"details",get:function(){return this&&this.shadowRoot&&this.shadowRoot.querySelector("details")?this.shadowRoot.querySelector("details"):void 0}},{key:"summaryClasses",get:function(){return[this.openText&&this.openText.trim&&""!==this.openText.trim()?"has-open-text":"",this.closeText&&this.closeText.trim&&""!==this.closeText.trim()?"has-close-text":""].join(" ")}},{key:"observer",get:function(){var e=this;return new MutationObserver(function(t){return e._watchChildren(t)})}},{key:"detailsObserver",get:function(){var e=this;return new MutationObserver(function(){return e._updateElement()})}}]),o}();customElements.define("a11y-details",h),e.A11yDetails=h,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("lit-element")):"function"==typeof define&&define.amd?define(["exports","lit-element"],t):t((e=e||self).A11yDetails={},e.litElement)}(this,function(e,t){"use strict";function n(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 r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(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?i(Object(n),!0).forEach(function(t){o(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e){return(s=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 d(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 Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}();return function(){var n,r=s(e);if(t){var o=s(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function c(e,t,n){return(c="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=s(e)););return e}(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.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)}}))}function y(){var e=p(['\n :host,\ndetails {\n display: inline-flex;\n overflow: visible;\n}\n\n:host([hidden]) {\n display: none;\n}\n\nsummary {\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: var(--a11y-details-summary-fontSize, 0.8em);\n color: var(--a11y-details-summary-color, #000);\n background-color: var(--a11y-details-summary-backgroundColor, #fff);\n border-color: var(--a11y-details-summary-borderColor, #000);\n border-width: var(--a11y-details-summary-borderWidth, 1px);\n border-style: var(--a11y-details-summary-borderStyle, solid);\n border-radius: var(--a11y-details-summary-borderRadius, 3px);\n padding: var(--a11y-details-summary-padding, 0.5em);\n}\n\nsummary:focus {\n outline: var(--a11y-details-summary-focus-outline,1px solid #006688);\n color: var(--a11y-details-summary-focus-color, var(--a11y-details-summary-color,#000));\n background-color: var(--a11y-details-summary-focus-backgroundColor, var(--a11y-details-summary-backgroundColor,#fff));\n border-color: var(--a11y-details-summary-focus-borderColor, var(--a11y-details-borderColor,#000));\n border-width: var(--a11y-details-summary-focus-borderWidth, var(--a11y-details-summary-borderWidth,1px));\n border-style: var(--a11y-details-summary-focus-borderStyle, var(--a11y-details-summary-borderStyle, dotted));\n border-radius: var(--a11y-details-summary-focus-borderRadius, var(--a11y-details-summary-borderRadius, 3px));\n}\n\n#details-inner {\n position: absolute;\n display: none;\n max-height: 0px;\n transition: all 0.7s ease-in-out 0.2s;\n overflow-y: auto;\n padding: 0;\n font-size: var(--a11y-details-fontSize, 0.8em);\n color: var(--a11y-details-color,#000);\n background-color: var(--a11y-details-backgroundColor, rgba(255,255,255,0.8));\n border-color: var(--a11y-details-borderColor,#000);\n border-width: var(--a11y-details-borderWidth,1px);\n border-style: var(--a11y-details-borderStyle, solid);\n border-radius: var(--a11y-details-borderRadius, 3px);\n}\n\n::slotted(*:not[slot=summary]) {\n display: none;\n}\n\n.close-text,\ndetails[open] .open-text,\ndetails:not([open]) .has-open-text,\ndetails[open] .has-close-text {\n display: none;\n}\n\ndetails[open] .close-text {\n display: inline;\n}\n\n::slotted([slot="details"]) {\n display: block;\n height: auto;\n max-height: 0;\n overflow: hidden;\n transition: all 0.7s ease-in-out 0.2s;\n}\n\ndetails[open] ::slotted([slot="details"]) {\n max-height: var(--a11y-details-maxHeight,400px);\n transition: all 0.7s ease-in-out 0.2s;\n}\n\ndetails[open] #details-inner {\n z-index: 9999999999;\n display: block;\n left: 0;\n padding: var(--a11y-details-padding, 0.5em);\n max-height: var(--a11y-details-maxHeight,400px);\n padding: var(--a11y-details-padding, 0.5em);\n transition: all 0.7s ease-in-out 0.2s;\n}\n ']);return y=function(){return e},e}function f(){var e=p(['\n \n <details id="details">\n <summary \n @click="','" \n @keyup="','" \n tabindex="0"\n role="button">\n <span class="open-text">','</span>\n <span class="close-text">','</span>\n <slot name="summary" class="','"></slot>\n </summary>\n <div id="details-inner"><slot name="details"></slot></div>\n</details>\n<slot hidden></slot>']);return f=function(){return e},e}var h=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)}(o,t.LitElement);var n=u(o);function o(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),(e=n.call(this)).closeText="",e.openText="",e.tag=o.tag,e}return r(o,[{key:"render",value:function(){return t.html(f(),this._handleClick,this._handleKeyup,this.openText,this.closeText,this.summaryClasses)}},{key:"tag",value:function(){return"a11y-details"}}],[{key:"styles",get:function(){return[t.css(y())]}},{key:"haxProperties",get:function(){return{canScale:!0,canPosition:!0,canEditSource:!0,gizmo:{title:"Accessible Details Button",description:"Accessible progressive disclosure with detail and summary",icon:"icons:arrow-drop-down",color:"grey",groups:["11"],handles:[{type:""}],meta:{author:"nikkimk",owner:"The Pennsylvania State University"}},settings:{configure:[{slot:"summary",title:"Button",description:'Summary of the content that if concealed, eg. "info", "medatadata", etc. ',inputMethod:"code-editor"},{slot:"details",title:"Decription",description:"Detailed description that can be hidden or shown",inputMethod:"code-editor"},{slot:"",title:"Decription Button",description:'Default for button that shows/hides description text, eg. "info", "medatadata", etc. ',inputMethod:"code-editor"}],advanced:[{property:"openText",title:"Optional summary text when details are open",inputMethod:"textfield",required:!1},{property:"closeText",title:"Optional summary text when details are closed",inputMethod:"textfield",required:!1}]},demoSchema:[{tag:"a11y-details",properties:{openText:"Show Aenean",closeText:"Hide Aenean"},content:'<div slot="summary">Show Aenean</div>\n<div slot="details">Aenean eget nisl volutpat, molestie purus eget, bibendum metus. Pellentesque magna velit, tincidunt quis pharetra id, gravida placerat erat. Maecenas id dui pretium risus pulvinar feugiat vel nec leo. Praesent non congue tellus. Suspendisse ac tincidunt purus. Donec eu dui a metus vehicula bibendum sed nec tortor. Nunc convallis justo sed nibh consectetur, at pharetra nulla accumsan.\n</div>'}]}}},{key:"properties",get:function(){return a(a({},c(s(o),"properties",this)),{},{closeText:{type:String,attribute:"close-text",reflect:!0},openText:{type:String,attribute:"open-text",reflect:!0}})}}]),r(o,[{key:"disconnectedCallback",value:function(){this.observer&&this.observer.disconnect&&this.observer.disconnect(),c(s(o.prototype),"disconnectedCallback",this).call(this)}},{key:"firstUpdated",value:function(){c(s(o.prototype),"firstUpdated",this)&&c(s(o.prototype),"firstUpdated",this).call(this),this._updateElement(),this.observer.observe(this,{childList:!0,subtree:!0})}},{key:"_handleClick",value:function(e){this.details&&void 0===this.details.open&&(this.toggleOpen(),e.preventDefault(),e.stopPropagation())}},{key:"_handleKeyup",value:function(e){(this.details&&void 0===this.details.open&&13==e.keyCode||32==e.keyCode)&&(this.toggleOpen(),e.preventDefault(),e.stopPropagation())}},{key:"toggleOpen",value:function(){this.details.hasAttribute("open")?(this.details.removeAttribute("open"),this.details.open&&(this.details.open=!1)):(this.details.setAttribute("open",""),this.details.open&&(this.details.open=!0))}},{key:"_updateElement",value:function(){var e=this.querySelector("* > details"),t=e?e.querySelector("* > summary"):void 0;if(t&&this._copyToSlot("summary",t.cloneNode(!0)),e){var n=e.cloneNode(!0),r=n.querySelectorAll("* > summary");Object.keys(r||{}).forEach(function(e){return r[e].remove()}),this._copyToSlot("details",n,"div")}}},{key:"_watchChildren",value:function(e){this._hasMutations(e)?(this._updateElement(),this.detailsObserver.observe(this.querySelector("* > details"),{childList:!0,subtree:!0,characterData:!0})):this._hasMutations(e,"removedNodes")&&!this.querySelector("* > details")&&this.detailsObserver.disconnect&&this.detailsObserver.disconnect()}},{key:"_hasMutations",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"addedNodes";return Object.keys(e||{}).filter(function(n){var r=e[n][t];return Object.keys(r||{}).filter(function(e){return"DETAILS"===r[e].tagName}).length>0}).length>0}},{key:"_copyToSlot",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"span",r=Object.keys(t.childNodes||{}).filter(function(e){var n=t.childNodes[e];return!!n.tagName||n.textContent.trim().length>0}).map(function(e){return t.childNodes[parseInt(e)]});1===r.length&&r[0].tagName&&(n=(t=r[0]).tagName),this._getSlot(e,n).innerHTML=t.innerHTML,t.remove()}},{key:"_getSlot",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span",n=this.querySelector("[slot=".concat(e,"]"));return n&&n.tagName!==t&&n.remove(),n||((n=document.createElement(t)).slot=e,this.append(n)),n}},{key:"details",get:function(){return this&&this.shadowRoot&&this.shadowRoot.querySelector("details")?this.shadowRoot.querySelector("details"):void 0}},{key:"summaryClasses",get:function(){return[this.openText&&this.openText.trim&&""!==this.openText.trim()?"has-open-text":"",this.closeText&&this.closeText.trim&&""!==this.closeText.trim()?"has-close-text":""].join(" ")}},{key:"observer",get:function(){var e=this;return new MutationObserver(function(t){return e._watchChildren(t)})}},{key:"detailsObserver",get:function(){var e=this;return new MutationObserver(function(){return e._updateElement()})}}]),o}();customElements.define("a11y-details",h),e.A11yDetails=h,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -16,7 +16,7 @@ { | ||
"start": { | ||
"line": 304, | ||
"line": 303, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 308, | ||
"line": 307, | ||
"column": 3 | ||
@@ -38,7 +38,7 @@ } | ||
"start": { | ||
"line": 315, | ||
"line": 314, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 324, | ||
"line": 323, | ||
"column": 3 | ||
@@ -60,7 +60,7 @@ } | ||
"start": { | ||
"line": 331, | ||
"line": 330, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 334, | ||
"line": 333, | ||
"column": 3 | ||
@@ -82,7 +82,7 @@ } | ||
"start": { | ||
"line": 341, | ||
"line": 340, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 344, | ||
"line": 343, | ||
"column": 3 | ||
@@ -104,7 +104,7 @@ } | ||
"start": { | ||
"line": 253, | ||
"line": 252, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 257, | ||
"line": 256, | ||
"column": 3 | ||
@@ -126,7 +126,7 @@ } | ||
"start": { | ||
"line": 262, | ||
"line": 261, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 266, | ||
"line": 265, | ||
"column": 3 | ||
@@ -166,7 +166,7 @@ } | ||
"start": { | ||
"line": 275, | ||
"line": 274, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 277, | ||
"line": 276, | ||
"column": 3 | ||
@@ -184,7 +184,7 @@ } | ||
"start": { | ||
"line": 289, | ||
"line": 288, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 292, | ||
"line": 291, | ||
"column": 3 | ||
@@ -205,7 +205,7 @@ } | ||
"start": { | ||
"line": 293, | ||
"line": 292, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 297, | ||
"line": 296, | ||
"column": 3 | ||
@@ -226,7 +226,7 @@ } | ||
"start": { | ||
"line": 351, | ||
"line": 350, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 357, | ||
"line": 356, | ||
"column": 3 | ||
@@ -252,7 +252,7 @@ } | ||
"start": { | ||
"line": 364, | ||
"line": 363, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 375, | ||
"line": 374, | ||
"column": 3 | ||
@@ -278,7 +278,7 @@ } | ||
"start": { | ||
"line": 379, | ||
"line": 378, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 387, | ||
"line": 386, | ||
"column": 3 | ||
@@ -299,7 +299,7 @@ } | ||
"start": { | ||
"line": 393, | ||
"line": 392, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 403, | ||
"line": 402, | ||
"column": 3 | ||
@@ -320,7 +320,7 @@ } | ||
"start": { | ||
"line": 410, | ||
"line": 409, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 425, | ||
"line": 424, | ||
"column": 3 | ||
@@ -346,7 +346,7 @@ } | ||
"start": { | ||
"line": 434, | ||
"line": 433, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 446, | ||
"line": 445, | ||
"column": 3 | ||
@@ -373,7 +373,7 @@ } | ||
"start": { | ||
"line": 455, | ||
"line": 454, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 469, | ||
"line": 468, | ||
"column": 3 | ||
@@ -411,7 +411,7 @@ } | ||
"start": { | ||
"line": 477, | ||
"line": 476, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 486, | ||
"line": 485, | ||
"column": 3 | ||
@@ -450,3 +450,3 @@ } | ||
"end": { | ||
"line": 487, | ||
"line": 486, | ||
"column": 1 | ||
@@ -464,7 +464,7 @@ } | ||
"start": { | ||
"line": 253, | ||
"line": 252, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 257, | ||
"line": 256, | ||
"column": 3 | ||
@@ -481,7 +481,7 @@ } | ||
"start": { | ||
"line": 262, | ||
"line": 261, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 266, | ||
"line": 265, | ||
"column": 3 | ||
@@ -488,0 +488,0 @@ } |
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "2.8.0", | ||
"version": "3.0.0", | ||
"description": "accessible progressive disclosure with detail and summary", | ||
@@ -43,7 +43,7 @@ "repository": { | ||
"dependencies": { | ||
"@lrnwebcomponents/absolute-position-behavior": "^2.8.0", | ||
"@lrnwebcomponents/absolute-position-behavior": "^3.0.0", | ||
"lit-element": "2.4.0" | ||
}, | ||
"devDependencies": { | ||
"@lrnwebcomponents/deduping-fix": "^2.7.7", | ||
"@lrnwebcomponents/deduping-fix": "^3.0.0", | ||
"@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
@@ -68,3 +68,3 @@ "@polymer/iron-demo-helpers": "3.1.0", | ||
], | ||
"gitHead": "3d847eff4969998e9c52c0246a81453e99749f66" | ||
"gitHead": "8fcf8efcf719302c9f59c6cf952840b39bfde0b5" | ||
} |
{ | ||
"canScale": true, | ||
"canPosition": true, | ||
"canEditSource": false, | ||
"canEditSource": true, | ||
"gizmo": { | ||
@@ -22,3 +22,2 @@ "title": "Accessible Details Button", | ||
"settings": { | ||
"quick": [], | ||
"configure": [ | ||
@@ -25,0 +24,0 @@ { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
86472
1708
+ Added@lit-labs/ssr-dom-shim@1.3.0(transitive)
+ Added@lit/reactive-element@1.6.3(transitive)
+ Added@lrnwebcomponents/absolute-position-behavior@3.0.7(transitive)
+ Added@types/trusted-types@2.0.7(transitive)
+ Addedlit@2.0.0-rc.2(transitive)
+ Addedlit-element@3.3.3(transitive)
+ Addedlit-html@2.8.0(transitive)
- Removed@lrnwebcomponents/absolute-position-behavior@2.8.0(transitive)
- Removed@polymer/iron-resizable-behavior@3.0.1(transitive)
- Removed@polymer/polymer@3.5.2(transitive)
- Removed@webcomponents/shadycss@1.11.2(transitive)