@oslokommune/punkt-elements 12.17.2 → 12.18.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.
- package/dist/index.d.ts +47 -0
- package/dist/{input-wrapper-6vTrKtsW.js → input-wrapper-DVXNuxVu.js} +4 -3
- package/dist/{input-wrapper-DX41tnbj.cjs → input-wrapper-tJE-X4Ac.cjs} +3 -3
- package/dist/{linkcard-BlWQ8jOv.js → linkcard-BHokvuVN.js} +10 -9
- package/dist/{linkcard-Det6CJ5D.cjs → linkcard-CUXMP6BH.cjs} +1 -1
- package/dist/modal-CjsQgmmH.cjs +30 -0
- package/dist/{modal-3OZTPqee.js → modal-lQfiTbGh.js} +2 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +18 -17
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +4 -3
- package/dist/pkt-component-template.cjs +5 -5
- package/dist/pkt-component-template.js +18 -17
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +17 -15
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +4 -4
- package/dist/pkt-link.js +3 -2
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-messagebox.cjs +3 -3
- package/dist/pkt-messagebox.js +7 -6
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -0
- package/dist/pkt-progressbar.js +6 -0
- package/dist/pkt-slot-controller-Ckk_yV0j.cjs +1 -0
- package/dist/pkt-slot-controller-RJvOnbF4.js +61 -0
- package/dist/pkt-tag.cjs +3 -3
- package/dist/pkt-tag.js +21 -20
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/progressbar-1PEs_SMc.js +155 -0
- package/dist/progressbar-BlzTFI9U.cjs +36 -0
- package/dist/progressbar.d.ts +8 -0
- package/dist/ref-CA2-0S_W.cjs +13 -0
- package/dist/ref-Dzme4zb6.js +143 -0
- package/dist/{textarea-BTpJjEhO.js → textarea-BXzQA_ub.js} +2 -2
- package/dist/{textarea-B45ZZYpx.cjs → textarea-D_ud1Mpa.cjs} +1 -1
- package/dist/{textinput-BIhQEr8z.cjs → textinput-52G3CfwA.cjs} +1 -1
- package/dist/{textinput-CVo5wG14.js → textinput-CTNWiIaP.js} +2 -2
- package/package.json +2 -2
- package/src/components/index.ts +10 -0
- package/src/components/progressbar/index.ts +12 -0
- package/src/components/progressbar/progressbar.ts +144 -0
- package/dist/modal-DYTVJjYh.cjs +0 -30
- package/dist/ref-C2yPtMJA.cjs +0 -13
- package/dist/ref-CaiKp3S2.js +0 -202
package/dist/index.d.ts
CHANGED
|
@@ -31,6 +31,21 @@ declare interface IPktModal {
|
|
|
31
31
|
size?: ModalSize;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
export declare interface IPktProgressbar {
|
|
35
|
+
valueCurrent: number;
|
|
36
|
+
valueMax?: number;
|
|
37
|
+
valueMin?: number;
|
|
38
|
+
ariaValueText?: string;
|
|
39
|
+
skin?: TProgressbarSkin;
|
|
40
|
+
title?: string;
|
|
41
|
+
titlePosition?: TProgressbarTitlePosition;
|
|
42
|
+
statusType?: TProgressbarStatusType;
|
|
43
|
+
statusPlacement?: TProgressbarStatusPlacement;
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
ariaLabelledby?: string;
|
|
46
|
+
role?: TProgressbarRole;
|
|
47
|
+
}
|
|
48
|
+
|
|
34
49
|
declare interface IPktTag {
|
|
35
50
|
closeTag?: boolean;
|
|
36
51
|
size?: TagSize;
|
|
@@ -447,6 +462,28 @@ export declare class PktModal extends PktElement implements IPktModal {
|
|
|
447
462
|
render(): TemplateResult<1>;
|
|
448
463
|
}
|
|
449
464
|
|
|
465
|
+
export declare class PktProgressbar extends PktElement implements IPktProgressbar {
|
|
466
|
+
valueCurrent: number;
|
|
467
|
+
valueMax: number;
|
|
468
|
+
valueMin: number;
|
|
469
|
+
skin: TProgressbarSkin;
|
|
470
|
+
title: string;
|
|
471
|
+
titlePosition: TProgressbarTitlePosition;
|
|
472
|
+
statusType: TProgressbarStatusType;
|
|
473
|
+
statusPlacement: TProgressbarStatusPlacement;
|
|
474
|
+
ariaLabel: string;
|
|
475
|
+
ariaLabelledby: string;
|
|
476
|
+
ariaValueText: string;
|
|
477
|
+
role: TProgressbarRole;
|
|
478
|
+
private labelWidth;
|
|
479
|
+
private progressBarId;
|
|
480
|
+
private labelRef;
|
|
481
|
+
private progressBarRef;
|
|
482
|
+
firstUpdated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
483
|
+
updated(changedProperties: Map<string | number | symbol, unknown>): void;
|
|
484
|
+
render(): TemplateResult<1>;
|
|
485
|
+
}
|
|
486
|
+
|
|
450
487
|
declare class PktSlotController implements ReactiveController {
|
|
451
488
|
host: LitElement & ReactiveControllerHost;
|
|
452
489
|
nodes: Element[];
|
|
@@ -522,6 +559,16 @@ declare type TagSkin = 'blue' | 'green' | 'red' | 'yellow' | 'beige' | 'blue-lig
|
|
|
522
559
|
|
|
523
560
|
declare type TagType = 'button' | 'reset' | 'submit';
|
|
524
561
|
|
|
562
|
+
export declare type TProgressbarRole = 'progressbar' | 'meter';
|
|
563
|
+
|
|
564
|
+
export declare type TProgressbarSkin = 'dark-blue' | 'light-blue' | 'green' | 'red';
|
|
565
|
+
|
|
566
|
+
export declare type TProgressbarStatusPlacement = 'center' | 'left' | 'following';
|
|
567
|
+
|
|
568
|
+
export declare type TProgressbarStatusType = 'none' | 'percentage' | 'fraction';
|
|
569
|
+
|
|
570
|
+
export declare type TProgressbarTitlePosition = 'left' | 'center';
|
|
571
|
+
|
|
525
572
|
export { }
|
|
526
573
|
|
|
527
574
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { P as x, u as
|
|
2
|
-
import {
|
|
1
|
+
import { P as x, u as m, s as o, E as a, x as p, n as r } from "./index-CFDwiDTU.js";
|
|
2
|
+
import { P as w } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
3
|
+
import { e as k, n as v } from "./ref-Dzme4zb6.js";
|
|
3
4
|
import { o as T } from "./index-RwtTBIhT.js";
|
|
4
5
|
import { e as u } from "./class-map-CBvUV2N3.js";
|
|
5
6
|
import { t as _ } from "./custom-element-CWfU4dcr.js";
|
|
@@ -11,7 +12,7 @@ var D = Object.defineProperty, B = Object.getOwnPropertyDescriptor, e = (c, h, l
|
|
|
11
12
|
};
|
|
12
13
|
let t = class extends x {
|
|
13
14
|
constructor() {
|
|
14
|
-
super(), this.defaultSlot = k(), this.forId =
|
|
15
|
+
super(), this.defaultSlot = k(), this.forId = m(), this.label = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = o.props.helptextDropdownButton.default, this.counter = o.props.counter.default, this.counterCurrent = 0, this.counterMaxLength = 0, this.optionalTag = o.props.optionalTag.default, this.optionalText = o.props.optionalText.default, this.requiredTag = o.props.requiredTag.default, this.requiredText = o.props.requiredText.default, this.hasError = o.props.hasError.default, this.errorMessage = "", this.disabled = o.props.disabled.default, this.inline = o.props.inline.default, this.ariaDescribedby = void 0, this.hasFieldset = o.props.hasFieldset.default, this.useWrapper = o.props.useWrapper.default, this.slotController = new w(this, this.defaultSlot);
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
17
18
|
const c = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./index-CR7t1zY9.cjs"),h=require("./ref-
|
|
1
|
+
"use strict";const t=require("./index-CR7t1zY9.cjs"),b=require("./pkt-slot-controller-Ckk_yV0j.cjs"),h=require("./ref-CA2-0S_W.cjs"),f=require("./index-CmTjXoAb.cjs"),a=require("./class-map-a5HUzP83.cjs"),$=require("./custom-element-B-TlBwRu.cjs");require("./helptext-_fMLOOCL.cjs");var g=Object.defineProperty,I=Object.getOwnPropertyDescriptor,e=(l,i,n,p)=>{for(var r=p>1?void 0:p?I(i,n):i,s=l.length-1,o;s>=0;s--)(o=l[s])&&(r=(p?o(i,n,r):o(r))||r);return p&&r&&g(i,n,r),r};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=h.e(),this.forId=t.uuidish(),this.label="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=t.specs.props.helptextDropdownButton.default,this.counter=t.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.optionalTag=t.specs.props.optionalTag.default,this.optionalText=t.specs.props.optionalText.default,this.requiredTag=t.specs.props.requiredTag.default,this.requiredText=t.specs.props.requiredText.default,this.hasError=t.specs.props.hasError.default,this.errorMessage="",this.disabled=t.specs.props.disabled.default,this.inline=t.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=t.specs.props.hasFieldset.default,this.useWrapper=t.specs.props.useWrapper.default,this.slotController=new b.PktSlotController(this,this.defaultSlot)}render(){const i={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},n={"pkt-tag":!0,"pkt-tag--small":!0,"pkt-tag--thin-text":!0,"pkt-tag--blue-light":this.optionalTag,"pkt-tag--beige":!this.optionalTag&&this.requiredTag},p=this.helptextDropdown!=="",r={"pkt-inputwrapper__label":!0,"pkt-inputwrapper__fieldset":this.hasFieldset,"pkt-inputwrapper__legend":this.hasFieldset},s=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,o=()=>this.optionalTag||this.requiredTag?t.x`<span class=${a.e(n)}
|
|
2
2
|
>${this.optionalTag?this.optionalText:this.requiredTag?this.requiredText:t.E}</span
|
|
3
3
|
>`:t.E,d=()=>this.useWrapper?this.hasFieldset?t.x`<legend class="pkt-inputwrapper__legend" id="${this.forId}-label">
|
|
4
4
|
${this.label} ${o()}
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
id="${this.forId}-error"
|
|
27
27
|
>
|
|
28
28
|
<pkt-icon name="alert-error" class="pkt-alert__icon"></pkt-icon>
|
|
29
|
-
<div class="pkt-alert__text">${
|
|
29
|
+
<div class="pkt-alert__text">${f.o(this.errorMessage)}</div>
|
|
30
30
|
</div>`:t.E,u=()=>t.x`
|
|
31
31
|
${d()} ${c()}
|
|
32
32
|
${p?t.x`<label for="${this.forId}" class="pkt-sr-only" aria-describedby="${s}"
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
id="${this.forId}-label"
|
|
44
44
|
>
|
|
45
45
|
${u()}
|
|
46
|
-
</label>`;return t.x`<div class=${a.e(i)}>${k()}</div> `}};e([t.n({type:String})],exports.PktInputWrapper.prototype,"forId",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"label",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptext",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdown",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdownButton",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"counter",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterCurrent",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterMaxLength",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"optionalTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"optionalText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"requiredTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"requiredText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasError",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"errorMessage",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"disabled",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"inline",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"ariaDescribedby",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasFieldset",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"useWrapper",2);exports.PktInputWrapper=e([
|
|
46
|
+
</label>`;return t.x`<div class=${a.e(i)}>${k()}</div> `}};e([t.n({type:String})],exports.PktInputWrapper.prototype,"forId",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"label",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptext",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdown",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdownButton",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"counter",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterCurrent",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterMaxLength",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"optionalTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"optionalText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"requiredTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"requiredText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasError",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"errorMessage",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"disabled",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"inline",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"ariaDescribedby",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasFieldset",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"useWrapper",2);exports.PktInputWrapper=e([$.t("pkt-input-wrapper")],exports.PktInputWrapper);
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
import { P as f, x as c, n } from "./index-CFDwiDTU.js";
|
|
2
2
|
import { t as h } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { e as k,
|
|
3
|
+
import { e as k, n as m } from "./ref-Dzme4zb6.js";
|
|
4
4
|
import "./index-RwtTBIhT.js";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
import { P as u } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
6
|
+
var _ = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (o, i, s, l) => {
|
|
7
|
+
for (var e = l > 1 ? void 0 : l ? d(i, s) : i, a = o.length - 1, p; a >= 0; a--)
|
|
8
|
+
(p = o[a]) && (e = (l ? p(i, s, e) : p(e)) || e);
|
|
9
|
+
return l && e && _(i, s, e), e;
|
|
9
10
|
};
|
|
10
11
|
let t = class extends f {
|
|
11
12
|
constructor() {
|
|
12
|
-
super(), this.defaultSlot = k(), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal", this.slotController = new
|
|
13
|
+
super(), this.defaultSlot = k(), this.title = "", this.href = "#", this.iconName = "", this.external = !1, this.openInNewTab = !1, this.skin = "normal", this.slotController = new u(this, this.defaultSlot);
|
|
13
14
|
}
|
|
14
15
|
render() {
|
|
15
|
-
const
|
|
16
|
+
const o = ["pkt-linkcard", this.skin && `pkt-linkcard--${this.skin}`].filter(Boolean).join(" "), i = ["pkt-linkcard__title", this.external && "pkt-link pkt-link--external"].filter(Boolean).join(" ");
|
|
16
17
|
return c`
|
|
17
18
|
<a
|
|
18
19
|
href=${this.href}
|
|
19
|
-
class=${
|
|
20
|
+
class=${o}
|
|
20
21
|
target=${this.openInNewTab ? "_blank" : "_self"}
|
|
21
22
|
rel=${this.openInNewTab ?? "noopener noreferrer"}
|
|
22
23
|
>
|
|
23
24
|
${this.iconName && c`<pkt-icon class="pkt-link__icon" name="${this.iconName}" />`}
|
|
24
25
|
${this.title && c`<div class=${i}>${this.title}</div>`}
|
|
25
26
|
|
|
26
|
-
<div class="pkt-linkcard__text" ${
|
|
27
|
+
<div class="pkt-linkcard__text" ${m(this.defaultSlot)}></div>
|
|
27
28
|
</a>
|
|
28
29
|
`;
|
|
29
30
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./index-CR7t1zY9.cjs"),p=require("./custom-element-B-TlBwRu.cjs"),k=require("./ref-
|
|
1
|
+
"use strict";const t=require("./index-CR7t1zY9.cjs"),p=require("./custom-element-B-TlBwRu.cjs"),k=require("./ref-CA2-0S_W.cjs");require("./index-CmTjXoAb.cjs");const c=require("./pkt-slot-controller-Ckk_yV0j.cjs");var h=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(s,n,i,l)=>{for(var e=l>1?void 0:l?f(n,i):n,o=s.length-1,a;o>=0;o--)(a=s[o])&&(e=(l?a(n,i,e):a(e))||e);return l&&e&&h(n,i,e),e};exports.PktLinkCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=k.e(),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal",this.slotController=new c.PktSlotController(this,this.defaultSlot)}render(){const n=["pkt-linkcard",this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(" "),i=["pkt-linkcard__title",this.external&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return t.x`
|
|
2
2
|
<a
|
|
3
3
|
href=${this.href}
|
|
4
4
|
class=${n}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";const c=require("./class-map-a5HUzP83.cjs"),k=require("./custom-element-B-TlBwRu.cjs"),n=require("./index-CR7t1zY9.cjs"),u=require("./pkt-slot-controller-Ckk_yV0j.cjs"),a=require("./ref-CA2-0S_W.cjs");require("./index-CmTjXoAb.cjs");const m="pkt-modal",h=!0,g={"background-click":{description:"Event som trigges når bakgrunnen trykkes på"},close:{description:"Event som trigges når meldingsboksen lukkes"}},f={headingText:{name:"Heading text",description:"Heading tekst på modalen",type:"string"},hideCloseButton:{name:"Gjem 'Lukk'-knapp",description:"Gjemmer lukkeknappen. Dersom denne er satt til true, vil ikke lukkeknappen vises, og dermed er det viktig at man tilbyr en annen måte som f.eks. en knapp for å lukke modalen på.",type:"boolean",default:!1},closeOnBackdropClick:{name:"Lukk modalen når bakgrunnen trykkes på",description:"Lukk modalen når bakgrunnen trykkes på",type:"boolean",default:!1},size:{name:"Størrelse",description:"Størrelsen på modalen",type:["small","medium","large"],default:"medium"}},v={default:{description:"Innholdet i meldingen. Her tilbyr vi støtteklasser for å style 1-3 knapper i modalen."}},p={name:m,"css-class":"pkt-modal",isElements:h,events:g,props:f,slots:v};var b=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(d,e,t,o)=>{for(var s=o>1?void 0:o?y(e,t):e,l=d.length-1,r;l>=0;l--)(r=d[l])&&(s=(o?r(e,t,s):r(s))||s);return o&&s&&b(e,t,s),s};exports.PktModal=class extends n.PktElement{constructor(){super(),this.headingText="",this.removePadding=!1,this.hideCloseButton=p.props.hideCloseButton.default,this.closeOnBackdropClick=p.props.closeOnBackdropClick.default,this.size=p.props.size.default,this.defaultSlot=a.e(),this.dialogRef=a.e(),this._isOpen=!1,this.close=(e,t=!1)=>{var l;this._isOpen=!1,t||(l=this.dialogRef.value)==null||l.close();const o=document.activeElement;o&&!this.isElementInViewport(o)&&o.scrollIntoView({behavior:"smooth",block:"nearest"}),this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),document.querySelector(".pkt-modal")&&document.body.classList.remove("pkt-modal--open"),this.requestUpdate()},this.showModal=e=>{var o;this._isOpen=!0,(o=this.dialogRef.value)==null||o.showModal(),document.querySelector(".pkt-modal")&&document.body.classList.add("pkt-modal--open"),this.dispatchEvent(new CustomEvent("showModal",{detail:{origin:e},bubbles:!0,composed:!0})),this.requestUpdate()},this.slotController=new u.PktSlotController(this,this.defaultSlot),this._isOpen=!1}async connectedCallback(){var e;super.connectedCallback(),document.addEventListener("keydown",this.handleKeyDown.bind(this)),document.addEventListener("click",this.handleBackdropClick.bind(this)),(e=this.dialogRef.value)==null||e.addEventListener("submit",t=>this.close(t,!0))}disconnectedCallback(){var e;super.disconnectedCallback(),document.removeEventListener("keydown",this.handleKeyDown.bind(this)),document.removeEventListener("click",this.handleBackdropClick.bind(this)),(e=this.dialogRef.value)==null||e.removeEventListener("submit",t=>this.close(t,!0))}handleKeyDown(e){e.key==="Escape"&&this.close(e)}handleBackdropClick(e){var t;this.closeOnBackdropClick&&e.target===((t=this.dialogRef)==null?void 0:t.value)&&this.close(e)}isElementInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)}render(){const e={"pkt-modal":!0,"pkt-modal--removePadding":this.removePadding??!1,"pkt-modal--noHeadingText":this.headingText===""||this.headingText===void 0,[`pkt-modal--${this.size}`]:this.size!==void 0},t={"pkt-modal__headingText":!0,"pkt-txt-24":!0},o={"pkt-modal__content":!0,"pkt-txt-18-light":!0};return n.x`
|
|
2
|
+
<dialog
|
|
3
|
+
class=${c.e(e)}
|
|
4
|
+
aria-modal=${this._isOpen}
|
|
5
|
+
${a.n(this.dialogRef)}
|
|
6
|
+
aria-labelledby="pkt-modal__headingText"
|
|
7
|
+
aria-describedby="pkt-modal__content"
|
|
8
|
+
autofocus
|
|
9
|
+
>
|
|
10
|
+
<div class="pkt-modal__header">
|
|
11
|
+
${this.headingText?n.x`<h1 id="pkt-modal__headingText" class=${c.e(t)}>
|
|
12
|
+
${this.headingText}
|
|
13
|
+
</h1>`:n.E}
|
|
14
|
+
${this.hideCloseButton?n.E:n.x`<div class="pkt-modal__closeButton">
|
|
15
|
+
<button
|
|
16
|
+
@click=${s=>this.close(s)}
|
|
17
|
+
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
18
|
+
aria-label="close"
|
|
19
|
+
>
|
|
20
|
+
<pkt-icon name="close" class="pkt-link__icon"></pkt-icon>
|
|
21
|
+
</button>
|
|
22
|
+
</div>`}
|
|
23
|
+
</div>
|
|
24
|
+
<div
|
|
25
|
+
id="pkt-modal__content"
|
|
26
|
+
class=${c.e(o)}
|
|
27
|
+
${a.n(this.defaultSlot)}
|
|
28
|
+
></div>
|
|
29
|
+
</dialog>
|
|
30
|
+
`}};i([n.n({type:String,reflect:!0})],exports.PktModal.prototype,"headingText",2);i([n.n({type:Boolean,reflect:!0})],exports.PktModal.prototype,"removePadding",2);i([n.n({type:Boolean,reflect:!0})],exports.PktModal.prototype,"hideCloseButton",2);i([n.n({type:Boolean,reflect:!0})],exports.PktModal.prototype,"closeOnBackdropClick",2);i([n.n({type:String,reflect:!0})],exports.PktModal.prototype,"size",2);i([n.r()],exports.PktModal.prototype,"_isOpen",2);exports.PktModal=i([k.t("pkt-modal")],exports.PktModal);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { e as c } from "./class-map-CBvUV2N3.js";
|
|
2
2
|
import { t as g } from "./custom-element-CWfU4dcr.js";
|
|
3
3
|
import { r as f, P as v, x as p, E as h, n as a } from "./index-CFDwiDTU.js";
|
|
4
|
-
import {
|
|
4
|
+
import { P as b } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
5
|
+
import { e as k, n as u } from "./ref-Dzme4zb6.js";
|
|
5
6
|
import "./index-RwtTBIhT.js";
|
|
6
7
|
const y = "pkt-modal", _ = !0, C = {
|
|
7
8
|
"background-click": {
|
package/dist/pkt-alert.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./class-map-a5HUzP83.cjs"),k=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),c=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("./class-map-a5HUzP83.cjs"),k=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),u=require("./pkt-slot-controller-Ckk_yV0j.cjs"),c=require("./ref-CA2-0S_W.cjs");require("./index-CmTjXoAb.cjs");const v="pkt-alert",h=!0,m={onClose:{description:"React: Klikk-event for 'Lukk'-knappen"},close:{description:"Vue: Klikk-event for 'Lukk'-knappen"}},f={title:{name:"Tittel",description:"Tittelen som vises øverst i på meldingen",type:"string"},skin:{name:"Utseende",description:"Hvordan type melding er dette?",type:["info","success","warning","error"],default:"info"},date:{name:"Sist oppdatert",description:"Dato som vises nederst i på meldingen",type:"string"},ariaLive:{name:"aria-live",description:"Hvordan skal skjermleseren lese opp meldingen?",type:["off","polite","assertive"],default:"polite"},compact:{name:"Kompakt",description:"Gjør meldingen mindre",type:"boolean",default:!1},closeAlert:{name:"Vis 'Lukk'-knapp",description:"Viser 'Lukk'-knappen",type:"boolean",default:!1}},b={default:{description:"Innholdet i meldingen"}},n={name:v,"css-class":"pkt-alert","dark-mode":!0,isElement:h,events:m,props:f,slots:b};var y=Object.defineProperty,_=Object.getOwnPropertyDescriptor,i=(o,e,l,r)=>{for(var s=r>1?void 0:r?_(e,l):e,a=o.length-1,p;a>=0;a--)(p=o[a])&&(s=(r?p(e,l,s):p(s))||s);return r&&s&&y(e,l,s),s};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.compact=n.props.compact.default,this.title="",this.skin=n.props.skin.default,this.ariaLive=n.props.ariaLive.default,this["aria-live"]=null,this.closeAlert=n.props.closeAlert.default,this.date=null,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new u.PktSlotController(this,this.defaultSlot),this._isClosed=!1}connectedCallback(){super.connectedCallback(),this["aria-live"]=this.getAttribute("aria-live")||this.ariaLive}attributeChangedCallback(e,l,r){e==="ariaLive"&&(this["aria-live"]=r)}updated(e){super.updated(e),e.has("ariaLive")&&(this["aria-live"]=this.ariaLive)}render(){const e={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed};return t.x`
|
|
2
2
|
<div class=${d.e(e)}>
|
|
3
3
|
<pkt-icon
|
|
4
4
|
class="pkt-alert__icon"
|
package/dist/pkt-alert.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { e as k } from "./class-map-CBvUV2N3.js";
|
|
2
2
|
import { t as m } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { r as v, P as
|
|
4
|
-
import {
|
|
3
|
+
import { r as v, P as f, x as n, E as u, n as r } from "./index-CFDwiDTU.js";
|
|
4
|
+
import { P as h } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
5
|
+
import { e as b, n as y } from "./ref-Dzme4zb6.js";
|
|
5
6
|
import "./index-RwtTBIhT.js";
|
|
6
7
|
const _ = "pkt-alert", g = !0, C = {
|
|
7
8
|
onClose: {
|
|
@@ -67,25 +68,25 @@ const _ = "pkt-alert", g = !0, C = {
|
|
|
67
68
|
props: $,
|
|
68
69
|
slots: L
|
|
69
70
|
};
|
|
70
|
-
var S = Object.defineProperty, E = Object.getOwnPropertyDescriptor, i = (t,
|
|
71
|
-
for (var s = a > 1 ? void 0 : a ? E(
|
|
72
|
-
(d = t[c]) && (s = (a ? d(
|
|
73
|
-
return a && s && S(
|
|
71
|
+
var S = Object.defineProperty, E = Object.getOwnPropertyDescriptor, i = (t, l, o, a) => {
|
|
72
|
+
for (var s = a > 1 ? void 0 : a ? E(l, o) : l, c = t.length - 1, d; c >= 0; c--)
|
|
73
|
+
(d = t[c]) && (s = (a ? d(l, o, s) : d(s)) || s);
|
|
74
|
+
return a && s && S(l, o, s), s;
|
|
74
75
|
};
|
|
75
|
-
let e = class extends
|
|
76
|
+
let e = class extends f {
|
|
76
77
|
constructor() {
|
|
77
|
-
super(), this.defaultSlot =
|
|
78
|
+
super(), this.defaultSlot = b(), this.compact = p.props.compact.default, this.title = "", this.skin = p.props.skin.default, this.ariaLive = p.props.ariaLive.default, this["aria-live"] = null, this.closeAlert = p.props.closeAlert.default, this.date = null, this._isClosed = !1, this.close = (t) => {
|
|
78
79
|
this._isClosed = !0, this.dispatchEvent(
|
|
79
80
|
new CustomEvent("close", { detail: { origin: t }, bubbles: !0, composed: !0 })
|
|
80
81
|
), this.dispatchEvent(
|
|
81
82
|
new CustomEvent("on-close", { detail: { origin: t }, bubbles: !0, composed: !0 })
|
|
82
83
|
);
|
|
83
|
-
}, this.slotController = new
|
|
84
|
+
}, this.slotController = new h(this, this.defaultSlot), this._isClosed = !1;
|
|
84
85
|
}
|
|
85
86
|
connectedCallback() {
|
|
86
87
|
super.connectedCallback(), this["aria-live"] = this.getAttribute("aria-live") || this.ariaLive;
|
|
87
88
|
}
|
|
88
|
-
attributeChangedCallback(t,
|
|
89
|
+
attributeChangedCallback(t, l, o) {
|
|
89
90
|
t === "ariaLive" && (this["aria-live"] = o);
|
|
90
91
|
}
|
|
91
92
|
updated(t) {
|
|
@@ -128,25 +129,25 @@ let e = class extends h {
|
|
|
128
129
|
}
|
|
129
130
|
};
|
|
130
131
|
i([
|
|
131
|
-
|
|
132
|
+
r({ type: Boolean, reflect: !1 })
|
|
132
133
|
], e.prototype, "compact", 2);
|
|
133
134
|
i([
|
|
134
|
-
|
|
135
|
+
r({ type: String, reflect: !0 })
|
|
135
136
|
], e.prototype, "title", 2);
|
|
136
137
|
i([
|
|
137
|
-
|
|
138
|
+
r({ type: String, reflect: !0 })
|
|
138
139
|
], e.prototype, "skin", 2);
|
|
139
140
|
i([
|
|
140
|
-
|
|
141
|
+
r({ type: String })
|
|
141
142
|
], e.prototype, "ariaLive", 2);
|
|
142
143
|
i([
|
|
143
|
-
|
|
144
|
+
r({ type: String, reflect: !0 })
|
|
144
145
|
], e.prototype, "aria-live", 2);
|
|
145
146
|
i([
|
|
146
|
-
|
|
147
|
+
r({ type: Boolean, reflect: !0 })
|
|
147
148
|
], e.prototype, "closeAlert", 2);
|
|
148
149
|
i([
|
|
149
|
-
|
|
150
|
+
r({ type: String, reflect: !0 })
|
|
150
151
|
], e.prototype, "date", 2);
|
|
151
152
|
i([
|
|
152
153
|
v()
|
package/dist/pkt-card.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./class-map-a5HUzP83.cjs"),g=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),d=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("./class-map-a5HUzP83.cjs"),g=require("./custom-element-B-TlBwRu.cjs"),t=require("./index-CR7t1zY9.cjs"),u=require("./pkt-slot-controller-Ckk_yV0j.cjs"),d=require("./ref-CA2-0S_W.cjs");require("./index-CmTjXoAb.cjs");require("./pkt-tag.cjs");const k="pkt-card",h=!0,m={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},tags:{type:"array",description:"Liste av tags på kortet. Tar inn en array med objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"icon",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag",required:!0}}}},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},image:{type:"object",name:"Bilde",description:"Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",properties:{src:{type:"string",description:"Bilde på kortet",required:!0},alt:{type:"string",description:"Tekst for aria-label",required:!0}}}},y={default:{description:"Innholdet i kortet"}},l={name:k,"css-class":"pkt-card",isElement:h,props:m,slots:y};var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(a,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=a.length-1,p;o>=0;o--)(p=a[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&b(i,s,e),e};exports.PktCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),this.skin=l.props.skin.default,this.direction=l.props.direction.default,this.image={src:"",alt:""},this.heading="",this.subheading="",this.tags=[],this.slotController=new u.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){const i={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction};return t.x`
|
|
2
2
|
<div class=${c.e(i)}>
|
|
3
3
|
${this.image.src&&t.x`
|
|
4
4
|
<div class="pkt-card__image">
|
package/dist/pkt-card.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { e as g } from "./class-map-CBvUV2N3.js";
|
|
2
2
|
import { t as h } from "./custom-element-CWfU4dcr.js";
|
|
3
3
|
import { P as k, x as r, E as u, n as a } from "./index-CFDwiDTU.js";
|
|
4
|
-
import {
|
|
4
|
+
import { P as m } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
5
|
+
import { e as y, n as f } from "./ref-Dzme4zb6.js";
|
|
5
6
|
import "./index-RwtTBIhT.js";
|
|
6
7
|
import "./pkt-tag.js";
|
|
7
8
|
const b = "pkt-card", v = !0, $ = {
|
|
@@ -103,10 +104,10 @@ var S = Object.defineProperty, x = Object.getOwnPropertyDescriptor, s = (n, e, p
|
|
|
103
104
|
};
|
|
104
105
|
let t = class extends k {
|
|
105
106
|
constructor() {
|
|
106
|
-
super(), this.defaultSlot =
|
|
107
|
+
super(), this.defaultSlot = y(), this.skin = c.props.skin.default, this.direction = c.props.direction.default, this.image = {
|
|
107
108
|
src: "",
|
|
108
109
|
alt: ""
|
|
109
|
-
}, this.heading = "", this.subheading = "", this.tags = [], this.slotController = new
|
|
110
|
+
}, this.heading = "", this.subheading = "", this.tags = [], this.slotController = new m(this, this.defaultSlot);
|
|
110
111
|
}
|
|
111
112
|
connectedCallback() {
|
|
112
113
|
super.connectedCallback();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),h=require("./custom-element-B-TlBwRu.cjs"),
|
|
2
|
-
<div class="${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),h=require("./custom-element-B-TlBwRu.cjs"),c=require("./pkt-slot-controller-Ckk_yV0j.cjs"),i=require("./ref-CA2-0S_W.cjs"),d=require("./class-map-a5HUzP83.cjs"),u=require("./converters-DhM11VlY.cjs");var m=Object.defineProperty,k=Object.getOwnPropertyDescriptor,r=(l,t,s,o)=>{for(var n=o>1?void 0:o?k(t,s):t,a=l.length-1,p;a>=0;a--)(p=l[a])&&(n=(o?p(t,s,n):p(n))||n);return o&&n&&m(t,s,n),n};exports.PktComponent=class extends e.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=i.e(),this.namedSlot=i.e(),this.slotController=new c.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(t=>{this._list.push(t.toUpperCase())}),super.connectedCallback()}render(){const t={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return e.x`
|
|
2
|
+
<div class="${d.e(t)}">
|
|
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 ${i.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
|
+
${i.n(this.namedSlot)}
|
|
15
15
|
@change=${s=>alert(s.target.value)}
|
|
16
16
|
>
|
|
17
17
|
namedSlotRef
|
|
@@ -26,4 +26,4 @@
|
|
|
26
26
|
<ul>
|
|
27
27
|
${t.map(s=>e.x`<li>${s}</li>`)}
|
|
28
28
|
</ul>
|
|
29
|
-
`}doStuff(t){return t.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};
|
|
29
|
+
`}doStuff(t){return t.reverse()}handleGreeting(){this.dispatchEvent(new CustomEvent("pkt-greeting",{detail:"Hei på deg!"}))}};r([e.n({type:String})],exports.PktComponent.prototype,"string",2);r([e.n({converter:u.csvToArray})],exports.PktComponent.prototype,"strings",2);r([e.n({type:Boolean})],exports.PktComponent.prototype,"darkmode",2);r([e.n({type:Array})],exports.PktComponent.prototype,"_list",2);exports.PktComponent=r([h.t("pkt-component")],exports.PktComponent);
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import { t as
|
|
3
|
-
import {
|
|
1
|
+
import { P as c, x as h, t as f, n as i } from "./index-CFDwiDTU.js";
|
|
2
|
+
import { t as u } from "./custom-element-CWfU4dcr.js";
|
|
3
|
+
import { P as v } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
4
|
+
import { e as d, n as m } from "./ref-Dzme4zb6.js";
|
|
4
5
|
import { e as g } from "./class-map-CBvUV2N3.js";
|
|
5
6
|
import { c as k } from "./converters-DNCwIFwr.js";
|
|
6
|
-
var S = Object.defineProperty, $ = Object.getOwnPropertyDescriptor,
|
|
7
|
-
for (var s =
|
|
8
|
-
(p = t[a]) && (s = (
|
|
9
|
-
return
|
|
7
|
+
var S = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, o = (t, e, l, n) => {
|
|
8
|
+
for (var s = n > 1 ? void 0 : n ? $(e, l) : e, a = t.length - 1, p; a >= 0; a--)
|
|
9
|
+
(p = t[a]) && (s = (n ? p(e, l, s) : p(s)) || s);
|
|
10
|
+
return n && s && S(e, l, s), s;
|
|
10
11
|
};
|
|
11
|
-
let r = class extends
|
|
12
|
+
let r = class extends c {
|
|
12
13
|
constructor() {
|
|
13
14
|
super(), this.string = "", this.strings = [], this.darkmode = !1, this._list = [], this.defaultSlot = d(), this.namedSlot = d(), this.slotController = new v(this, this.defaultSlot, this.namedSlot);
|
|
14
15
|
}
|
|
@@ -38,11 +39,11 @@ let r = class extends m {
|
|
|
38
39
|
<div>${this.renderList(this.doStuff(this._list))}</div>
|
|
39
40
|
|
|
40
41
|
<h2 class="pkt-txt-22">Slot</h2>
|
|
41
|
-
<div ${
|
|
42
|
+
<div ${m(this.defaultSlot)}>defaultSlotRef</div>
|
|
42
43
|
<h2 class="pkt-txt-22">Named slot</h2>
|
|
43
44
|
<select
|
|
44
45
|
name="named-slot"
|
|
45
|
-
${
|
|
46
|
+
${m(this.namedSlot)}
|
|
46
47
|
@change=${(e) => alert(e.target.value)}
|
|
47
48
|
>
|
|
48
49
|
namedSlotRef
|
|
@@ -50,7 +51,7 @@ let r = class extends m {
|
|
|
50
51
|
|
|
51
52
|
<h2 class="pkt-txt-22">Knapp som emitter en event</h2>
|
|
52
53
|
<button type="button" @click=${() => this.handleGreeting()}>
|
|
53
|
-
Si ${
|
|
54
|
+
Si ${f.example.hi}
|
|
54
55
|
</button>
|
|
55
56
|
</div>
|
|
56
57
|
`;
|
|
@@ -79,20 +80,20 @@ let r = class extends m {
|
|
|
79
80
|
);
|
|
80
81
|
}
|
|
81
82
|
};
|
|
82
|
-
|
|
83
|
+
o([
|
|
83
84
|
i({ type: String })
|
|
84
85
|
], r.prototype, "string", 2);
|
|
85
|
-
|
|
86
|
+
o([
|
|
86
87
|
i({ converter: k })
|
|
87
88
|
], r.prototype, "strings", 2);
|
|
88
|
-
|
|
89
|
+
o([
|
|
89
90
|
i({ type: Boolean })
|
|
90
91
|
], r.prototype, "darkmode", 2);
|
|
91
|
-
|
|
92
|
+
o([
|
|
92
93
|
i({ type: Array })
|
|
93
94
|
], r.prototype, "_list", 2);
|
|
94
|
-
r =
|
|
95
|
-
|
|
95
|
+
r = o([
|
|
96
|
+
u("pkt-component")
|
|
96
97
|
], r);
|
|
97
98
|
export {
|
|
98
99
|
r as PktComponent
|
package/dist/pkt-datepicker.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CR7t1zY9.cjs"),b=require("./custom-element-B-TlBwRu.cjs"),r=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CR7t1zY9.cjs"),b=require("./custom-element-B-TlBwRu.cjs"),r=require("./ref-CA2-0S_W.cjs"),y=require("./class-map-a5HUzP83.cjs"),T=require("./converters-DhM11VlY.cjs"),m=require("./index-tvpcg-ad.cjs");require("./input-wrapper-tJE-X4Ac.cjs");require("./index-CmTjXoAb.cjs");require("./pkt-tag.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/dist/pkt-datepicker.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { T as A, r as P, a as L, x as v, E as b, n as u } from "./index-CFDwiDTU.js";
|
|
2
2
|
import { e as j, i as F, a as q, t as H } from "./custom-element-CWfU4dcr.js";
|
|
3
|
-
import { p as N, v as k, r as w, M as S, m as U, e as R, n as y } from "./ref-
|
|
3
|
+
import { p as N, v as k, r as w, M as S, m as U, e as R, n as y } from "./ref-Dzme4zb6.js";
|
|
4
4
|
import { e as x } from "./class-map-CBvUV2N3.js";
|
|
5
5
|
import { a as V } from "./converters-DNCwIFwr.js";
|
|
6
6
|
import { n as T, f as _, a as K, b as M } from "./index-D2jSRMrn.js";
|
|
7
|
-
import "./input-wrapper-
|
|
7
|
+
import "./input-wrapper-DVXNuxVu.js";
|
|
8
8
|
import "./index-RwtTBIhT.js";
|
|
9
9
|
import "./pkt-tag.js";
|
|
10
10
|
/**
|
package/dist/pkt-index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./pkt-alert.cjs"),t=require("./index-tvpcg-ad.cjs"),r=require("./pkt-card.cjs"),n=require("./pkt-component-template.cjs"),u=require("./pkt-datepicker.cjs"),a=require("./helptext-_fMLOOCL.cjs"),o=require("./index-CmTjXoAb.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./pkt-alert.cjs"),t=require("./index-tvpcg-ad.cjs"),r=require("./pkt-card.cjs"),n=require("./pkt-component-template.cjs"),u=require("./pkt-datepicker.cjs"),a=require("./helptext-_fMLOOCL.cjs"),o=require("./index-CmTjXoAb.cjs"),P=require("./input-wrapper-tJE-X4Ac.cjs"),i=require("./pkt-link.cjs"),c=require("./linkcard-CUXMP6BH.cjs"),k=require("./pkt-messagebox.cjs"),b=require("./modal-CjsQgmmH.cjs"),p=require("./progressbar-BlzTFI9U.cjs"),l=require("./pkt-tag.cjs"),d=require("./textarea-D_ud1Mpa.cjs"),s=require("./textinput-52G3CfwA.cjs");Object.defineProperty(exports,"PktAlert",{enumerable:!0,get:()=>e.PktAlert});Object.defineProperty(exports,"PktCalendar",{enumerable:!0,get:()=>t.PktCalendar});Object.defineProperty(exports,"PktCard",{enumerable:!0,get:()=>r.PktCard});Object.defineProperty(exports,"PktComponent",{enumerable:!0,get:()=>n.PktComponent});Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>u.PktDatepicker});Object.defineProperty(exports,"PktHelptext",{enumerable:!0,get:()=>a.PktHelptext});Object.defineProperty(exports,"PktIcon",{enumerable:!0,get:()=>o.PktIcon});Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>P.PktInputWrapper});Object.defineProperty(exports,"PktLink",{enumerable:!0,get:()=>i.PktLink});Object.defineProperty(exports,"PktLinkCard",{enumerable:!0,get:()=>c.PktLinkCard});Object.defineProperty(exports,"PktMessagebox",{enumerable:!0,get:()=>k.PktMessagebox});Object.defineProperty(exports,"PktModal",{enumerable:!0,get:()=>b.PktModal});Object.defineProperty(exports,"PktProgressbar",{enumerable:!0,get:()=>p.PktProgressbar});Object.defineProperty(exports,"PktTag",{enumerable:!0,get:()=>l.PktTag});Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>d.PktTextarea});Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>s.PktTextinput});
|
package/dist/pkt-index.js
CHANGED
|
@@ -5,14 +5,15 @@ import { PktComponent as k } from "./pkt-component-template.js";
|
|
|
5
5
|
import { PktDatepicker as f } from "./pkt-datepicker.js";
|
|
6
6
|
import { P as n } from "./helptext-DBolvFI4.js";
|
|
7
7
|
import { P as i } from "./index-RwtTBIhT.js";
|
|
8
|
-
import { P as C } from "./input-wrapper-
|
|
9
|
-
import { PktLink as
|
|
10
|
-
import { P as
|
|
11
|
-
import { PktMessagebox as
|
|
12
|
-
import { P as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { P as j } from "./
|
|
8
|
+
import { P as C } from "./input-wrapper-DVXNuxVu.js";
|
|
9
|
+
import { PktLink as T } from "./pkt-link.js";
|
|
10
|
+
import { P as c } from "./linkcard-BHokvuVN.js";
|
|
11
|
+
import { PktMessagebox as I } from "./pkt-messagebox.js";
|
|
12
|
+
import { P as M } from "./modal-lQfiTbGh.js";
|
|
13
|
+
import { P as D } from "./progressbar-1PEs_SMc.js";
|
|
14
|
+
import { PktTag as W } from "./pkt-tag.js";
|
|
15
|
+
import { P as j } from "./textarea-BXzQA_ub.js";
|
|
16
|
+
import { P as v } from "./textinput-CTNWiIaP.js";
|
|
16
17
|
export {
|
|
17
18
|
o as PktAlert,
|
|
18
19
|
P as PktCalendar,
|
|
@@ -22,11 +23,12 @@ export {
|
|
|
22
23
|
n as PktHelptext,
|
|
23
24
|
i as PktIcon,
|
|
24
25
|
C as PktInputWrapper,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
D as
|
|
30
|
-
W as
|
|
31
|
-
j as
|
|
26
|
+
T as PktLink,
|
|
27
|
+
c as PktLinkCard,
|
|
28
|
+
I as PktMessagebox,
|
|
29
|
+
M as PktModal,
|
|
30
|
+
D as PktProgressbar,
|
|
31
|
+
W as PktTag,
|
|
32
|
+
j as PktTextarea,
|
|
33
|
+
v as PktTextinput
|
|
32
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-tJE-X4Ac.cjs"),t=e.PktInputWrapper;Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>e.PktInputWrapper});exports.default=t;
|
package/dist/pkt-link.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),
|
|
2
|
-
class=${
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR7t1zY9.cjs"),k=require("./pkt-slot-controller-Ckk_yV0j.cjs"),p=require("./ref-CA2-0S_W.cjs"),h=require("./class-map-a5HUzP83.cjs"),f=require("./custom-element-B-TlBwRu.cjs");require("./index-CmTjXoAb.cjs");const u="pkt-link",d=!0,m={href:{name:"URL",description:"URL til lenken",type:"string",default:"#"},target:{name:"Mål",description:"Mål for lenken",type:["_blank","_self","_parent","_top"],default:"_self"},iconName:{name:"Ikon",description:"Ikon som skal vises ved siden av lenketeksten",type:"icon"},iconPosition:{name:"Ikonposisjon",description:"Posisjonen til ikonet i forhold til lenketeksten",type:["left","right"]},external:{name:"Ekstern lenke",description:"Vis ikon for ekstern lenke",type:"boolean",default:!1}},P={default:{description:"Innholdet i lenken"}},a={name:u,"css-class":"pkt-link","dark-mode":!0,isElement:d,props:m,slots:P};var y=Object.defineProperty,g=Object.getOwnPropertyDescriptor,i=(r,n,s,o)=>{for(var t=o>1?void 0:o?g(n,s):n,l=r.length-1,c;l>=0;l--)(c=r[l])&&(t=(o?c(n,s,t):c(t))||t);return o&&t&&y(n,s,t),t};exports.PktLink=class extends e.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.href=a.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=a.props.external.default,this.target=a.props.target.default,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const n={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return e.x`<a
|
|
2
|
+
class=${h.e(n)}
|
|
3
3
|
href=${this.href}
|
|
4
4
|
@click=${this.handleClick}
|
|
5
5
|
.target=${this.target}
|
|
6
6
|
.rel=${this.external?"noopener noreferrer":e.E}
|
|
7
|
-
>${this.iconName?e.x`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:""} <span ${
|
|
8
|
-
>`}handleClick(){this.dispatchEvent(new CustomEvent("click",{detail:"pkt-link-clicked",bubbles:!0}))}};i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"href",2);i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconName",2);i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconPosition",2);i([e.n({type:Boolean,reflect:!0})],exports.PktLink.prototype,"external",2);i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"target",2);exports.PktLink=i([
|
|
7
|
+
>${this.iconName?e.x`<pkt-icon name=${this.iconName} class="pkt-link__icon"></pkt-icon>`:""} <span ${p.n(this.defaultSlot)}>Link</span></a
|
|
8
|
+
>`}handleClick(){this.dispatchEvent(new CustomEvent("click",{detail:"pkt-link-clicked",bubbles:!0}))}};i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"href",2);i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconName",2);i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"iconPosition",2);i([e.n({type:Boolean,reflect:!0})],exports.PktLink.prototype,"external",2);i([e.n({type:String,reflect:!0})],exports.PktLink.prototype,"target",2);exports.PktLink=i([f.t("pkt-link")],exports.PktLink);
|
package/dist/pkt-link.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { P as f, x as k, E as h, n as i } from "./index-CFDwiDTU.js";
|
|
2
|
-
import {
|
|
2
|
+
import { P as m } from "./pkt-slot-controller-RJvOnbF4.js";
|
|
3
|
+
import { e as d, n as u } from "./ref-Dzme4zb6.js";
|
|
3
4
|
import { e as P } from "./class-map-CBvUV2N3.js";
|
|
4
5
|
import { t as y } from "./custom-element-CWfU4dcr.js";
|
|
5
6
|
import "./index-RwtTBIhT.js";
|
|
@@ -59,7 +60,7 @@ var $ = Object.defineProperty, N = Object.getOwnPropertyDescriptor, n = (o, s, l
|
|
|
59
60
|
};
|
|
60
61
|
let e = class extends f {
|
|
61
62
|
constructor() {
|
|
62
|
-
super(), this.defaultSlot =
|
|
63
|
+
super(), this.defaultSlot = d(), this.href = c.props.href.default, this.iconName = void 0, this.iconPosition = void 0, this.external = c.props.external.default, this.target = c.props.target.default, this.slotController = new m(this, this.defaultSlot);
|
|
63
64
|
}
|
|
64
65
|
render() {
|
|
65
66
|
const o = {
|