@oslokommune/punkt-elements 19.0.5 → 19.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/alert-DsGNGcgd.cjs +40 -0
  3. package/dist/{alert-DaXpwnzT.js → alert-vIaasUjb.js} +23 -22
  4. package/dist/{calendar-BuSfyUR9.cjs → calendar-CtfdBqJN.cjs} +1 -1
  5. package/dist/{calendar-KUQ1dFeX.js → calendar-DWSW_GeN.js} +22 -22
  6. package/dist/{checkbox-CTf4GatI.js → checkbox-B-ejHbFP.js} +21 -10
  7. package/dist/checkbox-B2G_B_bg.cjs +40 -0
  8. package/dist/{combobox-Bg98cVwV.js → combobox-DHL_CGYv.js} +4 -3
  9. package/dist/combobox-nqNZDvBR.cjs +139 -0
  10. package/dist/components/alert/alert.d.ts +1 -1
  11. package/dist/components/checkbox/checkbox.d.ts +3 -2
  12. package/dist/{datepicker-Ct4dbs4e.js → datepicker-BWp2PM9S.js} +2 -2
  13. package/dist/{datepicker-BtEZMsWH.cjs → datepicker-DvO3w0eM.cjs} +1 -1
  14. package/dist/{fileupload-BVAgrofy.cjs → fileupload-DDLvQaSS.cjs} +1 -1
  15. package/dist/{fileupload-Dqf_94m2.js → fileupload-DbtTD1aU.js} +2 -2
  16. package/dist/{footer-XrX6LFHY.cjs → footer-CupUAe8d.cjs} +1 -1
  17. package/dist/{header-fkKhLsyE.js → header-BxgtAiNM.js} +36 -36
  18. package/dist/{header-menu-DYZsigfH.cjs → header-menu-DGywRJCx.cjs} +1 -1
  19. package/dist/{header-DMMt5FtF.cjs → header-wdEiBTI9.cjs} +14 -14
  20. package/dist/{input-wrapper-CvFMiqIt.js → input-wrapper-B5GdwzAM.js} +8 -7
  21. package/dist/input-wrapper-BmPdpY4N.cjs +59 -0
  22. package/dist/{messagebox-CdNMgTz4.cjs → messagebox-D2xvSYWI.cjs} +1 -1
  23. package/dist/{messagebox-D0qxveug.js → messagebox-E8W7RyAJ.js} +1 -1
  24. package/dist/pkt-alert.cjs +1 -1
  25. package/dist/pkt-alert.js +1 -1
  26. package/dist/pkt-calendar.cjs +1 -1
  27. package/dist/pkt-calendar.js +1 -1
  28. package/dist/pkt-checkbox.cjs +1 -1
  29. package/dist/pkt-checkbox.js +1 -1
  30. package/dist/pkt-combobox.cjs +1 -1
  31. package/dist/pkt-combobox.js +1 -1
  32. package/dist/pkt-datepicker.cjs +1 -1
  33. package/dist/pkt-datepicker.js +1 -1
  34. package/dist/pkt-fileupload.cjs +1 -1
  35. package/dist/pkt-fileupload.js +1 -1
  36. package/dist/pkt-footer.cjs +1 -1
  37. package/dist/pkt-footer.js +1 -1
  38. package/dist/pkt-header-menu.cjs +1 -1
  39. package/dist/pkt-header-menu.js +1 -1
  40. package/dist/pkt-header.cjs +1 -1
  41. package/dist/pkt-header.js +1 -1
  42. package/dist/pkt-index.cjs +1 -1
  43. package/dist/pkt-index.js +24 -24
  44. package/dist/pkt-input-wrapper.cjs +1 -1
  45. package/dist/pkt-input-wrapper.js +1 -1
  46. package/dist/pkt-messagebox.cjs +1 -1
  47. package/dist/pkt-messagebox.js +1 -1
  48. package/dist/pkt-select.cjs +1 -1
  49. package/dist/pkt-select.js +1 -1
  50. package/dist/pkt-textarea.cjs +1 -1
  51. package/dist/pkt-textarea.js +1 -1
  52. package/dist/pkt-textinput.cjs +1 -1
  53. package/dist/pkt-textinput.js +1 -1
  54. package/dist/pkt-timepicker.cjs +1 -1
  55. package/dist/pkt-timepicker.js +1 -1
  56. package/dist/{select-B4gbFOil.js → select-BhK8veJn.js} +1 -1
  57. package/dist/{select-oIF7UVvV.cjs → select-CDoA2rpC.cjs} +1 -1
  58. package/dist/shared-types/alert.d.ts +6 -0
  59. package/dist/shared-types/checkbox.d.ts +52 -0
  60. package/dist/shared-types/footer.d.ts +14 -2
  61. package/dist/shared-types/index.d.ts +3 -1
  62. package/dist/{textarea-DNFX958g.cjs → textarea-BLVuKEng.cjs} +1 -1
  63. package/dist/{textarea-DGSMKcqK.js → textarea-sulH-Yk7.js} +1 -1
  64. package/dist/{textinput-Bzkdo2mN.cjs → textinput-CSrBua2N.cjs} +1 -1
  65. package/dist/{textinput-DpLeElI_.js → textinput-Di2lAf2R.js} +1 -1
  66. package/dist/{timepicker-CCNQeX5Q.js → timepicker-BaDGjuOR.js} +1 -1
  67. package/dist/{timepicker-DCzhlRuc.cjs → timepicker-Iq1-vWRn.cjs} +1 -1
  68. package/package.json +2 -2
  69. package/src/components/alert/alert.ts +2 -2
  70. package/src/components/checkbox/checkbox.ts +13 -8
  71. package/dist/alert-Cfr6t5uz.cjs +0 -40
  72. package/dist/checkbox-DlzVGBum.cjs +0 -40
  73. package/dist/combobox-DzK6P9l1.cjs +0 -139
  74. package/dist/input-wrapper-BIrQijWT.cjs +0 -59
  75. package/dist/{footer-Bf6RFuia.js → footer-UT8MbnCT.js} +1 -1
  76. package/dist/{header-menu-CUHrJCvx.js → header-menu-CTEPH4St.js} +2 -2
package/CHANGELOG.md CHANGED
@@ -5,6 +5,16 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
5
5
 
6
6
  ---
7
7
 
8
+ ## [19.3.0](https://github.com/oslokommune/punkt/compare/19.2.0...19.3.0) (2026-09-29)
9
+
10
+ ---
11
+
12
+
13
+ ## [19.2.0](https://github.com/oslokommune/punkt/compare/19.1.0...19.2.0) (2026-09-28)
14
+
15
+ ---
16
+
17
+
8
18
  ## [19.0.5](https://github.com/oslokommune/punkt/compare/19.0.4...19.0.5) (2026-09-22)
9
19
 
10
20
  ### ⚠ BREAKING CHANGES
@@ -0,0 +1,40 @@
1
+ const e=require("./element-CewjrA4g.cjs"),t=require("./class-map-B0FX3YsK.cjs"),n=require("./if-defined-CjRKmMQs.cjs"),r=require("./format-B8meU8Tm.cjs"),i=require("./element-with-slot-MCvSBwUv.cjs"),a=require("./classutils-CbklAJDe.cjs"),o=require("./define-component-spec-DBNd2FJY.cjs");require("./icon-Clz68-Kz.cjs"),require("./button-CCR4eyt_.cjs");var s=[`off`,`polite`,`assertive`],c=[`info`,`success`,`warning`,`error`],l=[`medium`,`small`,`xsmall`],u={compact:!1},d=o.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`}},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:[...c],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:[...s],default:`polite`,category:`accessibility`},size:{name:`Størrelse`,description:`Endrer størrelsen på ulike elementer i alerten.`,type:[...l],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:u.compact}},slots:{default:{description:`Innholdet i meldingen`}}}),f=class extends i.t{constructor(){super(),this.compact=u.compact,this.title=``,this.skin=d.props.skin.default,this.ariaLive=d.props.ariaLive.default,this.ariaLiveAttr=null,this.closeAlert=d.props.closeAlert.default,this.date=null,this.role=`status`,this._hostId=null,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent(`close`,{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`on-close`,{detail:{origin:e},bubbles:!0,composed:!0}))},this._isClosed=!1}connectedCallback(){super.connectedCallback(),this.ariaLiveAttr=this.getAttribute(`aria-live`)||this.ariaLive}willUpdate(e){super.willUpdate(e);let t=this.getAttribute(`id`);t&&(this._hostId=t,this.removeAttribute(`id`))}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`)&&a.t(this,`pkt-hide`,this._isClosed)}render(){let a=this.size??(this.compact?`small`:`medium`),o={"pkt-alert":!0,[`pkt-alert--${a}`]:!0,[`pkt-alert--${this.skin}`]:!0,"pkt-hide":this._isClosed},s={"pkt-alert__grid":!0,"pkt-alert__noTitle":!this.title,"pkt-alert__noDate":!this.date};return e._`
2
+ <div
3
+ class=${t.t(o)}
4
+ id=${n.t(this._hostId||void 0)}
5
+ aria-live=${this.ariaLiveAttr}
6
+ role=${this.role}
7
+ >
8
+ <div class=${t.t(s)}>
9
+ <pkt-icon
10
+ class="pkt-alert__icon"
11
+ aria-hidden="true"
12
+ name=${this.skin===`info`?`alert-information`:`alert-${this.skin}`}
13
+ ></pkt-icon>
14
+
15
+ ${this.closeAlert?e._`
16
+ <div class="pkt-alert__close">
17
+ <pkt-button
18
+ tabindex="0"
19
+ aria-label="close"
20
+ size=${a}
21
+ type="button"
22
+ skin="tertiary"
23
+ iconName="close"
24
+ variant="icon-only"
25
+ @click=${this.close}
26
+ >
27
+ <span class="sr-only">${this.pktStrings.get(`generic`).close}</span>
28
+ </pkt-button>
29
+ </div>
30
+ `:e.h}
31
+ ${this.title?e._`<div class="pkt-alert__title">${this.title}</div>`:e.h}
32
+
33
+ <div class="pkt-alert__text">${i.r(this)}</div>
34
+
35
+ ${this.date?e._`<div class="pkt-alert__date">
36
+ ${r.t(this.pktStrings.get(`alert`).lastUpdated,{date:this.date})}
37
+ </div>`:e.h}
38
+ </div>
39
+ </div>
40
+ `}};e.n([e.u({type:Boolean,reflect:!1})],f.prototype,`compact`,void 0),e.n([e.u({type:String,reflect:!0})],f.prototype,`title`,void 0),e.n([e.u({type:String,reflect:!0})],f.prototype,`skin`,void 0),e.n([e.u({type:String})],f.prototype,`ariaLive`,void 0),e.n([e.u({type:String,reflect:!0,attribute:`aria-live`})],f.prototype,`ariaLiveAttr`,void 0),e.n([e.u({type:Boolean,reflect:!0})],f.prototype,`closeAlert`,void 0),e.n([e.u({type:String,reflect:!0})],f.prototype,`date`,void 0),e.n([e.u({type:String})],f.prototype,`role`,void 0),e.n([e.l()],f.prototype,`_hostId`,void 0),e.n([e.u({type:String,attribute:`size`})],f.prototype,`size`,void 0),e.n([e.l()],f.prototype,`_isClosed`,void 0);try{e.d(`pkt-alert`)(f)}catch{console.warn(`Forsøker å definere <pkt-alert>, men den er allerede definert`)}var p=f;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
@@ -21,7 +21,7 @@ var p = [
21
21
  "medium",
22
22
  "small",
23
23
  "xsmall"
24
- ], g = f({
24
+ ], g = { compact: !1 }, _ = f({
25
25
  name: "pkt-alert",
26
26
  react: "PktAlert",
27
27
  "css-class": "pkt-alert",
@@ -35,7 +35,7 @@ var p = [
35
35
  },
36
36
  close: {
37
37
  elementsOnly: !0,
38
- description: "Vue: Klikk-event for 'Lukk'-knappen"
38
+ description: "Elements: Klikk-event for 'Lukk'-knappen"
39
39
  }
40
40
  },
41
41
  props: {
@@ -78,19 +78,20 @@ var p = [
78
78
  type: "boolean",
79
79
  default: !1,
80
80
  category: "ui"
81
+ },
82
+ compact: {
83
+ name: "Kompakt",
84
+ description: "Kompakt visning av alerten.",
85
+ deprecated: "Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",
86
+ type: "boolean",
87
+ category: "ui",
88
+ default: g.compact
81
89
  }
82
90
  },
83
- slots: { default: { description: "Innholdet i meldingen" } },
84
- deprecated: { compact: {
85
- name: "Kompakt (deprecated)",
86
- description: "Bruk `size` i stedet; uten eksplisitt `size` gir compact størrelsen 'small'.",
87
- type: "boolean",
88
- category: "ui",
89
- default: !1
90
- } }
91
- }), _ = class extends u {
91
+ slots: { default: { description: "Innholdet i meldingen" } }
92
+ }), v = class extends u {
92
93
  constructor() {
93
- super(), this.compact = g.deprecated.compact.default, this.title = "", this.skin = g.props.skin.default, this.ariaLive = g.props.ariaLive.default, this.ariaLiveAttr = null, this.closeAlert = g.props.closeAlert.default, this.date = null, this.role = "status", this._hostId = null, this._isClosed = !1, this.close = (e) => {
94
+ super(), this.compact = g.compact, this.title = "", this.skin = _.props.skin.default, this.ariaLive = _.props.ariaLive.default, this.ariaLiveAttr = null, this.closeAlert = _.props.closeAlert.default, this.date = null, this.role = "status", this._hostId = null, this._isClosed = !1, this.close = (e) => {
94
95
  this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", {
95
96
  detail: { origin: e },
96
97
  bubbles: !0,
@@ -172,33 +173,33 @@ var p = [
172
173
  i([a({
173
174
  type: Boolean,
174
175
  reflect: !1
175
- })], _.prototype, "compact", void 0), i([a({
176
+ })], v.prototype, "compact", void 0), i([a({
176
177
  type: String,
177
178
  reflect: !0
178
- })], _.prototype, "title", void 0), i([a({
179
+ })], v.prototype, "title", void 0), i([a({
179
180
  type: String,
180
181
  reflect: !0
181
- })], _.prototype, "skin", void 0), i([a({ type: String })], _.prototype, "ariaLive", void 0), i([a({
182
+ })], v.prototype, "skin", void 0), i([a({ type: String })], v.prototype, "ariaLive", void 0), i([a({
182
183
  type: String,
183
184
  reflect: !0,
184
185
  attribute: "aria-live"
185
- })], _.prototype, "ariaLiveAttr", void 0), i([a({
186
+ })], v.prototype, "ariaLiveAttr", void 0), i([a({
186
187
  type: Boolean,
187
188
  reflect: !0
188
- })], _.prototype, "closeAlert", void 0), i([a({
189
+ })], v.prototype, "closeAlert", void 0), i([a({
189
190
  type: String,
190
191
  reflect: !0
191
- })], _.prototype, "date", void 0), i([a({ type: String })], _.prototype, "role", void 0), i([r()], _.prototype, "_hostId", void 0), i([a({
192
+ })], v.prototype, "date", void 0), i([a({ type: String })], v.prototype, "role", void 0), i([r()], v.prototype, "_hostId", void 0), i([a({
192
193
  type: String,
193
194
  attribute: "size"
194
- })], _.prototype, "size", void 0), i([r()], _.prototype, "_isClosed", void 0);
195
+ })], v.prototype, "size", void 0), i([r()], v.prototype, "_isClosed", void 0);
195
196
  try {
196
- t("pkt-alert")(_);
197
+ t("pkt-alert")(v);
197
198
  } catch {
198
199
  console.warn("Forsøker å definere <pkt-alert>, men den er allerede definert");
199
200
  }
200
201
  //#endregion
201
202
  //#region src/components/alert/index.ts
202
- var v = _;
203
+ var y = v;
203
204
  //#endregion
204
- export { _ as n, v as t };
205
+ export { v as n, y as t };
@@ -1,4 +1,4 @@
1
- const e=require("./element-CewjrA4g.cjs"),t=require("./class-map-B0FX3YsK.cjs");require("./icon-Clz68-Kz.cjs");const n=require("./converters-BJ9Fe0kW.cjs");function r(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 i(e,t){let[r,i]=n.v(e,t.start,t.end);return{start:r,end:i}}function a(e,t){let{start:r,end:a}=i(t?.in,e),o=+r>+a,s=o?+r:+a,c=o?a: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 o(e,t){let r=n.y(e,t?.in).getDay();return r===0?7:r}var s={multiple:!1,maxMultiple:0,range:!1,earliest:null,latest:null,weeknumbers:!1,withcontrols:!1};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),numDaysPrevMonth:n.p(e,t,0).getDate(),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,t,n,r){let{startingDay:i,numDaysPrevMonth:a,numDays:o}=r;return e===`prev-month`?a-(i-t-1):e===`next-month`?n-o:n}function h(e){return typeof e==`string`&&(e=e.split(`,`)),e.length===1&&e[0]===``?[]:e.map(e=>n.m(e))}function g(e,t){let r=a({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 _(e,t,n,r){if(t.length!==1)return!0;let i=a({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(o(i[a]).toString()))return!1}return!0}function v(e,t){let r=n.a(e);return t.includes(r)?t:[...t,r]}function y(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 b(e,t,r){let i=n.a(e);return t.includes(i)?y(e,t):r>0&&t.length>=r?t:v(e,t)}function x(e,t,r){let i=n.a(e),a=h(t);return t.includes(i)?t.indexOf(i)===0?[]:y(e,t):t.length>1||t.length===1&&(!_(e,a,r.excludedates,r.excludeweekdays)||a[0]>e)?[i]:v(e,t)}var S={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};function C(e){let t=e.nodeName;return t===`INPUT`||t===`SELECT`||t===`BUTTON`&&!e.dataset?.date}function w(e,t,i){let a=r(e,t);if(!a)return null;let o=i(`button[data-date="${n.a(a)}"]`);for(;o instanceof HTMLButtonElement&&o.dataset.disabled;)if(a=r(a,t),o=i(`button[data-date="${n.a(a)}"]`),!o)return null;return a}function T(e){return S[e]??null}var E=class extends e.t{constructor(...e){super(...e),this.selected=[],this.multiple=s.multiple,this.maxMultiple=s.maxMultiple,this.range=s.range,this.earliest=s.earliest,this.latest=s.latest,this.excludedates=[],this.excludeweekdays=[],this.weeknumbers=s.weeknumbers,this.withcontrols=s.withcontrols,this.currentmonth=null,this.today=null,this._selected=[],this.inRange={},this.rangeHovered=null,this.year=0,this.month=0,this.week=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()}updated(e){super.updated(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=h(this.selected),this.range&&this.selected.length===2&&(this.inRange=g(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=T(e.key);t!==null&&this.handleArrowKey(e,t)}handleArrowKey(e,t){let r=e.target;if(C(r))return;if(e.preventDefault(),!this.focusedDate){this.focusOnCurrentDate();return}let i=w(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._`
1
+ const e=require("./element-CewjrA4g.cjs"),t=require("./class-map-B0FX3YsK.cjs");require("./icon-Clz68-Kz.cjs");const n=require("./converters-BJ9Fe0kW.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),numDaysPrevMonth:n.p(e,t,0).getDate(),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,t,n,r){let{startingDay:i,numDaysPrevMonth:a,numDays:o}=r;return e===`prev-month`?a-(i-t-1):e===`next-month`?n-o:n}function h(e){return typeof e==`string`&&(e=e.split(`,`)),e.length===1&&e[0]===``?[]:e.map(e=>n.m(e))}function g(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 _(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 v(e,t){let r=n.a(e);return t.includes(r)?t:[...t,r]}function y(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 b(e,t,r){let i=n.a(e);return t.includes(i)?y(e,t):r>0&&t.length>=r?t:v(e,t)}function x(e,t,r){let i=n.a(e),a=h(t);return t.includes(i)?t.indexOf(i)===0?[]:y(e,t):t.length>1||t.length===1&&(!_(e,a,r.excludedates,r.excludeweekdays)||a[0]>e)?[i]:v(e,t)}var S={ArrowLeft:-1,ArrowRight:1,ArrowUp:-7,ArrowDown:7};function C(e){let t=e.nodeName;return t===`INPUT`||t===`SELECT`||t===`BUTTON`&&!e.dataset?.date}function w(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 T(e){return S[e]??null}var E=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.week=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()}updated(e){super.updated(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=h(this.selected),this.range&&this.selected.length===2&&(this.inRange=g(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=T(e.key);t!==null&&this.handleArrowKey(e,t)}handleArrowKey(e,t){let r=e.target;if(C(r))return;if(e.preventDefault(),!this.focusedDate){this.focusOnCurrentDate();return}let i=w(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}
@@ -2,14 +2,25 @@ import { _ as e, d as t, h as n, l as r, n as i, t as a, u as o } from "./elemen
2
2
  import { t as s } from "./class-map-D5GHsely.js";
3
3
  import "./icon-B2v30QUk.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-CkjLSYpa.js";
5
+ //#region ../../shared-types/calendar.ts
6
+ var x = {
7
+ multiple: !1,
8
+ maxMultiple: 0,
9
+ range: !1,
10
+ earliest: null,
11
+ latest: null,
12
+ weeknumbers: !1,
13
+ withcontrols: !1
14
+ };
15
+ //#endregion
5
16
  //#region ../../node_modules/date-fns/addDays.js
6
- function x(e, t, n) {
17
+ function S(e, t, n) {
7
18
  let r = b(e, n?.in);
8
19
  return isNaN(t) ? u(n?.in || e, NaN) : (t && r.setDate(r.getDate() + t), r);
9
20
  }
10
21
  //#endregion
11
22
  //#region ../../node_modules/date-fns/_lib/normalizeInterval.js
12
- function S(e, t) {
23
+ function C(e, t) {
13
24
  let [n, r] = y(e, t.start, t.end);
14
25
  return {
15
26
  start: n,
@@ -18,8 +29,8 @@ function S(e, t) {
18
29
  }
19
30
  //#endregion
20
31
  //#region ../../node_modules/date-fns/eachDayOfInterval.js
21
- function C(e, t) {
22
- let { start: n, end: r } = S(t?.in, e), i = +n > +r, a = i ? +n : +r, o = i ? r : n;
32
+ function w(e, t) {
33
+ let { start: n, end: r } = C(t?.in, e), i = +n > +r, a = i ? +n : +r, o = i ? r : n;
23
34
  o.setHours(0, 0, 0, 0);
24
35
  let s = t?.step ?? 1;
25
36
  if (!s) return [];
@@ -30,22 +41,11 @@ function C(e, t) {
30
41
  }
31
42
  //#endregion
32
43
  //#region ../../node_modules/date-fns/getISODay.js
33
- function w(e, t) {
44
+ function T(e, t) {
34
45
  let n = b(e, t?.in).getDay();
35
46
  return n === 0 ? 7 : n;
36
47
  }
37
48
  //#endregion
38
- //#region ../../shared-types/calendar.ts
39
- var T = {
40
- multiple: !1,
41
- maxMultiple: 0,
42
- range: !1,
43
- earliest: null,
44
- latest: null,
45
- weeknumbers: !1,
46
- withcontrols: !1
47
- };
48
- //#endregion
49
49
  //#region ../../shared-utils/calendar/date-validation.ts
50
50
  function E(e, t) {
51
51
  let n = (t.excludedates ?? []).map((e) => typeof e == "string" ? e : l(e));
@@ -88,7 +88,7 @@ function N(e) {
88
88
  return typeof e == "string" && (e = e.split(",")), e.length === 1 && e[0] === "" ? [] : e.map((e) => h(e));
89
89
  }
90
90
  function P(e, t) {
91
- let n = C({
91
+ let n = w({
92
92
  start: e,
93
93
  end: t
94
94
  }), r = {};
@@ -100,14 +100,14 @@ function P(e, t) {
100
100
  }
101
101
  function F(e, t, n, r) {
102
102
  if (t.length !== 1) return !0;
103
- let i = C({
103
+ let i = w({
104
104
  start: t[0],
105
105
  end: e
106
106
  });
107
107
  if (!Array.isArray(i) || !i.length) return !0;
108
108
  for (let a = 0; a < i.length; a++) {
109
109
  for (let r of n ?? []) if (r > t[0] && r < e) return !1;
110
- if ((r ?? []).includes(w(i[a]).toString())) return !1;
110
+ if ((r ?? []).includes(T(i[a]).toString())) return !1;
111
111
  }
112
112
  return !0;
113
113
  }
@@ -143,10 +143,10 @@ function V(e) {
143
143
  return t === "INPUT" || t === "SELECT" || t === "BUTTON" && !e.dataset?.date;
144
144
  }
145
145
  function H(e, t, n) {
146
- let r = x(e, t);
146
+ let r = S(e, t);
147
147
  if (!r) return null;
148
148
  let i = n(`button[data-date="${l(r)}"]`);
149
- for (; i instanceof HTMLButtonElement && i.dataset.disabled;) if (r = x(r, t), i = n(`button[data-date="${l(r)}"]`), !i) return null;
149
+ for (; i instanceof HTMLButtonElement && i.dataset.disabled;) if (r = S(r, t), i = n(`button[data-date="${l(r)}"]`), !i) return null;
150
150
  return r;
151
151
  }
152
152
  function U(e) {
@@ -156,7 +156,7 @@ function U(e) {
156
156
  //#region src/components/calendar/calendar.ts
157
157
  var W = class extends a {
158
158
  constructor(...e) {
159
- super(...e), this.selected = [], this.multiple = T.multiple, this.maxMultiple = T.maxMultiple, this.range = T.range, this.earliest = T.earliest, this.latest = T.latest, this.excludedates = [], this.excludeweekdays = [], this.weeknumbers = T.weeknumbers, this.withcontrols = T.withcontrols, this.currentmonth = null, this.today = null, this._selected = [], this.inRange = {}, this.rangeHovered = null, this.year = 0, this.month = 0, this.week = 0, this.currentmonthtouched = !1, this.focusedDate = null, this.selectableDates = [], this.tabIndexSet = 0;
159
+ super(...e), this.selected = [], this.multiple = x.multiple, this.maxMultiple = x.maxMultiple, this.range = x.range, this.earliest = x.earliest, this.latest = x.latest, this.excludedates = [], this.excludeweekdays = [], this.weeknumbers = x.weeknumbers, this.withcontrols = x.withcontrols, this.currentmonth = null, this.today = null, this._selected = [], this.inRange = {}, this.rangeHovered = null, this.year = 0, this.month = 0, this.week = 0, this.currentmonthtouched = !1, this.focusedDate = null, this.selectableDates = [], this.tabIndexSet = 0;
160
160
  }
161
161
  get calendarStrings() {
162
162
  let e = this.pktStrings.get("dates"), t = this.pktStrings.get("calendar");
@@ -2,10 +2,21 @@ import { _ as e, d as t, h as n, n as r, u as i } from "./element-CqC-sGuC.js";
2
2
  import { t as a } from "./class-map-D5GHsely.js";
3
3
  import { n as o, t as s } from "./ref-37-yxmc4.js";
4
4
  import { t as c } from "./input-element-BTzuDh4h.js";
5
- //#region src/components/checkbox/checkbox.ts
6
- var l = class extends c {
5
+ //#region ../../shared-types/checkbox.ts
6
+ var l = {
7
+ defaultChecked: !1,
8
+ indeterminate: !1,
9
+ hasTile: !1,
10
+ disabled: !1,
11
+ hasError: !1,
12
+ isSwitch: !1,
13
+ hideLabel: !1,
14
+ labelPosition: "right",
15
+ requiredTag: !1,
16
+ optionalTag: !1
17
+ }, u = class extends c {
7
18
  constructor(...e) {
8
- super(...e), this.inputRef = s(), this.value = "", this.checkHelptext = null, this.defaultChecked = !1, this.hasTile = !1, this.isSwitch = !1, this.labelPosition = "right", this.hideLabel = !1, this.checked = null, this.indeterminate = !1, this.type = "checkbox", this.tagText = null, this.optionalTag = !1, this.requiredTag = !1;
19
+ super(...e), this.inputRef = s(), this.value = "", this.checkHelptext = null, this.defaultChecked = l.defaultChecked, this.hasTile = l.hasTile, this.isSwitch = l.isSwitch, this.labelPosition = l.labelPosition, this.hideLabel = l.hideLabel, this.checked = null, this.indeterminate = l.indeterminate, this.type = "checkbox", this.tagText = null, this.optionalTag = l.optionalTag, this.requiredTag = l.requiredTag;
9
20
  }
10
21
  connectedCallback() {
11
22
  super.connectedCallback();
@@ -104,23 +115,23 @@ var l = class extends c {
104
115
  r([i({
105
116
  type: String,
106
117
  reflect: !0
107
- })], l.prototype, "value", void 0), r([i({ type: String })], l.prototype, "checkHelptext", void 0), r([i({ type: Boolean })], l.prototype, "defaultChecked", void 0), r([i({ type: Boolean })], l.prototype, "hasTile", void 0), r([i({ type: Boolean })], l.prototype, "isSwitch", void 0), r([i({ type: String })], l.prototype, "labelPosition", void 0), r([i({ type: Boolean })], l.prototype, "hideLabel", void 0), r([i({
118
+ })], u.prototype, "value", void 0), r([i({ type: String })], u.prototype, "checkHelptext", void 0), r([i({ type: Boolean })], u.prototype, "defaultChecked", void 0), r([i({ type: Boolean })], u.prototype, "hasTile", void 0), r([i({ type: Boolean })], u.prototype, "isSwitch", void 0), r([i({ type: String })], u.prototype, "labelPosition", void 0), r([i({ type: Boolean })], u.prototype, "hideLabel", void 0), r([i({
108
119
  type: Boolean,
109
120
  reflect: !0
110
- })], l.prototype, "checked", void 0), r([i({
121
+ })], u.prototype, "checked", void 0), r([i({
111
122
  type: Boolean,
112
123
  reflect: !0
113
- })], l.prototype, "indeterminate", void 0), r([i({
124
+ })], u.prototype, "indeterminate", void 0), r([i({
114
125
  type: String,
115
126
  reflect: !0
116
- })], l.prototype, "type", void 0), r([i({ type: String })], l.prototype, "tagText", void 0), r([i({ type: Boolean })], l.prototype, "optionalTag", void 0), r([i({ type: String })], l.prototype, "optionalText", void 0), r([i({ type: Boolean })], l.prototype, "requiredTag", void 0), r([i({ type: String })], l.prototype, "requiredText", void 0);
127
+ })], u.prototype, "type", void 0), r([i({ type: String })], u.prototype, "tagText", void 0), r([i({ type: Boolean })], u.prototype, "optionalTag", void 0), r([i({ type: String })], u.prototype, "optionalText", void 0), r([i({ type: Boolean })], u.prototype, "requiredTag", void 0), r([i({ type: String })], u.prototype, "requiredText", void 0);
117
128
  try {
118
- t("pkt-checkbox")(l);
129
+ t("pkt-checkbox")(u);
119
130
  } catch {
120
131
  console.warn("Forsøker å definere <pkt-checkbox>, men den er allerede definert");
121
132
  }
122
133
  //#endregion
123
134
  //#region src/components/checkbox/index.ts
124
- var u = l;
135
+ var d = u;
125
136
  //#endregion
126
- export { l as n, u as t };
137
+ export { u as n, d as t };
@@ -0,0 +1,40 @@
1
+ const e=require("./element-CewjrA4g.cjs"),t=require("./class-map-B0FX3YsK.cjs"),n=require("./ref-HT6KRjxp.cjs"),r=require("./input-element-BdIWsDl-.cjs");var i={defaultChecked:!1,indeterminate:!1,hasTile:!1,disabled:!1,hasError:!1,isSwitch:!1,hideLabel:!1,labelPosition:`right`,requiredTag:!1,optionalTag:!1},a=class extends r.t{constructor(...e){super(...e),this.inputRef=n.t(),this.value=``,this.checkHelptext=null,this.defaultChecked=i.defaultChecked,this.hasTile=i.hasTile,this.isSwitch=i.isSwitch,this.labelPosition=i.labelPosition,this.hideLabel=i.hideLabel,this.checked=null,this.indeterminate=i.indeterminate,this.type=`checkbox`,this.tagText=null,this.optionalTag=i.optionalTag,this.requiredTag=i.requiredTag}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,t,n){e===`defaultChecked`&&!this.checked&&(this.checked=this.defaultChecked),e===`checked`&&(this.checked=this.checked===``||this.checked===`true`||this.checked===!0,this.inputRef.value&&(this.inputRef.value.checked=this.checked)),e===`indeterminate`&&(this.indeterminate=this.indeterminate===``||this.indeterminate===`true`||this.indeterminate===!0,this.inputRef.value&&(this.inputRef.value.indeterminate=this.indeterminate)),super.attributeChangedCallback(e,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 r=t.t({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),i=t.t({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError}),a=t.t({"pkt-input-check__input-label":!0,"pkt-input-check__input-label--disabled":this.disabled,"pkt-input-check__input-label--left":this.labelPosition===`left`,"pkt-input-check__input-label--right":this.labelPosition===`right`,"pkt-sr-only":this.hideLabel}),o=`pkt-tag pkt-tag--small pkt-tag--thin-text`,s=this.pktStrings.get(`forms`),c=()=>e._`
2
+ ${this.tagText?e._`<span class=${o+` pkt-tag--gray`}>${this.tagText}</span>`:e.h}
3
+ ${this.optionalTag?e._`<span class=${o+` pkt-tag--blue-light`}
4
+ >${this.optionalText??s.optional}</span
5
+ >`:e.h}
6
+ ${this.requiredTag?e._`<span class=${o+` pkt-tag--beige`}
7
+ >${this.requiredText??s.required}</span
8
+ >`:e.h}
9
+ `,l=this.id+`-check-label`,u=this.id+`-check-helptext`,d=()=>e._`
10
+ <label class=${a} for=${this.id+`-internal`}>
11
+ <span id=${l}>${this.label} ${c()}</span>
12
+ ${this.checkHelptext?e._`<div id=${u} class="pkt-input-check__input-helptext">
13
+ ${this.checkHelptext}
14
+ </div>`:e.h}
15
+ </label>
16
+ `;return e._`
17
+ <div class="pkt-input-check">
18
+ <div class=${r}>
19
+ ${this.labelPosition===`left`?d():e.h}
20
+ <input
21
+ id=${this.id+`-internal`}
22
+ class=${i}
23
+ type="checkbox"
24
+ ?disabled=${this.disabled}
25
+ name=${this.name+`-internal`}
26
+ ${n.n(this.inputRef)}
27
+ @change=${this.handleChange}
28
+ @input=${this.handleInput}
29
+ @click=${this.handleClick}
30
+ @blur=${this.onBlur}
31
+ @focus=${this.onFocus}
32
+ ?checked=${this.checked}
33
+ role=${this.isSwitch?`switch`:`checkbox`}
34
+ aria-labelledby=${this.label?l:e.h}
35
+ aria-describedby=${this.checkHelptext?u:e.h}
36
+ />
37
+ ${this.labelPosition===`right`?d():e.h}
38
+ </div>
39
+ </div>
40
+ `}handleInput(e){e.stopImmediatePropagation(),this.onInput()}handleClick(e){if(this.disabled)return e.preventDefault(),e.stopImmediatePropagation(),!1}handleChange(e){if(this.disabled)return e.preventDefault(),e.stopImmediatePropagation(),!1;this.toggleChecked(e)}toggleChecked(e){if(this.disabled){e.preventDefault(),e.stopImmediatePropagation();return}let t=e.target;if(t&&t.disabled){e.preventDefault(),e.stopImmediatePropagation();return}e.stopImmediatePropagation(),this.touched=!0,this.inputRef.value&&(this.checked=this.inputRef.value.matches(`:checked`),this.valueChecked(this.checked))}};e.n([e.u({type:String,reflect:!0})],a.prototype,`value`,void 0),e.n([e.u({type:String})],a.prototype,`checkHelptext`,void 0),e.n([e.u({type:Boolean})],a.prototype,`defaultChecked`,void 0),e.n([e.u({type:Boolean})],a.prototype,`hasTile`,void 0),e.n([e.u({type:Boolean})],a.prototype,`isSwitch`,void 0),e.n([e.u({type:String})],a.prototype,`labelPosition`,void 0),e.n([e.u({type:Boolean})],a.prototype,`hideLabel`,void 0),e.n([e.u({type:Boolean,reflect:!0})],a.prototype,`checked`,void 0),e.n([e.u({type:Boolean,reflect:!0})],a.prototype,`indeterminate`,void 0),e.n([e.u({type:String,reflect:!0})],a.prototype,`type`,void 0),e.n([e.u({type:String})],a.prototype,`tagText`,void 0),e.n([e.u({type:Boolean})],a.prototype,`optionalTag`,void 0),e.n([e.u({type:String})],a.prototype,`optionalText`,void 0),e.n([e.u({type:Boolean})],a.prototype,`requiredTag`,void 0),e.n([e.u({type:String})],a.prototype,`requiredText`,void 0);try{e.d(`pkt-checkbox`)(a)}catch{console.warn(`Forsøker å definere <pkt-checkbox>, men den er allerede definert`)}var o=a;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
@@ -10,7 +10,7 @@ import { t as f } from "./repeat-DntD73oB.js";
10
10
  import { a as p, c as m, i as h, l as g, o as _, r as v, s as y } from "./listbox-7pQ0UjKV.js";
11
11
  import { t as b } from "./input-element-BTzuDh4h.js";
12
12
  import { t as x } from "./pkt-options-controller-v2bPM9iU.js";
13
- import { r as S } from "./input-wrapper-CvFMiqIt.js";
13
+ import { r as S } from "./input-wrapper-B5GdwzAM.js";
14
14
  //#region ../../shared-utils/combobox/input-utils.ts
15
15
  var C = (e, t, n) => {
16
16
  switch (e) {
@@ -113,6 +113,7 @@ var C = (e, t, n) => {
113
113
  "css-class": "pkt-combobox",
114
114
  isElement: !0,
115
115
  isPureReact: !0,
116
+ "dark-mode": !0,
116
117
  props: {
117
118
  name: {
118
119
  type: "string",
@@ -319,7 +320,7 @@ var C = (e, t, n) => {
319
320
  attribute: "default-options",
320
321
  name: "Initielle valg (default options)",
321
322
  description: "Liste over valg som kan velges, om options sendes inn som array med objekter (denne vil ikke modifiseres ved endring innad i komponenten)",
322
- type: "array",
323
+ type: "IPktComboboxOption[]",
323
324
  default: [],
324
325
  previewDefault: [
325
326
  {
@@ -387,7 +388,7 @@ var C = (e, t, n) => {
387
388
  },
388
389
  options: {
389
390
  name: "Valg",
390
- type: "array",
391
+ type: "IPktComboboxOption[]",
391
392
  description: "Liste over valg som kan velges, om options sendes inn som array med objekter",
392
393
  default: [],
393
394
  items: {