bromcom-ui 2.8.0-rc.11 → 2.8.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-d377d1c5.entry.js → p-046013b4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c6f1b199.entry.js → p-0c432b59.entry.js} +1 -1
- package/dist/bromcom-ui/{p-758a3979.js → p-18c70f8e.js} +1 -1
- package/dist/bromcom-ui/{p-804f4aba.entry.js → p-1d9d63c0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b8aa6104.entry.js → p-277add9e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3d1d257e.entry.js → p-2c3c1ec5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-aa3999e6.js → p-342eb383.js} +1 -1
- package/dist/bromcom-ui/{p-02692383.entry.js → p-36d318ed.entry.js} +1 -1
- package/dist/bromcom-ui/{p-237fc595.entry.js → p-3db48b38.entry.js} +1 -1
- package/dist/bromcom-ui/p-3f2e1e6c.entry.js +5 -0
- package/dist/bromcom-ui/{p-c7441f19.entry.js → p-43261a63.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7238a0e3.entry.js → p-45b13527.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d42921e7.js → p-4de5fd07.js} +1 -1
- package/dist/bromcom-ui/p-4f89dd4b.entry.js +5 -0
- package/dist/bromcom-ui/{p-79c85d60.entry.js → p-51665666.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fd9a67d7.entry.js → p-5618d888.entry.js} +1 -1
- package/dist/bromcom-ui/{p-42af29f7.entry.js → p-567bea9a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf57eb9e.entry.js → p-5dffda18.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e31f3564.entry.js → p-60b8fc10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a498f8cb.entry.js → p-663edd65.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e6150bea.entry.js → p-679b3749.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0caef6f7.entry.js → p-67b25257.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2848a3b5.entry.js → p-683dba31.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3cc6e75e.entry.js → p-6b783cec.entry.js} +1 -1
- package/dist/bromcom-ui/{p-39e9bcaf.js → p-73a0b034.js} +1 -1
- package/dist/bromcom-ui/{p-641678da.entry.js → p-76f713db.entry.js} +1 -1
- package/dist/bromcom-ui/{p-97a1ad17.entry.js → p-78886eae.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2cf162c1.entry.js → p-7b528159.entry.js} +1 -1
- package/dist/bromcom-ui/{p-86397cea.entry.js → p-7c081287.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3e9f517e.entry.js → p-7d65ae3a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b263fa84.entry.js → p-87b6a347.entry.js} +1 -1
- package/dist/bromcom-ui/{p-702ea819.entry.js → p-8e93eb1e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4ac0f46a.entry.js → p-94b55491.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4bc5f980.entry.js → p-953df79b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf387e94.entry.js → p-99f4296a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b782b1c2.entry.js → p-a22f9c41.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f166f6c6.js → p-a53fc73e.js} +1 -1
- package/dist/bromcom-ui/{p-6afa4844.entry.js → p-a9c7b83f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a3e51939.entry.js → p-b14cdb1b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fa86c3ea.entry.js → p-bf5f758d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8e000873.entry.js → p-c2a98b80.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e41b4807.js → p-c4cd8330.js} +1 -1
- package/dist/bromcom-ui/{p-9ba90782.entry.js → p-c519a9e5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fcfd5502.entry.js → p-d3a63dca.entry.js} +1 -1
- package/dist/bromcom-ui/{p-27d87114.entry.js → p-d43144bc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cb984720.entry.js → p-d542f7b2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-57890ee9.entry.js → p-d58698e4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7edf9f12.entry.js → p-d60cdfb0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-46751172.entry.js → p-d87ba19f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-87d51809.entry.js → p-e1f8ef01.entry.js} +1 -1
- package/dist/bromcom-ui/{p-75510c00.entry.js → p-e4a38527.entry.js} +1 -1
- package/dist/bromcom-ui/{p-58969dc8.js → p-e78c6559.js} +1 -1
- package/dist/bromcom-ui/{p-1d46ae31.entry.js → p-eb7dee6d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-881b18a9.entry.js → p-f8207ebf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b1ff40f9.entry.js → p-f939dbd1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-743713f0.entry.js → p-fa0daf14.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f2a41a6a.entry.js → p-fa1da8a0.entry.js} +1 -1
- package/dist/bromcom-ui/p-faa12229.entry.js +5 -0
- 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 +15 -3
- 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 +12 -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/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{generate-957759ec.js → generate-5aa09973.js} +1 -1
- package/dist/cjs/{input-template-743a5a26.js → input-template-a2bb0ef0.js} +1 -1
- package/dist/cjs/{json-parse-decarator-0023854b.js → json-parse-decarator-94a59513.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-88714a49.js → number-helper-48770c96.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-f636e6e0.js → stepper-states-42fcfefa.js} +1 -1
- package/dist/cjs/{tooltip-helper-c9744900.js → tooltip-helper-4b61fe1e.js} +3 -3
- package/dist/cjs/{validators-04ac79e1.js → validators-2308e864.js} +1 -1
- package/dist/collection/components/molecules/dropdown/dropdown.js +48 -1
- package/dist/collection/components/molecules/menu/menu.js +38 -0
- package/dist/components/bcm-dropdown.js +16 -2
- package/dist/components/generate.js +1 -1
- package/dist/components/menu.js +10 -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 +15 -3
- 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 +12 -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/bromcom-ui.js +1 -1
- package/dist/esm/{generate-a25d9ab0.js → generate-0bd0c3aa.js} +1 -1
- package/dist/esm/{input-template-40fed069.js → input-template-93ff212c.js} +1 -1
- package/dist/esm/{json-parse-decarator-2b2b5be3.js → json-parse-decarator-95e976c0.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-257255a9.js → number-helper-d832361b.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-148e0857.js → stepper-states-400ea0c4.js} +1 -1
- package/dist/esm/{tooltip-helper-ece3c488.js → tooltip-helper-72c37c9c.js} +3 -3
- package/dist/esm/{validators-5250554c.js → validators-f8333cf5.js} +1 -1
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +4 -0
- package/dist/types/components/molecules/menu/menu.d.ts +3 -0
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-14cc943b.entry.js +0 -5
- package/dist/bromcom-ui/p-a487f1ec.entry.js +0 -5
- package/dist/bromcom-ui/p-ea079e82.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as e,f as i,h as s,H as a,g as o}from"./p-da1055cb.js";import{I as n}from"./p-c23b6240.js";import{G as r,s as h}from"./p-
|
|
5
|
+
import{r as t,c as e,f as i,h as s,H as a,g as o}from"./p-da1055cb.js";import{I as n}from"./p-c23b6240.js";import{G as r,s as h}from"./p-73a0b034.js";import{S as p}from"./p-8d0ca8c2.js";import{B as l}from"./p-a429e85b.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const c=["BCM-INPUT","BCM-TEXTAREA","BCM-SWITCH","BCM-CHECKBOX","BCM-RADIO-GROUP","BCM-CHECKBOX-GROUP","BCM-RANGE","BCM-FORM","BCM-FORM-GROUP","BCM-LIST","BCM-COLORPICKER","BCM-DATE-PICKER","BCM-TIME-PICKER","BCM-DATETIME-PICKER","BCM-SELECT","BCM-LISTBOX"];const x=class{constructor(i){t(this,i),this.bcmForm=e(this,"bcm-form",7),this.isLoad=!1,this.formData={},this.formObj=new Map,this._id=r.UID(),this.validation=!1}componentDidLoad(){this.isLoad=!0,i(this)}componentIsValid(t){if(!t.hidden){this.checkIsGroup(t);const e=["bcm-checkbox","bcm-switch"].includes(p.lowercase(t.tagName))?0==t.value:p.isNullOrEmpty(t.value);t.required&&(e?(t.captionError=l.FormErrorMessages.required,t.captionType="error",this.formObj.set(t.id,{name:t.name,valid:!1,errorDetails:t.captionError})):(t.captionError=null,t.captionType="default",this.formObj.delete(t.id)))}}isGroup(t){return["bcm-checkbox-group"].includes(p.lowercase(t.tagName))}checkIsGroup(t){if(this.isGroup(t))for(let e of Array.from(t.querySelectorAll("bcm-checkbox")))e&&this.componentIsValid(e)}changeCheckboxGroup(t){const e=t.target,{changed:i}=t.detail,s=Array.from(e.querySelectorAll("bcm-checkbox"));for(let t of s)t.id==i.element.id&&(t.value=i.event.value,this.componentIsValid(t))}bcmComponentList(){return h((()=>Array.from(this.el.querySelectorAll("*")).filter((t=>c.includes(t.tagName)&&(!t["s-hn"]||"BCM-FORM-2"==t["s-hn"]))).filter(Boolean)),[])}formResponse(){const t={formData:this.formData,isValid:0==this.formObj.size,errorDetails:Object.assign({},this.formObj.size>0&&Array.from(this.formObj).map((([t,e])=>({[e.name]:e.errorDetails})))),message:0==this.formObj.size?"":"Please fill in all inputs"};return this.bcmForm.emit(t),t}async setMethodType(t){const{isLoad:e,validation:i}=this;if(e)for(const e of this.bcmComponentList())try{await e[t](),"setClear"==t&&i&&this.componentIsValid(e)}catch(i){console.error(e.nodeName,t,i)}return Promise.resolve()}async submit(){const{isLoad:t,validation:e}=this;if(t)for(const t of this.bcmComponentList()){const{name:i,value:s}=t;this.formData[i]=p.isNullOrEmpty(s)?null:s,e&&this.componentIsValid(t)}return Promise.resolve(this.formResponse())}async set(t){var e,i,s;if(this.isLoad&&t&&(null===(e=this.bcmComponentList())||void 0===e?void 0:e.length)>0)for(let e of Object.keys(t)){const a=null!==(s=null===(i=this.bcmComponentList())||void 0===i?void 0:i.find((t=>t.name==e)))&&void 0!==s?s:{};if(a)try{await a.set(t[e]),this.componentIsValid(a)}catch(t){console.warn("set: ",e,a.nodeName)}}}async get(){var t;let e={};if((null===(t=this.bcmComponentList())||void 0===t?void 0:t.length)>0)for(let t of this.bcmComponentList()){const i=await t.get();e=Object.assign(Object.assign({},e),{[t.name]:p.isNullOrEmpty(i)?null:i})}return Promise.resolve(e)}async resetCaption(){return Promise.resolve(await this.setMethodType("resetCaption"))}async setClear(){return this.formData={},this.formObj=new Map,Promise.resolve(await this.setMethodType("setClear"))}onChange(t){const{isLoad:e,validation:i}=this;if(e){const e=t.target,s=e&&e.tagName.toLowerCase().startsWith("bcm-");if(i&&s){if(this.isGroup(e))return this.changeCheckboxGroup(t);this.componentIsValid(e)}}}render(){return s(a,null,s("slot",null))}get el(){return o(this)}};(function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);o>3&&n&&Object.defineProperty(e,i,n)})([n()],x.prototype,"el",void 0),x.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}';export{x as bcm_form_2}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as n,c as r,g as t,h as e,H as u}from"./p-da1055cb.js";import{c as i,a as o}from"./p-6f56f8ca.js";import{I as l}from"./p-c23b6240.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as a}from"./p-
|
|
5
|
+
import{r as n,c as r,g as t,h as e,H as u}from"./p-da1055cb.js";import{c as i,a as o}from"./p-6f56f8ca.js";import{I as l}from"./p-c23b6240.js";import"./p-843905c8.js";import"./p-626a65e9.js";import{G as a}from"./p-73a0b034.js";import"./p-a53fc73e.js";import"./p-8d0ca8c2.js";import"./p-4de5fd07.js";import"./p-7e44e6b5.js";import{d as c}from"./p-8c018ae0.js";import{F as f}from"./p-b60bcecf.js";import{a as s}from"./p-a429e85b.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";
|
|
6
6
|
/*
|
|
7
7
|
object-assign
|
|
8
8
|
(c) Sindre Sorhus
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as e,H as r,g as s}from"./p-da1055cb.js";import{I as o}from"./p-c23b6240.js";import{G as i}from"./p-
|
|
5
|
+
import{r as t,h as e,H as r,g as s}from"./p-da1055cb.js";import{I as o}from"./p-c23b6240.js";import{G as i}from"./p-73a0b034.js";import{c as l}from"./p-d65a1e21.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const a=class{constructor(e){t(this,e),this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleChange=t=>{this.value=t.target.value,console.log(t)},this.handleInput=t=>{console.log(t)},this._id=i.UID(),this.name=void 0,this.value=void 0,this.type="text",this.label=void 0,this.required=!1,this.disabled=!1,this.readonly=!1,this.placeholder=void 0,this.fullwidth=!1,this.hasFocus=!1}render(){const{_id:t,type:s,name:o,value:i,label:a,required:n,fullwidth:w,placeholder:d,disabled:c,readonly:h}=this;return e(r,{class:l("tw-inline-flex tw-w-full tw-max-w-[256px] tw-flex-col",{"tw-max-w-full":w})},a&&e("bcm-label",{value:a,required:n,htmlFor:t}),e("div",{class:l("tw-relative tw-flex tw-w-full tw-flex-row tw-items-stretch tw-rounded tw-border tw-p-0 hover:tw-border-primary-600",{"tw-cursor-not-allowed tw-bg-secondary-50":this.disabled,"tw-cursor-text":!this.disabled,"tw-cursor-default tw-bg-secondary-50":this.readonly,"tw-border-primary-500 tw-bg-secondary-50":this.hasFocus,"tw-border-secondary-300 tw-bg-white":!this.hasFocus})},e("input",{id:t,name:o,type:s,value:i,"data-value":i,placeholder:d,required:n,disabled:c,readonly:h,class:l("tw-text-overflow-ellipsis","tw-rounded-none","tw-flex-1","tw-cursor-inherit","tw-w-full","tw-appearance-none","tw-overflow-hidden","tw-whitespace-nowrap","tw-border-none","tw-bg-transparent","tw-p-2","tw-text-secondary-600","tw-placeholder-secondary-300","tw-outline-none"),onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:t=>this.handleChange(t),onInput:this.handleInput})))}get el(){return s(this)}};!function(t,e,r,s){var o,i=arguments.length,l=i<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,r):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,r,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(l=(i<3?o(l):i>3?o(e,r,l):o(e,r))||l);i>3&&l&&Object.defineProperty(e,r,l)}([o()],a.prototype,"el",void 0);export{a as bcm_input_custom}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as e,H as i,g as s}from"./p-da1055cb.js";import{c as a}from"./p-d65a1e21.js";import{I as h}from"./p-c23b6240.js";import{D as n}from"./p-626a65e9.js";import{G as p}from"./p-
|
|
5
|
+
import{r as t,h as e,H as i,g as s}from"./p-da1055cb.js";import{c as a}from"./p-d65a1e21.js";import{I as h}from"./p-c23b6240.js";import{D as n}from"./p-626a65e9.js";import{G as p}from"./p-73a0b034.js";import{B as r}from"./p-a429e85b.js";import{d as l}from"./p-8c018ae0.js";import"./p-6f56f8ca.js";import"./p-4aa0e6b1.js";const o=class{constructor(e){t(this,e),this._id=p.UID(),this.date=new Date,this.value=void 0,this.endDate=null,this.range=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.disabledDates="",this.disabled=!1,this.noCaption=!1,this.caption="",this.captionError=void 0,this.captionType="default",this.alignment=void 0,this._internal_id=(4*Math.random()).toString(16).replace(".",""),this.placement=r.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.stateStartDate=null,this.stateEndDate=null}handleStartDateChange(){this.handleDate()}handleEndDateChange(){this.handleDate()}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 setClear(){return await this.picker.setClear(),await l(10),Promise.resolve()}async setStartDate(t){t?(t=n.convertTimeStampToDate(new Date(t).getTime()),this.stateStartDate=t):this.setClear()}async setEndDate(t){t?(t=n.convertTimeStampToDate(new Date(t).getTime()),this.stateEndDate=t):this.setClear()}handleDate(){this.range?this.stateStartDate&&this.stateEndDate&&this.set(this.stateStartDate+"-"+this.stateEndDate):this.set(this.stateStartDate)}async getInput(){return await this.picker.getInput()}async open(){return await this.picker.open()}async getValue(){return this.value}async isValid(){return await this.picker.isValid()}async resetCaption(){return await l(10),await this.picker.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}render(){const t=a(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent});return e(i,{class:t},e("bcm-datetime-picker",{"linked-component":this.linkedComponent,id:this._id,name:this.name,type:this.range?"range":"date",date:this.date,placeholder:this.placeholder,fullWidth:this.fullWidth,ref:t=>this.picker=t,required:this.required,clearable:this.clearable,label:this.label,"end-date":this.endDate,disabled:this.disabled,disabledDates:this.disabledDates,"on-bcm-load":()=>this.handlePickerLoad(),"on-bcm-change":t=>this.handlePickerChange(t),noCaption:this.noCaption,caption:this.caption,captionError:this.captionError,captionType:this.captionType,alignment:this.alignment,placement:this.placement}))}get el(){return s(this)}static get watchers(){return{stateStartDate:["handleStartDateChange"],stateEndDate:["handleEndDateChange"]}}};(function(t,e,i,s){var a,h=arguments.length,n=h<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(n=(h<3?a(n):h>3?a(e,i,n):a(e,i))||n);h>3&&n&&Object.defineProperty(e,i,n)})([h()],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_date_picker}
|
|
@@ -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 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}
|
|
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-73a0b034.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}
|
|
@@ -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-73a0b034.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{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}
|
|
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-73a0b034.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-a53fc73e.js";import"./p-4de5fd07.js";import{T as v}from"./p-342eb383.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}
|
|
@@ -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.12-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{r as e,h as i,H as t,g as a}from"./p-da1055cb.js";import{c as p}from"./p-d65a1e21.js";import{I as r}from"./p-c23b6240.js";import{C as s}from"./p-843905c8.js";import{G as o}from"./p-
|
|
5
|
+
import{r as e,h as i,H as t,g as a}from"./p-da1055cb.js";import{c as p}from"./p-d65a1e21.js";import{I as r}from"./p-c23b6240.js";import{C as s}from"./p-843905c8.js";import{G as o}from"./p-73a0b034.js";import{S as n}from"./p-8d0ca8c2.js";import{S as c}from"./p-79fd816c.js";import"./p-6f56f8ca.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4aa0e6b1.js";import"./p-a429e85b.js";const l=class{constructor(i){e(this,i),this.modalSlots={},this._id=o.UID(),this.hidden=!1,this.color="slate",this.header=void 0,this.footer=void 0}connectedCallback(){const e=this.el.querySelectorAll("bcm-card-header, bcm-card-footer");e&&e.forEach((e=>{let i=n.lowercase(n.split(e.nodeName,"-").pop());if(e.slot=i,"header"===i){let i=e.getAttribute("color");i&&(i="white"==i?i:i+"-50",e.setAttribute("style",`background-color: ${s.dsColor(i)}`))}e.classList.add(`bcm-card__${i}`),this.modalSlots[i]=e}))}render(){const e=p("bcm-card",this.hidden?"hidden":null);return i(t,{class:e},i((()=>this.modalSlots.header&&i("slot",{name:"header"})),null),i("div",{class:"bcm-card__body"},i(c,null)),i((()=>this.modalSlots.footer&&i("slot",{name:"footer"})),null))}get el(){return a(this)}};(function(e,i,t,a){var p,r=arguments.length,s=r<3?i:null===a?a=Object.getOwnPropertyDescriptor(i,t):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,i,t,a);else for(var o=e.length-1;o>=0;o--)(p=e[o])&&(s=(r<3?p(s):r>3?p(i,t,s):p(i,t))||s);r>3&&s&&Object.defineProperty(i,t,s)})([r()],l.prototype,"el",void 0),l.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-card{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1);box-sizing:border-box}.bcm-card__header,.bcm-card__body,.bcm-card__footer{display:block;width:100%}.bcm-card__header{border-radius:8px 8px 0 0;padding:12px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-card__body{padding:12px 24px}.bcm-card__footer{padding:12px 24px;border-radius:0 0 8px 8px}';export{l as bcm_card}
|