@oslokommune/punkt-elements 12.31.2 → 12.32.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alert-C2WKLFow.cjs +27 -0
- package/dist/alert-XGjypFHe.js +115 -0
- package/dist/alert.d.ts +32 -0
- package/dist/{backlink-CzpB-ih9.js → backlink-BX8HBhw5.js} +2 -2
- package/dist/{backlink-Dn4DfWVR.cjs → backlink-NJdC0FAO.cjs} +1 -1
- package/dist/backlink.d.ts +32 -0
- package/dist/{button-9NwGr-OS.js → button-Bn8jVB0f.js} +33 -33
- package/dist/{button-Beo3c7cx.cjs → button-Bpbh8A_a.cjs} +2 -2
- package/dist/button.d.ts +32 -0
- package/dist/{calendar-BbZNxsKY.js → calendar-BNHDEEwT.js} +20 -84
- package/dist/{calendar-CxBo98iI.cjs → calendar-Ds13AKr5.cjs} +4 -4
- package/dist/calendar.d.ts +32 -0
- package/dist/card-CEv3DL-o.js +94 -0
- package/dist/card-c5EEPaNh.cjs +28 -0
- package/dist/card.d.ts +32 -0
- package/dist/{checkbox-9Zjy_NU7.cjs → checkbox-DDBBDM85.cjs} +1 -1
- package/dist/{checkbox-CzDpR6_8.js → checkbox-DoMYxp83.js} +9 -9
- package/dist/checkbox.d.ts +32 -0
- package/dist/{class-map-DWtqmIRS.js → class-map-D4tSZX70.js} +2 -2
- package/dist/{class-map-Dj5mbCUg.cjs → class-map-DvBKxTiW.cjs} +1 -1
- package/dist/combobox-BflWORVa.cjs +115 -0
- package/dist/combobox-l7LmWQYu.js +491 -0
- package/dist/combobox.d.ts +47 -0
- package/dist/datepicker-Bkiyh5P5.cjs +153 -0
- package/dist/datepicker-nWd89NwP.js +449 -0
- package/dist/datepicker.d.ts +32 -0
- package/dist/directive-C7oCP5Bh.cjs +5 -0
- package/dist/directive-helpers-BmXIK-1b.js +45 -0
- package/dist/directive-helpers-donnvcEO.cjs +5 -0
- package/dist/{directive-B76A7YXI.js → directive-oAbCiebi.js} +4 -4
- package/dist/element-DJpGVXjq.cjs +238 -0
- package/dist/{element-C7XjZtLU.js → element-DiqKrDty.js} +8851 -8847
- package/dist/{helptext-CqnoPodd.js → helptext-DfRusn5R.js} +13 -13
- package/dist/{helptext-B9kxDc2b.cjs → helptext-aHD9icur.cjs} +2 -2
- package/dist/helptext.d.ts +32 -0
- package/dist/{icon-BEUgV9Wo.js → icon-BdY52BIt.js} +2 -2
- package/dist/{icon-BOKusjAA.cjs → icon-UtDKPH3R.cjs} +1 -1
- package/dist/icon.d.ts +32 -0
- package/dist/{if-defined-CpIkv1A4.cjs → if-defined-CoBDkDGb.cjs} +1 -1
- package/dist/{if-defined-eRX4e5zO.js → if-defined-DeANa4n5.js} +1 -1
- package/dist/index.d.ts +210 -15
- package/dist/{input-element-BK8UkQli.js → input-element-C4mmTk6h.js} +23 -20
- package/dist/input-element-VNai8bsq.cjs +1 -0
- package/dist/input-wrapper-8iKEzDRZ.js +40 -0
- package/dist/input-wrapper-DWOw7Yn-.cjs +52 -0
- package/dist/input-wrapper-EoSAbU-U.cjs +1 -0
- package/dist/input-wrapper-P_oEi6dk.js +185 -0
- package/dist/input-wrapper.d.ts +32 -0
- package/dist/link-D9dJ6F-R.js +73 -0
- package/dist/link-DBxXqsnP.cjs +8 -0
- package/dist/link.d.ts +32 -0
- package/dist/{linkcard-2WzDJPZz.cjs → linkcard-D5O1hR7N.cjs} +1 -1
- package/dist/{linkcard-CRpo3tiw.js → linkcard-DcEE9IVw.js} +4 -4
- package/dist/linkcard.d.ts +32 -0
- package/dist/listbox-CK1GmwCE.cjs +95 -0
- package/dist/listbox-CfJWJDrc.js +360 -0
- package/dist/listbox.d.ts +47 -0
- package/dist/{loader-B1edLWTg.js → loader-DZvOlXzI.js} +6 -6
- package/dist/{loader-DI74pe25.cjs → loader-SDXJp58K.cjs} +1 -1
- package/dist/loader.d.ts +32 -0
- package/dist/messagebox-Ce5e1gga.js +79 -0
- package/dist/messagebox-D2_-WZQG.cjs +12 -0
- package/dist/messagebox.d.ts +32 -0
- package/dist/modal-CCtUsYKk.cjs +33 -0
- package/dist/{modal-kPX8nO_L.js → modal-CdgIOp8Q.js} +51 -94
- package/dist/modal.d.ts +32 -0
- 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 -0
- package/dist/pkt-combobox.js +6 -0
- 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 +3 -3
- package/dist/pkt-index.js +45 -43
- 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 -0
- package/dist/pkt-listbox.js +6 -0
- 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-options-controller-BkWE4pZe.js +38 -0
- package/dist/pkt-options-controller-TJ1apYGF.cjs +1 -0
- 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-slot-controller-BtVLTZb7.js +79 -0
- package/dist/pkt-slot-controller-plQxXRvV.cjs +1 -0
- 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-D0nxLqHu.js → progressbar-DvFz9KBo.js} +6 -6
- package/dist/{progressbar-B6A9UVXS.cjs → progressbar-jASTnhti.cjs} +1 -1
- package/dist/progressbar.d.ts +32 -0
- package/dist/{radiobutton-BWyQgR_x.cjs → radiobutton-C-Xd5sSq.cjs} +1 -1
- package/dist/{radiobutton-DLWjvLBO.js → radiobutton-D03aN4yn.js} +5 -5
- package/dist/radiobutton.d.ts +32 -0
- package/dist/ref-B70YZNXm.js +102 -0
- package/dist/ref-CLqTsViF.cjs +9 -0
- package/dist/repeat-CNLpCTun.js +61 -0
- package/dist/repeat-t2oms1o6.cjs +5 -0
- package/dist/select-BLDaK5Rd.js +118 -0
- package/dist/select-Dvds7MzS.cjs +49 -0
- package/dist/select.d.ts +32 -0
- package/dist/{state-HNj0_316.cjs → state-C4LdlTYO.cjs} +1 -1
- package/dist/{state-CDQk0DFQ.js → state-CDwPbiQj.js} +1 -1
- package/dist/tag-C52KeBmR.cjs +18 -0
- package/dist/{tag-CmFcSdOV.js → tag-DoS5S2Bq.js} +28 -77
- package/dist/tag.d.ts +32 -0
- package/dist/{textarea-BPqWCymU.js → textarea-C9EvdPGi.js} +18 -17
- package/dist/{textarea-VG-UTMLP.cjs → textarea-DJvNBmEL.cjs} +6 -6
- package/dist/textarea.d.ts +32 -0
- package/dist/{textinput-CEP7QA3E.cjs → textinput-Cg3ObBuw.cjs} +5 -4
- package/dist/{textinput-VD74aGzx.js → textinput-CxRSSYaN.js} +34 -33
- package/dist/textinput.d.ts +32 -0
- package/package.json +4 -4
- package/src/components/button/button.ts +3 -2
- package/src/components/combobox/combobox.ts +873 -0
- package/src/components/combobox/countrycodes.json +927 -0
- package/src/components/combobox/index.ts +6 -0
- package/src/components/datepicker/datepicker.ts +6 -4
- package/src/components/helptext/helptext.ts +1 -1
- package/src/components/index.ts +7 -0
- package/src/components/input-wrapper/input-wrapper.ts +42 -34
- package/src/components/listbox/index.ts +4 -0
- package/src/components/listbox/listbox.ts +474 -0
- package/src/components/select/select.ts +7 -0
- package/src/components/tag/tag.ts +1 -1
- package/src/components/textinput/textinput.ts +3 -2
- package/dist/alert-BDxxRqgi.cjs +0 -27
- package/dist/alert-D0S57u0r.js +0 -163
- package/dist/card-C63x_nll.cjs +0 -28
- package/dist/card-DQfNKnKl.js +0 -176
- package/dist/datepicker-CYUvRGhE.js +0 -663
- package/dist/datepicker-FuAL0uNU.cjs +0 -155
- package/dist/directive-C_VV3qwo.cjs +0 -5
- package/dist/element-CzFXQBoS.cjs +0 -238
- package/dist/input-element-Dtyuf6s8.cjs +0 -1
- package/dist/input-wrapper-Bo2_t6pA.cjs +0 -50
- package/dist/input-wrapper-Bw9tARAD.js +0 -125
- package/dist/input-wrapper-DaZZq8c0.js +0 -172
- package/dist/input-wrapper-jPnKsfEC.cjs +0 -1
- package/dist/link-1iq0Pmuf.cjs +0 -8
- package/dist/link-D3U0Jkz8.js +0 -109
- package/dist/messagebox-DQpEMkS2.cjs +0 -12
- package/dist/messagebox-KP-8-tA9.js +0 -114
- package/dist/modal-ytIJwfr3.cjs +0 -33
- package/dist/pkt-slot-controller-Clbye6cM.js +0 -85
- package/dist/pkt-slot-controller-Oc32unDk.cjs +0 -1
- package/dist/ref-2anvRHT4.cjs +0 -13
- package/dist/ref-DbOSDQbk.js +0 -143
- package/dist/select-CzuxXKll.js +0 -150
- package/dist/select-DZL6aa2s.cjs +0 -48
- package/dist/tag-BeLSOjNh.cjs +0 -18
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { P as d, x as a,
|
|
2
|
-
import { e as f, n as m } from "./ref-
|
|
3
|
-
import { o as x } from "./icon-
|
|
4
|
-
import { e as
|
|
5
|
-
import { r as w } from "./state-
|
|
6
|
-
import { u as
|
|
7
|
-
import { s as k } from "./input-wrapper-
|
|
8
|
-
import { P as b } from "./pkt-slot-controller-
|
|
1
|
+
import { P as d, x as a, E as u, n as i, a as c } from "./element-DiqKrDty.js";
|
|
2
|
+
import { e as f, n as m } from "./ref-B70YZNXm.js";
|
|
3
|
+
import { o as x } from "./icon-BdY52BIt.js";
|
|
4
|
+
import { e as _ } from "./class-map-D4tSZX70.js";
|
|
5
|
+
import { r as w } from "./state-CDwPbiQj.js";
|
|
6
|
+
import { u as v } from "./stringutils-DJjRa8dG.js";
|
|
7
|
+
import { s as k } from "./input-wrapper-8iKEzDRZ.js";
|
|
8
|
+
import { P as b } from "./pkt-slot-controller-BtVLTZb7.js";
|
|
9
9
|
var D = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (r, o, s, t) => {
|
|
10
10
|
for (var e = t > 1 ? void 0 : t ? O(o, s) : o, l = r.length - 1, h; l >= 0; l--)
|
|
11
11
|
(h = r[l]) && (e = (t ? h(o, s, e) : h(e)) || e);
|
|
@@ -13,7 +13,7 @@ var D = Object.defineProperty, O = Object.getOwnPropertyDescriptor, n = (r, o, s
|
|
|
13
13
|
};
|
|
14
14
|
let p = class extends d {
|
|
15
15
|
constructor() {
|
|
16
|
-
super(), this.defaultSlot = f(), this.forId =
|
|
16
|
+
super(), this.defaultSlot = f(), this.forId = v(), this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = k.props.helptextDropdownButton.default, this.isHelpTextOpen = !1, this.slotController = new b(this, this.defaultSlot);
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
19
|
const r = () => {
|
|
@@ -37,7 +37,7 @@ let p = class extends d {
|
|
|
37
37
|
<span class="pkt-btn__text">${x(this.helptextDropdownButton)}</span>
|
|
38
38
|
</button>
|
|
39
39
|
<div
|
|
40
|
-
class="${
|
|
40
|
+
class="${_({
|
|
41
41
|
"pkt-inputwrapper__helptext": !0,
|
|
42
42
|
"pkt-inputwrapper__helptext-expandable-open": this.isHelpTextOpen,
|
|
43
43
|
"pkt-inputwrapper__helptext-expandable-closed": !this.isHelpTextOpen
|
|
@@ -45,8 +45,8 @@ let p = class extends d {
|
|
|
45
45
|
>
|
|
46
46
|
${x(this.helptextDropdown)}
|
|
47
47
|
</div>
|
|
48
|
-
</div>` :
|
|
49
|
-
return a`${a`<div>
|
|
48
|
+
</div>` : u;
|
|
49
|
+
return a`${a`<div class="pkt-inputwrapper__helptext-container">
|
|
50
50
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
51
51
|
<div class="pkt-contents" ${m(this.defaultSlot)} name="helptext"></div>
|
|
52
52
|
${this.helptext && x(this.helptext)}
|
|
@@ -71,7 +71,7 @@ n([
|
|
|
71
71
|
w()
|
|
72
72
|
], p.prototype, "isHelpTextOpen", 2);
|
|
73
73
|
p = n([
|
|
74
|
-
|
|
74
|
+
c("pkt-helptext")
|
|
75
75
|
], p);
|
|
76
76
|
export {
|
|
77
77
|
p as P
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const e=require("./element-
|
|
1
|
+
"use strict";const e=require("./element-DJpGVXjq.cjs"),x=require("./ref-CLqTsViF.cjs"),h=require("./icon-UtDKPH3R.cjs"),u=require("./class-map-DvBKxTiW.cjs"),c=require("./state-C4LdlTYO.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"
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
>
|
|
16
16
|
${h.o(this.helptextDropdown)}
|
|
17
17
|
</div>
|
|
18
|
-
</div>`:e.E,n=()=>e.x`<div>
|
|
18
|
+
</div>`:e.E,n=()=>e.x`<div class="pkt-inputwrapper__helptext-container">
|
|
19
19
|
<div class="pkt-inputwrapper__helptext" id="${this.forId}-helptext">
|
|
20
20
|
<div class="pkt-contents" ${x.n(this.defaultSlot)} name="helptext"></div>
|
|
21
21
|
${this.helptext&&h.o(this.helptext)}
|
package/dist/helptext.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export { }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
declare global {
|
|
5
|
+
interface HTMLElementTagNameMap {
|
|
6
|
+
'pkt-combobox': PktCombobox & HTMLSelectElement;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
declare global {
|
|
5
12
|
interface HTMLElementTagNameMap {
|
|
6
13
|
'pkt-icon': PktIcon;
|
|
@@ -8,6 +15,31 @@ declare global {
|
|
|
8
15
|
}
|
|
9
16
|
|
|
10
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
|
+
|
|
11
43
|
declare global {
|
|
12
44
|
interface Window {
|
|
13
45
|
pktTz: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as f, T as v, P as m, x as y, n as h, a as P } from "./element-
|
|
2
|
-
import {
|
|
1
|
+
import { E as f, T as v, P as m, x as y, n as h, a as P } from "./element-DiqKrDty.js";
|
|
2
|
+
import { e as g, i as k, t as _ } from "./directive-oAbCiebi.js";
|
|
3
3
|
/**
|
|
4
4
|
* @license
|
|
5
5
|
* Copyright 2017 Google LLC
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const o=require("./element-
|
|
1
|
+
"use strict";const o=require("./element-DJpGVXjq.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,6 +1,13 @@
|
|
|
1
1
|
export { }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
declare global {
|
|
5
|
+
interface HTMLElementTagNameMap {
|
|
6
|
+
'pkt-combobox': PktCombobox & HTMLSelectElement;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
4
11
|
declare global {
|
|
5
12
|
interface HTMLElementTagNameMap {
|
|
6
13
|
'pkt-icon': PktIcon;
|
|
@@ -8,6 +15,31 @@ declare global {
|
|
|
8
15
|
}
|
|
9
16
|
|
|
10
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
|
+
|
|
11
43
|
declare global {
|
|
12
44
|
interface Window {
|
|
13
45
|
pktTz: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
import { nothing } from 'lit';
|
|
2
3
|
import { PktIconName } from '@oslokommune/punkt-assets/dist/icons/icon';
|
|
3
4
|
import { PropertyValues } from 'lit';
|
|
4
5
|
import { ReactiveController } from 'lit';
|
|
@@ -93,6 +94,47 @@ export declare interface IPktButton {
|
|
|
93
94
|
disabled?: boolean;
|
|
94
95
|
}
|
|
95
96
|
|
|
97
|
+
export declare interface IPktCombobox {
|
|
98
|
+
allowUserInput?: boolean;
|
|
99
|
+
typeahead?: boolean;
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
displayValueAs?: string;
|
|
102
|
+
errorMessage?: string;
|
|
103
|
+
fullwidth?: boolean;
|
|
104
|
+
hasError?: boolean;
|
|
105
|
+
helptext?: string | null;
|
|
106
|
+
helptextDropdown?: string | null;
|
|
107
|
+
helptextDropdownButton?: string | null;
|
|
108
|
+
id?: string;
|
|
109
|
+
includeSearch?: boolean;
|
|
110
|
+
label?: string | null;
|
|
111
|
+
maxlength?: number | null;
|
|
112
|
+
minlength?: number | null;
|
|
113
|
+
multiple?: boolean;
|
|
114
|
+
name?: string;
|
|
115
|
+
optionalTag?: boolean;
|
|
116
|
+
optionalText?: string;
|
|
117
|
+
options?: IPktComboboxOption[];
|
|
118
|
+
placeholder?: string | null;
|
|
119
|
+
requiredTag?: boolean;
|
|
120
|
+
requiredText?: string;
|
|
121
|
+
searchPlaceholder?: string;
|
|
122
|
+
tagPlacement?: TPktComboboxTagPlacement | null;
|
|
123
|
+
value?: string | string[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export declare interface IPktComboboxOption {
|
|
127
|
+
description?: string;
|
|
128
|
+
disabled?: boolean;
|
|
129
|
+
fulltext?: string;
|
|
130
|
+
label?: string;
|
|
131
|
+
prefix?: string;
|
|
132
|
+
selected?: boolean;
|
|
133
|
+
tagSkinColor?: TTagSkin;
|
|
134
|
+
userAdded?: boolean;
|
|
135
|
+
value: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
96
138
|
declare interface IPktLinkCard {
|
|
97
139
|
title?: string;
|
|
98
140
|
href?: string;
|
|
@@ -102,6 +144,21 @@ declare interface IPktLinkCard {
|
|
|
102
144
|
skin?: TLinkCardSkin;
|
|
103
145
|
}
|
|
104
146
|
|
|
147
|
+
declare interface IPktListbox {
|
|
148
|
+
options: IPktComboboxOption[];
|
|
149
|
+
isOpen: boolean;
|
|
150
|
+
disabled: boolean;
|
|
151
|
+
includeSearch: boolean;
|
|
152
|
+
isMultiSelect: boolean;
|
|
153
|
+
allowUserInput: boolean;
|
|
154
|
+
maxIsReached: boolean;
|
|
155
|
+
customUserInput: string | null;
|
|
156
|
+
searchPlaceholder: string | null;
|
|
157
|
+
searchValue: string | null;
|
|
158
|
+
maxLength: number;
|
|
159
|
+
userMessage: string | null;
|
|
160
|
+
}
|
|
161
|
+
|
|
105
162
|
export declare interface IPktLoader {
|
|
106
163
|
/**
|
|
107
164
|
* The `delay` prop controls how much time the loading should be given before the loader is displayed.
|
|
@@ -209,6 +266,7 @@ export declare class PktBackLink extends PktElement<IPktBackLink> implements IPk
|
|
|
209
266
|
export declare class PktButton extends PktElement<IPktButton> implements IPktButton {
|
|
210
267
|
static formAssociated: boolean;
|
|
211
268
|
private internals;
|
|
269
|
+
slotController: PktSlotController;
|
|
212
270
|
defaultSlot: Ref<HTMLElement>;
|
|
213
271
|
constructor();
|
|
214
272
|
iconName: string;
|
|
@@ -343,6 +401,67 @@ export declare class PktCheckbox extends PktInputElement {
|
|
|
343
401
|
private toggleChecked;
|
|
344
402
|
}
|
|
345
403
|
|
|
404
|
+
export declare class PktCombobox extends PktInputElement implements IPktCombobox {
|
|
405
|
+
private helptextSlot;
|
|
406
|
+
constructor();
|
|
407
|
+
value: string | string[];
|
|
408
|
+
options: IPktComboboxOption[];
|
|
409
|
+
allowUserInput: boolean;
|
|
410
|
+
typeahead: boolean;
|
|
411
|
+
includeSearch: boolean;
|
|
412
|
+
searchPlaceholder: string;
|
|
413
|
+
multiple: boolean;
|
|
414
|
+
maxlength: number | null;
|
|
415
|
+
displayValueAs: string;
|
|
416
|
+
tagPlacement: TPktComboboxTagPlacement | null;
|
|
417
|
+
private _options;
|
|
418
|
+
private _isOptionsOpen;
|
|
419
|
+
private _value;
|
|
420
|
+
private _userInfoMessage;
|
|
421
|
+
private _addValueText;
|
|
422
|
+
private _maxIsReached;
|
|
423
|
+
private _search;
|
|
424
|
+
private _inputFocus;
|
|
425
|
+
private _editingSingleValue;
|
|
426
|
+
inputRef: Ref<HTMLInputElement>;
|
|
427
|
+
arrowRef: Ref<HTMLButtonElement>;
|
|
428
|
+
listboxRef: Ref<PktListbox>;
|
|
429
|
+
focusRef: Ref<HTMLElement>;
|
|
430
|
+
optionTagRef: Ref<HTMLElement>;
|
|
431
|
+
connectedCallback(): void;
|
|
432
|
+
updated(changedProperties: PropertyValues): void;
|
|
433
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
434
|
+
render(): TemplateResult<1>;
|
|
435
|
+
renderInputField(): TemplateResult<1>;
|
|
436
|
+
renderSingleOrMultipleValues(): unknown;
|
|
437
|
+
renderValueTag(option: IPktComboboxOption | null): "" | TemplateResult<1>;
|
|
438
|
+
handleInput(e: InputEvent): void;
|
|
439
|
+
private handleFocus;
|
|
440
|
+
private handleFocusOut;
|
|
441
|
+
private handleBlur;
|
|
442
|
+
private handleInputClick;
|
|
443
|
+
private handleArrowClick;
|
|
444
|
+
private handleOptionToggled;
|
|
445
|
+
private handleSearch;
|
|
446
|
+
private handleInputKeydown;
|
|
447
|
+
private handleTagRemove;
|
|
448
|
+
private blurInput;
|
|
449
|
+
private checkForMatches;
|
|
450
|
+
private findValueInOptions;
|
|
451
|
+
private findIndexInOptions;
|
|
452
|
+
private isMaxItemsReached;
|
|
453
|
+
toggleValue(value: string | null): void;
|
|
454
|
+
private setSelected;
|
|
455
|
+
private removeSelected;
|
|
456
|
+
private addAllOptions;
|
|
457
|
+
private removeAllSelected;
|
|
458
|
+
private addValue;
|
|
459
|
+
private removeValue;
|
|
460
|
+
private addNewUserValue;
|
|
461
|
+
private resetComboboxInput;
|
|
462
|
+
private removeLastValue;
|
|
463
|
+
}
|
|
464
|
+
|
|
346
465
|
export declare class PktComponent extends PktElement {
|
|
347
466
|
/**
|
|
348
467
|
* Element attributes => props
|
|
@@ -524,6 +643,7 @@ declare class PktInputElement<T = {}> extends PktElement<Props_2 & T> {
|
|
|
524
643
|
counter: boolean;
|
|
525
644
|
hasError: boolean;
|
|
526
645
|
inline: boolean;
|
|
646
|
+
hasFieldset: boolean;
|
|
527
647
|
optionalTag: boolean;
|
|
528
648
|
requiredTag: boolean;
|
|
529
649
|
skipForwardTestid: boolean;
|
|
@@ -569,6 +689,8 @@ export declare class PktInputWrapper extends PktElement<Props_4> {
|
|
|
569
689
|
counter: boolean;
|
|
570
690
|
counterCurrent: number;
|
|
571
691
|
counterMaxLength: number;
|
|
692
|
+
counterError: string | null;
|
|
693
|
+
counterPosition: TCounterPosition;
|
|
572
694
|
optionalTag: boolean;
|
|
573
695
|
optionalText: string;
|
|
574
696
|
requiredTag: boolean;
|
|
@@ -581,10 +703,11 @@ export declare class PktInputWrapper extends PktElement<Props_4> {
|
|
|
581
703
|
hasFieldset: boolean;
|
|
582
704
|
useWrapper: boolean;
|
|
583
705
|
role: string | null;
|
|
584
|
-
updateSlots(): void;
|
|
706
|
+
updateSlots(filledSlots: Set<string | null | undefined>): void;
|
|
585
707
|
protected updated(changedProperties: PropertyValues): void;
|
|
586
708
|
render(): TemplateResult<1>;
|
|
587
709
|
private toggleDropdown;
|
|
710
|
+
private handleLabelClick;
|
|
588
711
|
}
|
|
589
712
|
|
|
590
713
|
export declare class PktLink extends PktElement {
|
|
@@ -614,6 +737,51 @@ export declare class PktLinkCard extends PktElement implements IPktLinkCard {
|
|
|
614
737
|
render(): TemplateResult<1>;
|
|
615
738
|
}
|
|
616
739
|
|
|
740
|
+
declare class PktListbox extends PktElement implements IPktListbox {
|
|
741
|
+
id: string;
|
|
742
|
+
label: string | null;
|
|
743
|
+
options: IPktComboboxOption[];
|
|
744
|
+
isOpen: boolean;
|
|
745
|
+
disabled: boolean;
|
|
746
|
+
includeSearch: boolean;
|
|
747
|
+
isMultiSelect: boolean;
|
|
748
|
+
allowUserInput: boolean;
|
|
749
|
+
maxIsReached: boolean;
|
|
750
|
+
customUserInput: string | null;
|
|
751
|
+
searchPlaceholder: string | null;
|
|
752
|
+
searchValue: string | null;
|
|
753
|
+
maxLength: number;
|
|
754
|
+
userMessage: string | null;
|
|
755
|
+
private _selectedOptions;
|
|
756
|
+
private _filteredOptions;
|
|
757
|
+
connectedCallback(): void;
|
|
758
|
+
updated(changedProperties: PropertyValues): void;
|
|
759
|
+
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
760
|
+
render(): TemplateResult<1>;
|
|
761
|
+
renderCheckboxOrCheckIcon(option: IPktComboboxOption, index: number): TemplateResult<1> | typeof nothing;
|
|
762
|
+
renderList(): TemplateResult<1>;
|
|
763
|
+
renderNewOptionBanner(): TemplateResult<1> | typeof nothing;
|
|
764
|
+
renderMaximumReachedBanner(): TemplateResult<1> | typeof nothing;
|
|
765
|
+
renderUserMessage(): TemplateResult<1> | typeof nothing;
|
|
766
|
+
renderSearch(): TemplateResult<1> | typeof nothing;
|
|
767
|
+
handleSearchInput(e: InputEvent): void;
|
|
768
|
+
handleSearchKeydown(e: KeyboardEvent): void;
|
|
769
|
+
handleOptionKeydown(e: KeyboardEvent): void;
|
|
770
|
+
focusAndScrollIntoView(el: HTMLElement): void;
|
|
771
|
+
focusNextOption(target: HTMLElement): void;
|
|
772
|
+
focusPreviousOption(target: HTMLElement): void;
|
|
773
|
+
focusFirstOption(): void;
|
|
774
|
+
focusLastOption(): void;
|
|
775
|
+
focusFirstOrSelectedOption(): void;
|
|
776
|
+
toggleOption(option: IPktComboboxOption | HTMLElement): void;
|
|
777
|
+
selectAll(): void;
|
|
778
|
+
closeOptions(): void;
|
|
779
|
+
filterOptions(): void;
|
|
780
|
+
isLetterOrSpace(char: string): boolean;
|
|
781
|
+
handleTypeAhead(char: string): void;
|
|
782
|
+
getOptionElements(): HTMLElement[];
|
|
783
|
+
}
|
|
784
|
+
|
|
617
785
|
export declare class PktLoader extends PktElement implements IPktLoader {
|
|
618
786
|
defaultSlot: Ref<HTMLElement>;
|
|
619
787
|
constructor();
|
|
@@ -713,17 +881,6 @@ declare class PktRadioButton extends PktInputElement {
|
|
|
713
881
|
export { PktRadioButton }
|
|
714
882
|
export { PktRadioButton as PktRadiobutton }
|
|
715
883
|
|
|
716
|
-
/**
|
|
717
|
-
* Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
|
|
718
|
-
*
|
|
719
|
-
* The component will prioritize options passed as a prop over options passed as children if both are provided.
|
|
720
|
-
* This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
|
|
721
|
-
*
|
|
722
|
-
* @slot (default) - Options to be rendered as children
|
|
723
|
-
* @prop {TSelectOption[]} options - Options to be rendered as children
|
|
724
|
-
*
|
|
725
|
-
*
|
|
726
|
-
*/
|
|
727
884
|
export declare class PktSelect extends PktInputElement implements IPktSelect {
|
|
728
885
|
private inputRef;
|
|
729
886
|
private helptextSlot;
|
|
@@ -743,6 +900,7 @@ declare class PktSlotController implements ReactiveController {
|
|
|
743
900
|
nodes: Element[];
|
|
744
901
|
slots: Ref<HTMLElement>[];
|
|
745
902
|
observer: MutationObserver;
|
|
903
|
+
contentObserver: MutationObserver;
|
|
746
904
|
filledSlots: Set<string | null | undefined>;
|
|
747
905
|
skipOptions: boolean;
|
|
748
906
|
private updatingSlots;
|
|
@@ -753,9 +911,10 @@ declare class PktSlotController implements ReactiveController {
|
|
|
753
911
|
private updateNodes;
|
|
754
912
|
private updateSlots;
|
|
755
913
|
private handleMutations;
|
|
914
|
+
private handleSlotMutations;
|
|
756
915
|
}
|
|
757
916
|
|
|
758
|
-
export declare class PktTag extends PktElement implements IPktTag {
|
|
917
|
+
export declare class PktTag extends PktElement<IPktTag> implements IPktTag {
|
|
759
918
|
slotController: PktSlotController;
|
|
760
919
|
defaultSlot: Ref<HTMLElement>;
|
|
761
920
|
constructor();
|
|
@@ -804,7 +963,7 @@ export declare class PktTextinput extends PktInputElement<Props_5> {
|
|
|
804
963
|
value: string;
|
|
805
964
|
type: string;
|
|
806
965
|
size: number | null;
|
|
807
|
-
autocomplete: string;
|
|
966
|
+
autocomplete: string | null;
|
|
808
967
|
iconNameRight: string | null;
|
|
809
968
|
prefix: string | null;
|
|
810
969
|
suffix: string | null;
|
|
@@ -818,7 +977,7 @@ export declare class PktTextinput extends PktInputElement<Props_5> {
|
|
|
818
977
|
|
|
819
978
|
declare type Props = ElementProps<PktElement, 'strings' | 'role'>;
|
|
820
979
|
|
|
821
|
-
declare type Props_2 = ElementProps<PktInputElement, 'defaultValue' | 'disabled' | 'readonly' | 'required' | 'max' | 'maxlength' | 'min' | 'minlength' | 'ariaDescribedBy' | 'ariaLabelledby' | 'name' | 'pattern' | 'placeholder' | 'id' | 'counter' | 'hasError' | 'inline' | 'optionalTag' | 'requiredTag' | 'skipForwardTestid' | 'useWrapper' | 'fullwidth' | 'counterMaxLength' | 'errorMessage' | 'helptext' | 'helptextDropdown' | 'helptextDropdownButton' | 'label' | 'optionalText' | 'requiredText' | 'dataTestid'>;
|
|
980
|
+
declare type Props_2 = ElementProps<PktInputElement, 'defaultValue' | 'disabled' | 'readonly' | 'required' | 'max' | 'maxlength' | 'min' | 'minlength' | 'ariaDescribedBy' | 'ariaLabelledby' | 'name' | 'pattern' | 'placeholder' | 'id' | 'counter' | 'hasError' | 'hasFieldset' | 'inline' | 'optionalTag' | 'requiredTag' | 'skipForwardTestid' | 'useWrapper' | 'fullwidth' | 'counterMaxLength' | 'errorMessage' | 'helptext' | 'helptextDropdown' | 'helptextDropdownButton' | 'label' | 'optionalText' | 'requiredText' | 'dataTestid'>;
|
|
822
981
|
|
|
823
982
|
declare type Props_3 = ElementProps<PktIcon, 'path' | 'name'>;
|
|
824
983
|
|
|
@@ -862,6 +1021,8 @@ declare type TAriaSort = 'none' | 'ascending' | 'descending' | 'other';
|
|
|
862
1021
|
|
|
863
1022
|
declare type TCardSkin = 'outlined' | 'gray' | 'beige' | 'green' | 'blue';
|
|
864
1023
|
|
|
1024
|
+
declare type TCounterPosition = 'top' | 'bottom';
|
|
1025
|
+
|
|
865
1026
|
declare type TDirection = 'portrait' | 'landscape';
|
|
866
1027
|
|
|
867
1028
|
declare type TLinkCardSkin = 'normal' | 'blue' | 'beige' | 'green' | 'gray' | 'beige-outline' | 'gray-outline';
|
|
@@ -882,6 +1043,8 @@ export declare type TPktButtonType = 'button' | 'submit' | 'reset';
|
|
|
882
1043
|
|
|
883
1044
|
export declare type TPktButtonVariant = 'label-only' | 'icon-left' | 'icon-right' | 'icon-only' | 'icons-right-and-left';
|
|
884
1045
|
|
|
1046
|
+
export declare type TPktComboboxTagPlacement = 'inside' | 'outside';
|
|
1047
|
+
|
|
885
1048
|
export declare type TPktLoaderVariant = 'blue' | 'rainbow' | 'shapes';
|
|
886
1049
|
|
|
887
1050
|
declare type TPktSize = 'small' | 'medium' | 'large';
|
|
@@ -910,6 +1073,13 @@ export declare type TTagType = 'button' | 'reset' | 'submit';
|
|
|
910
1073
|
export { }
|
|
911
1074
|
|
|
912
1075
|
|
|
1076
|
+
declare global {
|
|
1077
|
+
interface HTMLElementTagNameMap {
|
|
1078
|
+
'pkt-combobox': PktCombobox & HTMLSelectElement;
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
|
|
913
1083
|
declare global {
|
|
914
1084
|
interface HTMLElementTagNameMap {
|
|
915
1085
|
'pkt-icon': PktIcon;
|
|
@@ -917,6 +1087,31 @@ declare global {
|
|
|
917
1087
|
}
|
|
918
1088
|
|
|
919
1089
|
|
|
1090
|
+
declare global {
|
|
1091
|
+
interface HTMLElementTagNameMap {
|
|
1092
|
+
'pkt-listbox': PktListbox;
|
|
1093
|
+
}
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
/**
|
|
1098
|
+
* Pkt Select is a wrapper for the native select element using the pkt-input-wrapper component.
|
|
1099
|
+
*
|
|
1100
|
+
* The component will prioritize options passed as a prop over options passed as children if both are provided.
|
|
1101
|
+
* This is to allow for dynamic options that might change in the case of both children/slot and props are provided.
|
|
1102
|
+
*
|
|
1103
|
+
* @slot (default) - Options to be rendered as children
|
|
1104
|
+
* @prop {TSelectOption[]} options - Options to be rendered as children
|
|
1105
|
+
*
|
|
1106
|
+
*
|
|
1107
|
+
*/
|
|
1108
|
+
declare global {
|
|
1109
|
+
interface HTMLElementTagNameMap {
|
|
1110
|
+
'pkt-select': PktSelect & HTMLSelectElement;
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1114
|
+
|
|
920
1115
|
declare global {
|
|
921
1116
|
interface Window {
|
|
922
1117
|
pktTz: string;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as c } from "./state-
|
|
1
|
+
import { P as y, t as l, n as s } from "./element-DiqKrDty.js";
|
|
2
|
+
import { r as c } from "./state-CDwPbiQj.js";
|
|
3
3
|
import { u as m } from "./stringutils-DJjRa8dG.js";
|
|
4
|
-
import { s as g } from "./input-wrapper-
|
|
5
|
-
var v = Object.defineProperty, e = (p, t, r,
|
|
4
|
+
import { s as g } from "./input-wrapper-8iKEzDRZ.js";
|
|
5
|
+
var v = Object.defineProperty, e = (p, t, r, n) => {
|
|
6
6
|
for (var a = void 0, h = p.length - 1, o; h >= 0; h--)
|
|
7
7
|
(o = p[h]) && (a = o(t, r, a) || a);
|
|
8
8
|
return a && v(t, r, a), a;
|
|
9
9
|
};
|
|
10
10
|
class i extends y {
|
|
11
11
|
constructor() {
|
|
12
|
-
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 = m(), this.counter = !1, this.hasError = !1, this.inline = !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 = g.props.helptextDropdownButton.default, this.label = null, this.optionalText =
|
|
12
|
+
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 = m(), 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 = g.props.helptextDropdownButton.default, this.label = null, this.optionalText = l.forms.labels.optional, this.requiredText = l.forms.labels.required, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
|
|
13
13
|
}
|
|
14
14
|
static get formAssociated() {
|
|
15
15
|
return !0;
|
|
16
16
|
}
|
|
17
17
|
manageValidity(t) {
|
|
18
|
-
var r,
|
|
19
|
-
t && (this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 },
|
|
18
|
+
var r, n, a, h, o, u, d, f;
|
|
19
|
+
t && (this.required && !this.value ? this.internals.setValidity({ valueMissing: !0 }, l.forms.messages.required, t) : (r = t.validity) != null && r.typeMismatch || (n = t.validity) != null && n.badInput ? this.internals.setValidity({ typeMismatch: !0 }, l.forms.messages.invalid, t) : (a = t.validity) != null && a.patternMismatch ? this.internals.setValidity(
|
|
20
20
|
{ patternMismatch: !0 },
|
|
21
|
-
|
|
21
|
+
l.forms.messages.invalidPattern,
|
|
22
22
|
t
|
|
23
|
-
) : (h = t.validity) != null && h.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 },
|
|
23
|
+
) : (h = t.validity) != null && h.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, l.forms.messages.tooShort, t) : (o = t.validity) != null && o.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, l.forms.messages.tooLong, t) : (u = t.validity) != null && u.rangeUnderflow ? this.internals.setValidity(
|
|
24
24
|
{ rangeUnderflow: !0 },
|
|
25
|
-
|
|
25
|
+
l.forms.messages.rangeUnderflow,
|
|
26
26
|
t
|
|
27
27
|
) : (d = t.validity) != null && d.rangeOverflow ? this.internals.setValidity(
|
|
28
28
|
{ rangeOverflow: !0 },
|
|
29
|
-
|
|
29
|
+
l.forms.messages.rangeOverflow,
|
|
30
30
|
t
|
|
31
31
|
) : (f = t.validity) != null && f.customError ? this.internals.setValidity({ customError: !0 }, t.validationMessage, t) : this.internals.setValidity({}));
|
|
32
32
|
}
|
|
@@ -34,8 +34,8 @@ class i extends y {
|
|
|
34
34
|
if (this.internals)
|
|
35
35
|
if (Array.isArray(t)) {
|
|
36
36
|
const r = new FormData();
|
|
37
|
-
t.forEach((
|
|
38
|
-
r.append(this.name,
|
|
37
|
+
t.forEach((n) => {
|
|
38
|
+
r.append(this.name, n);
|
|
39
39
|
}), this.internals.setFormValue(r);
|
|
40
40
|
} else
|
|
41
41
|
this.internals.setFormValue(t);
|
|
@@ -47,8 +47,8 @@ class i extends y {
|
|
|
47
47
|
const r = this.internals.form || this.closest("form");
|
|
48
48
|
r && r.querySelectorAll(
|
|
49
49
|
`pkt-radiobutton[name=${this.name}], input[type=radio][name=${this.name}]`
|
|
50
|
-
).forEach((
|
|
51
|
-
const a =
|
|
50
|
+
).forEach((n) => {
|
|
51
|
+
const a = n;
|
|
52
52
|
a.name === this.name && a.value !== this.value && a.checked && (a.checked = !1);
|
|
53
53
|
}), 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(
|
|
54
54
|
new CustomEvent("value-change", {
|
|
@@ -59,7 +59,7 @@ class i extends y {
|
|
|
59
59
|
), this.internals.reportValidity();
|
|
60
60
|
}
|
|
61
61
|
valueChanged(t, r) {
|
|
62
|
-
(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 = t, 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()));
|
|
62
|
+
(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()));
|
|
63
63
|
}
|
|
64
64
|
// When input goes from content to no content
|
|
65
65
|
clearInputValue() {
|
|
@@ -164,6 +164,9 @@ e([
|
|
|
164
164
|
e([
|
|
165
165
|
s({ type: Boolean })
|
|
166
166
|
], i.prototype, "inline");
|
|
167
|
+
e([
|
|
168
|
+
s({ type: Boolean })
|
|
169
|
+
], i.prototype, "hasFieldset");
|
|
167
170
|
e([
|
|
168
171
|
s({ type: Boolean })
|
|
169
172
|
], i.prototype, "optionalTag");
|
|
@@ -174,7 +177,7 @@ e([
|
|
|
174
177
|
s({ type: Boolean })
|
|
175
178
|
], i.prototype, "skipForwardTestid");
|
|
176
179
|
e([
|
|
177
|
-
s({ type: Boolean })
|
|
180
|
+
s({ type: Boolean, reflect: !1 })
|
|
178
181
|
], i.prototype, "useWrapper");
|
|
179
182
|
e([
|
|
180
183
|
s({ type: Boolean, reflect: !0 })
|
|
@@ -192,16 +195,16 @@ e([
|
|
|
192
195
|
s({ type: String })
|
|
193
196
|
], i.prototype, "helptextDropdown");
|
|
194
197
|
e([
|
|
195
|
-
s({ type: String })
|
|
198
|
+
s({ type: String, reflect: !1 })
|
|
196
199
|
], i.prototype, "helptextDropdownButton");
|
|
197
200
|
e([
|
|
198
201
|
s({ type: String })
|
|
199
202
|
], i.prototype, "label");
|
|
200
203
|
e([
|
|
201
|
-
s({ type: String })
|
|
204
|
+
s({ type: String, reflect: !1 })
|
|
202
205
|
], i.prototype, "optionalText");
|
|
203
206
|
e([
|
|
204
|
-
s({ type: String })
|
|
207
|
+
s({ type: String, reflect: !1 })
|
|
205
208
|
], i.prototype, "requiredText");
|
|
206
209
|
e([
|
|
207
210
|
s({ type: String, attribute: "data-testid" })
|