@telia-ace/alliance-ui 4.0.0-next.7 → 4.0.0-next.9
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 r,b as
|
|
1
|
+
import{a as r,b as u,c as n,e as l,g as b,h as e,j as p}from"./chunk-CNFJFZ6D.js";import{a as s}from"./chunk-JFKSI6I7.js";import{close as y}from"@teliads/components/icons";import{LitElement as m,css as f,html as o,unsafeCSS as t}from"lit";import{property as d,state as $}from"lit/decorators.js";import{repeat as v}from"lit/directives/repeat.js";var a=class extends m{constructor(){super();this.containStyling=()=>this.contain?o`<style>
|
|
2
2
|
:host {
|
|
3
3
|
height: 500px;
|
|
4
4
|
position: static;
|
|
@@ -6,7 +6,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
6
6
|
.backdrop {
|
|
7
7
|
position: absolute;
|
|
8
8
|
}
|
|
9
|
-
</style>`:
|
|
9
|
+
</style>`:o`<style>
|
|
10
10
|
:host {
|
|
11
11
|
position: fixed;
|
|
12
12
|
}
|
|
@@ -14,7 +14,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
14
14
|
.backdrop {
|
|
15
15
|
position: absolute;
|
|
16
16
|
}
|
|
17
|
-
</style>`;this.scrollStyling=()=>this.scrollMode==="inside"?
|
|
17
|
+
</style>`;this.scrollStyling=()=>this.scrollMode==="inside"?o`<style>
|
|
18
18
|
.container {
|
|
19
19
|
align-items: center;
|
|
20
20
|
}
|
|
@@ -26,7 +26,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.header {
|
|
29
|
-
border-bottom: ${t(r.widthXs)} solid ${t(
|
|
29
|
+
border-bottom: ${t(r.widthXs)} solid ${t(n.gray200)};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.body {
|
|
@@ -38,10 +38,10 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.footer {
|
|
41
|
-
border-top: ${t(r.widthXs)} solid ${t(
|
|
41
|
+
border-top: ${t(r.widthXs)} solid ${t(n.gray200)};
|
|
42
42
|
padding: ${t(e.spacing24)};
|
|
43
43
|
}
|
|
44
|
-
</style>`:
|
|
44
|
+
</style>`:o`<style>
|
|
45
45
|
.container {
|
|
46
46
|
overflow-x: hidden;
|
|
47
47
|
overflow-y: overlay;
|
|
@@ -57,31 +57,31 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
57
57
|
.body {
|
|
58
58
|
padding: 0 ${t(e.spacing24)} ${t(e.spacing24)};
|
|
59
59
|
}
|
|
60
|
-
</style>`;this.subHeaderStyling=()=>{if(this.hasSubHeader)return
|
|
60
|
+
</style>`;this.subHeaderStyling=()=>{if(this.hasSubHeader)return o`<style>
|
|
61
61
|
div.sub-header {
|
|
62
62
|
display: block;
|
|
63
63
|
}
|
|
64
|
-
</style>`};this.closeButton=()=>this.required?"":
|
|
64
|
+
</style>`};this.closeButton=()=>this.required?"":o`<telia-button
|
|
65
65
|
size="sm"
|
|
66
66
|
variant="text"
|
|
67
67
|
data-testid="close-modal-button"
|
|
68
68
|
@click=${this.onCloseClick}
|
|
69
69
|
><telia-icon size="md" svg="${y.svg}"
|
|
70
|
-
/></telia-button>`;this.footer=()=>this.actions.length?
|
|
71
|
-
<div class="footer">
|
|
72
|
-
${v(this.actions,({disabled:
|
|
70
|
+
/></telia-button>`;this.footer=()=>this.actions.length?o`
|
|
71
|
+
<div class="footer" data-testid="modal-footer">
|
|
72
|
+
${v(this.actions,({disabled:i,variant:c,action:h,label:g})=>o`
|
|
73
73
|
<telia-button
|
|
74
|
-
disabled="${
|
|
74
|
+
disabled="${i?"true":"false"}"
|
|
75
75
|
variant="${c||"primary"}"
|
|
76
76
|
size="sm"
|
|
77
77
|
@click=${()=>this.action(h)}
|
|
78
78
|
data-testid="${h}-action-button"
|
|
79
79
|
>
|
|
80
|
-
${
|
|
80
|
+
${g}
|
|
81
81
|
</telia-button>
|
|
82
82
|
`)}
|
|
83
83
|
</div>
|
|
84
|
-
`:"";this.onBackdropClick=()=>{if(!this.required)return this.action("close")};this.onCloseClick=()=>{if(!this.required)return this.action("close")};this.onKeyDown=
|
|
84
|
+
`:"";this.onBackdropClick=()=>{if(!this.required)return this.action("close")};this.onCloseClick=()=>{if(!this.required)return this.action("close")};this.onKeyDown=i=>{i.defaultPrevented||!this.required&&i.key==="Escape"&&this.action("close")};this.onSubHeaderSlotChange=()=>{this.hasSubHeader=!0};this.action=i=>{let c=new CustomEvent("action",{bubbles:!0,composed:!0,detail:{action:i},cancelable:!0});return this.dispatchEvent(c)};this.header="",this.actions=[],this.required=!1,this.scrollMode="outside",this.hasSubHeader=!1}static{this.styles=f`
|
|
85
85
|
:host {
|
|
86
86
|
display: block;
|
|
87
87
|
inset: 0;
|
|
@@ -91,7 +91,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
91
91
|
.backdrop {
|
|
92
92
|
inset: 0;
|
|
93
93
|
z-index: ${t(Number.parseInt(l.modal)-1)};
|
|
94
|
-
background-color: ${t(
|
|
94
|
+
background-color: ${t(n.black)};
|
|
95
95
|
opacity: 0.3;
|
|
96
96
|
}
|
|
97
97
|
|
|
@@ -104,22 +104,22 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
dialog {
|
|
107
|
-
background-color: ${t(
|
|
107
|
+
background-color: ${t(n.white)};
|
|
108
108
|
border-radius: ${t(r.radiusLg)};
|
|
109
|
-
box-shadow: ${t(
|
|
109
|
+
box-shadow: ${t(b.md)};
|
|
110
110
|
z-index: ${t(Number.parseInt(l.modal))};
|
|
111
|
-
max-width: ${t(
|
|
111
|
+
max-width: ${t(u.breakpointLg)};
|
|
112
112
|
position: static;
|
|
113
113
|
padding: 0;
|
|
114
114
|
border: none;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
dialog:focus-visible {
|
|
118
|
-
outline: solid ${t(
|
|
118
|
+
outline: solid ${t(p.focusBorderWidth)} ${t(p.focusColor)};
|
|
119
119
|
outline-offset: ${t(e.spacing4)};
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
@media only screen and (min-width: ${t(
|
|
122
|
+
@media only screen and (min-width: ${t(u.breakpointLg)}) {
|
|
123
123
|
dialog {
|
|
124
124
|
min-width: calc(${t(e.spacing128)} * 3.5);
|
|
125
125
|
}
|
|
@@ -129,7 +129,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
129
129
|
position: relative;
|
|
130
130
|
display: flex;
|
|
131
131
|
align-items: center;
|
|
132
|
-
padding: ${t(e.spacing24)}
|
|
132
|
+
padding: ${t(e.spacing24)};
|
|
133
133
|
min-height: 30px;
|
|
134
134
|
}
|
|
135
135
|
|
|
@@ -141,7 +141,7 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
141
141
|
|
|
142
142
|
.sub-header {
|
|
143
143
|
padding: ${t(e.spacing24)} ${t(e.spacing32)};
|
|
144
|
-
border-bottom: ${t(r.widthXs)} solid ${t(
|
|
144
|
+
border-bottom: ${t(r.widthXs)} solid ${t(n.gray200)};
|
|
145
145
|
display: none;
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -154,22 +154,24 @@ import{a as r,b as p,c as a,e as l,g,h as e,j as u}from"./chunk-CNFJFZ6D.js";imp
|
|
|
154
154
|
justify-content: flex-end;
|
|
155
155
|
gap: ${t(e.spacing16)};
|
|
156
156
|
}
|
|
157
|
-
`}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.onKeyDown)}disconnectedCallback(){window.removeEventListener("keydown",this.onKeyDown),super.disconnectedCallback()}render(){return
|
|
157
|
+
`}connectedCallback(){super.connectedCallback(),window.addEventListener("keydown",this.onKeyDown);let i=this.shadowRoot?.querySelector("dialog");i&&i.showModal()}disconnectedCallback(){window.removeEventListener("keydown",this.onKeyDown),super.disconnectedCallback()}render(){return o`
|
|
158
158
|
${this.containStyling()} ${this.scrollStyling()} ${this.subHeaderStyling()}
|
|
159
159
|
<div class="backdrop" @click=${this.onBackdropClick}></div>
|
|
160
160
|
<div class="container">
|
|
161
|
-
<dialog
|
|
162
|
-
<div class="header">
|
|
163
|
-
<telia-heading tag="h3" variant="title-100"
|
|
161
|
+
<dialog autofocus>
|
|
162
|
+
<div class="header" data-testid="modal-heading">
|
|
163
|
+
<telia-heading tag="h3" variant="title-100">
|
|
164
|
+
${this.header}
|
|
165
|
+
</telia-heading>
|
|
164
166
|
${this.closeButton()}
|
|
165
167
|
</div>
|
|
166
|
-
<div class="sub-header">
|
|
168
|
+
<div class="sub-header" data-testid="modal-sub-header">
|
|
167
169
|
<slot name="sub-header" @slotchange=${this.onSubHeaderSlotChange}></slot>
|
|
168
170
|
</div>
|
|
169
|
-
<div class="body">
|
|
171
|
+
<div class="body" data-testid="modal-body">
|
|
170
172
|
<slot></slot>
|
|
171
173
|
</div>
|
|
172
174
|
${this.footer()}
|
|
173
175
|
</dialog>
|
|
174
176
|
</div>
|
|
175
|
-
`}};
|
|
177
|
+
`}};s([d({type:String,attribute:"header"})],a.prototype,"header",2),s([d({type:Array})],a.prototype,"actions",2),s([d({type:Boolean,attribute:"required"})],a.prototype,"required",2),s([d({type:String,attribute:"scroll-mode"})],a.prototype,"scrollMode",2),s([$()],a.prototype,"hasSubHeader",2),s([d({type:Boolean,attribute:"contain"})],a.prototype,"contain",2);export{a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-HJAUL47Q.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-BDQXACZ6.js";import"../../chunk-JZJUYJ7F.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as Modal};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b,c,d,e}from"../../chunk-
|
|
1
|
+
import{a,b,c,d,e}from"../../chunk-WI5TQSZT.js";import"../../chunk-H7ZWVNSK.js";import"../../chunk-CNFJFZ6D.js";import"../../chunk-JFKSI6I7.js";export{a as Table,b as TableBody,c as TableData,d as TableHead,e as TableRow};
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,b as i,c as m,d as f,e as c}from"../chunk-
|
|
1
|
+
import{a as p,b as i,c as m,d as f,e as c}from"../chunk-WI5TQSZT.js";import{a as s}from"../chunk-3Y6W4IDL.js";import{a as b,b as x,c as y,d as h,e as P}from"../chunk-ALNVSJXY.js";import{a as t}from"../chunk-BJWFPFCA.js";import"../chunk-DCXN3PRQ.js";import{a as e}from"../chunk-HJAUL47Q.js";import"../chunk-H7ZWVNSK.js";import{a as r,b as a,c as n}from"../chunk-ERBUEZ5O.js";import"../chunk-AZ6GENL6.js";import"../chunk-BDQXACZ6.js";import"../chunk-JZJUYJ7F.js";import{a as l}from"../chunk-ZO3TGBYT.js";import"../chunk-QLXKAVKR.js";import"../chunk-CNFJFZ6D.js";import"../chunk-JFKSI6I7.js";var g=[["link",t],["modal",e],["unauthorized",s],["page-selector",r],["paginator-button",n],["paginator",a],["pop-over",l],["table",p],["tb",i],["td",m],["th",f],["tr",c]];for(let[u,d]of g){let o=`alliance-${u}`;customElements.get(o)||customElements.define(o,d)}export{y as ViewElementType,P as registerViewElement,b as viewElementPrefix,x as viewElementSelector,h as viewElementTag};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@telia-ace/alliance-ui",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.9",
|
|
4
4
|
"description": "UI components used by ACE Alliance apps.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"lit": "^3.3.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@telia-ace/alliance-internal-client-utilities": "^4.0.0-next.
|
|
33
|
+
"@telia-ace/alliance-internal-client-utilities": "^4.0.0-next.9"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|