@oslokommune/punkt-elements 12.32.0 → 12.32.7

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 (168) hide show
  1. package/dist/alert-C2WKLFow.cjs +27 -0
  2. package/dist/alert-XGjypFHe.js +115 -0
  3. package/dist/alert.d.ts +15 -15
  4. package/dist/{backlink-DdNgqA56.js → backlink-BX8HBhw5.js} +2 -2
  5. package/dist/{backlink-Q2HTG9jm.cjs → backlink-NJdC0FAO.cjs} +1 -1
  6. package/dist/backlink.d.ts +15 -15
  7. package/dist/{button-rArIL0-j.js → button-Bn8jVB0f.js} +33 -33
  8. package/dist/{button-BPyZeW73.cjs → button-Bpbh8A_a.cjs} +2 -2
  9. package/dist/button.d.ts +15 -15
  10. package/dist/{calendar-1ryAEdX3.js → calendar-BNHDEEwT.js} +20 -84
  11. package/dist/{calendar-2DqPLXdD.cjs → calendar-Ds13AKr5.cjs} +4 -4
  12. package/dist/calendar.d.ts +15 -15
  13. package/dist/card-CEv3DL-o.js +94 -0
  14. package/dist/card-c5EEPaNh.cjs +28 -0
  15. package/dist/card.d.ts +15 -15
  16. package/dist/{checkbox-BnDG6wIO.cjs → checkbox-DDBBDM85.cjs} +1 -1
  17. package/dist/{checkbox-Ceui2TLp.js → checkbox-DoMYxp83.js} +9 -9
  18. package/dist/checkbox.d.ts +15 -15
  19. package/dist/{class-map-ChuDQU5C.js → class-map-D4tSZX70.js} +2 -2
  20. package/dist/{class-map-D4rXyUxT.cjs → class-map-DvBKxTiW.cjs} +1 -1
  21. package/dist/combobox-BflWORVa.cjs +115 -0
  22. package/dist/combobox-l7LmWQYu.js +491 -0
  23. package/dist/combobox.d.ts +15 -15
  24. package/dist/datepicker-Bkiyh5P5.cjs +153 -0
  25. package/dist/datepicker-nWd89NwP.js +449 -0
  26. package/dist/datepicker.d.ts +15 -15
  27. package/dist/directive-C7oCP5Bh.cjs +5 -0
  28. package/dist/directive-helpers-BmXIK-1b.js +45 -0
  29. package/dist/directive-helpers-donnvcEO.cjs +5 -0
  30. package/dist/{directive-B76A7YXI.js → directive-oAbCiebi.js} +4 -4
  31. package/dist/element-DJpGVXjq.cjs +238 -0
  32. package/dist/{element-G8JoS0Lj.js → element-DiqKrDty.js} +8845 -8847
  33. package/dist/{helptext-Y4cSgTkd.js → helptext-DfRusn5R.js} +9 -9
  34. package/dist/{helptext-B4Uc-d56.cjs → helptext-aHD9icur.cjs} +1 -1
  35. package/dist/helptext.d.ts +15 -15
  36. package/dist/{icon-BJnwW0eh.js → icon-BdY52BIt.js} +2 -2
  37. package/dist/{icon-BTUCDPN5.cjs → icon-UtDKPH3R.cjs} +1 -1
  38. package/dist/icon.d.ts +15 -15
  39. package/dist/{if-defined-C1ZDVzYn.cjs → if-defined-CoBDkDGb.cjs} +1 -1
  40. package/dist/{if-defined-rCqT8Od1.js → if-defined-DeANa4n5.js} +1 -1
  41. package/dist/index.d.ts +17 -16
  42. package/dist/{input-element-DM2uSYaW.js → input-element-C4mmTk6h.js} +3 -3
  43. package/dist/{input-element-AhnBdCb8.cjs → input-element-VNai8bsq.cjs} +1 -1
  44. package/dist/input-wrapper-8iKEzDRZ.js +40 -0
  45. package/dist/{input-wrapper-BdZxmQyO.cjs → input-wrapper-DWOw7Yn-.cjs} +1 -1
  46. package/dist/input-wrapper-EoSAbU-U.cjs +1 -0
  47. package/dist/{input-wrapper-DQmYzhcy.js → input-wrapper-P_oEi6dk.js} +8 -8
  48. package/dist/input-wrapper.d.ts +15 -15
  49. package/dist/link-D9dJ6F-R.js +73 -0
  50. package/dist/link-DBxXqsnP.cjs +8 -0
  51. package/dist/link.d.ts +15 -15
  52. package/dist/{linkcard-DDD92XfD.cjs → linkcard-D5O1hR7N.cjs} +1 -1
  53. package/dist/{linkcard-CvqqyHVW.js → linkcard-DcEE9IVw.js} +4 -4
  54. package/dist/linkcard.d.ts +15 -15
  55. package/dist/{listbox-BTVnrHWv.cjs → listbox-CK1GmwCE.cjs} +1 -1
  56. package/dist/{listbox-DX-Euxdm.js → listbox-CfJWJDrc.js} +5 -5
  57. package/dist/listbox.d.ts +15 -15
  58. package/dist/{loader-BudoV0yd.js → loader-DZvOlXzI.js} +6 -6
  59. package/dist/{loader-Csq0Yd1k.cjs → loader-SDXJp58K.cjs} +1 -1
  60. package/dist/loader.d.ts +15 -15
  61. package/dist/messagebox-Ce5e1gga.js +79 -0
  62. package/dist/messagebox-D2_-WZQG.cjs +12 -0
  63. package/dist/messagebox.d.ts +15 -15
  64. package/dist/modal-CCtUsYKk.cjs +33 -0
  65. package/dist/{modal-DnYn2Rlg.js → modal-CdgIOp8Q.js} +51 -94
  66. package/dist/modal.d.ts +15 -15
  67. package/dist/pkt-alert.cjs +1 -1
  68. package/dist/pkt-alert.js +1 -1
  69. package/dist/pkt-backlink.cjs +1 -1
  70. package/dist/pkt-backlink.js +1 -1
  71. package/dist/pkt-button.cjs +1 -1
  72. package/dist/pkt-button.js +1 -1
  73. package/dist/pkt-calendar.cjs +1 -1
  74. package/dist/pkt-calendar.js +1 -1
  75. package/dist/pkt-card.cjs +1 -1
  76. package/dist/pkt-card.js +1 -1
  77. package/dist/pkt-checkbox.cjs +1 -1
  78. package/dist/pkt-checkbox.js +1 -1
  79. package/dist/pkt-combobox.cjs +1 -1
  80. package/dist/pkt-combobox.js +1 -1
  81. package/dist/pkt-datepicker.cjs +1 -1
  82. package/dist/pkt-datepicker.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 +27 -27
  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-CZplGTgu.js → pkt-options-controller-BkWE4pZe.js} +1 -1
  104. package/dist/{pkt-options-controller-BtU1zEtG.cjs → pkt-options-controller-TJ1apYGF.cjs} +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-slot-controller-BtVLTZb7.js +79 -0
  112. package/dist/pkt-slot-controller-plQxXRvV.cjs +1 -0
  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/{progressbar-czvExwTL.js → progressbar-DvFz9KBo.js} +6 -6
  120. package/dist/{progressbar-BW_icNId.cjs → progressbar-jASTnhti.cjs} +1 -1
  121. package/dist/progressbar.d.ts +15 -15
  122. package/dist/{radiobutton-BeSuCrbp.cjs → radiobutton-C-Xd5sSq.cjs} +1 -1
  123. package/dist/{radiobutton-DKo27Stm.js → radiobutton-D03aN4yn.js} +5 -5
  124. package/dist/radiobutton.d.ts +15 -15
  125. package/dist/{ref-cRTOoM4R.js → ref-B70YZNXm.js} +11 -11
  126. package/dist/{ref-DsoUUoPU.cjs → ref-CLqTsViF.cjs} +3 -3
  127. package/dist/{repeat-CArTw6-s.js → repeat-CNLpCTun.js} +3 -3
  128. package/dist/{repeat-kruY8poV.cjs → repeat-t2oms1o6.cjs} +1 -1
  129. package/dist/{select-DxHhPEgD.js → select-BLDaK5Rd.js} +8 -8
  130. package/dist/{select-lvFnhEVg.cjs → select-Dvds7MzS.cjs} +1 -1
  131. package/dist/select.d.ts +15 -15
  132. package/dist/{state-BILlRnrD.cjs → state-C4LdlTYO.cjs} +1 -1
  133. package/dist/{state-gfUuUqVg.js → state-CDwPbiQj.js} +1 -1
  134. package/dist/tag-C52KeBmR.cjs +18 -0
  135. package/dist/{tag-CWx1XsGR.js → tag-DoS5S2Bq.js} +28 -77
  136. package/dist/tag.d.ts +15 -15
  137. package/dist/{textarea-BNNDbxxO.js → textarea-C9EvdPGi.js} +11 -11
  138. package/dist/{textarea-CDsLbogK.cjs → textarea-DJvNBmEL.cjs} +1 -1
  139. package/dist/textarea.d.ts +15 -15
  140. package/dist/{textinput-C3C088Ki.cjs → textinput-Cg3ObBuw.cjs} +1 -1
  141. package/dist/{textinput-M8I4dfoP.js → textinput-CxRSSYaN.js} +20 -20
  142. package/dist/textinput.d.ts +15 -15
  143. package/package.json +4 -4
  144. package/src/components/button/button.ts +3 -2
  145. package/src/components/datepicker/datepicker.ts +4 -4
  146. package/src/components/tag/tag.ts +1 -1
  147. package/dist/alert-D5G5UJuo.cjs +0 -27
  148. package/dist/alert-gERpVuB7.js +0 -163
  149. package/dist/card-BbMBpvJt.js +0 -176
  150. package/dist/card-ZX09f_ka.cjs +0 -28
  151. package/dist/combobox-DH-YlbNh.cjs +0 -115
  152. package/dist/combobox-DbO6I0GT.js +0 -694
  153. package/dist/datepicker-8MOgQsyL.js +0 -611
  154. package/dist/datepicker-BRH-59Q9.cjs +0 -153
  155. package/dist/directive-C_VV3qwo.cjs +0 -5
  156. package/dist/directive-helpers-D7XIyCQ_.js +0 -45
  157. package/dist/directive-helpers-mGjAtADc.cjs +0 -5
  158. package/dist/element-BBo3JZk5.cjs +0 -238
  159. package/dist/input-wrapper-Bw9tARAD.js +0 -125
  160. package/dist/input-wrapper-jPnKsfEC.cjs +0 -1
  161. package/dist/link-C3lW3z8X.js +0 -109
  162. package/dist/link-DOVlsg2S.cjs +0 -8
  163. package/dist/messagebox-8GwnNqb0.cjs +0 -12
  164. package/dist/messagebox-D6uexEhg.js +0 -114
  165. package/dist/modal-CLixB4Dz.cjs +0 -33
  166. package/dist/pkt-slot-controller-CqNvEpFd.cjs +0 -1
  167. package/dist/pkt-slot-controller-D1DakVrU.js +0 -95
  168. package/dist/tag-DThwKsrg.cjs +0 -18
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-BBo3JZk5.cjs"),a=require("./state-BILlRnrD.cjs"),p=require("./input-element-AhnBdCb8.cjs"),d=require("./ref-DsoUUoPU.cjs"),o=require("./class-map-D4rXyUxT.cjs");var k=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=(u,e,c,s)=>{for(var h=s>1?void 0:s?r(e,c):e,n=u.length-1,l;n>=0;n--)(l=u[n])&&(h=(s?l(e,c,h):l(h))||h);return s&&h&&k(e,c,h),h};exports.PktRadioButton=class extends p.PktInputElement{constructor(){super(...arguments),this.inputRef=d.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,c,s){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,c,s)}updated(e){e.has("checked")&&this.checked!==null&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0,(e.get("checked")===""||e.get("checked")==="true"||e.get("checked")===!0)!==this._checked&&this.toggleChecked()),super.updated(e)}render(){const e=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),c=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError});return t.x`
1
+ "use strict";const t=require("./element-DJpGVXjq.cjs"),a=require("./state-C4LdlTYO.cjs"),p=require("./input-element-VNai8bsq.cjs"),d=require("./ref-CLqTsViF.cjs"),o=require("./class-map-DvBKxTiW.cjs");var k=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=(u,e,c,s)=>{for(var h=s>1?void 0:s?r(e,c):e,n=u.length-1,l;n>=0;n--)(l=u[n])&&(h=(s?l(e,c,h):l(h))||h);return s&&h&&k(e,c,h),h};exports.PktRadioButton=class extends p.PktInputElement{constructor(){super(...arguments),this.inputRef=d.e(),this.value="",this.checkHelptext=null,this.defaultChecked=!1,this.hasTile=!1,this.checked=null,this.type="radio",this._checked=!1}connectedCallback(){super.connectedCallback()}attributeChangedCallback(e,c,s){e==="defaultChecked"&&(this._checked=this.defaultChecked),e==="checked"&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0),super.attributeChangedCallback(e,c,s)}updated(e){e.has("checked")&&this.checked!==null&&(this._checked=this.checked===""||this.checked==="true"||this.checked===!0,(e.get("checked")===""||e.get("checked")==="true"||e.get("checked")===!0)!==this._checked&&this.toggleChecked()),super.updated(e)}render(){const e=o.e({"pkt-input-check__input":!0,"pkt-input-check__input--tile":this.hasTile,"pkt-input-check__input--tile-disabled":this.disabled&&this.hasTile}),c=o.e({"pkt-input-check__input-checkbox":!0,"pkt-input-check__input-checkbox--error":this.hasError});return t.x`
2
2
  <div class="pkt-input-check">
3
3
  <div class=${e}>
4
4
  <input
@@ -1,8 +1,8 @@
1
- import { x as r, E as n, n as s, a as o } from "./element-G8JoS0Lj.js";
2
- import { r as k } from "./state-gfUuUqVg.js";
3
- import { P as f } from "./input-element-DM2uSYaW.js";
4
- import { e as _, n as b } from "./ref-cRTOoM4R.js";
5
- import { e as a } from "./class-map-ChuDQU5C.js";
1
+ import { E as n, x as r, n as s, a as o } from "./element-DiqKrDty.js";
2
+ import { r as k } from "./state-CDwPbiQj.js";
3
+ import { P as f } from "./input-element-C4mmTk6h.js";
4
+ import { e as _, n as b } from "./ref-B70YZNXm.js";
5
+ import { e as a } from "./class-map-D4tSZX70.js";
6
6
  var C = Object.defineProperty, v = Object.getOwnPropertyDescriptor, i = (e, t, l, p) => {
7
7
  for (var h = p > 1 ? void 0 : p ? v(t, l) : t, u = e.length - 1, d; u >= 0; u--)
8
8
  (d = e[u]) && (h = (p ? d(t, l, h) : d(h)) || h);
@@ -1,41 +1,41 @@
1
1
  export { }
2
2
 
3
3
 
4
- /**
5
- * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
6
- *
7
- * The component will prioritize options passed as a prop over options passed as children if both are provided.
8
- * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
9
- *
10
- * @slot (default) - Options to be rendered as children
11
- * @prop {TSelectOption[]} options - Options to be rendered as children
12
- *
13
- *
14
- */
15
4
  declare global {
16
5
  interface HTMLElementTagNameMap {
17
- 'pkt-select': PktSelect & HTMLSelectElement;
6
+ 'pkt-combobox': PktCombobox & HTMLSelectElement;
18
7
  }
19
8
  }
20
9
 
21
10
 
22
11
  declare global {
23
12
  interface HTMLElementTagNameMap {
24
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
13
+ 'pkt-icon': PktIcon;
25
14
  }
26
15
  }
27
16
 
28
17
 
29
18
  declare global {
30
19
  interface HTMLElementTagNameMap {
31
- 'pkt-icon': PktIcon;
20
+ 'pkt-listbox': PktListbox;
32
21
  }
33
22
  }
34
23
 
35
24
 
25
+ /**
26
+ * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
27
+ *
28
+ * The component will prioritize options passed as a prop over options passed as children if both are provided.
29
+ * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
30
+ *
31
+ * @slot (default) - Options to be rendered as children
32
+ * @prop {TSelectOption[]} options - Options to be rendered as children
33
+ *
34
+ *
35
+ */
36
36
  declare global {
37
37
  interface HTMLElementTagNameMap {
38
- 'pkt-listbox': PktListbox;
38
+ 'pkt-select': PktSelect & HTMLSelectElement;
39
39
  }
40
40
  }
41
41
 
@@ -1,6 +1,6 @@
1
- import { E as d } from "./element-G8JoS0Lj.js";
2
- import { f as $ } from "./directive-helpers-D7XIyCQ_.js";
3
- import { i as _, t as f, e as a } from "./directive-B76A7YXI.js";
1
+ import { E as l } from "./element-DiqKrDty.js";
2
+ import { f as $ } from "./directive-helpers-BmXIK-1b.js";
3
+ import { i as f, t as a, e as _ } from "./directive-oAbCiebi.js";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2017 Google LLC
@@ -18,7 +18,7 @@ const o = (t, s) => {
18
18
  if ((s = t._$AM) === void 0) break;
19
19
  e = s._$AN, e.delete(t), t = s;
20
20
  } while ((e == null ? void 0 : e.size) === 0);
21
- }, l = (t) => {
21
+ }, d = (t) => {
22
22
  for (let s; s = t._$AM; t = s) {
23
23
  let e = s._$AN;
24
24
  if (e === void 0) s._$AN = e = /* @__PURE__ */ new Set();
@@ -27,7 +27,7 @@ const o = (t, s) => {
27
27
  }
28
28
  };
29
29
  function A(t) {
30
- this._$AN !== void 0 ? (r(this), this._$AM = t, l(this)) : this._$AM = t;
30
+ this._$AN !== void 0 ? (r(this), this._$AM = t, d(this)) : this._$AM = t;
31
31
  }
32
32
  function u(t, s = !1, e = 0) {
33
33
  const i = this._$AH, h = this._$AN;
@@ -36,14 +36,14 @@ function u(t, s = !1, e = 0) {
36
36
  else o(this, t);
37
37
  }
38
38
  const v = (t) => {
39
- t.type == f.CHILD && (t._$AP ?? (t._$AP = u), t._$AQ ?? (t._$AQ = A));
39
+ t.type == a.CHILD && (t._$AP ?? (t._$AP = u), t._$AQ ?? (t._$AQ = A));
40
40
  };
41
- class p extends _ {
41
+ class p extends f {
42
42
  constructor() {
43
43
  super(...arguments), this._$AN = void 0;
44
44
  }
45
45
  _$AT(s, e, i) {
46
- super._$AT(s, e, i), l(this), this.isConnected = s._$AU;
46
+ super._$AT(s, e, i), d(this), this.isConnected = s._$AU;
47
47
  }
48
48
  _$AO(s, e = !0) {
49
49
  var i, h;
@@ -69,14 +69,14 @@ class p extends _ {
69
69
  const N = () => new Y();
70
70
  class Y {
71
71
  }
72
- const c = /* @__PURE__ */ new WeakMap(), M = a(class extends p {
72
+ const c = /* @__PURE__ */ new WeakMap(), M = _(class extends p {
73
73
  render(t) {
74
- return d;
74
+ return l;
75
75
  }
76
76
  update(t, [s]) {
77
77
  var i;
78
78
  const e = s !== this.Y;
79
- return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = s, this.ht = (i = t.options) == null ? void 0 : i.host, this.rt(this.ct = t.element)), d;
79
+ return e && this.Y !== void 0 && this.rt(void 0), (e || this.lt !== this.ct) && (this.Y = s, this.ht = (i = t.options) == null ? void 0 : i.host, this.rt(this.ct = t.element)), l;
80
80
  }
81
81
  rt(t) {
82
82
  if (this.isConnected || (t = void 0), typeof this.Y == "function") {
@@ -1,9 +1,9 @@
1
- "use strict";const l=require("./element-BBo3JZk5.cjs"),_=require("./directive-helpers-mGjAtADc.cjs"),d=require("./directive-C_VV3qwo.cjs");/**
1
+ "use strict";const d=require("./element-DJpGVXjq.cjs"),a=require("./directive-helpers-donnvcEO.cjs"),l=require("./directive-C7oCP5Bh.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
5
- */const n=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const h of s)(i=h._$AO)==null||i.call(h,e,!1),n(h,e);return!0},c=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},$=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),u(e)}};function A(t){this._$AN!==void 0?(c(this),this._$AM=t,$(this)):this._$AM=t}function a(t,e=!1,s=0){const i=this._$AH,h=this._$AN;if(h!==void 0&&h.size!==0)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)n(i[o],!1),c(i[o]);else i!=null&&(n(i,!1),c(i));else n(this,t)}const u=t=>{t.type==d.t.CHILD&&(t._$AP??(t._$AP=a),t._$AQ??(t._$AQ=A))};class f extends d.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),$(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,h;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(h=this.disconnected)==null||h.call(this)),s&&(n(this,e),c(this))}setValue(e){if(_.f(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
5
+ */const n=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const h of s)(i=h._$AO)==null||i.call(h,e,!1),n(h,e);return!0},c=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},$=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),u(e)}};function _(t){this._$AN!==void 0?(c(this),this._$AM=t,$(this)):this._$AM=t}function f(t,e=!1,s=0){const i=this._$AH,h=this._$AN;if(h!==void 0&&h.size!==0)if(e)if(Array.isArray(i))for(let o=s;o<i.length;o++)n(i[o],!1),c(i[o]);else i!=null&&(n(i,!1),c(i));else n(this,t)}const u=t=>{t.type==l.t.CHILD&&(t._$AP??(t._$AP=f),t._$AQ??(t._$AQ=_))};class A extends l.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),$(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,h;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(h=this.disconnected)==null||h.call(this)),s&&(n(this,e),c(this))}setValue(e){if(a.f(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
6
6
  * @license
7
7
  * Copyright 2020 Google LLC
8
8
  * SPDX-License-Identifier: BSD-3-Clause
9
- */const v=()=>new Y;class Y{}const r=new WeakMap,p=d.e(class extends f{render(t){return l.E}update(t,[e]){var i;const s=e!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),l.E}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let s=r.get(e);s===void 0&&(s=new WeakMap,r.set(e,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e;return typeof this.Y=="function"?(t=r.get(this.ht??globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.e=v;exports.n=p;
9
+ */const v=()=>new Y;class Y{}const r=new WeakMap,p=l.e(class extends A{render(t){return d.E}update(t,[e]){var i;const s=e!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),d.E}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let s=r.get(e);s===void 0&&(s=new WeakMap,r.set(e,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e;return typeof this.Y=="function"?(t=r.get(this.ht??globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.e=v;exports.n=p;
@@ -1,6 +1,6 @@
1
- import { T as $ } from "./element-G8JoS0Lj.js";
2
- import { e as A, i as M, t as b } from "./directive-B76A7YXI.js";
3
- import { p as j, v as h, r as v, M as x, m as C } from "./directive-helpers-D7XIyCQ_.js";
1
+ import { T as $ } from "./element-DiqKrDty.js";
2
+ import { e as A, i as M, t as b } from "./directive-oAbCiebi.js";
3
+ import { p as j, v as h, r as v, M as x, m as C } from "./directive-helpers-BmXIK-1b.js";
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";const m=require("./element-BBo3JZk5.cjs"),x=require("./directive-C_VV3qwo.cjs"),s=require("./directive-helpers-mGjAtADc.cjs");/**
1
+ "use strict";const m=require("./element-DJpGVXjq.cjs"),x=require("./directive-C7oCP5Bh.cjs"),s=require("./directive-helpers-donnvcEO.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,11 +1,11 @@
1
- import { x as h, n as c, a as $ } from "./element-G8JoS0Lj.js";
2
- import { r as b } from "./state-gfUuUqVg.js";
3
- import { e as u, n as d } from "./ref-cRTOoM4R.js";
4
- import { o as s } from "./if-defined-rCqT8Od1.js";
5
- import { P as v } from "./input-element-DM2uSYaW.js";
6
- import { P as f } from "./pkt-options-controller-CZplGTgu.js";
7
- import { P as m } from "./pkt-slot-controller-D1DakVrU.js";
8
- import "./input-wrapper-DQmYzhcy.js";
1
+ import { x as h, n as c, a as $ } from "./element-DiqKrDty.js";
2
+ import { r as b } from "./state-CDwPbiQj.js";
3
+ import { e as u, n as d } from "./ref-B70YZNXm.js";
4
+ import { o as s } from "./if-defined-DeANa4n5.js";
5
+ import { P as v } from "./input-element-C4mmTk6h.js";
6
+ import { P as f } from "./pkt-options-controller-BkWE4pZe.js";
7
+ import { P as m } from "./pkt-slot-controller-BtVLTZb7.js";
8
+ import "./input-wrapper-P_oEi6dk.js";
9
9
  var g = Object.defineProperty, C = Object.getOwnPropertyDescriptor, a = (e, t, i, o) => {
10
10
  for (var r = o > 1 ? void 0 : o ? C(t, i) : t, n = e.length - 1, p; n >= 0; n--)
11
11
  (p = e[n]) && (r = (o ? p(t, i, r) : p(r)) || r);
@@ -1,4 +1,4 @@
1
- "use strict";const r=require("./element-BBo3JZk5.cjs"),u=require("./state-BILlRnrD.cjs"),l=require("./ref-DsoUUoPU.cjs"),o=require("./if-defined-C1ZDVzYn.cjs"),d=require("./input-element-AhnBdCb8.cjs"),c=require("./pkt-options-controller-BtU1zEtG.cjs"),$=require("./pkt-slot-controller-CqNvEpFd.cjs");require("./input-wrapper-BdZxmQyO.cjs");var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,n=(a,e,t,i)=>{for(var s=i>1?void 0:i?v(e,t):e,p=a.length-1,h;p>=0;p--)(h=a[p])&&(s=(i?h(e,t,s):h(s))||s);return i&&s&&b(e,t,s),s};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=l.e(),this.helptextSlot=l.e(),this.options=[],this.value="",this._options=[],this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new $.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback();const e=this.options.length>0,t=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!e&&t?this.optionsController.nodes.forEach(i=>{const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||"",disabled:!!i.getAttribute("disabled")};i.getAttribute("selected")&&!this.value&&(this.value=s.value),this._options.push(s)}):this._options=this.options}attributeChangedCallback(e,t,i){e==="options"&&(this._options=i?JSON.parse(i):[]),e==="value"&&this.value!==t&&this.valueChanged(i,t),super.attributeChangedCallback(e,t,i)}updated(e){var t;super.updated(e),e.has("value")&&(this.counterCurrent=((t=this.value)==null?void 0:t.length)||0,this.valueChanged(this.value,e.get("value"))),e.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){super.firstUpdated(e),this.options.length&&(this._options=this.options)}render(){const e=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return r.x`
1
+ "use strict";const r=require("./element-DJpGVXjq.cjs"),u=require("./state-C4LdlTYO.cjs"),l=require("./ref-CLqTsViF.cjs"),o=require("./if-defined-CoBDkDGb.cjs"),d=require("./input-element-VNai8bsq.cjs"),c=require("./pkt-options-controller-TJ1apYGF.cjs"),$=require("./pkt-slot-controller-plQxXRvV.cjs");require("./input-wrapper-DWOw7Yn-.cjs");var b=Object.defineProperty,v=Object.getOwnPropertyDescriptor,n=(a,e,t,i)=>{for(var s=i>1?void 0:i?v(e,t):e,p=a.length-1,h;p>=0;p--)(h=a[p])&&(s=(i?h(e,t,s):h(s))||s);return i&&s&&b(e,t,s),s};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=l.e(),this.helptextSlot=l.e(),this.options=[],this.value="",this._options=[],this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new $.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback();const e=this.options.length>0,t=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!e&&t?this.optionsController.nodes.forEach(i=>{const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||"",disabled:!!i.getAttribute("disabled")};i.getAttribute("selected")&&!this.value&&(this.value=s.value),this._options.push(s)}):this._options=this.options}attributeChangedCallback(e,t,i){e==="options"&&(this._options=i?JSON.parse(i):[]),e==="value"&&this.value!==t&&this.valueChanged(i,t),super.attributeChangedCallback(e,t,i)}updated(e){var t;super.updated(e),e.has("value")&&(this.counterCurrent=((t=this.value)==null?void 0:t.length)||0,this.valueChanged(this.value,e.get("value"))),e.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){super.firstUpdated(e),this.options.length&&(this._options=this.options)}render(){const e=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return r.x`
2
2
  <pkt-input-wrapper
3
3
  ?counter=${this.counter}
4
4
  ?disabled=${this.disabled}
package/dist/select.d.ts CHANGED
@@ -1,41 +1,41 @@
1
1
  export { }
2
2
 
3
3
 
4
- /**
5
- * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
6
- *
7
- * The component will prioritize options passed as a prop over options passed as children if both are provided.
8
- * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
9
- *
10
- * @slot (default) - Options to be rendered as children
11
- * @prop {TSelectOption[]} options - Options to be rendered as children
12
- *
13
- *
14
- */
15
4
  declare global {
16
5
  interface HTMLElementTagNameMap {
17
- 'pkt-select': PktSelect & HTMLSelectElement;
6
+ 'pkt-combobox': PktCombobox & HTMLSelectElement;
18
7
  }
19
8
  }
20
9
 
21
10
 
22
11
  declare global {
23
12
  interface HTMLElementTagNameMap {
24
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
13
+ 'pkt-icon': PktIcon;
25
14
  }
26
15
  }
27
16
 
28
17
 
29
18
  declare global {
30
19
  interface HTMLElementTagNameMap {
31
- 'pkt-icon': PktIcon;
20
+ 'pkt-listbox': PktListbox;
32
21
  }
33
22
  }
34
23
 
35
24
 
25
+ /**
26
+ * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
27
+ *
28
+ * The component will prioritize options passed as a prop over options passed as children if both are provided.
29
+ * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
30
+ *
31
+ * @slot (default) - Options to be rendered as children
32
+ * @prop {TSelectOption[]} options - Options to be rendered as children
33
+ *
34
+ *
35
+ */
36
36
  declare global {
37
37
  interface HTMLElementTagNameMap {
38
- 'pkt-listbox': PktListbox;
38
+ 'pkt-select': PktSelect & HTMLSelectElement;
39
39
  }
40
40
  }
41
41
 
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./element-BBo3JZk5.cjs");/**
1
+ "use strict";const e=require("./element-DJpGVXjq.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,4 +1,4 @@
1
- import { n as r } from "./element-G8JoS0Lj.js";
1
+ import { n as r } from "./element-DiqKrDty.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -0,0 +1,18 @@
1
+ "use strict";const u=require("./class-map-DvBKxTiW.cjs"),t=require("./element-DJpGVXjq.cjs"),k=require("./state-C4LdlTYO.cjs"),g=require("./pkt-slot-controller-plQxXRvV.cjs"),c=require("./ref-CLqTsViF.cjs");require("./icon-UtDKPH3R.cjs");const h=require("./if-defined-CoBDkDGb.cjs"),f={closeTag:{default:!1},size:{default:"medium"},skin:{default:"blue"},type:{default:"button"}},r={props:f};var d=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(n,e,o,a)=>{for(var s=a>1?void 0:a?y(e,o):e,l=n.length-1,p;l>=0;l--)(p=n[l])&&(s=(a?p(e,o,s):p(s))||s);return a&&s&&d(e,o,s),s};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closeTag=r.props.closeTag.default,this.size=r.props.size.default,this.skin=r.props.skin.default,this.textStyle=null,this.iconName=void 0,this.type=r.props.type.default,this.ariaLabel=null,this._isClosed=!1,this._ariaDescription=null,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.slotController=new g.PktSlotController(this,this.defaultSlot),this._isClosed=!1}firstUpdated(e){var o,a;if(super.firstUpdated(e),this.closeTag&&!this.ariaLabel){const s=(a=(o=this.defaultSlot.value)==null?void 0:o.textContent)==null?void 0:a.trim();s&&(this._ariaDescription=`Klikk for å fjerne ${s}`)}}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},o={"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.x`
2
+ <button
3
+ class=${u.e(o)}
4
+ type=${this.type}
5
+ @click=${this.close}
6
+ aria-label=${h.o(this.ariaLabel||void 0)}
7
+ aria-description=${h.o(this._ariaDescription||void 0)}
8
+ >
9
+ ${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
10
+ <span ${c.n(this.defaultSlot)}></span>
11
+ <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
12
+ </button>
13
+ `:t.x`
14
+ <span class=${u.e(e)}>
15
+ ${this.iconName&&t.x`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
16
+ <span ${c.n(this.defaultSlot)}></span>
17
+ </span>
18
+ `}};i([t.n({type:Boolean,reflect:!0})],exports.PktTag.prototype,"closeTag",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"size",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"skin",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"textStyle",2);i([t.n({type:String,reflect:!0})],exports.PktTag.prototype,"iconName",2);i([t.n({type:String})],exports.PktTag.prototype,"type",2);i([t.n({type:String})],exports.PktTag.prototype,"ariaLabel",2);i([k.r()],exports.PktTag.prototype,"_isClosed",2);i([k.r()],exports.PktTag.prototype,"_ariaDescription",2);exports.PktTag=i([t.t("pkt-tag")],exports.PktTag);
@@ -1,81 +1,32 @@
1
- import { e as h } from "./class-map-ChuDQU5C.js";
2
- import { P as y, x as p, n as r, a as g } from "./element-G8JoS0Lj.js";
3
- import { r as m } from "./state-gfUuUqVg.js";
4
- import { P as k } from "./pkt-slot-controller-D1DakVrU.js";
5
- import { e as b, n as f } from "./ref-cRTOoM4R.js";
6
- import "./icon-BJnwW0eh.js";
7
- import { o as d } from "./if-defined-rCqT8Od1.js";
8
- const _ = "pkt-tag", $ = !0, S = {
1
+ import { e as u } from "./class-map-D4tSZX70.js";
2
+ import { P as m, x as l, n as r, a as g } from "./element-DiqKrDty.js";
3
+ import { r as k } from "./state-CDwPbiQj.js";
4
+ import { P as y } from "./pkt-slot-controller-BtVLTZb7.js";
5
+ import { e as b, n as f } from "./ref-B70YZNXm.js";
6
+ import "./icon-BdY52BIt.js";
7
+ import { o as d } from "./if-defined-DeANa4n5.js";
8
+ const _ = {
9
9
  closeTag: {
10
- type: "boolean",
11
- required: !1,
12
10
  default: !1
13
11
  },
14
12
  size: {
15
- required: !1,
16
- default: "medium",
17
- type: [
18
- "small",
19
- "medium",
20
- "large"
21
- ]
22
- },
23
- iconName: {
24
- type: "icon",
25
- required: !1
13
+ default: "medium"
26
14
  },
27
15
  skin: {
28
- required: !1,
29
- default: "blue",
30
- type: [
31
- "blue",
32
- "blue-light",
33
- "blue-dark",
34
- "green",
35
- "red",
36
- "beige",
37
- "yellow",
38
- "gray"
39
- ]
40
- },
41
- textStyle: {
42
- required: !1,
43
- default: "normal-text",
44
- type: [
45
- "thin-text",
46
- "normal-text"
47
- ]
16
+ default: "blue"
48
17
  },
49
18
  type: {
50
- required: !1,
51
- default: "button",
52
- type: [
53
- "button",
54
- "submit",
55
- "reset"
56
- ]
57
- },
58
- ariaLabel: {
59
- type: "string",
60
- required: !1
61
- }
62
- }, x = {
63
- default: {
64
- description: "Teksten til tag"
19
+ default: "button"
65
20
  }
66
21
  }, n = {
67
- name: _,
68
- "css-class": "pkt-tag",
69
- isElement: $,
70
- props: S,
71
- slots: x
22
+ props: _
72
23
  };
73
- var v = Object.defineProperty, C = Object.getOwnPropertyDescriptor, e = (s, i, l, o) => {
74
- for (var a = o > 1 ? void 0 : o ? C(i, l) : i, c = s.length - 1, u; c >= 0; c--)
75
- (u = s[c]) && (a = (o ? u(i, l, a) : u(a)) || a);
76
- return o && a && v(i, l, a), a;
24
+ var $ = Object.defineProperty, S = Object.getOwnPropertyDescriptor, e = (s, i, p, o) => {
25
+ for (var a = o > 1 ? void 0 : o ? S(i, p) : i, c = s.length - 1, h; c >= 0; c--)
26
+ (h = s[c]) && (a = (o ? h(i, p, a) : h(a)) || a);
27
+ return o && a && $(i, p, a), a;
77
28
  };
78
- let t = class extends y {
29
+ let t = class extends m {
79
30
  constructor() {
80
31
  super(), this.defaultSlot = b(), this.closeTag = n.props.closeTag.default, this.size = n.props.size.default, this.skin = n.props.skin.default, this.textStyle = null, this.iconName = void 0, this.type = n.props.type.default, this.ariaLabel = null, this._isClosed = !1, this._ariaDescription = null, this.close = (s) => {
81
32
  this._isClosed = !0, this.dispatchEvent(
@@ -83,15 +34,15 @@ let t = class extends y {
83
34
  ), this.dispatchEvent(
84
35
  new CustomEvent("on-close", { detail: { origin: s }, bubbles: !0, composed: !0 })
85
36
  );
86
- }, this.slotController = new k(this, this.defaultSlot), this._isClosed = !1;
37
+ }, this.slotController = new y(this, this.defaultSlot), this._isClosed = !1;
87
38
  }
88
39
  /**
89
40
  * Lifecycle
90
41
  */
91
42
  firstUpdated(s) {
92
- var i, l;
43
+ var i, p;
93
44
  if (super.firstUpdated(s), this.closeTag && !this.ariaLabel) {
94
- const o = (l = (i = this.defaultSlot.value) == null ? void 0 : i.textContent) == null ? void 0 : l.trim();
45
+ const o = (p = (i = this.defaultSlot.value) == null ? void 0 : i.textContent) == null ? void 0 : p.trim();
95
46
  o && (this._ariaDescription = `Klikk for å fjerne ${o}`);
96
47
  }
97
48
  }
@@ -111,21 +62,21 @@ let t = class extends y {
111
62
  "pkt-btn--icons-right-and-left": this.closeTag && !!this.iconName,
112
63
  "pkt-hide": this._isClosed
113
64
  };
114
- return this.closeTag ? p`
65
+ return this.closeTag ? l`
115
66
  <button
116
- class=${h(i)}
67
+ class=${u(i)}
117
68
  type=${this.type}
118
69
  @click=${this.close}
119
70
  aria-label=${d(this.ariaLabel || void 0)}
120
71
  aria-description=${d(this._ariaDescription || void 0)}
121
72
  >
122
- ${this.iconName && p`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
73
+ ${this.iconName && l`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
123
74
  <span ${f(this.defaultSlot)}></span>
124
75
  <pkt-icon class="pkt-tag__close-btn" name="close"></pkt-icon>
125
76
  </button>
126
- ` : p`
127
- <span class=${h(s)}>
128
- ${this.iconName && p`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
77
+ ` : l`
78
+ <span class=${u(s)}>
79
+ ${this.iconName && l`<pkt-icon class="pkt-tag__icon" name=${this.iconName}></pkt-icon>`}
129
80
  <span ${f(this.defaultSlot)}></span>
130
81
  </span>
131
82
  `;
@@ -153,10 +104,10 @@ e([
153
104
  r({ type: String })
154
105
  ], t.prototype, "ariaLabel", 2);
155
106
  e([
156
- m()
107
+ k()
157
108
  ], t.prototype, "_isClosed", 2);
158
109
  e([
159
- m()
110
+ k()
160
111
  ], t.prototype, "_ariaDescription", 2);
161
112
  t = e([
162
113
  g("pkt-tag")
package/dist/tag.d.ts CHANGED
@@ -1,41 +1,41 @@
1
1
  export { }
2
2
 
3
3
 
4
- /**
5
- * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
6
- *
7
- * The component will prioritize options passed as a prop over options passed as children if both are provided.
8
- * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
9
- *
10
- * @slot (default) - Options to be rendered as children
11
- * @prop {TSelectOption[]} options - Options to be rendered as children
12
- *
13
- *
14
- */
15
4
  declare global {
16
5
  interface HTMLElementTagNameMap {
17
- 'pkt-select': PktSelect & HTMLSelectElement;
6
+ 'pkt-combobox': PktCombobox & HTMLSelectElement;
18
7
  }
19
8
  }
20
9
 
21
10
 
22
11
  declare global {
23
12
  interface HTMLElementTagNameMap {
24
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
13
+ 'pkt-icon': PktIcon;
25
14
  }
26
15
  }
27
16
 
28
17
 
29
18
  declare global {
30
19
  interface HTMLElementTagNameMap {
31
- 'pkt-icon': PktIcon;
20
+ 'pkt-listbox': PktListbox;
32
21
  }
33
22
  }
34
23
 
35
24
 
25
+ /**
26
+ * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
27
+ *
28
+ * The component will prioritize options passed as a prop over options passed as children if both are provided.
29
+ * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
30
+ *
31
+ * @slot (default) - Options to be rendered as children
32
+ * @prop {TSelectOption[]} options - Options to be rendered as children
33
+ *
34
+ *
35
+ */
36
36
  declare global {
37
37
  interface HTMLElementTagNameMap {
38
- 'pkt-listbox': PktListbox;
38
+ 'pkt-select': PktSelect & HTMLSelectElement;
39
39
  }
40
40
  }
41
41
 
@@ -1,14 +1,14 @@
1
- import { T as l, E as $, x as f, n as d, a as g } from "./element-G8JoS0Lj.js";
2
- import { o as u } from "./if-defined-rCqT8Od1.js";
3
- import { r as x } from "./state-gfUuUqVg.js";
4
- import { e as m, n as c } from "./ref-cRTOoM4R.js";
5
- import { e as v } from "./class-map-ChuDQU5C.js";
6
- import { e as b, i as T, t as a } from "./directive-B76A7YXI.js";
7
- import { f as y, m as w } from "./directive-helpers-D7XIyCQ_.js";
8
- import { P as C } from "./input-element-DM2uSYaW.js";
9
- import { P as E } from "./pkt-slot-controller-D1DakVrU.js";
10
- import "./input-wrapper-DQmYzhcy.js";
11
- import "./icon-BJnwW0eh.js";
1
+ import { T as l, E as $, x as f, n as d, a as g } from "./element-DiqKrDty.js";
2
+ import { o as u } from "./if-defined-DeANa4n5.js";
3
+ import { r as x } from "./state-CDwPbiQj.js";
4
+ import { e as m, n as c } from "./ref-B70YZNXm.js";
5
+ import { e as v } from "./class-map-D4tSZX70.js";
6
+ import { e as b, i as T, t as a } from "./directive-oAbCiebi.js";
7
+ import { f as y, m as w } from "./directive-helpers-BmXIK-1b.js";
8
+ import { P as C } from "./input-element-C4mmTk6h.js";
9
+ import { P as E } from "./pkt-slot-controller-BtVLTZb7.js";
10
+ import "./input-wrapper-P_oEi6dk.js";
11
+ import "./icon-BdY52BIt.js";
12
12
  /**
13
13
  * @license
14
14
  * Copyright 2020 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("./element-BBo3JZk5.cjs"),p=require("./if-defined-C1ZDVzYn.cjs"),c=require("./state-BILlRnrD.cjs"),l=require("./ref-DsoUUoPU.cjs"),$=require("./class-map-D4rXyUxT.cjs"),a=require("./directive-C_VV3qwo.cjs"),d=require("./directive-helpers-mGjAtADc.cjs"),x=require("./input-element-AhnBdCb8.cjs"),T=require("./pkt-slot-controller-CqNvEpFd.cjs");require("./input-wrapper-BdZxmQyO.cjs");require("./icon-BTUCDPN5.cjs");/**
1
+ "use strict";const s=require("./element-DJpGVXjq.cjs"),p=require("./if-defined-CoBDkDGb.cjs"),c=require("./state-C4LdlTYO.cjs"),l=require("./ref-CLqTsViF.cjs"),$=require("./class-map-DvBKxTiW.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-donnvcEO.cjs"),x=require("./input-element-VNai8bsq.cjs"),T=require("./pkt-slot-controller-plQxXRvV.cjs");require("./input-wrapper-DWOw7Yn-.cjs");require("./icon-UtDKPH3R.cjs");/**
2
2
  * @license
3
3
  * Copyright 2020 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -1,41 +1,41 @@
1
1
  export { }
2
2
 
3
3
 
4
- /**
5
- * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
6
- *
7
- * The component will prioritize options passed as a prop over options passed as children if both are provided.
8
- * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
9
- *
10
- * @slot (default) - Options to be rendered as children
11
- * @prop {TSelectOption[]} options - Options to be rendered as children
12
- *
13
- *
14
- */
15
4
  declare global {
16
5
  interface HTMLElementTagNameMap {
17
- 'pkt-select': PktSelect & HTMLSelectElement;
6
+ 'pkt-combobox': PktCombobox & HTMLSelectElement;
18
7
  }
19
8
  }
20
9
 
21
10
 
22
11
  declare global {
23
12
  interface HTMLElementTagNameMap {
24
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
13
+ 'pkt-icon': PktIcon;
25
14
  }
26
15
  }
27
16
 
28
17
 
29
18
  declare global {
30
19
  interface HTMLElementTagNameMap {
31
- 'pkt-icon': PktIcon;
20
+ 'pkt-listbox': PktListbox;
32
21
  }
33
22
  }
34
23
 
35
24
 
25
+ /**
26
+ * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
27
+ *
28
+ * The component will prioritize options passed as a prop over options passed as children if both are provided.
29
+ * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
30
+ *
31
+ * @slot (default) - Options to be rendered as children
32
+ * @prop {TSelectOption[]} options - Options to be rendered as children
33
+ *
34
+ *
35
+ */
36
36
  declare global {
37
37
  interface HTMLElementTagNameMap {
38
- 'pkt-listbox': PktListbox;
38
+ 'pkt-select': PktSelect & HTMLSelectElement;
39
39
  }
40
40
  }
41
41
 
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-BBo3JZk5.cjs"),u=require("./if-defined-C1ZDVzYn.cjs"),l=require("./state-BILlRnrD.cjs"),p=require("./ref-DsoUUoPU.cjs"),c=require("./class-map-D4rXyUxT.cjs"),d=require("./input-element-AhnBdCb8.cjs"),x=require("./pkt-slot-controller-CqNvEpFd.cjs");require("./input-wrapper-BdZxmQyO.cjs");require("./icon-BTUCDPN5.cjs");var $=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(o,i,s,n)=>{for(var e=n>1?void 0:n?g(i,s):i,a=o.length-1,h;a>=0;a--)(h=o[a])&&(e=(n?h(i,s,e):h(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=p.e(),this.helptextSlot=p.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,this.slotController=new x.PktSlotController(this,this.helptextSlot)}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.x`
1
+ "use strict";const t=require("./element-DJpGVXjq.cjs"),u=require("./if-defined-CoBDkDGb.cjs"),l=require("./state-C4LdlTYO.cjs"),p=require("./ref-CLqTsViF.cjs"),c=require("./class-map-DvBKxTiW.cjs"),d=require("./input-element-VNai8bsq.cjs"),x=require("./pkt-slot-controller-plQxXRvV.cjs");require("./input-wrapper-DWOw7Yn-.cjs");require("./icon-UtDKPH3R.cjs");var $=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(o,i,s,n)=>{for(var e=n>1?void 0:n?g(i,s):i,a=o.length-1,h;a>=0;a--)(h=o[a])&&(e=(n?h(i,s,e):h(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=p.e(),this.helptextSlot=p.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,this.slotController=new x.PktSlotController(this,this.helptextSlot)}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.x`
2
2
  <pkt-input-wrapper
3
3
  label="${this.label}"
4
4
  ?counter=${this.counter}