@oslokommune/punkt-elements 14.5.4 → 15.0.1

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.
Files changed (123) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/{accordionitem-DB3tAjIZ.js → accordionitem-BbeS44TD.js} +1 -1
  3. package/dist/{accordionitem-DHYmPA-o.cjs → accordionitem-DUWhTUEI.cjs} +1 -1
  4. package/dist/{alert-DVCenNTM.cjs → alert-B9flMht5.cjs} +1 -1
  5. package/dist/{alert-Cc5FtxHN.js → alert-BpFxQviu.js} +2 -2
  6. package/dist/{button-Ju4zPhVx.cjs → button-BgCKV0zW.cjs} +1 -1
  7. package/dist/{button-DrTXtc-n.js → button-CKgpX5QA.js} +1 -1
  8. package/dist/{calendar-CTx8PD1L.js → calendar-BMarIeVp.js} +332 -325
  9. package/dist/calendar-C6xgAJ7Z.cjs +90 -0
  10. package/dist/{card-DvHL7pNu.cjs → card-DI3KodEc.cjs} +1 -1
  11. package/dist/{card-CTtmPB2n.js → card-h8ekgJRr.js} +2 -2
  12. package/dist/{checkbox-B-0FOdwi.cjs → checkbox-B2t7wfxe.cjs} +1 -1
  13. package/dist/{checkbox-CkAwPK_E.js → checkbox-BJ9pz3kV.js} +1 -1
  14. package/dist/{combobox-DNPfpTjW.js → combobox-BjAvk8Y-.js} +5 -5
  15. package/dist/{combobox-DvL3SKz2.cjs → combobox-HNN7GTzh.cjs} +1 -1
  16. package/dist/{consent-DJW7YEat.cjs → consent-C37tuFwZ.cjs} +1 -1
  17. package/dist/{consent-OdhmtIK-.js → consent-DAk2BJ7I.js} +1 -1
  18. package/dist/datepicker-2bneToiA.cjs +275 -0
  19. package/dist/datepicker-DvcH2QD9.js +1160 -0
  20. package/dist/{helptext-7fyVJK2C.cjs → helptext-BG1P_9j0.cjs} +1 -1
  21. package/dist/{helptext-CfR0SYe9.js → helptext-Cm6FLBVf.js} +1 -1
  22. package/dist/index.d.ts +10 -42
  23. package/dist/input-element-BBv4xjPb.cjs +1 -0
  24. package/dist/{input-element-DVZhYDJ_.js → input-element-CbjYtVou.js} +143 -147
  25. package/dist/{input-wrapper-DVUh5rxv.js → input-wrapper-Bwmva-69.js} +3 -3
  26. package/dist/{input-wrapper-Bta4FZe3.cjs → input-wrapper-CJqmwe3I.cjs} +1 -1
  27. package/dist/{link-40XAFlYS.js → link-BKnT-97D.js} +1 -1
  28. package/dist/{link-CBQ7uKqb.cjs → link-DRPFqqEn.cjs} +1 -1
  29. package/dist/{linkcard-D8hxLedl.cjs → linkcard-02fxYQ2g.cjs} +1 -1
  30. package/dist/{linkcard-Opb42K2k.js → linkcard-C2UENcqo.js} +1 -1
  31. package/dist/{loader-Bv1R6-AA.js → loader-BW-AWQiE.js} +1 -1
  32. package/dist/{loader-Dh_5sihO.cjs → loader-Cj4kUNRE.cjs} +1 -1
  33. package/dist/{messagebox-B9MCodIz.cjs → messagebox-CK0sSRep.cjs} +1 -1
  34. package/dist/{messagebox-DEXCTOrz.js → messagebox-DB8tEXrV.js} +1 -1
  35. package/dist/{modal-Bw61rVrQ.cjs → modal-BzVQSQy2.cjs} +1 -1
  36. package/dist/{modal-B4adxB6X.js → modal-ClYfWW2a.js} +1 -1
  37. package/dist/pkt-accordion.cjs +1 -1
  38. package/dist/pkt-accordion.js +2 -2
  39. package/dist/pkt-alert.cjs +1 -1
  40. package/dist/pkt-alert.js +1 -1
  41. package/dist/pkt-button.cjs +1 -1
  42. package/dist/pkt-button.js +1 -1
  43. package/dist/pkt-calendar.cjs +1 -1
  44. package/dist/pkt-calendar.js +1 -1
  45. package/dist/pkt-card.cjs +1 -1
  46. package/dist/pkt-card.js +1 -1
  47. package/dist/pkt-checkbox.cjs +1 -1
  48. package/dist/pkt-checkbox.js +1 -1
  49. package/dist/pkt-combobox.cjs +1 -1
  50. package/dist/pkt-combobox.js +1 -1
  51. package/dist/pkt-consent.cjs +1 -1
  52. package/dist/pkt-consent.js +1 -1
  53. package/dist/pkt-datepicker.cjs +1 -1
  54. package/dist/pkt-datepicker.js +2 -2
  55. package/dist/pkt-header.cjs +1 -1
  56. package/dist/pkt-header.js +4 -4
  57. package/dist/pkt-helptext.cjs +1 -1
  58. package/dist/pkt-helptext.js +1 -1
  59. package/dist/pkt-index.cjs +1 -1
  60. package/dist/pkt-index.js +22 -22
  61. package/dist/pkt-input-wrapper.cjs +1 -1
  62. package/dist/pkt-input-wrapper.js +1 -1
  63. package/dist/pkt-link.cjs +1 -1
  64. package/dist/pkt-link.js +1 -1
  65. package/dist/pkt-linkcard.cjs +1 -1
  66. package/dist/pkt-linkcard.js +1 -1
  67. package/dist/pkt-loader.cjs +1 -1
  68. package/dist/pkt-loader.js +1 -1
  69. package/dist/pkt-messagebox.cjs +1 -1
  70. package/dist/pkt-messagebox.js +1 -1
  71. package/dist/pkt-modal.cjs +1 -1
  72. package/dist/pkt-modal.js +1 -1
  73. package/dist/{pkt-options-controller-zn5cmMvL.js → pkt-options-controller-BcGywCmf.js} +1 -1
  74. package/dist/{pkt-options-controller-DjBCEHU4.cjs → pkt-options-controller-BnTmkl3g.cjs} +1 -1
  75. package/dist/pkt-radiobutton.cjs +1 -1
  76. package/dist/pkt-radiobutton.js +1 -1
  77. package/dist/pkt-select.cjs +1 -1
  78. package/dist/pkt-select.js +1 -1
  79. package/dist/pkt-slot-controller-D4nKlom5.cjs +1 -0
  80. package/dist/{pkt-slot-controller-BPGj-LC5.js → pkt-slot-controller-D7CrjM52.js} +27 -25
  81. package/dist/pkt-tabs.cjs +1 -1
  82. package/dist/pkt-tabs.js +2 -2
  83. package/dist/pkt-tag.cjs +1 -1
  84. package/dist/pkt-tag.js +1 -1
  85. package/dist/pkt-textarea.cjs +1 -1
  86. package/dist/pkt-textarea.js +1 -1
  87. package/dist/pkt-textinput.cjs +1 -1
  88. package/dist/pkt-textinput.js +1 -1
  89. package/dist/{radiobutton-oA20HijB.js → radiobutton-CvKKNFMd.js} +1 -1
  90. package/dist/{radiobutton-iHuLnuAn.cjs → radiobutton-DWoYQn8H.cjs} +1 -1
  91. package/dist/{select--wvwpJ0_.cjs → select-BQUp88lY.cjs} +1 -1
  92. package/dist/{select-DfsNb_Yi.js → select-CFkxir_l.js} +4 -4
  93. package/dist/{tabitem-CypTmORF.js → tabitem-C8-tZyc_.js} +1 -1
  94. package/dist/{tabitem-CtltSqDK.cjs → tabitem-DaYfUaxw.cjs} +1 -1
  95. package/dist/{tag-Cw3OQqLW.js → tag-DIJMJhyp.js} +1 -1
  96. package/dist/{tag-P9lfQZbM.cjs → tag-h0vD2Na0.cjs} +1 -1
  97. package/dist/{textarea-CM_bj81t.js → textarea-CMuiBUee.js} +3 -3
  98. package/dist/{textarea-DcEKhXia.cjs → textarea-DcCOfNlr.cjs} +1 -1
  99. package/dist/{textinput-AVll6Nh7.js → textinput-D30TCADP.js} +3 -3
  100. package/dist/{textinput-BzuYzKZ6.cjs → textinput-DR3aaHTH.cjs} +1 -1
  101. package/package.json +4 -4
  102. package/src/components/calendar/calendar.core.test.ts +1 -1
  103. package/src/components/calendar/calendar.selection.test.ts +1 -1
  104. package/src/components/calendar/calendar.ts +32 -22
  105. package/src/components/datepicker/datepicker-popup.test.ts +1 -1
  106. package/src/components/datepicker/datepicker-popup.ts +73 -30
  107. package/src/components/datepicker/datepicker-range.ts +5 -1
  108. package/src/components/datepicker/datepicker-types.ts +4 -54
  109. package/src/components/datepicker/datepicker-utils.ts +38 -517
  110. package/src/components/datepicker/datepicker.core.test.ts +12 -10
  111. package/src/components/datepicker/datepicker.selection.test.ts +8 -6
  112. package/src/components/datepicker/datepicker.ts +26 -7
  113. package/src/components/icon/icon.test.ts +8 -8
  114. package/dist/calendar-5Obd0ZT3.cjs +0 -90
  115. package/dist/datepicker-CTCaZuZU.cjs +0 -271
  116. package/dist/datepicker-t0W9fA1e.js +0 -1444
  117. package/dist/input-element-RBQVA8i0.cjs +0 -1
  118. package/dist/pkt-slot-controller-BzddBp7z.cjs +0 -1
  119. package/src/components/calendar/helpers/calendar-grid.ts +0 -93
  120. package/src/components/calendar/helpers/date-validation.ts +0 -86
  121. package/src/components/calendar/helpers/index.ts +0 -49
  122. package/src/components/calendar/helpers/keyboard-navigation.ts +0 -54
  123. package/src/components/calendar/helpers/selection-manager.ts +0 -184
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-aUzIoa1s.cjs"),x=require("./ref-C5iJMIE1.cjs"),h=require("./icon-n4-ve48P.cjs"),u=require("./class-map-CApIYSRo.cjs"),a=require("./state-GDzxl12x.cjs"),c=require("./utils-byXsEz1u.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs"),k=require("./pkt-slot-controller-BzddBp7z.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,l=(o,p,r,n)=>{for(var e=n>1?void 0:n?_(p,r):p,s=o.length-1,i;s>=0;s--)(i=o[s])&&(e=(n?i(p,r,e):i(e))||e);return n&&e&&w(p,r,e),e};exports.PktHelptext=class extends t.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=c.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.filledSlots=new Set,this.slotController=new k.PktSlotController(this,this.defaultSlot)}updateSlots(p){this.filledSlots=new Set(p)}render(){const p=()=>{const s=!this.isHelpTextOpen;this.isHelpTextOpen=s,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:s}}))},r=u.e({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.filledSlots.size>0}),n=()=>this.helptextDropdown?t.x`<div class="pkt-inputwrapper__helptext-expandable">
1
+ "use strict";const t=require("./element-aUzIoa1s.cjs"),x=require("./ref-C5iJMIE1.cjs"),h=require("./icon-n4-ve48P.cjs"),u=require("./class-map-CApIYSRo.cjs"),a=require("./state-GDzxl12x.cjs"),c=require("./utils-byXsEz1u.cjs"),d=require("./input-wrapper-EoSAbU-U.cjs"),k=require("./pkt-slot-controller-D4nKlom5.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,l=(o,p,r,n)=>{for(var e=n>1?void 0:n?_(p,r):p,s=o.length-1,i;s>=0;s--)(i=o[s])&&(e=(n?i(p,r,e):i(e))||e);return n&&e&&w(p,r,e),e};exports.PktHelptext=class extends t.PktElement{constructor(){super(),this.defaultSlot=x.e(),this.forId=c.uuidish(),this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=d.specs.props.helptextDropdownButton.default,this.isHelpTextOpen=!1,this.filledSlots=new Set,this.slotController=new k.PktSlotController(this,this.defaultSlot)}updateSlots(p){this.filledSlots=new Set(p)}render(){const p=()=>{const s=!this.isHelpTextOpen;this.isHelpTextOpen=s,this.dispatchEvent(new CustomEvent("toggleHelpText",{bubbles:!0,detail:{isOpen:s}}))},r=u.e({"pkt-inputwrapper__helptext-container":!0,"pkt-inputwrapper__has-helptext":this.helptext||this.helptextDropdown||this.filledSlots.size>0}),n=()=>this.helptextDropdown?t.x`<div class="pkt-inputwrapper__helptext-expandable">
2
2
  <button
3
3
  class="pkt-link pkt-link--icon-right pkt-btn pkt-btn--small pkt-btn--tertiary pkt-btn--icon-right"
4
4
  type="button"
@@ -5,7 +5,7 @@ import { e as d } from "./class-map-Dt2jXOlF.js";
5
5
  import { r as u } from "./state-DgnkjP0q.js";
6
6
  import { u as k } from "./utils-DznhwRXm.js";
7
7
  import { s as v } from "./input-wrapper-CDgenrYA.js";
8
- import { P as b } from "./pkt-slot-controller-BPGj-LC5.js";
8
+ import { P as b } from "./pkt-slot-controller-D7CrjM52.js";
9
9
  var S = Object.defineProperty, D = Object.getOwnPropertyDescriptor, p = (o, s, l, n) => {
10
10
  for (var t = n > 1 ? void 0 : n ? D(s, l) : s, i = o.length - 1, h; i >= 0; i--)
11
11
  (h = o[i]) && (t = (n ? h(s, l, t) : h(t)) || t);
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { Booleanish } from '../../../../../shared-types';
2
2
  import { Booleanish as Booleanish_2 } from '../../../../shared-types';
3
3
  import { IAriaAttributes } from '../../../../../shared-types';
4
+ import { IDatepickerStrings } from '../../../../../shared-types/datepicker';
4
5
  import { LitElement } from 'lit';
5
6
  import { nothing } from 'lit';
6
7
  import { PktIconName } from '@oslokommune/punkt-assets/dist/icons/icon';
@@ -36,47 +37,6 @@ import { UserMenuItem } from '../../../../../shared-types';
36
37
  */
37
38
  declare type ElementProps<Element, PropKeys extends keyof Element> = Partial<Pick<Element, PropKeys>>;
38
39
 
39
- /**
40
- * Type definitions for the datepicker component family
41
- */
42
- /**
43
- * Internationalization strings for the datepicker components
44
- */
45
- declare interface IDatepickerStrings {
46
- /** Calendar-related strings */
47
- calendar?: {
48
- /** Alt text for calendar button */
49
- buttonAltText?: string;
50
- };
51
- /** Generic UI strings (used in range datepicker) */
52
- generic?: {
53
- /** Label for range start input */
54
- from?: string;
55
- /** Label for range end input */
56
- to?: string;
57
- };
58
- /** Form validation messages */
59
- forms?: {
60
- messages?: {
61
- /** Error message when date is before minimum */
62
- rangeUnderflow?: string;
63
- /** Error message when date is after maximum */
64
- rangeOverflow?: string;
65
- /** Error message for invalid date format */
66
- badInput?: string;
67
- /** Error message when required field is empty */
68
- valueMissing?: string;
69
- };
70
- };
71
- /** Date-related strings */
72
- dates?: {
73
- /** Month label */
74
- month?: string;
75
- /** Year label */
76
- year?: string;
77
- };
78
- }
79
-
80
40
  export declare interface IPktAccordion {
81
41
  compact?: boolean;
82
42
  skin?: TPktAccordionSkin;
@@ -502,6 +462,7 @@ export declare class PktCalendar extends PktElement {
502
462
  weeknumbers: boolean;
503
463
  withcontrols: boolean;
504
464
  currentmonth: Date | null;
465
+ today: string | null;
505
466
  dayStrings: string[];
506
467
  dayStringsLong: string[];
507
468
  monthStrings: string[];
@@ -511,6 +472,7 @@ export declare class PktCalendar extends PktElement {
511
472
  private _selected;
512
473
  private inRange;
513
474
  private rangeHovered;
475
+ private get todayDate();
514
476
  private year;
515
477
  private month;
516
478
  private week;
@@ -737,6 +699,7 @@ export declare class PktDatepicker extends PktInputElement<Props_4> {
737
699
  * Element attributes and properties
738
700
  */
739
701
  private _valueProperty;
702
+ private _valueProcessing;
740
703
  datepickerPopupRef: Ref<PktDatepickerPopup>;
741
704
  get value(): string;
742
705
  set value(newValue: string | string[]);
@@ -754,6 +717,7 @@ export declare class PktDatepicker extends PktInputElement<Props_4> {
754
717
  excludedates: string[];
755
718
  excludeweekdays: string[];
756
719
  currentmonth: string | null;
720
+ today: string | null;
757
721
  calendarOpen: boolean;
758
722
  timezone: string;
759
723
  inputClasses: {};
@@ -863,9 +827,12 @@ declare class PktDatepickerPopup extends PktElement {
863
827
  excludedates: string[];
864
828
  excludeweekdays: string[];
865
829
  currentmonth: string | null;
830
+ today: string | null;
831
+ private _hasBeenOpened;
866
832
  popupRef: Ref<HTMLElement>;
867
833
  calendarRef: Ref<HTMLElement>;
868
834
  firstUpdated(): void;
835
+ updated(changedProperties: PropertyValues): void;
869
836
  disconnectedCallback(): void;
870
837
  handleDocumentClick: (e: MouseEvent) => void;
871
838
  handleDocumentKeydown: (e: KeyboardEvent) => void;
@@ -881,6 +848,7 @@ declare class PktDatepickerPopup extends PktElement {
881
848
 
882
849
  declare class PktDatepickerRange extends PktDatepickerBase {
883
850
  value: string[];
851
+ label: string;
884
852
  showRangeLabels: boolean;
885
853
  strings: IDatepickerStrings;
886
854
  inputRefTo: Ref<HTMLInputElement>;
@@ -1626,10 +1594,10 @@ declare class PktSlotController implements ReactiveController {
1626
1594
  nodes: Element[];
1627
1595
  slots: Ref<HTMLElement>[];
1628
1596
  observer: MutationObserver;
1629
- contentObserver: MutationObserver;
1630
1597
  filledSlots: Set<string | null | undefined>;
1631
1598
  skipOptions: boolean;
1632
1599
  private updatingSlots;
1600
+ private needsSlotUpdate;
1633
1601
  constructor(host: LitElement & ReactiveControllerHost, ...slots: Ref<HTMLElement>[]);
1634
1602
  hostConnected(): void;
1635
1603
  hostDisconnected(): void;
@@ -0,0 +1 @@
1
+ "use strict";const r=require("./element-aUzIoa1s.cjs"),St=require("./utils-byXsEz1u.cjs"),Ft=require("./booleanish-BKVonob4.cjs"),Tt=require("./input-wrapper-EoSAbU-U.cjs");var lt={},ct;function xt(){return ct||(ct=1,(function(){(function(p){const a=new WeakMap,n=new WeakMap,f=new WeakMap,u=new WeakMap,b=new WeakMap,k=new WeakMap,A=new WeakMap,g=new WeakMap,C=new WeakMap,V=new WeakMap,S=new WeakMap,F=new WeakMap,z=new WeakMap,K=new WeakMap,x=new WeakMap,I={ariaAtomic:"aria-atomic",ariaAutoComplete:"aria-autocomplete",ariaBusy:"aria-busy",ariaChecked:"aria-checked",ariaColCount:"aria-colcount",ariaColIndex:"aria-colindex",ariaColIndexText:"aria-colindextext",ariaColSpan:"aria-colspan",ariaCurrent:"aria-current",ariaDescription:"aria-description",ariaDisabled:"aria-disabled",ariaExpanded:"aria-expanded",ariaHasPopup:"aria-haspopup",ariaHidden:"aria-hidden",ariaInvalid:"aria-invalid",ariaKeyShortcuts:"aria-keyshortcuts",ariaLabel:"aria-label",ariaLevel:"aria-level",ariaLive:"aria-live",ariaModal:"aria-modal",ariaMultiLine:"aria-multiline",ariaMultiSelectable:"aria-multiselectable",ariaOrientation:"aria-orientation",ariaPlaceholder:"aria-placeholder",ariaPosInSet:"aria-posinset",ariaPressed:"aria-pressed",ariaReadOnly:"aria-readonly",ariaRelevant:"aria-relevant",ariaRequired:"aria-required",ariaRoleDescription:"aria-roledescription",ariaRowCount:"aria-rowcount",ariaRowIndex:"aria-rowindex",ariaRowIndexText:"aria-rowindextext",ariaRowSpan:"aria-rowspan",ariaSelected:"aria-selected",ariaSetSize:"aria-setsize",ariaSort:"aria-sort",ariaValueMax:"aria-valuemax",ariaValueMin:"aria-valuemin",ariaValueNow:"aria-valuenow",ariaValueText:"aria-valuetext",role:"role"},ht=(e,t)=>{for(let i in I){t[i]=null;let s=null;const o=I[i];Object.defineProperty(t,i,{get(){return s},set(d){s=d,e.isConnected?M(e,o,d):V.set(e,t)}})}};function j(e){const t=u.get(e),{form:i}=t;Z(e,i,t),Y(e,t.labels)}const G=(e,t=!1)=>{const i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(d){return u.has(d)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let s=i.nextNode();const o=!t||e.disabled;for(;s;)s.formDisabledCallback&&o&&_(s,e.disabled),s=i.nextNode()},J={attributes:!0,attributeFilter:["disabled","name"]},R=O()?new MutationObserver(e=>{for(const t of e){const i=t.target;if(t.attributeName==="disabled"&&(i.constructor.formAssociated?_(i,i.hasAttribute("disabled")):i.localName==="fieldset"&&G(i)),t.attributeName==="name"&&i.constructor.formAssociated){const s=u.get(i),o=C.get(i);s.setFormValue(o)}}}):{};function P(e){e.forEach(t=>{const{addedNodes:i,removedNodes:s}=t,o=Array.from(i),d=Array.from(s);o.forEach(h=>{var y;if(u.has(h)&&h.constructor.formAssociated&&j(h),V.has(h)){const m=V.get(h);Object.keys(I).filter(v=>m[v]!==null).forEach(v=>{M(h,I[v],m[v])}),V.delete(h)}if(x.has(h)){const m=x.get(h);M(h,"internals-valid",m.validity.valid.toString()),M(h,"internals-invalid",(!m.validity.valid).toString()),M(h,"aria-invalid",(!m.validity.valid).toString()),x.delete(h)}if(h.localName==="form"){const m=g.get(h),E=document.createTreeWalker(h,NodeFilter.SHOW_ELEMENT,{acceptNode($){return u.has($)&&$.constructor.formAssociated&&!(m&&m.has($))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});let v=E.nextNode();for(;v;)j(v),v=E.nextNode()}h.localName==="fieldset"&&((y=R.observe)===null||y===void 0||y.call(R,h,J),G(h,!0))}),d.forEach(h=>{const y=u.get(h);y&&f.get(y)&&Q(y),A.has(h)&&A.get(h).disconnect()})})}function ut(e){e.forEach(t=>{const{removedNodes:i}=t;i.forEach(s=>{const o=z.get(t.target);u.has(s)&&et(s),o.disconnect()})})}const ft=e=>{var t,i;const s=new MutationObserver(ut);!((t=window==null?void 0:window.ShadyDOM)===null||t===void 0)&&t.inUse&&e.mode&&e.host&&(e=e.host),(i=s.observe)===null||i===void 0||i.call(s,e,{childList:!0}),z.set(e,s)};O()&&new MutationObserver(P);const B={childList:!0,subtree:!0},M=(e,t,i)=>{e.getAttribute(t)!==i&&e.setAttribute(t,i)},_=(e,t)=>{e.toggleAttribute("internals-disabled",t),t?M(e,"aria-disabled","true"):e.removeAttribute("aria-disabled"),e.formDisabledCallback&&e.formDisabledCallback.apply(e,[t])},Q=e=>{f.get(e).forEach(i=>{i.remove()}),f.set(e,[])},X=(e,t)=>{const i=document.createElement("input");return i.type="hidden",i.name=e.getAttribute("name"),e.after(i),f.get(t).push(i),i},pt=(e,t)=>{var i;f.set(t,[]),(i=R.observe)===null||i===void 0||i.call(R,e,J)},Y=(e,t)=>{if(t.length){Array.from(t).forEach(s=>s.addEventListener("click",e.click.bind(e)));let i=t[0].id;t[0].id||(i=`${t[0].htmlFor}_Label`,t[0].id=i),M(e,"aria-labelledby",i)}},L=e=>{const t=Array.from(e.elements).filter(d=>!d.tagName.includes("-")&&d.validity).map(d=>d.validity.valid),i=g.get(e)||[],s=Array.from(i).filter(d=>d.isConnected).map(d=>u.get(d).validity.valid),o=[...t,...s].includes(!1);e.toggleAttribute("internals-invalid",o),e.toggleAttribute("internals-valid",!o)},mt=e=>{L(N(e.target))},yt=e=>{L(N(e.target))},gt=e=>{const t=["button[type=submit]","input[type=submit]","button:not([type])"].map(i=>`${i}:not([disabled])`).map(i=>`${i}:not([form])${e.id?`,${i}[form='${e.id}']`:""}`).join(",");e.addEventListener("click",i=>{if(i.target.closest(t)){const o=g.get(e);if(e.noValidate)return;o.size&&Array.from(o).reverse().map(y=>u.get(y).reportValidity()).includes(!1)&&i.preventDefault()}})},vt=e=>{const t=g.get(e.target);t&&t.size&&t.forEach(i=>{i.constructor.formAssociated&&i.formResetCallback&&i.formResetCallback.apply(i)})},Z=(e,t,i)=>{if(t){const s=g.get(t);if(s)s.add(e);else{const o=new Set;o.add(e),g.set(t,o),gt(t),t.addEventListener("reset",vt),t.addEventListener("input",mt),t.addEventListener("change",yt)}k.set(t,{ref:e,internals:i}),e.constructor.formAssociated&&e.formAssociatedCallback&&setTimeout(()=>{e.formAssociatedCallback.apply(e,[t])},0),L(t)}},N=e=>{let t=e.parentNode;return t&&t.tagName!=="FORM"&&(t=N(t)),t},w=(e,t,i=DOMException)=>{if(!e.constructor.formAssociated)throw new i(t)},tt=(e,t,i)=>{const s=g.get(e);return s&&s.size&&s.forEach(o=>{u.get(o)[i]()||(t=!1)}),t},et=e=>{if(e.constructor.formAssociated){const t=u.get(e),{labels:i,form:s}=t;Y(e,i),Z(e,s,t)}};function O(){return typeof MutationObserver<"u"}class bt{constructor(){this.badInput=!1,this.customError=!1,this.patternMismatch=!1,this.rangeOverflow=!1,this.rangeUnderflow=!1,this.stepMismatch=!1,this.tooLong=!1,this.tooShort=!1,this.typeMismatch=!1,this.valid=!0,this.valueMissing=!1,Object.seal(this)}}const wt=e=>(e.badInput=!1,e.customError=!1,e.patternMismatch=!1,e.rangeOverflow=!1,e.rangeUnderflow=!1,e.stepMismatch=!1,e.tooLong=!1,e.tooShort=!1,e.typeMismatch=!1,e.valid=!0,e.valueMissing=!1,e),Et=(e,t,i)=>(e.valid=Mt(t),Object.keys(t).forEach(s=>e[s]=t[s]),i&&L(i),e),Mt=e=>{let t=!0;for(let i in e)i!=="valid"&&e[i]!==!1&&(t=!1);return t},H=new WeakMap;function it(e,t){e.toggleAttribute(t,!0),e.part&&e.part.add(t)}class W extends Set{static get isPolyfilled(){return!0}constructor(t){if(super(),!t||!t.tagName||t.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");H.set(this,t)}add(t){if(!/^--/.test(t)||typeof t!="string")throw new DOMException(`Failed to execute 'add' on 'CustomStateSet': The specified value ${t} must start with '--'.`);const i=super.add(t),s=H.get(this),o=`state${t}`;return s.isConnected?it(s,o):setTimeout(()=>{it(s,o)}),i}clear(){for(let[t]of this.entries())this.delete(t);super.clear()}delete(t){const i=super.delete(t),s=H.get(this);return s.isConnected?(s.toggleAttribute(`state${t}`,!1),s.part&&s.part.remove(`state${t}`)):setTimeout(()=>{s.toggleAttribute(`state${t}`,!1),s.part&&s.part.remove(`state${t}`)}),i}}function at(e,t,i,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?s:i==="a"?s.call(e):s?s.value:t.get(e)}function kt(e,t,i,s,o){if(typeof t=="function"?e!==t||!0:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,i),i}var T;class Vt{constructor(t){T.set(this,void 0),kt(this,T,t);for(let i=0;i<t.length;i++){let s=t[i];this[i]=s,s.hasAttribute("name")&&(this[s.getAttribute("name")]=s)}Object.freeze(this)}get length(){return at(this,T,"f").length}[(T=new WeakMap,Symbol.iterator)](){return at(this,T,"f")[Symbol.iterator]()}item(t){return this[t]==null?null:this[t]}namedItem(t){return this[t]==null?null:this[t]}}function At(){const e=HTMLFormElement.prototype.checkValidity;HTMLFormElement.prototype.checkValidity=i;const t=HTMLFormElement.prototype.reportValidity;HTMLFormElement.prototype.reportValidity=s;function i(...d){let h=e.apply(this,d);return tt(this,h,"checkValidity")}function s(...d){let h=t.apply(this,d);return tt(this,h,"reportValidity")}const{get:o}=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get(...d){const h=o.call(this,...d),y=Array.from(g.get(this)||[]);if(y.length===0)return h;const m=Array.from(h).concat(y).sort((E,v)=>E.compareDocumentPosition?E.compareDocumentPosition(v)&2?1:-1:0);return new Vt(m)}})}class st{static get isPolyfilled(){return!0}constructor(t){if(!t||!t.tagName||t.tagName.indexOf("-")===-1)throw new TypeError("Illegal constructor");const i=t.getRootNode(),s=new bt;this.states=new W(t),a.set(this,t),n.set(this,s),u.set(t,this),ht(t,this),pt(t,this),Object.seal(this),i instanceof DocumentFragment&&ft(i)}checkValidity(){const t=a.get(this);if(w(t,"Failed to execute 'checkValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const i=n.get(this);if(!i.valid){const s=new Event("invalid",{bubbles:!1,cancelable:!0,composed:!1});t.dispatchEvent(s)}return i.valid}get form(){const t=a.get(this);w(t,"Failed to read the 'form' property from 'ElementInternals': The target element is not a form-associated custom element.");let i;return t.constructor.formAssociated===!0&&(i=N(t)),i}get labels(){const t=a.get(this);w(t,"Failed to read the 'labels' property from 'ElementInternals': The target element is not a form-associated custom element.");const i=t.getAttribute("id"),s=t.getRootNode();return s&&i?s.querySelectorAll(`[for="${i}"]`):[]}reportValidity(){const t=a.get(this);if(w(t,"Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!this.willValidate)return!0;const i=this.checkValidity(),s=F.get(this);if(s&&!t.constructor.formAssociated)throw new DOMException("Failed to execute 'reportValidity' on 'ElementInternals': The target element is not a form-associated custom element.");return!i&&s&&(t.focus(),s.focus()),i}setFormValue(t){const i=a.get(this);if(w(i,"Failed to execute 'setFormValue' on 'ElementInternals': The target element is not a form-associated custom element."),Q(this),t!=null&&!(t instanceof FormData)){if(i.getAttribute("name")){const s=X(i,this);s.value=t}}else t!=null&&t instanceof FormData&&Array.from(t).reverse().forEach(([s,o])=>{if(typeof o=="string"){const d=X(i,this);d.name=s,d.value=o}});C.set(i,t)}setValidity(t,i,s){const o=a.get(this);if(w(o,"Failed to execute 'setValidity' on 'ElementInternals': The target element is not a form-associated custom element."),!t)throw new TypeError("Failed to execute 'setValidity' on 'ElementInternals': 1 argument required, but only 0 present.");F.set(this,s);const d=n.get(this),h={};for(const E in t)h[E]=t[E];Object.keys(h).length===0&&wt(d);const y=Object.assign(Object.assign({},d),h);delete y.valid;const{valid:m}=Et(d,y,this.form);if(!m&&!i)throw new DOMException("Failed to execute 'setValidity' on 'ElementInternals': The second argument should not be empty if one or more flags in the first argument are true.");b.set(this,m?"":i),o.isConnected?(o.toggleAttribute("internals-invalid",!m),o.toggleAttribute("internals-valid",m),M(o,"aria-invalid",`${!m}`)):x.set(o,this)}get shadowRoot(){const t=a.get(this),i=S.get(t);return i||null}get validationMessage(){const t=a.get(this);return w(t,"Failed to read the 'validationMessage' property from 'ElementInternals': The target element is not a form-associated custom element."),b.get(this)}get validity(){const t=a.get(this);return w(t,"Failed to read the 'validity' property from 'ElementInternals': The target element is not a form-associated custom element."),n.get(this)}get willValidate(){const t=a.get(this);return w(t,"Failed to read the 'willValidate' property from 'ElementInternals': The target element is not a form-associated custom element."),!(t.disabled||t.hasAttribute("disabled")||t.hasAttribute("readonly"))}}function Ct(){if(typeof window>"u"||!window.ElementInternals||!HTMLElement.prototype.attachInternals)return!1;class e extends HTMLElement{constructor(){super(),this.internals=this.attachInternals()}}const t=`element-internals-feature-detection-${Math.random().toString(36).replace(/[^a-z]+/g,"")}`;customElements.define(t,e);const i=new e;return["shadowRoot","form","willValidate","validity","validationMessage","labels","setFormValue","setValidity","checkValidity","reportValidity"].every(s=>s in i.internals)}let rt=!1,nt=!1;function q(e){nt||(nt=!0,window.CustomStateSet=W,e&&(HTMLElement.prototype.attachInternals=function(...t){const i=e.call(this,t);return i.states=new W(this),i}))}function ot(e=!0){if(!rt){if(rt=!0,typeof window<"u"&&(window.ElementInternals=st),typeof CustomElementRegistry<"u"){const t=CustomElementRegistry.prototype.define;CustomElementRegistry.prototype.define=function(i,s,o){if(s.formAssociated){const d=s.prototype.connectedCallback;s.prototype.connectedCallback=function(){K.has(this)||(K.set(this,!0),this.hasAttribute("disabled")&&_(this,!0)),d!=null&&d.apply(this),et(this)}}t.call(this,i,s,o)}}if(typeof HTMLElement<"u"&&(HTMLElement.prototype.attachInternals=function(){if(this.tagName){if(this.tagName.indexOf("-")===-1)throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': Unable to attach ElementInternals to non-custom elements.")}else return{};if(u.has(this))throw new DOMException("DOMException: Failed to execute 'attachInternals' on 'HTMLElement': ElementInternals for the specified element was already attached.");return new st(this)}),typeof Element<"u"){let t=function(...s){const o=i.apply(this,s);if(S.set(this,o),O()){const d=new MutationObserver(P);window.ShadyDOM?d.observe(this,B):d.observe(o,B),A.set(this,d)}return o};const i=Element.prototype.attachShadow;Element.prototype.attachShadow=t}O()&&typeof document<"u"&&new MutationObserver(P).observe(document.documentElement,B),typeof HTMLFormElement<"u"&&At(),(e||typeof window<"u"&&!window.CustomStateSet)&&q()}}return!!customElements.polyfillWrapFlushCallback||(Ct()?typeof window<"u"&&!window.CustomStateSet&&q(HTMLElement.prototype.attachInternals):ot(!1)),p.forceCustomStateSetPolyfill=q,p.forceElementInternalsPolyfill=ot,Object.defineProperty(p,"__esModule",{value:!0}),p})({})})()),lt}xt();var It=Object.defineProperty,c=(p,a,n,f)=>{for(var u=void 0,b=p.length-1,k;b>=0;b--)(k=p[b])&&(u=k(a,n,u)||u);return u&&It(a,n,u),u};const dt="on",U="--checked",D=",";class l extends r.PktElement{constructor(){super(),this.defaultValue=null,this.disabled=!1,this.readonly=!1,this.required=!1,this.max=null,this.maxlength=null,this.min=null,this.minlength=null,this.step=null,this.ariaDescribedBy=null,this.ariaLabelledby=null,this.name="",this.pattern=null,this.placeholder=null,this.id=St.uuidish(),this.counter=!1,this.hasError=!1,this.inline=!1,this.hasFieldset=!1,this.optionalTag=!1,this.requiredTag=!1,this.skipForwardTestid=!1,this.useWrapper=!0,this.fullwidth=!1,this.counterMaxLength=0,this.errorMessage="",this.helptext="",this.helptextDropdown="",this.helptextDropdownButton=Tt.specs.props.helptextDropdownButton.default,this.label=null,this.optionalText=r.strings.forms.labels.optional,this.requiredText=r.strings.forms.labels.required,this.tagText=null,this.dataTestid="",this.touched=!1,this.internals=this.attachInternals()}static get formAssociated(){return!0}manageValidity(a){var n,f,u,b,k,A,g,C,V,S,F;if(!a){console.warn("manageValidity called without valid input element");return}this.required&&!this.value?this.internals.setValidity({valueMissing:!0},r.strings.forms.messages.required,a):(n=a.validity)!=null&&n.typeMismatch||(f=a.validity)!=null&&f.badInput?this.internals.setValidity({typeMismatch:!0},r.strings.forms.messages.invalid,a):(u=a.validity)!=null&&u.patternMismatch?this.internals.setValidity({patternMismatch:!0},r.strings.forms.messages.invalidPattern,a):(b=a.validity)!=null&&b.tooShort||this.minlength&&this.minlength>0&&this.value.length<this.minlength?this.internals.setValidity({tooShort:!0},r.strings.forms.messages.tooShort,a):(k=a.validity)!=null&&k.tooLong||this.maxlength&&this.maxlength>0&&this.value.length>this.maxlength?this.internals.setValidity({tooLong:!0},r.strings.forms.messages.tooLong,a):(A=a.validity)!=null&&A.rangeUnderflow?this.internals.setValidity({rangeUnderflow:!0},this.min?r.strings.forms.messages.rangeUnderflowMin.replace("{min}",(g=this.min)==null?void 0:g.toString()):r.strings.forms.messages.rangeUnderflow,a):(C=a.validity)!=null&&C.stepMismatch?this.internals.setValidity({stepMismatch:!0},r.strings.forms.messages.invalid,a):(V=a.validity)!=null&&V.rangeOverflow?this.internals.setValidity({rangeOverflow:!0},this.max?r.strings.forms.messages.rangeOverflowMax.replace("{max}",(S=this.max)==null?void 0:S.toString()):r.strings.forms.messages.rangeOverflow,a):(F=a.validity)!=null&&F.customError?this.internals.setValidity({customError:!0},a.validationMessage,a):this.internals.setValidity({})}setFormValue(a){if(this.internals)if(Array.isArray(a)){const n=new FormData;a.forEach(f=>{n.append(this.name,f)}),this.internals.setFormValue(n)}else this.internals.setFormValue(a)}coordinateRadioGroup(){if(!this.form||!this.name||this.type!=="radio")return;const a=`pkt-radiobutton[name="${this.name}"], input[type=radio][name="${this.name}"]`;this.form.querySelectorAll(a).forEach(n=>{var f;if(n!==this&&n.getAttribute("name")===this.name&&n.getAttribute("value")!==this.value){const u=n;u.checked&&(u.checked=!1,u.internals&&(u.internals.setFormValue(null),(f=u.internals.states)==null||f.delete(U)))}})}valueChecked(a){if(!this.touched)return;const n=this.internals.form||this.closest("form"),f=n?new FormData(n):null;if(this.type==="radio"&&this.coordinateRadioGroup(),typeof a=="string"?(this.checked=a==="true",this.internals.ariaChecked=String(a==="true")):typeof a=="boolean"&&(this.checked=a,this.internals.ariaChecked=String(a)),this.checked){const u=(typeof this.value=="string"?this.value:"")||dt;this.internals.setFormValue(u),f&&f.append(this.name,u),this.internals.states.add(U)}else this.internals.setFormValue(null),f&&f.delete(this.name),this.internals.states.delete(U);this.dispatchChangeEvents(this.checked),this.internals.reportValidity()}valueChanged(a,n){(n!==this.value||n!==this._value)&&(typeof a=="string"?((this.multiple||this.range)&&a.includes(D)&&(a=a.split(D)),this.value=a,this._value=Array.isArray(a)?a:[a]):Array.isArray(a)?(this.value=this.multiple||this.range?a:a[0],this._value=a):(this.value="",this._value=[]),(!this.value||this.value.length===0)&&n&&n.length!==0?this.clearInputValue():this.value&&this.value.toString()!==(n==null?void 0:n.toString())&&this.onChange(this.value))}dispatchChangeEvents(a){this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("value-change",{detail:a,bubbles:!0,composed:!0}))}clearInputValue(){const a=this.multiple||this.range?[]:"";this.value=a,this.setFormValue(a),this.dispatchChangeEvents(a)}onFocus(){this.dispatchEvent(new FocusEvent("focus",{bubbles:!0,composed:!0}))}onBlur(){this.dispatchEvent(new FocusEvent("blur",{bubbles:!0,composed:!0}))}onInput(){this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))}normalizeValue(a){return(this.range||this.multiple)&&typeof a=="string"&&a.includes(D)?a.split(D):!this.multiple&&!this.range&&Array.isArray(a)?a[0]||"":a}validate(){var a,n;(a=this.inputRef)!=null&&a.value&&this.manageValidity(this.inputRef.value),(n=this.inputRefTo)!=null&&n.value&&this.manageValidity(this.inputRefTo.value)}onChange(a){if(!this.touched){this.touched=!0,a&&this.setFormValue(a);return}if(typeof a!="string"&&!Array.isArray(a))return;const n=this.normalizeValue(a);this.setFormValue(n),this.validate(),this.dispatchChangeEvents(n)}formResetCallback(){var a;if(this.touched=!1,this._options&&this._options.length&&this._options.forEach(n=>{"selected"in n&&(n.selected=!1)}),this.checked!==void 0)this.checked=!1,this.internals.ariaChecked="false",this.internals.setFormValue(""),(a=this.inputRef)!=null&&a.value&&"checked"in this.inputRef.value&&(this.inputRef.value.checked=!1),this.valueChecked(this.checked);else{this.internals.setFormValue("");const n=this.defaultValue||(this.multiple||this.range?[]:"");this.value=n,this._value=Array.isArray(n)?n:[n],this.valueChanged(this.value,null)}this.internals.ariaInvalid="false"}updated(a){super.updated(a),a.has("dataTestid")&&this.dataTestid&&this.inputRef.value&&(this.skipForwardTestid?this.hasAttribute("data-testid")||this.setAttribute("data-testid",this.dataTestid):(this.inputRef.value.dataset.testid=this.dataTestid,this.removeAttribute("data-testid")))}firstUpdated(a){if(super.firstUpdated(a),!this.form){const n=this.internals.form||this.closest("form");this.form=n}if(this.value&&this.defaultValue!==null&&(this.defaultValue=this.value),this.defaultValue!==null&&!this.value&&this.valueChanged(this.defaultValue,null),this.defaultChecked&&(this.internals.ariaChecked="true",this.checked=!0),this.required&&(this.internals.ariaRequired="true"),this.disabled&&(this.internals.ariaDisabled="true"),this.id&&!this.name&&(this.name=this.id),this.checked!==void 0){const n=this.checked===""||this.checked==="true"||this.checked===!0;this.internals.ariaChecked=String(n);const f=n?(typeof this.value=="string"?this.value:"")||dt:null;this.internals.setFormValue(f)}else this.setFormValue(this.value);this.inputRef&&this.inputRef.value&&(this.inputRef.value.setAttribute("form",""),this.manageValidity(this.inputRef.value)),this.inputRefTo&&this.inputRefTo.value&&(this.inputRefTo.value.setAttribute("form",""),this.manageValidity(this.inputRefTo.value))}}c([r.n({type:Boolean,reflect:!0})],l.prototype,"checked");c([r.n({type:Boolean})],l.prototype,"defaultChecked");c([r.n({type:Boolean})],l.prototype,"multiple");c([r.n({type:Boolean})],l.prototype,"range");c([r.n({type:String,reflect:!0})],l.prototype,"type");c([r.n()],l.prototype,"defaultValue");c([r.n({type:Boolean,reflect:!0})],l.prototype,"disabled");c([r.n({type:Boolean,reflect:!0})],l.prototype,"readonly");c([r.n({type:Boolean,reflect:!0})],l.prototype,"required");c([r.n({reflect:!0,converter:{fromAttribute:p=>p,toAttribute:p=>(p==null?void 0:p.toString())??null}})],l.prototype,"max");c([r.n({type:Number,reflect:!0})],l.prototype,"maxlength");c([r.n({reflect:!0,converter:{fromAttribute:p=>p,toAttribute:p=>(p==null?void 0:p.toString())??null}})],l.prototype,"min");c([r.n({type:Number,reflect:!0})],l.prototype,"minlength");c([r.n({type:Number,reflect:!0})],l.prototype,"step");c([r.n({type:String})],l.prototype,"ariaDescribedBy");c([r.n({type:String})],l.prototype,"ariaLabelledby");c([r.n({type:String,reflect:!0})],l.prototype,"name");c([r.n({type:String,reflect:!0})],l.prototype,"pattern");c([r.n({type:String,reflect:!0})],l.prototype,"placeholder");c([r.n({type:String,reflect:!0})],l.prototype,"id");c([r.n({type:Boolean})],l.prototype,"counter");c([r.n({type:Boolean})],l.prototype,"hasError");c([r.n({type:Boolean})],l.prototype,"inline");c([r.n({type:Boolean})],l.prototype,"hasFieldset");c([r.n({type:Boolean})],l.prototype,"optionalTag");c([r.n({type:Boolean})],l.prototype,"requiredTag");c([r.n({type:Boolean})],l.prototype,"skipForwardTestid");c([r.n({type:Boolean,reflect:!0,converter:Ft.booleanishConverter})],l.prototype,"useWrapper");c([r.n({type:Boolean,reflect:!0})],l.prototype,"fullwidth");c([r.n({type:Number})],l.prototype,"counterMaxLength");c([r.n({type:String})],l.prototype,"errorMessage");c([r.n({type:String})],l.prototype,"helptext");c([r.n({type:String})],l.prototype,"helptextDropdown");c([r.n({type:String,reflect:!1})],l.prototype,"helptextDropdownButton");c([r.n({type:String})],l.prototype,"label");c([r.n({type:String,reflect:!1})],l.prototype,"optionalText");c([r.n({type:String,reflect:!1})],l.prototype,"requiredText");c([r.n({type:String,reflect:!1})],l.prototype,"tagText");c([r.n({type:String,attribute:"data-testid"})],l.prototype,"dataTestid");exports.PktInputElement=l;
@@ -1,13 +1,12 @@
1
- import { P as Ft, s as g, n as c } from "./element-BXsf_NlG.js";
2
- import { r as Tt } from "./state-DgnkjP0q.js";
3
- import { u as xt } from "./utils-DznhwRXm.js";
4
- import { b as It } from "./booleanish-C9R0tdXH.js";
5
- import { s as Rt } from "./input-wrapper-CDgenrYA.js";
1
+ import { P as Ft, s as g, n as o } from "./element-BXsf_NlG.js";
2
+ import { u as Tt } from "./utils-DznhwRXm.js";
3
+ import { b as xt } from "./booleanish-C9R0tdXH.js";
4
+ import { s as It } from "./input-wrapper-CDgenrYA.js";
6
5
  var ct = {}, dt;
7
- function Lt() {
6
+ function Rt() {
8
7
  return dt || (dt = 1, (function() {
9
8
  (function(p) {
10
- const a = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), R = {
9
+ const a = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), u = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), R = {
11
10
  ariaAtomic: "aria-atomic",
12
11
  ariaAutoComplete: "aria-autocomplete",
13
12
  ariaBusy: "aria-busy",
@@ -60,7 +59,7 @@ function Lt() {
60
59
  return s;
61
60
  },
62
61
  set(d) {
63
- s = d, e.isConnected ? k(e, n, d) : C.set(e, t);
62
+ s = d, e.isConnected ? k(e, n, d) : A.set(e, t);
64
63
  }
65
64
  });
66
65
  }
@@ -93,11 +92,11 @@ function Lt() {
93
92
  const { addedNodes: i, removedNodes: s } = t, n = Array.from(i), d = Array.from(s);
94
93
  n.forEach((h) => {
95
94
  var y;
96
- if (u.has(h) && h.constructor.formAssociated && G(h), C.has(h)) {
97
- const m = C.get(h);
95
+ if (u.has(h) && h.constructor.formAssociated && G(h), A.has(h)) {
96
+ const m = A.get(h);
98
97
  Object.keys(R).filter((b) => m[b] !== null).forEach((b) => {
99
98
  k(h, R[b], m[b]);
100
- }), C.delete(h);
99
+ }), A.delete(h);
101
100
  }
102
101
  if (I.has(h)) {
103
102
  const m = I.get(h);
@@ -116,7 +115,7 @@ function Lt() {
116
115
  h.localName === "fieldset" && ((y = L.observe) === null || y === void 0 || y.call(L, h, Q), J(h, !0));
117
116
  }), d.forEach((h) => {
118
117
  const y = u.get(h);
119
- y && f.get(y) && X(y), A.has(h) && A.get(h).disconnect();
118
+ y && f.get(y) && X(y), C.has(h) && C.get(h).disconnect();
120
119
  });
121
120
  });
122
121
  }
@@ -265,7 +264,7 @@ function Lt() {
265
264
  return t.set(e, i), i;
266
265
  }
267
266
  var x;
268
- class Ct {
267
+ class At {
269
268
  constructor(t) {
270
269
  x.set(this, void 0), Vt(this, x, t);
271
270
  for (let i = 0; i < t.length; i++) {
@@ -287,7 +286,7 @@ function Lt() {
287
286
  return this[t] == null ? null : this[t];
288
287
  }
289
288
  }
290
- function At() {
289
+ function Ct() {
291
290
  const e = HTMLFormElement.prototype.checkValidity;
292
291
  HTMLFormElement.prototype.checkValidity = i;
293
292
  const t = HTMLFormElement.prototype.reportValidity;
@@ -307,7 +306,7 @@ function Lt() {
307
306
  if (y.length === 0)
308
307
  return h;
309
308
  const m = Array.from(h).concat(y).sort((M, b) => M.compareDocumentPosition ? M.compareDocumentPosition(b) & 2 ? 1 : -1 : 0);
310
- return new Ct(m);
309
+ return new At(m);
311
310
  }
312
311
  });
313
312
  }
@@ -463,30 +462,30 @@ function Lt() {
463
462
  const n = i.apply(this, s);
464
463
  if (F.set(this, n), D()) {
465
464
  const d = new MutationObserver(B);
466
- window.ShadyDOM ? d.observe(this, _) : d.observe(n, _), A.set(this, d);
465
+ window.ShadyDOM ? d.observe(this, _) : d.observe(n, _), C.set(this, d);
467
466
  }
468
467
  return n;
469
468
  };
470
469
  const i = Element.prototype.attachShadow;
471
470
  Element.prototype.attachShadow = t;
472
471
  }
473
- D() && typeof document < "u" && new MutationObserver(B).observe(document.documentElement, _), typeof HTMLFormElement < "u" && At(), (e || typeof window < "u" && !window.CustomStateSet) && $();
472
+ D() && typeof document < "u" && new MutationObserver(B).observe(document.documentElement, _), typeof HTMLFormElement < "u" && Ct(), (e || typeof window < "u" && !window.CustomStateSet) && $();
474
473
  }
475
474
  }
476
475
  return !!customElements.polyfillWrapFlushCallback || (St() ? typeof window < "u" && !window.CustomStateSet && $(HTMLElement.prototype.attachInternals) : lt(!1)), p.forceCustomStateSetPolyfill = $, p.forceElementInternalsPolyfill = lt, Object.defineProperty(p, "__esModule", { value: !0 }), p;
477
476
  })({});
478
477
  })()), ct;
479
478
  }
480
- Lt();
481
- var Nt = Object.defineProperty, o = (p, a, r, f) => {
479
+ Rt();
480
+ var Lt = Object.defineProperty, l = (p, a, r, f) => {
482
481
  for (var u = void 0, w = p.length - 1, V; w >= 0; w--)
483
482
  (V = p[w]) && (u = V(a, r, u) || u);
484
- return u && Nt(a, r, u), u;
483
+ return u && Lt(a, r, u), u;
485
484
  };
486
485
  const ht = "on", z = "--checked", P = ",";
487
- class l extends Ft {
486
+ class c extends Ft {
488
487
  constructor() {
489
- super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = xt(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = Rt.props.helptextDropdownButton.default, this.label = null, this.optionalText = g.forms.labels.optional, this.requiredText = g.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
488
+ super(), this.defaultValue = null, this.disabled = !1, this.readonly = !1, this.required = !1, this.max = null, this.maxlength = null, this.min = null, this.minlength = null, this.step = null, this.ariaDescribedBy = null, this.ariaLabelledby = null, this.name = "", this.pattern = null, this.placeholder = null, this.id = Tt(), this.counter = !1, this.hasError = !1, this.inline = !1, this.hasFieldset = !1, this.optionalTag = !1, this.requiredTag = !1, this.skipForwardTestid = !1, this.useWrapper = !0, this.fullwidth = !1, this.counterMaxLength = 0, this.errorMessage = "", this.helptext = "", this.helptextDropdown = "", this.helptextDropdownButton = It.props.helptextDropdownButton.default, this.label = null, this.optionalText = g.forms.labels.optional, this.requiredText = g.forms.labels.required, this.tagText = null, this.dataTestid = "", this.touched = !1, this.internals = this.attachInternals();
490
489
  }
491
490
  static get formAssociated() {
492
491
  return !0;
@@ -499,7 +498,7 @@ class l extends Ft {
499
498
  * @protected
500
499
  */
501
500
  manageValidity(a) {
502
- var r, f, u, w, V, A, v, S, C, F, T;
501
+ var r, f, u, w, V, C, v, S, A, F, T;
503
502
  if (!a) {
504
503
  console.warn("manageValidity called without valid input element");
505
504
  return;
@@ -508,11 +507,11 @@ class l extends Ft {
508
507
  { patternMismatch: !0 },
509
508
  g.forms.messages.invalidPattern,
510
509
  a
511
- ) : (w = a.validity) != null && w.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, g.forms.messages.tooShort, a) : (V = a.validity) != null && V.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, g.forms.messages.tooLong, a) : (A = a.validity) != null && A.rangeUnderflow ? this.internals.setValidity(
510
+ ) : (w = a.validity) != null && w.tooShort || this.minlength && this.minlength > 0 && this.value.length < this.minlength ? this.internals.setValidity({ tooShort: !0 }, g.forms.messages.tooShort, a) : (V = a.validity) != null && V.tooLong || this.maxlength && this.maxlength > 0 && this.value.length > this.maxlength ? this.internals.setValidity({ tooLong: !0 }, g.forms.messages.tooLong, a) : (C = a.validity) != null && C.rangeUnderflow ? this.internals.setValidity(
512
511
  { rangeUnderflow: !0 },
513
512
  this.min ? g.forms.messages.rangeUnderflowMin.replace("{min}", (v = this.min) == null ? void 0 : v.toString()) : g.forms.messages.rangeUnderflow,
514
513
  a
515
- ) : (S = a.validity) != null && S.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, g.forms.messages.invalid, a) : (C = a.validity) != null && C.rangeOverflow ? this.internals.setValidity(
514
+ ) : (S = a.validity) != null && S.stepMismatch ? this.internals.setValidity({ stepMismatch: !0 }, g.forms.messages.invalid, a) : (A = a.validity) != null && A.rangeOverflow ? this.internals.setValidity(
516
515
  { rangeOverflow: !0 },
517
516
  this.max ? g.forms.messages.rangeOverflowMax.replace("{max}", (F = this.max) == null ? void 0 : F.toString()) : g.forms.messages.rangeOverflow,
518
517
  a
@@ -586,7 +585,7 @@ class l extends Ft {
586
585
  * ```
587
586
  */
588
587
  valueChanged(a, r) {
589
- (r !== this.value || r !== this._value) && (typeof a == "string" ? ((this.multiple || this.range) && a.includes(P) && (a = a.split(P)), this.value = a, this._value = Array.isArray(a) ? a : [a]) : Array.isArray(a) ? (this.value = this.multiple || this.range ? a : a[0], this._value = a) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && r && r.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (r == null ? void 0 : r.toString()) && this.onChange(this.value), this.updateComplete.then(() => this.requestUpdate()));
588
+ (r !== this.value || r !== this._value) && (typeof a == "string" ? ((this.multiple || this.range) && a.includes(P) && (a = a.split(P)), this.value = a, this._value = Array.isArray(a) ? a : [a]) : Array.isArray(a) ? (this.value = this.multiple || this.range ? a : a[0], this._value = a) : (this.value = "", this._value = []), (!this.value || this.value.length === 0) && r && r.length !== 0 ? this.clearInputValue() : this.value && this.value.toString() !== (r == null ? void 0 : r.toString()) && this.onChange(this.value));
590
589
  }
591
590
  /**
592
591
  * Dispatches change and value-change events
@@ -703,138 +702,135 @@ class l extends Ft {
703
702
  this.inputRef && this.inputRef.value && (this.inputRef.value.setAttribute("form", ""), this.manageValidity(this.inputRef.value)), this.inputRefTo && this.inputRefTo.value && (this.inputRefTo.value.setAttribute("form", ""), this.manageValidity(this.inputRefTo.value));
704
703
  }
705
704
  }
706
- o([
707
- c({ type: Boolean, reflect: !0 })
708
- ], l.prototype, "checked");
709
- o([
710
- c({ type: Boolean })
711
- ], l.prototype, "defaultChecked");
712
- o([
713
- c({ type: Boolean })
714
- ], l.prototype, "multiple");
715
- o([
716
- c({ type: Boolean })
717
- ], l.prototype, "range");
718
- o([
719
- c({ type: String, reflect: !0 })
720
- ], l.prototype, "type");
721
- o([
722
- c()
723
- ], l.prototype, "defaultValue");
724
- o([
725
- c({ type: Boolean, reflect: !0 })
726
- ], l.prototype, "disabled");
727
- o([
728
- c({ type: Boolean, reflect: !0 })
729
- ], l.prototype, "readonly");
730
- o([
731
- c({ type: Boolean, reflect: !0 })
732
- ], l.prototype, "required");
733
- o([
734
- c({
705
+ l([
706
+ o({ type: Boolean, reflect: !0 })
707
+ ], c.prototype, "checked");
708
+ l([
709
+ o({ type: Boolean })
710
+ ], c.prototype, "defaultChecked");
711
+ l([
712
+ o({ type: Boolean })
713
+ ], c.prototype, "multiple");
714
+ l([
715
+ o({ type: Boolean })
716
+ ], c.prototype, "range");
717
+ l([
718
+ o({ type: String, reflect: !0 })
719
+ ], c.prototype, "type");
720
+ l([
721
+ o()
722
+ ], c.prototype, "defaultValue");
723
+ l([
724
+ o({ type: Boolean, reflect: !0 })
725
+ ], c.prototype, "disabled");
726
+ l([
727
+ o({ type: Boolean, reflect: !0 })
728
+ ], c.prototype, "readonly");
729
+ l([
730
+ o({ type: Boolean, reflect: !0 })
731
+ ], c.prototype, "required");
732
+ l([
733
+ o({
735
734
  reflect: !0,
736
735
  converter: {
737
736
  fromAttribute: (p) => p,
738
737
  toAttribute: (p) => (p == null ? void 0 : p.toString()) ?? null
739
738
  }
740
739
  })
741
- ], l.prototype, "max");
742
- o([
743
- c({ type: Number, reflect: !0 })
744
- ], l.prototype, "maxlength");
745
- o([
746
- c({
740
+ ], c.prototype, "max");
741
+ l([
742
+ o({ type: Number, reflect: !0 })
743
+ ], c.prototype, "maxlength");
744
+ l([
745
+ o({
747
746
  reflect: !0,
748
747
  converter: {
749
748
  fromAttribute: (p) => p,
750
749
  toAttribute: (p) => (p == null ? void 0 : p.toString()) ?? null
751
750
  }
752
751
  })
753
- ], l.prototype, "min");
754
- o([
755
- c({ type: Number, reflect: !0 })
756
- ], l.prototype, "minlength");
757
- o([
758
- c({ type: Number, reflect: !0 })
759
- ], l.prototype, "step");
760
- o([
761
- c({ type: String })
762
- ], l.prototype, "ariaDescribedBy");
763
- o([
764
- c({ type: String })
765
- ], l.prototype, "ariaLabelledby");
766
- o([
767
- c({ type: String, reflect: !0 })
768
- ], l.prototype, "name");
769
- o([
770
- c({ type: String, reflect: !0 })
771
- ], l.prototype, "pattern");
772
- o([
773
- c({ type: String, reflect: !0 })
774
- ], l.prototype, "placeholder");
775
- o([
776
- c({ type: String, reflect: !0 })
777
- ], l.prototype, "id");
778
- o([
779
- c({ type: Boolean })
780
- ], l.prototype, "counter");
781
- o([
782
- c({ type: Boolean })
783
- ], l.prototype, "hasError");
784
- o([
785
- c({ type: Boolean })
786
- ], l.prototype, "inline");
787
- o([
788
- c({ type: Boolean })
789
- ], l.prototype, "hasFieldset");
790
- o([
791
- c({ type: Boolean })
792
- ], l.prototype, "optionalTag");
793
- o([
794
- c({ type: Boolean })
795
- ], l.prototype, "requiredTag");
796
- o([
797
- c({ type: Boolean })
798
- ], l.prototype, "skipForwardTestid");
799
- o([
800
- c({ type: Boolean, reflect: !0, converter: It })
801
- ], l.prototype, "useWrapper");
802
- o([
803
- c({ type: Boolean, reflect: !0 })
804
- ], l.prototype, "fullwidth");
805
- o([
806
- c({ type: Number })
807
- ], l.prototype, "counterMaxLength");
808
- o([
809
- c({ type: String })
810
- ], l.prototype, "errorMessage");
811
- o([
812
- c({ type: String })
813
- ], l.prototype, "helptext");
814
- o([
815
- c({ type: String })
816
- ], l.prototype, "helptextDropdown");
817
- o([
818
- c({ type: String, reflect: !1 })
819
- ], l.prototype, "helptextDropdownButton");
820
- o([
821
- c({ type: String })
822
- ], l.prototype, "label");
823
- o([
824
- c({ type: String, reflect: !1 })
825
- ], l.prototype, "optionalText");
826
- o([
827
- c({ type: String, reflect: !1 })
828
- ], l.prototype, "requiredText");
829
- o([
830
- c({ type: String, reflect: !1 })
831
- ], l.prototype, "tagText");
832
- o([
833
- c({ type: String, attribute: "data-testid" })
834
- ], l.prototype, "dataTestid");
835
- o([
836
- Tt()
837
- ], l.prototype, "touched");
752
+ ], c.prototype, "min");
753
+ l([
754
+ o({ type: Number, reflect: !0 })
755
+ ], c.prototype, "minlength");
756
+ l([
757
+ o({ type: Number, reflect: !0 })
758
+ ], c.prototype, "step");
759
+ l([
760
+ o({ type: String })
761
+ ], c.prototype, "ariaDescribedBy");
762
+ l([
763
+ o({ type: String })
764
+ ], c.prototype, "ariaLabelledby");
765
+ l([
766
+ o({ type: String, reflect: !0 })
767
+ ], c.prototype, "name");
768
+ l([
769
+ o({ type: String, reflect: !0 })
770
+ ], c.prototype, "pattern");
771
+ l([
772
+ o({ type: String, reflect: !0 })
773
+ ], c.prototype, "placeholder");
774
+ l([
775
+ o({ type: String, reflect: !0 })
776
+ ], c.prototype, "id");
777
+ l([
778
+ o({ type: Boolean })
779
+ ], c.prototype, "counter");
780
+ l([
781
+ o({ type: Boolean })
782
+ ], c.prototype, "hasError");
783
+ l([
784
+ o({ type: Boolean })
785
+ ], c.prototype, "inline");
786
+ l([
787
+ o({ type: Boolean })
788
+ ], c.prototype, "hasFieldset");
789
+ l([
790
+ o({ type: Boolean })
791
+ ], c.prototype, "optionalTag");
792
+ l([
793
+ o({ type: Boolean })
794
+ ], c.prototype, "requiredTag");
795
+ l([
796
+ o({ type: Boolean })
797
+ ], c.prototype, "skipForwardTestid");
798
+ l([
799
+ o({ type: Boolean, reflect: !0, converter: xt })
800
+ ], c.prototype, "useWrapper");
801
+ l([
802
+ o({ type: Boolean, reflect: !0 })
803
+ ], c.prototype, "fullwidth");
804
+ l([
805
+ o({ type: Number })
806
+ ], c.prototype, "counterMaxLength");
807
+ l([
808
+ o({ type: String })
809
+ ], c.prototype, "errorMessage");
810
+ l([
811
+ o({ type: String })
812
+ ], c.prototype, "helptext");
813
+ l([
814
+ o({ type: String })
815
+ ], c.prototype, "helptextDropdown");
816
+ l([
817
+ o({ type: String, reflect: !1 })
818
+ ], c.prototype, "helptextDropdownButton");
819
+ l([
820
+ o({ type: String })
821
+ ], c.prototype, "label");
822
+ l([
823
+ o({ type: String, reflect: !1 })
824
+ ], c.prototype, "optionalText");
825
+ l([
826
+ o({ type: String, reflect: !1 })
827
+ ], c.prototype, "requiredText");
828
+ l([
829
+ o({ type: String, reflect: !1 })
830
+ ], c.prototype, "tagText");
831
+ l([
832
+ o({ type: String, attribute: "data-testid" })
833
+ ], c.prototype, "dataTestid");
838
834
  export {
839
- l as P
835
+ c as P
840
836
  };
@@ -1,5 +1,5 @@
1
1
  import { P as x, E as s, x as o, n as r, t as m } from "./element-BXsf_NlG.js";
2
- import { P as k } from "./pkt-slot-controller-BPGj-LC5.js";
2
+ import { P as k } from "./pkt-slot-controller-D7CrjM52.js";
3
3
  import { e as g, n as y } from "./ref-BxiKhrfa.js";
4
4
  import { o as w } from "./if-defined-CxHgig4I.js";
5
5
  import { o as v } from "./icon-DBZvMard.js";
@@ -7,8 +7,8 @@ import { e as T } from "./class-map-Dt2jXOlF.js";
7
7
  import { u as E } from "./utils-DznhwRXm.js";
8
8
  import { b as S } from "./booleanish-C9R0tdXH.js";
9
9
  import { s as p } from "./input-wrapper-CDgenrYA.js";
10
- import "./helptext-CfR0SYe9.js";
11
- import "./alert-Cc5FtxHN.js";
10
+ import "./helptext-Cm6FLBVf.js";
11
+ import "./alert-BpFxQviu.js";
12
12
  var D = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, e = (l, a, n, h) => {
13
13
  for (var i = h > 1 ? void 0 : h ? _(a, n) : a, d = l.length - 1, u; d >= 0; d--)
14
14
  (u = l[d]) && (i = (h ? u(a, n, i) : u(i)) || i);
@@ -1,4 +1,4 @@
1
- "use strict";const t=require("./element-aUzIoa1s.cjs"),x=require("./pkt-slot-controller-BzddBp7z.cjs"),a=require("./ref-C5iJMIE1.cjs"),y=require("./if-defined-BElHLTlB.cjs"),b=require("./icon-n4-ve48P.cjs"),$=require("./class-map-CApIYSRo.cjs"),f=require("./utils-byXsEz1u.cjs"),I=require("./booleanish-BKVonob4.cjs"),r=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-7fyVJK2C.cjs");require("./alert-DVCenNTM.cjs");var P=Object.defineProperty,W=Object.getOwnPropertyDescriptor,e=(u,p,n,o)=>{for(var s=o>1?void 0:o?W(p,n):p,i=u.length-1,l;i>=0;i--)(l=u[i])&&(s=(o?l(p,n,s):l(s))||s);return o&&s&&P(p,n,s),s};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=a.e(),this.helptextSlot=a.e(),this.forId=f.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=r.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=r.specs.props.optionalTag.default,this.optionalText=r.specs.props.optionalText.default,this.requiredTag=r.specs.props.requiredTag.default,this.requiredText=r.specs.props.requiredText.default,this.tagText=null,this.hasError=r.specs.props.hasError.default,this.errorMessage="",this.disabled=r.specs.props.disabled.default,this.inline=r.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=r.specs.props.hasFieldset.default,this.role="group",this.useWrapper=r.specs.props.useWrapper.default,this.slotController=new x.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updated(p){super.updated(p)}render(){const p={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},n="pkt-tag pkt-tag--small pkt-tag--thin-text",o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>t.x`
1
+ "use strict";const t=require("./element-aUzIoa1s.cjs"),x=require("./pkt-slot-controller-D4nKlom5.cjs"),a=require("./ref-C5iJMIE1.cjs"),y=require("./if-defined-BElHLTlB.cjs"),b=require("./icon-n4-ve48P.cjs"),$=require("./class-map-CApIYSRo.cjs"),f=require("./utils-byXsEz1u.cjs"),I=require("./booleanish-BKVonob4.cjs"),r=require("./input-wrapper-EoSAbU-U.cjs");require("./helptext-BG1P_9j0.cjs");require("./alert-B9flMht5.cjs");var P=Object.defineProperty,W=Object.getOwnPropertyDescriptor,e=(u,p,n,o)=>{for(var s=o>1?void 0:o?W(p,n):p,i=u.length-1,l;i>=0;i--)(l=u[i])&&(s=(o?l(p,n,s):l(s))||s);return o&&s&&P(p,n,s),s};exports.PktInputWrapper=class extends t.PktElement{constructor(){super(),this.defaultSlot=a.e(),this.helptextSlot=a.e(),this.forId=f.uuidish(),this.label="",this.helptext=null,this.helptextDropdown=null,this.helptextDropdownButton=null,this.counter=r.specs.props.counter.default,this.counterCurrent=0,this.counterMaxLength=0,this.counterError=null,this.counterPosition="bottom",this.optionalTag=r.specs.props.optionalTag.default,this.optionalText=r.specs.props.optionalText.default,this.requiredTag=r.specs.props.requiredTag.default,this.requiredText=r.specs.props.requiredText.default,this.tagText=null,this.hasError=r.specs.props.hasError.default,this.errorMessage="",this.disabled=r.specs.props.disabled.default,this.inline=r.specs.props.inline.default,this.ariaDescribedby=void 0,this.hasFieldset=r.specs.props.hasFieldset.default,this.role="group",this.useWrapper=r.specs.props.useWrapper.default,this.slotController=new x.PktSlotController(this,this.defaultSlot,this.helptextSlot)}updated(p){super.updated(p)}render(){const p={"pkt-inputwrapper":!0,"pkt-inputwrapper--error":this.hasError,"pkt-inputwrapper--disabled":this.disabled,"pkt-inputwrapper--inline":this.inline},n="pkt-tag pkt-tag--small pkt-tag--thin-text",o=this.ariaDescribedby?this.ariaDescribedby:this.helptext?`${this.forId}-helptext`:t.E,s=()=>t.x`
2
2
  ${this.tagText?t.x`<span class=${n+" pkt-tag--gray"}>${this.tagText}</span>`:t.E}
3
3
  ${this.optionalTag?t.x`<span class=${n+" pkt-tag--blue-light"}>${this.optionalText}</span>`:t.E}
4
4
  ${this.requiredTag?t.x`<span class=${n+" pkt-tag--beige"}>${this.requiredText}</span>`:t.E}