@oslokommune/punkt-elements 19.20.0 → 20.0.3
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 +71 -0
- package/dist/{alert-UbQzzkXb.js → alert-CA1fDbyc.js} +2 -2
- package/dist/{alert-KxCE28nq.cjs → alert-DkyTTo7S.cjs} +1 -1
- package/dist/{backlink-bbYpIZJI.js → backlink-CDBRcaAu.js} +1 -1
- package/dist/{backlink-CqRcFURx.cjs → backlink-CXOxMeyt.cjs} +1 -1
- package/dist/{breadcrumbs-D7gddV5F.js → breadcrumbs-5oUaCef3.js} +1 -1
- package/dist/{breadcrumbs-C_JR4ZI_.cjs → breadcrumbs-zfUto2U5.cjs} +1 -1
- package/dist/{button-BJ6QLwxJ.js → button-Bswo1C0M.js} +1 -1
- package/dist/{button-pFlrTF2P.cjs → button-bVWAX98x.cjs} +1 -1
- package/dist/{calendar-CYsQEfZn.js → calendar-BOd-9PDd.js} +1 -1
- package/dist/{calendar-Fk5ubNGR.cjs → calendar-CDTCgTJn.cjs} +1 -1
- package/dist/card-BbV4OBqb.cjs +67 -0
- package/dist/{card-CKu696QC.js → card-CKStAH0Q.js} +40 -38
- package/dist/{checkbox-BLmQSdWB.js → checkbox-DIJbuqWm.js} +1 -1
- package/dist/{checkbox-group-DFKzbaHC.js → checkbox-group-DLLbWgQb.js} +2 -2
- package/dist/{checkbox-group-B9TtWVpG.cjs → checkbox-group-Kua6HuRE.cjs} +1 -1
- package/dist/{checkbox-PAtsn1TO.cjs → checkbox-iMOdzpJ_.cjs} +1 -1
- package/dist/{combobox-CJAmzQFD.cjs → combobox-CWL8T3UK.cjs} +1 -1
- package/dist/{combobox-KnYdXXRm.js → combobox-Pxa80TeZ.js} +3 -3
- package/dist/components/card/card.d.ts +0 -10
- package/dist/components/card/index.d.ts +2 -2
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/linkcard/linkcard.d.ts +0 -1
- package/dist/components/tabs/tabitem.d.ts +2 -1
- package/dist/components/tag/tag.d.ts +5 -11
- package/dist/{consent-BjWx64Gv.cjs → consent-UkinU27V.cjs} +1 -1
- package/dist/{consent-CeJKY2EB.js → consent-p-0n2b9x.js} +1 -1
- package/dist/{datepicker-Cco0rRLa.js → datepicker-BpxUWiIC.js} +8 -6
- package/dist/{datepicker-IMxHS-ex.cjs → datepicker-Cpiu_Nrf.cjs} +2 -2
- package/dist/{fileupload-CjqIhSJ1.cjs → fileupload-DXJtAagE.cjs} +1 -1
- package/dist/{fileupload-BrSWPUcy.js → fileupload-vPDmtXiM.js} +4 -4
- package/dist/{footer-BJCxJUW9.cjs → footer-CpE05IW2.cjs} +1 -1
- package/dist/{footer-DQq09VjI.js → footer-D8t0PCPC.js} +2 -2
- package/dist/{header-C_BUBeOQ.js → header-ChT1hHNA.js} +6 -6
- package/dist/{header-_KjqW2oJ.cjs → header-CiwHNHKD.cjs} +1 -1
- package/dist/{header-menu-BV0XlRez.js → header-menu-BrjsNjBH.js} +1 -1
- package/dist/{header-menu-BiW5cNun.cjs → header-menu-Dq9lwNr1.cjs} +1 -1
- package/dist/{helptext-CL1vxEaL.js → helptext-BFQzrOw4.js} +1 -1
- package/dist/{helptext-B4h3Xlqa.cjs → helptext-Bse1LpRd.cjs} +1 -1
- package/dist/icon-5A378_yh.cjs +1 -0
- package/dist/{icon-C82IxnSO.js → icon-C1oCGwEe.js} +1 -1
- package/dist/{input-wrapper-BNu6kOOn.cjs → input-wrapper-C_Rzwxx7.cjs} +2 -2
- package/dist/{input-wrapper-DowJHbGF.js → input-wrapper-DkpJS1hR.js} +4 -4
- package/dist/{link-D9kjggXZ.js → link-DLPpwjq4.js} +13 -7
- package/dist/{link-DqPFlWxz.cjs → link-pkFJ11Zd.cjs} +3 -3
- package/dist/linkcard-DIG6VYpl.cjs +15 -0
- package/dist/{linkcard-BEmG-2lN.js → linkcard-Dr-r8jBO.js} +22 -18
- package/dist/{loader-lDVe6rUf.js → loader-CFidlqSG.js} +1 -1
- package/dist/{loader-C4fbS8vr.cjs → loader-DTIrOtTo.cjs} +1 -1
- package/dist/messagebox-BLYx3AL7.cjs +16 -0
- package/dist/{messagebox-C8dsqW20.js → messagebox-B_07P0QA.js} +22 -13
- package/dist/{modal-EgQREcb8.cjs → modal-BvTfLfFq.cjs} +1 -1
- package/dist/{modal-D389hSbe.js → modal-CA_M2Ix6.js} +1 -1
- package/dist/{option-group-element-DhYJmGgW.cjs → option-group-element-CVNaBIlP.cjs} +1 -1
- package/dist/{option-group-element-CB0Qqev_.js → option-group-element-DzM8YznZ.js} +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-breadcrumbs.cjs +1 -1
- package/dist/pkt-breadcrumbs.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox-group.cjs +1 -1
- package/dist/pkt-checkbox-group.js +1 -1
- 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-consent.cjs +1 -1
- package/dist/pkt-consent.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-fileupload.cjs +1 -1
- package/dist/pkt-fileupload.js +1 -1
- package/dist/pkt-footer.cjs +1 -1
- package/dist/pkt-footer.js +1 -1
- package/dist/pkt-header-menu.cjs +1 -1
- package/dist/pkt-header-menu.js +1 -1
- package/dist/pkt-header.cjs +1 -1
- package/dist/pkt-header.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +35 -35
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-radio-group.cjs +1 -1
- package/dist/pkt-radio-group.js +1 -1
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-searchinput.cjs +1 -1
- package/dist/pkt-searchinput.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.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/pkt-timepicker.cjs +1 -1
- package/dist/pkt-timepicker.js +1 -1
- package/dist/{radio-group-CSs8YnEO.js → radio-group-BRY_74od.js} +2 -2
- package/dist/{radio-group-DRNGFfUh.cjs → radio-group-CsUgnEv0.cjs} +1 -1
- package/dist/{radiobutton-Be66H6On.cjs → radiobutton-CQhuG2lj.cjs} +1 -1
- package/dist/{radiobutton-BN67oAvC.js → radiobutton-lHnq8wX_.js} +1 -1
- package/dist/{searchinput-B26-Xp00.js → searchinput-BLGaXkP6.js} +1 -1
- package/dist/{searchinput-Trn6uU2J.cjs → searchinput-TAqMUJ0B.cjs} +1 -1
- package/dist/{select-DZftfjQt.js → select-BvtUxW0Q.js} +1 -1
- package/dist/{select-o6iuy9hC.cjs → select-Dle67Uwv.cjs} +1 -1
- package/dist/shared-types/card.d.ts +5 -17
- package/dist/shared-types/combobox.d.ts +3 -3
- package/dist/shared-types/icon.d.ts +2 -2
- package/dist/shared-types/index.d.ts +10 -8
- package/dist/shared-types/linkcard.d.ts +7 -4
- package/dist/shared-types/messagebox.d.ts +4 -2
- package/dist/shared-types/skin.d.ts +1 -4
- package/dist/shared-types/tag.d.ts +46 -0
- package/dist/{tabs-gRjrFqeG.cjs → tabs-B96Orh6O.cjs} +1 -1
- package/dist/{tabs-Bu9PP33-.js → tabs-BmmTUKuC.js} +1 -1
- package/dist/tag-BZdC0voc.cjs +27 -0
- package/dist/{tag-CtdOrK18.js → tag-Cam7ISOF.js} +14 -81
- package/dist/{textarea-Cc2aQLbm.cjs → textarea-DSX3jMlI.cjs} +1 -1
- package/dist/{textarea-DP7GVL2c.js → textarea-Djp5L2Zd.js} +2 -2
- package/dist/{textinput-Dhwotaxv.js → textinput-CBrOZcvL.js} +2 -2
- package/dist/{textinput-B6FPNOJB.cjs → textinput-CN2F3Q3H.cjs} +1 -1
- package/dist/{timepicker-DxwQ7-Bl.js → timepicker-CT4wfrgQ.js} +2 -2
- package/dist/{timepicker-Ce9hXP0B.cjs → timepicker-CkaJkIGn.cjs} +1 -1
- package/package.json +3 -3
- package/src/components/card/card.test.ts +50 -53
- package/src/components/card/card.ts +14 -24
- package/src/components/card/index.ts +2 -2
- package/src/components/checkbox/checkbox.test.ts +3 -3
- package/src/components/checkbox/checkbox.ts +1 -1
- package/src/components/input-wrapper/input-wrapper.ts +1 -1
- package/src/components/link/link.test.ts +14 -18
- package/src/components/link/link.ts +2 -3
- package/src/components/linkcard/linkcard.test.ts +18 -6
- package/src/components/linkcard/linkcard.ts +5 -7
- package/src/components/messagebox/messagebox.test.ts +14 -1
- package/src/components/messagebox/messagebox.ts +13 -2
- package/src/components/radiobutton/radiobutton.test.ts +1 -1
- package/src/components/radiobutton/radiobutton.ts +1 -1
- package/src/components/tabs/tabitem.ts +6 -2
- package/src/components/tag/tag.test.ts +27 -12
- package/src/components/tag/tag.ts +22 -19
- package/dist/card-Da0JkVcv.cjs +0 -64
- package/dist/icon-B3YGHHa7.cjs +0 -1
- package/dist/linkcard-BMJvjo7R.cjs +0 -14
- package/dist/messagebox-DFaDuvHQ.cjs +0 -13
- package/dist/tag-BgHEzLM3.cjs +0 -27
package/dist/pkt-index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { a as e, i as t, o as n, r, s as i } from "./element-DLgZkx5L.js";
|
|
2
|
-
import { n as a } from "./consent-
|
|
3
|
-
import { n as o } from "./alert-
|
|
4
|
-
import { i as s, n as c, r as l, t as u } from "./header-
|
|
5
|
-
import { n as d } from "./card-
|
|
6
|
-
import { n as f } from "./checkbox-
|
|
7
|
-
import { n as p } from "./radiobutton-
|
|
8
|
-
import { n as m } from "./icon-
|
|
9
|
-
import { n as h } from "./loader-
|
|
2
|
+
import { n as a } from "./consent-p-0n2b9x.js";
|
|
3
|
+
import { n as o } from "./alert-CA1fDbyc.js";
|
|
4
|
+
import { i as s, n as c, r as l, t as u } from "./header-ChT1hHNA.js";
|
|
5
|
+
import { n as d } from "./card-CKStAH0Q.js";
|
|
6
|
+
import { n as f } from "./checkbox-DIJbuqWm.js";
|
|
7
|
+
import { n as p } from "./radiobutton-lHnq8wX_.js";
|
|
8
|
+
import { n as m } from "./icon-C1oCGwEe.js";
|
|
9
|
+
import { n as h } from "./loader-CFidlqSG.js";
|
|
10
10
|
import { n as g, r as _ } from "./accordion-C5cu1xXT.js";
|
|
11
|
-
import { n as v } from "./
|
|
12
|
-
import { n as y } from "./
|
|
13
|
-
import { n as b } from "./
|
|
14
|
-
import { n as x } from "./
|
|
15
|
-
import { n as S } from "./
|
|
16
|
-
import { n as C } from "./
|
|
17
|
-
import { n as w } from "./
|
|
18
|
-
import { n as T } from "./
|
|
19
|
-
import { n as E } from "./
|
|
20
|
-
import {
|
|
21
|
-
import { n as O } from "./
|
|
22
|
-
import {
|
|
23
|
-
import { n as A } from "./
|
|
24
|
-
import { n as j } from "./
|
|
25
|
-
import { n as M } from "./
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { n as L } from "./
|
|
29
|
-
import { n as R } from "./
|
|
30
|
-
import { n as z } from "./
|
|
31
|
-
import { n as B } from "./
|
|
32
|
-
import { n as V } from "./
|
|
33
|
-
import { n as H } from "./radio-group-
|
|
34
|
-
import { n as U, r as W } from "./tabs-
|
|
35
|
-
import { n as G } from "./select-
|
|
36
|
-
import { t as K } from "./timepicker-
|
|
37
|
-
export { _ as PktAccordion, g as PktAccordionItem, o as PktAlert,
|
|
11
|
+
import { n as v } from "./linkcard-Dr-r8jBO.js";
|
|
12
|
+
import { n as y } from "./input-wrapper-DkpJS1hR.js";
|
|
13
|
+
import { n as b } from "./textarea-Djp5L2Zd.js";
|
|
14
|
+
import { n as x } from "./textinput-CBrOZcvL.js";
|
|
15
|
+
import { n as S } from "./tag-Cam7ISOF.js";
|
|
16
|
+
import { n as C } from "./messagebox-B_07P0QA.js";
|
|
17
|
+
import { n as w } from "./calendar-BOd-9PDd.js";
|
|
18
|
+
import { n as T } from "./progressbar-CfCc2zhp.js";
|
|
19
|
+
import { n as E } from "./combobox-Pxa80TeZ.js";
|
|
20
|
+
import { n as D } from "./button-Bswo1C0M.js";
|
|
21
|
+
import { n as O } from "./backlink-CDBRcaAu.js";
|
|
22
|
+
import { t as k } from "./breadcrumbs-5oUaCef3.js";
|
|
23
|
+
import { n as A } from "./helptext-BFQzrOw4.js";
|
|
24
|
+
import { n as j } from "./checkbox-group-DLLbWgQb.js";
|
|
25
|
+
import { n as M } from "./fileupload-vPDmtXiM.js";
|
|
26
|
+
import { n as N } from "./modal-CA_M2Ix6.js";
|
|
27
|
+
import { a as P, t as F } from "./datepicker-BpxUWiIC.js";
|
|
28
|
+
import { n as I, t as L } from "./footer-D8t0PCPC.js";
|
|
29
|
+
import { n as R } from "./link-DLPpwjq4.js";
|
|
30
|
+
import { n as z } from "./searchinput-BLGaXkP6.js";
|
|
31
|
+
import { n as B } from "./header-menu-BrjsNjBH.js";
|
|
32
|
+
import { n as V } from "./heading-CMZmPEL9.js";
|
|
33
|
+
import { n as H } from "./radio-group-BRY_74od.js";
|
|
34
|
+
import { n as U, r as W } from "./tabs-BmmTUKuC.js";
|
|
35
|
+
import { n as G } from "./select-BvtUxW0Q.js";
|
|
36
|
+
import { t as K } from "./timepicker-CT4wfrgQ.js";
|
|
37
|
+
export { _ as PktAccordion, g as PktAccordionItem, o as PktAlert, O as PktBackLink, k as PktBreadcrumbs, D as PktButton, w as PktCalendar, d as PktCard, f as PktCheckbox, j as PktCheckboxGroup, E as PktCombobox, a as PktConsent, P as PktDateTags, F as PktDatepicker, M as PktFileUpload, I as PktFooter, L as PktFooterSimple, u as PktHeader, c as PktHeaderGlobal, B as PktHeaderMenu, l as PktHeaderService, s as PktHeaderUserMenu, V as PktHeading, A as PktHelptext, m as PktIcon, y as PktInputWrapper, R as PktLink, v as PktLinkCard, h as PktLoader, C as PktMessagebox, N as PktModal, T as PktProgressbar, p as PktRadioButton, p as PktRadiobutton, H as PktRadioGroup, z as PktSearchInput, G as PktSelect, U as PktTabItem, W as PktTabs, S as PktTag, b as PktTextarea, x as PktTextinput, K as PktTimepicker, r as getPktStrings, i as pktStringsNb, t as resetPktStrings, e as setPktStrings, n as subscribePktStrings };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./input-wrapper-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./input-wrapper-C_Rzwxx7.cjs");exports.PktInputWrapper=e.n,exports.default=e.t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktInputWrapper, t as default } from "./input-wrapper-
|
|
1
|
+
export { n as PktInputWrapper, t as default } from "./input-wrapper-DkpJS1hR.js";
|
package/dist/pkt-link.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./link-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./link-pkFJ11Zd.cjs");exports.PktLink=e.n,exports.default=e.t;
|
package/dist/pkt-link.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktLink, t as default } from "./link-
|
|
1
|
+
export { n as PktLink, t as default } from "./link-DLPpwjq4.js";
|
package/dist/pkt-linkcard.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./linkcard-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./linkcard-DIG6VYpl.cjs");exports.PktLinkCard=e.n,exports.default=e.t;
|
package/dist/pkt-linkcard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktLinkCard, t as default } from "./linkcard-
|
|
1
|
+
export { n as PktLinkCard, t as default } from "./linkcard-Dr-r8jBO.js";
|
package/dist/pkt-loader.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./loader-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./loader-DTIrOtTo.cjs");exports.PktLoader=e.n,exports.default=e.t;
|
package/dist/pkt-loader.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktLoader, t as default } from "./loader-
|
|
1
|
+
export { n as PktLoader, t as default } from "./loader-CFidlqSG.js";
|
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./messagebox-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./messagebox-BLYx3AL7.cjs");exports.PktMessagebox=e.n,exports.default=e.t;
|
package/dist/pkt-messagebox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktMessagebox, t as default } from "./messagebox-
|
|
1
|
+
export { n as PktMessagebox, t as default } from "./messagebox-B_07P0QA.js";
|
package/dist/pkt-modal.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./modal-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./modal-BvTfLfFq.cjs");exports.PktModal=e.n,exports.default=e.t;
|
package/dist/pkt-modal.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktModal, t as default } from "./modal-
|
|
1
|
+
export { n as PktModal, t as default } from "./modal-CA_M2Ix6.js";
|
package/dist/pkt-radio-group.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radio-group-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radio-group-CsUgnEv0.cjs");exports.PktRadioGroup=e.n,exports.default=e.t;
|
package/dist/pkt-radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktRadioGroup, t as default } from "./radio-group-
|
|
1
|
+
export { n as PktRadioGroup, t as default } from "./radio-group-BRY_74od.js";
|
package/dist/pkt-radiobutton.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./radiobutton-CQhuG2lj.cjs");exports.PktRadioButton=e.n,exports.default=e.t;
|
package/dist/pkt-radiobutton.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktRadioButton, t as default } from "./radiobutton-
|
|
1
|
+
export { n as PktRadioButton, t as default } from "./radiobutton-lHnq8wX_.js";
|
package/dist/pkt-searchinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./searchinput-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./searchinput-TAqMUJ0B.cjs");exports.PktSearchInput=e.n,exports.default=e.t;
|
package/dist/pkt-searchinput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktSearchInput, t as default } from "./searchinput-
|
|
1
|
+
export { n as PktSearchInput, t as default } from "./searchinput-BLGaXkP6.js";
|
package/dist/pkt-select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./select-Dle67Uwv.cjs");exports.PktSelect=e.n,exports.default=e.t;
|
package/dist/pkt-select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktSelect, t as default } from "./select-
|
|
1
|
+
export { n as PktSelect, t as default } from "./select-BvtUxW0Q.js";
|
package/dist/pkt-tabs.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tabs-B96Orh6O.cjs");exports.PktTabItem=e.n,exports.PktTabs=e.r,exports.default=e.t;
|
package/dist/pkt-tabs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTabItem, r as PktTabs, t as default } from "./tabs-
|
|
1
|
+
export { n as PktTabItem, r as PktTabs, t as default } from "./tabs-BmmTUKuC.js";
|
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./tag-BZdC0voc.cjs");exports.PktTag=e.n,exports.default=e.t;
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTag, t as default } from "./tag-
|
|
1
|
+
export { n as PktTag, t as default } from "./tag-Cam7ISOF.js";
|
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textarea-DSX3jMlI.cjs");exports.PktTextarea=e.n,exports.default=e.t;
|
package/dist/pkt-textarea.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTextarea, t as default } from "./textarea-
|
|
1
|
+
export { n as PktTextarea, t as default } from "./textarea-Djp5L2Zd.js";
|
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("./textinput-CN2F3Q3H.cjs");exports.PktTextinput=e.n,exports.default=e.t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as PktTextinput, t as default } from "./textinput-
|
|
1
|
+
export { n as PktTextinput, t as default } from "./textinput-CBrOZcvL.js";
|
package/dist/pkt-timepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./timepicker-CkaJkIGn.cjs");exports.PktTimepicker=e.t;
|
package/dist/pkt-timepicker.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as PktTimepicker } from "./timepicker-
|
|
1
|
+
export { t as PktTimepicker } from "./timepicker-CT4wfrgQ.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as e, l as t, n, u as r } from "./element-DLgZkx5L.js";
|
|
2
|
-
import { r as i } from "./radiobutton-
|
|
3
|
-
import { i as a, n as o, t as s } from "./option-group-element-
|
|
2
|
+
import { r as i } from "./radiobutton-lHnq8wX_.js";
|
|
3
|
+
import { i as a, n as o, t as s } from "./option-group-element-DzM8YznZ.js";
|
|
4
4
|
import { t as c } from "./provide-_MnlMGnw.js";
|
|
5
5
|
//#region src/components/radio-group/radio-group.ts
|
|
6
6
|
var l = class extends s {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./radiobutton-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./radiobutton-CQhuG2lj.cjs"),n=require("./option-group-element-CVNaBIlP.cjs"),r=require("./provide-Cz18sYug.cjs");var i=class extends n.t{constructor(...e){super(...e),this.optionSelector=`pkt-radiobutton`,this.groupContext={name:``,hasTile:!1,hasError:!1,required:!1},this.storedValue=null}get value(){let e=this.options().find(n.n);return e?n.i(e):``}set value(e){let t=this.value;this.storedValue=e??``,this.applyStoredValue(this.options()),this.requestUpdate(`value`,t)}get hasStoredValue(){return this.storedValue!==null}storeCurrentValue(){this.storedValue=this.value}applyStoredValue(e){e.forEach(e=>{let t=this.storedValue!==``&&n.i(e)===this.storedValue;n.n(e)!==t&&(e.checked=t)})}createGroupContext(){return{...super.createGroupContext(),required:this.required}}};e.n([r.t({context:t.r}),e.l()],i.prototype,`groupContext`,void 0),e.n([e.u({type:String})],i.prototype,`value`,null);try{e.d(`pkt-radio-group`)(i)}catch{console.warn(`Forsøker å definere <pkt-radio-group>, men den er allerede definert`)}var a=i;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return a}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./shared-types-BvRk9kiK.cjs");const n=require("./consume-kEjgTrAp.cjs"),r=require("./ref-B6p6mQkO.cjs"),i=require("./input-element-2LHxo0em.cjs");var a={defaultChecked:!1,hasTile:!1,disabled:!1,hasError:!1,requiredTag:!1,optionalTag:!1},o=n.n(Symbol(`pkt-radio-group-context`)),s=class extends i.t{constructor(...e){super(...e),this.inputRef=r.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=a.defaultChecked,this.hasTile=a.hasTile,this.checked=null,this.type=`radio`,this.inputSize=void 0,this.tagText=null,this.optionalTag=a.optionalTag,this.requiredTag=a.requiredTag,this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`checked`&&(this._checked=this.checked===``||this.checked===`true`||this.checked===!0),super.attributeChangedCallback(e,t,n)}render(){let n=this.hasTile||!!this.groupContext?.hasTile,i=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":n,"pkt-input-check__input--tile-disabled":this.isDisabled&&n}),a=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError||!!this.groupContext?.hasError}),o=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.isDisabled,"pkt-sr-only":this.hideLabel}),s=`pkt-tag pkt-tag--small pkt-tag--thin-text`,c=this.pktStrings.get(`forms`),l=()=>e._`
|
|
2
2
|
${this.tagText?e._`<span class=${s+` pkt-tag--gray`}>${this.tagText}</span>`:e.h}
|
|
3
|
-
${this.optionalTag?e._`<span class=${s+` pkt-tag--blue-
|
|
3
|
+
${this.optionalTag?e._`<span class=${s+` pkt-tag--blue-pale`}
|
|
4
4
|
>${this.optionalText??c.optional}</span
|
|
5
5
|
>`:e.h}
|
|
6
6
|
${this.requiredTag?e._`<span class=${s+` pkt-tag--beige`}
|
|
@@ -36,7 +36,7 @@ var f = {
|
|
|
36
36
|
"pkt-sr-only": this.hideLabel
|
|
37
37
|
}), s = "pkt-tag pkt-tag--small pkt-tag--thin-text", c = this.pktStrings.get("forms"), u = () => e`
|
|
38
38
|
${this.tagText ? e`<span class=${s + " pkt-tag--gray"}>${this.tagText}</span>` : n}
|
|
39
|
-
${this.optionalTag ? e`<span class=${s + " pkt-tag--blue-
|
|
39
|
+
${this.optionalTag ? e`<span class=${s + " pkt-tag--blue-pale"}
|
|
40
40
|
>${this.optionalText ?? c.optional}</span
|
|
41
41
|
>` : n}
|
|
42
42
|
${this.requiredTag ? e`<span class=${s + " pkt-tag--beige"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-DLgZkx5L.js";
|
|
2
2
|
import { t as s } from "./class-map-BDwVSgLb.js";
|
|
3
|
-
import "./icon-
|
|
3
|
+
import "./icon-C1oCGwEe.js";
|
|
4
4
|
import { t as c } from "./if-defined-DiYi2v_Q.js";
|
|
5
5
|
import { n as l } from "./utils-BwF4QSrq.js";
|
|
6
6
|
import { t as u } from "./focus-modality-controller-Dc2S-KqR.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./icon-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./icon-5A378_yh.cjs");const n=require("./if-defined-Ci4ZQsgL.cjs"),r=require("./utils-63cRpWut.cjs"),i=require("./focus-modality-controller-C1ocyv2J.cjs");var a=class extends e.t{constructor(...e){super(...e),this.appearance=`local`,this.inputSize=`medium`,this.disabled=!1,this.fullwidth=!1,this.id=r.n(),this.value=``,this.focusModality=new i.t(this,`.pkt-searchinput`)}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`aria-label`);t&&(this.inputAriaLabel=t,this.removeAttribute(`aria-label`))}get suggestionsId(){return`${this.id}-suggestions`}dispatchSearch(){this.dispatchEvent(new CustomEvent(`pkt-search`,{detail:{value:this.value},bubbles:!0,composed:!0}))}onInput(e){let t=e.target;this.value=t.value}onInputKeydown(e){e.key===`Enter`&&(this.action||e.preventDefault(),this.dispatchSearch())}onSearchClick(e){this.action||e.preventDefault(),this.dispatchSearch()}onSuggestionClick(e,t,n){let r=new CustomEvent(`pkt-suggestion-click`,{detail:{index:n,suggestion:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}renderSuggestion(t,n){let r=e._`
|
|
2
2
|
${t.title?e._`<h3 class="pkt-searchinput__suggestion-title">${t.title}</h3>`:e.h}
|
|
3
3
|
${t.text?e._`<p class="pkt-searchinput__suggestion-text">${t.text}</p>`:e.h}
|
|
4
4
|
`;return t.href?e._`<a
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { _ as e, d as t, l as n, n as r, u as i } from "./element-DLgZkx5L.js";
|
|
2
2
|
import { n as a } from "./element-with-slot-mG-h7Sjw.js";
|
|
3
|
-
import { r as o } from "./input-wrapper-
|
|
3
|
+
import { r as o } from "./input-wrapper-DkpJS1hR.js";
|
|
4
4
|
import { t as s } from "./if-defined-DiYi2v_Q.js";
|
|
5
5
|
import { n as c, t as l } from "./ref-BAegS9BR.js";
|
|
6
6
|
import { t as u } from "./input-element-De40zUox.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3_.cjs"),n=require("./input-wrapper-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3_.cjs"),n=require("./input-wrapper-C_Rzwxx7.cjs"),r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./ref-B6p6mQkO.cjs"),a=require("./input-element-2LHxo0em.cjs"),o=require("./pkt-options-controller-9zoH1OBW.cjs");var s=class extends a.t{constructor(...e){super(...e),this._optionsProp=[],this._options=[]}get options(){return this._options.map(e=>({...e,selected:this.isOptionSelected(e)}))}set options(e){this._optionsProp=e,this.requestUpdate(`_optionsProp`,this._options)}isOptionSelected(e){return Array.isArray(this.value)?this.value.includes(e.value):e.value===this.value}findOptionByValue(e){return this._options.find(t=>t.value===e)}getSelectedOptions(){return this._options.filter(e=>this.isOptionSelected(e))}parseOptions(){let e=this._optionsProp.length>0,t=this.optionsController?.nodes?.length&&this.optionsController.nodes.length>0;e?this._options=this._optionsProp:t&&(this._options=this.optionsController.options)}willUpdate(e){super.willUpdate(e),this.parseOptions()}};e.n([e.u({type:Array,attribute:`options`})],s.prototype,`_optionsProp`,void 0),e.n([e.l()],s.prototype,`_options`,void 0);var c=class extends s{constructor(){super(),this.inputRef=i.t(),this.value=``,this.selectedIndex=-1,this.selectedOptions=void 0,this.defaultedToFirstOption=!1,this.optionsController=new o.t(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(e=>{e.selected&&!this.value&&(this.value=e.value)})}add(e,t){let n={value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled};if(t===void 0)this._options.push(n);else if(typeof t==`number`)this._options.splice(t,0,n);else{let e=t.value||t.text,r=this._options.findIndex(t=>t.value===e);r>=0?this._options.splice(r,0,n):this._options.push(n)}e.selected&&(this.value=e.value||e.text,this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),this.requestUpdate()}remove(e){typeof e==`number`&&(this.selectedIndex===e&&(this.value=this._options[0]?.value||``),this._options.splice(e,1),this.requestUpdate())}item(e){return this.inputRef.value?.item(e)}namedItem(e){return this.inputRef.value?.namedItem(e)}showPicker(){this.inputRef.value&&`showPicker`in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(e,t,n){e===`options`&&(this._options=n?JSON.parse(n):[]),e===`value`&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===n),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(n,t)),super.attributeChangedCallback(e,t,n)}willUpdate(e){e.has(`_optionsProp`)&&this._optionsProp.length>0&&(this._options=this._optionsProp,!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),super.willUpdate(e),this.hasUpdated||(!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0,this.defaultedToFirstOption=!0):this.selectedIndex=this._options.findIndex(e=>e.value===this.value)),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}updated(e){super.updated(e),e.has(`value`)&&this.value!==e.get(`value`)&&(this.selectedIndex=this.touched?this.returnNumberOrNull(this.inputRef.value?.selectedIndex):this._options.findIndex(e=>e.value===this.value),this.selectedOptions=this.inputRef.value?.selectedOptions,this.valueChanged(this.value,e.get(`value`)))}firstUpdated(e){super.firstUpdated(e),this.classList.add(`pkt-select`),this.selectedOptions=this.inputRef.value?.selectedOptions,this.defaultedToFirstOption&&this.updateComplete.then(()=>this.dispatchChangeEvents(this.value))}render(){let a=`pkt-input pkt-input--${this.inputSize} ${this.fullwidth?`pkt-input--fullwidth`:``}`;return e._`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
${t.n(this,[`helptext`])}
|
|
4
4
|
.strings=${this.strings}
|
|
@@ -8,14 +8,10 @@ import type { THeadingLevel } from './heading';
|
|
|
8
8
|
import type { TLayout } from './layout';
|
|
9
9
|
import type { TTagSkin } from './skin';
|
|
10
10
|
/** Card skin variants — shared runtime source for types, specs, and Preview. */
|
|
11
|
-
export declare const CARD_SKINS: readonly ['
|
|
11
|
+
export declare const CARD_SKINS: readonly ['gray', 'outlined', 'transparent', 'white', 'blue', 'green', 'beige'];
|
|
12
12
|
export type TCardSkin = (typeof CARD_SKINS)[number];
|
|
13
|
-
/**
|
|
14
|
-
export declare const
|
|
15
|
-
export type TCardPadding = (typeof CARD_PADDINGS)[number];
|
|
16
|
-
/** Card image shape variants — shared runtime source for types, specs, and Preview. */
|
|
17
|
-
export declare const CARD_IMAGE_SHAPES: readonly ['square', 'round'];
|
|
18
|
-
export type TCardImageShape = (typeof CARD_IMAGE_SHAPES)[number];
|
|
13
|
+
/** Skins without a dark variant. The card gets `data-mode="light"` and stays in light mode. */
|
|
14
|
+
export declare const CARD_LIGHT_ONLY_SKINS: readonly TCardSkin[];
|
|
19
15
|
/** Card image aspect-ratio overrides — shared runtime source for types, specs, and Preview. */
|
|
20
16
|
export declare const CARD_IMAGE_ASPECTS: readonly ['auto', '1-1', '4-3', '3-2', '16-9', '19-10'];
|
|
21
17
|
export type TCardImageAspect = (typeof CARD_IMAGE_ASPECTS)[number];
|
|
@@ -49,14 +45,10 @@ export interface IPktCardBase {
|
|
|
49
45
|
heading?: string;
|
|
50
46
|
headingLevel?: THeadingLevel;
|
|
51
47
|
image?: ICardImage;
|
|
52
|
-
imageShape?: TCardImageShape;
|
|
53
48
|
imageAspect?: TCardImageAspect;
|
|
54
|
-
restrictImageHeight?: boolean;
|
|
55
49
|
clickCardLink?: string | null;
|
|
56
50
|
openLinkInNewTab?: boolean;
|
|
57
|
-
borderOnHover?: boolean;
|
|
58
51
|
zoom?: boolean;
|
|
59
|
-
padding?: TCardPadding;
|
|
60
52
|
skin?: TCardSkin;
|
|
61
53
|
subheading?: string;
|
|
62
54
|
tagPosition?: TCardTagPosition;
|
|
@@ -68,19 +60,15 @@ export interface IPktCardBase {
|
|
|
68
60
|
* shared between React and Elements — there are no reactOnly/elementsOnly
|
|
69
61
|
* props or events on this component.
|
|
70
62
|
*/
|
|
71
|
-
export type ICardSpecProps = Pick<IPktCardBase, 'ariaLabel' | 'metaLead' | 'metaTrail' | 'layout' | 'heading' | 'headingLevel' | 'image' | '
|
|
63
|
+
export type ICardSpecProps = Pick<IPktCardBase, 'ariaLabel' | 'metaLead' | 'metaTrail' | 'layout' | 'heading' | 'headingLevel' | 'image' | 'imageAspect' | 'clickCardLink' | 'openLinkInNewTab' | 'zoom' | 'skin' | 'subheading' | 'tagPosition' | 'tags'>;
|
|
72
64
|
/**
|
|
73
65
|
* Default values for pkt-card. Single source of truth for both frameworks
|
|
74
66
|
*/
|
|
75
67
|
export declare const CARD_DEFAULTS: {
|
|
76
68
|
readonly headingLevel: 3;
|
|
77
69
|
readonly layout: 'vertical';
|
|
78
|
-
readonly skin: '
|
|
79
|
-
readonly padding: 'default';
|
|
70
|
+
readonly skin: 'gray';
|
|
80
71
|
readonly tagPosition: 'top';
|
|
81
72
|
readonly openLinkInNewTab: false;
|
|
82
|
-
readonly borderOnHover: true;
|
|
83
73
|
readonly zoom: false;
|
|
84
|
-
readonly imageShape: 'square';
|
|
85
|
-
readonly restrictImageHeight: false;
|
|
86
74
|
};
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* Used by both Elements and React implementations,
|
|
6
6
|
* the shared combobox helper functions, and typed component specs.
|
|
7
7
|
*/
|
|
8
|
+
import { type TTagSkin } from './skin';
|
|
8
9
|
import type { IFormFieldErrorProps, IFormFieldLabelProps, IHelptextProps, ITagOptionalRequiredProps } from './form-field';
|
|
9
10
|
import type { TPktInputSize } from './size';
|
|
10
11
|
/**
|
|
11
12
|
* Tag skin colors available for combobox option tags.
|
|
12
|
-
* Matches the TTagSkin values from the tag component.
|
|
13
13
|
*/
|
|
14
|
-
export declare const COMBOBOX_TAG_SKINS: readonly [
|
|
15
|
-
export type TPktComboboxTagSkin =
|
|
14
|
+
export declare const COMBOBOX_TAG_SKINS: readonly ["gray", "gray-light", "blue-dark", "blue", "blue-light", "blue-pale", "green", "green-light", "red", "red-light", "yellow", "yellow-light", "beige", "beige-light"];
|
|
15
|
+
export type TPktComboboxTagSkin = TTagSkin;
|
|
16
16
|
/**
|
|
17
17
|
* Represents a single option in a combobox or listbox.
|
|
18
18
|
*/
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Booleanish } from './booleanish';
|
|
8
8
|
/** Default CDN path for icons. Overridden globally by `window.pktIconPath`. */
|
|
9
|
-
export declare const ICON_DEFAULT_PATH = "https://
|
|
9
|
+
export declare const ICON_DEFAULT_PATH = "https://cdn.ikoner.oslo.kommune.no/icons/";
|
|
10
10
|
/** Default CDN path for loading animations. Overridden globally by `window.pktAnimationPath`. */
|
|
11
11
|
export declare const ANIMATION_DEFAULT_PATH = "https://punkt-cdn.oslo.kommune.no/latest/animations/";
|
|
12
12
|
/** Icon size modifier classes — shared runtime source for types, specs, and Preview. */
|
|
@@ -37,5 +37,5 @@ export type IIconSpecProps = Pick<IPktIconBase, 'name' | 'path' | 'ariaHidden' |
|
|
|
37
37
|
*/
|
|
38
38
|
export declare const ICON_DEFAULTS: {
|
|
39
39
|
readonly name: '';
|
|
40
|
-
readonly path: "https://
|
|
40
|
+
readonly path: "https://cdn.ikoner.oslo.kommune.no/icons/";
|
|
41
41
|
};
|
|
@@ -11,8 +11,8 @@ export { HEADER_MENU_LOCALES, DEFAULT_HEADER_FOOTER_URL, DEFAULT_HEADER_LOGO_LIN
|
|
|
11
11
|
export type { THeaderMenuLocale, IHeaderMenuLink, IHeaderMenuIconLink, IHeaderMenuButton, IHeaderMenuServices, IHeaderMenuSection, IMegaMenu, IHeaderFooter, IHeaderFooterLocaleData, THeaderFooterApi, IPktHeaderMenu, IPktHeaderGlobal, } from './header-footer';
|
|
12
12
|
export type { IPktFooterLink, IPktFooterColumn, IPktFooterSocialLink, IPktFooterBase, IPktFooterProps, IPktFooterSimpleProps, IFooterSimpleSpecProps, IFooterSpecProps, } from './footer';
|
|
13
13
|
export { DEFAULT_FOOTER_PERSONVERN_URL, DEFAULT_FOOTER_TILGJENGELIGHET_URL } from './footer';
|
|
14
|
-
export { CARD_SKINS,
|
|
15
|
-
export type { TCardSkin,
|
|
14
|
+
export { CARD_SKINS, CARD_LIGHT_ONLY_SKINS, CARD_IMAGE_ASPECTS, CARD_TAG_POSITIONS, CARD_TAG_SKIN_OPTIONS, CARD_DEFAULTS, } from './card';
|
|
15
|
+
export type { TCardSkin, TCardImageAspect, TCardTagPosition, ICardTag, ICardImage, IPktCardBase, ICardSpecProps, } from './card';
|
|
16
16
|
export { CHECKBOX_LABEL_POSITIONS, CHECKBOX_DEFAULTS } from './checkbox';
|
|
17
17
|
export type { TCheckboxLabelPosition, IPktCheckboxBase, ICheckboxSpecProps } from './checkbox';
|
|
18
18
|
export { RADIOBUTTON_DEFAULTS } from './radiobutton';
|
|
@@ -33,8 +33,8 @@ export type { TAccordionSkin, IPktAccordionBase, IPktAccordionItemBase, IAccordi
|
|
|
33
33
|
export { BUTTON_SIZES, BUTTON_SKINS, BUTTON_COLORS, BUTTON_VARIANTS, BUTTON_STATES } from './button';
|
|
34
34
|
export type { TPktButtonSize, TPktButtonSkin, TPktButtonColor, TPktButtonVariant, TPktButtonState, IPktButtonBase, IButtonSpecProps, } from './button';
|
|
35
35
|
export type { IPktBackLinkBase, IBacklinkSpecProps } from './backlink';
|
|
36
|
-
export { LINKCARD_SKINS } from './linkcard';
|
|
37
|
-
export type { TLinkCardSkin, IPktLinkCardBase, ILinkcardSpecProps } from './linkcard';
|
|
36
|
+
export { LINKCARD_SKINS, LINKCARD_LIGHT_ONLY_SKINS } from './linkcard';
|
|
37
|
+
export type { TLinkCardSkin, TDeprecatedLinkCardSkin, IPktLinkCardBase, ILinkcardSpecProps, } from './linkcard';
|
|
38
38
|
export { BREADCRUMBS_NAVIGATION_TYPES } from './breadcrumbs';
|
|
39
39
|
export type { TBreadcrumbsNavigationType, IBreadcrumb, IBreadcrumbItem, IBreadcrumbs, IPktBreadcrumbsBase, IBreadcrumbsSpecProps, } from './breadcrumbs';
|
|
40
40
|
export type { IRenderLink, TRenderLink } from './render-link';
|
|
@@ -46,9 +46,11 @@ export type { IPktTextareaBase, ITextareaSpecProps } from './textarea';
|
|
|
46
46
|
export { TEXTINPUT_DEFAULTS, TEXTINPUT_TYPES } from './textinput';
|
|
47
47
|
export type { TPktTextinputType, IPktTextinputBase, ITextinputSpecProps } from './textinput';
|
|
48
48
|
export type { TPktCounterPosition, IPktInputWrapperBase, IInputWrapperSpecProps, } from './input-wrapper';
|
|
49
|
-
export type {
|
|
50
|
-
export {
|
|
51
|
-
export type {
|
|
49
|
+
export type { TMessageboxSkin } from './skin';
|
|
50
|
+
export { TAG_SKINS, TAG_STATES, TAG_TEXT_STYLES, TAG_DEFAULTS } from './tag';
|
|
51
|
+
export type { TTagSkin, TTagState, TTagTextStyle, IPktTagBase, ITagSpecProps } from './tag';
|
|
52
|
+
export { MESSAGEBOX_SKINS, MESSAGEBOX_LIGHT_ONLY_SKINS, MESSAGEBOX_DEFAULTS } from './messagebox';
|
|
53
|
+
export type { IPktMessageboxBase, IMessageboxSpecProps } from './messagebox';
|
|
52
54
|
export { CALENDAR_DEFAULTS } from './calendar';
|
|
53
55
|
export type { IPktCalendarBase, ICalendarSpecProps, IDateConstraints, ICalendarGridDimensions, IGridCellPosition, TDateRangeMap, ISelectionState, ISelectionOptions, } from './calendar';
|
|
54
56
|
export type { IDatepickerStrings } from './datepicker';
|
|
@@ -57,7 +59,7 @@ export type { ITimepickerStrings } from './timepicker';
|
|
|
57
59
|
export { defaultTimepickerStrings } from './timepicker';
|
|
58
60
|
export { PROGRESSBAR_DEFAULTS, PROGRESSBAR_ROLES, PROGRESSBAR_SKINS, PROGRESSBAR_STATUS_PLACEMENTS, PROGRESSBAR_STATUS_TYPES, PROGRESSBAR_TITLE_POSITIONS, } from './progressbar';
|
|
59
61
|
export type { IPktProgressbarBase, IProgressbarSpecProps, TProgressbarRole, TProgressbarSkin, TProgressbarStatusPlacement, TProgressbarStatusType, TProgressbarTitlePosition, } from './progressbar';
|
|
60
|
-
export {
|
|
62
|
+
export { COMBOBOX_DISPLAY_VALUES, COMBOBOX_TAG_PLACEMENTS, COMBOBOX_DEFAULTS } from './combobox';
|
|
61
63
|
export type { IPktComboboxOption, TPktComboboxTagSkin, TPktComboboxDisplayValue, TPktComboboxTagPlacement, IPktComboboxBase, IComboboxSpecProps, } from './combobox';
|
|
62
64
|
export { SELECT_DEFAULTS } from './select';
|
|
63
65
|
export type { IPktSelectOption, TSelectOption, IPktSelectBase, ISelectSpecProps } from './select';
|
|
@@ -6,8 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { IPktStringsProps } from '../shared-strings';
|
|
8
8
|
/** LinkCard skin variants — shared runtime source for types, specs, and Preview. */
|
|
9
|
-
export declare const LINKCARD_SKINS: readonly ['
|
|
10
|
-
|
|
9
|
+
export declare const LINKCARD_SKINS: readonly ['gray', 'outlined', 'transparent', 'white', 'blue', 'green', 'beige'];
|
|
10
|
+
/** @deprecated Old names that still work: `normal` is `transparent`, `gray-outline` is `outlined`. */
|
|
11
|
+
export type TDeprecatedLinkCardSkin = 'normal' | 'gray-outline';
|
|
12
|
+
export type TLinkCardSkin = (typeof LINKCARD_SKINS)[number] | TDeprecatedLinkCardSkin;
|
|
13
|
+
/** Skins without a dark variant. The link card gets `data-mode="light"` and stays in light mode. */
|
|
14
|
+
export declare const LINKCARD_LIGHT_ONLY_SKINS: readonly TLinkCardSkin[];
|
|
11
15
|
/** Shared LinkCard props for React, Elements, and typed specs. */
|
|
12
16
|
export type IPktLinkCardBase = IPktStringsProps<'linkcard'> & {
|
|
13
17
|
title?: string;
|
|
@@ -15,10 +19,9 @@ export type IPktLinkCardBase = IPktStringsProps<'linkcard'> & {
|
|
|
15
19
|
skin?: TLinkCardSkin;
|
|
16
20
|
iconName?: string;
|
|
17
21
|
openInNewTab?: boolean;
|
|
18
|
-
external?: boolean;
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* Documented LinkCard props (subset of `IPktLinkCardBase`).
|
|
22
25
|
* Used for typed component specs in documentation.
|
|
23
26
|
*/
|
|
24
|
-
export type ILinkcardSpecProps = Pick<IPktLinkCardBase, 'title' | 'href' | 'skin' | 'iconName' | 'openInNewTab'
|
|
27
|
+
export type ILinkcardSpecProps = Pick<IPktLinkCardBase, 'title' | 'href' | 'skin' | 'iconName' | 'openInNewTab'>;
|
|
@@ -5,8 +5,10 @@
|
|
|
5
5
|
* Used by React, Elements, and typed component specs.
|
|
6
6
|
*/
|
|
7
7
|
/** Messagebox skin variants — shared runtime source for types, specs, and Preview. */
|
|
8
|
-
export declare const MESSAGEBOX_SKINS: readonly ['beige', 'blue', 'red', 'green'];
|
|
8
|
+
export declare const MESSAGEBOX_SKINS: readonly ['gray', 'beige', 'blue', 'red', 'green'];
|
|
9
9
|
export type TMessageboxSkin = (typeof MESSAGEBOX_SKINS)[number];
|
|
10
|
+
/** Skins without a dark variant. The messagebox gets `data-mode="light"` and stays in light mode. */
|
|
11
|
+
export declare const MESSAGEBOX_LIGHT_ONLY_SKINS: readonly TMessageboxSkin[];
|
|
10
12
|
/**
|
|
11
13
|
* Messagebox props shared by React and Elements.
|
|
12
14
|
*
|
|
@@ -26,7 +28,7 @@ export interface IPktMessageboxBase {
|
|
|
26
28
|
export type IMessageboxSpecProps = Pick<IPktMessageboxBase, 'title' | 'skin' | 'compact' | 'closable'>;
|
|
27
29
|
/** Default values for pkt-messagebox. Single source of truth for both frameworks. */
|
|
28
30
|
export declare const MESSAGEBOX_DEFAULTS: {
|
|
29
|
-
readonly skin: '
|
|
31
|
+
readonly skin: 'gray';
|
|
30
32
|
readonly compact: false;
|
|
31
33
|
readonly closable: false;
|
|
32
34
|
};
|
|
@@ -9,7 +9,4 @@ export { ALERT_SKINS, type TAlertSkin } from './alert';
|
|
|
9
9
|
export { ACCORDION_SKINS, type TAccordionSkin } from './accordion';
|
|
10
10
|
export { CARD_SKINS, type TCardSkin } from './card';
|
|
11
11
|
export { MESSAGEBOX_SKINS, type TMessageboxSkin } from './messagebox';
|
|
12
|
-
|
|
13
|
-
* Tag component skin variants
|
|
14
|
-
*/
|
|
15
|
-
export type TTagSkin = 'blue' | 'blue-light' | 'blue-dark' | 'green' | 'red' | 'beige' | 'yellow' | 'grey' | 'gray';
|
|
12
|
+
export { TAG_SKINS, TAG_STATES, type TTagSkin, type TTagState } from './tag';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tag.ts
|
|
3
|
+
*
|
|
4
|
+
* Shared types and defaults for Tag, used by both React and Elements.
|
|
5
|
+
*/
|
|
6
|
+
import type { IPktStringsProps } from '../shared-strings';
|
|
7
|
+
import type { THTMLButtonType } from './form';
|
|
8
|
+
import type { TPktSizeBase } from './size';
|
|
9
|
+
/** Tag skins: shared runtime source for types, specs and demo pages. */
|
|
10
|
+
export declare const TAG_SKINS: readonly ['gray', 'gray-light', 'blue-dark', 'blue', 'blue-light', 'blue-pale', 'green', 'green-light', 'red', 'red-light', 'yellow', 'yellow-light', 'beige', 'beige-light'];
|
|
11
|
+
export type TTagSkin = (typeof TAG_SKINS)[number];
|
|
12
|
+
/** Forces a tag into a visual state without the user interacting with it. */
|
|
13
|
+
export declare const TAG_STATES: readonly ['hover', 'focus', 'active'];
|
|
14
|
+
export type TTagState = (typeof TAG_STATES)[number];
|
|
15
|
+
export declare const TAG_TEXT_STYLES: readonly ['normal-text', 'thin-text'];
|
|
16
|
+
export type TTagTextStyle = (typeof TAG_TEXT_STYLES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Framework-agnostic props for Tag.
|
|
19
|
+
*
|
|
20
|
+
* @remarks React adds `onClose` and `children`, and only accepts `type` when
|
|
21
|
+
* `closeTag` is `true`. Elements narrows `iconName` to `PktIconName` and
|
|
22
|
+
* dispatches a `close` event instead of `onClose`.
|
|
23
|
+
*/
|
|
24
|
+
export interface IPktTagBase extends IPktStringsProps<'tag'> {
|
|
25
|
+
closeTag?: boolean;
|
|
26
|
+
size?: TPktSizeBase;
|
|
27
|
+
skin?: TTagSkin;
|
|
28
|
+
state?: TTagState | null;
|
|
29
|
+
textStyle?: TTagTextStyle | null;
|
|
30
|
+
iconName?: string;
|
|
31
|
+
type?: THTMLButtonType;
|
|
32
|
+
ariaLabel?: string | null;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props documented in the component spec (docs and Preview).
|
|
36
|
+
* The spec file is type-checked against this.
|
|
37
|
+
*/
|
|
38
|
+
export type ITagSpecProps = Pick<IPktTagBase, 'size' | 'iconName' | 'skin' | 'closeTag' | 'state' | 'textStyle' | 'type' | 'ariaLabel'>;
|
|
39
|
+
/** Default values, shared by React and Elements. */
|
|
40
|
+
export declare const TAG_DEFAULTS: {
|
|
41
|
+
readonly closeTag: false;
|
|
42
|
+
readonly size: 'medium';
|
|
43
|
+
readonly skin: 'gray';
|
|
44
|
+
readonly textStyle: 'normal-text';
|
|
45
|
+
readonly type: 'button';
|
|
46
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3_.cjs")
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./element-with-slot-CeKuRE3_.cjs");require("./tag-BZdC0voc.cjs");const n=require("./if-defined-Ci4ZQsgL.cjs"),r=require("./consume-kEjgTrAp.cjs"),i=require("./provide-Cz18sYug.cjs"),a=require("./ref-B6p6mQkO.cjs");var o=r.n(Symbol(`pkt-tabs-context`)),s=class extends t.t{constructor(...e){super(...e),this.arrowNav=!0,this.disableArrowNav=!1,this.separatorIconName=``,this.separatorIconPath=``,this.tabRefs=[],this.disabledMap={},this.tabCount=0,this.context={useArrowNav:this.useArrowNav,registerTab:this.registerTab.bind(this),handleClick:this.handleClick.bind(this),handleKeyUp:this.handleKeyUp.bind(this)}}get useArrowNav(){return this.arrowNav&&!this.disableArrowNav}willUpdate(e){(e.has(`arrowNav`)||e.has(`disableArrowNav`))&&(this.context={...this.context,useArrowNav:this.useArrowNav})}updated(){this.updateComplete.then(()=>this.syncSeparators())}syncSeparators(){let e=this.querySelector(`.pkt-tabs__list`);if(!e||(e.querySelectorAll(`.pkt-tabs__separator`).forEach(e=>e.remove()),!(this.separatorIconName||this.separatorIconPath)))return;let t=Array.from(e.children).filter(e=>!e.classList.contains(`pkt-tabs__separator`));for(let e=0;e<t.length-1;e++){let n=document.createElement(`span`);if(n.className=`pkt-tabs__separator`,n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`role`,`presentation`),this.separatorIconPath){let e=document.createElement(`img`);e.setAttribute(`src`,this.separatorIconPath),e.setAttribute(`alt`,``),e.setAttribute(`aria-hidden`,`true`),n.appendChild(e)}else if(this.separatorIconName){let e=document.createElement(`pkt-icon`);e.setAttribute(`name`,this.separatorIconName),e.classList.add(`pkt-tabs__separator-icon`),n.appendChild(e)}t[e].after(n)}}registerTab(e,t,n=!1){this.tabRefs[t]=e,this.disabledMap[t]=n,this.tabCount=Math.max(this.tabCount,t+1)}isTabDisabled(e){return!!this.disabledMap[e]}findEnabledIndex(e,t){let n=e+t;for(;n>=0&&n<this.tabCount;){if(!this.isTabDisabled(n))return n;n+=t}return null}handleClick(e){this.isTabDisabled(e)||this.dispatchEvent(new CustomEvent(`tab-selected`,{detail:{index:e},bubbles:!0,composed:!0}))}handleKeyUp(e,t){if(this.useArrowNav){if(e.key===`ArrowLeft`){e.preventDefault();let n=this.findEnabledIndex(t,-1);n!==null&&this.tabRefs[n]?.focus()}if(e.key===`ArrowRight`){e.preventDefault();let n=this.findEnabledIndex(t,1);n!==null&&this.tabRefs[n]?.focus()}(e.key===`Enter`||e.key===` `||e.key===`Spacebar`||e.key===`ArrowDown`)&&(e.preventDefault(),this.handleClick(t))}}render(){let n=this.useArrowNav?`tablist`:`navigation`,r=this.separatorIconName||this.separatorIconPath?`pkt-tabs pkt-tabs--with-separator`:`pkt-tabs`;return e._`
|
|
2
2
|
<div class=${r}>
|
|
3
3
|
<div class="pkt-tabs__list" role=${n}>${t.i(this)}</div>
|
|
4
4
|
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { _ as e, d as t, l as n, n as r, u as i } from "./element-DLgZkx5L.js";
|
|
2
2
|
import { i as a, t as o } from "./element-with-slot-mG-h7Sjw.js";
|
|
3
|
+
import "./tag-Cam7ISOF.js";
|
|
3
4
|
import { t as s } from "./if-defined-DiYi2v_Q.js";
|
|
4
5
|
import { n as c, t as l } from "./consume-Bp12si68.js";
|
|
5
6
|
import { t as u } from "./provide-_MnlMGnw.js";
|
|
6
7
|
import { n as d, t as f } from "./ref-BAegS9BR.js";
|
|
7
|
-
import "./tag-CtdOrK18.js";
|
|
8
8
|
//#region src/components/tabs/tabs-context.ts
|
|
9
9
|
var p = c(Symbol("pkt-tabs-context")), m = class extends o {
|
|
10
10
|
constructor(...e) {
|