bromcom-ui 2.10.1-rc.3 → 2.10.1-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-000670b6.js +5 -0
- package/dist/bromcom-ui/{p-4466ee8e.entry.js → p-0c54af0a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-00d66472.entry.js → p-10661efa.entry.js} +1 -1
- package/dist/bromcom-ui/{p-33eb3363.entry.js → p-135056db.entry.js} +1 -1
- package/dist/bromcom-ui/{p-819d40ac.entry.js → p-1772657f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-924babc8.entry.js → p-182eccc7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-db4a8955.entry.js → p-1bd9d245.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d6709c22.entry.js → p-1d14255e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a1946330.entry.js → p-2dd5f6ad.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6fb9180b.entry.js → p-2dda9287.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bc7be857.entry.js → p-30618ac6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-268029fe.entry.js → p-359d9ed7.entry.js} +1 -1
- package/dist/bromcom-ui/p-3b705d79.entry.js +5 -0
- package/dist/bromcom-ui/{p-17fe753e.entry.js → p-412a472d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d6d13130.js → p-4246ca4f.js} +1 -1
- package/dist/bromcom-ui/{p-a0b7b378.entry.js → p-4d0046a0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2502e822.entry.js → p-56212e24.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dc071667.entry.js → p-5b05c344.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d808554b.entry.js → p-5f74a6c9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-78999e17.entry.js → p-5ff2ae19.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7c8d62e.entry.js → p-60e4f239.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5a5d8044.entry.js → p-63963eca.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4b302109.entry.js → p-686e614c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-da7cd9da.entry.js → p-7471cbf5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-01f39daf.entry.js → p-76556edf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7a78b646.entry.js → p-78d95876.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cfedafd2.entry.js → p-7908ee85.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4224449f.entry.js → p-7c6238b7.entry.js} +1 -1
- package/dist/bromcom-ui/p-7f7b3465.entry.js +7 -0
- package/dist/bromcom-ui/{p-44151d3b.js → p-823a5d13.js} +1 -1
- package/dist/bromcom-ui/{p-0324ef03.entry.js → p-89513231.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9e399d1e.entry.js → p-8b383614.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9e028802.entry.js → p-8fa7df49.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0d094f36.entry.js → p-96c18c4e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cbfad1d6.entry.js → p-994bc0b5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-817b6add.entry.js → p-99a9bebb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7c3b09b0.js → p-9b7af3c4.js} +1 -1
- package/dist/bromcom-ui/{p-c2defa82.entry.js → p-9c6676f2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f2eac28e.js → p-9d7ec4f0.js} +1 -1
- package/dist/bromcom-ui/{p-978b9318.entry.js → p-9f6fd146.entry.js} +1 -1
- package/dist/bromcom-ui/p-a18f6d11.js +5 -0
- package/dist/bromcom-ui/{p-4337abd9.entry.js → p-a2583501.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8749583f.entry.js → p-aa2f32bb.entry.js} +1 -1
- package/dist/bromcom-ui/p-abc44b58.entry.js +5 -0
- package/dist/bromcom-ui/{p-d7b96b52.entry.js → p-acf307e1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a7c6aad0.entry.js → p-ad8af495.entry.js} +1 -1
- package/dist/bromcom-ui/{p-55dc592b.js → p-b1f4ebad.js} +1 -1
- package/dist/bromcom-ui/{p-e5d5fb4c.entry.js → p-b36fe678.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5de1e0ef.entry.js → p-b5c650c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5e192ac6.js → p-b82041d3.js} +1 -1
- package/dist/bromcom-ui/{p-392bea78.entry.js → p-c761e694.entry.js} +1 -1
- package/dist/bromcom-ui/{p-761e30a2.entry.js → p-ca106284.entry.js} +1 -1
- package/dist/bromcom-ui/p-cb66612c.entry.js +5 -0
- package/dist/bromcom-ui/{p-945f173d.entry.js → p-ced26b93.entry.js} +1 -1
- package/dist/bromcom-ui/{p-40d5890c.entry.js → p-d0fba40e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ddb1a8f5.entry.js → p-d4b23073.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5778114b.entry.js → p-d4fb5ac0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6659c5f0.entry.js → p-d9bbea7b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0466208e.entry.js → p-dad263b2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-18709afc.entry.js → p-ea888f01.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b49785bf.js → p-f0c03fb4.js} +1 -1
- package/dist/bromcom-ui/{p-6077a4f7.entry.js → p-f56a74bd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c9a65271.entry.js → p-f667ee85.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bb2db22f.entry.js → p-fda7b812.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f527cb51.js → p-fe953a0b.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
- package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
- package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
- package/dist/cjs/{bcm-button_11.cjs.entry.js → bcm-button_12.cjs.entry.js} +172 -12
- package/dist/cjs/bcm-caption.cjs.entry.js +4 -4
- package/dist/cjs/bcm-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +3 -3
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
- package/dist/cjs/bcm-chip-group.cjs.entry.js +5 -5
- package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
- package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
- package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-default.cjs.entry.js +2 -2
- package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
- package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-item.cjs.entry.js +2 -2
- package/dist/cjs/bcm-items.cjs.entry.js +2 -2
- package/dist/cjs/bcm-list_3.cjs.entry.js +6 -6
- package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
- package/dist/cjs/bcm-number-input.cjs.entry.js +109 -0
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popover.cjs.entry.js +4 -4
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
- package/dist/cjs/bcm-range.cjs.entry.js +2 -2
- package/dist/cjs/bcm-shortcut.cjs.entry.js +4 -4
- package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/bcm-step.cjs.entry.js +3 -3
- package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
- package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -4
- package/dist/cjs/bcm-table.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
- package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
- package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
- package/dist/cjs/bcm-typography.cjs.entry.js +21 -0
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{generate-21a60bcc.js → generate-eb7fd62b.js} +1 -1
- package/dist/cjs/{global-3484f845.js → global-1210b4ea.js} +1 -1
- package/dist/cjs/{input-template-e77abe10.js → input-template-69fc22ac.js} +1 -1
- package/dist/cjs/{json-parse-decarator-25fc978f.js → json-parse-decarator-2d4f7d88.js} +1 -1
- package/dist/cjs/{label-template-8dc10d0a.js → label-template-a6f51ef2.js} +6 -3
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-13c10320.js → number-helper-952bd974.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
- package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
- package/dist/cjs/{package-7732be0d.js → package-c0fd1b3c.js} +1 -1
- package/dist/cjs/{stepper-states-2f2b9895.js → stepper-states-79ced0f7.js} +1 -1
- package/dist/cjs/{tooltip-helper-dbecd016.js → tooltip-helper-20502cd7.js} +3 -3
- package/dist/cjs/{validators-da3a7804.js → validators-18074a6e.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/label/label.js +1 -1
- package/dist/collection/components/molecules/number-input/number-input.css +137 -0
- package/dist/collection/components/molecules/number-input/number-input.js +425 -0
- package/dist/collection/components/molecules/number-input/number-input.style.js +45 -0
- package/dist/collection/components/molecules/switch/switch.css +1 -0
- package/dist/collection/templates/label-template.js +6 -6
- package/dist/components/bcm-number-input.d.ts +11 -0
- package/dist/components/bcm-number-input.js +157 -0
- package/dist/components/bcm-switch.js +1 -1
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/label.js +7 -4
- package/dist/esm/bcm-accordion.entry.js +2 -2
- package/dist/esm/bcm-alert.entry.js +2 -2
- package/dist/esm/bcm-attendance.entry.js +2 -2
- package/dist/esm/bcm-avatar_2.entry.js +4 -4
- package/dist/esm/bcm-breadcrumb.entry.js +2 -2
- package/dist/esm/bcm-button-group.entry.js +2 -2
- package/dist/esm/{bcm-button_11.entry.js → bcm-button_12.entry.js} +172 -13
- package/dist/esm/bcm-caption.entry.js +4 -4
- package/dist/esm/bcm-card.entry.js +2 -2
- package/dist/esm/bcm-checkbox-group.entry.js +3 -3
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/bcm-chip-group.entry.js +5 -5
- package/dist/esm/bcm-chip.entry.js +2 -2
- package/dist/esm/bcm-collapse.entry.js +2 -2
- package/dist/esm/bcm-color-input.entry.js +4 -4
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +3 -3
- package/dist/esm/bcm-default.entry.js +2 -2
- package/dist/esm/bcm-drawer.entry.js +4 -4
- package/dist/esm/bcm-dropdown.entry.js +3 -3
- package/dist/esm/bcm-expansion-panel.entry.js +2 -2
- package/dist/esm/bcm-form-2.entry.js +2 -2
- package/dist/esm/bcm-input-custom.entry.js +2 -2
- package/dist/esm/bcm-input-dropdown.entry.js +4 -4
- package/dist/esm/bcm-item.entry.js +2 -2
- package/dist/esm/bcm-items.entry.js +2 -2
- package/dist/esm/bcm-list_3.entry.js +6 -6
- package/dist/esm/bcm-menu.entry.js +5 -5
- package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
- package/dist/esm/bcm-modal-2-header.entry.js +4 -4
- package/dist/esm/bcm-modal-2.entry.js +4 -4
- package/dist/esm/bcm-modal.entry.js +2 -2
- package/dist/esm/bcm-number-input.entry.js +105 -0
- package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
- package/dist/esm/bcm-popconfirm.entry.js +2 -2
- package/dist/esm/bcm-popover.entry.js +4 -4
- package/dist/esm/bcm-progress.entry.js +2 -2
- package/dist/esm/bcm-radio-group.entry.js +4 -4
- package/dist/esm/bcm-radio.entry.js +4 -4
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-shortcut.entry.js +4 -4
- package/dist/esm/bcm-skeleton.entry.js +4 -4
- package/dist/esm/bcm-step.entry.js +3 -3
- package/dist/esm/bcm-stepper.entry.js +5 -5
- package/dist/esm/bcm-tab-group.entry.js +4 -4
- package/dist/esm/bcm-tab-item-header.entry.js +4 -4
- package/dist/esm/bcm-tab-item.entry.js +4 -4
- package/dist/esm/bcm-table.entry.js +4 -4
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +2 -2
- package/dist/esm/bcm-typography.entry.js +17 -0
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{generate-c74969a1.js → generate-aae94409.js} +1 -1
- package/dist/esm/{global-784f15f8.js → global-8975e389.js} +1 -1
- package/dist/esm/{input-template-181e38e9.js → input-template-6b597dcd.js} +1 -1
- package/dist/esm/{json-parse-decarator-32f1517d.js → json-parse-decarator-84d6e52c.js} +1 -1
- package/dist/esm/{label-template-989d1700.js → label-template-ad2e8119.js} +6 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-8f83f314.js → number-helper-8dade9f3.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -3
- package/dist/esm/old-bcm-popover.entry.js +2 -2
- package/dist/esm/{package-43f30a7a.js → package-d5af5a81.js} +1 -1
- package/dist/esm/{stepper-states-ea073988.js → stepper-states-6923dc97.js} +1 -1
- package/dist/esm/{tooltip-helper-0b8cfb86.js → tooltip-helper-e0f7ed97.js} +3 -3
- package/dist/esm/{validators-24b24f8e.js → validators-1e7b9d1d.js} +1 -1
- package/dist/types/components/molecules/number-input/number-input.d.ts +29 -0
- package/dist/types/components/molecules/number-input/number-input.style.d.ts +200 -0
- package/dist/types/components.d.ts +53 -0
- package/dist/types/templates/label-template.d.ts +2 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-10973b31.entry.js +0 -5
- package/dist/bromcom-ui/p-217f1b85.entry.js +0 -7
- package/dist/bromcom-ui/p-80ca6d1c.entry.js +0 -5
- package/dist/bromcom-ui/p-8b202d9e.js +0 -5
- package/dist/bromcom-ui/p-d774a258.js +0 -5
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -194
- package/dist/esm/bcm-checkbox_2.entry.js +0 -189
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{r as c,c as e,h as o,H as i,g as r}from"./p-170cf07d.js";import{c as b}from"./p-64fad38b.js";import{C as a}from"./p-a25c8a55.js";import{G as n}from"./p-f2eac28e.js";import{S as t}from"./p-f800e665.js";import{B as l}from"./p-6369b73b.js";import{d as m}from"./p-8c018ae0.js";import{C as h}from"./p-61db1f1f.js";import{I as s}from"./p-9850cbce.js";import"./p-85eedabc.js";import"./p-44151d3b.js";import"./p-6edf985f.js";import"./p-157359d6.js";import"./p-436364c8.js";const d=class{constructor(o){c(this,o),this.blur=e(this,"bcm-blur",7),this.focus=e(this,"bcm-focus",7),this.change=e(this,"bcm-change",7),this.changeCheckbox=e(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=l.Size.medium,this.indeterminate=null,this.color="blue",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}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 m(10),Promise.resolve()}async resetCaption(){return await m(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await m(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(c,e){c!=e&&(this.inputElement.checked=this.indeterminate==l.IndeterminateType.determinate,this.handleChange())}async set(c){"boolean"==typeof c&&await this.check(c)}async get(){return this.checked||!1}async check(c=!0){this.inputElement.checked=c,this.handleChange()}handleKeyUp(c){if(c.keyCode==l.KeyCode.space||c.keyCode==l.KeyCode.enter)return this.disabled||this.readonly||(this.inputElement.checked=!this.inputElement.checked,this.handleChange()),c.stopPropagation(),c.preventDefault(),!1}watchChecked(){this.checked&&this.resetCaption(),this.value=this.checked}setColor(c=this.color){if(!c)return;const e="--bcm-checkbox";return{[`${e}-primary-color-default`]:h.dsColor(c+"-500"),[`${e}-primary-color-hover`]:h.dsColor(c+"-600"),[`${e}-primary-color-focus-visible`]:h.dsColor(c+"-800"),[`${e}-primary-color-active`]:h.dsColor(c+"-700"),[`${e}-secondary-color-default`]:h.dsColor("white"),[`${e}-secondary-color-hover`]:h.dsColor("slate-50"),[`${e}-secondary-color-focus-visible`]:h.dsColor("slate-50"),[`${e}-secondary-color-active`]:h.dsColor("slate-50")}}render(){const{label:c,_id:e,indeterminate:r,hidden:n,disabled:m,checked:h,readonly:s,required:d,caption:x,captionError:p,captionType:k,noCaption:_,size:g}=this,u=b("bcm-checkbox",`bcm-checkbox-size-${g}`,{error:k==l.Status.error,hidden:n,checked:h,disabled:m,required:d,readonly:s}),v=b("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+r,{"bcm-checkbox__label-icon-checked":h}),f=b("bcm-checkbox__label"),y=b("bcm-checkbox__input");return o(i,{tabindex:"0",onFocus:()=>this.focus.emit(this.el),onBlur:()=>this.blur.emit(this.el),style:this.setColor(this.color),class:u,disabled:m},o("span",{hidden:!0},o("slot",null)),c&&o("bcm-label",{htmlFor:`input-${e}`,type:k,value:c,required:d}),o("div",{class:y},o("input",{id:`input-${e}`,type:"checkbox",checked:h,disabled:m,required:d,readonly:s,onChange:()=>{!m&&!s&&this.handleChange()},ref:c=>this.inputElement=c}),o("label",{class:f,htmlFor:`input-${e}`},o("span",{class:v},o("bcm-icon",{icon:"far fa-check"})),o(t,{className:"slot"}))),o(a,{noCaption:_,captionType:k,captionError:p,caption:x}))}get el(){return r(this)}static get watchers(){return{indeterminate:["watchIndeterminate"],checked:["watchChecked"]}}};(function(c,e,o,i){var r,b=arguments.length,a=b<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(c,e,o,i);else for(var n=c.length-1;n>=0;n--)(r=c[n])&&(a=(b<3?r(a):b>3?r(e,o,a):r(e,o))||a);b>3&&a&&Object.defineProperty(e,o,a)})([s()],d.prototype,"el",void 0),d.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}.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 x=class{constructor(e){c(this,e)}render(){return o(i,{class:"bcm-ui-element bcm-ui-content-display"},o("slot",null))}get el(){return r(this)}};export{d as bcm_checkbox,x as bcm_typography}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{h as t}from"./p-170cf07d.js";import{c as e}from"./p-64fad38b.js";import{B as m}from"./p-6369b73b.js";const l=({required:l,value:r,size:a,form:o,htmlFor:b,type:s})=>(s=s||m.Status.default,t("label",{form:o,htmlFor:b,class:e("bcm-ui-element bcm-ui-feedback bcm-label bcm-label__text tw-mb-1 tw-text-slate-600 tw-font-medium ",{"tw-text-1":"small"==(a=a||"medium"),"tw-text-2":"medium"==a,"tw-text-3":"large"==a})},r," ",l&&"*"));export{l as L}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import{s}from"./p-f2eac28e.js";class a{}a.isNumber=a=>s((()=>/^[0-9]+$/i.test(a))),a.convertToNumber=a=>s((()=>Number(a))),a.replaceNumber=a=>s((()=>a.replace(/[^0-9]/g,""))),a.replaceFloat=a=>s((()=>a.replace(/[^0-9.]/g,""))),a.toFixed=(a,e)=>s((()=>a.toFixed(e))),a.parseFloatFixed=(e,r)=>s((()=>parseFloat(a.replaceFloat(e)).toFixed(r))),a.getDecimalLength=a=>s((()=>a.split(".")[1]?a.split(".")[1].length:0)),a.toNumber=a=>s((()=>Number(a.replace(/[^0-9.]/g,""))));export{a as N}
|
|
@@ -1,194 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
'use strict';
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
|
-
|
|
9
|
-
const index = require('./index-c591ecec.js');
|
|
10
|
-
const index$1 = require('./index-95ae50d0.js');
|
|
11
|
-
const captionTemplate = require('./caption-template-6f535b93.js');
|
|
12
|
-
const generate = require('./generate-21a60bcc.js');
|
|
13
|
-
const slotTemplate = require('./slot-template-80b019d5.js');
|
|
14
|
-
const bcm = require('./bcm-3c58a6d5.js');
|
|
15
|
-
const utils = require('./utils-fc077139.js');
|
|
16
|
-
const colorHelper = require('./color-helper-c3a819ea.js');
|
|
17
|
-
const isLoadDecorator = require('./is-load-decorator-15036f37.js');
|
|
18
|
-
require('./_commonjsHelpers-ed84c3ca.js');
|
|
19
|
-
require('./package-7732be0d.js');
|
|
20
|
-
require('./colors-078851ec.js');
|
|
21
|
-
require('./string-helper-3212f4ea.js');
|
|
22
|
-
require('./colors-56282b00.js');
|
|
23
|
-
|
|
24
|
-
const checkboxCss = "@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}.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}";
|
|
25
|
-
|
|
26
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
27
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
28
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
29
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
30
|
-
else
|
|
31
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
32
|
-
if (d = decorators[i])
|
|
33
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
34
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
35
|
-
};
|
|
36
|
-
const BcmCheckbox = class {
|
|
37
|
-
constructor(hostRef) {
|
|
38
|
-
index.registerInstance(this, hostRef);
|
|
39
|
-
this.blur = index.createEvent(this, "bcm-blur", 7);
|
|
40
|
-
this.focus = index.createEvent(this, "bcm-focus", 7);
|
|
41
|
-
this.change = index.createEvent(this, "bcm-change", 7);
|
|
42
|
-
this.changeCheckbox = index.createEvent(this, "bcm-change-checkbox", 7);
|
|
43
|
-
this._id = generate.Generate.UID();
|
|
44
|
-
this.inGroup = false;
|
|
45
|
-
this.value = false;
|
|
46
|
-
this.checked = false;
|
|
47
|
-
this.name = undefined;
|
|
48
|
-
this.disabled = false;
|
|
49
|
-
this.hidden = false;
|
|
50
|
-
this.required = false;
|
|
51
|
-
this.label = undefined;
|
|
52
|
-
this.readonly = false;
|
|
53
|
-
this.size = bcm.Bcm.Size.medium;
|
|
54
|
-
this.indeterminate = null;
|
|
55
|
-
this.color = "blue";
|
|
56
|
-
this.caption = undefined;
|
|
57
|
-
this.noCaption = false;
|
|
58
|
-
this.captionError = undefined;
|
|
59
|
-
this.captionType = bcm.Bcm.Status.default;
|
|
60
|
-
this.captionCache = undefined;
|
|
61
|
-
this.captionTypeCache = undefined;
|
|
62
|
-
}
|
|
63
|
-
connectedCallback() {
|
|
64
|
-
this.captionCache = this.caption;
|
|
65
|
-
this.captionTypeCache = this.captionType;
|
|
66
|
-
this.value = this.checked;
|
|
67
|
-
}
|
|
68
|
-
componentDidRender() {
|
|
69
|
-
this.inputElement.checked = this.checked;
|
|
70
|
-
}
|
|
71
|
-
async onBcmFocus() {
|
|
72
|
-
this.el.focus();
|
|
73
|
-
}
|
|
74
|
-
async onBcmBlur() {
|
|
75
|
-
this.el.blur();
|
|
76
|
-
}
|
|
77
|
-
async setClear() {
|
|
78
|
-
this.check(false);
|
|
79
|
-
this.handleChange();
|
|
80
|
-
await utils.delay(10);
|
|
81
|
-
return Promise.resolve();
|
|
82
|
-
}
|
|
83
|
-
async resetCaption() {
|
|
84
|
-
await utils.delay(10);
|
|
85
|
-
this.caption = this.captionCache;
|
|
86
|
-
this.captionType = this.captionTypeCache;
|
|
87
|
-
this.captionError = null;
|
|
88
|
-
await utils.delay(10);
|
|
89
|
-
return Promise.resolve();
|
|
90
|
-
}
|
|
91
|
-
handleChange() {
|
|
92
|
-
this.checked = this.inputElement.checked;
|
|
93
|
-
this.value = this.checked;
|
|
94
|
-
if (!this.indeterminate) {
|
|
95
|
-
this.changeCheckbox.emit();
|
|
96
|
-
this.change.emit({
|
|
97
|
-
name: this.name,
|
|
98
|
-
value: this.checked
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
watchIndeterminate(newValue, oldValue) {
|
|
103
|
-
if (newValue != oldValue) {
|
|
104
|
-
this.inputElement.checked = this.indeterminate == bcm.Bcm.IndeterminateType.determinate ? true : false;
|
|
105
|
-
this.handleChange();
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
async set(data) {
|
|
109
|
-
if (typeof data === 'boolean') {
|
|
110
|
-
await this.check(data);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
async get() {
|
|
114
|
-
return this.checked || false;
|
|
115
|
-
}
|
|
116
|
-
async check(uncheck = true) {
|
|
117
|
-
this.inputElement.checked = uncheck;
|
|
118
|
-
this.handleChange();
|
|
119
|
-
}
|
|
120
|
-
handleKeyUp(ev) {
|
|
121
|
-
if (ev.keyCode == bcm.Bcm.KeyCode.space || ev.keyCode == bcm.Bcm.KeyCode.enter) {
|
|
122
|
-
if (!this.disabled && !this.readonly) {
|
|
123
|
-
this.inputElement.checked = !this.inputElement.checked;
|
|
124
|
-
this.handleChange();
|
|
125
|
-
}
|
|
126
|
-
ev.stopPropagation();
|
|
127
|
-
ev.preventDefault();
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
watchChecked() {
|
|
132
|
-
if (this.checked) {
|
|
133
|
-
this.resetCaption();
|
|
134
|
-
}
|
|
135
|
-
this.value = this.checked;
|
|
136
|
-
}
|
|
137
|
-
setColor(color = this.color) {
|
|
138
|
-
if (!color)
|
|
139
|
-
return;
|
|
140
|
-
const prefix = `--bcm-checkbox`;
|
|
141
|
-
return {
|
|
142
|
-
[`${prefix}-primary-color-default`]: colorHelper.ColorHelper.dsColor(color + '-500'),
|
|
143
|
-
[`${prefix}-primary-color-hover`]: colorHelper.ColorHelper.dsColor(color + '-600'),
|
|
144
|
-
[`${prefix}-primary-color-focus-visible`]: colorHelper.ColorHelper.dsColor(color + '-800'),
|
|
145
|
-
[`${prefix}-primary-color-active`]: colorHelper.ColorHelper.dsColor(color + '-700'),
|
|
146
|
-
// [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
|
|
147
|
-
[`${prefix}-secondary-color-default`]: colorHelper.ColorHelper.dsColor('white'),
|
|
148
|
-
[`${prefix}-secondary-color-hover`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
149
|
-
[`${prefix}-secondary-color-focus-visible`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
150
|
-
[`${prefix}-secondary-color-active`]: colorHelper.ColorHelper.dsColor('slate-50'),
|
|
151
|
-
// [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
render() {
|
|
155
|
-
const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
|
|
156
|
-
//////
|
|
157
|
-
const bcmCheckboxClass = index$1.classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
|
|
158
|
-
'error': captionType == bcm.Bcm.Status.error,
|
|
159
|
-
hidden,
|
|
160
|
-
checked,
|
|
161
|
-
disabled,
|
|
162
|
-
required,
|
|
163
|
-
readonly,
|
|
164
|
-
});
|
|
165
|
-
const bcmCheckboxIconClass = index$1.classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
|
|
166
|
-
'bcm-checkbox__label-icon-checked': checked,
|
|
167
|
-
});
|
|
168
|
-
const bcmCheckboxLabelClass = index$1.classnames('bcm-checkbox__label');
|
|
169
|
-
const bcmCheckboxInputClass = index$1.classnames('bcm-checkbox__input');
|
|
170
|
-
return (index.h(index.Host, { tabindex: "0", onFocus: () => this.focus.emit(this.el), onBlur: () => this.blur.emit(this.el), style: this.setColor(this.color), class: bcmCheckboxClass, disabled: disabled }, index.h("span", { hidden: true }, index.h("slot", null)), label && index.h("bcm-label", { htmlFor: `input-${_id}`, type: captionType, value: label, required: required }), index.h("div", { class: bcmCheckboxInputClass }, index.h("input", { id: `input-${_id}`, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly, onChange: () => { !disabled && !readonly && (this.handleChange()); }, ref: el => (this.inputElement = el) }), index.h("label", { class: bcmCheckboxLabelClass, htmlFor: `input-${_id}` }, index.h("span", { class: bcmCheckboxIconClass }, index.h("bcm-icon", { icon: "far fa-check" })), index.h(slotTemplate.SlotTemplate, { className: "slot" }))), index.h(captionTemplate.CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
|
|
171
|
-
}
|
|
172
|
-
get el() { return index.getElement(this); }
|
|
173
|
-
static get watchers() { return {
|
|
174
|
-
"indeterminate": ["watchIndeterminate"],
|
|
175
|
-
"checked": ["watchChecked"]
|
|
176
|
-
}; }
|
|
177
|
-
};
|
|
178
|
-
__decorate([
|
|
179
|
-
isLoadDecorator.IsLoad()
|
|
180
|
-
], BcmCheckbox.prototype, "el", void 0);
|
|
181
|
-
BcmCheckbox.style = checkboxCss;
|
|
182
|
-
|
|
183
|
-
const BcmTypography = class {
|
|
184
|
-
constructor(hostRef) {
|
|
185
|
-
index.registerInstance(this, hostRef);
|
|
186
|
-
}
|
|
187
|
-
render() {
|
|
188
|
-
return (index.h(index.Host, { class: "bcm-ui-element bcm-ui-content-display" }, index.h("slot", null)));
|
|
189
|
-
}
|
|
190
|
-
get el() { return index.getElement(this); }
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
exports.bcm_checkbox = BcmCheckbox;
|
|
194
|
-
exports.bcm_typography = BcmTypography;
|
|
@@ -1,189 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Built with Stencil
|
|
3
|
-
* Copyright (c) Bromcom.
|
|
4
|
-
*/
|
|
5
|
-
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-0615c2b8.js';
|
|
6
|
-
import { c as classnames } from './index-00c8a8f7.js';
|
|
7
|
-
import { C as CaptionTemplate } from './caption-template-0c32ce16.js';
|
|
8
|
-
import { G as Generate } from './generate-c74969a1.js';
|
|
9
|
-
import { S as SlotTemplate } from './slot-template-9234df88.js';
|
|
10
|
-
import { B as Bcm } from './bcm-0f9cc27c.js';
|
|
11
|
-
import { d as delay } from './utils-57652744.js';
|
|
12
|
-
import { C as ColorHelper } from './color-helper-845ba523.js';
|
|
13
|
-
import { I as IsLoad } from './is-load-decorator-8277e3b8.js';
|
|
14
|
-
import './_commonjsHelpers-7002e5de.js';
|
|
15
|
-
import './package-43f30a7a.js';
|
|
16
|
-
import './colors-ebea297f.js';
|
|
17
|
-
import './string-helper-8f5da9ec.js';
|
|
18
|
-
import './colors-1d7854ea.js';
|
|
19
|
-
|
|
20
|
-
const checkboxCss = "@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}.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}";
|
|
21
|
-
|
|
22
|
-
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
23
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
25
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
26
|
-
else
|
|
27
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
28
|
-
if (d = decorators[i])
|
|
29
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
30
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
31
|
-
};
|
|
32
|
-
const BcmCheckbox = class {
|
|
33
|
-
constructor(hostRef) {
|
|
34
|
-
registerInstance(this, hostRef);
|
|
35
|
-
this.blur = createEvent(this, "bcm-blur", 7);
|
|
36
|
-
this.focus = createEvent(this, "bcm-focus", 7);
|
|
37
|
-
this.change = createEvent(this, "bcm-change", 7);
|
|
38
|
-
this.changeCheckbox = createEvent(this, "bcm-change-checkbox", 7);
|
|
39
|
-
this._id = Generate.UID();
|
|
40
|
-
this.inGroup = false;
|
|
41
|
-
this.value = false;
|
|
42
|
-
this.checked = false;
|
|
43
|
-
this.name = undefined;
|
|
44
|
-
this.disabled = false;
|
|
45
|
-
this.hidden = false;
|
|
46
|
-
this.required = false;
|
|
47
|
-
this.label = undefined;
|
|
48
|
-
this.readonly = false;
|
|
49
|
-
this.size = Bcm.Size.medium;
|
|
50
|
-
this.indeterminate = null;
|
|
51
|
-
this.color = "blue";
|
|
52
|
-
this.caption = undefined;
|
|
53
|
-
this.noCaption = false;
|
|
54
|
-
this.captionError = undefined;
|
|
55
|
-
this.captionType = Bcm.Status.default;
|
|
56
|
-
this.captionCache = undefined;
|
|
57
|
-
this.captionTypeCache = undefined;
|
|
58
|
-
}
|
|
59
|
-
connectedCallback() {
|
|
60
|
-
this.captionCache = this.caption;
|
|
61
|
-
this.captionTypeCache = this.captionType;
|
|
62
|
-
this.value = this.checked;
|
|
63
|
-
}
|
|
64
|
-
componentDidRender() {
|
|
65
|
-
this.inputElement.checked = this.checked;
|
|
66
|
-
}
|
|
67
|
-
async onBcmFocus() {
|
|
68
|
-
this.el.focus();
|
|
69
|
-
}
|
|
70
|
-
async onBcmBlur() {
|
|
71
|
-
this.el.blur();
|
|
72
|
-
}
|
|
73
|
-
async setClear() {
|
|
74
|
-
this.check(false);
|
|
75
|
-
this.handleChange();
|
|
76
|
-
await delay(10);
|
|
77
|
-
return Promise.resolve();
|
|
78
|
-
}
|
|
79
|
-
async resetCaption() {
|
|
80
|
-
await delay(10);
|
|
81
|
-
this.caption = this.captionCache;
|
|
82
|
-
this.captionType = this.captionTypeCache;
|
|
83
|
-
this.captionError = null;
|
|
84
|
-
await delay(10);
|
|
85
|
-
return Promise.resolve();
|
|
86
|
-
}
|
|
87
|
-
handleChange() {
|
|
88
|
-
this.checked = this.inputElement.checked;
|
|
89
|
-
this.value = this.checked;
|
|
90
|
-
if (!this.indeterminate) {
|
|
91
|
-
this.changeCheckbox.emit();
|
|
92
|
-
this.change.emit({
|
|
93
|
-
name: this.name,
|
|
94
|
-
value: this.checked
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
watchIndeterminate(newValue, oldValue) {
|
|
99
|
-
if (newValue != oldValue) {
|
|
100
|
-
this.inputElement.checked = this.indeterminate == Bcm.IndeterminateType.determinate ? true : false;
|
|
101
|
-
this.handleChange();
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
async set(data) {
|
|
105
|
-
if (typeof data === 'boolean') {
|
|
106
|
-
await this.check(data);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
async get() {
|
|
110
|
-
return this.checked || false;
|
|
111
|
-
}
|
|
112
|
-
async check(uncheck = true) {
|
|
113
|
-
this.inputElement.checked = uncheck;
|
|
114
|
-
this.handleChange();
|
|
115
|
-
}
|
|
116
|
-
handleKeyUp(ev) {
|
|
117
|
-
if (ev.keyCode == Bcm.KeyCode.space || ev.keyCode == Bcm.KeyCode.enter) {
|
|
118
|
-
if (!this.disabled && !this.readonly) {
|
|
119
|
-
this.inputElement.checked = !this.inputElement.checked;
|
|
120
|
-
this.handleChange();
|
|
121
|
-
}
|
|
122
|
-
ev.stopPropagation();
|
|
123
|
-
ev.preventDefault();
|
|
124
|
-
return false;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
watchChecked() {
|
|
128
|
-
if (this.checked) {
|
|
129
|
-
this.resetCaption();
|
|
130
|
-
}
|
|
131
|
-
this.value = this.checked;
|
|
132
|
-
}
|
|
133
|
-
setColor(color = this.color) {
|
|
134
|
-
if (!color)
|
|
135
|
-
return;
|
|
136
|
-
const prefix = `--bcm-checkbox`;
|
|
137
|
-
return {
|
|
138
|
-
[`${prefix}-primary-color-default`]: ColorHelper.dsColor(color + '-500'),
|
|
139
|
-
[`${prefix}-primary-color-hover`]: ColorHelper.dsColor(color + '-600'),
|
|
140
|
-
[`${prefix}-primary-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
|
|
141
|
-
[`${prefix}-primary-color-active`]: ColorHelper.dsColor(color + '-700'),
|
|
142
|
-
// [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
|
|
143
|
-
[`${prefix}-secondary-color-default`]: ColorHelper.dsColor('white'),
|
|
144
|
-
[`${prefix}-secondary-color-hover`]: ColorHelper.dsColor('slate-50'),
|
|
145
|
-
[`${prefix}-secondary-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
|
|
146
|
-
[`${prefix}-secondary-color-active`]: ColorHelper.dsColor('slate-50'),
|
|
147
|
-
// [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
render() {
|
|
151
|
-
const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
|
|
152
|
-
//////
|
|
153
|
-
const bcmCheckboxClass = classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
|
|
154
|
-
'error': captionType == Bcm.Status.error,
|
|
155
|
-
hidden,
|
|
156
|
-
checked,
|
|
157
|
-
disabled,
|
|
158
|
-
required,
|
|
159
|
-
readonly,
|
|
160
|
-
});
|
|
161
|
-
const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
|
|
162
|
-
'bcm-checkbox__label-icon-checked': checked,
|
|
163
|
-
});
|
|
164
|
-
const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
|
|
165
|
-
const bcmCheckboxInputClass = classnames('bcm-checkbox__input');
|
|
166
|
-
return (h(Host, { tabindex: "0", onFocus: () => this.focus.emit(this.el), onBlur: () => this.blur.emit(this.el), style: this.setColor(this.color), class: bcmCheckboxClass, disabled: disabled }, h("span", { hidden: true }, h("slot", null)), label && h("bcm-label", { htmlFor: `input-${_id}`, type: captionType, value: label, required: required }), h("div", { class: bcmCheckboxInputClass }, h("input", { id: `input-${_id}`, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly, onChange: () => { !disabled && !readonly && (this.handleChange()); }, ref: el => (this.inputElement = el) }), h("label", { class: bcmCheckboxLabelClass, htmlFor: `input-${_id}` }, h("span", { class: bcmCheckboxIconClass }, h("bcm-icon", { icon: "far fa-check" })), h(SlotTemplate, { className: "slot" }))), h(CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption })));
|
|
167
|
-
}
|
|
168
|
-
get el() { return getElement(this); }
|
|
169
|
-
static get watchers() { return {
|
|
170
|
-
"indeterminate": ["watchIndeterminate"],
|
|
171
|
-
"checked": ["watchChecked"]
|
|
172
|
-
}; }
|
|
173
|
-
};
|
|
174
|
-
__decorate([
|
|
175
|
-
IsLoad()
|
|
176
|
-
], BcmCheckbox.prototype, "el", void 0);
|
|
177
|
-
BcmCheckbox.style = checkboxCss;
|
|
178
|
-
|
|
179
|
-
const BcmTypography = class {
|
|
180
|
-
constructor(hostRef) {
|
|
181
|
-
registerInstance(this, hostRef);
|
|
182
|
-
}
|
|
183
|
-
render() {
|
|
184
|
-
return (h(Host, { class: "bcm-ui-element bcm-ui-content-display" }, h("slot", null)));
|
|
185
|
-
}
|
|
186
|
-
get el() { return getElement(this); }
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export { BcmCheckbox as bcm_checkbox, BcmTypography as bcm_typography };
|