scb-wc-test 0.1.74 → 0.1.76
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 +4 -0
- package/index.d.ts +2 -0
- package/index.js +28 -24
- package/mvc/components/all.js +2 -0
- package/mvc/components/scb-app-bar/scb-app-bar.js +3 -2
- package/mvc/components/scb-dialog/scb-dialog.js +5 -1
- package/mvc/components/scb-menu/scb-menu.js +4 -2
- package/mvc/components/scb-segmented-button/scb-segmented-button.js +1 -0
- package/mvc/components/scb-stepper/scb-step.js +95 -0
- package/mvc/components/scb-stepper/scb-stepper.js +78 -0
- package/package.json +10 -2
- package/scb-app-bar/scb-app-bar.d.ts +1 -0
- package/scb-app-bar/scb-app-bar.js +33 -28
- package/scb-dialog/scb-dialog.js +5 -1
- package/scb-menu/scb-menu.js +2 -0
- package/scb-segmented-button/scb-segmented-button.js +5 -4
- package/scb-stepper/scb-step.d.ts +18 -0
- package/scb-stepper/scb-step.js +151 -0
- package/scb-stepper/scb-stepper.d.ts +20 -0
- package/scb-stepper/scb-stepper.js +136 -0
- package/scb-wc-test.bundle.js +622 -443
package/all.js
CHANGED
|
@@ -52,6 +52,8 @@ import './mvc/components/scb-segmented-button/scb-segmented-button.js';
|
|
|
52
52
|
import './mvc/components/scb-segmented-button/scb-segmented-item.js';
|
|
53
53
|
import './mvc/components/scb-snackbar/scb-snackbar.js';
|
|
54
54
|
import './mvc/components/scb-status-pill/scb-status-pill.js';
|
|
55
|
+
import './mvc/components/scb-stepper/scb-step.js';
|
|
56
|
+
import './mvc/components/scb-stepper/scb-stepper.js';
|
|
55
57
|
import './mvc/components/scb-switch/scb-switch.js';
|
|
56
58
|
import './mvc/components/scb-tabs/scb-primary-tab.js';
|
|
57
59
|
import './mvc/components/scb-tabs/scb-secondary-tab.js';
|
|
@@ -115,6 +117,8 @@ import './scb-segmented-button/scb-segmented-button.js';
|
|
|
115
117
|
import './scb-segmented-button/scb-segmented-item.js';
|
|
116
118
|
import './scb-snackbar/scb-snackbar.js';
|
|
117
119
|
import './scb-status-pill/scb-status-pill.js';
|
|
120
|
+
import './scb-stepper/scb-step.js';
|
|
121
|
+
import './scb-stepper/scb-stepper.js';
|
|
118
122
|
import './scb-switch/scb-switch.js';
|
|
119
123
|
import './scb-tabs/scb-primary-tab.js';
|
|
120
124
|
import './scb-tabs/scb-secondary-tab.js';
|
package/index.d.ts
CHANGED
|
@@ -49,6 +49,8 @@ export * from './scb-segmented-button/scb-segmented-button';
|
|
|
49
49
|
export * from './scb-segmented-button/scb-segmented-item';
|
|
50
50
|
export * from './scb-snackbar/scb-snackbar';
|
|
51
51
|
export * from './scb-status-pill/scb-status-pill';
|
|
52
|
+
export * from './scb-stepper/scb-step';
|
|
53
|
+
export * from './scb-stepper/scb-stepper';
|
|
52
54
|
export * from './scb-switch/scb-switch';
|
|
53
55
|
export * from './scb-tabs/scb-primary-tab';
|
|
54
56
|
export * from './scb-tabs/scb-secondary-tab';
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ScbAccordionItem as e } from "./scb-accordion/scb-accordion-item.js";
|
|
2
2
|
import { ScbAccordion as c } from "./scb-accordion/scb-accordion.js";
|
|
3
|
-
import { ScbAppBar as
|
|
4
|
-
import { ScbAvatar as
|
|
3
|
+
import { ScbAppBar as m } from "./scb-app-bar/scb-app-bar.js";
|
|
4
|
+
import { ScbAvatar as b } from "./scb-avatar/scb-avatar.js";
|
|
5
5
|
import { ScbBadge as f } from "./scb-badge/scb-badge.js";
|
|
6
6
|
import { SCBBreadcrumbItem as i } from "./scb-breadcrumb/scb-breadcrumb-item.js";
|
|
7
7
|
import { SCBBreadcrumb as n } from "./scb-breadcrumb/scb-breadcrumb.js";
|
|
@@ -27,8 +27,8 @@ import { ScbStack as _ } from "./scb-grid/scb-stack.js";
|
|
|
27
27
|
import { ScbHeaderDrawerGroup as rr } from "./scb-header/scb-header-drawer-group.js";
|
|
28
28
|
import { ScbHeaderDrawerItem as er } from "./scb-header/scb-header-drawer-item.js";
|
|
29
29
|
import { ScbHeaderTab as cr } from "./scb-header/scb-header-tab.js";
|
|
30
|
-
import { ScbHeaderUtility as
|
|
31
|
-
import { ScbHeader as
|
|
30
|
+
import { ScbHeaderUtility as mr } from "./scb-header/scb-header-utility.js";
|
|
31
|
+
import { ScbHeader as br } from "./scb-header/scb-header.js";
|
|
32
32
|
import { ScbHorizontalScroller as fr } from "./scb-horizontal-scroller/scb-horizontal-scroller.js";
|
|
33
33
|
import { ScbIconButton as ir } from "./scb-icon-button/scb-icon-button.js";
|
|
34
34
|
import { ScbKeyFigureCard as nr } from "./scb-keyfigure-card/scb-keyfigure-card.js";
|
|
@@ -49,21 +49,23 @@ import { ScbSegmentedButton as qr } from "./scb-segmented-button/scb-segmented-b
|
|
|
49
49
|
import { ScbSegmentedItem as Jr } from "./scb-segmented-button/scb-segmented-item.js";
|
|
50
50
|
import { ScbSnackbar as Qr } from "./scb-snackbar/scb-snackbar.js";
|
|
51
51
|
import { ScbStatusPill as Wr } from "./scb-status-pill/scb-status-pill.js";
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
52
|
+
import { ScbStep as Yr } from "./scb-stepper/scb-step.js";
|
|
53
|
+
import { ScbStepper as _r } from "./scb-stepper/scb-stepper.js";
|
|
54
|
+
import { ScbSwitch as ro } from "./scb-switch/scb-switch.js";
|
|
55
|
+
import { ScbPrimaryTab as eo } from "./scb-tabs/scb-primary-tab.js";
|
|
56
|
+
import { ScbSecondaryTab as co } from "./scb-tabs/scb-secondary-tab.js";
|
|
57
|
+
import { ScbTabs as mo } from "./scb-tabs/scb-tabs.js";
|
|
58
|
+
import { ScbTextField2 as bo } from "./scb-textfield/scb-textfield.js";
|
|
59
|
+
import { ScbTocItem as fo } from "./scb-toc/scb-toc-item.js";
|
|
60
|
+
import { ScbToc as io } from "./scb-toc/scb-toc.js";
|
|
61
|
+
import { ScbTooltip as uo } from "./scb-tooltip/scb-tooltip.js";
|
|
60
62
|
export {
|
|
61
63
|
n as SCBBreadcrumb,
|
|
62
64
|
i as SCBBreadcrumbItem,
|
|
63
65
|
c as ScbAccordion,
|
|
64
66
|
e as ScbAccordionItem,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
m as ScbAppBar,
|
|
68
|
+
b as ScbAvatar,
|
|
67
69
|
f as ScbBadge,
|
|
68
70
|
C as ScbButton,
|
|
69
71
|
l as ScbCalendarCard,
|
|
@@ -82,11 +84,11 @@ export {
|
|
|
82
84
|
J as ScbFooterSection,
|
|
83
85
|
Y as ScbGrid,
|
|
84
86
|
W as ScbGridItem,
|
|
85
|
-
|
|
87
|
+
br as ScbHeader,
|
|
86
88
|
rr as ScbHeaderDrawerGroup,
|
|
87
89
|
er as ScbHeaderDrawerItem,
|
|
88
90
|
cr as ScbHeaderTab,
|
|
89
|
-
|
|
91
|
+
mr as ScbHeaderUtility,
|
|
90
92
|
fr as ScbHorizontalScroller,
|
|
91
93
|
ir as ScbIconButton,
|
|
92
94
|
nr as ScbKeyFigureCard,
|
|
@@ -98,23 +100,25 @@ export {
|
|
|
98
100
|
kr as ScbNotification,
|
|
99
101
|
yr as ScbNotificationCard,
|
|
100
102
|
Pr as ScbPagination,
|
|
101
|
-
|
|
103
|
+
eo as ScbPrimaryTab,
|
|
102
104
|
Mr as ScbProgressIndicator,
|
|
103
105
|
Nr as ScbRadioButton,
|
|
104
106
|
zr as ScbRadioGroup,
|
|
105
107
|
Ur as ScbSearch,
|
|
106
|
-
|
|
108
|
+
co as ScbSecondaryTab,
|
|
107
109
|
qr as ScbSegmentedButton,
|
|
108
110
|
Jr as ScbSegmentedItem,
|
|
109
111
|
Qr as ScbSnackbar,
|
|
110
112
|
_ as ScbStack,
|
|
111
113
|
Wr as ScbStatusPill,
|
|
114
|
+
Yr as ScbStep,
|
|
115
|
+
_r as ScbStepper,
|
|
112
116
|
z as ScbSubDrawer,
|
|
113
117
|
Hr as ScbSubMenu,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
ro as ScbSwitch,
|
|
119
|
+
mo as ScbTabs,
|
|
120
|
+
bo as ScbTextField2,
|
|
121
|
+
io as ScbToc,
|
|
122
|
+
fo as ScbTocItem,
|
|
123
|
+
uo as ScbTooltip
|
|
120
124
|
};
|
package/mvc/components/all.js
CHANGED
|
@@ -49,6 +49,8 @@ import './scb-segmented-button/scb-segmented-button.js';
|
|
|
49
49
|
import './scb-segmented-button/scb-segmented-item.js';
|
|
50
50
|
import './scb-snackbar/scb-snackbar.js';
|
|
51
51
|
import './scb-status-pill/scb-status-pill.js';
|
|
52
|
+
import './scb-stepper/scb-step.js';
|
|
53
|
+
import './scb-stepper/scb-stepper.js';
|
|
52
54
|
import './scb-switch/scb-switch.js';
|
|
53
55
|
import './scb-tabs/scb-primary-tab.js';
|
|
54
56
|
import './scb-tabs/scb-secondary-tab.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as h,n as d,i as c,x as r,t as
|
|
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([
|
|
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 {
|
|
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
|
|
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
|
|
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),
|
|
@@ -0,0 +1,95 @@
|
|
|
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`
|
|
26
|
+
: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
|
+
|
|
39
|
+
.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;
|
|
52
|
+
}
|
|
53
|
+
md-icon {
|
|
54
|
+
font-size: 20px;
|
|
55
|
+
}
|
|
56
|
+
:host([active]) .symbol {
|
|
57
|
+
background-color: var(--md-sys-color-primary);
|
|
58
|
+
}
|
|
59
|
+
:host([completed]) .symbol {
|
|
60
|
+
background-color: var(--md-sys-color-primary);
|
|
61
|
+
}
|
|
62
|
+
.label {
|
|
63
|
+
margin-top: 8px;
|
|
64
|
+
text-align: center;
|
|
65
|
+
font-size: 16px;
|
|
66
|
+
color: var(--md-sys-color-on-surface, #222);
|
|
67
|
+
max-width: 90px;
|
|
68
|
+
word-break: break-word;
|
|
69
|
+
margin-bottom: 8px;
|
|
70
|
+
}
|
|
71
|
+
:host([active]) .label, :host([active]) slot {
|
|
72
|
+
font-weight: 600;
|
|
73
|
+
}
|
|
74
|
+
.content{
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
align-items: center;
|
|
78
|
+
}
|
|
79
|
+
:host([variant="vertical"]) {
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
align-items: flex-start;
|
|
82
|
+
gap: 16px;
|
|
83
|
+
|
|
84
|
+
}
|
|
85
|
+
:host([variant="vertical"]) .label{
|
|
86
|
+
margin-top: 0;
|
|
87
|
+
}
|
|
88
|
+
:host([variant="vertical"]) .content{
|
|
89
|
+
align-items: flex-start;
|
|
90
|
+
}
|
|
91
|
+
:host([symbol-variant="marker"]) .symbol {
|
|
92
|
+
min-width: 16px;
|
|
93
|
+
height: 16px;
|
|
94
|
+
}
|
|
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);
|
|
@@ -0,0 +1,78 @@
|
|
|
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}>
|
|
3
|
+
<slot></slot>
|
|
4
|
+
</div>
|
|
5
|
+
`}};a.styles=c`
|
|
6
|
+
:host {
|
|
7
|
+
--scb-stepper-width: 100%;
|
|
8
|
+
--scb-stepper-height: 100%;
|
|
9
|
+
display: block;
|
|
10
|
+
padding: 16px;
|
|
11
|
+
width: 100%;
|
|
12
|
+
color: var(--md-sys-color-on-surface);
|
|
13
|
+
font-family: var(--brand-font);
|
|
14
|
+
max-width: var(--scb-stepper-width);
|
|
15
|
+
height: var(--scb-stepper-height);
|
|
16
|
+
}
|
|
17
|
+
.steps {
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
align-items: flex-start;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
position: relative;
|
|
23
|
+
width: 100%;
|
|
24
|
+
gap: 24px;
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
:host([variant='vertical']) .steps {
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: flex-start;
|
|
30
|
+
gap: 32px;
|
|
31
|
+
}
|
|
32
|
+
::slotted(scb-step) {
|
|
33
|
+
position: relative;
|
|
34
|
+
flex: 1 1 0;
|
|
35
|
+
min-width: 80px;
|
|
36
|
+
z-index: 1;
|
|
37
|
+
}
|
|
38
|
+
/* Horisontell connector */
|
|
39
|
+
::slotted(scb-step:not(:first-child))::before {
|
|
40
|
+
content: '';
|
|
41
|
+
position: absolute;
|
|
42
|
+
left: -50%;
|
|
43
|
+
top: 16px;
|
|
44
|
+
width: calc(100% - 24px);
|
|
45
|
+
height: 1px;
|
|
46
|
+
background: var(--n-70);
|
|
47
|
+
border-radius: 1px;
|
|
48
|
+
z-index: 0;
|
|
49
|
+
}
|
|
50
|
+
/* Vertikal connector */
|
|
51
|
+
::slotted(scb-step[variant="vertical"]:not(:first-child))::before {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
::slotted(scb-step[variant="vertical"]:not(:last-child))::after {
|
|
55
|
+
content: '';
|
|
56
|
+
position: absolute;
|
|
57
|
+
left: 16px;
|
|
58
|
+
top: 40px;
|
|
59
|
+
width: 1px;
|
|
60
|
+
height: calc(100% - 16px);
|
|
61
|
+
background: var(--n-70);
|
|
62
|
+
border-radius: 1px;
|
|
63
|
+
z-index: 0;
|
|
64
|
+
transform: translateX(-50%);
|
|
65
|
+
}
|
|
66
|
+
::slotted(scb-step[variant="vertical"][symbol-variant="marker"]:not(:last-child))::after {
|
|
67
|
+
content: "";
|
|
68
|
+
position: absolute;
|
|
69
|
+
left: 8px;
|
|
70
|
+
top: 25px;
|
|
71
|
+
width: 1px;
|
|
72
|
+
height: calc(100% - 2px);
|
|
73
|
+
background: var(--n-70);
|
|
74
|
+
border-radius: 1px;
|
|
75
|
+
z-index: 0;
|
|
76
|
+
transform: translateX(-50%);
|
|
77
|
+
}
|
|
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);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc-test",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -262,6 +262,14 @@
|
|
|
262
262
|
"import": "./scb-status-pill/scb-status-pill.js",
|
|
263
263
|
"require": "./scb-status-pill/scb-status-pill.js"
|
|
264
264
|
},
|
|
265
|
+
"./scb-stepper": {
|
|
266
|
+
"import": "./scb-stepper/scb-stepper.js",
|
|
267
|
+
"require": "./scb-stepper/scb-stepper.js"
|
|
268
|
+
},
|
|
269
|
+
"./scb-stepper/scb-step": {
|
|
270
|
+
"import": "./scb-stepper/scb-step.js",
|
|
271
|
+
"require": "./scb-stepper/scb-step.js"
|
|
272
|
+
},
|
|
265
273
|
"./scb-switch": {
|
|
266
274
|
"import": "./scb-switch/scb-switch.js",
|
|
267
275
|
"require": "./scb-switch/scb-switch.js"
|
|
@@ -296,5 +304,5 @@
|
|
|
296
304
|
},
|
|
297
305
|
"./mvc/*": "./mvc/*"
|
|
298
306
|
},
|
|
299
|
-
"buildHash": "
|
|
307
|
+
"buildHash": "3D7F0B98A0A0FA5BCFAFC2684A93EE1AC54E4178D2537C2064B8CAD4DCAE7D05"
|
|
300
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
|
|
2
|
-
import { property as r, customElement as
|
|
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
|
|
7
|
-
for (var
|
|
8
|
-
(h =
|
|
9
|
-
return
|
|
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
|
|
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(
|
|
16
|
-
|
|
17
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
200
|
+
n([
|
|
196
201
|
r({ type: String })
|
|
197
|
-
],
|
|
198
|
-
|
|
202
|
+
], a.prototype, "title", 2);
|
|
203
|
+
n([
|
|
199
204
|
r({ type: String })
|
|
200
|
-
],
|
|
201
|
-
|
|
205
|
+
], a.prototype, "type", 2);
|
|
206
|
+
n([
|
|
202
207
|
r({ type: String, reflect: !0 })
|
|
203
|
-
],
|
|
204
|
-
|
|
208
|
+
], a.prototype, "position", 2);
|
|
209
|
+
n([
|
|
205
210
|
r({ type: String, attribute: "search-supporting-text" })
|
|
206
|
-
],
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
],
|
|
211
|
+
], a.prototype, "searchSupportingText", 2);
|
|
212
|
+
a = n([
|
|
213
|
+
m("scb-app-bar")
|
|
214
|
+
], a);
|
|
210
215
|
export {
|
|
211
|
-
|
|
216
|
+
a as ScbAppBar
|
|
212
217
|
};
|
package/scb-dialog/scb-dialog.js
CHANGED
|
@@ -221,7 +221,11 @@ let i = class extends u {
|
|
|
221
221
|
}
|
|
222
222
|
};
|
|
223
223
|
i.styles = h`
|
|
224
|
-
:host {
|
|
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);
|
package/scb-menu/scb-menu.js
CHANGED
|
@@ -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
|
|
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,
|
|
6
|
-
(
|
|
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 =
|
|
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),
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Ett steg i en stepper-komponent.
|
|
4
|
+
* @slot - Innehåll för steget
|
|
5
|
+
*/
|
|
6
|
+
export declare class ScbStep extends LitElement {
|
|
7
|
+
label: string;
|
|
8
|
+
symbolVariant: 'number' | 'icon' | 'marker';
|
|
9
|
+
number: number;
|
|
10
|
+
active: boolean;
|
|
11
|
+
completed: boolean;
|
|
12
|
+
changeOnCompleted: boolean;
|
|
13
|
+
islast: boolean;
|
|
14
|
+
variant: 'horizontal' | 'vertical';
|
|
15
|
+
icon: string;
|
|
16
|
+
static styles: import('lit').CSSResult;
|
|
17
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
18
|
+
}
|