@oslokommune/punkt-elements 16.7.1 → 16.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/dist/accordion-BB1JrONI.cjs +34 -0
- package/dist/accordion-nNH87Y60.js +130 -0
- package/dist/alert-BEEnTiCb.cjs +33 -0
- package/dist/alert-ePJuDtmm.js +171 -0
- package/dist/async-directive-B9P1Qa0k.cjs +1 -0
- package/dist/async-directive-CaQiqjyV.js +55 -0
- package/dist/backlink-Ba03LlbB.cjs +13 -0
- package/dist/backlink-CiwXrQYD.js +38 -0
- package/dist/booleanish-BmcOU-43.js +11 -0
- package/dist/booleanish-jJLlnr6-.cjs +1 -0
- package/dist/breadcrumbs-CD1zib3s.cjs +43 -0
- package/dist/breadcrumbs-CpuVqWhF.js +76 -0
- package/dist/button-BIpd1xJh.js +95 -0
- package/dist/button-D-TOBaJB.cjs +27 -0
- package/dist/calendar-BzEtOJla.js +2031 -0
- package/dist/calendar-E5jJLt8D.cjs +90 -0
- package/dist/card-BYJu1MYm.js +339 -0
- package/dist/card-CUFhMVim.cjs +87 -0
- package/dist/checkbox-BARDb9iV.cjs +31 -0
- package/dist/checkbox-Cspxcvt_.js +111 -0
- package/dist/class-map-C8HuhNzZ.js +27 -0
- package/dist/class-map-CJ-msbHs.cjs +1 -0
- package/dist/classutils-DEL164Ur.js +7 -0
- package/dist/classutils-z8YsPlOf.cjs +1 -0
- package/dist/combobox-BcdLZRDU.js +984 -0
- package/dist/combobox-CGbFTWq_.cjs +135 -0
- package/dist/consent-DeB_5sWH.js +197 -0
- package/dist/consent-hwu7pp3S.cjs +11 -0
- package/dist/datepicker-DpmlsnH_.cjs +273 -0
- package/dist/datepicker-OVd8pmnZ.js +1125 -0
- package/dist/dialog-polyfill.esm-1hPr0gl9.js +280 -0
- package/dist/dialog-polyfill.esm-D3Oinvk0.cjs +1 -0
- package/dist/directive-3THFsVew.js +28 -0
- package/dist/directive-CJ2giQBZ.cjs +1 -0
- package/dist/directive-helpers-D1QSxY17.cjs +1 -0
- package/dist/directive-helpers-Dkv2gKgs.js +25 -0
- package/dist/element-DjtxO-1r.cjs +2 -0
- package/dist/element-cZ85T_aa.js +693 -0
- package/dist/element-with-slot-4J2o3SeU.js +166 -0
- package/dist/element-with-slot-CWoTGA1B.cjs +1 -0
- package/dist/header-DWgPgGfS.cjs +304 -0
- package/dist/header-a6ztVNp3.js +782 -0
- package/dist/heading-BgSWIRii.cjs +1 -0
- package/dist/heading-DiQLPxdf.js +73 -0
- package/dist/helptext-CCBKKLus.js +65 -0
- package/dist/helptext-D-3QfZv5.cjs +24 -0
- package/dist/icon-Co72KtgF.js +86 -0
- package/dist/icon-Dr8sfT2X.cjs +1 -0
- package/dist/if-defined-Cjj8qN-Z.js +5 -0
- package/dist/if-defined-XKOD_t_V.cjs +1 -0
- package/dist/index.d.ts +1 -2
- package/dist/input-element-B1yxcfz4.cjs +1 -0
- package/dist/input-element-Bw1s6NlF.js +643 -0
- package/dist/input-wrapper-BRuVELpK.cjs +54 -0
- package/dist/input-wrapper-CDyHTR1V.js +164 -0
- package/dist/input-wrapper-Dwd-_sKm.cjs +1 -0
- package/dist/input-wrapper-YfTmpSSY.js +117 -0
- package/dist/link-CKAFMz9j.js +89 -0
- package/dist/link-CyTCpI0k.cjs +7 -0
- package/dist/linkcard-B0KOGaGj.js +55 -0
- package/dist/linkcard-BE4-FewK.cjs +13 -0
- package/dist/listbox-DCA2JoPV.cjs +106 -0
- package/dist/listbox-DuBgTFvH.js +397 -0
- package/dist/loader-6kFZUErT.js +66 -0
- package/dist/loader-CX2rsC01.cjs +16 -0
- package/dist/messagebox-Cwlg5sOr.js +110 -0
- package/dist/messagebox-Din9X53b.cjs +13 -0
- package/dist/modal-C_wtsh9m.js +209 -0
- package/dist/modal-DS_wUOIv.cjs +36 -0
- package/dist/pkt-accordion.cjs +1 -1
- package/dist/pkt-accordion.js +2 -7
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +2 -6
- package/dist/pkt-backlink.cjs +1 -1
- package/dist/pkt-backlink.js +2 -6
- package/dist/pkt-breadcrumbs.cjs +1 -43
- package/dist/pkt-breadcrumbs.js +2 -79
- package/dist/pkt-button.cjs +1 -1
- package/dist/pkt-button.js +2 -6
- package/dist/pkt-calendar.cjs +1 -1
- package/dist/pkt-calendar.js +2 -6
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +2 -6
- package/dist/pkt-checkbox.cjs +1 -1
- package/dist/pkt-checkbox.js +2 -6
- package/dist/pkt-combobox.cjs +1 -1
- package/dist/pkt-combobox.js +2 -6
- package/dist/pkt-consent.cjs +1 -1
- package/dist/pkt-consent.js +2 -6
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +5 -10
- package/dist/pkt-header.cjs +1 -304
- package/dist/pkt-header.js +2 -855
- package/dist/pkt-heading.cjs +1 -1
- package/dist/pkt-heading.js +2 -6
- package/dist/pkt-helptext.cjs +1 -1
- package/dist/pkt-helptext.js +2 -6
- package/dist/pkt-icon.cjs +1 -1
- package/dist/pkt-icon.js +2 -6
- package/dist/pkt-index.cjs +1 -1
- package/dist/pkt-index.js +30 -66
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +2 -6
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +2 -6
- package/dist/pkt-linkcard.cjs +1 -1
- package/dist/pkt-linkcard.js +2 -6
- package/dist/pkt-listbox.cjs +1 -1
- package/dist/pkt-listbox.js +2 -6
- package/dist/pkt-loader.cjs +1 -1
- package/dist/pkt-loader.js +2 -6
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +2 -6
- package/dist/pkt-modal.cjs +1 -1
- package/dist/pkt-modal.js +2 -6
- package/dist/pkt-options-controller-CRrI6WMk.js +43 -0
- package/dist/pkt-options-controller-CXUGx134.cjs +1 -0
- package/dist/pkt-progressbar.cjs +1 -1
- package/dist/pkt-progressbar.js +2 -6
- package/dist/pkt-radiobutton.cjs +1 -1
- package/dist/pkt-radiobutton.js +2 -6
- package/dist/pkt-select.cjs +1 -1
- package/dist/pkt-select.js +2 -6
- package/dist/pkt-tabs.cjs +1 -1
- package/dist/pkt-tabs.js +2 -7
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +2 -6
- package/dist/pkt-textarea.cjs +1 -1
- package/dist/pkt-textarea.js +2 -6
- package/dist/pkt-textinput.cjs +1 -1
- package/dist/pkt-textinput.js +2 -6
- package/dist/pkt-timepicker.cjs +1 -191
- package/dist/pkt-timepicker.js +2 -558
- package/dist/progressbar-CdXtmOBb.cjs +17 -0
- package/dist/progressbar-Dy9AiYQz.js +113 -0
- package/dist/radiobutton-GOnpUbCW.cjs +31 -0
- package/dist/radiobutton-V_KPbup_.js +84 -0
- package/dist/ref-BaJ0mBT_.cjs +1 -0
- package/dist/ref-RS8Uv6uC.js +30 -0
- package/dist/repeat-Cepr3469.js +57 -0
- package/dist/repeat-CqcDYBxr.cjs +1 -0
- package/dist/select-BSAFd8Wa.js +164 -0
- package/dist/select-C2i8sOk5.cjs +49 -0
- package/dist/tabs-D8nL9rWx.cjs +37 -0
- package/dist/tabs-Y7utmJi9.js +318 -0
- package/dist/tag-DLthw5b4.cjs +27 -0
- package/dist/tag-VwykmuQR.js +179 -0
- package/dist/textarea-D7aGOyDf.cjs +46 -0
- package/dist/textarea-DYOBhJrN.js +115 -0
- package/dist/textinput-BUgntXnM.js +124 -0
- package/dist/textinput-DFh8_9cx.cjs +70 -0
- package/dist/timepicker-BIfE7KKJ.cjs +191 -0
- package/dist/timepicker-DaSwn1FA.js +503 -0
- package/dist/utils-CUqCKGvp.js +7 -0
- package/dist/utils-CjAbIttF.cjs +1 -0
- package/package.json +6 -6
- package/src/components/accordion/accordion.ts +6 -1
- package/src/components/accordion/accordionitem.ts +6 -1
- package/src/components/alert/alert.test.ts +1 -1
- package/src/components/alert/alert.ts +12 -7
- package/src/components/backlink/backlink.ts +6 -1
- package/src/components/breadcrumbs/breadcrumbs.ts +6 -1
- package/src/components/button/button.ts +6 -1
- package/src/components/calendar/calendar.ts +6 -1
- package/src/components/card/card.ts +6 -1
- package/src/components/checkbox/checkbox.ts +6 -1
- package/src/components/combobox/combobox.ts +6 -1
- package/src/components/consent/consent.ts +6 -1
- package/src/components/datepicker/date-tags.ts +6 -1
- package/src/components/datepicker/datepicker-multiple.ts +6 -1
- package/src/components/datepicker/datepicker-popup.ts +6 -1
- package/src/components/datepicker/datepicker-range.ts +6 -1
- package/src/components/datepicker/datepicker-single.ts +6 -1
- package/src/components/datepicker/datepicker-utils.test.ts +16 -23
- package/src/components/datepicker/datepicker.ts +6 -1
- package/src/components/header/header-service.ts +6 -1
- package/src/components/header/header-user-menu.ts +6 -1
- package/src/components/header/header.ts +6 -1
- package/src/components/heading/heading.ts +6 -1
- package/src/components/helptext/helptext.ts +6 -1
- package/src/components/icon/icon.ts +6 -1
- package/src/components/input-wrapper/input-wrapper.ts +6 -1
- package/src/components/link/link.ts +6 -1
- package/src/components/linkcard/linkcard.ts +6 -1
- package/src/components/listbox/listbox.ts +6 -1
- package/src/components/loader/loader.ts +6 -1
- package/src/components/messagebox/messagebox.ts +6 -1
- package/src/components/modal/modal.ts +6 -1
- package/src/components/progressbar/progressbar.ts +6 -1
- package/src/components/radiobutton/radiobutton.ts +6 -1
- package/src/components/select/select.ts +6 -1
- package/src/components/tabs/tabitem.ts +6 -1
- package/src/components/tabs/tabs.ts +6 -1
- package/src/components/tag/tag.ts +6 -1
- package/src/components/textarea/textarea.ts +6 -1
- package/src/components/textinput/textinput.ts +6 -1
- package/src/components/timepicker/timepicker.ts +6 -1
- package/dist/accordionitem-D1Agl1bB.cjs +0 -34
- package/dist/accordionitem-ZlaXvjt5.js +0 -138
- package/dist/alert-BuAXrnKl.js +0 -115
- package/dist/alert-DFkFNTxh.cjs +0 -33
- package/dist/async-directive-CMzWMlZ5.js +0 -65
- package/dist/async-directive-DoMuclel.cjs +0 -5
- package/dist/backlink-EiAXUUZP.cjs +0 -13
- package/dist/backlink-V4DAt17e.js +0 -47
- package/dist/booleanish-BKVonob4.cjs +0 -1
- package/dist/booleanish-C9R0tdXH.js +0 -11
- package/dist/button-DEyvt1LI.js +0 -137
- package/dist/button-DYv5Dg4M.cjs +0 -27
- package/dist/calendar-HIE9nxcc.cjs +0 -90
- package/dist/calendar-S63oreVW.js +0 -2138
- package/dist/card-CyeH6l1c.cjs +0 -87
- package/dist/card-DDiLfuO4.js +0 -231
- package/dist/checkbox-BLlwTABj.cjs +0 -31
- package/dist/checkbox-ejBUa5qQ.js +0 -145
- package/dist/class-map-CEnykyO_.js +0 -34
- package/dist/class-map-CsENJXf1.cjs +0 -5
- package/dist/classutils-BwNK82ZQ.cjs +0 -1
- package/dist/classutils-RQs1k6D9.js +0 -7
- package/dist/combobox-BmxSecfE.js +0 -818
- package/dist/combobox-Hb2V-fPX.cjs +0 -135
- package/dist/consent-iXyx5v6J.js +0 -173
- package/dist/consent-ruWAEVXW.cjs +0 -11
- package/dist/datepicker-CZl7b8Na.js +0 -1158
- package/dist/datepicker-D2H7U6MS.cjs +0 -273
- package/dist/dialog-polyfill.esm-CPKZe7AL.cjs +0 -1
- package/dist/dialog-polyfill.esm-CbjBMXAG.js +0 -395
- package/dist/directive-C7oCP5Bh.cjs +0 -5
- package/dist/directive-helpers-BP2WOx60.cjs +0 -5
- package/dist/directive-helpers-rm-28gIj.js +0 -38
- package/dist/directive-oAbCiebi.js +0 -27
- package/dist/element-CPpT3rFQ.js +0 -638
- package/dist/element-gR_VtSiD.cjs +0 -27
- package/dist/element-with-slot-Dqk6-TRR.js +0 -240
- package/dist/element-with-slot-ZX-up7jO.cjs +0 -1
- package/dist/heading-CKt7cVn7.js +0 -101
- package/dist/heading-Cvz8m1xL.cjs +0 -1
- package/dist/helptext-5Mzp65-F.cjs +0 -24
- package/dist/helptext-jIoWRcCF.js +0 -80
- package/dist/icon-BlKA8YuW.js +0 -103
- package/dist/icon-Bqj9oBbl.cjs +0 -9
- package/dist/if-defined-B0krMLad.js +0 -10
- package/dist/if-defined-BOW3ODSj.cjs +0 -5
- package/dist/input-element-8nLwuQS4.js +0 -837
- package/dist/input-element-DdVhUvva.cjs +0 -1
- package/dist/input-wrapper-B0MkQ0IZ.cjs +0 -54
- package/dist/input-wrapper-B2JpK016.js +0 -179
- package/dist/input-wrapper-CDgenrYA.js +0 -6
- package/dist/input-wrapper-EoSAbU-U.cjs +0 -1
- package/dist/link-R_lNhViF.cjs +0 -7
- package/dist/link-Z_GizclR.js +0 -53
- package/dist/linkcard-BlQvdB1a.js +0 -54
- package/dist/linkcard-C7HbSLlX.cjs +0 -13
- package/dist/listbox-BQKDZvZn.js +0 -438
- package/dist/listbox-CGgV9MAe.cjs +0 -106
- package/dist/loader-Ci3CHU8k.js +0 -93
- package/dist/loader-e2gs_1xz.cjs +0 -16
- package/dist/messagebox-Bf-XMlvW.js +0 -69
- package/dist/messagebox-D67w71VX.cjs +0 -13
- package/dist/modal-CyvEkbfQ.cjs +0 -36
- package/dist/modal-DzGe1g8Z.js +0 -154
- package/dist/pkt-options-controller-5LXbEzuk.cjs +0 -1
- package/dist/pkt-options-controller-B5YalfCb.js +0 -39
- package/dist/progressbar-By7e0lEI.js +0 -162
- package/dist/progressbar-DsJ2B9Vm.cjs +0 -21
- package/dist/radiobutton-6frNG9J_.js +0 -111
- package/dist/radiobutton-Bv-BZ1Hw.cjs +0 -31
- package/dist/ref-Bg_Swj5w.js +0 -42
- package/dist/ref-CL-Xk9Xm.cjs +0 -5
- package/dist/repeat-BD8TKgJb.js +0 -61
- package/dist/repeat-Cfq8CDlf.cjs +0 -5
- package/dist/select-CXZt1nHS.js +0 -228
- package/dist/select-WFhS4Vfp.cjs +0 -49
- package/dist/state-C_1EOo3D.js +0 -12
- package/dist/state-Dg-53wQ8.cjs +0 -5
- package/dist/tabitem-CB8wkKmv.js +0 -332
- package/dist/tabitem-DZpspU4Q.cjs +0 -65
- package/dist/tag-BuCpqaks.js +0 -115
- package/dist/tag-X6xdjR0N.cjs +0 -27
- package/dist/textarea-Bzuymclz.js +0 -131
- package/dist/textarea-DoeHJ7HR.cjs +0 -50
- package/dist/textinput-9lHjs4ce.js +0 -150
- package/dist/textinput-BNsLd26i.cjs +0 -70
- package/dist/utils-DznhwRXm.js +0 -8
- package/dist/utils-byXsEz1u.cjs +0 -1
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("./element-gR_VtSiD.cjs"),h=require("./if-defined-BOW3ODSj.cjs"),c=require("./state-Dg-53wQ8.cjs"),p=require("./ref-CL-Xk9Xm.cjs"),$=require("./class-map-CsENJXf1.cjs"),a=require("./directive-C7oCP5Bh.cjs"),d=require("./directive-helpers-BP2WOx60.cjs"),g=require("./input-element-DdVhUvva.cjs"),x=require("./element-with-slot-ZX-up7jO.cjs");require("./input-wrapper-B0MkQ0IZ.cjs");require("./icon-Bqj9oBbl.cjs");/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const T=a.e(class extends a.i{constructor(r){if(super(r),r.type!==a.t.PROPERTY&&r.type!==a.t.ATTRIBUTE&&r.type!==a.t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!d.r(r))throw Error("`live` bindings can only contain a single expression")}render(r){return r}update(r,[e]){if(e===s.E||e===s.A)return e;const i=r.element,t=r.name;if(r.type===a.t.PROPERTY){if(e===i[t])return s.E}else if(r.type===a.t.BOOLEAN_ATTRIBUTE){if(!!e===i.hasAttribute(t))return s.E}else if(r.type===a.t.ATTRIBUTE&&i.getAttribute(t)===e+"")return s.E;return d.p(r),e}});var v=Object.defineProperty,f=Object.getOwnPropertyDescriptor,o=(r,e,i,t)=>{for(var n=t>1?void 0:t?f(e,i):e,u=r.length-1,l;u>=0;u--)(l=r[u])&&(n=(t?l(e,i,n):l(n))||n);return t&&n&&v(e,i,n),n};exports.PktTextarea=class extends g.PktInputElement{constructor(){super(...arguments),this.inputRef=p.e(),this.value="",this.autocomplete="off",this.rows=null,this.counterCurrent=0}attributeChangedCallback(e,i,t){e==="value"&&this.value!==i&&(this.counterCurrent=t?t.length:0,this.valueChanged(t,i)),super.attributeChangedCallback(e,i,t)}updated(e){var i;super.updated(e),e.has("value")&&(this.counterCurrent=((i=this.value)==null?void 0:i.length)||0,this.valueChanged(this.value,e.get("value"))),e.has("id")&&!this.name&&this.id&&(this.name=this.id)}render(){const e=$.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}),i=this.ariaLabelledby||`${this.id}-input-label`;return s.b`<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
|
-
.tagText=${this.tagText}
|
|
26
|
-
class="pkt-textarea"
|
|
27
|
-
>
|
|
28
|
-
<div class="pkt-contents" slot="helptext">${x.slotContent(this,"helptext")}</div>
|
|
29
|
-
<textarea
|
|
30
|
-
${p.n(this.inputRef)}
|
|
31
|
-
class=${e}
|
|
32
|
-
id=${this.id+"-input"}
|
|
33
|
-
name=${(this.name||this.id)+"-input"}
|
|
34
|
-
placeholder=${h.o(this.placeholder)}
|
|
35
|
-
.value=${T(this.value)}
|
|
36
|
-
minlength=${h.o(this.minlength)}
|
|
37
|
-
maxlength=${h.o(this.maxlength)}
|
|
38
|
-
?readonly=${this.readonly}
|
|
39
|
-
autocomplete=${this.autocomplete}
|
|
40
|
-
aria-labelledby=${i}
|
|
41
|
-
aria-invalid=${this.hasError}
|
|
42
|
-
aria-errormessage=${`${this.id}-error`}
|
|
43
|
-
rows=${this.rows}
|
|
44
|
-
?disabled=${this.disabled}
|
|
45
|
-
@input=${t=>{this.value=t.target.value,this.onInput(),t.stopImmediatePropagation()}}
|
|
46
|
-
@change=${t=>{t.stopImmediatePropagation()}}
|
|
47
|
-
@focus=${t=>{this.onFocus(),t.stopImmediatePropagation()}}
|
|
48
|
-
@blur=${t=>{this.value=t.target.value,this.onBlur(),t.stopImmediatePropagation()}}
|
|
49
|
-
></textarea>
|
|
50
|
-
</pkt-input-wrapper>`}};o([s.n({type:String,reflect:!0})],exports.PktTextarea.prototype,"value",2);o([s.n({type:String})],exports.PktTextarea.prototype,"autocomplete",2);o([s.n({type:Number})],exports.PktTextarea.prototype,"rows",2);o([c.r()],exports.PktTextarea.prototype,"counterCurrent",2);exports.PktTextarea=o([s.t("pkt-textarea")],exports.PktTextarea);
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import { A as p, b as h, n as a, t as d } from "./element-CPpT3rFQ.js";
|
|
2
|
-
import { o as l } from "./if-defined-B0krMLad.js";
|
|
3
|
-
import { r as m } from "./state-C_1EOo3D.js";
|
|
4
|
-
import { e as $, n as f } from "./ref-Bg_Swj5w.js";
|
|
5
|
-
import { e as g } from "./class-map-CEnykyO_.js";
|
|
6
|
-
import { P as x } from "./input-element-8nLwuQS4.js";
|
|
7
|
-
import { s as v } from "./element-with-slot-Dqk6-TRR.js";
|
|
8
|
-
import "./input-wrapper-B2JpK016.js";
|
|
9
|
-
import "./icon-BlKA8YuW.js";
|
|
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, u = i.length - 1, c; u >= 0; u--)
|
|
12
|
-
(c = i[u]) && (n = (t ? c(e, r, n) : c(n)) || n);
|
|
13
|
-
return t && n && y(e, r, n), n;
|
|
14
|
-
};
|
|
15
|
-
let s = class extends x {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments), this.inputRef = $(), 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;
|
|
18
|
-
}
|
|
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
|
-
}
|
|
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
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
const i = this.type === "search" && !this.iconNameRight && !this.omitSearchIcon, e = g({
|
|
28
|
-
"pkt-input": !0,
|
|
29
|
-
"pkt-input--fullwidth": this.fullwidth,
|
|
30
|
-
"pkt-input--counter-error": this.counter && this.counterMaxLength && this.value.length && this.value.length > this.counterMaxLength
|
|
31
|
-
}), r = this.ariaLabelledby || `${this.id}-input-label`;
|
|
32
|
-
return h`
|
|
33
|
-
<pkt-input-wrapper
|
|
34
|
-
label="${this.label}"
|
|
35
|
-
?counter=${this.counter}
|
|
36
|
-
?disabled=${this.disabled}
|
|
37
|
-
?hasError=${this.hasError}
|
|
38
|
-
?hasFieldset=${this.hasFieldset}
|
|
39
|
-
?inline=${this.inline}
|
|
40
|
-
?optionalTag=${this.optionalTag}
|
|
41
|
-
?required=${this.required}
|
|
42
|
-
?requiredTag=${this.requiredTag}
|
|
43
|
-
useWrapper=${this.useWrapper}
|
|
44
|
-
.ariaDescribedBy=${this.ariaDescribedBy}
|
|
45
|
-
.counterCurrent=${this.counterCurrent}
|
|
46
|
-
.counterMaxLength=${this.counterMaxLength}
|
|
47
|
-
.errorMessage=${this.errorMessage}
|
|
48
|
-
.forId="${this.id + "-input"}"
|
|
49
|
-
.helptext=${this.helptext}
|
|
50
|
-
.helptextDropdown=${this.helptextDropdown}
|
|
51
|
-
.helptextDropdownButton=${this.helptextDropdownButton}
|
|
52
|
-
.optionalText=${this.optionalText}
|
|
53
|
-
.requiredText=${this.requiredText}
|
|
54
|
-
.tagText=${this.tagText}
|
|
55
|
-
class="pkt-textinput"
|
|
56
|
-
>
|
|
57
|
-
<div class="pkt-contents" slot="helptext">${v(this, "helptext")}</div>
|
|
58
|
-
<div class="pkt-input__container">
|
|
59
|
-
${this.prefix ? h`<div class="pkt-input-prefix">${this.prefix}</div>` : p}
|
|
60
|
-
<input
|
|
61
|
-
${f(this.inputRef)}
|
|
62
|
-
class=${e}
|
|
63
|
-
type=${this.type}
|
|
64
|
-
name=${(this.name || this.id) + "-input"}
|
|
65
|
-
id=${this.id + "-input"}
|
|
66
|
-
placeholder=${l(this.placeholder)}
|
|
67
|
-
aria-labelledby=${r}
|
|
68
|
-
autocomplete=${this.autocomplete || "off"}
|
|
69
|
-
minlength=${l(this.minlength || void 0)}
|
|
70
|
-
maxlength=${l(this.maxlength || void 0)}
|
|
71
|
-
min=${l(this.min || void 0)}
|
|
72
|
-
max=${l(this.max || void 0)}
|
|
73
|
-
step=${l(this.step || void 0)}
|
|
74
|
-
?readonly=${this.readonly}
|
|
75
|
-
size=${this.size || p}
|
|
76
|
-
.value=${this.value}
|
|
77
|
-
?disabled=${this.disabled}
|
|
78
|
-
aria-invalid=${this.hasError}
|
|
79
|
-
aria-errormessage=${`${this.id}-error`}
|
|
80
|
-
@input=${(t) => {
|
|
81
|
-
this.value = t.target.value, this.onInput(), t.stopImmediatePropagation();
|
|
82
|
-
}}
|
|
83
|
-
@change=${(t) => {
|
|
84
|
-
t.stopImmediatePropagation();
|
|
85
|
-
}}
|
|
86
|
-
@focus=${(t) => {
|
|
87
|
-
this.onFocus(), t.stopImmediatePropagation();
|
|
88
|
-
}}
|
|
89
|
-
@blur=${(t) => {
|
|
90
|
-
this.value = t.target.value, this.onBlur(), t.stopImmediatePropagation();
|
|
91
|
-
}}
|
|
92
|
-
@keydown=${(t) => {
|
|
93
|
-
var n;
|
|
94
|
-
if (t.key === "Enter") {
|
|
95
|
-
const u = this.internals.form;
|
|
96
|
-
u ? u.requestSubmit() : (n = this.inputRef.value) == null || n.blur();
|
|
97
|
-
}
|
|
98
|
-
}}
|
|
99
|
-
/>
|
|
100
|
-
${this.suffix ? h`<div class="pkt-input-suffix">
|
|
101
|
-
${this.suffix}
|
|
102
|
-
${this.iconNameRight ? h`<pkt-icon
|
|
103
|
-
class="pkt-input-suffix-icon"
|
|
104
|
-
name=${this.iconNameRight}
|
|
105
|
-
></pkt-icon>` : p}
|
|
106
|
-
${i ? h`<pkt-icon
|
|
107
|
-
class="pkt-input-suffix-icon"
|
|
108
|
-
name="magnifying-glass-big"
|
|
109
|
-
></pkt-icon>` : p}
|
|
110
|
-
</div>` : p}
|
|
111
|
-
${!this.suffix && this.iconNameRight ? h`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>` : p}
|
|
112
|
-
${!this.suffix && i ? h`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>` : p}
|
|
113
|
-
</div>
|
|
114
|
-
</pkt-input-wrapper>
|
|
115
|
-
`;
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
o([
|
|
119
|
-
a({ type: String, reflect: !0 })
|
|
120
|
-
], s.prototype, "value", 2);
|
|
121
|
-
o([
|
|
122
|
-
a({ type: String })
|
|
123
|
-
], s.prototype, "type", 2);
|
|
124
|
-
o([
|
|
125
|
-
a({ type: Number })
|
|
126
|
-
], s.prototype, "size", 2);
|
|
127
|
-
o([
|
|
128
|
-
a({ type: String })
|
|
129
|
-
], s.prototype, "autocomplete", 2);
|
|
130
|
-
o([
|
|
131
|
-
a({ type: String })
|
|
132
|
-
], s.prototype, "iconNameRight", 2);
|
|
133
|
-
o([
|
|
134
|
-
a({ type: String })
|
|
135
|
-
], s.prototype, "prefix", 2);
|
|
136
|
-
o([
|
|
137
|
-
a({ type: String })
|
|
138
|
-
], s.prototype, "suffix", 2);
|
|
139
|
-
o([
|
|
140
|
-
a({ type: Boolean })
|
|
141
|
-
], s.prototype, "omitSearchIcon", 2);
|
|
142
|
-
o([
|
|
143
|
-
m()
|
|
144
|
-
], s.prototype, "counterCurrent", 2);
|
|
145
|
-
s = o([
|
|
146
|
-
d("pkt-textinput")
|
|
147
|
-
], s);
|
|
148
|
-
export {
|
|
149
|
-
s as P
|
|
150
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";const t=require("./element-gR_VtSiD.cjs"),p=require("./if-defined-BOW3ODSj.cjs"),l=require("./state-Dg-53wQ8.cjs"),h=require("./ref-CL-Xk9Xm.cjs"),c=require("./class-map-CsENJXf1.cjs"),d=require("./input-element-DdVhUvva.cjs"),$=require("./element-with-slot-ZX-up7jO.cjs");require("./input-wrapper-B0MkQ0IZ.cjs");require("./icon-Bqj9oBbl.cjs");var x=Object.defineProperty,g=Object.getOwnPropertyDescriptor,r=(u,i,s,n)=>{for(var e=n>1?void 0:n?g(i,s):i,o=u.length-1,a;o>=0;o--)(a=u[o])&&(e=(n?a(i,s,e):a(e))||e);return n&&e&&x(i,s,e),e};exports.PktTextinput=class extends d.PktInputElement{constructor(){super(...arguments),this.inputRef=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}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.b`
|
|
2
|
-
<pkt-input-wrapper
|
|
3
|
-
label="${this.label}"
|
|
4
|
-
?counter=${this.counter}
|
|
5
|
-
?disabled=${this.disabled}
|
|
6
|
-
?hasError=${this.hasError}
|
|
7
|
-
?hasFieldset=${this.hasFieldset}
|
|
8
|
-
?inline=${this.inline}
|
|
9
|
-
?optionalTag=${this.optionalTag}
|
|
10
|
-
?required=${this.required}
|
|
11
|
-
?requiredTag=${this.requiredTag}
|
|
12
|
-
useWrapper=${this.useWrapper}
|
|
13
|
-
.ariaDescribedBy=${this.ariaDescribedBy}
|
|
14
|
-
.counterCurrent=${this.counterCurrent}
|
|
15
|
-
.counterMaxLength=${this.counterMaxLength}
|
|
16
|
-
.errorMessage=${this.errorMessage}
|
|
17
|
-
.forId="${this.id+"-input"}"
|
|
18
|
-
.helptext=${this.helptext}
|
|
19
|
-
.helptextDropdown=${this.helptextDropdown}
|
|
20
|
-
.helptextDropdownButton=${this.helptextDropdownButton}
|
|
21
|
-
.optionalText=${this.optionalText}
|
|
22
|
-
.requiredText=${this.requiredText}
|
|
23
|
-
.tagText=${this.tagText}
|
|
24
|
-
class="pkt-textinput"
|
|
25
|
-
>
|
|
26
|
-
<div class="pkt-contents" slot="helptext">${$.slotContent(this,"helptext")}</div>
|
|
27
|
-
<div class="pkt-input__container">
|
|
28
|
-
${this.prefix?t.b`<div class="pkt-input-prefix">${this.prefix}</div>`:t.A}
|
|
29
|
-
<input
|
|
30
|
-
${h.n(this.inputRef)}
|
|
31
|
-
class=${s}
|
|
32
|
-
type=${this.type}
|
|
33
|
-
name=${(this.name||this.id)+"-input"}
|
|
34
|
-
id=${this.id+"-input"}
|
|
35
|
-
placeholder=${p.o(this.placeholder)}
|
|
36
|
-
aria-labelledby=${n}
|
|
37
|
-
autocomplete=${this.autocomplete||"off"}
|
|
38
|
-
minlength=${p.o(this.minlength||void 0)}
|
|
39
|
-
maxlength=${p.o(this.maxlength||void 0)}
|
|
40
|
-
min=${p.o(this.min||void 0)}
|
|
41
|
-
max=${p.o(this.max||void 0)}
|
|
42
|
-
step=${p.o(this.step||void 0)}
|
|
43
|
-
?readonly=${this.readonly}
|
|
44
|
-
size=${this.size||t.A}
|
|
45
|
-
.value=${this.value}
|
|
46
|
-
?disabled=${this.disabled}
|
|
47
|
-
aria-invalid=${this.hasError}
|
|
48
|
-
aria-errormessage=${`${this.id}-error`}
|
|
49
|
-
@input=${e=>{this.value=e.target.value,this.onInput(),e.stopImmediatePropagation()}}
|
|
50
|
-
@change=${e=>{e.stopImmediatePropagation()}}
|
|
51
|
-
@focus=${e=>{this.onFocus(),e.stopImmediatePropagation()}}
|
|
52
|
-
@blur=${e=>{this.value=e.target.value,this.onBlur(),e.stopImmediatePropagation()}}
|
|
53
|
-
@keydown=${e=>{var o;if(e.key==="Enter"){const a=this.internals.form;a?a.requestSubmit():(o=this.inputRef.value)==null||o.blur()}}}
|
|
54
|
-
/>
|
|
55
|
-
${this.suffix?t.b`<div class="pkt-input-suffix">
|
|
56
|
-
${this.suffix}
|
|
57
|
-
${this.iconNameRight?t.b`<pkt-icon
|
|
58
|
-
class="pkt-input-suffix-icon"
|
|
59
|
-
name=${this.iconNameRight}
|
|
60
|
-
></pkt-icon>`:t.A}
|
|
61
|
-
${i?t.b`<pkt-icon
|
|
62
|
-
class="pkt-input-suffix-icon"
|
|
63
|
-
name="magnifying-glass-big"
|
|
64
|
-
></pkt-icon>`:t.A}
|
|
65
|
-
</div>`:t.A}
|
|
66
|
-
${!this.suffix&&this.iconNameRight?t.b`<pkt-icon class="pkt-input-icon" name=${this.iconNameRight}></pkt-icon>`:t.A}
|
|
67
|
-
${!this.suffix&&i?t.b`<pkt-icon class="pkt-input-icon" name="magnifying-glass-big"></pkt-icon>`:t.A}
|
|
68
|
-
</div>
|
|
69
|
-
</pkt-input-wrapper>
|
|
70
|
-
`}};r([t.n({type:String,reflect:!0})],exports.PktTextinput.prototype,"value",2);r([t.n({type:String})],exports.PktTextinput.prototype,"type",2);r([t.n({type:Number})],exports.PktTextinput.prototype,"size",2);r([t.n({type:String})],exports.PktTextinput.prototype,"autocomplete",2);r([t.n({type:String})],exports.PktTextinput.prototype,"iconNameRight",2);r([t.n({type:String})],exports.PktTextinput.prototype,"prefix",2);r([t.n({type:String})],exports.PktTextinput.prototype,"suffix",2);r([t.n({type:Boolean})],exports.PktTextinput.prototype,"omitSearchIcon",2);r([l.r()],exports.PktTextinput.prototype,"counterCurrent",2);exports.PktTextinput=r([t.t("pkt-textinput")],exports.PktTextinput);
|
package/dist/utils-DznhwRXm.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const t = () => ("00000000000000000" + (Math.random() * 18446744073709552e3).toString(16)).slice(-16), c = (e) => new Promise((s) => setTimeout(s, e)), i = () => {
|
|
2
|
-
const e = t(), s = t();
|
|
3
|
-
return e.slice(0, 8) + "-" + e.slice(8, 12) + "-4" + e.slice(13) + "-a" + s.slice(1, 4) + "-" + s.slice(4);
|
|
4
|
-
};
|
|
5
|
-
export {
|
|
6
|
-
c as s,
|
|
7
|
-
i as u
|
|
8
|
-
};
|
package/dist/utils-byXsEz1u.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const i=()=>("00000000000000000"+(Math.random()*18446744073709552e3).toString(16)).slice(-16),t=e=>new Promise(s=>setTimeout(s,e)),c=()=>{const e=i(),s=i();return e.slice(0,8)+"-"+e.slice(8,12)+"-4"+e.slice(13)+"-a"+s.slice(1,4)+"-"+s.slice(4)};exports.sleep=t;exports.uuidish=c;
|