@oslokommune/punkt-react 13.5.3 → 13.5.5
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/punkt-react.es.js +68 -62
- package/dist/punkt-react.umd.js +22 -16
- package/package.json +3 -3
package/dist/punkt-react.es.js
CHANGED
|
@@ -27935,7 +27935,12 @@ let pu = class extends ka {
|
|
|
27935
27935
|
"pkt-contents": !0,
|
|
27936
27936
|
"pkt-hide": this.isLoading
|
|
27937
27937
|
});
|
|
27938
|
-
return ke`<div
|
|
27938
|
+
return ke`<div
|
|
27939
|
+
role="status"
|
|
27940
|
+
aria-live="polite"
|
|
27941
|
+
aria-busy=${this.isLoading ? "true" : "false"}
|
|
27942
|
+
class=${t}
|
|
27943
|
+
>
|
|
27939
27944
|
${this.isLoading && this._shouldDisplayLoader ? ke`<div class="pkt-loader__spinner">
|
|
27940
27945
|
<pkt-icon
|
|
27941
27946
|
name=${this.getVariant(this.variant)}
|
|
@@ -28032,6 +28037,7 @@ let xp = class extends ka {
|
|
|
28032
28037
|
<button
|
|
28033
28038
|
@click=${this.close}
|
|
28034
28039
|
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
28040
|
+
aria-label="Lukk"
|
|
28035
28041
|
>
|
|
28036
28042
|
<pkt-icon name="close" class="pkt-link__icon"></pkt-icon>
|
|
28037
28043
|
</button>
|
|
@@ -28734,64 +28740,64 @@ let Iv = class extends cn {
|
|
|
28734
28740
|
// Used for initilization
|
|
28735
28741
|
connectedCallback() {
|
|
28736
28742
|
super.connectedCallback();
|
|
28737
|
-
const
|
|
28738
|
-
!
|
|
28739
|
-
const
|
|
28740
|
-
value:
|
|
28741
|
-
label:
|
|
28742
|
-
disabled:
|
|
28743
|
-
selected:
|
|
28744
|
-
hidden:
|
|
28743
|
+
const e = this.options.length > 0, t = this.optionsController.nodes.length && this.optionsController.nodes.length > 0;
|
|
28744
|
+
!e && t ? this.optionsController.nodes.forEach((a) => {
|
|
28745
|
+
const o = {
|
|
28746
|
+
value: a.hasAttribute("value") ? a.getAttribute("value") ?? "" : a.textContent ?? "",
|
|
28747
|
+
label: a.textContent || a.getAttribute("value") || "",
|
|
28748
|
+
disabled: a.hasAttribute("disabled"),
|
|
28749
|
+
selected: a.hasAttribute("selected"),
|
|
28750
|
+
hidden: a.hasAttribute("data-hidden")
|
|
28745
28751
|
};
|
|
28746
|
-
|
|
28747
|
-
}) : (this._options = this.options, this._options.forEach((
|
|
28748
|
-
|
|
28752
|
+
a.getAttribute("selected") && !this.value && (this.value = o.value), this._options.push(o);
|
|
28753
|
+
}) : (this._options = this.options, this._options.forEach((a) => {
|
|
28754
|
+
a.selected && !this.value && (this.value = a.value);
|
|
28749
28755
|
}));
|
|
28750
28756
|
}
|
|
28751
28757
|
// Support native Select method `add`
|
|
28752
|
-
add(
|
|
28753
|
-
var o, u
|
|
28754
|
-
(
|
|
28755
|
-
value:
|
|
28756
|
-
label:
|
|
28757
|
-
selected:
|
|
28758
|
-
disabled:
|
|
28759
|
-
}),
|
|
28758
|
+
add(e, t) {
|
|
28759
|
+
var a, o, u;
|
|
28760
|
+
(a = this.inputRef.value) == null || a.add(e, t), this._options.push({
|
|
28761
|
+
value: e.value || e.text,
|
|
28762
|
+
label: e.text || e.value,
|
|
28763
|
+
selected: e.selected,
|
|
28764
|
+
disabled: e.disabled
|
|
28765
|
+
}), e.selected && (this.value = e.value || e.text, this.selectedIndex = this.returnNumberOrNull((o = this.inputRef.value) == null ? void 0 : o.selectedIndex), this.selectedOptions = (u = this.inputRef.value) == null ? void 0 : u.selectedOptions), this.requestUpdate();
|
|
28760
28766
|
}
|
|
28761
28767
|
// Support native Select method `remove`
|
|
28762
|
-
remove(
|
|
28763
|
-
var
|
|
28764
|
-
typeof
|
|
28768
|
+
remove(e) {
|
|
28769
|
+
var t, a;
|
|
28770
|
+
typeof e == "number" && (this.selectedIndex === e && (this.value = ((t = this._options[0]) == null ? void 0 : t.value) || ""), (a = this.inputRef.value) == null || a.remove(e));
|
|
28765
28771
|
}
|
|
28766
28772
|
// Support native Select method `item`
|
|
28767
|
-
item(
|
|
28768
|
-
var
|
|
28769
|
-
return (
|
|
28773
|
+
item(e) {
|
|
28774
|
+
var t;
|
|
28775
|
+
return (t = this.inputRef.value) == null ? void 0 : t.item(e);
|
|
28770
28776
|
}
|
|
28771
28777
|
// Support native Select method `namedItem`
|
|
28772
|
-
namedItem(
|
|
28773
|
-
var
|
|
28774
|
-
return (
|
|
28778
|
+
namedItem(e) {
|
|
28779
|
+
var t;
|
|
28780
|
+
return (t = this.inputRef.value) == null ? void 0 : t.namedItem(e);
|
|
28775
28781
|
}
|
|
28776
28782
|
// Support native Select method `showPicker`
|
|
28777
28783
|
showPicker() {
|
|
28778
|
-
var
|
|
28779
|
-
(
|
|
28784
|
+
var e;
|
|
28785
|
+
(e = this.inputRef.value) == null || e.showPicker();
|
|
28780
28786
|
}
|
|
28781
|
-
attributeChangedCallback(t, a
|
|
28782
|
-
var
|
|
28783
|
-
|
|
28787
|
+
attributeChangedCallback(e, t, a) {
|
|
28788
|
+
var o, u;
|
|
28789
|
+
e === "options" && (this._options = a ? JSON.parse(a) : []), e === "value" && this.value !== t && (this.selectedIndex = this.touched ? this.returnNumberOrNull((o = this.inputRef.value) == null ? void 0 : o.selectedIndex) : this.options.findIndex((d) => d.value === a), this.selectedOptions = (u = this.inputRef.value) == null ? void 0 : u.selectedOptions, this.valueChanged(a, t)), super.attributeChangedCallback(e, t, a);
|
|
28784
28790
|
}
|
|
28785
|
-
update(
|
|
28786
|
-
var
|
|
28787
|
-
super.update(
|
|
28791
|
+
update(e) {
|
|
28792
|
+
var t, a;
|
|
28793
|
+
super.update(e), e.has("options") && (this._options = this.options, this.requestUpdate("_options"), !this.value && this._options.length > 0 && (this.value = this._options[0].value, this.selectedIndex = 0)), e.has("value") && this.value !== e.get("value") && (this.selectedIndex = this.touched ? this.returnNumberOrNull((t = this.inputRef.value) == null ? void 0 : t.selectedIndex) : this.options.findIndex((o) => o.value === this.value), this.selectedOptions = (a = this.inputRef.value) == null ? void 0 : a.selectedOptions, this.valueChanged(this.value, e.get("value"))), e.has("id") && !this.name && this.id && (this.name = this.id);
|
|
28788
28794
|
}
|
|
28789
|
-
firstUpdated(
|
|
28790
|
-
var
|
|
28791
|
-
super.firstUpdated(
|
|
28795
|
+
firstUpdated(e) {
|
|
28796
|
+
var t;
|
|
28797
|
+
super.firstUpdated(e), this.options.length && (this._options = this.options), !this.value && this._options.length > 0 ? (this.value = this._options[0].value, this.selectedIndex = 0) : this.selectedIndex = this._options.findIndex((a) => a.value === this.value), this.selectedOptions = (t = this.inputRef.value) == null ? void 0 : t.selectedOptions;
|
|
28792
28798
|
}
|
|
28793
28799
|
render() {
|
|
28794
|
-
const
|
|
28800
|
+
const e = `pkt-input ${this.fullwidth ? "pkt-input--fullwidth" : ""}`;
|
|
28795
28801
|
return ke`
|
|
28796
28802
|
<pkt-input-wrapper
|
|
28797
28803
|
?counter=${this.counter}
|
|
@@ -28815,7 +28821,7 @@ let Iv = class extends cn {
|
|
|
28815
28821
|
tagText=${$t(this.tagText)}
|
|
28816
28822
|
>
|
|
28817
28823
|
<select
|
|
28818
|
-
class=${
|
|
28824
|
+
class=${e}
|
|
28819
28825
|
aria-invalid=${this.hasError}
|
|
28820
28826
|
aria-errormessage=${`${this.id}-error`}
|
|
28821
28827
|
aria-labelledby=${$t(this.ariaLabelledby)}
|
|
@@ -28823,37 +28829,37 @@ let Iv = class extends cn {
|
|
|
28823
28829
|
id=${this.id + "-input"}
|
|
28824
28830
|
name=${(this.name || this.id) + "-input"}
|
|
28825
28831
|
value=${this.value}
|
|
28826
|
-
@change=${(
|
|
28827
|
-
this.touched = !0, this.value =
|
|
28832
|
+
@change=${(t) => {
|
|
28833
|
+
this.touched = !0, this.value = t.target.value, t.stopImmediatePropagation();
|
|
28828
28834
|
}}
|
|
28829
|
-
@input=${(
|
|
28830
|
-
this.onInput(),
|
|
28835
|
+
@input=${(t) => {
|
|
28836
|
+
this.onInput(), t.stopImmediatePropagation();
|
|
28831
28837
|
}}
|
|
28832
|
-
@focus=${(
|
|
28833
|
-
this.onFocus(),
|
|
28838
|
+
@focus=${(t) => {
|
|
28839
|
+
this.onFocus(), t.stopImmediatePropagation();
|
|
28834
28840
|
}}
|
|
28835
|
-
@blur=${(
|
|
28836
|
-
this.onBlur(),
|
|
28841
|
+
@blur=${(t) => {
|
|
28842
|
+
this.onBlur(), t.stopImmediatePropagation();
|
|
28837
28843
|
}}
|
|
28838
28844
|
${dn(this.inputRef)}
|
|
28839
28845
|
>
|
|
28840
|
-
${this._options.length > 0
|
|
28841
|
-
(
|
|
28842
|
-
|
|
28843
|
-
|
|
28844
|
-
|
|
28845
|
-
|
|
28846
|
-
|
|
28847
|
-
|
|
28848
|
-
|
|
28849
|
-
)}
|
|
28846
|
+
${this._options.length > 0 ? this._options.map(
|
|
28847
|
+
(t) => ke`<option
|
|
28848
|
+
value=${t.value}
|
|
28849
|
+
?selected=${this.value == t.value || t.selected}
|
|
28850
|
+
?disabled=${t.disabled}
|
|
28851
|
+
?hidden=${t.hidden}
|
|
28852
|
+
>
|
|
28853
|
+
${t.label}
|
|
28854
|
+
</option>`
|
|
28855
|
+
) : ""}
|
|
28850
28856
|
</select>
|
|
28851
28857
|
<div class="pkt-contents" ${dn(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
28852
28858
|
</pkt-input-wrapper>
|
|
28853
28859
|
`;
|
|
28854
28860
|
}
|
|
28855
|
-
returnNumberOrNull(
|
|
28856
|
-
return
|
|
28861
|
+
returnNumberOrNull(e) {
|
|
28862
|
+
return e == null || isNaN(e) ? null : e;
|
|
28857
28863
|
}
|
|
28858
28864
|
};
|
|
28859
28865
|
GS([
|
package/dist/punkt-react.umd.js
CHANGED
|
@@ -1164,7 +1164,12 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1164
1164
|
|
|
1165
1165
|
<div class="pkt-linkcard__text" ${fn(this.defaultSlot)}></div>
|
|
1166
1166
|
</a>
|
|
1167
|
-
`}};Kp([G({type:String,reflect:!0})],Sc.prototype,"title",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"href",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"iconName",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"external",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"openInNewTab",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"skin",2),Sc=Kp([hr("pkt-linkcard")],Sc);var $H=Object.defineProperty,BH=Object.getOwnPropertyDescriptor,kc=(e,t,a,o)=>{for(var u=o>1?void 0:o?BH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&$H(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.5/animations/";let yl=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new qa(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=Jt({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),a=Jt({"pkt-contents":!0,"pkt-hide":this.isLoading});return Se`<div
|
|
1167
|
+
`}};Kp([G({type:String,reflect:!0})],Sc.prototype,"title",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"href",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"iconName",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"external",2),Kp([G({type:Boolean,reflect:!0})],Sc.prototype,"openInNewTab",2),Kp([G({type:String,reflect:!0})],Sc.prototype,"skin",2),Sc=Kp([hr("pkt-linkcard")],Sc);var $H=Object.defineProperty,BH=Object.getOwnPropertyDescriptor,kc=(e,t,a,o)=>{for(var u=o>1?void 0:o?BH(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&$H(t,a,u),u};window.pktAnimationPath=window.pktAnimationPath||"https://punkt-cdn.oslo.kommune.no/13.5/animations/";let yl=class extends pa{constructor(){super(),this.defaultSlot=gn(),this.delay=0,this.inline=!1,this.isLoading=!0,this.message=null,this.size="medium",this.variant="shapes",this.loadingAnimationPath=window.pktAnimationPath,this._shouldDisplayLoader=!1,this.slotController=new qa(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=Jt({"pkt-loader":!0,[`pkt-loader--${this.inline?"inline":"box"}`]:!0,[`pkt-loader--${this.size}`]:!0}),a=Jt({"pkt-contents":!0,"pkt-hide":this.isLoading});return Se`<div
|
|
1168
|
+
role="status"
|
|
1169
|
+
aria-live="polite"
|
|
1170
|
+
aria-busy=${this.isLoading?"true":"false"}
|
|
1171
|
+
class=${t}
|
|
1172
|
+
>
|
|
1168
1173
|
${this.isLoading&&this._shouldDisplayLoader?Se`<div class="pkt-loader__spinner">
|
|
1169
1174
|
<pkt-icon
|
|
1170
1175
|
name=${this.getVariant(this.variant)}
|
|
@@ -1179,6 +1184,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1179
1184
|
<button
|
|
1180
1185
|
@click=${this.close}
|
|
1181
1186
|
class="pkt-btn pkt-btn--tertiary pkt-btn--small pkt-btn--icon-only"
|
|
1187
|
+
aria-label="Lukk"
|
|
1182
1188
|
>
|
|
1183
1189
|
<pkt-icon name="close" class="pkt-link__icon"></pkt-icon>
|
|
1184
1190
|
</button>
|
|
@@ -1389,7 +1395,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1389
1395
|
${!this.suffix&&t?Se`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>`:Ke}
|
|
1390
1396
|
</div>
|
|
1391
1397
|
</pkt-input-wrapper>
|
|
1392
|
-
`}};Eu([G({type:String,reflect:!0})],Sl.prototype,"value",2),Eu([G({type:String})],Sl.prototype,"type",2),Eu([G({type:Number})],Sl.prototype,"size",2),Eu([G({type:String})],Sl.prototype,"autocomplete",2),Eu([G({type:String})],Sl.prototype,"iconNameRight",2),Eu([G({type:String})],Sl.prototype,"prefix",2),Eu([G({type:String})],Sl.prototype,"suffix",2),Eu([G({type:Boolean})],Sl.prototype,"omitSearchIcon",2),Eu([Fn()],Sl.prototype,"counterCurrent",2),Sl=Eu([hr("pkt-textinput")],Sl);var r4=Object.defineProperty,a4=Object.getOwnPropertyDescriptor,Sy=(e,t,a,o)=>{for(var u=o>1?void 0:o?a4(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&r4(t,a,u),u};let Zm=class extends cn{constructor(){super(),this.inputRef=gn(),this.helptextSlot=gn(),this.options=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new II(this),this.slotController=new qa(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback();const
|
|
1398
|
+
`}};Eu([G({type:String,reflect:!0})],Sl.prototype,"value",2),Eu([G({type:String})],Sl.prototype,"type",2),Eu([G({type:Number})],Sl.prototype,"size",2),Eu([G({type:String})],Sl.prototype,"autocomplete",2),Eu([G({type:String})],Sl.prototype,"iconNameRight",2),Eu([G({type:String})],Sl.prototype,"prefix",2),Eu([G({type:String})],Sl.prototype,"suffix",2),Eu([G({type:Boolean})],Sl.prototype,"omitSearchIcon",2),Eu([Fn()],Sl.prototype,"counterCurrent",2),Sl=Eu([hr("pkt-textinput")],Sl);var r4=Object.defineProperty,a4=Object.getOwnPropertyDescriptor,Sy=(e,t,a,o)=>{for(var u=o>1?void 0:o?a4(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&r4(t,a,u),u};let Zm=class extends cn{constructor(){super(),this.inputRef=gn(),this.helptextSlot=gn(),this.options=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new II(this),this.slotController=new qa(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback();const e=this.options.length>0,t=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!e&&t?this.optionsController.nodes.forEach(a=>{const o={value:a.hasAttribute("value")?a.getAttribute("value")??"":a.textContent??"",label:a.textContent||a.getAttribute("value")||"",disabled:a.hasAttribute("disabled"),selected:a.hasAttribute("selected"),hidden:a.hasAttribute("data-hidden")};a.getAttribute("selected")&&!this.value&&(this.value=o.value),this._options.push(o)}):(this._options=this.options,this._options.forEach(a=>{a.selected&&!this.value&&(this.value=a.value)}))}add(e,t){var a,o,u;(a=this.inputRef.value)==null||a.add(e,t),this._options.push({value:e.value||e.text,label:e.text||e.value,selected:e.selected,disabled:e.disabled}),e.selected&&(this.value=e.value||e.text,this.selectedIndex=this.returnNumberOrNull((o=this.inputRef.value)==null?void 0:o.selectedIndex),this.selectedOptions=(u=this.inputRef.value)==null?void 0:u.selectedOptions),this.requestUpdate()}remove(e){var t,a;typeof e=="number"&&(this.selectedIndex===e&&(this.value=((t=this._options[0])==null?void 0:t.value)||""),(a=this.inputRef.value)==null||a.remove(e))}item(e){var t;return(t=this.inputRef.value)==null?void 0:t.item(e)}namedItem(e){var t;return(t=this.inputRef.value)==null?void 0:t.namedItem(e)}showPicker(){var e;(e=this.inputRef.value)==null||e.showPicker()}attributeChangedCallback(e,t,a){var o,u;e==="options"&&(this._options=a?JSON.parse(a):[]),e==="value"&&this.value!==t&&(this.selectedIndex=this.touched?this.returnNumberOrNull((o=this.inputRef.value)==null?void 0:o.selectedIndex):this.options.findIndex(d=>d.value===a),this.selectedOptions=(u=this.inputRef.value)==null?void 0:u.selectedOptions,this.valueChanged(a,t)),super.attributeChangedCallback(e,t,a)}update(e){var t,a;super.update(e),e.has("options")&&(this._options=this.options,this.requestUpdate("_options"),!this.value&&this._options.length>0&&(this.value=this._options[0].value,this.selectedIndex=0)),e.has("value")&&this.value!==e.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((t=this.inputRef.value)==null?void 0:t.selectedIndex):this.options.findIndex(o=>o.value===this.value),this.selectedOptions=(a=this.inputRef.value)==null?void 0:a.selectedOptions,this.valueChanged(this.value,e.get("value"))),e.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(e){var t;super.firstUpdated(e),this.options.length&&(this._options=this.options),!this.value&&this._options.length>0?(this.value=this._options[0].value,this.selectedIndex=0):this.selectedIndex=this._options.findIndex(a=>a.value===this.value),this.selectedOptions=(t=this.inputRef.value)==null?void 0:t.selectedOptions}render(){const e=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return Se`
|
|
1393
1399
|
<pkt-input-wrapper
|
|
1394
1400
|
?counter=${this.counter}
|
|
1395
1401
|
?disabled=${this.disabled}
|
|
@@ -1412,7 +1418,7 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1412
1418
|
tagText=${$t(this.tagText)}
|
|
1413
1419
|
>
|
|
1414
1420
|
<select
|
|
1415
|
-
class=${
|
|
1421
|
+
class=${e}
|
|
1416
1422
|
aria-invalid=${this.hasError}
|
|
1417
1423
|
aria-errormessage=${`${this.id}-error`}
|
|
1418
1424
|
aria-labelledby=${$t(this.ariaLabelledby)}
|
|
@@ -1420,24 +1426,24 @@ You might need to use a local HTTP server (instead of file://): https://reactjs.
|
|
|
1420
1426
|
id=${this.id+"-input"}
|
|
1421
1427
|
name=${(this.name||this.id)+"-input"}
|
|
1422
1428
|
value=${this.value}
|
|
1423
|
-
@change=${
|
|
1424
|
-
@input=${
|
|
1425
|
-
@focus=${
|
|
1426
|
-
@blur=${
|
|
1429
|
+
@change=${t=>{this.touched=!0,this.value=t.target.value,t.stopImmediatePropagation()}}
|
|
1430
|
+
@input=${t=>{this.onInput(),t.stopImmediatePropagation()}}
|
|
1431
|
+
@focus=${t=>{this.onFocus(),t.stopImmediatePropagation()}}
|
|
1432
|
+
@blur=${t=>{this.onBlur(),t.stopImmediatePropagation()}}
|
|
1427
1433
|
${fn(this.inputRef)}
|
|
1428
1434
|
>
|
|
1429
|
-
${this._options.length>0
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1435
|
+
${this._options.length>0?this._options.map(t=>Se`<option
|
|
1436
|
+
value=${t.value}
|
|
1437
|
+
?selected=${this.value==t.value||t.selected}
|
|
1438
|
+
?disabled=${t.disabled}
|
|
1439
|
+
?hidden=${t.hidden}
|
|
1440
|
+
>
|
|
1441
|
+
${t.label}
|
|
1442
|
+
</option>`):""}
|
|
1437
1443
|
</select>
|
|
1438
1444
|
<div class="pkt-contents" ${fn(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
1439
1445
|
</pkt-input-wrapper>
|
|
1440
|
-
`}returnNumberOrNull(
|
|
1446
|
+
`}returnNumberOrNull(e){return e==null||isNaN(e)?null:e}};Sy([G({type:Array})],Zm.prototype,"options",2),Sy([G({type:String})],Zm.prototype,"value",2),Sy([Fn()],Zm.prototype,"_options",2),Zm=Sy([hr("pkt-select")],Zm);var i4=Object.defineProperty,o4=Object.getOwnPropertyDescriptor,Jm=(e,t,a,o)=>{for(var u=o>1?void 0:o?o4(t,a):t,d=e.length-1,f;d>=0;d--)(f=e[d])&&(u=(o?f(t,a,u):f(u))||u);return o&&u&&i4(t,a,u),u};let Uh=class extends pa{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=gn(),this.namedSlot=gn(),this.slotController=new qa(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(e=>{this._list.push(e.toUpperCase())}),super.connectedCallback()}render(){const e={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return Se`
|
|
1441
1447
|
<div class="${Jt(e)}">
|
|
1442
1448
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
1443
1449
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-react",
|
|
3
|
-
"version": "13.5.
|
|
3
|
+
"version": "13.5.5",
|
|
4
4
|
"description": "React komponentbibliotek til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@lit-labs/ssr-dom-shim": "^1.2.1",
|
|
40
40
|
"@lit/react": "^1.0.7",
|
|
41
|
-
"@oslokommune/punkt-elements": "^13.5.
|
|
41
|
+
"@oslokommune/punkt-elements": "^13.5.5",
|
|
42
42
|
"prettier": "^3.3.3",
|
|
43
43
|
"react-element-to-jsx-string": "^15.0.0",
|
|
44
44
|
"react-hook-form": "^7.53.0",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
111
111
|
},
|
|
112
112
|
"license": "MIT",
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "f65d3c81c0543cc360a34fe346b4e0585deb46ac"
|
|
114
114
|
}
|