@oslokommune/punkt-elements 12.43.2 → 13.0.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/CHANGELOG.md +28 -0
- package/dist/{combobox-kWGI4RHI.js → combobox-BREXxMeO.js} +1 -1
- package/dist/{combobox-Cv6i7BEk.cjs → combobox-DWYPzXj-.cjs} +1 -1
- package/dist/{datepicker-LpbYHx8L.js → datepicker-DH4ZFMxD.js} +1 -1
- package/dist/{datepicker-BJe92Vor.cjs → datepicker-SYeGnXRZ.cjs} +1 -1
- package/dist/{input-wrapper-BxZf8wEP.cjs → input-wrapper-BND8tUg_.cjs} +4 -2
- package/dist/{input-wrapper-gz7ppKrK.js → input-wrapper-_Lk9HzHU.js} +4 -2
- 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-index.cjs +1 -1
- package/dist/pkt-index.js +6 -6
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.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-CFpdOlDE.cjs → select-BwwF5Gki.cjs} +1 -1
- package/dist/{select-BaLHLuvH.js → select-DGHoBmbb.js} +1 -1
- package/dist/{textarea-EIFo7GZz.js → textarea-BrW98O-a.js} +1 -1
- package/dist/{textarea-CViiuZdR.cjs → textarea-PHo1w92l.cjs} +1 -1
- package/dist/{textinput-BHS7b-Jt.js → textinput-BrBGjHZc.js} +24 -24
- package/dist/{textinput-_ZdyMA9O.cjs → textinput-CS0OHykQ.cjs} +6 -6
- package/package.json +4 -4
- package/src/components/input-wrapper/input-wrapper.ts +6 -2
- package/src/components/textarea/textarea.ts +3 -8
- package/src/components/textinput/textinput.ts +13 -28
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,34 @@ og skriver commits ca etter [Conventional Commits](https://conventionalcommits.o
|
|
|
5
5
|
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
## [13.0.0](https://github.com/oslokommune/punkt/compare/12.43.2...13.0.0) (2025-07-04)
|
|
9
|
+
|
|
10
|
+
### ⚠ BREAKING CHANGES
|
|
11
|
+
* Skjemaelementer tilbake til ren React. BREAKING CHANGE: select vil ikke lenger ta i mot et options-array, await window.customElements.whenDefined('pkt-xxx) må fjernes fra React-tester (ellers vil testene feile), mulig behov for justeringer i tester, ta gjerne en visuell og funksjonell avsjekk ved oppdatering
|
|
12
|
+
|
|
13
|
+
Skjemaelementer i React-pakken:
|
|
14
|
+
- Inputwrapper: Skriv tilbake til React, oppdater tester, oppdatere JSON med nye props tatt fra inputwrapper-elements
|
|
15
|
+
- TextInput: Skriv tilbake til React, oppdater tester
|
|
16
|
+
- Select: Skriv tilbake til React, oppdater tester (vil ikke lenger ta i mot et options-array)
|
|
17
|
+
- Checkbox: Skriv tilbake til React, oppdater tester
|
|
18
|
+
- TextArea: Skriv tilbake til React, oppdater tester
|
|
19
|
+
- RadioButton: Skriv tilbake til React, oppdater tester
|
|
20
|
+
- Switch: Skriv tilbake til React, oppdater tester
|
|
21
|
+
- Oppdatere test-utils for nevnte komponenter
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
Ingen
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
Ingen
|
|
29
|
+
|
|
30
|
+
### Chores
|
|
31
|
+
Ingen
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
|
|
8
36
|
## [12.42.13](https://github.com/oslokommune/punkt/compare/12.42.12...12.42.13) (2025-06-24)
|
|
9
37
|
|
|
10
38
|
### ⚠ BREAKING CHANGES
|
|
@@ -7,7 +7,7 @@ import { c as R } from "./repeat-C8BeHwYx.js";
|
|
|
7
7
|
import { P as V } from "./input-element-Cco4PA2M.js";
|
|
8
8
|
import { P as S } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
9
9
|
import { P as C } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
10
|
-
import "./input-wrapper-
|
|
10
|
+
import "./input-wrapper-_Lk9HzHU.js";
|
|
11
11
|
import "./icon-CC1js8eR.js";
|
|
12
12
|
import "./tag-BWm6s48d.js";
|
|
13
13
|
import "./listbox-CLsSW32I.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const a=require("./element-6DBpyGQm.cjs"),c=require("./if-defined-Cni-RHLS.cjs"),d=require("./state-DPobt-Yz.cjs"),r=require("./ref-iJtiv3o2.cjs"),O=require("./class-map-BBG2gMX4.cjs"),I=require("./repeat-CDsZqct8.cjs"),$=require("./input-element-CHjLWeKt.cjs"),y=require("./pkt-options-controller-CiuBG6Lt.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-
|
|
1
|
+
"use strict";const a=require("./element-6DBpyGQm.cjs"),c=require("./if-defined-Cni-RHLS.cjs"),d=require("./state-DPobt-Yz.cjs"),r=require("./ref-iJtiv3o2.cjs"),O=require("./class-map-BBG2gMX4.cjs"),I=require("./repeat-CDsZqct8.cjs"),$=require("./input-element-CHjLWeKt.cjs"),y=require("./pkt-options-controller-CiuBG6Lt.cjs"),w=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BND8tUg_.cjs");require("./icon-B_ryAy4Q.cjs");require("./tag-DPk3fpEg.cjs");require("./listbox-C4supLfR.cjs");const C={displayValueAs:{default:"label"}},R={props:C};var V=Object.defineProperty,S=Object.getOwnPropertyDescriptor,o=(b,e,t,i)=>{for(var s=i>1?void 0:i?S(e,t):e,l=b.length-1,n;l>=0;l--)(n=b[l])&&(s=(i?n(e,t,s):n(s))||s);return i&&s&&V(e,t,s),s};exports.PktCombobox=class extends $.PktInputElement{constructor(){super(),this.helptextSlot=r.e(),this.value="",this.options=[],this.defaultOptions=[],this.allowUserInput=!1,this.typeahead=!1,this.includeSearch=!1,this.searchPlaceholder="",this.multiple=!1,this.maxlength=null,this.displayValueAs=R.props.displayValueAs.default,this.tagPlacement=null,this._options=[],this._isOptionsOpen=!1,this._value=[],this._userInfoMessage="",this._addValueText=null,this._maxIsReached=!1,this._search="",this._inputFocus=!1,this._editingSingleValue=!1,this.inputRef=r.e(),this.arrowRef=r.e(),this.listboxRef=r.e(),this.focusRef=r.e(),this.optionTagRef=r.e(),this.optionsController=new y.PktOptionsSlotController(this),this.slotController=new w.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){var e;if(super.connectedCallback(),document&&document.body.addEventListener("click",t=>{this._isOptionsOpen&&!this.contains(t.target)&&this.handleFocusOut(t)}),this._options=[],this.defaultOptions&&this.defaultOptions.length){const t=((e=this.options)==null?void 0:e.filter(i=>i.userAdded))||[];this.options=[...t,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=[...this.options]}if(this.optionsController.nodes.length){const t=[];this.optionsController.nodes.forEach(i=>{if(!i.textContent&&!i.getAttribute("value"))return null;const s={value:i.getAttribute("value")||i.textContent||"",label:i.textContent||i.getAttribute("value")||""};i.getAttribute("data-prefix")&&(s.prefix=i.getAttribute("data-prefix")||void 0),i.getAttribute("tagskincolor")&&(s.tagSkinColor=i.getAttribute("tagskincolor")),i.getAttribute("description")&&(s.description=i.getAttribute("description")||void 0),s.fulltext=s.value+s.label+(s.prefix||""),t.push(s)}),t.length&&(this.options=[...t],this._options=[...t])}}updated(e){var t;if(e.has("_value")&&this.valueChanged(this._value,e.get("_value")),e.has("value")&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]]),this.isMaxItemsReached()),e.has("defaultOptions")&&this.defaultOptions.length){const i=((t=this.options)==null?void 0:t.filter(s=>s.userAdded))||[];this.options=[...i,...JSON.parse(JSON.stringify(this.defaultOptions))],this._options=[...this.options]}if(e.has("options")&&this.options.length){const s=this._options.filter(l=>l.userAdded).filter(l=>!this.options.some(n=>n.value===l.value));this._options=[...s,...this.options],this._options.forEach(l=>{if(l.value&&!l.label&&(l.label=l.value),l.selected&&!this._value.includes(l.value)){const n=[...this._value];this._value=[...this._value,l.value],this.valueChanged(this._value,n)}l.fulltext=l.value+l.label+(l.prefix||""),l.selected=l.selected||this._value.includes(l.value)})}e.has("_search")&&this.dispatchEvent(new CustomEvent("search",{detail:this._search,bubbles:!1})),super.updated(e)}attributeChangedCallback(e,t,i){e==="value"&&(this._value=Array.isArray(this.value)?this.value:this.value?this.value.split(","):[],!this.multiple&&this._value.length>1&&(this._value=[this._value[0]])),e==="options"&&(this._options=this.options,this._options.forEach(s=>{s.value&&!s.label&&(s.label=s.value),s.selected&&!this._value.includes(s.value)&&(this._value=[...this._value,s.value]),s.fulltext=s.value+s.label+(s.prefix||"")}),this._search=""),super.attributeChangedCallback(e,t,i)}render(){return a.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
.label=${this.label}
|
|
4
4
|
.helptext=${this.helptext}
|
|
@@ -7,7 +7,7 @@ import { P as C } from "./input-element-Cco4PA2M.js";
|
|
|
7
7
|
import { e as m, n as p } from "./ref-BBYSqgeW.js";
|
|
8
8
|
import { c as T } from "./repeat-C8BeHwYx.js";
|
|
9
9
|
import "./icon-CC1js8eR.js";
|
|
10
|
-
import "./input-wrapper-
|
|
10
|
+
import "./input-wrapper-_Lk9HzHU.js";
|
|
11
11
|
import "./tag-BWm6s48d.js";
|
|
12
12
|
import { P as _ } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
13
13
|
const S = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./class-map-BBG2gMX4.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),s=require("./element-6DBpyGQm.cjs"),m=require("./state-DPobt-Yz.cjs"),h=require("./calendar-BZe2D4Sr.cjs"),k=require("./input-element-CHjLWeKt.cjs"),r=require("./ref-iJtiv3o2.cjs"),v=require("./repeat-CDsZqct8.cjs");require("./icon-B_ryAy4Q.cjs");require("./input-wrapper-
|
|
1
|
+
"use strict";const d=require("./class-map-BBG2gMX4.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),s=require("./element-6DBpyGQm.cjs"),m=require("./state-DPobt-Yz.cjs"),h=require("./calendar-BZe2D4Sr.cjs"),k=require("./input-element-CHjLWeKt.cjs"),r=require("./ref-iJtiv3o2.cjs"),v=require("./repeat-CDsZqct8.cjs");require("./icon-B_ryAy4Q.cjs");require("./input-wrapper-BND8tUg_.cjs");require("./tag-DPk3fpEg.cjs");const $=require("./pkt-slot-controller-BzddBp7z.cjs"),y={dateformat:{default:"dd.MM.yyyy"},min:{default:null},max:{default:null},weeknumbers:{default:!1},withcontrols:{default:!1},multiple:{default:!1},range:{default:!1}},o={props:y};var b=Object.defineProperty,x=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var a=i>1?void 0:i?x(t,e):t,n=c.length-1,u;n>=0;n--)(u=c[n])&&(a=(i?u(t,e,a):u(a))||a);return i&&a&&b(t,e,a),a};const g=c=>new Promise(t=>setTimeout(t,c));exports.PktDatepicker=class extends k.PktInputElement{constructor(){super(),this.value="",this._value=this.value?Array.isArray(this.value)?this.value:this.value.split(","):[],this.label="Datovelger",this.dateformat=o.props.dateformat.default,this.multiple=o.props.multiple.default,this.maxlength=null,this.range=o.props.range.default,this.showRangeLabels=!1,this.min=null,this.max=null,this.weeknumbers=o.props.weeknumbers.default,this.withcontrols=o.props.withcontrols.default,this.excludedates=[],this.excludeweekdays=[],this.currentmonth=null,this.calendarOpen=!1,this.timezone="Europe/Oslo",this.inputClasses={},this.buttonClasses={},this.inputRef=r.e(),this.inputRefTo=r.e(),this.btnRef=r.e(),this.calRef=r.e(),this.popupRef=r.e(),this.helptextSlot=r.e(),this.addToSelected=t=>{const e=t.target;if(!e.value)return;const i=this.min?h.newDate(this.min):null,a=this.max?h.newDate(this.max):null,n=h.newDate(e.value.split(",")[0]);n&&!isNaN(n.getTime())&&(!i||n>=i)&&(!a||n<=a)&&this.calRef.value&&this.calRef.value.handleDateSelect(n),e.value=""},this.slotController=new $.PktSlotController(this,this.helptextSlot)}async connectedCallback(){super.connectedCallback();const t=navigator.userAgent,e=/iP(hone|od|ad)/.test(t);this.inputType=e?"text":"date",document&&document.body.addEventListener("click",i=>{var a,n;(a=this.inputRef)!=null&&a.value&&((n=this.btnRef)!=null&&n.value)&&!this.inputRef.value.contains(i.target)&&!(this.inputRefTo.value&&this.inputRefTo.value.contains(i.target))&&!this.btnRef.value.contains(i.target)&&!i.target.closest(".pkt-calendar-popup")&&this.calendarOpen&&(this.onBlur(),this.hideCalendar())}),this.value.length&&this._value.length===0&&(this._value=Array.isArray(this.value)?this.value:this.value.split(",")),this.min=this.min||o.props.min.default,this.max=this.max||o.props.max.default,typeof this.excludedates=="string"&&(this.excludedates=this.excludedates.split(",")),typeof this.excludeweekdays=="string"&&(this.excludeweekdays=this.excludeweekdays.split(",")),(this.multiple||this.range)&&this.name&&!this.name.endsWith("[]")&&(this.name=this.name+"[]"),this.calendarOpen&&(await g(20),this.handleCalendarPosition())}disconnectedCallback(){super.disconnectedCallback(),document&&document.body.removeEventListener("click",t=>{var e,i;(e=this.inputRef)!=null&&e.value&&((i=this.btnRef)!=null&&i.value)&&!this.inputRef.value.contains(t.target)&&!this.btnRef.value.contains(t.target)&&this.hideCalendar()})}attributeChangedCallback(t,e,i){if(t==="value"){if(this.range&&(i==null?void 0:i.split(",").length)===1)return;this.value!==e&&this.valueChanged(i,e)}t==="excludedates"&&typeof this.excludedates=="string"&&(this.excludedates=(i==null?void 0:i.split(","))??[]),t==="excludeweekdays"&&typeof this.excludeweekdays=="string"&&(this.excludeweekdays=(i==null?void 0:i.split(","))??[]),super.attributeChangedCallback(t,e,i)}updated(t){if(t.has("value")){if(this.range&&this.value.length===1)return;this.valueChanged(this.value,t.get("value"))}super.updated(t)}renderInput(){return s.x`
|
|
2
2
|
<input
|
|
3
3
|
class="${d.e(this.inputClasses)}"
|
|
4
4
|
.type=${this.inputType}
|
|
@@ -44,10 +44,12 @@
|
|
|
44
44
|
<pkt-icon name="alert-error" class="pkt-alert__icon"></pkt-icon>
|
|
45
45
|
<div class="pkt-alert__text">${x.o(this.errorMessage)}</div>
|
|
46
46
|
</div>`:t.E,d=()=>t.x`
|
|
47
|
-
${l()}
|
|
47
|
+
${l()}
|
|
48
|
+
${a()}
|
|
48
49
|
${this.counterPosition==="top"?h():t.E}
|
|
49
50
|
<div class="pkt-contents" ${u.n(this.defaultSlot)}></div>
|
|
50
|
-
${this.counterPosition==="bottom"?h():t.E}
|
|
51
|
+
${this.counterPosition==="bottom"?h():t.E}
|
|
52
|
+
${f()}
|
|
51
53
|
`,k=()=>this.hasFieldset?t.x`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${i}">
|
|
52
54
|
${d()}
|
|
53
55
|
</fieldset>`:t.x`<div class="pkt-inputwrapper__fieldset">${d()}</div>`;return t.x`<div class=${c.e(p)}>${k()}</div> `}toggleDropdown(p){this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!1,detail:{isOpen:p.detail.isOpen}}))}handleLabelClick(p){this.disabled&&(p.preventDefault(),p.stopImmediatePropagation()),this.dispatchEvent(new CustomEvent("labelClick",{bubbles:!0,composed:!0,detail:"label clicked"}))}};e([t.n({type:String})],exports.PktInputWrapper.prototype,"forId",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"label",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptext",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdown",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"helptextDropdownButton",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"counter",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterCurrent",2);e([t.n({type:Number})],exports.PktInputWrapper.prototype,"counterMaxLength",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"counterError",2);e([t.n({type:String,reflect:!1})],exports.PktInputWrapper.prototype,"counterPosition",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"optionalTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"optionalText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"requiredTag",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"requiredText",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasError",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"errorMessage",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"disabled",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"inline",2);e([t.n({type:String})],exports.PktInputWrapper.prototype,"ariaDescribedby",2);e([t.n({type:Boolean})],exports.PktInputWrapper.prototype,"hasFieldset",2);e([t.n({type:String,reflect:!0})],exports.PktInputWrapper.prototype,"role",2);e([t.n({type:Boolean,reflect:!0,converter:W})],exports.PktInputWrapper.prototype,"useWrapper",2);exports.PktInputWrapper=e([t.t("pkt-input-wrapper")],exports.PktInputWrapper);
|
|
@@ -87,10 +87,12 @@ let t = class extends m {
|
|
|
87
87
|
<pkt-icon name="alert-error" class="pkt-alert__icon"></pkt-icon>
|
|
88
88
|
<div class="pkt-alert__text">${T(this.errorMessage)}</div>
|
|
89
89
|
</div>` : l, c = () => i`
|
|
90
|
-
${s()}
|
|
90
|
+
${s()}
|
|
91
|
+
${d()}
|
|
91
92
|
${this.counterPosition === "top" ? u() : l}
|
|
92
93
|
<div class="pkt-contents" ${b(this.defaultSlot)}></div>
|
|
93
|
-
${this.counterPosition === "bottom" ? u() : l}
|
|
94
|
+
${this.counterPosition === "bottom" ? u() : l}
|
|
95
|
+
${y()}
|
|
94
96
|
`, $ = () => this.hasFieldset ? i`<fieldset class="pkt-inputwrapper__fieldset" aria-describedby="${a}">
|
|
95
97
|
${c()}
|
|
96
98
|
</fieldset>` : i`<div class="pkt-inputwrapper__fieldset">${c()}</div>`;
|
package/dist/pkt-combobox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./combobox-DWYPzXj-.cjs"),o=e.PktCombobox;Object.defineProperty(exports,"PktCombobox",{enumerable:!0,get:()=>e.PktCombobox});exports.default=o;
|
package/dist/pkt-combobox.js
CHANGED
package/dist/pkt-datepicker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./datepicker-SYeGnXRZ.cjs"),t=e.PktDatepicker;Object.defineProperty(exports,"PktDatepicker",{enumerable:!0,get:()=>e.PktDatepicker});exports.default=t;
|
package/dist/pkt-datepicker.js
CHANGED
package/dist/pkt-index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-BH0lJ2ny.cjs"),l=require("./accordionitem-DjAWPtsn.cjs"),d=require("./backlink-C5jQRMwJ.cjs"),b=require("./button-CDocR7iN.cjs"),k=require("./calendar-BZe2D4Sr.cjs"),m=require("./card-Bx36j0q4.cjs"),g=require("./combobox-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./alert-BH0lJ2ny.cjs"),l=require("./accordionitem-DjAWPtsn.cjs"),d=require("./backlink-C5jQRMwJ.cjs"),b=require("./button-CDocR7iN.cjs"),k=require("./calendar-BZe2D4Sr.cjs"),m=require("./card-Bx36j0q4.cjs"),g=require("./combobox-DWYPzXj-.cjs"),h=require("./consent-DrS71kvz.cjs"),f=require("./checkbox-CJ4tK9RC.cjs"),t=require("./element-6DBpyGQm.cjs"),y=require("./pkt-slot-controller-BzddBp7z.cjs"),s=require("./ref-iJtiv3o2.cjs"),O=require("./class-map-BBG2gMX4.cjs"),j=require("./datepicker-SYeGnXRZ.cjs"),q=require("./helptext-CzQX6YVE.cjs"),x=require("./heading-BRE_iFtR.cjs"),C=require("./icon-B_ryAy4Q.cjs"),v=require("./input-wrapper-BND8tUg_.cjs"),S=require("./link-DTkjNlmy.cjs"),$=require("./linkcard-BlMhPNry.cjs"),L=require("./loader-CHPxY9c6.cjs"),_=require("./messagebox-CqUBJs_D.cjs"),A=require("./modal-BdA5aWGU.cjs"),B=require("./progressbar-DhMBXkww.cjs"),p=require("./radiobutton-0vVqu-GU.cjs"),T=require("./tag-DPk3fpEg.cjs"),I=require("./textarea-PHo1w92l.cjs"),M=require("./textinput-CS0OHykQ.cjs"),R=require("./select-BwwF5Gki.cjs");var H=Object.defineProperty,w=Object.getOwnPropertyDescriptor,o=(a,e,r,i)=>{for(var n=i>1?void 0:i?w(e,r):e,u=a.length-1,c;u>=0;u--)(c=a[u])&&(n=(i?c(e,r,n):c(n))||n);return i&&n&&H(e,r,n),n};exports.PktComponent=class extends t.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=s.e(),this.namedSlot=s.e(),this.slotController=new y.PktSlotController(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 t.x`
|
|
2
2
|
<div class="${O.e(e)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
package/dist/pkt-index.js
CHANGED
|
@@ -5,18 +5,18 @@ import { P as T } from "./button-DrrEvUy9.js";
|
|
|
5
5
|
import { c as f } from "./calendar-DevQhOup.js";
|
|
6
6
|
import { P as D } from "./calendar-DevQhOup.js";
|
|
7
7
|
import { P as G } from "./card-Djnd-pgo.js";
|
|
8
|
-
import { P as K } from "./combobox-
|
|
8
|
+
import { P as K } from "./combobox-BREXxMeO.js";
|
|
9
9
|
import { P as U } from "./consent-CftYu8Di.js";
|
|
10
10
|
import { P as q } from "./checkbox-cD_5LDzV.js";
|
|
11
11
|
import { P as k, t as h, x as P, n, a as c } from "./element-CgEWt74-.js";
|
|
12
12
|
import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
13
13
|
import { e as m, n as d } from "./ref-BBYSqgeW.js";
|
|
14
14
|
import { e as u } from "./class-map-BpTj9gtz.js";
|
|
15
|
-
import { P as F } from "./datepicker-
|
|
15
|
+
import { P as F } from "./datepicker-DH4ZFMxD.js";
|
|
16
16
|
import { P as Q } from "./helptext-B7eI0iBQ.js";
|
|
17
17
|
import { P as X } from "./heading-D6jXE_Mz.js";
|
|
18
18
|
import { P as Z } from "./icon-CC1js8eR.js";
|
|
19
|
-
import { P as et } from "./input-wrapper-
|
|
19
|
+
import { P as et } from "./input-wrapper-_Lk9HzHU.js";
|
|
20
20
|
import { P as ot } from "./link-C76H6Qf1.js";
|
|
21
21
|
import { P as at } from "./linkcard-BVEsUPwG.js";
|
|
22
22
|
import { P as it } from "./loader-Da4IOk_T.js";
|
|
@@ -25,9 +25,9 @@ import { P as mt } from "./modal-DcXPnFus.js";
|
|
|
25
25
|
import { P as ft } from "./progressbar-Dj_mI_A6.js";
|
|
26
26
|
import { P as ht, P as ct } from "./radiobutton-BcFRJFvI.js";
|
|
27
27
|
import { P as ut } from "./tag-BWm6s48d.js";
|
|
28
|
-
import { P as vt } from "./textarea-
|
|
29
|
-
import { P as bt } from "./textinput-
|
|
30
|
-
import { P as $t } from "./select-
|
|
28
|
+
import { P as vt } from "./textarea-BrW98O-a.js";
|
|
29
|
+
import { P as bt } from "./textinput-BrBGjHZc.js";
|
|
30
|
+
import { P as $t } from "./select-DGHoBmbb.js";
|
|
31
31
|
var g = Object.defineProperty, v = Object.getOwnPropertyDescriptor, s = (t, e, i, a) => {
|
|
32
32
|
for (var r = a > 1 ? void 0 : a ? v(e, i) : e, p = t.length - 1, l; p >= 0; p--)
|
|
33
33
|
(l = t[p]) && (r = (a ? l(e, i, r) : l(r)) || r);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./input-wrapper-BND8tUg_.cjs"),t=e.PktInputWrapper;Object.defineProperty(exports,"PktInputWrapper",{enumerable:!0,get:()=>e.PktInputWrapper});exports.default=t;
|
package/dist/pkt-select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./select-BwwF5Gki.cjs"),t=e.PktSelect;Object.defineProperty(exports,"PktSelect",{enumerable:!0,get:()=>e.PktSelect});exports.default=t;
|
package/dist/pkt-select.js
CHANGED
package/dist/pkt-textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textarea-PHo1w92l.cjs"),t=e.PktTextarea;Object.defineProperty(exports,"PktTextarea",{enumerable:!0,get:()=>e.PktTextarea});exports.default=t;
|
package/dist/pkt-textarea.js
CHANGED
package/dist/pkt-textinput.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./textinput-CS0OHykQ.cjs"),t=e.PktTextinput;Object.defineProperty(exports,"PktTextinput",{enumerable:!0,get:()=>e.PktTextinput});exports.default=t;
|
package/dist/pkt-textinput.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const r=require("./element-6DBpyGQm.cjs"),p=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),o=require("./if-defined-Cni-RHLS.cjs"),d=require("./input-element-CHjLWeKt.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-
|
|
1
|
+
"use strict";const r=require("./element-6DBpyGQm.cjs"),p=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),o=require("./if-defined-Cni-RHLS.cjs"),d=require("./input-element-CHjLWeKt.cjs"),c=require("./pkt-options-controller-CiuBG6Lt.cjs"),v=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BND8tUg_.cjs");var f=Object.defineProperty,b=Object.getOwnPropertyDescriptor,a=(u,t,e,s)=>{for(var i=s>1?void 0:s?b(t,e):t,l=u.length-1,n;l>=0;l--)(n=u[l])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&f(t,e,i),i};exports.PktSelect=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.options=[],this.value="",this._options=[],this.selectedIndex=-1,this.selectedOptions=void 0,this.optionsController=new c.PktOptionsSlotController(this),this.slotController=new v.PktSlotController(this,this.helptextSlot),this.slotController.skipOptions=!0}connectedCallback(){super.connectedCallback();const t=this.options.length>0,e=this.optionsController.nodes.length&&this.optionsController.nodes.length>0;!t&&e?this.optionsController.nodes.forEach(s=>{const i={value:s.hasAttribute("value")?s.getAttribute("value")??"":s.textContent??"",label:s.textContent||s.getAttribute("value")||"",disabled:s.hasAttribute("disabled"),hidden:s.hasAttribute("data-hidden")};s.getAttribute("selected")&&!this.value&&(this.value=i.value),this._options.push(i)}):(this._options=this.options,this._options.forEach(s=>{s.selected&&!this.value&&(this.value=s.value)}))}add(t,e){var s,i,l;(s=this.inputRef.value)==null||s.add(t,e),this._options.push({value:t.value||t.text,label:t.text||t.value,selected:t.selected,disabled:t.disabled}),t.selected&&(this.value=t.value||t.text,this.selectedIndex=this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions),this.requestUpdate()}remove(t){var e,s;typeof t=="number"&&(this.selectedIndex===t&&(this.value=((e=this._options[0])==null?void 0:e.value)||""),(s=this.inputRef.value)==null||s.remove(t))}item(t){var e;return(e=this.inputRef.value)==null?void 0:e.item(t)}namedItem(t){var e;return(e=this.inputRef.value)==null?void 0:e.namedItem(t)}showPicker(){var t;(t=this.inputRef.value)==null||t.showPicker()}attributeChangedCallback(t,e,s){var i,l;t==="options"&&(this._options=s?JSON.parse(s):[]),t==="value"&&this.value!==e&&(this.selectedIndex=this.touched?this.returnNumberOrNull((i=this.inputRef.value)==null?void 0:i.selectedIndex):this.options.findIndex(n=>n.value===s),this.selectedOptions=(l=this.inputRef.value)==null?void 0:l.selectedOptions,this.valueChanged(s,e)),super.attributeChangedCallback(t,e,s)}update(t){var e,s;super.update(t),t.has("value")&&this.value!==t.get("value")&&(this.selectedIndex=this.touched?this.returnNumberOrNull((e=this.inputRef.value)==null?void 0:e.selectedIndex):this.options.findIndex(i=>i.value===this.value),this.selectedOptions=(s=this.inputRef.value)==null?void 0:s.selectedOptions,this.valueChanged(this.value,t.get("value"))),t.has("id")&&!this.name&&this.id&&(this.name=this.id)}firstUpdated(t){var e;super.firstUpdated(t),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(s=>s.value===this.value),this.selectedOptions=(e=this.inputRef.value)==null?void 0:e.selectedOptions}render(){const t=`pkt-input ${this.fullwidth?"pkt-input--fullwidth":""}`;return r.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
?counter=${this.counter}
|
|
4
4
|
?disabled=${this.disabled}
|
|
@@ -5,7 +5,7 @@ import { o } from "./if-defined-CmuO4Vz9.js";
|
|
|
5
5
|
import { P as b } from "./input-element-Cco4PA2M.js";
|
|
6
6
|
import { P as $ } from "./pkt-options-controller-CZO1nxZ8.js";
|
|
7
7
|
import { P as x } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
-
import "./input-wrapper-
|
|
8
|
+
import "./input-wrapper-_Lk9HzHU.js";
|
|
9
9
|
var m = Object.defineProperty, g = Object.getOwnPropertyDescriptor, h = (t, e, s, i) => {
|
|
10
10
|
for (var l = i > 1 ? void 0 : i ? g(e, s) : e, a = t.length - 1, r; a >= 0; a--)
|
|
11
11
|
(r = t[a]) && (l = (i ? r(e, s, l) : r(l)) || l);
|
|
@@ -7,7 +7,7 @@ import { e as b, i as T, t as a } from "./directive-oAbCiebi.js";
|
|
|
7
7
|
import { f as y, m as w } from "./directive-helpers-r-kOS_Mf.js";
|
|
8
8
|
import { P as C } from "./input-element-Cco4PA2M.js";
|
|
9
9
|
import { P as E } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
10
|
-
import "./input-wrapper-
|
|
10
|
+
import "./input-wrapper-_Lk9HzHU.js";
|
|
11
11
|
import "./icon-CC1js8eR.js";
|
|
12
12
|
/**
|
|
13
13
|
* @license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const s=require("./element-6DBpyGQm.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),c=require("./state-DPobt-Yz.cjs"),l=require("./ref-iJtiv3o2.cjs"),$=require("./class-map-BBG2gMX4.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-BBbxqP2W.cjs"),x=require("./input-element-CHjLWeKt.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-
|
|
1
|
+
"use strict";const s=require("./element-6DBpyGQm.cjs"),p=require("./if-defined-Cni-RHLS.cjs"),c=require("./state-DPobt-Yz.cjs"),l=require("./ref-iJtiv3o2.cjs"),$=require("./class-map-BBG2gMX4.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-BBbxqP2W.cjs"),x=require("./input-element-CHjLWeKt.cjs"),T=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BND8tUg_.cjs");require("./icon-B_ryAy4Q.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import { E as p, x as h, n as a, a as $ } from "./element-CgEWt74-.js";
|
|
2
2
|
import { o as u } from "./if-defined-CmuO4Vz9.js";
|
|
3
3
|
import { r as f } from "./state-Bo2bck5_.js";
|
|
4
|
-
import { e as
|
|
4
|
+
import { e as d, n as m } from "./ref-BBYSqgeW.js";
|
|
5
5
|
import { e as g } from "./class-map-BpTj9gtz.js";
|
|
6
6
|
import { P as x } from "./input-element-Cco4PA2M.js";
|
|
7
|
-
import { P as
|
|
8
|
-
import "./input-wrapper-
|
|
7
|
+
import { P as v } from "./pkt-slot-controller-BPGj-LC5.js";
|
|
8
|
+
import "./input-wrapper-_Lk9HzHU.js";
|
|
9
9
|
import "./icon-CC1js8eR.js";
|
|
10
|
-
var
|
|
11
|
-
for (var n = t > 1 ? void 0 : t ? b(
|
|
12
|
-
(c =
|
|
13
|
-
return t && n &&
|
|
10
|
+
var y = Object.defineProperty, b = Object.getOwnPropertyDescriptor, o = (i, e, r, t) => {
|
|
11
|
+
for (var n = t > 1 ? void 0 : t ? b(e, r) : e, l = i.length - 1, c; l >= 0; l--)
|
|
12
|
+
(c = i[l]) && (n = (t ? c(e, r, n) : c(n)) || n);
|
|
13
|
+
return t && n && y(e, r, n), n;
|
|
14
14
|
};
|
|
15
15
|
let s = class extends x {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(), this.inputRef =
|
|
17
|
+
super(), this.inputRef = d(), this.helptextSlot = d(), this.value = "", this.type = "text", this.size = null, this.autocomplete = null, this.iconNameRight = null, this.prefix = null, this.suffix = null, this.omitSearchIcon = !1, this.counterCurrent = 0, this.slotController = new v(this, this.helptextSlot);
|
|
18
18
|
}
|
|
19
|
-
attributeChangedCallback(
|
|
20
|
-
|
|
19
|
+
attributeChangedCallback(i, e, r) {
|
|
20
|
+
i === "value" && this.value !== e && (this.counterCurrent = r ? r.length : 0, this.valueChanged(r, e)), super.attributeChangedCallback(i, e, r);
|
|
21
21
|
}
|
|
22
|
-
updated(
|
|
23
|
-
var
|
|
24
|
-
super.updated(
|
|
22
|
+
updated(i) {
|
|
23
|
+
var e;
|
|
24
|
+
super.updated(i), i.has("value") && (this.counterCurrent = ((e = this.value) == null ? void 0 : e.length) || 0, this.valueChanged(this.value, i.get("value"))), i.has("id") && !this.name && this.id && (this.name = this.id);
|
|
25
25
|
}
|
|
26
26
|
render() {
|
|
27
|
-
const
|
|
27
|
+
const i = this.type === "search" && !this.iconNameRight && !this.omitSearchIcon, e = g({
|
|
28
28
|
"pkt-input": !0,
|
|
29
29
|
"pkt-input--fullwidth": this.fullwidth,
|
|
30
30
|
"pkt-input--counter-error": this.counter && this.counterMaxLength && this.value.length && this.value.length > this.counterMaxLength
|
|
@@ -53,23 +53,23 @@ let s = class extends x {
|
|
|
53
53
|
.requiredText=${this.requiredText}
|
|
54
54
|
class="pkt-textinput"
|
|
55
55
|
>
|
|
56
|
-
<div class="pkt-contents" ${
|
|
56
|
+
<div class="pkt-contents" ${m(this.helptextSlot)} name="helptext" slot="helptext"></div>
|
|
57
57
|
<div class="pkt-input__container">
|
|
58
58
|
${this.prefix ? h`<div class="pkt-input-prefix">${this.prefix}</div>` : p}
|
|
59
59
|
<input
|
|
60
|
-
${
|
|
61
|
-
class=${
|
|
60
|
+
${m(this.inputRef)}
|
|
61
|
+
class=${e}
|
|
62
62
|
type=${this.type}
|
|
63
63
|
name=${(this.name || this.id) + "-input"}
|
|
64
64
|
id=${this.id + "-input"}
|
|
65
65
|
placeholder=${u(this.placeholder)}
|
|
66
66
|
aria-labelledby=${r}
|
|
67
67
|
autocomplete=${this.autocomplete || "off"}
|
|
68
|
-
minlength=${u(this.minlength)}
|
|
69
|
-
maxlength=${u(this.maxlength)}
|
|
70
|
-
min=${u(this.min)}
|
|
71
|
-
max=${u(this.max)}
|
|
72
|
-
step=${u(this.step)}
|
|
68
|
+
minlength=${u(this.minlength || void 0)}
|
|
69
|
+
maxlength=${u(this.maxlength || void 0)}
|
|
70
|
+
min=${u(this.min || void 0)}
|
|
71
|
+
max=${u(this.max || void 0)}
|
|
72
|
+
step=${u(this.step || void 0)}
|
|
73
73
|
?readonly=${this.readonly}
|
|
74
74
|
size=${this.size || p}
|
|
75
75
|
.value=${this.value}
|
|
@@ -102,13 +102,13 @@ let s = class extends x {
|
|
|
102
102
|
class="pkt-input-suffix-icon"
|
|
103
103
|
name=${this.iconNameRight}
|
|
104
104
|
></pkt-icon>` : p}
|
|
105
|
-
${
|
|
105
|
+
${i ? h`<pkt-icon
|
|
106
106
|
class="pkt-input-suffix-icon"
|
|
107
107
|
name="magnifying-glass-big"
|
|
108
108
|
></pkt-icon>` : p}
|
|
109
109
|
</div>` : p}
|
|
110
110
|
${!this.suffix && this.iconNameRight ? h`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>` : p}
|
|
111
|
-
${!this.suffix &&
|
|
111
|
+
${!this.suffix && i ? h`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>` : p}
|
|
112
112
|
</div>
|
|
113
113
|
</pkt-input-wrapper>
|
|
114
114
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const t=require("./element-6DBpyGQm.cjs"),a=require("./if-defined-Cni-RHLS.cjs"),l=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),c=require("./class-map-BBG2gMX4.cjs"),
|
|
1
|
+
"use strict";const t=require("./element-6DBpyGQm.cjs"),a=require("./if-defined-Cni-RHLS.cjs"),l=require("./state-DPobt-Yz.cjs"),h=require("./ref-iJtiv3o2.cjs"),c=require("./class-map-BBG2gMX4.cjs"),d=require("./input-element-CHjLWeKt.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs");require("./input-wrapper-BND8tUg_.cjs");require("./icon-B_ryAy4Q.cjs");var $=Object.defineProperty,f=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?f(i,s):i,o=u.length-1,p;o>=0;o--)(p=u[o])&&(e=(n?p(i,s,e):p(e))||e);return n&&e&&$(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(),this.inputRef=h.e(),this.helptextSlot=h.e(),this.value="",this.type="text",this.size=null,this.autocomplete=null,this.iconNameRight=null,this.prefix=null,this.suffix=null,this.omitSearchIcon=!1,this.counterCurrent=0,this.slotController=new x.PktSlotController(this,this.helptextSlot)}attributeChangedCallback(i,s,n){i==="value"&&this.value!==s&&(this.counterCurrent=n?n.length:0,this.valueChanged(n,s)),super.attributeChangedCallback(i,s,n)}updated(i){var s;super.updated(i),i.has("value")&&(this.counterCurrent=((s=this.value)==null?void 0:s.length)||0,this.valueChanged(this.value,i.get("value"))),i.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const i=this.type==="search"&&!this.iconNameRight&&!this.omitSearchIcon,s=c.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}),n=this.ariaLabelledby||`${this.id}-input-label`;return t.x`
|
|
2
2
|
<pkt-input-wrapper
|
|
3
3
|
label="${this.label}"
|
|
4
4
|
?counter=${this.counter}
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
placeholder=${a.o(this.placeholder)}
|
|
35
35
|
aria-labelledby=${n}
|
|
36
36
|
autocomplete=${this.autocomplete||"off"}
|
|
37
|
-
minlength=${a.o(this.minlength)}
|
|
38
|
-
maxlength=${a.o(this.maxlength)}
|
|
39
|
-
min=${a.o(this.min)}
|
|
40
|
-
max=${a.o(this.max)}
|
|
41
|
-
step=${a.o(this.step)}
|
|
37
|
+
minlength=${a.o(this.minlength||void 0)}
|
|
38
|
+
maxlength=${a.o(this.maxlength||void 0)}
|
|
39
|
+
min=${a.o(this.min||void 0)}
|
|
40
|
+
max=${a.o(this.max||void 0)}
|
|
41
|
+
step=${a.o(this.step||void 0)}
|
|
42
42
|
?readonly=${this.readonly}
|
|
43
43
|
size=${this.size||t.E}
|
|
44
44
|
.value=${this.value}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
"urlpattern-polyfill": "^10.0.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@oslokommune/punkt-assets": "^
|
|
34
|
-
"@oslokommune/punkt-css": "^
|
|
33
|
+
"@oslokommune/punkt-assets": "^13.0.0",
|
|
34
|
+
"@oslokommune/punkt-css": "^13.0.0",
|
|
35
35
|
"sass": "^1.78.0",
|
|
36
36
|
"typescript": "^5.6.2",
|
|
37
37
|
"vite": "^5.4.18",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
59
59
|
},
|
|
60
60
|
"license": "MIT",
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "8012adb5b795a7ab26d844a3311435fef05121c4"
|
|
62
62
|
}
|
|
@@ -74,6 +74,7 @@ export class PktInputWrapper extends PktElement<Props> {
|
|
|
74
74
|
@property({ type: Boolean }) counter: boolean = specs.props.counter.default
|
|
75
75
|
@property({ type: Number }) counterCurrent: number = 0
|
|
76
76
|
@property({ type: Number }) counterMaxLength: number = 0
|
|
77
|
+
|
|
77
78
|
@property({ type: String }) counterError: string | null = null
|
|
78
79
|
@property({ type: String, reflect: false }) counterPosition: TCounterPosition = 'bottom'
|
|
79
80
|
@property({ type: Boolean }) optionalTag: boolean = specs.props.optionalTag.default
|
|
@@ -209,11 +210,14 @@ export class PktInputWrapper extends PktElement<Props> {
|
|
|
209
210
|
}
|
|
210
211
|
|
|
211
212
|
const inputContent = () => {
|
|
213
|
+
//prettier-ignore
|
|
212
214
|
return html`
|
|
213
|
-
${labelElement()}
|
|
215
|
+
${labelElement()}
|
|
216
|
+
${helptextElement()}
|
|
214
217
|
${this.counterPosition === 'top' ? counterElement() : nothing}
|
|
215
218
|
<div class="pkt-contents" ${ref(this.defaultSlot)}></div>
|
|
216
|
-
${this.counterPosition === 'bottom' ? counterElement() : nothing}
|
|
219
|
+
${this.counterPosition === 'bottom' ? counterElement() : nothing}
|
|
220
|
+
${errorElement()}
|
|
217
221
|
`
|
|
218
222
|
}
|
|
219
223
|
|
|
@@ -15,14 +15,9 @@ export class PktTextarea extends PktInputElement {
|
|
|
15
15
|
private inputRef: Ref<HTMLTextAreaElement> = createRef()
|
|
16
16
|
private helptextSlot: Ref<HTMLElement> = createRef()
|
|
17
17
|
|
|
18
|
-
@property({ type: String, reflect: true })
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@property({ type: String })
|
|
22
|
-
autocomplete: string = 'off'
|
|
23
|
-
|
|
24
|
-
@property({ type: Number })
|
|
25
|
-
rows: number | null = null
|
|
18
|
+
@property({ type: String, reflect: true }) value: string = ''
|
|
19
|
+
@property({ type: String }) autocomplete: string = 'off'
|
|
20
|
+
@property({ type: Number }) rows: number | null = null
|
|
26
21
|
|
|
27
22
|
@state() counterCurrent = 0
|
|
28
23
|
|
|
@@ -27,29 +27,14 @@ export class PktTextinput extends PktInputElement<Props> {
|
|
|
27
27
|
private inputRef: Ref<HTMLTextAreaElement> = createRef()
|
|
28
28
|
private helptextSlot: Ref<HTMLElement> = createRef()
|
|
29
29
|
|
|
30
|
-
@property({ type: String, reflect: true })
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@property({ type: String })
|
|
34
|
-
type: string =
|
|
35
|
-
|
|
36
|
-
@property({ type:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
@property({ type: String })
|
|
40
|
-
autocomplete: string | null = null
|
|
41
|
-
|
|
42
|
-
@property({ type: String })
|
|
43
|
-
iconNameRight: string | null = null
|
|
44
|
-
|
|
45
|
-
@property({ type: String })
|
|
46
|
-
prefix: string | null = null
|
|
47
|
-
|
|
48
|
-
@property({ type: String })
|
|
49
|
-
suffix: string | null = null
|
|
50
|
-
|
|
51
|
-
@property({ type: Boolean })
|
|
52
|
-
omitSearchIcon: boolean = false
|
|
30
|
+
@property({ type: String, reflect: true }) value: string = ''
|
|
31
|
+
@property({ type: String }) type: string = 'text'
|
|
32
|
+
@property({ type: Number }) size: number | null = null
|
|
33
|
+
@property({ type: String }) autocomplete: string | null = null
|
|
34
|
+
@property({ type: String }) iconNameRight: string | null = null
|
|
35
|
+
@property({ type: String }) prefix: string | null = null
|
|
36
|
+
@property({ type: String }) suffix: string | null = null
|
|
37
|
+
@property({ type: Boolean }) omitSearchIcon: boolean = false
|
|
53
38
|
|
|
54
39
|
@state() counterCurrent = 0
|
|
55
40
|
|
|
@@ -127,11 +112,11 @@ export class PktTextinput extends PktInputElement<Props> {
|
|
|
127
112
|
placeholder=${ifDefined(this.placeholder)}
|
|
128
113
|
aria-labelledby=${labelledBy}
|
|
129
114
|
autocomplete=${this.autocomplete || 'off'}
|
|
130
|
-
minlength=${ifDefined(this.minlength)}
|
|
131
|
-
maxlength=${ifDefined(this.maxlength)}
|
|
132
|
-
min=${ifDefined(this.min)}
|
|
133
|
-
max=${ifDefined(this.max)}
|
|
134
|
-
step=${ifDefined(this.step)}
|
|
115
|
+
minlength=${ifDefined(this.minlength || undefined)}
|
|
116
|
+
maxlength=${ifDefined(this.maxlength || undefined)}
|
|
117
|
+
min=${ifDefined(this.min || undefined)}
|
|
118
|
+
max=${ifDefined(this.max || undefined)}
|
|
119
|
+
step=${ifDefined(this.step || undefined)}
|
|
135
120
|
?readonly=${this.readonly}
|
|
136
121
|
size=${this.size || nothing}
|
|
137
122
|
.value=${this.value}
|