blip-ds 1.251.3 → 1.251.5

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 (73) hide show
  1. package/dist/blip-ds/bds-autocomplete.entry.js +6 -1
  2. package/dist/blip-ds/bds-autocomplete.system.entry.js +1 -1
  3. package/dist/blip-ds/bds-pagination.entry.js +6 -1
  4. package/dist/blip-ds/bds-pagination.system.entry.js +1 -1
  5. package/dist/blip-ds/bds-select-chips.entry.js +6 -1
  6. package/dist/blip-ds/bds-select-chips.system.entry.js +1 -1
  7. package/dist/blip-ds/bds-select.entry.js +6 -1
  8. package/dist/blip-ds/bds-select.system.entry.js +1 -1
  9. package/dist/blip-ds/bds-step.entry.js +5 -2
  10. package/dist/blip-ds/bds-step.system.entry.js +1 -1
  11. package/dist/blip-ds/bds-test-component.entry.js +15 -0
  12. package/dist/blip-ds/bds-test-component.system.entry.js +1 -0
  13. package/dist/blip-ds/blip-ds.esm.js +1 -1
  14. package/dist/blip-ds/blip-ds.system.js +1 -1
  15. package/dist/blip-ds/p-249af226.entry.js +1 -0
  16. package/dist/blip-ds/{p-cb5a9670.system.entry.js → p-2be62077.system.entry.js} +1 -1
  17. package/dist/blip-ds/p-40b2f3c5.system.entry.js +1 -0
  18. package/dist/blip-ds/p-4ce6d4f7.system.entry.js +1 -0
  19. package/dist/blip-ds/{p-46ea9df8.system.entry.js → p-532e9998.system.entry.js} +1 -1
  20. package/dist/blip-ds/p-5e392358.entry.js +1 -0
  21. package/dist/blip-ds/p-8b0c9586.entry.js +1 -0
  22. package/dist/blip-ds/p-8c912a01.entry.js +1 -0
  23. package/dist/blip-ds/{p-f959c757.system.entry.js → p-9a352e16.system.entry.js} +1 -1
  24. package/dist/blip-ds/{p-06dad0b1.system.entry.js → p-a0ae314b.system.entry.js} +1 -1
  25. package/dist/blip-ds/p-b2b7d02c.entry.js +1 -0
  26. package/dist/blip-ds/p-bb975dd8.system.js +1 -1
  27. package/dist/blip-ds/p-e4c6e237.entry.js +1 -0
  28. package/dist/cjs/bds-autocomplete.cjs.entry.js +6 -1
  29. package/dist/cjs/bds-pagination.cjs.entry.js +6 -1
  30. package/dist/cjs/bds-select-chips.cjs.entry.js +6 -1
  31. package/dist/cjs/bds-select.cjs.entry.js +6 -1
  32. package/dist/cjs/bds-step.cjs.entry.js +5 -2
  33. package/dist/cjs/bds-test-component.cjs.entry.js +19 -0
  34. package/dist/cjs/blip-ds.cjs.js +1 -1
  35. package/dist/cjs/loader.cjs.js +1 -1
  36. package/dist/collection/collection-manifest.json +1 -0
  37. package/dist/collection/components/autocomplete/autocomplete.js +6 -1
  38. package/dist/collection/components/pagination/pagination.js +6 -1
  39. package/dist/collection/components/selects/select/select.js +6 -1
  40. package/dist/collection/components/selects/select-chips/select-chips.js +6 -1
  41. package/dist/collection/components/stepper/step/step.css +8 -0
  42. package/dist/collection/components/stepper/step/step.js +4 -1
  43. package/dist/collection/components/test-component/test-component.css +0 -0
  44. package/dist/collection/components/test-component/test-component.js +17 -0
  45. package/dist/esm/bds-autocomplete.entry.js +6 -1
  46. package/dist/esm/bds-pagination.entry.js +6 -1
  47. package/dist/esm/bds-select-chips.entry.js +6 -1
  48. package/dist/esm/bds-select.entry.js +6 -1
  49. package/dist/esm/bds-step.entry.js +5 -2
  50. package/dist/esm/bds-test-component.entry.js +15 -0
  51. package/dist/esm/blip-ds.js +1 -1
  52. package/dist/esm/loader.js +1 -1
  53. package/dist/esm-es5/bds-autocomplete.entry.js +1 -1
  54. package/dist/esm-es5/bds-pagination.entry.js +1 -1
  55. package/dist/esm-es5/bds-select-chips.entry.js +1 -1
  56. package/dist/esm-es5/bds-select.entry.js +1 -1
  57. package/dist/esm-es5/bds-step.entry.js +1 -1
  58. package/dist/esm-es5/bds-test-component.entry.js +1 -0
  59. package/dist/esm-es5/blip-ds.js +1 -1
  60. package/dist/esm-es5/loader.js +1 -1
  61. package/dist/types/components/autocomplete/autocomplete.d.ts +2 -1
  62. package/dist/types/components/pagination/pagination.d.ts +2 -1
  63. package/dist/types/components/selects/select/select.d.ts +2 -1
  64. package/dist/types/components/selects/select-chips/select-chips.d.ts +2 -1
  65. package/dist/types/components/test-component/test-component.d.ts +3 -0
  66. package/dist/types/components.d.ts +13 -0
  67. package/package.json +1 -1
  68. package/dist/blip-ds/p-0d6a7b10.entry.js +0 -1
  69. package/dist/blip-ds/p-4491bc1c.entry.js +0 -1
  70. package/dist/blip-ds/p-9326a5df.entry.js +0 -1
  71. package/dist/blip-ds/p-a328143d.entry.js +0 -1
  72. package/dist/blip-ds/p-ce8b74ee.entry.js +0 -1
  73. package/dist/blip-ds/p-dc32359e.system.entry.js +0 -1
@@ -155,13 +155,15 @@ const BdsAutocomplete = class {
155
155
  this.clearIconOnFocus = false;
156
156
  this.dataTest = null;
157
157
  }
158
- isOpenChanged() {
158
+ isOpenChanged(isOpen) {
159
159
  if (this.positionHeightDrop == 'bottom') {
160
160
  this.iconDropElement.name = this.isOpen ? 'arrow-up' : 'arrow-down';
161
161
  }
162
162
  else {
163
163
  this.iconDropElement.name = this.isOpen ? 'arrow-down' : 'arrow-up';
164
164
  }
165
+ if (isOpen)
166
+ this.validatePositionDrop();
165
167
  }
166
168
  itemSelectedChanged() {
167
169
  this.bdsSelectedChange.emit(this.selected);
@@ -202,6 +204,9 @@ const BdsAutocomplete = class {
202
204
  }
203
205
  }
204
206
  this.text = this.getText();
207
+ this.validatePositionDrop();
208
+ }
209
+ validatePositionDrop() {
205
210
  const positionValue = positionAbsoluteElement({
206
211
  actionElement: this.el,
207
212
  changedElement: this.dropElement,
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,o){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(o.next(e))}catch(t){r(t)}}function a(e){try{l(o["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):n(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(l){a=[6,l];n=0}finally{o=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js"],(function(e){"use strict";var t,i,o,n,r,s,a;return{setters:[function(e){t=e.r;i=e.e;o=e.h;n=e.f;r=e.g},function(e){s=e.g;a=e.p}],execute:function(){var l=':host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}:host input,:host textarea{-webkit-box-shadow:inherit;box-shadow:inherit}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::-moz-placeholder,:host textarea::-moz-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::-ms-input-placeholder,:host textarea::-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::placeholder,:host textarea::placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff)}.input--state-primary{border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-info, #80e3eb);box-shadow:0 0 0 2px var(--color-info, #80e3eb)}.input--state-primary .input__icon{color:var(--color-primary, #3f7de8);background-color:var(--color-surface-3, #e7edf4)}.input--state-primary .input__container__label{color:var(--color-content-default, #202c44)}.input--state-primary .input__container__label--pressed{color:var(--color-primary, #3f7de8)}.input--state-primary .input__container__text{caret-color:var(--color-primary, #3f7de8);color:var(--color-content-default, #202c44)}.input--state-danger{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-error, #ffa5a5);box-shadow:0 0 0 2px var(--color-error, #ffa5a5)}.input--state-danger .input__icon{color:var(--color-delete, #ff4c4c);background-color:var(--color-error, #ffa5a5)}.input--state-danger .input__container__label{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__label--pressed{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__text{caret-color:var(--color-delete, #ff4c4c);color:var(--color-delete, #ff4c4c)}.input--state-disabled{cursor:not-allowed;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:var(--color-surface-3, #e7edf4)}.input--state-disabled:hover{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4);box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4)}.input--state-disabled .input__icon{color:var(--color-content-disable, #505f79);background-color:var(--color-surface-3, #e7edf4)}.input--state-disabled .input__container__label{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__label--pressed{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__text{caret-color:var(--color-content-disable, #505f79);color:var(--color-content-disable, #505f79)}.input--label{padding:7px 4px 8px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:var(--color-content-disable, #505f79);word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:var(--color-delete, #ff4c4c)}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;width:100%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text__chips{width:auto;min-width:216px;max-width:216px}:host{display:block}.select{position:relative;outline:none}.select__icon{color:var(--color-content-ghost, #6e7b91);display:-ms-flexbox;display:flex}.select__icon bds-icon{margin-left:10px}.select .icon-hidden{visibility:hidden}.select__options{background:var(--color-surface-2, #f3f6fa);width:100%;max-height:250px;position:absolute;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;pointer-events:none;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options::-webkit-scrollbar{width:16px;background-color:transparent}.select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open{opacity:1;pointer-events:auto}.select__options--position-top{bottom:calc(100% + 4px)}.select__options--position-bottom{top:calc(100% + 4px)}';var c=e("bds_autocomplete",function(){function e(e){var o=this;t(this,e);this.bdsChange=i(this,"bdsChange",7);this.bdsSelectedChange=i(this,"bdsSelectedChange",7);this.bdsInput=i(this,"bdsInput",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.refDropdown=function(e){o.dropElement=e};this.refIconDrop=function(e){o.iconDropElement=e};this.onFocus=function(){o.isFocused=true;o.isPressed=true;o.bdsFocus.emit()};this.onFocusout=function(){if(!o.isOpen){o.nativeInput.value=o.getText()}};this.onBlur=function(){o.bdsBlur.emit();o.isPressed=false;if(!o.isOpen){o.isFocused=false;o.nativeInput.value=o.getText();o.cleanInputSelection()}};this.onClickWrapper=function(){o.onFocus();o.toggle();if(o.nativeInput){o.nativeInput.focus()}};this.toggle=function(){if(!o.disabled){o.isOpen=!o.isOpen}};this.getTextFromOption=function(e){var t,i;if((e===null||e===void 0?void 0:e.status)||(e===null||e===void 0?void 0:e.bulkOption)){if(o.internalOptions){var n=o.internalOptions.find((function(t){return t.value==e.value}));if(n){return n.label}}return e.querySelector("#bds-typo-label-".concat(o.value)).textContent}return(e===null||e===void 0?void 0:e.titleText)?e.titleText:(i=(t=e===null||e===void 0?void 0:e.textContent)===null||t===void 0?void 0:t.trim())!==null&&i!==void 0?i:""};this.getText=function(){var e=o.childOptions.find((function(e){return e.value==o.value}));return o.getTextFromOption(e)};this.handler=function(e){var t=e.detail.value;o.value=t;o.toggle()};this.keyPressWrapper=function(e){var t,i;o.isOpen=true;switch(e.key){case"Enter":o.toggle();break;case"Tab":var n=o.findFocusedElementIndex();var r=o.sliceInvisible(n+1);var s=r[0];if(!s){o.toggle()}break;case"ArrowDown":var a=o.findFocusedElementIndex();var l=o.sliceInvisible(a+1);var c=l[0];(t=c===null||c===void 0?void 0:c.firstElementChild)===null||t===void 0?void 0:t.focus();break;case"ArrowUp":var p=o.findFocusedElementIndex();var d=o.childOptions.find((function(e){return!e.hasAttribute("invisible")}));if(o.childOptions[p]!=d){p=p>0?p:o.childOptions.length;var u=o.sliceInvisible(0,p);var b=u[u.length-1];(i=b===null||b===void 0?void 0:b.firstElementChild)===null||i===void 0?void 0:i.focus()}break}};this.cleanInputSelection=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!!this.disabled)return[3,2];this.value="";this.nativeInput.value="";this.isOpen=false;return[4,this.resetFilterOptions()];case 1:e.sent();e.label=2;case 2:return[2]}}))}))};this.changedInputValue=function(e){return __awaiter(o,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:t=e.target;if(t){this.value=t.value||""}this.bdsInput.emit(e);this.bdsChange.emit({value:this.nativeInput.value});if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:i.sent();return[3,5];case 2:this.value="";if(!this.isOpen)return[3,4];return[4,this.resetFilterOptions()];case 3:i.sent();return[3,5];case 4:this.setTimeoutFilter();i.label=5;case 5:if(this.isOpen===false){this.value=this.getSelectedValue();this.setTimeoutFilter()}return[2]}}))}))};this.intoView=null;this.isPressed=false;this.isOpen=false;this.text="";this.internalOptions=undefined;this.isFocused=false;this.options=undefined;this.value=undefined;this.selected=undefined;this.danger=false;this.disabled=false;this.searchOnlyTitle=true;this.label="";this.icon="";this.placeholder="";this.optionsPosition="bottom";this.clearIconOnFocus=false;this.dataTest=null}e.prototype.isOpenChanged=function(){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.isOpen?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.isOpen?"arrow-down":"arrow-up"}};e.prototype.itemSelectedChanged=function(){this.bdsSelectedChange.emit(this.selected)};e.prototype.valueChanged=function(){this.bdsChange.emit({value:this.value==null?this.value:this.value.toString()});for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value}this.selected=this.childOptionSelected;this.text=this.getText()};e.prototype.handleWindow=function(e){if(!this.el.contains(e.target)){this.isOpen=false}};e.prototype.parseOptions=function(){if(this.options){this.resetFilterOptions();try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(e){this.internalOptions=[]}}};e.prototype.componentWillLoad=function(){this.intoView=s(this.el);this.options&&this.parseOptions()};e.prototype.componentDidLoad=function(){if(!this.options){for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value;i.addEventListener("optionSelected",this.handler)}}this.text=this.getText();var o=a({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=o.y;if(o.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};Object.defineProperty(e.prototype,"childOptions",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")):Array.from(this.el.querySelectorAll("bds-select-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptionSelected",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")).find((function(e){return e.selected})):Array.from(this.el.querySelectorAll("bds-select-option")).find((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.sliceInvisible=function(e,t){if(t===void 0){t=this.childOptions.length}return this.childOptions.slice(e,t).filter((function(e){return!e.hasAttribute("invisible")}))};e.prototype.findFocusedElementIndex=function(){return this.childOptions.findIndex((function(e){return e.firstElementChild.matches(":focus")}))};e.prototype.setTimeoutFilter=function(){var e=this;setTimeout((function(){e.resetFilterOptions()}),500)};e.prototype.filterOptions=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,n,r;return __generator(this,(function(s){switch(s.label){case 0:if(!!e)return[3,2];return[4,this.resetFilterOptions()];case 1:s.sent();s.label=2;case 2:for(t=0,i=this.childOptions;t<i.length;t++){o=i[t];n=this.searchOnlyTitle?this.getTextFromOption(o).toLowerCase():o.textContent.toLowerCase();r=e.toLowerCase();n.includes(r)?o.removeAttribute("invisible"):o.setAttribute("invisible","invisible")}return[2]}}))}))};e.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o;return __generator(this,(function(n){e=this.childOptions;for(t=0,i=e;t<i.length;t++){o=i[t];o.removeAttribute("invisible")}return[2]}))}))};e.prototype.getSelectedValue=function(){var e;return(e=this.childOptionSelected)===null||e===void 0?void 0:e.value};e.prototype.renderIcon=function(){return this.icon&&o("div",{class:{input__icon:true,"input__icon--large":!!this.label}},o("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};e.prototype.renderLabel=function(){return this.label&&o("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},o("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};e.prototype.render=function(){var e=this;return o(n,{"aria-disabled":this.disabled?"true":null},o("div",{class:{input:true,select:true,"input--state-primary":!this.danger,"input--state-danger":this.danger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":this.isPressed},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper},this.renderIcon(),o("div",{class:"input__container",tabindex:"0",onFocusout:this.onFocusout,onKeyDown:this.keyPressWrapper},this.renderLabel(),o("input",{class:{input__container__text:true},ref:function(t){return e.nativeInput=t},disabled:this.disabled,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.changedInputValue,placeholder:this.placeholder,type:"text",value:this.text,"data-test":this.dataTest})),o("div",{class:"select__icon"},o("bds-icon",{size:"small",name:"error",theme:"solid",onClick:this.cleanInputSelection,class:{"icon-hidden":this.clearIconOnFocus&&(!this.isFocused||!this.isOpen)||!this.value}}),o("bds-icon",{ref:function(t){return e.refIconDrop(t)},size:"small",color:"inherit"}))),o("div",{ref:function(t){return e.refDropdown(t)},class:{select__options:true,"select__options--open":this.isOpen}},this.internalOptions?this.internalOptions.map((function(t,i){return o("bds-select-option",{onOptionSelected:e.handler,selected:e.value===t.value,value:t.value,key:i,bulkOption:t.bulkOption,status:t.status},t.label)})):o("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenChanged"],selected:["itemSelectedChanged"],value:["valueChanged"],options:["parseOptions"]}},enumerable:false,configurable:true});return e}());c.style=l}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,o){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(o.next(e))}catch(t){r(t)}}function a(e){try{l(o["throw"](e))}catch(t){r(t)}}function l(e){e.done?i(e.value):n(e.value).then(s,a)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(o)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(o=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(l){a=[6,l];n=0}finally{o=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js"],(function(e){"use strict";var t,i,o,n,r,s,a;return{setters:[function(e){t=e.r;i=e.e;o=e.h;n=e.f;r=e.g},function(e){s=e.g;a=e.p}],execute:function(){var l=':host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}:host input,:host textarea{-webkit-box-shadow:inherit;box-shadow:inherit}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::-moz-placeholder,:host textarea::-moz-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input:-ms-input-placeholder,:host textarea:-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::-ms-input-placeholder,:host textarea::-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::placeholder,:host textarea::placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}:host input::-webkit-input-placeholder,:host textarea::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:8px 4px 9px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff)}.input--state-primary{border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-info, #80e3eb);box-shadow:0 0 0 2px var(--color-info, #80e3eb)}.input--state-primary .input__icon{color:var(--color-primary, #3f7de8);background-color:var(--color-surface-3, #e7edf4)}.input--state-primary .input__container__label{color:var(--color-content-default, #202c44)}.input--state-primary .input__container__label--pressed{color:var(--color-primary, #3f7de8)}.input--state-primary .input__container__text{caret-color:var(--color-primary, #3f7de8);color:var(--color-content-default, #202c44)}.input--state-danger{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-error, #ffa5a5);box-shadow:0 0 0 2px var(--color-error, #ffa5a5)}.input--state-danger .input__icon{color:var(--color-delete, #ff4c4c);background-color:var(--color-error, #ffa5a5)}.input--state-danger .input__container__label{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__label--pressed{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__text{caret-color:var(--color-delete, #ff4c4c);color:var(--color-delete, #ff4c4c)}.input--state-disabled{cursor:not-allowed;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:var(--color-surface-3, #e7edf4)}.input--state-disabled:hover{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4);box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4)}.input--state-disabled .input__icon{color:var(--color-content-disable, #505f79);background-color:var(--color-surface-3, #e7edf4)}.input--state-disabled .input__container__label{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__label--pressed{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__text{caret-color:var(--color-content-disable, #505f79);color:var(--color-content-disable, #505f79)}.input--label{padding:7px 4px 8px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:var(--color-content-disable, #505f79);word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:var(--color-delete, #ff4c4c)}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;width:100%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text__chips{width:auto;min-width:216px;max-width:216px}:host{display:block}.select{position:relative;outline:none}.select__icon{color:var(--color-content-ghost, #6e7b91);display:-ms-flexbox;display:flex}.select__icon bds-icon{margin-left:10px}.select .icon-hidden{visibility:hidden}.select__options{background:var(--color-surface-2, #f3f6fa);width:100%;max-height:250px;position:absolute;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;pointer-events:none;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options::-webkit-scrollbar{width:16px;background-color:transparent}.select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open{opacity:1;pointer-events:auto}.select__options--position-top{bottom:calc(100% + 4px)}.select__options--position-bottom{top:calc(100% + 4px)}';var c=e("bds_autocomplete",function(){function e(e){var o=this;t(this,e);this.bdsChange=i(this,"bdsChange",7);this.bdsSelectedChange=i(this,"bdsSelectedChange",7);this.bdsInput=i(this,"bdsInput",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.refDropdown=function(e){o.dropElement=e};this.refIconDrop=function(e){o.iconDropElement=e};this.onFocus=function(){o.isFocused=true;o.isPressed=true;o.bdsFocus.emit()};this.onFocusout=function(){if(!o.isOpen){o.nativeInput.value=o.getText()}};this.onBlur=function(){o.bdsBlur.emit();o.isPressed=false;if(!o.isOpen){o.isFocused=false;o.nativeInput.value=o.getText();o.cleanInputSelection()}};this.onClickWrapper=function(){o.onFocus();o.toggle();if(o.nativeInput){o.nativeInput.focus()}};this.toggle=function(){if(!o.disabled){o.isOpen=!o.isOpen}};this.getTextFromOption=function(e){var t,i;if((e===null||e===void 0?void 0:e.status)||(e===null||e===void 0?void 0:e.bulkOption)){if(o.internalOptions){var n=o.internalOptions.find((function(t){return t.value==e.value}));if(n){return n.label}}return e.querySelector("#bds-typo-label-".concat(o.value)).textContent}return(e===null||e===void 0?void 0:e.titleText)?e.titleText:(i=(t=e===null||e===void 0?void 0:e.textContent)===null||t===void 0?void 0:t.trim())!==null&&i!==void 0?i:""};this.getText=function(){var e=o.childOptions.find((function(e){return e.value==o.value}));return o.getTextFromOption(e)};this.handler=function(e){var t=e.detail.value;o.value=t;o.toggle()};this.keyPressWrapper=function(e){var t,i;o.isOpen=true;switch(e.key){case"Enter":o.toggle();break;case"Tab":var n=o.findFocusedElementIndex();var r=o.sliceInvisible(n+1);var s=r[0];if(!s){o.toggle()}break;case"ArrowDown":var a=o.findFocusedElementIndex();var l=o.sliceInvisible(a+1);var c=l[0];(t=c===null||c===void 0?void 0:c.firstElementChild)===null||t===void 0?void 0:t.focus();break;case"ArrowUp":var p=o.findFocusedElementIndex();var d=o.childOptions.find((function(e){return!e.hasAttribute("invisible")}));if(o.childOptions[p]!=d){p=p>0?p:o.childOptions.length;var u=o.sliceInvisible(0,p);var b=u[u.length-1];(i=b===null||b===void 0?void 0:b.firstElementChild)===null||i===void 0?void 0:i.focus()}break}};this.cleanInputSelection=function(){return __awaiter(o,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:if(!!this.disabled)return[3,2];this.value="";this.nativeInput.value="";this.isOpen=false;return[4,this.resetFilterOptions()];case 1:e.sent();e.label=2;case 2:return[2]}}))}))};this.changedInputValue=function(e){return __awaiter(o,void 0,void 0,(function(){var t;return __generator(this,(function(i){switch(i.label){case 0:t=e.target;if(t){this.value=t.value||""}this.bdsInput.emit(e);this.bdsChange.emit({value:this.nativeInput.value});if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:i.sent();return[3,5];case 2:this.value="";if(!this.isOpen)return[3,4];return[4,this.resetFilterOptions()];case 3:i.sent();return[3,5];case 4:this.setTimeoutFilter();i.label=5;case 5:if(this.isOpen===false){this.value=this.getSelectedValue();this.setTimeoutFilter()}return[2]}}))}))};this.intoView=null;this.isPressed=false;this.isOpen=false;this.text="";this.internalOptions=undefined;this.isFocused=false;this.options=undefined;this.value=undefined;this.selected=undefined;this.danger=false;this.disabled=false;this.searchOnlyTitle=true;this.label="";this.icon="";this.placeholder="";this.optionsPosition="bottom";this.clearIconOnFocus=false;this.dataTest=null}e.prototype.isOpenChanged=function(e){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.isOpen?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.isOpen?"arrow-down":"arrow-up"}if(e)this.validatePositionDrop()};e.prototype.itemSelectedChanged=function(){this.bdsSelectedChange.emit(this.selected)};e.prototype.valueChanged=function(){this.bdsChange.emit({value:this.value==null?this.value:this.value.toString()});for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value}this.selected=this.childOptionSelected;this.text=this.getText()};e.prototype.handleWindow=function(e){if(!this.el.contains(e.target)){this.isOpen=false}};e.prototype.parseOptions=function(){if(this.options){this.resetFilterOptions();try{this.internalOptions=typeof this.options==="string"?JSON.parse(this.options):this.options}catch(e){this.internalOptions=[]}}};e.prototype.componentWillLoad=function(){this.intoView=s(this.el);this.options&&this.parseOptions()};e.prototype.componentDidLoad=function(){if(!this.options){for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value;i.addEventListener("optionSelected",this.handler)}}this.text=this.getText();this.validatePositionDrop()};e.prototype.validatePositionDrop=function(){var e=a({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=e.y;if(e.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};Object.defineProperty(e.prototype,"childOptions",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")):Array.from(this.el.querySelectorAll("bds-select-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptionSelected",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")).find((function(e){return e.selected})):Array.from(this.el.querySelectorAll("bds-select-option")).find((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.sliceInvisible=function(e,t){if(t===void 0){t=this.childOptions.length}return this.childOptions.slice(e,t).filter((function(e){return!e.hasAttribute("invisible")}))};e.prototype.findFocusedElementIndex=function(){return this.childOptions.findIndex((function(e){return e.firstElementChild.matches(":focus")}))};e.prototype.setTimeoutFilter=function(){var e=this;setTimeout((function(){e.resetFilterOptions()}),500)};e.prototype.filterOptions=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,o,n,r;return __generator(this,(function(s){switch(s.label){case 0:if(!!e)return[3,2];return[4,this.resetFilterOptions()];case 1:s.sent();s.label=2;case 2:for(t=0,i=this.childOptions;t<i.length;t++){o=i[t];n=this.searchOnlyTitle?this.getTextFromOption(o).toLowerCase():o.textContent.toLowerCase();r=e.toLowerCase();n.includes(r)?o.removeAttribute("invisible"):o.setAttribute("invisible","invisible")}return[2]}}))}))};e.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,o;return __generator(this,(function(n){e=this.childOptions;for(t=0,i=e;t<i.length;t++){o=i[t];o.removeAttribute("invisible")}return[2]}))}))};e.prototype.getSelectedValue=function(){var e;return(e=this.childOptionSelected)===null||e===void 0?void 0:e.value};e.prototype.renderIcon=function(){return this.icon&&o("div",{class:{input__icon:true,"input__icon--large":!!this.label}},o("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};e.prototype.renderLabel=function(){return this.label&&o("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},o("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};e.prototype.render=function(){var e=this;return o(n,{"aria-disabled":this.disabled?"true":null},o("div",{class:{input:true,select:true,"input--state-primary":!this.danger,"input--state-danger":this.danger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":this.isPressed},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper},this.renderIcon(),o("div",{class:"input__container",tabindex:"0",onFocusout:this.onFocusout,onKeyDown:this.keyPressWrapper},this.renderLabel(),o("input",{class:{input__container__text:true},ref:function(t){return e.nativeInput=t},disabled:this.disabled,onBlur:this.onBlur,onFocus:this.onFocus,onInput:this.changedInputValue,placeholder:this.placeholder,type:"text",value:this.text,"data-test":this.dataTest})),o("div",{class:"select__icon"},o("bds-icon",{size:"small",name:"error",theme:"solid",onClick:this.cleanInputSelection,class:{"icon-hidden":this.clearIconOnFocus&&(!this.isFocused||!this.isOpen)||!this.value}}),o("bds-icon",{ref:function(t){return e.refIconDrop(t)},size:"small",color:"inherit"}))),o("div",{ref:function(t){return e.refDropdown(t)},class:{select__options:true,"select__options--open":this.isOpen}},this.internalOptions?this.internalOptions.map((function(t,i){return o("bds-select-option",{onOptionSelected:e.handler,selected:e.value===t.value,value:t.value,key:i,bulkOption:t.bulkOption,status:t.status},t.label)})):o("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenChanged"],selected:["itemSelectedChanged"],value:["valueChanged"],options:["parseOptions"]}},enumerable:false,configurable:true});return e}());c.style=l}}}));
@@ -63,6 +63,9 @@ const Pagination = class {
63
63
  this.intoView = getScrollParent(this.el);
64
64
  }
65
65
  componentDidLoad() {
66
+ this.validatePositionDrop();
67
+ }
68
+ validatePositionDrop() {
66
69
  const positionValue = positionAbsoluteElement({
67
70
  actionElement: this.el,
68
71
  changedElement: this.dropElement,
@@ -78,13 +81,15 @@ const Pagination = class {
78
81
  this.iconDropElement.name = 'arrow-up';
79
82
  }
80
83
  }
81
- isOpenChanged() {
84
+ isOpenChanged(isOpen) {
82
85
  if (this.positionHeightDrop == 'bottom') {
83
86
  this.iconDropElement.name = this.openSelect ? 'arrow-up' : 'arrow-down';
84
87
  }
85
88
  else {
86
89
  this.iconDropElement.name = this.openSelect ? 'arrow-down' : 'arrow-up';
87
90
  }
91
+ if (isOpen)
92
+ this.validatePositionDrop();
88
93
  }
89
94
  pagesChanged() {
90
95
  this.countPage();
@@ -1 +1 @@
1
- System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js"],(function(t){"use strict";var e,o,i,n,s,a,r;return{setters:[function(t){e=t.r;o=t.e;i=t.h;n=t.f;s=t.g},function(t){a=t.g;r=t.p}],execute:function(){var c=":host{display:block}:host .actions{display:-ms-flexbox;display:flex;gap:8px}:host .actions .select{display:block;position:relative}:host .actions .border-select{border-radius:8px}:host .actions .border-select:hover{-webkit-box-shadow:rgba(63, 125, 232, 0.4) 0px 0px 0px 2px;box-shadow:rgba(63, 125, 232, 0.4) 0px 0px 0px 2px}:host .actions .select_input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:9px 4px 9px 12px;gap:8px;-ms-flex:1 1 0%;flex:1 1 0%;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff);border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box}:host .actions .select_input bds-typo{min-width:28px;color:var(--color-content-default, #202c44)}:host .actions .select_input bds-icon{color:var(--color-content-default, #202c44)}:host .actions .select_input:hover{border-color:var(--color-brand, #3f7de8)}:host .actions .select__options{position:absolute;width:100%;background-color:var(--color-surface-1, #ffffff);border-radius:8px;z-index:2;margin-top:4px;overflow-y:auto;overflow-x:hidden;max-height:250px;visibility:hidden;opacity:0}:host .actions .select__options::-webkit-scrollbar{width:16px;background-color:transparent}:host .actions .select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}:host .actions .select__options--open{visibility:visible;opacity:1}:host .actions .select__options--position-top{bottom:calc(100% + 4px)}:host .actions .select__options--position-bottom{top:calc(100% + 4px)}:host .actions .select__options ul{padding:0;margin:0}:host .actions .select__options li{list-style-type:none;cursor:pointer;padding:8px;padding-left:12px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--color-content-default, #202c44)}:host .actions .select__options li:hover{background-color:var(--color-surface-2, #f3f6fa)}";var l=t("bds_pagination",function(){function t(t){var i=this;e(this,t);this.bdsPaginationChange=o(this,"bdsPaginationChange",7);this.refDropdown=function(t){i.dropElement=t};this.refIconDrop=function(t){i.iconDropElement=t};this.previewPage=function(t){var e=i.value;if(e>1){t.preventDefault();i.value=i.value-1;i.bdsPaginationChange.emit(i.value)}};this.nextPage=function(t){var e=i.value;if(e<i.pages){t.preventDefault();i.value=i.value+1;i.bdsPaginationChange.emit(i.value)}};this.firstPage=function(t){var e=i.value;if(e>1){t.preventDefault();i.value=i.paginationNumbers[0];i.bdsPaginationChange.emit(i.value)}};this.lastPage=function(t){var e=i.value;if(e<i.pages){t.preventDefault();i.value=i.pages;i.bdsPaginationChange.emit(i.value)}};this.openOptions=function(){i.openSelect=!i.openSelect};this.onBlur=function(){i.openSelect=false};this.value=undefined;this.openSelect=undefined;this.paginationNumbers=[];this.intoView=null;this.pages=undefined;this.startedPage=undefined}t.prototype.componentWillLoad=function(){this.countPage();this.intoView=a(this.el)};t.prototype.componentDidLoad=function(){var t=r({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=t.y;if(t.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};t.prototype.isOpenChanged=function(){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.openSelect?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.openSelect?"arrow-down":"arrow-up"}};t.prototype.pagesChanged=function(){this.countPage()};t.prototype.countPage=function(){if(this.paginationNumbers.length!==0){this.paginationNumbers=[]}if(this.paginationNumbers.length===0){for(var t=1;t<=this.pages;t++){this.paginationNumbers.push(t)}if(this.startedPage&&this.startedPage<this.pages){this.value=this.startedPage}else{this.value=this.paginationNumbers[0]}}};t.prototype.optionSelected=function(t){this.value=t;this.openOptions();this.bdsPaginationChange.emit(this.value)};t.prototype.render=function(){var t=this;return i(n,null,i("div",{class:"actions"},i("bds-button-icon",{onClick:this.firstPage,size:"short",variant:"secondary",icon:"arrow-first"}),i("bds-button-icon",{onClick:this.previewPage,size:"short",variant:"secondary",icon:"arrow-left"}),i("div",{class:"select"},i("div",{class:"border-select"},i("div",{class:{select_input:true},id:"select",onClick:this.openOptions,onBlur:this.onBlur},i("bds-typo",{variant:"fs-14"},this.value),i("bds-icon",{ref:function(e){return t.refIconDrop(e)},size:"small"}))),i("bds-paper",{ref:function(e){return t.refDropdown(e)},class:{select__options:true,"select__options--open":this.openSelect}},i("ul",null,this.paginationNumbers.map((function(e,o){return i("li",{onClick:function(){return t.optionSelected(e)},key:o,value:e},i("bds-typo",{variant:"fs-14"},e))}))))),i("bds-button-icon",{onClick:this.nextPage,size:"short",variant:"secondary",icon:"arrow-right"}),i("bds-button-icon",{onClick:this.lastPage,size:"short",variant:"secondary",icon:"arrow-last"})))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{openSelect:["isOpenChanged"],pages:["pagesChanged"]}},enumerable:false,configurable:true});return t}());l.style=c}}}));
1
+ System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js"],(function(t){"use strict";var e,o,i,n,s,a,r;return{setters:[function(t){e=t.r;o=t.e;i=t.h;n=t.f;s=t.g},function(t){a=t.g;r=t.p}],execute:function(){var l=":host{display:block}:host .actions{display:-ms-flexbox;display:flex;gap:8px}:host .actions .select{display:block;position:relative}:host .actions .border-select{border-radius:8px}:host .actions .border-select:hover{-webkit-box-shadow:rgba(63, 125, 232, 0.4) 0px 0px 0px 2px;box-shadow:rgba(63, 125, 232, 0.4) 0px 0px 0px 2px}:host .actions .select_input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:9px 4px 9px 12px;gap:8px;-ms-flex:1 1 0%;flex:1 1 0%;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff);border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box}:host .actions .select_input bds-typo{min-width:28px;color:var(--color-content-default, #202c44)}:host .actions .select_input bds-icon{color:var(--color-content-default, #202c44)}:host .actions .select_input:hover{border-color:var(--color-brand, #3f7de8)}:host .actions .select__options{position:absolute;width:100%;background-color:var(--color-surface-1, #ffffff);border-radius:8px;z-index:2;margin-top:4px;overflow-y:auto;overflow-x:hidden;max-height:250px;visibility:hidden;opacity:0}:host .actions .select__options::-webkit-scrollbar{width:16px;background-color:transparent}:host .actions .select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}:host .actions .select__options--open{visibility:visible;opacity:1}:host .actions .select__options--position-top{bottom:calc(100% + 4px)}:host .actions .select__options--position-bottom{top:calc(100% + 4px)}:host .actions .select__options ul{padding:0;margin:0}:host .actions .select__options li{list-style-type:none;cursor:pointer;padding:8px;padding-left:12px;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--color-content-default, #202c44)}:host .actions .select__options li:hover{background-color:var(--color-surface-2, #f3f6fa)}";var c=t("bds_pagination",function(){function t(t){var i=this;e(this,t);this.bdsPaginationChange=o(this,"bdsPaginationChange",7);this.refDropdown=function(t){i.dropElement=t};this.refIconDrop=function(t){i.iconDropElement=t};this.previewPage=function(t){var e=i.value;if(e>1){t.preventDefault();i.value=i.value-1;i.bdsPaginationChange.emit(i.value)}};this.nextPage=function(t){var e=i.value;if(e<i.pages){t.preventDefault();i.value=i.value+1;i.bdsPaginationChange.emit(i.value)}};this.firstPage=function(t){var e=i.value;if(e>1){t.preventDefault();i.value=i.paginationNumbers[0];i.bdsPaginationChange.emit(i.value)}};this.lastPage=function(t){var e=i.value;if(e<i.pages){t.preventDefault();i.value=i.pages;i.bdsPaginationChange.emit(i.value)}};this.openOptions=function(){i.openSelect=!i.openSelect};this.onBlur=function(){i.openSelect=false};this.value=undefined;this.openSelect=undefined;this.paginationNumbers=[];this.intoView=null;this.pages=undefined;this.startedPage=undefined}t.prototype.componentWillLoad=function(){this.countPage();this.intoView=a(this.el)};t.prototype.componentDidLoad=function(){this.validatePositionDrop()};t.prototype.validatePositionDrop=function(){var t=r({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=t.y;if(t.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};t.prototype.isOpenChanged=function(t){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.openSelect?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.openSelect?"arrow-down":"arrow-up"}if(t)this.validatePositionDrop()};t.prototype.pagesChanged=function(){this.countPage()};t.prototype.countPage=function(){if(this.paginationNumbers.length!==0){this.paginationNumbers=[]}if(this.paginationNumbers.length===0){for(var t=1;t<=this.pages;t++){this.paginationNumbers.push(t)}if(this.startedPage&&this.startedPage<this.pages){this.value=this.startedPage}else{this.value=this.paginationNumbers[0]}}};t.prototype.optionSelected=function(t){this.value=t;this.openOptions();this.bdsPaginationChange.emit(this.value)};t.prototype.render=function(){var t=this;return i(n,null,i("div",{class:"actions"},i("bds-button-icon",{onClick:this.firstPage,size:"short",variant:"secondary",icon:"arrow-first"}),i("bds-button-icon",{onClick:this.previewPage,size:"short",variant:"secondary",icon:"arrow-left"}),i("div",{class:"select"},i("div",{class:"border-select"},i("div",{class:{select_input:true},id:"select",onClick:this.openOptions,onBlur:this.onBlur},i("bds-typo",{variant:"fs-14"},this.value),i("bds-icon",{ref:function(e){return t.refIconDrop(e)},size:"small"}))),i("bds-paper",{ref:function(e){return t.refDropdown(e)},class:{select__options:true,"select__options--open":this.openSelect}},i("ul",null,this.paginationNumbers.map((function(e,o){return i("li",{onClick:function(){return t.optionSelected(e)},key:o,value:e},i("bds-typo",{variant:"fs-14"},e))}))))),i("bds-button-icon",{onClick:this.nextPage,size:"short",variant:"secondary",icon:"arrow-right"}),i("bds-button-icon",{onClick:this.lastPage,size:"short",variant:"secondary",icon:"arrow-last"})))};Object.defineProperty(t.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{openSelect:["isOpenChanged"],pages:["pagesChanged"]}},enumerable:false,configurable:true});return t}());c.style=l}}}));
@@ -140,13 +140,15 @@ const SelectChips = class {
140
140
  this.optionsPosition = 'bottom';
141
141
  this.dataTest = null;
142
142
  }
143
- isOpenChanged() {
143
+ isOpenChanged(isOpen) {
144
144
  if (this.positionHeightDrop == 'bottom') {
145
145
  this.iconDropElement.name = this.isOpen ? 'arrow-up' : 'arrow-down';
146
146
  }
147
147
  else {
148
148
  this.iconDropElement.name = this.isOpen ? 'arrow-down' : 'arrow-up';
149
149
  }
150
+ if (isOpen)
151
+ this.validatePositionDrop();
150
152
  }
151
153
  handleWindow(ev) {
152
154
  if (!this.el.contains(ev.target)) {
@@ -219,6 +221,9 @@ const SelectChips = class {
219
221
  }
220
222
  async componentDidLoad() {
221
223
  await this.resetFilterOptions();
224
+ this.validatePositionDrop();
225
+ }
226
+ validatePositionDrop() {
222
227
  const positionValue = positionAbsoluteElement({
223
228
  actionElement: this.el,
224
229
  changedElement: this.dropElement,
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,s){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{c(s.next(e))}catch(t){r(t)}}function a(e){try{c(s["throw"](e))}catch(t){r(t)}}function c(e){e.done?i(e.value):n(e.value).then(o,a)}c((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(a){if(s)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(c){a=[6,c];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js","./validations-b01ca3a3.system.js"],(function(e){"use strict";var t,i,s,n,r,o,a,c;return{setters:[function(e){t=e.r;i=e.e;s=e.h;n=e.g},function(e){r=e.g;o=e.p},function(e){a=e.w;c=e.e}],execute:function(){var l='.sc-bds-select-chips-h{display:block}.element_input.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}.element_input.sc-bds-select-chips input.sc-bds-select-chips{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-moz-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips:-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.input.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:10px 4px 10px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff)}.input--state-primary.sc-bds-select-chips{border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.sc-bds-select-chips:hover{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed.sc-bds-select-chips{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-info, #80e3eb);box-shadow:0 0 0 2px var(--color-info, #80e3eb)}.input--state-primary.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:var(--color-primary, #3f7de8);background-color:var(--color-surface-3, #e7edf4)}.input--state-primary.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:var(--color-content-default, #202c44)}.input--state-primary.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:var(--color-primary, #3f7de8)}.input--state-primary.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:var(--color-primary, #3f7de8);color:var(--color-content-default, #202c44)}.input--state-danger.sc-bds-select-chips{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.sc-bds-select-chips:hover{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed.sc-bds-select-chips{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-error, #ffa5a5);box-shadow:0 0 0 2px var(--color-error, #ffa5a5)}.input--state-danger.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:var(--color-delete, #ff4c4c);background-color:var(--color-error, #ffa5a5)}.input--state-danger.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:var(--color-delete, #ff4c4c)}.input--state-danger.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:var(--color-delete, #ff4c4c)}.input--state-danger.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:var(--color-delete, #ff4c4c);color:var(--color-delete, #ff4c4c)}.input--state-disabled.sc-bds-select-chips{cursor:not-allowed;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:var(--color-surface-3, #e7edf4)}.input--state-disabled.sc-bds-select-chips:hover{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed.sc-bds-select-chips{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4);box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4)}.input--state-disabled.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:var(--color-content-disable, #505f79);background-color:var(--color-surface-3, #e7edf4)}.input--state-disabled.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:var(--color-content-disable, #505f79)}.input--state-disabled.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:var(--color-content-disable, #505f79)}.input--state-disabled.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:var(--color-content-disable, #505f79);color:var(--color-content-disable, #505f79)}.input--label.sc-bds-select-chips{padding:7px 4px 7px 12px}.input__icon.sc-bds-select-chips{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large.sc-bds-select-chips{padding:4px}.input__container.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips.sc-bds-select-chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text.sc-bds-select-chips{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text.sc-bds-select-chips:focus{outline:0}.input__container__text.sc-bds-select-chips::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text.sc-bds-select-chips:focus{outline:0}.input__container__text[type=checkbox].sc-bds-select-chips,.input__container__text[type=radio].sc-bds-select-chips{width:13px;height:13px}.input__container__text[type=search].sc-bds-select-chips{-webkit-appearance:textfield;-webkit-box-sizing:content-box}.sc-bds-select-chips::-webkit-search-decoration{display:none}.input__container__text[type=reset].sc-bds-select-chips,.input__container__text[type=button].sc-bds-select-chips,.input__container__text[type=submit].sc-bds-select-chips{overflow:visible}.input__container__text.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:var(--color-content-ghost, #6e7b91);word-break:break-word;height:auto;min-height:20px}.input__message.sc-bds-select-chips bds-typo.sc-bds-select-chips{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon.sc-bds-select-chips{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger.sc-bds-select-chips{color:var(--color-delete, #ff4c4c)}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:var(--color-content-ghost, #6e7b91);display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:var(--color-surface-2, #f3f6fa);width:100%;max-height:250px;position:absolute;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;pointer-events:none;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{opacity:1;pointer-events:auto}.select__options--position-top.sc-bds-select-chips{bottom:calc(100% + 4px)}.select__options--position-bottom.sc-bds-select-chips{top:calc(100% + 4px)}.inside-input-left.sc-bds-select-chips{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:8px}.input-chips__chip.sc-bds-select-chips{margin:2px 4px 2px 0px}.input-chips__chips.sc-bds-select-chips{-ms-flex:1;flex:1}';var p=e("bds_select_chips",function(){function e(e){var s=this;t(this,e);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.bdsChangeChips=i(this,"bdsChangeChips",7);this.bdsSelectChipsInput=i(this,"bdsSelectChipsInput",7);this.bdsSubmit=i(this,"bdsSubmit",7);this.handleChangeChipsValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.resetFilterOptions()];case 1:e.sent();return[2]}}))}))};this.refDropdown=function(e){s.dropElement=e};this.refIconDrop=function(e){s.iconDropElement=e};this.toggle=function(){if(!s.disabled){s.isOpen=!s.isOpen}};this.handler=function(e){return __awaiter(s,void 0,void 0,(function(){var t,i;return __generator(this,(function(s){switch(s.label){case 0:t=e.detail.value;i=this.getText(t);return[4,this.addChip(i)];case 1:s.sent();this.toggle();return[2]}}))}))};this.handlerNewOption=function(e){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.addChip(e)];case 1:t.sent();this.toggle();return[2]}}))}))};this.getText=function(e){var t=s.childOptions.find((function(t){return t.value===e}));return s.getTextFromOption(t)};this.getTextFromOption=function(e){var t,i;if((e===null||e===void 0?void 0:e.status)||(e===null||e===void 0?void 0:e.bulkOption)){if(s.internalOptions){var n=s.internalOptions.find((function(t){return t.value==e.value}));if(n){return n.label}}return e.querySelector("#bds-typo-label-".concat(e.value)).textContent}return(e===null||e===void 0?void 0:e.titleText)?e.titleText:(i=(t=e===null||e===void 0?void 0:e.textContent)===null||t===void 0?void 0:t.trim())!==null&&i!==void 0?i:""};this.setFocusWrapper=function(){if(s.nativeInput){s.nativeInput.focus()}};this.removeFocusWrapper=function(){s.nativeInput.blur()};this.onClickWrapper=function(){s.onFocus();if(s.nativeInput){s.nativeInput.focus()}};this.onFocus=function(){s.bdsFocus.emit();s.isPressed=true};this.onInput=function(e){var t=e.target;if(t){s.value=t.value||""}s.bdsSelectChipsInput.emit(e);s.changedInputValue()};this.keyPressWrapper=function(e){switch(e.key){case"Enter":if(s.canAddNew!==false){s.handleDelimiters();s.setChip(s.value);s.value=""}break;case"Backspace"||"Delete":if((s.value===null||s.value.length<=0)&&s.internalChips.length){s.removeLastChip();s.handleChangeChipsValue;s.bdsChangeChips.emit({data:s.internalChips})}break}};this.changedInputValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:e.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:e.sent();e.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.internalOptions=undefined;this.isOpen=false;this.intoView=null;this.validationDanger=false;this.isPressed=false;this.validationMesage="";this.internalChips=[];this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.maxlength=undefined;this.errorMessage="";this.disabled=false;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.type="text";this.delimiters=/,|;/;this.disableSubmit=false;this.helperMessage="";this.inputName="";this.placeholder="";this.optionsPosition="bottom";this.dataTest=null}e.prototype.isOpenChanged=function(){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.isOpen?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.isOpen?"arrow-down":"arrow-up"}};e.prototype.handleWindow=function(e){if(!this.el.contains(e.target)){this.isOpen=false}};e.prototype.valueChanged=function(){if(this.chips){if(typeof this.chips==="string"){try{this.internalChips=JSON.parse(this.chips)}catch(e){this.internalChips=[]}}else{this.internalChips=this.chips}}else{this.internalChips=[]}};e.prototype.internalValueChanged=function(){this.handleChangeChipsValue();this.bdsChangeChips.emit({data:this.internalChips,value:this.getLastChip()})};e.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.validateChips()]}))}))};e.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.internalChips]}))}))};e.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.internalChips=[];this.value="";return[2]}))}))};e.prototype.add=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.handleDelimiters();if(e){this.setChip(e)}else{this.setChip(this.value)}this.value="";return[2]}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.nativeInput.focus();return[2]}))}))};e.prototype.removeFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.nativeInput.blur();return[2]}))}))};e.prototype.componentWillLoad=function(){this.valueChanged();this.intoView=r(this.el)};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.resetFilterOptions()];case 1:t.sent();e=o({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=e.y;if(e.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}return[2]}}))}))};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(s){for(e=0,t=this.childOptions;e<t.length;e++){i=t[e];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};Object.defineProperty(e.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});e.prototype.filterOptions=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!e)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:t=0,i=this.childOptions;l.label=3;case 3:if(!(t<i.length))return[3,6];s=i[t];r=this.existsChip;o=[s.textContent];return[4,this.getChips()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=e.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(e&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(e&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:t++;return[3,3];case 6:return[2]}}))}))};e.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,s,n,r,o;return __generator(this,(function(a){switch(a.label){case 0:t=0,i=this.childOptions;a.label=1;case 1:if(!(t<i.length))return[3,4];s=i[t];n=(e=s.querySelector("bds-typo"))===null||e===void 0?void 0:e.textContent;r=this.existsChip;o=[n];return[4,this.getChips()];case 2:if(r.apply(this,o.concat([a.sent()]))){s.setAttribute("invisible","invisible")}else{s.removeAttribute("invisible")}a.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};e.prototype.existsChip=function(e,t){return t.some((function(t){return e===t}))};e.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};e.prototype.addChip=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setChip(e)];case 1:t.sent();this.nativeInput.value="";return[2]}}))}))};e.prototype.validateChips=function(){var e=this;if(this.type==="email"){return!this.internalChips.some((function(t){return!e.validateChip(t)}))}else{return true}};e.prototype.handleOnBlur=function(){this.bdsBlur.emit();this.isPressed=false};e.prototype.getLastChip=function(){return this.internalChips[this.internalChips.length-1]};e.prototype.verifyAndSubstituteDelimiters=function(e){if(e.length===1&&e[0].match(this.delimiters)){return""}var t=e.replace(/;/g,",").replace(/\,+|;+/g,",");if(t[0].match(this.delimiters)){t=t.substring(1)}return t};e.prototype.handleDelimiters=function(){var e=this;var t=this.nativeInput.value;this.value=t?t.trim():"";if(t.length===0)return;var i=t.match(this.delimiters);if(!i)return;var s=this.verifyAndSubstituteDelimiters(t);if(!s){this.clearInputValues();return}var n=s.split(this.delimiters);n.forEach((function(t){e.setChip(t)}));this.clearInputValues()};e.prototype.handleChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,s,n;var r=this;return __generator(this,(function(o){this.changedInputValue;t=e.detail.value;this.value=t?t.trim():"";if(t.length===0)return[2];i=t.match(this.delimiters);if(!i)return[2];s=this.verifyAndSubstituteDelimiters(t);if(!s){this.clearInputValues();return[2]}n=s.split(this.delimiters);n.forEach((function(e){r.setChip(e)}));this.clearInputValues();return[2]}))}))};e.prototype.clearInputValues=function(e){if(e===void 0){e=""}this.nativeInput.value=e;this.value=e};e.prototype.setChip=function(e){if(!this.duplicated){var t=this.internalChips.some((function(t){return t.toLowerCase()===e.toLowerCase()}));if(t)return}if(!a(e)){return}this.internalChips=__spreadArray(__spreadArray([],this.internalChips,true),[e],false)};e.prototype.validateChip=function(e){var t=e.trim();if(this.type==="email"&&c(t)){return false}return true};e.prototype.removeLastChip=function(){this.internalChips=this.internalChips.slice(0,this.internalChips.length-1)};e.prototype.removeChip=function(e){var t=e.detail.id;this.internalChips=this.internalChips.filter((function(e,i){return i.toString()!==t}))};e.prototype.renderChips=function(){var e=this;if(!this.internalChips.length){return[]}return this.internalChips.map((function(t,i){var n=i.toString();var r=30;if(t.length<=r){return s("bds-chip-clickable",{id:n,key:n,color:"outline",close:!e.disabled,onChipClickableClose:function(t){return e.removeChip(t)}},t)}else{return s("bds-tooltip",{key:n,position:"top-center","tooltip-text":t},s("bds-chip-clickable",{id:n,key:n,color:"outline",close:!e.disabled,onChipClickableClose:function(t){return e.removeChip(t)}},"".concat(t.slice(0,r)," ...")))}}))};e.prototype.renderIcon=function(){return this.icon&&s("div",{class:{input__icon:true,"input__icon--large":!!this.label}},s("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};e.prototype.renderLabel=function(){return this.label&&s("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},s("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};e.prototype.renderMessage=function(){var e=this.danger?"error":"info";var t=this.danger?this.errorMessage:this.helperMessage;if(!t&&this.validationDanger)t=this.validationMesage;var i=this.danger||this.validationDanger?"input__message input__message--danger":"input__message";if(t){return s("div",{class:i,part:"input__message"},s("div",{class:"input__message__icon"},s("bds-icon",{size:"x-small",name:e,theme:"solid",color:"inherit"})),s("bds-typo",{variant:"fs-12"},t))}return undefined};e.prototype.generateKey=function(e){return e.toLowerCase().replace(/ /g,"-")};e.prototype.render=function(){var e=this;var t=this.isPressed&&!this.disabled;var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(n){}}else{i=this.options}}return s("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},s("div",{class:{element_input:true},"aria-disabled":this.disabled?"true":null,onClick:this.toggle},s("div",{class:{input:true,"input--state-primary":!this.danger&&!this.validationDanger,"input--state-danger":this.danger||this.validationDanger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":t},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper},this.renderIcon(),s("div",{class:"input__container"},this.renderLabel(),s("div",{class:{input__container__wrapper:true}},this.internalChips.length>0&&s("span",{class:"inside-input-left"},this.renderChips()),s("input",{ref:function(t){return e.nativeInput=t},class:{input__container__text:true},name:this.inputName,maxlength:this.maxlength,placeholder:this.placeholder,onInput:this.onInput,onFocus:this.onFocus,onBlur:function(){return e.handleOnBlur()},onChange:function(){return e.handleChange},value:this.value,disabled:this.disabled,"data-test":this.dataTest}))),s("div",{class:"select__icon"},s("bds-icon",{ref:function(t){return e.refIconDrop(t)},size:"small",color:"inherit"}))),this.renderMessage()),s("div",{ref:function(t){return e.refDropdown(t)},class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(t){return s("bds-select-option",{key:e.generateKey(t.value),onOptionSelected:e.handler,value:t.value,status:t.status},t.label)})),s("slot",null),this.canAddNew===true&&this.enableCreateOption()&&s("bds-select-option",{id:"option-add",value:"add",onClick:function(){return e.handlerNewOption(e.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenChanged"],chips:["valueChanged"],internalChips:["internalValueChanged"]}},enumerable:false,configurable:true});return e}());p.style=l}}}));
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,s){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{c(s.next(e))}catch(t){r(t)}}function a(e){try{c(s["throw"](e))}catch(t){r(t)}}function c(e){e.done?i(e.value):n(e.value).then(o,a)}c((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return c([e,t])}}function c(a){if(s)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(s=1,n&&(r=a[0]&2?n["return"]:a[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,a[1])).done)return r;if(n=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;n=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(c){a=[6,c];n=0}finally{s=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js","./validations-b01ca3a3.system.js"],(function(e){"use strict";var t,i,s,n,r,o,a,c;return{setters:[function(e){t=e.r;i=e.e;s=e.h;n=e.g},function(e){r=e.g;o=e.p},function(e){a=e.w;c=e.e}],execute:function(){var l='.sc-bds-select-chips-h{display:block}.element_input.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}.element_input.sc-bds-select-chips input.sc-bds-select-chips{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-moz-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips:-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input.sc-bds-select-chips input.sc-bds-select-chips::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.input.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:10px 4px 10px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff)}.input--state-primary.sc-bds-select-chips{border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.sc-bds-select-chips:hover{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed.sc-bds-select-chips{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-info, #80e3eb);box-shadow:0 0 0 2px var(--color-info, #80e3eb)}.input--state-primary.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:var(--color-primary, #3f7de8);background-color:var(--color-surface-3, #e7edf4)}.input--state-primary.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:var(--color-content-default, #202c44)}.input--state-primary.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:var(--color-primary, #3f7de8)}.input--state-primary.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:var(--color-primary, #3f7de8);color:var(--color-content-default, #202c44)}.input--state-danger.sc-bds-select-chips{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.sc-bds-select-chips:hover{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed.sc-bds-select-chips{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-error, #ffa5a5);box-shadow:0 0 0 2px var(--color-error, #ffa5a5)}.input--state-danger.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:var(--color-delete, #ff4c4c);background-color:var(--color-error, #ffa5a5)}.input--state-danger.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:var(--color-delete, #ff4c4c)}.input--state-danger.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:var(--color-delete, #ff4c4c)}.input--state-danger.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:var(--color-delete, #ff4c4c);color:var(--color-delete, #ff4c4c)}.input--state-disabled.sc-bds-select-chips{cursor:not-allowed;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:var(--color-surface-3, #e7edf4)}.input--state-disabled.sc-bds-select-chips:hover{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed.sc-bds-select-chips{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4);box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4)}.input--state-disabled.sc-bds-select-chips .input__icon.sc-bds-select-chips{color:var(--color-content-disable, #505f79);background-color:var(--color-surface-3, #e7edf4)}.input--state-disabled.sc-bds-select-chips .input__container__label.sc-bds-select-chips{color:var(--color-content-disable, #505f79)}.input--state-disabled.sc-bds-select-chips .input__container__label--pressed.sc-bds-select-chips{color:var(--color-content-disable, #505f79)}.input--state-disabled.sc-bds-select-chips .input__container__text.sc-bds-select-chips{caret-color:var(--color-content-disable, #505f79);color:var(--color-content-disable, #505f79)}.input--label.sc-bds-select-chips{padding:7px 4px 7px 12px}.input__icon.sc-bds-select-chips{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large.sc-bds-select-chips{padding:4px}.input__container.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips.sc-bds-select-chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text.sc-bds-select-chips{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text.sc-bds-select-chips:focus{outline:0}.input__container__text.sc-bds-select-chips::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text.sc-bds-select-chips:focus{outline:0}.input__container__text[type=checkbox].sc-bds-select-chips,.input__container__text[type=radio].sc-bds-select-chips{width:13px;height:13px}.input__container__text[type=search].sc-bds-select-chips{-webkit-appearance:textfield;-webkit-box-sizing:content-box}.sc-bds-select-chips::-webkit-search-decoration{display:none}.input__container__text[type=reset].sc-bds-select-chips,.input__container__text[type=button].sc-bds-select-chips,.input__container__text[type=submit].sc-bds-select-chips{overflow:visible}.input__container__text.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message.sc-bds-select-chips{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:var(--color-content-ghost, #6e7b91);word-break:break-word;height:auto;min-height:20px}.input__message.sc-bds-select-chips bds-typo.sc-bds-select-chips{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon.sc-bds-select-chips{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger.sc-bds-select-chips{color:var(--color-delete, #ff4c4c)}.select.sc-bds-select-chips{position:relative;outline:none}.select__icon.sc-bds-select-chips{color:var(--color-content-ghost, #6e7b91);display:-ms-flexbox;display:flex}.select__options.sc-bds-select-chips{background:var(--color-surface-2, #f3f6fa);width:100%;max-height:250px;position:absolute;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;pointer-events:none;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options.sc-bds-select-chips::-webkit-scrollbar{width:16px;background-color:transparent}.select__options.sc-bds-select-chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open.sc-bds-select-chips{opacity:1;pointer-events:auto}.select__options--position-top.sc-bds-select-chips{bottom:calc(100% + 4px)}.select__options--position-bottom.sc-bds-select-chips{top:calc(100% + 4px)}.inside-input-left.sc-bds-select-chips{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:8px}.input-chips__chip.sc-bds-select-chips{margin:2px 4px 2px 0px}.input-chips__chips.sc-bds-select-chips{-ms-flex:1;flex:1}';var p=e("bds_select_chips",function(){function e(e){var s=this;t(this,e);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.bdsChangeChips=i(this,"bdsChangeChips",7);this.bdsSelectChipsInput=i(this,"bdsSelectChipsInput",7);this.bdsSubmit=i(this,"bdsSubmit",7);this.handleChangeChipsValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.resetFilterOptions()];case 1:e.sent();return[2]}}))}))};this.refDropdown=function(e){s.dropElement=e};this.refIconDrop=function(e){s.iconDropElement=e};this.toggle=function(){if(!s.disabled){s.isOpen=!s.isOpen}};this.handler=function(e){return __awaiter(s,void 0,void 0,(function(){var t,i;return __generator(this,(function(s){switch(s.label){case 0:t=e.detail.value;i=this.getText(t);return[4,this.addChip(i)];case 1:s.sent();this.toggle();return[2]}}))}))};this.handlerNewOption=function(e){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.addChip(e)];case 1:t.sent();this.toggle();return[2]}}))}))};this.getText=function(e){var t=s.childOptions.find((function(t){return t.value===e}));return s.getTextFromOption(t)};this.getTextFromOption=function(e){var t,i;if((e===null||e===void 0?void 0:e.status)||(e===null||e===void 0?void 0:e.bulkOption)){if(s.internalOptions){var n=s.internalOptions.find((function(t){return t.value==e.value}));if(n){return n.label}}return e.querySelector("#bds-typo-label-".concat(e.value)).textContent}return(e===null||e===void 0?void 0:e.titleText)?e.titleText:(i=(t=e===null||e===void 0?void 0:e.textContent)===null||t===void 0?void 0:t.trim())!==null&&i!==void 0?i:""};this.setFocusWrapper=function(){if(s.nativeInput){s.nativeInput.focus()}};this.removeFocusWrapper=function(){s.nativeInput.blur()};this.onClickWrapper=function(){s.onFocus();if(s.nativeInput){s.nativeInput.focus()}};this.onFocus=function(){s.bdsFocus.emit();s.isPressed=true};this.onInput=function(e){var t=e.target;if(t){s.value=t.value||""}s.bdsSelectChipsInput.emit(e);s.changedInputValue()};this.keyPressWrapper=function(e){switch(e.key){case"Enter":if(s.canAddNew!==false){s.handleDelimiters();s.setChip(s.value);s.value=""}break;case"Backspace"||"Delete":if((s.value===null||s.value.length<=0)&&s.internalChips.length){s.removeLastChip();s.handleChangeChipsValue;s.bdsChangeChips.emit({data:s.internalChips})}break}};this.changedInputValue=function(){return __awaiter(s,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:this.value=this.nativeInput.value;if(!this.nativeInput.value)return[3,2];return[4,this.filterOptions(this.nativeInput.value)];case 1:e.sent();return[3,4];case 2:return[4,this.resetFilterOptions()];case 3:e.sent();e.label=4;case 4:if(this.value&&this.isOpen===false){this.isOpen=true}return[2]}}))}))};this.internalOptions=undefined;this.isOpen=false;this.intoView=null;this.validationDanger=false;this.isPressed=false;this.validationMesage="";this.internalChips=[];this.options=[];this.chips=[];this.newPrefix="";this.value="";this.danger=false;this.maxlength=undefined;this.errorMessage="";this.disabled=false;this.label="";this.icon="";this.duplicated=false;this.canAddNew=true;this.notFoundMessage="No results found";this.type="text";this.delimiters=/,|;/;this.disableSubmit=false;this.helperMessage="";this.inputName="";this.placeholder="";this.optionsPosition="bottom";this.dataTest=null}e.prototype.isOpenChanged=function(e){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.isOpen?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.isOpen?"arrow-down":"arrow-up"}if(e)this.validatePositionDrop()};e.prototype.handleWindow=function(e){if(!this.el.contains(e.target)){this.isOpen=false}};e.prototype.valueChanged=function(){if(this.chips){if(typeof this.chips==="string"){try{this.internalChips=JSON.parse(this.chips)}catch(e){this.internalChips=[]}}else{this.internalChips=this.chips}}else{this.internalChips=[]}};e.prototype.internalValueChanged=function(){this.handleChangeChipsValue();this.bdsChangeChips.emit({data:this.internalChips,value:this.getLastChip()})};e.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.validateChips()]}))}))};e.prototype.getChips=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,this.internalChips]}))}))};e.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.internalChips=[];this.value="";return[2]}))}))};e.prototype.add=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.handleDelimiters();if(e){this.setChip(e)}else{this.setChip(this.value)}this.value="";return[2]}))}))};e.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.nativeInput.focus();return[2]}))}))};e.prototype.removeFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.nativeInput.blur();return[2]}))}))};e.prototype.componentWillLoad=function(){this.valueChanged();this.intoView=r(this.el)};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){switch(e.label){case 0:return[4,this.resetFilterOptions()];case 1:e.sent();this.validatePositionDrop();return[2]}}))}))};e.prototype.validatePositionDrop=function(){var e=o({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=e.y;if(e.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};e.prototype.connectedCallback=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i;return __generator(this,(function(s){for(e=0,t=this.childOptions;e<t.length;e++){i=t[e];i.addEventListener("optionSelected",this.handler)}return[2]}))}))};Object.defineProperty(e.prototype,"childOptionsEnabled",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not([invisible]):not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptions",{get:function(){return Array.from(this.el.querySelectorAll("bds-select-option:not(#option-add):not(#no-option)"))},enumerable:false,configurable:true});e.prototype.filterOptions=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,s,n,r,o,a,c;return __generator(this,(function(l){switch(l.label){case 0:if(!!e)return[3,2];return[4,this.resetFilterOptions()];case 1:l.sent();return[2];case 2:t=0,i=this.childOptions;l.label=3;case 3:if(!(t<i.length))return[3,6];s=i[t];r=this.existsChip;o=[s.textContent];return[4,this.getChips()];case 4:n=r.apply(this,o.concat([l.sent()]));a=s.textContent.toLowerCase();c=e.toLowerCase();if(n){s.setAttribute("invisible","invisible")}if(e&&a.includes(c)&&!n){s.removeAttribute("invisible")}if(e&&!a.includes(c)&&!n){s.setAttribute("invisible","invisible")}l.label=5;case 5:t++;return[3,3];case 6:return[2]}}))}))};e.prototype.resetFilterOptions=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,s,n,r,o;return __generator(this,(function(a){switch(a.label){case 0:t=0,i=this.childOptions;a.label=1;case 1:if(!(t<i.length))return[3,4];s=i[t];n=(e=s.querySelector("bds-typo"))===null||e===void 0?void 0:e.textContent;r=this.existsChip;o=[n];return[4,this.getChips()];case 2:if(r.apply(this,o.concat([a.sent()]))){s.setAttribute("invisible","invisible")}else{s.removeAttribute("invisible")}a.label=3;case 3:t++;return[3,1];case 4:return[2]}}))}))};e.prototype.existsChip=function(e,t){return t.some((function(t){return e===t}))};e.prototype.enableCreateOption=function(){return!!(this.childOptionsEnabled.length===0&&this.nativeInput&&this.nativeInput.value)};e.prototype.addChip=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.setChip(e)];case 1:t.sent();this.nativeInput.value="";return[2]}}))}))};e.prototype.validateChips=function(){var e=this;if(this.type==="email"){return!this.internalChips.some((function(t){return!e.validateChip(t)}))}else{return true}};e.prototype.handleOnBlur=function(){this.bdsBlur.emit();this.isPressed=false};e.prototype.getLastChip=function(){return this.internalChips[this.internalChips.length-1]};e.prototype.verifyAndSubstituteDelimiters=function(e){if(e.length===1&&e[0].match(this.delimiters)){return""}var t=e.replace(/;/g,",").replace(/\,+|;+/g,",");if(t[0].match(this.delimiters)){t=t.substring(1)}return t};e.prototype.handleDelimiters=function(){var e=this;var t=this.nativeInput.value;this.value=t?t.trim():"";if(t.length===0)return;var i=t.match(this.delimiters);if(!i)return;var s=this.verifyAndSubstituteDelimiters(t);if(!s){this.clearInputValues();return}var n=s.split(this.delimiters);n.forEach((function(t){e.setChip(t)}));this.clearInputValues()};e.prototype.handleChange=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,s,n;var r=this;return __generator(this,(function(o){this.changedInputValue;t=e.detail.value;this.value=t?t.trim():"";if(t.length===0)return[2];i=t.match(this.delimiters);if(!i)return[2];s=this.verifyAndSubstituteDelimiters(t);if(!s){this.clearInputValues();return[2]}n=s.split(this.delimiters);n.forEach((function(e){r.setChip(e)}));this.clearInputValues();return[2]}))}))};e.prototype.clearInputValues=function(e){if(e===void 0){e=""}this.nativeInput.value=e;this.value=e};e.prototype.setChip=function(e){if(!this.duplicated){var t=this.internalChips.some((function(t){return t.toLowerCase()===e.toLowerCase()}));if(t)return}if(!a(e)){return}this.internalChips=__spreadArray(__spreadArray([],this.internalChips,true),[e],false)};e.prototype.validateChip=function(e){var t=e.trim();if(this.type==="email"&&c(t)){return false}return true};e.prototype.removeLastChip=function(){this.internalChips=this.internalChips.slice(0,this.internalChips.length-1)};e.prototype.removeChip=function(e){var t=e.detail.id;this.internalChips=this.internalChips.filter((function(e,i){return i.toString()!==t}))};e.prototype.renderChips=function(){var e=this;if(!this.internalChips.length){return[]}return this.internalChips.map((function(t,i){var n=i.toString();var r=30;if(t.length<=r){return s("bds-chip-clickable",{id:n,key:n,color:"outline",close:!e.disabled,onChipClickableClose:function(t){return e.removeChip(t)}},t)}else{return s("bds-tooltip",{key:n,position:"top-center","tooltip-text":t},s("bds-chip-clickable",{id:n,key:n,color:"outline",close:!e.disabled,onChipClickableClose:function(t){return e.removeChip(t)}},"".concat(t.slice(0,r)," ...")))}}))};e.prototype.renderIcon=function(){return this.icon&&s("div",{class:{input__icon:true,"input__icon--large":!!this.label}},s("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};e.prototype.renderLabel=function(){return this.label&&s("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},s("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};e.prototype.renderMessage=function(){var e=this.danger?"error":"info";var t=this.danger?this.errorMessage:this.helperMessage;if(!t&&this.validationDanger)t=this.validationMesage;var i=this.danger||this.validationDanger?"input__message input__message--danger":"input__message";if(t){return s("div",{class:i,part:"input__message"},s("div",{class:"input__message__icon"},s("bds-icon",{size:"x-small",name:e,theme:"solid",color:"inherit"})),s("bds-typo",{variant:"fs-12"},t))}return undefined};e.prototype.generateKey=function(e){return e.toLowerCase().replace(/ /g,"-")};e.prototype.render=function(){var e=this;var t=this.isPressed&&!this.disabled;var i=[];if(this.options){if(typeof this.options==="string"){try{i=JSON.parse(this.options)}catch(n){}}else{i=this.options}}return s("div",{class:"select",tabindex:"0",onFocus:this.setFocusWrapper,onBlur:this.removeFocusWrapper,onKeyPress:this.keyPressWrapper},s("div",{class:{element_input:true},"aria-disabled":this.disabled?"true":null,onClick:this.toggle},s("div",{class:{input:true,"input--state-primary":!this.danger&&!this.validationDanger,"input--state-danger":this.danger||this.validationDanger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":t},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper},this.renderIcon(),s("div",{class:"input__container"},this.renderLabel(),s("div",{class:{input__container__wrapper:true}},this.internalChips.length>0&&s("span",{class:"inside-input-left"},this.renderChips()),s("input",{ref:function(t){return e.nativeInput=t},class:{input__container__text:true},name:this.inputName,maxlength:this.maxlength,placeholder:this.placeholder,onInput:this.onInput,onFocus:this.onFocus,onBlur:function(){return e.handleOnBlur()},onChange:function(){return e.handleChange},value:this.value,disabled:this.disabled,"data-test":this.dataTest}))),s("div",{class:"select__icon"},s("bds-icon",{ref:function(t){return e.refIconDrop(t)},size:"small",color:"inherit"}))),this.renderMessage()),s("div",{ref:function(t){return e.refDropdown(t)},class:{select__options:true,"select__options--open":this.isOpen}},i.map((function(t){return s("bds-select-option",{key:e.generateKey(t.value),onOptionSelected:e.handler,value:t.value,status:t.status},t.label)})),s("slot",null),this.canAddNew===true&&this.enableCreateOption()&&s("bds-select-option",{id:"option-add",value:"add",onClick:function(){return e.handlerNewOption(e.nativeInput.value)}},this.newPrefix,this.nativeInput.value),!this.canAddNew&&this.enableCreateOption()&&s("bds-select-option",{id:"no-option",value:"add"},this.notFoundMessage)))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenChanged"],chips:["valueChanged"],internalChips:["internalValueChanged"]}},enumerable:false,configurable:true});return e}());p.style=l}}}));
@@ -104,13 +104,15 @@ const Select = class {
104
104
  this.optionsPosition = 'bottom';
105
105
  this.dataTest = null;
106
106
  }
107
- isOpenChanged() {
107
+ isOpenChanged(isOpen) {
108
108
  if (this.positionHeightDrop == 'bottom') {
109
109
  this.iconDropElement.name = this.isOpen ? 'arrow-up' : 'arrow-down';
110
110
  }
111
111
  else {
112
112
  this.iconDropElement.name = this.isOpen ? 'arrow-down' : 'arrow-up';
113
113
  }
114
+ if (isOpen)
115
+ this.validatePositionDrop();
114
116
  }
115
117
  valueChanged() {
116
118
  this.bdsChange.emit({ value: this.value });
@@ -134,6 +136,9 @@ const Select = class {
134
136
  }
135
137
  componentDidLoad() {
136
138
  this.getValueSelected();
139
+ this.validatePositionDrop();
140
+ }
141
+ validatePositionDrop() {
137
142
  const positionValue = positionAbsoluteElement({
138
143
  actionElement: this.el,
139
144
  changedElement: this.dropElement,
@@ -1 +1 @@
1
- System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js"],(function(e){"use strict";var t,i,o,n,r,s;return{setters:[function(e){t=e.r;i=e.e;o=e.h;n=e.g},function(e){r=e.g;s=e.p}],execute:function(){var a=':host{display:block}.element_input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}.element_input input{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input input::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::-moz-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input:-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:10px 4px 10px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff)}.input--state-primary{border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-info, #80e3eb);box-shadow:0 0 0 2px var(--color-info, #80e3eb)}.input--state-primary .input__icon{color:var(--color-primary, #3f7de8);background-color:var(--color-surface-3, #e7edf4)}.input--state-primary .input__container__label{color:var(--color-content-default, #202c44)}.input--state-primary .input__container__label--pressed{color:var(--color-primary, #3f7de8)}.input--state-primary .input__container__text{caret-color:var(--color-primary, #3f7de8);color:var(--color-content-default, #202c44)}.input--state-danger{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-error, #ffa5a5);box-shadow:0 0 0 2px var(--color-error, #ffa5a5)}.input--state-danger .input__icon{color:var(--color-delete, #ff4c4c);background-color:var(--color-error, #ffa5a5)}.input--state-danger .input__container__label{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__label--pressed{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__text{caret-color:var(--color-delete, #ff4c4c);color:var(--color-delete, #ff4c4c)}.input--state-disabled{cursor:not-allowed;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:var(--color-surface-3, #e7edf4)}.input--state-disabled:hover{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4);box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4)}.input--state-disabled .input__icon{color:var(--color-content-disable, #505f79);background-color:var(--color-surface-3, #e7edf4)}.input--state-disabled .input__container__label{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__label--pressed{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__text{caret-color:var(--color-content-disable, #505f79);color:var(--color-content-disable, #505f79)}.input--label{padding:7px 4px 7px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:var(--color-content-ghost, #6e7b91);word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:var(--color-delete, #ff4c4c)}.select{position:relative;outline:none}.select__icon{color:var(--color-content-ghost, #6e7b91);display:-ms-flexbox;display:flex}.select__options{background:var(--color-surface-2, #f3f6fa);width:100%;max-height:250px;position:absolute;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;pointer-events:none;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options::-webkit-scrollbar{width:16px;background-color:transparent}.select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open{opacity:1;pointer-events:auto}.select__options--position-top{bottom:calc(100% + 4px)}.select__options--position-bottom{top:calc(100% + 4px)}.inside-input-left{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:8px}.input-chips__chip{margin:2px 4px 2px 0px}.input-chips__chips{-ms-flex:1;flex:1}';var l=e("bds_select",function(){function e(e){var o=this;t(this,e);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.refNativeInput=function(e){o.nativeInput=e};this.refDropdown=function(e){o.dropElement=e};this.refIconDrop=function(e){o.iconDropElement=e};this.onClickWrapper=function(){o.onFocus();o.toggle();if(o.nativeInput){o.nativeInput.focus()}};this.onFocus=function(){o.bdsFocus.emit();o.isPressed=true};this.onBlur=function(){o.bdsBlur.emit();o.isPressed=false};this.toggle=function(){if(!o.disabled){o.isOpen=!o.isOpen}};this.getText=function(){var e,t;var i=o.childOptions.find((function(e){return e.value==o.value}));if((i===null||i===void 0?void 0:i.status)||(i===null||i===void 0?void 0:i.bulkOption)){if(o.internalOptions){var n=o.internalOptions.find((function(e){return e.value==i.value}));if(n){return n.titleText?n.titleText:n.label}}return i.querySelector("#bds-typo-label-".concat(o.value)).textContent}return(i===null||i===void 0?void 0:i.titleText)?i.titleText:(t=(e=i===null||i===void 0?void 0:i.textContent)===null||e===void 0?void 0:e.trim())!==null&&t!==void 0?t:""};this.handler=function(e){var t=e.detail.value;o.value=t;o.toggle()};this.keyPressWrapper=function(e){var t,i,n,r,s,a,l,p;var d=e.target.localName==="bds-select";var c=e.target.localName==="bds-input";switch(e.key){case"Enter":if(!o.isOpen&&(d||c)){o.toggle()}break;case"ArrowDown":if(o.childOptionSelected){(i=(t=o.childOptionSelected.nextElementSibling)===null||t===void 0?void 0:t.firstElementChild)===null||i===void 0?void 0:i.focus();return}(r=(n=o.el.firstElementChild)===null||n===void 0?void 0:n.firstElementChild)===null||r===void 0?void 0:r.focus();break;case"ArrowUp":if(o.childOptionSelected){(a=(s=o.childOptionSelected.previousElementSibling)===null||s===void 0?void 0:s.firstElementChild)===null||a===void 0?void 0:a.focus();return}(p=(l=o.el.previousElementSibling)===null||l===void 0?void 0:l.firstElementChild)===null||p===void 0?void 0:p.focus();break}};this.intoView=null;this.isOpen=false;this.text="";this.validationDanger=false;this.isPressed=false;this.validationMesage="";this.internalOptions=undefined;this.options=undefined;this.value=undefined;this.danger=false;this.disabled=false;this.label="";this.icon="";this.placeholder="";this.helperMessage="";this.errorMessage="";this.optionsPosition="bottom";this.dataTest=null}e.prototype.isOpenChanged=function(){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.isOpen?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.isOpen?"arrow-down":"arrow-up"}};e.prototype.valueChanged=function(){this.bdsChange.emit({value:this.value});for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value}this.text=this.getText()};e.prototype.handleWindow=function(e){if(!this.el.contains(e.target)){this.isOpen=false}};e.prototype.componentWillLoad=function(){this.options&&this.optionsChanged();this.intoView=r(this.el)};e.prototype.componentWillRender=function(){this.options&&this.updateOptions();this.getValueSelected()};e.prototype.componentDidLoad=function(){this.getValueSelected();var e=s({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=e.y;if(e.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};e.prototype.optionsChanged=function(){this.updateOptions()};e.prototype.getValueSelected=function(){for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value;i.addEventListener("optionSelected",this.handler)}this.text=this.getText()};e.prototype.updateOptions=function(){if(this.options){if(typeof this.options==="string"){this.internalOptions=JSON.parse(this.options)}else{this.internalOptions=this.options}}};Object.defineProperty(e.prototype,"childOptions",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")):Array.from(this.el.querySelectorAll("bds-select-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptionSelected",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")).find((function(e){return e.selected})):Array.from(this.el.querySelectorAll("bds-select-option")).find((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.renderIcon=function(){return this.icon&&o("div",{class:{input__icon:true,"input__icon--large":!!this.label}},o("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};e.prototype.renderLabel=function(){return this.label&&o("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},o("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};e.prototype.renderMessage=function(){var e=this.danger?"error":"info";var t=this.danger?this.errorMessage:this.helperMessage;if(!t&&this.validationDanger)t=this.validationMesage;var i=this.danger||this.validationDanger?"input__message input__message--danger":"input__message";if(t){return o("div",{class:i,part:"input__message"},o("div",{class:"input__message__icon"},o("bds-icon",{size:"x-small",name:e,theme:"solid",color:"inherit"})),o("bds-typo",{variant:"fs-12"},t))}return undefined};e.prototype.render=function(){var e=this;var t=this.isPressed&&!this.disabled;return o("div",{class:"select",tabindex:"0"},o("div",{class:{element_input:true},"aria-disabled":this.disabled?"true":null},o("div",{class:{input:true,"input--state-primary":!this.danger&&!this.validationDanger,"input--state-danger":this.danger||this.validationDanger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":t},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper,part:"input-container"},this.renderIcon(),o("div",{class:"input__container"},this.renderLabel(),o("div",{class:{input__container__wrapper:true}},o("input",{ref:this.refNativeInput,class:{input__container__text:true},onFocus:this.onFocus,onBlur:this.onBlur,value:this.text,disabled:this.disabled,placeholder:this.placeholder,readonly:true,"data-test":this.dataTest}))),o("div",{class:"select__icon"},o("bds-icon",{ref:function(t){return e.refIconDrop(t)},size:"small",color:"inherit"}))),this.renderMessage()),o("div",{ref:function(t){return e.refDropdown(t)},class:{select__options:true,"select__options--open":this.isOpen}},this.internalOptions?this.internalOptions.map((function(e,t){return e.icon||e.titleText?o("bds-select-option",{key:t,value:e.value,"title-text":e.titleText,"slot-align":e.slotAlign,bulkOption:e.bulkOption,status:e.status},e.icon&&o("bds-icon",{slot:"input-left",name:e.icon,size:"medium",color:e.iconColor}),e.label):o("bds-select-option",{key:t,value:e.value,bulkOption:e.bulkOption,status:e.status},e.label)})):o("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenChanged"],value:["valueChanged"],options:["optionsChanged"]}},enumerable:false,configurable:true});return e}());l.style=a}}}));
1
+ System.register(["./index-241c9f42.system.js","./position-element-7ef199c9.system.js"],(function(e){"use strict";var t,i,o,n,r,s;return{setters:[function(e){t=e.r;i=e.e;o=e.h;n=e.g},function(e){r=e.g;s=e.p}],execute:function(){var a=':host{display:block}.element_input{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:relative;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%}.element_input input{-webkit-box-shadow:inherit;box-shadow:inherit}.element_input input::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::-moz-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input:-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::-ms-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.element_input input::-webkit-input-placeholder{color:var(--color-content-ghost, #6e7b91);opacity:1}.input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:10px 4px 10px 12px;-ms-flex:1;flex:1;width:100%;max-width:100%;max-height:100%;background:var(--color-surface-1, #ffffff)}.input--state-primary{border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary:hover{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-primary.input--pressed{border:1px solid var(--color-primary, #3f7de8);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-info, #80e3eb);box-shadow:0 0 0 2px var(--color-info, #80e3eb)}.input--state-primary .input__icon{color:var(--color-primary, #3f7de8);background-color:var(--color-surface-3, #e7edf4)}.input--state-primary .input__container__label{color:var(--color-content-default, #202c44)}.input--state-primary .input__container__label--pressed{color:var(--color-primary, #3f7de8)}.input--state-primary .input__container__text{caret-color:var(--color-primary, #3f7de8);color:var(--color-content-default, #202c44)}.input--state-danger{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger:hover{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px}.input--state-danger.input--pressed{border:1px solid var(--color-delete, #ff4c4c);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-error, #ffa5a5);box-shadow:0 0 0 2px var(--color-error, #ffa5a5)}.input--state-danger .input__icon{color:var(--color-delete, #ff4c4c);background-color:var(--color-error, #ffa5a5)}.input--state-danger .input__container__label{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__label--pressed{color:var(--color-delete, #ff4c4c)}.input--state-danger .input__container__text{caret-color:var(--color-delete, #ff4c4c);color:var(--color-delete, #ff4c4c)}.input--state-disabled{cursor:not-allowed;border:1px solid var(--color-surface-3, #e7edf4);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;background:var(--color-surface-3, #e7edf4)}.input--state-disabled:hover{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;border:1px solid var(--color-surface-3, #e7edf4);box-sizing:border-box;border-radius:8px}.input--state-disabled.input--pressed{border:1px solid var(--color-content-disable, #505f79);-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:8px;-webkit-box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4);box-shadow:0 0 0 2px var(--color-surface-3, #e7edf4)}.input--state-disabled .input__icon{color:var(--color-content-disable, #505f79);background-color:var(--color-surface-3, #e7edf4)}.input--state-disabled .input__container__label{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__label--pressed{color:var(--color-content-disable, #505f79)}.input--state-disabled .input__container__text{caret-color:var(--color-content-disable, #505f79);color:var(--color-content-disable, #505f79)}.input--label{padding:7px 4px 7px 12px}.input__icon{cursor:inherit;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;margin-right:8px;padding:2.5px}.input__icon--large{padding:4px}.input__container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;width:100%}.input__container__wrapper{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.input__container__wrapper__chips{display:inline;max-height:100px;overflow:auto}.input__container__wrapper__chips::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__wrapper__chips::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__container__label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input__container__text{display:inline-block;margin:0;border:0;padding:0;width:auto;vertical-align:middle;white-space:normal;line-height:inherit;background:none;color:inherit;font-size:inherit;font-family:inherit;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;font-family:"Carbona", "Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif;font-size:0.875rem;line-height:150%;resize:none;cursor:inherit}.input__container__text:focus{outline:0}.input__container__text::-webkit-file-upload-button{padding:0;border:0;background:none}.input__container__text:focus{outline:0}.input__container__text[type=checkbox],.input__container__text[type=radio]{width:13px;height:13px}.input__container__text[type=search]{-webkit-appearance:textfield;-webkit-box-sizing:content-box}::-webkit-search-decoration{display:none}.input__container__text[type=reset],.input__container__text[type=button],.input__container__text[type=submit]{overflow:visible}.input__container__text::-webkit-scrollbar{width:16px;background-color:transparent}.input__container__text::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.input__message{display:-ms-flexbox;display:flex;-ms-flex-align:baseline;align-items:baseline;height:20px;margin:3.7px 2.5px;-webkit-transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);transition:0.3s cubic-bezier(0.4, 0, 0.2, 1);color:var(--color-content-ghost, #6e7b91);word-break:break-word;height:auto;min-height:20px}.input__message bds-typo{margin-top:0px;-ms-flex-item-align:self-start;align-self:self-start}.input__message__icon{display:-ms-flexbox;display:flex;padding-right:4px;margin-top:0px;padding-top:2px}.input__message--danger{color:var(--color-delete, #ff4c4c)}.select{position:relative;outline:none}.select__icon{color:var(--color-content-ghost, #6e7b91);display:-ms-flexbox;display:flex}.select__options{background:var(--color-surface-2, #f3f6fa);width:100%;max-height:250px;position:absolute;left:0;border-radius:8px;-webkit-box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);box-shadow:0px 2px 8px rgba(96, 123, 153, 0.3);overflow-y:auto;z-index:2;pointer-events:none;opacity:0;-webkit-box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4);box-shadow:0px 2px 12px 0 2px 8px rgba(96, 123, 153, 0.4)}.select__options::-webkit-scrollbar{width:16px;background-color:transparent}.select__options::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.select__options--open{opacity:1;pointer-events:auto}.select__options--position-top{bottom:calc(100% + 4px)}.select__options--position-bottom{top:calc(100% + 4px)}.inside-input-left{display:-ms-inline-flexbox;display:inline-flex;gap:8px;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:8px}.input-chips__chip{margin:2px 4px 2px 0px}.input-chips__chips{-ms-flex:1;flex:1}';var l=e("bds_select",function(){function e(e){var o=this;t(this,e);this.bdsChange=i(this,"bdsChange",7);this.bdsCancel=i(this,"bdsCancel",7);this.bdsFocus=i(this,"bdsFocus",7);this.bdsBlur=i(this,"bdsBlur",7);this.refNativeInput=function(e){o.nativeInput=e};this.refDropdown=function(e){o.dropElement=e};this.refIconDrop=function(e){o.iconDropElement=e};this.onClickWrapper=function(){o.onFocus();o.toggle();if(o.nativeInput){o.nativeInput.focus()}};this.onFocus=function(){o.bdsFocus.emit();o.isPressed=true};this.onBlur=function(){o.bdsBlur.emit();o.isPressed=false};this.toggle=function(){if(!o.disabled){o.isOpen=!o.isOpen}};this.getText=function(){var e,t;var i=o.childOptions.find((function(e){return e.value==o.value}));if((i===null||i===void 0?void 0:i.status)||(i===null||i===void 0?void 0:i.bulkOption)){if(o.internalOptions){var n=o.internalOptions.find((function(e){return e.value==i.value}));if(n){return n.titleText?n.titleText:n.label}}return i.querySelector("#bds-typo-label-".concat(o.value)).textContent}return(i===null||i===void 0?void 0:i.titleText)?i.titleText:(t=(e=i===null||i===void 0?void 0:i.textContent)===null||e===void 0?void 0:e.trim())!==null&&t!==void 0?t:""};this.handler=function(e){var t=e.detail.value;o.value=t;o.toggle()};this.keyPressWrapper=function(e){var t,i,n,r,s,a,l,p;var d=e.target.localName==="bds-select";var c=e.target.localName==="bds-input";switch(e.key){case"Enter":if(!o.isOpen&&(d||c)){o.toggle()}break;case"ArrowDown":if(o.childOptionSelected){(i=(t=o.childOptionSelected.nextElementSibling)===null||t===void 0?void 0:t.firstElementChild)===null||i===void 0?void 0:i.focus();return}(r=(n=o.el.firstElementChild)===null||n===void 0?void 0:n.firstElementChild)===null||r===void 0?void 0:r.focus();break;case"ArrowUp":if(o.childOptionSelected){(a=(s=o.childOptionSelected.previousElementSibling)===null||s===void 0?void 0:s.firstElementChild)===null||a===void 0?void 0:a.focus();return}(p=(l=o.el.previousElementSibling)===null||l===void 0?void 0:l.firstElementChild)===null||p===void 0?void 0:p.focus();break}};this.intoView=null;this.isOpen=false;this.text="";this.validationDanger=false;this.isPressed=false;this.validationMesage="";this.internalOptions=undefined;this.options=undefined;this.value=undefined;this.danger=false;this.disabled=false;this.label="";this.icon="";this.placeholder="";this.helperMessage="";this.errorMessage="";this.optionsPosition="bottom";this.dataTest=null}e.prototype.isOpenChanged=function(e){if(this.positionHeightDrop=="bottom"){this.iconDropElement.name=this.isOpen?"arrow-up":"arrow-down"}else{this.iconDropElement.name=this.isOpen?"arrow-down":"arrow-up"}if(e)this.validatePositionDrop()};e.prototype.valueChanged=function(){this.bdsChange.emit({value:this.value});for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value}this.text=this.getText()};e.prototype.handleWindow=function(e){if(!this.el.contains(e.target)){this.isOpen=false}};e.prototype.componentWillLoad=function(){this.options&&this.optionsChanged();this.intoView=r(this.el)};e.prototype.componentWillRender=function(){this.options&&this.updateOptions();this.getValueSelected()};e.prototype.componentDidLoad=function(){this.getValueSelected();this.validatePositionDrop()};e.prototype.validatePositionDrop=function(){var e=s({actionElement:this.el,changedElement:this.dropElement,intoView:this.intoView});this.positionHeightDrop=e.y;if(e.y=="bottom"){this.dropElement.classList.add("select__options--position-bottom");this.iconDropElement.name="arrow-down"}else{this.dropElement.classList.add("select__options--position-top");this.iconDropElement.name="arrow-up"}};e.prototype.optionsChanged=function(){this.updateOptions()};e.prototype.getValueSelected=function(){for(var e=0,t=this.childOptions;e<t.length;e++){var i=t[e];i.selected=this.value===i.value;i.addEventListener("optionSelected",this.handler)}this.text=this.getText()};e.prototype.updateOptions=function(){if(this.options){if(typeof this.options==="string"){this.internalOptions=JSON.parse(this.options)}else{this.internalOptions=this.options}}};Object.defineProperty(e.prototype,"childOptions",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")):Array.from(this.el.querySelectorAll("bds-select-option"))},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"childOptionSelected",{get:function(){return this.options?Array.from(this.el.shadowRoot.querySelectorAll("bds-select-option")).find((function(e){return e.selected})):Array.from(this.el.querySelectorAll("bds-select-option")).find((function(e){return e.selected}))},enumerable:false,configurable:true});e.prototype.renderIcon=function(){return this.icon&&o("div",{class:{input__icon:true,"input__icon--large":!!this.label}},o("bds-icon",{size:this.label?"medium":"small",name:this.icon,color:"inherit"}))};e.prototype.renderLabel=function(){return this.label&&o("label",{class:{input__container__label:true,"input__container__label--pressed":this.isPressed&&!this.disabled}},o("bds-typo",{variant:"fs-12",bold:"bold"},this.label))};e.prototype.renderMessage=function(){var e=this.danger?"error":"info";var t=this.danger?this.errorMessage:this.helperMessage;if(!t&&this.validationDanger)t=this.validationMesage;var i=this.danger||this.validationDanger?"input__message input__message--danger":"input__message";if(t){return o("div",{class:i,part:"input__message"},o("div",{class:"input__message__icon"},o("bds-icon",{size:"x-small",name:e,theme:"solid",color:"inherit"})),o("bds-typo",{variant:"fs-12"},t))}return undefined};e.prototype.render=function(){var e=this;var t=this.isPressed&&!this.disabled;return o("div",{class:"select",tabindex:"0"},o("div",{class:{element_input:true},"aria-disabled":this.disabled?"true":null},o("div",{class:{input:true,"input--state-primary":!this.danger&&!this.validationDanger,"input--state-danger":this.danger||this.validationDanger,"input--state-disabled":this.disabled,"input--label":!!this.label,"input--pressed":t},onClick:this.onClickWrapper,onKeyDown:this.keyPressWrapper,part:"input-container"},this.renderIcon(),o("div",{class:"input__container"},this.renderLabel(),o("div",{class:{input__container__wrapper:true}},o("input",{ref:this.refNativeInput,class:{input__container__text:true},onFocus:this.onFocus,onBlur:this.onBlur,value:this.text,disabled:this.disabled,placeholder:this.placeholder,readonly:true,"data-test":this.dataTest}))),o("div",{class:"select__icon"},o("bds-icon",{ref:function(t){return e.refIconDrop(t)},size:"small",color:"inherit"}))),this.renderMessage()),o("div",{ref:function(t){return e.refDropdown(t)},class:{select__options:true,"select__options--open":this.isOpen}},this.internalOptions?this.internalOptions.map((function(e,t){return e.icon||e.titleText?o("bds-select-option",{key:t,value:e.value,"title-text":e.titleText,"slot-align":e.slotAlign,bulkOption:e.bulkOption,status:e.status},e.icon&&o("bds-icon",{slot:"input-left",name:e.icon,size:"medium",color:e.iconColor}),e.label):o("bds-select-option",{key:t,value:e.value,bulkOption:e.bulkOption,status:e.status},e.label)})):o("slot",null)))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{isOpen:["isOpenChanged"],value:["valueChanged"],options:["optionsChanged"]}},enumerable:false,configurable:true});return e}());l.style=a}}}));
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-7fb09d4a.js';
2
2
 
3
- const stepCss = ":host{padding:8px}:host .step{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content--disabled{color:var(--color-content-default, #202c44)}:host .step__content--completed{color:var(--color-content-disable, #505f79)}:host .step__content--active{color:var(--color-primary, #3f7de8);font-weight:bold}:host .step__content--pointer{cursor:pointer}:host .step__content__ellipse{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;border-radius:50%;background:var(--color-content-din, #000);margin-right:4px;min-width:24px;min-height:24px;color:var(--color-content-bright, #fff)}:host .step__content__ellipse--completed{background:var(--color-content-disable, #505f79)}:host .step__content__ellipse--active{background:var(--color-primary, #3f7de8);color:var(--color-content-bright, #fff)}@media (max-width: 780px){:host{display:-ms-flexbox;display:flex;-ms-flex:inherit;flex:inherit}}";
3
+ const stepCss = ":host{padding:8px}:host .step{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content--disabled{color:var(--color-content-default, #202c44)}:host .step__content--completed{color:var(--color-content-disable, #505f79)}:host .step__content--active{color:var(--color-primary, #3f7de8);font-weight:bold}:host .step__content--pointer{cursor:pointer}:host .step__content__ellipse{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;border-radius:50%;background:var(--color-content-din, #000);margin-right:4px;min-width:24px;min-height:24px}:host .step__content__ellipse--icon-completed{color:var(--color-content-bright, #fff)}:host .step__content__ellipse--text-active{color:var(--color-primary, #3f7de8)}:host .step__content__ellipse--text-completed{color:var(--color-content-disable, #505f79)}:host .step__content__ellipse--completed{background:var(--color-content-disable, #505f79)}:host .step__content__ellipse--active{background:var(--color-primary, #3f7de8);color:var(--color-content-bright, #fff)}@media (max-width: 780px){:host{display:-ms-flexbox;display:flex;-ms-flex:inherit;flex:inherit}}";
4
4
 
5
5
  const BdsStep = class {
6
6
  constructor(hostRef) {
@@ -24,7 +24,10 @@ const BdsStep = class {
24
24
  step__content__ellipse: true,
25
25
  'step__content__ellipse--active': this.active,
26
26
  'step__content__ellipse--completed': this.completed,
27
- } }, this.completed && h("bds-icon", { name: "true", color: "#fff" }), !this.completed && h("bds-typo", null, this.index + 1)), h("bds-typo", { variant: "fs-16", bold: this.active ? 'bold' : 'regular' }, h("slot", null)))));
27
+ } }, this.completed && h("bds-icon", { name: "true", color: "#fff" }), !this.completed && h("bds-typo", { class: "step__content__ellipse--icon-completed" }, this.index + 1)), h("bds-typo", { variant: "fs-16", class: {
28
+ 'step__content__ellipse--text-completed': this.completed && !this.active,
29
+ 'step__content__ellipse--text-active': this.active,
30
+ }, bold: this.active ? 'bold' : 'regular' }, h("slot", null)))));
28
31
  }
29
32
  get el() { return getElement(this); }
30
33
  };
@@ -1 +1 @@
1
- System.register(["./index-241c9f42.system.js"],(function(t){"use strict";var e,s,n;return{setters:[function(t){e=t.r;s=t.h;n=t.g}],execute:function(){var o=":host{padding:8px}:host .step{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content--disabled{color:var(--color-content-default, #202c44)}:host .step__content--completed{color:var(--color-content-disable, #505f79)}:host .step__content--active{color:var(--color-primary, #3f7de8);font-weight:bold}:host .step__content--pointer{cursor:pointer}:host .step__content__ellipse{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;border-radius:50%;background:var(--color-content-din, #000);margin-right:4px;min-width:24px;min-height:24px;color:var(--color-content-bright, #fff)}:host .step__content__ellipse--completed{background:var(--color-content-disable, #505f79)}:host .step__content__ellipse--active{background:var(--color-primary, #3f7de8);color:var(--color-content-bright, #fff)}@media (max-width: 780px){:host{display:-ms-flexbox;display:flex;-ms-flex:inherit;flex:inherit}}";var i=t("bds_step",function(){function t(t){e(this,t);this.last=false;this.completed=false;this.active=false;this.disabled=true;this.index=0;this.pointer=false}t.prototype.render=function(){return s("div",{class:"step"},s("div",{class:{step__content:true,"step__content--active":this.active,"step__content--completed":this.completed,"step__content--disabled":this.disabled,"step__content--pointer":this.pointer,"step--last":this.last}},s("div",{class:{step__content__ellipse:true,"step__content__ellipse--active":this.active,"step__content__ellipse--completed":this.completed}},this.completed&&s("bds-icon",{name:"true",color:"#fff"}),!this.completed&&s("bds-typo",null,this.index+1)),s("bds-typo",{variant:"fs-16",bold:this.active?"bold":"regular"},s("slot",null))))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());i.style=o}}}));
1
+ System.register(["./index-241c9f42.system.js"],(function(t){"use strict";var e,s,o;return{setters:[function(t){e=t.r;s=t.h;o=t.g}],execute:function(){var n=":host{padding:8px}:host .step{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}:host .step__content--disabled{color:var(--color-content-default, #202c44)}:host .step__content--completed{color:var(--color-content-disable, #505f79)}:host .step__content--active{color:var(--color-primary, #3f7de8);font-weight:bold}:host .step__content--pointer{cursor:pointer}:host .step__content__ellipse{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;border-radius:50%;background:var(--color-content-din, #000);margin-right:4px;min-width:24px;min-height:24px}:host .step__content__ellipse--icon-completed{color:var(--color-content-bright, #fff)}:host .step__content__ellipse--text-active{color:var(--color-primary, #3f7de8)}:host .step__content__ellipse--text-completed{color:var(--color-content-disable, #505f79)}:host .step__content__ellipse--completed{background:var(--color-content-disable, #505f79)}:host .step__content__ellipse--active{background:var(--color-primary, #3f7de8);color:var(--color-content-bright, #fff)}@media (max-width: 780px){:host{display:-ms-flexbox;display:flex;-ms-flex:inherit;flex:inherit}}";var i=t("bds_step",function(){function t(t){e(this,t);this.last=false;this.completed=false;this.active=false;this.disabled=true;this.index=0;this.pointer=false}t.prototype.render=function(){return s("div",{class:"step"},s("div",{class:{step__content:true,"step__content--active":this.active,"step__content--completed":this.completed,"step__content--disabled":this.disabled,"step__content--pointer":this.pointer,"step--last":this.last}},s("div",{class:{step__content__ellipse:true,"step__content__ellipse--active":this.active,"step__content__ellipse--completed":this.completed}},this.completed&&s("bds-icon",{name:"true",color:"#fff"}),!this.completed&&s("bds-typo",{class:"step__content__ellipse--icon-completed"},this.index+1)),s("bds-typo",{variant:"fs-16",class:{"step__content__ellipse--text-completed":this.completed&&!this.active,"step__content__ellipse--text-active":this.active},bold:this.active?"bold":"regular"},s("slot",null))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());i.style=n}}}));
@@ -0,0 +1,15 @@
1
+ import { r as registerInstance, h } from './index-7fb09d4a.js';
2
+
3
+ const testComponentCss = "";
4
+
5
+ const TestComponent = class {
6
+ constructor(hostRef) {
7
+ registerInstance(this, hostRef);
8
+ }
9
+ render() {
10
+ return h("div", null);
11
+ }
12
+ };
13
+ TestComponent.style = testComponentCss;
14
+
15
+ export { TestComponent as bds_test_component };
@@ -0,0 +1 @@
1
+ System.register(["./index-241c9f42.system.js"],(function(t){"use strict";var e,n;return{setters:[function(t){e=t.r;n=t.h}],execute:function(){var r="";var s=t("bds_test_component",function(){function t(t){e(this,t)}t.prototype.render=function(){return n("div",null)};return t}());s.style=r}}}));