bromcom-ui 2.7.36-rc.10-1 → 2.7.36-rc.12-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/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-54afca08.entry.js → p-118e711c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-678d5156.js → p-121e4ca5.js} +1 -1
- package/dist/bromcom-ui/{p-99009fb3.entry.js → p-21263f24.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c864a7dc.entry.js → p-25f444e7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8b0533fe.entry.js → p-26e68ec6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dd620ace.entry.js → p-27c8e474.entry.js} +1 -1
- package/dist/bromcom-ui/{p-603183c2.entry.js → p-2a3a7d9c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1a573c05.entry.js → p-2ec58d06.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6518ede6.entry.js → p-2fc5b5bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a3a9dfaf.entry.js → p-3cd7aace.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a283f6b3.entry.js → p-41d1f8b7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d3c8b552.entry.js → p-505b1f51.entry.js} +1 -1
- package/dist/bromcom-ui/{p-84cb6a58.js → p-5d337c50.js} +1 -1
- package/dist/bromcom-ui/{p-2f18fecb.entry.js → p-5e502028.entry.js} +1 -1
- package/dist/bromcom-ui/p-5f46c328.js +5 -0
- package/dist/bromcom-ui/{p-18e5fdee.entry.js → p-6711d370.entry.js} +1 -1
- package/dist/bromcom-ui/p-6b61ef5d.js +5 -0
- package/dist/bromcom-ui/p-76e8a020.entry.js +5 -0
- package/dist/bromcom-ui/{p-5ae0a59b.js → p-7e44e6b5.js} +1 -1
- package/dist/bromcom-ui/{p-93ab74a2.entry.js → p-80cdeb5b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-87b88761.entry.js → p-831fa0e8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c1529286.entry.js → p-83332466.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0609c942.entry.js → p-885292bf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d67cd559.entry.js → p-8ad347e0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3c7a0345.js → p-8c018ae0.js} +1 -1
- package/dist/bromcom-ui/p-965d1cb2.entry.js +5 -0
- package/dist/bromcom-ui/{p-92d85409.js → p-9ab7c5f9.js} +1 -1
- package/dist/bromcom-ui/{p-acbb2337.entry.js → p-a18bb86e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-33c2dd40.js → p-a25d4102.js} +1 -1
- package/dist/bromcom-ui/{p-a8d1397d.js → p-a3ffcb0d.js} +1 -1
- package/dist/bromcom-ui/{p-28a663cb.entry.js → p-a57c40a2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-360072c2.entry.js → p-a6f49d6c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0a720ae8.entry.js → p-a7acf688.entry.js} +1 -1
- package/dist/bromcom-ui/{p-64ff8997.entry.js → p-aedac6e4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-559e6ad8.entry.js → p-b6c04be0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2d3c0790.entry.js → p-b79132b8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a0883613.entry.js → p-bb4a5441.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ade7d316.entry.js → p-bbeb3aa8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a5787d86.entry.js → p-c0648349.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e6fd236e.entry.js → p-c0a49e8e.entry.js} +1 -1
- package/dist/bromcom-ui/p-ca48c3aa.entry.js +5 -0
- package/dist/bromcom-ui/{p-28cf1ba4.entry.js → p-cad94133.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7de55a4c.entry.js → p-cccebf39.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a96ae844.entry.js → p-cf48e4bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-16b69e74.entry.js → p-cf68a762.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ae64e49c.entry.js → p-cfeac4c2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-efea110b.entry.js → p-d0ae1e25.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a724498d.entry.js → p-d0dd9a6d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-236a8be4.entry.js → p-e3306b8d.entry.js} +1 -1
- package/dist/bromcom-ui/p-e58a867d.entry.js +5 -0
- package/dist/bromcom-ui/{p-51f23b60.entry.js → p-e6877526.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4008d187.entry.js → p-e97f680e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0540bd97.entry.js → p-ebadb877.entry.js} +1 -1
- package/dist/bromcom-ui/{p-80e70b89.entry.js → p-f559a41c.entry.js} +1 -1
- package/dist/bromcom-ui/p-fb65423b.js +5 -0
- package/dist/bromcom-ui/{p-040eb04d.entry.js → p-fb8d1e47.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-05809f08.entry.js +0 -5
- package/dist/bromcom-ui/p-0f4e34e9.js +0 -5
- package/dist/bromcom-ui/p-29affa82.entry.js +0 -5
- package/dist/bromcom-ui/p-3651da70.entry.js +0 -5
- package/dist/bromcom-ui/p-3dbf5595.js +0 -5
- package/dist/bromcom-ui/p-417a49e7.entry.js +0 -5
- package/dist/bromcom-ui/p-4548abde.entry.js +0 -5
- package/dist/bromcom-ui/p-4f23a2f1.entry.js +0 -5
- package/dist/bromcom-ui/p-5d447563.js +0 -5
- package/dist/bromcom-ui/p-6260e5c6.js +0 -5
- package/dist/bromcom-ui/p-65d94dd2.entry.js +0 -5
- package/dist/bromcom-ui/p-84075684.entry.js +0 -5
- package/dist/bromcom-ui/p-85891433.entry.js +0 -5
- package/dist/bromcom-ui/p-a471aa97.entry.js +0 -5
- package/dist/bromcom-ui/p-b0858229.entry.js +0 -5
- package/dist/bromcom-ui/p-b9f0114c.entry.js +0 -5
- package/dist/bromcom-ui/p-daeb6f7c.entry.js +0 -5
- package/dist/bromcom-ui/p-dbde0dc8.entry.js +0 -5
- package/dist/bromcom-ui/p-f268788c.entry.js +0 -5
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-0ba73c30.js";import{c as r}from"./p-d5b08a77.js";import{I as n}from"./p-20e22beb.js";import{S as o}from"./p-04c8b756.js";import{d as h,a as c}from"./p-3c7a0345.js";import"./p-6f56f8ca.js";import"./p-c9bd85e9.js";const l=new class{constructor(){}response(t,i){return Object.assign(Object.assign({valid:t},i&&{message:i}),!t&&{type:"error"})}required(t,i){let e=this.response(!0);return""!=t&&""!=t&&null!=t&&null!=t&&!1!==t||(e=this.response(!1,"This field is required.")),i&&(i.valid||(e=this.response(!1,i.errorText)),t instanceof Object&&t.isValid&&0==t.isValid&&(e=this.response(!1,"This field is required."))),e}selfValidation(t){let i=this.response(!0);return null==t.captionError&&"error"!=t.captionType||(i=this.response(!1,t.captionError)),i}};const p=class{constructor(e){t(this,e),this.bcmForm=i(this,"bcm-form",7),this.formData={},this.inputs=[],this.duplicateInput=[],this.isValid=!0,this.returnCaption=[],this.Bromcom={errors:{targetFormNotExist:"target form is not exist --\x3e "},inputComponents:{INPUT:"input",TEXTAREA:"textarea",SWITCH:"switch",CHECKBOX:"checkbox",RADIO_GROUP:"radio-group",CHECKBOX_GROUP:"checkbox-group",RANGE:"range",FORM:"form",FORM_GROUP:"form-group",LIST:"list",COLORPICKER:"colorpicker",DATE_PICKER:"date-picker",TIME_PICKER:"time-picker",DATETIME_PICKER:"datetime-picker",SELECT:"select",LISTBOX:"listbox"},helpers:{randomId:function(){return Math.random().toString(16).slice(2,-1)}}},this._id=(4*Math.random()).toString(16).replace(".",""),this.hidden=!1,this.validation=!1,this.name="",this.autocomplete=!1}handleSubmit(){}async submitFunction(){this.formData={},this.inputs=[],this.selector=this.el,await this.getInputs(),await h(10);const t=await this.userFormData();var i={isValid:!0,formData:t};return this.name&&(i=Object.assign(Object.assign({},i),{formName:this.name})),this.isValid?(this.bcmForm.emit(i),i):(this.returnCaption={isValid:!1,message:"Please fill in all inputs",errorDetails:this.returnCaption,formData:t},this.name&&(this.returnCaption=Object.assign(Object.assign({},this.returnCaption),{formName:this.name})),this.bcmForm.emit(this.returnCaption),this.returnCaption)}async submit(){return Promise.resolve(this.submitFunction())}async set(t){var i;const e=this.validation;if(this.validation=!1,this.selector=this.el,await this.getInputs(),t&&(null===(i=this.inputs)||void 0===i?void 0:i.length)>0)for(const i of Object.keys(t)){const e=this.inputs.find((t=>t.name===i));if(e)try{await e.set(t[i])}catch(t){console.log(e.nodeName,"set",t)}}this.validation=e}async get(){var t;let i={};this.selector=this.el;const e=this.inputs;return await this.getInputs(),(null===(t=this.inputs)||void 0===t?void 0:t.length)>0&&this.inputs.forEach((async t=>{try{const e=await t.get();i=Object.assign(Object.assign({},i),{[t.name]:e})}catch(i){console.log(`${t.nodeName} get error`)}})),this.inputs=e,await h(10),Promise.resolve(i)}async setClear(){this.formData={},this.inputs=[],this.selector=this.el;let t=[];return await this.getInputs(),this.inputs.forEach((async i=>{try{t.push(await i.setClear())}catch(t){console.log(t)}})),await Promise.all(t).then((()=>{this.formData={},this.inputs=[],this.duplicateInput=[],this.isValid=!0,this.returnCaption=[]})),await h(10),Promise.resolve(!0)}async resetCaption(){await h(10),this.formData={},this.inputs=[],this.selector=this.el,await this.getInputs();for(const t of this.inputs)try{await t.resetCaption()}catch(i){console.log(t.nodeName,"rc p")}return await h(10),Promise.resolve()}async config(t){return t.validation&&(this.validation="boolean"==typeof t.validation&&t.validation),!0}async getInputs(){var t=this.selector;if(!t)return void console.warn(this.Bromcom.errors.targetFormNotExist+this.selector);const i=Array.from(t.querySelectorAll("bcm-"+Object.values(this.Bromcom.inputComponents).join(",bcm-")));this.duplicateInput=[];const e=i.filter((t=>{var i;return!t["s-hn"]||"BcmForm"!==(null===(i=t["s-hn"])||void 0===i?void 0:i.nodeName)}));for(const t of e){if("bcm-checkbox-group"==o.lowercase(t.nodeName)){let i=t.querySelectorAll("bcm-checkbox");if(i)for(const t of i)this.duplicateInput.push(t.name)}if("bcm-form"==o.lowercase(t.nodeName)){const i=Array.from(t.querySelectorAll("bcm-"+Object.values(this.Bromcom.inputComponents).join(",bcm-")));let e={};for(const t of i){var s=t.name,a=t.value;e=Object.assign(Object.assign({},e),{[s]:a}),this.duplicateInput.push(t.name)}t.value=e;let r=t.querySelectorAll("bcm-checkbox");if(r)for(const t of r)this.duplicateInput.push(t.name)}}await h(10),this.inputs=e}getItemValue(t){return t.tagName.toLowerCase().replace("bcm-",""),t.value}isWrapperComponent(t){return["bcm-datetime-picker","bcm-date-picker","bcm-time-picker"].includes(t.toLowerCase())}isGroupComponent(t){return["bcm-checkbox-group"].includes(t.toLowerCase())}isListComponent(t){return["bcm-list"].includes(t.toLowerCase())}async userFormData(){this.formData={},this.isValid=!0,this.returnCaption=[];for(const i of this.inputs){const e=this.isGroupComponent(i.tagName),s=this.isWrapperComponent(i.tagName),a=s&&i,r=s?await i.getInput()&&i:i;if(this.validation){let t=null;if(s){const i=await a.isValid();t=l.required(r.value,i),t&&(r.value instanceof Object?0==r.value.isValid&&(t=l.required("",i)):t=l.required(r.value,i))}else if(e){const i=c(r,"bcm-checkbox:not(#bcm-indeterminate-element)");if(i&&i.length>0)for(const e of i)e&&!0===e.required&&(t=l.required(e.checked),t.valid?(e.noCaption=r.noCaption,e.captionError=null,e.captionType="default"):(e.noCaption=!1,e.captionError=t.message,e.captionType=t.type))}else t=l.required(r.value);if(r.required){t.valid?(r.captionError=null,r.captionType="default"):(r.captionError=t.message,r.captionType=t.type),await h(10);const i=l.selfValidation(r);t.valid&&(i.valid||(r.captionError=i.message,r.captionType=i.type))}let i=r.name,n=r.captionError;!r.hidden&&"error"==r.captionType&&(this.returnCaption=[...Array.from(this.returnCaption),{[i]:n}],this.isValid=!1)}if(r.name&&!this.duplicateInput.includes(r.name)){var t=this.getItemValue(r);t&&null!=t&&null!=t||(t=null),this.formData[r.name]=t}}return this.formData}async handleChange(t){const i=this.isWrapperComponent(t.target.tagName),e=this.isGroupComponent(t.target.tagName);let s;if(i)s=t.target.getInput&&await t.target.getInput()||t.target;else if(e){let i=!1;const e=c(t.target,"bcm-checkbox:not(#bcm-indeterminate-element)");e.length>0&&e.forEach((t=>{t&&!0===t.required&&(i=!0)})),s=Object.assign(Object.assign({},t.target),{required:i})}else s=t.target;const a=t.target.value,r=i&&t.target;var n;i&&(n=await r.isValid());const o=setTimeout((()=>{if(s.required){let r=null;if(i)r=l.required(a,n),r&&(a instanceof Object?0==a.isValid&&(r=l.required("",n)):r=l.required(a,n));else if(e){const i=c(t.target,"bcm-checkbox:not(#bcm-indeterminate-element)");i.length>0&&i.forEach((i=>{i&&!0===i.required&&(r=l.required(i.checked),r.valid?(i.noCaption=t.target.noCaption,i.captionError=null,i.captionType="default"):(i.noCaption=!1,i.captionError=r.message,i.captionType=r.type))}))}else r=l.required(a);r.valid?(s.captionError=null,s.captionType=null):(s.captionError=r.message,s.captionType=r.type)}clearTimeout(o)}));this.value=await this.userFormData()}render(){const t=r(this.hidden?"hidden":null);return e(s,{class:t,tabindex:"-1"},e("form",{class:"bcm-form",autocomplete:this.autocomplete?"on":"off",tabindex:"-1"},e("slot",null)))}get el(){return a(this)}};(function(t,i,e,s){var a,r=arguments.length,n=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var o=t.length-1;o>=0;o--)(a=t[o])&&(n=(r<3?a(n):r>3?a(i,e,n):a(i,e))||n);r>3&&n&&Object.defineProperty(i,e,n)})([n()],p.prototype,"el",void 0),p.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block;margin-bottom:8px}:host(.hidden){display:none}';export{p as bcm_form}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{h as o,r as c,c as e,H as r,g as n}from"./p-0ba73c30.js";import{s as t,G as l}from"./p-678d5156.js";import{B as b,a as i}from"./p-c9bd85e9.js";import{c as a}from"./p-d5b08a77.js";import{c as d}from"./p-be904c55.js";import{S as s}from"./p-128a5956.js";import{C as m}from"./p-a8d1397d.js";import{I as f}from"./p-20e22beb.js";import"./p-626a65e9.js";import"./p-6260e5c6.js";import"./p-04c8b756.js";import"./p-33c2dd40.js";import{T as u}from"./p-3dbf5595.js";import"./p-5ae0a59b.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-0f4e34e9.js";const w={save:{text:"Save",color:"emerald",icon:"far fa-save",iconPosition:"prefix"},ok:{text:"Ok",color:"emerald",icon:"far fa-check",iconPosition:"prefix"},new:{text:"New",color:"emerald",icon:"far fa-plus",iconPosition:"prefix"},add:{text:"Add",color:"emerald",icon:"far fa-plus",iconPosition:"prefix"},create:{text:"Create",color:"emerald",icon:"far fa-plus",iconPosition:"prefix"},prev:{text:"Prev",color:"",icon:"far fa-arrow-left",iconPosition:"prefix"},next:{text:"Next",color:"",icon:"far fa-arrow-right",iconPosition:"suffix"},apply:{text:"Apply",color:"",icon:"far fa-check-circle",iconPosition:"prefix"},submit:{text:"Submit",color:"",icon:"far fa-save",iconPosition:"prefix"},send:{text:"Send",color:"emerald",icon:"far fa-paper-plane",iconPosition:"prefix"},delete:{text:"Delete",color:"red",icon:"far fa-trash",iconPosition:"prefix"},cancel:{text:"Cancel",color:"red",icon:"far fa-times",iconPosition:"prefix"},decline:{text:"Decline",color:"red",icon:"far fa-ban",iconPosition:"prefix"},close:{text:"Close",color:"red",icon:"far fa-times-circle",iconPosition:"prefix"},archive:{text:"Archive",color:"red",icon:"far fa-folder-open",iconPosition:"prefix"},remove:{text:"Remove",color:"red",icon:"far fa-minus-circle",iconPosition:"prefix"},edit:{text:"Edit",color:"",icon:"far fa-edit",iconPosition:"prefix"},export:{text:"Export",color:"",icon:"far fa-sign-out",iconPosition:"prefix"},import:{text:"Import",color:"",icon:"far fa-sign-in",iconPosition:"prefix"},filter:{text:"Filter",color:"",icon:"far fa-filter",iconPosition:"prefix"},update:{text:"Update",color:"",icon:"far fa-sync",iconPosition:"prefix"},reset:{text:"Reset",color:"",icon:"far fa-sync",iconPosition:"prefix"},download:{text:"Download",color:"",icon:"far fa-download",iconPosition:"prefix"}};var p;!function(o){o.save="save",o.submit="submit",o.ok="ok",o.new="new",o.add="add",o.create="create",o.apply="apply",o.prev="prev",o.next="next",o.send="send",o.delete="delete",o.cancel="cancel",o.decline="decline",o.close="close",o.archive="archive",o.remove="remove",o.edit="edit",o.export="export",o.import="import",o.filter="filter",o.update="update",o.reset="Reset",o.download="download"}(p||(p={}));const{state:h}=d({value:new Map,setData:{},removeData:{}}),g=({value:c,type:e,componentClass:r,disabled:n,href:t,target:l,loading:i,isIconOnly:a,icon:d,iconPosition:m,id:f})=>o(t&&!n?b.HtmlElementType.a:b.HtmlElementType.button,Object.assign({id:f},e==b.HtmlElementType.button&&{type:e},{class:r,disabled:n,href:t,target:l,tabindex:"1"}),o("span",{hidden:!0},o("slot",null)),i&&o("span",{class:"bcm-button__container-loading"}," ",o("span",{class:"bcm-button__container-icon"},o("i",{class:"far fa-spinner-third fa-spin"})," ")),d&&o("span",{class:`${m} bcm-button__container-icon`},o("i",{class:`${d}`})),!a&&o(s,{className:"bcm-button__container-text",value:c}),o("slot",{name:"suffix"}));const v=class{constructor(o){c(this,o),this.bcmClick=e(this,"bcm-click",7),this._id=l.UID(),this.hidden=!1,this.type=b.ButtonType.button,this.size=b.Size.medium,this.disabled=!1,this.kind=b.Kind.solid,this.outline=!1,this.loading=!1,this.dataDismiss=!1,this.fullWidth=!1,this.iconPosition=b.IconPosition.prefix,this.checked=!1}handleOnClick(o){this.disabled&&(o.preventDefault(),o.stopPropagation())}componentWillRender(){const{size:o,kind:c,icon:e,iconPosition:r,disabled:n,outline:t,href:l,type:i,target:a,loading:d,variant:s,fullWidth:m,hidden:f,value:u}=this;(o=>{const c=Object.assign(Object.assign({},o),w[o.variant]&&{icon:w[o.variant].icon,value:w[o.variant].text,iconPosition:b.IconPosition[w[o.variant].iconPosition],variantColor:w[o.variant].color});h.value.set(c.id,c)})({id:this._id,size:o,type:i,kind:c,icon:e,iconPosition:r,disabled:n,outline:t,href:l,target:a,loading:d,variant:s,fullWidth:m,hidden:f,value:u,isIconOnly:!(!this.isHaveChildNodes()||!this.icon)})}getStateData(){return o=this._id,t((()=>h.value.get(o)),{});var o}isHaveChildNodes(){return void 0===Array.from(this.el.childNodes).find((o=>o.nodeType===Node.TEXT_NODE))}setColor(o=this.color){if(!o)return;const{kind:c}=this,e=`--bcm-button-${c}`;return"solid"===c?{[`${e}-color-default`]:m.dsColor("white"),[`${e}-color-hover`]:m.dsColor("white"),[`${e}-color-focus-visible`]:m.dsColor("white"),[`${e}-color-active`]:m.dsColor("white"),[`${e}-color-disabled`]:m.dsColor("white"),[`${e}-background-color-default`]:m.dsColor(o+"-500"),[`${e}-background-color-hover`]:m.dsColor(o+"-600"),[`${e}-background-color-focus-visible`]:m.dsColor(o+"-700"),[`${e}-background-color-active`]:m.dsColor(o+"-800"),[`${e}-background-color-disabled`]:m.dsColor("slate-400"),[`${e}-border-default`]:m.dsColor(o+"-500"),[`${e}-border-hover`]:m.dsColor(o+"-600"),[`${e}-border-focus-visible`]:m.dsColor(o+"-700"),[`${e}-border-active`]:m.dsColor(o+"-800"),[`${e}-border-disabled`]:m.dsColor("slate-400")}:"link"==c?{[`${e}-color-default`]:m.dsColor(o+"-500"),[`${e}-color-hover`]:m.dsColor(o+"-600"),[`${e}-color-focus-visible`]:m.dsColor(o+"-800"),[`${e}-color-active`]:m.dsColor(o+"-700"),[`${e}-color-disabled`]:m.dsColor("slate-400"),[`${e}-background-color-default`]:m.dsColor("transparent"),[`${e}-background-color-hover`]:m.dsColor("transparent"),[`${e}-background-color-focus-visible`]:m.dsColor("slate-50"),[`${e}-background-color-active`]:m.dsColor("slate-50"),[`${e}-background-color-disabled`]:m.dsColor("transparent"),[`${e}-border-default`]:m.dsColor("transparent"),[`${e}-border-hover`]:m.dsColor("transparent"),[`${e}-border-focus-visible`]:m.dsColor("slate-50"),[`${e}-border-active`]:m.dsColor("slate-50"),[`${e}-border-disabled`]:m.dsColor("transparent")}:"ghost"==c?{[`${e}-color-default`]:m.dsColor(o+"-600"),[`${e}-color-hover`]:m.dsColor(o+"-600"),[`${e}-color-focus-visible`]:m.dsColor(o+"-600"),[`${e}-color-active`]:m.dsColor(o+"-600"),[`${e}-color-disabled`]:m.dsColor(o+"-300"),[`${e}-background-color-default`]:m.dsColor(o+"-100"),[`${e}-background-color-hover`]:m.dsColor(o+"-200"),[`${e}-background-color-focus-visible`]:m.dsColor(o+"-400"),[`${e}-background-color-active`]:m.dsColor(o+"-300"),[`${e}-background-color-disabled`]:m.dsColor(o+"-50"),[`${e}-border-default`]:m.dsColor(o+"-300"),[`${e}-border-hover`]:m.dsColor(o+"-400"),[`${e}-border-focus-visible`]:m.dsColor(o+"-600"),[`${e}-border-active`]:m.dsColor(o+"-500"),[`${e}-border-disabled`]:m.dsColor(o+"-200")}:void 0}render(){const{size:c,kind:e,disabled:n,outline:t,type:l,href:b,target:i,loading:d,variantColor:s,fullWidth:m,hidden:f,icon:u,iconPosition:w,value:p,isIconOnly:h,iconSize:v}=this.getStateData();let x=a("bcm-button__container",`bcm-button__container-size-${c}`,`bcm-button__container-kind-${t?"ghost":e}`,{"full-width":m,checked:this.checked});const k=a("bcm-button",{hidden:f,"full-width":m});return o(r,{class:k,tabindex:"-1",style:this.setColor(s),onClick:()=>!n&&this.bcmClick.emit(this.el)},o(g,{type:l,value:p,componentClass:x,disabled:n,href:b,target:i,icon:u,loading:d,iconSize:v,isIconOnly:h,iconPosition:w}))}get el(){return n(this)}};(function(o,c,e,r){var n,t=arguments.length,l=t<3?c:null===r?r=Object.getOwnPropertyDescriptor(c,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(o,c,e,r);else for(var b=o.length-1;b>=0;b--)(n=o[b])&&(l=(t<3?n(l):t>3?n(c,e,l):n(c,e))||l);t>3&&l&&Object.defineProperty(c,e,l)})([f()],v.prototype,"el",void 0),v.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:root{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{box-sizing:border-box}.bcm-button{display:inline-flex;width:fit-content;height:fit-content;--bcm-button-solid-color-default:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-border-default:var(--bcm-new-ds-color-blue-500);--bcm-button-solid-color-hover:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-border-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-solid-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-border-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-solid-color-active:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-border-active:var(--bcm-new-ds-color-blue-700);--bcm-button-solid-color-disabled:var(--bcm-new-ds-color-white);--bcm-button-solid-background-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-solid-border-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-default:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-default:var(--bcm-new-ds-color-slate-100);--bcm-button-ghost-border-default:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-color-hover:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-hover:var(--bcm-new-ds-color-slate-200);--bcm-button-ghost-border-hover:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-color-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-focus-visible:var(--bcm-new-ds-color-slate-400);--bcm-button-ghost-border-focus-visible:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-color-active:var(--bcm-new-ds-color-slate-600);--bcm-button-ghost-background-color-active:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-border-active:var(--bcm-new-ds-color-slate-500);--bcm-button-ghost-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-button-ghost-background-color-disabled:var(--bcm-new-ds-color-slate-50);--bcm-button-ghost-border-disabled:var(--bcm-new-ds-color-slate-200);--bcm-button-link-color-default:var(--bcm-new-ds-color-blue-500);--bcm-button-link-background-color-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-default:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-button-link-background-color-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-hover:var(--bcm-new-ds-color-transparent);--bcm-button-link-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-button-link-background-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-active:var(--bcm-new-ds-color-blue-700);--bcm-button-link-background-color-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-border-active:var(--bcm-new-ds-color-slate-50);--bcm-button-link-color-disabled:var(--bcm-new-ds-color-slate-400);--bcm-button-link-background-color-disabled:var(--bcm-new-ds-color-transparent);--bcm-button-link-border-disabled:var(--bcm-new-ds-color-transparent)}.bcm-button.full-width{width:100%}.bcm-button.full-width .bcm-button__container{width:100%}.bcm-button:after,.bcm-button:before{content:"";clear:both}.bcm-button__container{border:none;color:inherit;background-color:inherit;padding:0;margin:0;font:inherit;cursor:pointer;outline:none;text-decoration:none;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:4px 12px;outline:none;border-radius:4px;transition:background-color 0.1s ease-in-out;position:relative;min-width:40px;border-width:1px;border-style:solid;border-color:initial}.bcm-button__container:hover,.bcm-button__container:focus,.bcm-button__container:active{outline:none;text-decoration:none}.bcm-button__container-loading{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:4px;display:flex;align-items:center;justify-content:center}.bcm-button__container-kind-solid{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-solid:hover{color:var(--bcm-button-solid-color-hover);background-color:var(--bcm-button-solid-background-color-hover);border-color:var(--bcm-button-solid-border-hover)}.bcm-button__container-kind-solid:focus-visible{color:var(--bcm-button-solid-color-focus-visible);background-color:var(--bcm-button-solid-background-color-focus-visible);border-color:var(--bcm-button-solid-border-focus-visible)}.bcm-button__container-kind-solid:active{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid:disabled{color:var(--bcm-button-solid-color-disabled);background-color:var(--bcm-button-solid-background-color-disabled);border-color:var(--bcm-button-solid-border-disabled)}.bcm-button__container-kind-solid.checked{color:var(--bcm-button-solid-color-active);background-color:var(--bcm-button-solid-background-color-active);border-color:var(--bcm-button-solid-border-active)}.bcm-button__container-kind-solid .bcm-button__container-loading{color:var(--bcm-button-solid-color-default);background-color:var(--bcm-button-solid-background-color-default);border-color:var(--bcm-button-solid-border-default)}.bcm-button__container-kind-ghost{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-ghost:not([disabled]) .bcm-icon{color:var(--bcm-new-ds-color-slate-500)}.bcm-button__container-kind-ghost:hover{color:var(--bcm-button-ghost-color-hover);background-color:var(--bcm-button-ghost-background-color-hover);border-color:var(--bcm-button-ghost-border-hover)}.bcm-button__container-kind-ghost:focus-visible{color:var(--bcm-button-ghost-color-focus-visible);background-color:var(--bcm-button-ghost-background-color-focus-visible);border-color:var(--bcm-button-ghost-border-focus-visible)}.bcm-button__container-kind-ghost:active{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost:disabled{color:var(--bcm-button-ghost-color-disabled);background-color:var(--bcm-button-ghost-background-color-disabled);border-color:var(--bcm-button-ghost-border-disabled)}.bcm-button__container-kind-ghost.checked{color:var(--bcm-button-ghost-color-active);background-color:var(--bcm-button-ghost-background-color-active);border-color:var(--bcm-button-ghost-border-active)}.bcm-button__container-kind-ghost .bcm-button__container-loading{color:var(--bcm-button-ghost-color-default);background-color:var(--bcm-button-ghost-background-color-default);border-color:var(--bcm-button-ghost-border-default)}.bcm-button__container-kind-link{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container-kind-link:hover{color:var(--bcm-button-link-color-hover);background-color:var(--bcm-button-link-background-color-hover);border-color:var(--bcm-button-link-border-hover)}.bcm-button__container-kind-link:focus-visible{color:var(--bcm-button-link-color-focus-visible);background-color:var(--bcm-button-link-background-color-focus-visible);border-color:var(--bcm-button-link-border-focus-visible)}.bcm-button__container-kind-link:active{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link:disabled{color:var(--bcm-button-link-color-disabled);background-color:var(--bcm-button-link-background-color-disabled);border-color:var(--bcm-button-link-border-disabled)}.bcm-button__container-kind-link.checked{color:var(--bcm-button-link-color-active);background-color:var(--bcm-button-link-background-color-active);border-color:var(--bcm-button-link-border-active)}.bcm-button__container-kind-link .bcm-button__container-loading{color:var(--bcm-button-link-color-default);background-color:var(--bcm-button-link-background-color-default);border-color:var(--bcm-button-link-border-default)}.bcm-button__container[disabled]{cursor:not-allowed}.bcm-button__container-text{order:3;display:flex;align-items:center;gap:8px;white-space:nowrap}.bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-icon.prefix{order:2}.bcm-button__container-icon.suffix{order:4}.bcm-button__container-size-small{font-size:12px;line-height:calc(12px + 8px);padding:calc(4px - 3px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px - 2px)) * 2)}.bcm-button__container-size-small .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-medium{font-size:calc(12px + 1px);line-height:calc(12px + 8px);padding:calc(4px + 1px) 12px;min-height:calc(calc(12px + 8px) + calc(calc(4px + 2px)) * 2)}.bcm-button__container-size-medium .bcm-button__container-icon{min-height:calc(12px + 8px)}.bcm-button__container-size-large{font-size:16px;line-height:calc(16px + 8px);padding:calc(8px - 1px) 12px;min-height:calc(calc(16px + 8px) + (calc(8px) * 2))}.bcm-button__container-size-large .bcm-button__container-icon{min-height:calc(16px + 8px)}';const x=class{constructor(o){c(this,o),this._id=l.UID(),this.message="",this.placement=i.Placement.top,this.trigger=i.TriggerType.click,this.open=!1,this.color="slate",this.tooltip=new u({targetId:this._id,message:this.message,placement:this.placement,color:this.color,trigger:this.trigger})}componentDidLoad(){this.tooltip.listener()}componentDidRender(){this.tooltip.message=this.message,this.tooltip.placement=this.placement,this.tooltip.color=this.color,this.tooltip.trigger=this.trigger,this.tooltip.update()}async show(){this.tooltip.show()}async hide(){this.tooltip.hide()}async toggle(){this.tooltip.toggle()}render(){return o(r,{"aria-describedby":"tooltip",tabindex:"-1",class:"tw-inline-flex tw-w-fit tw-h-fit"},o("slot",null))}get el(){return n(this)}};!function(o,c,e,r){var n,t=arguments.length,l=t<3?c:null===r?r=Object.getOwnPropertyDescriptor(c,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(o,c,e,r);else for(var b=o.length-1;b>=0;b--)(n=o[b])&&(l=(t<3?n(l):t>3?n(c,e,l):n(c,e))||l);t>3&&l&&Object.defineProperty(c,e,l)}([f()],x.prototype,"el",void 0);export{v as bcm_button,x as bcm_tooltip}
|