bromcom-ui 2.8.0-rc.10 → 2.8.0-rc.11
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.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-ef1b4760.entry.js → p-02692383.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ec8cf4f0.entry.js → p-0caef6f7.entry.js} +1 -1
- package/dist/bromcom-ui/p-14cc943b.entry.js +5 -0
- package/dist/bromcom-ui/{p-4fb0b07a.entry.js → p-1d46ae31.entry.js} +1 -1
- package/dist/bromcom-ui/{p-16cb2d3d.entry.js → p-237fc595.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bb5102ad.entry.js → p-27d87114.entry.js} +1 -1
- package/dist/bromcom-ui/{p-75887a27.entry.js → p-2848a3b5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4701df7c.entry.js → p-2cf162c1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ed026255.js → p-39e9bcaf.js} +1 -1
- package/dist/bromcom-ui/{p-ab53518d.entry.js → p-3cc6e75e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-42645311.entry.js → p-3d1d257e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b6522bad.entry.js → p-3e9f517e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7afeaca9.entry.js → p-42af29f7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-01832535.entry.js → p-46751172.entry.js} +1 -1
- package/dist/bromcom-ui/{p-21c41833.entry.js → p-4ac0f46a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-774cc8c5.entry.js → p-4bc5f980.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bdae6fa2.entry.js → p-57890ee9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-76154996.js → p-58969dc8.js} +1 -1
- package/dist/bromcom-ui/{p-5a464d76.entry.js → p-641678da.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e0c548ea.entry.js → p-6afa4844.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5c5db6d2.entry.js → p-702ea819.entry.js} +1 -1
- package/dist/bromcom-ui/{p-74970793.entry.js → p-7238a0e3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-36b364af.entry.js → p-743713f0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-faed1c9e.entry.js → p-75510c00.entry.js} +1 -1
- package/dist/bromcom-ui/{p-04aac882.js → p-758a3979.js} +1 -1
- package/dist/bromcom-ui/{p-c271533b.entry.js → p-79c85d60.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3c1bd5fd.entry.js → p-7edf9f12.entry.js} +1 -1
- package/dist/bromcom-ui/{p-37e672f8.entry.js → p-804f4aba.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1351e665.entry.js → p-86397cea.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0d7fcdef.entry.js → p-87d51809.entry.js} +1 -1
- package/dist/bromcom-ui/{p-86dae775.entry.js → p-881b18a9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-31d72d3e.entry.js → p-8e000873.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f4ce5b4e.entry.js → p-97a1ad17.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8fccd984.entry.js → p-9ba90782.entry.js} +1 -1
- package/dist/bromcom-ui/{p-52953d34.entry.js → p-a3e51939.entry.js} +1 -1
- package/dist/bromcom-ui/{p-74540539.entry.js → p-a487f1ec.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a8ff8106.entry.js → p-a498f8cb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5374828c.js → p-aa3999e6.js} +1 -1
- package/dist/bromcom-ui/{p-82549604.entry.js → p-b1ff40f9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fc784983.entry.js → p-b263fa84.entry.js} +1 -1
- package/dist/bromcom-ui/{p-91517b40.entry.js → p-b782b1c2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-be7a34ac.entry.js → p-b8aa6104.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8620b754.entry.js → p-c6f1b199.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bb3ee847.entry.js → p-c7441f19.entry.js} +1 -1
- package/dist/bromcom-ui/{p-96d00dc7.entry.js → p-cb984720.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5432f9e0.entry.js → p-cf387e94.entry.js} +1 -1
- package/dist/bromcom-ui/{p-88c0d54d.entry.js → p-cf57eb9e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-175a2b31.entry.js → p-d377d1c5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a51e8ad2.js → p-d42921e7.js} +1 -1
- package/dist/bromcom-ui/{p-3fcbf33c.entry.js → p-e31f3564.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c834b5c2.js → p-e41b4807.js} +1 -1
- package/dist/bromcom-ui/{p-dafe02b6.entry.js → p-e6150bea.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9f8c1c4.entry.js → p-ea079e82.entry.js} +1 -1
- package/dist/bromcom-ui/p-f166f6c6.js +5 -0
- package/dist/bromcom-ui/{p-a76148e1.entry.js → p-f2a41a6a.entry.js} +1 -1
- package/dist/bromcom-ui/p-fa86c3ea.entry.js +5 -0
- package/dist/bromcom-ui/{p-7f85ba54.entry.js → p-fcfd5502.entry.js} +1 -1
- package/dist/bromcom-ui/{p-eee421df.entry.js → p-fd9a67d7.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +1 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button_7.cjs.entry.js +4 -4
- package/dist/cjs/bcm-card.cjs.entry.js +1 -1
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +1 -1
- package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +3 -3
- package/dist/cjs/bcm-colorful_2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +1 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-item.cjs.entry.js +1 -1
- package/dist/cjs/bcm-items.cjs.entry.js +1 -1
- package/dist/cjs/bcm-list.cjs.entry.js +5 -5
- package/dist/cjs/bcm-menu.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal-2.cjs.entry.js +3 -3
- package/dist/cjs/bcm-modal.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +1 -1
- package/dist/cjs/bcm-popover.cjs.entry.js +3 -3
- package/dist/cjs/bcm-progress.cjs.entry.js +1 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-radio.cjs.entry.js +3 -3
- package/dist/cjs/bcm-range.cjs.entry.js +1 -1
- package/dist/cjs/bcm-search.cjs.entry.js +2 -2
- package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bcm-step.cjs.entry.js +2 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +4 -4
- package/dist/cjs/bcm-switch.cjs.entry.js +1 -1
- package/dist/cjs/bcm-tab-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tab-item.cjs.entry.js +3 -3
- package/dist/cjs/bcm-tag.cjs.entry.js +2 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +2 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +1 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +1 -1
- package/dist/cjs/{generate-d32dfcf9.js → generate-957759ec.js} +1 -1
- package/dist/cjs/{input-template-272244eb.js → input-template-743a5a26.js} +1 -1
- package/dist/cjs/{json-parse-decarator-fe63bae0.js → json-parse-decarator-0023854b.js} +1 -1
- package/dist/cjs/{number-helper-8286f839.js → number-helper-88714a49.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +2 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +1 -1
- package/dist/cjs/{stepper-states-fd08aaf7.js → stepper-states-f636e6e0.js} +1 -1
- package/dist/cjs/{tooltip-helper-ce53d70b.js → tooltip-helper-c9744900.js} +3 -3
- package/dist/cjs/{validators-53bfb47b.js → validators-04ac79e1.js} +1 -1
- package/dist/components/generate.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/bcm-avatar_2.entry.js +3 -3
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +1 -1
- package/dist/esm/bcm-button_7.entry.js +4 -4
- package/dist/esm/bcm-card.entry.js +1 -1
- package/dist/esm/bcm-checkbox-lite_9.entry.js +1 -1
- package/dist/esm/bcm-chip.entry.js +1 -1
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +3 -3
- package/dist/esm/bcm-colorful_2.entry.js +3 -3
- package/dist/esm/bcm-date-picker.entry.js +1 -1
- package/dist/esm/bcm-datetime-picker.entry.js +1 -1
- package/dist/esm/bcm-default.entry.js +1 -1
- package/dist/esm/bcm-drawer.entry.js +3 -3
- package/dist/esm/bcm-dropdown.entry.js +2 -2
- package/dist/esm/bcm-expansion-panel.entry.js +1 -1
- package/dist/esm/bcm-form-2.entry.js +1 -1
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-input.entry.js +4 -4
- package/dist/esm/bcm-item.entry.js +1 -1
- package/dist/esm/bcm-items.entry.js +1 -1
- package/dist/esm/bcm-list.entry.js +5 -5
- package/dist/esm/bcm-menu.entry.js +4 -4
- package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
- package/dist/esm/bcm-modal-2-header.entry.js +3 -3
- package/dist/esm/bcm-modal-2.entry.js +3 -3
- package/dist/esm/bcm-modal.entry.js +1 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- package/dist/esm/bcm-popconfirm.entry.js +1 -1
- package/dist/esm/bcm-popover.entry.js +3 -3
- package/dist/esm/bcm-progress.entry.js +1 -1
- package/dist/esm/bcm-radio-group.entry.js +3 -3
- package/dist/esm/bcm-radio.entry.js +3 -3
- package/dist/esm/bcm-range.entry.js +1 -1
- package/dist/esm/bcm-search.entry.js +2 -2
- package/dist/esm/bcm-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +4 -4
- package/dist/esm/bcm-switch.entry.js +1 -1
- package/dist/esm/bcm-tab-group.entry.js +3 -3
- package/dist/esm/bcm-tab-item-header.entry.js +3 -3
- package/dist/esm/bcm-tab-item.entry.js +3 -3
- package/dist/esm/bcm-tag.entry.js +2 -2
- package/dist/esm/bcm-textarea.entry.js +2 -2
- package/dist/esm/bcm-time-picker.entry.js +1 -1
- package/dist/esm/bcm-toast.entry.js +1 -1
- package/dist/esm/{generate-c1a5001c.js → generate-a25d9ab0.js} +1 -1
- package/dist/esm/{input-template-61daf88f.js → input-template-40fed069.js} +1 -1
- package/dist/esm/{json-parse-decarator-f6c2451e.js → json-parse-decarator-2b2b5be3.js} +1 -1
- package/dist/esm/{number-helper-72dfe745.js → number-helper-257255a9.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +2 -2
- package/dist/esm/old-bcm-popover.entry.js +1 -1
- package/dist/esm/{stepper-states-7876bdf9.js → stepper-states-148e0857.js} +1 -1
- package/dist/esm/{tooltip-helper-45e5fc94.js → tooltip-helper-ece3c488.js} +3 -3
- package/dist/esm/{validators-5197f61b.js → validators-5250554c.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-09d8a268.js +0 -5
- package/dist/bromcom-ui/p-60aab0f0.entry.js +0 -5
- package/dist/bromcom-ui/p-9aa25453.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as i,c as e,h as t,H as c,g as s}from"./p-da1055cb.js";import{c as n}from"./p-d65a1e21.js";import{I as a}from"./p-c23b6240.js";import{G as o}from"./p-ed026255.js";import{B as l}from"./p-a429e85b.js";import{C as r}from"./p-c8e13fd7.js";import{d as h}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const m=class{constructor(t){i(this,t),this.change=e(this,"bcm-change",7),this.focus=e(this,"bcm-focus",7),this.blur=e(this,"bcm-blur",7),this._id=o.UID(),this._internal_id=o.UID(),this.checked=!1,this.hidden=!1,this.value=!1,this.name=void 0,this.disabled=!1,this.required=!1,this.size=l.Size.medium,this.readonly=!1,this.activeIcon=void 0,this.activeText=void 0,this.inactiveIcon=void 0,this.inactiveText=void 0,this.pending=!1,this.label=void 0,this.labelPosition="top",this.tooltip=void 0,this.caption=void 0,this.noCaption=!1,this.captionError=void 0,this.captionType=l.Status.default,this.captionCache=void 0,this.captionTypeCache=void 0}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType,this.value=this.checked}handleChange(){this.checked=this.inputElement.checked,this.value=this.checked,this.change.emit(this.checked)}componentWillRender(){this.pending&&(this.disabled=!0)}async onBcmFocus(){this.el.focus()}async onBcmBlur(){this.el.blur()}async set(i){"boolean"==typeof i&&await this.check(i)}async check(i=!0){this.inputElement.checked=i,this.handleChange()}async get(){return this.checked||!1}async setClear(){return 1==this.inputElement.checked&&(this.inputElement.checked=!1,this.checked=this.inputElement.checked,this.value=this.checked,this.change.emit(this.checked)),await h(10),Promise.resolve()}async resetCaption(){return await h(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await h(10),Promise.resolve()}handleKeyUp(i){if(i.keyCode==l.KeyCode.space||i.keyCode==l.KeyCode.enter)return this.disabled||this.readonly||(this.inputElement.checked=!this.inputElement.checked,this.handleChange()),i.stopPropagation(),i.preventDefault(),!1}render(){const{hidden:i,_internal_id:e,checked:s,size:a,activeIcon:o,inactiveIcon:h,activeText:m,inactiveText:p,pending:b,disabled:g,readonly:d,label:x,required:_,noCaption:w,captionType:f,captionError:u,caption:z}=this,v=n("bcm-switch__toggle","bcm-switch__size-"+a,{"switch-checked":s,disabled:g,readonly:d}),y=n("bcm-switch","bcm-switch__size-"+a,{hidden:i,checked:s,disabled:g,readonly:d}),k=n("bcm-switch__label","input-size-"+l.Size[a]),j=n("bcm-switch__container",`bcm-switch__container--${this.labelPosition}`),I=i=>a!=l.Size.small&&(m||p)&&t("span",{class:i+"-text"},"active"==i?m:p),C=i=>a!=l.Size.small&&(o||h)&&t("bcm-icon",{icon:"active"==i?o:h,class:" icon-"+i});return t(c,{tabindex:"0",onFocus:()=>this.focus.emit(this.el),onBlur:()=>this.blur.emit(this.el),class:y},t("span",{hidden:!0},t("slot",null)),t("div",{class:j},x&&t("bcm-label",{htmlFor:e,tooltip:this.tooltip,type:f,value:x,required:_}),t("input",{id:e,onChange:()=>this.handleChange(),ref:i=>this.inputElement=i,checked:s,type:"checkbox",class:"switch",disabled:g||d}),t("label",{htmlFor:e,class:k},I("inactive"),t("div",{class:v},C("active"),t("span",{class:"handle"},b&&t("span",{class:"switch-spinner"})),C("inactive")),I("active"))),t(r,{noCaption:w,captionType:f,captionError:u,caption:z}))}get el(){return s(this)}};(function(i,e,t,c){var s,n=arguments.length,a=n<3?e:null===c?c=Object.getOwnPropertyDescriptor(e,t):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(i,e,t,c);else for(var o=i.length-1;o>=0;o--)(s=i[o])&&(a=(n<3?s(a):n>3?s(e,t,a):s(e,t))||a);n>3&&a&&Object.defineProperty(e,t,a)})([a()],m.prototype,"el",void 0),m.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"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @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}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-switch{display:inline-flex;user-select:none;flex-direction:column;margin-bottom:8px}.bcm-switch__container{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.bcm-switch__container--left,.bcm-switch__container--right{align-items:center}.bcm-switch__container--left .bcm-label__text,.bcm-switch__container--right .bcm-label__text{margin:0}.bcm-switch__container--left{flex-direction:row}.bcm-switch__container--left .bcm-label__text{margin-right:4px}.bcm-switch__container--right{flex-direction:row-reverse}.bcm-switch__container--right .bcm-label__text{margin-left:4px}.bcm-switch:focus-visible{outline:none}.bcm-switch:focus-visible .bcm-switch__toggle{background-color:var(--bcm-new-ds-color-slate-400)}.bcm-switch:focus-visible .bcm-switch__toggle.switch-checked{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-switch:hover{outline:none}.bcm-switch:hover .bcm-switch__toggle .handle{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-switch:hover .bcm-switch__toggle.switch-checked .handle{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-switch *{box-sizing:border-box}.bcm-switch.hidden{display:none}.bcm-switch input{display:none}.bcm-switch.disabled .bcm-switch__toggle{cursor:not-allowed;opacity:40%}.bcm-switch.readonly .bcm-switch__toggle{cursor:default;opacity:80%}.bcm-switch__label{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-flex;align-items:center;margin:0}.bcm-switch__label .active-text{color:var(--bcm-new-ds-color-blue-500);margin:0 0 0 4px}.bcm-switch__label .inactive-text{color:var(--bcm-new-ds-color-slate-500);margin:0 4px 0 0}.bcm-switch__toggle{display:flex;justify-content:space-between;align-items:center;border-radius:16px;background-color:var(--bcm-new-ds-color-slate-300);position:relative;cursor:pointer}.bcm-switch__toggle .handle{padding:1px;position:absolute;background-color:var(--bcm-new-ds-color-slate-50);display:inline-flex;align-items:center;justify-content:center;border-radius:16px;transition:left 0.2s ease-in-out, width 0.2s ease-in-out;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-switch__toggle .icon-active{opacity:0;margin-left:2px}.bcm-switch__toggle .icon-inactive{opacity:1;margin-right:2px}.bcm-switch__toggle.bcm-switch__size-small{width:32px;min-width:32px;height:16px;padding:4px}.bcm-switch__toggle.bcm-switch__size-small .handle{width:12px;height:12px;left:2px}.bcm-switch__toggle.bcm-switch__size-small.switch-checked .handle{left:18px}.bcm-switch__toggle.bcm-switch__size-small:active:not(.disabled):not(.readonly) .handle{width:16px}.bcm-switch__toggle.bcm-switch__size-small:active.switch-checked:not(.disabled):not(.readonly) .handle{left:12px}.bcm-switch__toggle.bcm-switch__size-small .switch-spinner{box-sizing:border-box;display:inline-flex;width:9px;height:9px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.bcm-switch__size-medium{width:36px;min-width:36px;height:18px;padding:4px}.bcm-switch__toggle.bcm-switch__size-medium .handle{width:14px;height:14px;left:2px}.bcm-switch__toggle.bcm-switch__size-medium.switch-checked .handle{left:20px}.bcm-switch__toggle.bcm-switch__size-medium:active:not(.disabled):not(.readonly) .handle{width:18px}.bcm-switch__toggle.bcm-switch__size-medium:active.switch-checked:not(.disabled):not(.readonly) .handle{left:14px}.bcm-switch__toggle.bcm-switch__size-medium .switch-spinner{box-sizing:border-box;display:inline-flex;width:11px;height:11px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.bcm-switch__size-large{width:40px;min-width:40px;height:20px;padding:4px}.bcm-switch__toggle.bcm-switch__size-large .handle{width:16px;height:16px;left:2px}.bcm-switch__toggle.bcm-switch__size-large.switch-checked .handle{left:22px}.bcm-switch__toggle.bcm-switch__size-large:active:not(.disabled):not(.readonly) .handle{width:20px}.bcm-switch__toggle.bcm-switch__size-large:active.switch-checked:not(.disabled):not(.readonly) .handle{left:16px}.bcm-switch__toggle.bcm-switch__size-large .switch-spinner{box-sizing:border-box;display:inline-flex;width:13px;height:13px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.switch-checked{background-color:var(--bcm-new-ds-color-blue-500)}.bcm-switch__toggle.switch-checked .icon-active{color:var(--bcm-new-ds-color-slate-100);opacity:1}.bcm-switch__toggle.switch-checked .icon-inactive{opacity:0}.bcm-switch__toggle.switch-checked .switch-spinner{border-top-color:var(--bcm-new-ds-color-blue-600)}.bcm-switch__size-small .bcm-switch__label,.bcm-switch__size-small .bcm-label__text{font-size:12px}.bcm-switch__size-small .bcm-switch__toggle{font-size:8px}.bcm-switch__size-medium .bcm-switch__label,.bcm-switch__size-medium .bcm-label__text{font-size:13px}.bcm-switch__size-medium .bcm-switch__toggle{font-size:9px}.bcm-switch__size-large .bcm-switch__label,.bcm-switch__size-large .bcm-label__text{font-size:16px}.bcm-switch__size-large .bcm-switch__toggle{font-size:12px}@keyframes switch-spinner{to{transform:rotate(360deg)}}';export{m as bcm_switch}
|
|
5
|
+
import{r as i,c as e,h as t,H as c,g as s}from"./p-da1055cb.js";import{c as a}from"./p-d65a1e21.js";import{I as n}from"./p-c23b6240.js";import{G as o}from"./p-39e9bcaf.js";import{B as l}from"./p-a429e85b.js";import{C as r}from"./p-c8e13fd7.js";import{d as h}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const m=class{constructor(t){i(this,t),this.change=e(this,"bcm-change",7),this.focus=e(this,"bcm-focus",7),this.blur=e(this,"bcm-blur",7),this._id=o.UID(),this._internal_id=o.UID(),this.checked=!1,this.hidden=!1,this.value=!1,this.name=void 0,this.disabled=!1,this.required=!1,this.size=l.Size.medium,this.readonly=!1,this.activeIcon=void 0,this.activeText=void 0,this.inactiveIcon=void 0,this.inactiveText=void 0,this.pending=!1,this.label=void 0,this.labelPosition="top",this.tooltip=void 0,this.caption=void 0,this.noCaption=!1,this.captionError=void 0,this.captionType=l.Status.default,this.captionCache=void 0,this.captionTypeCache=void 0}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType,this.value=this.checked}handleChange(){this.checked=this.inputElement.checked,this.value=this.checked,this.change.emit(this.checked)}componentWillRender(){this.pending&&(this.disabled=!0)}async onBcmFocus(){this.el.focus()}async onBcmBlur(){this.el.blur()}async set(i){"boolean"==typeof i&&await this.check(i)}async check(i=!0){this.inputElement.checked=i,this.handleChange()}async get(){return this.checked||!1}async setClear(){return 1==this.inputElement.checked&&(this.inputElement.checked=!1,this.checked=this.inputElement.checked,this.value=this.checked,this.change.emit(this.checked)),await h(10),Promise.resolve()}async resetCaption(){return await h(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await h(10),Promise.resolve()}handleKeyUp(i){if(i.keyCode==l.KeyCode.space||i.keyCode==l.KeyCode.enter)return this.disabled||this.readonly||(this.inputElement.checked=!this.inputElement.checked,this.handleChange()),i.stopPropagation(),i.preventDefault(),!1}render(){const{hidden:i,_internal_id:e,checked:s,size:n,activeIcon:o,inactiveIcon:h,activeText:m,inactiveText:p,pending:b,disabled:g,readonly:d,label:x,required:_,noCaption:w,captionType:f,captionError:u,caption:z}=this,v=a("bcm-switch__toggle","bcm-switch__size-"+n,{"switch-checked":s,disabled:g,readonly:d}),y=a("bcm-switch","bcm-switch__size-"+n,{hidden:i,checked:s,disabled:g,readonly:d}),k=a("bcm-switch__label","input-size-"+l.Size[n]),j=a("bcm-switch__container",`bcm-switch__container--${this.labelPosition}`),I=i=>n!=l.Size.small&&(m||p)&&t("span",{class:i+"-text"},"active"==i?m:p),C=i=>n!=l.Size.small&&(o||h)&&t("bcm-icon",{icon:"active"==i?o:h,class:" icon-"+i});return t(c,{tabindex:"0",onFocus:()=>this.focus.emit(this.el),onBlur:()=>this.blur.emit(this.el),class:y},t("span",{hidden:!0},t("slot",null)),t("div",{class:j},x&&t("bcm-label",{htmlFor:e,tooltip:this.tooltip,type:f,value:x,required:_}),t("input",{id:e,onChange:()=>this.handleChange(),ref:i=>this.inputElement=i,checked:s,type:"checkbox",class:"switch",disabled:g||d}),t("label",{htmlFor:e,class:k},I("inactive"),t("div",{class:v},C("active"),t("span",{class:"handle"},b&&t("span",{class:"switch-spinner"})),C("inactive")),I("active"))),t(r,{noCaption:w,captionType:f,captionError:u,caption:z}))}get el(){return s(this)}};(function(i,e,t,c){var s,a=arguments.length,n=a<3?e:null===c?c=Object.getOwnPropertyDescriptor(e,t):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(i,e,t,c);else for(var o=i.length-1;o>=0;o--)(s=i[o])&&(n=(a<3?s(n):a>3?s(e,t,n):s(e,t))||n);a>3&&n&&Object.defineProperty(e,t,n)})([n()],m.prototype,"el",void 0),m.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"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @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}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-switch{display:inline-flex;user-select:none;flex-direction:column;margin-bottom:8px}.bcm-switch__container{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.bcm-switch__container--left,.bcm-switch__container--right{align-items:center}.bcm-switch__container--left .bcm-label__text,.bcm-switch__container--right .bcm-label__text{margin:0}.bcm-switch__container--left{flex-direction:row}.bcm-switch__container--left .bcm-label__text{margin-right:4px}.bcm-switch__container--right{flex-direction:row-reverse}.bcm-switch__container--right .bcm-label__text{margin-left:4px}.bcm-switch:focus-visible{outline:none}.bcm-switch:focus-visible .bcm-switch__toggle{background-color:var(--bcm-new-ds-color-slate-400)}.bcm-switch:focus-visible .bcm-switch__toggle.switch-checked{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-switch:hover{outline:none}.bcm-switch:hover .bcm-switch__toggle .handle{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-switch:hover .bcm-switch__toggle.switch-checked .handle{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-switch *{box-sizing:border-box}.bcm-switch.hidden{display:none}.bcm-switch input{display:none}.bcm-switch.disabled .bcm-switch__toggle{cursor:not-allowed;opacity:40%}.bcm-switch.readonly .bcm-switch__toggle{cursor:default;opacity:80%}.bcm-switch__label{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-flex;align-items:center;margin:0}.bcm-switch__label .active-text{color:var(--bcm-new-ds-color-blue-500);margin:0 0 0 4px}.bcm-switch__label .inactive-text{color:var(--bcm-new-ds-color-slate-500);margin:0 4px 0 0}.bcm-switch__toggle{display:flex;justify-content:space-between;align-items:center;border-radius:16px;background-color:var(--bcm-new-ds-color-slate-300);position:relative;cursor:pointer}.bcm-switch__toggle .handle{padding:1px;position:absolute;background-color:var(--bcm-new-ds-color-slate-50);display:inline-flex;align-items:center;justify-content:center;border-radius:16px;transition:left 0.2s ease-in-out, width 0.2s ease-in-out;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-switch__toggle .icon-active{opacity:0;margin-left:2px}.bcm-switch__toggle .icon-inactive{opacity:1;margin-right:2px}.bcm-switch__toggle.bcm-switch__size-small{width:32px;min-width:32px;height:16px;padding:4px}.bcm-switch__toggle.bcm-switch__size-small .handle{width:12px;height:12px;left:2px}.bcm-switch__toggle.bcm-switch__size-small.switch-checked .handle{left:18px}.bcm-switch__toggle.bcm-switch__size-small:active:not(.disabled):not(.readonly) .handle{width:16px}.bcm-switch__toggle.bcm-switch__size-small:active.switch-checked:not(.disabled):not(.readonly) .handle{left:12px}.bcm-switch__toggle.bcm-switch__size-small .switch-spinner{box-sizing:border-box;display:inline-flex;width:9px;height:9px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.bcm-switch__size-medium{width:36px;min-width:36px;height:18px;padding:4px}.bcm-switch__toggle.bcm-switch__size-medium .handle{width:14px;height:14px;left:2px}.bcm-switch__toggle.bcm-switch__size-medium.switch-checked .handle{left:20px}.bcm-switch__toggle.bcm-switch__size-medium:active:not(.disabled):not(.readonly) .handle{width:18px}.bcm-switch__toggle.bcm-switch__size-medium:active.switch-checked:not(.disabled):not(.readonly) .handle{left:14px}.bcm-switch__toggle.bcm-switch__size-medium .switch-spinner{box-sizing:border-box;display:inline-flex;width:11px;height:11px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.bcm-switch__size-large{width:40px;min-width:40px;height:20px;padding:4px}.bcm-switch__toggle.bcm-switch__size-large .handle{width:16px;height:16px;left:2px}.bcm-switch__toggle.bcm-switch__size-large.switch-checked .handle{left:22px}.bcm-switch__toggle.bcm-switch__size-large:active:not(.disabled):not(.readonly) .handle{width:20px}.bcm-switch__toggle.bcm-switch__size-large:active.switch-checked:not(.disabled):not(.readonly) .handle{left:16px}.bcm-switch__toggle.bcm-switch__size-large .switch-spinner{box-sizing:border-box;display:inline-flex;width:13px;height:13px;border-radius:50%;border:1px solid var(--bcm-new-ds-color-white);border-top-color:var(--bcm-new-ds-color-slate-900);animation:switch-spinner 1.5s linear infinite}.bcm-switch__toggle.switch-checked{background-color:var(--bcm-new-ds-color-blue-500)}.bcm-switch__toggle.switch-checked .icon-active{color:var(--bcm-new-ds-color-slate-100);opacity:1}.bcm-switch__toggle.switch-checked .icon-inactive{opacity:0}.bcm-switch__toggle.switch-checked .switch-spinner{border-top-color:var(--bcm-new-ds-color-blue-600)}.bcm-switch__size-small .bcm-switch__label,.bcm-switch__size-small .bcm-label__text{font-size:12px}.bcm-switch__size-small .bcm-switch__toggle{font-size:8px}.bcm-switch__size-medium .bcm-switch__label,.bcm-switch__size-medium .bcm-label__text{font-size:13px}.bcm-switch__size-medium .bcm-switch__toggle{font-size:9px}.bcm-switch__size-large .bcm-switch__label,.bcm-switch__size-large .bcm-label__text{font-size:16px}.bcm-switch__size-large .bcm-switch__toggle{font-size:12px}@keyframes switch-spinner{to{transform:rotate(360deg)}}';export{m as bcm_switch}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as e,c as t,h as c,g as i}from"./p-da1055cb.js";import{G as s,s as l}from"./p-39e9bcaf.js";import{I as o}from"./p-c23b6240.js";import{S as r}from"./p-8d0ca8c2.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-a429e85b.js";const n=class{constructor(c){e(this,c),this.bcmItems=t(this,"bcm-items",7),this._id=s.UID()}connectedCallback(){if(this.el.children&&this.el.children.length>0){let e=this.nestedItems(this.el);this.bcmItems.emit(e),this.el.remove()}}mapItems(e){var t;const c=null===(t=null==e?void 0:e.innerHTML)||void 0===t?void 0:t.replace(/<bcm-item>.*<\/bcm-item>/g,"").replace(/<bcm-item .*>.*<\/bcm-item>/g,"").replace(/<!--(.|\s)*?-->/g,"").trim(),i=t=>r.elementBooleanCheck(e.getAttribute(t));return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({id:e.getAttribute("id")||s.UID(),text:e.getAttribute("text")||c},e.innerHTML.trim()&&{isHtmlContent:e.textContent.length>0?e.innerHTML.trim():null}),i("disabled")&&{disabled:i("disabled")}),i("selected")&&{selected:i("selected")}),i("checked")&&{checked:i("checked")}),i("readonly")&&{readonly:i("readonly")}),i("active")&&{active:i("active")}),i("icon")&&{icon:e.getAttribute("icon")}),i("link")&&{link:e.getAttribute("link")})}nestedItems(e){return l((()=>Array.from(null==e?void 0:e.children).map((e=>{var t;return Object.assign(Object.assign({},"bcm-item"===(null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase())&&this.mapItems(e)),{items:this.nestedItems(e)})}))),[])}render(){return c("slot",null)}get el(){return i(this)}};!function(e,t,c,i){var s,l=arguments.length,o=l<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,c):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,c,i);else for(var r=e.length-1;r>=0;r--)(s=e[r])&&(o=(l<3?s(o):l>3?s(t,c,o):s(t,c))||o);l>3&&o&&Object.defineProperty(t,c,o)}([o()],n.prototype,"el",void 0);export{n as bcm_items}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as i,H as e,g as s}from"./p-da1055cb.js";import{I as o}from"./p-c23b6240.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-
|
|
5
|
+
import{r as t,h as i,H as e,g as s}from"./p-da1055cb.js";import{I as o}from"./p-c23b6240.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-39e9bcaf.js";import"./p-f166f6c6.js";import"./p-8d0ca8c2.js";import"./p-d42921e7.js";import"./p-7e44e6b5.js";import"./p-a429e85b.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const a=class{constructor(i){t(this,i),this._id=r.UID(),this.active=!1,this.disabled=!1,this.index=void 0}componentWillLoad(){this.indexControl()}componentDidRender(){this.headerMove()}getHeaderItem(){const t=this.el.querySelector("bcm-tab-item-header");return t&&(t.setAttribute("index",`${this.index}`),t.setAttribute("active",`${this.active}`),t.setAttribute("disabled",`${this.disabled}`),t.setAttribute("tab-id",`${this._id}`),t.style.order=`${this.index}`),t}getParentTabGroup(){return r.findParentElement(this.el,"bcm-tab-group")}getFindHeaderItem(){var t,i;return null===(i=null===(t=this.getParentTabGroup())||void 0===t?void 0:t.querySelector("#tab-header"))||void 0===i?void 0:i.querySelector(`bcm-tab-item-header[tab-id="${this._id}"]`)}headerMove(){var t,i,e,s;this.getHeaderItem()&&(null===(t=this.getFindHeaderItem())||void 0===t||t.remove(),null===(e=null===(i=this.getParentTabGroup())||void 0===i?void 0:i.querySelector("#tab-header"))||void 0===e||e.appendChild(this.getHeaderItem()),null===(s=this.el.parentElement)||void 0===s||s.refresh())}indexControl(){var t;this.index||null===(t=r.findParentElement(this.el,"bcm-tab-group"))||void 0===t||t.querySelectorAll("bcm-tab-item").forEach(((t,i)=>{t===this.el&&t.setAttribute("index",`${i+1}`)}))}componentDidLoad(){new MutationObserver((()=>{this.headerMove()})).observe(this.el,{childList:!0,subtree:!0})}render(){return i(e,{id:this._id,role:"tabpanel","aria-labelledby":`tab-${this._id}`,"aria-hidden":`${!this.active}`,class:{"tw-block":this.active,"tw-hidden":!this.active,"tw-opacity-50":this.disabled,"tw-w-full":!0}},i("slot",null))}get el(){return s(this)}};!function(t,i,e,s){var o,r=arguments.length,a=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(t,i,e,s);else for(var d=t.length-1;d>=0;d--)(o=t[d])&&(a=(r<3?o(a):r>3?o(i,e,a):o(i,e))||a);r>3&&a&&Object.defineProperty(i,e,a)}([o()],a.prototype,"el",void 0);export{a as bcm_tab_item}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as s,h as i,H as e,g as a}from"./p-da1055cb.js";import{I as o}from"./p-c23b6240.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as h}from"./p-
|
|
5
|
+
import{r as t,c as s,h as i,H as e,g as a}from"./p-da1055cb.js";import{I as o}from"./p-c23b6240.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as h}from"./p-39e9bcaf.js";import"./p-f166f6c6.js";import"./p-8d0ca8c2.js";import"./p-d42921e7.js";import"./p-7e44e6b5.js";import{d as l}from"./p-8c018ae0.js";import{a as r}from"./p-a429e85b.js";import{c}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const m=class{constructor(i){t(this,i),this.modalClose=s(this,"bcm-modal-close",7),this.modalOpen=s(this,"bcm-modal-open",7),this.modalBeforeClose=s(this,"bcm-modal-before-close",7),this.modalBeforeOpen=s(this,"bcm-modal-before-open",7),this._id=h.UID(),this.isShow=!1,this.center=!1,this.zIndex="10400",this.size=r.Size.medium,this.backdrop=!0,this.fullWidth=!1,this.fullScreen=!1,this.overflow=!0,this.isShowModal=!1,this.shake=!1}handleClick(t){const s=h.findEventPathHasAttribute(t,"data-dismiss"),i=t.target.attributes.getNamedItem("is-click-overlay");i&&"static"===this.backdrop?this.shakeModal():(s||i)&&(this.hide(),t.preventDefault(),t.stopPropagation())}handleKeyDown(t){Array.from(document.querySelectorAll("bcm-modal-2[is-show]")).pop()===this.el&&"Escape"===t.key&&("static"===this.backdrop?this.shakeModal():this.hide(),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}shakeModal(){this.shake=!0,setTimeout((()=>this.shake=!1),300)}async hide(){this.modalBeforeClose.emit()}async hideModal(t){t.defaultPrevented||t.target===this.el&&(this.isShowModal=!1,await l(150),this.isShow=!1,this.modalClose.emit())}async show(){this.modalBeforeOpen.emit()}async showModal(t){t.defaultPrevented||t.target===this.el&&(this.isShow=!0,await l(50),this.isShowModal=!0,document.body.appendChild(this.el),this.modalOpen.emit())}getWidth(t){return{small:"576px",medium:"768px",large:"992px",xlarge:"1024px",xxlarge:"1200px",xxxlarge:"1700px"}[t]||t}setSize(){const{fullScreen:t,fullWidth:s,size:i,overflow:e}=this;let a="auto",o="auto",h=s?"100%":this.getWidth(i);return t&&(o=e?"100vh":"auto",h="100vw",a="100vh"),{width:h,minHeight:a,height:o}}render(){return i(e,{class:{"tw-hidden":!this.isShow}},i("bcm-overlay",{"z-index":+this.zIndex-1,opacity:this.isShowModal?"0.5":"0"}),i("div",{class:c("tw-fixed tw-inset-0","tw-flex tw-h-full tw-w-full tw-items-start tw-justify-center","tw-overflow-y-scroll tw-overscroll-contain tw-font-sans",this.center?"tw-items-center":""),style:{zIndex:this.zIndex},"is-click-overlay":!0},i("div",{class:c("tw-flex tw-w-full tw-flex-col","tw-relative tw-z-modal tw-bg-white","tw--translate-y-[20px] tw-transform tw-opacity-0 tw-transition tw-duration-300 tw-ease-in-out",this.fullScreen?"":`tw-m-4 tw-rounded-lg ${this.overflow?"tw-max-h-[90vh]":""} `,this.shake?"tw-animate-shake":""),style:Object.assign(Object.assign({},this.setSize()),this.isShowModal?{transform:"translateY(0)",opacity:"1"}:{})},i("slot",{name:"header"}),i("bcm-scroll-area",{"is-disabled":!this.overflow},i("slot",null)),i("slot",{name:"footer"}))))}get el(){return a(this)}};!function(t,s,i,e){var a,o=arguments.length,h=o<3?s:null===e?e=Object.getOwnPropertyDescriptor(s,i):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,s,i,e);else for(var l=t.length-1;l>=0;l--)(a=t[l])&&(h=(o<3?a(h):o>3?a(s,i,h):a(s,i))||h);o>3&&h&&Object.defineProperty(s,i,h)}([o()],m.prototype,"el",void 0);export{m as bcm_modal_2}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,h as t,H as i,g as a}from"./p-da1055cb.js";import{I as s}from"./p-c23b6240.js";import{C as o}from"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-
|
|
5
|
+
import{r as e,h as t,H as i,g as a}from"./p-da1055cb.js";import{I as s}from"./p-c23b6240.js";import{C as o}from"./p-843905c8.js";import"./p-626a65e9.js";import{G as r}from"./p-39e9bcaf.js";import{N as p}from"./p-f166f6c6.js";import"./p-8d0ca8c2.js";import"./p-d42921e7.js";import"./p-7e44e6b5.js";import{a as n}from"./p-a429e85b.js";import{c}from"./p-d65a1e21.js";import{S as l}from"./p-79fd816c.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const h=class{constructor(t){e(this,t),this._id=r.UID(),this.hidden=!1,this.image=void 0,this.name=void 0,this.alt=void 0,this.shape=n.Shape.ellipse,this.size=n.Size.medium,this.color=void 0,this.status=void 0,this.isFallback=!1}componentWillLoad(){this.name=this.name&&this.name.trim()||""}handleError(){this.isFallback=!0}getCustomSizes(e){return Math.round(parseInt(e)/3)}getFirstLetters(e){const t=e.split(" ");return 1===t.length?t[0].substring(0,2):t[0].charAt(0)+t[t.length-1].charAt(0)}setStyleVariables(){const{size:e}=this;let{color:t}=this;!t&&(t="slate");let i=p.toNumber(e),a=Math.round(parseInt(i)/3);const s="--bcm-avatar";return{[`${s}-color`]:o.dsColor(`${t}-600`),[`${s}-background-color`]:o.dsColor(`${t}-100`),[`${s}-height`]:`${i}px`,[`${s}-font-size`]:`${a}px`}}render(){const{image:e,name:a,alt:s,hidden:o,shape:r,size:p,status:l}=this,h=!Object.keys(n.BaseSize).includes(p),x=c("bcm-avatar",`bcm-avatar__shape-${r}`,`bcm-avatar__size-${h?"custom":p}`,{hidden:o,"bcm-avatar__status":!!l}),m=()=>t("bcm-icon",{icon:"fas fa-user"});return t(i,{class:x,style:this.setStyleVariables()},t("span",{hidden:!0},t("slot",null)),this.isFallback?this.name?this.getFirstLetters(this.name):m():e?t("img",{onError:()=>this.handleError(),src:e,alt:s}):a?this.getFirstLetters(a):m(),l&&t("bcm-badge",{status:l}))}get el(){return a(this)}};(function(e,t,i,a){var s,o=arguments.length,r=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,a);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)})([s()],h.prototype,"el",void 0),h.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}*{box-sizing:border-box}.bcm-avatar{--bcm-avatar-color:var(--bcm-new-ds-color-slate-600);--bcm-avatar-background-color:var(--bcm-new-ds-color-slate-100);--prefix-height:40px;--prefix-font-size:font-size(2);font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;background-color:var(--bcm-avatar-background-color);color:var(--bcm-avatar-color);text-transform:uppercase}.bcm-avatar.hidden{display:none}.bcm-avatar img{width:100%;height:100%}.bcm-avatar__shape-ellipse,.bcm-avatar__shape-ellipse>img{border-radius:100px}.bcm-avatar__shape-square,.bcm-avatar__shape-square>img{border-radius:4px}.bcm-avatar__shape-ellipse .bcm-badge{top:0px;right:0px}.bcm-avatar__shape-square .bcm-badge{top:-2px;right:-2px}.bcm-avatar__size-small{font-size:10px;line-height:calc(10px + 8px);height:24px;width:24px}.bcm-avatar__size-medium{font-size:12px;line-height:calc(12px + 8px);height:32px;width:32px}.bcm-avatar__size-large{font-size:14px;line-height:calc(14px + 8px);height:40px;width:40px}.bcm-avatar__size-custom{font-size:var(--bcm-avatar-font-size);line-height:calc(var(--bcm-avatar-font-size) + 8px);height:var(--bcm-avatar-height);width:var(--bcm-avatar-height)}.bcm-avatar__status{position:relative}.bcm-avatar__status .bcm-badge{position:absolute}';const x=class{constructor(t){e(this,t),this._id=r.UID(),this.hidden=!1,this.blink=!1,this.value=void 0,this.color=void 0,this.size=n.Size.medium,this.status=void 0,this._slot=void 0}setStyleVariables(){const{status:e,value:t}=this;let{color:i}=this;e&&(i={info:"blue",error:"red",warning:"amber",success:"emerald",default:"slate"}[e]),!i&&(i="slate");const a="--bcm-badge",s=t&&t.length>1?"8":"4";return{[`${a}-color`]:o.reverseColor(o.dsColor(`${i}`)),[`${a}-background-color`]:o.dsColor(`${i}`),[`${a}-spacing`]:`${s}px`}}render(){let{blink:e,value:a,size:s,_slot:o,hidden:r}=this;const p=c("bcm-badge__dot","bcm-badge__dot-size-"+s,{"bcm-badge__dot-blink":e}),n=c("bcm-badge",{hidden:r});return t(i,{class:n,style:this.setStyleVariables()},t("span",{hidden:!0},t("slot",null)),t("div",{class:p},!!a&&t("span",{class:"bcm-badge__dot-text"},a)),t(l,{value:o}))}get el(){return a(this)}};(function(e,t,i,a){var s,o=arguments.length,r=o<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,i):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,a);else for(var p=e.length-1;p>=0;p--)(s=e[p])&&(r=(o<3?s(r):o>3?s(t,i,r):s(t,i))||r);o>3&&r&&Object.defineProperty(t,i,r)})([s()],x.prototype,"el",void 0),x.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}*{box-sizing:border-box}.bcm-badge{--bcm-badge-color:var(--bcm-new-ds-color-white);--bcm-badge-background-color:var(--bcm-new-ds-color-slate-400);--bcm-badge-spacing:4px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;box-sizing:border-box;display:inline-flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-badge.hidden{display:none}.bcm-badge span:empty{display:none}.bcm-badge__dot{color:var(--bcm-badge-color);background-color:var(--bcm-badge-background-color);display:inline-block;border-radius:100px;position:relative}.bcm-badge__dot-text{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;padding:0 var(--bcm-badge-spacing);z-index:2;color:var(--bcm-badge-color)}.bcm-badge__dot-size-small{font-size:10px;line-height:calc(10px + 8px);min-width:6px;min-height:6px}.bcm-badge__dot-size-small .bcm-badge__dot-text{min-width:calc(10px + 8px)}.bcm-badge__dot-size-medium{font-size:12px;line-height:calc(12px + 8px);min-width:8px;min-height:8px}.bcm-badge__dot-size-medium .bcm-badge__dot-text{min-width:calc(12px + 8px)}.bcm-badge__dot-size-large{font-size:14px;line-height:calc(14px + 8px);min-width:10px;min-height:10px}.bcm-badge__dot-size-large .bcm-badge__dot-text{min-width:calc(14px + 8px)}.bcm-badge__dot-blink{position:relative;z-index:1}.bcm-badge__dot-blink:after{content:"";position:absolute;z-index:-1;top:0;left:0;background:var(--bcm-badge-background-color);border-radius:100px;opacity:0.7;box-shadow:0 0 0 0 rgba(0, 0, 0, 0);transform:scale(1);width:100%;height:100%}.bcm-badge__dot:after{background-color:var(--bcm-badge-background-color);animation:badge-pulse 2s infinite}@keyframes badge-pulse{0%{transform:scale(0.95);box-shadow:0 0 0 0 var(--bcm-badge-background-color)}70%{transform:scale(1);box-shadow:0 0 0 10px rgba(0, 0, 0, 0)}100%{transform:scale(0.95);box-shadow:0 0 0 0 rgba(0, 0, 0, 0)}}';export{h as bcm_avatar,x as bcm_badge}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,c as i,h as t,H as s,g as o}from"./p-da1055cb.js";import{c as h}from"./p-d65a1e21.js";import{B as p}from"./p-a429e85b.js";import{G as n}from"./p-
|
|
5
|
+
import{r as e,c as i,h as t,H as s,g as o}from"./p-da1055cb.js";import{c as h}from"./p-d65a1e21.js";import{B as p}from"./p-a429e85b.js";import{G as n}from"./p-39e9bcaf.js";import{I as a}from"./p-c23b6240.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const r=class{constructor(t){e(this,t),this.onShow=i(this,"bcm-show",7),this.onHide=i(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const e=document.createElement("old-bcm-popover-box");e.setAttribute("id","box-"+this._id),e.setAttribute("target-id",this._id),e.setAttribute("placement",this.placement),e.setAttribute("message",this.message),e.setAttribute("_title",this._title),e.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(e)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(e){switch(this.trigger){case"click":"click"===e&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===e&&this.show(),"onMouseOut"===e&&this.hide();break;case"focus":"onFocus"===e&&this.show(),"onBlur"===e&&this.hide()}}render(){const e=h("bcm-popover");return t(s,{class:e,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return o(this)}};(function(e,i,t,s){var o,h=arguments.length,p=h<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,t):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,i,t,s);else for(var n=e.length-1;n>=0;n--)(o=e[n])&&(p=(h<3?o(p):h>3?o(i,t,p):o(i,t))||p);h>3&&p&&Object.defineProperty(i,t,p)})([a()],r.prototype,"el",void 0),r.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}.bcm-popover{display:inline-flex}';export{r as old_bcm_popover}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as i,H as e,g as s}from"./p-da1055cb.js";import{c as a}from"./p-d65a1e21.js";import{I as n}from"./p-c23b6240.js";import{G as h}from"./p-
|
|
5
|
+
import{r as t,h as i,H as e,g as s}from"./p-da1055cb.js";import{c as a}from"./p-d65a1e21.js";import{I as n}from"./p-c23b6240.js";import{G as h}from"./p-39e9bcaf.js";import{B as p}from"./p-a429e85b.js";import{d as r}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const o=class{constructor(i){t(this,i),this._id=h.UID(),this.time=new Date,this.value=void 0,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.disabled=!1,this.noCaption=!1,this.caption="",this.captionError=void 0,this.captionType="default",this.alignment=void 0,this.placement=p.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1}componentWillLoad(){if("string"==typeof this.time){const t=!!/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(this.time)&&this.time.split(":");this.time=t?new Date((new Date).setHours(Number(t[0]),Number(t[1]))):new Date}}handlePickerLoad(){this.value=this.picker.value}handlePickerChange(t){this.value=t.detail}async set(t){return this.picker.set(t)}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setDisabled(t){this.disabled=t}async getInput(){return await this.picker.getInput()}async getValue(){return this.value}async isValid(){return await this.picker.isValid()}async setClear(){return await this.picker.setClear(),await r(10),Promise.resolve()}async resetCaption(){return await r(10),await this.picker.resetCaption(),this.captionType="default",this.captionError=null,await r(10),Promise.resolve()}async open(){return await this.picker.open()}render(){const t=a(this.hidden?"hidden":null,{"full-width":this.fullWidth});return i(e,{class:t},i("bcm-datetime-picker",{"linked-component":this.linkedComponent,id:this._id,fullWidth:this.fullWidth,required:this.required,label:this.label,name:this.name,placeholder:this.placeholder,type:"time",clearable:this.clearable,date:this.time,ref:t=>this.picker=t,disabled:this.disabled,"on-bcm-load":()=>this.handlePickerLoad(),"on-bcm-change":t=>this.handlePickerChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType,alignment:this.alignment,placement:this.placement}))}get el(){return s(this)}};(function(t,i,e,s){var a,n=arguments.length,h=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(h=(n<3?a(h):n>3?a(i,e,h):a(i,e))||h);n>3&&h&&Object.defineProperty(i,e,h)})([n()],o.prototype,"el",void 0),o.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:inline-block;width:100%;max-width:256px}:host(.full-width){max-width:100%}:host(.hidden){display:none}:host(.linked-component){display:none}';export{o as bcm_time_picker}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{c as r}from"./p-4aa0e6b1.js";var t,e;function n(r,t){try{var e=r();return void 0===e?t:e}catch(r){if(r instanceof TypeError)return t;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(t||(t={})),function(r){r.banner="banner",r.basic="basic"}(e||(e={}));const o=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return o.includes(r)})()&&console.log("%cbromcom ui%c version: 2.8.0-rc.
|
|
5
|
+
import{c as r}from"./p-4aa0e6b1.js";var t,e;function n(r,t){try{var e=r();return void 0===e?t:e}catch(r){if(r instanceof TypeError)return t;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(t||(t={})),function(r){r.banner="banner",r.basic="basic"}(e||(e={}));const o=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return o.includes(r)})()&&console.log("%cbromcom ui%c version: 2.8.0-rc.11-p ","color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;"),function(){const r=document.querySelector("body");let t=localStorage.getItem("bcm-theme");!r.classList.contains("bcm-theme-*")&&t&&r.classList.add(`bcm-theme-${t}`)}();class c{static observeElementRemoval(r,t){new MutationObserver(((e,n)=>{for(const o of e)if("childList"===o.type){const e=Array.from(o.removedNodes);for(const o of e)if(o===r)return t(),void n.disconnect()}})).observe(document.documentElement,{childList:!0,subtree:!0})}static getTwColor(t,e="--bcm-color-default"){if(!t||!r[t])return!1;const n=r[t],o={};for(const[r,t]of Object.entries(n))o[`${e}-${r}`]=t;return o}}c.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,c.getIconAttrWithStatusType=(r,e=!1)=>{if(e)return{icon:"far fa-spinner-third fa-spin"};switch(r){case t.info:return{icon:"far fa-info-circle"};case t.error:return{icon:"far fa-times-circle"};case t.warning:return{icon:"far fa-exclamation-circle"};case t.success:return{icon:"far fa-check-circle"}}},c.createComponent=(r,t,e="append-area")=>{let n=e?document.querySelector(e):document.body;e&&!n&&(n=document.createElement("div"),n.id="append-area",document.body.appendChild(n),n.style.visibility="hidden",n.style.opacity="0");let o=document.getElementById(t.id);return o||(o=document.createElement(r)),Object.keys(t).forEach((r=>{o[r]=t[r]})),n.appendChild(o),o},c.createElement=(r="div",t)=>{let e=document.getElementById(t.id);return e||(e=document.createElement(r)),Object.keys(t).forEach((r=>{"innerHTML"==r?e[r]=t[r]:e.setAttribute(r,t[r])})),document.body.appendChild(e),e},c.debounceInput=(r,t,e,n)=>{let o;return function(){let c=this,u=arguments;n&&n.apply(c,u);let i=function(){o=null,e||r.apply(c,u)},a=e&&!o;clearTimeout(o),o=setTimeout(i,t),a&&r.apply(c,u)}},c.flatArray=r=>r.reduce(((r,t)=>r.concat(Array.isArray(t)?c.flatArray(t):t)),[]),c.reverseNodeList=r=>{let t=[];for(let e=r.length-1;e>=0;e--)t.push(r[e]);return t},c.findEventPathWithKey=(r,t,e)=>{e=Array.isArray(e)?e:[e];let n=r.composedPath()||r.path;if(n)return void 0!==n.filter((r=>e.includes(r[t])))[0]},c.findEventPathHasAttribute=(r,t)=>{let e=r.composedPath()||r.path;if(e)return n((()=>!!e.find((r=>r.hasAttribute(t)))),!1)},c.findEventTarget=(r,t)=>{t=Array.isArray(t)?t:[t];let e=r.target||r.srcElement;if(e)return t.includes(e)},c.findEventPathWithNodeName=(r,t)=>{let e=r.composedPath()||r.path;if(e)return e.filter((r=>r.nodeName===t))[0]},c.findEventPath=(r,t)=>{t=Array.isArray(t)?t:[t];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>t.includes(r)))[0]},c.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,c.convertIdsToNestedData=(r,t)=>{let e=[],n=[];return t.forEach((t=>{r&&r.indexOf(t.id.toString())>-1?e.push(t):t.items&&(n=c.convertIdsToNestedData(r,t.items),n.length>0&&(t.items=n,e.push(t)))})),e},c.nodeListToArray=r=>Array.prototype.slice.call(r),c.setAttributes=(r,t)=>{Object.keys(t).forEach((e=>{r.setAttribute(e,t[e])}))},c.computedStyle=(r,t)=>window.getComputedStyle(r,null).getPropertyValue(t),c.getAncestor=(r,t)=>{for(;(r=r.parentElement)&&!r.matches(t););return r},c.findParentElement=(r,t)=>{const e=t.charAt(0);if("*"===t)return r.parentElement;if("."===e){const e=t.slice(1);return function(r,t){for(;null!==r;){if(r.classList.contains(t))return r;r=r.parentElement}return null}(r.parentElement,e)}if("#"===e){const e=t.slice(1);return function(r,t){for(;null!==r;){if(r.id===t)return r;r=r.parentElement}return null}(r.parentElement,e)}if("["===e){const e=t.indexOf("]"),n=t.slice(1,e),o=t.slice(e+2,-1);return function(r,t,e){for(;null!==r;){if(r.hasAttribute(t)&&(void 0===e||r.getAttribute(t)===e))return r;r=r.parentElement}return null}(r.parentElement,n,o)}{const e=t.toLowerCase();return function(r,t){for(;null!==r;){if(r.tagName.toLowerCase()===t.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,e)}};export{c as G,t as S,e as T,n as s}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{h as e,r as o,c as i,H as t,g as c}from"./p-da1055cb.js";import{s as r,G as n}from"./p-ed026255.js";import{B as a,a as l}from"./p-a429e85b.js";import{c as s}from"./p-d65a1e21.js";import{c as b}from"./p-a60a2dd0.js";import{S as h}from"./p-79fd816c.js";import{C as d}from"./p-843905c8.js";import{I as m}from"./p-c23b6240.js";import{C as p}from"./p-c8e13fd7.js";import{d as x,g as u}from"./p-8c018ae0.js";import{L as g}from"./p-24aefda6.js";import{S as f}from"./p-8d0ca8c2.js";import"./p-626a65e9.js";import"./p-09d8a268.js";import"./p-a51e8ad2.js";import{T as v}from"./p-5374828c.js";import"./p-7e44e6b5.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-b60bcecf.js";const k={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 _;!function(e){e.save="save",e.submit="submit",e.ok="ok",e.new="new",e.add="add",e.create="create",e.apply="apply",e.prev="prev",e.next="next",e.send="send",e.delete="delete",e.cancel="cancel",e.decline="decline",e.close="close",e.archive="archive",e.remove="remove",e.edit="edit",e.export="export",e.import="import",e.filter="filter",e.update="update",e.reset="Reset",e.download="download"}(_||(_={}));const{state:z}=b({value:new Map,setData:{},removeData:{}}),w=({value:o,type:i,componentClass:t,disabled:c,href:r,target:n,loading:l,isIconOnly:s,icon:b,iconPosition:d,id:m})=>e(r?a.HtmlElementType.a:a.HtmlElementType.button,Object.assign({id:m},i==a.HtmlElementType.button&&{type:i},{class:t,disabled:c,href:r,target:n,tabindex:"0"}),e("span",{hidden:!0},e("slot",null)),l&&e("span",{class:"bcm-button__container-loading"}," ",e("span",{class:"bcm-button__container-icon"},e("i",{class:"far fa-spinner-third fa-spin"})," ")),b&&e("span",{class:`${d} bcm-button__container-icon`},e("i",{class:`${b}`})),!s&&e(h,{className:"bcm-button__container-text",value:o}),e("slot",{name:"suffix"}));const y=class{constructor(e){o(this,e),this.bcmClick=i(this,"bcm-click",7),this._id=n.UID(),this.hidden=!1,this.type=a.ButtonType.button,this.size=a.Size.medium,this.disabled=!1,this.kind=a.Kind.solid,this.outline=!1,this.icon=void 0,this.href=void 0,this.target=void 0,this.value=void 0,this.loading=!1,this.variant=void 0,this.dataDismiss=!1,this.fullWidth=!1,this.iconPosition=a.IconPosition.prefix,this.color=void 0,this.checked=!1}handleOnClick(e){if(this.disabled)return e.preventDefault(),e.stopPropagation(),!1}componentWillRender(){const{size:e,kind:o,icon:i,iconPosition:t,disabled:c,outline:r,href:n,type:l,target:s,loading:b,variant:h,fullWidth:d,hidden:m,value:p}=this;(e=>{const o=Object.assign(Object.assign({},e),k[e.variant]&&{icon:k[e.variant].icon,value:k[e.variant].text,iconPosition:a.IconPosition[k[e.variant].iconPosition],variantColor:k[e.variant].color});z.value.set(o.id,o)})({id:this._id,size:e,type:l,kind:o,icon:i,iconPosition:t,disabled:c,outline:r,href:n,target:s,loading:b,variant:h,fullWidth:d,hidden:m,value:p,isIconOnly:!(!this.isHaveChildNodes()||!this.icon)})}getStateData(){return e=this._id,r((()=>z.value.get(e)),{});var e}isHaveChildNodes(){return void 0===Array.from(this.el.childNodes).find((e=>e.nodeType===Node.TEXT_NODE))}setColor(e=this.color){if(!e)return;const{kind:o}=this,i=`--bcm-button-${o}`;return"solid"===o?{[`${i}-color-default`]:d.dsColor("white"),[`${i}-color-hover`]:d.dsColor("white"),[`${i}-color-focus-visible`]:d.dsColor("white"),[`${i}-color-active`]:d.dsColor("white"),[`${i}-color-disabled`]:d.dsColor("white"),[`${i}-background-color-default`]:d.dsColor(e+"-500"),[`${i}-background-color-hover`]:d.dsColor(e+"-600"),[`${i}-background-color-focus-visible`]:d.dsColor(e+"-700"),[`${i}-background-color-active`]:d.dsColor(e+"-800"),[`${i}-background-color-disabled`]:d.dsColor("slate-400"),[`${i}-border-default`]:d.dsColor(e+"-500"),[`${i}-border-hover`]:d.dsColor(e+"-600"),[`${i}-border-focus-visible`]:d.dsColor(e+"-700"),[`${i}-border-active`]:d.dsColor(e+"-800"),[`${i}-border-disabled`]:d.dsColor("slate-400")}:"link"==o?{[`${i}-color-default`]:d.dsColor(e+"-500"),[`${i}-color-hover`]:d.dsColor(e+"-600"),[`${i}-color-focus-visible`]:d.dsColor(e+"-800"),[`${i}-color-active`]:d.dsColor(e+"-700"),[`${i}-color-disabled`]:d.dsColor("slate-400"),[`${i}-background-color-default`]:d.dsColor("transparent"),[`${i}-background-color-hover`]:d.dsColor("transparent"),[`${i}-background-color-focus-visible`]:d.dsColor("slate-50"),[`${i}-background-color-active`]:d.dsColor("slate-50"),[`${i}-background-color-disabled`]:d.dsColor("transparent"),[`${i}-border-default`]:d.dsColor("transparent"),[`${i}-border-hover`]:d.dsColor("transparent"),[`${i}-border-focus-visible`]:d.dsColor("slate-50"),[`${i}-border-active`]:d.dsColor("slate-50"),[`${i}-border-disabled`]:d.dsColor("transparent")}:"ghost"==o?{[`${i}-color-default`]:d.dsColor(e+"-600"),[`${i}-color-hover`]:d.dsColor(e+"-600"),[`${i}-color-focus-visible`]:d.dsColor(e+"-600"),[`${i}-color-active`]:d.dsColor(e+"-600"),[`${i}-color-disabled`]:d.dsColor(e+"-300"),[`${i}-background-color-default`]:d.dsColor(e+"-100"),[`${i}-background-color-hover`]:d.dsColor(e+"-200"),[`${i}-background-color-focus-visible`]:d.dsColor(e+"-400"),[`${i}-background-color-active`]:d.dsColor(e+"-300"),[`${i}-background-color-disabled`]:d.dsColor(e+"-50"),[`${i}-border-default`]:d.dsColor(e+"-300"),[`${i}-border-hover`]:d.dsColor(e+"-400"),[`${i}-border-focus-visible`]:d.dsColor(e+"-600"),[`${i}-border-active`]:d.dsColor(e+"-500"),[`${i}-border-disabled`]:d.dsColor(e+"-200")}:void 0}render(){const{size:o,kind:i,disabled:c,outline:r,type:n,href:a,target:l,loading:b,variantColor:h,fullWidth:d,hidden:m,icon:p,iconPosition:x,value:u,isIconOnly:g,iconSize:f}=this.getStateData();let v=s("bcm-button__container",`bcm-button__container-size-${o}`,`bcm-button__container-kind-${r?"ghost":i}`,{"full-width":d,checked:this.checked,disabled:c});const k=s("bcm-button",{hidden:m,"full-width":d});return e(t,{class:k,style:this.setColor(h),onClick:()=>!c&&this.bcmClick.emit(this.el)},e(w,{type:n,value:u,componentClass:v,disabled:c,href:a,target:l,icon:p,loading:b,iconSize:f,isIconOnly:g,iconPosition:x}))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],y.prototype,"el",void 0),y.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}*{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.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 .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.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 .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.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 .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 j=class{constructor(e){o(this,e),this.blur=i(this,"bcm-blur",7),this.focus=i(this,"bcm-focus",7),this.change=i(this,"bcm-change",7),this.changeCheckbox=i(this,"bcm-change-checkbox",7),this._id=n.UID(),this.inGroup=!1,this.value=!1,this.checked=!1,this.name=void 0,this.disabled=!1,this.hidden=!1,this.required=!1,this.label=void 0,this.readonly=!1,this.size=a.Size.medium,this.indeterminate=null,this.color="blue",this.caption=void 0,this.noCaption=!1,this.captionError=void 0,this.captionType=a.Status.default,this.captionCache=void 0,this.captionTypeCache=void 0}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType,this.value=this.checked}componentDidRender(){this.inputElement.checked=this.checked}async onBcmFocus(){this.el.focus()}async onBcmBlur(){this.el.blur()}async setClear(){return this.check(!1),this.handleChange(),await x(10),Promise.resolve()}async resetCaption(){return await x(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await x(10),Promise.resolve()}handleChange(){this.checked=this.inputElement.checked,this.value=this.checked,this.indeterminate||(this.changeCheckbox.emit(),this.change.emit({name:this.name,value:this.checked}))}watchIndeterminate(e,o){e!=o&&(this.inputElement.checked=this.indeterminate==a.IndeterminateType.determinate,this.handleChange())}async set(e){"boolean"==typeof e&&await this.check(e)}async get(){return this.checked||!1}async check(e=!0){this.inputElement.checked=e,this.handleChange()}handleKeyUp(e){if(e.keyCode==a.KeyCode.space||e.keyCode==a.KeyCode.enter)return this.disabled||this.readonly||(this.inputElement.checked=!this.inputElement.checked,this.handleChange()),e.stopPropagation(),e.preventDefault(),!1}watchChecked(){this.checked&&this.resetCaption(),this.value=this.checked}setColor(e=this.color){if(!e)return;const o="--bcm-checkbox";return{[`${o}-primary-color-default`]:d.dsColor(e+"-500"),[`${o}-primary-color-hover`]:d.dsColor(e+"-600"),[`${o}-primary-color-focus-visible`]:d.dsColor(e+"-800"),[`${o}-primary-color-active`]:d.dsColor(e+"-700"),[`${o}-secondary-color-default`]:d.dsColor("white"),[`${o}-secondary-color-hover`]:d.dsColor("slate-50"),[`${o}-secondary-color-focus-visible`]:d.dsColor("slate-50"),[`${o}-secondary-color-active`]:d.dsColor("slate-50")}}render(){const{label:o,_id:i,indeterminate:c,hidden:r,disabled:n,checked:l,readonly:b,required:d,caption:m,captionError:x,captionType:u,noCaption:g,size:f}=this,v=s("bcm-checkbox",`bcm-checkbox-size-${f}`,{error:u==a.Status.error,hidden:r,checked:l,disabled:n,required:d,readonly:b}),k=s("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+c,{"bcm-checkbox__label-icon-checked":l}),_=s("bcm-checkbox__label"),z=s("bcm-checkbox__input");return e(t,{tabindex:"0",onFocus:()=>this.focus.emit(this.el),onBlur:()=>this.blur.emit(this.el),style:this.setColor(this.color),class:v,disabled:n},e("span",{hidden:!0},e("slot",null)),o&&e("bcm-label",{htmlFor:`input-${i}`,type:u,value:o,required:d}),e("div",{class:z},e("input",{id:`input-${i}`,type:"checkbox",checked:l,disabled:n,required:d,readonly:b,onChange:()=>{!n&&!b&&this.handleChange()},ref:e=>this.inputElement=e}),e("label",{class:_,htmlFor:`input-${i}`},e("span",{class:k},e("bcm-icon",{icon:"far fa-check"})),e(h,{className:"slot"}))),e(p,{noCaption:g,captionType:u,captionError:x,caption:m}))}get el(){return c(this)}static get watchers(){return{indeterminate:["watchIndeterminate"],checked:["watchChecked"]}}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],j.prototype,"el",void 0),j.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"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @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}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:"";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}';const{state:C}=b({group:new Map,allChecked:!0,allUnchecked:!0,changeInderminate:{}}),$=e=>r((()=>C.group.get(e)),{}),O=e=>{var o;const i=$(e);let t=!0,c=!0;null===(o=i.childs)||void 0===o||o.map((e=>{e.checked&&(c=!1),!e.checked&&(t=!1)})),i.indeterminateState=t||c?t?"determinate":"uncheck":"indeterminate"},P=$,R=({customStyle:o,groupContainerClasses:i,onBcmSelect:t,items:c})=>e("div",{class:i,style:o},c.childs&&c.childs.map((o=>e("bcm-checkbox",{id:o.id,name:o.name,color:o.color,checked:o.checked,disabled:o.disabled,readonly:o.readonly,required:o.required,noCaption:o.noCaption,"no-margin":!0,size:o.size,"full-width":o.fullWidth,onClick:e=>{!o.disabled&&!o.readonly&&(t(o.id),e.preventDefault())}},o.slot||o.label))));const I=class{constructor(e){o(this,e),this.change=i(this,"bcm-change",7),this.groupCheckedList=i(this,"bcm-group-checked-list",7),this._id=n.UID(),this.direction=a.Direction.horizontal,this.items=[],this.indeterminate=!1,this.name=void 0,this.value=void 0,this.disabled=!1,this.readonly=!1,this.hidden=!1,this.required=!1,this.label=void 0,this.gap=void 0,this.defaultValue=void 0,this.fullWidth=!1,this.optionType="default",this.buttonStyle="solid",this.size=a.Size.medium,this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.tick={}}componentDidLoad(){this.initState()}disconnectedCallback(){Promise.resolve(C.group.delete(this._id))}componentShouldUpdate(e,o,i){"tick"==i&&e!==o&&r((()=>P(this._id).childs.length>0),!1)&&this.getValue().then((e=>this.value=e)),this.getOptions().indexOf(i)>-1&&e!==o&&this.initState()}getOptions(){return r((()=>Object.keys(C.group.get(this._id))),[])}async initState(){const{fullWidth:e,optionType:o,buttonStyle:i,size:t,noCaption:c,defaultValue:a,label:l,required:s,captionType:b,hidden:h,direction:d,indeterminate:m,gap:p,items:x}=this,u=a&&("string"==typeof a?JSON.parse(a):a),g=x.length>0?x:await this.getCheckboxes();await(async({fullWidth:e,optionType:o,buttonStyle:i,size:t,defaultCheckedItems:c,el:a,id:l,label:s,required:b,captionType:h,hidden:d,direction:m,childs:p,indeterminate:x,gap:u,noCaption:g})=>{a&&C.group.set(l,{fullWidth:e,optionType:o,buttonStyle:i,size:t,defaultCheckedItems:c,label:s,required:b,captionType:h,hidden:d,direction:m,indeterminate:x,gap:u,noCaption:g,childs:null==p?void 0:p.map((e=>(e.checked&&(C.allUnchecked=!1),!e.checked&&(C.allChecked=!1),o&&(e.optionType=o),i&&(e.buttonStyle=i),t&&(e.size=t),c&&c.find((o=>o===e.name))&&(e.checked=!0),e.noCaption=g,{id:e.id||n.UID(),checked:e.checked||!1,name:e.name,size:e.size,buttonStyle:e.buttonStyle,optionType:e.optionType,style:e.style,noCaption:e.noCaption,color:e.color,disabled:e.disabled,readonly:e.readonly,label:e.label||e.name,slot:e.slot||r((()=>e.querySelector(".slot").textContent),e.textContent),required:e.required||b,el:e,captionType:h,hidden:d}))),indeterminateState:C.allChecked||C.allUnchecked?C.allChecked?"determinate":"uncheck":"indeterminate"})})({id:this._id,el:this.el,indeterminate:m,fullWidth:e,optionType:o,buttonStyle:i,size:t,defaultCheckedItems:u,label:l,noCaption:c,required:s,captionType:b,hidden:h,gap:p,direction:d,childs:g});const f=this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);f&&f.innerHTML&&(f.innerHTML=""),this.value=await this.getValue()}async markForCheck(){await x(10),this.tick=n.UID()}async onBcmFocus(){const e=this.getCheckboxes();e.length>0&&e[0].onBcmFocus()}async onBcmBlur(){this.el.blur()}async setClear(){return null===(o=$(e=this._id).childs)||void 0===o||o.forEach((e=>{e.checked=!1})),O(e),await x(10),this.getCheckboxes().forEach((e=>{e.setClear()})),this.markForCheck(),await x(10),Promise.resolve();var e,o}async resetCaption(){return await x(10),this.getCheckboxes().forEach((e=>{e.resetCaption()})),await x(10),Promise.resolve()}async set(e){Array.isArray(e)&&await this.check(e,!0,!0)}async get(){const e=await this.getCheckedList()&&Object.keys(await this.getCheckedList());return e.length>0?e:[]}async check(e,o=!0,i=!1){((e,o,i,t)=>{var c;const r=o&&("string"==typeof o?JSON.parse(o):o);null===(c=$(e).childs)||void 0===c||c.forEach((e=>{if(r){const o=r.find((o=>o===e.name||o.name===e.name));o?"object"==typeof o?Object.keys(o).map((t=>{e.checked="checked"===t?o[t]:i})):e.checked=i:t&&(e.checked=!1)}else e.checked=!1})),O(e)})(this._id,e,o,i),this.markForCheck()}async getValue(e){return Promise.resolve(((e,o)=>{var i;const t=$(e);let c={};return null===(i=t.childs)||void 0===i||i.map((e=>{o?e.name===o&&(c[e.name]={value:!!e.checked,name:e.name}):c[e.name]={value:!!e.checked,name:e.name}})),c})(this._id,e))}async getCheckedList(){return(e=>{var o;const i=$(e);let t={};return null===(o=i.childs)||void 0===o||o.map((e=>{!0===e.checked&&(t[e.name]={value:!!e.checked,name:e.name})})),t})(this._id)}handleItemsChange(){this.initState()}getCheckboxes(){return u(this.el,"bcm-checkbox:not(#bcm-indeterminate-element)")}async getCheckbox(e){const o=this.el.querySelector(`bcm-checkbox[id="${e}"]`);if(o){const e=o.name,i=await this.getValue(e);return{element:o,event:r((()=>i[e]),null)}}return{}}async indeterminateClick(){(e=>{var o;const i=$(e);if(!i.disabled){let t=!0;"determinate"===i.indeterminateState&&(t=!1),null===(o=$(e).childs)||void 0===o||o.map((e=>{e.checked=t})),O(e)}})(this._id),this.markForCheck()}async changeCheckBox(e){var o,i;null===(i=$((o={id:this._id,childId:e}).id).childs)||void 0===i||i.map((e=>{e.checked=e.id===o.childId?!e.checked:e.checked})),O(o.id),this.markForCheck(),await x(10),this.value=await this.getValue(),this.change.emit({value:this.value,changed:Object.assign({},await this.getCheckbox(e))}),this.groupCheckedList.emit(await this.getCheckedList())}getItems(){return P(this._id)}render(){const o=this.getItems(),{disabled:i,captionType:c,label:r,indeterminate:n,indeterminateState:a,required:l,direction:b,optionType:h,hidden:d,fullWidth:m,gap:p}=o,x=s("bcm-checkbox-group",b,h,{hidden:d,"full-width":m}),u=s("bcm-checkbox-group__container",h,{[b]:"default"===h,indeterminate:n,hidden:d,"full-width":m});return e(t,{class:x},e("span",{hidden:!0,id:`bcm-checkbox-group__items-${this._id}`},e("slot",null)),e("div",{class:"bcm-checkbox-group__label"},r&&e("div",null,e(g,{size:this.size,type:c,value:r,required:l}))),n&&e("bcm-checkbox",{onClick:e=>{this.indeterminateClick(),e.preventDefault()},"no-caption":!0,id:"bcm-indeterminate-element",indeterminate:a,disabled:i},"Check All"),e(R,{items:o,groupContainerClasses:u,customStyle:p&&{gap:p},onBcmSelect:e=>this.changeCheckBox(e)}))}get el(){return c(this)}static get watchers(){return{items:["handleItemsChange"]}}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],I.prototype,"el",void 0),I.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}.bcm-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}';const T=new class{constructor(){}response(e,o){return Object.assign(Object.assign({valid:e},o&&{message:o}),!e&&{type:"error"})}required(e,o){let i=this.response(!0);return""!=e&&""!=e&&null!=e&&null!=e&&!1!==e||(i=this.response(!1,"This field is required.")),o&&(o.valid||(i=this.response(!1,o.errorText)),e instanceof Object&&e.isValid&&0==e.isValid&&(i=this.response(!1,"This field is required."))),i}selfValidation(e){let o=this.response(!0);return null==e.captionError&&"error"!=e.captionType||(o=this.response(!1,e.captionError)),o}};const S=class{constructor(e){o(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.value=void 0,this.autocomplete=!1}handleSubmit(){}async submitFunction(){this.formData={},this.inputs=[],this.selector=this.el,await this.getInputs(),await x(10);const e=await this.userFormData();var o={isValid:!0,formData:e};return this.name&&(o=Object.assign(Object.assign({},o),{formName:this.name})),this.isValid?(this.bcmForm.emit(o),o):(this.returnCaption={isValid:!1,message:"Please fill in all inputs",errorDetails:this.returnCaption,formData:e},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(e){var o;const i=this.validation;if(this.validation=!1,this.selector=this.el,await this.getInputs(),e&&(null===(o=this.inputs)||void 0===o?void 0:o.length)>0)for(const o of Object.keys(e)){const i=this.inputs.find((e=>e.name===o));if(i)try{await i.set(e[o])}catch(e){console.log(i.nodeName,"set",e)}}this.validation=i}async get(){var e;let o={};this.selector=this.el;const i=this.inputs;return await this.getInputs(),(null===(e=this.inputs)||void 0===e?void 0:e.length)>0&&this.inputs.forEach((async e=>{try{const i=await e.get();o=Object.assign(Object.assign({},o),{[e.name]:i})}catch(o){console.log(`${e.nodeName} get error`)}})),this.inputs=i,await x(10),Promise.resolve(o)}async setClear(){this.formData={},this.inputs=[],this.selector=this.el;let e=[];return await this.getInputs(),this.inputs.forEach((async o=>{try{e.push(await o.setClear())}catch(e){console.log(e)}})),await Promise.all(e).then((()=>{this.formData={},this.inputs=[],this.duplicateInput=[],this.isValid=!0,this.returnCaption=[]})),await x(10),Promise.resolve(!0)}async resetCaption(){await x(10),this.formData={},this.inputs=[],this.selector=this.el,await this.getInputs();for(const e of this.inputs)try{await e.resetCaption()}catch(o){console.log(e.nodeName,"rc p")}return await x(10),Promise.resolve()}async config(e){return e.validation&&(this.validation="boolean"==typeof e.validation&&e.validation),!0}async getInputs(){var e=this.selector;if(!e)return void console.warn(this.Bromcom.errors.targetFormNotExist+this.selector);const o=Array.from(e.querySelectorAll("bcm-"+Object.values(this.Bromcom.inputComponents).join(",bcm-")));this.duplicateInput=[];const i=o.filter((e=>{var o;return!e["s-hn"]||"BcmForm"!==(null===(o=e["s-hn"])||void 0===o?void 0:o.nodeName)}));for(const e of i){if("bcm-checkbox-group"==f.lowercase(e.nodeName)){let o=e.querySelectorAll("bcm-checkbox");if(o)for(const e of o)this.duplicateInput.push(e.name)}if("bcm-form"==f.lowercase(e.nodeName)){const o=Array.from(e.querySelectorAll("bcm-"+Object.values(this.Bromcom.inputComponents).join(",bcm-")));let i={};for(const e of o){var t=e.name,c=e.value;i=Object.assign(Object.assign({},i),{[t]:c}),this.duplicateInput.push(e.name)}e.value=i;let r=e.querySelectorAll("bcm-checkbox");if(r)for(const e of r)this.duplicateInput.push(e.name)}}await x(10),this.inputs=i}getItemValue(e){return e.tagName.toLowerCase().replace("bcm-",""),e.value}isWrapperComponent(e){return["bcm-datetime-picker","bcm-date-picker","bcm-time-picker"].includes(e.toLowerCase())}isGroupComponent(e){return["bcm-checkbox-group"].includes(e.toLowerCase())}isListComponent(e){return["bcm-list"].includes(e.toLowerCase())}async userFormData(){this.formData={},this.isValid=!0,this.returnCaption=[];for(const o of this.inputs){const i=this.isGroupComponent(o.tagName),t=this.isWrapperComponent(o.tagName),c=t&&o,r=t?await o.getInput()&&o:o;if(this.validation){let e=null;if(t){const o=await c.isValid();e=T.required(r.value,o),e&&(r.value instanceof Object?0==r.value.isValid&&(e=T.required("",o)):e=T.required(r.value,o))}else if(i){const o=u(r,"bcm-checkbox:not(#bcm-indeterminate-element)");if(o&&o.length>0)for(const i of o)i&&!0===i.required&&(e=T.required(i.checked),e.valid?(i.noCaption=r.noCaption,i.captionError=null,i.captionType="default"):(i.noCaption=!1,i.captionError=e.message,i.captionType=e.type))}else e=T.required(r.value);if(r.required){e.valid?(r.captionError=null,r.captionType="default"):(r.captionError=e.message,r.captionType=e.type),await x(10);const o=T.selfValidation(r);e.valid&&(o.valid||(r.captionError=o.message,r.captionType=o.type))}let o=r.name,n=r.captionError;!r.hidden&&"error"==r.captionType&&(this.returnCaption=[...Array.from(this.returnCaption),{[o]:n}],this.isValid=!1)}if(r.name&&!this.duplicateInput.includes(r.name)){var e=this.getItemValue(r);e&&null!=e&&null!=e||(e=null),this.formData[r.name]=e}}return this.formData}async handleChange(e){const o=this.isWrapperComponent(e.target.tagName),i=this.isGroupComponent(e.target.tagName);let t;if(o)t=e.target.getInput&&await e.target.getInput()||e.target;else if(i){let o=!1;const i=u(e.target,"bcm-checkbox:not(#bcm-indeterminate-element)");i.length>0&&i.forEach((e=>{e&&!0===e.required&&(o=!0)})),t=Object.assign(Object.assign({},e.target),{required:o})}else t=e.target;const c=e.target.value,r=o&&e.target;var n;o&&(n=await r.isValid());const a=setTimeout((()=>{if(t.required){let r=null;if(o)r=T.required(c,n),r&&(c instanceof Object?0==c.isValid&&(r=T.required("",n)):r=T.required(c,n));else if(i){const o=u(e.target,"bcm-checkbox:not(#bcm-indeterminate-element)");o.length>0&&o.forEach((o=>{o&&!0===o.required&&(r=T.required(o.checked),r.valid?(o.noCaption=e.target.noCaption,o.captionError=null,o.captionType="default"):(o.noCaption=!1,o.captionError=r.message,o.captionType=r.type))}))}else r=T.required(c);r.valid?(t.captionError=null,t.captionType=null):(t.captionError=r.message,t.captionType=r.type)}clearTimeout(a)}));this.value=await this.userFormData()}render(){const o=s(this.hidden?"hidden":null);return e(t,{class:o},e("form",{class:"bcm-form",autocomplete:this.autocomplete?"on":"off"},e("slot",null)))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],S.prototype,"el",void 0),S.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}';const E=class{constructor(e){o(this,e),this.hidden=!1,this.icon=void 0}render(){const{icon:o,hidden:i}=this;return e(t,{class:"bcm-icon fa "+(i?"hidden":"")},e("i",{class:`${o}`}))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],E.prototype,"el",void 0),E.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}.bcm-icon.hidden{display:none}';const q=class{constructor(e){o(this,e),this._id=n.UID(),this.required=!1,this.value=void 0,this.size="medium",this.form=void 0,this.htmlFor=void 0,this.hidden=!1,this.type=a.Status.default,this.tooltip=void 0}render(){const{required:o,value:i,size:c,form:r,htmlFor:n,hidden:a,type:l,tooltip:b}=this,h=s("bcm-label",{hidden:a}),d=e(g,{form:r,htmlFor:n,value:i,size:c,type:l,required:o});return e(t,{class:h},d,b&&e("bcm-tooltip",{message:b,placement:"top",trigger:"hover"},e("bcm-icon",{icon:"far fa-question-circle"})))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],q.prototype,"el",void 0),q.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}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}';const D=class{constructor(e){o(this,e),this.bcmTooltipShow=i(this,"bcmTooltipShow",7),this.bcmTooltipHide=i(this,"bcmTooltipHide",7),this._id=n.UID(),this.message="",this.placement=l.Placement.top,this.trigger=l.TriggerType.click,this.open=!1,this.color="slate",this.size=l.Size.medium,this.openDelay=0,this.closeDelay=0,this.targetId=void 0,this.tooltip=void 0}emitShow(){this.bcmTooltipShow.emit()}emitHide(){this.bcmTooltipHide.emit()}connectedCallback(){this.tooltip=new v({targetId:this.targetId||this._id,message:this.message,placement:this.placement,color:this.color,trigger:this.trigger,size:this.size,openDelay:this.openDelay,closeDelay:this.closeDelay,emitShow:()=>this.emitShow(),emitHide:()=>this.emitHide()})}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.size=this.size,this.tooltip.openDelay=this.openDelay,this.tooltip.closeDelay=this.closeDelay,this.tooltip.update()}disconnectedCallback(){this.tooltip.destroy()}async show(){this.tooltip.show()}async hide(){this.tooltip.hide()}async toggle(){this.tooltip.toggle()}render(){return e(t,{"aria-describedby":"tooltip",class:"tw-inline-flex tw-h-fit tw-w-fit"},e("slot",null))}get el(){return c(this)}};!function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)}([m()],D.prototype,"el",void 0);export{y as bcm_button,j as bcm_checkbox,I as bcm_checkbox_group,S as bcm_form,E as bcm_icon,q as bcm_label,D as bcm_tooltip}
|
|
5
|
+
import{h as e,r as o,c as i,H as t,g as c}from"./p-da1055cb.js";import{s as r,G as n}from"./p-39e9bcaf.js";import{B as a,a as l}from"./p-a429e85b.js";import{c as s}from"./p-d65a1e21.js";import{c as b}from"./p-a60a2dd0.js";import{S as h}from"./p-79fd816c.js";import{C as d}from"./p-843905c8.js";import{I as m}from"./p-c23b6240.js";import{C as p}from"./p-c8e13fd7.js";import{d as x,g as u}from"./p-8c018ae0.js";import{L as g}from"./p-24aefda6.js";import{S as f}from"./p-8d0ca8c2.js";import"./p-626a65e9.js";import"./p-f166f6c6.js";import"./p-d42921e7.js";import{T as v}from"./p-aa3999e6.js";import"./p-7e44e6b5.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-b60bcecf.js";const k={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 _;!function(e){e.save="save",e.submit="submit",e.ok="ok",e.new="new",e.add="add",e.create="create",e.apply="apply",e.prev="prev",e.next="next",e.send="send",e.delete="delete",e.cancel="cancel",e.decline="decline",e.close="close",e.archive="archive",e.remove="remove",e.edit="edit",e.export="export",e.import="import",e.filter="filter",e.update="update",e.reset="Reset",e.download="download"}(_||(_={}));const{state:z}=b({value:new Map,setData:{},removeData:{}}),w=({value:o,type:i,componentClass:t,disabled:c,href:r,target:n,loading:l,isIconOnly:s,icon:b,iconPosition:d,id:m})=>e(r?a.HtmlElementType.a:a.HtmlElementType.button,Object.assign({id:m},i==a.HtmlElementType.button&&{type:i},{class:t,disabled:c,href:r,target:n,tabindex:"0"}),e("span",{hidden:!0},e("slot",null)),l&&e("span",{class:"bcm-button__container-loading"}," ",e("span",{class:"bcm-button__container-icon"},e("i",{class:"far fa-spinner-third fa-spin"})," ")),b&&e("span",{class:`${d} bcm-button__container-icon`},e("i",{class:`${b}`})),!s&&e(h,{className:"bcm-button__container-text",value:o}),e("slot",{name:"suffix"}));const y=class{constructor(e){o(this,e),this.bcmClick=i(this,"bcm-click",7),this._id=n.UID(),this.hidden=!1,this.type=a.ButtonType.button,this.size=a.Size.medium,this.disabled=!1,this.kind=a.Kind.solid,this.outline=!1,this.icon=void 0,this.href=void 0,this.target=void 0,this.value=void 0,this.loading=!1,this.variant=void 0,this.dataDismiss=!1,this.fullWidth=!1,this.iconPosition=a.IconPosition.prefix,this.color=void 0,this.checked=!1}handleOnClick(e){if(this.disabled)return e.preventDefault(),e.stopPropagation(),!1}componentWillRender(){const{size:e,kind:o,icon:i,iconPosition:t,disabled:c,outline:r,href:n,type:l,target:s,loading:b,variant:h,fullWidth:d,hidden:m,value:p}=this;(e=>{const o=Object.assign(Object.assign({},e),k[e.variant]&&{icon:k[e.variant].icon,value:k[e.variant].text,iconPosition:a.IconPosition[k[e.variant].iconPosition],variantColor:k[e.variant].color});z.value.set(o.id,o)})({id:this._id,size:e,type:l,kind:o,icon:i,iconPosition:t,disabled:c,outline:r,href:n,target:s,loading:b,variant:h,fullWidth:d,hidden:m,value:p,isIconOnly:!(!this.isHaveChildNodes()||!this.icon)})}getStateData(){return e=this._id,r((()=>z.value.get(e)),{});var e}isHaveChildNodes(){return void 0===Array.from(this.el.childNodes).find((e=>e.nodeType===Node.TEXT_NODE))}setColor(e=this.color){if(!e)return;const{kind:o}=this,i=`--bcm-button-${o}`;return"solid"===o?{[`${i}-color-default`]:d.dsColor("white"),[`${i}-color-hover`]:d.dsColor("white"),[`${i}-color-focus-visible`]:d.dsColor("white"),[`${i}-color-active`]:d.dsColor("white"),[`${i}-color-disabled`]:d.dsColor("white"),[`${i}-background-color-default`]:d.dsColor(e+"-500"),[`${i}-background-color-hover`]:d.dsColor(e+"-600"),[`${i}-background-color-focus-visible`]:d.dsColor(e+"-700"),[`${i}-background-color-active`]:d.dsColor(e+"-800"),[`${i}-background-color-disabled`]:d.dsColor("slate-400"),[`${i}-border-default`]:d.dsColor(e+"-500"),[`${i}-border-hover`]:d.dsColor(e+"-600"),[`${i}-border-focus-visible`]:d.dsColor(e+"-700"),[`${i}-border-active`]:d.dsColor(e+"-800"),[`${i}-border-disabled`]:d.dsColor("slate-400")}:"link"==o?{[`${i}-color-default`]:d.dsColor(e+"-500"),[`${i}-color-hover`]:d.dsColor(e+"-600"),[`${i}-color-focus-visible`]:d.dsColor(e+"-800"),[`${i}-color-active`]:d.dsColor(e+"-700"),[`${i}-color-disabled`]:d.dsColor("slate-400"),[`${i}-background-color-default`]:d.dsColor("transparent"),[`${i}-background-color-hover`]:d.dsColor("transparent"),[`${i}-background-color-focus-visible`]:d.dsColor("slate-50"),[`${i}-background-color-active`]:d.dsColor("slate-50"),[`${i}-background-color-disabled`]:d.dsColor("transparent"),[`${i}-border-default`]:d.dsColor("transparent"),[`${i}-border-hover`]:d.dsColor("transparent"),[`${i}-border-focus-visible`]:d.dsColor("slate-50"),[`${i}-border-active`]:d.dsColor("slate-50"),[`${i}-border-disabled`]:d.dsColor("transparent")}:"ghost"==o?{[`${i}-color-default`]:d.dsColor(e+"-600"),[`${i}-color-hover`]:d.dsColor(e+"-600"),[`${i}-color-focus-visible`]:d.dsColor(e+"-600"),[`${i}-color-active`]:d.dsColor(e+"-600"),[`${i}-color-disabled`]:d.dsColor(e+"-300"),[`${i}-background-color-default`]:d.dsColor(e+"-100"),[`${i}-background-color-hover`]:d.dsColor(e+"-200"),[`${i}-background-color-focus-visible`]:d.dsColor(e+"-400"),[`${i}-background-color-active`]:d.dsColor(e+"-300"),[`${i}-background-color-disabled`]:d.dsColor(e+"-50"),[`${i}-border-default`]:d.dsColor(e+"-300"),[`${i}-border-hover`]:d.dsColor(e+"-400"),[`${i}-border-focus-visible`]:d.dsColor(e+"-600"),[`${i}-border-active`]:d.dsColor(e+"-500"),[`${i}-border-disabled`]:d.dsColor(e+"-200")}:void 0}render(){const{size:o,kind:i,disabled:c,outline:r,type:n,href:a,target:l,loading:b,variantColor:h,fullWidth:d,hidden:m,icon:p,iconPosition:x,value:u,isIconOnly:g,iconSize:f}=this.getStateData();let v=s("bcm-button__container",`bcm-button__container-size-${o}`,`bcm-button__container-kind-${r?"ghost":i}`,{"full-width":d,checked:this.checked,disabled:c});const k=s("bcm-button",{hidden:m,"full-width":d});return e(t,{class:k,style:this.setColor(h),onClick:()=>!c&&this.bcmClick.emit(this.el)},e(w,{type:n,value:u,componentClass:v,disabled:c,href:a,target:l,icon:p,loading:b,iconSize:f,isIconOnly:g,iconPosition:x}))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],y.prototype,"el",void 0),y.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}*{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.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 .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.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 .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.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 .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 j=class{constructor(e){o(this,e),this.blur=i(this,"bcm-blur",7),this.focus=i(this,"bcm-focus",7),this.change=i(this,"bcm-change",7),this.changeCheckbox=i(this,"bcm-change-checkbox",7),this._id=n.UID(),this.inGroup=!1,this.value=!1,this.checked=!1,this.name=void 0,this.disabled=!1,this.hidden=!1,this.required=!1,this.label=void 0,this.readonly=!1,this.size=a.Size.medium,this.indeterminate=null,this.color="blue",this.caption=void 0,this.noCaption=!1,this.captionError=void 0,this.captionType=a.Status.default,this.captionCache=void 0,this.captionTypeCache=void 0}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType,this.value=this.checked}componentDidRender(){this.inputElement.checked=this.checked}async onBcmFocus(){this.el.focus()}async onBcmBlur(){this.el.blur()}async setClear(){return this.check(!1),this.handleChange(),await x(10),Promise.resolve()}async resetCaption(){return await x(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await x(10),Promise.resolve()}handleChange(){this.checked=this.inputElement.checked,this.value=this.checked,this.indeterminate||(this.changeCheckbox.emit(),this.change.emit({name:this.name,value:this.checked}))}watchIndeterminate(e,o){e!=o&&(this.inputElement.checked=this.indeterminate==a.IndeterminateType.determinate,this.handleChange())}async set(e){"boolean"==typeof e&&await this.check(e)}async get(){return this.checked||!1}async check(e=!0){this.inputElement.checked=e,this.handleChange()}handleKeyUp(e){if(e.keyCode==a.KeyCode.space||e.keyCode==a.KeyCode.enter)return this.disabled||this.readonly||(this.inputElement.checked=!this.inputElement.checked,this.handleChange()),e.stopPropagation(),e.preventDefault(),!1}watchChecked(){this.checked&&this.resetCaption(),this.value=this.checked}setColor(e=this.color){if(!e)return;const o="--bcm-checkbox";return{[`${o}-primary-color-default`]:d.dsColor(e+"-500"),[`${o}-primary-color-hover`]:d.dsColor(e+"-600"),[`${o}-primary-color-focus-visible`]:d.dsColor(e+"-800"),[`${o}-primary-color-active`]:d.dsColor(e+"-700"),[`${o}-secondary-color-default`]:d.dsColor("white"),[`${o}-secondary-color-hover`]:d.dsColor("slate-50"),[`${o}-secondary-color-focus-visible`]:d.dsColor("slate-50"),[`${o}-secondary-color-active`]:d.dsColor("slate-50")}}render(){const{label:o,_id:i,indeterminate:c,hidden:r,disabled:n,checked:l,readonly:b,required:d,caption:m,captionError:x,captionType:u,noCaption:g,size:f}=this,v=s("bcm-checkbox",`bcm-checkbox-size-${f}`,{error:u==a.Status.error,hidden:r,checked:l,disabled:n,required:d,readonly:b}),k=s("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+c,{"bcm-checkbox__label-icon-checked":l}),_=s("bcm-checkbox__label"),z=s("bcm-checkbox__input");return e(t,{tabindex:"0",onFocus:()=>this.focus.emit(this.el),onBlur:()=>this.blur.emit(this.el),style:this.setColor(this.color),class:v,disabled:n},e("span",{hidden:!0},e("slot",null)),o&&e("bcm-label",{htmlFor:`input-${i}`,type:u,value:o,required:d}),e("div",{class:z},e("input",{id:`input-${i}`,type:"checkbox",checked:l,disabled:n,required:d,readonly:b,onChange:()=>{!n&&!b&&this.handleChange()},ref:e=>this.inputElement=e}),e("label",{class:_,htmlFor:`input-${i}`},e("span",{class:k},e("bcm-icon",{icon:"far fa-check"})),e(h,{className:"slot"}))),e(p,{noCaption:g,captionType:u,captionError:x,caption:m}))}get el(){return c(this)}static get watchers(){return{indeterminate:["watchIndeterminate"],checked:["watchChecked"]}}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],j.prototype,"el",void 0),j.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"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); @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}*{box-sizing:border-box}.bcm-caption-area{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:"";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}';const{state:C}=b({group:new Map,allChecked:!0,allUnchecked:!0,changeInderminate:{}}),$=e=>r((()=>C.group.get(e)),{}),O=e=>{var o;const i=$(e);let t=!0,c=!0;null===(o=i.childs)||void 0===o||o.map((e=>{e.checked&&(c=!1),!e.checked&&(t=!1)})),i.indeterminateState=t||c?t?"determinate":"uncheck":"indeterminate"},P=$,R=({customStyle:o,groupContainerClasses:i,onBcmSelect:t,items:c})=>e("div",{class:i,style:o},c.childs&&c.childs.map((o=>e("bcm-checkbox",{id:o.id,name:o.name,color:o.color,checked:o.checked,disabled:o.disabled,readonly:o.readonly,required:o.required,noCaption:o.noCaption,"no-margin":!0,size:o.size,"full-width":o.fullWidth,onClick:e=>{!o.disabled&&!o.readonly&&(t(o.id),e.preventDefault())}},o.slot||o.label))));const I=class{constructor(e){o(this,e),this.change=i(this,"bcm-change",7),this.groupCheckedList=i(this,"bcm-group-checked-list",7),this._id=n.UID(),this.direction=a.Direction.horizontal,this.items=[],this.indeterminate=!1,this.name=void 0,this.value=void 0,this.disabled=!1,this.readonly=!1,this.hidden=!1,this.required=!1,this.label=void 0,this.gap=void 0,this.defaultValue=void 0,this.fullWidth=!1,this.optionType="default",this.buttonStyle="solid",this.size=a.Size.medium,this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.tick={}}componentDidLoad(){this.initState()}disconnectedCallback(){Promise.resolve(C.group.delete(this._id))}componentShouldUpdate(e,o,i){"tick"==i&&e!==o&&r((()=>P(this._id).childs.length>0),!1)&&this.getValue().then((e=>this.value=e)),this.getOptions().indexOf(i)>-1&&e!==o&&this.initState()}getOptions(){return r((()=>Object.keys(C.group.get(this._id))),[])}async initState(){const{fullWidth:e,optionType:o,buttonStyle:i,size:t,noCaption:c,defaultValue:a,label:l,required:s,captionType:b,hidden:h,direction:d,indeterminate:m,gap:p,items:x}=this,u=a&&("string"==typeof a?JSON.parse(a):a),g=x.length>0?x:await this.getCheckboxes();await(async({fullWidth:e,optionType:o,buttonStyle:i,size:t,defaultCheckedItems:c,el:a,id:l,label:s,required:b,captionType:h,hidden:d,direction:m,childs:p,indeterminate:x,gap:u,noCaption:g})=>{a&&C.group.set(l,{fullWidth:e,optionType:o,buttonStyle:i,size:t,defaultCheckedItems:c,label:s,required:b,captionType:h,hidden:d,direction:m,indeterminate:x,gap:u,noCaption:g,childs:null==p?void 0:p.map((e=>(e.checked&&(C.allUnchecked=!1),!e.checked&&(C.allChecked=!1),o&&(e.optionType=o),i&&(e.buttonStyle=i),t&&(e.size=t),c&&c.find((o=>o===e.name))&&(e.checked=!0),e.noCaption=g,{id:e.id||n.UID(),checked:e.checked||!1,name:e.name,size:e.size,buttonStyle:e.buttonStyle,optionType:e.optionType,style:e.style,noCaption:e.noCaption,color:e.color,disabled:e.disabled,readonly:e.readonly,label:e.label||e.name,slot:e.slot||r((()=>e.querySelector(".slot").textContent),e.textContent),required:e.required||b,el:e,captionType:h,hidden:d}))),indeterminateState:C.allChecked||C.allUnchecked?C.allChecked?"determinate":"uncheck":"indeterminate"})})({id:this._id,el:this.el,indeterminate:m,fullWidth:e,optionType:o,buttonStyle:i,size:t,defaultCheckedItems:u,label:l,noCaption:c,required:s,captionType:b,hidden:h,gap:p,direction:d,childs:g});const f=this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);f&&f.innerHTML&&(f.innerHTML=""),this.value=await this.getValue()}async markForCheck(){await x(10),this.tick=n.UID()}async onBcmFocus(){const e=this.getCheckboxes();e.length>0&&e[0].onBcmFocus()}async onBcmBlur(){this.el.blur()}async setClear(){return null===(o=$(e=this._id).childs)||void 0===o||o.forEach((e=>{e.checked=!1})),O(e),await x(10),this.getCheckboxes().forEach((e=>{e.setClear()})),this.markForCheck(),await x(10),Promise.resolve();var e,o}async resetCaption(){return await x(10),this.getCheckboxes().forEach((e=>{e.resetCaption()})),await x(10),Promise.resolve()}async set(e){Array.isArray(e)&&await this.check(e,!0,!0)}async get(){const e=await this.getCheckedList()&&Object.keys(await this.getCheckedList());return e.length>0?e:[]}async check(e,o=!0,i=!1){((e,o,i,t)=>{var c;const r=o&&("string"==typeof o?JSON.parse(o):o);null===(c=$(e).childs)||void 0===c||c.forEach((e=>{if(r){const o=r.find((o=>o===e.name||o.name===e.name));o?"object"==typeof o?Object.keys(o).map((t=>{e.checked="checked"===t?o[t]:i})):e.checked=i:t&&(e.checked=!1)}else e.checked=!1})),O(e)})(this._id,e,o,i),this.markForCheck()}async getValue(e){return Promise.resolve(((e,o)=>{var i;const t=$(e);let c={};return null===(i=t.childs)||void 0===i||i.map((e=>{o?e.name===o&&(c[e.name]={value:!!e.checked,name:e.name}):c[e.name]={value:!!e.checked,name:e.name}})),c})(this._id,e))}async getCheckedList(){return(e=>{var o;const i=$(e);let t={};return null===(o=i.childs)||void 0===o||o.map((e=>{!0===e.checked&&(t[e.name]={value:!!e.checked,name:e.name})})),t})(this._id)}handleItemsChange(){this.initState()}getCheckboxes(){return u(this.el,"bcm-checkbox:not(#bcm-indeterminate-element)")}async getCheckbox(e){const o=this.el.querySelector(`bcm-checkbox[id="${e}"]`);if(o){const e=o.name,i=await this.getValue(e);return{element:o,event:r((()=>i[e]),null)}}return{}}async indeterminateClick(){(e=>{var o;const i=$(e);if(!i.disabled){let t=!0;"determinate"===i.indeterminateState&&(t=!1),null===(o=$(e).childs)||void 0===o||o.map((e=>{e.checked=t})),O(e)}})(this._id),this.markForCheck()}async changeCheckBox(e){var o,i;null===(i=$((o={id:this._id,childId:e}).id).childs)||void 0===i||i.map((e=>{e.checked=e.id===o.childId?!e.checked:e.checked})),O(o.id),this.markForCheck(),await x(10),this.value=await this.getValue(),this.change.emit({value:this.value,changed:Object.assign({},await this.getCheckbox(e))}),this.groupCheckedList.emit(await this.getCheckedList())}getItems(){return P(this._id)}render(){const o=this.getItems(),{disabled:i,captionType:c,label:r,indeterminate:n,indeterminateState:a,required:l,direction:b,optionType:h,hidden:d,fullWidth:m,gap:p}=o,x=s("bcm-checkbox-group",b,h,{hidden:d,"full-width":m}),u=s("bcm-checkbox-group__container",h,{[b]:"default"===h,indeterminate:n,hidden:d,"full-width":m});return e(t,{class:x},e("span",{hidden:!0,id:`bcm-checkbox-group__items-${this._id}`},e("slot",null)),e("div",{class:"bcm-checkbox-group__label"},r&&e("div",null,e(g,{size:this.size,type:c,value:r,required:l}))),n&&e("bcm-checkbox",{onClick:e=>{this.indeterminateClick(),e.preventDefault()},"no-caption":!0,id:"bcm-indeterminate-element",indeterminate:a,disabled:i},"Check All"),e(R,{items:o,groupContainerClasses:u,customStyle:p&&{gap:p},onBcmSelect:e=>this.changeCheckBox(e)}))}get el(){return c(this)}static get watchers(){return{items:["handleItemsChange"]}}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],I.prototype,"el",void 0),I.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}.bcm-checkbox-group{display:flex;flex-direction:column;align-items:flex-start;width:100%;margin-bottom:8px}.bcm-checkbox-group.hidden{display:none}.bcm-checkbox-group__container{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:flex-start;width:100%}.bcm-checkbox-group__container.full-width{max-width:100%}.bcm-checkbox-group__container.vertical{gap:8px;flex-direction:column}.bcm-checkbox-group__container.button{gap:unset}.bcm-checkbox-group__container.indeterminate{padding-top:16px;margin-top:16px;border-top:1px solid #efefef}';const T=new class{constructor(){}response(e,o){return Object.assign(Object.assign({valid:e},o&&{message:o}),!e&&{type:"error"})}required(e,o){let i=this.response(!0);return""!=e&&""!=e&&null!=e&&null!=e&&!1!==e||(i=this.response(!1,"This field is required.")),o&&(o.valid||(i=this.response(!1,o.errorText)),e instanceof Object&&e.isValid&&0==e.isValid&&(i=this.response(!1,"This field is required."))),i}selfValidation(e){let o=this.response(!0);return null==e.captionError&&"error"!=e.captionType||(o=this.response(!1,e.captionError)),o}};const S=class{constructor(e){o(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.value=void 0,this.autocomplete=!1}handleSubmit(){}async submitFunction(){this.formData={},this.inputs=[],this.selector=this.el,await this.getInputs(),await x(10);const e=await this.userFormData();var o={isValid:!0,formData:e};return this.name&&(o=Object.assign(Object.assign({},o),{formName:this.name})),this.isValid?(this.bcmForm.emit(o),o):(this.returnCaption={isValid:!1,message:"Please fill in all inputs",errorDetails:this.returnCaption,formData:e},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(e){var o;const i=this.validation;if(this.validation=!1,this.selector=this.el,await this.getInputs(),e&&(null===(o=this.inputs)||void 0===o?void 0:o.length)>0)for(const o of Object.keys(e)){const i=this.inputs.find((e=>e.name===o));if(i)try{await i.set(e[o])}catch(e){console.log(i.nodeName,"set",e)}}this.validation=i}async get(){var e;let o={};this.selector=this.el;const i=this.inputs;return await this.getInputs(),(null===(e=this.inputs)||void 0===e?void 0:e.length)>0&&this.inputs.forEach((async e=>{try{const i=await e.get();o=Object.assign(Object.assign({},o),{[e.name]:i})}catch(o){console.log(`${e.nodeName} get error`)}})),this.inputs=i,await x(10),Promise.resolve(o)}async setClear(){this.formData={},this.inputs=[],this.selector=this.el;let e=[];return await this.getInputs(),this.inputs.forEach((async o=>{try{e.push(await o.setClear())}catch(e){console.log(e)}})),await Promise.all(e).then((()=>{this.formData={},this.inputs=[],this.duplicateInput=[],this.isValid=!0,this.returnCaption=[]})),await x(10),Promise.resolve(!0)}async resetCaption(){await x(10),this.formData={},this.inputs=[],this.selector=this.el,await this.getInputs();for(const e of this.inputs)try{await e.resetCaption()}catch(o){console.log(e.nodeName,"rc p")}return await x(10),Promise.resolve()}async config(e){return e.validation&&(this.validation="boolean"==typeof e.validation&&e.validation),!0}async getInputs(){var e=this.selector;if(!e)return void console.warn(this.Bromcom.errors.targetFormNotExist+this.selector);const o=Array.from(e.querySelectorAll("bcm-"+Object.values(this.Bromcom.inputComponents).join(",bcm-")));this.duplicateInput=[];const i=o.filter((e=>{var o;return!e["s-hn"]||"BcmForm"!==(null===(o=e["s-hn"])||void 0===o?void 0:o.nodeName)}));for(const e of i){if("bcm-checkbox-group"==f.lowercase(e.nodeName)){let o=e.querySelectorAll("bcm-checkbox");if(o)for(const e of o)this.duplicateInput.push(e.name)}if("bcm-form"==f.lowercase(e.nodeName)){const o=Array.from(e.querySelectorAll("bcm-"+Object.values(this.Bromcom.inputComponents).join(",bcm-")));let i={};for(const e of o){var t=e.name,c=e.value;i=Object.assign(Object.assign({},i),{[t]:c}),this.duplicateInput.push(e.name)}e.value=i;let r=e.querySelectorAll("bcm-checkbox");if(r)for(const e of r)this.duplicateInput.push(e.name)}}await x(10),this.inputs=i}getItemValue(e){return e.tagName.toLowerCase().replace("bcm-",""),e.value}isWrapperComponent(e){return["bcm-datetime-picker","bcm-date-picker","bcm-time-picker"].includes(e.toLowerCase())}isGroupComponent(e){return["bcm-checkbox-group"].includes(e.toLowerCase())}isListComponent(e){return["bcm-list"].includes(e.toLowerCase())}async userFormData(){this.formData={},this.isValid=!0,this.returnCaption=[];for(const o of this.inputs){const i=this.isGroupComponent(o.tagName),t=this.isWrapperComponent(o.tagName),c=t&&o,r=t?await o.getInput()&&o:o;if(this.validation){let e=null;if(t){const o=await c.isValid();e=T.required(r.value,o),e&&(r.value instanceof Object?0==r.value.isValid&&(e=T.required("",o)):e=T.required(r.value,o))}else if(i){const o=u(r,"bcm-checkbox:not(#bcm-indeterminate-element)");if(o&&o.length>0)for(const i of o)i&&!0===i.required&&(e=T.required(i.checked),e.valid?(i.noCaption=r.noCaption,i.captionError=null,i.captionType="default"):(i.noCaption=!1,i.captionError=e.message,i.captionType=e.type))}else e=T.required(r.value);if(r.required){e.valid?(r.captionError=null,r.captionType="default"):(r.captionError=e.message,r.captionType=e.type),await x(10);const o=T.selfValidation(r);e.valid&&(o.valid||(r.captionError=o.message,r.captionType=o.type))}let o=r.name,n=r.captionError;!r.hidden&&"error"==r.captionType&&(this.returnCaption=[...Array.from(this.returnCaption),{[o]:n}],this.isValid=!1)}if(r.name&&!this.duplicateInput.includes(r.name)){var e=this.getItemValue(r);e&&null!=e&&null!=e||(e=null),this.formData[r.name]=e}}return this.formData}async handleChange(e){const o=this.isWrapperComponent(e.target.tagName),i=this.isGroupComponent(e.target.tagName);let t;if(o)t=e.target.getInput&&await e.target.getInput()||e.target;else if(i){let o=!1;const i=u(e.target,"bcm-checkbox:not(#bcm-indeterminate-element)");i.length>0&&i.forEach((e=>{e&&!0===e.required&&(o=!0)})),t=Object.assign(Object.assign({},e.target),{required:o})}else t=e.target;const c=e.target.value,r=o&&e.target;var n;o&&(n=await r.isValid());const a=setTimeout((()=>{if(t.required){let r=null;if(o)r=T.required(c,n),r&&(c instanceof Object?0==c.isValid&&(r=T.required("",n)):r=T.required(c,n));else if(i){const o=u(e.target,"bcm-checkbox:not(#bcm-indeterminate-element)");o.length>0&&o.forEach((o=>{o&&!0===o.required&&(r=T.required(o.checked),r.valid?(o.noCaption=e.target.noCaption,o.captionError=null,o.captionType="default"):(o.noCaption=!1,o.captionError=r.message,o.captionType=r.type))}))}else r=T.required(c);r.valid?(t.captionError=null,t.captionType=null):(t.captionError=r.message,t.captionType=r.type)}clearTimeout(a)}));this.value=await this.userFormData()}render(){const o=s(this.hidden?"hidden":null);return e(t,{class:o},e("form",{class:"bcm-form",autocomplete:this.autocomplete?"on":"off"},e("slot",null)))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],S.prototype,"el",void 0),S.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}';const E=class{constructor(e){o(this,e),this.hidden=!1,this.icon=void 0}render(){const{icon:o,hidden:i}=this;return e(t,{class:"bcm-icon fa "+(i?"hidden":"")},e("i",{class:`${o}`}))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],E.prototype,"el",void 0),E.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}.bcm-icon.hidden{display:none}';const q=class{constructor(e){o(this,e),this._id=n.UID(),this.required=!1,this.value=void 0,this.size="medium",this.form=void 0,this.htmlFor=void 0,this.hidden=!1,this.type=a.Status.default,this.tooltip=void 0}render(){const{required:o,value:i,size:c,form:r,htmlFor:n,hidden:a,type:l,tooltip:b}=this,h=s("bcm-label",{hidden:a}),d=e(g,{form:r,htmlFor:n,value:i,size:c,type:l,required:o});return e(t,{class:h},d,b&&e("bcm-tooltip",{message:b,placement:"top",trigger:"hover"},e("bcm-icon",{icon:"far fa-question-circle"})))}get el(){return c(this)}};(function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)})([m()],q.prototype,"el",void 0),q.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}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}';const D=class{constructor(e){o(this,e),this.bcmTooltipShow=i(this,"bcmTooltipShow",7),this.bcmTooltipHide=i(this,"bcmTooltipHide",7),this._id=n.UID(),this.message="",this.placement=l.Placement.top,this.trigger=l.TriggerType.click,this.open=!1,this.color="slate",this.size=l.Size.medium,this.openDelay=0,this.closeDelay=0,this.targetId=void 0,this.tooltip=void 0}emitShow(){this.bcmTooltipShow.emit()}emitHide(){this.bcmTooltipHide.emit()}connectedCallback(){this.tooltip=new v({targetId:this.targetId||this._id,message:this.message,placement:this.placement,color:this.color,trigger:this.trigger,size:this.size,openDelay:this.openDelay,closeDelay:this.closeDelay,emitShow:()=>this.emitShow(),emitHide:()=>this.emitHide()})}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.size=this.size,this.tooltip.openDelay=this.openDelay,this.tooltip.closeDelay=this.closeDelay,this.tooltip.update()}disconnectedCallback(){this.tooltip.destroy()}async show(){this.tooltip.show()}async hide(){this.tooltip.hide()}async toggle(){this.tooltip.toggle()}render(){return e(t,{"aria-describedby":"tooltip",class:"tw-inline-flex tw-h-fit tw-w-fit"},e("slot",null))}get el(){return c(this)}};!function(e,o,i,t){var c,r=arguments.length,n=r<3?o:null===t?t=Object.getOwnPropertyDescriptor(o,i):t;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(e,o,i,t);else for(var a=e.length-1;a>=0;a--)(c=e[a])&&(n=(r<3?c(n):r>3?c(o,i,n):c(o,i))||n);r>3&&n&&Object.defineProperty(o,i,n)}([m()],D.prototype,"el",void 0);export{y as bcm_button,j as bcm_checkbox,I as bcm_checkbox_group,S as bcm_form,E as bcm_icon,q as bcm_label,D as bcm_tooltip}
|