@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.
- package/CHANGELOG.md +6 -0
- package/dist/accordion.d.ts +0 -46
- package/dist/{accordionitem-Cg-LZy7n.js → accordionitem-Db-3WiJS.js} +3 -3
- package/dist/{accordionitem-DDnUkCJP.cjs → accordionitem-cvsySqgK.cjs} +1 -1
- package/dist/{alert-BOvwM-m4.js → alert-B5lVS6Qs.js} +5 -5
- package/dist/{alert-B3HuK30R.cjs → alert-DWIElKEZ.cjs} +1 -1
- package/dist/alert.d.ts +0 -46
- package/dist/{backlink-1p-ADrG8.cjs → backlink-HHM21crL.cjs} +1 -1
- package/dist/{backlink-fjBQGFYt.js → backlink-hvyJmwrO.js} +2 -2
- package/dist/backlink.d.ts +0 -46
- package/dist/{button-Cl6psvlo.js → button-B6uRE7uT.js} +2 -2
- package/dist/{button-5tOMyPEx.cjs → button-BNdVIhUp.cjs} +1 -1
- package/dist/button.d.ts +0 -46
- package/dist/{calendar-Bi49Yxom.js → calendar-mTDcujoj.js} +4 -4
- package/dist/{calendar-BU7DqDLG.cjs → calendar-oX4HJomV.cjs} +1 -1
- package/dist/calendar.d.ts +0 -46
- package/dist/{card-Dphjc_iO.js → card-B5zTEmH1.js} +6 -6
- package/dist/{card-a_Cs18EQ.cjs → card-BDcr3PII.cjs} +1 -1
- package/dist/card.d.ts +0 -46
- package/dist/{checkbox-bsBqWqcn.cjs → checkbox-CqatE-eX.cjs} +1 -1
- package/dist/{checkbox-nAnAn0E5.js → checkbox-CyYfA2fu.js} +4 -4
- package/dist/checkbox.d.ts +0 -46
- package/dist/{class-map-BjTUtIEl.cjs → class-map-DCyaICmy.cjs} +1 -1
- package/dist/{class-map-D4QK1bDP.js → class-map-KyMqi0fa.js} +1 -1
- package/dist/{combobox-CKmkM6tY.js → combobox-CELUAZxF.js} +129 -125
- package/dist/combobox-D9NKnao2.cjs +115 -0
- package/dist/combobox.d.ts +0 -46
- package/dist/{datepicker-DarYkBIy.js → datepicker-B6qk_tTl.js} +11 -11
- package/dist/{datepicker-DW6AdQ9X.cjs → datepicker-CskZMUib.cjs} +1 -1
- package/dist/datepicker.d.ts +0 -46
- package/dist/{directive-helpers-CVAnO9Xf.js → directive-helpers-8uS_Izwn.js} +1 -1
- package/dist/{directive-helpers-CQimZ5PA.cjs → directive-helpers-CG7Oxal3.cjs} +1 -1
- package/dist/element-BSypUpzA.cjs +238 -0
- package/dist/{element-J964Wi0N.js → element-DjjF_tEh.js} +6679 -6673
- package/dist/{helptext-qBgH0lvl.js → helptext-BLHAJ1aC.js} +5 -5
- package/dist/{helptext-OW48aGy8.cjs → helptext-CCnYxYA9.cjs} +1 -1
- package/dist/helptext.d.ts +0 -46
- package/dist/{icon-kSv2VoAB.js → icon-Beoxup8E.js} +1 -1
- package/dist/{icon-Cc4gVHxd.cjs → icon-BnKGwYjj.cjs} +1 -1
- package/dist/icon.d.ts +0 -46
- package/dist/{if-defined-DEXc_i_J.js → if-defined-BErSJCeJ.js} +1 -1
- package/dist/{if-defined-ZR_9IQ1L.cjs → if-defined-a3sotaUr.cjs} +1 -1
- package/dist/index.d.ts +0 -46
- package/dist/{input-element-BoUU9kvo.js → input-element-Bic-t96S.js} +2 -2
- package/dist/{input-element-BYE0qiMh.cjs → input-element-C9ma8cdz.cjs} +1 -1
- package/dist/{input-wrapper-CZI_ibQL.js → input-wrapper-CeeNYbDA.js} +6 -6
- package/dist/{input-wrapper-DmVnotQ2.cjs → input-wrapper-Cn929YTV.cjs} +1 -1
- package/dist/input-wrapper.d.ts +0 -46
- package/dist/{link-D1Nr-VBI.js → link-BYI8VNGd.js} +4 -4
- package/dist/{link-3uccc2MM.cjs → link-CnibgS3c.cjs} +1 -1
- package/dist/link.d.ts +0 -46
- package/dist/{linkcard-CTNdTxvV.js → linkcard--zuuAt_v.js} +3 -3
- package/dist/{linkcard-P1I3dzQb.cjs → linkcard-DPGX1kb1.cjs} +1 -1
- package/dist/linkcard.d.ts +0 -46
- package/dist/{listbox-B4tiuVzB.js → listbox-C1oYnM-t.js} +5 -5
- package/dist/{listbox-BQu6MjAp.cjs → listbox-DqpGh7eq.cjs} +1 -1
- package/dist/listbox.d.ts +0 -46
- package/dist/{loader-CM7wLajY.cjs → loader-BN4q8pSl.cjs} +1 -1
- package/dist/{loader-C0zNKIJ0.js → loader-DgIiyYBl.js} +5 -5
- package/dist/loader.d.ts +0 -46
- package/dist/{messagebox-CD8fS0Ym.cjs → messagebox-BWJr42m9.cjs} +1 -1
- package/dist/{messagebox-DyLx08sr.js → messagebox-cme5VbUM.js} +5 -5
- package/dist/messagebox.d.ts +0 -46
- package/dist/{modal-Dnv6Y4Nv.js → modal-B-varrJT.js} +5 -5
- package/dist/{modal-DOCsiHGv.cjs → modal-cPcTJriW.cjs} +1 -1
- package/dist/modal.d.ts +0 -46
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -2
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +1 -1
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +1 -1
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +1 -1
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +1 -1
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +1 -1
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +27 -27
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +1 -1
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +1 -1
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +1 -1
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -2
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +1 -1
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +1 -1
- package/dist/{progressbar-D3sqQ5g1.js → progressbar-BKt_aj7f.js} +5 -5
- package/dist/{progressbar-BmI-K95y.cjs → progressbar-DiRfScnB.cjs} +1 -1
- package/dist/progressbar.d.ts +0 -46
- package/dist/{radiobutton-CJYNTtFF.cjs → radiobutton-CIW0FvT8.cjs} +1 -1
- package/dist/{radiobutton-Bat-fmTh.js → radiobutton-DtHuz7qn.js} +5 -5
- package/dist/radiobutton.d.ts +0 -46
- package/dist/{ref-BbKbXwub.cjs → ref-BvbyvXRH.cjs} +2 -2
- package/dist/{ref-3rhflVgg.js → ref-iIffqQAI.js} +10 -10
- package/dist/{repeat-DK_E7chz.cjs → repeat-BnuruAat.cjs} +1 -1
- package/dist/{repeat-CTBD0h6a.js → repeat-D4kMediE.js} +2 -2
- package/dist/{select-Swc0c6lZ.cjs → select-BJziJVde.cjs} +1 -1
- package/dist/{select-CVWm9dL1.js → select-DbRLz-7l.js} +6 -6
- package/dist/select.d.ts +0 -46
- package/dist/{state-y7tCw3bg.cjs → state-B5KCNjEd.cjs} +1 -1
- package/dist/{state-fdb9lRrL.js → state-BtbpSrdV.js} +1 -1
- package/dist/{tag-Dizhf3tl.js → tag-CGnj4c1Z.js} +6 -6
- package/dist/{tag-Dg2-c_OZ.cjs → tag-CgkUxA5D.cjs} +1 -1
- package/dist/tag.d.ts +0 -46
- package/dist/{textarea-DkQfMu1d.js → textarea-CiA4IzMs.js} +9 -9
- package/dist/{textarea-go_AyeP-.cjs → textarea-qX4Inr1X.cjs} +1 -1
- package/dist/textarea.d.ts +0 -46
- package/dist/{textinput-FvLq5W70.cjs → textinput-BlsgLNwW.cjs} +1 -1
- package/dist/{textinput-CyJB8IDv.js → textinput-CrxjZNEq.js} +8 -8
- package/dist/textinput.d.ts +0 -46
- package/package.json +5 -5
- package/src/components/combobox/combobox.ts +17 -3
- package/dist/combobox-DqHwVglB.cjs +0 -115
- 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-
|
|
2
|
-
import { e as f, n as m } from "./ref-
|
|
3
|
-
import { o as x } from "./icon-
|
|
4
|
-
import { e as _ } from "./class-map-
|
|
5
|
-
import { r as w } from "./state-
|
|
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-
|
|
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"
|
package/dist/helptext.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 o=require("./element-
|
|
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
|
-
}
|
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-
|
|
2
|
-
import { r as c } from "./state-
|
|
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-
|
|
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-
|
|
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-
|
|
4
|
-
import { o as w } from "./icon-
|
|
5
|
-
import { e as b } from "./class-map-
|
|
6
|
-
import { r as S } from "./state-
|
|
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-
|
|
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-
|
|
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"
|
package/dist/input-wrapper.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,8 +1,8 @@
|
|
|
1
|
-
import { P as f, E as u, x as h, n as i, a as k } from "./element-
|
|
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-
|
|
4
|
-
import { e as g } from "./class-map-
|
|
5
|
-
import "./icon-
|
|
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-
|
|
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-
|
|
2
|
-
import { e as k, n as m } from "./ref-
|
|
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-
|
|
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-
|
|
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}
|
package/dist/linkcard.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,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-
|
|
2
|
-
import { r as m } from "./state-
|
|
3
|
-
import { o as y } from "./if-defined-
|
|
4
|
-
import { c as k } from "./repeat-
|
|
5
|
-
import { e as d } from "./class-map-
|
|
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-
|
|
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-
|
|
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-
|
|
2
|
-
import { e as h } from "./class-map-
|
|
3
|
-
import { r as m } from "./state-
|
|
4
|
-
import { e as f, n as v } from "./ref-
|
|
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-
|
|
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
|
-
}
|