@oslokommune/punkt-elements 12.39.3 → 12.39.6
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/CHANGELOG.md +34 -0
- package/dist/{modal-B6VJdIeY.cjs → modal-C8GbUY8p.cjs} +8 -8
- package/dist/{modal-8bEB_CoY.js → modal-nU8cELiR.js} +52 -52
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/package.json +3 -3
- package/src/components/modal/modal.ts +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,40 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [12.39.6](https://github.com/oslokommune/punkt/compare/12.39.5...12.39.6) (2025-05-16)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
Ingen
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
Ingen
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
Ingen
|
|
18
|
+
|
|
19
|
+
### Chores
|
|
20
|
+
Ingen
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [12.39.5](https://github.com/oslokommune/punkt/compare/12.39.4...12.39.5) (2025-05-16)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
### Bug Fixes
|
|
34
|
+
Ingen
|
|
35
|
+
|
|
36
|
+
### Chores
|
|
37
|
+
Ingen
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
|
|
8
42
|
## [12.39.3](https://github.com/oslokommune/punkt/compare/12.39.2...12.39.3) (2025-05-15)
|
|
9
43
|
|
|
10
44
|
### ⚠ BREAKING CHANGES
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-DCyaICmy.cjs"),
|
|
1
|
+
"use strict";const d=require("./class-map-DCyaICmy.cjs"),o=require("./element-BSypUpzA.cjs"),u=require("./state-B5KCNjEd.cjs"),k=require("./pkt-slot-controller-Da-RgXfS.cjs"),r=require("./ref-BvbyvXRH.cjs");require("./icon-BnKGwYjj.cjs");const m={hideCloseButton:{default:!1},closeOnBackdropClick:{default:!1},size:{default:"medium"}},h={props:m};var v=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var s=i>1?void 0:i?f(t,e):t,n=c.length-1,a;n>=0;n--)(a=c[n])&&(s=(i?a(t,e,s):a(s))||s);return i&&s&&v(t,e,s),s};exports.PktModal=class extends o.PktElement{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=h.props.hideCloseButton.default,this.closeOnBackdropClick=h.props.closeOnBackdropClick.default,this.closeButtonSkin="blue",this.size=h.props.size.default,this.variant="dialog",this.drawerPosition="right",this.transparentBackdrop=!1,this.defaultSlot=r.e(),this.dialogRef=r.e(),this._isOpen=!1,this.close=(t,e=!1)=>{var s;if(!this._isOpen)return;this._isOpen=!1,document.body.classList.remove("pkt-modal--open");const i=document.activeElement;i&&!this.isElementInViewport(i)&&i.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0,composed:!0})),e||(s=this.dialogRef.value)==null||s.close(),this.requestUpdate()},this.showModal=(t=null)=>{var i;this._isOpen=!0,(i=this.dialogRef.value)==null||i.showModal();const e=document.querySelector(".pkt-modal");requestAnimationFrame(()=>{var s;this.dialogRef.value&&((s=this.dialogRef.value)==null||s.focus())}),e&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:t},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new k.PktSlotController(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this))}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("click",this.handleBackdropClick)}async firstUpdated(t){super.firstUpdated(t),this.dialogRef.value&&!window.HTMLDialogElement&&!this.dialogRef.value.showModal&&("document"in window&&"createElement"in document&&(await Promise.resolve().then(()=>require("./dialog-polyfill.esm-CPKZe7AL.cjs")).then(i=>i.default)).registerDialog(this.dialogRef.value),this.dialogRef.value.addEventListener("close",()=>{this.close(new Event("close"),!0)}))}handleKeyDown(t){t.key==="Escape"&&this.close(t)}handleBackdropClick(t){var e;this.closeOnBackdropClick&&t.target===((e=this.dialogRef)==null?void 0:e.value)&&this.close(t)}isElementInViewport(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const t={"pkt-modal":!0,"pkt-modal--removePadding":this.removePadding??!1,"pkt-modal--noHeadingText":this.headingText===""||this.headingText===void 0,"pkt-modal--noShadow":this.closeButtonSkin==="yellow-filled","pkt-modal--transparentBackdrop":this.transparentBackdrop??!1,[`pkt-modal--${this.size}`]:this.size!==void 0,[`pkt-modal__${this.variant}`]:this.variant!==void 0,[`pkt-modal__drawer--${this.drawerPosition}`]:this.variant==="drawer"},e={"pkt-modal__headingText":!0,"pkt-txt-24":!0},i={"pkt-modal__content":!0,"pkt-txt-18-light":!0},s=this.closeButtonSkin==="blue",n={"pkt-modal__closeButton":!0,[`pkt-modal__closeButton--${this.closeButtonSkin}`]:!0},a={"pkt-btn":!0,[`pkt-btn--${s?"tertiary":"primary"}`]:!0,"pkt-btn--icon-only":!0,"pkt-btn--medium":!0};return o.x`
|
|
2
2
|
<dialog
|
|
3
3
|
class=${d.e(t)}
|
|
4
4
|
${r.n(this.dialogRef)}
|
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
@close=${p=>this.close(p,!0)}
|
|
8
8
|
>
|
|
9
9
|
<div class="pkt-modal__wrapper">
|
|
10
|
-
${this.headingText||!this.hideCloseButton?
|
|
10
|
+
${this.headingText||!this.hideCloseButton?o.x`<div class="pkt-modal__header">
|
|
11
11
|
<div class="pkt-modal__header-background"></div>
|
|
12
|
-
${this.headingText?
|
|
12
|
+
${this.headingText?o.x`<h1 id="pkt-modal__headingText" class=${d.e(e)}>
|
|
13
13
|
${this.headingText}
|
|
14
|
-
</h1>`:
|
|
15
|
-
${this.hideCloseButton?
|
|
14
|
+
</h1>`:o.x`<div class="pkt-modal__headingText"></div>`}
|
|
15
|
+
${this.hideCloseButton?o.x`<div class="pkt-modal__noCloseButton"></div>`:o.x`<div class="${d.e(n)}">
|
|
16
16
|
<pkt-button
|
|
17
17
|
@click=${p=>this.close(p)}
|
|
18
18
|
class=${d.e(a)}
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
Lukk
|
|
24
24
|
</pkt-button>
|
|
25
25
|
</div>`}
|
|
26
|
-
</div>`:
|
|
26
|
+
</div>`:o.E}
|
|
27
27
|
<div class="pkt-modal__container">
|
|
28
28
|
<div
|
|
29
29
|
id="pkt-modal__content"
|
|
30
|
-
class=${d.e(
|
|
30
|
+
class=${d.e(i)}
|
|
31
31
|
${r.n(this.defaultSlot)}
|
|
32
32
|
></div>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
35
|
</dialog>
|
|
36
|
-
`}};l([
|
|
36
|
+
`}};l([o.n({type:String})],exports.PktModal.prototype,"headingText",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"removePadding",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"hideCloseButton",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"closeOnBackdropClick",2);l([o.n({type:String})],exports.PktModal.prototype,"closeButtonSkin",2);l([o.n({type:String})],exports.PktModal.prototype,"size",2);l([o.n({type:String})],exports.PktModal.prototype,"variant",2);l([o.n({type:String})],exports.PktModal.prototype,"drawerPosition",2);l([o.n({type:Boolean})],exports.PktModal.prototype,"transparentBackdrop",2);l([u.r()],exports.PktModal.prototype,"_isOpen",2);exports.PktModal=l([o.t("pkt-modal")],exports.PktModal);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { e as
|
|
2
|
-
import { P as
|
|
3
|
-
import { r as
|
|
1
|
+
import { e as p } from "./class-map-KyMqi0fa.js";
|
|
2
|
+
import { P as k, E as f, x as r, n as l, a as v } from "./element-DjjF_tEh.js";
|
|
3
|
+
import { r as g } from "./state-BtbpSrdV.js";
|
|
4
4
|
import { P as _ } from "./pkt-slot-controller-DtDaD9q_.js";
|
|
5
|
-
import { e as
|
|
5
|
+
import { e as u, n as m } from "./ref-iIffqQAI.js";
|
|
6
6
|
import "./icon-Beoxup8E.js";
|
|
7
7
|
const y = {
|
|
8
8
|
hideCloseButton: {
|
|
@@ -17,30 +17,30 @@ const y = {
|
|
|
17
17
|
}, h = {
|
|
18
18
|
props: y
|
|
19
19
|
};
|
|
20
|
-
var w = Object.defineProperty, b = Object.getOwnPropertyDescriptor, a = (
|
|
21
|
-
for (var
|
|
22
|
-
(d =
|
|
23
|
-
return i &&
|
|
20
|
+
var w = Object.defineProperty, b = Object.getOwnPropertyDescriptor, a = (e, t, o, i) => {
|
|
21
|
+
for (var n = i > 1 ? void 0 : i ? b(t, o) : t, c = e.length - 1, d; c >= 0; c--)
|
|
22
|
+
(d = e[c]) && (n = (i ? d(t, o, n) : d(n)) || n);
|
|
23
|
+
return i && n && w(t, o, n), n;
|
|
24
24
|
};
|
|
25
|
-
let s = class extends
|
|
25
|
+
let s = class extends k {
|
|
26
26
|
constructor() {
|
|
27
|
-
super(), this.headingText = "", this.removePadding = !1, this.hideCloseButton = h.props.hideCloseButton.default, this.closeOnBackdropClick = h.props.closeOnBackdropClick.default, this.closeButtonSkin = "blue", this.size = h.props.size.default, this.variant = "dialog", this.drawerPosition = "right", this.transparentBackdrop = !1, this.defaultSlot =
|
|
27
|
+
super(), this.headingText = "", this.removePadding = !1, this.hideCloseButton = h.props.hideCloseButton.default, this.closeOnBackdropClick = h.props.closeOnBackdropClick.default, this.closeButtonSkin = "blue", this.size = h.props.size.default, this.variant = "dialog", this.drawerPosition = "right", this.transparentBackdrop = !1, this.defaultSlot = u(), this.dialogRef = u(), this._isOpen = !1, this.close = (e, t = !1) => {
|
|
28
28
|
var i;
|
|
29
29
|
if (!this._isOpen) return;
|
|
30
30
|
this._isOpen = !1, document.body.classList.remove("pkt-modal--open");
|
|
31
31
|
const o = document.activeElement;
|
|
32
32
|
o && !this.isElementInViewport(o) && o.scrollIntoView({ behavior: "smooth", block: "nearest" }), this.dispatchEvent(
|
|
33
|
-
new CustomEvent("close", { detail: { origin:
|
|
34
|
-
),
|
|
35
|
-
}, this.showModal = (
|
|
33
|
+
new CustomEvent("close", { detail: { origin: e }, bubbles: !0, composed: !0 })
|
|
34
|
+
), t || (i = this.dialogRef.value) == null || i.close(), this.requestUpdate();
|
|
35
|
+
}, this.showModal = (e = null) => {
|
|
36
36
|
var o;
|
|
37
37
|
this._isOpen = !0, (o = this.dialogRef.value) == null || o.showModal();
|
|
38
|
-
const
|
|
38
|
+
const t = document.querySelector(".pkt-modal");
|
|
39
39
|
requestAnimationFrame(() => {
|
|
40
40
|
var i;
|
|
41
41
|
this.dialogRef.value && ((i = this.dialogRef.value) == null || i.focus());
|
|
42
|
-
}),
|
|
43
|
-
new CustomEvent("showModal", { detail: { origin:
|
|
42
|
+
}), t && document.body.classList.add("pkt-modal--open"), this.dispatchEvent(
|
|
43
|
+
new CustomEvent("showModal", { detail: { origin: e }, bubbles: !0, composed: !0 })
|
|
44
44
|
), this.requestUpdate();
|
|
45
45
|
}, this.slotController = new _(this, this.defaultSlot), this._isOpen = !1;
|
|
46
46
|
}
|
|
@@ -50,25 +50,25 @@ let s = class extends f {
|
|
|
50
50
|
disconnectedCallback() {
|
|
51
51
|
super.disconnectedCallback(), document.removeEventListener("keydown", this.handleKeyDown), document.removeEventListener("click", this.handleBackdropClick);
|
|
52
52
|
}
|
|
53
|
-
async firstUpdated(
|
|
54
|
-
super.firstUpdated(
|
|
53
|
+
async firstUpdated(e) {
|
|
54
|
+
super.firstUpdated(e), this.dialogRef.value && !window.HTMLDialogElement && !this.dialogRef.value.showModal && ("document" in window && "createElement" in document && (await import("./dialog-polyfill.esm-CbjBMXAG.js").then((o) => o.default)).registerDialog(this.dialogRef.value), this.dialogRef.value.addEventListener("close", () => {
|
|
55
55
|
this.close(new Event("close"), !0);
|
|
56
56
|
}));
|
|
57
57
|
}
|
|
58
58
|
// P R I V A T E M E T H O D S
|
|
59
|
-
handleKeyDown(
|
|
60
|
-
|
|
59
|
+
handleKeyDown(e) {
|
|
60
|
+
e.key === "Escape" && this.close(e);
|
|
61
61
|
}
|
|
62
|
-
handleBackdropClick(
|
|
63
|
-
var
|
|
64
|
-
|
|
62
|
+
handleBackdropClick(e) {
|
|
63
|
+
var t;
|
|
64
|
+
this.closeOnBackdropClick && e.target === ((t = this.dialogRef) == null ? void 0 : t.value) && this.close(e);
|
|
65
65
|
}
|
|
66
|
-
isElementInViewport(
|
|
67
|
-
const
|
|
68
|
-
return
|
|
66
|
+
isElementInViewport(e) {
|
|
67
|
+
const t = e.getBoundingClientRect();
|
|
68
|
+
return t.top >= 0 && t.left >= 0 && t.bottom <= (window.innerHeight || document.documentElement.clientHeight) && t.right <= (window.innerWidth || document.documentElement.clientWidth);
|
|
69
69
|
}
|
|
70
70
|
render() {
|
|
71
|
-
const
|
|
71
|
+
const e = {
|
|
72
72
|
"pkt-modal": !0,
|
|
73
73
|
"pkt-modal--removePadding": this.removePadding ?? !1,
|
|
74
74
|
"pkt-modal--noHeadingText": this.headingText === "" || this.headingText === void 0,
|
|
@@ -77,39 +77,39 @@ let s = class extends f {
|
|
|
77
77
|
[`pkt-modal--${this.size}`]: this.size !== void 0,
|
|
78
78
|
[`pkt-modal__${this.variant}`]: this.variant !== void 0,
|
|
79
79
|
[`pkt-modal__drawer--${this.drawerPosition}`]: this.variant === "drawer"
|
|
80
|
-
},
|
|
80
|
+
}, t = {
|
|
81
81
|
"pkt-modal__headingText": !0,
|
|
82
82
|
"pkt-txt-24": !0
|
|
83
83
|
}, o = {
|
|
84
84
|
"pkt-modal__content": !0,
|
|
85
85
|
"pkt-txt-18-light": !0
|
|
86
|
-
}, i = this.closeButtonSkin === "blue",
|
|
86
|
+
}, i = this.closeButtonSkin === "blue", n = {
|
|
87
87
|
"pkt-modal__closeButton": !0,
|
|
88
88
|
[`pkt-modal__closeButton--${this.closeButtonSkin}`]: !0
|
|
89
|
-
},
|
|
89
|
+
}, c = {
|
|
90
90
|
"pkt-btn": !0,
|
|
91
91
|
[`pkt-btn--${i ? "tertiary" : "primary"}`]: !0,
|
|
92
92
|
"pkt-btn--icon-only": !0,
|
|
93
93
|
"pkt-btn--medium": !0
|
|
94
94
|
};
|
|
95
|
-
return
|
|
95
|
+
return r`
|
|
96
96
|
<dialog
|
|
97
|
-
class=${
|
|
98
|
-
${
|
|
97
|
+
class=${p(e)}
|
|
98
|
+
${m(this.dialogRef)}
|
|
99
99
|
aria-labelledby="pkt-modal__headingText"
|
|
100
100
|
aria-describedby="pkt-modal__content"
|
|
101
101
|
@close=${(d) => this.close(d, !0)}
|
|
102
102
|
>
|
|
103
103
|
<div class="pkt-modal__wrapper">
|
|
104
|
-
${this.headingText || !this.hideCloseButton ?
|
|
104
|
+
${this.headingText || !this.hideCloseButton ? r`<div class="pkt-modal__header">
|
|
105
105
|
<div class="pkt-modal__header-background"></div>
|
|
106
|
-
${this.headingText ?
|
|
106
|
+
${this.headingText ? r`<h1 id="pkt-modal__headingText" class=${p(t)}>
|
|
107
107
|
${this.headingText}
|
|
108
|
-
</h1>` :
|
|
109
|
-
${this.hideCloseButton ?
|
|
108
|
+
</h1>` : r`<div class="pkt-modal__headingText"></div>`}
|
|
109
|
+
${this.hideCloseButton ? r`<div class="pkt-modal__noCloseButton"></div>` : r`<div class="${p(n)}">
|
|
110
110
|
<pkt-button
|
|
111
111
|
@click=${(d) => this.close(d)}
|
|
112
|
-
class=${c
|
|
112
|
+
class=${p(c)}
|
|
113
113
|
aria-label="close"
|
|
114
114
|
iconname="close"
|
|
115
115
|
variant="icon-only"
|
|
@@ -117,12 +117,12 @@ let s = class extends f {
|
|
|
117
117
|
Lukk
|
|
118
118
|
</pkt-button>
|
|
119
119
|
</div>`}
|
|
120
|
-
</div>` :
|
|
120
|
+
</div>` : f}
|
|
121
121
|
<div class="pkt-modal__container">
|
|
122
122
|
<div
|
|
123
123
|
id="pkt-modal__content"
|
|
124
|
-
class=${
|
|
125
|
-
${
|
|
124
|
+
class=${p(o)}
|
|
125
|
+
${m(this.defaultSlot)}
|
|
126
126
|
></div>
|
|
127
127
|
</div>
|
|
128
128
|
</div>
|
|
@@ -131,37 +131,37 @@ let s = class extends f {
|
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
133
|
a([
|
|
134
|
-
|
|
134
|
+
l({ type: String })
|
|
135
135
|
], s.prototype, "headingText", 2);
|
|
136
136
|
a([
|
|
137
|
-
|
|
137
|
+
l({ type: Boolean })
|
|
138
138
|
], s.prototype, "removePadding", 2);
|
|
139
139
|
a([
|
|
140
|
-
|
|
140
|
+
l({ type: Boolean })
|
|
141
141
|
], s.prototype, "hideCloseButton", 2);
|
|
142
142
|
a([
|
|
143
|
-
|
|
143
|
+
l({ type: Boolean })
|
|
144
144
|
], s.prototype, "closeOnBackdropClick", 2);
|
|
145
145
|
a([
|
|
146
|
-
|
|
146
|
+
l({ type: String })
|
|
147
147
|
], s.prototype, "closeButtonSkin", 2);
|
|
148
148
|
a([
|
|
149
|
-
|
|
149
|
+
l({ type: String })
|
|
150
150
|
], s.prototype, "size", 2);
|
|
151
151
|
a([
|
|
152
|
-
|
|
152
|
+
l({ type: String })
|
|
153
153
|
], s.prototype, "variant", 2);
|
|
154
154
|
a([
|
|
155
|
-
|
|
155
|
+
l({ type: String })
|
|
156
156
|
], s.prototype, "drawerPosition", 2);
|
|
157
157
|
a([
|
|
158
|
-
|
|
158
|
+
l({ type: Boolean })
|
|
159
159
|
], s.prototype, "transparentBackdrop", 2);
|
|
160
160
|
a([
|
|
161
|
-
|
|
161
|
+
g()
|
|
162
162
|
], s.prototype, "_isOpen", 2);
|
|
163
163
|
s = a([
|
|
164
|
-
|
|
164
|
+
v("pkt-modal")
|
|
165
165
|
], s);
|
|
166
166
|
export {
|
|
167
167
|
s as P
|
package/dist/pkt-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-C2EPmB0W.cjs"),l=require("./accordionitem-RFwXQC_0.cjs"),d=require("./backlink-HHM21crL.cjs"),b=require("./button-C60j8BsA.cjs"),k=require("./calendar-CYY42kN4.cjs"),m=require("./card-Di1MQneh.cjs"),g=require("./combobox-yUrUarU_.cjs"),h=require("./consent-1ZSUrWK9.cjs"),f=require("./checkbox-zqd3KVfz.cjs"),t=require("./element-BSypUpzA.cjs"),y=require("./pkt-slot-controller-Da-RgXfS.cjs"),s=require("./ref-BvbyvXRH.cjs"),O=require("./class-map-DCyaICmy.cjs"),j=require("./datepicker-CH5ZmFhf.cjs"),q=require("./helptext-bMgnhZ1R.cjs"),x=require("./heading-BnJhJDMD.cjs"),C=require("./icon-BnKGwYjj.cjs"),v=require("./input-wrapper-B-f_SotM.cjs"),S=require("./link-nesPZCIx.cjs"),$=require("./linkcard-s9yoOq90.cjs"),L=require("./loader-ndMy12Pb.cjs"),_=require("./messagebox-B0kgftoP.cjs"),A=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-C2EPmB0W.cjs"),l=require("./accordionitem-RFwXQC_0.cjs"),d=require("./backlink-HHM21crL.cjs"),b=require("./button-C60j8BsA.cjs"),k=require("./calendar-CYY42kN4.cjs"),m=require("./card-Di1MQneh.cjs"),g=require("./combobox-yUrUarU_.cjs"),h=require("./consent-1ZSUrWK9.cjs"),f=require("./checkbox-zqd3KVfz.cjs"),t=require("./element-BSypUpzA.cjs"),y=require("./pkt-slot-controller-Da-RgXfS.cjs"),s=require("./ref-BvbyvXRH.cjs"),O=require("./class-map-DCyaICmy.cjs"),j=require("./datepicker-CH5ZmFhf.cjs"),q=require("./helptext-bMgnhZ1R.cjs"),x=require("./heading-BnJhJDMD.cjs"),C=require("./icon-BnKGwYjj.cjs"),v=require("./input-wrapper-B-f_SotM.cjs"),S=require("./link-nesPZCIx.cjs"),$=require("./linkcard-s9yoOq90.cjs"),L=require("./loader-ndMy12Pb.cjs"),_=require("./messagebox-B0kgftoP.cjs"),A=require("./modal-C8GbUY8p.cjs"),B=require("./progressbar-DiRfScnB.cjs"),p=require("./radiobutton-CI2xaqAB.cjs"),T=require("./tag-B9kFYxHg.cjs"),I=require("./textarea-DxbylapQ.cjs"),M=require("./textinput-B__c4c1z.cjs"),R=require("./select-BCL790jM.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new y.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return t.x`
|
|
2
2
|
<div class="${O.e(e)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
package/dist/pkt-index.js
CHANGED
|
@@ -21,7 +21,7 @@ import { P as ot } from "./link-DCYJhFKJ.js";
|
|
|
21
21
|
import { P as at } from "./linkcard-Bt-Qa_SP.js";
|
|
22
22
|
import { P as it } from "./loader-DhmtCyQA.js";
|
|
23
23
|
import { P as lt } from "./messagebox-DZDP8XZt.js";
|
|
24
|
-
import { P as mt } from "./modal-
|
|
24
|
+
import { P as mt } from "./modal-nU8cELiR.js";
|
|
25
25
|
import { P as ft } from "./progressbar-BKt_aj7f.js";
|
|
26
26
|
import { P as ht, P as ct } from "./radiobutton-CYJawqxD.js";
|
|
27
27
|
import { P as ut } from "./tag-Cu8afZy8.js";
|
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./modal-C8GbUY8p.cjs"),t=e.PktModal;Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>e.PktModal});exports.default=t;
|
package/dist/pkt-modal.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "12.39.
|
|
3
|
+
"version": "12.39.6",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@oslokommune/punkt-assets": "^12.39.2",
|
|
35
|
-
"@oslokommune/punkt-css": "^12.39.
|
|
35
|
+
"@oslokommune/punkt-css": "^12.39.5",
|
|
36
36
|
"sass": "^1.78.0",
|
|
37
37
|
"typescript": "^5.6.2",
|
|
38
38
|
"vite": "^5.4.18",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
60
60
|
},
|
|
61
61
|
"license": "MIT",
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "16072dee66bffd73d5729bc858e8ee0db62c98a7"
|
|
63
63
|
}
|
|
@@ -79,7 +79,6 @@ export class PktModal extends PktElement implements IPktModal {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
private handleBackdropClick(event: MouseEvent) {
|
|
82
|
-
console.log('Event target:', event.target, this.dialogRef?.value)
|
|
83
82
|
if (this.closeOnBackdropClick && event.target === this.dialogRef?.value) {
|
|
84
83
|
this.close(event)
|
|
85
84
|
}
|
|
@@ -201,7 +200,7 @@ export class PktModal extends PktElement implements IPktModal {
|
|
|
201
200
|
Lukk
|
|
202
201
|
</pkt-button>
|
|
203
202
|
</div>`
|
|
204
|
-
:
|
|
203
|
+
: html`<div class="pkt-modal__noCloseButton"></div>`}
|
|
205
204
|
</div>`
|
|
206
205
|
: nothing}
|
|
207
206
|
<div class="pkt-modal__container">
|