@oslokommune/punkt-elements 16.6.2 → 16.7.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 (146) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/{accordionitem-D7sWqDM_.cjs → accordionitem-D1Agl1bB.cjs} +1 -1
  3. package/dist/{accordionitem-Cj74XruR.js → accordionitem-ZlaXvjt5.js} +5 -5
  4. package/dist/{alert-ca_hFi-u.js → alert-BuAXrnKl.js} +6 -6
  5. package/dist/{alert-C95U_RZ0.cjs → alert-DFkFNTxh.cjs} +1 -1
  6. package/dist/{async-directive-CKx6pubI.js → async-directive-CMzWMlZ5.js} +1 -1
  7. package/dist/{async-directive-B158h3ba.cjs → async-directive-DoMuclel.cjs} +1 -1
  8. package/dist/{backlink-CQoNgoa-.cjs → backlink-EiAXUUZP.cjs} +1 -1
  9. package/dist/{backlink-C68H4Z3b.js → backlink-V4DAt17e.js} +3 -3
  10. package/dist/{button-BRovt5nm.js → button-DEyvt1LI.js} +5 -5
  11. package/dist/{button-BXN_JPaH.cjs → button-DYv5Dg4M.cjs} +1 -1
  12. package/dist/{calendar-43Y_6FD8.cjs → calendar-HIE9nxcc.cjs} +1 -1
  13. package/dist/{calendar-B5Xwl8mV.js → calendar-S63oreVW.js} +4 -4
  14. package/dist/{card-DfHo45CG.cjs → card-CyeH6l1c.cjs} +1 -1
  15. package/dist/{card-DvgCTN4B.js → card-DDiLfuO4.js} +7 -7
  16. package/dist/{checkbox-mmn3v9ry.cjs → checkbox-BLlwTABj.cjs} +1 -1
  17. package/dist/{checkbox-CbIUMIYt.js → checkbox-ejBUa5qQ.js} +4 -4
  18. package/dist/{class-map-3ADKve8g.js → class-map-CEnykyO_.js} +1 -1
  19. package/dist/{class-map-Bokp1SoS.cjs → class-map-CsENJXf1.cjs} +1 -1
  20. package/dist/{combobox-CwW0md6G.js → combobox-BmxSecfE.js} +13 -13
  21. package/dist/{combobox-TKL44xnV.cjs → combobox-Hb2V-fPX.cjs} +1 -1
  22. package/dist/{consent-CgS1L1xF.js → consent-iXyx5v6J.js} +3 -3
  23. package/dist/{consent-CIhFwuFO.cjs → consent-ruWAEVXW.cjs} +1 -1
  24. package/dist/{datepicker-qRWWzmbo.js → datepicker-CZl7b8Na.js} +12 -12
  25. package/dist/{datepicker-oN9L0Wnm.cjs → datepicker-D2H7U6MS.cjs} +1 -1
  26. package/dist/{directive-helpers-B3Vpl3xV.cjs → directive-helpers-BP2WOx60.cjs} +1 -1
  27. package/dist/{directive-helpers-CyPtA1_i.js → directive-helpers-rm-28gIj.js} +1 -1
  28. package/dist/{element-CV9utnHJ.js → element-CPpT3rFQ.js} +68 -67
  29. package/dist/{element-CMTfByxQ.cjs → element-gR_VtSiD.cjs} +6 -6
  30. package/dist/{element-with-slot-1djk8KXi.js → element-with-slot-Dqk6-TRR.js} +2 -2
  31. package/dist/{element-with-slot-yT8k1Z37.cjs → element-with-slot-ZX-up7jO.cjs} +1 -1
  32. package/dist/{heading-D9R5UBcv.js → heading-CKt7cVn7.js} +1 -1
  33. package/dist/{heading-B0XRE0lq.cjs → heading-Cvz8m1xL.cjs} +1 -1
  34. package/dist/{helptext-B366oeR9.cjs → helptext-5Mzp65-F.cjs} +1 -1
  35. package/dist/{helptext-DepcDYFV.js → helptext-jIoWRcCF.js} +5 -5
  36. package/dist/{icon-D0IQAVwS.js → icon-BlKA8YuW.js} +1 -1
  37. package/dist/{icon-Dj0oZZSa.cjs → icon-Bqj9oBbl.cjs} +1 -1
  38. package/dist/{if-defined-rXcLNTzN.js → if-defined-B0krMLad.js} +1 -1
  39. package/dist/{if-defined-hKKmbsI8.cjs → if-defined-BOW3ODSj.cjs} +1 -1
  40. package/dist/index.d.ts +92 -0
  41. package/dist/{input-element-n5U38pZ1.js → input-element-8nLwuQS4.js} +3 -3
  42. package/dist/{input-element-Xe9FTi2a.cjs → input-element-DdVhUvva.cjs} +1 -1
  43. package/dist/{input-wrapper-BdFdJU-k.cjs → input-wrapper-B0MkQ0IZ.cjs} +1 -1
  44. package/dist/{input-wrapper-B__6jW4U.js → input-wrapper-B2JpK016.js} +7 -7
  45. package/dist/{link-DLjXMpvi.cjs → link-R_lNhViF.cjs} +1 -1
  46. package/dist/{link-oGYvBLYL.js → link-Z_GizclR.js} +4 -4
  47. package/dist/{linkcard-BhVIc18n.js → linkcard-BlQvdB1a.js} +4 -4
  48. package/dist/{linkcard-C20WC6Nw.cjs → linkcard-C7HbSLlX.cjs} +1 -1
  49. package/dist/{listbox-CS4WQOuf.js → listbox-BQKDZvZn.js} +5 -5
  50. package/dist/{listbox-OAVh_U7u.cjs → listbox-CGgV9MAe.cjs} +1 -1
  51. package/dist/{loader-BHt9i5Xp.js → loader-Ci3CHU8k.js} +5 -5
  52. package/dist/{loader-DxAGCcNF.cjs → loader-e2gs_1xz.cjs} +1 -1
  53. package/dist/{messagebox-DkspcMQg.js → messagebox-Bf-XMlvW.js} +5 -5
  54. package/dist/{messagebox-B8LW0PSQ.cjs → messagebox-D67w71VX.cjs} +1 -1
  55. package/dist/{modal-mWn5pjs8.cjs → modal-CyvEkbfQ.cjs} +1 -1
  56. package/dist/{modal-D3u6ueP5.js → modal-DzGe1g8Z.js} +6 -6
  57. package/dist/pkt-accordion.cjs +1 -1
  58. package/dist/pkt-accordion.js +2 -2
  59. package/dist/pkt-alert.cjs +1 -1
  60. package/dist/pkt-alert.js +1 -1
  61. package/dist/pkt-backlink.cjs +1 -1
  62. package/dist/pkt-backlink.js +1 -1
  63. package/dist/pkt-breadcrumbs.cjs +1 -1
  64. package/dist/pkt-breadcrumbs.js +2 -2
  65. package/dist/pkt-button.cjs +1 -1
  66. package/dist/pkt-button.js +1 -1
  67. package/dist/pkt-calendar.cjs +1 -1
  68. package/dist/pkt-calendar.js +1 -1
  69. package/dist/pkt-card.cjs +1 -1
  70. package/dist/pkt-card.js +1 -1
  71. package/dist/pkt-checkbox.cjs +1 -1
  72. package/dist/pkt-checkbox.js +1 -1
  73. package/dist/pkt-combobox.cjs +1 -1
  74. package/dist/pkt-combobox.js +1 -1
  75. package/dist/pkt-consent.cjs +1 -1
  76. package/dist/pkt-consent.js +1 -1
  77. package/dist/pkt-datepicker.cjs +1 -1
  78. package/dist/pkt-datepicker.js +2 -2
  79. package/dist/pkt-header.cjs +1 -1
  80. package/dist/pkt-header.js +10 -10
  81. package/dist/pkt-heading.cjs +1 -1
  82. package/dist/pkt-heading.js +1 -1
  83. package/dist/pkt-helptext.cjs +1 -1
  84. package/dist/pkt-helptext.js +1 -1
  85. package/dist/pkt-icon.cjs +1 -1
  86. package/dist/pkt-icon.js +1 -1
  87. package/dist/pkt-index.cjs +1 -1
  88. package/dist/pkt-index.js +33 -31
  89. package/dist/pkt-input-wrapper.cjs +1 -1
  90. package/dist/pkt-input-wrapper.js +1 -1
  91. package/dist/pkt-link.cjs +1 -1
  92. package/dist/pkt-link.js +1 -1
  93. package/dist/pkt-linkcard.cjs +1 -1
  94. package/dist/pkt-linkcard.js +1 -1
  95. package/dist/pkt-listbox.cjs +1 -1
  96. package/dist/pkt-listbox.js +1 -1
  97. package/dist/pkt-loader.cjs +1 -1
  98. package/dist/pkt-loader.js +1 -1
  99. package/dist/pkt-messagebox.cjs +1 -1
  100. package/dist/pkt-messagebox.js +1 -1
  101. package/dist/pkt-modal.cjs +1 -1
  102. package/dist/pkt-modal.js +1 -1
  103. package/dist/{pkt-options-controller-DIeKSpWv.cjs → pkt-options-controller-5LXbEzuk.cjs} +1 -1
  104. package/dist/{pkt-options-controller-W4ITGQy9.js → pkt-options-controller-B5YalfCb.js} +1 -1
  105. package/dist/pkt-progressbar.cjs +1 -1
  106. package/dist/pkt-progressbar.js +2 -2
  107. package/dist/pkt-radiobutton.cjs +1 -1
  108. package/dist/pkt-radiobutton.js +1 -1
  109. package/dist/pkt-select.cjs +1 -1
  110. package/dist/pkt-select.js +1 -1
  111. package/dist/pkt-tabs.cjs +1 -1
  112. package/dist/pkt-tabs.js +2 -2
  113. package/dist/pkt-tag.cjs +1 -1
  114. package/dist/pkt-tag.js +1 -1
  115. package/dist/pkt-textarea.cjs +1 -1
  116. package/dist/pkt-textarea.js +1 -1
  117. package/dist/pkt-textinput.cjs +1 -1
  118. package/dist/pkt-textinput.js +1 -1
  119. package/dist/pkt-timepicker.cjs +188 -0
  120. package/dist/pkt-timepicker.js +552 -0
  121. package/dist/{progressbar-CcX-xiPI.js → progressbar-By7e0lEI.js} +5 -5
  122. package/dist/{progressbar-CC9Qr82_.cjs → progressbar-DsJ2B9Vm.cjs} +1 -1
  123. package/dist/{radiobutton-RW3h0tJj.js → radiobutton-6frNG9J_.js} +5 -5
  124. package/dist/{radiobutton-BUDQYAH-.cjs → radiobutton-Bv-BZ1Hw.cjs} +1 -1
  125. package/dist/{ref-DBGHvw2G.js → ref-Bg_Swj5w.js} +2 -2
  126. package/dist/{ref-DahIePMT.cjs → ref-CL-Xk9Xm.cjs} +1 -1
  127. package/dist/{repeat-DnlRNf63.js → repeat-BD8TKgJb.js} +2 -2
  128. package/dist/{repeat-C-FJ2vfy.cjs → repeat-Cfq8CDlf.cjs} +1 -1
  129. package/dist/{select-iXKeM3yz.js → select-CXZt1nHS.js} +8 -8
  130. package/dist/{select-PuEeK4jQ.cjs → select-WFhS4Vfp.cjs} +1 -1
  131. package/dist/{state-l4hGZdFJ.js → state-C_1EOo3D.js} +1 -1
  132. package/dist/{state-BNgpvY-A.cjs → state-Dg-53wQ8.cjs} +1 -1
  133. package/dist/{tabitem-DZSzwag2.js → tabitem-CB8wkKmv.js} +5 -5
  134. package/dist/{tabitem-Jenus4Qd.cjs → tabitem-DZpspU4Q.cjs} +1 -1
  135. package/dist/{tag-CIWBLpjv.js → tag-BuCpqaks.js} +6 -6
  136. package/dist/{tag-DeE1OpmF.cjs → tag-X6xdjR0N.cjs} +1 -1
  137. package/dist/{textarea-DR9lVDN-.js → textarea-Bzuymclz.js} +10 -10
  138. package/dist/{textarea-DtiYQWjy.cjs → textarea-DoeHJ7HR.cjs} +1 -1
  139. package/dist/{textinput-0Bttvt9V.js → textinput-9lHjs4ce.js} +9 -9
  140. package/dist/{textinput-cKrjvbJW.cjs → textinput-BNsLd26i.cjs} +1 -1
  141. package/dist/timepicker.d.ts +1 -0
  142. package/package.json +2 -3
  143. package/src/components/index.ts +3 -0
  144. package/src/components/timepicker/index.ts +2 -0
  145. package/src/components/timepicker/timepicker.test.ts +453 -0
  146. package/src/components/timepicker/timepicker.ts +787 -0
@@ -1,4 +1,4 @@
1
- "use strict";const p=require("./element-CMTfByxQ.cjs"),a=require("./ref-DahIePMT.cjs"),l=require("./if-defined-hKKmbsI8.cjs"),c=require("./state-BNgpvY-A.cjs"),v=require("./input-element-Xe9FTi2a.cjs"),f=require("./pkt-options-controller-DIeKSpWv.cjs"),_=require("./element-with-slot-yT8k1Z37.cjs");require("./input-wrapper-BdFdJU-k.cjs");var $=Object.defineProperty,u=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&$(t,e,s),s};class h extends v.PktInputElement{constructor(){super(...arguments),this._optionsProp=[],this._options=[]}get options(){return this._options.map(t=>({...t,selected:this.isOptionSelected(t)}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}isOptionSelected(t){return Array.isArray(this.value)?this.value.includes(t.value):t.value===this.value}findOptionByValue(t){return this._options.find(e=>e.value===t)}getSelectedOptions(){return this._options.filter(t=>this.isOptionSelected(t))}parseOptions(){var i,s;const t=this._optionsProp.length>0,e=((s=(i=this.optionsController)==null?void 0:i.nodes)==null?void 0:s.length)&&this.optionsController.nodes.length>0;t?this._options=this._optionsProp:e&&(this._options=this.optionsController.options)}willUpdate(t){super.willUpdate(t),this.parseOptions()}}u([p.n({type:Array,attribute:"options"})],h.prototype,"_optionsProp");u([c.r()],h.prototype,"_options");var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,d=(r,t,e,i)=>{for(var s=i>1?void 0:i?b(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&x(t,e,s),s};exports.PktSelect=class extends h{constructor(){super(),this.inputRef=a.e(),this.value="",this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new f.PktOptionsSlotController(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(t=>{t.selected&&!this.value&&(this.value=t.value)})}add(t,e){const i={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(i);else if(typeof e=="number")this._options.splice(e,0,i);else{const s=e.value||e.text,o=this._options.findIndex(n=>n.value===s);o>=0?this._options.splice(o,0,i):this._options.push(i)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(s=>s.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,i){var s,o;t==="options"&&(this._options=i?JSON.parse(i):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((s=this.inputRef.value)==null?void 0:s.selectedIndex):this._options.findIndex(n=>n.value===i),this.selectedOptions=(o=this.inputRef.value)==null?void 0:o.selectedOptions,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}update(t){var e,i;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(i=this.inputRef.value)==null?void 0:i.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return p.b`
1
+ "use strict";const p=require("./element-gR_VtSiD.cjs"),a=require("./ref-CL-Xk9Xm.cjs"),l=require("./if-defined-BOW3ODSj.cjs"),c=require("./state-Dg-53wQ8.cjs"),v=require("./input-element-DdVhUvva.cjs"),f=require("./pkt-options-controller-5LXbEzuk.cjs"),_=require("./element-with-slot-ZX-up7jO.cjs");require("./input-wrapper-B0MkQ0IZ.cjs");var $=Object.defineProperty,u=(r,t,e,i)=>{for(var s=void 0,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=n(t,e,s)||s);return s&&$(t,e,s),s};class h extends v.PktInputElement{constructor(){super(...arguments),this._optionsProp=[],this._options=[]}get options(){return this._options.map(t=>({...t,selected:this.isOptionSelected(t)}))}set options(t){this._optionsProp=t,this.requestUpdate("_optionsProp",this._options)}isOptionSelected(t){return Array.isArray(this.value)?this.value.includes(t.value):t.value===this.value}findOptionByValue(t){return this._options.find(e=>e.value===t)}getSelectedOptions(){return this._options.filter(t=>this.isOptionSelected(t))}parseOptions(){var i,s;const t=this._optionsProp.length>0,e=((s=(i=this.optionsController)==null?void 0:i.nodes)==null?void 0:s.length)&&this.optionsController.nodes.length>0;t?this._options=this._optionsProp:e&&(this._options=this.optionsController.options)}willUpdate(t){super.willUpdate(t),this.parseOptions()}}u([p.n({type:Array,attribute:"options"})],h.prototype,"_optionsProp");u([c.r()],h.prototype,"_options");var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,d=(r,t,e,i)=>{for(var s=i>1?void 0:i?b(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&x(t,e,s),s};exports.PktSelect=class extends h{constructor(){super(),this.inputRef=a.e(),this.value="",this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new f.PktOptionsSlotController(this)}connectedCallback(){super.connectedCallback(),this.parseOptions(),this._options.forEach(t=>{t.selected&&!this.value&&(this.value=t.value)})}add(t,e){const i={value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled};if(e===void 0)this._options.push(i);else if(typeof e=="number")this._options.splice(e,0,i);else{const s=e.value||e.text,o=this._options.findIndex(n=>n.value===s);o>=0?this._options.splice(o,0,i):this._options.push(i)}t.selected&&(this.value=t.value||t.text,this.selectedIndex=this._options.findIndex(s=>s.value===this.value)),this.requestUpdate()}remove(t){var e;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),this._options.splice(t,1),this.requestUpdate())}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){this.inputRef.value&&"showPicker"in this.inputRef.value&&this.inputRef.value.showPicker()}attributeChangedCallback(t,e,i){var s,o;t==="options"&&(this._options=i?JSON.parse(i):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((s=this.inputRef.value)==null?void 0:s.selectedIndex):this._options.findIndex(n=>n.value===i),this.selectedOptions=(o=this.inputRef.value)==null?void 0:o.selectedOptions,this.valueChanged(i,e)),super.attributeChangedCallback(t,e,i)}update(t){var e,i;super.update(t),t.has("_optionsProp")&&this._optionsProp.length>0&&(this._options=this._optionsProp,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this._options.findIndex(s=>s.value===this.value),this.selectedOptions=(i=this.inputRef.value)==null?void 0:i.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),this._optionsProp.length&&(this._options=this._optionsProp),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(i=>i.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return p.b`
2
2
  <pkt-input-wrapper
3
3
  ?counter=${this.counter}
4
4
  ?disabled=${this.disabled}
@@ -1,4 +1,4 @@
1
- import { n as r } from "./element-CV9utnHJ.js";
1
+ import { n as r } from "./element-CPpT3rFQ.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./element-CMTfByxQ.cjs");/**
1
+ "use strict";const e=require("./element-gR_VtSiD.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,8 +1,8 @@
1
- import { P as k, s as $ } from "./element-with-slot-1djk8KXi.js";
2
- import { b as p, n as h, t as y } from "./element-CV9utnHJ.js";
3
- import { r as f } from "./state-l4hGZdFJ.js";
4
- import { e as _, n as w } from "./ref-DBGHvw2G.js";
5
- import { o as u } from "./if-defined-rXcLNTzN.js";
1
+ import { P as k, s as $ } from "./element-with-slot-Dqk6-TRR.js";
2
+ import { b as p, n as h, t as y } from "./element-CPpT3rFQ.js";
3
+ import { r as f } from "./state-C_1EOo3D.js";
4
+ import { e as _, n as w } from "./ref-Bg_Swj5w.js";
5
+ import { o as u } from "./if-defined-B0krMLad.js";
6
6
  /**
7
7
  * @license
8
8
  * Copyright 2021 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";const d=require("./element-with-slot-yT8k1Z37.cjs"),a=require("./element-CMTfByxQ.cjs"),x=require("./state-BNgpvY-A.cjs"),f=require("./ref-DahIePMT.cjs"),u=require("./if-defined-hKKmbsI8.cjs");/**
1
+ "use strict";const d=require("./element-with-slot-ZX-up7jO.cjs"),a=require("./element-gR_VtSiD.cjs"),x=require("./state-Dg-53wQ8.cjs"),f=require("./ref-CL-Xk9Xm.cjs"),u=require("./if-defined-BOW3ODSj.cjs");/**
2
2
  * @license
3
3
  * Copyright 2021 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,9 +1,9 @@
1
- import { e as d } from "./class-map-3ADKve8g.js";
2
- import { b as n, n as o, t as y } from "./element-CV9utnHJ.js";
3
- import { r as f } from "./state-l4hGZdFJ.js";
4
- import { P as k, s as b } from "./element-with-slot-1djk8KXi.js";
5
- import "./icon-D0IQAVwS.js";
6
- import { o as u } from "./if-defined-rXcLNTzN.js";
1
+ import { e as d } from "./class-map-CEnykyO_.js";
2
+ import { b as n, n as o, t as y } from "./element-CPpT3rFQ.js";
3
+ import { r as f } from "./state-C_1EOo3D.js";
4
+ import { P as k, s as b } from "./element-with-slot-Dqk6-TRR.js";
5
+ import "./icon-BlKA8YuW.js";
6
+ import { o as u } from "./if-defined-B0krMLad.js";
7
7
  const g = { size: { default: "medium" }, skin: { default: "blue" }, closeTag: { default: !1 }, type: { default: "button" } }, l = {
8
8
  props: g
9
9
  };
@@ -1,4 +1,4 @@
1
- "use strict";const h=require("./class-map-Bokp1SoS.cjs"),t=require("./element-CMTfByxQ.cjs"),k=require("./state-BNgpvY-A.cjs"),c=require("./element-with-slot-yT8k1Z37.cjs");require("./icon-Dj0oZZSa.cjs");const u=require("./if-defined-hKKmbsI8.cjs"),g={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},o={props:g};var d=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(r,e,a,n)=>{for(var i=n>1?void 0:n?b(e,a):e,p=r.length-1,l;p>=0;p--)(l=r[p])&&(i=(n?l(e,a,i):l(i))||i);return n&&i&&d(e,a,i),i};exports.PktTag=class extends c.PktElementWithSlot{constructor(){super(),this.closeTag=o.props.closeTag.default,this.size=o.props.size.default,this.skin=o.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=o.props.type.default,this.ariaLabel=null,this.buttonTabindex=void 0,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!1,composed:!0}))},this._isClosed=!1}firstUpdated(e){var a,n;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const i=(n=(a=this.querySelector("button span, .pkt-tag > span"))==null?void 0:a.textContent)==null?void 0:n.trim();i&&(this._ariaDescription=`Klikk for å fjerne ${i}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.b`
1
+ "use strict";const h=require("./class-map-CsENJXf1.cjs"),t=require("./element-gR_VtSiD.cjs"),k=require("./state-Dg-53wQ8.cjs"),c=require("./element-with-slot-ZX-up7jO.cjs");require("./icon-Bqj9oBbl.cjs");const u=require("./if-defined-BOW3ODSj.cjs"),g={size:{default:"medium"},skin:{default:"blue"},closeTag:{default:!1},type:{default:"button"}},o={props:g};var d=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(r,e,a,n)=>{for(var i=n>1?void 0:n?b(e,a):e,p=r.length-1,l;p>=0;p--)(l=r[p])&&(i=(n?l(e,a,i):l(i))||i);return n&&i&&d(e,a,i),i};exports.PktTag=class extends c.PktElementWithSlot{constructor(){super(),this.closeTag=o.props.closeTag.default,this.size=o.props.size.default,this.skin=o.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=o.props.type.default,this.ariaLabel=null,this.buttonTabindex=void 0,this._isClosed=!1,this._ariaDescription=null,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!1,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!1,composed:!0}))},this._isClosed=!1}firstUpdated(e){var a,n;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const i=(n=(a=this.querySelector("button span, .pkt-tag > span"))==null?void 0:a.textContent)==null?void 0:n.trim();i&&(this._ariaDescription=`Klikk for å fjerne ${i}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},a={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.b`
2
2
  <button
3
3
  class=${h.e(a)}
4
4
  type=${this.type}
@@ -1,14 +1,14 @@
1
- import { E as l, A as c, b as m, n as d, t as g } from "./element-CV9utnHJ.js";
2
- import { o as u } from "./if-defined-rXcLNTzN.js";
3
- import { r as $ } from "./state-l4hGZdFJ.js";
4
- import { e as f, n as x } from "./ref-DBGHvw2G.js";
5
- import { e as v } from "./class-map-3ADKve8g.js";
1
+ import { E as l, A as c, b as m, n as d, t as g } from "./element-CPpT3rFQ.js";
2
+ import { o as u } from "./if-defined-B0krMLad.js";
3
+ import { r as $ } from "./state-C_1EOo3D.js";
4
+ import { e as f, n as x } from "./ref-Bg_Swj5w.js";
5
+ import { e as v } from "./class-map-CEnykyO_.js";
6
6
  import { e as b, i as T, t as a } from "./directive-oAbCiebi.js";
7
- import { r as y, p as w } from "./directive-helpers-CyPtA1_i.js";
8
- import { P as C } from "./input-element-n5U38pZ1.js";
9
- import { s as E } from "./element-with-slot-1djk8KXi.js";
10
- import "./input-wrapper-B__6jW4U.js";
11
- import "./icon-D0IQAVwS.js";
7
+ import { r as y, p as w } from "./directive-helpers-rm-28gIj.js";
8
+ import { P as C } from "./input-element-8nLwuQS4.js";
9
+ import { s as E } from "./element-with-slot-Dqk6-TRR.js";
10
+ import "./input-wrapper-B2JpK016.js";
11
+ import "./icon-BlKA8YuW.js";
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2020 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("./element-CMTfByxQ.cjs"),h=require("./if-defined-hKKmbsI8.cjs"),c=require("./state-BNgpvY-A.cjs"),p=require("./ref-DahIePMT.cjs"),$=require("./class-map-Bokp1SoS.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-B3Vpl3xV.cjs"),g=require("./input-element-Xe9FTi2a.cjs"),x=require("./element-with-slot-yT8k1Z37.cjs");require("./input-wrapper-BdFdJU-k.cjs");require("./icon-Dj0oZZSa.cjs");/**
1
+ "use strict";const s=require("./element-gR_VtSiD.cjs"),h=require("./if-defined-BOW3ODSj.cjs"),c=require("./state-Dg-53wQ8.cjs"),p=require("./ref-CL-Xk9Xm.cjs"),$=require("./class-map-CsENJXf1.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-BP2WOx60.cjs"),g=require("./input-element-DdVhUvva.cjs"),x=require("./element-with-slot-ZX-up7jO.cjs");require("./input-wrapper-B0MkQ0IZ.cjs");require("./icon-Bqj9oBbl.cjs");/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,12 +1,12 @@
1
- import { A as p, b as h, n as a, t as d } from "./element-CV9utnHJ.js";
2
- import { o as l } from "./if-defined-rXcLNTzN.js";
3
- import { r as m } from "./state-l4hGZdFJ.js";
4
- import { e as $, n as f } from "./ref-DBGHvw2G.js";
5
- import { e as g } from "./class-map-3ADKve8g.js";
6
- import { P as x } from "./input-element-n5U38pZ1.js";
7
- import { s as v } from "./element-with-slot-1djk8KXi.js";
8
- import "./input-wrapper-B__6jW4U.js";
9
- import "./icon-D0IQAVwS.js";
1
+ import { A as p, b as h, n as a, t as d } from "./element-CPpT3rFQ.js";
2
+ import { o as l } from "./if-defined-B0krMLad.js";
3
+ import { r as m } from "./state-C_1EOo3D.js";
4
+ import { e as $, n as f } from "./ref-Bg_Swj5w.js";
5
+ import { e as g } from "./class-map-CEnykyO_.js";
6
+ import { P as x } from "./input-element-8nLwuQS4.js";
7
+ import { s as v } from "./element-with-slot-Dqk6-TRR.js";
8
+ import "./input-wrapper-B2JpK016.js";
9
+ import "./icon-BlKA8YuW.js";
10
10
  var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (i, e, r, t) => {
11
11
  for (var n = t > 1 ? void 0 : t ? b(e, r) : e, u = i.length - 1, c; u >= 0; u--)
12
12
  (c = i[u]) && (n = (t ? c(e, r, n) : c(n)) || n);
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-CMTfByxQ.cjs"),p=require("./if-defined-hKKmbsI8.cjs"),l=require("./state-BNgpvY-A.cjs"),h=require("./ref-DahIePMT.cjs"),c=require("./class-map-Bokp1SoS.cjs"),d=require("./input-element-Xe9FTi2a.cjs"),$=require("./element-with-slot-yT8k1Z37.cjs");require("./input-wrapper-BdFdJU-k.cjs");require("./icon-Dj0oZZSa.cjs");var x=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?g(i,s):i,o=u.length-1,a;o>=0;o--)(a=u[o])&&(e=(n?a(i,s,e):a(e))||e);return n&&e&&x(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.b`
1
+ "use strict";const t=require("./element-gR_VtSiD.cjs"),p=require("./if-defined-BOW3ODSj.cjs"),l=require("./state-Dg-53wQ8.cjs"),h=require("./ref-CL-Xk9Xm.cjs"),c=require("./class-map-CsENJXf1.cjs"),d=require("./input-element-DdVhUvva.cjs"),$=require("./element-with-slot-ZX-up7jO.cjs");require("./input-wrapper-B0MkQ0IZ.cjs");require("./icon-Bqj9oBbl.cjs");var x=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?g(i,s):i,o=u.length-1,a;o>=0;o--)(a=u[o])&&(e=(n?a(i,s,e):a(e))||e);return n&&e&&x(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(...arguments),this.inputRef=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.b`
2
2
  <pkt-input-wrapper
3
3
  label="${this.label}"
4
4
  ?counter=${this.counter}
@@ -0,0 +1 @@
1
+ export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oslokommune/punkt-elements",
3
- "version": "16.6.2",
3
+ "version": "16.7.0",
4
4
  "description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
5
5
  "homepage": "https://punkt.oslo.kommune.no",
6
6
  "author": "Team Designsystem, Oslo Origo",
@@ -42,7 +42,6 @@
42
42
  "@babel/preset-env": "^7.28.3",
43
43
  "@babel/preset-typescript": "^7.25.9",
44
44
  "@oslokommune/punkt-assets": "^16.0.0",
45
- "@oslokommune/punkt-css": "^16.5.1",
46
45
  "@testing-library/jest-dom": "^6.6.3",
47
46
  "@typescript-eslint/eslint-plugin": "^8.46.0",
48
47
  "@typescript-eslint/parser": "^8.46.0",
@@ -79,5 +78,5 @@
79
78
  "url": "https://github.com/oslokommune/punkt/issues"
80
79
  },
81
80
  "license": "MIT",
82
- "gitHead": "420cd507db8426491e86687bf18f3483202f5c25"
81
+ "gitHead": "782a591e43ea062ca4ef23fe5415aca5f2d523b5"
83
82
  }
@@ -30,6 +30,7 @@ export { PktTabs, PktTabItem } from '@/components/tabs'
30
30
  export { PktTextarea } from '@/components/textarea'
31
31
  export { PktTextinput } from '@/components/textinput'
32
32
  export { PktSelect } from '@/components/select'
33
+ export { PktTimepicker } from '@/components/timepicker'
33
34
 
34
35
  // Export component types
35
36
  export type { IPktAccordion, IPktAccordionItem, TPktAccordionSkin } from '@/components/accordion'
@@ -87,3 +88,5 @@ export type { IPktBreadcrumbs, IBreadcrumbItem } from '@/components/breadcrumbs'
87
88
  export type { IPktLoader, TPktLoaderVariant } from '@/components/loader'
88
89
 
89
90
  export type { IPktConsent } from '@/components/consent'
91
+
92
+ export type { IPktTimepicker } from '@/components/timepicker'
@@ -0,0 +1,2 @@
1
+ export { PktTimepicker } from './timepicker'
2
+ export type { IPktTimepicker } from './timepicker'