@oslokommune/punkt-elements 12.34.2 → 12.34.4

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 (144) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/accordion.d.ts +0 -46
  3. package/dist/{accordionitem-Cg-LZy7n.js → accordionitem-Db-3WiJS.js} +3 -3
  4. package/dist/{accordionitem-DDnUkCJP.cjs → accordionitem-cvsySqgK.cjs} +1 -1
  5. package/dist/{alert-BOvwM-m4.js → alert-B5lVS6Qs.js} +5 -5
  6. package/dist/{alert-B3HuK30R.cjs → alert-DWIElKEZ.cjs} +1 -1
  7. package/dist/alert.d.ts +0 -46
  8. package/dist/{backlink-1p-ADrG8.cjs → backlink-HHM21crL.cjs} +1 -1
  9. package/dist/{backlink-fjBQGFYt.js → backlink-hvyJmwrO.js} +2 -2
  10. package/dist/backlink.d.ts +0 -46
  11. package/dist/{button-Cl6psvlo.js → button-B6uRE7uT.js} +2 -2
  12. package/dist/{button-5tOMyPEx.cjs → button-BNdVIhUp.cjs} +1 -1
  13. package/dist/button.d.ts +0 -46
  14. package/dist/{calendar-Bi49Yxom.js → calendar-mTDcujoj.js} +4 -4
  15. package/dist/{calendar-BU7DqDLG.cjs → calendar-oX4HJomV.cjs} +1 -1
  16. package/dist/calendar.d.ts +0 -46
  17. package/dist/{card-Dphjc_iO.js → card-B5zTEmH1.js} +6 -6
  18. package/dist/{card-a_Cs18EQ.cjs → card-BDcr3PII.cjs} +1 -1
  19. package/dist/card.d.ts +0 -46
  20. package/dist/{checkbox-bsBqWqcn.cjs → checkbox-CqatE-eX.cjs} +1 -1
  21. package/dist/{checkbox-nAnAn0E5.js → checkbox-CyYfA2fu.js} +4 -4
  22. package/dist/checkbox.d.ts +0 -46
  23. package/dist/{class-map-BjTUtIEl.cjs → class-map-DCyaICmy.cjs} +1 -1
  24. package/dist/{class-map-D4QK1bDP.js → class-map-KyMqi0fa.js} +1 -1
  25. package/dist/{combobox-CKmkM6tY.js → combobox-CELUAZxF.js} +129 -125
  26. package/dist/combobox-D9NKnao2.cjs +115 -0
  27. package/dist/combobox.d.ts +0 -46
  28. package/dist/{datepicker-DarYkBIy.js → datepicker-B6qk_tTl.js} +11 -11
  29. package/dist/{datepicker-DW6AdQ9X.cjs → datepicker-CskZMUib.cjs} +1 -1
  30. package/dist/datepicker.d.ts +0 -46
  31. package/dist/{directive-helpers-CVAnO9Xf.js → directive-helpers-8uS_Izwn.js} +1 -1
  32. package/dist/{directive-helpers-CQimZ5PA.cjs → directive-helpers-CG7Oxal3.cjs} +1 -1
  33. package/dist/element-BSypUpzA.cjs +238 -0
  34. package/dist/{element-J964Wi0N.js → element-DjjF_tEh.js} +6679 -6673
  35. package/dist/{helptext-qBgH0lvl.js → helptext-BLHAJ1aC.js} +5 -5
  36. package/dist/{helptext-OW48aGy8.cjs → helptext-CCnYxYA9.cjs} +1 -1
  37. package/dist/helptext.d.ts +0 -46
  38. package/dist/{icon-kSv2VoAB.js → icon-Beoxup8E.js} +1 -1
  39. package/dist/{icon-Cc4gVHxd.cjs → icon-BnKGwYjj.cjs} +1 -1
  40. package/dist/icon.d.ts +0 -46
  41. package/dist/{if-defined-DEXc_i_J.js → if-defined-BErSJCeJ.js} +1 -1
  42. package/dist/{if-defined-ZR_9IQ1L.cjs → if-defined-a3sotaUr.cjs} +1 -1
  43. package/dist/index.d.ts +0 -46
  44. package/dist/{input-element-BoUU9kvo.js → input-element-Bic-t96S.js} +2 -2
  45. package/dist/{input-element-BYE0qiMh.cjs → input-element-C9ma8cdz.cjs} +1 -1
  46. package/dist/{input-wrapper-CZI_ibQL.js → input-wrapper-CeeNYbDA.js} +6 -6
  47. package/dist/{input-wrapper-DmVnotQ2.cjs → input-wrapper-Cn929YTV.cjs} +1 -1
  48. package/dist/input-wrapper.d.ts +0 -46
  49. package/dist/{link-D1Nr-VBI.js → link-BYI8VNGd.js} +4 -4
  50. package/dist/{link-3uccc2MM.cjs → link-CnibgS3c.cjs} +1 -1
  51. package/dist/link.d.ts +0 -46
  52. package/dist/{linkcard-CTNdTxvV.js → linkcard--zuuAt_v.js} +3 -3
  53. package/dist/{linkcard-P1I3dzQb.cjs → linkcard-DPGX1kb1.cjs} +1 -1
  54. package/dist/linkcard.d.ts +0 -46
  55. package/dist/{listbox-B4tiuVzB.js → listbox-C1oYnM-t.js} +5 -5
  56. package/dist/{listbox-BQu6MjAp.cjs → listbox-DqpGh7eq.cjs} +1 -1
  57. package/dist/listbox.d.ts +0 -46
  58. package/dist/{loader-CM7wLajY.cjs → loader-BN4q8pSl.cjs} +1 -1
  59. package/dist/{loader-C0zNKIJ0.js → loader-DgIiyYBl.js} +5 -5
  60. package/dist/loader.d.ts +0 -46
  61. package/dist/{messagebox-CD8fS0Ym.cjs → messagebox-BWJr42m9.cjs} +1 -1
  62. package/dist/{messagebox-DyLx08sr.js → messagebox-cme5VbUM.js} +5 -5
  63. package/dist/messagebox.d.ts +0 -46
  64. package/dist/{modal-Dnv6Y4Nv.js → modal-B-varrJT.js} +5 -5
  65. package/dist/{modal-DOCsiHGv.cjs → modal-cPcTJriW.cjs} +1 -1
  66. package/dist/modal.d.ts +0 -46
  67. package/dist/pkt-accordion.cjs +1 -1
  68. package/dist/pkt-accordion.js +2 -2
  69. package/dist/pkt-alert.cjs +1 -1
  70. package/dist/pkt-alert.js +1 -1
  71. package/dist/pkt-backlink.cjs +1 -1
  72. package/dist/pkt-backlink.js +1 -1
  73. package/dist/pkt-button.cjs +1 -1
  74. package/dist/pkt-button.js +1 -1
  75. package/dist/pkt-calendar.cjs +1 -1
  76. package/dist/pkt-calendar.js +1 -1
  77. package/dist/pkt-card.cjs +1 -1
  78. package/dist/pkt-card.js +1 -1
  79. package/dist/pkt-checkbox.cjs +1 -1
  80. package/dist/pkt-checkbox.js +1 -1
  81. package/dist/pkt-combobox.cjs +1 -1
  82. package/dist/pkt-combobox.js +1 -1
  83. package/dist/pkt-datepicker.cjs +1 -1
  84. package/dist/pkt-datepicker.js +1 -1
  85. package/dist/pkt-helptext.cjs +1 -1
  86. package/dist/pkt-helptext.js +1 -1
  87. package/dist/pkt-icon.cjs +1 -1
  88. package/dist/pkt-icon.js +1 -1
  89. package/dist/pkt-index.cjs +1 -1
  90. package/dist/pkt-index.js +27 -27
  91. package/dist/pkt-input-wrapper.cjs +1 -1
  92. package/dist/pkt-input-wrapper.js +1 -1
  93. package/dist/pkt-link.cjs +1 -1
  94. package/dist/pkt-link.js +1 -1
  95. package/dist/pkt-linkcard.cjs +1 -1
  96. package/dist/pkt-linkcard.js +1 -1
  97. package/dist/pkt-listbox.cjs +1 -1
  98. package/dist/pkt-listbox.js +1 -1
  99. package/dist/pkt-loader.cjs +1 -1
  100. package/dist/pkt-loader.js +1 -1
  101. package/dist/pkt-messagebox.cjs +1 -1
  102. package/dist/pkt-messagebox.js +1 -1
  103. package/dist/pkt-modal.cjs +1 -1
  104. package/dist/pkt-modal.js +1 -1
  105. package/dist/pkt-progressbar.cjs +1 -1
  106. package/dist/pkt-progressbar.js +2 -2
  107. package/dist/pkt-radiobutton.cjs +1 -1
  108. package/dist/pkt-radiobutton.js +1 -1
  109. package/dist/pkt-select.cjs +1 -1
  110. package/dist/pkt-select.js +1 -1
  111. package/dist/pkt-tag.cjs +1 -1
  112. package/dist/pkt-tag.js +1 -1
  113. package/dist/pkt-textarea.cjs +1 -1
  114. package/dist/pkt-textarea.js +1 -1
  115. package/dist/pkt-textinput.cjs +1 -1
  116. package/dist/pkt-textinput.js +1 -1
  117. package/dist/{progressbar-D3sqQ5g1.js → progressbar-BKt_aj7f.js} +5 -5
  118. package/dist/{progressbar-BmI-K95y.cjs → progressbar-DiRfScnB.cjs} +1 -1
  119. package/dist/progressbar.d.ts +0 -46
  120. package/dist/{radiobutton-CJYNTtFF.cjs → radiobutton-CIW0FvT8.cjs} +1 -1
  121. package/dist/{radiobutton-Bat-fmTh.js → radiobutton-DtHuz7qn.js} +5 -5
  122. package/dist/radiobutton.d.ts +0 -46
  123. package/dist/{ref-BbKbXwub.cjs → ref-BvbyvXRH.cjs} +2 -2
  124. package/dist/{ref-3rhflVgg.js → ref-iIffqQAI.js} +10 -10
  125. package/dist/{repeat-DK_E7chz.cjs → repeat-BnuruAat.cjs} +1 -1
  126. package/dist/{repeat-CTBD0h6a.js → repeat-D4kMediE.js} +2 -2
  127. package/dist/{select-Swc0c6lZ.cjs → select-BJziJVde.cjs} +1 -1
  128. package/dist/{select-CVWm9dL1.js → select-DbRLz-7l.js} +6 -6
  129. package/dist/select.d.ts +0 -46
  130. package/dist/{state-y7tCw3bg.cjs → state-B5KCNjEd.cjs} +1 -1
  131. package/dist/{state-fdb9lRrL.js → state-BtbpSrdV.js} +1 -1
  132. package/dist/{tag-Dizhf3tl.js → tag-CGnj4c1Z.js} +6 -6
  133. package/dist/{tag-Dg2-c_OZ.cjs → tag-CgkUxA5D.cjs} +1 -1
  134. package/dist/tag.d.ts +0 -46
  135. package/dist/{textarea-DkQfMu1d.js → textarea-CiA4IzMs.js} +9 -9
  136. package/dist/{textarea-go_AyeP-.cjs → textarea-qX4Inr1X.cjs} +1 -1
  137. package/dist/textarea.d.ts +0 -46
  138. package/dist/{textinput-FvLq5W70.cjs → textinput-BlsgLNwW.cjs} +1 -1
  139. package/dist/{textinput-CyJB8IDv.js → textinput-CrxjZNEq.js} +8 -8
  140. package/dist/textinput.d.ts +0 -46
  141. package/package.json +5 -5
  142. package/src/components/combobox/combobox.ts +17 -3
  143. package/dist/combobox-DqHwVglB.cjs +0 -115
  144. package/dist/element-BYpg5e6C.cjs +0 -238
@@ -1,8 +1,8 @@
1
- import { P as d, x as a, E as u, n as i, a as c } from "./element-J964Wi0N.js";
2
- import { e as f, n as m } from "./ref-3rhflVgg.js";
3
- import { o as x } from "./icon-kSv2VoAB.js";
4
- import { e as _ } from "./class-map-D4QK1bDP.js";
5
- import { r as w } from "./state-fdb9lRrL.js";
1
+ import { P as d, x as a, E as u, n as i, a as c } from "./element-DjjF_tEh.js";
2
+ import { e as f, n as m } from "./ref-iIffqQAI.js";
3
+ import { o as x } from "./icon-Beoxup8E.js";
4
+ import { e as _ } from "./class-map-KyMqi0fa.js";
5
+ import { r as w } from "./state-BtbpSrdV.js";
6
6
  import { u as v } from "./stringutils-DJjRa8dG.js";
7
7
  import { s as k } from "./input-wrapper-8iKEzDRZ.js";
8
8
  import { P as b } from "./pkt-slot-controller-DFrc5O93.js";
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./element-BYpg5e6C.cjs"),x=require("./ref-BbKbXwub.cjs"),h=require("./icon-Cc4gVHxd.cjs"),u=require("./class-map-BjTUtIEl.cjs"),c=require("./state-y7tCw3bg.cjs"),a=require("./stringutils-CkVRq4jP.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs"),k=require("./pkt-slot-controller-plQxXRvV.cjs");var _=Object.defineProperty,w=Object.getOwnPropertyDescriptor,r=(s,p,l,n)=>{for(var t=n>1?void 0:n?w(p,l):p,o=s.length-1,i;o>=0;o--)(i=s[o])&&(t=(n?i(p,l,t):i(t))||t);return n&&t&&_(p,l,t),t};exports.PktHelptext=class extends e.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=a.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const p=()=>{const t=!this.isHelpTextOpen;this.isHelpTextOpen=t,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:t}}))},l=()=>this.helptextDropdown?e.x`<div class="pkt-inputwrapper__helptext-expandable">
1
+ "use strict";const e=require("./element-BSypUpzA.cjs"),x=require("./ref-BvbyvXRH.cjs"),h=require("./icon-BnKGwYjj.cjs"),u=require("./class-map-DCyaICmy.cjs"),c=require("./state-B5KCNjEd.cjs"),a=require("./stringutils-CkVRq4jP.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs"),k=require("./pkt-slot-controller-plQxXRvV.cjs");var _=Object.defineProperty,w=Object.getOwnPropertyDescriptor,r=(s,p,l,n)=>{for(var t=n>1?void 0:n?w(p,l):p,o=s.length-1,i;o>=0;o--)(i=s[o])&&(t=(n?i(p,l,t):i(t))||t);return n&&t&&_(p,l,t),t};exports.PktHelptext=class extends e.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=a.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const p=()=>{const t=!this.isHelpTextOpen;this.isHelpTextOpen=t,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:t}}))},l=()=>this.helptextDropdown?e.x`<div class="pkt-inputwrapper__helptext-expandable">
2
2
  <button
3
3
  class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
4
4
  type="button"
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }
@@ -1,4 +1,4 @@
1
- import { E as f, T as v, P as m, x as y, n as h, a as P } from "./element-J964Wi0N.js";
1
+ import { E as f, T as v, P as m, x as y, n as h, a as P } from "./element-DjjF_tEh.js";
2
2
  import { e as g, i as k, t as _ } from "./directive-oAbCiebi.js";
3
3
  /**
4
4
  * @license
@@ -1,4 +1,4 @@
1
- "use strict";const o=require("./element-BYpg5e6C.cjs"),a=require("./directive-C7oCP5Bh.cjs");/**
1
+ "use strict";const o=require("./element-BSypUpzA.cjs"),a=require("./directive-C7oCP5Bh.cjs");/**
2
2
  * @license
3
3
  * Copyright 2017 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
package/dist/icon.d.ts CHANGED
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }
@@ -1,4 +1,4 @@
1
- import { E as r } from "./element-J964Wi0N.js";
1
+ import { E as r } from "./element-DjjF_tEh.js";
2
2
  /**
3
3
  * @license
4
4
  * Copyright 2018 Google LLC
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-BYpg5e6C.cjs");/**
1
+ "use strict";const t=require("./element-BSypUpzA.cjs");/**
2
2
  * @license
3
3
  * Copyright 2018 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
package/dist/index.d.ts CHANGED
@@ -1121,49 +1121,3 @@ export declare type TTagSkin = 'blue' | 'blue-dark' | 'blue-light' | 'green' | '
1121
1121
  export declare type TTagType = 'button' | 'reset' | 'submit';
1122
1122
 
1123
1123
  export { }
1124
-
1125
-
1126
- declare global {
1127
- interface HTMLElementTagNameMap {
1128
- 'pkt-icon': PktIcon;
1129
- }
1130
- }
1131
-
1132
-
1133
- declare global {
1134
- interface HTMLElementTagNameMap {
1135
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
1136
- }
1137
- }
1138
-
1139
-
1140
- declare global {
1141
- interface HTMLElementTagNameMap {
1142
- 'pkt-listbox': PktListbox;
1143
- }
1144
- }
1145
-
1146
-
1147
- /**
1148
- * Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
1149
- *
1150
- * The component will prioritize options passed as a prop over options passed as children if both are provided.
1151
- * This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
1152
- *
1153
- * @slot (default) - Options to be rendered as children
1154
- * @prop {TSelectOption[]} options - Options to be rendered as children
1155
- *
1156
- *
1157
- */
1158
- declare global {
1159
- interface HTMLElementTagNameMap {
1160
- 'pkt-select': PktSelect & HTMLSelectElement;
1161
- }
1162
- }
1163
-
1164
-
1165
- declare global {
1166
- interface Window {
1167
- pktTz: string;
1168
- }
1169
- }
@@ -1,5 +1,5 @@
1
- import { P as y, t as l, n as s } from "./element-J964Wi0N.js";
2
- import { r as c } from "./state-fdb9lRrL.js";
1
+ import { P as y, t as l, n as s } from "./element-DjjF_tEh.js";
2
+ import { r as c } from "./state-BtbpSrdV.js";
3
3
  import { u as m } from "./stringutils-DJjRa8dG.js";
4
4
  import { s as g } from "./input-wrapper-8iKEzDRZ.js";
5
5
  var v = Object.defineProperty, e = (p, t, r, n) => {
@@ -1 +1 @@
1
- "use strict";const e=require("./element-BYpg5e6C.cjs"),f=require("./state-y7tCw3bg.cjs"),c=require("./stringutils-CkVRq4jP.cjs"),y=require("./input-wrapper-EoSAbU-U.cjs");var m=Object.defineProperty,s=(o,t,r,n)=>{for(var a=void 0,l=o.length-1,h;l>=0;l--)(h=o[l])&&(a=h(t,r,a)||a);return a&&m(t,r,a),a};class i extends e.PktElement{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=c.uuidish(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=y.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=e.translations.forms.labels.optional,this.requiredText=e.translations.forms.labels.required,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var r,n,a,l,h,u,p,d;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},e.translations.forms.messages.required,t):(r=t.validity)!=null&&r.typeMismatch||(n=t.validity)!=null&&n.badInput?this.internals.setValidity({typeMismatch:!0},e.translations.forms.messages.invalid,t):(a=t.validity)!=null&&a.patternMismatch?this.internals.setValidity({patternMismatch:!0},e.translations.forms.messages.invalidPattern,t):(l=t.validity)!=null&&l.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},e.translations.forms.messages.tooShort,t):(h=t.validity)!=null&&h.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},e.translations.forms.messages.tooLong,t):(u=t.validity)!=null&&u.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},e.translations.forms.messages.rangeUnderflow,t):(p=t.validity)!=null&&p.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},e.translations.forms.messages.rangeOverflow,t):(d=t.validity)!=null&&d.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const r=new FormData;t.forEach(n=>{r.append(this.name,n)}),this.internals.setFormValue(r)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const r=this.internals.form||this.closest("form");r&&r.querySelectorAll(`pkt-radiobutton[name=${this.name}], input[type=radio][name=${this.name}]`).forEach(n=>{const a=n;a.name===this.name&&a.value!==this.value&&a.checked&&(a.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue("",""),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,r){(r!==this.value||r!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&r&&r.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(r==null?void 0:r.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus"))}onBlur(){this.dispatchEvent(new FocusEvent("blur"))}onInput(){this.dispatchEvent(new InputEvent("input"))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const r=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=r,this.internals.setFormValue(r?this.value||"on":"",r?this.value||"on":"")}else this.internals.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}}s([e.n()],i.prototype,"defaultValue");s([e.n({type:Boolean,reflect:!0})],i.prototype,"disabled");s([e.n({type:Boolean,reflect:!0})],i.prototype,"readonly");s([e.n({type:Boolean,reflect:!0})],i.prototype,"required");s([e.n({type:Number,reflect:!0})],i.prototype,"max");s([e.n({type:Number,reflect:!0})],i.prototype,"maxlength");s([e.n({type:Number,reflect:!0})],i.prototype,"min");s([e.n({type:Number,reflect:!0})],i.prototype,"minlength");s([e.n({type:String})],i.prototype,"ariaDescribedBy");s([e.n({type:String})],i.prototype,"ariaLabelledby");s([e.n({type:String,reflect:!0})],i.prototype,"name");s([e.n({type:String,reflect:!0})],i.prototype,"pattern");s([e.n({type:String,reflect:!0})],i.prototype,"placeholder");s([e.n({type:String,reflect:!0})],i.prototype,"id");s([e.n({type:Boolean})],i.prototype,"counter");s([e.n({type:Boolean})],i.prototype,"hasError");s([e.n({type:Boolean})],i.prototype,"inline");s([e.n({type:Boolean})],i.prototype,"hasFieldset");s([e.n({type:Boolean})],i.prototype,"optionalTag");s([e.n({type:Boolean})],i.prototype,"requiredTag");s([e.n({type:Boolean})],i.prototype,"skipForwardTestid");s([e.n({type:Boolean,reflect:!1})],i.prototype,"useWrapper");s([e.n({type:Boolean,reflect:!0})],i.prototype,"fullwidth");s([e.n({type:Number})],i.prototype,"counterMaxLength");s([e.n({type:String})],i.prototype,"errorMessage");s([e.n({type:String})],i.prototype,"helptext");s([e.n({type:String})],i.prototype,"helptextDropdown");s([e.n({type:String,reflect:!1})],i.prototype,"helptextDropdownButton");s([e.n({type:String})],i.prototype,"label");s([e.n({type:String,reflect:!1})],i.prototype,"optionalText");s([e.n({type:String,reflect:!1})],i.prototype,"requiredText");s([e.n({type:String,attribute:"data-testid"})],i.prototype,"dataTestid");s([f.r()],i.prototype,"touched");exports.PktInputElement=i;
1
+ "use strict";const e=require("./element-BSypUpzA.cjs"),f=require("./state-B5KCNjEd.cjs"),c=require("./stringutils-CkVRq4jP.cjs"),y=require("./input-wrapper-EoSAbU-U.cjs");var m=Object.defineProperty,s=(o,t,r,n)=>{for(var a=void 0,l=o.length-1,h;l>=0;l--)(h=o[l])&&(a=h(t,r,a)||a);return a&&m(t,r,a),a};class i extends e.PktElement{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=c.uuidish(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=y.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=e.translations.forms.labels.optional,this.requiredText=e.translations.forms.labels.required,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(t){var r,n,a,l,h,u,p,d;t&&(this.required&&!this.value?this.internals.setValidity({valueMissing:!0},e.translations.forms.messages.required,t):(r=t.validity)!=null&&r.typeMismatch||(n=t.validity)!=null&&n.badInput?this.internals.setValidity({typeMismatch:!0},e.translations.forms.messages.invalid,t):(a=t.validity)!=null&&a.patternMismatch?this.internals.setValidity({patternMismatch:!0},e.translations.forms.messages.invalidPattern,t):(l=t.validity)!=null&&l.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},e.translations.forms.messages.tooShort,t):(h=t.validity)!=null&&h.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},e.translations.forms.messages.tooLong,t):(u=t.validity)!=null&&u.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},e.translations.forms.messages.rangeUnderflow,t):(p=t.validity)!=null&&p.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},e.translations.forms.messages.rangeOverflow,t):(d=t.validity)!=null&&d.customError?this.internals.setValidity({customError:!0},t.validationMessage,t):this.internals.setValidity({}))}setFormValue(t){if(this.internals)if(Array.isArray(t)){const r=new FormData;t.forEach(n=>{r.append(this.name,n)}),this.internals.setFormValue(r)}else this.internals.setFormValue(t)}valueChecked(t){if(!this.touched)return;const r=this.internals.form||this.closest("form");r&&r.querySelectorAll(`pkt-radiobutton[name=${this.name}], input[type=radio][name=${this.name}]`).forEach(n=>{const a=n;a.name===this.name&&a.value!==this.value&&a.checked&&(a.checked=!1)}),typeof t=="string"?(this.checked=t==="true",this.internals.ariaChecked=t==="true"):typeof t=="boolean"&&(this.checked=t,this.internals.ariaChecked=t),this.checked?(this.internals.setFormValue(this.value||"on",this.value||"on"),this.internals.states.add("--checked")):(this.internals.setFormValue("",""),this.internals.states.delete("--checked")),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:this.checked,bubbles:!0,composed:!0})),this.internals.reportValidity()}valueChanged(t,r){(r!==this.value||r!==this._value)&&(typeof t=="string"?((this.multiple||this.range)&&t.includes(",")&&(t=t.split(",")),this.value=t,this._value=Array.isArray(t)?t:[t]):Array.isArray(t)?(this.value=this.multiple||this.range?t:t[0],this._value=t):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&r&&r.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(r==null?void 0:r.toString())&&this.onChange(this.value),this.updateComplete.then(()=>this.requestUpdate()))}clearInputValue(){const t=this.multiple||this.range?[]:"";this.value=t,this.internals.setFormValue(t),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0}))}onFocus(){this.dispatchEvent(new FocusEvent("focus"))}onBlur(){this.dispatchEvent(new FocusEvent("blur"))}onInput(){this.dispatchEvent(new InputEvent("input"))}onChange(t){if(!this.touched){this.touched=!0,t&&this.setFormValue(t);return}typeof t!="string"&&!Array.isArray(t)||((this.range||this.multiple)&&!Array.isArray(t)&&t.includes(",")&&(t=t.split(",")),!this.multiple&&!this.range&&Array.isArray(t)&&(t=t[0]),this.setFormValue(t),this.manageValidity(this.inputRef.value),this.inputRefTo&&this.manageValidity(this.inputRefTo.value),this.dispatchEvent(new Event("change")),this.dispatchEvent(new CustomEvent("value-change",{detail:t,bubbles:!0,composed:!0})),this.internals.reportValidity())}updated(t){super.updated(t),t.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(t){if(super.firstUpdated(t),this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked=!0,this.checked=!0),this.required&&(this.internals.ariaRequired=!0),this.disabled&&(this.internals.ariaDisabled=!0),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const r=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=r,this.internals.setFormValue(r?this.value||"on":"",r?this.value||"on":"")}else this.internals.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}}s([e.n()],i.prototype,"defaultValue");s([e.n({type:Boolean,reflect:!0})],i.prototype,"disabled");s([e.n({type:Boolean,reflect:!0})],i.prototype,"readonly");s([e.n({type:Boolean,reflect:!0})],i.prototype,"required");s([e.n({type:Number,reflect:!0})],i.prototype,"max");s([e.n({type:Number,reflect:!0})],i.prototype,"maxlength");s([e.n({type:Number,reflect:!0})],i.prototype,"min");s([e.n({type:Number,reflect:!0})],i.prototype,"minlength");s([e.n({type:String})],i.prototype,"ariaDescribedBy");s([e.n({type:String})],i.prototype,"ariaLabelledby");s([e.n({type:String,reflect:!0})],i.prototype,"name");s([e.n({type:String,reflect:!0})],i.prototype,"pattern");s([e.n({type:String,reflect:!0})],i.prototype,"placeholder");s([e.n({type:String,reflect:!0})],i.prototype,"id");s([e.n({type:Boolean})],i.prototype,"counter");s([e.n({type:Boolean})],i.prototype,"hasError");s([e.n({type:Boolean})],i.prototype,"inline");s([e.n({type:Boolean})],i.prototype,"hasFieldset");s([e.n({type:Boolean})],i.prototype,"optionalTag");s([e.n({type:Boolean})],i.prototype,"requiredTag");s([e.n({type:Boolean})],i.prototype,"skipForwardTestid");s([e.n({type:Boolean,reflect:!1})],i.prototype,"useWrapper");s([e.n({type:Boolean,reflect:!0})],i.prototype,"fullwidth");s([e.n({type:Number})],i.prototype,"counterMaxLength");s([e.n({type:String})],i.prototype,"errorMessage");s([e.n({type:String})],i.prototype,"helptext");s([e.n({type:String})],i.prototype,"helptextDropdown");s([e.n({type:String,reflect:!1})],i.prototype,"helptextDropdownButton");s([e.n({type:String})],i.prototype,"label");s([e.n({type:String,reflect:!1})],i.prototype,"optionalText");s([e.n({type:String,reflect:!1})],i.prototype,"requiredText");s([e.n({type:String,attribute:"data-testid"})],i.prototype,"dataTestid");s([f.r()],i.prototype,"touched");exports.PktInputElement=i;
@@ -1,12 +1,12 @@
1
- import { P as m, E as s, x as p, n as r, a as k } from "./element-J964Wi0N.js";
1
+ import { P as m, E as s, x as p, n as r, a as k } from "./element-DjjF_tEh.js";
2
2
  import { P as v } from "./pkt-slot-controller-DFrc5O93.js";
3
- import { e as f, n as g } from "./ref-3rhflVgg.js";
4
- import { o as w } from "./icon-kSv2VoAB.js";
5
- import { e as b } from "./class-map-D4QK1bDP.js";
6
- import { r as S } from "./state-fdb9lRrL.js";
3
+ import { e as f, n as g } from "./ref-iIffqQAI.js";
4
+ import { o as w } from "./icon-Beoxup8E.js";
5
+ import { e as b } from "./class-map-KyMqi0fa.js";
6
+ import { r as S } from "./state-BtbpSrdV.js";
7
7
  import { u as T } from "./stringutils-DJjRa8dG.js";
8
8
  import { s as i } from "./input-wrapper-8iKEzDRZ.js";
9
- import "./helptext-qBgH0lvl.js";
9
+ import "./helptext-BLHAJ1aC.js";
10
10
  var E = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (o, h, a, n) => {
11
11
  for (var l = n > 1 ? void 0 : n ? _(h, a) : h, u = o.length - 1, d; u >= 0; u--)
12
12
  (d = o[u]) && (l = (n ? d(h, a, l) : d(l)) || l);
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-BYpg5e6C.cjs"),b=require("./pkt-slot-controller-plQxXRvV.cjs"),a=require("./ref-BbKbXwub.cjs"),y=require("./icon-Cc4gVHxd.cjs"),c=require("./class-map-BjTUtIEl.cjs"),f=require("./state-y7tCw3bg.cjs"),$=require("./stringutils-CkVRq4jP.cjs"),p=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-OW48aGy8.cjs");var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,e=(u,r,i,o)=>{for(var s=o>1?void 0:o?P(r,i):r,n=u.length-1,l;n>=0;n--)(l=u[n])&&(s=(o?l(r,i,s):l(s))||s);return o&&s&&I(r,i,s),s};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=a.e(),this.helptextSlot=a.e(),this.hasHelptextSlot=!0,this.forId=$.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=p.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=p.specs.props.optionalTag.default,this.optionalText=p.specs.props.optionalText.default,this.requiredTag=p.specs.props.requiredTag.default,this.requiredText=p.specs.props.requiredText.default,this.hasError=p.specs.props.hasError.default,this.errorMessage="",this.disabled=p.specs.props.disabled.default,this.inline=p.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=p.specs.props.hasFieldset.default,this.useWrapper=p.specs.props.useWrapper.default,this.role="group",this.slotController=new b.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updateSlots(r){this.hasHelptextSlot=r.has("helptext"),this.requestUpdate()}updated(r){super.updated(r)}render(){const r={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},i={"pkt-tag":!0,"pkt-tag--small":!0,"pkt-tag--thin-text":!0,"pkt-tag--blue-light":this.optionalTag,"pkt-tag--beige":!this.optionalTag&&this.requiredTag},o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>this.optionalTag||this.requiredTag?t.x`<span class=${c.e(i)}
1
+ "use strict";const t=require("./element-BSypUpzA.cjs"),b=require("./pkt-slot-controller-plQxXRvV.cjs"),a=require("./ref-BvbyvXRH.cjs"),y=require("./icon-BnKGwYjj.cjs"),c=require("./class-map-DCyaICmy.cjs"),f=require("./state-B5KCNjEd.cjs"),$=require("./stringutils-CkVRq4jP.cjs"),p=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-CCnYxYA9.cjs");var I=Object.defineProperty,P=Object.getOwnPropertyDescriptor,e=(u,r,i,o)=>{for(var s=o>1?void 0:o?P(r,i):r,n=u.length-1,l;n>=0;n--)(l=u[n])&&(s=(o?l(r,i,s):l(s))||s);return o&&s&&I(r,i,s),s};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=a.e(),this.helptextSlot=a.e(),this.hasHelptextSlot=!0,this.forId=$.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=p.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=p.specs.props.optionalTag.default,this.optionalText=p.specs.props.optionalText.default,this.requiredTag=p.specs.props.requiredTag.default,this.requiredText=p.specs.props.requiredText.default,this.hasError=p.specs.props.hasError.default,this.errorMessage="",this.disabled=p.specs.props.disabled.default,this.inline=p.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=p.specs.props.hasFieldset.default,this.useWrapper=p.specs.props.useWrapper.default,this.role="group",this.slotController=new b.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updateSlots(r){this.hasHelptextSlot=r.has("helptext"),this.requestUpdate()}updated(r){super.updated(r)}render(){const r={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},i={"pkt-tag":!0,"pkt-tag--small":!0,"pkt-tag--thin-text":!0,"pkt-tag--blue-light":this.optionalTag,"pkt-tag--beige":!this.optionalTag&&this.requiredTag},o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>this.optionalTag||this.requiredTag?t.x`<span class=${c.e(i)}
2
2
  >${this.optionalTag?this.optionalText:this.requiredTag?this.requiredText:t.E}</span
3
3
  >`:t.E,n=()=>this.useWrapper?this.hasFieldset?t.x`<legend
4
4
  class="pkt-inputwrapper__legend"
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }
@@ -1,8 +1,8 @@
1
- import { P as f, E as u, x as h, n as i, a as k } from "./element-J964Wi0N.js";
1
+ import { P as f, E as u, x as h, n as i, a as k } from "./element-DjjF_tEh.js";
2
2
  import { P as m } from "./pkt-slot-controller-DFrc5O93.js";
3
- import { e as d, n as P } from "./ref-3rhflVgg.js";
4
- import { e as g } from "./class-map-D4QK1bDP.js";
5
- import "./icon-kSv2VoAB.js";
3
+ import { e as d, n as P } from "./ref-iIffqQAI.js";
4
+ import { e as g } from "./class-map-KyMqi0fa.js";
5
+ import "./icon-Beoxup8E.js";
6
6
  const v = {
7
7
  href: {
8
8
  default: "#"
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-BYpg5e6C.cjs"),k=require("./pkt-slot-controller-plQxXRvV.cjs"),p=require("./ref-BbKbXwub.cjs"),h=require("./class-map-BjTUtIEl.cjs");require("./icon-Cc4gVHxd.cjs");const f={href:{default:"#"},target:{default:"_self"},external:{default:!1}},a={props:f};var u=Object.defineProperty,P=Object.getOwnPropertyDescriptor,n=(o,i,s,r)=>{for(var e=r>1?void 0:r?P(i,s):i,l=o.length-1,c;l>=0;l--)(c=o[l])&&(e=(r?c(i,s,e):c(e))||e);return r&&e&&u(i,s,e),e};exports.PktLink=class extends t.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.href=a.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=a.props.external.default,this.target=a.props.target.default,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const i={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return t.x`<a
1
+ "use strict";const t=require("./element-BSypUpzA.cjs"),k=require("./pkt-slot-controller-plQxXRvV.cjs"),p=require("./ref-BvbyvXRH.cjs"),h=require("./class-map-DCyaICmy.cjs");require("./icon-BnKGwYjj.cjs");const f={href:{default:"#"},target:{default:"_self"},external:{default:!1}},a={props:f};var u=Object.defineProperty,P=Object.getOwnPropertyDescriptor,n=(o,i,s,r)=>{for(var e=r>1?void 0:r?P(i,s):i,l=o.length-1,c;l>=0;l--)(c=o[l])&&(e=(r?c(i,s,e):c(e))||e);return r&&e&&u(i,s,e),e};exports.PktLink=class extends t.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.href=a.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=a.props.external.default,this.target=a.props.target.default,this.slotController=new k.PktSlotController(this,this.defaultSlot)}render(){const i={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return t.x`<a
2
2
  class=${h.e(i)}
3
3
  href=${this.href}
4
4
  @click=${this.handleClick}
package/dist/link.d.ts CHANGED
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }
@@ -1,7 +1,7 @@
1
- import { P as f, x as c, n, a as h } from "./element-J964Wi0N.js";
2
- import { e as k, n as m } from "./ref-3rhflVgg.js";
1
+ import { P as f, x as c, n, a as h } from "./element-DjjF_tEh.js";
2
+ import { e as k, n as m } from "./ref-iIffqQAI.js";
3
3
  import { P as u } from "./pkt-slot-controller-DFrc5O93.js";
4
- import "./icon-kSv2VoAB.js";
4
+ import "./icon-Beoxup8E.js";
5
5
  var _ = Object.defineProperty, d = Object.getOwnPropertyDescriptor, r = (l, i, s, o) => {
6
6
  for (var e = o > 1 ? void 0 : o ? d(i, s) : i, a = l.length - 1, p; a >= 0; a--)
7
7
  (p = l[a]) && (e = (o ? p(i, s, e) : p(e)) || e);
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-BYpg5e6C.cjs"),k=require("./ref-BbKbXwub.cjs"),p=require("./pkt-slot-controller-plQxXRvV.cjs");require("./icon-Cc4gVHxd.cjs");var c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(s,n,i,l)=>{for(var e=l>1?void 0:l?h(n,i):n,o=s.length-1,a;o>=0;o--)(a=s[o])&&(e=(l?a(n,i,e):a(e))||e);return l&&e&&c(n,i,e),e};exports.PktLinkCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=k.e(),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal",this.slotController=new p.PktSlotController(this,this.defaultSlot)}render(){const n=["pkt-linkcard",this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(" "),i=["pkt-linkcard__title",this.external&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return t.x`
1
+ "use strict";const t=require("./element-BSypUpzA.cjs"),k=require("./ref-BvbyvXRH.cjs"),p=require("./pkt-slot-controller-plQxXRvV.cjs");require("./icon-BnKGwYjj.cjs");var c=Object.defineProperty,h=Object.getOwnPropertyDescriptor,r=(s,n,i,l)=>{for(var e=l>1?void 0:l?h(n,i):n,o=s.length-1,a;o>=0;o--)(a=s[o])&&(e=(l?a(n,i,e):a(e))||e);return l&&e&&c(n,i,e),e};exports.PktLinkCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=k.e(),this.title="",this.href="#",this.iconName="",this.external=!1,this.openInNewTab=!1,this.skin="normal",this.slotController=new p.PktSlotController(this,this.defaultSlot)}render(){const n=["pkt-linkcard",this.skin&&`pkt-linkcard--${this.skin}`].filter(Boolean).join(" "),i=["pkt-linkcard__title",this.external&&"pkt-link pkt-link--external"].filter(Boolean).join(" ");return t.x`
2
2
  <a
3
3
  href=${this.href}
4
4
  class=${n}
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }
@@ -1,8 +1,8 @@
1
- import { P as u, x as r, E as p, t as b, n as l, a as f } from "./element-J964Wi0N.js";
2
- import { r as m } from "./state-fdb9lRrL.js";
3
- import { o as y } from "./if-defined-DEXc_i_J.js";
4
- import { c as k } from "./repeat-CTBD0h6a.js";
5
- import { e as d } from "./class-map-D4QK1bDP.js";
1
+ import { P as u, x as r, E as p, t as b, n as l, a as f } from "./element-DjjF_tEh.js";
2
+ import { r as m } from "./state-BtbpSrdV.js";
3
+ import { o as y } from "./if-defined-BErSJCeJ.js";
4
+ import { c as k } from "./repeat-D4kMediE.js";
5
+ import { e as d } from "./class-map-KyMqi0fa.js";
6
6
  import { u as x } from "./stringutils-DJjRa8dG.js";
7
7
  var O = Object.defineProperty, g = Object.getOwnPropertyDescriptor, a = (e, t, s, o) => {
8
8
  for (var n = o > 1 ? void 0 : o ? g(t, s) : t, c = e.length - 1, h; c >= 0; c--)
@@ -1,4 +1,4 @@
1
- "use strict";const s=require("./element-BYpg5e6C.cjs"),p=require("./state-y7tCw3bg.cjs"),h=require("./if-defined-ZR_9IQ1L.cjs"),u=require("./repeat-DK_E7chz.cjs"),c=require("./class-map-BjTUtIEl.cjs"),d=require("./stringutils-CkVRq4jP.cjs");var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(r,e,t,i)=>{for(var a=i>1?void 0:i?f(e,t):e,o=r.length-1,l;o>=0;o--)(l=r[o])&&(a=(i?l(e,t,a):l(a))||a);return i&&a&&b(e,t,a),a};exports.PktListbox=class extends s.PktElement{constructor(){super(...arguments),this.id=d.uuidish(),this.label=null,this.options=[],this.isOpen=!1,this.disabled=!1,this.includeSearch=!1,this.isMultiSelect=!1,this.allowUserInput=!1,this.maxIsReached=!1,this.customUserInput=null,this.searchPlaceholder=null,this.searchValue=null,this.maxLength=0,this.userMessage=null,this._selectedOptions=0,this._filteredOptions=[]}connectedCallback(){super.connectedCallback(),this.includeSearch&&!this.searchValue&&(this.searchValue=""),this.options.length>0&&this.filterOptions(),this.setAttribute("tabindex","-1"),this.addEventListener("focus",this.focusFirstOrSelectedOption)}updated(e){(e.has("options")||e.has("searchValue"))&&this.filterOptions(),super.updated(e)}attributeChangedCallback(e,t,i){(e==="options"||e==="searchValue"||e==="search-value")&&this.filterOptions(),super.attributeChangedCallback(e,t,i)}render(){return s.x`
1
+ "use strict";const s=require("./element-BSypUpzA.cjs"),p=require("./state-B5KCNjEd.cjs"),h=require("./if-defined-a3sotaUr.cjs"),u=require("./repeat-BnuruAat.cjs"),c=require("./class-map-DCyaICmy.cjs"),d=require("./stringutils-CkVRq4jP.cjs");var b=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(r,e,t,i)=>{for(var a=i>1?void 0:i?f(e,t):e,o=r.length-1,l;o>=0;o--)(l=r[o])&&(a=(i?l(e,t,a):l(a))||a);return i&&a&&b(e,t,a),a};exports.PktListbox=class extends s.PktElement{constructor(){super(...arguments),this.id=d.uuidish(),this.label=null,this.options=[],this.isOpen=!1,this.disabled=!1,this.includeSearch=!1,this.isMultiSelect=!1,this.allowUserInput=!1,this.maxIsReached=!1,this.customUserInput=null,this.searchPlaceholder=null,this.searchValue=null,this.maxLength=0,this.userMessage=null,this._selectedOptions=0,this._filteredOptions=[]}connectedCallback(){super.connectedCallback(),this.includeSearch&&!this.searchValue&&(this.searchValue=""),this.options.length>0&&this.filterOptions(),this.setAttribute("tabindex","-1"),this.addEventListener("focus",this.focusFirstOrSelectedOption)}updated(e){(e.has("options")||e.has("searchValue"))&&this.filterOptions(),super.updated(e)}attributeChangedCallback(e,t,i){(e==="options"||e==="searchValue"||e==="search-value")&&this.filterOptions(),super.attributeChangedCallback(e,t,i)}render(){return s.x`
2
2
  <div
3
3
  class=${c.e({"pkt-listbox":!0,"pkt-listbox__open":this.isOpen,"pkt-txt-16-light":!0})}
4
4
  role="listbox"
package/dist/listbox.d.ts CHANGED
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./element-BYpg5e6C.cjs"),d=require("./class-map-BjTUtIEl.cjs"),u=require("./state-y7tCw3bg.cjs"),p=require("./ref-BbKbXwub.cjs"),h=require("./pkt-slot-controller-plQxXRvV.cjs");require("./icon-Cc4gVHxd.cjs");var c=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(o,t,r,i)=>{for(var a=i>1?void 0:i?y(t,r):t,l=o.length-1,n;l>=0;l--)(n=o[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&c(t,r,a),a};exports.PktLoader=class extends e.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this._shouldDisplayLoader=!1,this.slotController=new h.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=d.e({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),r=d.e({"pkt-contents":!0,"pkt-hide":this.isLoading});return e.x`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${t}>
1
+ "use strict";const e=require("./element-BSypUpzA.cjs"),d=require("./class-map-DCyaICmy.cjs"),u=require("./state-B5KCNjEd.cjs"),p=require("./ref-BvbyvXRH.cjs"),h=require("./pkt-slot-controller-plQxXRvV.cjs");require("./icon-BnKGwYjj.cjs");var c=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(o,t,r,i)=>{for(var a=i>1?void 0:i?y(t,r):t,l=o.length-1,n;l>=0;l--)(n=o[l])&&(a=(i?n(t,r,a):n(a))||a);return i&&a&&c(t,r,a),a};exports.PktLoader=class extends e.PktElement{constructor(){super(),this.defaultSlot=p.e(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this._shouldDisplayLoader=!1,this.slotController=new h.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback(),this._shouldDisplayLoader=this.delay===0,this.delay>0&&this.setupLoader()}updated(t){t.has("delay")&&this.setupLoader()}render(){const t=d.e({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),r=d.e({"pkt-contents":!0,"pkt-hide":this.isLoading});return e.x`<div role="status" aria-live="polite" .aria-busy=${this.isLoading} class=${t}>
2
2
  ${this.isLoading&&this._shouldDisplayLoader?e.x`<div class="pkt-loader__spinner">
3
3
  <pkt-icon
4
4
  name=${this.getVariant(this.variant)}
@@ -1,9 +1,9 @@
1
- import { P as u, E as y, x as d, n as o, a as c } from "./element-J964Wi0N.js";
2
- import { e as h } from "./class-map-D4QK1bDP.js";
3
- import { r as m } from "./state-fdb9lRrL.js";
4
- import { e as f, n as v } from "./ref-3rhflVgg.js";
1
+ import { P as u, E as y, x as d, n as o, a as c } from "./element-DjjF_tEh.js";
2
+ import { e as h } from "./class-map-KyMqi0fa.js";
3
+ import { r as m } from "./state-BtbpSrdV.js";
4
+ import { e as f, n as v } from "./ref-iIffqQAI.js";
5
5
  import { P as _ } from "./pkt-slot-controller-DFrc5O93.js";
6
- import "./icon-kSv2VoAB.js";
6
+ import "./icon-Beoxup8E.js";
7
7
  var g = Object.defineProperty, L = Object.getOwnPropertyDescriptor, s = (e, a, l, r) => {
8
8
  for (var i = r > 1 ? void 0 : r ? L(a, l) : a, p = e.length - 1, n; p >= 0; p--)
9
9
  (n = e[p]) && (i = (r ? n(a, l, i) : n(i)) || i);
package/dist/loader.d.ts CHANGED
@@ -1,47 +1 @@
1
1
  export { }
2
-
3
-
4
- declare global {
5
- interface HTMLElementTagNameMap {
6
- 'pkt-icon': PktIcon;
7
- }
8
- }
9
-
10
-
11
- declare global {
12
- interface HTMLElementTagNameMap {
13
- 'pkt-combobox': PktCombobox & HTMLSelectElement;
14
- }
15
- }
16
-
17
-
18
- declare global {
19
- interface HTMLElementTagNameMap {
20
- 'pkt-listbox': PktListbox;
21
- }
22
- }
23
-
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
- declare global {
37
- interface HTMLElementTagNameMap {
38
- 'pkt-select': PktSelect & HTMLSelectElement;
39
- }
40
- }
41
-
42
-
43
- declare global {
44
- interface Window {
45
- pktTz: string;
46
- }
47
- }