blip-ds 1.157.2 → 1.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blip-ds/bds-chip-clickable.entry.js +5 -1
- package/dist/blip-ds/bds-chip-clickable.system.entry.js +1 -1
- package/dist/blip-ds/bds-chip-selected.entry.js +5 -1
- package/dist/blip-ds/bds-chip-selected.system.entry.js +1 -1
- package/dist/blip-ds/bds-input-chips.entry.js +5 -1
- package/dist/blip-ds/bds-input-chips.system.entry.js +1 -1
- package/dist/blip-ds/bds-input-editable.entry.js +5 -1
- package/dist/blip-ds/bds-input-editable.system.entry.js +1 -1
- package/dist/blip-ds/blip-ds.esm.js +1 -1
- package/dist/blip-ds/blip-ds.system.js +1 -1
- package/dist/blip-ds/p-05dff4df.entry.js +1 -0
- package/dist/blip-ds/p-3d9e5634.system.js +1 -1
- package/dist/blip-ds/p-4bed4d0c.entry.js +1 -0
- package/dist/blip-ds/{p-954bcd69.system.entry.js → p-53220ea5.system.entry.js} +1 -1
- package/dist/blip-ds/p-669955e7.entry.js +1 -0
- package/dist/blip-ds/p-9128a742.system.entry.js +1 -0
- package/dist/blip-ds/{p-b39109d8.system.entry.js → p-9c46f648.system.entry.js} +1 -1
- package/dist/blip-ds/p-9d15bf31.entry.js +1 -0
- package/dist/blip-ds/p-d9e18a0f.system.entry.js +1 -0
- package/dist/cjs/bds-chip-clickable.cjs.entry.js +5 -1
- package/dist/cjs/bds-chip-selected.cjs.entry.js +5 -1
- package/dist/cjs/bds-input-chips.cjs.entry.js +5 -1
- package/dist/cjs/bds-input-editable.cjs.entry.js +5 -1
- package/dist/cjs/blip-ds.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/chip-clickable/chip-clickable.js +23 -1
- package/dist/collection/components/chip-selected/chip-selected.js +23 -1
- package/dist/collection/components/input-chips/input-chips.js +23 -1
- package/dist/collection/components/input-editable/input-editable.js +23 -1
- package/dist/esm/bds-chip-clickable.entry.js +5 -1
- package/dist/esm/bds-chip-selected.entry.js +5 -1
- package/dist/esm/bds-input-chips.entry.js +5 -1
- package/dist/esm/bds-input-editable.entry.js +5 -1
- package/dist/esm/blip-ds.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/bds-chip-clickable.entry.js +1 -1
- package/dist/esm-es5/bds-chip-selected.entry.js +1 -1
- package/dist/esm-es5/bds-input-chips.entry.js +1 -1
- package/dist/esm-es5/bds-input-editable.entry.js +1 -1
- package/dist/esm-es5/blip-ds.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/types/components/chip-clickable/chip-clickable.d.ts +4 -0
- package/dist/types/components/chip-selected/chip-selected.d.ts +4 -0
- package/dist/types/components/input-chips/input-chips.d.ts +4 -0
- package/dist/types/components/input-editable/input-editable.d.ts +4 -0
- package/dist/types/components.d.ts +32 -0
- package/package.json +1 -1
- package/dist/blip-ds/p-397f059a.entry.js +0 -1
- package/dist/blip-ds/p-3c1fd737.entry.js +0 -1
- package/dist/blip-ds/p-60e23423.entry.js +0 -1
- package/dist/blip-ds/p-7ab11022.system.entry.js +0 -1
- package/dist/blip-ds/p-d5f0b06a.system.entry.js +0 -1
- package/dist/blip-ds/p-ef4dc9d0.entry.js +0 -1
|
@@ -66,6 +66,10 @@ export declare class InputChips {
|
|
|
66
66
|
* A tip for the user who can enter no controls.
|
|
67
67
|
*/
|
|
68
68
|
placeholder?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Data test is the prop to specifically test the component action object.
|
|
71
|
+
*/
|
|
72
|
+
dataTest?: string;
|
|
69
73
|
/**
|
|
70
74
|
* Emitted when the chip has added.
|
|
71
75
|
*/
|
|
@@ -16,6 +16,10 @@ export declare class InputEditable {
|
|
|
16
16
|
* Defines whether the component will be expandable
|
|
17
17
|
*/
|
|
18
18
|
expand?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Data test is the prop to specifically test the component action object.
|
|
21
|
+
*/
|
|
22
|
+
dataTest?: string;
|
|
19
23
|
/**
|
|
20
24
|
* Emitted when input text confirm.
|
|
21
25
|
*/
|
|
@@ -356,6 +356,10 @@ export namespace Components {
|
|
|
356
356
|
* used for change the color. Uses one of them.
|
|
357
357
|
*/
|
|
358
358
|
"color"?: Color;
|
|
359
|
+
/**
|
|
360
|
+
* Data test is the prop to specifically test the component action object.
|
|
361
|
+
*/
|
|
362
|
+
"dataTest"?: string;
|
|
359
363
|
/**
|
|
360
364
|
* the chip gone stay disabled while this prop be true.
|
|
361
365
|
*/
|
|
@@ -374,6 +378,10 @@ export namespace Components {
|
|
|
374
378
|
* used for change the color. Uses one of them.
|
|
375
379
|
*/
|
|
376
380
|
"color"?: Color;
|
|
381
|
+
/**
|
|
382
|
+
* Data test is the prop to specifically test the component action object.
|
|
383
|
+
*/
|
|
384
|
+
"dataTest"?: string;
|
|
377
385
|
/**
|
|
378
386
|
* When 'true', no events will be dispatched
|
|
379
387
|
*/
|
|
@@ -700,6 +708,10 @@ export namespace Components {
|
|
|
700
708
|
* Add state danger on input, use for use feedback.
|
|
701
709
|
*/
|
|
702
710
|
"danger"?: boolean;
|
|
711
|
+
/**
|
|
712
|
+
* Data test is the prop to specifically test the component action object.
|
|
713
|
+
*/
|
|
714
|
+
"dataTest"?: string;
|
|
703
715
|
/**
|
|
704
716
|
* The delimiter is used to add multiple chips in the same string.
|
|
705
717
|
*/
|
|
@@ -768,6 +780,10 @@ export namespace Components {
|
|
|
768
780
|
* Add state danger on input, use for use feedback. If true avoid save confirmation.
|
|
769
781
|
*/
|
|
770
782
|
"danger"?: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* Data test is the prop to specifically test the component action object.
|
|
785
|
+
*/
|
|
786
|
+
"dataTest"?: string;
|
|
771
787
|
/**
|
|
772
788
|
* Indicated to pass an feeback to user.
|
|
773
789
|
*/
|
|
@@ -2186,6 +2202,10 @@ declare namespace LocalJSX {
|
|
|
2186
2202
|
* used for change the color. Uses one of them.
|
|
2187
2203
|
*/
|
|
2188
2204
|
"color"?: Color;
|
|
2205
|
+
/**
|
|
2206
|
+
* Data test is the prop to specifically test the component action object.
|
|
2207
|
+
*/
|
|
2208
|
+
"dataTest"?: string;
|
|
2189
2209
|
/**
|
|
2190
2210
|
* the chip gone stay disabled while this prop be true.
|
|
2191
2211
|
*/
|
|
@@ -2209,6 +2229,10 @@ declare namespace LocalJSX {
|
|
|
2209
2229
|
* used for change the color. Uses one of them.
|
|
2210
2230
|
*/
|
|
2211
2231
|
"color"?: Color;
|
|
2232
|
+
/**
|
|
2233
|
+
* Data test is the prop to specifically test the component action object.
|
|
2234
|
+
*/
|
|
2235
|
+
"dataTest"?: string;
|
|
2212
2236
|
/**
|
|
2213
2237
|
* When 'true', no events will be dispatched
|
|
2214
2238
|
*/
|
|
@@ -2550,6 +2574,10 @@ declare namespace LocalJSX {
|
|
|
2550
2574
|
* Add state danger on input, use for use feedback.
|
|
2551
2575
|
*/
|
|
2552
2576
|
"danger"?: boolean;
|
|
2577
|
+
/**
|
|
2578
|
+
* Data test is the prop to specifically test the component action object.
|
|
2579
|
+
*/
|
|
2580
|
+
"dataTest"?: string;
|
|
2553
2581
|
/**
|
|
2554
2582
|
* The delimiter is used to add multiple chips in the same string.
|
|
2555
2583
|
*/
|
|
@@ -2624,6 +2652,10 @@ declare namespace LocalJSX {
|
|
|
2624
2652
|
* Add state danger on input, use for use feedback. If true avoid save confirmation.
|
|
2625
2653
|
*/
|
|
2626
2654
|
"danger"?: boolean;
|
|
2655
|
+
/**
|
|
2656
|
+
* Data test is the prop to specifically test the component action object.
|
|
2657
|
+
*/
|
|
2658
|
+
"dataTest"?: string;
|
|
2627
2659
|
/**
|
|
2628
2660
|
* Indicated to pass an feeback to user.
|
|
2629
2661
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,h as e,H as s,g as a}from"./p-3bf88eef.js";const n=class{constructor(e){i(this,e),this.bdsInputEditableSave=t(this,"bdsInputEditableSave",7),this.size="standard",this.expand=!1,this.isEditing=!1,this.isValid=!0,this.inputName="",this.value="",this.minlength=0,this.errorMessage="",this.helperMessage="",this.danger=!1,this.onInputChange=i=>{i.detail&&(this.isValid=!(i.detail.value.length<Number(this.minlength)))},this.handleEditing=()=>{this.toggleEditing()},this.toggleEditing=()=>{this.isEditing=!this.isEditing},this.handleSaveText=()=>{const i=this.el.shadowRoot.querySelector("bds-input").value;i.length>0&&i.length>=this.minlength&&!this.danger&&(this.bdsInputEditableSave.emit({value:i,oldValue:this.value}),this.value=i,this.toggleEditing())},this.getExpand=()=>this.expand?"expanded":"fixed"}getFontSizeClass(){return"short"==this.size?"fs-16":"standard"==this.size?"fs-24":"tall"==this.size?"fs-40":"fs-24"}render(){const i=this.getFontSizeClass(),t=this.getExpand();return e(s,null,e("div",{class:"input__editable"},e("div",{class:{"input__editable--static":!0,"input__editable--hidden":this.isEditing},onClick:this.handleEditing},e("bds-typo",{tag:"span",part:"input__editable--static__typo",class:"input__editable--static__typo",variant:i},this.value),e("bds-icon",{key:"edit-icon",class:"input__editable--static__icon",name:"edit"})),e("div",{class:{"input__editable--active":!0,"input__editable--hidden":!this.isEditing}},e("bds-input",{class:{[t]:!0,[this.size]:!0},type:"text","input-name":this.inputName,value:this.value,minlength:this.minlength,minlengthErrorMessage:this.minlengthErrorMessage,maxlength:this.maxlength,required:!0,"required-error-message":this.requiredErrorMessage,"error-message":this.errorMessage,onBdsChange:this.onInputChange,danger:this.danger,helperMessage:this.helperMessage}),e("div",{class:"input__editable--active__icon"},e("bds-icon",{key:"error-icon",class:"input__editable--active__icon--error",theme:"solid",name:"error",onClick:this.handleEditing}),e("bds-icon",{key:"checkball-icon",class:{"input__editable--active__icon--checkball":!0,"input__editable--active__icon--checkball--error":!this.isValid},theme:"solid",name:"checkball",onClick:this.handleSaveText})))))}get el(){return a(this)}};n.style='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); .input__editable{display:block}.input__editable--static{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer}.input__editable--static:hover .input__editable--static__typo{border:1px solid #3f7de8}.input__editable--static:hover .input__editable--static__icon{color:#3f7de8}.input__editable--static__typo{border:1px solid transparent;margin:0;padding:8px;border-radius:8px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:80%}.input__editable--static__icon{margin-left:8px;color:#8ca0b3}.input__editable--active{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.input__editable--active bds-input{min-width:120px;margin-right:4px}.input__editable--active bds-input.expanded{max-width:100%}.input__editable--active bds-input.fixed{max-width:140px}.input__editable--active bds-input.short::part(input){font-size:1rem;line-height:0px}.input__editable--active bds-input.standard::part(input){font-size:1.5rem;line-height:0px}.input__editable--active bds-input.tall::part(input){font-size:2.5rem;line-height:0px}.input__editable--active bds-input::part(input-container){padding:4px 4px 5px 12px}.input__editable--active bds-input::part(input__message){min-width:180px}.input__editable--active bds-icon{cursor:pointer}.input__editable--active__icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:auto 0}.input__editable--active__icon--error{color:#ff4c4c}.input__editable--active__icon--error:hover{color:#a01c2c}.input__editable--active__icon--checkball{color:#3f7de8}.input__editable--active__icon--checkball:hover{color:#125ad5}.input__editable--active__icon--checkball--error{color:#8ca0b3}.input__editable--active__icon--checkball--error:hover{color:#8ca0b3}.input__editable--hidden{display:none}';export{n as bds_input_editable}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as i,h as t,H as h}from"./p-3bf88eef.js";import{w as n,e}from"./p-7d00c003.js";const p=class{constructor(t){s(this,t),this.bdsChange=i(this,"bdsChange",7),this.bdsChangeChips=i(this,"bdsChangeChips",7),this.bdsBlur=i(this,"bdsBlur",7),this.bdsSubmit=i(this,"bdsSubmit",7),this.internalChips=[],this.chips=[],this.type="text",this.label="",this.icon="",this.delimiters=/,|;/,this.errorMessage="",this.danger=!1,this.value="",this.duplicated=!1,this.disableSubmit=!1,this.disabled=!1,this.helperMessage="",this.inputName="",this.placeholder=""}valueChanged(){if(this.chips)if("string"==typeof this.chips)try{this.internalChips=JSON.parse(this.chips)}catch(s){this.internalChips=[]}else this.internalChips=this.chips;else this.internalChips=[]}internalValueChanged(){this.bdsChangeChips.emit({data:this.internalChips,value:this.getLastChip()})}async isValid(){return this.validateChips()}async get(){return this.internalChips}async clear(){this.internalChips=[],this.value=""}async add(s){this.setChip(s)}async setFocus(){this.nativeInput.setFocus()}async removeFocus(){this.nativeInput.removeFocus()}componentWillLoad(){this.valueChanged()}validateChips(){return"email"!==this.type||!this.internalChips.some((s=>!this.validateChip(s)))}handleOnBlur(){this.bdsBlur.emit(this.internalChips)}handleAddChip(s){if(this.disableSubmit)return;const{detail:{value:i}}=s;this.setChip(i),this.value=""}getLastChip(){return this.internalChips[this.internalChips.length-1]}handleBackRemove(s){const{detail:{value:i}}=s;(null===i||i.length<=0)&&this.internalChips.length&&(this.removeLastChip(),this.bdsChangeChips.emit({data:this.internalChips,value:i}))}verifyAndSubstituteDelimiters(s){if(1===s.length&&s[0].match(this.delimiters))return"";let i=s.replace(/;/g,",").replace(/\,+|;+/g,",");return i[0].match(this.delimiters)&&(i=i.substring(1)),i}async handleChange(s){const{detail:{value:i}}=s;if(this.value=i?i.trim():"",0===i.length)return;if(!i.match(this.delimiters))return;const t=this.verifyAndSubstituteDelimiters(i);t?(t.split(this.delimiters).forEach((s=>{this.setChip(s)})),this.clearInputValues()):this.clearInputValues()}clearInputValues(s=""){this.nativeInput.value=s,this.value=s}setChip(s){!this.duplicated&&this.internalChips.some((i=>i.toLowerCase()===s.toLowerCase()))||n(s)&&(this.internalChips=[...this.internalChips,s])}validateChip(s){const i=s.trim();return"email"!==this.type||!e(i)}removeLastChip(){this.internalChips=this.internalChips.slice(0,this.internalChips.length-1)}removeChip(s){const{detail:{id:i}}=s;this.internalChips=this.internalChips.filter(((s,t)=>t.toString()!==i))}renderChips(){return this.internalChips.length?this.internalChips.map(((s,i)=>{const h=i.toString();return t("bds-chip",{class:"input-chips__chip",id:h,key:h,variant:"primary",danger:!this.validateChip(s),deletable:!this.disabled,onBdsDelete:s=>this.removeChip(s)},s)})):[]}render(){return t(h,null,t("bds-input",{ref:s=>this.nativeInput=s,icon:this.icon,label:this.label,onBdsKeyDownBackspace:s=>this.handleBackRemove(s),onBdsSubmit:s=>this.handleAddChip(s),onBdsOnBlur:()=>this.handleOnBlur(),onBdsChange:s=>this.handleChange(s),maxlength:this.maxlength,value:this.value,"error-message":this.errorMessage,"helper-message":this.helperMessage,"input-name":this.inputName,placeholder:this.placeholder,danger:this.danger,chips:!0,disabled:this.disabled},t("span",{slot:"inside-input-left"},this.renderChips()),t("div",{slot:"input-right"},t("slot",{name:"input-right"}))))}static get watchers(){return{chips:["valueChanged"],internalChips:["internalValueChanged"]}}};p.style='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-input-chips,300.sc-bds-input-chips;0.sc-bds-input-chips,400.sc-bds-input-chips;0.sc-bds-input-chips,600.sc-bds-input-chips;0.sc-bds-input-chips,700.sc-bds-input-chips;0.sc-bds-input-chips,800.sc-bds-input-chips;0.sc-bds-input-chips,900.sc-bds-input-chips;1.sc-bds-input-chips,200.sc-bds-input-chips;1.sc-bds-input-chips,300.sc-bds-input-chips;1.sc-bds-input-chips,400.sc-bds-input-chips;1.sc-bds-input-chips,600.sc-bds-input-chips;1.sc-bds-input-chips,700.sc-bds-input-chips;1.sc-bds-input-chips,800.sc-bds-input-chips;1.sc-bds-input-chips,900&display=swap").sc-bds-input-chips; .sc-bds-input-chips-h{display:block}.input-chips__chip.sc-bds-input-chips{margin:2px 4px 2px 0px}.input-chips__chips.sc-bds-input-chips{-ms-flex:1;flex:1}';export{p as bds_input_chips}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c,h as e,H as t,g as s}from"./p-3bf88eef.js";const l=class{constructor(e){i(this,e),this.chipClickableClose=c(this,"chipClickableClose",7),this.chipClickableClick=c(this,"chipClickableClick",7),this.visible=!0,this.color="default",this.size="standard",this.clickable=!1,this.close=!1,this.disabled=!1}handleClickKey(i){"Enter"!==i.key&&" "!==i.key||this.disabled||(i.preventDefault(),this.chipClickableClick.emit())}handleClick(i){this.disabled||(i.preventDefault(),this.chipClickableClick.emit())}handleCloseChip(i){i.preventDefault(),this.chipClickableClose.emit({id:this.element.id}),this.visible=!1}handleCloseKey(i){"Enter"!==i.key&&" "!==i.key||this.disabled||(i.preventDefault(),this.chipClickableClose.emit({id:this.element.id}),this.visible=!1)}getSizeAvatarChip(){return"tall"===this.size?"extra-small":"micro"}getSizeIconChip(){return"tall"===this.size?"medium":"x-small"}render(){return e(t,null,e("div",{class:{chip_clickable:!0,[`chip_clickable--${this.color}`]:!this.disabled,[`chip_clickable--${this.size}`]:!0,"chip_clickable--hide":!this.visible,"chip_clickable--click":this.clickable,"chip_clickable--disabled":this.disabled},onClick:this.handleClick.bind(this)},this.clickable&&!this.disabled&&e("div",{class:"chip_focus",onKeyDown:this.handleClickKey.bind(this),tabindex:"0"}),this.clickable&&!this.disabled&&e("div",{class:"chip_darker"}),this.icon&&!this.avatar&&e("div",{class:"chip_clickable--icon"},e("bds-icon",{size:this.getSizeIconChip(),name:this.icon})),this.avatar&&e("div",{class:"chip_clickable--avatar"},e("bds-avatar",{size:this.getSizeAvatarChip(),thumbnail:this.avatar})),e("bds-typo",{class:"chip_clickable--text",variant:"fs-12",bold:"bold"},e("slot",null)),this.close&&e("div",{class:"chip_clickable--close",onClick:this.handleCloseChip.bind(this)},!this.disabled&&e("div",{class:"close_focus",onKeyDown:this.handleCloseKey.bind(this),tabindex:"0"}),e("bds-icon",{size:"x-small",theme:"solid",name:"error"}))))}get element(){return s(this)}};l.style='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); :host{display:block;height:-webkit-max-content;height:-moz-max-content;height:max-content;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip_clickable{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0}:host .chip_clickable--hide{display:none;padding:0;border:none}:host .chip_clickable .chip_focus:focus{position:absolute;width:100%;height:100%;padding:2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip_clickable--click{cursor:pointer}:host .chip_clickable--click .chip_darker{opacity:0;position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1;-webkit-backdrop-filter:brightness(1);backdrop-filter:brightness(1);-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip_clickable--click:hover .chip_darker{opacity:1;-webkit-backdrop-filter:brightness(0.9);backdrop-filter:brightness(0.9)}:host .chip_clickable--click:active .chip_darker{opacity:1;-webkit-backdrop-filter:brightness(0.8);backdrop-filter:brightness(0.8)}:host .chip_clickable--disabled{cursor:default;background-color:#f3f6fa}:host .chip_clickable--disabled .chip_clickable--icon{color:#505f79}:host .chip_clickable--disabled .chip_clickable--text{color:#505f79}:host .chip_clickable--disabled .chip_clickable--close{cursor:default}:host .chip_clickable--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-left:4px;color:#202c44;z-index:2}:host .chip_clickable--close{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-right:4px;mix-blend-mode:hard-light;color:#202c44;opacity:0.7;z-index:2;position:relative;cursor:pointer}:host .chip_clickable--close .close_focus:focus{position:absolute;width:100%;height:100%;left:-2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip_clickable--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:20px;margin:0 8px;z-index:2;color:#202c44;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif}:host .chip_clickable--tall{height:40px;border-radius:24px}:host .chip_clickable--default{background-color:#b3d4ff}:host .chip_clickable--info{background-color:#80e3eb}:host .chip_clickable--success{background-color:#90e6bc}:host .chip_clickable--warning{background-color:#fff6a8}:host .chip_clickable--danger{background-color:#ffa5a5}:host .chip_clickable--outline{background-color:#ffffff;border:1px solid #b9cbd3}:host .chip_clickable:focus-visible{outline:none}';export{l as bds_chip_clickable}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-cff8fd49.system.js"],(function(e){"use strict";var i,t,a,n,s;return{setters:[function(e){i=e.r;t=e.c;a=e.h;n=e.H;s=e.g}],execute:function(){var l='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); .input__editable{display:block}.input__editable--static{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;cursor:pointer}.input__editable--static:hover .input__editable--static__typo{border:1px solid #3f7de8}.input__editable--static:hover .input__editable--static__icon{color:#3f7de8}.input__editable--static__typo{border:1px solid transparent;margin:0;padding:8px;border-radius:8px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:80%}.input__editable--static__icon{margin-left:8px;color:#8ca0b3}.input__editable--active{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.input__editable--active bds-input{min-width:120px;margin-right:4px}.input__editable--active bds-input.expanded{max-width:100%}.input__editable--active bds-input.fixed{max-width:140px}.input__editable--active bds-input.short::part(input){font-size:1rem;line-height:0px}.input__editable--active bds-input.standard::part(input){font-size:1.5rem;line-height:0px}.input__editable--active bds-input.tall::part(input){font-size:2.5rem;line-height:0px}.input__editable--active bds-input::part(input-container){padding:4px 4px 5px 12px}.input__editable--active bds-input::part(input__message){min-width:180px}.input__editable--active bds-icon{cursor:pointer}.input__editable--active__icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin:auto 0}.input__editable--active__icon--error{color:#ff4c4c}.input__editable--active__icon--error:hover{color:#a01c2c}.input__editable--active__icon--checkball{color:#3f7de8}.input__editable--active__icon--checkball:hover{color:#125ad5}.input__editable--active__icon--checkball--error{color:#8ca0b3}.input__editable--active__icon--checkball--error:hover{color:#8ca0b3}.input__editable--hidden{display:none}';var r=e("bds_input_editable",function(){function e(e){var a=this;i(this,e);this.bdsInputEditableSave=t(this,"bdsInputEditableSave",7);this.size="standard";this.expand=false;this.isEditing=false;this.isValid=true;this.inputName="";this.value="";this.minlength=0;this.errorMessage="";this.helperMessage="";this.danger=false;this.onInputChange=function(e){if(e.detail){if(e.detail.value.length<Number(a.minlength)){a.isValid=false}else{a.isValid=true}}};this.handleEditing=function(){a.toggleEditing()};this.toggleEditing=function(){a.isEditing=!a.isEditing};this.handleSaveText=function(){var e=a.el.shadowRoot.querySelector("bds-input").value;if(e.length>0&&e.length>=a.minlength&&!a.danger){a.bdsInputEditableSave.emit({value:e,oldValue:a.value});a.value=e;a.toggleEditing()}};this.getExpand=function(){if(a.expand){return"expanded"}else{return"fixed"}}}e.prototype.getFontSizeClass=function(){if(this.size=="short"){return"fs-16"}else if(this.size=="standard"){return"fs-24"}else if(this.size=="tall"){return"fs-40"}else{return"fs-24"}};e.prototype.render=function(){var e;var i=this.getFontSizeClass();var t=this.getExpand();return a(n,null,a("div",{class:"input__editable"},a("div",{class:{"input__editable--static":true,"input__editable--hidden":this.isEditing},onClick:this.handleEditing},a("bds-typo",{tag:"span",part:"input__editable--static__typo",class:"input__editable--static__typo",variant:i},this.value),a("bds-icon",{key:"edit-icon",class:"input__editable--static__icon",name:"edit"})),a("div",{class:{"input__editable--active":true,"input__editable--hidden":!this.isEditing}},a("bds-input",{class:(e={},e[t]=true,e[this.size]=true,e),type:"text","input-name":this.inputName,value:this.value,minlength:this.minlength,minlengthErrorMessage:this.minlengthErrorMessage,maxlength:this.maxlength,required:true,"required-error-message":this.requiredErrorMessage,"error-message":this.errorMessage,onBdsChange:this.onInputChange,danger:this.danger,helperMessage:this.helperMessage}),a("div",{class:"input__editable--active__icon"},a("bds-icon",{key:"error-icon",class:"input__editable--active__icon--error",theme:"solid",name:"error",onClick:this.handleEditing}),a("bds-icon",{key:"checkball-icon",class:{"input__editable--active__icon--checkball":true,"input__editable--active__icon--checkball--error":!this.isValid},theme:"solid",name:"checkball",onClick:this.handleSaveText})))))};Object.defineProperty(e.prototype,"el",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());r.style=l}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,i,e,n){function s(t){return t instanceof e?t:new e((function(i){i(t)}))}return new(e||(e=Promise))((function(e,r){function h(t){try{u(n.next(t))}catch(i){r(i)}}function a(t){try{u(n["throw"](t))}catch(i){r(i)}}function u(t){t.done?e(t.value):s(t.value).then(h,a)}u((n=n.apply(t,i||[])).next())}))};var __generator=this&&this.__generator||function(t,i){var e={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,h;return h={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(h[Symbol.iterator]=function(){return this}),h;function a(t){return function(i){return u([t,i])}}function u(h){if(n)throw new TypeError("Generator is already executing.");while(e)try{if(n=1,s&&(r=h[0]&2?s["return"]:h[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,h[1])).done)return r;if(s=0,r)h=[h[0]&2,r.value];switch(h[0]){case 0:case 1:r=h;break;case 4:e.label++;return{value:h[1],done:false};case 5:e.label++;s=h[1];h=[0];continue;case 7:h=e.ops.pop();e.trys.pop();continue;default:if(!(r=e.trys,r=r.length>0&&r[r.length-1])&&(h[0]===6||h[0]===2)){e=0;continue}if(h[0]===3&&(!r||h[1]>r[0]&&h[1]<r[3])){e.label=h[1];break}if(h[0]===6&&e.label<r[1]){e.label=r[1];r=h;break}if(r&&e.label<r[2]){e.label=r[2];e.ops.push(h);break}if(r[2])e.ops.pop();e.trys.pop();continue}h=i.call(t,e)}catch(a){h=[6,a];s=0}finally{n=r=0}if(h[0]&5)throw h[1];return{value:h[0]?h[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,i,e){if(e||arguments.length===2)for(var n=0,s=i.length,r;n<s;n++){if(r||!(n in i)){if(!r)r=Array.prototype.slice.call(i,0,n);r[n]=i[n]}}return t.concat(r||Array.prototype.slice.call(i))};System.register(["./p-cff8fd49.system.js","./p-c5060283.system.js"],(function(t){"use strict";var i,e,n,s,r,h;return{setters:[function(t){i=t.r;e=t.c;n=t.h;s=t.H},function(t){r=t.w;h=t.e}],execute:function(){var a='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0.sc-bds-input-chips,300.sc-bds-input-chips;0.sc-bds-input-chips,400.sc-bds-input-chips;0.sc-bds-input-chips,600.sc-bds-input-chips;0.sc-bds-input-chips,700.sc-bds-input-chips;0.sc-bds-input-chips,800.sc-bds-input-chips;0.sc-bds-input-chips,900.sc-bds-input-chips;1.sc-bds-input-chips,200.sc-bds-input-chips;1.sc-bds-input-chips,300.sc-bds-input-chips;1.sc-bds-input-chips,400.sc-bds-input-chips;1.sc-bds-input-chips,600.sc-bds-input-chips;1.sc-bds-input-chips,700.sc-bds-input-chips;1.sc-bds-input-chips,800.sc-bds-input-chips;1.sc-bds-input-chips,900&display=swap").sc-bds-input-chips; .sc-bds-input-chips-h{display:block}.input-chips__chip.sc-bds-input-chips{margin:2px 4px 2px 0px}.input-chips__chips.sc-bds-input-chips{-ms-flex:1;flex:1}';var u=t("bds_input_chips",function(){function t(t){i(this,t);this.bdsChange=e(this,"bdsChange",7);this.bdsChangeChips=e(this,"bdsChangeChips",7);this.bdsBlur=e(this,"bdsBlur",7);this.bdsSubmit=e(this,"bdsSubmit",7);this.internalChips=[];this.chips=[];this.type="text";this.label="";this.icon="";this.delimiters=/,|;/;this.errorMessage="";this.danger=false;this.value="";this.duplicated=false;this.disableSubmit=false;this.disabled=false;this.helperMessage="";this.inputName="";this.placeholder=""}t.prototype.valueChanged=function(){if(this.chips){if(typeof this.chips==="string"){try{this.internalChips=JSON.parse(this.chips)}catch(t){this.internalChips=[]}}else{this.internalChips=this.chips}}else{this.internalChips=[]}};t.prototype.internalValueChanged=function(){this.bdsChangeChips.emit({data:this.internalChips,value:this.getLastChip()})};t.prototype.isValid=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.validateChips()]}))}))};t.prototype.get=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.internalChips]}))}))};t.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.internalChips=[];this.value="";return[2]}))}))};t.prototype.add=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){this.setChip(t);return[2]}))}))};t.prototype.setFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.setFocus();return[2]}))}))};t.prototype.removeFocus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.nativeInput.removeFocus();return[2]}))}))};t.prototype.componentWillLoad=function(){this.valueChanged()};t.prototype.validateChips=function(){var t=this;if(this.type==="email"){return!this.internalChips.some((function(i){return!t.validateChip(i)}))}else{return true}};t.prototype.handleOnBlur=function(){this.bdsBlur.emit(this.internalChips)};t.prototype.handleAddChip=function(t){if(this.disableSubmit){return}var i=t.detail.value;this.setChip(i);this.value=""};t.prototype.getLastChip=function(){return this.internalChips[this.internalChips.length-1]};t.prototype.handleBackRemove=function(t){var i=t.detail.value;if((i===null||i.length<=0)&&this.internalChips.length){this.removeLastChip();this.bdsChangeChips.emit({data:this.internalChips,value:i})}};t.prototype.verifyAndSubstituteDelimiters=function(t){if(t.length===1&&t[0].match(this.delimiters)){return""}var i=t.replace(/;/g,",").replace(/\,+|;+/g,",");if(i[0].match(this.delimiters)){i=i.substring(1)}return i};t.prototype.handleChange=function(t){return __awaiter(this,void 0,void 0,(function(){var i,e,n,s;var r=this;return __generator(this,(function(h){i=t.detail.value;this.value=i?i.trim():"";if(i.length===0)return[2];e=i.match(this.delimiters);if(!e)return[2];n=this.verifyAndSubstituteDelimiters(i);if(!n){this.clearInputValues();return[2]}s=n.split(this.delimiters);s.forEach((function(t){r.setChip(t)}));this.clearInputValues();return[2]}))}))};t.prototype.clearInputValues=function(t){if(t===void 0){t=""}this.nativeInput.value=t;this.value=t};t.prototype.setChip=function(t){if(!this.duplicated){var i=this.internalChips.some((function(i){return i.toLowerCase()===t.toLowerCase()}));if(i)return}if(!r(t)){return}this.internalChips=__spreadArray(__spreadArray([],this.internalChips,true),[t],false)};t.prototype.validateChip=function(t){var i=t.trim();if(this.type==="email"&&h(i)){return false}return true};t.prototype.removeLastChip=function(){this.internalChips=this.internalChips.slice(0,this.internalChips.length-1)};t.prototype.removeChip=function(t){var i=t.detail.id;this.internalChips=this.internalChips.filter((function(t,e){return e.toString()!==i}))};t.prototype.renderChips=function(){var t=this;if(!this.internalChips.length){return[]}return this.internalChips.map((function(i,e){var s=e.toString();return n("bds-chip",{class:"input-chips__chip",id:s,key:s,variant:"primary",danger:!t.validateChip(i),deletable:!t.disabled,onBdsDelete:function(i){return t.removeChip(i)}},i)}))};t.prototype.render=function(){var t=this;return n(s,null,n("bds-input",{ref:function(i){return t.nativeInput=i},icon:this.icon,label:this.label,onBdsKeyDownBackspace:function(i){return t.handleBackRemove(i)},onBdsSubmit:function(i){return t.handleAddChip(i)},onBdsOnBlur:function(){return t.handleOnBlur()},onBdsChange:function(i){return t.handleChange(i)},maxlength:this.maxlength,value:this.value,"error-message":this.errorMessage,"helper-message":this.helperMessage,"input-name":this.inputName,placeholder:this.placeholder,danger:this.danger,chips:true,disabled:this.disabled},n("span",{slot:"inside-input-left"},this.renderChips()),n("div",{slot:"input-right"},n("slot",{name:"input-right"}))))};Object.defineProperty(t,"watchers",{get:function(){return{chips:["valueChanged"],internalChips:["internalValueChanged"]}},enumerable:false,configurable:true});return t}());u.style=a}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as e,h as t,H as s,g as o}from"./p-3bf88eef.js";const r=class{constructor(t){i(this,t),this.chipClick=e(this,"chipClick",7),this.isSelected=!1,this.color="default",this.size="standard",this.selected=!1,this.disabled=!1}handleKeyDown(i){if(" "===i.key&&!this.disabled)return i.preventDefault(),this.isSelected=!this.isSelected}handleClick(i){if(!this.disabled)return i.preventDefault(),this.isSelected=!this.isSelected}componentWillLoad(){this.el.focus(),this.isSelected=this.selected}getDisabledChip(){return this.disabled?{chip_disabled:!0,[`chip_disabled--${this.size}`]:!0}:{}}getStyleChip(){return this.isSelected?{chip_selected:!0,[`chip_selected--${this.size}`]:!0}:{[`chip--${this.color}`]:!0,[`chip--${this.size}`]:!0}}getStyleText(){if(this.isSelected)return{"chip_selected--text":!0}}getSizeIconChip(){return"tall"===this.size?"medium":"x-small"}render(){return t(s,null,t("div",{class:Object.assign(Object.assign({chip:!0},this.getStyleChip()),this.getDisabledChip()),onClick:this.handleClick},!this.disabled&&t("div",{class:"chip_focus",onKeyDown:this.handleKeyDown.bind(this),tabindex:"0"}),!this.isSelected&&!this.disabled&&t("div",{class:"chip_darker"}),this.icon&&!this.isSelected&&t("div",{class:"chip--icon"},t("bds-icon",{size:this.getSizeIconChip(),name:this.icon})),this.isSelected&&t("div",{class:"chip_selected--icon"},t("bds-icon",{size:this.getSizeIconChip(),name:"checkball"})),t("bds-typo",{class:Object.assign({"chip--text":!0},this.getStyleText()),variant:"fs-12","no-wrap":!0,bold:"bold"},t("slot",null))))}get el(){return o(this)}};r.style='@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,200;0,300;0,400;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,600;1,700;1,800;1,900&display=swap"); :host{display:-ms-flexbox;display:flex;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;width:-webkit-max-content;width:-moz-max-content;width:max-content;border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0}:host .chip .chip_focus:focus{position:absolute;width:100%;height:100%;padding:2px;border-radius:4px;outline:#c226fb solid 2px}:host .chip .chip_darker{position:absolute;width:100%;height:100%;border-radius:inherit;z-index:1;-webkit-backdrop-filter:brightness(1);backdrop-filter:brightness(1);-webkit-box-sizing:border-box;box-sizing:border-box}:host .chip--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px;height:20px;color:#202c44;z-index:2}:host .chip--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;z-index:2;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#202c44;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif}:host .chip--tall{height:40px;border-radius:24px}:host .chip--default{background-color:#b3d4ff}:host .chip--info{background-color:#80e3eb}:host .chip--success{background-color:#90e6bc}:host .chip--warning{background-color:#fff6a8}:host .chip--danger{background-color:#ffa5a5}:host .chip--outline{background-color:#ffffff;border:1px solid #b9cbd3;padding:2px 3px}:host .chip--outline .chip_darker{height:calc(100% + 2px)}:host .chip:hover{cursor:pointer}:host .chip:hover .chip_darker{-webkit-backdrop-filter:brightness(0.9);backdrop-filter:brightness(0.9)}:host .chip:active{cursor:pointer}:host .chip:active .chip_darker{-webkit-backdrop-filter:brightness(0.8);backdrop-filter:brightness(0.8)}:host .chip:focus-visible{outline:none}:host .chip_selected{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#ffffff;border:2px solid #3f7de8}:host .chip_selected--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;padding-left:4px;color:#125ad5}:host .chip_selected--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#125ad5;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif}:host .chip_selected--tall{height:40px;border-radius:24px}:host .chip_selected:hover{background-color:#e8f2ff;cursor:pointer}:host .chip_selected:active{background-color:#d1e3fa}:host .chip_disabled{display:-ms-flexbox;display:flex;min-width:32px;width:-webkit-max-content;width:-moz-max-content;width:max-content;height:32px;border-radius:16px;padding:2px 4px;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;position:relative;z-index:0;background-color:#f3f6fa}:host .chip_disabled--icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding-left:4px;width:16px;height:20px;color:#505f79;z-index:2}:host .chip_disabled--text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:20px;z-index:2;margin:0 8px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;color:#505f79;font-family:"Nunito Sans", "Tahoma", "Helvetica", "Arial", sans-serif}:host .chip_disabled--tall{height:40px;border-radius:24px}:host .chip_disabled:hover{cursor:default}';export{r as bds_chip_selected}
|