@oslokommune/punkt-elements 19.19.1 → 20.0.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 +67 -0
- package/dist/{accordion-Bg4CMrUM.cjs → accordion-5N_ptxrN.cjs} +1 -1
- package/dist/{accordion-BHVzR-6Z.js → accordion-C5cu1xXT.js} +5 -5
- package/dist/{alert-BAaZIR3e.js → alert-CA1fDbyc.js} +5 -5
- package/dist/{alert-Dy5N7qK-.cjs → alert-DkyTTo7S.cjs} +1 -1
- package/dist/{async-directive-C4LocQwR.js → async-directive-BcS8rfeC.js} +2 -2
- package/dist/{async-directive-DpyKp6qv.cjs → async-directive-DCLIOGR8.cjs} +1 -1
- package/dist/{backlink-Dlkyj0ns.js → backlink-CDBRcaAu.js} +3 -3
- package/dist/{backlink-BnWruRuj.cjs → backlink-CXOxMeyt.cjs} +1 -1
- package/dist/{breadcrumbs-Bfv8W2CF.js → breadcrumbs-5oUaCef3.js} +2 -2
- package/dist/{breadcrumbs-CyWtnx2B.cjs → breadcrumbs-zfUto2U5.cjs} +1 -1
- package/dist/{button-CF9k3ARf.js → button-Bswo1C0M.js} +5 -5
- package/dist/{button-BBFI3FuT.cjs → button-bVWAX98x.cjs} +1 -1
- package/dist/{calendar-BX3n3vhs.js → calendar-BOd-9PDd.js} +3 -3
- package/dist/{calendar-Dds9KFiE.cjs → calendar-CDTCgTJn.cjs} +1 -1
- package/dist/{card-Ddu0sQ0f.js → card-DH1kPnyi.js} +44 -42
- package/dist/card-njWrvrHm.cjs +67 -0
- package/dist/{checkbox-D9-KugOh.js → checkbox-DIJbuqWm.js} +5 -5
- package/dist/{checkbox-group-Dz1ypmbU.js → checkbox-group-DLLbWgQb.js} +3 -3
- package/dist/{checkbox-group-BlBgrzKG.cjs → checkbox-group-Kua6HuRE.cjs} +1 -1
- package/dist/{checkbox-B8foyiOW.cjs → checkbox-iMOdzpJ_.cjs} +2 -2
- package/dist/{class-map-BkEYw5uE.js → class-map-BDwVSgLb.js} +1 -1
- package/dist/{class-map-Bh6toDeV.cjs → class-map-C82GtM1w.cjs} +1 -1
- package/dist/{combobox-DLDvyuDh.cjs → combobox-BwAxmoG9.cjs} +1 -1
- package/dist/{combobox-BAkblu9M.js → combobox-H5FLG8BV.js} +12 -12
- 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/progressbar/progressbar.d.ts +4 -18
- package/dist/components/tabs/tabitem.d.ts +2 -1
- package/dist/components/tag/tag.d.ts +4 -2
- package/dist/{consent-DNHRe0zV.cjs → consent-UkinU27V.cjs} +1 -1
- package/dist/{consent-BTw6uqFf.js → consent-p-0n2b9x.js} +2 -2
- package/dist/{datepicker-C7F1Yc5N.cjs → datepicker-COar3rRT.cjs} +1 -1
- package/dist/{datepicker-9dmdHweu.js → datepicker-ZSwWg8xW.js} +11 -11
- package/dist/{directive-helpers-BAinC437.js → directive-helpers-BoDzpPID.js} +1 -1
- package/dist/{directive-helpers-Bv70GjQh.cjs → directive-helpers-r7akb6wX.cjs} +1 -1
- package/dist/{element-C6WTyJFE.cjs → element-CEarCnHH.cjs} +1 -1
- package/dist/{element-ckeMVgMz.js → element-DLgZkx5L.js} +1 -0
- package/dist/{element-with-slot-B0Vp_OuR.cjs → element-with-slot-CeKuRE3_.cjs} +1 -1
- package/dist/{element-with-slot-Dp2Gzv-Q.js → element-with-slot-mG-h7Sjw.js} +2 -2
- package/dist/{fileupload-M66Pd-QJ.cjs → fileupload-DXJtAagE.cjs} +1 -1
- package/dist/{fileupload-CEwnpxZj.js → fileupload-vPDmtXiM.js} +8 -8
- package/dist/{footer-HFL2sjAY.cjs → footer-CpE05IW2.cjs} +1 -1
- package/dist/{footer-DZ4aA6fj.js → footer-D8t0PCPC.js} +4 -4
- package/dist/{header-BYNzxXCo.js → header-Bo8uvddg.js} +11 -11
- package/dist/{header-BqheRQpR.cjs → header-DzYKgl-k.cjs} +1 -1
- package/dist/{header-menu-DxOSBiTJ.js → header-menu-BrjsNjBH.js} +4 -4
- package/dist/{header-menu-De2DNAXd.cjs → header-menu-Dq9lwNr1.cjs} +1 -1
- package/dist/{heading-B1Ey3XzB.js → heading-CMZmPEL9.js} +2 -2
- package/dist/{heading--hGRDNX9.cjs → heading-DAkjw2Am.cjs} +1 -1
- package/dist/{helptext-BVYv8Lm9.js → helptext-BFQzrOw4.js} +4 -4
- package/dist/{helptext-BbrFE48Y.cjs → helptext-Bse1LpRd.cjs} +1 -1
- package/dist/icon-5A378_yh.cjs +1 -0
- package/dist/{icon-CUU42bZ0.js → icon-C1oCGwEe.js} +2 -2
- package/dist/if-defined-Ci4ZQsgL.cjs +1 -0
- package/dist/{if-defined-D18nY_K_.js → if-defined-DiYi2v_Q.js} +1 -1
- package/dist/{input-element-D82laWtR.cjs → input-element-2LHxo0em.cjs} +1 -1
- package/dist/{input-element-DczlJQb1.js → input-element-De40zUox.js} +2 -2
- package/dist/{input-wrapper-QzdntWJX.cjs → input-wrapper-C_Rzwxx7.cjs} +2 -2
- package/dist/{input-wrapper-CHwWQgZP.js → input-wrapper-DkpJS1hR.js} +7 -7
- package/dist/{link-a1ZK4J1j.cjs → link-B7t4iOKk.cjs} +3 -3
- package/dist/{link-BU6t5Tt9.js → link-DZgG_8Ni.js} +15 -10
- package/dist/linkcard-DIG6VYpl.cjs +15 -0
- package/dist/linkcard-Dr-r8jBO.js +60 -0
- package/dist/{listbox-DFd-1faX.js → listbox-DAvIBH4P.js} +4 -4
- package/dist/{listbox-BbdUu-IV.cjs → listbox-HrH4JonS.cjs} +1 -1
- package/dist/{loader-Y8V3Q82X.js → loader-CFidlqSG.js} +4 -4
- package/dist/{loader-DwGMavG7.cjs → loader-DTIrOtTo.cjs} +1 -1
- package/dist/messagebox-BLYx3AL7.cjs +16 -0
- package/dist/{messagebox-wJcXW5hI.js → messagebox-B_07P0QA.js} +25 -16
- package/dist/{modal-C5AiVm5g.cjs → modal-BvTfLfFq.cjs} +1 -1
- package/dist/{modal-BafCTC4M.js → modal-CA_M2Ix6.js} +6 -6
- package/dist/{option-group-element-CWjgrFwS.cjs → option-group-element-CVNaBIlP.cjs} +1 -1
- package/dist/{option-group-element-ZNyUoLcm.js → option-group-element-DzM8YznZ.js} +3 -3
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.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-heading.cjs +1 -1
- package/dist/pkt-heading.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 +37 -37
- 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-listbox.cjs +1 -1
- package/dist/pkt-listbox.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-options-controller-C193xcN4.cjs → pkt-options-controller-9zoH1OBW.cjs} +1 -1
- package/dist/{pkt-options-controller-CH8U6zlw.js → pkt-options-controller-CzvBlEPD.js} +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.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/progressbar-BdqIhC1Z.cjs +30 -0
- package/dist/{progressbar-BukfOcRk.js → progressbar-CfCc2zhp.js} +50 -37
- package/dist/{radio-group-Bg6ODpT3.js → radio-group-BRY_74od.js} +3 -3
- package/dist/{radio-group-bpIEEMdL.cjs → radio-group-CsUgnEv0.cjs} +1 -1
- package/dist/{radiobutton-IcDc6ze2.cjs → radiobutton-CQhuG2lj.cjs} +2 -2
- package/dist/{radiobutton-DMvVv81Y.js → radiobutton-lHnq8wX_.js} +5 -5
- package/dist/{ref-CB7e9nMY.cjs → ref-B6p6mQkO.cjs} +1 -1
- package/dist/{ref-D4OwQYdf.js → ref-BAegS9BR.js} +2 -2
- package/dist/{repeat-CnnigVcj.cjs → repeat-CjvNrcUr.cjs} +1 -1
- package/dist/{repeat-BGbBqnfz.js → repeat-Cy1M16Di.js} +2 -2
- package/dist/{searchinput-BV2C1VbN.js → searchinput-BLGaXkP6.js} +4 -4
- package/dist/{searchinput-DqD_iLxV.cjs → searchinput-TAqMUJ0B.cjs} +1 -1
- package/dist/{select-DKBfPgJB.js → select-BvtUxW0Q.js} +7 -7
- package/dist/{select-CHqM6kI-.cjs → select-Dle67Uwv.cjs} +1 -1
- package/dist/shared-strings/nb.d.ts +3 -0
- 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 +11 -9
- package/dist/shared-types/linkcard.d.ts +7 -4
- package/dist/shared-types/messagebox.d.ts +4 -2
- package/dist/shared-types/progressbar.d.ts +82 -5
- package/dist/shared-types/skin.d.ts +8 -2
- package/dist/{tabs-B2RjklQl.js → tabs-Bu_-WfCK.js} +5 -5
- package/dist/{tabs-BcnYrmjU.cjs → tabs-Dwk5PKzP.cjs} +1 -1
- package/dist/tag-1SSexs0H.cjs +27 -0
- package/dist/{tag-BOTH9kMz.js → tag-CkZ2Mn4a.js} +33 -11
- package/dist/{textarea-B5OfR-QI.cjs → textarea-DSX3jMlI.cjs} +1 -1
- package/dist/{textarea-Du1Z9JUu.js → textarea-Djp5L2Zd.js} +9 -9
- package/dist/{textinput-CRlErItw.js → textinput-CBrOZcvL.js} +8 -8
- package/dist/{textinput-C5KWIB21.cjs → textinput-CN2F3Q3H.cjs} +1 -1
- package/dist/{timepicker-DVqTAxt0.js → timepicker-CT4wfrgQ.js} +8 -8
- package/dist/{timepicker-RxsG0mCF.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/progressbar/progressbar.test.ts +47 -5
- package/src/components/progressbar/progressbar.ts +49 -53
- 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 +21 -12
- package/src/components/tag/tag.ts +12 -3
- package/dist/card-mi3VKIoy.cjs +0 -64
- package/dist/icon-CrG6o7ZE.cjs +0 -1
- package/dist/if-defined-CiML3MTM.cjs +0 -1
- package/dist/linkcard-Cu4Rh71U.cjs +0 -14
- package/dist/linkcard-DM0CQbwD.js +0 -56
- package/dist/messagebox-DR-s6tyr.cjs +0 -13
- package/dist/progressbar-YfHSPmqI.cjs +0 -31
- package/dist/tag-DrFK8Wq3.cjs +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,73 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [20.0.0](https://github.com/oslokommune/punkt/compare/19.20.0...20.0.0) (2026-11-03)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
* Punkt 20: Ny card, tag, messagebox, CDN for ikoner og mye mer (#3782). BREAKING CHANGE: Card: standard-skin er `gray`, ikke `outlined`. Sett
|
|
12
|
+
`skin="outlined"` for å beholde rammen.
|
|
13
|
+
|
|
14
|
+
BREAKING CHANGE: Card: `padding`, `imageShape`, `borderOnHover` og
|
|
15
|
+
`restrictImageHeight` er fjernet, sammen med CSS-klassene,
|
|
16
|
+
`TCardPadding`, `TCardImageShape`, `CARD_PADDINGS` og
|
|
17
|
+
`CARD_IMAGE_SHAPES`. Bildet har fast høyde. Bruk `imageAspect` for
|
|
18
|
+
sideforhold.
|
|
19
|
+
|
|
20
|
+
BREAKING CHANGE: Card: skin `outlined-beige` er fjernet. Bruk
|
|
21
|
+
`outlined`.
|
|
22
|
+
|
|
23
|
+
BREAKING CHANGE: Card: liggende card stables etter bredden på cardet,
|
|
24
|
+
ikke skjermen. Egen HTML må ha `.pkt-card__container` rundt bilde og
|
|
25
|
+
tekst, og `pkt-card--clickable` på klikkbare card.
|
|
26
|
+
|
|
27
|
+
BREAKING CHANGE: Messagebox: standard-skin er `gray`, ikke `beige`. Sett
|
|
28
|
+
`skin="beige"` for å beholde utseendet.
|
|
29
|
+
|
|
30
|
+
BREAKING CHANGE: Tag: standard-skin er `gray`, ikke `blue`. Sett
|
|
31
|
+
`skin="blue"` for å beholde utseendet.
|
|
32
|
+
|
|
33
|
+
BREAKING CHANGE: `grey` er fjernet. Bruk `gray`. Det gjelder `skin` på
|
|
34
|
+
Tag og Link card, `tagSkin` på tab items, `tagSkinColor` i Combobox og
|
|
35
|
+
`pkt-section--grey`. På Link card blir `grey-outline` til `outlined`.
|
|
36
|
+
|
|
37
|
+
BREAKING CHANGE: Link card: skin `beige-outline` er fjernet. Bruk
|
|
38
|
+
`outlined`. Skin `no-padding` er fjernet, og link card uten skin har
|
|
39
|
+
ikke lenger padding.
|
|
40
|
+
|
|
41
|
+
BREAKING CHANGE: Link og Link card: `external` er fjernet, sammen med
|
|
42
|
+
ikonet og klassen `pkt-link--external`. Bruk `rel="noopener noreferrer"`
|
|
43
|
+
på Link.
|
|
44
|
+
|
|
45
|
+
BREAKING CHANGE: Icon: ikonene hentes fra
|
|
46
|
+
`https://cdn.ikoner.oslo.kommune.no/icons/`, ikke punkt-cdn. En Content
|
|
47
|
+
Security Policy må tillate domenet i `connect-src`. Ikonene
|
|
48
|
+
`search-icon-round-*` og `search-icon-square-*` er fjernet.
|
|
49
|
+
|
|
50
|
+
Verktøyet migrerer det meste: `npx @oslokommune/punkt-migrate@20 .
|
|
51
|
+
--dry-run`
|
|
52
|
+
|
|
53
|
+
Se
|
|
54
|
+
https://punkt.oslo.kommune.no/latest/grunnleggende/for-utviklere/migrering-punkt-20/
|
|
55
|
+
for mer informasjon.
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
* Card er tegnet om, med pil etter overskriften på klikkbare. card og ny skin `transparent`.
|
|
59
|
+
* Tag har nye farger med light-varianter og nye state-farger..
|
|
60
|
+
* Link card har fått samme skins som Card. `normal` og. `gray-outline` virker fortsatt.
|
|
61
|
+
* Dark mode for Card, Tag, Messagebox og Link card. Skins uten. mørk variant holder seg lyse.
|
|
62
|
+
* punkt-migrate@20 migrerer props og attributter i alle. rammeverk, og tar prosjekter på 18 via 19.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
## [19.20.0](https://github.com/oslokommune/punkt/compare/19.19.1...19.20.0) (2026-11-03)
|
|
68
|
+
|
|
69
|
+
### Features
|
|
70
|
+
* typesikre progressbar (#3796).
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
|
|
8
75
|
## [19.20.0](https://github.com/oslokommune/punkt/compare/19.19.0...19.20.0) (2026-11-03)
|
|
9
76
|
|
|
10
77
|
---
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./element-with-slot-CeKuRE3_.cjs");require("./shared-types-BvRk9kiK.cjs");const r=require("./if-defined-Ci4ZQsgL.cjs"),i=require("./consume-kEjgTrAp.cjs"),a=require("./provide-Cz18sYug.cjs"),o=require("./ref-B6p6mQkO.cjs");var s=[`beige`,`blue`],c=i.n(Symbol(`pkt-accordion-context`)),l=class extends e.c{constructor(...e){super(...e),this.ariaLabelledBy=``,this.compact=!1,this.skin=`borderless`,this.name=``,this.context={skin:this.skin}}willUpdate(e){e.has(`skin`)&&(this.context={...this.context,skin:this.skin})}updated(e){e.has(`name`)&&this.updateAccordionItemNames()}updateAccordionItemNames(){if(this.name){let e=this.renderRoot?.querySelector(`slot`);e&&e.assignedElements().forEach(e=>{e.tagName.toLowerCase()===`pkt-accordion-item`&&(e.hasAttribute(`name`)||e.setAttribute(`name`,this.name))})}}firstUpdated(){let e=this.renderRoot?.querySelector(`slot`);e&&e.addEventListener(`slotchange`,()=>{this.updateAccordionItemNames()})}render(){let n={"pkt-accordion":!0,"pkt-accordion--compact":this.compact,[`pkt-accordion--${this.skin}`]:this.skin};return e._`
|
|
2
2
|
<div
|
|
3
3
|
part="container"
|
|
4
4
|
class=${t.t(n)}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as e, c as t, d as n, l as r, n as i, u as a } from "./element-
|
|
2
|
-
import { t as o } from "./class-map-
|
|
3
|
-
import { i as s, t as c } from "./element-with-slot-
|
|
1
|
+
import { _ as e, c as t, d as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { t as o } from "./class-map-BDwVSgLb.js";
|
|
3
|
+
import { i as s, t as c } from "./element-with-slot-mG-h7Sjw.js";
|
|
4
4
|
import "./shared-types-A6iGIX-f.js";
|
|
5
|
-
import { t as l } from "./if-defined-
|
|
5
|
+
import { t as l } from "./if-defined-DiYi2v_Q.js";
|
|
6
6
|
import { n as u, t as d } from "./consume-Bp12si68.js";
|
|
7
7
|
import { t as f } from "./provide-_MnlMGnw.js";
|
|
8
|
-
import { n as p, t as m } from "./ref-
|
|
8
|
+
import { n as p, t as m } from "./ref-BAegS9BR.js";
|
|
9
9
|
//#region ../../shared-types/accordion.ts
|
|
10
10
|
var h = ["beige", "blue"], g = u(Symbol("pkt-accordion-context")), _ = class extends t {
|
|
11
11
|
constructor(...e) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-
|
|
2
|
-
import { t as o } from "./class-map-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { t as o } from "./class-map-BDwVSgLb.js";
|
|
3
3
|
import { t as s } from "./format-BTeSVkED.js";
|
|
4
|
-
import { i as c, t as l } from "./element-with-slot-
|
|
4
|
+
import { i as c, t as l } from "./element-with-slot-mG-h7Sjw.js";
|
|
5
5
|
import "./shared-types-A6iGIX-f.js";
|
|
6
|
-
import "./icon-
|
|
6
|
+
import "./icon-C1oCGwEe.js";
|
|
7
7
|
import { t as u } from "./classutils-DcYnSgfc.js";
|
|
8
8
|
import { t as d } from "./define-component-spec-BYOSeplU.js";
|
|
9
|
-
import "./button-
|
|
9
|
+
import "./button-Bswo1C0M.js";
|
|
10
10
|
//#region ../../shared-types/aria.ts
|
|
11
11
|
var f = [
|
|
12
12
|
"off",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./format-B8meU8Tm.cjs"),r=require("./element-with-slot-CeKuRE3_.cjs");require("./shared-types-BvRk9kiK.cjs"),require("./icon-5A378_yh.cjs");const i=require("./classutils-CbklAJDe.cjs"),a=require("./define-component-spec-DBNd2FJY.cjs");require("./button-bVWAX98x.cjs");var o=[`off`,`polite`,`assertive`],s=[`info`,`success`,`warning`,`error`],c=[`medium`,`small`,`xsmall`],l={compact:!1},u=a.t({name:`pkt-alert`,react:`PktAlert`,"css-class":`pkt-alert`,"dark-mode":!0,isElement:!0,isPureReact:!0,events:{onClose:{reactOnly:!0,description:`React: Klikk-event for 'Lukk'-knappen`},close:{elementsOnly:!0,description:`Elements: Klikk-event for 'Lukk'-knappen`},"on-close":{elementsOnly:!0,description:`Elements: Samme event som <code>close</code>, beholdt for eldre Vue-oppsett.`,deprecated:`Bruk <code>close</code>. <code>on-close</code> fjernes i en senere hovedversjon.`}},props:{title:{name:`Tittel`,description:`Tittelen som vises øverst i på meldingen`,type:`string`,category:`contents`},skin:{name:`Utseende`,description:`Hvordan type melding er dette?`,type:[...s],default:`info`,category:`ui`},date:{name:`Sist oppdatert`,description:`Dato som vises nederst i på meldingen`,type:`string`,category:`contents`},ariaLive:{name:`aria-live`,description:`Hvordan skal skjermleseren lese opp meldingen?`,type:[...o],default:`polite`,category:`accessibility`},size:{name:`Størrelse`,description:`Endrer størrelsen på ulike elementer i alerten.`,type:[...c],default:`medium`,category:`ui`},closeAlert:{name:`Vis 'Lukk'-knapp`,description:`Viser 'Lukk'-knappen`,type:`boolean`,default:!1,category:`ui`},compact:{name:`Kompakt`,description:`Kompakt visning av alerten.`,deprecated:"Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",type:`boolean`,category:`ui`,default:l.compact}},slots:{default:{description:`Innholdet i meldingen`}}}),d=class extends r.t{constructor(){super(),this.compact=l.compact,this.title=``,this.skin=u.props.skin.default,this.ariaLive=u.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=u.props.closeAlert.default,this.date=null,this.role=`status`,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._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}attributeChangedCallback(e,t,n){e===`ariaLive`&&(this.ariaLiveAttr=n),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),e.has(`ariaLive`)&&e.get(`ariaLive`)!==void 0&&(this.ariaLiveAttr=this.ariaLive),e.has(`_isClosed`)&&i.t(this,`pkt-hide`,this._isClosed)}render(){let i=this.size??(this.compact?`small`:`medium`),a={"pkt-alert":!0,[`pkt-alert--${i}`]:!0,[`pkt-alert--${this.skin}`]:!0,"pkt-hide":this._isClosed},o={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return e._`
|
|
2
2
|
<div
|
|
3
3
|
class=${t.t(a)}
|
|
4
4
|
aria-live=${this.ariaLiveAttr}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as e, p as t } from "./element-
|
|
2
|
-
import { i as n } from "./directive-helpers-
|
|
1
|
+
import { m as e, p as t } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { i as n } from "./directive-helpers-BoDzpPID.js";
|
|
3
3
|
//#region ../../node_modules/lit-html/async-directive.js
|
|
4
4
|
var r = (e, t) => {
|
|
5
5
|
let n = e._$AN;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./directive-helpers-r7akb6wX.cjs");var n=(e,t)=>{let r=e._$AN;if(r===void 0)return!1;for(let e of r)e._$AO?.(t,!1),n(e,t);return!0},r=e=>{let t,n;do{if((t=e._$AM)===void 0)break;n=t._$AN,n.delete(e),e=t}while(n?.size===0)},i=e=>{for(let t;t=e._$AM;e=t){let n=t._$AN;if(n===void 0)t._$AN=n=new Set;else if(n.has(e))break;n.add(e),s(t)}};function a(e){this._$AN===void 0?this._$AM=e:(r(this),this._$AM=e,i(this))}function o(e,t=!1,i=0){let a=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0){if(t){if(Array.isArray(a))for(let e=i;e<a.length;e++)n(a[e],!1),r(a[e]);else a!=null&&(n(a,!1),r(a))}else n(this,e)}}var s=t=>{t.type==e.m.CHILD&&(t._$AP??=o,t._$AQ??=a)},c=class extends e.p{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,n){super._$AT(e,t,n),i(this),this.isConnected=e._$AU}_$AO(e,t=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),t&&(n(this,e),r(this))}setValue(e){if(t.i(this._$Ct))this._$Ct._$AI(e,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e, d as t, n, t as r, u as i } from "./element-
|
|
2
|
-
import "./icon-
|
|
3
|
-
import { t as a } from "./if-defined-
|
|
1
|
+
import { _ as e, d as t, n, t as r, u as i } from "./element-DLgZkx5L.js";
|
|
2
|
+
import "./icon-C1oCGwEe.js";
|
|
3
|
+
import { t as a } from "./if-defined-DiYi2v_Q.js";
|
|
4
4
|
//#region src/components/backlink/backlink.ts
|
|
5
5
|
var o = class extends r {
|
|
6
6
|
constructor(...e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs");require("./icon-5A378_yh.cjs");const t=require("./if-defined-Ci4ZQsgL.cjs");var n=class extends e.t{constructor(...e){super(...e),this.href=``,this.text=`Forsiden`,this.ariaLabel=null}attributeChangedCallback(e,t,n){e===`arialabel`&&this.removeAttribute(`arialabel`),e===`href`&&this.removeAttribute(`href`),e===`text`&&this.removeAttribute(`text`),super.attributeChangedCallback(e,t,n)}render(){return e._`<nav
|
|
2
2
|
class="pkt-back-link"
|
|
3
3
|
aria-label=${this.ariaLabel||this.pktStrings.get(`backlink`).label}
|
|
4
4
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, n as r, t as i, u as a } from "./element-
|
|
2
|
-
import "./icon-
|
|
1
|
+
import { _ as e, d as t, h as n, n as r, t as i, u as a } from "./element-DLgZkx5L.js";
|
|
2
|
+
import "./icon-C1oCGwEe.js";
|
|
3
3
|
//#region src/components/breadcrumbs/breadcrumbs.ts
|
|
4
4
|
var o = class extends i {
|
|
5
5
|
constructor(...e) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs");require("./icon-5A378_yh.cjs");var t=class extends e.t{constructor(...e){super(...e),this.breadcrumbs=[]}handleLinkClick(e,t,n){let r=new CustomEvent(`navigate`,{detail:{item:t,index:n,originalEvent:e},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(r)||e.preventDefault()}render(){if(!this.breadcrumbs||this.breadcrumbs.length===0)return e.h;let t=this.breadcrumbs[this.breadcrumbs.length-2];return e._`
|
|
2
2
|
<nav class="pkt-breadcrumbs" aria-label=${this.pktStrings.get(`breadcrumbs`).ariaLabel}>
|
|
3
3
|
<ol class="pkt-breadcrumbs__list pkt-breadcrumbs--desktop">
|
|
4
4
|
${this.breadcrumbs.map((t,n)=>n===this.breadcrumbs.length-1?e._`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-
|
|
2
|
-
import { t as o } from "./class-map-
|
|
3
|
-
import { i as s, t as c } from "./element-with-slot-
|
|
4
|
-
import "./icon-
|
|
5
|
-
import { t as l } from "./if-defined-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { t as o } from "./class-map-BDwVSgLb.js";
|
|
3
|
+
import { i as s, t as c } from "./element-with-slot-mG-h7Sjw.js";
|
|
4
|
+
import "./icon-C1oCGwEe.js";
|
|
5
|
+
import { t as l } from "./if-defined-DiYi2v_Q.js";
|
|
6
6
|
//#region src/components/button/button.ts
|
|
7
7
|
var u, d = "https://punkt-cdn.oslo.kommune.no/latest/animations/";
|
|
8
8
|
typeof window < "u" && (window.pktAnimationPath = window.pktAnimationPath || d);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./element-with-slot-CeKuRE3_.cjs");require("./icon-5A378_yh.cjs");const r=require("./if-defined-Ci4ZQsgL.cjs");var i,a=`https://punkt-cdn.oslo.kommune.no/latest/animations/`;typeof window<`u`&&(window.pktAnimationPath=window.pktAnimationPath||a);var o=class i extends n.t{constructor(...e){super(...e),this.iconName=`user`,this.secondIconName=`user`,this.size=`medium`,this.fullWidth=!1,this.fullWidthOnMobile=!1,this.skin=`primary`,this.variant=`label-only`,this.state=void 0,this.type=`button`,this.form=void 0,this.isLoading=!1,this.disabled=!1,this.loadingAnimationPath=typeof window<`u`?window.pktAnimationPath:a,this.relocatedAria={}}connectedCallback(){super.connectedCallback(),this.addEventListener(`click`,e=>{(this.disabled||this.hasAttribute(`disabled`)||this.isLoading)&&(e.preventDefault(),e.stopImmediatePropagation())},!0),this.addEventListener(`keydown`,e=>{(this.disabled||this.hasAttribute(`disabled`)||this.isLoading)&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopImmediatePropagation())},!0)}attributeChangedCallback(e,t,n){super.attributeChangedCallback(e,t,n),e===`disabled`&&n===`false`&&(this.disabled=!1),(e===`isloading`||e===`isLoading`)&&n===`false`&&(this.isLoading=!1)}willUpdate(e){super.willUpdate(e);let t=!1,n={...this.relocatedAria};for(let e of i.relocatedAriaAttributes){let r=this.getAttribute(e);r!==null&&(n[e]=r,this.removeAttribute(e),t=!0)}t&&(this.relocatedAria=n)}firstUpdated(e){super.firstUpdated(e),this.disabled===`false`&&(this.disabled=!1),this.isLoading===`false`&&(this.isLoading=!1)}render(){let i=this.form??this.getAttribute(`form`)??void 0,a={"pkt-btn":!0,[`pkt-btn--${this.size}`]:!!this.size,[`pkt-btn--${this.skin}`]:!!this.skin,[`pkt-btn--${this.variant}`]:!!this.variant,[`pkt-btn--${this.color}`]:!!this.color,[`pkt-btn--${this.state}`]:!!this.state,"pkt-btn--full":!!this.fullWidth,"pkt-btn--full-small":!!this.fullWidthOnMobile,"pkt-btn--isLoading":!!this.isLoading};return e._`
|
|
2
2
|
<button
|
|
3
3
|
class=${t.t(a)}
|
|
4
4
|
type=${this.type}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./element-
|
|
2
|
-
import { t as s } from "./class-map-
|
|
3
|
-
import "./icon-
|
|
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
|
+
import { t as s } from "./class-map-BDwVSgLb.js";
|
|
3
|
+
import "./icon-C1oCGwEe.js";
|
|
4
4
|
import { _ as c, a as l, b as u, d, f, g as p, l as m, m as h, o as g, p as _, t as v, v as y, y as b } from "./converters-CYgQrWVm.js";
|
|
5
5
|
//#region ../../shared-types/calendar.ts
|
|
6
6
|
var x = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs");require("./icon-5A378_yh.cjs");const n=require("./converters-CW6SN0TT.cjs");var r={multiple:!1,maxMultiple:0,range:!1,earliest:null,latest:null,weeknumbers:!1,withcontrols:!1};function i(e,t,r){let i=n.y(e,r?.in);return isNaN(t)?n.b(r?.in||e,NaN):(t&&i.setDate(i.getDate()+t),i)}function a(e,t){let[r,i]=n.v(e,t.start,t.end);return{start:r,end:i}}function o(e,t){let{start:r,end:i}=a(t?.in,e),o=+r>+i,s=o?+r:+i,c=o?i:r;c.setHours(0,0,0,0);let l=t?.step??1;if(!l)return[];l<0&&(l=-l,o=!o);let u=[];for(;+c<=s;)u.push(n.b(r,c)),c.setDate(c.getDate()+l),c.setHours(0,0,0,0);return o?u.reverse():u}function s(e,t){let r=n.y(e,t?.in).getDay();return r===0?7:r}function c(e,t){let r=(t.excludedates??[]).map(e=>typeof e==`string`?e:n.a(e));return!n.l(e,t.earliest,t.latest,r,t.excludeweekdays??[])}function l(e,t,n,r){return!!(c(e,n)||!t&&r.multiple&&r.maxMultiple>0&&r.selectedCount>=r.maxMultiple)}function u(e,t,r){let i=n.p(e,t,0);return!(r&&n.d(r)>i)}function d(e,t,r){let i=n.p(t===11?e+1:e,t===11?0:t+1,1);return!(r&&n.d(r)<i)}function f(e,t){let r=n.p(e,t,1),i=n.p(e,t+1,0),a=(r.getDay()+6)%7,o=i.getDate();return{firstDayOfMonth:r,lastDayOfMonth:i,startingDay:a,numDays:o,numRows:Math.ceil((o+a)/7),initialWeek:n._(r)}}function p(e,t,n,r){let{startingDay:i,numDays:a}=r;return e===0&&t<i?`prev-month`:n>a?`next-month`:`current-month`}function m(e){return typeof e==`string`&&(e=e.split(`,`)),e.length===1&&e[0]===``?[]:e.map(e=>n.m(e))}function h(e,t){let r=o({start:e,end:t}),i={};if(Array.isArray(r)&&r.length)for(let a=0;a<r.length;a++){let o=r[a],s=o>e&&o<t;i[n.a(o)]=s}return i}function g(e,t,n,r){if(t.length!==1)return!0;let i=o({start:t[0],end:e});if(!Array.isArray(i)||!i.length)return!0;for(let a=0;a<i.length;a++){for(let r of n??[])if(r>t[0]&&r<e)return!1;if((r??[]).includes(s(i[a]).toString()))return!1}return!0}function _(e,t){let r=n.a(e);return t.includes(r)?t:[...t,r]}function v(e,t){let r=n.a(e),i=t.indexOf(r);if(i===-1)return t;if(t.length===1)return[];let a=[...t];return a.splice(i,1),a}function y(e,t,r){let i=n.a(e);return t.includes(i)?v(e,t):r>0&&t.length>=r?t:_(e,t)}function b(e,t,r){let i=n.a(e),a=m(t);return t.includes(i)?t.indexOf(i)===0?[]:v(e,t):t.length>1||t.length===1&&(!g(e,a,r.excludedates,r.excludeweekdays)||a[0]>e)?[i]:_(e,t)}var x={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};function S(e){let t=e.nodeName;return t===`INPUT`||t===`SELECT`||t===`BUTTON`&&!e.dataset?.date}function C(e,t,r){let a=i(e,t);if(!a)return null;let o=r(`button[data-date="${n.a(a)}"]`);for(;o instanceof HTMLButtonElement&&o.dataset.disabled;)if(a=i(a,t),o=r(`button[data-date="${n.a(a)}"]`),!o)return null;return a}function w(e){return x[e]??null}var T=class extends e.t{constructor(...e){super(...e),this.selected=[],this.multiple=r.multiple,this.maxMultiple=r.maxMultiple,this.range=r.range,this.earliest=r.earliest,this.latest=r.latest,this.excludedates=[],this.excludeweekdays=[],this.weeknumbers=r.weeknumbers,this.withcontrols=r.withcontrols,this.currentmonth=null,this.today=null,this._selected=[],this.inRange={},this.rangeHovered=null,this.year=0,this.month=0,this.currentmonthtouched=!1,this.focusedDate=null,this.selectableDates=[],this.tabIndexSet=0}get calendarStrings(){let e=this.pktStrings.get(`dates`),t=this.pktStrings.get(`calendar`);return{daysShort:this.dayStrings??e.daysShort,days:this.dayStringsLong??e.days,months:this.monthStrings??e.months,week:this.weekString??e.week,prevMonth:this.prevMonthString??t.prevMonth,nextMonth:this.nextMonthString??t.nextMonth}}get todayDate(){return this.today?n.m(this.today):n.g()}firstUpdated(e){this.addEventListener(`keydown`,this.handleKeydown)}disconnectedCallback(){this.removeEventListener(`keydown`,this.handleKeydown),super.disconnectedCallback()}willUpdate(e){super.willUpdate(e),e.has(`selected`)&&this.convertSelected()}convertSelected(){typeof this.selected==`string`&&(this.selected=this.selected.split(`,`)),this.selected.length===1&&this.selected[0]===``&&(this.selected=[]),this._selected=m(this.selected),this.range&&this.selected.length===2&&(this.inRange=h(this._selected[0],this._selected[1])),this.setCurrentMonth()}setCurrentMonth(){if(this.currentmonth===null&&!this.currentmonthtouched&&(this.currentmonthtouched=!0),this.selected.length&&this.selected[0]!==``){let e=n.m(this.selected[this.selected.length-1]);this.currentmonth=isNaN(e.getTime())?n.f(this.todayDate):e}else this.currentmonth===null&&(this.currentmonth=n.f(this.todayDate));(!this.currentmonth||isNaN(this.currentmonth.getTime()))&&(this.currentmonth=n.f(this.todayDate)),this.year=this.currentmonth.getFullYear(),this.month=this.currentmonth.getMonth()}handleKeydown(e){let t=w(e.key);t!==null&&this.handleArrowKey(e,t)}handleArrowKey(e,t){let r=e.target;if(S(r))return;if(e.preventDefault(),!this.focusedDate){this.focusOnCurrentDate();return}let i=C(this.focusedDate?n.d(this.focusedDate):n.p(this.year,this.month,1),t,this.querySelector.bind(this));if(i){let e=this.querySelector(`button[data-date="${n.a(i)}"]`);e instanceof HTMLButtonElement&&!e.dataset.disabled&&(this.focusedDate=n.a(i),e.focus())}}render(){return e._`
|
|
2
2
|
<div
|
|
3
3
|
class="pkt-calendar ${this.weeknumbers?`pkt-cal-weeknumbers`:``}"
|
|
4
4
|
@focusout=${this.closeEvent}
|
|
@@ -1,36 +1,38 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, n as r, u as i } from "./element-
|
|
2
|
-
import { t as a } from "./class-map-
|
|
1
|
+
import { _ as e, d as t, h as n, n as r, u as i } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { t as a } from "./class-map-BDwVSgLb.js";
|
|
3
3
|
import { n as o } from "./format-BTeSVkED.js";
|
|
4
|
-
import { i as s, t as c } from "./element-with-slot-
|
|
4
|
+
import { i as s, t as c } from "./element-with-slot-mG-h7Sjw.js";
|
|
5
5
|
import "./shared-types-A6iGIX-f.js";
|
|
6
|
-
import "./icon-
|
|
7
|
-
import { t as l } from "./if-defined-
|
|
8
|
-
import "./tag-
|
|
6
|
+
import "./icon-C1oCGwEe.js";
|
|
7
|
+
import { t as l } from "./if-defined-DiYi2v_Q.js";
|
|
8
|
+
import "./tag-CkZ2Mn4a.js";
|
|
9
9
|
//#region ../../shared-types/card.ts
|
|
10
10
|
var u = [
|
|
11
|
-
"outlined",
|
|
12
|
-
"outlined-beige",
|
|
13
11
|
"gray",
|
|
12
|
+
"outlined",
|
|
13
|
+
"transparent",
|
|
14
|
+
"white",
|
|
14
15
|
"blue",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
], d =
|
|
16
|
+
"green",
|
|
17
|
+
"beige"
|
|
18
|
+
], d = [
|
|
19
|
+
"white",
|
|
20
|
+
"blue",
|
|
21
|
+
"green",
|
|
22
|
+
"beige"
|
|
23
|
+
], f = {
|
|
18
24
|
headingLevel: 3,
|
|
19
25
|
layout: "vertical",
|
|
20
|
-
skin: "
|
|
21
|
-
padding: "default",
|
|
26
|
+
skin: "gray",
|
|
22
27
|
tagPosition: "top",
|
|
23
28
|
openLinkInNewTab: !1,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
imageShape: "square",
|
|
27
|
-
restrictImageHeight: !1
|
|
28
|
-
}, f = class extends c {
|
|
29
|
+
zoom: !1
|
|
30
|
+
}, p = class extends c {
|
|
29
31
|
constructor(...e) {
|
|
30
|
-
super(...e), this.ariaLabel = "", this.metaLead = null, this.
|
|
32
|
+
super(...e), this.ariaLabel = "", this.metaLead = null, this.zoom = f.zoom, this.imageAspect = null, this.clickCardLink = null, this.metaTrail = null, this.layout = f.layout, this.heading = "", this.headingLevel = f.headingLevel, this.image = {
|
|
31
33
|
src: "",
|
|
32
34
|
alt: ""
|
|
33
|
-
}, this.
|
|
35
|
+
}, this.openLinkInNewTab = f.openLinkInNewTab, this.skin = f.skin, this.subheading = "", this.tagPosition = "top", this.tags = [];
|
|
34
36
|
}
|
|
35
37
|
connectedCallback() {
|
|
36
38
|
super.connectedCallback();
|
|
@@ -40,22 +42,24 @@ var u = [
|
|
|
40
42
|
"pkt-card": !0,
|
|
41
43
|
[`pkt-card--${this.skin}`]: this.skin,
|
|
42
44
|
[`pkt-card--${this.layout}`]: this.layout,
|
|
43
|
-
|
|
44
|
-
"pkt-card--border-on-hover": this.borderOnHover,
|
|
45
|
+
"pkt-card--clickable": !!this.clickCardLink,
|
|
45
46
|
"pkt-card--zoom": this.zoom
|
|
46
47
|
}, r = this.ariaLabel?.trim() || (this.heading ? `${this.heading} lenkekort` : "lenkekort"), i = this.ariaLabel?.trim() || (this.heading ? this.heading : "kort");
|
|
47
48
|
return e`
|
|
48
49
|
<article
|
|
49
50
|
class=${a(t)}
|
|
50
51
|
aria-label=${l(this.clickCardLink ? r : i)}
|
|
52
|
+
data-mode=${l(d.includes(this.skin) ? "light" : void 0)}
|
|
51
53
|
>
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
<div class="pkt-card__container">
|
|
55
|
+
${this.renderImage()}
|
|
56
|
+
<div class="pkt-card__wrapper">
|
|
57
|
+
${this.tagPosition === "top" ? this.renderTags() : n}
|
|
58
|
+
${this.renderHeader()}
|
|
59
|
+
${this.renderSlot()}
|
|
60
|
+
${this.tagPosition === "bottom" ? this.renderTags() : n}
|
|
61
|
+
${this.renderMetadata()}
|
|
62
|
+
</div>
|
|
59
63
|
</div>
|
|
60
64
|
</article>
|
|
61
65
|
`;
|
|
@@ -63,9 +67,7 @@ var u = [
|
|
|
63
67
|
renderImage() {
|
|
64
68
|
let t = {
|
|
65
69
|
"pkt-card__image": !0,
|
|
66
|
-
[`pkt-card__image-${this.
|
|
67
|
-
[`pkt-card__image-aspect-${this.imageAspect}`]: !!this.imageAspect,
|
|
68
|
-
"pkt-card__image-restricted": this.restrictImageHeight
|
|
70
|
+
[`pkt-card__image-aspect-${this.imageAspect}`]: !!this.imageAspect
|
|
69
71
|
};
|
|
70
72
|
return e`
|
|
71
73
|
${this.image.src && e`
|
|
@@ -76,7 +78,7 @@ var u = [
|
|
|
76
78
|
`;
|
|
77
79
|
}
|
|
78
80
|
renderHeadingTag(t, n) {
|
|
79
|
-
let r = this.headingLevel && this.headingLevel >= 1 && this.headingLevel <= 6 ? this.headingLevel : 3, i = `pkt-heading pkt-heading--medium pkt-heading--fw-
|
|
81
|
+
let r = this.headingLevel && this.headingLevel >= 1 && this.headingLevel <= 6 ? this.headingLevel : 3, i = `pkt-heading pkt-heading--medium pkt-heading--fw-medium ${t}`;
|
|
80
82
|
switch (r) {
|
|
81
83
|
case 1: return e`<h1 class=${i}>${n}</h1>`;
|
|
82
84
|
case 2: return e`<h2 class=${i}>${n}</h2>`;
|
|
@@ -96,7 +98,7 @@ var u = [
|
|
|
96
98
|
target=${this.openLinkInNewTab ? "_blank" : "_self"}
|
|
97
99
|
rel=${l(this.openLinkInNewTab ? "noopener noreferrer" : void 0)}
|
|
98
100
|
>${this.heading}</a
|
|
99
|
-
>`) : n;
|
|
101
|
+
><pkt-icon class="pkt-card__link-icon" name="arrow-link"></pkt-icon>`) : n;
|
|
100
102
|
}
|
|
101
103
|
renderSubheading() {
|
|
102
104
|
return e`
|
|
@@ -156,29 +158,29 @@ var u = [
|
|
|
156
158
|
`;
|
|
157
159
|
}
|
|
158
160
|
};
|
|
159
|
-
r([i({ type: String })],
|
|
161
|
+
r([i({ type: String })], p.prototype, "ariaLabel", void 0), r([i({ type: String })], p.prototype, "metaLead", void 0), r([i({ type: Boolean })], p.prototype, "zoom", void 0), r([i({ type: String })], p.prototype, "imageAspect", void 0), r([i({
|
|
160
162
|
type: String,
|
|
161
163
|
reflect: !0
|
|
162
|
-
})],
|
|
164
|
+
})], p.prototype, "clickCardLink", void 0), r([i({ type: String })], p.prototype, "metaTrail", void 0), r([i({ type: String })], p.prototype, "layout", void 0), r([i({ type: String })], p.prototype, "heading", void 0), r([i({
|
|
163
165
|
type: Number,
|
|
164
166
|
attribute: "headinglevel"
|
|
165
|
-
})],
|
|
167
|
+
})], p.prototype, "headingLevel", void 0), r([i({ type: Object })], p.prototype, "image", void 0), r([i({ type: Boolean })], p.prototype, "openLinkInNewTab", void 0), r([i({
|
|
166
168
|
type: String,
|
|
167
169
|
converter: {
|
|
168
170
|
fromAttribute: (e) => {
|
|
169
171
|
let t = u;
|
|
170
|
-
return e && t.includes(e) ? e : (e && !t.includes(e) && console.warn(`Invalid skin value "${e}". Using default skin "${
|
|
172
|
+
return e && t.includes(e) ? e : (e && !t.includes(e) && console.warn(`Invalid skin value "${e}". Using default skin "${f.skin}".`), f.skin);
|
|
171
173
|
},
|
|
172
174
|
toAttribute: (e) => e
|
|
173
175
|
}
|
|
174
|
-
})],
|
|
176
|
+
})], p.prototype, "skin", void 0), r([i({ type: String })], p.prototype, "subheading", void 0), r([i({ type: String })], p.prototype, "tagPosition", void 0), r([i({ type: Array })], p.prototype, "tags", void 0);
|
|
175
177
|
try {
|
|
176
|
-
t("pkt-card")(
|
|
178
|
+
t("pkt-card")(p);
|
|
177
179
|
} catch {
|
|
178
180
|
console.warn("Forsøker å definere <pkt-card>, men den er allerede definert");
|
|
179
181
|
}
|
|
180
182
|
//#endregion
|
|
181
183
|
//#region src/components/card/index.ts
|
|
182
|
-
var
|
|
184
|
+
var m = p;
|
|
183
185
|
//#endregion
|
|
184
|
-
export {
|
|
186
|
+
export { p as n, m as t };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./class-map-C82GtM1w.cjs"),n=require("./format-B8meU8Tm.cjs"),r=require("./element-with-slot-CeKuRE3_.cjs");require("./shared-types-BvRk9kiK.cjs"),require("./icon-5A378_yh.cjs");const i=require("./if-defined-Ci4ZQsgL.cjs");require("./tag-1SSexs0H.cjs");var a=[`gray`,`outlined`,`transparent`,`white`,`blue`,`green`,`beige`],o=[`white`,`blue`,`green`,`beige`],s={headingLevel:3,layout:`vertical`,skin:`gray`,tagPosition:`top`,openLinkInNewTab:!1,zoom:!1},c=class extends r.t{constructor(...e){super(...e),this.ariaLabel=``,this.metaLead=null,this.zoom=s.zoom,this.imageAspect=null,this.clickCardLink=null,this.metaTrail=null,this.layout=s.layout,this.heading=``,this.headingLevel=s.headingLevel,this.image={src:``,alt:``},this.openLinkInNewTab=s.openLinkInNewTab,this.skin=s.skin,this.subheading=``,this.tagPosition=`top`,this.tags=[]}connectedCallback(){super.connectedCallback()}render(){let n={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.layout}`]:this.layout,"pkt-card--clickable":!!this.clickCardLink,"pkt-card--zoom":this.zoom},r=this.ariaLabel?.trim()||(this.heading?`${this.heading} lenkekort`:`lenkekort`),a=this.ariaLabel?.trim()||(this.heading?this.heading:`kort`);return e._`
|
|
2
|
+
<article
|
|
3
|
+
class=${t.t(n)}
|
|
4
|
+
aria-label=${i.t(this.clickCardLink?r:a)}
|
|
5
|
+
data-mode=${i.t(o.includes(this.skin)?`light`:void 0)}
|
|
6
|
+
>
|
|
7
|
+
<div class="pkt-card__container">
|
|
8
|
+
${this.renderImage()}
|
|
9
|
+
<div class="pkt-card__wrapper">
|
|
10
|
+
${this.tagPosition===`top`?this.renderTags():e.h}
|
|
11
|
+
${this.renderHeader()}
|
|
12
|
+
${this.renderSlot()}
|
|
13
|
+
${this.tagPosition===`bottom`?this.renderTags():e.h}
|
|
14
|
+
${this.renderMetadata()}
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</article>
|
|
18
|
+
`}renderImage(){let n={"pkt-card__image":!0,[`pkt-card__image-aspect-${this.imageAspect}`]:!!this.imageAspect};return e._`
|
|
19
|
+
${this.image.src&&e._`
|
|
20
|
+
<div class=${t.t(n)}>
|
|
21
|
+
<img src=${this.image.src} alt=${this.image.alt||``} />
|
|
22
|
+
</div>
|
|
23
|
+
`}
|
|
24
|
+
`}renderHeadingTag(t,n){let r=this.headingLevel&&this.headingLevel>=1&&this.headingLevel<=6?this.headingLevel:3,i=`pkt-heading pkt-heading--medium pkt-heading--fw-medium ${t}`;switch(r){case 1:return e._`<h1 class=${i}>${n}</h1>`;case 2:return e._`<h2 class=${i}>${n}</h2>`;case 4:return e._`<h4 class=${i}>${n}</h4>`;case 5:return e._`<h5 class=${i}>${n}</h5>`;case 6:return e._`<h6 class=${i}>${n}</h6>`;default:return e._`<h3 class=${i}>${n}</h3>`}}renderHeading(){return!this.heading||this.clickCardLink?e.h:this.renderHeadingTag(`pkt-card__heading`,this.heading)}renderLinkHeading(){return this.clickCardLink?this.renderHeadingTag(`pkt-card__link-heading pkt-card__heading`,e._`<a
|
|
25
|
+
class="pkt-card__link"
|
|
26
|
+
href=${this.clickCardLink}
|
|
27
|
+
target=${this.openLinkInNewTab?`_blank`:`_self`}
|
|
28
|
+
rel=${i.t(this.openLinkInNewTab?`noopener noreferrer`:void 0)}
|
|
29
|
+
>${this.heading}</a
|
|
30
|
+
><pkt-icon class="pkt-card__link-icon" name="arrow-link"></pkt-icon>`):e.h}renderSubheading(){return e._`
|
|
31
|
+
${this.subheading?e._` <p class="pkt-card__subheading ">${this.subheading}</p> `:e.h}
|
|
32
|
+
`}renderHeader(){let t=!!this.heading||!!this.subheading;return e._`
|
|
33
|
+
${t?e._`
|
|
34
|
+
<header class="pkt-card__header">
|
|
35
|
+
${this.renderHeading()}
|
|
36
|
+
${this.renderLinkHeading()}
|
|
37
|
+
${this.renderSubheading()}
|
|
38
|
+
</header>
|
|
39
|
+
`:e.h}
|
|
40
|
+
`}renderTags(){let r={"pkt-card__tags":!0,[`pkt-card__tags-${this.tagPosition}`]:this.tagPosition};return e._`
|
|
41
|
+
${this.tags.length>0?e._`
|
|
42
|
+
<div
|
|
43
|
+
class=${t.t(r)}
|
|
44
|
+
role="list"
|
|
45
|
+
aria-label=${n.n(this.tags.length,this.pktStrings.get(`card`).tagsLabelOne,this.pktStrings.get(`card`).tagsLabelOther)}
|
|
46
|
+
>
|
|
47
|
+
${this.tags.map(t=>e._`
|
|
48
|
+
<pkt-tag
|
|
49
|
+
role="listitem"
|
|
50
|
+
textStyle="normal-text"
|
|
51
|
+
size="medium"
|
|
52
|
+
skin=${i.t(t.skin)}
|
|
53
|
+
iconName=${i.t(t.iconName)}
|
|
54
|
+
>
|
|
55
|
+
<span>${t.text}</span>
|
|
56
|
+
</pkt-tag>
|
|
57
|
+
`)}
|
|
58
|
+
</div>
|
|
59
|
+
`:e.h}
|
|
60
|
+
`}renderSlot(){return e._`<section class="pkt-card__content">${r.i(this)}</section>`}renderMetadata(){return e._`
|
|
61
|
+
${this.metaLead||this.metaTrail?e._`
|
|
62
|
+
<footer class="pkt-card__metadata">
|
|
63
|
+
${this.metaLead?e._`<span class="pkt-card__metadata-lead">${this.metaLead}</span>`:e.h}
|
|
64
|
+
${this.metaTrail?e._`<span class="pkt-card__metadata-trail">${this.metaTrail}</span>`:e.h}
|
|
65
|
+
</footer>
|
|
66
|
+
`:e.h}
|
|
67
|
+
`}};e.n([e.u({type:String})],c.prototype,`ariaLabel`,void 0),e.n([e.u({type:String})],c.prototype,`metaLead`,void 0),e.n([e.u({type:Boolean})],c.prototype,`zoom`,void 0),e.n([e.u({type:String})],c.prototype,`imageAspect`,void 0),e.n([e.u({type:String,reflect:!0})],c.prototype,`clickCardLink`,void 0),e.n([e.u({type:String})],c.prototype,`metaTrail`,void 0),e.n([e.u({type:String})],c.prototype,`layout`,void 0),e.n([e.u({type:String})],c.prototype,`heading`,void 0),e.n([e.u({type:Number,attribute:`headinglevel`})],c.prototype,`headingLevel`,void 0),e.n([e.u({type:Object})],c.prototype,`image`,void 0),e.n([e.u({type:Boolean})],c.prototype,`openLinkInNewTab`,void 0),e.n([e.u({type:String,converter:{fromAttribute:e=>{let t=a;return e&&t.includes(e)?e:(e&&!t.includes(e)&&console.warn(`Invalid skin value "${e}". Using default skin "${s.skin}".`),s.skin)},toAttribute:e=>e}})],c.prototype,`skin`,void 0),e.n([e.u({type:String})],c.prototype,`subheading`,void 0),e.n([e.u({type:String})],c.prototype,`tagPosition`,void 0),e.n([e.u({type:Array})],c.prototype,`tags`,void 0);try{e.d(`pkt-card`)(c)}catch{console.warn(`Forsøker å definere <pkt-card>, men den er allerede definert`)}var l=c;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return l}});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-
|
|
2
|
-
import { t as o } from "./class-map-
|
|
1
|
+
import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { t as o } from "./class-map-BDwVSgLb.js";
|
|
3
3
|
import "./shared-types-A6iGIX-f.js";
|
|
4
4
|
import { n as s, t as c } from "./consume-Bp12si68.js";
|
|
5
|
-
import { n as l, t as u } from "./ref-
|
|
6
|
-
import { t as d } from "./input-element-
|
|
5
|
+
import { n as l, t as u } from "./ref-BAegS9BR.js";
|
|
6
|
+
import { t as d } from "./input-element-De40zUox.js";
|
|
7
7
|
//#region ../../shared-types/checkbox.ts
|
|
8
8
|
var f = {
|
|
9
9
|
defaultChecked: !1,
|
|
@@ -51,7 +51,7 @@ var f = {
|
|
|
51
51
|
"pkt-sr-only": this.hideLabel
|
|
52
52
|
}), s = "pkt-tag pkt-tag--small pkt-tag--thin-text", c = this.pktStrings.get("forms"), u = () => e`
|
|
53
53
|
${this.tagText ? e`<span class=${s + " pkt-tag--gray"}>${this.tagText}</span>` : n}
|
|
54
|
-
${this.optionalTag ? e`<span class=${s + " pkt-tag--blue-
|
|
54
|
+
${this.optionalTag ? e`<span class=${s + " pkt-tag--blue-pale"}
|
|
55
55
|
>${this.optionalText ?? c.optional}</span
|
|
56
56
|
>` : n}
|
|
57
57
|
${this.requiredTag ? e`<span class=${s + " pkt-tag--beige"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { d as e, l as t, n, u as r } from "./element-
|
|
2
|
-
import { r as i } from "./checkbox-
|
|
3
|
-
import { i as a, n as o, r as s, t as c } from "./option-group-element-
|
|
1
|
+
import { d as e, l as t, n, u as r } from "./element-DLgZkx5L.js";
|
|
2
|
+
import { r as i } from "./checkbox-DIJbuqWm.js";
|
|
3
|
+
import { i as a, n as o, r as s, t as c } from "./option-group-element-DzM8YznZ.js";
|
|
4
4
|
import { t as l } from "./provide-_MnlMGnw.js";
|
|
5
5
|
//#region src/components/checkbox-group/checkbox-group.ts
|
|
6
6
|
var u = class extends c {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs"),t=require("./checkbox-iMOdzpJ_.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-checkbox`,this.groupContext={name:``,hasTile:!1,hasError:!1},this.storedValue=null,this.validityApplied=!1}get value(){return this.options().filter(e=>n.n(e)&&!n.r(e)).map(n.i)}set value(e){let t=this.value;this.storedValue=Array.isArray(e)?e:e?e.split(`,`):[],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?.includes(n.i(e));n.n(e)!==t&&(e.checked=t)})}syncValidity(){if(!this.required&&!this.validityApplied)return;this.validityApplied=this.required;let e=this.options(),t=this.required&&!e.some(e=>n.n(e)&&!n.r(e))?this.pktStrings.get(`validation`).checkboxGroupValueMissing:``;e.forEach(e=>e.setGroupValidity?.(t))}};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-checkbox-group`)(i)}catch{console.warn(`Forsøker å definere <pkt-checkbox-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
|
-
const e=require("./element-
|
|
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,indeterminate:!1,hasTile:!1,disabled:!1,hasError:!1,isSwitch:!1,hideLabel:!1,labelPosition:`right`,requiredTag:!1,optionalTag:!1},o=n.n(Symbol(`pkt-checkbox-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.isSwitch=a.isSwitch,this.labelPosition=a.labelPosition,this.hideLabel=a.hideLabel,this.checked=null,this.indeterminate=a.indeterminate,this.type=`checkbox`,this.inputSize=void 0,this.tagText=null,this.optionalTag=a.optionalTag,this.requiredTag=a.requiredTag}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){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,t,n)}firstUpdated(e){this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate===``||this.indeterminate===`true`||this.indeterminate===!0),super.firstUpdated(e)}willUpdate(e){super.willUpdate(e),e.has(`defaultChecked`)&&!this.checked&&(this.checked=this.defaultChecked)}updated(e){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(){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-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=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`}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./element-
|
|
1
|
+
const e=require("./element-CEarCnHH.cjs");var t=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.ATTRIBUTE||t.name!==`class`||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return` `+Object.keys(e).filter(t=>e[t]).join(` `)+` `}update(t,[n]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(` `).split(/\s/).filter(e=>e!==``)));for(let e in n)n[e]&&!this.nt?.has(e)&&this.st.add(e);return this.render(n)}let r=t.element.classList;for(let e of this.st)e in n||(r.remove(e),this.st.delete(e));for(let e in n){let t=!!n[e];t===this.st.has(e)||this.nt?.has(e)||(t?(r.add(e),this.st.add(e)):(r.remove(e),this.st.delete(e)))}return e.g}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|