scb-wc-test 0.1.11 → 0.1.13
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/all.js +2 -0
- package/index.d.ts +1 -0
- package/index.js +34 -32
- package/mvc/components/all.js +1 -0
- package/mvc/components/scb-accordion/scb-accordion-item.js +21 -61
- package/mvc/components/scb-app-bar/scb-app-bar.js +1 -1
- package/mvc/components/scb-avatar/scb-avatar.js +1 -1
- package/mvc/components/scb-breadcrumb/scb-breadcrumb-item.js +1 -1
- package/mvc/components/scb-breadcrumb/scb-breadcrumb.js +1 -1
- package/mvc/components/scb-button/scb-button.js +1 -1
- package/mvc/components/scb-calendar-card/scb-calendar-card.js +165 -126
- package/mvc/components/scb-card/scb-card.js +223 -217
- package/mvc/components/scb-checkbox/scb-checkbox-group.js +1 -1
- package/mvc/components/scb-checkbox/scb-checkbox.js +9 -11
- package/mvc/components/scb-chips/scb-chip.js +1 -1
- package/mvc/components/scb-dialog/scb-dialog.js +2 -2
- package/mvc/components/scb-divider/scb-divider.js +43 -53
- package/mvc/components/scb-drawer/scb-drawer-item.js +2 -2
- package/mvc/components/scb-drawer/scb-drawer-section.js +4 -4
- package/mvc/components/scb-drawer/scb-drawer.js +1 -1
- package/mvc/components/scb-drawer/scb-sub-drawer.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card-content.js +1 -1
- package/mvc/components/scb-fact-card/scb-fact-card.js +68 -55
- package/mvc/components/scb-footer/scb-footer-section.js +2 -2
- package/mvc/components/scb-footer/scb-footer.js +1 -1
- package/mvc/components/scb-grid/scb-grid-item.js +5 -3
- package/mvc/components/scb-grid/scb-grid.js +27 -10
- package/mvc/components/scb-grid/scb-stack.js +10 -6
- package/mvc/components/scb-header/scb-header-drawer-group.js +1 -1
- package/mvc/components/scb-header/scb-header-drawer-item.js +1 -1
- package/mvc/components/scb-header/scb-header-tab.js +1 -1
- package/mvc/components/scb-header/scb-header-utility.js +1 -1
- package/mvc/components/scb-header/scb-header.js +53 -49
- package/mvc/components/scb-icon-button/scb-icon-button.js +45 -80
- package/mvc/components/scb-keyfigure-card/scb-keyfigure-card.js +84 -58
- package/mvc/components/scb-link/scb-link.js +39 -16
- package/mvc/components/scb-list/scb-list-item.js +115 -37
- package/mvc/components/scb-list/scb-list.js +16 -7
- package/mvc/components/scb-menu/scb-menu-item.js +1 -1
- package/mvc/components/scb-menu/scb-menu.js +1 -1
- package/mvc/components/scb-menu/scb-sub-menu.js +1 -1
- package/mvc/components/scb-notification/scb-notification.js +1 -1
- package/mvc/components/scb-notification-card/scb-notification-card.js +187 -0
- package/mvc/components/scb-progress-indicator/scb-progress-indicator.js +1 -1
- package/mvc/components/scb-radio-button/scb-radio-button.js +29 -36
- package/mvc/components/scb-radio-button/scb-radio-group.js +1 -1
- package/mvc/components/scb-search/scb-search.js +48 -37
- package/mvc/components/scb-snackbar/scb-snackbar.js +8 -8
- package/mvc/components/scb-status-pill/scb-status-pill.js +1 -1
- package/mvc/components/scb-switch/scb-switch.js +1 -1
- package/mvc/components/scb-tabs/scb-primary-tab.js +1 -1
- package/mvc/components/scb-tabs/scb-secondary-tab.js +1 -1
- package/mvc/components/scb-tabs/scb-tabs.js +1 -1
- package/mvc/components/scb-textfield/scb-textfield.js +1 -1
- package/mvc/components/scb-toc/scb-toc-item.js +1 -1
- package/mvc/components/scb-toc/scb-toc.js +2 -2
- package/mvc/components/scb-tooltip/scb-tooltip.js +1 -1
- package/mvc/vendor/vendor-material.js +232 -312
- package/mvc/vendor/vendor.js +19 -23
- package/package.json +6 -2
- package/scb-accordion/scb-accordion-item.js +47 -98
- package/scb-calendar-card/scb-calendar-card.d.ts +6 -4
- package/scb-calendar-card/scb-calendar-card.js +207 -154
- package/scb-card/scb-card.d.ts +8 -3
- package/scb-card/scb-card.js +265 -250
- package/scb-checkbox/scb-checkbox.d.ts +1 -0
- package/scb-checkbox/scb-checkbox.js +56 -49
- package/scb-divider/scb-divider.d.ts +16 -4
- package/scb-divider/scb-divider.js +63 -69
- package/scb-fact-card/scb-fact-card.d.ts +8 -7
- package/scb-fact-card/scb-fact-card.js +100 -78
- package/scb-grid/scb-grid-item.d.ts +7 -2
- package/scb-grid/scb-grid-item.js +47 -33
- package/scb-grid/scb-grid.d.ts +7 -3
- package/scb-grid/scb-grid.js +57 -21
- package/scb-grid/scb-stack.d.ts +5 -1
- package/scb-grid/scb-stack.js +57 -31
- package/scb-header/scb-header.d.ts +1 -2
- package/scb-header/scb-header.js +154 -162
- package/scb-icon-button/scb-icon-button.d.ts +15 -11
- package/scb-icon-button/scb-icon-button.js +149 -132
- package/scb-keyfigure-card/scb-keyfigure-card.d.ts +6 -1
- package/scb-keyfigure-card/scb-keyfigure-card.js +139 -93
- package/scb-link/scb-link.d.ts +1 -0
- package/scb-link/scb-link.js +65 -38
- package/scb-list/scb-list-item.d.ts +8 -5
- package/scb-list/scb-list-item.js +183 -73
- package/scb-list/scb-list.d.ts +5 -0
- package/scb-list/scb-list.js +71 -21
- package/scb-notification-card/scb-notification-card.d.ts +18 -0
- package/scb-notification-card/scb-notification-card.js +264 -0
- package/scb-radio-button/scb-radio-button.js +46 -53
- package/scb-search/scb-search.d.ts +8 -0
- package/scb-search/scb-search.js +176 -139
- package/scb-wc-test.bundle.js +1870 -1546
package/mvc/vendor/vendor.js
CHANGED
|
@@ -1,68 +1,64 @@
|
|
|
1
|
-
(function(){try{var
|
|
1
|
+
(function(){try{var r=typeof globalThis<"u"?globalThis:window;if(!r.__scb_ce_guard_installed__){r.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const M=globalThis,
|
|
5
|
+
*/const M=globalThis,D=M.ShadowRoot&&(M.ShadyCSS===void 0||M.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,L=Symbol(),q=new WeakMap;let tt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==L)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(D&&t===void 0){const s=e!==void 0&&e.length===1;s&&(t=q.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&q.set(e,t))}return t}toString(){return this.cssText}};const ot=r=>new tt(typeof r=="string"?r:r+"",void 0,L),Dt=(r,...t)=>{const e=r.length===1?r[0]:t.reduce((s,i,n)=>s+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[n+1],r[0]);return new tt(e,r,L)},ht=(r,t)=>{if(D)r.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const s=document.createElement("style"),i=M.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},V=D?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return ot(e)})(r):r;/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2017 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:at,defineProperty:lt,getOwnPropertyDescriptor:ct,getOwnPropertyNames:dt,getOwnPropertySymbols:ut,getPrototypeOf:pt}=Object,_=globalThis,W=_.trustedTypes,$t=W?W.emptyScript:"",ft=_.reactiveElementPolyfillSupport,S=(
|
|
9
|
+
*/const{is:at,defineProperty:lt,getOwnPropertyDescriptor:ct,getOwnPropertyNames:dt,getOwnPropertySymbols:ut,getPrototypeOf:pt}=Object,_=globalThis,W=_.trustedTypes,$t=W?W.emptyScript:"",ft=_.reactiveElementPolyfillSupport,S=(r,t)=>r,H={toAttribute(r,t){switch(t){case Boolean:r=r?$t:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},z=(r,t)=>!at(r,t),J={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:z};Symbol.metadata??(Symbol.metadata=Symbol("metadata")),_.litPropertyMetadata??(_.litPropertyMetadata=new WeakMap);let v=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??(this.l=[])).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=J){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&<(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:n}=ct(this.prototype,t)??{get(){return this[e]},set(o){this[e]=o}};return{get:i,set(o){const a=i?.call(this);n?.call(this,o),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??J}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const t=pt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const e=this.properties,s=[...dt(e),...ut(e)];for(const i of s)this.createProperty(i,e[i])}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(const[e,s]of this.elementProperties){const i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const i of s)e.unshift(V(i))}else t!==void 0&&e.push(V(t));return e}static _$Eu(t,e){const s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??(this._$EO=new Set)).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ht(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){const n=(s.converter?.toAttribute!==void 0?s.converter:H).toAttribute(e,s.type);this._$Em=t,n==null?this.removeAttribute(i):this.setAttribute(i,n),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){const n=s.getPropertyOptions(i),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:H;this._$Em=i;const a=o.fromAttribute(e,n.type);this[i]=a??this._$Ej?.get(i)??a,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){const i=this.constructor,n=this[t];if(s??(s=i.getPropertyOptions(t)),!((s.hasChanged??z)(n,e)||s.useDefault&&s.reflect&&n===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:n},o){s&&!(this._$Ej??(this._$Ej=new Map)).has(t)&&(this._$Ej.set(t,o??e??this[t]),n!==!0||o!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??(this._$Eq=new Set)).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}const t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[i,n]of this._$Ep)this[i]=n;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[i,n]of s){const{wrapped:o}=n,a=this[i];o!==!0||this._$AL.has(i)||a===void 0||this.C(i,void 0,n,a)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(s=>s.hostUpdate?.()),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};v.elementStyles=[],v.shadowRootOptions={mode:"open"},v[S("elementProperties")]=new Map,v[S("finalized")]=new Map,ft?.({ReactiveElement:v}),(_.reactiveElementVersions??(_.reactiveElementVersions=[])).push("2.1.1");/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const w=globalThis,N=w.trustedTypes,
|
|
14
|
-
\f\r]`,b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,it=/^(?:script|style|textarea|title)$/i,At=
|
|
13
|
+
*/const w=globalThis,N=w.trustedTypes,K=N?N.createPolicy("lit-html",{createHTML:r=>r}):void 0,et="$lit$",f=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+f,_t=`<${st}>`,y=document,P=()=>y.createComment(""),U=r=>r===null||typeof r!="object"&&typeof r!="function",I=Array.isArray,mt=r=>I(r)||typeof r?.[Symbol.iterator]=="function",k=`[
|
|
14
|
+
\f\r]`,b=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Z=/-->/g,F=/>/g,m=RegExp(`>|${k}(?:([^\\s"'>=/]+)(${k}*=${k}*(?:[^
|
|
15
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),G=/'/g,Q=/"/g,it=/^(?:script|style|textarea|title)$/i,At=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),yt=At(1),g=Symbol.for("lit-noChange"),u=Symbol.for("lit-nothing"),X=new WeakMap,A=y.createTreeWalker(y,129);function rt(r,t){if(!I(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return K!==void 0?K.createHTML(t):t}const gt=(r,t)=>{const e=r.length-1,s=[];let i,n=t===2?"<svg>":t===3?"<math>":"",o=b;for(let a=0;a<e;a++){const h=r[a];let l,d,c=-1,p=0;for(;p<h.length&&(o.lastIndex=p,d=o.exec(h),d!==null);)p=o.lastIndex,o===b?d[1]==="!--"?o=Z:d[1]!==void 0?o=F:d[2]!==void 0?(it.test(d[2])&&(i=RegExp("</"+d[2],"g")),o=m):d[3]!==void 0&&(o=m):o===m?d[0]===">"?(o=i??b,c=-1):d[1]===void 0?c=-2:(c=o.lastIndex-d[2].length,l=d[1],o=d[3]===void 0?m:d[3]==='"'?Q:G):o===Q||o===G?o=m:o===Z||o===F?o=b:(o=m,i=void 0);const $=o===m&&r[a+1].startsWith("/>")?" ":"";n+=o===b?h+_t:c>=0?(s.push(l),h.slice(0,c)+et+h.slice(c)+f+$):h+f+(c===-2?a:$)}return[rt(r,n+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]};class O{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let n=0,o=0;const a=t.length-1,h=this.parts,[l,d]=gt(t,e);if(this.el=O.createElement(l,s),A.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=A.nextNode())!==null&&h.length<a;){if(i.nodeType===1){if(i.hasAttributes())for(const c of i.getAttributeNames())if(c.endsWith(et)){const p=d[o++],$=i.getAttribute(c).split(f),T=/([.?@])?(.*)/.exec(p);h.push({type:1,index:n,name:T[2],strings:$,ctor:T[1]==="."?Et:T[1]==="?"?bt:T[1]==="@"?St:j}),i.removeAttribute(c)}else c.startsWith(f)&&(h.push({type:6,index:n}),i.removeAttribute(c));if(it.test(i.tagName)){const c=i.textContent.split(f),p=c.length-1;if(p>0){i.textContent=N?N.emptyScript:"";for(let $=0;$<p;$++)i.append(c[$],P()),A.nextNode(),h.push({type:2,index:++n});i.append(c[p],P())}}}else if(i.nodeType===8)if(i.data===st)h.push({type:2,index:n});else{let c=-1;for(;(c=i.data.indexOf(f,c+1))!==-1;)h.push({type:7,index:n}),c+=f.length-1}n++}}static createElement(t,e){const s=y.createElement("template");return s.innerHTML=t,s}}function E(r,t,e=r,s){if(t===g)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl;const n=U(t)?void 0:t._$litDirective$;return i?.constructor!==n&&(i?._$AO?.(!1),n===void 0?i=void 0:(i=new n(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??(e._$Co=[]))[s]=i:e._$Cl=i),i!==void 0&&(t=E(r,i._$AS(r,t.values),i,s)),t}class vt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??y).importNode(e,!0);A.currentNode=i;let n=A.nextNode(),o=0,a=0,h=s[0];for(;h!==void 0;){if(o===h.index){let l;h.type===2?l=new x(n,n.nextSibling,this,t):h.type===1?l=new h.ctor(n,h.name,h.strings,this,t):h.type===6&&(l=new wt(n,this,t)),this._$AV.push(l),h=s[++a]}o!==h?.index&&(n=A.nextNode(),o++)}return A.currentNode=y,i}p(t){let e=0;for(const s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class x{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=u,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=E(this,t,e),U(t)?t===u||t==null||t===""?(this._$AH!==u&&this._$AR(),this._$AH=u):t!==this._$AH&&t!==g&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):mt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==u&&U(this._$AH)?this._$AA.nextSibling.data=t:this.T(y.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=O.createElement(rt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const n=new vt(i,this),o=n.u(this.options);n.p(e),this.T(o),this._$AH=n}}_$AC(t){let e=X.get(t.strings);return e===void 0&&X.set(t.strings,e=new O(t)),e}k(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const n of t)i===e.length?e.push(s=new x(this.O(P()),this.O(P()),this,this.options)):s=e[i],s._$AI(n),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}}class j{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,n){this.type=1,this._$AH=u,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=u}_$AI(t,e=this,s,i){const n=this.strings;let o=!1;if(n===void 0)t=E(this,t,e,0),o=!U(t)||t!==this._$AH&&t!==g,o&&(this._$AH=t);else{const a=t;let h,l;for(t=n[0],h=0;h<n.length-1;h++)l=E(this,a[s+h],e,h),l===g&&(l=this._$AH[h]),o||(o=!U(l)||l!==this._$AH[h]),l===u?t=u:t!==u&&(t+=(l??"")+n[h+1]),this._$AH[h]=l}o&&!i&&this.j(t)}j(t){t===u?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Et extends j{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===u?void 0:t}}class bt extends j{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==u)}}class St extends j{constructor(t,e,s,i,n){super(t,e,s,i,n),this.type=5}_$AI(t,e=this){if((t=E(this,t,e,0)??u)===g)return;const s=this._$AH,i=t===u&&s!==u||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==u&&(s===u||i);i&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class wt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){E(this,t)}}const Ct=w.litHtmlPolyfillSupport;Ct?.(O,x),(w.litHtmlVersions??(w.litHtmlVersions=[])).push("3.3.1");const Pt=(r,t,e)=>{const s=e?.renderBefore??t;let i=s._$litPart$;if(i===void 0){const n=e?.renderBefore??null;s._$litPart$=i=new x(t.insertBefore(P(),n),n,void 0,e??{})}return i._$AI(r),i};/**
|
|
16
16
|
* @license
|
|
17
17
|
* Copyright 2017 Google LLC
|
|
18
18
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const C=globalThis;let R=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return
|
|
19
|
+
*/const C=globalThis;let R=class extends v{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e;const t=super.createRenderRoot();return(e=this.renderOptions).renderBefore??(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return g}};R._$litElement$=!0,R.finalized=!0,C.litElementHydrateSupport?.({LitElement:R});const Ut=C.litElementPolyfillSupport;Ut?.({LitElement:R});(C.litElementVersions??(C.litElementVersions=[])).push("4.2.1");/**
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const
|
|
23
|
+
*/const It=r=>(t,e)=>{e!==void 0?e.addInitializer(()=>{customElements.define(r,t)}):customElements.define(r,t)};/**
|
|
24
24
|
* @license
|
|
25
25
|
* Copyright 2017 Google LLC
|
|
26
26
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const Ot={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:
|
|
27
|
+
*/const Ot={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:z},xt=(r=Ot,t,e)=>{const{kind:s,metadata:i}=e;let n=globalThis.litPropertyMetadata.get(i);if(n===void 0&&globalThis.litPropertyMetadata.set(i,n=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),n.set(e.name,r),s==="accessor"){const{name:o}=e;return{set(a){const h=t.get.call(this);t.set.call(this,a),this.requestUpdate(o,h,r)},init(a){return a!==void 0&&this.C(o,void 0,r,a),a}}}if(s==="setter"){const{name:o}=e;return function(a){const h=this[o];t.call(this,a),this.requestUpdate(o,h,r)}}throw Error("Unsupported decorator location: "+s)};function Tt(r){return(t,e)=>typeof e=="object"?xt(r,t,e):((s,i,n)=>{const o=i.hasOwnProperty(n);return i.constructor.createProperty(n,s),o?Object.getOwnPropertyDescriptor(i,n):void 0})(r,t,e)}/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function
|
|
31
|
+
*/function Bt(r){return Tt({...r,state:!0,attribute:!1})}/**
|
|
32
32
|
* @license
|
|
33
33
|
* Copyright 2017 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
35
|
-
*/const
|
|
35
|
+
*/const B=(r,t,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(r,t,e),e);/**
|
|
36
36
|
* @license
|
|
37
37
|
* Copyright 2017 Google LLC
|
|
38
38
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
39
|
-
*/function
|
|
40
|
-
* @license
|
|
41
|
-
* Copyright 2017 Google LLC
|
|
42
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
43
|
-
*/let Mt;function Wt(i){return(t,e)=>D(t,e,{get(){return(this.renderRoot??Mt??(Mt=document.createDocumentFragment())).querySelectorAll(i)}})}/**
|
|
39
|
+
*/function qt(r,t){return(e,s,i)=>{const n=o=>o.renderRoot?.querySelector(r)??null;return B(e,s,{get(){return n(this)}})}}/**
|
|
44
40
|
* @license
|
|
45
41
|
* Copyright 2021 Google LLC
|
|
46
42
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/function
|
|
43
|
+
*/function Vt(r){return(t,e)=>{const{slot:s,selector:i}=r??{},n="slot"+(s?`[name=${s}]`:":not([name])");return B(t,e,{get(){const o=this.renderRoot?.querySelector(n),a=o?.assignedElements(r)??[];return i===void 0?a:a.filter(h=>h.matches(i))}})}}/**
|
|
48
44
|
* @license
|
|
49
45
|
* Copyright 2017 Google LLC
|
|
50
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/function
|
|
47
|
+
*/function Wt(r){return(t,e)=>{const{slot:s}=r??{},i="slot"+(s?`[name=${s}]`:":not([name])");return B(t,e,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(r)??[]}})}}function Jt(r,t,e,s){var i=arguments.length,n=i<3?t:s===null?s=Object.getOwnPropertyDescriptor(t,e):s,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(r,t,e,s);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(n=(i<3?o(n):i>3?o(t,e,n):o(t,e))||n);return i>3&&n&&Object.defineProperty(t,e,n),n}/**
|
|
52
48
|
* @license
|
|
53
49
|
* Copyright 2017 Google LLC
|
|
54
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const
|
|
51
|
+
*/const Mt={ATTRIBUTE:1},Rt=r=>(...t)=>({_$litDirective$:r,values:t});let Ht=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};/**
|
|
56
52
|
* @license
|
|
57
53
|
* Copyright 2018 Google LLC
|
|
58
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/const
|
|
55
|
+
*/const Zt=Rt(class extends Ht{constructor(r){if(super(r),r.type!==Mt.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter(t=>r[t]).join(" ")+" "}update(r,[t]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter(s=>s!=="")));for(const s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}const e=r.element.classList;for(const s of this.st)s in t||(e.remove(s),this.st.delete(s));for(const s in t){const i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return g}});/**
|
|
60
56
|
* @license
|
|
61
57
|
* Copyright 2018 Google LLC
|
|
62
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/const
|
|
59
|
+
*/const Ft=r=>r??u;/**
|
|
64
60
|
* @license
|
|
65
61
|
* Copyright 2020 Google LLC
|
|
66
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
67
|
-
*/const nt=Symbol.for(""),
|
|
68
|
-
take care to ensure page security.`)})(s)+i
|
|
63
|
+
*/const nt=Symbol.for(""),Nt=r=>{if(r?.r===nt)return r?._$litStatic$},Gt=(r,...t)=>({_$litStatic$:t.reduce((e,s,i)=>e+(n=>{if(n._$litStatic$!==void 0)return n._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${n}. Use 'unsafeStatic' to pass non-literal values, but
|
|
64
|
+
take care to ensure page security.`)})(s)+r[i+1],r[0]),r:nt}),Y=new Map,jt=r=>(t,...e)=>{const s=e.length;let i,n;const o=[],a=[];let h,l=0,d=!1;for(;l<s;){for(h=t[l];l<s&&(n=e[l],(i=Nt(n))!==void 0);)h+=i+t[++l],d=!0;l!==s&&a.push(n),o.push(h),l++}if(l===s&&o.push(t[s]),d){const c=o.join("$$lit$$");(t=Y.get(c))===void 0&&(o.raw=o,Y.set(c,t=o)),e=a}return r(t,...e)},Qt=jt(yt);export{u as E,Jt as _,Dt as a,qt as b,Wt as c,Gt as d,Zt as e,Ft as f,R as i,Tt as n,Vt as o,Bt as r,It as t,Qt as u,yt as x};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -215,6 +215,10 @@
|
|
|
215
215
|
"import": "./scb-notification/scb-notification.js",
|
|
216
216
|
"require": "./scb-notification/scb-notification.js"
|
|
217
217
|
},
|
|
218
|
+
"./scb-notification-card": {
|
|
219
|
+
"import": "./scb-notification-card/scb-notification-card.js",
|
|
220
|
+
"require": "./scb-notification-card/scb-notification-card.js"
|
|
221
|
+
},
|
|
218
222
|
"./scb-progress-indicator": {
|
|
219
223
|
"import": "./scb-progress-indicator/scb-progress-indicator.js",
|
|
220
224
|
"require": "./scb-progress-indicator/scb-progress-indicator.js"
|
|
@@ -273,5 +277,5 @@
|
|
|
273
277
|
},
|
|
274
278
|
"./mvc/*": "./mvc/*"
|
|
275
279
|
},
|
|
276
|
-
"buildHash": "
|
|
280
|
+
"buildHash": "063E5390E3C14270356CFB4043FAA496532743D0B95D7EB36046201A1BE51BBB"
|
|
277
281
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { css as h, LitElement as g, nothing as p, html as l } from "lit";
|
|
2
|
-
import { property as o, customElement as
|
|
3
|
-
var
|
|
4
|
-
for (var n =
|
|
5
|
-
(c = t[d]) && (n = (
|
|
6
|
-
return
|
|
2
|
+
import { property as o, customElement as u } from "lit/decorators.js";
|
|
3
|
+
var v = Object.defineProperty, m = Object.getOwnPropertyDescriptor, i = (t, a, s, r) => {
|
|
4
|
+
for (var n = r > 1 ? void 0 : r ? m(a, s) : a, d = t.length - 1, c; d >= 0; d--)
|
|
5
|
+
(c = t[d]) && (n = (r ? c(a, s, n) : c(n)) || n);
|
|
6
|
+
return r && n && v(a, s, n), n;
|
|
7
7
|
};
|
|
8
8
|
let e = class extends g {
|
|
9
9
|
constructor() {
|
|
10
|
-
super(...arguments), this.expanded = !1, this.label = "", this.content = "", this.overline = "", this.supportingText = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.imgHrefImage = "
|
|
10
|
+
super(...arguments), this.expanded = !1, this.label = "", this.content = "", this.overline = "", this.supportingText = "", this.leading = !1, this.leadingVariant = "", this.leadingIcon = "", this.imgHrefImage = "", this.avatarLabel = "", this.avatarAlt = "", this.avatarVariant = "icon", this.avatarSrc = "", this.density = 0, this._unique = e._uid(), this.toggleAccordion = () => {
|
|
11
11
|
const t = this.closest("scb-accordion");
|
|
12
12
|
t != null && t.hasAttribute("detached") || t.querySelectorAll("scb-accordion-item").forEach((s) => {
|
|
13
13
|
s !== this && (s.expanded = !1, s._applyInert(), s._setBottomMaxHeight(s));
|
|
@@ -30,39 +30,31 @@ let e = class extends g {
|
|
|
30
30
|
var t;
|
|
31
31
|
(t = this._bottomEl()) == null || t.removeEventListener("load", this._onContentLoad, !0), super.disconnectedCallback();
|
|
32
32
|
}
|
|
33
|
-
// Animerar max-height vid öppning/stängning för snygg transition
|
|
34
33
|
_setBottomMaxHeight(t) {
|
|
35
34
|
const a = t._bottomEl();
|
|
36
35
|
a && (t.expanded ? (a.style.maxHeight = `${a.scrollHeight}px`, setTimeout(() => a.style.maxHeight = "unset", 160)) : (a.style.maxHeight = `${a.scrollHeight}px`, requestAnimationFrame(() => a.style.maxHeight = "0")));
|
|
37
36
|
}
|
|
38
|
-
/*
|
|
39
|
-
Tangentbordsnavigering:
|
|
40
|
-
enter/space togglar,
|
|
41
|
-
Arrowup/down flyttar fokus,
|
|
42
|
-
home/end hoppar till första/sista item.
|
|
43
|
-
*/
|
|
44
37
|
_onKeyDown(t) {
|
|
45
|
-
const a = this.closest("scb-accordion"),
|
|
38
|
+
const a = this.closest("scb-accordion"), r = Array.from((a == null ? void 0 : a.querySelectorAll("scb-accordion-item")) || []).map((c) => c.renderRoot.querySelector(".scb-accordion-top")).filter((c) => !!c), n = t.currentTarget, d = r.indexOf(n);
|
|
46
39
|
switch (t.key) {
|
|
47
40
|
case "Enter":
|
|
48
41
|
case " ":
|
|
49
42
|
t.preventDefault(), this.toggleAccordion();
|
|
50
43
|
break;
|
|
51
44
|
case "ArrowDown":
|
|
52
|
-
t.preventDefault(), d <
|
|
45
|
+
t.preventDefault(), d < r.length - 1 && r[d + 1].focus();
|
|
53
46
|
break;
|
|
54
47
|
case "ArrowUp":
|
|
55
|
-
t.preventDefault(), d > 0 &&
|
|
48
|
+
t.preventDefault(), d > 0 && r[d - 1].focus();
|
|
56
49
|
break;
|
|
57
50
|
case "Home":
|
|
58
|
-
t.preventDefault(),
|
|
51
|
+
t.preventDefault(), r.length && r[0].focus();
|
|
59
52
|
break;
|
|
60
53
|
case "End":
|
|
61
|
-
t.preventDefault(),
|
|
54
|
+
t.preventDefault(), r.length && r[r.length - 1].focus();
|
|
62
55
|
break;
|
|
63
56
|
}
|
|
64
57
|
}
|
|
65
|
-
// Leading-template (ikon/avatar/bild)
|
|
66
58
|
_renderLeading() {
|
|
67
59
|
if (!this.leading) return p;
|
|
68
60
|
switch (this.leadingVariant) {
|
|
@@ -80,16 +72,14 @@ let e = class extends g {
|
|
|
80
72
|
></scb-avatar>
|
|
81
73
|
`;
|
|
82
74
|
case "image":
|
|
83
|
-
return l`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt=""
|
|
75
|
+
return this.imgHrefImage ? l`<img part="leading-image" class="img" src="${this.imgHrefImage}" alt="" />` : p;
|
|
84
76
|
default:
|
|
85
77
|
return p;
|
|
86
78
|
}
|
|
87
79
|
}
|
|
88
|
-
// Panel-elementet
|
|
89
80
|
_bottomEl() {
|
|
90
81
|
return this.renderRoot.querySelector(".scb-accordion-bottom");
|
|
91
82
|
}
|
|
92
|
-
// Håll tabb-ordningen korrekt med inert och aria-hidden
|
|
93
83
|
_applyInert() {
|
|
94
84
|
const t = this._bottomEl();
|
|
95
85
|
t && (this.expanded ? (t.removeAttribute("inert"), t.setAttribute("aria-hidden", "false")) : (t.setAttribute("inert", ""), t.setAttribute("aria-hidden", "true")));
|
|
@@ -97,9 +87,8 @@ let e = class extends g {
|
|
|
97
87
|
updated(t) {
|
|
98
88
|
t.has("expanded") && (this._applyInert(), this._setBottomMaxHeight(this));
|
|
99
89
|
}
|
|
100
|
-
// Renderar struktur med korrekt aria-controls kopplat till botten-delen
|
|
101
90
|
render() {
|
|
102
|
-
const t = `bottom-${this._unique}`, a = `header-${this._unique}
|
|
91
|
+
const t = `bottom-${this._unique}`, a = `header-${this._unique}`;
|
|
103
92
|
return l`
|
|
104
93
|
<div part="scb-accordion-item" class="scb-accordion-item">
|
|
105
94
|
<div
|
|
@@ -112,20 +101,17 @@ let e = class extends g {
|
|
|
112
101
|
@click=${this.toggleAccordion}
|
|
113
102
|
@keydown=${this._onKeyDown}
|
|
114
103
|
>
|
|
115
|
-
<!-- Ripple för press/hover/focus state-layer -->
|
|
116
104
|
<md-ripple></md-ripple>
|
|
117
105
|
|
|
118
106
|
${this.leading ? l`<div class="leading">${this._renderLeading()}</div>` : p}
|
|
119
107
|
|
|
120
108
|
<div class="texts">
|
|
121
|
-
${
|
|
109
|
+
${this.overline ? l`<div class="overline">${this.overline}</div>` : p}
|
|
122
110
|
<div class="label">${this.label}</div>
|
|
123
|
-
${
|
|
111
|
+
${this.supportingText ? l`<div class="supporting-text">${this.supportingText}</div>` : p}
|
|
124
112
|
</div>
|
|
125
113
|
|
|
126
|
-
<md-icon class="chevron">
|
|
127
|
-
${this.expanded ? "keyboard_arrow_up" : "keyboard_arrow_down"}
|
|
128
|
-
</md-icon>
|
|
114
|
+
<md-icon class="chevron">${this.expanded ? "keyboard_arrow_up" : "keyboard_arrow_down"}</md-icon>
|
|
129
115
|
</div>
|
|
130
116
|
|
|
131
117
|
<div
|
|
@@ -173,32 +159,23 @@ e.styles = [
|
|
|
173
159
|
flex-direction: row;
|
|
174
160
|
align-items: center;
|
|
175
161
|
cursor: pointer;
|
|
176
|
-
/* default density 0: 24px över/under, 16px i sidled */
|
|
177
162
|
padding-block: var(--spacing-7, 24px);
|
|
178
163
|
padding-inline: var(--spacing-5, 16px);
|
|
179
164
|
outline: none;
|
|
180
|
-
/* för att undvika rundade hörn på hover */
|
|
181
165
|
border-radius: var(--radius-none, 0px);
|
|
182
166
|
gap: var(--spacing-5, 16px);
|
|
183
167
|
color: var(--md-sys-color-on-surface);
|
|
184
|
-
/* För ripple */
|
|
185
168
|
position: relative;
|
|
186
169
|
overflow: hidden;
|
|
187
170
|
-webkit-tap-highlight-color: transparent;
|
|
188
171
|
}
|
|
189
|
-
.scb-accordion-top:hover {
|
|
190
|
-
/* Inga runda hörn på hover */
|
|
191
|
-
border-radius: var(--scb-accordion-hover-radius);
|
|
192
|
-
}
|
|
193
|
-
|
|
172
|
+
.scb-accordion-top:hover { border-radius: var(--scb-accordion-hover-radius); }
|
|
194
173
|
.scb-accordion-top:focus-visible {
|
|
195
174
|
outline: var(--_focus-width) solid var(--md-focus-ring-color, var(--p-40));
|
|
196
175
|
outline-offset: var(--spacing-1, 2px);
|
|
197
|
-
/* Tillåt runda hörn endast vid fokusmarkering */
|
|
198
176
|
border-radius: var(--_focus-radius);
|
|
199
177
|
}
|
|
200
178
|
|
|
201
|
-
/* Om både om hosten har data-density och om en förälder har det. */
|
|
202
179
|
:host([density="-2"]) .scb-accordion-top,
|
|
203
180
|
:host-context([data-density="-2"]) .scb-accordion-top {
|
|
204
181
|
padding-block: var(--spacing-5, 16px);
|
|
@@ -225,7 +202,7 @@ e.styles = [
|
|
|
225
202
|
max-height: 100%;
|
|
226
203
|
}
|
|
227
204
|
|
|
228
|
-
.label {
|
|
205
|
+
.label {
|
|
229
206
|
font-family: var(--brand-font);
|
|
230
207
|
font-size: var(--md-sys-typescale-title-large-size);
|
|
231
208
|
line-height: var(--md-sys-typescale-title-large-line-height);
|
|
@@ -233,9 +210,9 @@ e.styles = [
|
|
|
233
210
|
letter-spacing: var(--md-sys-typescale-title-large-tracking);
|
|
234
211
|
color: var(--md-sys-color-on-surface);
|
|
235
212
|
}
|
|
236
|
-
.overline {
|
|
213
|
+
.overline {
|
|
237
214
|
font-family: var(--brand-font);
|
|
238
|
-
font-size: var(--md-sys-typescale-label-medium-size);
|
|
215
|
+
font-size: var(--md-sys-typescale-label-medium-size);
|
|
239
216
|
line-height: var(--md-sys-typescale-label-medium-line-height);
|
|
240
217
|
font-weight: var(--weight-regular);
|
|
241
218
|
letter-spacing: var(--md-sys-typescale-label-medium-tracking);
|
|
@@ -243,100 +220,72 @@ e.styles = [
|
|
|
243
220
|
}
|
|
244
221
|
.supporting-text {
|
|
245
222
|
font-family: var(--brand-font);
|
|
246
|
-
font-size: var(--md-sys-typescale-body-medium-size);
|
|
223
|
+
font-size: var(--md-sys-typescale-body-medium-size);
|
|
247
224
|
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
248
225
|
font-weight: var(--weight-regular);
|
|
249
226
|
letter-spacing: var(--md-sys-typescale-body-medium-tracking);
|
|
250
227
|
color: var(--md-sys-color-on-surface-variant);
|
|
251
228
|
}
|
|
252
229
|
|
|
253
|
-
.leading {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
230
|
+
.leading { align-self: center; display: grid; place-items: center; }
|
|
231
|
+
.img {
|
|
232
|
+
width: calc(var(--icon-size-large, 40px) + var(--spacing-5, 16px));
|
|
233
|
+
height: calc(var(--icon-size-large, 40px) + var(--spacing-5, 16px));
|
|
234
|
+
object-fit: contain;
|
|
235
|
+
border-radius: var(--radius-s, 8px);
|
|
257
236
|
}
|
|
258
237
|
|
|
259
|
-
.
|
|
260
|
-
|
|
261
|
-
height: var(--icon-size-small, 24px);
|
|
262
|
-
display: flex;
|
|
263
|
-
object-fit: contain;
|
|
264
|
-
}
|
|
265
|
-
.img {
|
|
266
|
-
width: calc(var(--icon-size-large, 40px) + var(--spacing-5, 16px));
|
|
267
|
-
height: calc(var(--icon-size-large, 40px) + var(--spacing-5, 16px));
|
|
268
|
-
object-fit: contain;
|
|
269
|
-
border-radius: var(--radius-s, 8px);
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.texts {
|
|
273
|
-
display: grid;
|
|
274
|
-
gap: var(--spacing-1, 2px);
|
|
275
|
-
}
|
|
238
|
+
.texts { display: grid; gap: var(--spacing-1, 2px); }
|
|
239
|
+
.chevron { margin-left: auto; padding-top: var(--scb-accordion-chevron-nudge-y, 3px); font-size: var(--icon-size-small, 24px); }
|
|
276
240
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
margin-left: auto;
|
|
280
|
-
padding-top: var(--scb-accordion-chevron-nudge-y, 3px);
|
|
281
|
-
font-size: var(--icon-size-small, 24px);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
/* Ripple ska fylla den klickbara ytan och ärver ev. rundning vid fokus */
|
|
285
|
-
md-ripple {
|
|
286
|
-
border-radius: inherit;
|
|
287
|
-
inset: 0;
|
|
288
|
-
position: absolute;
|
|
289
|
-
pointer-events: none;
|
|
290
|
-
}
|
|
291
|
-
@media (prefers-reduced-motion: reduce) {
|
|
292
|
-
md-ripple { display: none; } /* endast fokusring visas */
|
|
293
|
-
}
|
|
241
|
+
md-ripple { border-radius: inherit; inset: 0; position: absolute; pointer-events: none; }
|
|
242
|
+
@media (prefers-reduced-motion: reduce) { md-ripple { display: none; } }
|
|
294
243
|
`
|
|
295
244
|
];
|
|
296
|
-
|
|
245
|
+
i([
|
|
297
246
|
o({ type: Boolean })
|
|
298
247
|
], e.prototype, "expanded", 2);
|
|
299
|
-
|
|
248
|
+
i([
|
|
300
249
|
o({ type: String, reflect: !0 })
|
|
301
250
|
], e.prototype, "label", 2);
|
|
302
|
-
|
|
251
|
+
i([
|
|
303
252
|
o({ type: String })
|
|
304
253
|
], e.prototype, "content", 2);
|
|
305
|
-
|
|
254
|
+
i([
|
|
306
255
|
o({ type: String, attribute: "overline" })
|
|
307
256
|
], e.prototype, "overline", 2);
|
|
308
|
-
|
|
257
|
+
i([
|
|
309
258
|
o({ type: String, attribute: "supporting-text" })
|
|
310
259
|
], e.prototype, "supportingText", 2);
|
|
311
|
-
|
|
260
|
+
i([
|
|
312
261
|
o({ type: Boolean })
|
|
313
262
|
], e.prototype, "leading", 2);
|
|
314
|
-
|
|
263
|
+
i([
|
|
315
264
|
o({ type: String, attribute: "leading-variant", reflect: !0 })
|
|
316
265
|
], e.prototype, "leadingVariant", 2);
|
|
317
|
-
|
|
266
|
+
i([
|
|
318
267
|
o({ type: String, attribute: "leading-icon" })
|
|
319
268
|
], e.prototype, "leadingIcon", 2);
|
|
320
|
-
|
|
269
|
+
i([
|
|
321
270
|
o({ type: String, attribute: "img-href-image", reflect: !0 })
|
|
322
271
|
], e.prototype, "imgHrefImage", 2);
|
|
323
|
-
|
|
272
|
+
i([
|
|
324
273
|
o({ type: String, attribute: "avatar-label" })
|
|
325
274
|
], e.prototype, "avatarLabel", 2);
|
|
326
|
-
|
|
275
|
+
i([
|
|
327
276
|
o({ type: String, attribute: "avatar-alt" })
|
|
328
277
|
], e.prototype, "avatarAlt", 2);
|
|
329
|
-
|
|
278
|
+
i([
|
|
330
279
|
o({ type: String, attribute: "avatar-variant" })
|
|
331
280
|
], e.prototype, "avatarVariant", 2);
|
|
332
|
-
|
|
281
|
+
i([
|
|
333
282
|
o({ type: String, attribute: "avatar-src" })
|
|
334
283
|
], e.prototype, "avatarSrc", 2);
|
|
335
|
-
|
|
284
|
+
i([
|
|
336
285
|
o({ type: Number, reflect: !0 })
|
|
337
286
|
], e.prototype, "density", 2);
|
|
338
|
-
e =
|
|
339
|
-
|
|
287
|
+
e = i([
|
|
288
|
+
u("scb-accordion-item")
|
|
340
289
|
], e);
|
|
341
290
|
export {
|
|
342
291
|
e as ScbAccordionItem
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
/**
|
|
3
|
-
* Enkel kort-komponent för SCB-designsystemet
|
|
4
|
-
*/
|
|
5
2
|
export declare class ScbCalendarCard extends LitElement {
|
|
6
3
|
variant: 'default' | 'outlined' | 'filled';
|
|
7
4
|
direction: 'horizontal' | 'vertical';
|
|
8
|
-
|
|
5
|
+
title: string;
|
|
9
6
|
subtitle: string;
|
|
10
7
|
supportingText: string;
|
|
11
8
|
cardHref: string;
|
|
9
|
+
cardHrefNav: string;
|
|
12
10
|
showMedia: boolean | null;
|
|
11
|
+
fullHeight: boolean;
|
|
12
|
+
fullWidth: boolean;
|
|
13
|
+
stretch: boolean;
|
|
13
14
|
private static __iconLoaded;
|
|
14
15
|
private static __rippleLoaded;
|
|
15
16
|
protected firstUpdated(): Promise<void>;
|
|
16
17
|
static styles: import('lit').CSSResult;
|
|
17
18
|
render(): import('lit-html').TemplateResult<1>;
|
|
18
19
|
private _onKeyDown;
|
|
20
|
+
private _handleHrefNavigation;
|
|
19
21
|
}
|