@oslokommune/punkt-elements 17.1.3 → 18.1.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 (280) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/{accordion-BeLvLPrB.js → accordion-CcUosZjL.js} +27 -27
  3. package/dist/{accordion-B3GBlvUC.cjs → accordion-k0pWTG1X.cjs} +5 -5
  4. package/dist/alert-BD8YVKia.cjs +35 -0
  5. package/dist/{alert-DKK_Tb9J.js → alert-Bmaly2Yo.js} +57 -52
  6. package/dist/{async-directive-BPf6K-V2.js → async-directive-COqx0IYj.js} +5 -5
  7. package/dist/{async-directive-Da7TJpnq.cjs → async-directive-DN2eg9gA.cjs} +1 -1
  8. package/dist/{backlink-D1y26pj3.js → backlink-C_ZO-ZbR.js} +9 -9
  9. package/dist/{backlink-CMmrKTe4.cjs → backlink-Ch64Pivx.cjs} +3 -3
  10. package/dist/base-elements/element.d.ts +13 -1
  11. package/dist/base-elements/input-element.d.ts +4 -2
  12. package/dist/{breadcrumbs-CcTQ3Grm.js → breadcrumbs-CF_gAbUk.js} +16 -16
  13. package/dist/{breadcrumbs-B6JGhJgC.cjs → breadcrumbs-CzzbardP.cjs} +7 -7
  14. package/dist/{button-2-OSPJkj.js → button-C1CQSASU.js} +28 -28
  15. package/dist/{button-CE97NQIk.cjs → button-CF3dNKeI.cjs} +7 -7
  16. package/dist/{calendar-kn4SrtJy.cjs → calendar-BxF81kB9.cjs} +28 -27
  17. package/dist/{calendar-pOW3R5Pw.js → calendar-DRmxORMc.js} +82 -68
  18. package/dist/{card-CETDFkxR.cjs → card-Cg1daj05.cjs} +26 -26
  19. package/dist/{card-zQ0eKRMV.js → card-W_Jb0Tlo.js} +44 -44
  20. package/dist/{checkbox-CQNr_sEg.cjs → checkbox-BHQv8lHq.cjs} +11 -11
  21. package/dist/{checkbox-CH7NpINF.js → checkbox-BQw2dMSX.js} +23 -23
  22. package/dist/{class-map-BeimMvPv.cjs → class-map-C33ixq7O.cjs} +1 -1
  23. package/dist/{class-map-CnWCnBSX.js → class-map-wh4Yi3oj.js} +3 -3
  24. package/dist/{combobox-Bvg0UO9w.cjs → combobox-BpZow9OU.cjs} +19 -18
  25. package/dist/{combobox-CRdYYlxu.js → combobox-C9wwnUfM.js} +55 -54
  26. package/dist/components/accordion/accordion.d.ts +2 -6
  27. package/dist/components/accordion/accordionitem.d.ts +2 -8
  28. package/dist/components/alert/alert.d.ts +2 -2
  29. package/dist/components/backlink/backlink.d.ts +4 -5
  30. package/dist/components/backlink/backlink.test.d.ts +1 -1
  31. package/dist/components/breadcrumbs/breadcrumbs.d.ts +6 -7
  32. package/dist/components/breadcrumbs/index.d.ts +1 -1
  33. package/dist/components/calendar/calendar.d.ts +21 -6
  34. package/dist/components/checkbox/checkbox.d.ts +4 -2
  35. package/dist/components/combobox/combobox-base.d.ts +2 -1
  36. package/dist/components/consent/strings.d.ts +1 -85
  37. package/dist/components/datepicker/datepicker-base.d.ts +0 -3
  38. package/dist/components/datepicker/datepicker-multiple.d.ts +0 -2
  39. package/dist/components/datepicker/datepicker-range.d.ts +0 -2
  40. package/dist/components/datepicker/datepicker-single.d.ts +0 -2
  41. package/dist/components/datepicker/datepicker-utils.d.ts +2 -1
  42. package/dist/components/fileupload/fileupload-base.d.ts +7 -4
  43. package/dist/components/fileupload/fileupload-types.d.ts +5 -43
  44. package/dist/components/header/header-service.d.ts +3 -1
  45. package/dist/components/header/header.d.ts +2 -1
  46. package/dist/components/helptext/helptext.d.ts +2 -1
  47. package/dist/components/index.d.ts +3 -1
  48. package/dist/components/input-wrapper/input-wrapper.d.ts +4 -2
  49. package/dist/components/radiobutton/radiobutton.d.ts +4 -2
  50. package/dist/components/searchinput/searchinput.d.ts +2 -1
  51. package/dist/{consent-CyY3RyoC.cjs → consent-CPtr7cBw.cjs} +5 -5
  52. package/dist/{consent-DZEkhgJ1.js → consent-D8MrqGKk.js} +10 -10
  53. package/dist/controllers/strings-controller.d.ts +27 -0
  54. package/dist/{datepicker-ButIas85.js → datepicker-D4YnAtWG.js} +104 -104
  55. package/dist/{datepicker-VTqSDQk5.cjs → datepicker-DaoumZT9.cjs} +38 -37
  56. package/dist/define-component-spec-BYOSeplU.js +6 -0
  57. package/dist/define-component-spec-DBNd2FJY.cjs +1 -0
  58. package/dist/{directive-helpers-CI8YZqku.js → directive-helpers-BWSAVe00.js} +1 -1
  59. package/dist/{directive-helpers-BlAV5EQD.cjs → directive-helpers-C6J4AkFk.cjs} +1 -1
  60. package/dist/docs/components/alert.d.ts +2 -3
  61. package/dist/docs/components/fileupload.d.ts +1 -0
  62. package/dist/element-DiFhBcIl.cjs +2 -0
  63. package/dist/{element-ChsFgr_B.js → element-WEzISABa.js} +241 -100
  64. package/dist/{element-with-slot-BvG9ctC-.js → element-with-slot-BKYUx4gb.js} +4 -4
  65. package/dist/{element-with-slot-Bj7nm7fO.cjs → element-with-slot-CBK4zrdN.cjs} +1 -1
  66. package/dist/{fileupload-D5IQ9HDe.js → fileupload-DEHSETw0.js} +340 -652
  67. package/dist/fileupload-DWu6FIMv.cjs +402 -0
  68. package/dist/{footer-DrR64HiK.js → footer-BJLEw6Ab.js} +91 -91
  69. package/dist/{footer-DbYQUYNR.cjs → footer-D_yYWkQ6.cjs} +32 -32
  70. package/dist/format-B8meU8Tm.cjs +1 -0
  71. package/dist/format-BTeSVkED.js +18 -0
  72. package/dist/{header-ClgIac6n.cjs → header-B7_4Cwaq.cjs} +84 -84
  73. package/dist/{header-KvJ1mGwA.js → header-DLVq7-dM.js} +267 -264
  74. package/dist/{header-menu-hVPXsb8g.js → header-menu-BsrrTjpT.js} +75 -75
  75. package/dist/{header-menu-BAsUNKSx.cjs → header-menu-m7nOOC1g.cjs} +24 -24
  76. package/dist/{heading-g-_IUB5T.js → heading-DSArgrDK.js} +16 -16
  77. package/dist/{heading-CFmiSuCQ.cjs → heading-_RPw2UW9.cjs} +1 -1
  78. package/dist/helptext-QMVsW5g6.cjs +27 -0
  79. package/dist/{helptext-DZng1D5i.js → helptext-dtVVufNH.js} +18 -19
  80. package/dist/{icon-D-LA22xD.js → icon-DEtOSWRK.js} +17 -17
  81. package/dist/{icon-9iwd2F2l.cjs → icon-DIavy2cB.cjs} +1 -1
  82. package/dist/{if-defined-CGzIlZ9-.js → if-defined-BmnvvxtR.js} +1 -1
  83. package/dist/if-defined-Dc3xFDaM.cjs +1 -0
  84. package/dist/input-element-DQY1Rpbp.cjs +1 -0
  85. package/dist/{input-element-DBMNBplu.js → input-element-IBypGOaV.js} +121 -120
  86. package/dist/input-wrapper-CQgAL1Br.js +308 -0
  87. package/dist/input-wrapper-mJZLVXy_.cjs +58 -0
  88. package/dist/link-DwLeY37f.js +131 -0
  89. package/dist/link-yk4IXDWm.cjs +7 -0
  90. package/dist/linkcard-BinKnxQF.cjs +13 -0
  91. package/dist/{linkcard-zqbg7Oqm.js → linkcard-D5DXpmXI.js} +16 -16
  92. package/dist/{listbox-Dc4rGdPi.cjs → listbox-C5zTRNAO.cjs} +15 -15
  93. package/dist/{listbox-va_E8afs.js → listbox-C8ooO8qZ.js} +100 -99
  94. package/dist/{loader-D_RDICnw.js → loader-C3HyayzL.js} +14 -14
  95. package/dist/{loader-CMUkVJmE.cjs → loader-DHF7M5Vn.cjs} +5 -5
  96. package/dist/{messagebox-Cv8LaSxv.cjs → messagebox-DqYf6VmQ.cjs} +5 -5
  97. package/dist/{messagebox-Cw-OWDya.js → messagebox-u8i3R5QA.js} +15 -15
  98. package/dist/{modal-BtInv031.cjs → modal-CnJ9y2TQ.cjs} +8 -8
  99. package/dist/{modal-D0t_X2dX.js → modal-V-jEe0aY.js} +20 -20
  100. package/dist/pkt-accordion.cjs +1 -1
  101. package/dist/pkt-accordion.js +1 -1
  102. package/dist/pkt-alert.cjs +1 -1
  103. package/dist/pkt-alert.js +1 -1
  104. package/dist/pkt-backlink.cjs +1 -1
  105. package/dist/pkt-backlink.js +1 -1
  106. package/dist/pkt-breadcrumbs.cjs +1 -1
  107. package/dist/pkt-breadcrumbs.js +1 -1
  108. package/dist/pkt-button.cjs +1 -1
  109. package/dist/pkt-button.js +1 -1
  110. package/dist/pkt-calendar.cjs +1 -1
  111. package/dist/pkt-calendar.js +1 -1
  112. package/dist/pkt-card.cjs +1 -1
  113. package/dist/pkt-card.js +1 -1
  114. package/dist/pkt-checkbox.cjs +1 -1
  115. package/dist/pkt-checkbox.js +1 -1
  116. package/dist/pkt-combobox.cjs +1 -1
  117. package/dist/pkt-combobox.js +1 -1
  118. package/dist/pkt-consent.cjs +1 -1
  119. package/dist/pkt-consent.js +1 -1
  120. package/dist/pkt-datepicker.cjs +1 -1
  121. package/dist/pkt-datepicker.js +1 -1
  122. package/dist/pkt-fileupload.cjs +1 -1
  123. package/dist/pkt-fileupload.js +1 -1
  124. package/dist/pkt-footer.cjs +1 -1
  125. package/dist/pkt-footer.js +1 -1
  126. package/dist/pkt-header-menu.cjs +1 -1
  127. package/dist/pkt-header-menu.js +1 -1
  128. package/dist/pkt-header.cjs +1 -1
  129. package/dist/pkt-header.js +1 -1
  130. package/dist/pkt-heading.cjs +1 -1
  131. package/dist/pkt-heading.js +1 -1
  132. package/dist/pkt-helptext.cjs +1 -1
  133. package/dist/pkt-helptext.js +1 -1
  134. package/dist/pkt-icon.cjs +1 -1
  135. package/dist/pkt-icon.js +1 -1
  136. package/dist/pkt-index.cjs +1 -1
  137. package/dist/pkt-index.js +35 -34
  138. package/dist/pkt-input-wrapper.cjs +1 -1
  139. package/dist/pkt-input-wrapper.js +1 -1
  140. package/dist/pkt-link.cjs +1 -1
  141. package/dist/pkt-link.js +1 -1
  142. package/dist/pkt-linkcard.cjs +1 -1
  143. package/dist/pkt-linkcard.js +1 -1
  144. package/dist/pkt-listbox.cjs +1 -1
  145. package/dist/pkt-listbox.js +1 -1
  146. package/dist/pkt-loader.cjs +1 -1
  147. package/dist/pkt-loader.js +1 -1
  148. package/dist/pkt-messagebox.cjs +1 -1
  149. package/dist/pkt-messagebox.js +1 -1
  150. package/dist/pkt-modal.cjs +1 -1
  151. package/dist/pkt-modal.js +1 -1
  152. package/dist/{pkt-options-controller-C5EBX2T0.cjs → pkt-options-controller-BhMNCWcc.cjs} +1 -1
  153. package/dist/{pkt-options-controller-B77vH3PE.js → pkt-options-controller-CuQ6SClv.js} +1 -1
  154. package/dist/pkt-progressbar.cjs +1 -1
  155. package/dist/pkt-progressbar.js +1 -1
  156. package/dist/pkt-radiobutton.cjs +1 -1
  157. package/dist/pkt-radiobutton.js +1 -1
  158. package/dist/pkt-searchinput.cjs +1 -1
  159. package/dist/pkt-searchinput.js +1 -1
  160. package/dist/pkt-select.cjs +1 -1
  161. package/dist/pkt-select.js +1 -1
  162. package/dist/pkt-tabs.cjs +1 -1
  163. package/dist/pkt-tabs.js +1 -1
  164. package/dist/pkt-tag.cjs +1 -1
  165. package/dist/pkt-tag.js +1 -1
  166. package/dist/pkt-textarea.cjs +1 -1
  167. package/dist/pkt-textarea.js +1 -1
  168. package/dist/pkt-textinput.cjs +1 -1
  169. package/dist/pkt-textinput.js +1 -1
  170. package/dist/pkt-timepicker.cjs +1 -1
  171. package/dist/pkt-timepicker.js +1 -1
  172. package/dist/{progressbar-CbcfLerF.js → progressbar-DS4i8IWq.js} +21 -21
  173. package/dist/{progressbar-D5MmnQId.cjs → progressbar-DY5hxImR.cjs} +5 -5
  174. package/dist/{radiobutton-BUnf3EPi.js → radiobutton-BhvZztMZ.js} +24 -24
  175. package/dist/{radiobutton-DpsO1F-8.cjs → radiobutton-BswqwRnA.cjs} +8 -8
  176. package/dist/{ref-CQoEIIp0.cjs → ref-DZmN5Qgj.cjs} +1 -1
  177. package/dist/{ref-CWD6PjVd.js → ref-OU8ryfP6.js} +2 -2
  178. package/dist/{repeat-sY6B7fAT.cjs → repeat-DIa_g6WL.cjs} +1 -1
  179. package/dist/{repeat-C02g7d5S.js → repeat-Dx2H127b.js} +4 -4
  180. package/dist/{searchinput-DwnjsvJ1.js → searchinput-CJo1PpM7.js} +43 -43
  181. package/dist/searchinput-Cl46nW0r.cjs +60 -0
  182. package/dist/{select-DMre80qs.js → select-CBrjauXT.js} +21 -20
  183. package/dist/{select-BOJi6H6T.cjs → select-Dman8Skr.cjs} +4 -3
  184. package/dist/shared-strings/consent.d.ts +71 -0
  185. package/dist/shared-strings/format.d.ts +21 -0
  186. package/dist/shared-strings/index.d.ts +14 -0
  187. package/dist/shared-strings/nb.d.ts +121 -0
  188. package/dist/shared-strings/resolve.d.ts +12 -0
  189. package/dist/shared-strings/store.d.ts +27 -0
  190. package/dist/shared-strings/types.d.ts +40 -0
  191. package/dist/shared-types/accordion.d.ts +58 -0
  192. package/dist/shared-types/alert.d.ts +20 -0
  193. package/dist/shared-types/aria.d.ts +2 -1
  194. package/dist/shared-types/backlink.d.ts +23 -0
  195. package/dist/shared-types/breadcrumbs.d.ts +33 -0
  196. package/dist/shared-types/fileupload.d.ts +55 -28
  197. package/dist/shared-types/footer.d.ts +10 -0
  198. package/dist/shared-types/form-field.d.ts +45 -0
  199. package/dist/shared-types/header-footer.d.ts +2 -0
  200. package/dist/shared-types/index.d.ts +15 -6
  201. package/dist/shared-types/render-link.d.ts +22 -0
  202. package/dist/shared-types/skin.d.ts +2 -9
  203. package/dist/shared-utils/combobox/index.d.ts +1 -0
  204. package/dist/shared-utils/combobox/input-utils.d.ts +2 -1
  205. package/dist/shared-utils/combobox/messages.d.ts +7 -0
  206. package/dist/shared-utils/combobox/option-utils.d.ts +2 -1
  207. package/dist/shared-utils/combobox/selection-manager.d.ts +3 -2
  208. package/dist/{tabs-Cf9ai0FD.cjs → tabs-C1m5rSrR.cjs} +7 -7
  209. package/dist/{tabs-TvxgbrCF.js → tabs-Xu3mIedh.js} +32 -32
  210. package/dist/{tag-Ds6n1LIs.js → tag-Azkjhkeu.js} +33 -32
  211. package/dist/tag-BS6dDPxY.cjs +27 -0
  212. package/dist/tests/strings-override.test.d.ts +0 -0
  213. package/dist/{textarea-vfzIcXhX.js → textarea-D4qXcVGD.js} +30 -29
  214. package/dist/{textarea-BydiLM9Z.cjs → textarea-DftUkR6w.cjs} +3 -2
  215. package/dist/{textinput-DGdicNSx.cjs → textinput-Ar-1Sbqy.cjs} +13 -12
  216. package/dist/{textinput-CMP2jPP_.js → textinput-iCgwwNPU.js} +28 -27
  217. package/dist/{timepicker-ClwgYywH.js → timepicker-W6HVWtmA.js} +67 -64
  218. package/dist/timepicker-dpAF7h49.cjs +196 -0
  219. package/package.json +3 -3
  220. package/src/components/accordion/accordion.ts +2 -10
  221. package/src/components/accordion/accordionitem.ts +2 -9
  222. package/src/components/alert/alert.ts +19 -10
  223. package/src/components/backlink/backlink.test.ts +3 -3
  224. package/src/components/backlink/backlink.ts +5 -7
  225. package/src/components/breadcrumbs/breadcrumbs.ts +9 -10
  226. package/src/components/breadcrumbs/index.ts +1 -1
  227. package/src/components/calendar/calendar.ts +56 -26
  228. package/src/components/checkbox/checkbox.test.ts +0 -2
  229. package/src/components/checkbox/checkbox.ts +8 -4
  230. package/src/components/combobox/combobox-base.ts +2 -1
  231. package/src/components/combobox/combobox-value.ts +10 -9
  232. package/src/components/combobox/combobox.selection.test.ts +5 -1
  233. package/src/components/combobox/combobox.ts +4 -1
  234. package/src/components/consent/strings.ts +1 -125
  235. package/src/components/datepicker/date-tags.ts +4 -1
  236. package/src/components/datepicker/datepicker-base.ts +2 -6
  237. package/src/components/datepicker/datepicker-multiple.ts +0 -3
  238. package/src/components/datepicker/datepicker-range.ts +4 -7
  239. package/src/components/datepicker/datepicker-single.ts +0 -3
  240. package/src/components/datepicker/datepicker-utils.test.ts +5 -5
  241. package/src/components/datepicker/datepicker-utils.ts +6 -11
  242. package/src/components/datepicker/datepicker.ts +8 -1
  243. package/src/components/fileupload/fileupload-base.ts +29 -19
  244. package/src/components/fileupload/fileupload-renderers.ts +2 -1
  245. package/src/components/fileupload/fileupload-types.ts +5 -42
  246. package/src/components/fileupload/fileupload.test.ts +16 -0
  247. package/src/components/fileupload/fileupload.ts +19 -15
  248. package/src/components/header/header-global.ts +3 -3
  249. package/src/components/header/header-service.ts +13 -8
  250. package/src/components/header/header.ts +2 -1
  251. package/src/components/helptext/helptext.test.ts +1 -1
  252. package/src/components/helptext/helptext.ts +3 -3
  253. package/src/components/index.ts +10 -1
  254. package/src/components/input-wrapper/input-wrapper.ts +18 -10
  255. package/src/components/link/link.ts +8 -3
  256. package/src/components/listbox/listbox.ts +3 -3
  257. package/src/components/radiobutton/radiobutton.ts +8 -4
  258. package/src/components/searchinput/searchinput.ts +5 -3
  259. package/src/components/select/select.ts +1 -0
  260. package/src/components/tag/tag.ts +2 -1
  261. package/src/components/textarea/textarea.ts +1 -0
  262. package/src/components/textinput/textinput.ts +1 -0
  263. package/src/components/timepicker/timepicker.ts +23 -21
  264. package/dist/alert-Cs4Rmq_J.cjs +0 -33
  265. package/dist/element-BA8v6S7z.cjs +0 -2
  266. package/dist/fileupload-BeWiTAoW.cjs +0 -401
  267. package/dist/helptext-CTtKJcML.cjs +0 -27
  268. package/dist/if-defined-B89_ZeCj.cjs +0 -1
  269. package/dist/input-element-DYmQw-fH.cjs +0 -1
  270. package/dist/input-wrapper-BmxNvznr.js +0 -128
  271. package/dist/input-wrapper-D-fPaTbY.js +0 -176
  272. package/dist/input-wrapper-D5PR0rJn.cjs +0 -1
  273. package/dist/input-wrapper-Q-B-aBeb.cjs +0 -54
  274. package/dist/link-D-Eqm5KH.js +0 -98
  275. package/dist/link-DK7gvmnj.cjs +0 -7
  276. package/dist/linkcard-B29cmZqh.cjs +0 -13
  277. package/dist/searchinput-Bh975rjX.cjs +0 -60
  278. package/dist/tag-CzojNU7z.cjs +0 -27
  279. package/dist/timepicker-DYrnLHqN.cjs +0 -195
  280. package/dist/translations/no.json.d.ts +0 -94
@@ -1,8 +1,8 @@
1
- import { a as e, n as t, o as n, p as r, s as i } from "./element-ChsFgr_B.js";
2
- import { n as a, t as o } from "./element-with-slot-BvG9ctC-.js";
3
- import { t as s } from "./if-defined-CGzIlZ9-.js";
1
+ import { _ as e, d as t, l as n, n as r, u as i } from "./element-WEzISABa.js";
2
+ import { n as a, t as o } from "./element-with-slot-BKYUx4gb.js";
3
+ import { t as s } from "./if-defined-BmnvvxtR.js";
4
4
  import { n as c, r as l, t as u } from "./consume-BDnMAp2g.js";
5
- import { n as d, t as f } from "./ref-CWD6PjVd.js";
5
+ import { n as d, t as f } from "./ref-OU8ryfP6.js";
6
6
  //#region src/components/tabs/tabs-context.ts
7
7
  var p = l(Symbol("pkt-tabs-context")), m = class extends o {
8
8
  constructor(...e) {
@@ -75,33 +75,33 @@ var p = l(Symbol("pkt-tabs-context")), m = class extends o {
75
75
  }
76
76
  }
77
77
  render() {
78
- let e = this.useArrowNav ? "tablist" : "navigation", t = this.separatorIconName || this.separatorIconPath ? "pkt-tabs pkt-tabs--with-separator" : "pkt-tabs";
79
- return r`
80
- <div class=${t}>
81
- <div class="pkt-tabs__list" role=${e}>${a(this)}</div>
78
+ let t = this.useArrowNav ? "tablist" : "navigation", n = this.separatorIconName || this.separatorIconPath ? "pkt-tabs pkt-tabs--with-separator" : "pkt-tabs";
79
+ return e`
80
+ <div class=${n}>
81
+ <div class="pkt-tabs__list" role=${t}>${a(this)}</div>
82
82
  </div>
83
83
  `;
84
84
  }
85
85
  };
86
- t([n({
86
+ r([i({
87
87
  type: Boolean,
88
88
  reflect: !0,
89
89
  attribute: "arrow-nav"
90
- })], m.prototype, "arrowNav", void 0), t([n({
90
+ })], m.prototype, "arrowNav", void 0), r([i({
91
91
  type: Boolean,
92
92
  reflect: !0,
93
93
  attribute: "disable-arrow-nav"
94
- })], m.prototype, "disableArrowNav", void 0), t([n({
94
+ })], m.prototype, "disableArrowNav", void 0), r([i({
95
95
  type: String,
96
96
  reflect: !0,
97
97
  attribute: "separator-icon-name"
98
- })], m.prototype, "separatorIconName", void 0), t([n({
98
+ })], m.prototype, "separatorIconName", void 0), r([i({
99
99
  type: String,
100
100
  reflect: !0,
101
101
  attribute: "separator-icon-path"
102
- })], m.prototype, "separatorIconPath", void 0), t([e()], m.prototype, "tabRefs", void 0), t([e()], m.prototype, "disabledMap", void 0), t([e()], m.prototype, "tabCount", void 0), t([c({ context: p }), e()], m.prototype, "context", void 0);
102
+ })], m.prototype, "separatorIconPath", void 0), r([n()], m.prototype, "tabRefs", void 0), r([n()], m.prototype, "disabledMap", void 0), r([n()], m.prototype, "tabCount", void 0), r([c({ context: p }), n()], m.prototype, "context", void 0);
103
103
  try {
104
- i("pkt-tabs")(m);
104
+ t("pkt-tabs")(m);
105
105
  } catch {
106
106
  console.warn("Forsøker å definere <pkt-tabs>, men den er allerede definert");
107
107
  }
@@ -134,16 +134,16 @@ var h = class extends o {
134
134
  this.context && this.context.handleKeyUp(e, this.index);
135
135
  }
136
136
  render() {
137
- let e = this.context?.useArrowNav ?? !0, t = this.active && !this.disabled, n = [t ? "active" : "", this.disabled ? "pkt-tabs__item--disabled" : ""].filter(Boolean).join(" "), i = e ? "tab" : void 0, o = e ? t : void 0, c = this.disabled ? -1 : t || !e ? void 0 : -1, l = `pkt-icon--small ${this.icon === "check" ? "pkt-tabs__status-icon" : ""}`, u = r`
138
- ${this.icon ? r`<pkt-icon name=${this.icon} class=${l}></pkt-icon>` : ""}
137
+ let t = this.context?.useArrowNav ?? !0, n = this.active && !this.disabled, r = [n ? "active" : "", this.disabled ? "pkt-tabs__item--disabled" : ""].filter(Boolean).join(" "), i = t ? "tab" : void 0, o = t ? n : void 0, c = this.disabled ? -1 : n || !t ? void 0 : -1, l = `pkt-icon--small ${this.icon === "check" ? "pkt-tabs__status-icon" : ""}`, u = e`
138
+ ${this.icon ? e`<pkt-icon name=${this.icon} class=${l}></pkt-icon>` : ""}
139
139
  <span>${a(this)}</span>
140
- ${this.tag ? r`<pkt-tag skin=${this.tagSkin} size="small">${this.tag}</pkt-tag>` : ""}
140
+ ${this.tag ? e`<pkt-tag skin=${this.tagSkin} size="small">${this.tag}</pkt-tag>` : ""}
141
141
  `;
142
- return this.href ? r`
142
+ return this.href ? e`
143
143
  <a
144
144
  ${d(this.elementRef)}
145
145
  href=${s(this.disabled ? void 0 : this.href)}
146
- class="pkt-tabs__link ${n}"
146
+ class="pkt-tabs__link ${r}"
147
147
  role=${s(i)}
148
148
  aria-selected=${s(o)}
149
149
  aria-disabled=${s(this.disabled ? "true" : void 0)}
@@ -154,11 +154,11 @@ var h = class extends o {
154
154
  >
155
155
  ${u}
156
156
  </a>
157
- ` : r`
157
+ ` : e`
158
158
  <button
159
159
  ${d(this.elementRef)}
160
160
  type="button"
161
- class="pkt-tabs__button pkt-link-button ${n}"
161
+ class="pkt-tabs__button pkt-link-button ${r}"
162
162
  ?disabled=${this.disabled}
163
163
  aria-disabled=${s(this.disabled ? "true" : void 0)}
164
164
  role=${s(i)}
@@ -173,37 +173,37 @@ var h = class extends o {
173
173
  `;
174
174
  }
175
175
  };
176
- t([n({
176
+ r([i({
177
177
  type: Boolean,
178
178
  reflect: !0
179
- })], h.prototype, "active", void 0), t([n({
179
+ })], h.prototype, "active", void 0), r([i({
180
180
  type: Boolean,
181
181
  reflect: !0
182
- })], h.prototype, "disabled", void 0), t([n({
182
+ })], h.prototype, "disabled", void 0), r([i({
183
183
  type: String,
184
184
  reflect: !0
185
- })], h.prototype, "href", void 0), t([n({
185
+ })], h.prototype, "href", void 0), r([i({
186
186
  type: String,
187
187
  reflect: !0
188
- })], h.prototype, "icon", void 0), t([n({
188
+ })], h.prototype, "icon", void 0), r([i({
189
189
  type: String,
190
190
  reflect: !0
191
- })], h.prototype, "controls", void 0), t([n({
191
+ })], h.prototype, "controls", void 0), r([i({
192
192
  type: String,
193
193
  reflect: !0
194
- })], h.prototype, "tag", void 0), t([n({
194
+ })], h.prototype, "tag", void 0), r([i({
195
195
  type: String,
196
196
  reflect: !0,
197
197
  attribute: "tag-skin"
198
- })], h.prototype, "tagSkin", void 0), t([n({
198
+ })], h.prototype, "tagSkin", void 0), r([i({
199
199
  type: Number,
200
200
  reflect: !0
201
- })], h.prototype, "index", void 0), t([u({
201
+ })], h.prototype, "index", void 0), r([u({
202
202
  context: p,
203
203
  subscribe: !0
204
- }), n({ attribute: !1 })], h.prototype, "context", void 0);
204
+ }), i({ attribute: !1 })], h.prototype, "context", void 0);
205
205
  try {
206
- i("pkt-tab-item")(h);
206
+ t("pkt-tab-item")(h);
207
207
  } catch {
208
208
  console.warn("Forsøker å definere <pkt-tab-item>, men den er allerede definert");
209
209
  }
@@ -1,9 +1,10 @@
1
- import { a as e, n as t, o as n, p as r, s as i } from "./element-ChsFgr_B.js";
2
- import { t as a } from "./class-map-CnWCnBSX.js";
3
- import { n as o, t as s } from "./element-with-slot-BvG9ctC-.js";
4
- import "./icon-D-LA22xD.js";
5
- import { t as c } from "./if-defined-CGzIlZ9-.js";
6
- var l = {
1
+ import { _ as e, d as t, l as n, n as r, u as i } from "./element-WEzISABa.js";
2
+ import { t as a } from "./class-map-wh4Yi3oj.js";
3
+ import { t as o } from "./format-BTeSVkED.js";
4
+ import { n as s, t as c } from "./element-with-slot-BKYUx4gb.js";
5
+ import "./icon-DEtOSWRK.js";
6
+ import { t as l } from "./if-defined-BmnvvxtR.js";
7
+ var u = {
7
8
  name: "pkt-tag",
8
9
  react: "PktTag",
9
10
  "css-class": "pkt-tag",
@@ -83,9 +84,9 @@ var l = {
83
84
  }
84
85
  },
85
86
  slots: { default: { description: "Teksten til tag" } }
86
- }, u = class extends s {
87
+ }, d = class extends c {
87
88
  constructor() {
88
- super(), this.closeTag = l.props.closeTag.default, this.size = l.props.size.default, this.skin = l.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = l.props.type.default, this.ariaLabel = null, this.buttonTabindex = void 0, this._isClosed = !1, this._ariaDescription = null, this.close = (e) => {
89
+ super(), this.closeTag = u.props.closeTag.default, this.size = u.props.size.default, this.skin = u.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = u.props.type.default, this.ariaLabel = null, this.buttonTabindex = void 0, this._isClosed = !1, this._ariaDescription = null, this.close = (e) => {
89
90
  this._isClosed = !0, this.dispatchEvent(new CustomEvent("close", {
90
91
  detail: { origin: e },
91
92
  bubbles: !1,
@@ -100,77 +101,77 @@ var l = {
100
101
  firstUpdated(e) {
101
102
  if (super.firstUpdated(e), this.closeTag && !this.ariaLabel) {
102
103
  let e = this.querySelector("button span, .pkt-tag > span")?.textContent?.trim();
103
- e && (this._ariaDescription = `Klikk for å fjerne ${e}`);
104
+ e && (this._ariaDescription = o(this.pktStrings.get("tag").remove, { label: e }));
104
105
  }
105
106
  }
106
107
  render() {
107
- let e = {
108
+ let t = {
108
109
  "pkt-tag": !0,
109
110
  [`pkt-tag--${this.size}`]: !!this.size,
110
111
  [`pkt-tag--${this.skin}`]: !!this.skin,
111
112
  [`pkt-tag--${this.textStyle}`]: !!this.textStyle
112
- }, t = {
113
+ }, n = {
113
114
  "pkt-tag": !0,
114
115
  [`pkt-tag--${this.textStyle}`]: !!this.textStyle,
115
116
  [`pkt-tag--${this.size}`]: !!this.size,
116
117
  [`pkt-tag--${this.skin}`]: !!this.skin,
117
118
  "pkt-hide": this._isClosed
118
119
  };
119
- return this.closeTag ? r`
120
+ return this.closeTag ? e`
120
121
  <button
121
- class=${a(t)}
122
+ class=${a(n)}
122
123
  type=${this.type}
123
- tabindex=${c(this.buttonTabindex)}
124
+ tabindex=${l(this.buttonTabindex)}
124
125
  @click=${this.close}
125
- aria-label=${c(this.ariaLabel || void 0)}
126
- aria-description=${c(this._ariaDescription || void 0)}
126
+ aria-label=${l(this.ariaLabel || void 0)}
127
+ aria-description=${l(this._ariaDescription || void 0)}
127
128
  >
128
- ${this.iconName && r`<pkt-icon
129
+ ${this.iconName && e`<pkt-icon
129
130
  class="pkt-tag__icon"
130
131
  name=${this.iconName}
131
132
  aria-hidden="true"
132
133
  ></pkt-icon>`}
133
- <span>${o(this)}</span>
134
+ <span>${s(this)}</span>
134
135
  <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
135
136
  </button>
136
- ` : r`
137
- <span class=${a(e)}>
138
- ${this.iconName && r`<pkt-icon
137
+ ` : e`
138
+ <span class=${a(t)}>
139
+ ${this.iconName && e`<pkt-icon
139
140
  class="pkt-tag__icon"
140
141
  name=${this.iconName}
141
142
  aria-hidden="true"
142
143
  ></pkt-icon>`}
143
- <span>${o(this)}</span>
144
+ <span>${s(this)}</span>
144
145
  </span>
145
146
  `;
146
147
  }
147
148
  };
148
- t([n({
149
+ r([i({
149
150
  type: Boolean,
150
151
  reflect: !0
151
- })], u.prototype, "closeTag", void 0), t([n({
152
+ })], d.prototype, "closeTag", void 0), r([i({
152
153
  type: String,
153
154
  reflect: !0
154
- })], u.prototype, "size", void 0), t([n({
155
+ })], d.prototype, "size", void 0), r([i({
155
156
  type: String,
156
157
  reflect: !0
157
- })], u.prototype, "skin", void 0), t([n({
158
+ })], d.prototype, "skin", void 0), r([i({
158
159
  type: String,
159
160
  reflect: !0
160
- })], u.prototype, "textStyle", void 0), t([n({
161
+ })], d.prototype, "textStyle", void 0), r([i({
161
162
  type: String,
162
163
  reflect: !0
163
- })], u.prototype, "iconName", void 0), t([n({ type: String })], u.prototype, "type", void 0), t([n({ type: String })], u.prototype, "ariaLabel", void 0), t([n({
164
+ })], d.prototype, "iconName", void 0), r([i({ type: String })], d.prototype, "type", void 0), r([i({ type: String })], d.prototype, "ariaLabel", void 0), r([i({
164
165
  type: Number,
165
166
  attribute: "button-tabindex"
166
- })], u.prototype, "buttonTabindex", void 0), t([e()], u.prototype, "_isClosed", void 0), t([e()], u.prototype, "_ariaDescription", void 0);
167
+ })], d.prototype, "buttonTabindex", void 0), r([n()], d.prototype, "_isClosed", void 0), r([n()], d.prototype, "_ariaDescription", void 0);
167
168
  try {
168
- i("pkt-tag")(u);
169
+ t("pkt-tag")(d);
169
170
  } catch {
170
171
  console.warn("Forsøker å definere <pkt-tag>, men den er allerede definert");
171
172
  }
172
173
  //#endregion
173
174
  //#region src/components/tag/index.ts
174
- var d = u;
175
+ var f = d;
175
176
  //#endregion
176
- export { u as n, d as t };
177
+ export { d as n, f as t };
@@ -0,0 +1,27 @@
1
+ const e=require("./element-DiFhBcIl.cjs"),t=require("./class-map-C33ixq7O.cjs"),n=require("./format-B8meU8Tm.cjs"),r=require("./element-with-slot-CBK4zrdN.cjs");require("./icon-DIavy2cB.cjs");const i=require("./if-defined-Dc3xFDaM.cjs");var a={name:`pkt-tag`,react:`PktTag`,"css-class":`pkt-tag`,isElement:!0,"dark-mode":!0,props:{size:{name:`Størrelse`,description:`Størrelsen på taggen`,required:!1,default:`medium`,type:[`small`,`medium`,`large`],category:`ui`},iconName:{name:`Ikon`,description:`Navnet på ikonet som skal vises i taggen`,type:`icon`,required:!1,category:`ui`},skin:{name:`Utseende`,description:`Utseendet til taggen`,required:!1,default:`blue`,type:[`blue`,`blue-light`,`blue-dark`,`green`,`red`,`beige`,`yellow`,`gray`],category:`ui`},closeTag:{name:`Lukk tag`,description:`Skal taggen ha en lukkeknapp?`,type:`boolean`,required:!1,default:!1,category:`ui`},textStyle:{name:`Tekststil`,description:`Stilen på teksten i taggen`,required:!1,default:`normal-text`,type:[`thin-text`,`normal-text`],category:`ui`},type:{name:`Type, dersom lukkeknapp`,description:`Type tag, brukes for å spesifisere om det er en knapp, submit eller reset`,required:!1,default:`button`,type:[`button`,`submit`,`reset`],category:`tech`},ariaLabel:{name:`aria-label`,description:`aria-label for taggen, brukes for tilgjengelighet`,type:`string`,required:!1,category:`accessibility`}},slots:{default:{description:`Teksten til tag`}}},o=class extends r.t{constructor(){super(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=a.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){if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){let e=this.querySelector(`button span, .pkt-tag > span`)?.textContent?.trim();e&&(this._ariaDescription=n.t(this.pktStrings.get(`tag`).remove,{label:e}))}}render(){let n={"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-tag--${this.textStyle}`]:!!this.textStyle,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,"pkt-hide":this._isClosed};return this.closeTag?e._`
2
+ <button
3
+ class=${t.t(a)}
4
+ type=${this.type}
5
+ tabindex=${i.t(this.buttonTabindex)}
6
+ @click=${this.close}
7
+ aria-label=${i.t(this.ariaLabel||void 0)}
8
+ aria-description=${i.t(this._ariaDescription||void 0)}
9
+ >
10
+ ${this.iconName&&e._`<pkt-icon
11
+ class="pkt-tag__icon"
12
+ name=${this.iconName}
13
+ aria-hidden="true"
14
+ ></pkt-icon>`}
15
+ <span>${r.n(this)}</span>
16
+ <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
17
+ </button>
18
+ `:e._`
19
+ <span class=${t.t(n)}>
20
+ ${this.iconName&&e._`<pkt-icon
21
+ class="pkt-tag__icon"
22
+ name=${this.iconName}
23
+ aria-hidden="true"
24
+ ></pkt-icon>`}
25
+ <span>${r.n(this)}</span>
26
+ </span>
27
+ `}};e.n([e.u({type:Boolean,reflect:!0})],o.prototype,`closeTag`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`size`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`skin`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`textStyle`,void 0),e.n([e.u({type:String,reflect:!0})],o.prototype,`iconName`,void 0),e.n([e.u({type:String})],o.prototype,`type`,void 0),e.n([e.u({type:String})],o.prototype,`ariaLabel`,void 0),e.n([e.u({type:Number,attribute:`button-tabindex`})],o.prototype,`buttonTabindex`,void 0),e.n([e.l()],o.prototype,`_isClosed`,void 0),e.n([e.l()],o.prototype,`_ariaDescription`,void 0);try{e.d(`pkt-tag`)(o)}catch{console.warn(`Forsøker å definere <pkt-tag>, men den er allerede definert`)}var s=o;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
File without changes
@@ -1,29 +1,29 @@
1
- import { a as e, c as t, d as n, f as r, l as i, n as a, o, p as s, s as c, u as l } from "./element-ChsFgr_B.js";
2
- import { t as u } from "./class-map-CnWCnBSX.js";
3
- import { i as d, r as f } from "./directive-helpers-CI8YZqku.js";
4
- import { n as p } from "./element-with-slot-BvG9ctC-.js";
5
- import "./icon-D-LA22xD.js";
6
- import { t as m } from "./if-defined-CGzIlZ9-.js";
7
- import { n as h, t as g } from "./ref-CWD6PjVd.js";
8
- import { t as _ } from "./input-element-DBMNBplu.js";
9
- import { r as v } from "./input-wrapper-BmxNvznr.js";
1
+ import { _ as e, d as t, f as n, g as r, h as i, l as a, m as o, n as s, p as c, u as l } from "./element-WEzISABa.js";
2
+ import { t as u } from "./class-map-wh4Yi3oj.js";
3
+ import { i as d, r as f } from "./directive-helpers-BWSAVe00.js";
4
+ import { n as p } from "./element-with-slot-BKYUx4gb.js";
5
+ import "./icon-DEtOSWRK.js";
6
+ import { t as m } from "./if-defined-BmnvvxtR.js";
7
+ import { n as h, t as g } from "./ref-OU8ryfP6.js";
8
+ import { t as _ } from "./input-element-IBypGOaV.js";
9
+ import { r as v } from "./input-wrapper-CQgAL1Br.js";
10
10
  //#region ../../node_modules/lit-html/directives/live.js
11
- var y = t(class extends i {
11
+ var y = n(class extends c {
12
12
  constructor(e) {
13
- if (super(e), e.type !== l.PROPERTY && e.type !== l.ATTRIBUTE && e.type !== l.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
13
+ if (super(e), e.type !== o.PROPERTY && e.type !== o.ATTRIBUTE && e.type !== o.BOOLEAN_ATTRIBUTE) throw Error("The `live` directive is not allowed on child or event bindings");
14
14
  if (!d(e)) throw Error("`live` bindings can only contain a single expression");
15
15
  }
16
16
  render(e) {
17
17
  return e;
18
18
  }
19
19
  update(e, [t]) {
20
- if (t === r || t === n) return t;
21
- let i = e.element, a = e.name;
22
- if (e.type === l.PROPERTY) {
23
- if (t === i[a]) return r;
24
- } else if (e.type === l.BOOLEAN_ATTRIBUTE) {
25
- if (!!t === i.hasAttribute(a)) return r;
26
- } else if (e.type === l.ATTRIBUTE && i.getAttribute(a) === t + "") return r;
20
+ if (t === r || t === i) return t;
21
+ let n = e.element, a = e.name;
22
+ if (e.type === o.PROPERTY) {
23
+ if (t === n[a]) return r;
24
+ } else if (e.type === o.BOOLEAN_ATTRIBUTE) {
25
+ if (!!t === n.hasAttribute(a)) return r;
26
+ } else if (e.type === o.ATTRIBUTE && n.getAttribute(a) === t + "") return r;
27
27
  return f(e), t;
28
28
  }
29
29
  }), b = class extends _ {
@@ -37,15 +37,16 @@ var y = t(class extends i {
37
37
  super.updated(e), this.classList.add("pkt-textinput", "pkt-textarea"), e.has("value") && (this.counterCurrent = this.value?.length || 0, this.valueChanged(this.value, e.get("value"))), e.has("id") && !this.name && this.id && (this.name = this.id);
38
38
  }
39
39
  render() {
40
- let e = this.effectiveCounter(this.counterMaxLength > 0), t = u({
40
+ let t = this.effectiveCounter(this.counterMaxLength > 0), n = u({
41
41
  "pkt-input": !0,
42
42
  [`pkt-input--${this.inputSize}`]: !0,
43
43
  "pkt-input--fullwidth": this.fullwidth,
44
- "pkt-input--counter-error": e && this.counterMaxLength > 0 && this.value.length > this.counterMaxLength
45
- }), n = this.ariaLabelledby || `${this.id}-input-label`;
46
- return s`<pkt-input-wrapper
44
+ "pkt-input--counter-error": t && this.counterMaxLength > 0 && this.value.length > this.counterMaxLength
45
+ }), r = this.ariaLabelledby || `${this.id}-input-label`;
46
+ return e`<pkt-input-wrapper
47
+ .strings=${this.strings}
47
48
  label=${this.label}
48
- ?counter=${e}
49
+ ?counter=${t}
49
50
  ?hasFieldset=${this.effectiveHasFieldset(!1)}
50
51
  ?disabled=${this.disabled}
51
52
  ?hasError=${this.hasError}
@@ -70,7 +71,7 @@ var y = t(class extends i {
70
71
  <div class="pkt-contents" slot="helptext">${p(this, "helptext")}</div>
71
72
  <textarea
72
73
  ${h(this.inputRef)}
73
- class=${t}
74
+ class=${n}
74
75
  id=${this.id + "-input"}
75
76
  name=${(this.name || this.id) + "-input"}
76
77
  placeholder=${m(this.placeholder)}
@@ -79,13 +80,13 @@ var y = t(class extends i {
79
80
  maxlength=${m(this.maxlength)}
80
81
  ?readonly=${this.readonly}
81
82
  autocomplete=${this.autocomplete}
82
- aria-labelledby=${n}
83
+ aria-labelledby=${r}
83
84
  aria-invalid=${this.hasError}
84
85
  aria-errormessage=${m(this.hasError ? `${this.id}-input-error` : void 0)}
85
86
  aria-describedby=${m(v({
86
87
  id: this.id + "-input",
87
88
  hasHelptext: !!this.helptext,
88
- hasCounter: e,
89
+ hasCounter: t,
89
90
  ariaDescribedby: this.ariaDescribedby
90
91
  }))}
91
92
  rows=${m(this.rows ?? void 0)}
@@ -107,12 +108,12 @@ var y = t(class extends i {
107
108
  </pkt-input-wrapper>`;
108
109
  }
109
110
  };
110
- a([o({
111
+ s([l({
111
112
  type: String,
112
113
  reflect: !0
113
- })], b.prototype, "value", void 0), a([o({ type: String })], b.prototype, "autocomplete", void 0), a([o({ type: Number })], b.prototype, "rows", void 0), a([o({ type: Number })], b.prototype, "cols", void 0), a([e()], b.prototype, "counterCurrent", void 0);
114
+ })], b.prototype, "value", void 0), s([l({ type: String })], b.prototype, "autocomplete", void 0), s([l({ type: Number })], b.prototype, "rows", void 0), s([l({ type: Number })], b.prototype, "cols", void 0), s([a()], b.prototype, "counterCurrent", void 0);
114
115
  try {
115
- c("pkt-textarea")(b);
116
+ t("pkt-textarea")(b);
116
117
  } catch {
117
118
  console.warn("Forsøker å definere <pkt-textarea>, men den er allerede definert");
118
119
  }
@@ -1,4 +1,5 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./directive-helpers-BlAV5EQD.cjs"),r=require("./element-with-slot-Bj7nm7fO.cjs");require("./icon-9iwd2F2l.cjs");const i=require("./if-defined-B89_ZeCj.cjs"),a=require("./ref-CQoEIIp0.cjs"),o=require("./input-element-DYmQw-fH.cjs"),s=require("./input-wrapper-Q-B-aBeb.cjs");var c=e.c(class extends e.l{constructor(t){if(super(t),t.type!==e.u.PROPERTY&&t.type!==e.u.ATTRIBUTE&&t.type!==e.u.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!n.i(t))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(t,[r]){if(r===e.f||r===e.d)return r;let i=t.element,a=t.name;if(t.type===e.u.PROPERTY){if(r===i[a])return e.f}else if(t.type===e.u.BOOLEAN_ATTRIBUTE){if(!!r===i.hasAttribute(a))return e.f}else if(t.type===e.u.ATTRIBUTE&&i.getAttribute(a)===r+``)return e.f;return n.r(t),r}}),l=class extends o.t{constructor(...e){super(...e),this.inputRef=a.t(),this.value=``,this.autocomplete=`off`,this.rows=null,this.cols=null,this.counterCurrent=0}attributeChangedCallback(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`,`pkt-textarea`),e.has(`value`)&&(this.counterCurrent=this.value?.length||0,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}render(){let n=this.effectiveCounter(this.counterMaxLength>0),o=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":n&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),l=this.ariaLabelledby||`${this.id}-input-label`;return e.p`<pkt-input-wrapper
1
+ const e=require("./element-DiFhBcIl.cjs"),t=require("./class-map-C33ixq7O.cjs"),n=require("./directive-helpers-C6J4AkFk.cjs"),r=require("./element-with-slot-CBK4zrdN.cjs");require("./icon-DIavy2cB.cjs");const i=require("./if-defined-Dc3xFDaM.cjs"),a=require("./ref-DZmN5Qgj.cjs"),o=require("./input-element-DQY1Rpbp.cjs"),s=require("./input-wrapper-mJZLVXy_.cjs");var c=e.f(class extends e.p{constructor(t){if(super(t),t.type!==e.m.PROPERTY&&t.type!==e.m.ATTRIBUTE&&t.type!==e.m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!n.i(t))throw Error("`live` bindings can only contain a single expression")}render(e){return e}update(t,[r]){if(r===e.g||r===e.h)return r;let i=t.element,a=t.name;if(t.type===e.m.PROPERTY){if(r===i[a])return e.g}else if(t.type===e.m.BOOLEAN_ATTRIBUTE){if(!!r===i.hasAttribute(a))return e.g}else if(t.type===e.m.ATTRIBUTE&&i.getAttribute(a)===r+``)return e.g;return n.r(t),r}}),l=class extends o.t{constructor(...e){super(...e),this.inputRef=a.t(),this.value=``,this.autocomplete=`off`,this.rows=null,this.cols=null,this.counterCurrent=0}attributeChangedCallback(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`,`pkt-textarea`),e.has(`value`)&&(this.counterCurrent=this.value?.length||0,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}render(){let n=this.effectiveCounter(this.counterMaxLength>0),o=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":n&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),l=this.ariaLabelledby||`${this.id}-input-label`;return e._`<pkt-input-wrapper
2
+ .strings=${this.strings}
2
3
  label=${this.label}
3
4
  ?counter=${n}
4
5
  ?hasFieldset=${this.effectiveHasFieldset(!1)}
@@ -46,4 +47,4 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
46
47
  @focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
47
48
  @blur=${e=>{this.value=e.target.value,this.onBlur(),e.stopImmediatePropagation()}}
48
49
  ></textarea>
49
- </pkt-input-wrapper>`}};e.n([e.o({type:String,reflect:!0})],l.prototype,`value`,void 0),e.n([e.o({type:String})],l.prototype,`autocomplete`,void 0),e.n([e.o({type:Number})],l.prototype,`rows`,void 0),e.n([e.o({type:Number})],l.prototype,`cols`,void 0),e.n([e.a()],l.prototype,`counterCurrent`,void 0);try{e.s(`pkt-textarea`)(l)}catch{console.warn(`Forsøker å definere <pkt-textarea>, men den er allerede definert`)}var u=l;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
50
+ </pkt-input-wrapper>`}};e.n([e.u({type:String,reflect:!0})],l.prototype,`value`,void 0),e.n([e.u({type:String})],l.prototype,`autocomplete`,void 0),e.n([e.u({type:Number})],l.prototype,`rows`,void 0),e.n([e.u({type:Number})],l.prototype,`cols`,void 0),e.n([e.l()],l.prototype,`counterCurrent`,void 0);try{e.d(`pkt-textarea`)(l)}catch{console.warn(`Forsøker å definere <pkt-textarea>, men den er allerede definert`)}var u=l;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return u}});
@@ -1,5 +1,6 @@
1
- const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),n=require("./element-with-slot-Bj7nm7fO.cjs");require("./icon-9iwd2F2l.cjs");const r=require("./if-defined-B89_ZeCj.cjs"),i=require("./ref-CQoEIIp0.cjs"),a=require("./input-element-DYmQw-fH.cjs"),o=require("./input-wrapper-Q-B-aBeb.cjs");var s=class extends a.t{constructor(...e){super(...e),this.inputRef=i.t(),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(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`),e.has(`value`)&&(this.counterCurrent=this.value?.length||0,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}render(){let a=this.type===`search`&&!this.iconNameRight&&!this.omitSearchIcon,s=this.effectiveCounter(this.counterMaxLength>0),c=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":s&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),l=this.ariaLabelledby||`${this.id}-input-label`;return e.p`
1
+ const e=require("./element-DiFhBcIl.cjs"),t=require("./class-map-C33ixq7O.cjs"),n=require("./element-with-slot-CBK4zrdN.cjs");require("./icon-DIavy2cB.cjs");const r=require("./if-defined-Dc3xFDaM.cjs"),i=require("./ref-DZmN5Qgj.cjs"),a=require("./input-element-DQY1Rpbp.cjs"),o=require("./input-wrapper-mJZLVXy_.cjs");var s=class extends a.t{constructor(...e){super(...e),this.inputRef=i.t(),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(e,t,n){e===`value`&&this.value!==t&&(this.counterCurrent=n?n.length:0),super.attributeChangedCallback(e,t,n)}updated(e){super.updated(e),this.classList.add(`pkt-textinput`),e.has(`value`)&&(this.counterCurrent=this.value?.length||0,this.valueChanged(this.value,e.get(`value`))),e.has(`id`)&&!this.name&&this.id&&(this.name=this.id)}render(){let a=this.type===`search`&&!this.iconNameRight&&!this.omitSearchIcon,s=this.effectiveCounter(this.counterMaxLength>0),c=t.t({"pkt-input":!0,[`pkt-input--${this.inputSize}`]:!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":s&&this.counterMaxLength>0&&this.value.length>this.counterMaxLength}),l=this.ariaLabelledby||`${this.id}-input-label`;return e._`
2
2
  <pkt-input-wrapper
3
+ .strings=${this.strings}
3
4
  label="${this.label}"
4
5
  ?counter=${s}
5
6
  ?hasFieldset=${this.effectiveHasFieldset(!1)}
@@ -25,7 +26,7 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
25
26
  >
26
27
  <div class="pkt-contents" slot="helptext">${n.n(this,`helptext`)}</div>
27
28
  <div class=${`pkt-input__container pkt-input__container--${this.inputSize}`}>
28
- ${this.prefix?e.p`<div class="pkt-input-prefix">${this.prefix}</div>`:e.d}
29
+ ${this.prefix?e._`<div class="pkt-input-prefix">${this.prefix}</div>`:e.h}
29
30
  <input
30
31
  ${i.n(this.inputRef)}
31
32
  class=${c}
@@ -41,7 +42,7 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
41
42
  max=${r.t(this.max||void 0)}
42
43
  step=${r.t(this.step||void 0)}
43
44
  ?readonly=${this.readonly}
44
- size=${this.size||e.d}
45
+ size=${this.size||e.h}
45
46
  .value=${this.value}
46
47
  ?disabled=${this.disabled}
47
48
  aria-invalid=${this.hasError}
@@ -53,19 +54,19 @@ const e=require("./element-BA8v6S7z.cjs"),t=require("./class-map-BeimMvPv.cjs"),
53
54
  @blur=${e=>{this.value=e.target.value,this.onBlur(),e.stopImmediatePropagation()}}
54
55
  @keydown=${e=>{if(e.key===`Enter`){let e=this.internals.form;e?e.requestSubmit():this.inputRef.value?.blur()}}}
55
56
  />
56
- ${this.suffix?e.p`<div class="pkt-input-suffix">
57
+ ${this.suffix?e._`<div class="pkt-input-suffix">
57
58
  ${this.suffix}
58
- ${this.iconNameRight?e.p`<pkt-icon
59
+ ${this.iconNameRight?e._`<pkt-icon
59
60
  class="pkt-input-suffix-icon"
60
61
  name=${this.iconNameRight}
61
- ></pkt-icon>`:e.d}
62
- ${a?e.p`<pkt-icon
62
+ ></pkt-icon>`:e.h}
63
+ ${a?e._`<pkt-icon
63
64
  class="pkt-input-suffix-icon"
64
65
  name="magnifying-glass-big"
65
- ></pkt-icon>`:e.d}
66
- </div>`:e.d}
67
- ${!this.suffix&&this.iconNameRight?e.p`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>`:e.d}
68
- ${!this.suffix&&a?e.p`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>`:e.d}
66
+ ></pkt-icon>`:e.h}
67
+ </div>`:e.h}
68
+ ${!this.suffix&&this.iconNameRight?e._`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>`:e.h}
69
+ ${!this.suffix&&a?e._`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>`:e.h}
69
70
  </div>
70
71
  </pkt-input-wrapper>
71
- `}};e.n([e.o({type:String,reflect:!0})],s.prototype,`value`,void 0),e.n([e.o({type:String})],s.prototype,`type`,void 0),e.n([e.o({type:Number})],s.prototype,`size`,void 0),e.n([e.o({type:String})],s.prototype,`autocomplete`,void 0),e.n([e.o({type:String})],s.prototype,`iconNameRight`,void 0),e.n([e.o({type:String})],s.prototype,`prefix`,void 0),e.n([e.o({type:String})],s.prototype,`suffix`,void 0),e.n([e.o({type:Boolean})],s.prototype,`omitSearchIcon`,void 0),e.n([e.a()],s.prototype,`counterCurrent`,void 0);try{e.s(`pkt-textinput`)(s)}catch{console.warn(`Forsøker å definere <pkt-textinput>, men den er allerede definert`)}var c=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
72
+ `}};e.n([e.u({type:String,reflect:!0})],s.prototype,`value`,void 0),e.n([e.u({type:String})],s.prototype,`type`,void 0),e.n([e.u({type:Number})],s.prototype,`size`,void 0),e.n([e.u({type:String})],s.prototype,`autocomplete`,void 0),e.n([e.u({type:String})],s.prototype,`iconNameRight`,void 0),e.n([e.u({type:String})],s.prototype,`prefix`,void 0),e.n([e.u({type:String})],s.prototype,`suffix`,void 0),e.n([e.u({type:Boolean})],s.prototype,`omitSearchIcon`,void 0),e.n([e.l()],s.prototype,`counterCurrent`,void 0);try{e.d(`pkt-textinput`)(s)}catch{console.warn(`Forsøker å definere <pkt-textinput>, men den er allerede definert`)}var c=s;Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return c}});
@@ -1,11 +1,11 @@
1
- import { a as e, d as t, n, o as r, p as i, s as a } from "./element-ChsFgr_B.js";
2
- import { t as o } from "./class-map-CnWCnBSX.js";
3
- import { n as s } from "./element-with-slot-BvG9ctC-.js";
4
- import "./icon-D-LA22xD.js";
5
- import { t as c } from "./if-defined-CGzIlZ9-.js";
6
- import { n as l, t as u } from "./ref-CWD6PjVd.js";
7
- import { t as d } from "./input-element-DBMNBplu.js";
8
- import { r as f } from "./input-wrapper-BmxNvznr.js";
1
+ import { _ as e, d as t, h as n, l as r, n as i, u as a } from "./element-WEzISABa.js";
2
+ import { t as o } from "./class-map-wh4Yi3oj.js";
3
+ import { n as s } from "./element-with-slot-BKYUx4gb.js";
4
+ import "./icon-DEtOSWRK.js";
5
+ import { t as c } from "./if-defined-BmnvvxtR.js";
6
+ import { n as l, t as u } from "./ref-OU8ryfP6.js";
7
+ import { t as d } from "./input-element-IBypGOaV.js";
8
+ import { r as f } from "./input-wrapper-CQgAL1Br.js";
9
9
  //#region src/components/textinput/textinput.ts
10
10
  var p = class extends d {
11
11
  constructor(...e) {
@@ -18,16 +18,17 @@ var p = class extends d {
18
18
  super.updated(e), this.classList.add("pkt-textinput"), e.has("value") && (this.counterCurrent = this.value?.length || 0, this.valueChanged(this.value, e.get("value"))), e.has("id") && !this.name && this.id && (this.name = this.id);
19
19
  }
20
20
  render() {
21
- let e = this.type === "search" && !this.iconNameRight && !this.omitSearchIcon, n = this.effectiveCounter(this.counterMaxLength > 0), r = o({
21
+ let t = this.type === "search" && !this.iconNameRight && !this.omitSearchIcon, r = this.effectiveCounter(this.counterMaxLength > 0), i = o({
22
22
  "pkt-input": !0,
23
23
  [`pkt-input--${this.inputSize}`]: !0,
24
24
  "pkt-input--fullwidth": this.fullwidth,
25
- "pkt-input--counter-error": n && this.counterMaxLength > 0 && this.value.length > this.counterMaxLength
25
+ "pkt-input--counter-error": r && this.counterMaxLength > 0 && this.value.length > this.counterMaxLength
26
26
  }), a = this.ariaLabelledby || `${this.id}-input-label`;
27
- return i`
27
+ return e`
28
28
  <pkt-input-wrapper
29
+ .strings=${this.strings}
29
30
  label="${this.label}"
30
- ?counter=${n}
31
+ ?counter=${r}
31
32
  ?hasFieldset=${this.effectiveHasFieldset(!1)}
32
33
  ?disabled=${this.disabled}
33
34
  ?hasError=${this.hasError}
@@ -51,10 +52,10 @@ var p = class extends d {
51
52
  >
52
53
  <div class="pkt-contents" slot="helptext">${s(this, "helptext")}</div>
53
54
  <div class=${`pkt-input__container pkt-input__container--${this.inputSize}`}>
54
- ${this.prefix ? i`<div class="pkt-input-prefix">${this.prefix}</div>` : t}
55
+ ${this.prefix ? e`<div class="pkt-input-prefix">${this.prefix}</div>` : n}
55
56
  <input
56
57
  ${l(this.inputRef)}
57
- class=${r}
58
+ class=${i}
58
59
  type=${this.type}
59
60
  name=${(this.name || this.id) + "-input"}
60
61
  id=${this.id + "-input"}
@@ -67,7 +68,7 @@ var p = class extends d {
67
68
  max=${c(this.max || void 0)}
68
69
  step=${c(this.step || void 0)}
69
70
  ?readonly=${this.readonly}
70
- size=${this.size || t}
71
+ size=${this.size || n}
71
72
  .value=${this.value}
72
73
  ?disabled=${this.disabled}
73
74
  aria-invalid=${this.hasError}
@@ -75,7 +76,7 @@ var p = class extends d {
75
76
  aria-describedby=${c(f({
76
77
  id: this.id + "-input",
77
78
  hasHelptext: !!this.helptext,
78
- hasCounter: n,
79
+ hasCounter: r,
79
80
  ariaDescribedby: this.ariaDescribedby
80
81
  }))}
81
82
  @input=${(e) => {
@@ -97,30 +98,30 @@ var p = class extends d {
97
98
  }
98
99
  }}
99
100
  />
100
- ${this.suffix ? i`<div class="pkt-input-suffix">
101
+ ${this.suffix ? e`<div class="pkt-input-suffix">
101
102
  ${this.suffix}
102
- ${this.iconNameRight ? i`<pkt-icon
103
+ ${this.iconNameRight ? e`<pkt-icon
103
104
  class="pkt-input-suffix-icon"
104
105
  name=${this.iconNameRight}
105
- ></pkt-icon>` : t}
106
- ${e ? i`<pkt-icon
106
+ ></pkt-icon>` : n}
107
+ ${t ? e`<pkt-icon
107
108
  class="pkt-input-suffix-icon"
108
109
  name="magnifying-glass-big"
109
- ></pkt-icon>` : t}
110
- </div>` : t}
111
- ${!this.suffix && this.iconNameRight ? i`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>` : t}
112
- ${!this.suffix && e ? i`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>` : t}
110
+ ></pkt-icon>` : n}
111
+ </div>` : n}
112
+ ${!this.suffix && this.iconNameRight ? e`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>` : n}
113
+ ${!this.suffix && t ? e`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>` : n}
113
114
  </div>
114
115
  </pkt-input-wrapper>
115
116
  `;
116
117
  }
117
118
  };
118
- n([r({
119
+ i([a({
119
120
  type: String,
120
121
  reflect: !0
121
- })], p.prototype, "value", void 0), n([r({ type: String })], p.prototype, "type", void 0), n([r({ type: Number })], p.prototype, "size", void 0), n([r({ type: String })], p.prototype, "autocomplete", void 0), n([r({ type: String })], p.prototype, "iconNameRight", void 0), n([r({ type: String })], p.prototype, "prefix", void 0), n([r({ type: String })], p.prototype, "suffix", void 0), n([r({ type: Boolean })], p.prototype, "omitSearchIcon", void 0), n([e()], p.prototype, "counterCurrent", void 0);
122
+ })], p.prototype, "value", void 0), i([a({ type: String })], p.prototype, "type", void 0), i([a({ type: Number })], p.prototype, "size", void 0), i([a({ type: String })], p.prototype, "autocomplete", void 0), i([a({ type: String })], p.prototype, "iconNameRight", void 0), i([a({ type: String })], p.prototype, "prefix", void 0), i([a({ type: String })], p.prototype, "suffix", void 0), i([a({ type: Boolean })], p.prototype, "omitSearchIcon", void 0), i([r()], p.prototype, "counterCurrent", void 0);
122
123
  try {
123
- a("pkt-textinput")(p);
124
+ t("pkt-textinput")(p);
124
125
  } catch {
125
126
  console.warn("Forsøker å definere <pkt-textinput>, men den er allerede definert");
126
127
  }