@oslokommune/punkt-elements 14.1.1 → 14.3.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/CHANGELOG.md +35 -0
- package/dist/booleanish-BKVonob4.cjs +1 -0
- package/dist/booleanish-C9R0tdXH.js +11 -0
- package/dist/{checkbox-BP5zOlPy.cjs → checkbox-C0TPnShf.cjs} +1 -1
- package/dist/{checkbox-CfXOh6Lw.js → checkbox-CnhA52o_.js} +1 -1
- package/dist/{combobox-BWsCkPH2.cjs → combobox-C1xwAju5.cjs} +1 -1
- package/dist/{combobox-BMznle0M.js → combobox-Dcp_fHcL.js} +2 -2
- package/dist/{datepicker-2s6FUxdi.js → datepicker-Bjb9GK1E.js} +2 -2
- package/dist/{datepicker-D1c9oP-2.cjs → datepicker-COIRRau0.cjs} +1 -1
- package/dist/index.d.ts +68 -180
- package/dist/{input-element-B0VPRK_E.js → input-element-B8M8Nppd.js} +77 -84
- package/dist/input-element-D697OAJo.cjs +1 -0
- package/dist/{input-wrapper-CAwzMR9o.js → input-wrapper-1PCXqtiu.js} +42 -49
- package/dist/{input-wrapper-DXg2N3wx.cjs → input-wrapper-CtBiAb04.cjs} +20 -20
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +2 -2
- package/dist/pkt-header.cjs +14 -12
- package/dist/pkt-header.js +163 -155
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +8 -8
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- 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/{radiobutton-BuKXgQm_.cjs → radiobutton-BkqaqO5E.cjs} +1 -1
- package/dist/{radiobutton-C_MzK8dE.js → radiobutton-Caq8-GhM.js} +1 -1
- package/dist/{select-Ds4Ws1_6.cjs → select-3dwlk22G.cjs} +1 -1
- package/dist/{select-CteaDnzz.js → select-_C-yztI0.js} +2 -2
- package/dist/{textarea-zeFp1hxO.cjs → textarea-DyUy8u7X.cjs} +1 -1
- package/dist/{textarea-D4T9yqw7.js → textarea-a6T4aJJU.js} +2 -2
- package/dist/{textinput-Cddq4eF_.js → textinput-DIuM70dd.js} +2 -2
- package/dist/{textinput-DFFL5v-U.cjs → textinput-IN3b0nSH.cjs} +1 -1
- package/package.json +2 -2
- package/src/components/accordion/accordion.ts +2 -1
- package/src/components/alert/alert.ts +2 -2
- package/src/components/button/button.ts +2 -3
- package/src/components/card/card.ts +2 -3
- package/src/components/header/header-service.ts +12 -8
- package/src/components/header/header.ts +8 -2
- package/src/components/header/index.ts +4 -1
- package/src/components/header/types.ts +33 -98
- package/src/components/heading/heading.ts +4 -3
- package/src/components/index.ts +4 -1
- package/src/components/input-wrapper/input-wrapper.ts +2 -16
- package/src/components/messagebox/messagebox.ts +2 -1
- package/src/components/progressbar/progressbar.ts +1 -1
- package/src/components/tag/tag.ts +2 -2
- package/dist/input-element-BmXkhljw.cjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,41 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [14.3.0](https://github.com/oslokommune/punkt/compare/14.2.0...14.3.0) (2026-02-04)
|
|
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
|
+
## [14.2.0](https://github.com/oslokommune/punkt/compare/14.1.1...14.2.0) (2026-02-04)
|
|
26
|
+
|
|
27
|
+
### ⚠ BREAKING CHANGES
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Features
|
|
31
|
+
* Ny mappe `shared-types` for å samle alle TS-definisjoner som deles mellom komponenter (#3225).
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
Ingen
|
|
36
|
+
|
|
37
|
+
### Chores
|
|
38
|
+
Ingen
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
|
|
8
43
|
## [14.1.0](https://github.com/oslokommune/punkt/compare/14.0.4...14.1.0) (2026-02-03)
|
|
9
44
|
|
|
10
45
|
### ⚠ BREAKING CHANGES
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t={fromAttribute(r){return r==null?!1:r===""||r==="true"||r===!0?!0:r==="false"||r===!1?!1:!!r},toAttribute(r){return r?"true":"false"}};exports.booleanishConverter=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-CJ_QKaki.cjs"),o=require("./input-element-
|
|
1
|
+
"use strict";const t=require("./element-CJ_QKaki.cjs"),o=require("./input-element-D697OAJo.cjs"),r=require("./ref-BFa5Utho.cjs"),p=require("./class-map-C_erArZz.cjs");var u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,i=(l,e,h,a)=>{for(var s=a>1?void 0:a?d(e,h):e,c=l.length-1,n;c>=0;c--)(n=l[c])&&(s=(a?n(e,h,s):n(s))||s);return a&&s&&u(e,h,s),s};exports.PktCheckbox=class extends o.PktInputElement{constructor(){super(...arguments),this.inputRef=r.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.isSwitch=!1,this.labelPosition="right",this.hideLabel=!1,this.checked=null,this.indeterminate=!1,this.type="checkbox",this.tagText=null,this.optionalTag=!1,this.optionalText="Valgfritt",this.requiredTag=!1,this.requiredText="Må fylles ut"}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,h,a){e==="defaultChecked"&&!this.checked&&(this.checked=this.defaultChecked),e==="checked"&&(this.checked=this.checked===""||this.checked==="true"||this.checked===!0,this.inputRef.value&&(this.inputRef.value.checked=this.checked)),e==="indeterminate"&&(this.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0,this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate)),super.attributeChangedCallback(e,h,a)}firstUpdated(e){e.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.firstUpdated(e)}updated(e){e.has("defaultChecked")&&!this.checked&&(this.checked=this.defaultChecked),e.has("checked")&&this.inputRef.value&&(this.inputRef.value.checked=this.checked===""||this.checked==="true"||this.checked===!0),e.has("indeterminate")&&this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===""||this.indeterminate==="true"||this.indeterminate===!0),super.updated(e)}render(){const e=p.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),h=p.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=p.e({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition==="left","pkt-input-check__input-label--right":this.labelPosition==="right","pkt-sr-only":this.hideLabel}),s="pkt-tag pkt-tag--small pkt-tag--thin-text",c=()=>t.x`
|
|
2
2
|
${this.tagText?t.x`<span class=${s+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
|
|
3
3
|
${this.optionalTag?t.x`<span class=${s+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
|
|
4
4
|
${this.requiredTag?t.x`<span class=${s+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { E as r, x as p, n as s, a as d } from "./element-CRDRygXu.js";
|
|
2
|
-
import { P as k } from "./input-element-
|
|
2
|
+
import { P as k } from "./input-element-B8M8Nppd.js";
|
|
3
3
|
import { e as f, n as b } from "./ref-Xa5dbh--.js";
|
|
4
4
|
import { e as u } from "./class-map-wy7PUk0P.js";
|
|
5
5
|
var g = Object.defineProperty, m = Object.getOwnPropertyDescriptor, i = (t, a, n, l) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("./element-CJ_QKaki.cjs"),c=require("./if-defined-Bc9-_I01.cjs"),d=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),y=require("./class-map-C_erArZz.cjs"),O=require("./repeat-BZb41H64.cjs"),$=require("./input-element-
|
|
1
|
+
"use strict";const a=require("./element-CJ_QKaki.cjs"),c=require("./if-defined-Bc9-_I01.cjs"),d=require("./state-DSjcvzDN.cjs"),r=require("./ref-BFa5Utho.cjs"),y=require("./class-map-C_erArZz.cjs"),O=require("./repeat-BZb41H64.cjs"),$=require("./input-element-D697OAJo.cjs"),I=require("./pkt-options-controller-CiuBG6Lt.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-CtBiAb04.cjs");require("./icon-MRx-m0Or.cjs");require("./tag-B02fKJ66.cjs");require("./listbox-DnoqOo5u.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,A=Object.getOwnPropertyDescriptor,h=(v,t,e,i)=>{for(var s=i>1?void 0:i?A(t,e):t,n=v.length-1,l;n>=0;n--)(l=v[n])&&(s=(i?l(t,e,s):l(s))||s);return i&&s&&V(t,e,s),s};exports.PktCombobox=class extends $.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.defaultOptions=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new I.PktOptionsSlotController(this),this.slotController=new w.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){var t;if(super.connectedCallback(),document&&document.body.addEventListener("click",e=>{this._isOptionsOpen&&!this.contains(e.target)&&this.handleFocusOut(e)}),this._options=[],this.defaultOptions&&this.defaultOptions.length){const e=((t=this.options)==null?void 0:t.filter(i=>i.userAdded))||[];this.options=[...e,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(this.optionsController.nodes.length){const e=[];this.optionsController.nodes.forEach(i=>{if(!i.textContent&&!i.getAttribute("value"))return null;const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||""};i.getAttribute("data-prefix")&&(s.prefix=i.getAttribute("data-prefix")||void 0),i.getAttribute("tagskincolor")&&(s.tagSkinColor=i.getAttribute("tagskincolor")),i.getAttribute("description")&&(s.description=i.getAttribute("description")||void 0),s.fulltext=s.value+s.label+(s.prefix||""),e.push(s)}),e.length&&(this.options=[...e],this._options=[...e])}}updated(t){if(t.has("_value")&&this.valueChanged(this._value,t.get("_value")),t.has("value")&&(Array.isArray(this.value)?this._value=this.value:this.value&&this.multiple?this._value=this.value.split(","):this.value?this._value=[this.value]:this._value=[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),t.has("defaultOptions")&&this.defaultOptions.length){const e=(Array.isArray(this.options)?this.options:[]).filter(i=>i.userAdded)||[];this.options=[...e,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=Array.isArray(this.options)?[...this.options]:[]}if(t.has("options")){const s=(t.get("options")||this._options||[]).filter(l=>l&&l.userAdded).filter(l=>!(Array.isArray(this.options)?this.options:[]).some(o=>o.value===l.value)),n=[...s,...this.options];this._options=n,s.length>0&&(this.options=n),this._options.forEach(l=>{if(l.value&&!l.label&&(l.label=l.value),l.selected&&!this._value.includes(l.value)){const o=[...this._value];this._value=[...this._value,l.value],this.valueChanged(this._value,o)}l.fulltext=l.value+l.label+(l.prefix||""),l.selected=l.selected||this._value.includes(l.value)})}t.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(t)}attributeChangedCallback(t,e,i){t==="value"&&(Array.isArray(this.value)?this._value=this.value:this.value&&this.multiple?this._value=this.value.split(","):this.value?this._value=[this.value]:this._value=[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),t==="options"&&(this._options=Array.isArray(this.options)?[...this.options]:[],this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(t,e,i)}render(){return a.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
.label=${this.label}
|
|
4
4
|
.helptext=${this.helptext}
|
|
@@ -4,10 +4,10 @@ import { r as c } from "./state-DS_kr2Fy.js";
|
|
|
4
4
|
import { e as _, n as v } from "./ref-Xa5dbh--.js";
|
|
5
5
|
import { e as k } from "./class-map-wy7PUk0P.js";
|
|
6
6
|
import { c as R } from "./repeat-CJ79egkN.js";
|
|
7
|
-
import { P as V } from "./input-element-
|
|
7
|
+
import { P as V } from "./input-element-B8M8Nppd.js";
|
|
8
8
|
import { P as A } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
9
9
|
import { P as C } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
10
|
-
import "./input-wrapper-
|
|
10
|
+
import "./input-wrapper-1PCXqtiu.js";
|
|
11
11
|
import "./icon-BB7e5iQN.js";
|
|
12
12
|
import "./tag-CES41g0D.js";
|
|
13
13
|
import "./listbox-mvKKzH-v.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { P as L, E as I, x as o, n as l, a as w } from "./element-CRDRygXu.js";
|
|
2
2
|
import { r as G } from "./state-DS_kr2Fy.js";
|
|
3
3
|
import { s as K, f as q, n as F, a as J, i as Q, b as M, v as D, d as X, e as Y, p as Z, g as W } from "./calendar-CvfMj3fA.js";
|
|
4
|
-
import { P as ee } from "./input-element-
|
|
4
|
+
import { P as ee } from "./input-element-B8M8Nppd.js";
|
|
5
5
|
import { e as m, n as v } from "./ref-Xa5dbh--.js";
|
|
6
6
|
import "./icon-BB7e5iQN.js";
|
|
7
|
-
import "./input-wrapper-
|
|
7
|
+
import "./input-wrapper-1PCXqtiu.js";
|
|
8
8
|
import { e as $ } from "./class-map-wy7PUk0P.js";
|
|
9
9
|
import { c as te } from "./repeat-CJ79egkN.js";
|
|
10
10
|
import "./tag-CES41g0D.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const l=require("./element-CJ_QKaki.cjs"),B=require("./state-DSjcvzDN.cjs"),u=require("./calendar-ZzLAjDpv.cjs"),A=require("./input-element-
|
|
1
|
+
"use strict";const l=require("./element-CJ_QKaki.cjs"),B=require("./state-DSjcvzDN.cjs"),u=require("./calendar-ZzLAjDpv.cjs"),A=require("./input-element-D697OAJo.cjs"),p=require("./ref-BFa5Utho.cjs");require("./icon-MRx-m0Or.cjs");require("./input-wrapper-CtBiAb04.cjs");const m=require("./class-map-C_erArZz.cjs"),M=require("./repeat-BZb41H64.cjs");require("./tag-B02fKJ66.cjs");const I=require("./utils-byXsEz1u.cjs"),g=require("./if-defined-Bc9-_I01.cjs"),F=require("./pkt-slot-controller-BzddBp7z.cjs");var j=Object.defineProperty,q=Object.getOwnPropertyDescriptor,b=(s,e,t,a)=>{for(var i=a>1?void 0:a?q(e,t):e,n=s.length-1,r;n>=0;n--)(r=s[n])&&(i=(a?r(e,t,i):r(i))||i);return a&&i&&j(e,t,i),i};exports.PktDateTags=class extends l.PktElement{constructor(){super(...arguments),this.dates=[],this.dateformat="dd.MM.yyyy",this.className="pkt-datepicker__tags",this.idBase=I.uuidish()}render(){return this.classes={"pkt-date-tags":!0,[this.className]:!0},l.x`
|
|
2
2
|
<div class=${m.e(this.classes)} aria-live="polite">
|
|
3
3
|
${Array.isArray(this.dates)&&this.dates[0]?M.c(u.sortDateStrings((this.dates??[]).filter(Boolean)),e=>e,e=>{var t;return l.x` <pkt-tag
|
|
4
4
|
id=${this.idBase+e+"-tag"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Booleanish } from '../../../../../shared-types';
|
|
2
|
+
import { Booleanish as Booleanish_2 } from '../../../../shared-types';
|
|
3
|
+
import { IAriaAttributes } from '../../../../../shared-types';
|
|
1
4
|
import { LitElement } from 'lit';
|
|
2
5
|
import { nothing } from 'lit';
|
|
3
6
|
import { PktIconName } from '@oslokommune/punkt-assets/dist/icons/icon';
|
|
@@ -5,20 +8,26 @@ import { PropertyValues } from 'lit';
|
|
|
5
8
|
import { ReactiveController } from 'lit';
|
|
6
9
|
import { ReactiveControllerHost } from 'lit';
|
|
7
10
|
import { Ref } from 'lit/directives/ref.js';
|
|
11
|
+
import { Representing } from '../../../../../shared-types';
|
|
12
|
+
import { TAccordionSkin } from '../../../../../shared-types';
|
|
13
|
+
import { TAlertSkin } from '../../../../../shared-types';
|
|
14
|
+
import { TAriaLive } from '../../../../../shared-types';
|
|
15
|
+
import { TCardSkin } from '../../../../../shared-types';
|
|
8
16
|
import { TemplateResult } from 'lit-html';
|
|
9
17
|
import { TemplateResult as TemplateResult_2 } from 'lit';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
import { THeaderMenu } from '../../../../../shared-types';
|
|
19
|
+
import { THeaderPosition } from '../../../../../shared-types';
|
|
20
|
+
import { THeaderScrollBehavior } from '../../../../../shared-types';
|
|
21
|
+
import { THeadingLevel } from '../../../../../shared-types';
|
|
22
|
+
import { THeadingSize } from '../../../../../shared-types';
|
|
23
|
+
import { THeadingWeight } from '../../../../../shared-types';
|
|
24
|
+
import { THTMLButtonType } from '../../../../../shared-types';
|
|
25
|
+
import { TLayout } from '../../../../../shared-types';
|
|
26
|
+
import { TMessageboxSkin } from '../../../../../shared-types';
|
|
27
|
+
import { TLogOutButtonPlacement as TPktHeaderLogOutButtonPlacement } from '../../../../../shared-types';
|
|
28
|
+
import { TSlotMenuVariant } from '../../../../../shared-types';
|
|
29
|
+
import { User } from '../../../../../shared-types';
|
|
30
|
+
import { UserMenuItem } from '../../../../../shared-types';
|
|
22
31
|
|
|
23
32
|
/**
|
|
24
33
|
* We define all props as optional. Native HTML attributes are optional by default,
|
|
@@ -27,55 +36,6 @@ declare type Booleanish_4 = boolean | 'true' | 'false';
|
|
|
27
36
|
*/
|
|
28
37
|
declare type ElementProps<Element, PropKeys extends keyof Element> = Partial<Pick<Element, PropKeys>>;
|
|
29
38
|
|
|
30
|
-
declare interface IAriaAttributes {
|
|
31
|
-
'aria-activedescendant'?: string;
|
|
32
|
-
'aria-controls'?: string;
|
|
33
|
-
'aria-describedby'?: string;
|
|
34
|
-
'aria-details'?: string;
|
|
35
|
-
'aria-errormessage'?: string;
|
|
36
|
-
'aria-flowto'?: string;
|
|
37
|
-
'aria-label'?: string;
|
|
38
|
-
'aria-labelledby'?: string;
|
|
39
|
-
'aria-owns'?: string;
|
|
40
|
-
'aria-roledescription'?: string;
|
|
41
|
-
'aria-autocomplete'?: TAriaAutoComplete;
|
|
42
|
-
'aria-checked'?: TAriaBooleanMixed;
|
|
43
|
-
'aria-current'?: TAriaCurrent;
|
|
44
|
-
'aria-disabled'?: TAriaBoolean;
|
|
45
|
-
'aria-expanded'?: TAriaBoolean;
|
|
46
|
-
'aria-haspopup'?: TAriaHasPopup;
|
|
47
|
-
'aria-hidden'?: TAriaBoolean;
|
|
48
|
-
'aria-invalid'?: TAriaInvalid;
|
|
49
|
-
'aria-keyshortcuts'?: string;
|
|
50
|
-
'aria-level'?: number;
|
|
51
|
-
'aria-modal'?: TAriaBoolean;
|
|
52
|
-
'aria-multiline'?: TAriaBoolean;
|
|
53
|
-
'aria-multiselectable'?: TAriaBoolean;
|
|
54
|
-
'aria-orientation'?: TAriaOrientation;
|
|
55
|
-
'aria-placeholder'?: string;
|
|
56
|
-
'aria-pressed'?: TAriaBooleanMixed;
|
|
57
|
-
'aria-readonly'?: TAriaBoolean;
|
|
58
|
-
'aria-required'?: TAriaBoolean;
|
|
59
|
-
'aria-selected'?: TAriaBoolean;
|
|
60
|
-
'aria-sort'?: TAriaSort;
|
|
61
|
-
'aria-atomic'?: TAriaBoolean;
|
|
62
|
-
'aria-busy'?: TAriaBoolean;
|
|
63
|
-
'aria-live'?: TAriaLive;
|
|
64
|
-
'aria-relevant'?: TAriaRelevant | string;
|
|
65
|
-
'aria-colcount'?: number;
|
|
66
|
-
'aria-colindex'?: number;
|
|
67
|
-
'aria-colspan'?: number;
|
|
68
|
-
'aria-rowcount'?: number;
|
|
69
|
-
'aria-rowindex'?: number;
|
|
70
|
-
'aria-rowspan'?: number;
|
|
71
|
-
'aria-posinset'?: number;
|
|
72
|
-
'aria-setsize'?: number;
|
|
73
|
-
'aria-valuemax'?: number;
|
|
74
|
-
'aria-valuemin'?: number;
|
|
75
|
-
'aria-valuenow'?: number;
|
|
76
|
-
'aria-valuetext'?: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
39
|
/**
|
|
80
40
|
* Type definitions for the datepicker component family
|
|
81
41
|
*/
|
|
@@ -260,7 +220,7 @@ export declare interface IPktConsent {
|
|
|
260
220
|
*/
|
|
261
221
|
export declare interface IPktHeader {
|
|
262
222
|
/** Hide the Oslo logo */
|
|
263
|
-
hideLogo?:
|
|
223
|
+
hideLogo?: Booleanish;
|
|
264
224
|
/** Logo link URL */
|
|
265
225
|
logoLink?: string;
|
|
266
226
|
/** Service name displayed in the header */
|
|
@@ -268,7 +228,7 @@ export declare interface IPktHeader {
|
|
|
268
228
|
/** Service link URL */
|
|
269
229
|
serviceLink?: string;
|
|
270
230
|
/** Use compact header height */
|
|
271
|
-
compact?:
|
|
231
|
+
compact?: Booleanish;
|
|
272
232
|
/** Header position. 'fixed' fixes to top of viewport, 'relative' follows document flow. Default: 'fixed' */
|
|
273
233
|
position?: THeaderPosition;
|
|
274
234
|
/** Scroll behavior. 'hide' hides header on scroll down, 'none' keeps it visible. Default: 'hide' */
|
|
@@ -280,13 +240,13 @@ export declare interface IPktHeader {
|
|
|
280
240
|
/** Representation object */
|
|
281
241
|
representing?: IPktHeaderRepresenting;
|
|
282
242
|
/** Allow user to change representation */
|
|
283
|
-
canChangeRepresentation?:
|
|
243
|
+
canChangeRepresentation?: Booleanish;
|
|
284
244
|
/** Logout button placement */
|
|
285
245
|
logOutButtonPlacement?: TPktHeaderLogOutButtonPlacement;
|
|
286
246
|
/** Whether there's a logout handler attached (required for logout button to show) */
|
|
287
|
-
hasLogOut?:
|
|
247
|
+
hasLogOut?: Booleanish;
|
|
288
248
|
/** Show search field */
|
|
289
|
-
showSearch?:
|
|
249
|
+
showSearch?: Booleanish;
|
|
290
250
|
/** Search field placeholder */
|
|
291
251
|
searchPlaceholder?: string;
|
|
292
252
|
/** Controlled search value */
|
|
@@ -296,53 +256,27 @@ export declare interface IPktHeader {
|
|
|
296
256
|
/** Custom breakpoint for tablet responsive behavior in pixels. Default: 1280 */
|
|
297
257
|
tabletBreakpoint?: number;
|
|
298
258
|
/** Which menu is initially open */
|
|
299
|
-
openedMenu?:
|
|
259
|
+
openedMenu?: THeaderMenu;
|
|
260
|
+
/** Variant for the slot menu button. Default: 'icon-only' */
|
|
261
|
+
slotMenuVariant?: TSlotMenuVariant;
|
|
262
|
+
/** Text for the slot menu button. Default: 'Meny' */
|
|
263
|
+
slotMenuText?: string;
|
|
300
264
|
}
|
|
301
265
|
|
|
302
|
-
|
|
303
|
-
* Representation object containing information about the organization/entity being represented
|
|
304
|
-
*/
|
|
305
|
-
export declare interface IPktHeaderRepresenting {
|
|
306
|
-
/** Name of the organization or entity */
|
|
307
|
-
name: string;
|
|
308
|
-
/** Short name or initials (deprecated) */
|
|
309
|
-
shortname?: string;
|
|
310
|
-
/** Organization number */
|
|
311
|
-
orgNumber?: string | number;
|
|
312
|
-
}
|
|
266
|
+
export declare type IPktHeaderRepresenting = Representing;
|
|
313
267
|
|
|
314
|
-
|
|
315
|
-
* User object containing information about the logged-in user
|
|
316
|
-
*/
|
|
317
|
-
export declare interface IPktHeaderUser {
|
|
318
|
-
/** Full name of the user */
|
|
319
|
-
name: string;
|
|
320
|
-
/** Short name or initials (deprecated) */
|
|
321
|
-
shortname?: string;
|
|
322
|
-
/** Last login timestamp (ISO string or Date) */
|
|
323
|
-
lastLoggedIn?: Date | string;
|
|
324
|
-
}
|
|
268
|
+
export declare type IPktHeaderUser = User;
|
|
325
269
|
|
|
326
270
|
declare interface IPktHeaderUserMenu {
|
|
327
271
|
user: IPktHeaderUser;
|
|
328
272
|
formattedLastLoggedIn?: string;
|
|
329
273
|
representing?: IPktHeaderRepresenting;
|
|
330
274
|
userMenu?: IPktHeaderUserMenuItem[];
|
|
331
|
-
canChangeRepresentation?:
|
|
332
|
-
logoutOnClick?:
|
|
275
|
+
canChangeRepresentation?: Booleanish;
|
|
276
|
+
logoutOnClick?: Booleanish;
|
|
333
277
|
}
|
|
334
278
|
|
|
335
|
-
|
|
336
|
-
* Menu item in the user menu
|
|
337
|
-
*/
|
|
338
|
-
export declare interface IPktHeaderUserMenuItem {
|
|
339
|
-
/** Icon name to display */
|
|
340
|
-
iconName?: PktIconName;
|
|
341
|
-
/** Text for the menu item */
|
|
342
|
-
title: string;
|
|
343
|
-
/** Link URL or click handler function */
|
|
344
|
-
target: string | (() => void);
|
|
345
|
-
}
|
|
279
|
+
export declare type IPktHeaderUserMenuItem = UserMenuItem<PktIconName>;
|
|
346
280
|
|
|
347
281
|
export declare interface IPktHeading {
|
|
348
282
|
size?: TPktHeadingSize;
|
|
@@ -1051,15 +985,17 @@ export declare class PktHeader extends PktElement<IPktHeader> implements IPktHea
|
|
|
1051
985
|
searchValue: string;
|
|
1052
986
|
mobileBreakpoint: number;
|
|
1053
987
|
tabletBreakpoint: number;
|
|
1054
|
-
openedMenu:
|
|
988
|
+
openedMenu: THeaderMenu;
|
|
1055
989
|
logOutButtonPlacement: TPktHeaderLogOutButtonPlacement;
|
|
1056
990
|
position: THeaderPosition;
|
|
1057
991
|
scrollBehavior: THeaderScrollBehavior;
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
992
|
+
slotMenuVariant: TSlotMenuVariant;
|
|
993
|
+
slotMenuText: string;
|
|
994
|
+
hideLogo: Booleanish;
|
|
995
|
+
compact: Booleanish;
|
|
996
|
+
showSearch: Booleanish;
|
|
997
|
+
canChangeRepresentation: Booleanish;
|
|
998
|
+
hasLogOut: Booleanish;
|
|
1063
999
|
user?: IPktHeaderUser;
|
|
1064
1000
|
userMenu?: IPktHeaderUserMenuItem[];
|
|
1065
1001
|
representing?: IPktHeaderRepresenting;
|
|
@@ -1083,15 +1019,17 @@ export declare class PktHeaderService extends PktElement<IPktHeader> implements
|
|
|
1083
1019
|
searchValue: string;
|
|
1084
1020
|
mobileBreakpoint: number;
|
|
1085
1021
|
tabletBreakpoint: number;
|
|
1086
|
-
openedMenu:
|
|
1022
|
+
openedMenu: THeaderMenu;
|
|
1087
1023
|
logOutButtonPlacement: TPktHeaderLogOutButtonPlacement;
|
|
1088
1024
|
position: THeaderPosition;
|
|
1089
1025
|
scrollBehavior: THeaderScrollBehavior;
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1026
|
+
slotMenuVariant: TSlotMenuVariant;
|
|
1027
|
+
slotMenuText: string;
|
|
1028
|
+
hideLogo: Booleanish;
|
|
1029
|
+
compact: Booleanish;
|
|
1030
|
+
showSearch: Booleanish;
|
|
1031
|
+
canChangeRepresentation: Booleanish;
|
|
1032
|
+
hasLogOut: Booleanish;
|
|
1095
1033
|
user?: IPktHeaderUser;
|
|
1096
1034
|
userMenu?: IPktHeaderUserMenuItem[];
|
|
1097
1035
|
representing?: IPktHeaderRepresenting;
|
|
@@ -1162,8 +1100,8 @@ export declare class PktHeaderUserMenu extends PktElement<IPktHeaderUserMenu> im
|
|
|
1162
1100
|
formattedLastLoggedIn?: string;
|
|
1163
1101
|
representing?: IPktHeaderRepresenting;
|
|
1164
1102
|
userMenu?: IPktHeaderUserMenuItem[];
|
|
1165
|
-
canChangeRepresentation:
|
|
1166
|
-
logoutOnClick:
|
|
1103
|
+
canChangeRepresentation: Booleanish;
|
|
1104
|
+
logoutOnClick: Booleanish;
|
|
1167
1105
|
private handleChangeRepresentation;
|
|
1168
1106
|
private handleLogout;
|
|
1169
1107
|
private handleMenuItemClick;
|
|
@@ -1299,7 +1237,7 @@ export declare class PktInputWrapper extends PktElement<Props_6> {
|
|
|
1299
1237
|
ariaDescribedby: string | undefined;
|
|
1300
1238
|
hasFieldset: boolean;
|
|
1301
1239
|
role: string | null;
|
|
1302
|
-
useWrapper:
|
|
1240
|
+
useWrapper: Booleanish;
|
|
1303
1241
|
protected updated(changedProperties: PropertyValues): void;
|
|
1304
1242
|
render(): TemplateResult<1>;
|
|
1305
1243
|
private toggleDropdown;
|
|
@@ -1687,73 +1625,29 @@ declare interface TabsContext {
|
|
|
1687
1625
|
handleKeyUp: (event: KeyboardEvent, index: number) => void;
|
|
1688
1626
|
}
|
|
1689
1627
|
|
|
1690
|
-
declare type TAlertSkin = 'error' | 'success' | 'warning' | 'info';
|
|
1691
|
-
|
|
1692
|
-
declare type TAriaAutoComplete = 'none' | 'inline' | 'list' | 'both';
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1695
|
-
* aria.ts
|
|
1696
|
-
*
|
|
1697
|
-
* Typedefinisjoner for ARIA-attributter og roller.
|
|
1698
|
-
* Eksportert slik at de kan importere andre steder:
|
|
1699
|
-
*
|
|
1700
|
-
* import type {
|
|
1701
|
-
* TAriaAttributes,
|
|
1702
|
-
* TAriaLive,
|
|
1703
|
-
* // ...
|
|
1704
|
-
* } from './aria-types';
|
|
1705
|
-
*/
|
|
1706
|
-
declare type TAriaBoolean = boolean | 'true' | 'false';
|
|
1707
|
-
|
|
1708
|
-
declare type TAriaBooleanMixed = TAriaBoolean | 'mixed';
|
|
1709
|
-
|
|
1710
|
-
declare type TAriaCurrent = TAriaBoolean | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
1711
|
-
|
|
1712
|
-
declare type TAriaHasPopup = TAriaBoolean | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
1713
|
-
|
|
1714
|
-
declare type TAriaInvalid = TAriaBoolean | 'grammar' | 'spelling';
|
|
1715
|
-
|
|
1716
|
-
declare type TAriaLive = 'off' | 'polite' | 'assertive';
|
|
1717
|
-
|
|
1718
|
-
declare type TAriaOrientation = 'horizontal' | 'vertical';
|
|
1719
|
-
|
|
1720
|
-
declare type TAriaRelevant = 'additions' | 'removals' | 'text' | 'all';
|
|
1721
|
-
|
|
1722
|
-
declare type TAriaSort = 'none' | 'ascending' | 'descending' | 'other';
|
|
1723
|
-
|
|
1724
1628
|
declare type TCardImageShape = 'square' | 'round';
|
|
1725
1629
|
|
|
1726
1630
|
declare type TCardPadding = 'none' | 'default';
|
|
1727
1631
|
|
|
1728
|
-
declare type TCardSkin = 'outlined' | 'outlined-beige' | 'gray' | 'beige' | 'green' | 'blue';
|
|
1729
|
-
|
|
1730
1632
|
declare type TCardTagPosition = 'top' | 'bottom';
|
|
1731
1633
|
|
|
1732
1634
|
declare type TCounterPosition = 'top' | 'bottom';
|
|
1733
1635
|
|
|
1734
1636
|
declare type TDay = `${number}${number}`;
|
|
1735
1637
|
|
|
1736
|
-
|
|
1737
|
-
* Position options for header
|
|
1738
|
-
*/
|
|
1739
|
-
declare type THeaderPosition = 'fixed' | 'relative';
|
|
1638
|
+
export { THeaderMenu }
|
|
1740
1639
|
|
|
1741
|
-
|
|
1742
|
-
* Scroll behavior options for header
|
|
1743
|
-
*/
|
|
1744
|
-
declare type THeaderScrollBehavior = 'hide' | 'none';
|
|
1640
|
+
export { THeaderPosition }
|
|
1745
1641
|
|
|
1746
|
-
|
|
1642
|
+
export { THeaderScrollBehavior }
|
|
1747
1643
|
|
|
1748
|
-
declare type
|
|
1644
|
+
declare type TISODate = `${TYear}-${TMonth}-${TDay}`;
|
|
1749
1645
|
|
|
1750
1646
|
declare type TLinkCardSkin = 'normal' | 'no-padding' | 'blue' | 'beige' | 'green' | 'gray' | 'beige-outline' | 'gray-outline';
|
|
1751
1647
|
|
|
1752
|
-
declare type TMessageboxSkin = 'beige' | 'blue' | 'red' | 'green';
|
|
1753
|
-
|
|
1754
1648
|
declare type TMonth = `${number}${number}`;
|
|
1755
1649
|
|
|
1756
|
-
export declare type TPktAccordionSkin =
|
|
1650
|
+
export declare type TPktAccordionSkin = TAccordionSkin;
|
|
1757
1651
|
|
|
1758
1652
|
export declare type TPktButtonColor = 'blue' | 'blue-outline' | 'green' | 'green-outline' | 'green-dark' | 'green-dark-outline' | 'beige-light' | 'beige-dark-outline' | 'yellow' | 'yellow-outline' | 'red' | 'red-outline';
|
|
1759
1653
|
|
|
@@ -1765,27 +1659,19 @@ export declare type TPktButtonSkin = 'primary' | 'secondary' | 'tertiary';
|
|
|
1765
1659
|
|
|
1766
1660
|
export declare type TPktButtonState = 'normal' | 'focus' | 'hover' | 'active';
|
|
1767
1661
|
|
|
1768
|
-
export declare type TPktButtonType =
|
|
1662
|
+
export declare type TPktButtonType = THTMLButtonType;
|
|
1769
1663
|
|
|
1770
1664
|
export declare type TPktButtonVariant = 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
|
|
1771
1665
|
|
|
1772
1666
|
export declare type TPktComboboxTagPlacement = 'inside' | 'outside';
|
|
1773
1667
|
|
|
1774
|
-
|
|
1775
|
-
* Type for logout button placement
|
|
1776
|
-
*/
|
|
1777
|
-
export declare type TPktHeaderLogOutButtonPlacement = 'userMenu' | 'header' | 'both' | 'none';
|
|
1778
|
-
|
|
1779
|
-
/**
|
|
1780
|
-
* Type for which menu is currently open
|
|
1781
|
-
*/
|
|
1782
|
-
export declare type TPktHeaderMenu = 'none' | 'slot' | 'search' | 'user';
|
|
1668
|
+
export { TPktHeaderLogOutButtonPlacement }
|
|
1783
1669
|
|
|
1784
|
-
export declare type TPktHeadingLevel =
|
|
1670
|
+
export declare type TPktHeadingLevel = THeadingLevel;
|
|
1785
1671
|
|
|
1786
|
-
export declare type TPktHeadingSize =
|
|
1672
|
+
export declare type TPktHeadingSize = THeadingSize;
|
|
1787
1673
|
|
|
1788
|
-
declare type TPktHeadingWeight =
|
|
1674
|
+
declare type TPktHeadingWeight = THeadingWeight;
|
|
1789
1675
|
|
|
1790
1676
|
export declare type TPktLoaderVariant = 'blue' | 'rainbow' | 'shapes';
|
|
1791
1677
|
|
|
@@ -1809,11 +1695,13 @@ export declare type TSelectOption = {
|
|
|
1809
1695
|
hidden?: boolean;
|
|
1810
1696
|
};
|
|
1811
1697
|
|
|
1698
|
+
export { TSlotMenuVariant }
|
|
1699
|
+
|
|
1812
1700
|
export declare type TTabItemSkin = 'blue' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray' | 'blue-light';
|
|
1813
1701
|
|
|
1814
1702
|
export declare type TTagSkin = 'blue' | 'blue-dark' | 'blue-light' | 'green' | 'red' | 'yellow' | 'beige' | 'gray' | 'grey';
|
|
1815
1703
|
|
|
1816
|
-
export declare type TTagType =
|
|
1704
|
+
export declare type TTagType = THTMLButtonType;
|
|
1817
1705
|
|
|
1818
1706
|
declare type TYear = `${number}${number}${number}${number}`;
|
|
1819
1707
|
|