scb-wc-test 0.1.75 → 0.1.77

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.
@@ -1,4 +1,4 @@
1
- import{a as h,n as d,i as c,x as r,t as g}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-search/scb-search.js";import"../scb-avatar/scb-avatar.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-button/scb-button.js";import"../scb-list/scb-list.js";import"../scb-list/scb-list-item.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(i,e,t){try{customElements.get(i)||s(i,e,t)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var m=Object.defineProperty,f=Object.getOwnPropertyDescriptor,p=(a,s,i,e)=>{for(var t=e>1?void 0:e?f(s,i):s,n=a.length-1,o;n>=0;n--)(o=a[n])&&(t=(e?o(s,i,t):o(t))||t);return e&&t&&m(s,i,t),t};let l=class extends c{constructor(){super(...arguments),this.title="",this.type="default",this.position="default",this.searchSupportingText=""}handleAvatarSlotChange(a){a.target.assignedElements({flatten:!0}).forEach(e=>{e.tagName==="SCB-AVATAR"&&e.setAttribute("size","small")})}render(){switch(this.type){case"small-flexible":return r`
1
+ import{a as h,n as d,i as c,x as r,t as m}from"../../vendor/vendor.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-search/scb-search.js";import"../scb-avatar/scb-avatar.js";import"../../vendor/preload-helper.js";import"../../vendor/vendor-material.js";import"../scb-tooltip/scb-tooltip.js";import"../scb-button/scb-button.js";import"../scb-list/scb-list.js";import"../scb-list/scb-list-item.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(a,t,i){try{customElements.get(a)||s(a,t,i)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var g=Object.defineProperty,v=Object.getOwnPropertyDescriptor,p=(e,s,a,t)=>{for(var i=t>1?void 0:t?v(s,a):s,n=e.length-1,o;n>=0;n--)(o=e[n])&&(i=(t?o(s,a,i):o(i))||i);return t&&i&&g(s,a,i),i};let l=class extends c{constructor(){super(...arguments),this.title="",this.type="default",this.position="default",this.searchSupportingText=""}handleAvatarSlotChange(e){e.target.assignedElements({flatten:!0}).forEach(t=>{t.tagName==="SCB-AVATAR"&&t.setAttribute("size","small")})}updated(e){e.has("title")&&this.dispatchEvent(new CustomEvent("title-changed",{detail:{title:this.title},bubbles:!0,composed:!0})),e.has("position")&&this.dispatchEvent(new CustomEvent("position-changed",{detail:{position:this.position},bubbles:!0,composed:!0})),e.has("type")&&this.dispatchEvent(new CustomEvent("type-changed",{detail:{type:this.type},bubbles:!0,composed:!0})),e.has("searchSupportingText")&&this.dispatchEvent(new CustomEvent("search-supporting-text-changed",{detail:{searchSupportingText:this.searchSupportingText},bubbles:!0,composed:!0}))}render(){switch(this.type){case"small-flexible":return r`
2
2
  <header class="small-flexible ${this.position=="bottom"?"position-bottom":this.position=="top"?"position-top":""}" role="banner" aria-label="Small app bar">
3
3
  <div class="leading">
4
4
  <slot name="leading"></slot>
@@ -62,6 +62,7 @@ import{a as h,n as d,i as c,x as r,t as g}from"../../vendor/vendor.js";import"..
62
62
  `}}};l.styles=[h`
63
63
  :host {
64
64
  display: block;
65
+ font-family: var(--brand, Inter);
65
66
  position: relative;
66
67
  container-type: inline-size;
67
68
  container-name: app-bar-container;
@@ -155,4 +156,4 @@ import{a as h,n as d,i as c,x as r,t as g}from"../../vendor/vendor.js";import"..
155
156
  display: flex;
156
157
  align-items: center;
157
158
  }
158
- `];p([d({type:String})],l.prototype,"title",2);p([d({type:String})],l.prototype,"type",2);p([d({type:String,reflect:!0})],l.prototype,"position",2);p([d({type:String,attribute:"search-supporting-text"})],l.prototype,"searchSupportingText",2);l=p([g("scb-app-bar")],l);
159
+ `];p([d({type:String})],l.prototype,"title",2);p([d({type:String})],l.prototype,"type",2);p([d({type:String,reflect:!0})],l.prototype,"position",2);p([d({type:String,attribute:"search-supporting-text"})],l.prototype,"searchSupportingText",2);l=p([m("scb-app-bar")],l);
@@ -46,7 +46,11 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as h,n,i as m,E as p
46
46
  ${this.renderBody(t,e)}
47
47
  </div>
48
48
  `}};i.styles=h`
49
- :host { display:block; position:relative; }
49
+ :host {
50
+ display:block;
51
+ position:relative;
52
+ font-family: var(--brand, Inter);
53
+ }
50
54
 
51
55
  .scrim {
52
56
  position: var(--scb-dialog-scrim-position, fixed);
@@ -1,17 +1,19 @@
1
- import{a as u,n as l,i as p,x as d,t as h}from"../../vendor/vendor.js";import"./scb-menu-item.js";import"./scb-sub-menu.js";import"../scb-divider/scb-divider.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var s=customElements.define.bind(customElements);customElements.define=function(e,i,n){try{customElements.get(e)||s(e,i,n)}catch(r){var o=String(r||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var m=Object.defineProperty,_=Object.getOwnPropertyDescriptor,c=(t,s,e,i)=>{for(var n=i>1?void 0:i?_(s,e):s,o=t.length-1,r;o>=0;o--)(r=t[o])&&(n=(i?r(s,e,n):r(n))||n);return i&&n&&m(s,e,n),n};let a=class extends p{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.__lastTriggerEl=null,this.__onDocumentClick=t=>{if(!this.inSb&&this.open&&!this.isClickInScbMenu(t)){this.__setOpen(!1);return}const s=this.__getActionFromEvent(t);if(s){s==="open"&&(this.__setOpen(!0),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),s==="close"&&(this.__setOpen(!1),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))),s==="toggle"&&(this.__setOpen(!this.open),this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0}))),t.stopPropagation();return}},this.__onDocumentKeydown=t=>{if(this.open&&t.key==="Escape"){this.__setOpen(!1);return}}}render(){return d`
1
+ import{a as u,n as l,i as p,x as d,t as h}from"../../vendor/vendor.js";import"./scb-menu-item.js";import"./scb-sub-menu.js";import"../scb-divider/scb-divider.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var n=customElements.define.bind(customElements);customElements.define=function(e,i,s){try{customElements.get(e)||n(e,i,s)}catch(r){var o=String(r||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw r}}}}catch{}})();var m=Object.defineProperty,_=Object.getOwnPropertyDescriptor,c=(t,n,e,i)=>{for(var s=i>1?void 0:i?_(n,e):n,o=t.length-1,r;o>=0;o--)(r=t[o])&&(s=(i?r(n,e,s):r(s))||s);return i&&s&&m(n,e,s),s};let a=class extends p{constructor(){super(...arguments),this.open=!1,this.inSb=!1,this.__lastTriggerEl=null,this.__onDocumentClick=t=>{if(!this.inSb&&this.open&&!this.isClickInScbMenu(t)){this.__setOpen(!1);return}const n=this.__getActionFromEvent(t);if(n){n==="open"&&(this.__setOpen(!0),this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0}))),n==="close"&&(this.__setOpen(!1),this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))),n==="toggle"&&(this.__setOpen(!this.open),this.dispatchEvent(new CustomEvent("toggle",{bubbles:!0,composed:!0}))),t.stopPropagation();return}},this.__onDocumentKeydown=t=>{if(this.open&&t.key==="Escape"){this.__setOpen(!1);return}}}render(){return d`
2
2
  <div
3
3
  role="menu"
4
4
  class="scb-menu-panel${this.open?" open":""}"
5
5
  >
6
6
  <slot></slot>
7
7
  </div>
8
- `}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),super.disconnectedCallback()}__setOpen(t){this.open=t}__getActionFromEvent(t){if(!this.id)return null;const s=t.composedPath();for(const e of s)if(e instanceof Element){if(e.getAttribute("data-menu-open")===this.id)return this.__lastTriggerEl=e,"open";if(e.getAttribute("data-menu-close")===this.id)return this.__lastTriggerEl=e,"close";if(e.getAttribute("data-menu-toggle")===this.id)return this.__lastTriggerEl=e,"toggle";if(e.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=e,"toggle"}return null}isClickInScbMenu(t){return t.composedPath().some(e=>e instanceof Element&&(e.tagName==="SCB-MENU"||e.tagName==="SCB-SUB-MENU"))}updated(t){t.has("open")&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}__applyOpenSideEffects(){this.__updateTriggersExpanded()}__updateTriggersExpanded(){if(!this.id)return;document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(s=>{s.hasAttribute("aria-controls")&&s.setAttribute("aria-expanded",String(this.open))})}};a.styles=u`
8
+ `}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.__onDocumentClick,!1),document.addEventListener("keydown",this.__onDocumentKeydown,!0)}disconnectedCallback(){document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),super.disconnectedCallback()}__setOpen(t){this.open=t}__getActionFromEvent(t){if(!this.id)return null;const n=t.composedPath();for(const e of n)if(e instanceof Element){if(e.getAttribute("data-menu-open")===this.id)return this.__lastTriggerEl=e,"open";if(e.getAttribute("data-menu-close")===this.id)return this.__lastTriggerEl=e,"close";if(e.getAttribute("data-menu-toggle")===this.id)return this.__lastTriggerEl=e,"toggle";if(e.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=e,"toggle"}return null}isClickInScbMenu(t){return t.composedPath().some(e=>e instanceof Element&&(e.tagName==="SCB-MENU"||e.tagName==="SCB-SUB-MENU"))}updated(t){t.has("open")&&(this.__applyOpenSideEffects(),this.open?this.dispatchEvent(new CustomEvent("open",{bubbles:!0,composed:!0})):this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0})))}__applyOpenSideEffects(){this.__updateTriggersExpanded()}__updateTriggersExpanded(){if(!this.id)return;document.querySelectorAll(`[aria-controls="${this.id}"], [data-menu-open="${this.id}"], [data-menu-close="${this.id}"], [data-menu-toggle="${this.id}"]`).forEach(n=>{n.hasAttribute("aria-controls")&&n.setAttribute("aria-expanded",String(this.open))})}};a.styles=u`
9
9
  :host {
10
10
  position: absolute;
11
11
  display: block;
12
12
  width: fit-content;
13
+ font-family: var(--brand-font);
13
14
  --scb-menu-max-width: 300px;
14
15
  --scb-menu-max-height: 600px;
16
+ z-index: 1000;
15
17
  }
16
18
  :host > .scb-menu-panel {
17
19
  padding: var(--spacing-3) 0;
@@ -7,6 +7,7 @@ import{a as u,n as a,i as c,x as h,t as m}from"../../vendor/vendor.js";import"./
7
7
  display: grid;
8
8
  grid-auto-flow: column;
9
9
  grid-auto-columns: 1fr;
10
+ font-family: var(--brand, Inter);
10
11
  }
11
12
  /* Border radius only on first and last button */
12
13
  ::slotted(scb-segmented-item:first-child .segmented-item),
@@ -1,74 +1,125 @@
1
- import{a as p,n as i,i as m,x as s,t as h}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var d=typeof globalThis<"u"?globalThis:window;if(!d.__scb_ce_guard_installed__){d.__scb_ce_guard_installed__=!0;var l=customElements.define.bind(customElements);customElements.define=function(r,n,o){try{customElements.get(r)||l(r,n,o)}catch(c){var a=String(c||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,e=(d,l,r,n)=>{for(var o=n>1?void 0:n?v(l,r):l,a=d.length-1,c;a>=0;a--)(c=d[a])&&(o=(n?c(l,r,o):c(o))||o);return n&&o&&b(l,r,o),o};let t=class extends m{constructor(){super(...arguments),this.label="",this.symbolVariant="number",this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant="horizontal",this.icon=""}render(){switch(this.symbolVariant){case"icon":return s`
2
- <div class="symbol">
3
- ${this.completed&&this.changeOnCompleted?s`<md-icon>check</md-icon>`:s`<md-icon>${this.icon}</md-icon>`}
4
- </div>
5
-
6
- <div class="content">
7
- <div class="label">${this.label}</div>
8
- <slot></slot>
9
- </div>
10
- `;case"marker":return s`
11
- <div class="symbol">
12
- </div>
13
- <div class="content">
14
- <div class="label">${this.label}</div>
15
- <slot></slot>
16
- </div>
17
- `;default:return s`
18
- <div class="symbol">
19
- ${this.completed&&this.changeOnCompleted?s`<md-icon>check</md-icon>`:s`<span>${this.number}</span>`}
20
- </div>
21
- <div class="content">
22
- <div class="label">${this.label}</div>
23
- <slot></slot>
24
- </div>
25
- `}}};t.styles=p`
1
+ import{a as m,n as a,i as p,x as l,t as b}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var i=customElements.define.bind(customElements);customElements.define=function(o,n,r){try{customElements.get(o)||i(o,n,r)}catch(d){var c=String(d||"");if(c.indexOf("already been used")===-1&&c.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var h=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=(e,i,o,n)=>{for(var r=n>1?void 0:n?u(i,o):i,c=e.length-1,d;c>=0;c--)(d=e[c])&&(r=(n?d(i,o,r):d(r))||r);return n&&r&&h(i,o,r),r};let t=class extends p{constructor(){super(...arguments),this.label="",this.subLabel="",this.symbolVariant="number",this.number=0,this.active=!1,this.completed=!1,this.changeOnCompleted=!1,this.islast=!1,this.variant="horizontal",this.icon=""}updated(){!this.subLabel||this.subLabel.trim()===""?this.setAttribute("no-content",""):this.removeAttribute("no-content")}handleKeyDown(e){e.key==="Enter"||e.key===" "?(e.preventDefault(),this.dispatchEvent(new MouseEvent("click",{bubbles:!0,composed:!0}))):(e.key==="ArrowRight"||e.key==="ArrowLeft")&&(this.dispatchEvent(new CustomEvent("scb-stepper-keynav",{detail:{key:e.key},bubbles:!0,composed:!0})),e.preventDefault())}render(){const e=this.active?"step":void 0,i=this.label?`${this.label}${this.subLabel?": "+this.subLabel:""}`:void 0;switch(this.symbolVariant){case"icon":return l`
2
+ <div
3
+ class="scb-step-content"
4
+ tabindex="0"
5
+ role="listitem"
6
+ aria-current=${e}
7
+ aria-label=${i}
8
+ @keydown=${this.handleKeyDown}
9
+ >
10
+ <md-ripple></md-ripple>
11
+ <div class="symbol">
12
+ ${this.completed&&this.changeOnCompleted?l`<md-icon>check</md-icon>`:l`<md-icon>${this.icon}</md-icon>`}
13
+ </div>
14
+ <div class="content">
15
+ <div class="label">${this.label}</div>
16
+ <div class="sub-label">${this.subLabel}</div>
17
+ </div>
18
+ <md-focus-ring></md-focus-ring>
19
+ </div>
20
+ `;case"marker":return l`
21
+ <div
22
+ class="scb-step-content"
23
+ tabindex="0"
24
+ role="listitem"
25
+ aria-current=${e}
26
+ aria-label=${i}
27
+ @keydown=${this.handleKeyDown}
28
+ >
29
+ <md-ripple></md-ripple>
30
+ <div class="symbol">
31
+ ${this.completed&&this.changeOnCompleted?l`<md-icon>check</md-icon>`:l``}
32
+ </div>
33
+ <div class="content">
34
+ <div class="label">${this.label}</div>
35
+ <div class="sub-label">${this.subLabel}</div>
36
+ </div>
37
+ <md-focus-ring></md-focus-ring>
38
+ </div>
39
+ `;default:return l`
40
+ <div
41
+ class="scb-step-content"
42
+ tabindex="0"
43
+ role="listitem"
44
+ aria-current=${e}
45
+ aria-label=${i}
46
+ @keydown=${this.handleKeyDown}
47
+ >
48
+ <md-ripple></md-ripple>
49
+ <div class="symbol">
50
+ ${this.completed&&this.changeOnCompleted?l`<md-icon>check</md-icon>`:l`<span>${this.number}</span>`}
51
+ </div>
52
+ <div class="content">
53
+ <div class="label">${this.label}</div>
54
+ <div class="sub-label">${this.subLabel}</div>
55
+ </div>
56
+ <md-focus-ring></md-focus-ring>
57
+ </div>
58
+ `}}};t.styles=m`
26
59
  :host {
27
- display: flex;
28
- flex-direction: column;
29
- align-items: center;
30
- min-width: 80px;
31
- flex: 1 1 0;
32
- cursor: pointer;
33
- background: none;
34
- box-sizing: border-box;
35
- user-select: none;
36
-
37
- }
38
-
60
+ font-family: var(--brand-font);
61
+ }
62
+ .scb-step-content {
63
+ width: 100%;
64
+ height: 100%;
65
+ display: flex;
66
+ flex-direction: column;
67
+ align-items: center;
68
+ position: relative;
69
+ flex: 1 1 0;
70
+ cursor: pointer;
71
+ background: none;
72
+ box-sizing: border-box;
73
+ user-select: none;
74
+ padding: var(--spacing-4);
75
+ }
76
+ .scb-step-content:focus,
77
+ .scb-step-content:focus-visible {
78
+ outline: none ;
79
+ box-shadow: none ;
80
+ }
39
81
  .symbol {
40
- background-color: var(--n-70);
41
- color: var(--md-sys-color-on-primary);
42
- border-radius: 50%;
43
- min-width: 32px;
44
- height: 32px;
45
- display: flex;
46
- align-items: center;
47
- justify-content: center;
48
- font-weight: 600;
49
- font-size: 14px;
50
- position: relative;
51
- z-index: 1;
82
+ background-color: var(--md-sys-color-outline-variant);
83
+ color: var(--md-sys-color-on-primary);
84
+ border-radius: var(--md-sys-shape-corner-full);
85
+ min-width: var(--icon-size-medium);
86
+ height: var(--icon-size-medium);
87
+ display: flex;
88
+ align-items: center;
89
+ justify-content: center;
90
+ font-weight: var(--md-sys-typescale-label-small-weight);
91
+ font-size: var(--md-sys-typescale-label-small-size);
92
+ line-height: var(--md-sys-typescale-label-small-line-height);
93
+ letter-spacing: var(--md-sys-typescale-label-small-tracking);
94
+ position: relative;
95
+ z-index: 1;
96
+ }
97
+ md-focus-ring {
98
+ border-radius: var(--md-sys-shape-corner-small);
52
99
  }
53
100
  md-icon {
54
101
  font-size: 20px;
55
102
  }
56
103
  :host([active]) .symbol {
57
104
  background-color: var(--md-sys-color-primary);
105
+ color: var(--md-sys-color-on-primary);
58
106
  }
59
107
  :host([completed]) .symbol {
60
108
  background-color: var(--md-sys-color-primary);
109
+ color: var(--md-sys-color-on-primary);
61
110
  }
62
111
  .label {
63
- margin-top: 8px;
112
+ margin-top: var(--spacing-3);
64
113
  text-align: center;
65
- font-size: 16px;
66
- color: var(--md-sys-color-on-surface, #222);
114
+ font-size: var(--md-sys-typescale-label-medium-size);
115
+ line-height: var(--md-sys-typescale-label-medium-line-height);
116
+ letter-spacing: var(--md-sys-typescale-label-medium-tracking);
117
+ color: var(--md-sys-color-on-surface);
67
118
  max-width: 90px;
68
119
  word-break: break-word;
69
- margin-bottom: 8px;
120
+ margin-bottom: var(--spacing-3);
70
121
  }
71
- :host([active]) .label, :host([active]) slot {
122
+ :host([active]) .label, :host([active]) .sub-label {
72
123
  font-weight: 600;
73
124
  }
74
125
  .content{
@@ -77,19 +128,38 @@ import{a as p,n as i,i as m,x as s,t as h}from"../../vendor/vendor.js";import"..
77
128
  align-items: center;
78
129
  }
79
130
  :host([variant="vertical"]) {
80
- flex-direction: row;
81
- align-items: flex-start;
82
- gap: 16px;
83
-
131
+ .scb-step-content {
132
+ flex-direction: row;
133
+ align-items: flex-start;
134
+ gap: var(--spacing-5);
135
+ padding: var(--spacing-4);
136
+ }
137
+ }
138
+ :host([no-content]) {
139
+ .scb-step-content {
140
+ align-items: center;
141
+ .label {
142
+ margin-bottom: 0px;
143
+ }
144
+ }
84
145
  }
85
146
  :host([variant="vertical"]) .label{
86
147
  margin-top: 0;
87
148
  }
88
149
  :host([variant="vertical"]) .content{
89
150
  align-items: flex-start;
151
+
90
152
  }
91
153
  :host([symbol-variant="marker"]) .symbol {
92
154
  min-width: 16px;
93
155
  height: 16px;
94
156
  }
95
- `;e([i({type:String,reflect:!0})],t.prototype,"label",2);e([i({type:String,reflect:!0,attribute:"symbol-variant"})],t.prototype,"symbolVariant",2);e([i({type:Number,reflect:!0})],t.prototype,"number",2);e([i({type:Boolean,reflect:!0})],t.prototype,"active",2);e([i({type:Boolean,reflect:!0})],t.prototype,"completed",2);e([i({type:Boolean,reflect:!0})],t.prototype,"changeOnCompleted",2);e([i({type:Boolean,reflect:!0})],t.prototype,"islast",2);e([i({type:String,reflect:!0})],t.prototype,"variant",2);e([i({type:String})],t.prototype,"icon",2);t=e([h("scb-step")],t);
157
+ :host([symbol-variant="marker"][completed][change-on-completed]) .symbol {
158
+ background-color: transparent;
159
+ color: var(--md-sys-color-primary);
160
+ md-icon{
161
+ font-size: var(--icon-size-small);
162
+ }
163
+ }
164
+
165
+ `;s([a({type:String,reflect:!0})],t.prototype,"label",2);s([a({type:String,reflect:!0,attribute:"sub-label"})],t.prototype,"subLabel",2);s([a({type:String,reflect:!0,attribute:"symbol-variant"})],t.prototype,"symbolVariant",2);s([a({type:Number,reflect:!0})],t.prototype,"number",2);s([a({type:Boolean,reflect:!0})],t.prototype,"active",2);s([a({type:Boolean,reflect:!0})],t.prototype,"completed",2);s([a({type:Boolean,reflect:!0,attribute:"change-on-completed"})],t.prototype,"changeOnCompleted",2);s([a({type:Boolean,reflect:!0})],t.prototype,"islast",2);s([a({type:String,reflect:!0})],t.prototype,"variant",2);s([a({type:String})],t.prototype,"icon",2);t=s([b("scb-step")],t);
@@ -1,13 +1,19 @@
1
- import{a as c,n as p,r as d,i as h,x as f,t as u}from"../../vendor/vendor.js";import"./scb-step.js";import"../../vendor/vendor-material.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(i,s,r){try{customElements.get(i)||t(i,s,r)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,l=(e,t,i,s)=>{for(var r=s>1?void 0:s?v(t,i):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(s?o(t,i,r):o(r))||r);return s&&r&&b(t,i,r),r};let a=class extends h{constructor(){super(...arguments),this.label="",this.changeOnCompleted=!1,this.variant="horizontal",this.symbolVariant="number",this.activeIndex=0,this._onStepContainerClick=e=>{const t=this._getSteps(),i=e.composedPath(),s=t.findIndex(r=>i.includes(r));s!==-1&&this._onStepClick(s)}}_onStepClick(e){this.activeIndex=e,this._updateSteps()}_updateSteps(){const e=this._getSteps();e.forEach((t,i)=>{t.active=i===this.activeIndex,t.completed=i<this.activeIndex,t.islast=!1,t.changeOnCompleted=this.changeOnCompleted,t.number=i+1,t.variant=this.variant,t.symbolVariant=this.symbolVariant}),e.length>0&&(e[e.length-1].islast=!0)}_getSteps(){return Array.from(this.querySelectorAll("scb-step"))}firstUpdated(){this._updateSteps()}updated(){this._updateSteps()}render(){return f`
2
- <div class="steps" style="flex-direction: ${this.variant==="vertical"?"column":"row"}; align-items: ${this.variant==="vertical","flex-start"};" @click=${this._onStepContainerClick}>
1
+ import{a as l,n as p,r as h,i as d,x as f,t as v}from"../../vendor/vendor.js";import"./scb-step.js";import"../../vendor/vendor-material.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(s,i,n){try{customElements.get(s)||e(s,i,n)}catch(c){var a=String(c||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var u=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(t,e,s,i)=>{for(var n=i>1?void 0:i?b(e,s):e,a=t.length-1,c;a>=0;a--)(c=t[a])&&(n=(i?c(e,s,n):c(n))||n);return i&&n&&u(e,s,n),n};let o=class extends d{constructor(){super(...arguments),this.type="",this.label="",this.changeOnCompleted=!1,this.variant="horizontal",this.symbolVariant="number",this.activeIndex=0,this._onKeyNav=t=>{const e=this._getSteps(),s=this.activeIndex;let i=s;t.detail.key==="ArrowRight"?s<e.length-1?i=s+1:i=0:t.detail.key==="ArrowLeft"&&(s>0?i=s-1:i=e.length-1),i!==s&&(this._onStepClick(i),setTimeout(()=>{const n=e[i].shadowRoot?.querySelector(".scb-step-content");n&&"focus"in n&&typeof n.focus=="function"&&n.focus()},0))},this._onStepContainerClick=t=>{const e=this._getSteps(),s=t.composedPath(),i=e.findIndex(n=>s.includes(n));i!==-1&&this._onStepClick(i)}}_onStepClick(t){const e=this.activeIndex;this.activeIndex=t,this._updateSteps(),this.dispatchEvent(new CustomEvent("scb-step-change",{detail:{index:this.activeIndex,step:this._getSteps()[this.activeIndex]},bubbles:!0,composed:!0})),t>e?this.dispatchEvent(new CustomEvent("scb-step-next",{detail:{from:e,to:t,step:this._getSteps()[t]},bubbles:!0,composed:!0})):t<e&&this.dispatchEvent(new CustomEvent("scb-step-prev",{detail:{from:e,to:t,step:this._getSteps()[t]},bubbles:!0,composed:!0}))}nextStep(){const t=this._getSteps();this.activeIndex<t.length-1&&this._onStepClick(this.activeIndex+1)}prevStep(){this.activeIndex>0&&this._onStepClick(this.activeIndex-1)}getActiveIndex(){return this.activeIndex}_updateSteps(){const t=this._getSteps();t.forEach((e,s)=>{e.active=s===this.activeIndex,e.completed=s<this.activeIndex,e.islast=!1,e.changeOnCompleted=this.changeOnCompleted,e.number=s+1,e.variant=this.variant,e.symbolVariant=this.symbolVariant}),t.length>0&&(t[t.length-1].islast=!0)}_getSteps(){return Array.from(this.querySelectorAll("scb-step"))}firstUpdated(){this._updateSteps()}updated(){this._updateSteps()}render(){return f`
2
+ <div
3
+ class="steps"
4
+ role="list"
5
+ aria-label="Steg i processen"
6
+ @click=${this._onStepContainerClick}
7
+ @scb-stepper-keynav=${this._onKeyNav}
8
+ >
3
9
  <slot></slot>
4
- </div>
5
- `}};a.styles=c`
10
+ </div>
11
+ `}};o.styles=l`
6
12
  :host {
7
13
  --scb-stepper-width: 100%;
8
14
  --scb-stepper-height: 100%;
9
15
  display: block;
10
- padding: 16px;
16
+ padding: var(--spacing-5) 0;
11
17
  width: 100%;
12
18
  color: var(--md-sys-color-on-surface);
13
19
  font-family: var(--brand-font);
@@ -17,34 +23,32 @@ import{a as c,n as p,r as d,i as h,x as f,t as u}from"../../vendor/vendor.js";im
17
23
  .steps {
18
24
  display: flex;
19
25
  flex-direction: row;
20
- align-items: flex-start;
26
+ align-items: stretch;
21
27
  justify-content: center;
22
28
  position: relative;
23
29
  width: 100%;
24
- gap: 24px;
25
- height: 100%;
30
+ gap: var(--spacing-7);
31
+ height: 100%;
26
32
  }
27
33
  :host([variant='vertical']) .steps {
28
34
  flex-direction: column;
29
- align-items: flex-start;
30
- gap: 32px;
35
+ gap: var(--spacing-8);
31
36
  }
32
37
  ::slotted(scb-step) {
33
38
  position: relative;
34
39
  flex: 1 1 0;
35
- min-width: 80px;
36
40
  z-index: 1;
41
+ width: 100%;
37
42
  }
38
43
  /* Horisontell connector */
39
44
  ::slotted(scb-step:not(:first-child))::before {
40
45
  content: '';
41
46
  position: absolute;
42
47
  left: -50%;
43
- top: 16px;
48
+ top: 28px;
44
49
  width: calc(100% - 24px);
45
50
  height: 1px;
46
51
  background: var(--n-70);
47
- border-radius: 1px;
48
52
  z-index: 0;
49
53
  }
50
54
  /* Vertikal connector */
@@ -54,25 +58,26 @@ import{a as c,n as p,r as d,i as h,x as f,t as u}from"../../vendor/vendor.js";im
54
58
  ::slotted(scb-step[variant="vertical"]:not(:last-child))::after {
55
59
  content: '';
56
60
  position: absolute;
57
- left: 16px;
58
- top: 40px;
61
+ left: 28px;
62
+ top: 52px;
59
63
  width: 1px;
60
64
  height: calc(100% - 16px);
61
65
  background: var(--n-70);
62
- border-radius: 1px;
63
66
  z-index: 0;
64
67
  transform: translateX(-50%);
65
68
  }
66
69
  ::slotted(scb-step[variant="vertical"][symbol-variant="marker"]:not(:last-child))::after {
67
70
  content: "";
68
71
  position: absolute;
69
- left: 8px;
70
- top: 25px;
72
+ left: 20px;
73
+ top: 38px;
71
74
  width: 1px;
72
75
  height: calc(100% - 2px);
73
76
  background: var(--n-70);
74
- border-radius: 1px;
75
77
  z-index: 0;
76
78
  transform: translateX(-50%);
77
79
  }
78
- `;l([p({type:String,reflect:!0})],a.prototype,"label",2);l([p({type:Boolean,reflect:!0,attribute:"change-on-completed"})],a.prototype,"changeOnCompleted",2);l([p({type:String})],a.prototype,"variant",2);l([p({type:String,reflect:!0,attribute:"symbol-variant"})],a.prototype,"symbolVariant",2);l([d()],a.prototype,"activeIndex",2);a=l([u("scb-stepper")],a);
80
+ ::slotted(scb-step[symbol-variant="marker"]:not(:first-child))::before {
81
+ top: 20px;
82
+ }
83
+ `;r([p({type:String,reflect:!0})],o.prototype,"type",2);r([p({type:String,reflect:!0})],o.prototype,"label",2);r([p({type:Boolean,reflect:!0,attribute:"change-on-completed"})],o.prototype,"changeOnCompleted",2);r([p({type:String})],o.prototype,"variant",2);r([p({type:String,reflect:!0,attribute:"symbol-variant"})],o.prototype,"symbolVariant",2);r([h()],o.prototype,"activeIndex",2);o=r([v("scb-stepper")],o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc-test",
3
- "version": "0.1.75",
3
+ "version": "0.1.77",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -304,5 +304,5 @@
304
304
  },
305
305
  "./mvc/*": "./mvc/*"
306
306
  },
307
- "buildHash": "D530B6DFBE9DE8D09579B66E6A5F11B57D495F3BB33A88B2906A615C20C2CE1B"
307
+ "buildHash": "9654E007E17D24662A82AD02ECACF387F89862A4BE4BFCCB069844AC57ECC2E9"
308
308
  }
@@ -6,5 +6,6 @@ export declare class ScbAppBar extends LitElement {
6
6
  searchSupportingText: string;
7
7
  static styles: import('lit').CSSResult[];
8
8
  private handleAvatarSlotChange;
9
+ protected updated(changed: Map<string, unknown>): void;
9
10
  render(): import('lit-html').TemplateResult<1>;
10
11
  }
@@ -1,26 +1,30 @@
1
- import { css as d, LitElement as c, html as s } from "lit";
2
- import { property as r, customElement as g } from "lit/decorators.js";
1
+ import { css as d, LitElement as c, html as l } from "lit";
2
+ import { property as r, customElement as m } from "lit/decorators.js";
3
3
  import "../scb-icon-button/scb-icon-button.js";
4
4
  import "../scb-search/scb-search.js";
5
5
  import "../scb-avatar/scb-avatar.js";
6
- var m = Object.defineProperty, v = Object.getOwnPropertyDescriptor, l = (n, a, o, e) => {
7
- for (var t = e > 1 ? void 0 : e ? v(a, o) : a, p = n.length - 1, h; p >= 0; p--)
8
- (h = n[p]) && (t = (e ? h(a, o, t) : h(t)) || t);
9
- return e && t && m(a, o, t), t;
6
+ var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, n = (e, s, o, t) => {
7
+ for (var i = t > 1 ? void 0 : t ? v(s, o) : s, p = e.length - 1, h; p >= 0; p--)
8
+ (h = e[p]) && (i = (t ? h(s, o, i) : h(i)) || i);
9
+ return t && i && g(s, o, i), i;
10
10
  };
11
- let i = class extends c {
11
+ let a = class extends c {
12
12
  constructor() {
13
13
  super(...arguments), this.title = "", this.type = "default", this.position = "default", this.searchSupportingText = "";
14
14
  }
15
- handleAvatarSlotChange(n) {
16
- n.target.assignedElements({ flatten: !0 }).forEach((e) => {
17
- e.tagName === "SCB-AVATAR" && e.setAttribute("size", "small");
15
+ handleAvatarSlotChange(e) {
16
+ e.target.assignedElements({ flatten: !0 }).forEach((t) => {
17
+ t.tagName === "SCB-AVATAR" && t.setAttribute("size", "small");
18
18
  });
19
19
  }
20
+ // Sänd förändrings-event när egenskaper uppdateras
21
+ updated(e) {
22
+ e.has("title") && this.dispatchEvent(new CustomEvent("title-changed", { detail: { title: this.title }, bubbles: !0, composed: !0 })), e.has("position") && this.dispatchEvent(new CustomEvent("position-changed", { detail: { position: this.position }, bubbles: !0, composed: !0 })), e.has("type") && this.dispatchEvent(new CustomEvent("type-changed", { detail: { type: this.type }, bubbles: !0, composed: !0 })), e.has("searchSupportingText") && this.dispatchEvent(new CustomEvent("search-supporting-text-changed", { detail: { searchSupportingText: this.searchSupportingText }, bubbles: !0, composed: !0 }));
23
+ }
20
24
  render() {
21
25
  switch (this.type) {
22
26
  case "small-flexible":
23
- return s`
27
+ return l`
24
28
  <header class="small-flexible ${this.position == "bottom" ? "position-bottom" : this.position == "top" ? "position-top" : ""}" role="banner" aria-label="Small app bar">
25
29
  <div class="leading">
26
30
  <slot name="leading"></slot>
@@ -33,7 +37,7 @@ let i = class extends c {
33
37
  </header>
34
38
  `;
35
39
  case "medium-flexible":
36
- return s`
40
+ return l`
37
41
  <header class="medium-flexible ${this.position == "bottom" ? "position-bottom" : this.position == "top" ? "position-top" : ""}" role="banner" aria-label="Medium flexible app bar">
38
42
  <div class="action-elements">
39
43
  <div>
@@ -48,7 +52,7 @@ let i = class extends c {
48
52
  </header>
49
53
  `;
50
54
  case "large-flexible":
51
- return s`
55
+ return l`
52
56
  <header class="large-flexible ${this.position == "bottom" ? "position-bottom" : this.position == "top" ? "position-top" : ""}" role="banner" aria-label="Large flexible app bar">
53
57
  <div class="action-elements">
54
58
  <div style="">
@@ -63,7 +67,7 @@ let i = class extends c {
63
67
  </header>
64
68
  `;
65
69
  case "search":
66
- return s`
70
+ return l`
67
71
  <header class="search ${this.position == "bottom" ? "position-bottom" : this.position == "top" ? "position-top" : ""}" role="banner" aria-label="Search app bar">
68
72
  <div class="leading">
69
73
  <slot name="leading"></slot>
@@ -78,7 +82,7 @@ let i = class extends c {
78
82
  </header>
79
83
  `;
80
84
  default:
81
- return s`
85
+ return l`
82
86
  <header class="default ${this.position == "bottom" ? "position-bottom" : this.position == "top" ? "position-top" : ""}" role="banner" aria-label="Small app bar">
83
87
  <div class="leading">
84
88
  <slot name="leading"></slot>
@@ -93,10 +97,11 @@ let i = class extends c {
93
97
  }
94
98
  }
95
99
  };
96
- i.styles = [
100
+ a.styles = [
97
101
  d`
98
102
  :host {
99
103
  display: block;
104
+ font-family: var(--brand, Inter);
100
105
  position: relative;
101
106
  container-type: inline-size;
102
107
  container-name: app-bar-container;
@@ -192,21 +197,21 @@ i.styles = [
192
197
  }
193
198
  `
194
199
  ];
195
- l([
200
+ n([
196
201
  r({ type: String })
197
- ], i.prototype, "title", 2);
198
- l([
202
+ ], a.prototype, "title", 2);
203
+ n([
199
204
  r({ type: String })
200
- ], i.prototype, "type", 2);
201
- l([
205
+ ], a.prototype, "type", 2);
206
+ n([
202
207
  r({ type: String, reflect: !0 })
203
- ], i.prototype, "position", 2);
204
- l([
208
+ ], a.prototype, "position", 2);
209
+ n([
205
210
  r({ type: String, attribute: "search-supporting-text" })
206
- ], i.prototype, "searchSupportingText", 2);
207
- i = l([
208
- g("scb-app-bar")
209
- ], i);
211
+ ], a.prototype, "searchSupportingText", 2);
212
+ a = n([
213
+ m("scb-app-bar")
214
+ ], a);
210
215
  export {
211
- i as ScbAppBar
216
+ a as ScbAppBar
212
217
  };
@@ -221,7 +221,11 @@ let i = class extends u {
221
221
  }
222
222
  };
223
223
  i.styles = h`
224
- :host { display:block; position:relative; }
224
+ :host {
225
+ display:block;
226
+ position:relative;
227
+ font-family: var(--brand, Inter);
228
+ }
225
229
 
226
230
  .scrim {
227
231
  position: var(--scb-dialog-scrim-position, fixed);
@@ -92,8 +92,10 @@ i.styles = u`
92
92
  position: absolute;
93
93
  display: block;
94
94
  width: fit-content;
95
+ font-family: var(--brand-font);
95
96
  --scb-menu-max-width: 300px;
96
97
  --scb-menu-max-height: 600px;
98
+ z-index: 1000;
97
99
  }
98
100
  :host > .scb-menu-panel {
99
101
  padding: var(--spacing-3) 0;
@@ -1,9 +1,9 @@
1
- import { css as a, LitElement as c, html as m } from "lit";
1
+ import { css as u, LitElement as c, html as m } from "lit";
2
2
  import { property as n, customElement as h } from "lit/decorators.js";
3
3
  import "./scb-segmented-item.js";
4
4
  var b = Object.defineProperty, f = Object.getOwnPropertyDescriptor, d = (r, i, e, t) => {
5
- for (var s = t > 1 ? void 0 : t ? f(i, e) : i, o = r.length - 1, u; o >= 0; o--)
6
- (u = r[o]) && (s = (t ? u(i, e, s) : u(s)) || s);
5
+ for (var s = t > 1 ? void 0 : t ? f(i, e) : i, o = r.length - 1, a; o >= 0; o--)
6
+ (a = r[o]) && (s = (t ? a(i, e, s) : a(s)) || s);
7
7
  return t && s && b(i, e, s), s;
8
8
  };
9
9
  let l = class extends c {
@@ -58,7 +58,7 @@ let l = class extends c {
58
58
  return m`<slot></slot>`;
59
59
  }
60
60
  };
61
- l.styles = a`
61
+ l.styles = u`
62
62
  :host {
63
63
  --scb-segmented-button-width: 100%;
64
64
  --scb-segmented-button-height: 48px;
@@ -67,6 +67,7 @@ l.styles = a`
67
67
  display: grid;
68
68
  grid-auto-flow: column;
69
69
  grid-auto-columns: 1fr;
70
+ font-family: var(--brand, Inter);
70
71
  }
71
72
  /* Border radius only on first and last button */
72
73
  ::slotted(scb-segmented-item:first-child .segmented-item),