@oslokommune/punkt-elements 12.29.5 → 12.29.7
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/dist/index.d.ts +3 -1
- package/dist/pkt-index.cjs +5 -5
- package/dist/pkt-index.js +34 -33
- package/package.json +3 -3
- package/src/components/index.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -633,7 +633,7 @@ export declare class PktProgressbar extends PktElement implements IPktProgressba
|
|
|
633
633
|
private _handleAttribute;
|
|
634
634
|
}
|
|
635
635
|
|
|
636
|
-
|
|
636
|
+
declare class PktRadioButton extends PktInputElement {
|
|
637
637
|
private inputRef;
|
|
638
638
|
value: string;
|
|
639
639
|
checkHelptext: string | null;
|
|
@@ -648,6 +648,8 @@ export declare class PktRadioButton extends PktInputElement {
|
|
|
648
648
|
render(): TemplateResult<1>;
|
|
649
649
|
private toggleChecked;
|
|
650
650
|
}
|
|
651
|
+
export { PktRadioButton }
|
|
652
|
+
export { PktRadioButton as PktRadiobutton }
|
|
651
653
|
|
|
652
654
|
/**
|
|
653
655
|
* Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
|
package/dist/pkt-index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
<div class="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./alert-CP5oN7df.cjs"),P=require("./button-DPb5WL9h.cjs"),c=require("./calendar-DUkAC9Hx.cjs"),k=require("./card-Bxe-jQD_.cjs"),b=require("./checkbox-CDMUepTW.cjs"),t=require("./element-r-PeQ419.cjs"),m=require("./pkt-slot-controller-Oc32unDk.cjs"),s=require("./ref-BUWgvhgU.cjs"),g=require("./class-map-Dzci3Pfe.cjs"),h=require("./datepicker-D6ifQ2so.cjs"),f=require("./helptext-C0mrdhRi.cjs"),y=require("./icon-DcJIqTIY.cjs"),O=require("./input-wrapper-Dqj4uers.cjs"),j=require("./link-C_bwx1Ml.cjs"),x=require("./linkcard-C6mZOE0R.cjs"),q=require("./loader-DQV1hMM3.cjs"),C=require("./messagebox-BSyLVNas.cjs"),v=require("./modal-CblCiNUi.cjs"),S=require("./progressbar-C_q48_qh.cjs"),p=require("./radiobutton-3e105CXX.cjs"),$=require("./tag-BMyii4Da.cjs"),_=require("./textarea-BKCVcJ6E.cjs"),L=require("./textinput-BRupcl9v.cjs"),T=require("./select-DJu4Wr1y.cjs");var B=Object.defineProperty,M=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?M(e,r):e,l=a.length-1,u;l>=0;l--)(u=a[l])&&(n=(i?u(e,r,n):u(n))||n);return i&&n&&B(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 m.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
|
+
<div class="${g.e(e)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
|
5
5
|
<h2 class="pkt-txt-22">Innhold fra attributter og funksjoner</h2>
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
<div>${this.renderList(this.doStuff(this._list))}</div>
|
|
8
8
|
|
|
9
9
|
<h2 class="pkt-txt-22">Slot</h2>
|
|
10
|
-
<div ${
|
|
10
|
+
<div ${s.n(this.defaultSlot)}>defaultSlotRef</div>
|
|
11
11
|
<h2 class="pkt-txt-22">Named slot</h2>
|
|
12
12
|
<select
|
|
13
13
|
name="named-slot"
|
|
14
|
-
${
|
|
14
|
+
${s.n(this.namedSlot)}
|
|
15
15
|
@change=${r=>alert(r.target.value)}
|
|
16
16
|
>
|
|
17
17
|
namedSlotRef
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
<ul>
|
|
27
27
|
${e.map(r=>t.x`<li>${r}</li>`)}
|
|
28
28
|
</ul>
|
|
29
|
-
`}doStuff(e){return e.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};o([t.n({type:String})],exports.PktComponent.prototype,"string",2);o([t.n({converter:c.csvToArray})],exports.PktComponent.prototype,"strings",2);o([t.n({type:Boolean})],exports.PktComponent.prototype,"darkmode",2);o([t.n({type:Array})],exports.PktComponent.prototype,"_list",2);exports.PktComponent=o([t.t("pkt-component")],exports.PktComponent);Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>
|
|
29
|
+
`}doStuff(e){return e.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};o([t.n({type:String})],exports.PktComponent.prototype,"string",2);o([t.n({converter:c.csvToArray})],exports.PktComponent.prototype,"strings",2);o([t.n({type:Boolean})],exports.PktComponent.prototype,"darkmode",2);o([t.n({type:Array})],exports.PktComponent.prototype,"_list",2);exports.PktComponent=o([t.t("pkt-component")],exports.PktComponent);Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>d.PktAlert});Object.defineProperty(exports,"PktButton",{enumerable:!0,get:()=>P.PktButton});Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>c.PktCalendar});Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>k.PktCard});Object.defineProperty(exports,"PktCheckbox",{enumerable:!0,get:()=>b.PktCheckbox});Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>h.PktDatepicker});Object.defineProperty(exports,"PktHelptext",{enumerable:!0,get:()=>f.PktHelptext});Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>y.PktIcon});Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>O.PktInputWrapper});Object.defineProperty(exports,"PktLink",{enumerable:!0,get:()=>j.PktLink});Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>x.PktLinkCard});Object.defineProperty(exports,"PktLoader",{enumerable:!0,get:()=>q.PktLoader});Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>C.PktMessagebox});Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>v.PktModal});Object.defineProperty(exports,"PktProgressbar",{enumerable:!0,get:()=>S.PktProgressbar});Object.defineProperty(exports,"PktRadioButton",{enumerable:!0,get:()=>p.PktRadioButton});Object.defineProperty(exports,"PktRadiobutton",{enumerable:!0,get:()=>p.PktRadioButton});Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>$.PktTag});Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>_.PktTextarea});Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>L.PktTextinput});Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>T.PktSelect});
|
package/dist/pkt-index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { P as w } from "./alert-CugVni4g.js";
|
|
2
2
|
import { P as O } from "./button-BnmFhao8.js";
|
|
3
3
|
import { c as d } from "./calendar-DevhqUoj.js";
|
|
4
|
-
import { P as
|
|
5
|
-
import { P as
|
|
6
|
-
import { P as
|
|
7
|
-
import { P as f, x as
|
|
4
|
+
import { P as T } from "./calendar-DevhqUoj.js";
|
|
5
|
+
import { P as A } from "./card-Db2Ex1cH.js";
|
|
6
|
+
import { P as D } from "./checkbox-Dw2CX5zY.js";
|
|
7
|
+
import { P as f, x as P, t as k, n, a as c } from "./element-D_ZgQsSr.js";
|
|
8
8
|
import { P as x } from "./pkt-slot-controller-Clbye6cM.js";
|
|
9
|
-
import { e as
|
|
9
|
+
import { e as m, n as h } from "./ref-BSGI8ogR.js";
|
|
10
10
|
import { e as u } from "./class-map-BYCG9U47.js";
|
|
11
11
|
import { P as G } from "./datepicker-gZ_eVIyS.js";
|
|
12
12
|
import { P as M } from "./helptext-RPq_TKzJ.js";
|
|
@@ -18,19 +18,19 @@ import { P as V } from "./loader-ChVEsONa.js";
|
|
|
18
18
|
import { P as Y } from "./messagebox-Di7LUz4C.js";
|
|
19
19
|
import { P as tt } from "./modal-DZUQb_yG.js";
|
|
20
20
|
import { P as rt } from "./progressbar-CuZj4FWi.js";
|
|
21
|
-
import { P as
|
|
22
|
-
import { P as
|
|
23
|
-
import { P as
|
|
21
|
+
import { P as st, P as at } from "./radiobutton-CcZ2-z8q.js";
|
|
22
|
+
import { P as it } from "./tag-DVk69673.js";
|
|
23
|
+
import { P as lt } from "./textarea-uzzCtHtj.js";
|
|
24
24
|
import { P as mt } from "./textinput-DRkv93vp.js";
|
|
25
|
-
import { P as
|
|
26
|
-
var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor,
|
|
25
|
+
import { P as dt } from "./select-CnizDIYN.js";
|
|
26
|
+
var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (t, e, i, a) => {
|
|
27
27
|
for (var r = a > 1 ? void 0 : a ? v(e, i) : e, p = t.length - 1, l; p >= 0; p--)
|
|
28
28
|
(l = t[p]) && (r = (a ? l(e, i, r) : l(r)) || r);
|
|
29
29
|
return a && r && g(e, i, r), r;
|
|
30
30
|
};
|
|
31
|
-
let
|
|
31
|
+
let o = class extends f {
|
|
32
32
|
constructor() {
|
|
33
|
-
super(), this.string = "", this.strings = [], this.darkmode = !1, this._list = [], this.defaultSlot =
|
|
33
|
+
super(), this.string = "", this.strings = [], this.darkmode = !1, this._list = [], this.defaultSlot = m(), this.namedSlot = m(), this.slotController = new x(this, this.defaultSlot, this.namedSlot);
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
36
36
|
* Runs on mount, used to set up various values and whatever you need to run
|
|
@@ -49,7 +49,7 @@ let s = class extends f {
|
|
|
49
49
|
"pkt-component--has-list": this.strings.length > 0,
|
|
50
50
|
"pkt-darkmode": this.darkmode
|
|
51
51
|
};
|
|
52
|
-
return
|
|
52
|
+
return P`
|
|
53
53
|
<div class="${u(t)}">
|
|
54
54
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
55
55
|
|
|
@@ -76,9 +76,9 @@ let s = class extends f {
|
|
|
76
76
|
`;
|
|
77
77
|
}
|
|
78
78
|
renderList(t) {
|
|
79
|
-
return
|
|
79
|
+
return P`
|
|
80
80
|
<ul>
|
|
81
|
-
${t.map((e) =>
|
|
81
|
+
${t.map((e) => P`<li>${e}</li>`)}
|
|
82
82
|
</ul>
|
|
83
83
|
`;
|
|
84
84
|
}
|
|
@@ -99,28 +99,28 @@ let s = class extends f {
|
|
|
99
99
|
);
|
|
100
100
|
}
|
|
101
101
|
};
|
|
102
|
-
|
|
102
|
+
s([
|
|
103
103
|
n({ type: String })
|
|
104
|
-
],
|
|
105
|
-
|
|
104
|
+
], o.prototype, "string", 2);
|
|
105
|
+
s([
|
|
106
106
|
n({ converter: d })
|
|
107
|
-
],
|
|
108
|
-
|
|
107
|
+
], o.prototype, "strings", 2);
|
|
108
|
+
s([
|
|
109
109
|
n({ type: Boolean })
|
|
110
|
-
],
|
|
111
|
-
|
|
110
|
+
], o.prototype, "darkmode", 2);
|
|
111
|
+
s([
|
|
112
112
|
n({ type: Array })
|
|
113
|
-
],
|
|
114
|
-
|
|
113
|
+
], o.prototype, "_list", 2);
|
|
114
|
+
o = s([
|
|
115
115
|
c("pkt-component")
|
|
116
|
-
],
|
|
116
|
+
], o);
|
|
117
117
|
export {
|
|
118
118
|
w as PktAlert,
|
|
119
119
|
O as PktButton,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
120
|
+
T as PktCalendar,
|
|
121
|
+
A as PktCard,
|
|
122
|
+
D as PktCheckbox,
|
|
123
|
+
o as PktComponent,
|
|
124
124
|
G as PktDatepicker,
|
|
125
125
|
M as PktHelptext,
|
|
126
126
|
N as PktIcon,
|
|
@@ -131,9 +131,10 @@ export {
|
|
|
131
131
|
Y as PktMessagebox,
|
|
132
132
|
tt as PktModal,
|
|
133
133
|
rt as PktProgressbar,
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
134
|
+
st as PktRadioButton,
|
|
135
|
+
at as PktRadiobutton,
|
|
136
|
+
dt as PktSelect,
|
|
137
|
+
it as PktTag,
|
|
138
|
+
lt as PktTextarea,
|
|
138
139
|
mt as PktTextinput
|
|
139
140
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "12.29.
|
|
3
|
+
"version": "12.29.7",
|
|
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",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@oslokommune/punkt-assets": "^12.27.1",
|
|
33
|
-
"@oslokommune/punkt-css": "^12.29.
|
|
33
|
+
"@oslokommune/punkt-css": "^12.29.6",
|
|
34
34
|
"sass": "^1.78.0",
|
|
35
35
|
"typescript": "^5.6.2",
|
|
36
36
|
"vite": "^5.4.4",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
58
58
|
},
|
|
59
59
|
"license": "MIT",
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "37c6ab9bde9ad2ae8008eb935e5e74068c356343"
|
|
61
61
|
}
|
package/src/components/index.ts
CHANGED
|
@@ -16,6 +16,8 @@ export { PktMessagebox } from '@/components/messagebox'
|
|
|
16
16
|
export { PktModal } from '@/components/modal'
|
|
17
17
|
export { PktProgressbar } from '@/components/progressbar'
|
|
18
18
|
export { PktRadioButton } from '@/components/radiobutton'
|
|
19
|
+
// TODO: Avklar om RadioButton kan eksporteres som *kun* PktRadiobutton
|
|
20
|
+
export { PktRadioButton as PktRadiobutton } from '@/components/radiobutton'
|
|
19
21
|
export { PktTag } from '@/components/tag'
|
|
20
22
|
export { PktTextarea } from '@/components/textarea'
|
|
21
23
|
export { PktTextinput } from '@/components/textinput'
|
|
@@ -23,7 +25,6 @@ export { PktSelect } from '@/components/select'
|
|
|
23
25
|
|
|
24
26
|
// Export component types
|
|
25
27
|
|
|
26
|
-
|
|
27
28
|
export type {
|
|
28
29
|
IPktButton,
|
|
29
30
|
TPktButtonMode,
|
|
@@ -35,7 +36,6 @@ export type {
|
|
|
35
36
|
TPktButtonType,
|
|
36
37
|
} from '@/components/button'
|
|
37
38
|
|
|
38
|
-
|
|
39
39
|
export type {
|
|
40
40
|
IPktProgressbar,
|
|
41
41
|
TProgressbarRole,
|