@telia-ace/alliance-ui 4.0.0-next.8 → 4.0.0
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 n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
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 n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
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
|
}
|
|
@@ -41,7 +41,7 @@ import{a as r,b as p,c as n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
41
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,21 +57,21 @@ import{a as r,b as p,c as n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
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?
|
|
70
|
+
/></telia-button>`;this.footer=()=>this.actions.length?o`
|
|
71
71
|
<div class="footer" data-testid="modal-footer">
|
|
72
|
-
${v(this.actions,({disabled:
|
|
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)}
|
|
@@ -81,7 +81,7 @@ import{a as r,b as p,c as n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
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;
|
|
@@ -108,18 +108,18 @@ import{a as r,b as p,c as n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
108
108
|
border-radius: ${t(r.radiusLg)};
|
|
109
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 n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
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
|
|
|
@@ -154,11 +154,11 @@ import{a as r,b as p,c as n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
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
|
|
161
|
+
<dialog autofocus>
|
|
162
162
|
<div class="header" data-testid="modal-heading">
|
|
163
163
|
<telia-heading tag="h3" variant="title-100">
|
|
164
164
|
${this.header}
|
|
@@ -174,4 +174,4 @@ import{a as r,b as p,c as n,e as l,g as b,h as e,j as u}from"./chunk-CNFJFZ6D.js
|
|
|
174
174
|
${this.footer()}
|
|
175
175
|
</dialog>
|
|
176
176
|
</div>
|
|
177
|
-
`}};
|
|
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};
|
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-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-
|
|
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
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "UI components used by ACE Alliance apps.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "Telia Company AB",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@floating-ui/dom": "^1.7.
|
|
28
|
+
"@floating-ui/dom": "^1.7.4",
|
|
29
29
|
"@teliads/components": "^22.1.1",
|
|
30
|
-
"lit": "^3.3.
|
|
30
|
+
"lit": "^3.3.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@telia-ace/alliance-internal-client-utilities": "^4.0.0
|
|
33
|
+
"@telia-ace/alliance-internal-client-utilities": "^4.0.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|