@pine-ds/core 3.14.1 → 3.14.2

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 (152) hide show
  1. package/components/pds-checkbox2.js +5 -4
  2. package/components/pds-checkbox2.js.map +1 -1
  3. package/components/pds-combobox.js +4 -4
  4. package/components/pds-combobox.js.map +1 -1
  5. package/components/pds-input.js +3 -3
  6. package/components/pds-input.js.map +1 -1
  7. package/components/pds-loader2.js +2 -2
  8. package/components/pds-loader2.js.map +1 -1
  9. package/components/pds-multiselect.js +6 -5
  10. package/components/pds-multiselect.js.map +1 -1
  11. package/components/pds-select.js +3 -3
  12. package/components/pds-select.js.map +1 -1
  13. package/components/pds-switch.js +5 -4
  14. package/components/pds-switch.js.map +1 -1
  15. package/components/pds-textarea.js +6 -6
  16. package/components/pds-textarea.js.map +1 -1
  17. package/dist/cjs/pds-checkbox.cjs.entry.js +5 -4
  18. package/dist/cjs/pds-checkbox.entry.cjs.js.map +1 -1
  19. package/dist/cjs/pds-combobox.cjs.entry.js +4 -4
  20. package/dist/cjs/pds-combobox.entry.cjs.js.map +1 -1
  21. package/dist/cjs/pds-input.cjs.entry.js +3 -3
  22. package/dist/cjs/pds-input.entry.cjs.js.map +1 -1
  23. package/dist/cjs/pds-loader.cjs.entry.js +2 -2
  24. package/dist/cjs/pds-loader.entry.cjs.js.map +1 -1
  25. package/dist/cjs/pds-multiselect.cjs.entry.js +6 -5
  26. package/dist/cjs/pds-multiselect.entry.cjs.js.map +1 -1
  27. package/dist/cjs/pds-select.cjs.entry.js +3 -3
  28. package/dist/cjs/pds-select.entry.cjs.js.map +1 -1
  29. package/dist/cjs/pds-switch.cjs.entry.js +5 -4
  30. package/dist/cjs/pds-switch.entry.cjs.js.map +1 -1
  31. package/dist/cjs/pds-textarea.cjs.entry.js +6 -6
  32. package/dist/cjs/pds-textarea.entry.cjs.js.map +1 -1
  33. package/dist/collection/components/pds-checkbox/pds-checkbox.js +5 -4
  34. package/dist/collection/components/pds-checkbox/pds-checkbox.js.map +1 -1
  35. package/dist/collection/components/pds-combobox/pds-combobox.js +4 -4
  36. package/dist/collection/components/pds-combobox/pds-combobox.js.map +1 -1
  37. package/dist/collection/components/pds-input/pds-input.js +3 -3
  38. package/dist/collection/components/pds-input/pds-input.js.map +1 -1
  39. package/dist/collection/components/pds-loader/pds-loader.js +2 -2
  40. package/dist/collection/components/pds-loader/pds-loader.js.map +1 -1
  41. package/dist/collection/components/pds-multiselect/pds-multiselect.js +6 -5
  42. package/dist/collection/components/pds-multiselect/pds-multiselect.js.map +1 -1
  43. package/dist/collection/components/pds-select/pds-select.js +3 -3
  44. package/dist/collection/components/pds-select/pds-select.js.map +1 -1
  45. package/dist/collection/components/pds-switch/pds-switch.js +5 -4
  46. package/dist/collection/components/pds-switch/pds-switch.js.map +1 -1
  47. package/dist/collection/components/pds-textarea/pds-textarea.js +6 -6
  48. package/dist/collection/components/pds-textarea/pds-textarea.js.map +1 -1
  49. package/dist/docs.json +1 -1
  50. package/dist/esm/pds-checkbox.entry.js +5 -4
  51. package/dist/esm/pds-checkbox.entry.js.map +1 -1
  52. package/dist/esm/pds-combobox.entry.js +4 -4
  53. package/dist/esm/pds-combobox.entry.js.map +1 -1
  54. package/dist/esm/pds-input.entry.js +3 -3
  55. package/dist/esm/pds-input.entry.js.map +1 -1
  56. package/dist/esm/pds-loader.entry.js +2 -2
  57. package/dist/esm/pds-loader.entry.js.map +1 -1
  58. package/dist/esm/pds-multiselect.entry.js +6 -5
  59. package/dist/esm/pds-multiselect.entry.js.map +1 -1
  60. package/dist/esm/pds-select.entry.js +3 -3
  61. package/dist/esm/pds-select.entry.js.map +1 -1
  62. package/dist/esm/pds-switch.entry.js +5 -4
  63. package/dist/esm/pds-switch.entry.js.map +1 -1
  64. package/dist/esm/pds-textarea.entry.js +6 -6
  65. package/dist/esm/pds-textarea.entry.js.map +1 -1
  66. package/dist/esm-es5/pds-checkbox.entry.js +1 -1
  67. package/dist/esm-es5/pds-checkbox.entry.js.map +1 -1
  68. package/dist/esm-es5/pds-combobox.entry.js +1 -1
  69. package/dist/esm-es5/pds-combobox.entry.js.map +1 -1
  70. package/dist/esm-es5/pds-input.entry.js +1 -1
  71. package/dist/esm-es5/pds-input.entry.js.map +1 -1
  72. package/dist/esm-es5/pds-loader.entry.js +1 -1
  73. package/dist/esm-es5/pds-loader.entry.js.map +1 -1
  74. package/dist/esm-es5/pds-multiselect.entry.js +1 -1
  75. package/dist/esm-es5/pds-multiselect.entry.js.map +1 -1
  76. package/dist/esm-es5/pds-select.entry.js +1 -1
  77. package/dist/esm-es5/pds-select.entry.js.map +1 -1
  78. package/dist/esm-es5/pds-switch.entry.js +1 -1
  79. package/dist/esm-es5/pds-switch.entry.js.map +1 -1
  80. package/dist/esm-es5/pds-textarea.entry.js +1 -1
  81. package/dist/esm-es5/pds-textarea.entry.js.map +1 -1
  82. package/dist/pine-core/{p-cfb24f97.system.entry.js → p-205ec2ac.system.entry.js} +2 -2
  83. package/dist/pine-core/{p-cfb24f97.system.entry.js.map → p-205ec2ac.system.entry.js.map} +1 -1
  84. package/dist/pine-core/{p-2cd0d520.entry.js → p-3440138d.entry.js} +2 -2
  85. package/dist/pine-core/{p-2cd0d520.entry.js.map → p-3440138d.entry.js.map} +1 -1
  86. package/dist/pine-core/p-3c04c17e.system.entry.js +2 -0
  87. package/dist/pine-core/p-3c04c17e.system.entry.js.map +1 -0
  88. package/dist/pine-core/p-5L_gsODn.system.js.map +1 -0
  89. package/dist/pine-core/{p-db06ad25.system.entry.js → p-622f1342.system.entry.js} +2 -2
  90. package/dist/pine-core/{p-db06ad25.system.entry.js.map → p-622f1342.system.entry.js.map} +1 -1
  91. package/dist/pine-core/{p-40988b4d.system.entry.js → p-6d2da3ca.system.entry.js} +2 -2
  92. package/dist/pine-core/{p-40988b4d.system.entry.js.map → p-6d2da3ca.system.entry.js.map} +1 -1
  93. package/dist/pine-core/{p-5c982339.system.entry.js → p-7dd74fe2.system.entry.js} +2 -2
  94. package/dist/pine-core/p-7dd74fe2.system.entry.js.map +1 -0
  95. package/dist/pine-core/p-811e510d.system.entry.js +2 -0
  96. package/dist/pine-core/p-811e510d.system.entry.js.map +1 -0
  97. package/dist/pine-core/{p-711989de.entry.js → p-8c0fc8ff.entry.js} +2 -2
  98. package/dist/pine-core/p-8c0fc8ff.entry.js.map +1 -0
  99. package/dist/pine-core/{p-84c7f663.system.entry.js → p-9e7cd072.system.entry.js} +2 -2
  100. package/dist/pine-core/p-9e7cd072.system.entry.js.map +1 -0
  101. package/dist/pine-core/{p-BmKJgY0X.system.js.map → p-CP2nsJcg.system.js.map} +1 -1
  102. package/dist/pine-core/{p-DaXZLSA0.system.js.map → p-Cn_QqTXg.system.js.map} +1 -1
  103. package/dist/pine-core/p-DbNPEZgc.system.js.map +1 -0
  104. package/dist/pine-core/p-DieNsvcz.system.js.map +1 -0
  105. package/dist/pine-core/p-JAVnELnm.system.js +1 -1
  106. package/dist/pine-core/{p-BJE1EIse.system.js.map → p-LM0mZTib.system.js.map} +1 -1
  107. package/dist/pine-core/p-aPfTGFhq.system.js.map +1 -0
  108. package/dist/pine-core/{p-9e4fc025.entry.js → p-ab3b6e0c.entry.js} +2 -2
  109. package/dist/pine-core/p-ab3b6e0c.entry.js.map +1 -0
  110. package/dist/pine-core/{p-b9650ed9.system.entry.js → p-ac56273a.system.entry.js} +2 -2
  111. package/dist/pine-core/{p-b9650ed9.system.entry.js.map → p-ac56273a.system.entry.js.map} +1 -1
  112. package/dist/pine-core/{p-1ca116fa.entry.js → p-b41465b8.entry.js} +2 -2
  113. package/dist/pine-core/{p-1ca116fa.entry.js.map → p-b41465b8.entry.js.map} +1 -1
  114. package/dist/pine-core/{p-415ba884.entry.js → p-ba623ced.entry.js} +2 -2
  115. package/dist/pine-core/p-ba623ced.entry.js.map +1 -0
  116. package/dist/pine-core/p-bff9fb8e.entry.js +2 -0
  117. package/dist/pine-core/p-bff9fb8e.entry.js.map +1 -0
  118. package/dist/pine-core/{p-fa05ea14.entry.js → p-d9693048.entry.js} +2 -2
  119. package/dist/pine-core/{p-fa05ea14.entry.js.map → p-d9693048.entry.js.map} +1 -1
  120. package/dist/pine-core/{p-3f97a965.entry.js → p-f47d6724.entry.js} +2 -2
  121. package/dist/pine-core/p-f47d6724.entry.js.map +1 -0
  122. package/dist/pine-core/p-ztsUkqit.system.js.map +1 -0
  123. package/dist/pine-core/pds-checkbox.entry.esm.js.map +1 -1
  124. package/dist/pine-core/pds-combobox.entry.esm.js.map +1 -1
  125. package/dist/pine-core/pds-input.entry.esm.js.map +1 -1
  126. package/dist/pine-core/pds-loader.entry.esm.js.map +1 -1
  127. package/dist/pine-core/pds-multiselect.entry.esm.js.map +1 -1
  128. package/dist/pine-core/pds-select.entry.esm.js.map +1 -1
  129. package/dist/pine-core/pds-switch.entry.esm.js.map +1 -1
  130. package/dist/pine-core/pds-textarea.entry.esm.js.map +1 -1
  131. package/dist/pine-core/pine-core.esm.js +1 -1
  132. package/dist/types/components/pds-loader/pds-loader.d.ts +1 -1
  133. package/hydrate/index.js +34 -31
  134. package/hydrate/index.mjs +34 -31
  135. package/package.json +2 -2
  136. package/dist/pine-core/p-32c13896.system.entry.js +0 -2
  137. package/dist/pine-core/p-32c13896.system.entry.js.map +0 -1
  138. package/dist/pine-core/p-3f97a965.entry.js.map +0 -1
  139. package/dist/pine-core/p-415ba884.entry.js.map +0 -1
  140. package/dist/pine-core/p-5c982339.system.entry.js.map +0 -1
  141. package/dist/pine-core/p-6321b70b.entry.js +0 -2
  142. package/dist/pine-core/p-6321b70b.entry.js.map +0 -1
  143. package/dist/pine-core/p-711989de.entry.js.map +0 -1
  144. package/dist/pine-core/p-8323fe69.system.entry.js +0 -2
  145. package/dist/pine-core/p-8323fe69.system.entry.js.map +0 -1
  146. package/dist/pine-core/p-84c7f663.system.entry.js.map +0 -1
  147. package/dist/pine-core/p-9e4fc025.entry.js.map +0 -1
  148. package/dist/pine-core/p-CBCT89qf.system.js.map +0 -1
  149. package/dist/pine-core/p-CfZCQYfD.system.js.map +0 -1
  150. package/dist/pine-core/p-a3bCMZF8.system.js.map +0 -1
  151. package/dist/pine-core/p-uyztncxJ.system.js.map +0 -1
  152. package/dist/pine-core/p-zgS7Vsk7.system.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from"./index-DHPhrb5T.js";import{i as isRequired,e as exposeTypeProperty,a as assignDescription,m as messageId}from"./form-DwjNklzi.js";import{d as debounceEvent}from"./utils-tJa4KYNO.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./attributes-C0M1gTKv.js";import{b as danger}from"./index-DY8eSueV.js";var labelCss=":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";var pdsInputTokensCss=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";var pdsTextareaCss=":host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";var PdsTextarea=function(){function e(e){var i=this;registerInstance(this,e);this.pdsBlur=createEvent(this,"pdsBlur");this.pdsFocus=createEvent(this,"pdsFocus");this.pdsInput=createEvent(this,"pdsInput");this.pdsTextareaChange=createEvent(this,"pdsTextareaChange");this.pdsKeyDown=createEvent(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=function(e){i.hasFocus=false;if(i.focusedValue!==i.value){i.emitValueChange(e)}i.pdsBlur.emit(e)};this.onFocus=function(e){i.hasFocus=true;i.focusedValue=i.value;i.pdsFocus.emit(e)};this.onInput=function(e){var t=e.target;if(t){if(i.maxLength&&t.value.length>i.maxLength){t.value=t.value.substring(0,i.maxLength)}i.value=t.value||""}i.emitInputChange(e);if(i.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((function(){i.updateCharacterCounterPosition()}))}};this.onTextareaChange=function(e){i.emitValueChange(e)};this.onKeyDown=function(e){i.pdsKeyDown.emit(e)}}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeTextarea){this.nativeTextarea.focus()}return[2]}))}))};e.prototype.debounceChanged=function(){var e=this,i=e.pdsInput,t=e.debounce,r=e.originalPdsInput;this.pdsInput=t===undefined?r!==null&&r!==void 0?r:i:debounceEvent(i,t)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var i=this.getValue();if(e&&e.value!==i){e.value=i}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}};e.prototype.maxLengthChanged=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){var e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}};e.prototype.emitInputChange=function(e){var i=this.value;this.pdsInput.emit({value:i,event:e})};e.prototype.emitValueChange=function(e){var i=e.target;isRequired(i,this);var t=i.value;var r=t==null?t:t.toString();this.focusedValue=r;this.pdsTextareaChange.emit({value:r,event:e})};e.prototype.getValue=function(){return this.value||""};e.prototype.textareaClassNames=function(){var e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")};e.prototype.connectedCallback=function(){this.debounceChanged();if(this.el.attachInternals){this.internals=this.el.attachInternals()}};e.prototype.disconnectedCallback=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null};e.prototype.componentDidLoad=function(){var e=this;this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();exposeTypeProperty(this.el,(function(){return e._type}))};e.prototype.setupResizeObserver=function(){var e=this;if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((function(){requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}};e.prototype.updateCharacterCounterPosition=function(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}var e=this.nativeTextarea.offsetWidth;var i=this.nativeTextarea.offsetHeight;var t=this.characterCounter.offsetWidth;var r=this.characterCounter.offsetHeight;var a=e-t-8;var s=i-r-8;var n=Math.max(8,Math.min(a,e-t-8));var o=Math.max(8,Math.min(s,i-r-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left="".concat(n,"px");this.characterCounter.style.top="".concat(o,"px");this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"};e.prototype.renderCharacterCounter=function(){var e=this;if(!this.maxLength){return null}var i=this.getValue().length;return h("div",{class:"pds-textarea__character-counter",ref:function(i){return e.characterCounter=i},role:"status","aria-live":"polite","aria-label":"".concat(i," of ").concat(this.maxLength," characters")},i," / ",this.maxLength)};e.prototype.renderAction=function(){var e=this.el.querySelector('[slot="action"]')!==null;if(e){return h("div",{class:"pds-textarea__action",part:"action"},h("slot",{name:"action"}))}return null};e.prototype.updateFormValue=function(){if(this.internals&&this.internals.setFormValue){var e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}};e.prototype.formResetCallback=function(){this.value="";this.updateFormValue()};e.prototype.formDisabledCallback=function(e){this.disabled=e};e.prototype.formStateRestoreCallback=function(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){var i=e.get(this.name);if(typeof i==="string"){this.value=i}}};e.prototype.render=function(){var e=this;var i=this.getValue();return h(Host,{key:"3c78b9f124cf82fd48b2cbc29122c458d9918962","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},h("div",{key:"58ecb566c248304e19c33fab2431cf6062a203d7",class:"pds-textarea"},this.label&&h("div",{key:"ad2c21f27492d374c4f56fed0f203f72bc3a4a6e",class:"pds-textarea__label-wrapper"},h("label",{key:"f966575088fe5699951c7762938cb80304bb0df5",htmlFor:this.componentId},h("span",{key:"ad9370de15d0c41e065d99d3b9859eb8b343424a",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),h("div",{key:"e76662a380252b0813c0b00d42bfaa4239c063dd",class:"pds-textarea__field-wrapper"},h("textarea",Object.assign({key:"4f9b3250d888b9da284a5583b5042df4f25b66f5",ref:function(i){return e.nativeTextarea=i},"aria-describedby":assignDescription(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),i),this.renderCharacterCounter()),this.helperMessage&&h("p",{key:"5c53c22d2682d1960b31b2bc40ad6a83d445dda2",class:"pds-textarea__helper-message",id:messageId(this.componentId,"helper")},this.helperMessage),this.invalid&&h("p",{key:"74c79c4a218977a01932d1b94206b68867787064","aria-live":"assertive",class:"pds-textarea__error-message",id:messageId(this.componentId,"error")},h("pds-icon",{key:"c8118c35e1f6f6bcba281dd00e8abf8109827f30",icon:danger,size:"small"}),this.errorMessage)))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"],maxLength:["maxLengthChanged"]}},enumerable:false,configurable:true});return e}();PdsTextarea.style=labelCss+(pdsInputTokensCss+pdsTextareaCss);export{PdsTextarea as pds_textarea};
1
+ import{__awaiter,__generator}from"tslib";import{r as registerInstance,c as createEvent,h,H as Host,a as getElement}from"./index-DHPhrb5T.js";import{i as isRequired,e as exposeTypeProperty,a as assignDescription,m as messageId}from"./form-DwjNklzi.js";import{d as debounceEvent}from"./utils-tJa4KYNO.js";import{i as inheritAriaAttributes,a as inheritAttributes}from"./attributes-C0M1gTKv.js";import{b as danger}from"./index-DY8eSueV.js";var labelCss=":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";var pdsInputTokensCss=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";var pdsTextareaCss=":host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";var PdsTextarea=function(){function e(e){var i=this;registerInstance(this,e);this.pdsBlur=createEvent(this,"pdsBlur");this.pdsFocus=createEvent(this,"pdsFocus");this.pdsInput=createEvent(this,"pdsInput");this.pdsTextareaChange=createEvent(this,"pdsTextareaChange");this.pdsKeyDown=createEvent(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=function(e){i.hasFocus=false;if(i.focusedValue!==i.value){i.emitValueChange(e)}i.pdsBlur.emit(e)};this.onFocus=function(e){i.hasFocus=true;i.focusedValue=i.value;i.pdsFocus.emit(e)};this.onInput=function(e){var t=e.target;if(t){if(i.maxLength&&t.value.length>i.maxLength){t.value=t.value.substring(0,i.maxLength)}i.value=t.value||""}i.emitInputChange(e);if(i.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((function(){i.updateCharacterCounterPosition()}))}};this.onTextareaChange=function(e){i.emitValueChange(e)};this.onKeyDown=function(e){i.pdsKeyDown.emit(e)}}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeTextarea){this.nativeTextarea.focus()}return[2]}))}))};e.prototype.debounceChanged=function(){var e=this,i=e.pdsInput,t=e.debounce,a=e.originalPdsInput;this.pdsInput=t===undefined?a!==null&&a!==void 0?a:i:debounceEvent(i,t)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var i=this.getValue();if(e&&e.value!==i){e.value=i}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}};e.prototype.maxLengthChanged=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){var e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}};e.prototype.emitInputChange=function(e){var i=this.value;this.pdsInput.emit({value:i,event:e})};e.prototype.emitValueChange=function(e){var i=e.target;isRequired(i,this);var t=i.value;var a=t==null?t:t.toString();this.focusedValue=a;this.pdsTextareaChange.emit({value:a,event:e})};e.prototype.getValue=function(){return this.value||""};e.prototype.textareaClassNames=function(){var e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")};e.prototype.connectedCallback=function(){this.debounceChanged();if(this.el.attachInternals&&!this.internals){this.internals=this.el.attachInternals()}};e.prototype.disconnectedCallback=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},inheritAriaAttributes(this.el)),inheritAttributes(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null};e.prototype.componentDidLoad=function(){var e=this;this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();exposeTypeProperty(this.el,(function(){return e._type}))};e.prototype.setupResizeObserver=function(){var e=this;if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((function(){requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}};e.prototype.updateCharacterCounterPosition=function(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}var e=this.nativeTextarea.offsetWidth;var i=this.nativeTextarea.offsetHeight;var t=this.characterCounter.offsetWidth;var a=this.characterCounter.offsetHeight;var r=e-t-8;var s=i-a-8;var n=Math.max(8,Math.min(r,e-t-8));var o=Math.max(8,Math.min(s,i-a-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left="".concat(n,"px");this.characterCounter.style.top="".concat(o,"px");this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"};e.prototype.renderCharacterCounter=function(){var e=this;if(!this.maxLength){return null}var i=this.getValue().length;return h("div",{class:"pds-textarea__character-counter",ref:function(i){return e.characterCounter=i},role:"status","aria-live":"polite","aria-label":"".concat(i," of ").concat(this.maxLength," characters")},i," / ",this.maxLength)};e.prototype.renderAction=function(){var e=this.el.querySelector('[slot="action"]')!==null;if(e){return h("div",{class:"pds-textarea__action",part:"action"},h("slot",{name:"action"}))}return null};e.prototype.updateFormValue=function(){if(this.internals&&this.internals.setFormValue){var e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}};e.prototype.formResetCallback=function(){this.value="";this.updateFormValue()};e.prototype.formDisabledCallback=function(e){this.disabled=e};e.prototype.formStateRestoreCallback=function(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){var i=e.get(this.name);if(typeof i==="string"){this.value=i}}};e.prototype.render=function(){var e=this;var i=this.getValue();return h(Host,{key:"89ecd4a781f49c6db2efcb993ea5ce2cdcabab95","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},h("div",{key:"3970d9a4d469103ea6355b79642a67ea6be748df",class:"pds-textarea"},this.label&&h("div",{key:"74763078aefb4130859e2dac108c09ec70b7c57e",class:"pds-textarea__label-wrapper"},h("label",{key:"b40e73f522b76424a69b8423544deb3442d3d508",htmlFor:this.componentId},h("span",{key:"176b4c9fc6e41e0744a9a5e384b25c29ff759d6f",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),h("div",{key:"f2b0730430d5c3830193c5af859a5e5e6665017a",class:"pds-textarea__field-wrapper"},h("textarea",Object.assign({key:"293a1b5fd1c5f7c58077ecd7967d28001b8d423c",ref:function(i){return e.nativeTextarea=i},"aria-describedby":assignDescription(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),i),this.renderCharacterCounter()),this.helperMessage&&h("p",{key:"e9e848434ad237c6aeef144dbf7e23dee57caf55",class:"pds-textarea__helper-message",id:messageId(this.componentId,"helper")},this.helperMessage),this.invalid&&h("p",{key:"f1069f927a6d475a6b7dfa0f17eedcb04ed821ad","aria-live":"assertive",class:"pds-textarea__error-message",id:messageId(this.componentId,"error")},h("pds-icon",{key:"ad1105ae8d86d760d981a2fe3f888b219eaaa91e",icon:danger,size:"small"}),this.errorMessage)))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"],maxLength:["maxLengthChanged"]}},enumerable:false,configurable:true});return e}();PdsTextarea.style=labelCss+(pdsInputTokensCss+pdsTextareaCss);export{PdsTextarea as pds_textarea};
2
2
  //# sourceMappingURL=pds-textarea.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pds-textarea.entry.js","sources":["src/global/styles/utils/label.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-input/pds-input.tokens.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n:host([aria-disabled=\"true\"]) label {\n color: var(--pine-color-text-label-disabled);\n}\n\n:host([aria-readonly=\"true\"]) {\n label {\n color: var(--pine-color-text-label-readonly);\n }\n}\n\nlabel {\n color: var(--pine-color-text-label);\n font: var(--pine-typography-body-medium);\n letter-spacing: var(--pine-letter-spacing);\n}\n","@use '~@kajabi-ui/styles/dist/pine/components/pds-input/pds-input.tokens'\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n:host([aria-readonly=\"true\"]) {\n textarea {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n}\n\n:host([highlight]:not([disabled]):not([aria-disabled=\"true\"]):not([aria-readonly=\"true\"])) {\n .pds-textarea__field:not(.is-invalid) {\n background-color: var(--pine-color-accent-disabled);\n border-color: var(--pine-color-accent);\n color: var(--pine-color-text-accent);\n\n &:hover {\n border-color: var(--pine-color-accent-hover);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring);\n }\n\n ~ .pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);\n color: var(--pine-color-text-accent);\n }\n }\n}\n\n.pds-textarea {\n display: flex;\n flex-direction: column;\n}\n\n.pds-textarea__label-wrapper {\n align-items: center;\n display: flex;\n justify-content: space-between;\n}\n\n.pds-textarea__action {\n align-items: center;\n display: flex;\n gap: var(--pine-dimension-xs);\n margin-inline-start: var(--pine-dimension-xs);\n}\n\nlabel {\n display: block;\n margin-block-end: var(--pine-dimension-xs);\n}\n\n// When label is inside wrapper, remove its margin\n.pds-textarea__label-wrapper label {\n margin-block-end: 0;\n}\n\n.pds-textarea__helper-message {\n color: var(--pine-color-text-message);\n font: var(--pine-typography-body-sm-medium);\n margin-block-start: var(--pine-dimension-2xs);\n}\n\n.pds-textarea__error-message {\n color: var(--pine-color-text-message-danger);\n display: flex;\n font: var(--pine-typography-body-sm-medium);\n gap: var(--pine-dimension-2xs);\n margin-block-start: var(--pine-dimension-2xs);\n\n pds-icon {\n margin-block-start: var(--pine-dimension-025);\n }\n}\n\n.pds-textarea__field-wrapper {\n display: inline-block;\n position: relative;\n width: 100%;\n}\n\n.pds-textarea__field {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: calc(var(--pine-dimension-xs) * 1.25);\n box-sizing: border-box;\n color: var(--pine-color-text);\n font: var(--pine-typography-body);\n letter-spacing: var(--pine-letter-spacing);\n min-height: calc(var(--pine-dimension-xl) * 2);\n min-width: calc(var(--pine-dimension-xl) * 2);\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n resize: both;\n width: 100%;\n\n // Add bottom padding when character counter is present\n :host([max-length]) & {\n padding-bottom: calc(var(--pine-dimension-xs) + var(--pine-dimension-md));\n }\n\n &:hover:not(:disabled, .is-invalid) {\n border: var(--pine-border-hover);\n }\n\n &:disabled {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &::placeholder {\n color: var(--pine-color-text-placeholder);\n }\n\n &.is-invalid {\n background-color: var(--pine-input-color-background-danger);\n border-color: var(--pine-color-border-danger);\n\n :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring-danger);\n }\n }\n}\n\n.pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);\n border-radius: calc(var(--pine-dimension-2xs) * 0.5);\n color: var(--pine-color-text-muted);\n font: var(--pine-typography-body-sm-medium);\n padding: calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);\n pointer-events: none;\n position: absolute;\n user-select: none;\n white-space: nowrap;\n z-index: var(--pine-z-index);\n\n // Match textarea disabled state\n :host([aria-disabled=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n }\n\n // Match textarea readonly state\n :host([aria-readonly=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n\n // Match textarea invalid state - target when field has is-invalid class\n .pds-textarea__field.is-invalid ~ & {\n background-color: var(--pine-input-color-background-danger);\n\n :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n }\n}\n\n.visually-hidden {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: polygon(0 0, 0 0, 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, isRequired, messageId, exposeTypeProperty } from '../../utils/form';\nimport { TextareaChangeEventDetail, TextareaInputEventDetail } from './textarea-interface';\nimport { debounceEvent } from '@utils/utils';\nimport type { Attributes } from '@utils/attributes';\nimport { inheritAttributes, inheritAriaAttributes } from '@utils/attributes';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-textarea',\n styleUrls: [\n '../../global/styles/utils/label.scss',\n '../pds-input/pds-input.tokens.scss',\n 'pds-textarea.scss'\n ],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsTextarea {\n\n private nativeTextarea?: HTMLTextAreaElement\n private focusedValue?: string | null;\n private inheritedAttributes: Attributes = {};\n private originalPdsInput?: EventEmitter<TextareaInputEventDetail>;\n private internals?: ElementInternals;\n private resizeObserver?: ResizeObserver;\n private characterCounter?: HTMLElement;\n private readonly _type = 'textarea' as const;\n\n @Element() el: HTMLPdsTextareaElement;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() pdsInput: EventEmitter<TextareaInputEventDetail>;\n\n /**\n * Event emitted whenever the value of the textarea changes.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsTextareaChange: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Emitted when a key is pressed down in the textarea.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\n\n /**\n * Sets focus on the native `textarea` in the `pds-textarea`. Use this method instead of the global\n * `textarea.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeTextarea) {\n this.nativeTextarea.focus();\n }\n }\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines whether or not the textarea is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the event after each keystroke.\n */\n @Prop() debounce?: number;\n\n /**\n * Displays an error message below the textarea field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the textarea field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the textarea is invalid or throws an error.\n * @defaultValue false\n */\n @Prop({mutable: true}) invalid = false; // eslint-disable-line @stencil-community/strict-mutable\n\n /**\n * Text to be displayed as the textarea label.\n */\n @Prop() label?: string;\n\n /**\n * Visually hides the label text for instances where only the textarea should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Specifies the name. Submitted with the form name/value pair. This value will mirror the componentId.\n */\n @Prop() name: string = this.componentId;\n\n /**\n * Specifies a short hint that describes the expected value of the textarea.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the textarea is readonly.\n * @defaultValue false\n */\n @Prop() readonly = false;\n\n /**\n * Determines whether or not the textarea is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Sets number of rows of text visible without needing to scroll in the textarea.\n */\n @Prop() rows?: number;\n\n /**\n * Specifies the maximum number of characters allowed in the textarea. When set, displays a character counter.\n */\n @Prop({ reflect: true }) maxLength?: number;\n\n /**\n * Applies highlight styling to the textarea field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n @State() hasFocus = false;\n\n\n /**\n * If true, the textarea has action content in the label area\n */\n @State() hasAction = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeTextarea = this.nativeTextarea;\n const value = this.getValue();\n\n if (nativeTextarea && nativeTextarea.value !== value) {\n nativeTextarea.value = value;\n }\n\n // Update form value for Form Associated Custom Elements API\n this.updateFormValue();\n\n // Update character counter position in case content changes affect sizing\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n this.updateCharacterCounterPosition();\n }\n }\n\n @Watch('maxLength')\n protected maxLengthChanged() {\n // Setup or teardown ResizeObserver based on maxLength\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.maxLength && this.nativeTextarea) {\n this.setupResizeObserver();\n }\n\n // Update ElementInternals validity when maxLength changes\n if (this.internals && this.internals.setValidity && this.nativeTextarea) {\n const isTooLong = this.nativeTextarea.value.length > (this.maxLength || 0);\n this.internals.setValidity(\n { tooLong: isTooLong },\n isTooLong ? 'Value exceeds maxLength' : '',\n this.nativeTextarea\n );\n }\n }\n\n /**\n * Emits an `pdsInput` event.\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n this.pdsInput.emit({ value, event });\n }\n\n /**\n * Emits an `pdsTextareaChange` event.\n */\n private emitValueChange(event?: Event) {\n const textarea = event.target as HTMLTextAreaElement;\n isRequired(textarea, this);\n\n const { value } = textarea;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n this.focusedValue = newValue;\n this.pdsTextareaChange.emit({ value: newValue, event });\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLTextAreaElement | null;\n if (input) {\n // Handle maxLength validation\n if (this.maxLength && input.value.length > this.maxLength) {\n // Prevent input beyond maxLength\n input.value = input.value.substring(0, this.maxLength);\n }\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n\n // Update counter position when content changes\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n // Use requestAnimationFrame to ensure DOM is updated\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n };\n\n private onTextareaChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onKeyDown = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(ev);\n };\n\n private textareaClassNames() {\n const classNames = ['pds-textarea__field'];\n\n if (this.invalid && this.invalid === true) {\n classNames.push('is-invalid');\n }\n\n return classNames.join(' ');\n }\n\n connectedCallback() {\n this.debounceChanged();\n // Initialize ElementInternals for form association\n if (this.el.attachInternals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n disconnectedCallback() {\n // Clean up ResizeObserver\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el),\n };\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n }\n\n componentDidLoad() {\n this.originalPdsInput = this.pdsInput;\n // Set initial form value\n this.updateFormValue();\n\n // Setup ResizeObserver for character counter positioning\n this.setupResizeObserver();\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n /**\n * Sets up ResizeObserver to track textarea resize for character counter positioning\n */\n private setupResizeObserver() {\n if (!this.maxLength || !this.nativeTextarea) return;\n\n // ResizeObserver may not be available in test environments\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => {\n // Use requestAnimationFrame to ensure DOM updates are complete\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n });\n\n this.resizeObserver.observe(this.nativeTextarea);\n\n // Initial positioning with a small delay to ensure counter is rendered\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n }\n\n /**\n * Updates character counter position to stay within textarea boundaries during resize\n */\n private updateCharacterCounterPosition() {\n if (!this.characterCounter || !this.nativeTextarea) return;\n\n // Skip positioning in test environments where ResizeObserver isn't available\n if (typeof ResizeObserver === 'undefined') return;\n\n // Ensure the character counter has been rendered and has dimensions\n if (this.characterCounter.offsetWidth === 0 || this.characterCounter.offsetHeight === 0) {\n // Counter not ready or component hidden - return and let resize/input observers handle positioning later\n return;\n }\n\n // Position based on textarea's actual dimensions (which change during manual resize)\n const textareaWidth = this.nativeTextarea.offsetWidth;\n const textareaHeight = this.nativeTextarea.offsetHeight;\n const counterWidth = this.characterCounter.offsetWidth;\n const counterHeight = this.characterCounter.offsetHeight;\n\n // Calculate position within textarea boundaries with padding from edges\n const rightPosition = textareaWidth - counterWidth - 8;\n const bottomPosition = textareaHeight - counterHeight - 8;\n\n // Ensure counter stays within textarea boundaries even when resized very small\n const finalLeft = Math.max(8, Math.min(rightPosition, textareaWidth - counterWidth - 8));\n const finalTop = Math.max(8, Math.min(bottomPosition, textareaHeight - counterHeight - 8));\n\n // Apply absolute positioning within the field wrapper\n this.characterCounter.style.position = 'absolute';\n this.characterCounter.style.left = `${finalLeft}px`;\n this.characterCounter.style.top = `${finalTop}px`;\n this.characterCounter.style.right = 'auto';\n this.characterCounter.style.bottom = 'auto';\n }\n\n /**\n * Renders the character counter when maxLength is set\n */\n private renderCharacterCounter() {\n if (!this.maxLength) {\n return null;\n }\n\n const currentLength = this.getValue().length;\n return (\n <div\n class=\"pds-textarea__character-counter\"\n ref={(el) => this.characterCounter = el}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={`${currentLength} of ${this.maxLength} characters`}\n >\n {currentLength} / {this.maxLength}\n </div>\n );\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-textarea__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native textarea validation\n if (this.nativeTextarea && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeTextarea.validity,\n this.nativeTextarea.validationMessage,\n this.nativeTextarea\n );\n }\n }\n }\n\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value from FormData using the textarea's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const value = this.getValue();\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-action={this.hasAction && !this.hideLabel ? 'true' : null}\n >\n <div class=\"pds-textarea\">\n {this.label &&\n <div class=\"pds-textarea__label-wrapper\">\n <label htmlFor={this.componentId}>\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {!this.hideLabel && this.renderAction()}\n </div>\n }\n <div class=\"pds-textarea__field-wrapper\">\n <textarea\n ref={(el) => this.nativeTextarea = el }\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n class={this.textareaClassNames()}\n disabled={this.disabled}\n id={this.componentId}\n maxlength={this.maxLength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n rows={this.rows}\n onBlur={this.onBlur}\n onChange={this.onTextareaChange}\n onFocus={this.onFocus}\n onInput={this.onInput}\n onKeyDown={this.onKeyDown}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n {this.renderCharacterCounter()}\n </div>\n {this.helperMessage &&\n <p\n class=\"pds-textarea__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.invalid &&\n <p\n aria-live=\"assertive\"\n class=\"pds-textarea__error-message\"\n id={messageId(this.componentId, 'error')}\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,QAAQ,GAAG,oTAAoT;;ACArU,MAAM,iBAAiB,GAAG,uEAAuE;;ACAjG,MAAM,cAAc,GAAG,oxKAAoxK;;MCqB9xK,WAAW,GAAA,MAAA;AAVxB,IAAA,WAAA,CAAA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A,EACtC,IAAI,CAAC,YAAY,CAChB,CAEF,CACD;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"pds-textarea.entry.js","sources":["src/global/styles/utils/label.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-input/pds-input.tokens.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.scss?tag=pds-textarea&encapsulation=shadow","src/components/pds-textarea/pds-textarea.tsx"],"sourcesContent":[":host {\n display: inline-block;\n}\n\n:host([aria-disabled=\"true\"]) label {\n color: var(--pine-color-text-label-disabled);\n}\n\n:host([aria-readonly=\"true\"]) {\n label {\n color: var(--pine-color-text-label-readonly);\n }\n}\n\nlabel {\n color: var(--pine-color-text-label);\n font: var(--pine-typography-body-medium);\n letter-spacing: var(--pine-letter-spacing);\n}\n","@use '~@kajabi-ui/styles/dist/pine/components/pds-input/pds-input.tokens'\n",":host {\n display: inline-block;\n width: 100%;\n}\n\n:host([aria-readonly=\"true\"]) {\n textarea {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n}\n\n:host([highlight]:not([disabled]):not([aria-disabled=\"true\"]):not([aria-readonly=\"true\"])) {\n .pds-textarea__field:not(.is-invalid) {\n background-color: var(--pine-color-accent-disabled);\n border-color: var(--pine-color-accent);\n color: var(--pine-color-text-accent);\n\n &:hover {\n border-color: var(--pine-color-accent-hover);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring);\n }\n\n ~ .pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);\n color: var(--pine-color-text-accent);\n }\n }\n}\n\n.pds-textarea {\n display: flex;\n flex-direction: column;\n}\n\n.pds-textarea__label-wrapper {\n align-items: center;\n display: flex;\n justify-content: space-between;\n}\n\n.pds-textarea__action {\n align-items: center;\n display: flex;\n gap: var(--pine-dimension-xs);\n margin-inline-start: var(--pine-dimension-xs);\n}\n\nlabel {\n display: block;\n margin-block-end: var(--pine-dimension-xs);\n}\n\n// When label is inside wrapper, remove its margin\n.pds-textarea__label-wrapper label {\n margin-block-end: 0;\n}\n\n.pds-textarea__helper-message {\n color: var(--pine-color-text-message);\n font: var(--pine-typography-body-sm-medium);\n margin-block-start: var(--pine-dimension-2xs);\n}\n\n.pds-textarea__error-message {\n color: var(--pine-color-text-message-danger);\n display: flex;\n font: var(--pine-typography-body-sm-medium);\n gap: var(--pine-dimension-2xs);\n margin-block-start: var(--pine-dimension-2xs);\n\n pds-icon {\n margin-block-start: var(--pine-dimension-025);\n }\n}\n\n.pds-textarea__field-wrapper {\n display: inline-block;\n position: relative;\n width: 100%;\n}\n\n.pds-textarea__field {\n background-color: var(--pine-color-background-container);\n border: var(--pine-border);\n border-radius: calc(var(--pine-dimension-xs) * 1.25);\n box-sizing: border-box;\n color: var(--pine-color-text);\n font: var(--pine-typography-body);\n letter-spacing: var(--pine-letter-spacing);\n min-height: calc(var(--pine-dimension-xl) * 2);\n min-width: calc(var(--pine-dimension-xl) * 2);\n padding: var(--pine-dimension-xs) var(--pine-dimension-sm);\n resize: both;\n width: 100%;\n\n // Add bottom padding when character counter is present\n :host([max-length]) & {\n padding-bottom: calc(var(--pine-dimension-xs) + var(--pine-dimension-md));\n }\n\n &:hover:not(:disabled, .is-invalid) {\n border: var(--pine-border-hover);\n }\n\n &:disabled {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n cursor: not-allowed;\n }\n\n &:focus-visible {\n outline: var(--pine-outline-focus);\n outline-offset: var(--pine-border-width);\n }\n\n &::placeholder {\n color: var(--pine-color-text-placeholder);\n }\n\n &.is-invalid {\n background-color: var(--pine-input-color-background-danger);\n border-color: var(--pine-color-border-danger);\n\n :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n\n &:focus-visible {\n outline-color: var(--pine-color-focus-ring-danger);\n }\n }\n}\n\n.pds-textarea__character-counter {\n background: color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);\n border-radius: calc(var(--pine-dimension-2xs) * 0.5);\n color: var(--pine-color-text-muted);\n font: var(--pine-typography-body-sm-medium);\n padding: calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);\n pointer-events: none;\n position: absolute;\n user-select: none;\n white-space: nowrap;\n z-index: var(--pine-z-index);\n\n // Match textarea disabled state\n :host([aria-disabled=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-disabled);\n }\n\n // Match textarea readonly state\n :host([aria-readonly=\"true\"]) & {\n background-color: var(--pine-color-background-container-disabled);\n color: var(--pine-color-text-readonly);\n }\n\n // Match textarea invalid state - target when field has is-invalid class\n .pds-textarea__field.is-invalid ~ & {\n background-color: var(--pine-input-color-background-danger);\n\n :host-context([data-theme=\"dark\"]) & {\n background-color: var(--pine-color-red-950);\n }\n }\n}\n\n.visually-hidden {\n border: 0;\n clip: rect(0 0 0 0);\n clip-path: polygon(0 0, 0 0, 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n white-space: nowrap;\n width: 1px;\n}\n","import { Component, Element, Event, EventEmitter, Host, h, Method, Prop, State, Watch } from '@stencil/core';\nimport { assignDescription, isRequired, messageId, exposeTypeProperty } from '../../utils/form';\nimport { TextareaChangeEventDetail, TextareaInputEventDetail } from './textarea-interface';\nimport { debounceEvent } from '@utils/utils';\nimport type { Attributes } from '@utils/attributes';\nimport { inheritAttributes, inheritAriaAttributes } from '@utils/attributes';\nimport { danger } from '@pine-ds/icons/icons';\n\n/**\n * @slot action - Content to be displayed in the label area, typically for help icons or links\n */\n@Component({\n tag: 'pds-textarea',\n styleUrls: [\n '../../global/styles/utils/label.scss',\n '../pds-input/pds-input.tokens.scss',\n 'pds-textarea.scss'\n ],\n shadow: true,\n formAssociated: true,\n})\nexport class PdsTextarea {\n\n private nativeTextarea?: HTMLTextAreaElement\n private focusedValue?: string | null;\n private inheritedAttributes: Attributes = {};\n private originalPdsInput?: EventEmitter<TextareaInputEventDetail>;\n private internals?: ElementInternals;\n private resizeObserver?: ResizeObserver;\n private characterCounter?: HTMLElement;\n private readonly _type = 'textarea' as const;\n\n @Element() el: HTMLPdsTextareaElement;\n\n /**\n * Emitted when the input loses focus.\n */\n @Event() pdsBlur!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when the input has focus.\n */\n @Event() pdsFocus!: EventEmitter<FocusEvent>;\n\n /**\n * Emitted when a keyboard input occurs.\n *\n * For elements that accept text input (`type=text`, `type=tel`, etc.), the interface\n * is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,\n * the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If\n * the input is cleared on edit, the type is `null`.\n */\n @Event() pdsInput: EventEmitter<TextareaInputEventDetail>;\n\n /**\n * Event emitted whenever the value of the textarea changes.\n *\n * This event will not emit when programmatically setting the `value` property.\n */\n @Event() pdsTextareaChange: EventEmitter<TextareaChangeEventDetail>;\n\n /**\n * Emitted when a key is pressed down in the textarea.\n */\n @Event() pdsKeyDown!: EventEmitter<KeyboardEvent>;\n\n /**\n * Sets focus on the native `textarea` in the `pds-textarea`. Use this method instead of the global\n * `textarea.focus()`.\n */\n @Method()\n async setFocus() {\n if (this.nativeTextarea) {\n this.nativeTextarea.focus();\n }\n }\n\n /**\n * Specifies if and how the browser provides `autocomplete` assistance for the field.\n */\n @Prop() autocomplete: string;\n\n /**\n * A unique identifier used for the underlying component `id` attribute.\n */\n @Prop() componentId!: string;\n\n /**\n * Determines whether or not the textarea is disabled.\n * @defaultValue false\n */\n @Prop() disabled = false;\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the event after each keystroke.\n */\n @Prop() debounce?: number;\n\n /**\n * Displays an error message below the textarea field.\n */\n @Prop() errorMessage?: string;\n\n /**\n * Displays a message or hint below the textarea field.\n */\n @Prop() helperMessage?: string;\n\n /**\n * Determines whether or not the textarea is invalid or throws an error.\n * @defaultValue false\n */\n @Prop({mutable: true}) invalid = false; // eslint-disable-line @stencil-community/strict-mutable\n\n /**\n * Text to be displayed as the textarea label.\n */\n @Prop() label?: string;\n\n /**\n * Visually hides the label text for instances where only the textarea should be displayed. Label remains accessible to assistive technology such as screen readers.\n * Note: When true, the action slot is also hidden to maintain a minimal UI.\n */\n @Prop() hideLabel: boolean;\n\n /**\n * Specifies the name. Submitted with the form name/value pair. This value will mirror the componentId.\n */\n @Prop() name: string = this.componentId;\n\n /**\n * Specifies a short hint that describes the expected value of the textarea.\n */\n @Prop() placeholder?: string;\n\n /**\n * Determines whether or not the textarea is readonly.\n * @defaultValue false\n */\n @Prop() readonly = false;\n\n /**\n * Determines whether or not the textarea is required.\n * @defaultValue false\n */\n @Prop() required = false;\n\n /**\n * Sets number of rows of text visible without needing to scroll in the textarea.\n */\n @Prop() rows?: number;\n\n /**\n * Specifies the maximum number of characters allowed in the textarea. When set, displays a character counter.\n */\n @Prop({ reflect: true }) maxLength?: number;\n\n /**\n * Applies highlight styling to the textarea field.\n */\n @Prop({ reflect: true }) highlight?: boolean;\n\n /**\n * The value of the textarea.\n */\n @Prop({mutable: true}) value?: string | null = '';\n\n @State() hasFocus = false;\n\n\n /**\n * If true, the textarea has action content in the label area\n */\n @State() hasAction = false;\n\n @Watch('debounce')\n protected debounceChanged() {\n const { pdsInput, debounce, originalPdsInput } = this;\n\n this.pdsInput = debounce === undefined ? originalPdsInput ?? pdsInput : debounceEvent(pdsInput, debounce);\n }\n\n /**\n * Update the native input element when the value changes\n */\n @Watch('value')\n protected valueChanged() {\n const nativeTextarea = this.nativeTextarea;\n const value = this.getValue();\n\n if (nativeTextarea && nativeTextarea.value !== value) {\n nativeTextarea.value = value;\n }\n\n // Update form value for Form Associated Custom Elements API\n this.updateFormValue();\n\n // Update character counter position in case content changes affect sizing\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n this.updateCharacterCounterPosition();\n }\n }\n\n @Watch('maxLength')\n protected maxLengthChanged() {\n // Setup or teardown ResizeObserver based on maxLength\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n\n if (this.maxLength && this.nativeTextarea) {\n this.setupResizeObserver();\n }\n\n // Update ElementInternals validity when maxLength changes\n if (this.internals && this.internals.setValidity && this.nativeTextarea) {\n const isTooLong = this.nativeTextarea.value.length > (this.maxLength || 0);\n this.internals.setValidity(\n { tooLong: isTooLong },\n isTooLong ? 'Value exceeds maxLength' : '',\n this.nativeTextarea\n );\n }\n }\n\n /**\n * Emits an `pdsInput` event.\n */\n private emitInputChange(event?: Event) {\n const { value } = this;\n this.pdsInput.emit({ value, event });\n }\n\n /**\n * Emits an `pdsTextareaChange` event.\n */\n private emitValueChange(event?: Event) {\n const textarea = event.target as HTMLTextAreaElement;\n isRequired(textarea, this);\n\n const { value } = textarea;\n\n // Checks for both null and undefined values\n const newValue = value == null ? value : value.toString();\n this.focusedValue = newValue;\n this.pdsTextareaChange.emit({ value: newValue, event });\n }\n\n private getValue(): string {\n return this.value || '';\n }\n\n private onBlur = (ev: FocusEvent) => {\n this.hasFocus = false;\n\n if (this.focusedValue !== this.value) {\n this.emitValueChange(ev);\n }\n\n this.pdsBlur.emit(ev);\n };\n\n private onFocus = (ev: FocusEvent) => {\n this.hasFocus = true;\n this.focusedValue = this.value;\n\n this.pdsFocus.emit(ev);\n };\n\n private onInput = (ev: Event) => {\n const input = ev.target as HTMLTextAreaElement | null;\n if (input) {\n // Handle maxLength validation\n if (this.maxLength && input.value.length > this.maxLength) {\n // Prevent input beyond maxLength\n input.value = input.value.substring(0, this.maxLength);\n }\n this.value = input.value || '';\n }\n this.emitInputChange(ev);\n\n // Update counter position when content changes\n if (this.maxLength && typeof ResizeObserver !== 'undefined') {\n // Use requestAnimationFrame to ensure DOM is updated\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n };\n\n private onTextareaChange = (ev: Event) => {\n this.emitValueChange(ev);\n };\n\n private onKeyDown = (ev: KeyboardEvent) => {\n this.pdsKeyDown.emit(ev);\n };\n\n private textareaClassNames() {\n const classNames = ['pds-textarea__field'];\n\n if (this.invalid && this.invalid === true) {\n classNames.push('is-invalid');\n }\n\n return classNames.join(' ');\n }\n\n connectedCallback() {\n this.debounceChanged();\n // Initialize ElementInternals for form association (only once per element instance)\n if (this.el.attachInternals && !this.internals) {\n this.internals = this.el.attachInternals();\n }\n }\n\n disconnectedCallback() {\n // Clean up ResizeObserver\n if (this.resizeObserver) {\n this.resizeObserver.disconnect();\n }\n }\n\n componentWillLoad() {\n this.inheritedAttributes = {\n ...inheritAriaAttributes(this.el),\n ...inheritAttributes(this.el),\n };\n this.hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n }\n\n componentDidLoad() {\n this.originalPdsInput = this.pdsInput;\n // Set initial form value\n this.updateFormValue();\n\n // Setup ResizeObserver for character counter positioning\n this.setupResizeObserver();\n\n // Expose type property on the element instance to match native form element behavior\n exposeTypeProperty(this.el, () => this._type);\n }\n\n /**\n * Sets up ResizeObserver to track textarea resize for character counter positioning\n */\n private setupResizeObserver() {\n if (!this.maxLength || !this.nativeTextarea) return;\n\n // ResizeObserver may not be available in test environments\n if (typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => {\n // Use requestAnimationFrame to ensure DOM updates are complete\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n });\n\n this.resizeObserver.observe(this.nativeTextarea);\n\n // Initial positioning with a small delay to ensure counter is rendered\n requestAnimationFrame(() => {\n this.updateCharacterCounterPosition();\n });\n }\n }\n\n /**\n * Updates character counter position to stay within textarea boundaries during resize\n */\n private updateCharacterCounterPosition() {\n if (!this.characterCounter || !this.nativeTextarea) return;\n\n // Skip positioning in test environments where ResizeObserver isn't available\n if (typeof ResizeObserver === 'undefined') return;\n\n // Ensure the character counter has been rendered and has dimensions\n if (this.characterCounter.offsetWidth === 0 || this.characterCounter.offsetHeight === 0) {\n // Counter not ready or component hidden - return and let resize/input observers handle positioning later\n return;\n }\n\n // Position based on textarea's actual dimensions (which change during manual resize)\n const textareaWidth = this.nativeTextarea.offsetWidth;\n const textareaHeight = this.nativeTextarea.offsetHeight;\n const counterWidth = this.characterCounter.offsetWidth;\n const counterHeight = this.characterCounter.offsetHeight;\n\n // Calculate position within textarea boundaries with padding from edges\n const rightPosition = textareaWidth - counterWidth - 8;\n const bottomPosition = textareaHeight - counterHeight - 8;\n\n // Ensure counter stays within textarea boundaries even when resized very small\n const finalLeft = Math.max(8, Math.min(rightPosition, textareaWidth - counterWidth - 8));\n const finalTop = Math.max(8, Math.min(bottomPosition, textareaHeight - counterHeight - 8));\n\n // Apply absolute positioning within the field wrapper\n this.characterCounter.style.position = 'absolute';\n this.characterCounter.style.left = `${finalLeft}px`;\n this.characterCounter.style.top = `${finalTop}px`;\n this.characterCounter.style.right = 'auto';\n this.characterCounter.style.bottom = 'auto';\n }\n\n /**\n * Renders the character counter when maxLength is set\n */\n private renderCharacterCounter() {\n if (!this.maxLength) {\n return null;\n }\n\n const currentLength = this.getValue().length;\n return (\n <div\n class=\"pds-textarea__character-counter\"\n ref={(el) => this.characterCounter = el}\n role=\"status\"\n aria-live=\"polite\"\n aria-label={`${currentLength} of ${this.maxLength} characters`}\n >\n {currentLength} / {this.maxLength}\n </div>\n );\n }\n\n private renderAction() {\n const hasAction = this.el.querySelector('[slot=\"action\"]') !== null;\n if (hasAction) {\n return (\n <div class=\"pds-textarea__action\" part=\"action\">\n <slot name=\"action\"></slot>\n </div>\n );\n }\n return null;\n }\n\n /**\n * Updates the form value using ElementInternals API\n */\n private updateFormValue() {\n if (this.internals && this.internals.setFormValue) {\n const value = this.getValue();\n this.internals.setFormValue(value || null);\n\n // Set validity based on native textarea validation\n if (this.nativeTextarea && this.internals && this.internals.setValidity) {\n this.internals.setValidity(\n this.nativeTextarea.validity,\n this.nativeTextarea.validationMessage,\n this.nativeTextarea\n );\n }\n }\n }\n\n\n /**\n * Form Associated Custom Elements API: Called when the form is reset\n */\n formResetCallback() {\n this.value = '';\n this.updateFormValue();\n }\n\n /**\n * Form Associated Custom Elements API: Called when the form is disabled\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Form Associated Custom Elements API: Called to restore form state\n */\n formStateRestoreCallback(state: string | FormData | null) {\n if (typeof state === 'string') {\n this.value = state;\n } else if (state instanceof FormData && this.name) {\n // Extract value from FormData using the textarea's name\n const value = state.get(this.name);\n if (typeof value === 'string') {\n this.value = value;\n }\n }\n }\n\n render() {\n const value = this.getValue();\n\n return (\n <Host\n aria-disabled={this.disabled ? 'true' : null}\n aria-readonly={this.readonly ? 'true' : null}\n has-action={this.hasAction && !this.hideLabel ? 'true' : null}\n >\n <div class=\"pds-textarea\">\n {this.label &&\n <div class=\"pds-textarea__label-wrapper\">\n <label htmlFor={this.componentId}>\n <span class={this.hideLabel ? 'visually-hidden' : ''}>\n {this.label}\n </span>\n </label>\n {!this.hideLabel && this.renderAction()}\n </div>\n }\n <div class=\"pds-textarea__field-wrapper\">\n <textarea\n ref={(el) => this.nativeTextarea = el }\n aria-describedby={assignDescription(this.componentId, this.invalid, this.helperMessage)}\n aria-invalid={this.invalid ? \"true\" : undefined}\n autocomplete={this.autocomplete}\n class={this.textareaClassNames()}\n disabled={this.disabled}\n id={this.componentId}\n maxlength={this.maxLength}\n name={this.name}\n placeholder={this.placeholder}\n readOnly={this.readonly}\n required={this.required}\n rows={this.rows}\n onBlur={this.onBlur}\n onChange={this.onTextareaChange}\n onFocus={this.onFocus}\n onInput={this.onInput}\n onKeyDown={this.onKeyDown}\n {...this.inheritedAttributes}\n >\n {value}\n </textarea>\n {this.renderCharacterCounter()}\n </div>\n {this.helperMessage &&\n <p\n class=\"pds-textarea__helper-message\"\n id={messageId(this.componentId, 'helper')}\n >\n {this.helperMessage}\n </p>\n }\n {this.invalid &&\n <p\n aria-live=\"assertive\"\n class=\"pds-textarea__error-message\"\n id={messageId(this.componentId, 'error')}\n >\n <pds-icon icon={danger} size=\"small\" />\n {this.errorMessage}\n </p>\n }\n </div>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";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A6B,EACnC,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,EAAA,EAExC,CAAA,CAAA,UAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAU,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,OAAO,EAAG,CAAA,EACtC,IAAI,CAAC,YAAY,CAChB,CAEF,CACD;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,r){function a(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?t(e.value):a(e.value).then(o,s)}l((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,a,n,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=s(0),o["throw"]=s(1),o["return"]=s(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(i){return l([e,i])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(t=0)),t)try{if(r=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;a=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){t.label=s[1];break}if(s[0]===6&&t.label<n[1]){t.label=n[1];n=s;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(s);break}if(n[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];a=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-5D9wXQuJ.system.js","./p-BHavepTY.system.js","./p-BG6uGRQj.system.js","./p-BhQhw0S3.system.js","./p-CP48ADFM.system.js"],(function(e){"use strict";var i,t,r,a,n,o,s,l,c,d,h,u,p;return{setters:[function(e){i=e.r;t=e.c;r=e.h;a=e.H;n=e.a},function(e){o=e.i;s=e.e;l=e.a;c=e.m},function(e){d=e.d},function(e){h=e.i;u=e.a},function(e){p=e.b}],execute:function(){var f=":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";var b=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";var v=":host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";var x=e("pds_textarea",function(){function e(e){var r=this;i(this,e);this.pdsBlur=t(this,"pdsBlur");this.pdsFocus=t(this,"pdsFocus");this.pdsInput=t(this,"pdsInput");this.pdsTextareaChange=t(this,"pdsTextareaChange");this.pdsKeyDown=t(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=function(e){r.hasFocus=false;if(r.focusedValue!==r.value){r.emitValueChange(e)}r.pdsBlur.emit(e)};this.onFocus=function(e){r.hasFocus=true;r.focusedValue=r.value;r.pdsFocus.emit(e)};this.onInput=function(e){var i=e.target;if(i){if(r.maxLength&&i.value.length>r.maxLength){i.value=i.value.substring(0,r.maxLength)}r.value=i.value||""}r.emitInputChange(e);if(r.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((function(){r.updateCharacterCounterPosition()}))}};this.onTextareaChange=function(e){r.emitValueChange(e)};this.onKeyDown=function(e){r.pdsKeyDown.emit(e)}}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeTextarea){this.nativeTextarea.focus()}return[2]}))}))};e.prototype.debounceChanged=function(){var e=this,i=e.pdsInput,t=e.debounce,r=e.originalPdsInput;this.pdsInput=t===undefined?r!==null&&r!==void 0?r:i:d(i,t)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var i=this.getValue();if(e&&e.value!==i){e.value=i}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}};e.prototype.maxLengthChanged=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){var e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}};e.prototype.emitInputChange=function(e){var i=this.value;this.pdsInput.emit({value:i,event:e})};e.prototype.emitValueChange=function(e){var i=e.target;o(i,this);var t=i.value;var r=t==null?t:t.toString();this.focusedValue=r;this.pdsTextareaChange.emit({value:r,event:e})};e.prototype.getValue=function(){return this.value||""};e.prototype.textareaClassNames=function(){var e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")};e.prototype.connectedCallback=function(){this.debounceChanged();if(this.el.attachInternals){this.internals=this.el.attachInternals()}};e.prototype.disconnectedCallback=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},h(this.el)),u(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null};e.prototype.componentDidLoad=function(){var e=this;this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();s(this.el,(function(){return e._type}))};e.prototype.setupResizeObserver=function(){var e=this;if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((function(){requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}};e.prototype.updateCharacterCounterPosition=function(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}var e=this.nativeTextarea.offsetWidth;var i=this.nativeTextarea.offsetHeight;var t=this.characterCounter.offsetWidth;var r=this.characterCounter.offsetHeight;var a=e-t-8;var n=i-r-8;var o=Math.max(8,Math.min(a,e-t-8));var s=Math.max(8,Math.min(n,i-r-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left="".concat(o,"px");this.characterCounter.style.top="".concat(s,"px");this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"};e.prototype.renderCharacterCounter=function(){var e=this;if(!this.maxLength){return null}var i=this.getValue().length;return r("div",{class:"pds-textarea__character-counter",ref:function(i){return e.characterCounter=i},role:"status","aria-live":"polite","aria-label":"".concat(i," of ").concat(this.maxLength," characters")},i," / ",this.maxLength)};e.prototype.renderAction=function(){var e=this.el.querySelector('[slot="action"]')!==null;if(e){return r("div",{class:"pds-textarea__action",part:"action"},r("slot",{name:"action"}))}return null};e.prototype.updateFormValue=function(){if(this.internals&&this.internals.setFormValue){var e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}};e.prototype.formResetCallback=function(){this.value="";this.updateFormValue()};e.prototype.formDisabledCallback=function(e){this.disabled=e};e.prototype.formStateRestoreCallback=function(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){var i=e.get(this.name);if(typeof i==="string"){this.value=i}}};e.prototype.render=function(){var e=this;var i=this.getValue();return r(a,{key:"3c78b9f124cf82fd48b2cbc29122c458d9918962","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},r("div",{key:"58ecb566c248304e19c33fab2431cf6062a203d7",class:"pds-textarea"},this.label&&r("div",{key:"ad2c21f27492d374c4f56fed0f203f72bc3a4a6e",class:"pds-textarea__label-wrapper"},r("label",{key:"f966575088fe5699951c7762938cb80304bb0df5",htmlFor:this.componentId},r("span",{key:"ad9370de15d0c41e065d99d3b9859eb8b343424a",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),r("div",{key:"e76662a380252b0813c0b00d42bfaa4239c063dd",class:"pds-textarea__field-wrapper"},r("textarea",Object.assign({key:"4f9b3250d888b9da284a5583b5042df4f25b66f5",ref:function(i){return e.nativeTextarea=i},"aria-describedby":l(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),i),this.renderCharacterCounter()),this.helperMessage&&r("p",{key:"5c53c22d2682d1960b31b2bc40ad6a83d445dda2",class:"pds-textarea__helper-message",id:c(this.componentId,"helper")},this.helperMessage),this.invalid&&r("p",{key:"74c79c4a218977a01932d1b94206b68867787064","aria-live":"assertive",class:"pds-textarea__error-message",id:c(this.componentId,"error")},r("pds-icon",{key:"c8118c35e1f6f6bcba281dd00e8abf8109827f30",icon:p,size:"small"}),this.errorMessage)))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"],maxLength:["maxLengthChanged"]}},enumerable:false,configurable:true});return e}());x.style=f+(b+v)}}}));
2
- //# sourceMappingURL=p-cfb24f97.system.entry.js.map
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,r){function a(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,n){function o(e){try{l(r.next(e))}catch(e){n(e)}}function s(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?t(e.value):a(e.value).then(o,s)}l((r=r.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,a,n,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=s(0),o["throw"]=s(1),o["return"]=s(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(i){return l([e,i])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(t=0)),t)try{if(r=1,a&&(n=s[0]&2?a["return"]:s[0]?a["throw"]||((n=a["return"])&&n.call(a),0):a.next)&&!(n=n.call(a,s[1])).done)return n;if(a=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;a=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(n=t.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){t.label=s[1];break}if(s[0]===6&&t.label<n[1]){t.label=n[1];n=s;break}if(n&&t.label<n[2]){t.label=n[2];t.ops.push(s);break}if(n[2])t.ops.pop();t.trys.pop();continue}s=i.call(e,t)}catch(e){s=[6,e];a=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-5D9wXQuJ.system.js","./p-BHavepTY.system.js","./p-BG6uGRQj.system.js","./p-BhQhw0S3.system.js","./p-CP48ADFM.system.js"],(function(e){"use strict";var i,t,r,a,n,o,s,l,c,d,h,u,p;return{setters:[function(e){i=e.r;t=e.c;r=e.h;a=e.H;n=e.a},function(e){o=e.i;s=e.e;l=e.a;c=e.m},function(e){d=e.d},function(e){h=e.i;u=e.a},function(e){p=e.b}],execute:function(){var f=":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";var b=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";var v=":host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";var x=e("pds_textarea",function(){function e(e){var r=this;i(this,e);this.pdsBlur=t(this,"pdsBlur");this.pdsFocus=t(this,"pdsFocus");this.pdsInput=t(this,"pdsInput");this.pdsTextareaChange=t(this,"pdsTextareaChange");this.pdsKeyDown=t(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=function(e){r.hasFocus=false;if(r.focusedValue!==r.value){r.emitValueChange(e)}r.pdsBlur.emit(e)};this.onFocus=function(e){r.hasFocus=true;r.focusedValue=r.value;r.pdsFocus.emit(e)};this.onInput=function(e){var i=e.target;if(i){if(r.maxLength&&i.value.length>r.maxLength){i.value=i.value.substring(0,r.maxLength)}r.value=i.value||""}r.emitInputChange(e);if(r.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((function(){r.updateCharacterCounterPosition()}))}};this.onTextareaChange=function(e){r.emitValueChange(e)};this.onKeyDown=function(e){r.pdsKeyDown.emit(e)}}e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.nativeTextarea){this.nativeTextarea.focus()}return[2]}))}))};e.prototype.debounceChanged=function(){var e=this,i=e.pdsInput,t=e.debounce,r=e.originalPdsInput;this.pdsInput=t===undefined?r!==null&&r!==void 0?r:i:d(i,t)};e.prototype.valueChanged=function(){var e=this.nativeTextarea;var i=this.getValue();if(e&&e.value!==i){e.value=i}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}};e.prototype.maxLengthChanged=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){var e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}};e.prototype.emitInputChange=function(e){var i=this.value;this.pdsInput.emit({value:i,event:e})};e.prototype.emitValueChange=function(e){var i=e.target;o(i,this);var t=i.value;var r=t==null?t:t.toString();this.focusedValue=r;this.pdsTextareaChange.emit({value:r,event:e})};e.prototype.getValue=function(){return this.value||""};e.prototype.textareaClassNames=function(){var e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")};e.prototype.connectedCallback=function(){this.debounceChanged();if(this.el.attachInternals&&!this.internals){this.internals=this.el.attachInternals()}};e.prototype.disconnectedCallback=function(){if(this.resizeObserver){this.resizeObserver.disconnect()}};e.prototype.componentWillLoad=function(){this.inheritedAttributes=Object.assign(Object.assign({},h(this.el)),u(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null};e.prototype.componentDidLoad=function(){var e=this;this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();s(this.el,(function(){return e._type}))};e.prototype.setupResizeObserver=function(){var e=this;if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((function(){requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((function(){e.updateCharacterCounterPosition()}))}};e.prototype.updateCharacterCounterPosition=function(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}var e=this.nativeTextarea.offsetWidth;var i=this.nativeTextarea.offsetHeight;var t=this.characterCounter.offsetWidth;var r=this.characterCounter.offsetHeight;var a=e-t-8;var n=i-r-8;var o=Math.max(8,Math.min(a,e-t-8));var s=Math.max(8,Math.min(n,i-r-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left="".concat(o,"px");this.characterCounter.style.top="".concat(s,"px");this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"};e.prototype.renderCharacterCounter=function(){var e=this;if(!this.maxLength){return null}var i=this.getValue().length;return r("div",{class:"pds-textarea__character-counter",ref:function(i){return e.characterCounter=i},role:"status","aria-live":"polite","aria-label":"".concat(i," of ").concat(this.maxLength," characters")},i," / ",this.maxLength)};e.prototype.renderAction=function(){var e=this.el.querySelector('[slot="action"]')!==null;if(e){return r("div",{class:"pds-textarea__action",part:"action"},r("slot",{name:"action"}))}return null};e.prototype.updateFormValue=function(){if(this.internals&&this.internals.setFormValue){var e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}};e.prototype.formResetCallback=function(){this.value="";this.updateFormValue()};e.prototype.formDisabledCallback=function(e){this.disabled=e};e.prototype.formStateRestoreCallback=function(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){var i=e.get(this.name);if(typeof i==="string"){this.value=i}}};e.prototype.render=function(){var e=this;var i=this.getValue();return r(a,{key:"89ecd4a781f49c6db2efcb993ea5ce2cdcabab95","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},r("div",{key:"3970d9a4d469103ea6355b79642a67ea6be748df",class:"pds-textarea"},this.label&&r("div",{key:"74763078aefb4130859e2dac108c09ec70b7c57e",class:"pds-textarea__label-wrapper"},r("label",{key:"b40e73f522b76424a69b8423544deb3442d3d508",htmlFor:this.componentId},r("span",{key:"176b4c9fc6e41e0744a9a5e384b25c29ff759d6f",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),r("div",{key:"f2b0730430d5c3830193c5af859a5e5e6665017a",class:"pds-textarea__field-wrapper"},r("textarea",Object.assign({key:"293a1b5fd1c5f7c58077ecd7967d28001b8d423c",ref:function(i){return e.nativeTextarea=i},"aria-describedby":l(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),i),this.renderCharacterCounter()),this.helperMessage&&r("p",{key:"e9e848434ad237c6aeef144dbf7e23dee57caf55",class:"pds-textarea__helper-message",id:c(this.componentId,"helper")},this.helperMessage),this.invalid&&r("p",{key:"f1069f927a6d475a6b7dfa0f17eedcb04ed821ad","aria-live":"assertive",class:"pds-textarea__error-message",id:c(this.componentId,"error")},r("pds-icon",{key:"ad1105ae8d86d760d981a2fe3f888b219eaaa91e",icon:p,size:"small"}),this.errorMessage)))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["debounceChanged"],value:["valueChanged"],maxLength:["maxLengthChanged"]}},enumerable:false,configurable:true});return e}());x.style=f+(b+v)}}}));
2
+ //# sourceMappingURL=p-205ec2ac.system.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["System","register","exports","registerInstance","createEvent","h","Host","getElement","isRequired","exposeTypeProperty","assignDescription","messageId","debounceEvent","inheritAriaAttributes","inheritAttributes","danger","setters","module","r","c","H","a","i","e","m","d","b","execute","labelCss","pdsInputTokensCss","pdsTextareaCss","PdsTextarea","class_1","hostRef","_this","this","pdsBlur","pdsFocus","pdsInput","pdsTextareaChange","pdsKeyDown","inheritedAttributes","_type","disabled","invalid","name","componentId","readonly","required","value","hasFocus","hasAction","onBlur","ev","focusedValue","emitValueChange","emit","onFocus","onInput","input","target","maxLength","length","substring","emitInputChange","ResizeObserver","requestAnimationFrame","updateCharacterCounterPosition","onTextareaChange","onKeyDown","prototype","setFocus","nativeTextarea","focus","debounceChanged","_a","debounce","originalPdsInput","undefined","valueChanged","getValue","updateFormValue","maxLengthChanged","resizeObserver","disconnect","setupResizeObserver","internals","setValidity","isTooLong","tooLong","event","textarea","newValue","toString","textareaClassNames","classNames","push","join","connectedCallback","el","attachInternals","disconnectedCallback","componentWillLoad","Object","assign","querySelector","componentDidLoad","observe","characterCounter","offsetWidth","offsetHeight","textareaWidth","textareaHeight","counterWidth","counterHeight","rightPosition","bottomPosition","finalLeft","Math","max","min","finalTop","style","position","left","concat","top","right","bottom","renderCharacterCounter","currentLength","class","ref","role","renderAction","part","setFormValue","validity","validationMessage","formResetCallback","formDisabledCallback","formStateRestoreCallback","state","FormData","get","render","key","hideLabel","label","htmlFor","helperMessage","autocomplete","id","maxlength","placeholder","readOnly","rows","onChange","icon","size","errorMessage","defineProperty"],"sources":["module.ts"],"mappings":"8hDAAAA,OAAOC,SAAS,CAAC,yBAA0B,yBAA0B,yBAA0B,yBAA0B,2BAA2B,SAAWC,GAC7J,aACA,IAAIC,EAAkBC,EAAaC,EAAGC,EAAMC,EAAYC,EAAYC,EAAoBC,EAAmBC,EAAWC,EAAeC,EAAuBC,EAAmBC,EAC/K,MAAO,CACLC,QAAS,CAAC,SAAUC,GAClBd,EAAmBc,EAAOC,EAC1Bd,EAAca,EAAOE,EACrBd,EAAIY,EAAOZ,EACXC,EAAOW,EAAOG,EACdb,EAAaU,EAAOI,CACtB,EAAG,SAAUJ,GACXT,EAAaS,EAAOK,EACpBb,EAAqBQ,EAAOM,EAC5Bb,EAAoBO,EAAOI,EAC3BV,EAAYM,EAAOO,CACrB,EAAG,SAAUP,GACXL,EAAgBK,EAAOQ,CACzB,EAAG,SAAUR,GACXJ,EAAwBI,EAAOK,EAC/BR,EAAoBG,EAAOI,CAC7B,EAAG,SAAUJ,GACXF,EAASE,EAAOS,CAClB,GACAC,QAAS,WAEP,IAAMC,EAAW,qTAEjB,IAAMC,EAAoB,wEAE1B,IAAMC,EAAiB,qxKAEvB,IAAMC,EAAc7B,EAAQ,eAAc,WACtC,SAAA8B,EAAYC,GAAZ,IAAAC,EAAAC,KACIhC,EAAiBgC,KAA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AAE6I,IAAK,2CAA4CY,KAAM/I,EAAQgJ,KAAM,UAAY5H,KAAK6H,eACpR,EACAzD,OAAA0D,eAAWjI,EAAA,iBAAc,C,IAAzB,WAA8B,OAAO,IAAM,E,qCAC3CuE,OAAA0D,eAAIjI,EAAAsC,UAAA,KAAE,C,IAAN,WAAW,OAAO/D,EAAW4B,KAAO,E,qCACpCoE,OAAA0D,eAAWjI,EAAA,WAAQ,C,IAAnB,WAAwB,MAAO,CAC3B4C,SAAY,CAAC,mBACb3B,MAAS,CAAC,gBACVY,UAAa,CAAC,oBACf,E,qCACP,OAAA7B,CAAA,CAhT0C,IAiT1CD,EAAY2F,MAAQ9F,GAAYC,EAAoBC,EAErD,EAEJ","ignoreList":[]}
1
+ {"version":3,"names":["System","register","exports","registerInstance","createEvent","h","Host","getElement","isRequired","exposeTypeProperty","assignDescription","messageId","debounceEvent","inheritAriaAttributes","inheritAttributes","danger","setters","module","r","c","H","a","i","e","m","d","b","execute","labelCss","pdsInputTokensCss","pdsTextareaCss","PdsTextarea","class_1","hostRef","_this","this","pdsBlur","pdsFocus","pdsInput","pdsTextareaChange","pdsKeyDown","inheritedAttributes","_type","disabled","invalid","name","componentId","readonly","required","value","hasFocus","hasAction","onBlur","ev","focusedValue","emitValueChange","emit","onFocus","onInput","input","target","maxLength","length","substring","emitInputChange","ResizeObserver","requestAnimationFrame","updateCharacterCounterPosition","onTextareaChange","onKeyDown","prototype","setFocus","nativeTextarea","focus","debounceChanged","_a","debounce","originalPdsInput","undefined","valueChanged","getValue","updateFormValue","maxLengthChanged","resizeObserver","disconnect","setupResizeObserver","internals","setValidity","isTooLong","tooLong","event","textarea","newValue","toString","textareaClassNames","classNames","push","join","connectedCallback","el","attachInternals","disconnectedCallback","componentWillLoad","Object","assign","querySelector","componentDidLoad","observe","characterCounter","offsetWidth","offsetHeight","textareaWidth","textareaHeight","counterWidth","counterHeight","rightPosition","bottomPosition","finalLeft","Math","max","min","finalTop","style","position","left","concat","top","right","bottom","renderCharacterCounter","currentLength","class","ref","role","renderAction","part","setFormValue","validity","validationMessage","formResetCallback","formDisabledCallback","formStateRestoreCallback","state","FormData","get","render","key","hideLabel","label","htmlFor","helperMessage","autocomplete","id","maxlength","placeholder","readOnly","rows","onChange","icon","size","errorMessage","defineProperty"],"sources":["module.ts"],"mappings":"8hDAAAA,OAAOC,SAAS,CAAC,yBAA0B,yBAA0B,yBAA0B,yBAA0B,2BAA2B,SAAWC,GAC7J,aACA,IAAIC,EAAkBC,EAAaC,EAAGC,EAAMC,EAAYC,EAAYC,EAAoBC,EAAmBC,EAAWC,EAAeC,EAAuBC,EAAmBC,EAC/K,MAAO,CACLC,QAAS,CAAC,SAAUC,GAClBd,EAAmBc,EAAOC,EAC1Bd,EAAca,EAAOE,EACrBd,EAAIY,EAAOZ,EACXC,EAAOW,EAAOG,EACdb,EAAaU,EAAOI,CACtB,EAAG,SAAUJ,GACXT,EAAaS,EAAOK,EACpBb,EAAqBQ,EAAOM,EAC5Bb,EAAoBO,EAAOI,EAC3BV,EAAYM,EAAOO,CACrB,EAAG,SAAUP,GACXL,EAAgBK,EAAOQ,CACzB,EAAG,SAAUR,GACXJ,EAAwBI,EAAOK,EAC/BR,EAAoBG,EAAOI,CAC7B,EAAG,SAAUJ,GACXF,EAASE,EAAOS,CAClB,GACAC,QAAS,WAEP,IAAMC,EAAW,qTAEjB,IAAMC,EAAoB,wEAE1B,IAAMC,EAAiB,qxKAEvB,IAAMC,EAAc7B,EAAQ,eAAc,WACtC,SAAA8B,EAAYC,GAAZ,IAAAC,EAAAC,KACIhC,EAAiBgC,KAAMF,GACvBE,KAAKC,QAAUhC,EAAY+B,KAAM,WACjCA,KAAKE,SAAWjC,EAAY+B,KAAM,YAClCA,KAAKG,SAAWlC,EAAY+B,KAAM,YAClCA,KAAKI,kBAAoBnC,EAAY+B,KAAM,qBAC3CA,KAAKK,WAAapC,EAAY+B,KAAM,cACpCA,KAAKM,oBAAsB,GAC3BN,KAAKO,MAAQ,WAKbP,K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pCoE,OAAA0D,eAAWjI,EAAA,WAAQ,C,IAAnB,WAAwB,MAAO,CAC3B4C,SAAY,CAAC,mBACb3B,MAAS,CAAC,gBACVY,UAAa,CAAC,oBACf,E,qCACP,OAAA7B,CAAA,CAhT0C,IAiT1CD,EAAY2F,MAAQ9F,GAAYC,EAAoBC,EAErD,EAEJ","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as e,c as t,h as i,H as a,a as s}from"./p-DHPhrb5T.js";import{i as r,e as o,a as n,m as l}from"./p-DwjNklzi.js";import{d}from"./p-tJa4KYNO.js";import{i as c,a as h}from"./p-C0M1gTKv.js";import{b as p}from"./p-DY8eSueV.js";const b=":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";const u=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";const f=":host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";const x=class{constructor(i){e(this,i);this.pdsBlur=t(this,"pdsBlur");this.pdsFocus=t(this,"pdsFocus");this.pdsInput=t(this,"pdsInput");this.pdsTextareaChange=t(this,"pdsTextareaChange");this.pdsKeyDown=t(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=e=>{this.hasFocus=false;if(this.focusedValue!==this.value){this.emitValueChange(e)}this.pdsBlur.emit(e)};this.onFocus=e=>{this.hasFocus=true;this.focusedValue=this.value;this.pdsFocus.emit(e)};this.onInput=e=>{const t=e.target;if(t){if(this.maxLength&&t.value.length>this.maxLength){t.value=t.value.substring(0,this.maxLength)}this.value=t.value||""}this.emitInputChange(e);if(this.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))}};this.onTextareaChange=e=>{this.emitValueChange(e)};this.onKeyDown=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){if(this.nativeTextarea){this.nativeTextarea.focus()}}debounceChanged(){const{pdsInput:e,debounce:t,originalPdsInput:i}=this;this.pdsInput=t===undefined?i!==null&&i!==void 0?i:e:d(e,t)}valueChanged(){const e=this.nativeTextarea;const t=this.getValue();if(e&&e.value!==t){e.value=t}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}}maxLengthChanged(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){const e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}}emitInputChange(e){const{value:t}=this;this.pdsInput.emit({value:t,event:e})}emitValueChange(e){const t=e.target;r(t,this);const{value:i}=t;const a=i==null?i:i.toString();this.focusedValue=a;this.pdsTextareaChange.emit({value:a,event:e})}getValue(){return this.value||""}textareaClassNames(){const e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")}connectedCallback(){this.debounceChanged();if(this.el.attachInternals){this.internals=this.el.attachInternals()}}disconnectedCallback(){if(this.resizeObserver){this.resizeObserver.disconnect()}}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},c(this.el)),h(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null}componentDidLoad(){this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();o(this.el,(()=>this._type))}setupResizeObserver(){if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))}}updateCharacterCounterPosition(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}const e=this.nativeTextarea.offsetWidth;const t=this.nativeTextarea.offsetHeight;const i=this.characterCounter.offsetWidth;const a=this.characterCounter.offsetHeight;const s=e-i-8;const r=t-a-8;const o=Math.max(8,Math.min(s,e-i-8));const n=Math.max(8,Math.min(r,t-a-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left=`${o}px`;this.characterCounter.style.top=`${n}px`;this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"}renderCharacterCounter(){if(!this.maxLength){return null}const e=this.getValue().length;return i("div",{class:"pds-textarea__character-counter",ref:e=>this.characterCounter=e,role:"status","aria-live":"polite","aria-label":`${e} of ${this.maxLength} characters`},e," / ",this.maxLength)}renderAction(){const e=this.el.querySelector('[slot="action"]')!==null;if(e){return i("div",{class:"pds-textarea__action",part:"action"},i("slot",{name:"action"}))}return null}updateFormValue(){if(this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}}formResetCallback(){this.value="";this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){const t=e.get(this.name);if(typeof t==="string"){this.value=t}}}render(){const e=this.getValue();return i(a,{key:"3c78b9f124cf82fd48b2cbc29122c458d9918962","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},i("div",{key:"58ecb566c248304e19c33fab2431cf6062a203d7",class:"pds-textarea"},this.label&&i("div",{key:"ad2c21f27492d374c4f56fed0f203f72bc3a4a6e",class:"pds-textarea__label-wrapper"},i("label",{key:"f966575088fe5699951c7762938cb80304bb0df5",htmlFor:this.componentId},i("span",{key:"ad9370de15d0c41e065d99d3b9859eb8b343424a",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),i("div",{key:"e76662a380252b0813c0b00d42bfaa4239c063dd",class:"pds-textarea__field-wrapper"},i("textarea",Object.assign({key:"4f9b3250d888b9da284a5583b5042df4f25b66f5",ref:e=>this.nativeTextarea=e,"aria-describedby":n(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),e),this.renderCharacterCounter()),this.helperMessage&&i("p",{key:"5c53c22d2682d1960b31b2bc40ad6a83d445dda2",class:"pds-textarea__helper-message",id:l(this.componentId,"helper")},this.helperMessage),this.invalid&&i("p",{key:"74c79c4a218977a01932d1b94206b68867787064","aria-live":"assertive",class:"pds-textarea__error-message",id:l(this.componentId,"error")},i("pds-icon",{key:"c8118c35e1f6f6bcba281dd00e8abf8109827f30",icon:p,size:"small"}),this.errorMessage)))}static get formAssociated(){return true}get el(){return s(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"],maxLength:["maxLengthChanged"]}}};x.style=b+(u+f);export{x as pds_textarea};
2
- //# sourceMappingURL=p-2cd0d520.entry.js.map
1
+ import{r as e,c as t,h as i,H as a,a as s}from"./p-DHPhrb5T.js";import{i as r,e as o,a as n,m as l}from"./p-DwjNklzi.js";import{d}from"./p-tJa4KYNO.js";import{i as c,a as h}from"./p-C0M1gTKv.js";import{b as p}from"./p-DY8eSueV.js";const b=":host{display:inline-block}:host([aria-disabled=true]) label{color:var(--pine-color-text-label-disabled)}:host([aria-readonly=true]) label{color:var(--pine-color-text-label-readonly)}label{color:var(--pine-color-text-label);font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing)}";const u=":host{--pine-input-color-background-danger:var(--pine-color-red-050)}";const f=":host{display:inline-block;width:100%}:host([aria-readonly=true]) textarea{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid){background-color:var(--pine-color-accent-disabled);border-color:var(--pine-color-accent);color:var(--pine-color-text-accent)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):hover{border-color:var(--pine-color-accent-hover)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid):focus-visible{outline-color:var(--pine-color-focus-ring)}:host([highlight]:not([disabled]):not([aria-disabled=true]):not([aria-readonly=true])) .pds-textarea__field:not(.is-invalid)~.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-accent-disabled) 80%, transparent);color:var(--pine-color-text-accent)}.pds-textarea{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.pds-textarea__label-wrapper{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.pds-textarea__action{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);-webkit-margin-start:var(--pine-dimension-xs);margin-inline-start:var(--pine-dimension-xs)}label{display:block;-webkit-margin-after:var(--pine-dimension-xs);margin-block-end:var(--pine-dimension-xs)}.pds-textarea__label-wrapper label{-webkit-margin-after:0;margin-block-end:0}.pds-textarea__helper-message{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm-medium);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message{color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm-medium);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs)}.pds-textarea__error-message pds-icon{-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.pds-textarea__field-wrapper{display:inline-block;position:relative;width:100%}.pds-textarea__field{background-color:var(--pine-color-background-container);border:var(--pine-border);border-radius:calc(var(--pine-dimension-xs) * 1.25);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--pine-color-text);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-height:calc(var(--pine-dimension-xl) * 2);min-width:calc(var(--pine-dimension-xl) * 2);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);resize:both;width:100%}:host([max-length]) .pds-textarea__field{padding-bottom:calc(var(--pine-dimension-xs) + var(--pine-dimension-md))}.pds-textarea__field:hover:not(:disabled,.is-invalid){border:var(--pine-border-hover)}.pds-textarea__field:disabled{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-textarea__field:focus-visible{outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-textarea__field::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field::placeholder{color:var(--pine-color-text-placeholder)}.pds-textarea__field.is-invalid{background-color:var(--pine-input-color-background-danger);border-color:var(--pine-color-border-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid{background-color:var(--pine-color-red-950)}.pds-textarea__field.is-invalid:focus-visible{outline-color:var(--pine-color-focus-ring-danger)}.pds-textarea__character-counter{background:color-mix(in srgb, var(--pine-color-background-container) 80%, transparent);border-radius:calc(var(--pine-dimension-2xs) * 0.5);color:var(--pine-color-text-muted);font:var(--pine-typography-body-sm-medium);padding:calc(var(--pine-dimension-2xs) * 0.5) var(--pine-dimension-2xs);pointer-events:none;position:absolute;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;z-index:var(--pine-z-index)}:host([aria-disabled=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-disabled)}:host([aria-readonly=true]) .pds-textarea__character-counter{background-color:var(--pine-color-background-container-disabled);color:var(--pine-color-text-readonly)}.pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-input-color-background-danger)}:host-context([data-theme=dark]) .pds-textarea__field.is-invalid~.pds-textarea__character-counter{background-color:var(--pine-color-red-950)}.visually-hidden{border:0;clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";const x=class{constructor(i){e(this,i);this.pdsBlur=t(this,"pdsBlur");this.pdsFocus=t(this,"pdsFocus");this.pdsInput=t(this,"pdsInput");this.pdsTextareaChange=t(this,"pdsTextareaChange");this.pdsKeyDown=t(this,"pdsKeyDown");this.inheritedAttributes={};this._type="textarea";this.disabled=false;this.invalid=false;this.name=this.componentId;this.readonly=false;this.required=false;this.value="";this.hasFocus=false;this.hasAction=false;this.onBlur=e=>{this.hasFocus=false;if(this.focusedValue!==this.value){this.emitValueChange(e)}this.pdsBlur.emit(e)};this.onFocus=e=>{this.hasFocus=true;this.focusedValue=this.value;this.pdsFocus.emit(e)};this.onInput=e=>{const t=e.target;if(t){if(this.maxLength&&t.value.length>this.maxLength){t.value=t.value.substring(0,this.maxLength)}this.value=t.value||""}this.emitInputChange(e);if(this.maxLength&&typeof ResizeObserver!=="undefined"){requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))}};this.onTextareaChange=e=>{this.emitValueChange(e)};this.onKeyDown=e=>{this.pdsKeyDown.emit(e)}}async setFocus(){if(this.nativeTextarea){this.nativeTextarea.focus()}}debounceChanged(){const{pdsInput:e,debounce:t,originalPdsInput:i}=this;this.pdsInput=t===undefined?i!==null&&i!==void 0?i:e:d(e,t)}valueChanged(){const e=this.nativeTextarea;const t=this.getValue();if(e&&e.value!==t){e.value=t}this.updateFormValue();if(this.maxLength&&typeof ResizeObserver!=="undefined"){this.updateCharacterCounterPosition()}}maxLengthChanged(){if(this.resizeObserver){this.resizeObserver.disconnect()}if(this.maxLength&&this.nativeTextarea){this.setupResizeObserver()}if(this.internals&&this.internals.setValidity&&this.nativeTextarea){const e=this.nativeTextarea.value.length>(this.maxLength||0);this.internals.setValidity({tooLong:e},e?"Value exceeds maxLength":"",this.nativeTextarea)}}emitInputChange(e){const{value:t}=this;this.pdsInput.emit({value:t,event:e})}emitValueChange(e){const t=e.target;r(t,this);const{value:i}=t;const a=i==null?i:i.toString();this.focusedValue=a;this.pdsTextareaChange.emit({value:a,event:e})}getValue(){return this.value||""}textareaClassNames(){const e=["pds-textarea__field"];if(this.invalid&&this.invalid===true){e.push("is-invalid")}return e.join(" ")}connectedCallback(){this.debounceChanged();if(this.el.attachInternals&&!this.internals){this.internals=this.el.attachInternals()}}disconnectedCallback(){if(this.resizeObserver){this.resizeObserver.disconnect()}}componentWillLoad(){this.inheritedAttributes=Object.assign(Object.assign({},c(this.el)),h(this.el));this.hasAction=this.el.querySelector('[slot="action"]')!==null}componentDidLoad(){this.originalPdsInput=this.pdsInput;this.updateFormValue();this.setupResizeObserver();o(this.el,(()=>this._type))}setupResizeObserver(){if(!this.maxLength||!this.nativeTextarea)return;if(typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((()=>{requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))}));this.resizeObserver.observe(this.nativeTextarea);requestAnimationFrame((()=>{this.updateCharacterCounterPosition()}))}}updateCharacterCounterPosition(){if(!this.characterCounter||!this.nativeTextarea)return;if(typeof ResizeObserver==="undefined")return;if(this.characterCounter.offsetWidth===0||this.characterCounter.offsetHeight===0){return}const e=this.nativeTextarea.offsetWidth;const t=this.nativeTextarea.offsetHeight;const i=this.characterCounter.offsetWidth;const a=this.characterCounter.offsetHeight;const s=e-i-8;const r=t-a-8;const o=Math.max(8,Math.min(s,e-i-8));const n=Math.max(8,Math.min(r,t-a-8));this.characterCounter.style.position="absolute";this.characterCounter.style.left=`${o}px`;this.characterCounter.style.top=`${n}px`;this.characterCounter.style.right="auto";this.characterCounter.style.bottom="auto"}renderCharacterCounter(){if(!this.maxLength){return null}const e=this.getValue().length;return i("div",{class:"pds-textarea__character-counter",ref:e=>this.characterCounter=e,role:"status","aria-live":"polite","aria-label":`${e} of ${this.maxLength} characters`},e," / ",this.maxLength)}renderAction(){const e=this.el.querySelector('[slot="action"]')!==null;if(e){return i("div",{class:"pds-textarea__action",part:"action"},i("slot",{name:"action"}))}return null}updateFormValue(){if(this.internals&&this.internals.setFormValue){const e=this.getValue();this.internals.setFormValue(e||null);if(this.nativeTextarea&&this.internals&&this.internals.setValidity){this.internals.setValidity(this.nativeTextarea.validity,this.nativeTextarea.validationMessage,this.nativeTextarea)}}}formResetCallback(){this.value="";this.updateFormValue()}formDisabledCallback(e){this.disabled=e}formStateRestoreCallback(e){if(typeof e==="string"){this.value=e}else if(e instanceof FormData&&this.name){const t=e.get(this.name);if(typeof t==="string"){this.value=t}}}render(){const e=this.getValue();return i(a,{key:"89ecd4a781f49c6db2efcb993ea5ce2cdcabab95","aria-disabled":this.disabled?"true":null,"aria-readonly":this.readonly?"true":null,"has-action":this.hasAction&&!this.hideLabel?"true":null},i("div",{key:"3970d9a4d469103ea6355b79642a67ea6be748df",class:"pds-textarea"},this.label&&i("div",{key:"74763078aefb4130859e2dac108c09ec70b7c57e",class:"pds-textarea__label-wrapper"},i("label",{key:"b40e73f522b76424a69b8423544deb3442d3d508",htmlFor:this.componentId},i("span",{key:"176b4c9fc6e41e0744a9a5e384b25c29ff759d6f",class:this.hideLabel?"visually-hidden":""},this.label)),!this.hideLabel&&this.renderAction()),i("div",{key:"f2b0730430d5c3830193c5af859a5e5e6665017a",class:"pds-textarea__field-wrapper"},i("textarea",Object.assign({key:"293a1b5fd1c5f7c58077ecd7967d28001b8d423c",ref:e=>this.nativeTextarea=e,"aria-describedby":n(this.componentId,this.invalid,this.helperMessage),"aria-invalid":this.invalid?"true":undefined,autocomplete:this.autocomplete,class:this.textareaClassNames(),disabled:this.disabled,id:this.componentId,maxlength:this.maxLength,name:this.name,placeholder:this.placeholder,readOnly:this.readonly,required:this.required,rows:this.rows,onBlur:this.onBlur,onChange:this.onTextareaChange,onFocus:this.onFocus,onInput:this.onInput,onKeyDown:this.onKeyDown},this.inheritedAttributes),e),this.renderCharacterCounter()),this.helperMessage&&i("p",{key:"e9e848434ad237c6aeef144dbf7e23dee57caf55",class:"pds-textarea__helper-message",id:l(this.componentId,"helper")},this.helperMessage),this.invalid&&i("p",{key:"f1069f927a6d475a6b7dfa0f17eedcb04ed821ad","aria-live":"assertive",class:"pds-textarea__error-message",id:l(this.componentId,"error")},i("pds-icon",{key:"ad1105ae8d86d760d981a2fe3f888b219eaaa91e",icon:p,size:"small"}),this.errorMessage)))}static get formAssociated(){return true}get el(){return s(this)}static get watchers(){return{debounce:["debounceChanged"],value:["valueChanged"],maxLength:["maxLengthChanged"]}}};x.style=b+(u+f);export{x as pds_textarea};
2
+ //# sourceMappingURL=p-3440138d.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["registerInstance","createEvent","h","Host","getElement","isRequired","exposeTypeProperty","assignDescription","messageId","debounceEvent","inheritAriaAttributes","inheritAttributes","danger","labelCss","pdsInputTokensCss","pdsTextareaCss","PdsTextarea","constructor","hostRef","this","pdsBlur","pdsFocus","pdsInput","pdsTextareaChange","pdsKeyDown","inheritedAttributes","_type","disabled","invalid","name","componentId","readonly","required","value","hasFocus","hasAction","onBlur","ev","focusedValue","emitValueChange","emit","onFocus","onInput","input","target","maxLength","length","substring","emitInputChange","ResizeObserver","requestAnimationFrame","updateCharacterCounterPosition","onTextareaChange","onKeyDown","setFocus","nativeTextarea","focus","debounceChanged","debounce","originalPdsInput","undefined","valueChanged","getValue","updateFormValue","maxLengthChanged","resizeObserver","disconnect","setupResizeObserver","internals","setValidity","isTooLong","tooLong","event","textarea","newValue","toString","textareaClassNames","classNames","push","join","connectedCallback","el","attachInternals","disconnectedCallback","componentWillLoad","Object","assign","querySelector","componentDidLoad","observe","characterCounter","offsetWidth","offsetHeight","textareaWidth","textareaHeight","counterWidth","counterHeight","rightPosition","bottomPosition","finalLeft","Math","max","min","finalTop","style","position","left","top","right","bottom","renderCharacterCounter","currentLength","class","ref","role","renderAction","part","setFormValue","validity","validationMessage","formResetCallback","formDisabledCallback","formStateRestoreCallback","state","FormData","get","render","key","hideLabel","label","htmlFor","helperMessage","autocomplete","id","maxlength","placeholder","readOnly","rows","onChange","icon","size","errorMessage","formAssociated","watchers"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,OAAQC,OAAWC,MAAkB,8BACzEC,OAAiBC,OAAyBC,OAAwBC,MAAiB,yBACnFC,MAAqB,8BACrBC,OAA4BC,MAAyB,8BACrDC,MAAc,kBAE5B,MAAMC,EAAW,qTAEjB,MAAMC,EAAoB,wEAE1B,MAAMC,EAAiB,qxKAEvB,MAAMC,EAAc,MAChB,WAAAC,CAAYC,GACRlB,EAAiBmB,KAAMD,GACvBC,KAAKC,QAAUnB,EAAYkB,KAAM,WACjCA,KAAKE,SAAWpB,EAAY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W,YAAawG,UAAWnH,KAAK0B,UAAWhB,KAAMV,KAAKU,KAAM0G,YAAapH,KAAKoH,YAAaC,SAAUrH,KAAKY,SAAUC,SAAUb,KAAKa,SAAUyG,KAAMtH,KAAKsH,KAAMrG,OAAQjB,KAAKiB,OAAQsG,SAAUvH,KAAKiC,iBAAkBX,QAAStB,KAAKsB,QAASC,QAASvB,KAAKuB,QAASW,UAAWlC,KAAKkC,WAAalC,KAAKM,qBAAsBQ,GAAQd,KAAK2F,0BAA2B3F,KAAKgH,eACtpCjI,EAAE,IAAK,CAAE6H,IAAK,2CAA4Cf,MAAO,+BAAgCqB,GAAI7H,EAAUW,KAAKW,YAAa,WAAaX,KAAKgH,eAAgBhH,KAAKS,SACxK1B,EAAE,IAAK,CAAE6H,IAAK,2CAA4C,YAAa,YAAaf,MAAO,8BAA+BqB,GAAI7H,EAAUW,KAAKW,YAAa,UAAY5B,EAAE,WAAY,CAAE6H,IAAK,2CAA4CY,KAAM/H,EAAQgI,KAAM,UAAYzH,KAAK0H,eACpR,CACA,yBAAWC,GAAmB,OAAO,IAAM,CAC3C,MAAI7D,GAAO,OAAO7E,EAAWe,KAAO,CACpC,mBAAW4H,GAAa,MAAO,CAC3BrF,SAAY,CAAC,mBACbzB,MAAS,CAAC,gBACVY,UAAa,CAAC,oBACf,GAEP7B,EAAYwF,MAAQ3F,GAAYC,EAAoBC,UAE3CC","ignoreList":[]}
1
+ {"version":3,"names":["registerInstance","createEvent","h","Host","getElement","isRequired","exposeTypeProperty","assignDescription","messageId","debounceEvent","inheritAriaAttributes","inheritAttributes","danger","labelCss","pdsInputTokensCss","pdsTextareaCss","PdsTextarea","constructor","hostRef","this","pdsBlur","pdsFocus","pdsInput","pdsTextareaChange","pdsKeyDown","inheritedAttributes","_type","disabled","invalid","name","componentId","readonly","required","value","hasFocus","hasAction","onBlur","ev","focusedValue","emitValueChange","emit","onFocus","onInput","input","target","maxLength","length","substring","emitInputChange","ResizeObserver","requestAnimationFrame","updateCharacterCounterPosition","onTextareaChange","onKeyDown","setFocus","nativeTextarea","focus","debounceChanged","debounce","originalPdsInput","undefined","valueChanged","getValue","updateFormValue","maxLengthChanged","resizeObserver","disconnect","setupResizeObserver","internals","setValidity","isTooLong","tooLong","event","textarea","newValue","toString","textareaClassNames","classNames","push","join","connectedCallback","el","attachInternals","disconnectedCallback","componentWillLoad","Object","assign","querySelector","componentDidLoad","observe","characterCounter","offsetWidth","offsetHeight","textareaWidth","textareaHeight","counterWidth","counterHeight","rightPosition","bottomPosition","finalLeft","Math","max","min","finalTop","style","position","left","top","right","bottom","renderCharacterCounter","currentLength","class","ref","role","renderAction","part","setFormValue","validity","validationMessage","formResetCallback","formDisabledCallback","formStateRestoreCallback","state","FormData","get","render","key","hideLabel","label","htmlFor","helperMessage","autocomplete","id","maxlength","placeholder","readOnly","rows","onChange","icon","size","errorMessage","formAssociated","watchers"],"sources":["0"],"mappings":"YAAcA,OAAuBC,OAAaC,OAAQC,OAAWC,MAAkB,8BACzEC,OAAiBC,OAAyBC,OAAwBC,MAAiB,yBACnFC,MAAqB,8BACrBC,OAA4BC,MAAyB,8BACrDC,MAAc,kBAE5B,MAAMC,EAAW,qTAEjB,MAAMC,EAAoB,wEAE1B,MAAMC,EAAiB,qxKAEvB,MAAMC,EAAc,MAChB,WAAAC,CAAYC,GACRlB,EAAiBmB,KAAMD,GACvBC,KAAKC,QAAUnB,EAAYkB,KAAM,WACjCA,KAAKE,SAAWpB,EAAYkB,KAAM,YAClCA,KAAKG,SAAWrB,EAAYkB,KAAM,YAClCA,KAAKI,kBAAoBtB,EAAYkB,KAAM,qBAC3CA,KAAKK,WAAavB,EAAYkB,KAAM,cACpCA,KAAKM,oBAAsB,CAAC,EAC5BN,KAAKO,MAAQ,WAKbP,KAAKQ,SAAW,MAKhBR,KAAKS,QAAU,MAIfT,KAAKU,KAAOV,KAAKW,YAKjBX,KAAKY,SAAW,MAKhBZ,KAAKa,SAAW,MAIhBb,KAAKc,MAAQ,GACbd,KAAKe,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3F,KAAKgH,eACtpCjI,EAAE,IAAK,CAAE6H,IAAK,2CAA4Cf,MAAO,+BAAgCqB,GAAI7H,EAAUW,KAAKW,YAAa,WAAaX,KAAKgH,eAAgBhH,KAAKS,SACxK1B,EAAE,IAAK,CAAE6H,IAAK,2CAA4C,YAAa,YAAaf,MAAO,8BAA+BqB,GAAI7H,EAAUW,KAAKW,YAAa,UAAY5B,EAAE,WAAY,CAAE6H,IAAK,2CAA4CY,KAAM/H,EAAQgI,KAAM,UAAYzH,KAAK0H,eACpR,CACA,yBAAWC,GAAmB,OAAO,IAAM,CAC3C,MAAI7D,GAAO,OAAO7E,EAAWe,KAAO,CACpC,mBAAW4H,GAAa,MAAO,CAC3BrF,SAAY,CAAC,mBACbzB,MAAS,CAAC,gBACVY,UAAa,CAAC,oBACf,GAEP7B,EAAYwF,MAAQ3F,GAAYC,EAAoBC,UAE3CC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,n){function r(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?t(e.value):r(e.value).then(o,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,r,s,o=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=a(0),o["throw"]=a(1),o["return"]=a(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(t=0)),t)try{if(n=1,r&&(s=a[0]&2?r["return"]:a[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,a[1])).done)return s;if(r=0,s)a=[a[0]&2,s.value];switch(a[0]){case 0:case 1:s=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;r=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(s=t.trys,s=s.length>0&&s[s.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!s||a[1]>s[0]&&a[1]<s[3])){t.label=a[1];break}if(a[0]===6&&t.label<s[1]){t.label=s[1];s=a;break}if(s&&t.label<s[2]){t.label=s[2];t.ops.push(a);break}if(s[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];r=0}finally{n=s=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,i,t){if(t||arguments.length===2)for(var n=0,r=i.length,s;n<r;n++){if(s||!(n in i)){if(!s)s=Array.prototype.slice.call(i,0,n);s[n]=i[n]}}return e.concat(s||Array.prototype.slice.call(i))};System.register(["./p-5D9wXQuJ.system.js","./p-D2eS6fhD.system.js","./p-BG6uGRQj.system.js","./p-BHavepTY.system.js","./p-CP48ADFM.system.js"],(function(e){"use strict";var i,t,n,r,s,o,a,l,c,d,u,p,h,f,v,m;return{setters:[function(e){i=e.r;t=e.c;n=e.h;r=e.H;s=e.a},function(e){o=e.a;a=e.c;l=e.o;c=e.f;d=e.s;u=e.b},function(e){p=e.d},function(e){h=e.a;f=e.m},function(e){v=e.e;m=e.b}],execute:function(){var b=":host{display:block}:host([aria-disabled=true]) .pds-multiselect__trigger{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}:host([aria-disabled=true]) .pds-multiselect__icon{color:var(--pine-color-text-disabled)}.pds-multiselect{position:relative}.pds-multiselect__label{color:var(--pine-color-text-label);display:block;font:var(--pine-typography-body-medium);letter-spacing:var(--pine-letter-spacing);-webkit-margin-after:var(--pine-dimension-2xs);margin-block-end:var(--pine-dimension-2xs)}.pds-multiselect__wrapper{position:relative}.pds-multiselect__trigger{-ms-flex-align:center;align-items:center;background:var(--pine-color-background-container);border:var(--pine-border);border-radius:var(--pine-dimension-125);cursor:pointer;display:-ms-flexbox;display:flex;font:var(--pine-typography-body);gap:var(--pine-dimension-xs);-ms-flex-pack:justify;justify-content:space-between;letter-spacing:var(--pine-letter-spacing);min-height:var(--pine-dimension-550);padding:var(--pine-dimension-xs) var(--pine-dimension-sm);position:relative;text-align:start;-webkit-transition:border-color 0.2s ease, -webkit-box-shadow 0.2s ease;transition:border-color 0.2s ease, -webkit-box-shadow 0.2s ease;transition:border-color 0.2s ease, box-shadow 0.2s ease;transition:border-color 0.2s ease, box-shadow 0.2s ease, -webkit-box-shadow 0.2s ease;width:100%}.pds-multiselect__trigger:hover:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-hover)}.pds-multiselect__trigger:focus:not(.pds-multiselect__trigger--disabled){border-color:var(--pine-color-border-active);outline:var(--pine-outline-focus);outline-offset:var(--pine-border-width)}.pds-multiselect__trigger.pds-multiselect__trigger--open{border-color:var(--pine-color-border-active)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid{background-color:var(--pine-color-red-050);border-color:var(--pine-color-border-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--invalid:focus{outline-color:var(--pine-color-focus-ring-danger)}.pds-multiselect__trigger.pds-multiselect__trigger--disabled{background:var(--pine-color-background-container-disabled);border-color:var(--pine-color-border-disabled);color:var(--pine-color-text-disabled);cursor:not-allowed}.pds-multiselect__trigger-text{color:var(--pine-color-text-strong);-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__trigger-text.pds-multiselect__trigger-text--placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__trigger--disabled .pds-multiselect__trigger-text{color:var(--pine-color-text-disabled)}.pds-multiselect__icon{color:var(--pine-color-icon);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__panel{background:var(--pine-color-background-container);border-radius:var(--pine-dimension-125);-webkit-box-shadow:var(--pine-box-shadow);box-shadow:var(--pine-box-shadow);-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute;z-index:var(--pine-z-index-raised)}.pds-multiselect__search{-ms-flex-align:center;align-items:center;-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);display:-ms-flexbox;display:flex;gap:var(--pine-dimension-xs);padding:var(--pine-dimension-xs) var(--pine-dimension-sm)}.pds-multiselect__search pds-icon{color:var(--pine-color-text-muted);-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none)}.pds-multiselect__search-input{background:transparent;border:var(--pine-dimension-none);color:var(--pine-color-text-strong);-ms-flex:1;flex:1;font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);min-width:var(--pine-dimension-none);outline:none}.pds-multiselect__search-input::-webkit-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-moz-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input:-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::-ms-input-placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__search-input::placeholder{color:var(--pine-color-text-placeholder)}.pds-multiselect__selected-section{-webkit-border-after:var(--pine-border);border-block-end:var(--pine-border);border-block-end-color:var(--pine-color-border-subtle);padding:var(--pine-dimension-xs)}.pds-multiselect__selected-list{list-style:none;margin:var(--pine-dimension-none);padding:var(--pine-dimension-none)}.pds-multiselect__selected-item{color:var(--pine-color-text-strong);font:var(--pine-typography-body);letter-spacing:var(--pine-letter-spacing);overflow:hidden;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);text-overflow:ellipsis;white-space:nowrap}.pds-multiselect__listbox{background:transparent;border:var(--pine-dimension-none);-webkit-box-sizing:border-box;box-sizing:border-box;list-style:none;margin:var(--pine-dimension-none);overflow-y:auto;padding:var(--pine-dimension-xs)}.pds-multiselect__option{-ms-flex-align:center;align-items:center;background:transparent;border-radius:var(--pine-dimension-xs);cursor:pointer;display:-ms-flexbox;display:flex;padding:var(--pine-dimension-2xs) var(--pine-dimension-xs);-webkit-transition:background 0.15s;transition:background 0.15s}.pds-multiselect__option pds-checkbox{pointer-events:none;width:100%}.pds-multiselect__option:hover,.pds-multiselect__option.pds-multiselect__option--highlighted{background:var(--pine-color-background-muted)}.pds-multiselect__option:focus-visible{outline:var(--pine-dimension-none)}.pds-multiselect__empty,.pds-multiselect__loading{-ms-flex-align:center;align-items:center;color:var(--pine-color-text-muted);display:-ms-flexbox;display:flex;font:var(--pine-typography-body);-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-sm)}.pds-multiselect__load-more{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding:var(--pine-dimension-xs)}.pds-multiselect__helper{color:var(--pine-color-text-message);font:var(--pine-typography-body-sm);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error{-ms-flex-align:start;align-items:flex-start;color:var(--pine-color-text-message-danger);display:-ms-flexbox;display:flex;font:var(--pine-typography-body-sm);gap:var(--pine-dimension-2xs);-webkit-margin-before:var(--pine-dimension-2xs);margin-block-start:var(--pine-dimension-2xs);-webkit-margin-start:var(--pine-dimension-none);margin-inline-start:var(--pine-dimension-none)}.pds-multiselect__error pds-icon{-ms-flex-negative:var(--pine-dimension-none);flex-shrink:var(--pine-dimension-none);-webkit-margin-before:var(--pine-dimension-025);margin-block-start:var(--pine-dimension-025)}.visually-hidden{border:var(--pine-dimension-none);clip:rect(0 0 0 0);-webkit-clip-path:polygon(0 0, 0 0, 0 0);clip-path:polygon(0 0, 0 0, 0 0);height:1px;margin:-1px;overflow:hidden;padding:var(--pine-dimension-none);position:absolute;white-space:nowrap;width:1px}";var g=e("pds_multiselect",function(){function e(e){var n=this;i(this,e);this.pdsMultiselectChange=t(this,"pdsMultiselectChange");this.pdsMultiselectSearch=t(this,"pdsMultiselectSearch");this.pdsMultiselectLoadOptions=t(this,"pdsMultiselectLoadOptions");this.placeholder="Select...";this.value=[];this.disabled=false;this.asyncMethod="GET";this.debounce=300;this.maxHeight="300px";this.triggerWidth="100%";this.minWidth="250px";this.hideLabel=false;this.required=false;this.loading=false;this.isOpen=false;this.searchQuery="";this.highlightedIndex=-1;this.internalOptions=[];this.selectedItems=[];this.currentPage=1;this.hasMore=false;this.isOpening=false;this.handleTriggerClick=function(){if(n.disabled)return;if(n.isOpen){n.closeDropdown()}else{n.openDropdown()}};this.handleTriggerKeyDown=function(e){switch(e.key){case"ArrowDown":case"ArrowUp":case"Enter":case" ":e.preventDefault();if(!n.isOpen){n.openDropdown()}break}};this.handleSearchInputChange=function(e){var i=e.target;n.searchQuery=i.value;n.highlightedIndex=-1;n.pdsMultiselectSearch.emit({query:n.searchQuery});if(n.asyncUrl){n.debouncedFetchAsyncOptions(n.searchQuery,1)}};this.handleSearchInputKeyDown=function(e){var i=n.getFilteredOptions();switch(e.key){case"ArrowDown":e.preventDefault();n.highlightedIndex=Math.min(n.highlightedIndex+1,i.length-1);n.scrollOptionIntoView();break;case"ArrowUp":e.preventDefault();n.highlightedIndex=Math.max(n.highlightedIndex-1,0);n.scrollOptionIntoView();break;case"Enter":e.preventDefault();if(n.highlightedIndex>=0){var t=i[n.highlightedIndex];if(t){n.selectOption(t)}}break;case"Tab":n.closeDropdown();break}};this.handleContainerFocusOut=function(){setTimeout((function(){var e;if(!n.isOpen||n.isOpening)return;var i=document.activeElement;var t=(e=n.el.shadowRoot)===null||e===void 0?void 0:e.contains(i);var r=i===n.el;if(!t&&!r){n.closeDropdown()}}),0)};this.handleOptionMouseDown=function(e){return function(i){i.preventDefault();n.toggleOption(e)}};this.handleOptionMouseEnter=function(e){return function(){n.highlightedIndex=e}};this.handleScroll=function(e){if(!n.asyncUrl||!n.hasMore||n.loading)return;var i=e.target;var t=i.scrollHeight-i.scrollTop-i.clientHeight;if(t<50){n.pdsMultiselectLoadOptions.emit({query:n.searchQuery,page:n.currentPage+1});n.debouncedFetchAsyncOptions(n.searchQuery,n.currentPage+1)}}}e.prototype.connectedCallback=function(){if(this.el.attachInternals&&!this.internals){this.internals=this.el.attachInternals()}};e.prototype.componentWillLoad=function(){this.originalSearchEmitter=this.pdsMultiselectSearch;this.syncSelectedItems()};e.prototype.componentDidLoad=function(){var e=this;this.setupDebounce();this.setupMutationObserver();this.setupSlotChangeListener();this.updateFormValue();requestAnimationFrame((function(){e.updateOptionsFromSlot();e.syncSelectedItems()}))};e.prototype.setupSlotChangeListener=function(){var e=this;var i;var t=(i=this.el.shadowRoot)===null||i===void 0?void 0:i.querySelector("slot:not([name])");if(t){t.addEventListener("slotchange",(function(){e.updateOptionsFromSlot();e.syncSelectedItems()}));this.updateOptionsFromSlot()}};e.prototype.disconnectedCallback=function(){var e,i;(e=this.observer)===null||e===void 0?void 0:e.disconnect();(i=this.cleanupAutoUpdate)===null||i===void 0?void 0:i.call(this);this.clearAsyncFetchState()};e.prototype.setupDebounce=function(){var e=this,i=e.pdsMultiselectSearch,t=e.debounce,n=e.originalSearchEmitter;this.pdsMultiselectSearch=t===undefined?n!==null&&n!==void 0?n:i:p(i,t)};e.prototype.valueChanged=function(e){if(typeof e==="string"){try{var i=JSON.parse(e);if(Array.isArray(i)){this.value=i;return}}catch(i){this.value=e?[e]:[];return}}this.syncSelectedItems();this.updateFormValue()};e.prototype.optionsChanged=function(){if(this.options){this.internalOptions=__spreadArray([],this.options,true)}};e.prototype.internalOptionsChanged=function(){this.syncSelectedItems()};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(i){(e=this.triggerEl)===null||e===void 0?void 0:e.focus();return[2]}))}))};e.prototype.handleWindowKeyDown=function(e){var i;if(!this.isOpen)return;if(e.key==="Escape"){e.preventDefault();this.closeDropdown();(i=this.triggerEl)===null||i===void 0?void 0:i.focus()}};e.prototype.setupMutationObserver=function(){var e=this;this.observer=new MutationObserver((function(){e.updateOptionsFromSlot()}));this.observer.observe(this.el,{childList:true,subtree:true})};e.prototype.updateOptionsFromSlot=function(){var e;var i=(e=this.el.shadowRoot)===null||e===void 0?void 0:e.querySelector("slot:not([name])");if(!i)return;var t=i.assignedElements({flatten:true}).filter((function(e){return e.tagName==="OPTION"})).map((function(e){return{id:e.value,text:e.textContent||e.value}}));if(t.length>0&&!this.asyncUrl&&!this.options){this.internalOptions=t}};e.prototype.clearAsyncFetchState=function(){var e;if(this.fetchDebounceTimer!==undefined){window.clearTimeout(this.fetchDebounceTimer);this.fetchDebounceTimer=undefined}(e=this.abortController)===null||e===void 0?void 0:e.abort();this.abortController=undefined};e.prototype.debouncedFetchAsyncOptions=function(e,i){var t=this;if(i===void 0){i=1}var n;if(!this.asyncUrl)return;if(this.fetchDebounceTimer!==undefined){window.clearTimeout(this.fetchDebounceTimer)}var r=Math.max(0,(n=this.debounce)!==null&&n!==void 0?n:0);this.fetchDebounceTimer=window.setTimeout((function(){t.fetchDebounceTimer=undefined;t.fetchOptions(e,i)}),r)};e.prototype.syncSelectedItems=function(){var e=this.ensureValueArray();var i=this.getAllOptions();this.selectedItems=e.map((function(e){return i.find((function(i){return String(i.id)===String(e)}))})).filter((function(e){return e!==undefined}))};e.prototype.ensureValueArray=function(){if(typeof this.value==="string"){try{var e=JSON.parse(this.value);if(Array.isArray(e)){this.value=e;return e}}catch(e){var i=this.value;this.value=i?[i]:[];return this.value}}return Array.isArray(this.value)?this.value:[]};e.prototype.getAllOptions=function(){return this.options||this.internalOptions};e.prototype.getFilteredOptions=function(){var e=this.getAllOptions();var i=this.searchQuery.toLowerCase();return e.filter((function(e){if(i){return e.text.toLowerCase().includes(i)}return true}))};e.prototype.updateFormValue=function(){var e=this;var i;if((i=this.internals)===null||i===void 0?void 0:i.setFormValue){var t=this.ensureValueArray();var n=new FormData;t.forEach((function(i){if(e.name){n.append(e.name,i)}}));this.internals.setFormValue(n);if(this.required&&t.length===0){this.internals.setValidity({valueMissing:true},"Please select at least one option.",this.triggerEl)}else{this.internals.setValidity({})}}};e.prototype.fetchOptions=function(e){return __awaiter(this,arguments,void 0,(function(e,i){var t,n,r,s,o,a;var l=this;if(i===void 0){i=1}return __generator(this,(function(c){switch(c.label){case 0:if(!this.asyncUrl)return[2];(t=this.abortController)===null||t===void 0?void 0:t.abort();this.abortController=new AbortController;this.loading=true;c.label=1;case 1:c.trys.push([1,4,5,6]);n=new URL(this.asyncUrl,window.location.origin);if(this.asyncMethod==="GET"){n.searchParams.set("search",e);n.searchParams.set("page",String(i))}return[4,fetch(n.toString(),Object.assign({method:this.asyncMethod,signal:this.abortController.signal,headers:{"Content-Type":"application/json",Accept:"application/json"}},this.asyncMethod==="POST"&&{body:JSON.stringify({search:e,page:i})}))];case 2:r=c.sent();if(!r.ok)throw new Error("Failed to fetch options");return[4,r.json()];case 3:s=c.sent();o=s.results.map((function(e){if(l.formatResult){return l.formatResult(e)}return Object.assign({id:e.id,text:e.text},e)}));if(i===1){this.internalOptions=o}else{this.internalOptions=__spreadArray(__spreadArray([],this.internalOptions,true),o,true)}this.hasMore=s.totalCount?this.internalOptions.length<s.totalCount:false;this.currentPage=i;return[3,6];case 4:a=c.sent();if(a.name!=="AbortError"){console.error("PdsMultiselect: Failed to fetch options",a)}return[3,6];case 5:this.loading=false;return[7];case 6:return[2]}}))}))};e.prototype.openDropdown=function(){var e=this;if(this.disabled)return;this.isOpening=true;this.isOpen=true;this.highlightedIndex=-1;if(this.asyncUrl&&this.internalOptions.length===0){this.debouncedFetchAsyncOptions(this.searchQuery,1)}requestAnimationFrame((function(){var i;e.positionDropdown();(i=e.searchInputEl)===null||i===void 0?void 0:i.focus();setTimeout((function(){e.isOpening=false}),50)}))};e.prototype.closeDropdown=function(){this.isOpen=false;this.highlightedIndex=-1;this.searchQuery="";if(this.cleanupAutoUpdate){this.cleanupAutoUpdate();this.cleanupAutoUpdate=undefined}};e.prototype.positionDropdown=function(){var e=this;if(!this.containerEl||!this.panelEl)return;var i=this.triggerEl||this.containerEl;var t=this,n=t.minWidth,r=t.panelWidth;var s=function(){a(i,e.panelEl,{placement:"bottom-start",strategy:"absolute",middleware:[l(12),c(),d({padding:8}),u({apply:function(e){var i=e.rects,t=e.elements;Object.assign(t.floating.style,{width:r!==null&&r!==void 0?r:"".concat(i.reference.width,"px"),minWidth:n})}})]}).then((function(i){var t=i.x,n=i.y;if(e.panelEl){e.panelEl.style.left="".concat(t,"px");e.panelEl.style.top="".concat(n,"px")}}))};s();var p=o(i,this.panelEl,s);this.cleanupAutoUpdate=function(){p();e.clearAsyncFetchState()}};e.prototype.scrollOptionIntoView=function(){var e=this;requestAnimationFrame((function(){var i;var t=(i=e.listboxEl)===null||i===void 0?void 0:i.querySelector('[data-index="'.concat(e.highlightedIndex,'"]'));t===null||t===void 0?void 0:t.scrollIntoView({block:"nearest",behavior:"smooth"})}))};e.prototype.toggleOption=function(e){var i;var t=this.value.includes(String(e.id));if(t){var n=this.value.filter((function(i){return i!==String(e.id)}));this.value=n;var r=this.selectedItems.filter((function(i){return String(i.id)!==String(e.id)}));this.pdsMultiselectChange.emit({values:n,items:r})}else{if(this.maxSelections&&this.value.length>=this.maxSelections){return}var n=__spreadArray(__spreadArray([],this.value,true),[String(e.id)],false);this.value=n;var r=__spreadArray(__spreadArray([],this.selectedItems,true),[e],false);this.pdsMultiselectChange.emit({values:n,items:r})}(i=this.searchInputEl)===null||i===void 0?void 0:i.focus()};e.prototype.selectOption=function(e){this.toggleOption(e)};e.prototype.renderSelectedItemsList=function(){if(this.selectedItems.length===0)return null;return n("div",{class:"pds-multiselect__selected-section"},n("ul",{class:"pds-multiselect__selected-list",role:"list"},this.selectedItems.map((function(e){return n("li",{key:String(e.id),class:"pds-multiselect__selected-item"},e.text)}))))};e.prototype.renderDropdown=function(){var e=this;if(!this.isOpen)return null;var i=this.getFilteredOptions();var t=this.ensureValueArray();var r=!!this.el.querySelector('[slot="empty"]');var s=!!this.el.querySelector('[slot="loading"]');return n("div",{class:"pds-multiselect__panel",ref:function(i){return e.panelEl=i},style:{minWidth:this.minWidth}},n("div",{class:"pds-multiselect__search"},n("pds-icon",{name:"search",size:"small"}),n("input",{ref:function(i){return e.searchInputEl=i},type:"text",class:"pds-multiselect__search-input",placeholder:"Find...",value:this.searchQuery,"aria-label":"Search options","aria-controls":"".concat(this.componentId,"-listbox"),"aria-activedescendant":this.highlightedIndex>=0?"".concat(this.componentId,"-option-").concat(this.highlightedIndex):undefined,role:"combobox","aria-haspopup":"listbox","aria-expanded":"true","aria-autocomplete":"list",autocomplete:"off",onInput:this.handleSearchInputChange,onKeyDown:this.handleSearchInputKeyDown})),this.renderSelectedItemsList(),n("ul",{class:"pds-multiselect__listbox",role:"listbox","aria-multiselectable":"true","aria-label":this.label||"Options",id:"".concat(this.componentId,"-listbox"),ref:function(i){return e.listboxEl=i},style:{maxHeight:this.maxHeight},onScroll:this.handleScroll},this.loading&&n("li",{class:"pds-multiselect__loading",role:"presentation"},s?n("slot",{name:"loading"}):n("pds-loader",{size:"small"})),!this.loading&&i.length===0&&n("li",{class:"pds-multiselect__empty",role:"presentation"},r?n("slot",{name:"empty"}):n("span",null,"No options found")),i.map((function(i,r){var s=t.includes(String(i.id));var o=r===e.highlightedIndex;var a="".concat(e.componentId,"-option-").concat(r);return n("li",{key:String(i.id),id:a,class:{"pds-multiselect__option":true,"pds-multiselect__option--highlighted":o,"pds-multiselect__option--selected":s},role:"option","aria-selected":s?"true":"false","data-index":r,onMouseDown:e.handleOptionMouseDown(i),onMouseEnter:e.handleOptionMouseEnter(r)},n("pds-checkbox",{componentId:"".concat(e.componentId,"-checkbox-").concat(r),checked:s,label:i.text,style:{pointerEvents:"none"}}))})),this.hasMore&&!this.loading&&n("li",{class:"pds-multiselect__load-more",role:"presentation"},n("pds-loader",{size:"small"}))))};e.prototype.getTriggerText=function(){var e=this.selectedItems.length;if(e===0){return this.placeholder||"Select..."}return"".concat(e," item").concat(e===1?"":"s")};e.prototype.render=function(){var e=this;var i=this.selectedItems.length>0;return n(r,{key:"e7d872fd9bedb03390eaf8a2bd9c5d6ba1cc7ecc","aria-disabled":this.disabled?"true":null},n("div",{key:"141dee3c657dd17d3389d4a25979d0f748e36361",class:"pds-multiselect"},this.label&&n("label",{key:"386114a823424506857a1e927a2538e88d3c82f5",htmlFor:this.componentId,class:{"pds-multiselect__label":true,"visually-hidden":this.hideLabel}},this.label),n("div",{key:"9fc18bf93f981ee7f72f31c20f43f5251ed647e4",class:"pds-multiselect__wrapper",ref:function(i){return e.containerEl=i},onFocusout:this.handleContainerFocusOut,style:{width:this.triggerWidth}},n("button",{key:"74e8eb5ef5984307dce779ef63d54e49e07497ea",ref:function(i){return e.triggerEl=i},type:"button",class:{"pds-multiselect__trigger":true,"pds-multiselect__trigger--open":this.isOpen,"pds-multiselect__trigger--disabled":this.disabled,"pds-multiselect__trigger--invalid":this.invalid||!!this.errorMessage,"pds-multiselect__trigger--has-value":i},id:this.componentId,disabled:this.disabled,"aria-required":this.required?"true":undefined,"aria-expanded":this.isOpen?"true":"false","aria-haspopup":"listbox","aria-describedby":h(this.componentId,this.invalid||!!this.errorMessage,this.errorMessage||this.helperMessage),"aria-invalid":this.invalid||!!this.errorMessage?"true":undefined,onClick:this.handleTriggerClick,onKeyDown:this.handleTriggerKeyDown},n("span",{key:"fb7f9b9fffd46839ddc4ab0bb549b61de191f76c",class:{"pds-multiselect__trigger-text":true,"pds-multiselect__trigger-text--placeholder":!i}},this.getTriggerText()),n("pds-icon",{key:"354e1c57758350d73557a6c94d0b31eb6732f12a",class:"pds-multiselect__icon",icon:v})),this.renderDropdown()),this.helperMessage&&!this.errorMessage&&n("p",{key:"3709f184a7972e1acfd3826faefc4ba139a8d518",class:"pds-multiselect__helper",id:f(this.componentId,"helper")},this.helperMessage),this.errorMessage&&n("p",{key:"8029b58286455b7b4789a4336a79c324ca91ad74",class:"pds-multiselect__error",id:f(this.componentId,"error")},n("pds-icon",{key:"cd781f3caed8b81deef2ce43f0a4406b6ed2d53c",icon:m,size:"small"}),this.errorMessage),n("div",{key:"7c303f4d64247b41b9e88892cfb8c02acd5d8d59",style:{display:"none"}},n("slot",{key:"e9b384038e67bb951613933bbf68fd2b2efc71ef"}))))};Object.defineProperty(e,"formAssociated",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{debounce:["setupDebounce"],value:["valueChanged"],options:["optionsChanged"],internalOptions:["internalOptionsChanged"]}},enumerable:false,configurable:true});return e}());g.style=b}}}));
2
+ //# sourceMappingURL=p-3c04c17e.system.entry.js.map