@paperless/core 1.52.4 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/build/p-0c2cdac4.entry.js +2 -0
  3. package/dist/build/p-0c2cdac4.entry.js.map +1 -0
  4. package/dist/build/p-867c00e9.entry.js +2 -0
  5. package/dist/{paperless/p-13e80641.entry.js.map → build/p-867c00e9.entry.js.map} +1 -1
  6. package/dist/build/paperless.css +1 -1
  7. package/dist/build/paperless.esm.js +1 -1
  8. package/dist/build/paperless.esm.js.map +1 -1
  9. package/dist/cjs/loader.cjs.js +1 -1
  10. package/dist/cjs/p-helper_3.cjs.entry.js +1 -1
  11. package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -1
  12. package/dist/cjs/p-select.cjs.entry.js +50 -34
  13. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  14. package/dist/cjs/paperless.cjs.js +1 -1
  15. package/dist/collection/components/molecules/input-group/input-group.component.css +1 -1
  16. package/dist/collection/components/molecules/select/select.component.js +119 -34
  17. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  18. package/dist/components/input-group.component.js +1 -1
  19. package/dist/components/input-group.component.js.map +1 -1
  20. package/dist/components/p-select.js +54 -34
  21. package/dist/components/p-select.js.map +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/p-helper_3.entry.js +1 -1
  24. package/dist/esm/p-helper_3.entry.js.map +1 -1
  25. package/dist/esm/p-select.entry.js +50 -34
  26. package/dist/esm/p-select.entry.js.map +1 -1
  27. package/dist/esm/paperless.js +1 -1
  28. package/dist/index.html +1 -1
  29. package/dist/paperless/p-0c2cdac4.entry.js +2 -0
  30. package/dist/paperless/p-0c2cdac4.entry.js.map +1 -0
  31. package/dist/paperless/p-867c00e9.entry.js +2 -0
  32. package/dist/{build/p-13e80641.entry.js.map → paperless/p-867c00e9.entry.js.map} +1 -1
  33. package/dist/paperless/paperless.css +19 -19
  34. package/dist/paperless/paperless.esm.js +1 -1
  35. package/dist/paperless/paperless.esm.js.map +1 -1
  36. package/dist/style/form/_mixins.scss +105 -101
  37. package/dist/sw.js +1 -1
  38. package/dist/sw.js.map +1 -1
  39. package/dist/types/components/molecules/select/select.component.d.ts +17 -0
  40. package/dist/types/components.d.ts +32 -0
  41. package/hydrate/index.js +55 -35
  42. package/package.json +1 -1
  43. package/dist/build/p-13e80641.entry.js +0 -2
  44. package/dist/build/p-22a84714.entry.js +0 -2
  45. package/dist/build/p-22a84714.entry.js.map +0 -1
  46. package/dist/paperless/p-13e80641.entry.js +0 -2
  47. package/dist/paperless/p-22a84714.entry.js +0 -2
  48. package/dist/paperless/p-22a84714.entry.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.53.0](https://github.com/ionic-team/stencil-component-starter/compare/v1.52.5...v1.53.0) (2024-10-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * **molecules/select:** Add support for a custom class, icon & use editeable div to support better content ([b116dc1](https://github.com/ionic-team/stencil-component-starter/commit/b116dc17fdfff4d90f239d215e495bf243b881ba))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.52.5](https://github.com/ionic-team/stencil-component-starter/compare/v1.52.4...v1.52.5) (2024-09-25)
18
+
19
+ **Note:** Version bump only for package @paperless/core
20
+
21
+
22
+
23
+
24
+
6
25
  ## [1.52.4](https://github.com/ionic-team/stencil-component-starter/compare/v1.52.3...v1.52.4) (2024-09-24)
7
26
 
8
27
 
@@ -0,0 +1,2 @@
1
+ import{r as t,c as i,h as e,H as r,g as s}from"./p-e4d5e7a7.js";import{c as o}from"./p-4d330cfc.js";const n=".pointer-events-none{pointer-events:none!important}.pointer-events-auto{pointer-events:auto!important}.absolute{position:absolute!important}.relative{position:relative!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.flex{display:flex!important}.h-10{height:2.5rem!important}.h-8{height:2rem!important}.h-\\[1\\.625rem\\]{height:1.625rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-center{align-items:center!important}.gap-2{gap:.5rem!important}.overflow-hidden{overflow:hidden!important}.rounded{border-radius:.25rem!important}.border-b{border-bottom-width:1px!important}.border-l{border-left-width:1px!important}.border-r{border-right-width:1px!important}.border-solid{border-style:solid!important}.border-indigo{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-2{padding-bottom:.5rem!important;padding-top:.5rem!important}.py-4{padding-bottom:1rem!important;padding-top:1rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.font-semibold{font-weight:600!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo-dark{--tw-text-opacity:1!important;color:rgb(44 75 169/var(--tw-text-opacity))!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}*{box-sizing:border-box}p-select{display:flex;flex-direction:column;position:relative;text-overflow:ellipsis;width:100%}p-select .p-input{--tw-text-opacity:1;--tw-bg-opacity:1;--tw-border-opacity:1!important;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.375rem;border-style:solid!important;border-width:1px;color:rgb(39 40 56/var(--tw-text-opacity));display:flex;font-size:1rem;height:2.5rem;justify-content:flex-start;line-height:1.5rem;outline:2px solid transparent!important;outline-offset:2px!important;padding-left:1rem;padding-right:1rem;width:100%!important}p-select .p-input::-moz-placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}p-select .p-input::placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}p-select .p-input.active,p-select .p-input.focus,p-select .p-input:focus,p-select .p-input:focus-visible,p-select .p-input:focus-within,p-select .p-input[active]{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;outline:2px solid transparent!important;outline-offset:2px!important}p-select .p-input.size-small{font-size:.875rem;height:2rem!important;line-height:1.25rem}p-select .p-input.size-small::-moz-placeholder{font-size:.875rem;line-height:1.25rem}p-select .p-input.size-small::placeholder{font-size:.875rem;line-height:1.25rem}p-select .multi-container{align-items:center;bottom:0;display:flex;gap:.5rem;height:2.5rem;left:0;overflow:hidden;padding:1rem .5rem;pointer-events:none;position:absolute;width:100%}p-select .multi-container.size-small{height:2rem;padding:.5rem .25rem}p-select .multi-container .item{--tw-bg-opacity:1;--tw-text-opacity:1;align-items:center;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-radius:.25rem;color:rgb(44 75 169/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;gap:.5rem;height:1.625rem;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem;pointer-events:auto;white-space:nowrap}p-select .multi-container .item p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity));font-size:.75rem;line-height:1rem}p-select .multi-container .extra{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.875rem;line-height:1.25rem;pointer-events:none}.static{position:static!important}.sticky{position:sticky!important}.top-0{top:0!important}.top-2{top:.5rem!important}.-mt-2{margin-top:-.5rem!important}.mb-2{margin-bottom:.5rem!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.justify-center{justify-content:center!important}.gap-1{gap:.25rem!important}.p-2{padding:.5rem!important}.pt-2{padding-top:.5rem!important}.text-center{text-align:center!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";const h=class{constructor(e){t(this,e);this.queryChange=i(this,"queryChange",3);this.valueChange=i(this,"valueChange",3);this.selectAllChange=i(this,"selectAllChange",3);this.dropdownShown=i(this,"dropdownShown",3);this.add=i(this,"add",3);this.items=undefined;this.multi=undefined;this.icon=undefined;this.query=undefined;this.placeholder=undefined;this.autocompletePlaceholder="Search...";this.value=undefined;this.displayKey="text";this.dropdownDisplayKey=undefined;this.selectionDisplayKey=undefined;this.valueKey=undefined;this.avatarKey=undefined;this.iconKey=undefined;this.showIconInSelectedItem=undefined;this.classKey="class";this.applyClassOnSelectedItem=undefined;this.avatarLettersKey=undefined;this.identifierKey=undefined;this.queryKey=undefined;this.autoSelectFirst=true;this.showChevron=true;this.maxDisplayedItems=10;this.enableAutocomplete=true;this.asyncFilter=false;this.loading=false;this.enableSelectAll=false;this.selectAllText="Select all";this.selectAllIcon=undefined;this.size="medium";this.prefix=undefined;this.label=undefined;this.helper=undefined;this.required=undefined;this.error=undefined;this.disabled=false;this.showAddItem=false;this.addItemText="Add item";this.emptyStateText="No items available";this._showDropdown=false;this._selectedItem=null;this._allSelected=false;this._amountHidden=0}get _items(){var t;if(!this.items||this.loading){return[]}let i=typeof this.items==="string"?JSON.parse(this.items):this.items;if(typeof(i===null||i===void 0?void 0:i[0])==="string"){this.displayKey="text";this.valueKey="value";i=i.map((t=>({value:t,text:t})))}if(((t=this.query)===null||t===void 0?void 0:t.length)&&!this.asyncFilter){i=i.filter((t=>{if(this.queryKey){return this._checkvalue(this.queryKey,t)}return this._checkvalue(this._identifierKey,t)||this._checkvalue(this.displayKey,t)}))}return i===null||i===void 0?void 0:i.slice(0,this.maxDisplayedItems)}get _displayValue(){var t;if(!this._selectedItem){return this.placeholder}if(this.multi){if(((t=this._selectedItem)===null||t===void 0?void 0:t.length)===0){return this.placeholder}return e("div",{class:`multi-container size-${this.size}`,ref:t=>this._multiContainerRef=t},this._selectedItem.map((t=>{var i;return e("div",{class:"item",onClick:()=>this._selectValue(t)},t[(i=this.selectionDisplayKey)!==null&&i!==void 0?i:this.displayKey],e("p-icon",{variant:"negative"}))})),e("div",{class:"extra hidden"},"+",this._amountHidden))}return this._getDisplay(this._selectedItem,true)}get _identifierKey(){var t,i;return(i=(t=this.identifierKey)!==null&&t!==void 0?t:this.valueKey)!==null&&i!==void 0?i:"value"}componentDidLoad(){if(!this.valueKey&&!this.identifierKey){throw new Error("You must provide a valueKey or identifierKey")}if(this.multi){this._setMultiContainerMaxWidth();this._resizeObserver=new ResizeObserver((()=>{if(this._resizeDebounceTimer){clearTimeout(this._resizeDebounceTimer);this._resizeDebounceTimer=null}this._resizeDebounceTimer=setTimeout((()=>{this._setMultiContainerMaxWidth();this._checkSelectedItems()}),200)}));this._resizeObserver.observe(this._el)}if(this.value){this._valueChange();return}this.itemChanges()}componentDidRender(){if(this.multi){this._setMultiContainerMaxWidth();this._checkSelectedItems()}}disconnectedCallback(){if(this.multi){this._resizeObserver.disconnect()}}render(){var t;return e(r,{class:"p-select"},e("p-dropdown",{disableTriggerClick:true,calculateWidth:true,insideClick:true,scrollable:this.enableAutocomplete?"large":true,show:this._showDropdown,onIsOpen:t=>this._onDropdownOpen(t)},e("p-input-group",{slot:"trigger",icon:this.icon,size:this.size,prefix:this.prefix,label:this.label,helper:this.helper,required:this.required,error:this.error,disabled:this.disabled,focused:this._showDropdown,forceShowTooltip:((t=this.error)===null||t===void 0?void 0:t.length)&&this._showDropdown},e("div",{slot:"input",class:`p-input read-only cursor-pointer ${this._displayValue===this.placeholder?"text-base text-storm-medium":""}`,contenteditable:true,onFocus:t=>this._onFocus(t),onMouseDown:t=>this._onMouseDown(t),onClick:()=>this._onClick(),ref:t=>this._inputRef=t},this._displayValue),this.showChevron&&e("p-icon",{variant:"chevron",slot:"suffix"})),e("div",{slot:"items"},this.loading?this._getLoadingItems():this._getItems(),this.showAddItem&&this._getAddItem())))}documentClickHandler({target:t}){if(!this._showDropdown||o(t,this._el)){return}this._showDropdown=false}_valueChange(){this._preselectItem()}itemChanges(){this._preselectItem()}_showDropdownChanges(){this.dropdownShown.emit({value:this._showDropdown,query:this.query})}multiChanges(){if(this._selectedItem&&!Array.isArray(this._selectedItem)){this._selectedItem=[]}}_preselectItem(){var t,i;let e=typeof this.value==="string"&&this.multi?JSON.parse(this.value):this.value;if(this.multi){if(!Array.isArray(e)){this.value=[];this.valueChange.emit(this.value);return}this.value=e;if(!e.length){this._selectedItem=[];return}this._selectedItem=!!this.valueKey&&this.valueKey!=="false"?this._items.filter((t=>e.includes(t===null||t===void 0?void 0:t[this.valueKey]))):[...e];return}if(!this._selectedItem&&!e&&this.autoSelectFirst){e=this._items[0]}const r=typeof e==="object"&&e!==null?e[this._identifierKey]:e;const s=typeof r==="string"||typeof r==="number"?r:JSON.stringify(r);const o=this._selectedItem?(t=this._selectedItem)===null||t===void 0?void 0:t[this._identifierKey]:null;const n=typeof o==="string"||typeof o==="number"?o:JSON.stringify(o);if(this._selectedItem&&n===s){return}if(!((i=this._items)===null||i===void 0?void 0:i.length)&&e){this._selectValue(e,false);return}const h=this._items.find((t=>{const i=t===null||t===void 0?void 0:t[this._identifierKey];const e=typeof i==="string"||typeof i==="number"?i:JSON.stringify(i);return e===s}));this._selectValue(!!h?h:e,false)}_selectValue(t,i=true){let e=!!this.valueKey&&this.valueKey!=="false"&&t!==null?t===null||t===void 0?void 0:t[this.valueKey]:t;if(this.multi){if(!this._selectedItem||!Array.isArray(this._selectedItem)){this._selectedItem=[]}if(!this.value||!Array.isArray(this.value)){this.value=[]}const i=[...this._selectedItem];const r=[...this.value];const s=i.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]));if(s===-1){i.push(t);r.push(e)}else{i.splice(s,1);r.splice(s,1)}this._selectedItem=i;this.value=r;this.valueChange.emit(r);return}this._selectedItem=t;this.value=e;this.valueChange.emit(e);this._onBlur(i)}_onFocus(t){t.preventDefault();this._inputRef.blur();if(!this._showDropdown){this._showDropdown=true}return}_onMouseDown(t){if(this.enableAutocomplete){return}t.preventDefault()}_onClick(){if(this.enableAutocomplete){return}this._showDropdown=!this._showDropdown}_onBlur(t=false){if(this.enableAutocomplete&&!t){return}this._showDropdown=false}_onAutoComplete(t){if(!this.enableAutocomplete){return}this._showDropdown=true;this.query=t.target.value;this.queryChange.emit(t.target.value)}_checkvalue(t,i){var e,r,s;return((r=(e=i===null||i===void 0?void 0:i[t])===null||e===void 0?void 0:e.toString())===null||r===void 0?void 0:r.toLowerCase().indexOf((s=this.query)===null||s===void 0?void 0:s.toLowerCase()))>=0}_getItems(){var t;let i=this._items.map((t=>{var i;return e("p-dropdown-menu-item",{onClick:()=>this._selectValue(t),active:this.multi&&!!this._selectedItem&&Array.isArray(this._selectedItem)?this._selectedItem.findIndex((i=>i[this._identifierKey]===t[this._identifierKey]))>=0:t[this._identifierKey]===((i=this._selectedItem)===null||i===void 0?void 0:i[this._identifierKey]),variant:this.multi?"checkbox":"default"},this._getDisplay(t))}));if(!this._items.length){i=[e("p",{class:"w-full p-2 text-center text-sm text-storm-medium"},this.emptyStateText)]}if(this.enableSelectAll&&this._items.length){i.unshift(e("p-dropdown-menu-item",{variant:"checkbox",onClick:()=>this._selectAllChange(),active:this._allSelected},((t=this.selectAllIcon)===null||t===void 0?void 0:t.length)?e("span",{class:"flex items-center gap-2"},e("div",{class:"flex w-6 justify-center text-lg"},e("p-icon",{variant:this.selectAllIcon}))," ",this.selectAllText):this.selectAllText))}if(this.enableAutocomplete){i.unshift(this._getAutoCompleteItem())}return i}_getAddItem(){return e("p-dropdown-menu-item",{onClick:()=>this.add.emit()},e("span",{class:"flex items-center gap-1 font-semibold text-indigo"},this.addItemText,e("p-icon",{variant:"plus"})))}_getLoadingItems(){const t=[0,0,0].map((()=>e("p-dropdown-menu-item",{enableHover:false},e("p-loader",{variant:"ghost",class:"h-6 w-full rounded"}))));if(this.enableAutocomplete){t.unshift(this._getAutoCompleteItem())}return t}_getAutoCompleteItem(){return e("div",{class:"sticky top-0 -mt-2 bg-white pt-2"},e("input",{class:"p-input size-small sticky top-2 mb-2",placeholder:this.autocompletePlaceholder,onInput:t=>this._onAutoComplete(t),ref:t=>this.autocompleteInputRef=t,value:this.query}))}_setMultiContainerMaxWidth(){if(!this._inputRef||!this._multiContainerRef){return}this._multiContainerRef.style.maxWidth=`${this._inputRef.clientWidth-16}px`}_checkSelectedItems(){if(!this._multiContainerRef){return}const t=this._multiContainerRef.getBoundingClientRect();const i=Array.from(this._multiContainerRef.querySelectorAll(".item"));let e=0;for(const r of i){r.classList.remove("hidden");const i=r.getBoundingClientRect();if(i.right>t.right){r.classList.add("hidden");e++}}this._amountHidden=e;const r=this._multiContainerRef.querySelector(".extra");if(!r){return}if(!r.classList.contains("hidden")){r.classList.add("hidden")}if(e>0){r.classList.remove("hidden")}}_onDropdownOpen(t){if(!t.detail||!this.autocompleteInputRef){return}this.autocompleteInputRef.focus()}_selectAllChange(){this._allSelected=!this._allSelected;this.selectAllChange.emit(this._allSelected)}_getDisplay(t,i=false){var r,s,o,n;let h=t[i?(r=this.selectionDisplayKey)!==null&&r!==void 0?r:this.displayKey:this.displayKey];if(this.avatarKey){h=e("span",{class:"flex items-center gap-2"},e("p-avatar",{size:"xsmall",src:t[this.avatarKey],letters:t[this.avatarLettersKey]}),t[(s=this.dropdownDisplayKey)!==null&&s!==void 0?s:this.displayKey])}if(this.iconKey&&(!i||this.showIconInSelectedItem)){h=e("span",{class:"flex items-center gap-2"},e("p-icon",{variant:t[this.iconKey]}),t[(o=this.dropdownDisplayKey)!==null&&o!==void 0?o:this.displayKey])}return e("div",{class:!i||this.applyClassOnSelectedItem?(n=t===null||t===void 0?void 0:t.class)!==null&&n!==void 0?n:null:null},h)}get _el(){return s(this)}static get watchers(){return{value:["_valueChange"],items:["itemChanges"],_showDropdown:["_showDropdownChanges"],multi:["multiChanges"]}}};h.style=n;export{h as p_select};
2
+ //# sourceMappingURL=p-0c2cdac4.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["selectComponentCss","Select","_items","this","items","loading","JSON","parse","displayKey","valueKey","map","str","value","text","_a","query","length","asyncFilter","filter","item","queryKey","_checkvalue","_identifierKey","slice","maxDisplayedItems","_displayValue","_selectedItem","placeholder","multi","h","class","size","ref","_multiContainerRef","onClick","_selectValue","selectionDisplayKey","variant","_amountHidden","_getDisplay","_b","identifierKey","componentDidLoad","Error","_setMultiContainerMaxWidth","_resizeObserver","ResizeObserver","_resizeDebounceTimer","clearTimeout","setTimeout","_checkSelectedItems","observe","_el","_valueChange","itemChanges","componentDidRender","disconnectedCallback","disconnect","render","Host","disableTriggerClick","calculateWidth","insideClick","scrollable","enableAutocomplete","show","_showDropdown","onIsOpen","ev","_onDropdownOpen","slot","icon","prefix","label","helper","required","error","disabled","focused","forceShowTooltip","contenteditable","onFocus","_onFocus","onMouseDown","_onMouseDown","_onClick","_inputRef","showChevron","_getLoadingItems","_getItems","showAddItem","_getAddItem","documentClickHandler","target","childOf","_preselectItem","_showDropdownChanges","dropdownShown","emit","multiChanges","Array","isArray","valueChange","i","includes","autoSelectFirst","identifier","parsedValue","stringify","currentValue","currentParsedValue","find","itemIdentifier","parsedItemIdentifier","forceBlur","selectedItem","valueArray","includesIndex","findIndex","push","splice","_onBlur","preventDefault","blur","force","_onAutoComplete","queryChange","key","toString","toLowerCase","indexOf","_c","active","emptyStateText","enableSelectAll","unshift","_selectAllChange","_allSelected","selectAllIcon","selectAllText","_getAutoCompleteItem","add","addItemText","enableHover","autocompletePlaceholder","onInput","autocompleteInputRef","style","maxWidth","clientWidth","containerRect","getBoundingClientRect","from","querySelectorAll","amountHidden","child","classList","remove","childRect","right","extra","querySelector","contains","detail","focus","selectAllChange","isSelection","content","avatarKey","src","letters","avatarLettersKey","dropdownDisplayKey","iconKey","showIconInSelectedItem","applyClassOnSelectedItem","_d"],"sources":["src/components/molecules/select/select.component.scss?tag=p-select","src/components/molecules/select/select.component.tsx"],"sourcesContent":["@import '../../../style/form/mixins';\n\np-select {\n\t@apply flex w-full flex-col relative text-ellipsis;\n\n\t.p-input {\n\t\t@include inputDefaultState();\n\t}\n\n\t.multi-container {\n\t\t@apply absolute bottom-0 left-0 h-10 flex gap-2 items-center px-2 py-4 overflow-hidden pointer-events-none w-full;\n\n\t\t&.size-small {\n\t\t\t@apply px-1 py-2 h-8;\n\t\t}\n\n\t\t.item {\n\t\t\t@apply bg-indigo-light rounded px-2 flex gap-2 items-center cursor-pointer text-indigo-dark h-[1.625rem] text-sm font-semibold pointer-events-auto whitespace-nowrap;\n\n\t\t\tp-icon {\n\t\t\t\t@apply text-indigo text-xs;\n\t\t\t}\n\t\t}\n\n\t\t.extra {\n\t\t\t@apply text-sm text-storm-medium pointer-events-none;\n\t\t}\n\t}\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n\tWatch,\n} from '@stencil/core';\nimport { childOf } from '../../../utils';\nimport { IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-select',\n\tstyleUrl: 'select.component.scss',\n\tshadow: false,\n})\nexport class Select {\n\t/**\n\t * The items to show in the dropdown\n\t */\n\t@Prop() items: string | any[];\n\n\t/**\n\t * Wether to enable multi select\n\t */\n\t@Prop({ reflect: true }) multi: boolean;\n\n\t/**\n\t * Icon of the select box\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * The current query\n\t */\n\t@Prop() query: string;\n\n\t/**\n\t * The placeholder of the input\n\t */\n\t@Prop() placeholder: string;\n\n\t/**\n\t * The placeholder of the input used for auto complete\n\t */\n\t@Prop() autocompletePlaceholder: string = 'Search...';\n\n\t/**\n\t * The current value\n\t */\n\t@Prop() value: any;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() displayKey: string = 'text';\n\n\t/**\n\t * The key of the object to display in the dropdown (overwrites displayKey)\n\t */\n\t@Prop() dropdownDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to display in the input (overwrites displayKey)\n\t */\n\t@Prop() selectionDisplayKey: string | undefined;\n\n\t/**\n\t * The key of the object to return\n\t */\n\t@Prop() valueKey: string;\n\n\t/**\n\t * The key of avatar within an item to show\n\t */\n\t@Prop() avatarKey: string;\n\n\t/**\n\t * The key of icon variant within an item to show\n\t */\n\t@Prop() iconKey: string;\n\n\t/**\n\t * Wether to show the icon also on the selected Item\n\t */\n\t@Prop() showIconInSelectedItem: string;\n\n\t/**\n\t * The key of a class in an item to apply\n\t */\n\t@Prop() classKey: string = 'class';\n\n\t/**\n\t * Wether to apply the item's class also on the selected item\n\t */\n\t@Prop() applyClassOnSelectedItem: string;\n\n\t/**\n\t * The key of avatar letters within an item to show when the avatar url doesn't work\n\t */\n\t@Prop() avatarLettersKey: string;\n\n\t/**\n\t * The key to identify an object\n\t */\n\t@Prop() identifierKey: string;\n\n\t/**\n\t * The key of the object to display\n\t */\n\t@Prop() queryKey?: string;\n\n\t/**\n\t * Wether to automatically select the first item\n\t */\n\t@Prop() autoSelectFirst: boolean = true;\n\n\t/**\n\t * Wether to show the chevron or not\n\t */\n\t@Prop() showChevron: boolean = true;\n\n\t/**\n\t * The maximum amount of items to display\n\t */\n\t@Prop() maxDisplayedItems: number = 10;\n\n\t/**\n\t * Wether to enable autocomplete\n\t */\n\t@Prop() enableAutocomplete: boolean = true;\n\n\t/**\n\t * Wether the input uses async filtering\n\t */\n\t@Prop() asyncFilter: boolean = false;\n\n\t/**\n\t * Wether to show loading items\n\t */\n\t@Prop() loading: boolean = false;\n\n\t/**\n\t * Wether to show the select all item with multi select\n\t */\n\t@Prop() enableSelectAll: boolean = false;\n\n\t/**\n\t * The text of the select all item\n\t */\n\t@Prop() selectAllText: string = 'Select all';\n\n\t/**\n\t * The icon to prefix for select all\n\t */\n\t@Prop() selectAllIcon: IconVariant | undefined;\n\n\t/**\n\t * Event when the query of the autocomplete changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tqueryChange: EventEmitter<string>;\n\n\t/**\n\t * Event when the value changes\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tvalueChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the select all item has been selected or not\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tselectAllChange: EventEmitter<any>;\n\n\t/**\n\t * Event when the dropdown shows\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdropdownShown: EventEmitter<any>;\n\n\t/**\n\t * The size of the input group used by the select\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group used by the select\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The label of the input group used by the select\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group used by the select\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled used by the select\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether to show a \"add\" item\n\t */\n\t@Prop() showAddItem: boolean = false;\n\n\t/**\n\t * The text to show when add item is being shown\n\t */\n\t@Prop() addItemText: string = 'Add item';\n\n\t/**\n\t * Event when the add item is clicked\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tadd: EventEmitter;\n\n\t/**\n\t * The text to show when items is empty\n\t */\n\t@Prop() emptyStateText: string = 'No items available';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _showDropdown: any = false;\n\t@State() private _selectedItem: any = null;\n\n\t@State() private _allSelected: boolean = false;\n\n\t@State() private _amountHidden = 0;\n\n\tprivate _inputRef: HTMLDivElement;\n\tprivate autocompleteInputRef: HTMLInputElement;\n\tprivate _multiContainerRef: HTMLElement;\n\n\tprivate _resizeObserver: ResizeObserver;\n\tprivate _resizeDebounceTimer: NodeJS.Timer;\n\n\tget _items() {\n\t\tif (!this.items || this.loading) {\n\t\t\treturn [];\n\t\t}\n\n\t\tlet items =\n\t\t\ttypeof this.items === 'string' ? JSON.parse(this.items) : this.items;\n\n\t\tif (typeof items?.[0] === 'string') {\n\t\t\tthis.displayKey = 'text';\n\t\t\tthis.valueKey = 'value';\n\n\t\t\titems = items.map(str => ({\n\t\t\t\tvalue: str,\n\t\t\t\ttext: str,\n\t\t\t}));\n\t\t}\n\n\t\tif (this.query?.length && !this.asyncFilter) {\n\t\t\titems = items.filter(item => {\n\t\t\t\tif (this.queryKey) {\n\t\t\t\t\treturn this._checkvalue(this.queryKey, item);\n\t\t\t\t}\n\n\t\t\t\treturn (\n\t\t\t\t\tthis._checkvalue(this._identifierKey, item) ||\n\t\t\t\t\tthis._checkvalue(this.displayKey, item)\n\t\t\t\t);\n\t\t\t});\n\t\t}\n\n\t\treturn items?.slice(0, this.maxDisplayedItems);\n\t}\n\n\tget _displayValue() {\n\t\tif (!this._selectedItem) {\n\t\t\treturn this.placeholder;\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tif (this._selectedItem?.length === 0) {\n\t\t\t\treturn this.placeholder;\n\t\t\t}\n\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclass={`multi-container size-${this.size}`}\n\t\t\t\t\tref={ref => (this._multiContainerRef = ref)}\n\t\t\t\t>\n\t\t\t\t\t{this._selectedItem.map(item => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass='item'\n\t\t\t\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{item[this.selectionDisplayKey ?? this.displayKey]}\n\t\t\t\t\t\t\t<p-icon variant='negative' />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\n\t\t\t\t\t<div class='extra hidden'>+{this._amountHidden}</div>\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\n\t\treturn this._getDisplay(this._selectedItem, true);\n\t}\n\n\tget _identifierKey() {\n\t\treturn this.identifierKey ?? this.valueKey ?? 'value';\n\t}\n\n\tcomponentDidLoad() {\n\t\tif (!this.valueKey && !this.identifierKey) {\n\t\t\tthrow new Error('You must provide a valueKey or identifierKey');\n\t\t}\n\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\n\t\t\tthis._resizeObserver = new ResizeObserver(() => {\n\t\t\t\tif (this._resizeDebounceTimer) {\n\t\t\t\t\tclearTimeout(this._resizeDebounceTimer);\n\t\t\t\t\tthis._resizeDebounceTimer = null;\n\t\t\t\t}\n\n\t\t\t\tthis._resizeDebounceTimer = setTimeout(() => {\n\t\t\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\t\t\tthis._checkSelectedItems();\n\t\t\t\t}, 200);\n\t\t\t});\n\t\t\tthis._resizeObserver.observe(this._el);\n\t\t}\n\n\t\tif (this.value) {\n\t\t\tthis._valueChange();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.itemChanges();\n\t}\n\n\tcomponentDidRender() {\n\t\tif (this.multi) {\n\t\t\tthis._setMultiContainerMaxWidth();\n\t\t\tthis._checkSelectedItems();\n\t\t}\n\t}\n\n\tdisconnectedCallback() {\n\t\tif (this.multi) {\n\t\t\tthis._resizeObserver.disconnect();\n\t\t}\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class='p-select'>\n\t\t\t\t<p-dropdown\n\t\t\t\t\tdisableTriggerClick={true}\n\t\t\t\t\tcalculateWidth={true}\n\t\t\t\t\tinsideClick={true}\n\t\t\t\t\tscrollable={this.enableAutocomplete ? 'large' : true}\n\t\t\t\t\tshow={this._showDropdown}\n\t\t\t\t\tonIsOpen={ev => this._onDropdownOpen(ev)}\n\t\t\t\t>\n\t\t\t\t\t<p-input-group\n\t\t\t\t\t\tslot='trigger'\n\t\t\t\t\t\ticon={this.icon}\n\t\t\t\t\t\tsize={this.size}\n\t\t\t\t\t\tprefix={this.prefix}\n\t\t\t\t\t\tlabel={this.label}\n\t\t\t\t\t\thelper={this.helper}\n\t\t\t\t\t\trequired={this.required}\n\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\tdisabled={this.disabled}\n\t\t\t\t\t\tfocused={this._showDropdown}\n\t\t\t\t\t\tforceShowTooltip={this.error?.length && this._showDropdown}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tslot='input'\n\t\t\t\t\t\t\tclass={`p-input read-only cursor-pointer ${\n\t\t\t\t\t\t\t\tthis._displayValue === this.placeholder\n\t\t\t\t\t\t\t\t\t? 'text-base text-storm-medium'\n\t\t\t\t\t\t\t\t\t: ''\n\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\tcontenteditable\n\t\t\t\t\t\t\tonFocus={ev => this._onFocus(ev)}\n\t\t\t\t\t\t\tonMouseDown={ev => this._onMouseDown(ev)}\n\t\t\t\t\t\t\tonClick={() => this._onClick()}\n\t\t\t\t\t\t\tref={ref => (this._inputRef = ref)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{this._displayValue}\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t{this.showChevron && (\n\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\tvariant='chevron'\n\t\t\t\t\t\t\t\tslot='suffix'\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</p-input-group>\n\t\t\t\t\t<div slot='items'>\n\t\t\t\t\t\t{this.loading ? this._getLoadingItems() : this._getItems()}\n\t\t\t\t\t\t{this.showAddItem && this._getAddItem()}\n\t\t\t\t\t</div>\n\t\t\t\t</p-dropdown>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('click', { target: 'document', capture: true })\n\tprotected documentClickHandler({ target }) {\n\t\tif (!this._showDropdown || childOf(target, this._el)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\t@Watch('value')\n\tprivate _valueChange() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('items')\n\tpublic itemChanges() {\n\t\tthis._preselectItem();\n\t}\n\n\t@Watch('_showDropdown')\n\tpublic _showDropdownChanges() {\n\t\tthis.dropdownShown.emit({\n\t\t\tvalue: this._showDropdown,\n\t\t\tquery: this.query,\n\t\t});\n\t}\n\n\t@Watch('multi')\n\tpublic multiChanges() {\n\t\tif (this._selectedItem && !Array.isArray(this._selectedItem)) {\n\t\t\tthis._selectedItem = [];\n\t\t}\n\t}\n\n\tprivate _preselectItem() {\n\t\tlet value =\n\t\t\ttypeof this.value === 'string' && this.multi\n\t\t\t\t? JSON.parse(this.value)\n\t\t\t\t: this.value;\n\n\t\tif (this.multi) {\n\t\t\tif (!Array.isArray(value)) {\n\t\t\t\tthis.value = [];\n\t\t\t\tthis.valueChange.emit(this.value);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.value = value;\n\t\t\tif (!value.length) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._selectedItem =\n\t\t\t\t!!this.valueKey && this.valueKey !== 'false'\n\t\t\t\t\t? this._items.filter(i => value.includes(i?.[this.valueKey]))\n\t\t\t\t\t: [...value];\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._selectedItem && !value && this.autoSelectFirst) {\n\t\t\tvalue = this._items[0];\n\t\t}\n\n\t\tconst identifier =\n\t\t\ttypeof value === 'object' && value !== null\n\t\t\t\t? value[this._identifierKey]\n\t\t\t\t: value;\n\t\tconst parsedValue =\n\t\t\ttypeof identifier === 'string' || typeof identifier === 'number'\n\t\t\t\t? identifier\n\t\t\t\t: JSON.stringify(identifier);\n\n\t\tconst currentValue = this._selectedItem\n\t\t\t? this._selectedItem?.[this._identifierKey]\n\t\t\t: null;\n\t\tconst currentParsedValue =\n\t\t\ttypeof currentValue === 'string' || typeof currentValue === 'number'\n\t\t\t\t? currentValue\n\t\t\t\t: JSON.stringify(currentValue);\n\n\t\tif (this._selectedItem && currentParsedValue === parsedValue) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!this._items?.length && value) {\n\t\t\tthis._selectValue(value, false);\n\t\t\treturn;\n\t\t}\n\n\t\tconst item = this._items.find(i => {\n\t\t\tconst itemIdentifier = i?.[this._identifierKey];\n\t\t\tconst parsedItemIdentifier =\n\t\t\t\ttypeof itemIdentifier === 'string' || typeof itemIdentifier === 'number'\n\t\t\t\t\t? itemIdentifier\n\t\t\t\t\t: JSON.stringify(itemIdentifier);\n\n\t\t\treturn parsedItemIdentifier === parsedValue;\n\t\t});\n\n\t\tthis._selectValue(!!item ? item : value, false);\n\t}\n\n\tprivate _selectValue(item, forceBlur = true) {\n\t\tlet value =\n\t\t\t!!this.valueKey && this.valueKey !== 'false' && item !== null\n\t\t\t\t? item?.[this.valueKey]\n\t\t\t\t: item;\n\n\t\tif (this.multi) {\n\t\t\tif (!this._selectedItem || !Array.isArray(this._selectedItem)) {\n\t\t\t\tthis._selectedItem = [];\n\t\t\t}\n\n\t\t\tif (!this.value || !Array.isArray(this.value)) {\n\t\t\t\tthis.value = [];\n\t\t\t}\n\n\t\t\tconst selectedItem = [...this._selectedItem];\n\t\t\tconst valueArray = [...this.value];\n\n\t\t\tconst includesIndex = selectedItem.findIndex(\n\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t);\n\t\t\tif (includesIndex === -1) {\n\t\t\t\tselectedItem.push(item);\n\t\t\t\tvalueArray.push(value);\n\t\t\t} else {\n\t\t\t\tselectedItem.splice(includesIndex, 1);\n\t\t\t\tvalueArray.splice(includesIndex, 1);\n\t\t\t}\n\n\t\t\tthis._selectedItem = selectedItem;\n\t\t\tthis.value = valueArray;\n\t\t\tthis.valueChange.emit(valueArray);\n\t\t\treturn;\n\t\t}\n\n\t\tthis._selectedItem = item;\n\t\tthis.value = value;\n\t\tthis.valueChange.emit(value);\n\n\t\tthis._onBlur(forceBlur);\n\t}\n\n\tprivate _onFocus(ev) {\n\t\tev.preventDefault();\n\t\tthis._inputRef.blur();\n\n\t\tif (!this._showDropdown) {\n\t\t\tthis._showDropdown = true;\n\t\t}\n\n\t\treturn;\n\t}\n\n\tprivate _onMouseDown(ev) {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tev.preventDefault();\n\t}\n\n\tprivate _onClick() {\n\t\tif (this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = !this._showDropdown;\n\t}\n\n\tprivate _onBlur(force = false) {\n\t\tif (this.enableAutocomplete && !force) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = false;\n\t}\n\n\tprivate _onAutoComplete(ev) {\n\t\tif (!this.enableAutocomplete) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._showDropdown = true;\n\n\t\tthis.query = ev.target.value;\n\t\tthis.queryChange.emit(ev.target.value);\n\t}\n\n\tprivate _checkvalue(key, item) {\n\t\treturn (\n\t\t\titem?.[key]\n\t\t\t\t?.toString()\n\t\t\t\t?.toLowerCase()\n\t\t\t\t.indexOf(this.query?.toLowerCase()) >= 0\n\t\t);\n\t}\n\n\tprivate _getItems() {\n\t\tlet items = this._items.map(item => (\n\t\t\t<p-dropdown-menu-item\n\t\t\t\tonClick={() => this._selectValue(item)}\n\t\t\t\tactive={\n\t\t\t\t\tthis.multi &&\n\t\t\t\t\t!!this._selectedItem &&\n\t\t\t\t\tArray.isArray(this._selectedItem)\n\t\t\t\t\t\t? this._selectedItem.findIndex(\n\t\t\t\t\t\t\t\ti => i[this._identifierKey] === item[this._identifierKey]\n\t\t\t\t\t\t ) >= 0\n\t\t\t\t\t\t: item[this._identifierKey] ===\n\t\t\t\t\t\t this._selectedItem?.[this._identifierKey]\n\t\t\t\t}\n\t\t\t\tvariant={this.multi ? 'checkbox' : 'default'}\n\t\t\t>\n\t\t\t\t{this._getDisplay(item)}\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (!this._items.length) {\n\t\t\titems = [\n\t\t\t\t<p class='w-full p-2 text-center text-sm text-storm-medium'>\n\t\t\t\t\t{this.emptyStateText}\n\t\t\t\t</p>,\n\t\t\t];\n\t\t}\n\n\t\tif (this.enableSelectAll && this._items.length) {\n\t\t\titems.unshift(\n\t\t\t\t<p-dropdown-menu-item\n\t\t\t\t\tvariant='checkbox'\n\t\t\t\t\tonClick={() => this._selectAllChange()}\n\t\t\t\t\tactive={this._allSelected}\n\t\t\t\t>\n\t\t\t\t\t{this.selectAllIcon?.length ? (\n\t\t\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t\t\t<div class='flex w-6 justify-center text-lg'>\n\t\t\t\t\t\t\t\t<p-icon variant={this.selectAllIcon} />\n\t\t\t\t\t\t\t</div>{' '}\n\t\t\t\t\t\t\t{this.selectAllText}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\tthis.selectAllText\n\t\t\t\t\t)}\n\t\t\t\t</p-dropdown-menu-item>\n\t\t\t);\n\t\t}\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAddItem() {\n\t\treturn (\n\t\t\t<p-dropdown-menu-item onClick={() => this.add.emit()}>\n\t\t\t\t<span class='flex items-center gap-1 font-semibold text-indigo'>\n\t\t\t\t\t{this.addItemText}\n\t\t\t\t\t<p-icon variant='plus' />\n\t\t\t\t</span>\n\t\t\t</p-dropdown-menu-item>\n\t\t);\n\t}\n\n\tprivate _getLoadingItems() {\n\t\tconst items = [0, 0, 0].map(() => (\n\t\t\t<p-dropdown-menu-item enableHover={false}>\n\t\t\t\t<p-loader\n\t\t\t\t\tvariant='ghost'\n\t\t\t\t\tclass='h-6 w-full rounded'\n\t\t\t\t/>\n\t\t\t</p-dropdown-menu-item>\n\t\t));\n\n\t\tif (this.enableAutocomplete) {\n\t\t\titems.unshift(this._getAutoCompleteItem());\n\t\t}\n\n\t\treturn items;\n\t}\n\n\tprivate _getAutoCompleteItem() {\n\t\treturn (\n\t\t\t<div class='sticky top-0 -mt-2 bg-white pt-2'>\n\t\t\t\t<input\n\t\t\t\t\tclass='p-input size-small sticky top-2 mb-2'\n\t\t\t\t\tplaceholder={this.autocompletePlaceholder}\n\t\t\t\t\tonInput={ev => this._onAutoComplete(ev)}\n\t\t\t\t\tref={ref => (this.autocompleteInputRef = ref)}\n\t\t\t\t\tvalue={this.query}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tprivate _setMultiContainerMaxWidth() {\n\t\tif (!this._inputRef || !this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._multiContainerRef.style.maxWidth = `${\n\t\t\tthis._inputRef.clientWidth - 16\n\t\t}px`;\n\t}\n\n\tprivate _checkSelectedItems() {\n\t\tif (!this._multiContainerRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst containerRect = this._multiContainerRef.getBoundingClientRect();\n\t\tconst items = Array.from(\n\t\t\tthis._multiContainerRef.querySelectorAll('.item')\n\t\t) as HTMLElement[];\n\n\t\tlet amountHidden = 0;\n\n\t\tfor (const child of items) {\n\t\t\tchild.classList.remove('hidden');\n\n\t\t\tconst childRect = child.getBoundingClientRect();\n\t\t\tif (childRect.right > containerRect.right) {\n\t\t\t\tchild.classList.add('hidden');\n\t\t\t\tamountHidden++;\n\t\t\t}\n\t\t}\n\n\t\tthis._amountHidden = amountHidden;\n\t\tconst extra = this._multiContainerRef.querySelector('.extra');\n\t\tif (!extra) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!extra.classList.contains('hidden')) {\n\t\t\textra.classList.add('hidden');\n\t\t}\n\n\t\tif (amountHidden > 0) {\n\t\t\textra.classList.remove('hidden');\n\t\t}\n\t}\n\n\tprivate _onDropdownOpen(ev) {\n\t\tif (!ev.detail || !this.autocompleteInputRef) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.autocompleteInputRef.focus();\n\t}\n\n\tprivate _selectAllChange() {\n\t\tthis._allSelected = !this._allSelected;\n\t\tthis.selectAllChange.emit(this._allSelected);\n\t}\n\n\tprivate _getDisplay(item, isSelection = false) {\n\t\tlet content =\n\t\t\titem[\n\t\t\t\tisSelection\n\t\t\t\t\t? this.selectionDisplayKey ?? this.displayKey\n\t\t\t\t\t: this.displayKey\n\t\t\t];\n\t\tif (this.avatarKey) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-avatar\n\t\t\t\t\t\tsize='xsmall'\n\t\t\t\t\t\tsrc={item[this.avatarKey]}\n\t\t\t\t\t\tletters={item[this.avatarLettersKey]}\n\t\t\t\t\t></p-avatar>\n\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\tif (this.iconKey && (!isSelection || this.showIconInSelectedItem)) {\n\t\t\tcontent = (\n\t\t\t\t<span class='flex items-center gap-2'>\n\t\t\t\t\t<p-icon variant={item[this.iconKey] as IconVariant} />\n\t\t\t\t\t{item[this.dropdownDisplayKey ?? this.displayKey]}\n\t\t\t\t</span>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclass={\n\t\t\t\t\t!isSelection || this.applyClassOnSelectedItem\n\t\t\t\t\t\t? item?.class ?? null\n\t\t\t\t\t\t: null\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</div>\n\t\t);\n\t}\n}\n"],"mappings":"oGAAA,MAAMA,EAAqB,2qK,MCoBdC,EAAM,M,6WA6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AK,MAAAkJ,SAAA,EAAAA,EAAI,KACf,MAGHT,E"}
@@ -0,0 +1,2 @@
1
+ import{r as t,h as e,H as o,g as p}from"./p-e4d5e7a7.js";const i=".inline-block{display:inline-block!important}.w-3{width:.75rem!important}.cursor-pointer{cursor:pointer!important}.bg-center{background-position:50%!important}.bg-no-repeat{background-repeat:no-repeat!important}*{box-sizing:border-box}:host .helper{background-image:url(/assets/images/helper/helper.svg);background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:.75rem;width:.75rem}:host .helper:hover{background-image:url(/assets/images/helper/helper-hover.svg)}.static{position:static!important}";const r=class{constructor(e){t(this,e);this.placement="top"}render(){return e(o,{class:"p-helper"},e("p-tooltip",{placement:this.placement},e("div",{slot:"content"},e("slot",null)),e("div",{slot:"trigger",class:"helper"})))}};r.style=i;const s=class{constructor(e){t(this,e);this.error=undefined;this.forceShowTooltip=false;this._showTooltip=false}render(){return e(o,{class:"p-input-error"},e("p-tooltip",{variant:"error",content:this.error,show:this.forceShowTooltip,onIsOpen:t=>this._showTooltip=t.detail},e("p-icon",{class:`${this._showTooltip?"text-negative":"text-negative-light"} hover:text-negative`,slot:"trigger",variant:"explanation"})))}};const n=".mb-\\[2px\\]{margin-bottom:2px!important}.box-border{box-sizing:border-box!important}.flex{display:flex!important}.h-8{height:2rem!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.items-start{align-items:flex-start!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.rounded-bl-none{border-bottom-left-radius:0!important}.rounded-br-none{border-bottom-right-radius:0!important}.rounded-tl-none{border-top-left-radius:0!important}.rounded-tr-none{border-top-right-radius:0!important}.border-b{border-bottom-width:1px!important}.border-l{border-left-width:1px!important}.border-l-0{border-left-width:0!important}.border-r{border-right-width:1px!important}.border-r-0{border-right-width:0!important}.border-solid{border-style:solid!important}.border-indigo{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important}.border-mystic-dark{--tw-border-opacity:1!important;border-color:rgb(218 230 240/var(--tw-border-opacity))!important}.border-negative{--tw-border-opacity:1!important;border-color:rgb(185 30 40/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.py-\\[calc\\(0\\.75rem-1px\\)\\]{padding-bottom:calc(.75rem - 1px)!important;padding-top:calc(.75rem - 1px)!important}.pl-0{padding-left:0!important}.pr-0{padding-right:0!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.font-semibold{font-weight:600!important}.uppercase{text-transform:uppercase!important}.tracking-wider{letter-spacing:.05em!important}.outline-none{outline:2px solid transparent!important;outline-offset:2px!important}*{box-sizing:border-box}:host{display:flex;flex-direction:column;outline:2px solid transparent!important;outline-offset:2px!important;width:100%}:host .input-label{--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));font-size:.75rem;font-weight:600;letter-spacing:.05em;line-height:1rem;margin-bottom:2px;text-transform:uppercase}:host .input-header{align-items:flex-end;display:flex;gap:.5rem;margin-bottom:2px}:host .content{display:flex;width:100%}:host .content .prefix,:host .content .suffix{--tw-bg-opacity:1;--tw-border-opacity:1!important;--tw-text-opacity:1;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.375rem;border-style:solid!important;border-width:1px;box-sizing:border-box;color:rgb(39 40 56/var(--tw-text-opacity));color:rgb(81 83 107/var(--tw-text-opacity));display:flex;flex:1 1 0%;font-size:1rem;height:100%;justify-content:flex-start;line-height:1.5rem;outline:2px solid transparent!important;outline-offset:2px!important;padding-left:1rem;padding-right:1rem;width:100%!important}:host .content .prefix::-moz-placeholder,:host .content .suffix::-moz-placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}:host .content .prefix::placeholder,:host .content .suffix::placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}:host .content .prefix.active,:host .content .prefix.focus,:host .content .prefix:focus,:host .content .prefix:focus-visible,:host .content .prefix:focus-within,:host .content .prefix[active],:host .content .suffix.active,:host .content .suffix.focus,:host .content .suffix:focus,:host .content .suffix:focus-visible,:host .content .suffix:focus-within,:host .content .suffix[active]{--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;outline:2px solid transparent!important;outline-offset:2px!important}:host .content .prefix.size-small,:host .content .suffix.size-small{font-size:.875rem;line-height:1.25rem}:host .content .prefix.size-small::-moz-placeholder,:host .content .suffix.size-small::-moz-placeholder{font-size:.875rem;line-height:1.25rem}:host .content .prefix.size-small::placeholder,:host .content .suffix.size-small::placeholder{font-size:.875rem;line-height:1.25rem}:host .content .prefix{border-bottom-right-radius:0;border-right-width:0!important;border-top-right-radius:0;order:1;padding-right:.5rem}:host .content .suffix{border-bottom-left-radius:0;border-left-width:0!important;border-top-left-radius:0;order:3;padding-left:.5rem}:host .content ::slotted(div[contenteditable].p-input),:host .content ::slotted(input[type=date].p-input),:host .content ::slotted(input[type=datetime-local].p-input),:host .content ::slotted(input[type=email].p-input),:host .content ::slotted(input[type=month].p-input),:host .content ::slotted(input[type=number].p-input),:host .content ::slotted(input[type=password].p-input),:host .content ::slotted(input[type=tel].p-input),:host .content ::slotted(input[type=text].p-input),:host .content ::slotted(input[type=time].p-input),:host .content ::slotted(textarea.p-input){--tw-text-opacity:1;--tw-bg-opacity:1;--tw-border-opacity:1!important;align-items:center;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-color:rgb(218 230 240/var(--tw-border-opacity))!important;border-radius:.375rem;border-style:solid!important;border-width:1px;color:rgb(39 40 56/var(--tw-text-opacity));display:flex;font-size:1rem;height:2.5rem;justify-content:flex-start;line-height:1.5rem;order:2;outline:2px solid transparent!important;outline-offset:2px!important;padding-left:1rem;padding-right:1rem;width:100%!important}:host .content ::slotted(div[contenteditable].p-input)::-moz-placeholder,:host .content ::slotted(input[type=date].p-input)::-moz-placeholder,:host .content ::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host .content ::slotted(input[type=email].p-input)::-moz-placeholder,:host .content ::slotted(input[type=month].p-input)::-moz-placeholder,:host .content ::slotted(input[type=number].p-input)::-moz-placeholder,:host .content ::slotted(input[type=password].p-input)::-moz-placeholder,:host .content ::slotted(input[type=tel].p-input)::-moz-placeholder,:host .content ::slotted(input[type=text].p-input)::-moz-placeholder,:host .content ::slotted(input[type=time].p-input)::-moz-placeholder,:host .content ::slotted(textarea.p-input)::-moz-placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}:host .content ::slotted(div[contenteditable].p-input)::placeholder,:host .content ::slotted(input[type=date].p-input)::placeholder,:host .content ::slotted(input[type=datetime-local].p-input)::placeholder,:host .content ::slotted(input[type=email].p-input)::placeholder,:host .content ::slotted(input[type=month].p-input)::placeholder,:host .content ::slotted(input[type=number].p-input)::placeholder,:host .content ::slotted(input[type=password].p-input)::placeholder,:host .content ::slotted(input[type=tel].p-input)::placeholder,:host .content ::slotted(input[type=text].p-input)::placeholder,:host .content ::slotted(input[type=time].p-input)::placeholder,:host .content ::slotted(textarea.p-input)::placeholder{--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity));font-size:1rem;line-height:1.5rem}:host .content .active::slotted(div[contenteditable].p-input),:host .content .active::slotted(input[type=date].p-input),:host .content .active::slotted(input[type=datetime-local].p-input),:host .content .active::slotted(input[type=email].p-input),:host .content .active::slotted(input[type=month].p-input),:host .content .active::slotted(input[type=number].p-input),:host .content .active::slotted(input[type=password].p-input),:host .content .active::slotted(input[type=tel].p-input),:host .content .active::slotted(input[type=text].p-input),:host .content .active::slotted(input[type=time].p-input),:host .content .active::slotted(textarea.p-input),:host .content .focus::slotted(div[contenteditable].p-input),:host .content .focus::slotted(input[type=date].p-input),:host .content .focus::slotted(input[type=datetime-local].p-input),:host .content .focus::slotted(input[type=email].p-input),:host .content .focus::slotted(input[type=month].p-input),:host .content .focus::slotted(input[type=number].p-input),:host .content .focus::slotted(input[type=password].p-input),:host .content .focus::slotted(input[type=tel].p-input),:host .content .focus::slotted(input[type=text].p-input),:host .content .focus::slotted(input[type=time].p-input),:host .content .focus::slotted(textarea.p-input),:host .content :focus-visible::slotted(div[contenteditable].p-input),:host .content :focus-visible::slotted(input[type=date].p-input),:host .content :focus-visible::slotted(input[type=datetime-local].p-input),:host .content :focus-visible::slotted(input[type=email].p-input),:host .content :focus-visible::slotted(input[type=month].p-input),:host .content :focus-visible::slotted(input[type=number].p-input),:host .content :focus-visible::slotted(input[type=password].p-input),:host .content :focus-visible::slotted(input[type=tel].p-input),:host .content :focus-visible::slotted(input[type=text].p-input),:host .content :focus-visible::slotted(input[type=time].p-input),:host .content :focus-visible::slotted(textarea.p-input),:host .content :focus-within::slotted(div[contenteditable].p-input),:host .content :focus-within::slotted(input[type=date].p-input),:host .content :focus-within::slotted(input[type=datetime-local].p-input),:host .content :focus-within::slotted(input[type=email].p-input),:host .content :focus-within::slotted(input[type=month].p-input),:host .content :focus-within::slotted(input[type=number].p-input),:host .content :focus-within::slotted(input[type=password].p-input),:host .content :focus-within::slotted(input[type=tel].p-input),:host .content :focus-within::slotted(input[type=text].p-input),:host .content :focus-within::slotted(input[type=time].p-input),:host .content :focus-within::slotted(textarea.p-input),:host .content :focus::slotted(div[contenteditable].p-input),:host .content :focus::slotted(input[type=date].p-input),:host .content :focus::slotted(input[type=datetime-local].p-input),:host .content :focus::slotted(input[type=email].p-input),:host .content :focus::slotted(input[type=month].p-input),:host .content :focus::slotted(input[type=number].p-input),:host .content :focus::slotted(input[type=password].p-input),:host .content :focus::slotted(input[type=tel].p-input),:host .content :focus::slotted(input[type=text].p-input),:host .content :focus::slotted(input[type=time].p-input),:host .content :focus::slotted(textarea.p-input),:host .content [active]::slotted(div[contenteditable].p-input),:host .content [active]::slotted(input[type=date].p-input),:host .content [active]::slotted(input[type=datetime-local].p-input),:host .content [active]::slotted(input[type=email].p-input),:host .content [active]::slotted(input[type=month].p-input),:host .content [active]::slotted(input[type=number].p-input),:host .content [active]::slotted(input[type=password].p-input),:host .content [active]::slotted(input[type=tel].p-input),:host .content [active]::slotted(input[type=text].p-input),:host .content [active]::slotted(input[type=time].p-input),:host .content [active]::slotted(textarea.p-input){--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;outline:2px solid transparent!important;outline-offset:2px!important}:host .content .size-small::slotted(div[contenteditable].p-input),:host .content .size-small::slotted(input[type=date].p-input),:host .content .size-small::slotted(input[type=datetime-local].p-input),:host .content .size-small::slotted(input[type=email].p-input),:host .content .size-small::slotted(input[type=month].p-input),:host .content .size-small::slotted(input[type=number].p-input),:host .content .size-small::slotted(input[type=password].p-input),:host .content .size-small::slotted(input[type=tel].p-input),:host .content .size-small::slotted(input[type=text].p-input),:host .content .size-small::slotted(input[type=time].p-input),:host .content .size-small::slotted(textarea.p-input){font-size:.875rem;height:2rem!important;line-height:1.25rem}:host .content .size-small::slotted(div[contenteditable].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=date].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=email].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=month].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=number].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=password].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=tel].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=text].p-input)::-moz-placeholder,:host .content .size-small::slotted(input[type=time].p-input)::-moz-placeholder,:host .content .size-small::slotted(textarea.p-input)::-moz-placeholder{font-size:.875rem;line-height:1.25rem}:host .content .size-small::slotted(div[contenteditable].p-input)::placeholder,:host .content .size-small::slotted(input[type=date].p-input)::placeholder,:host .content .size-small::slotted(input[type=datetime-local].p-input)::placeholder,:host .content .size-small::slotted(input[type=email].p-input)::placeholder,:host .content .size-small::slotted(input[type=month].p-input)::placeholder,:host .content .size-small::slotted(input[type=number].p-input)::placeholder,:host .content .size-small::slotted(input[type=password].p-input)::placeholder,:host .content .size-small::slotted(input[type=tel].p-input)::placeholder,:host .content .size-small::slotted(input[type=text].p-input)::placeholder,:host .content .size-small::slotted(input[type=time].p-input)::placeholder,:host .content .size-small::slotted(textarea.p-input)::placeholder{font-size:.875rem;line-height:1.25rem}:host .content .prefix+::slotted(div[contenteditable].p-input),:host .content .prefix+::slotted(input[type=date].p-input),:host .content .prefix+::slotted(input[type=datetime-local].p-input),:host .content .prefix+::slotted(input[type=email].p-input),:host .content .prefix+::slotted(input[type=month].p-input),:host .content .prefix+::slotted(input[type=number].p-input),:host .content .prefix+::slotted(input[type=password].p-input),:host .content .prefix+::slotted(input[type=tel].p-input),:host .content .prefix+::slotted(input[type=text].p-input),:host .content .prefix+::slotted(input[type=time].p-input),:host .content .prefix+::slotted(textarea.p-input){border-bottom-left-radius:0!important;border-left-width:0!important;border-top-left-radius:0!important;flex:1 1 auto;padding-left:0!important}:host .content .suffix+::slotted(div[contenteditable].p-input),:host .content .suffix+::slotted(input[type=date].p-input),:host .content .suffix+::slotted(input[type=datetime-local].p-input),:host .content .suffix+::slotted(input[type=email].p-input),:host .content .suffix+::slotted(input[type=month].p-input),:host .content .suffix+::slotted(input[type=number].p-input),:host .content .suffix+::slotted(input[type=password].p-input),:host .content .suffix+::slotted(input[type=tel].p-input),:host .content .suffix+::slotted(input[type=text].p-input),:host .content .suffix+::slotted(input[type=time].p-input),:host .content .suffix+::slotted(textarea.p-input){border-bottom-right-radius:0!important;border-right-width:0!important;border-top-right-radius:0!important;flex:1 1 auto;padding-right:0!important}:host(.focused),:host(:focus),:host(:focus-within),:host([focused]){outline:2px solid transparent!important;outline-offset:2px!important}:host(.focused) .prefix,:host(.focused) .suffix,:host(:focus) .prefix,:host(:focus) .suffix,:host(:focus-within) .prefix,:host(:focus-within) .suffix,:host([focused]) .prefix,:host([focused]) .suffix{--tw-border-opacity:1!important;--tw-text-opacity:1;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;color:rgb(82 138 250/var(--tw-text-opacity));outline:2px solid transparent!important;outline-offset:2px!important}:host(.focused) ::slotted(div[contenteditable].p-input),:host(.focused) ::slotted(input[type=date].p-input),:host(.focused) ::slotted(input[type=datetime-local].p-input),:host(.focused) ::slotted(input[type=email].p-input),:host(.focused) ::slotted(input[type=month].p-input),:host(.focused) ::slotted(input[type=number].p-input),:host(.focused) ::slotted(input[type=password].p-input),:host(.focused) ::slotted(input[type=tel].p-input),:host(.focused) ::slotted(input[type=text].p-input),:host(.focused) ::slotted(input[type=time].p-input),:host(.focused) ::slotted(textarea.p-input),:host(:focus) ::slotted(div[contenteditable].p-input),:host(:focus) ::slotted(input[type=date].p-input),:host(:focus) ::slotted(input[type=datetime-local].p-input),:host(:focus) ::slotted(input[type=email].p-input),:host(:focus) ::slotted(input[type=month].p-input),:host(:focus) ::slotted(input[type=number].p-input),:host(:focus) ::slotted(input[type=password].p-input),:host(:focus) ::slotted(input[type=tel].p-input),:host(:focus) ::slotted(input[type=text].p-input),:host(:focus) ::slotted(input[type=time].p-input),:host(:focus) ::slotted(textarea.p-input),:host(:focus-within) ::slotted(div[contenteditable].p-input),:host(:focus-within) ::slotted(input[type=date].p-input),:host(:focus-within) ::slotted(input[type=datetime-local].p-input),:host(:focus-within) ::slotted(input[type=email].p-input),:host(:focus-within) ::slotted(input[type=month].p-input),:host(:focus-within) ::slotted(input[type=number].p-input),:host(:focus-within) ::slotted(input[type=password].p-input),:host(:focus-within) ::slotted(input[type=tel].p-input),:host(:focus-within) ::slotted(input[type=text].p-input),:host(:focus-within) ::slotted(input[type=time].p-input),:host(:focus-within) ::slotted(textarea.p-input),:host([focused]) ::slotted(div[contenteditable].p-input),:host([focused]) ::slotted(input[type=date].p-input),:host([focused]) ::slotted(input[type=datetime-local].p-input),:host([focused]) ::slotted(input[type=email].p-input),:host([focused]) ::slotted(input[type=month].p-input),:host([focused]) ::slotted(input[type=number].p-input),:host([focused]) ::slotted(input[type=password].p-input),:host([focused]) ::slotted(input[type=tel].p-input),:host([focused]) ::slotted(input[type=text].p-input),:host([focused]) ::slotted(input[type=time].p-input),:host([focused]) ::slotted(textarea.p-input){--tw-border-opacity:1!important;border-color:rgb(82 138 250/var(--tw-border-opacity))!important;outline:2px solid transparent!important;outline-offset:2px!important}:host(.error) .prefix,:host(.error) .suffix,:host([error]) .prefix,:host([error]) .suffix{--tw-border-opacity:1!important;--tw-text-opacity:1;border-color:rgb(185 30 40/var(--tw-border-opacity))!important;color:rgb(138 15 29/var(--tw-text-opacity));color:rgb(185 30 40/var(--tw-text-opacity))}:host(.error) .prefix::-moz-placeholder,:host(.error) .suffix::-moz-placeholder,:host([error]) .prefix::-moz-placeholder,:host([error]) .suffix::-moz-placeholder{--tw-text-opacity:1;color:rgb(255 204 211/var(--tw-text-opacity))}:host(.error) .prefix::placeholder,:host(.error) .suffix::placeholder,:host([error]) .prefix::placeholder,:host([error]) .suffix::placeholder{--tw-text-opacity:1;color:rgb(255 204 211/var(--tw-text-opacity))}:host(.error) .suffix,:host([error]) .suffix{align-items:flex-start;padding-bottom:calc(.75rem - 1px);padding-top:calc(.75rem - 1px)}:host(.error) ::slotted(div[contenteditable].p-input),:host(.error) ::slotted(input[type=date].p-input),:host(.error) ::slotted(input[type=datetime-local].p-input),:host(.error) ::slotted(input[type=email].p-input),:host(.error) ::slotted(input[type=month].p-input),:host(.error) ::slotted(input[type=number].p-input),:host(.error) ::slotted(input[type=password].p-input),:host(.error) ::slotted(input[type=tel].p-input),:host(.error) ::slotted(input[type=text].p-input),:host(.error) ::slotted(input[type=time].p-input),:host(.error) ::slotted(textarea.p-input),:host([error]) ::slotted(div[contenteditable].p-input),:host([error]) ::slotted(input[type=date].p-input),:host([error]) ::slotted(input[type=datetime-local].p-input),:host([error]) ::slotted(input[type=email].p-input),:host([error]) ::slotted(input[type=month].p-input),:host([error]) ::slotted(input[type=number].p-input),:host([error]) ::slotted(input[type=password].p-input),:host([error]) ::slotted(input[type=tel].p-input),:host([error]) ::slotted(input[type=text].p-input),:host([error]) ::slotted(input[type=time].p-input),:host([error]) ::slotted(textarea.p-input){--tw-text-opacity:1;--tw-border-opacity:1!important;border-color:rgb(185 30 40/var(--tw-border-opacity))!important;color:rgb(138 15 29/var(--tw-text-opacity))}:host(.error) ::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) ::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) ::slotted(textarea.p-input)::-moz-placeholder,:host([error]) ::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) ::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) ::slotted(textarea.p-input)::-moz-placeholder{--tw-text-opacity:1;color:rgb(255 204 211/var(--tw-text-opacity))}:host(.error) ::slotted(div[contenteditable].p-input)::placeholder,:host(.error) ::slotted(input[type=date].p-input)::placeholder,:host(.error) ::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) ::slotted(input[type=email].p-input)::placeholder,:host(.error) ::slotted(input[type=month].p-input)::placeholder,:host(.error) ::slotted(input[type=number].p-input)::placeholder,:host(.error) ::slotted(input[type=password].p-input)::placeholder,:host(.error) ::slotted(input[type=tel].p-input)::placeholder,:host(.error) ::slotted(input[type=text].p-input)::placeholder,:host(.error) ::slotted(input[type=time].p-input)::placeholder,:host(.error) ::slotted(textarea.p-input)::placeholder,:host([error]) ::slotted(div[contenteditable].p-input)::placeholder,:host([error]) ::slotted(input[type=date].p-input)::placeholder,:host([error]) ::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) ::slotted(input[type=email].p-input)::placeholder,:host([error]) ::slotted(input[type=month].p-input)::placeholder,:host([error]) ::slotted(input[type=number].p-input)::placeholder,:host([error]) ::slotted(input[type=password].p-input)::placeholder,:host([error]) ::slotted(input[type=tel].p-input)::placeholder,:host([error]) ::slotted(input[type=text].p-input)::placeholder,:host([error]) ::slotted(input[type=time].p-input)::placeholder,:host([error]) ::slotted(textarea.p-input)::placeholder{--tw-text-opacity:1;color:rgb(255 204 211/var(--tw-text-opacity))}:host(.error) .active::slotted(div[contenteditable].p-input),:host(.error) .active::slotted(input[type=date].p-input),:host(.error) .active::slotted(input[type=datetime-local].p-input),:host(.error) .active::slotted(input[type=email].p-input),:host(.error) .active::slotted(input[type=month].p-input),:host(.error) .active::slotted(input[type=number].p-input),:host(.error) .active::slotted(input[type=password].p-input),:host(.error) .active::slotted(input[type=tel].p-input),:host(.error) .active::slotted(input[type=text].p-input),:host(.error) .active::slotted(input[type=time].p-input),:host(.error) .active::slotted(textarea.p-input),:host(.error) .focus::slotted(div[contenteditable].p-input),:host(.error) .focus::slotted(input[type=date].p-input),:host(.error) .focus::slotted(input[type=datetime-local].p-input),:host(.error) .focus::slotted(input[type=email].p-input),:host(.error) .focus::slotted(input[type=month].p-input),:host(.error) .focus::slotted(input[type=number].p-input),:host(.error) .focus::slotted(input[type=password].p-input),:host(.error) .focus::slotted(input[type=tel].p-input),:host(.error) .focus::slotted(input[type=text].p-input),:host(.error) .focus::slotted(input[type=time].p-input),:host(.error) .focus::slotted(textarea.p-input),:host(.error) :focus-visible::slotted(div[contenteditable].p-input),:host(.error) :focus-visible::slotted(input[type=date].p-input),:host(.error) :focus-visible::slotted(input[type=datetime-local].p-input),:host(.error) :focus-visible::slotted(input[type=email].p-input),:host(.error) :focus-visible::slotted(input[type=month].p-input),:host(.error) :focus-visible::slotted(input[type=number].p-input),:host(.error) :focus-visible::slotted(input[type=password].p-input),:host(.error) :focus-visible::slotted(input[type=tel].p-input),:host(.error) :focus-visible::slotted(input[type=text].p-input),:host(.error) :focus-visible::slotted(input[type=time].p-input),:host(.error) :focus-visible::slotted(textarea.p-input),:host(.error) :focus-within::slotted(div[contenteditable].p-input),:host(.error) :focus-within::slotted(input[type=date].p-input),:host(.error) :focus-within::slotted(input[type=datetime-local].p-input),:host(.error) :focus-within::slotted(input[type=email].p-input),:host(.error) :focus-within::slotted(input[type=month].p-input),:host(.error) :focus-within::slotted(input[type=number].p-input),:host(.error) :focus-within::slotted(input[type=password].p-input),:host(.error) :focus-within::slotted(input[type=tel].p-input),:host(.error) :focus-within::slotted(input[type=text].p-input),:host(.error) :focus-within::slotted(input[type=time].p-input),:host(.error) :focus-within::slotted(textarea.p-input),:host(.error) :focus::slotted(div[contenteditable].p-input),:host(.error) :focus::slotted(input[type=date].p-input),:host(.error) :focus::slotted(input[type=datetime-local].p-input),:host(.error) :focus::slotted(input[type=email].p-input),:host(.error) :focus::slotted(input[type=month].p-input),:host(.error) :focus::slotted(input[type=number].p-input),:host(.error) :focus::slotted(input[type=password].p-input),:host(.error) :focus::slotted(input[type=tel].p-input),:host(.error) :focus::slotted(input[type=text].p-input),:host(.error) :focus::slotted(input[type=time].p-input),:host(.error) :focus::slotted(textarea.p-input),:host(.error) [active]::slotted(div[contenteditable].p-input),:host(.error) [active]::slotted(input[type=date].p-input),:host(.error) [active]::slotted(input[type=datetime-local].p-input),:host(.error) [active]::slotted(input[type=email].p-input),:host(.error) [active]::slotted(input[type=month].p-input),:host(.error) [active]::slotted(input[type=number].p-input),:host(.error) [active]::slotted(input[type=password].p-input),:host(.error) [active]::slotted(input[type=tel].p-input),:host(.error) [active]::slotted(input[type=text].p-input),:host(.error) [active]::slotted(input[type=time].p-input),:host(.error) [active]::slotted(textarea.p-input),:host([error]) .active::slotted(div[contenteditable].p-input),:host([error]) .active::slotted(input[type=date].p-input),:host([error]) .active::slotted(input[type=datetime-local].p-input),:host([error]) .active::slotted(input[type=email].p-input),:host([error]) .active::slotted(input[type=month].p-input),:host([error]) .active::slotted(input[type=number].p-input),:host([error]) .active::slotted(input[type=password].p-input),:host([error]) .active::slotted(input[type=tel].p-input),:host([error]) .active::slotted(input[type=text].p-input),:host([error]) .active::slotted(input[type=time].p-input),:host([error]) .active::slotted(textarea.p-input),:host([error]) .focus::slotted(div[contenteditable].p-input),:host([error]) .focus::slotted(input[type=date].p-input),:host([error]) .focus::slotted(input[type=datetime-local].p-input),:host([error]) .focus::slotted(input[type=email].p-input),:host([error]) .focus::slotted(input[type=month].p-input),:host([error]) .focus::slotted(input[type=number].p-input),:host([error]) .focus::slotted(input[type=password].p-input),:host([error]) .focus::slotted(input[type=tel].p-input),:host([error]) .focus::slotted(input[type=text].p-input),:host([error]) .focus::slotted(input[type=time].p-input),:host([error]) .focus::slotted(textarea.p-input),:host([error]) :focus-visible::slotted(div[contenteditable].p-input),:host([error]) :focus-visible::slotted(input[type=date].p-input),:host([error]) :focus-visible::slotted(input[type=datetime-local].p-input),:host([error]) :focus-visible::slotted(input[type=email].p-input),:host([error]) :focus-visible::slotted(input[type=month].p-input),:host([error]) :focus-visible::slotted(input[type=number].p-input),:host([error]) :focus-visible::slotted(input[type=password].p-input),:host([error]) :focus-visible::slotted(input[type=tel].p-input),:host([error]) :focus-visible::slotted(input[type=text].p-input),:host([error]) :focus-visible::slotted(input[type=time].p-input),:host([error]) :focus-visible::slotted(textarea.p-input),:host([error]) :focus-within::slotted(div[contenteditable].p-input),:host([error]) :focus-within::slotted(input[type=date].p-input),:host([error]) :focus-within::slotted(input[type=datetime-local].p-input),:host([error]) :focus-within::slotted(input[type=email].p-input),:host([error]) :focus-within::slotted(input[type=month].p-input),:host([error]) :focus-within::slotted(input[type=number].p-input),:host([error]) :focus-within::slotted(input[type=password].p-input),:host([error]) :focus-within::slotted(input[type=tel].p-input),:host([error]) :focus-within::slotted(input[type=text].p-input),:host([error]) :focus-within::slotted(input[type=time].p-input),:host([error]) :focus-within::slotted(textarea.p-input),:host([error]) :focus::slotted(div[contenteditable].p-input),:host([error]) :focus::slotted(input[type=date].p-input),:host([error]) :focus::slotted(input[type=datetime-local].p-input),:host([error]) :focus::slotted(input[type=email].p-input),:host([error]) :focus::slotted(input[type=month].p-input),:host([error]) :focus::slotted(input[type=number].p-input),:host([error]) :focus::slotted(input[type=password].p-input),:host([error]) :focus::slotted(input[type=tel].p-input),:host([error]) :focus::slotted(input[type=text].p-input),:host([error]) :focus::slotted(input[type=time].p-input),:host([error]) :focus::slotted(textarea.p-input),:host([error]) [active]::slotted(div[contenteditable].p-input),:host([error]) [active]::slotted(input[type=date].p-input),:host([error]) [active]::slotted(input[type=datetime-local].p-input),:host([error]) [active]::slotted(input[type=email].p-input),:host([error]) [active]::slotted(input[type=month].p-input),:host([error]) [active]::slotted(input[type=number].p-input),:host([error]) [active]::slotted(input[type=password].p-input),:host([error]) [active]::slotted(input[type=tel].p-input),:host([error]) [active]::slotted(input[type=text].p-input),:host([error]) [active]::slotted(input[type=time].p-input),:host([error]) [active]::slotted(textarea.p-input){--tw-text-opacity:1;--tw-border-opacity:1!important;border-color:rgb(185 30 40/var(--tw-border-opacity))!important;color:rgb(138 15 29/var(--tw-text-opacity))}:host(.error) .active::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) .active::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) .active::slotted(textarea.p-input)::-moz-placeholder,:host(.error) .focus::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) .focus::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) .focus::slotted(textarea.p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) :focus-visible::slotted(textarea.p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) :focus-within::slotted(textarea.p-input)::-moz-placeholder,:host(.error) :focus::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) :focus::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) :focus::slotted(textarea.p-input)::-moz-placeholder,:host(.error) [active]::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=date].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=email].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=month].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=number].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=password].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=text].p-input)::-moz-placeholder,:host(.error) [active]::slotted(input[type=time].p-input)::-moz-placeholder,:host(.error) [active]::slotted(textarea.p-input)::-moz-placeholder,:host([error]) .active::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) .active::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) .active::slotted(textarea.p-input)::-moz-placeholder,:host([error]) .focus::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) .focus::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) .focus::slotted(textarea.p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) :focus-visible::slotted(textarea.p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) :focus-within::slotted(textarea.p-input)::-moz-placeholder,:host([error]) :focus::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) :focus::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) :focus::slotted(textarea.p-input)::-moz-placeholder,:host([error]) [active]::slotted(div[contenteditable].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=date].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=email].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=month].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=number].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=password].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=tel].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=text].p-input)::-moz-placeholder,:host([error]) [active]::slotted(input[type=time].p-input)::-moz-placeholder,:host([error]) [active]::slotted(textarea.p-input)::-moz-placeholder{--tw-text-opacity:1;color:rgb(255 204 211/var(--tw-text-opacity))}:host(.error) .active::slotted(div[contenteditable].p-input)::placeholder,:host(.error) .active::slotted(input[type=date].p-input)::placeholder,:host(.error) .active::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) .active::slotted(input[type=email].p-input)::placeholder,:host(.error) .active::slotted(input[type=month].p-input)::placeholder,:host(.error) .active::slotted(input[type=number].p-input)::placeholder,:host(.error) .active::slotted(input[type=password].p-input)::placeholder,:host(.error) .active::slotted(input[type=tel].p-input)::placeholder,:host(.error) .active::slotted(input[type=text].p-input)::placeholder,:host(.error) .active::slotted(input[type=time].p-input)::placeholder,:host(.error) .active::slotted(textarea.p-input)::placeholder,:host(.error) .focus::slotted(div[contenteditable].p-input)::placeholder,:host(.error) .focus::slotted(input[type=date].p-input)::placeholder,:host(.error) .focus::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) .focus::slotted(input[type=email].p-input)::placeholder,:host(.error) .focus::slotted(input[type=month].p-input)::placeholder,:host(.error) .focus::slotted(input[type=number].p-input)::placeholder,:host(.error) .focus::slotted(input[type=password].p-input)::placeholder,:host(.error) .focus::slotted(input[type=tel].p-input)::placeholder,:host(.error) .focus::slotted(input[type=text].p-input)::placeholder,:host(.error) .focus::slotted(input[type=time].p-input)::placeholder,:host(.error) .focus::slotted(textarea.p-input)::placeholder,:host(.error) :focus-visible::slotted(div[contenteditable].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=date].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=email].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=month].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=number].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=password].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=tel].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=text].p-input)::placeholder,:host(.error) :focus-visible::slotted(input[type=time].p-input)::placeholder,:host(.error) :focus-visible::slotted(textarea.p-input)::placeholder,:host(.error) :focus-within::slotted(div[contenteditable].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=date].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=email].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=month].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=number].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=password].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=tel].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=text].p-input)::placeholder,:host(.error) :focus-within::slotted(input[type=time].p-input)::placeholder,:host(.error) :focus-within::slotted(textarea.p-input)::placeholder,:host(.error) :focus::slotted(div[contenteditable].p-input)::placeholder,:host(.error) :focus::slotted(input[type=date].p-input)::placeholder,:host(.error) :focus::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) :focus::slotted(input[type=email].p-input)::placeholder,:host(.error) :focus::slotted(input[type=month].p-input)::placeholder,:host(.error) :focus::slotted(input[type=number].p-input)::placeholder,:host(.error) :focus::slotted(input[type=password].p-input)::placeholder,:host(.error) :focus::slotted(input[type=tel].p-input)::placeholder,:host(.error) :focus::slotted(input[type=text].p-input)::placeholder,:host(.error) :focus::slotted(input[type=time].p-input)::placeholder,:host(.error) :focus::slotted(textarea.p-input)::placeholder,:host(.error) [active]::slotted(div[contenteditable].p-input)::placeholder,:host(.error) [active]::slotted(input[type=date].p-input)::placeholder,:host(.error) [active]::slotted(input[type=datetime-local].p-input)::placeholder,:host(.error) [active]::slotted(input[type=email].p-input)::placeholder,:host(.error) [active]::slotted(input[type=month].p-input)::placeholder,:host(.error) [active]::slotted(input[type=number].p-input)::placeholder,:host(.error) [active]::slotted(input[type=password].p-input)::placeholder,:host(.error) [active]::slotted(input[type=tel].p-input)::placeholder,:host(.error) [active]::slotted(input[type=text].p-input)::placeholder,:host(.error) [active]::slotted(input[type=time].p-input)::placeholder,:host(.error) [active]::slotted(textarea.p-input)::placeholder,:host([error]) .active::slotted(div[contenteditable].p-input)::placeholder,:host([error]) .active::slotted(input[type=date].p-input)::placeholder,:host([error]) .active::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) .active::slotted(input[type=email].p-input)::placeholder,:host([error]) .active::slotted(input[type=month].p-input)::placeholder,:host([error]) .active::slotted(input[type=number].p-input)::placeholder,:host([error]) .active::slotted(input[type=password].p-input)::placeholder,:host([error]) .active::slotted(input[type=tel].p-input)::placeholder,:host([error]) .active::slotted(input[type=text].p-input)::placeholder,:host([error]) .active::slotted(input[type=time].p-input)::placeholder,:host([error]) .active::slotted(textarea.p-input)::placeholder,:host([error]) .focus::slotted(div[contenteditable].p-input)::placeholder,:host([error]) .focus::slotted(input[type=date].p-input)::placeholder,:host([error]) .focus::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) .focus::slotted(input[type=email].p-input)::placeholder,:host([error]) .focus::slotted(input[type=month].p-input)::placeholder,:host([error]) .focus::slotted(input[type=number].p-input)::placeholder,:host([error]) .focus::slotted(input[type=password].p-input)::placeholder,:host([error]) .focus::slotted(input[type=tel].p-input)::placeholder,:host([error]) .focus::slotted(input[type=text].p-input)::placeholder,:host([error]) .focus::slotted(input[type=time].p-input)::placeholder,:host([error]) .focus::slotted(textarea.p-input)::placeholder,:host([error]) :focus-visible::slotted(div[contenteditable].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=date].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=email].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=month].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=number].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=password].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=tel].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=text].p-input)::placeholder,:host([error]) :focus-visible::slotted(input[type=time].p-input)::placeholder,:host([error]) :focus-visible::slotted(textarea.p-input)::placeholder,:host([error]) :focus-within::slotted(div[contenteditable].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=date].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=email].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=month].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=number].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=password].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=tel].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=text].p-input)::placeholder,:host([error]) :focus-within::slotted(input[type=time].p-input)::placeholder,:host([error]) :focus-within::slotted(textarea.p-input)::placeholder,:host([error]) :focus::slotted(div[contenteditable].p-input)::placeholder,:host([error]) :focus::slotted(input[type=date].p-input)::placeholder,:host([error]) :focus::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) :focus::slotted(input[type=email].p-input)::placeholder,:host([error]) :focus::slotted(input[type=month].p-input)::placeholder,:host([error]) :focus::slotted(input[type=number].p-input)::placeholder,:host([error]) :focus::slotted(input[type=password].p-input)::placeholder,:host([error]) :focus::slotted(input[type=tel].p-input)::placeholder,:host([error]) :focus::slotted(input[type=text].p-input)::placeholder,:host([error]) :focus::slotted(input[type=time].p-input)::placeholder,:host([error]) :focus::slotted(textarea.p-input)::placeholder,:host([error]) [active]::slotted(div[contenteditable].p-input)::placeholder,:host([error]) [active]::slotted(input[type=date].p-input)::placeholder,:host([error]) [active]::slotted(input[type=datetime-local].p-input)::placeholder,:host([error]) [active]::slotted(input[type=email].p-input)::placeholder,:host([error]) [active]::slotted(input[type=month].p-input)::placeholder,:host([error]) [active]::slotted(input[type=number].p-input)::placeholder,:host([error]) [active]::slotted(input[type=password].p-input)::placeholder,:host([error]) [active]::slotted(input[type=tel].p-input)::placeholder,:host([error]) [active]::slotted(input[type=text].p-input)::placeholder,:host([error]) [active]::slotted(input[type=time].p-input)::placeholder,:host([error]) [active]::slotted(textarea.p-input)::placeholder{--tw-text-opacity:1;color:rgb(255 204 211/var(--tw-text-opacity))}:host(.disabled) .prefix,:host(.disabled) .suffix,:host([disabled]) .prefix,:host([disabled]) .suffix{opacity:.4}:host(.disabled) ::slotted(div[contenteditable].p-input),:host(.disabled) ::slotted(input[type=date].p-input),:host(.disabled) ::slotted(input[type=datetime-local].p-input),:host(.disabled) ::slotted(input[type=email].p-input),:host(.disabled) ::slotted(input[type=month].p-input),:host(.disabled) ::slotted(input[type=number].p-input),:host(.disabled) ::slotted(input[type=password].p-input),:host(.disabled) ::slotted(input[type=tel].p-input),:host(.disabled) ::slotted(input[type=text].p-input),:host(.disabled) ::slotted(input[type=time].p-input),:host(.disabled) ::slotted(textarea.p-input),:host([disabled]) ::slotted(div[contenteditable].p-input),:host([disabled]) ::slotted(input[type=date].p-input),:host([disabled]) ::slotted(input[type=datetime-local].p-input),:host([disabled]) ::slotted(input[type=email].p-input),:host([disabled]) ::slotted(input[type=month].p-input),:host([disabled]) ::slotted(input[type=number].p-input),:host([disabled]) ::slotted(input[type=password].p-input),:host([disabled]) ::slotted(input[type=tel].p-input),:host([disabled]) ::slotted(input[type=text].p-input),:host([disabled]) ::slotted(input[type=time].p-input),:host([disabled]) ::slotted(textarea.p-input){opacity:.4;pointer-events:none}:host(.size-small) ::slotted(div[contenteditable].p-input),:host(.size-small) ::slotted(input[type=date].p-input),:host(.size-small) ::slotted(input[type=datetime-local].p-input),:host(.size-small) ::slotted(input[type=email].p-input),:host(.size-small) ::slotted(input[type=month].p-input),:host(.size-small) ::slotted(input[type=number].p-input),:host(.size-small) ::slotted(input[type=password].p-input),:host(.size-small) ::slotted(input[type=tel].p-input),:host(.size-small) ::slotted(input[type=text].p-input),:host(.size-small) ::slotted(input[type=time].p-input),:host(.size-small) ::slotted(textarea.p-input){font-size:.875rem;height:2rem!important;line-height:1.25rem}:host(.size-small) ::slotted(div[contenteditable].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=date].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=datetime-local].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=email].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=month].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=number].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=password].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=tel].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=text].p-input)::-moz-placeholder,:host(.size-small) ::slotted(input[type=time].p-input)::-moz-placeholder,:host(.size-small) ::slotted(textarea.p-input)::-moz-placeholder{font-size:.875rem;line-height:1.25rem}:host(.size-small) ::slotted(div[contenteditable].p-input)::placeholder,:host(.size-small) ::slotted(input[type=date].p-input)::placeholder,:host(.size-small) ::slotted(input[type=datetime-local].p-input)::placeholder,:host(.size-small) ::slotted(input[type=email].p-input)::placeholder,:host(.size-small) ::slotted(input[type=month].p-input)::placeholder,:host(.size-small) ::slotted(input[type=number].p-input)::placeholder,:host(.size-small) ::slotted(input[type=password].p-input)::placeholder,:host(.size-small) ::slotted(input[type=tel].p-input)::placeholder,:host(.size-small) ::slotted(input[type=text].p-input)::placeholder,:host(.size-small) ::slotted(input[type=time].p-input)::placeholder,:host(.size-small) ::slotted(textarea.p-input)::placeholder{font-size:.875rem;line-height:1.25rem}:host(.size-small.error) .suffix,:host(.size-small[error]) .suffix{padding-bottom:.5rem;padding-top:.5rem}.static{position:static!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.justify-between{justify-content:space-between!important}.text-negative{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}";const l=class{constructor(e){t(this,e);this._whitelistedTags=["input","textarea"];this.size="medium";this.prefix=undefined;this.suffix=undefined;this.icon=undefined;this.iconFlip=undefined;this.iconRotate=undefined;this.iconPosition="start";this.label=undefined;this.helper=undefined;this.required=undefined;this.error=undefined;this.disabled=false;this.focused=false;this.forceShowTooltip=false;this.focusMethod="focus";this.errorVariant="auto";this._forceShowTooltip=false}componentWillRender(){this._setInputClasses()}render(){var t;const{hasHeaderSlot:p,helper:i,label:r,prefix:s,suffix:n,errorAndErrorIsNotBoolean:l,errorVariant:u}=this._getSlotInfo();return e(o,{class:`p-input-group ${((t=this.error)===null||t===void 0?void 0:t.length)&&"error"} ${this.disabled&&"disabled"} ${this.focused&&"focused"} size-${this.size}`},e("div",{class:"flex items-end justify-between"},r&&e("div",{class:"input-label",onClick:()=>this._focusInput()},r,this.required&&e("span",{class:"ml-1 text-negative"},"*")),(i||p)&&e("div",{class:"input-header"},p&&e("slot",{name:"header"}),i&&e("p-helper",{class:`flex ${p?"ml-2":""}`,placement:"top-end"},i))),e("p-tooltip",{class:"w-full",variant:"error-element",content:this.error,show:l&&u==="element"&&(this.forceShowTooltip||this._forceShowTooltip),enableUserInput:false},e("div",{class:"content",slot:"trigger"},(s||this.icon&&this.iconPosition==="start")&&e("div",{class:`prefix size-${this.size}`,onClick:()=>this._focusInput()},this.icon&&this.iconPosition==="start"?e("p-icon",{class:"flex",variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):s),(n||l&&u==="icon"||this.icon&&this.iconPosition==="end")&&e("div",{class:`suffix size-${this.size}`,onClick:()=>this._focusInput()},l&&u==="icon"?e("p-input-error",{error:this.error,forceShowTooltip:this.forceShowTooltip||this._forceShowTooltip}):this.icon&&this.iconPosition==="end"?e("p-icon",{class:"flex",variant:this.icon,rotate:this.iconRotate,flip:this.iconFlip}):n),e("slot",{name:"input"}))))}handleFocusIn(){this._forceShowTooltip=true}handleFocusOut(){this._forceShowTooltip=false}_setInputClasses(){const t=this._el.querySelector(':scope > [slot="input"]');if(!t){return}const e=t.tagName.toLowerCase();if(this._whitelistedTags.indexOf(e)===-1){return}if(!t.classList.contains("p-input")){t.classList.add("p-input")}const{prefix:o,suffix:p,errorAndErrorIsNotBoolean:i,errorVariant:r}=this._getSlotInfo();if(p||i&&r==="icon"||this.icon&&this.iconPosition==="end"){t.classList.add("border-r-0","rounded-tr-none","rounded-br-none","pr-0")}else{t.classList.remove("border-r-0","rounded-tr-none","rounded-br-none","pr-0")}if(o||this.icon&&this.iconPosition==="start"){t.classList.add("border-l-0","rounded-tl-none","rounded-bl-none","pl-0")}else{t.classList.remove("border-l-0","rounded-tl-none","rounded-bl-none","pl-0")}if(this.size==="small"&&!t.classList.contains("size-small")){t.classList.add("size-small")}if(this.size!=="small"&&t.classList.contains("size-small")){t.classList.remove("size-small")}}_getSlotInfo(){const t=!!this._el.querySelector(':scope > [slot="helper"]');const o=!!this._el.querySelector(':scope > [slot="label"]');const p=!!this._el.querySelector(':scope > [slot="prefix"]');const i=!!this._el.querySelector(':scope > [slot="suffix"]');const r=!!this._el.querySelector(':scope > [slot="header"]');const s=t?e("slot",{name:"helper"}):this.helper;const n=o?e("slot",{name:"label"}):this.label;const l=p?e("slot",{name:"prefix"}):this.prefix;const u=i?e("slot",{name:"suffix"}):this.suffix;const d=this.error&&typeof this.error==="string"&&this.error!=="true";return{hasHelperSlot:t,hasLabelSlot:o,hasPrefixSlot:p,hasSuffixSlot:i,hasHeaderSlot:r,helper:s,label:n,prefix:l,suffix:u,errorAndErrorIsNotBoolean:d,errorVariant:this.errorVariant==="auto"?this._el.offsetWidth<=72?"element":"icon":this.errorVariant}}_focusInput(){const t=this._el.querySelector(':scope > [slot="input"]');t[this.focusMethod]()}get _el(){return p(this)}};l.style=n;export{r as p_helper,s as p_input_error,l as p_input_group};
2
+ //# sourceMappingURL=p-867c00e9.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["helperComponentCss","Helper","render","h","Host","class","placement","this","slot","InputError","variant","content","error","show","forceShowTooltip","onIsOpen","ev","_showTooltip","detail","inputGroupComponentCss","InputGroup","_whitelistedTags","componentWillRender","_setInputClasses","hasHeaderSlot","helper","label","prefix","suffix","errorAndErrorIsNotBoolean","errorVariant","_getSlotInfo","_a","length","disabled","focused","size","onClick","_focusInput","required","name","_forceShowTooltip","enableUserInput","icon","iconPosition","rotate","iconRotate","flip","iconFlip","handleFocusIn","handleFocusOut","input","_el","querySelector","tagName","toLowerCase","indexOf","classList","contains","add","remove","hasHelperSlot","hasLabelSlot","hasPrefixSlot","hasSuffixSlot","offsetWidth","focusMethod"],"sources":["src/components/atoms/helper/helper.component.scss?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx","src/components/molecules/input-error/input-error.component.tsx","src/components/molecules/input-group/input-group.component.scss?tag=p-input-group&encapsulation=shadow","src/components/molecules/input-group/input-group.component.tsx"],"sourcesContent":[":host {\n\t.helper {\n\t\t@apply inline-block cursor-pointer bg-no-repeat bg-center w-3 h-3;\n\t\tbackground-image: url(/assets/images/helper/helper.svg);\n\n\t\t&:hover {\n\t\t\tbackground-image: url(/assets/images/helper/helper-hover.svg);\n\t\t}\n\t}\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.scss',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-helper\">\n\t\t\t\t<p-tooltip placement={this.placement}>\n\t\t\t\t\t<div slot=\"content\">\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div slot=\"trigger\" class=\"helper\"></div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-input-error',\n\tshadow: true,\n})\nexport class InputError {\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Wether to force show the tooltip\n\t */\n\t@Prop() forceShowTooltip = false;\n\n\t@State() private _showTooltip = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-input-error\">\n\t\t\t\t<p-tooltip\n\t\t\t\t\tvariant=\"error\"\n\t\t\t\t\tcontent={this.error}\n\t\t\t\t\tshow={this.forceShowTooltip}\n\t\t\t\t\tonIsOpen={(ev) => (this._showTooltip = ev.detail)}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tclass={`${\n\t\t\t\t\t\t\tthis._showTooltip\n\t\t\t\t\t\t\t\t? 'text-negative'\n\t\t\t\t\t\t\t\t: 'text-negative-light'\n\t\t\t\t\t\t} hover:text-negative`}\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\tvariant=\"explanation\"\n\t\t\t\t\t/>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","@import '../../../style/form/mixins';\n\n@mixin slottedItems($prefix: false) {\n\t@include inputs($prefix, true) {\n\t\t@content;\n\t}\n}\n\n:host {\n\t@apply flex w-full flex-col;\n\t@apply outline-none #{!important};\n\n\t.input-label {\n\t\t@apply mb-[2px] text-xs font-semibold uppercase tracking-wider text-storm-vague;\n\t}\n\n\t.input-header {\n\t\t@apply mb-[2px] flex items-end gap-2;\n\t}\n\n\t.content {\n\t\t@apply flex w-full;\n\n\t\t.prefix,\n\t\t.suffix {\n\t\t\t@include inputDefaultState(false);\n\t\t\t@apply box-border flex-1 text-storm;\n\t\t\t@apply h-full;\n\t\t}\n\n\t\t.prefix {\n\t\t\t@apply rounded-br-none rounded-tr-none;\n\t\t\t@apply border-r-0 #{!important};\n\t\t\t@apply order-1;\n\t\t\t@apply pr-2;\n\t\t}\n\n\t\t.suffix {\n\t\t\t@apply rounded-bl-none rounded-tl-none;\n\t\t\t@apply order-3;\n\t\t\t@apply pl-2;\n\t\t\t@apply border-l-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems() {\n\t\t\t@include inputDefaultState();\n\t\t\t@apply order-2;\n\t\t}\n\n\t\t@include slottedItems('.prefix') {\n\t\t\t@apply rounded-bl-none rounded-tl-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-l-0 pl-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems('.suffix') {\n\t\t\t@apply rounded-br-none rounded-tr-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-r-0 pr-0 #{!important};\n\t\t}\n\t}\n}\n\n:host(.focused),\n:host([focused]),\n:host(:focus-within),\n:host(:focus) {\n\t@apply outline-none #{!important};\n\n\t.prefix,\n\t.suffix {\n\t\t@include inputFocusState();\n\t\t@apply text-indigo;\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputFocusState();\n\t}\n}\n\n:host(.error),\n:host([error]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputErrorState();\n\t\t@apply text-negative;\n\t}\n\n\t.suffix {\n\t\t@apply items-start py-[calc(0.75rem-1px)];\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputErrorState();\n\n\t\t&:focus,\n\t\t&:focus-within,\n\t\t&:focus-visible,\n\t\t&.focus,\n\t\t&[active],\n\t\t&.active {\n\t\t\t@include inputErrorState();\n\t\t}\n\t}\n}\n\n:host(.disabled),\n:host([disabled]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputDisabledState();\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputDisabledState();\n\t\tpointer-events: none;\n\t}\n}\n\n:host(.size-small) {\n\t@include slottedItems() {\n\t\t@include inputSizeSmall();\n\t}\n}\n\n:host(.size-small.error),\n:host(.size-small[error]) {\n\t.suffix {\n\t\t@apply py-2;\n\t}\n}\n","import {\n Component,\n Element,\n h,\n Host,\n Listen,\n Prop,\n State\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-input-group',\n\tstyleUrl: './input-group.component.scss',\n\tshadow: true,\n})\nexport class InputGroup {\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the input group\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the input group\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the input group is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The error variant to use\n\t */\n\t@Prop() errorVariant: 'auto' | 'suffix' | 'element' = 'auto';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _forceShowTooltip = false;\n\n\tprivate _whitelistedTags = ['input', 'textarea'];\n\n\tcomponentWillRender() {\n\t\tthis._setInputClasses();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-input-group ${this.error?.length && 'error'} ${\n\t\t\t\t\tthis.disabled && 'disabled'\n\t\t\t\t} ${this.focused && 'focused'} size-${this.size}`}\n\t\t\t>\n\t\t\t\t<div class=\"flex items-end justify-between\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"input-label\"\n\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t{this.required && (\n\t\t\t\t\t\t\t\t<span class=\"ml-1 text-negative\">*</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{(helper || hasHeaderSlot) && (\n\t\t\t\t\t\t<div class=\"input-header\">\n\t\t\t\t\t\t\t{hasHeaderSlot && <slot name=\"header\" />}\n\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\tclass={`flex ${\n\t\t\t\t\t\t\t\t\t\thasHeaderSlot ? 'ml-2' : ''\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\tplacement=\"top-end\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\tvariant=\"error-element\"\n\t\t\t\t\tcontent={this.error}\n\t\t\t\t\tshow={\n\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\terrorVariant === 'element' &&\n\t\t\t\t\t\t(this.forceShowTooltip || this._forceShowTooltip)\n\t\t\t\t\t}\n\t\t\t\t\tenableUserInput={false}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content\" slot=\"trigger\">\n\t\t\t\t\t\t{(prefix ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`prefix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'start' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(suffix ||\n\t\t\t\t\t\t\t(errorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\t\terrorVariant === 'icon') ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`suffix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{errorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\t\terrorVariant === 'icon' ? (\n\t\t\t\t\t\t\t\t\t<p-input-error\n\t\t\t\t\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\t\t\t\t\tforceShowTooltip={\n\t\t\t\t\t\t\t\t\t\t\tthis.forceShowTooltip || this._forceShowTooltip\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tthis._forceShowTooltip = true;\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tthis._forceShowTooltip = false;\n\t}\n\t/*\n With this, we shall hack the system in ways no one would ever have thought.\n\n <div class=\"pl-0 pr-0 border-l-0 border-r-0 rounded-tl-none rounded-bl-none rounded-tr-none rounded-br-none\"></div>\n */\n\tprivate _setInputClasses() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\n\t\tif (!input) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tagName = input.tagName.toLowerCase();\n\t\tif (this._whitelistedTags.indexOf(tagName) === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!input.classList.contains('p-input')) {\n\t\t\tinput.classList.add('p-input');\n\t\t}\n\n\t\tconst { prefix, suffix, errorAndErrorIsNotBoolean, errorVariant } =\n\t\t\tthis._getSlotInfo();\n\n\t\tif (\n\t\t\tsuffix ||\n\t\t\t(errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n\t\t\t(this.icon && this.iconPosition === 'end')\n\t\t) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t}\n\n\t\tif (prefix || (this.icon && this.iconPosition === 'start')) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t}\n\n\t\tif (this.size === 'small' && !input.classList.contains('size-small')) {\n\t\t\tinput.classList.add('size-small');\n\t\t}\n\n\t\tif (this.size !== 'small' && input.classList.contains('size-small')) {\n\t\t\tinput.classList.remove('size-small');\n\t\t}\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"helper\"]'\n\t\t);\n\t\tconst hasLabelSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"label\"]'\n\t\t);\n\t\tconst hasPrefixSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"prefix\"]'\n\t\t);\n\t\tconst hasSuffixSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"suffix\"]'\n\t\t);\n\t\tconst hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\n\t\tconst helper = hasHelperSlot ? <slot name=\"helper\" /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name=\"label\" /> : this.label;\n\t\tconst prefix = hasPrefixSlot ? <slot name=\"prefix\" /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name=\"suffix\" /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error &&\n\t\t\ttypeof this.error === 'string' &&\n\t\t\tthis.error !== 'true';\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant: this.errorVariant === 'auto' ? (this._el.offsetWidth <= 72 ? 'element' : 'icon') : this.errorVariant,\n\t\t};\n\t}\n\n\tprivate _focusInput() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAqB,yhB,MCQdC,EAAM,M,wCAIa,K,CAE/B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,YACXF,EAAA,aAAWG,UAAWC,KAAKD,WAC1BH,EAAA,OAAKK,KAAK,WACTL,EAAA,cAGDA,EAAA,OAAKK,KAAK,UAAUH,MAAM,Y,mBChBlBI,EAAU,M,oEASK,M,kBAEK,K,CAEhC,MAAAP,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,iBACXF,EAAA,aACCO,QAAQ,QAC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AAQpC,KAAKqC,eAAiB,QAAU,CAC3DO,EAAMM,UAAUE,IACf,aACA,kBACA,kBACA,O,KAEK,CACNR,EAAMM,UAAUG,OACf,aACA,kBACA,kBACA,O,CAIF,GAAIrD,KAAK6B,OAAS,UAAYe,EAAMM,UAAUC,SAAS,cAAe,CACrEP,EAAMM,UAAUE,IAAI,a,CAGrB,GAAIpD,KAAK6B,OAAS,SAAWe,EAAMM,UAAUC,SAAS,cAAe,CACpEP,EAAMM,UAAUG,OAAO,a,EAIjB,YAAA7B,GACP,MAAM8B,IAAkBtD,KAAK6C,IAAIC,cAChC,4BAED,MAAMS,IAAiBvD,KAAK6C,IAAIC,cAC/B,2BAED,MAAMU,IAAkBxD,KAAK6C,IAAIC,cAChC,4BAED,MAAMW,IAAkBzD,KAAK6C,IAAIC,cAChC,4BAED,MAAM7B,IAAkBjB,KAAK6C,IAAIC,cAChC,4BAGD,MAAM5B,EAASoC,EAAgB1D,EAAA,QAAMqC,KAAK,WAAcjC,KAAKkB,OAC7D,MAAMC,EAAQoC,EAAe3D,EAAA,QAAMqC,KAAK,UAAajC,KAAKmB,MAC1D,MAAMC,EAASoC,EAAgB5D,EAAA,QAAMqC,KAAK,WAAcjC,KAAKoB,OAC7D,MAAMC,EAASoC,EAAgB7D,EAAA,QAAMqC,KAAK,WAAcjC,KAAKqB,OAE7D,MAAMC,EACLtB,KAAKK,cACEL,KAAKK,QAAU,UACtBL,KAAKK,QAAU,OAEhB,MAAO,CACNiD,gBACAC,eACAC,gBACAC,gBACAxC,gBACAC,SACAC,QACAC,SACAC,SACAC,4BACAC,aAAcvB,KAAKuB,eAAiB,OAAUvB,KAAK6C,IAAIa,aAAe,GAAK,UAAY,OAAU1D,KAAKuB,a,CAIhG,WAAAQ,GACP,MAAMa,EAAQ5C,KAAK6C,IAAIC,cAAc,2BACpCF,EAAsB5C,KAAK2D,c"}
1
+ {"version":3,"names":["helperComponentCss","Helper","render","h","Host","class","placement","this","slot","InputError","variant","content","error","show","forceShowTooltip","onIsOpen","ev","_showTooltip","detail","inputGroupComponentCss","InputGroup","_whitelistedTags","componentWillRender","_setInputClasses","hasHeaderSlot","helper","label","prefix","suffix","errorAndErrorIsNotBoolean","errorVariant","_getSlotInfo","_a","length","disabled","focused","size","onClick","_focusInput","required","name","_forceShowTooltip","enableUserInput","icon","iconPosition","rotate","iconRotate","flip","iconFlip","handleFocusIn","handleFocusOut","input","_el","querySelector","tagName","toLowerCase","indexOf","classList","contains","add","remove","hasHelperSlot","hasLabelSlot","hasPrefixSlot","hasSuffixSlot","offsetWidth","focusMethod"],"sources":["src/components/atoms/helper/helper.component.scss?tag=p-helper&encapsulation=shadow","src/components/atoms/helper/helper.component.tsx","src/components/molecules/input-error/input-error.component.tsx","src/components/molecules/input-group/input-group.component.scss?tag=p-input-group&encapsulation=shadow","src/components/molecules/input-group/input-group.component.tsx"],"sourcesContent":[":host {\n\t.helper {\n\t\t@apply inline-block cursor-pointer bg-no-repeat bg-center w-3 h-3;\n\t\tbackground-image: url(/assets/images/helper/helper.svg);\n\n\t\t&:hover {\n\t\t\tbackground-image: url(/assets/images/helper/helper-hover.svg);\n\t\t}\n\t}\n}\n","import { Placement } from '@floating-ui/dom';\nimport { Component, h, Host, Prop } from '@stencil/core';\n\n@Component({\n\ttag: 'p-helper',\n\tstyleUrl: 'helper.component.scss',\n\tshadow: true,\n})\nexport class Helper {\n\t/**\n\t * The placement of the helper popover\n\t */\n\t@Prop() placement: Placement = 'top';\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-helper\">\n\t\t\t\t<p-tooltip placement={this.placement}>\n\t\t\t\t\t<div slot=\"content\">\n\t\t\t\t\t\t<slot />\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div slot=\"trigger\" class=\"helper\"></div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","import { Component, h, Host, Prop, State } from '@stencil/core';\n\n@Component({\n\ttag: 'p-input-error',\n\tshadow: true,\n})\nexport class InputError {\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Wether to force show the tooltip\n\t */\n\t@Prop() forceShowTooltip = false;\n\n\t@State() private _showTooltip = false;\n\n\trender() {\n\t\treturn (\n\t\t\t<Host class=\"p-input-error\">\n\t\t\t\t<p-tooltip\n\t\t\t\t\tvariant=\"error\"\n\t\t\t\t\tcontent={this.error}\n\t\t\t\t\tshow={this.forceShowTooltip}\n\t\t\t\t\tonIsOpen={(ev) => (this._showTooltip = ev.detail)}\n\t\t\t\t>\n\t\t\t\t\t<p-icon\n\t\t\t\t\t\tclass={`${\n\t\t\t\t\t\t\tthis._showTooltip\n\t\t\t\t\t\t\t\t? 'text-negative'\n\t\t\t\t\t\t\t\t: 'text-negative-light'\n\t\t\t\t\t\t} hover:text-negative`}\n\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\tvariant=\"explanation\"\n\t\t\t\t\t/>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n}\n","@import '../../../style/form/mixins';\n\n@mixin slottedItems($prefix: false) {\n\t@include inputs($prefix, true) {\n\t\t@content;\n\t}\n}\n\n:host {\n\t@apply flex w-full flex-col;\n\t@apply outline-none #{!important};\n\n\t.input-label {\n\t\t@apply mb-[2px] text-xs font-semibold uppercase tracking-wider text-storm-vague;\n\t}\n\n\t.input-header {\n\t\t@apply mb-[2px] flex items-end gap-2;\n\t}\n\n\t.content {\n\t\t@apply flex w-full;\n\n\t\t.prefix,\n\t\t.suffix {\n\t\t\t@include inputDefaultState(false);\n\t\t\t@apply box-border flex-1 text-storm;\n\t\t\t@apply h-full;\n\t\t}\n\n\t\t.prefix {\n\t\t\t@apply rounded-br-none rounded-tr-none;\n\t\t\t@apply border-r-0 #{!important};\n\t\t\t@apply order-1;\n\t\t\t@apply pr-2;\n\t\t}\n\n\t\t.suffix {\n\t\t\t@apply rounded-bl-none rounded-tl-none;\n\t\t\t@apply order-3;\n\t\t\t@apply pl-2;\n\t\t\t@apply border-l-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems() {\n\t\t\t@include inputDefaultState();\n\t\t\t@apply order-2;\n\t\t}\n\n\t\t@include slottedItems('.prefix') {\n\t\t\t@apply rounded-bl-none rounded-tl-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-l-0 pl-0 #{!important};\n\t\t}\n\n\t\t@include slottedItems('.suffix') {\n\t\t\t@apply rounded-br-none rounded-tr-none #{!important};\n\t\t\t@apply flex-auto;\n\t\t\t@apply border-r-0 pr-0 #{!important};\n\t\t}\n\t}\n}\n\n:host(.focused),\n:host([focused]),\n:host(:focus-within),\n:host(:focus) {\n\t@apply outline-none #{!important};\n\n\t.prefix,\n\t.suffix {\n\t\t@include inputFocusState();\n\t\t@apply text-indigo;\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputFocusState();\n\t}\n}\n\n:host(.error),\n:host([error]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputErrorState();\n\t\t@apply text-negative;\n\t}\n\n\t.suffix {\n\t\t@apply items-start py-[calc(0.75rem-1px)];\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputErrorState();\n\n\t\t&:focus,\n\t\t&:focus-within,\n\t\t&:focus-visible,\n\t\t&.focus,\n\t\t&[active],\n\t\t&.active {\n\t\t\t@include inputErrorState();\n\t\t}\n\t}\n}\n\n:host(.disabled),\n:host([disabled]) {\n\t.prefix,\n\t.suffix {\n\t\t@include inputDisabledState();\n\t}\n\n\t@include slottedItems() {\n\t\t@include inputDisabledState();\n\t\tpointer-events: none;\n\t}\n}\n\n:host(.size-small) {\n\t@include slottedItems() {\n\t\t@include inputSizeSmall();\n\t}\n}\n\n:host(.size-small.error),\n:host(.size-small[error]) {\n\t.suffix {\n\t\t@apply py-2;\n\t}\n}\n","import {\n Component,\n Element,\n h,\n Host,\n Listen,\n Prop,\n State\n} from '@stencil/core';\nimport { RotateOptions } from '../../../types/tailwind';\nimport { IconFlipOptions, IconVariant } from '../../atoms/icon/icon.component';\n\n@Component({\n\ttag: 'p-input-group',\n\tstyleUrl: './input-group.component.scss',\n\tshadow: true,\n})\nexport class InputGroup {\n\t/**\n\t * The size of the input group\n\t */\n\t@Prop() size: 'small' | 'medium' = 'medium';\n\n\t/**\n\t * The prefix of the input group\n\t */\n\t@Prop() prefix: string;\n\n\t/**\n\t * The suffix of the input group\n\t */\n\t@Prop() suffix: string;\n\n\t/**\n\t * Icon of the input group\n\t */\n\t@Prop() icon: IconVariant;\n\n\t/**\n\t * Icon flip\n\t */\n\t@Prop() iconFlip: IconFlipOptions;\n\n\t/**\n\t * Icon rotate\n\t */\n\t@Prop() iconRotate: RotateOptions;\n\n\t/**\n\t * Icon position\n\t */\n\t@Prop() iconPosition: 'start' | 'end' = 'start';\n\n\t/**\n\t * The label of the input group\n\t */\n\t@Prop() label: string;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop() helper: string;\n\n\t/**\n\t * Wether the field is required\n\t */\n\t@Prop({ reflect: true }) required: boolean;\n\n\t/**\n\t * The helper of the input group\n\t */\n\t@Prop({ reflect: true }) error: string;\n\n\t/**\n\t * Wether the input group is disabled\n\t */\n\t@Prop({ reflect: true }) disabled: boolean = false;\n\n\t/**\n\t * Wether the input group is focused\n\t */\n\t@Prop({ reflect: true }) focused: boolean = false;\n\n\t/**\n\t * Force show the error tooltip\n\t */\n\t@Prop({ reflect: true }) forceShowTooltip: boolean = false;\n\n\t/**\n\t * The method to use when focusing the input\n\t */\n\t@Prop() focusMethod: 'focus' | 'click' = 'focus';\n\n\t/**\n\t * The error variant to use\n\t */\n\t@Prop() errorVariant: 'auto' | 'suffix' | 'element' = 'auto';\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\t@State() private _forceShowTooltip = false;\n\n\tprivate _whitelistedTags = ['input', 'textarea'];\n\n\tcomponentWillRender() {\n\t\tthis._setInputClasses();\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant,\n\t\t} = this._getSlotInfo();\n\n\t\treturn (\n\t\t\t<Host\n\t\t\t\tclass={`p-input-group ${this.error?.length && 'error'} ${\n\t\t\t\t\tthis.disabled && 'disabled'\n\t\t\t\t} ${this.focused && 'focused'} size-${this.size}`}\n\t\t\t>\n\t\t\t\t<div class=\"flex items-end justify-between\">\n\t\t\t\t\t{label && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclass=\"input-label\"\n\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t{this.required && (\n\t\t\t\t\t\t\t\t<span class=\"ml-1 text-negative\">*</span>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\n\t\t\t\t\t{(helper || hasHeaderSlot) && (\n\t\t\t\t\t\t<div class=\"input-header\">\n\t\t\t\t\t\t\t{hasHeaderSlot && <slot name=\"header\" />}\n\t\t\t\t\t\t\t{helper && (\n\t\t\t\t\t\t\t\t<p-helper\n\t\t\t\t\t\t\t\t\tclass={`flex ${\n\t\t\t\t\t\t\t\t\t\thasHeaderSlot ? 'ml-2' : ''\n\t\t\t\t\t\t\t\t\t}`}\n\t\t\t\t\t\t\t\t\tplacement=\"top-end\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{helper}\n\t\t\t\t\t\t\t\t</p-helper>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<p-tooltip\n\t\t\t\t\tclass=\"w-full\"\n\t\t\t\t\tvariant=\"error-element\"\n\t\t\t\t\tcontent={this.error}\n\t\t\t\t\tshow={\n\t\t\t\t\t\terrorAndErrorIsNotBoolean &&\n\t\t\t\t\t\terrorVariant === 'element' &&\n\t\t\t\t\t\t(this.forceShowTooltip || this._forceShowTooltip)\n\t\t\t\t\t}\n\t\t\t\t\tenableUserInput={false}\n\t\t\t\t>\n\t\t\t\t\t<div class=\"content\" slot=\"trigger\">\n\t\t\t\t\t\t{(prefix ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'start')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`prefix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this.icon && this.iconPosition === 'start' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tprefix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t{(suffix ||\n\t\t\t\t\t\t\t(errorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\t\terrorVariant === 'icon') ||\n\t\t\t\t\t\t\t(this.icon && this.iconPosition === 'end')) && (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tclass={`suffix size-${this.size}`}\n\t\t\t\t\t\t\t\tonClick={() => this._focusInput()}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{errorAndErrorIsNotBoolean &&\n\t\t\t\t\t\t\t\terrorVariant === 'icon' ? (\n\t\t\t\t\t\t\t\t\t<p-input-error\n\t\t\t\t\t\t\t\t\t\terror={this.error}\n\t\t\t\t\t\t\t\t\t\tforceShowTooltip={\n\t\t\t\t\t\t\t\t\t\t\tthis.forceShowTooltip || this._forceShowTooltip\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : this.icon && this.iconPosition === 'end' ? (\n\t\t\t\t\t\t\t\t\t<p-icon\n\t\t\t\t\t\t\t\t\t\tclass=\"flex\"\n\t\t\t\t\t\t\t\t\t\tvariant={this.icon}\n\t\t\t\t\t\t\t\t\t\trotate={this.iconRotate}\n\t\t\t\t\t\t\t\t\t\tflip={this.iconFlip}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t\tsuffix\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t<slot name=\"input\" />\n\t\t\t\t\t</div>\n\t\t\t\t</p-tooltip>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\t@Listen('focusin')\n\thandleFocusIn() {\n\t\tthis._forceShowTooltip = true;\n\t}\n\n\t@Listen('focusout')\n\thandleFocusOut() {\n\t\tthis._forceShowTooltip = false;\n\t}\n\t/*\n With this, we shall hack the system in ways no one would ever have thought.\n\n <div class=\"pl-0 pr-0 border-l-0 border-r-0 rounded-tl-none rounded-bl-none rounded-tr-none rounded-br-none\"></div>\n */\n\tprivate _setInputClasses() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\n\t\tif (!input) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst tagName = input.tagName.toLowerCase();\n\t\tif (this._whitelistedTags.indexOf(tagName) === -1) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!input.classList.contains('p-input')) {\n\t\t\tinput.classList.add('p-input');\n\t\t}\n\n\t\tconst { prefix, suffix, errorAndErrorIsNotBoolean, errorVariant } =\n\t\t\tthis._getSlotInfo();\n\n\t\tif (\n\t\t\tsuffix ||\n\t\t\t(errorAndErrorIsNotBoolean && errorVariant === 'icon') ||\n\t\t\t(this.icon && this.iconPosition === 'end')\n\t\t) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-r-0',\n\t\t\t\t'rounded-tr-none',\n\t\t\t\t'rounded-br-none',\n\t\t\t\t'pr-0'\n\t\t\t);\n\t\t}\n\n\t\tif (prefix || (this.icon && this.iconPosition === 'start')) {\n\t\t\tinput.classList.add(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t} else {\n\t\t\tinput.classList.remove(\n\t\t\t\t'border-l-0',\n\t\t\t\t'rounded-tl-none',\n\t\t\t\t'rounded-bl-none',\n\t\t\t\t'pl-0'\n\t\t\t);\n\t\t}\n\n\t\tif (this.size === 'small' && !input.classList.contains('size-small')) {\n\t\t\tinput.classList.add('size-small');\n\t\t}\n\n\t\tif (this.size !== 'small' && input.classList.contains('size-small')) {\n\t\t\tinput.classList.remove('size-small');\n\t\t}\n\t}\n\n\tprivate _getSlotInfo() {\n\t\tconst hasHelperSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"helper\"]'\n\t\t);\n\t\tconst hasLabelSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"label\"]'\n\t\t);\n\t\tconst hasPrefixSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"prefix\"]'\n\t\t);\n\t\tconst hasSuffixSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"suffix\"]'\n\t\t);\n\t\tconst hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\n\t\tconst helper = hasHelperSlot ? <slot name=\"helper\" /> : this.helper;\n\t\tconst label = hasLabelSlot ? <slot name=\"label\" /> : this.label;\n\t\tconst prefix = hasPrefixSlot ? <slot name=\"prefix\" /> : this.prefix;\n\t\tconst suffix = hasSuffixSlot ? <slot name=\"suffix\" /> : this.suffix;\n\n\t\tconst errorAndErrorIsNotBoolean =\n\t\t\tthis.error &&\n\t\t\ttypeof this.error === 'string' &&\n\t\t\tthis.error !== 'true';\n\n\t\treturn {\n\t\t\thasHelperSlot,\n\t\t\thasLabelSlot,\n\t\t\thasPrefixSlot,\n\t\t\thasSuffixSlot,\n\t\t\thasHeaderSlot,\n\t\t\thelper,\n\t\t\tlabel,\n\t\t\tprefix,\n\t\t\tsuffix,\n\t\t\terrorAndErrorIsNotBoolean,\n\t\t\terrorVariant: this.errorVariant === 'auto' ? (this._el.offsetWidth <= 72 ? 'element' : 'icon') : this.errorVariant,\n\t\t};\n\t}\n\n\tprivate _focusInput() {\n\t\tconst input = this._el.querySelector(':scope > [slot=\"input\"]');\n\t\t(input as HTMLElement)[this.focusMethod]();\n\t}\n}\n"],"mappings":"yDAAA,MAAMA,EAAqB,yhB,MCQdC,EAAM,M,wCAIa,K,CAE/B,MAAAC,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,YACXF,EAAA,aAAWG,UAAWC,KAAKD,WAC1BH,EAAA,OAAKK,KAAK,WACTL,EAAA,cAGDA,EAAA,OAAKK,KAAK,UAAUH,MAAM,Y,mBChBlBI,EAAU,M,oEASK,M,kBAEK,K,CAEhC,MAAAP,GACC,OACCC,EAACC,EAAI,CAACC,MAAM,iBACXF,EAAA,aACCO,QAAQ,QACRC,QAASJ,KAAKK,MACdC,KAAMN,KAAKO,iBACXC,SAAWC,GAAQT,KAAKU,aAAeD,EAAGE,QAE1Cf,EAAA,UACCE,MAAO,GACNE,KAAKU,aACF,gBACA,4CAEJT,KAAK,UACLE,QAAQ,iB,GCnCd,MAAMS,EAAyB,souD,MCiBlBC,EAAU,M,yBAwFdb,KAAAc,iBAAmB,CAAC,QAAS,Y,UApFF,S,oIA8BK,Q,sGAyBK,M,aAKD,M,sBAKS,M,iBAKZ,Q,kBAKa,O,uBAOjB,K,CAIrC,mBAAAC,GACCf,KAAKgB,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