@oslokommune/punkt-elements 12.26.0 → 12.27.0
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-MKb7NX3r.js → alert-BvN80UkI.js} +1 -1
- package/dist/{alert-3DZNN48_.cjs → alert-uNzcOJR9.cjs} +1 -1
- package/dist/{card-D3ka94lj.cjs → card-BaxqXP-k.cjs} +1 -1
- package/dist/{card-ChaNVDWw.js → card-Br6A74Q1.js} +2 -2
- package/dist/{datepicker-DdQVxt5g.cjs → datepicker-BC0e34ws.cjs} +16 -15
- package/dist/{datepicker-wDY2qm00.js → datepicker-ONV4HuJt.js} +84 -82
- package/dist/helptext-DHfBEO42.js +78 -0
- package/dist/helptext-xUdEGuNQ.cjs +24 -0
- package/dist/index.d.ts +19 -6
- package/dist/input-wrapper-DeCY6nta.cjs +50 -0
- package/dist/input-wrapper-Df18_PvD.js +172 -0
- package/dist/{link-B3PDtnXT.js → link-0N9wG5l8.js} +1 -1
- package/dist/{link-BnL83t0x.cjs → link-I_LKEBVK.cjs} +1 -1
- package/dist/{linkcard-C4q7HCwY.js → linkcard-BJeRbpq_.js} +1 -1
- package/dist/{linkcard-RyOjvpmF.cjs → linkcard-ClXGVwdJ.cjs} +1 -1
- package/dist/{messagebox-BDfhozc3.js → messagebox-C5M56R8f.js} +1 -1
- package/dist/{messagebox-CuM1y2P_.cjs → messagebox-CC3j63Wp.cjs} +1 -1
- package/dist/{modal-gLMGJSSY.cjs → modal-BkchlKkL.cjs} +1 -1
- package/dist/{modal-CYv8Qk0Y.js → modal-PKDnp91S.js} +1 -1
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.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-index.cjs +1 -1
- package/dist/pkt-index.js +14 -14
- 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-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-select.cjs +1 -1
- package/dist/pkt-select.js +1 -1
- package/dist/pkt-slot-controller-Clbye6cM.js +85 -0
- package/dist/pkt-slot-controller-Oc32unDk.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/select-DFlu7Eq6.cjs +48 -0
- package/dist/{select-BJr30hL7.js → select-DVyh7z8C.js} +60 -43
- package/dist/{tag-BpAs2fq6.cjs → tag-DGywzHJ5.cjs} +2 -2
- package/dist/{tag-DX31g1rQ.js → tag-W9Lf1doW.js} +17 -17
- package/dist/{textarea-Da-bIu5d.js → textarea-80zuPTTD.js} +35 -33
- package/dist/textarea-WWRAA1LV.cjs +49 -0
- package/dist/{textinput-C9pkRR6S.cjs → textinput-CE5AzOur.cjs} +4 -3
- package/dist/{textinput-Buj2CAKl.js → textinput-CZIE3v3S.js} +44 -42
- package/package.json +3 -3
- package/src/components/datepicker/datepicker.ts +8 -0
- package/src/components/helptext/helptext.ts +41 -35
- package/src/components/input-wrapper/input-wrapper.ts +28 -19
- package/src/components/select/select.ts +41 -8
- package/src/components/tag/tag.ts +2 -2
- package/src/components/textarea/textarea.ts +9 -1
- package/src/components/textinput/textinput.ts +10 -1
- package/dist/helptext-CNgXo34f.js +0 -75
- package/dist/helptext-XPScYIkx.cjs +0 -23
- package/dist/input-wrapper-CWvzXs6X.js +0 -160
- package/dist/input-wrapper-nvacN4EY.cjs +0 -48
- package/dist/pkt-slot-controller-BEDVscvU.cjs +0 -1
- package/dist/pkt-slot-controller-DhwCJd_0.js +0 -67
- package/dist/select-B19JEWYw.cjs +0 -44
- package/dist/textarea-D7uvC79V.cjs +0 -48
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("./element-B0UgldHm.cjs"),h=require("./state-CG-binsl.cjs"),o=require("./ref-DDYBJ4EB.cjs"),p=require("./class-map-aeZWY44S.cjs"),d=require("./input-element-Dnda8hac.cjs");require("./input-wrapper-nvacN4EY.cjs");require("./icon-PWn7rnfg.cjs");/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const c=r.e(class extends r.i{constructor(i){if(super(i),i.type!==r.t$1.PROPERTY&&i.type!==r.t$1.ATTRIBUTE&&i.type!==r.t$1.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!o.f(i))throw Error("`live` bindings can only contain a single expression")}render(i){return i}update(i,[e]){if(e===r.T||e===r.E)return e;const a=i.element,t=i.name;if(i.type===r.t$1.PROPERTY){if(e===a[t])return r.T}else if(i.type===r.t$1.BOOLEAN_ATTRIBUTE){if(!!e===a.hasAttribute(t))return r.T}else if(i.type===r.t$1.ATTRIBUTE&&a.getAttribute(t)===e+"")return r.T;return o.m(i),e}});var $=Object.defineProperty,g=Object.getOwnPropertyDescriptor,n=(i,e,a,t)=>{for(var s=t>1?void 0:t?g(e,a):e,u=i.length-1,l;u>=0;u--)(l=i[u])&&(s=(t?l(e,a,s):l(s))||s);return t&&s&&$(e,a,s),s};exports.PktTextarea=class extends d.PktInputElement{constructor(){super(...arguments),this.value="",this.autocomplete="off",this.placeholder="",this.rows=null,this.counterCurrent=0,this.inputRef=o.e()}attributeChangedCallback(e,a,t){e==="value"&&this.value!==a&&(this.counterCurrent=t?t.length:0,this.valueChanged(t,a)),super.attributeChangedCallback(e,a,t)}updated(e){var a;super.updated(e),e.has("value")&&(this.counterCurrent=((a=this.value)==null?void 0:a.length)||0,this.valueChanged(this.value,e.get("value"))),e.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const e=p.e({"pkt-input":!0,"pkt-input--fullwidth":this.fullwidth,"pkt-input--counter-error":this.counter&&this.counterMaxLength&&this.value.length&&this.value.length>this.counterMaxLength}),a=this.ariaLabelledby||`${this.id}-input-label`;return r.x`<pkt-input-wrapper
|
|
6
|
-
label=${this.label}
|
|
7
|
-
?counter=${this.counter}
|
|
8
|
-
?disabled=${this.disabled}
|
|
9
|
-
?hasError=${this.hasError}
|
|
10
|
-
?inline=${this.inline}
|
|
11
|
-
?optionalTag=${this.optionalTag}
|
|
12
|
-
?required=${this.required}
|
|
13
|
-
?requiredTag=${this.requiredTag}
|
|
14
|
-
?useWrapper=${this.useWrapper}
|
|
15
|
-
.ariaDescribedBy=${this.ariaDescribedBy}
|
|
16
|
-
.counterCurrent=${this.counterCurrent}
|
|
17
|
-
.counterMaxLength=${this.counterMaxLength}
|
|
18
|
-
.errorMessage=${this.errorMessage}
|
|
19
|
-
.forId="${this.id+"-input"}"
|
|
20
|
-
.helptext=${this.helptext}
|
|
21
|
-
.helptextDropdown=${this.helptextDropdown}
|
|
22
|
-
.helptextDropdownButton=${this.helptextDropdownButton}
|
|
23
|
-
.optionalText=${this.optionalText}
|
|
24
|
-
.requiredText=${this.requiredText}
|
|
25
|
-
class="pkt-textarea"
|
|
26
|
-
>
|
|
27
|
-
<textarea
|
|
28
|
-
${o.n(this.inputRef)}
|
|
29
|
-
class=${e}
|
|
30
|
-
id=${this.id+"-input"}
|
|
31
|
-
name=${(this.name||this.id)+"-input"}
|
|
32
|
-
placeholder=${this.placeholder??r.E}
|
|
33
|
-
.value=${c(this.value)}
|
|
34
|
-
minlength=${this.minlength||r.E}
|
|
35
|
-
maxlength=${this.maxlength||r.E}
|
|
36
|
-
?readonly=${this.readonly}
|
|
37
|
-
autocomplete=${this.autocomplete}
|
|
38
|
-
aria-labelledby=${a}
|
|
39
|
-
aria-invalid=${this.hasError}
|
|
40
|
-
aria-errormessage=${`${this.id}-error`}
|
|
41
|
-
rows=${this.rows}
|
|
42
|
-
?disabled=${this.disabled}
|
|
43
|
-
@input=${t=>{this.value=t.target.value,this.onInput(),t.stopImmediatePropagation()}}
|
|
44
|
-
@change=${t=>{t.stopImmediatePropagation()}}
|
|
45
|
-
@focus=${t=>{this.onFocus(),t.stopImmediatePropagation()}}
|
|
46
|
-
@blur=${t=>{this.value=t.target.value,this.onBlur(),t.stopImmediatePropagation()}}
|
|
47
|
-
></textarea>
|
|
48
|
-
</pkt-input-wrapper>`}};n([r.n({type:String,reflect:!0})],exports.PktTextarea.prototype,"value",2);n([r.n({type:String})],exports.PktTextarea.prototype,"autocomplete",2);n([r.n({type:String})],exports.PktTextarea.prototype,"placeholder",2);n([r.n({type:Number})],exports.PktTextarea.prototype,"rows",2);n([h.r()],exports.PktTextarea.prototype,"counterCurrent",2);exports.PktTextarea=n([r.t("pkt-textarea")],exports.PktTextarea);
|