bromcom-ui 2.8.1-rc.9 → 2.9.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-016a9d78.entry.js → p-02afc93f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d657a132.entry.js → p-0906c9b4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ab51aa2b.entry.js → p-0d4a552d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3c15cdb7.entry.js → p-0ee4e283.entry.js} +1 -1
- package/dist/bromcom-ui/{p-494df97b.entry.js → p-0fdbbbe8.entry.js} +1 -1
- package/dist/bromcom-ui/p-14378828.entry.js +5 -0
- package/dist/bromcom-ui/{p-92924b7e.entry.js → p-15fa3329.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5de5cb0d.entry.js → p-1c5a2111.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2053339a.entry.js → p-20ac20d4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-daf2ed63.entry.js → p-236def30.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9b0855f6.entry.js → p-24a733ff.entry.js} +1 -1
- package/dist/bromcom-ui/p-24aefda6.js +1 -1
- package/dist/bromcom-ui/p-2cb4a196.entry.js +5 -0
- package/dist/bromcom-ui/{p-b3584d64.js → p-2ea24a6e.js} +1 -1
- package/dist/bromcom-ui/{p-6af5bc87.entry.js → p-334e3147.entry.js} +1 -1
- package/dist/bromcom-ui/{p-125d13c0.entry.js → p-344a4674.entry.js} +1 -1
- package/dist/bromcom-ui/p-3ad545f0.entry.js +5 -0
- package/dist/bromcom-ui/{p-7b5ddef4.entry.js → p-40a5e4fc.entry.js} +1 -1
- package/dist/bromcom-ui/p-440afdfa.entry.js +5 -0
- package/dist/bromcom-ui/{p-6cf8afd4.entry.js → p-4b34b3f9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6b692c54.entry.js → p-55001c80.entry.js} +1 -1
- package/dist/bromcom-ui/{p-73f70b2f.entry.js → p-56896e3a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f8b03d4d.entry.js → p-5f288af5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-284542a6.entry.js → p-70b428e8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-40d258ce.entry.js → p-72b7fda0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a6f5fe0b.entry.js → p-7658ec26.entry.js} +1 -1
- package/dist/bromcom-ui/p-80a43b79.js +5 -0
- package/dist/bromcom-ui/p-87df3ffb.js +5 -0
- package/dist/bromcom-ui/{p-bc7ccd4e.entry.js → p-8864e6af.entry.js} +1 -1
- package/dist/bromcom-ui/p-89b21290.entry.js +5 -0
- package/dist/bromcom-ui/{p-90981da9.entry.js → p-89f7a5c7.entry.js} +1 -1
- package/dist/bromcom-ui/p-8d0ca8c2.js +1 -1
- package/dist/bromcom-ui/{p-34efb8eb.entry.js → p-9b10d955.entry.js} +1 -1
- package/dist/bromcom-ui/{p-585fbc98.entry.js → p-9c7e9b5d.entry.js} +1 -1
- package/dist/bromcom-ui/p-9eb2a75d.entry.js +5 -0
- package/dist/bromcom-ui/p-a0a3fd94.entry.js +5 -0
- package/dist/bromcom-ui/{p-b94bdddf.entry.js → p-a2046742.entry.js} +1 -1
- package/dist/bromcom-ui/p-a429e85b.js +1 -1
- package/dist/bromcom-ui/{p-997c4fbd.entry.js → p-a49ded35.entry.js} +1 -1
- package/dist/bromcom-ui/p-a97ee69d.entry.js +19 -0
- package/dist/bromcom-ui/{p-8114163e.entry.js → p-ab55def1.entry.js} +1 -1
- package/dist/bromcom-ui/p-b60bcecf.js +1 -1
- package/dist/bromcom-ui/{p-a3453263.js → p-b94fa326.js} +1 -1
- package/dist/bromcom-ui/{p-e28100e6.entry.js → p-be6d0712.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e60380c6.entry.js → p-c9b10de5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0a404cf9.entry.js → p-cad8f786.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3642f316.entry.js → p-cf7af1fc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e17e1e3e.entry.js → p-d011a407.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8c2bf4ad.entry.js → p-d1598dd5.entry.js} +1 -1
- package/dist/bromcom-ui/p-d3cb8d25.js +5 -0
- package/dist/bromcom-ui/{p-ee75e899.entry.js → p-dcb2ae7f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-09d1d69d.entry.js → p-dce2079e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-83bae50b.entry.js → p-e008411a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fe1532b5.js → p-e0f440b4.js} +1 -1
- package/dist/bromcom-ui/{p-bfb70c75.entry.js → p-e3cafc0d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0372f13a.entry.js → p-e606c42b.entry.js} +1 -1
- package/dist/bromcom-ui/p-e66821e5.entry.js +5 -0
- package/dist/bromcom-ui/{p-10d55ac5.entry.js → p-e6ce5ec8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-508580f7.js → p-f902b559.js} +1 -1
- package/dist/cjs/{bcm-634604e3.js → bcm-ab921827.js} +4 -4
- package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
- package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
- package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-avatar_15.cjs.entry.js} +6164 -92
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-card.cjs.entry.js +4 -4
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +416 -0
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +5 -5
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +193 -0
- package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +5 -5
- package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
- package/dist/cjs/bcm-default.cjs.entry.js +1 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +7 -7
- package/dist/cjs/bcm-dropdown.cjs.entry.js +6 -6
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
- package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
- package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
- package/dist/cjs/bcm-item.cjs.entry.js +3 -3
- package/dist/cjs/bcm-items.cjs.entry.js +3 -3
- package/dist/cjs/bcm-link.cjs.entry.js +3 -3
- package/dist/cjs/bcm-menu.cjs.entry.js +7 -7
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
- package/dist/cjs/bcm-modal.cjs.entry.js +6 -6
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popover.cjs.entry.js +8 -8
- package/dist/cjs/bcm-progress.cjs.entry.js +3 -3
- package/dist/cjs/bcm-radio-group.cjs.entry.js +9 -9
- package/dist/cjs/bcm-radio.cjs.entry.js +12 -12
- package/dist/cjs/bcm-range.cjs.entry.js +5 -5
- package/dist/cjs/bcm-select.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 +8 -8
- package/dist/cjs/bcm-switch.cjs.entry.js +8 -8
- package/dist/cjs/bcm-tab-group.cjs.entry.js +6 -6
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +9 -9
- package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -5
- package/dist/cjs/bcm-tag.cjs.entry.js +14 -14
- package/dist/cjs/bcm-text.cjs.entry.js +3 -3
- package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
- package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
- package/dist/cjs/bcm-toast.cjs.entry.js +10 -10
- package/dist/cjs/bromcom-ui.cjs.js +1 -1
- package/dist/cjs/{floating-ui-74eb26d6.js → floating-ui-c9fc2202.js} +2 -2
- package/dist/cjs/{generate-cf48ed2d.js → generate-21143214.js} +1 -1
- package/dist/cjs/{input-template-129e6e5b.js → input-template-1441e468.js} +6 -6
- package/dist/cjs/{json-parse-decarator-f0554ad2.js → json-parse-decarator-8dbf0b0e.js} +1 -1
- package/dist/cjs/{label-template-cc69bc21.js → label-template-4d5f99a5.js} +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{number-helper-453e02ee.js → number-helper-08a7ff70.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
- package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
- package/dist/cjs/{popover-placement-3c8f3a72.js → popover-placement-ccb40073.js} +1 -1
- package/dist/cjs/{slot-template-3e59d7d8.js → slot-template-d70ea082.js} +1 -1
- package/dist/cjs/{stepper-states-3082dce8.js → stepper-states-9b6818aa.js} +1 -1
- package/dist/cjs/{string-helper-45cffee0.js → string-helper-d681e5c7.js} +2 -2
- package/dist/cjs/{tooltip-helper-748b4ab6.js → tooltip-helper-235b26ea.js} +9 -9
- package/dist/cjs/{validators-2fcf98d3.js → validators-6a0077a8.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/chip/chip-group.js +292 -0
- package/dist/collection/components/atoms/chip/chip.js +107 -26
- package/dist/collection/components/molecules/linked/linked.js +6 -17
- package/dist/collection/components/organism/form/form.js +1 -0
- package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
- package/dist/collection/components/organism/list/list.css +3 -0
- package/dist/components/bcm-chip-group.d.ts +11 -0
- package/dist/components/bcm-chip-group.js +174 -0
- package/dist/components/bcm-chip.js +1 -100
- package/dist/components/bcm-form-2.js +1 -0
- package/dist/components/bcm-form.js +1 -0
- package/dist/components/bcm-list.js +1 -1702
- package/dist/{esm/bcm-chip.entry.js → components/chip.js} +110 -33
- 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/linked.js +6 -17
- package/dist/{esm/bcm-list.entry.js → components/list.js} +136 -31
- package/dist/esm/bcm-9f50af9c.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +1 -1
- package/dist/esm/bcm-alert.entry.js +1 -1
- package/dist/esm/bcm-attendance.entry.js +1 -1
- package/dist/esm/{bcm-colorful_2.entry.js → bcm-avatar_15.entry.js} +6148 -89
- package/dist/esm/bcm-breadcrumb.entry.js +1 -1
- package/dist/esm/bcm-button-group.entry.js +2 -2
- package/dist/esm/bcm-card.entry.js +1 -1
- package/dist/esm/bcm-checkbox-group.entry.js +412 -0
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/bcm-checkbox_2.entry.js +188 -0
- package/dist/esm/bcm-collapse.entry.js +1 -1
- package/dist/esm/bcm-color-input.entry.js +3 -3
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +2 -2
- package/dist/esm/bcm-default.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/bcm-form-2.entry.js +3 -2
- package/dist/esm/bcm-input-custom.entry.js +1 -1
- package/dist/esm/bcm-item.entry.js +2 -2
- package/dist/esm/bcm-items.entry.js +1 -1
- package/dist/esm/bcm-link.entry.js +1 -1
- package/dist/esm/bcm-menu.entry.js +4 -4
- package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
- package/dist/esm/bcm-modal-2-header.entry.js +3 -3
- package/dist/esm/bcm-modal-2.entry.js +4 -4
- package/dist/esm/bcm-modal.entry.js +2 -2
- package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
- 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-skeleton.entry.js +1 -1
- package/dist/esm/bcm-step.entry.js +2 -2
- package/dist/esm/bcm-stepper.entry.js +5 -5
- package/dist/esm/bcm-switch.entry.js +2 -2
- 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 +3 -3
- 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/bromcom-ui.js +1 -1
- package/dist/esm/floating-ui-e7341329.js +1 -1
- package/dist/esm/{generate-03cf1f82.js → generate-a39b1045.js} +1 -1
- package/dist/esm/{input-template-6137ed1b.js → input-template-e1df6efd.js} +2 -2
- package/dist/esm/{json-parse-decarator-699aaeeb.js → json-parse-decarator-b1ceb8c8.js} +1 -1
- package/dist/esm/label-template-d74fe788.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{number-helper-61c91978.js → number-helper-fa8e8000.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +2 -2
- package/dist/esm/old-bcm-popover.entry.js +2 -2
- package/dist/esm/{stepper-states-0fc18a9f.js → stepper-states-44849ee8.js} +1 -1
- package/dist/esm/string-helper-6bd24967.js +1 -1
- package/dist/esm/{tooltip-helper-a06cb0a2.js → tooltip-helper-10b64c23.js} +4 -4
- package/dist/esm/{validators-c6a4a8ac.js → validators-dd70be40.js} +1 -1
- package/dist/types/components/atoms/chip/chip-group.d.ts +22 -0
- package/dist/types/components/atoms/chip/chip.d.ts +18 -13
- package/dist/types/components/molecules/linked/linked.d.ts +0 -2
- package/dist/types/components.d.ts +47 -4
- package/package.json +1 -1
- package/dist/bromcom-ui/p-00fd6de2.entry.js +0 -5
- package/dist/bromcom-ui/p-1736eee9.entry.js +0 -5
- package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
- package/dist/bromcom-ui/p-28345f61.js +0 -5
- package/dist/bromcom-ui/p-3b3f7c54.entry.js +0 -5
- package/dist/bromcom-ui/p-4cbc9da5.entry.js +0 -5
- package/dist/bromcom-ui/p-55837df1.entry.js +0 -5
- package/dist/bromcom-ui/p-6ea2108c.entry.js +0 -5
- package/dist/bromcom-ui/p-7aa855fc.entry.js +0 -5
- package/dist/bromcom-ui/p-88078128.entry.js +0 -13
- package/dist/bromcom-ui/p-8aa77fd1.js +0 -5
- package/dist/bromcom-ui/p-c5bd9dd7.entry.js +0 -5
- package/dist/bromcom-ui/p-c818a4fc.entry.js +0 -5
- package/dist/bromcom-ui/p-c8c9d35e.entry.js +0 -5
- package/dist/bromcom-ui/p-cc45ea99.entry.js +0 -5
- package/dist/bromcom-ui/p-d155cf69.entry.js +0 -5
- package/dist/bromcom-ui/p-ebc87fe9.entry.js +0 -5
- package/dist/bromcom-ui/p-ed9bf8e9.js +0 -5
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -139
- package/dist/cjs/bcm-button_7.cjs.entry.js +0 -1521
- package/dist/cjs/bcm-chip.cjs.entry.js +0 -74
- package/dist/cjs/bcm-input.cjs.entry.js +0 -370
- package/dist/cjs/bcm-list.cjs.entry.js +0 -1607
- package/dist/cjs/bcm-rc-overflow_2.cjs.entry.js +0 -2443
- package/dist/cjs/bcm-typography.cjs.entry.js +0 -21
- package/dist/cjs/index-906fb4e5.js +0 -540
- package/dist/esm/bcm-avatar_2.entry.js +0 -134
- package/dist/esm/bcm-button_7.entry.js +0 -1511
- package/dist/esm/bcm-input.entry.js +0 -366
- package/dist/esm/bcm-rc-overflow_2.entry.js +0 -2438
- package/dist/esm/bcm-typography.entry.js +0 -17
- package/dist/esm/index-6310a048.js +0 -537
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
|
|
6
6
|
import { c as classnames } from './index-ed9652af.js';
|
|
7
|
-
import { G as Generate } from './generate-
|
|
7
|
+
import { G as Generate } from './generate-a39b1045.js';
|
|
8
8
|
import './_commonjsHelpers-3016b722.js';
|
|
9
9
|
import './colors-44c95e7e.js';
|
|
10
10
|
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
|
|
6
|
-
import { G as Generate, s as snq } from './generate-
|
|
7
|
-
import {
|
|
6
|
+
import { G as Generate, s as snq } from './generate-a39b1045.js';
|
|
7
|
+
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
8
8
|
import { c as classnames } from './index-ed9652af.js';
|
|
9
9
|
import { S as StringHelper } from './string-helper-6bd24967.js';
|
|
10
10
|
import './colors-44c95e7e.js';
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-39133086.js';
|
|
6
6
|
import { c as classnames } from './index-ed9652af.js';
|
|
7
7
|
import { C as ColorHelper } from './color-helper-e8ce23d7.js';
|
|
8
|
-
import { G as Generate } from './generate-
|
|
8
|
+
import { G as Generate } from './generate-a39b1045.js';
|
|
9
9
|
import { S as StringHelper } from './string-helper-6bd24967.js';
|
|
10
10
|
import { S as SlotTemplate } from './slot-template-5b2db362.js';
|
|
11
11
|
import './_commonjsHelpers-3016b722.js';
|
|
@@ -0,0 +1,412 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-39133086.js';
|
|
6
|
+
import { c as classnames } from './index-ed9652af.js';
|
|
7
|
+
import { G as Generate, s as snq } from './generate-a39b1045.js';
|
|
8
|
+
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
9
|
+
import { d as delay, g as getChildElements } from './utils-57652744.js';
|
|
10
|
+
import { c as createStore } from './index-93e36fdb.js';
|
|
11
|
+
import { L as LabelTemplate } from './label-template-d74fe788.js';
|
|
12
|
+
import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
|
|
13
|
+
import './_commonjsHelpers-3016b722.js';
|
|
14
|
+
import './colors-44c95e7e.js';
|
|
15
|
+
import './slot-template-5b2db362.js';
|
|
16
|
+
import './string-helper-6bd24967.js';
|
|
17
|
+
|
|
18
|
+
const CheckboxGroupTemplate = ({ customStyle, groupContainerClasses, onBcmSelect, items }) => {
|
|
19
|
+
return (h("div", { class: groupContainerClasses, style: customStyle }, items.childs && items.childs.map((checkbox) => {
|
|
20
|
+
return (h("bcm-checkbox", { id: checkbox.id, name: checkbox.name, color: checkbox.color, checked: checkbox.checked, disabled: checkbox.disabled, readonly: checkbox.readonly, required: checkbox.required, noCaption: checkbox.noCaption, "no-margin": true, size: checkbox.size, "full-width": checkbox.fullWidth, onClick: (e) => { !checkbox.disabled && !checkbox.readonly && (onBcmSelect(checkbox.id), e.preventDefault()); } }, checkbox.slot || checkbox.label));
|
|
21
|
+
})));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const { state } = createStore({
|
|
25
|
+
group: new Map(),
|
|
26
|
+
allChecked: true,
|
|
27
|
+
allUnchecked: true,
|
|
28
|
+
changeInderminate: {},
|
|
29
|
+
});
|
|
30
|
+
const setValue = async ({ fullWidth, optionType, buttonStyle, size, defaultCheckedItems, el, id, label, required, captionType, hidden, direction, childs, indeterminate, gap, noCaption, }) => {
|
|
31
|
+
if (el) {
|
|
32
|
+
state.group.set(id, {
|
|
33
|
+
fullWidth,
|
|
34
|
+
optionType,
|
|
35
|
+
buttonStyle,
|
|
36
|
+
size,
|
|
37
|
+
defaultCheckedItems,
|
|
38
|
+
label,
|
|
39
|
+
required,
|
|
40
|
+
captionType,
|
|
41
|
+
hidden,
|
|
42
|
+
direction,
|
|
43
|
+
indeterminate,
|
|
44
|
+
gap,
|
|
45
|
+
noCaption,
|
|
46
|
+
childs: childs === null || childs === void 0 ? void 0 : childs.map(child => {
|
|
47
|
+
child.checked && (state.allUnchecked = false);
|
|
48
|
+
!child.checked && (state.allChecked = false);
|
|
49
|
+
// fullWidth && (fullWidth == 'flex' ? (child.style.flex = 'auto') : (child.style.width = '100%'));
|
|
50
|
+
optionType && (child.optionType = optionType);
|
|
51
|
+
buttonStyle && (child.buttonStyle = buttonStyle);
|
|
52
|
+
size && (child.size = size);
|
|
53
|
+
defaultCheckedItems && defaultCheckedItems.find(e => e === child.name) && (child.checked = true);
|
|
54
|
+
child.noCaption = noCaption;
|
|
55
|
+
return {
|
|
56
|
+
id: child.id || Generate.UID(),
|
|
57
|
+
checked: child.checked || false,
|
|
58
|
+
name: child.name,
|
|
59
|
+
size: child.size,
|
|
60
|
+
buttonStyle: child.buttonStyle,
|
|
61
|
+
optionType: child.optionType,
|
|
62
|
+
style: child.style,
|
|
63
|
+
noCaption: child.noCaption,
|
|
64
|
+
color: child.color,
|
|
65
|
+
disabled: child.disabled,
|
|
66
|
+
readonly: child.readonly,
|
|
67
|
+
label: child.label || child.name,
|
|
68
|
+
slot: child.slot || snq(() => child.querySelector('.slot').textContent, child.textContent),
|
|
69
|
+
required: child.required || required,
|
|
70
|
+
el: child,
|
|
71
|
+
captionType,
|
|
72
|
+
hidden,
|
|
73
|
+
};
|
|
74
|
+
}),
|
|
75
|
+
indeterminateState: !state.allChecked && !state.allUnchecked ? 'indeterminate' : state.allChecked ? 'determinate' : 'uncheck',
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const getProperty = id => {
|
|
80
|
+
return snq(() => state.group.get(id), {});
|
|
81
|
+
};
|
|
82
|
+
const getValue = (id, name) => {
|
|
83
|
+
var _a;
|
|
84
|
+
const group = getProperty(id);
|
|
85
|
+
let value = {};
|
|
86
|
+
(_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
87
|
+
if (name) {
|
|
88
|
+
if (child.name === name) {
|
|
89
|
+
value[child.name] = {
|
|
90
|
+
value: !!child.checked,
|
|
91
|
+
name: child.name,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
value[child.name] = {
|
|
97
|
+
value: !!child.checked,
|
|
98
|
+
name: child.name,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
return value;
|
|
103
|
+
};
|
|
104
|
+
const getCheckedList = id => {
|
|
105
|
+
var _a;
|
|
106
|
+
const group = getProperty(id);
|
|
107
|
+
let value = {};
|
|
108
|
+
(_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
109
|
+
if (child.checked === true) {
|
|
110
|
+
value[child.name] = {
|
|
111
|
+
value: !!child.checked,
|
|
112
|
+
name: child.name,
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
return value;
|
|
117
|
+
};
|
|
118
|
+
const setClear = id => {
|
|
119
|
+
var _a;
|
|
120
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
|
|
121
|
+
child.checked = false;
|
|
122
|
+
});
|
|
123
|
+
checkInderminate(id);
|
|
124
|
+
};
|
|
125
|
+
const setCheckedItems = (id, items, checked, reset) => {
|
|
126
|
+
var _a;
|
|
127
|
+
const checkedItems = items && (typeof items == 'string' ? JSON.parse(items) : items);
|
|
128
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
|
|
129
|
+
if (checkedItems) {
|
|
130
|
+
const checkedItem = checkedItems.find(e => e === child.name || e.name === child.name);
|
|
131
|
+
if (checkedItem) {
|
|
132
|
+
if (typeof checkedItem == 'object') {
|
|
133
|
+
Object.keys(checkedItem).map(key => {
|
|
134
|
+
if (key === 'checked') {
|
|
135
|
+
child.checked = checkedItem[key];
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
child.checked = checked;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
child.checked = checked;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
reset && (child.checked = false);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
child.checked = false;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
checkInderminate(id);
|
|
155
|
+
};
|
|
156
|
+
const resetCaption = id => {
|
|
157
|
+
var _a;
|
|
158
|
+
// const noCaption = getProperty(id).noCaption;
|
|
159
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.forEach(child => {
|
|
160
|
+
child.resetCaption();
|
|
161
|
+
// child.noCaption = noCaption;
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
const changeIndeterminate = id => {
|
|
165
|
+
var _a;
|
|
166
|
+
const group = getProperty(id);
|
|
167
|
+
if (!group.disabled) {
|
|
168
|
+
let checkAll = true;
|
|
169
|
+
if (group.indeterminateState === 'determinate') {
|
|
170
|
+
checkAll = false;
|
|
171
|
+
}
|
|
172
|
+
(_a = getProperty(id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
173
|
+
child.checked = checkAll;
|
|
174
|
+
});
|
|
175
|
+
checkInderminate(id);
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
const checkInderminate = id => {
|
|
179
|
+
var _a;
|
|
180
|
+
const group = getProperty(id);
|
|
181
|
+
let allChecked = true;
|
|
182
|
+
let allUnchecked = true;
|
|
183
|
+
(_a = group.childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
184
|
+
child.checked && (allUnchecked = false);
|
|
185
|
+
!child.checked && (allChecked = false);
|
|
186
|
+
});
|
|
187
|
+
group.indeterminateState = !allChecked && !allUnchecked ? 'indeterminate' : allChecked ? 'determinate' : 'uncheck';
|
|
188
|
+
};
|
|
189
|
+
const onChange = (obj) => {
|
|
190
|
+
var _a;
|
|
191
|
+
(_a = getProperty(obj.id).childs) === null || _a === void 0 ? void 0 : _a.map(child => {
|
|
192
|
+
child.checked = child.id === obj.childId ? !child.checked : child.checked;
|
|
193
|
+
});
|
|
194
|
+
checkInderminate(obj.id);
|
|
195
|
+
};
|
|
196
|
+
const removeState = id => {
|
|
197
|
+
return Promise.resolve(state.group.delete(id));
|
|
198
|
+
};
|
|
199
|
+
const getStatesKeys = id => {
|
|
200
|
+
return Object.keys(state.group.get(id));
|
|
201
|
+
};
|
|
202
|
+
const checkBoxGroupState = {
|
|
203
|
+
setValue,
|
|
204
|
+
getValue,
|
|
205
|
+
setCheckedItems,
|
|
206
|
+
getCheckedList,
|
|
207
|
+
getProperty,
|
|
208
|
+
setClear,
|
|
209
|
+
resetCaption,
|
|
210
|
+
onChange,
|
|
211
|
+
getStatesKeys,
|
|
212
|
+
state,
|
|
213
|
+
removeState,
|
|
214
|
+
changeIndeterminate,
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
const groupCss = "@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}";
|
|
218
|
+
|
|
219
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
220
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
221
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
222
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
223
|
+
else
|
|
224
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
225
|
+
if (d = decorators[i])
|
|
226
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
227
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
228
|
+
};
|
|
229
|
+
const BcmCheckboxGroup = class {
|
|
230
|
+
constructor(hostRef) {
|
|
231
|
+
registerInstance(this, hostRef);
|
|
232
|
+
this.change = createEvent(this, "bcm-change", 7);
|
|
233
|
+
this.groupCheckedList = createEvent(this, "bcm-group-checked-list", 7);
|
|
234
|
+
this._id = Generate.UID();
|
|
235
|
+
this.direction = Bcm.Direction.horizontal;
|
|
236
|
+
this.items = [];
|
|
237
|
+
this.indeterminate = false;
|
|
238
|
+
this.name = undefined;
|
|
239
|
+
this.value = undefined;
|
|
240
|
+
this.disabled = false;
|
|
241
|
+
this.readonly = false;
|
|
242
|
+
this.hidden = false;
|
|
243
|
+
this.required = false;
|
|
244
|
+
this.label = undefined;
|
|
245
|
+
this.gap = undefined;
|
|
246
|
+
this.defaultValue = undefined;
|
|
247
|
+
this.fullWidth = false;
|
|
248
|
+
this.optionType = 'default';
|
|
249
|
+
this.buttonStyle = 'solid';
|
|
250
|
+
this.size = Bcm.Size.medium;
|
|
251
|
+
this.caption = undefined;
|
|
252
|
+
this.noCaption = false;
|
|
253
|
+
this.captionType = Bcm.Status.default;
|
|
254
|
+
this.tick = {};
|
|
255
|
+
}
|
|
256
|
+
componentDidLoad() {
|
|
257
|
+
this.initState();
|
|
258
|
+
}
|
|
259
|
+
disconnectedCallback() {
|
|
260
|
+
checkBoxGroupState.removeState(this._id);
|
|
261
|
+
}
|
|
262
|
+
componentShouldUpdate(newVal, oldVal, propName) {
|
|
263
|
+
if (propName == 'tick' && newVal !== oldVal) {
|
|
264
|
+
const isHaveChild = snq(() => checkBoxGroupState.getProperty(this._id).childs.length > 0, false);
|
|
265
|
+
if (isHaveChild) {
|
|
266
|
+
this.getValue().then(values => this.value = values);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
if (this.getOptions().indexOf(propName) > -1 && newVal !== oldVal) {
|
|
270
|
+
this.initState();
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
getOptions() {
|
|
274
|
+
return snq(() => checkBoxGroupState.getStatesKeys(this._id), []);
|
|
275
|
+
}
|
|
276
|
+
async initState() {
|
|
277
|
+
const { fullWidth, optionType, buttonStyle, size, noCaption, defaultValue, label, required, captionType, hidden, direction, indeterminate, gap, items } = this;
|
|
278
|
+
const defaultCheckedItems = defaultValue && (typeof defaultValue == 'string' ? JSON.parse(defaultValue) : defaultValue);
|
|
279
|
+
const childElements = items.length > 0 ? items : await this.getCheckboxes();
|
|
280
|
+
await checkBoxGroupState.setValue({
|
|
281
|
+
id: this._id,
|
|
282
|
+
el: this.el,
|
|
283
|
+
indeterminate,
|
|
284
|
+
fullWidth,
|
|
285
|
+
optionType,
|
|
286
|
+
buttonStyle,
|
|
287
|
+
size,
|
|
288
|
+
defaultCheckedItems,
|
|
289
|
+
label,
|
|
290
|
+
noCaption,
|
|
291
|
+
required,
|
|
292
|
+
captionType,
|
|
293
|
+
hidden,
|
|
294
|
+
gap,
|
|
295
|
+
direction,
|
|
296
|
+
childs: childElements
|
|
297
|
+
});
|
|
298
|
+
const slotArea = this.el.querySelector(`#bcm-checkbox-group__items-${this._id}`);
|
|
299
|
+
if (slotArea) {
|
|
300
|
+
slotArea.innerHTML && (slotArea.innerHTML = '');
|
|
301
|
+
}
|
|
302
|
+
this.value = await this.getValue();
|
|
303
|
+
}
|
|
304
|
+
async markForCheck() {
|
|
305
|
+
await delay(10);
|
|
306
|
+
this.tick = Generate.UID();
|
|
307
|
+
}
|
|
308
|
+
async onBcmFocus() {
|
|
309
|
+
//focus first item
|
|
310
|
+
const childs = this.getCheckboxes();
|
|
311
|
+
if (childs.length > 0) {
|
|
312
|
+
childs[0].onBcmFocus();
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
async onBcmBlur() {
|
|
316
|
+
this.el.blur();
|
|
317
|
+
}
|
|
318
|
+
async setClear() {
|
|
319
|
+
checkBoxGroupState.setClear(this._id);
|
|
320
|
+
await delay(10);
|
|
321
|
+
this.getCheckboxes().forEach(item => {
|
|
322
|
+
item.setClear();
|
|
323
|
+
});
|
|
324
|
+
this.markForCheck();
|
|
325
|
+
await delay(10);
|
|
326
|
+
return Promise.resolve();
|
|
327
|
+
}
|
|
328
|
+
async resetCaption() {
|
|
329
|
+
await delay(10);
|
|
330
|
+
this.getCheckboxes().forEach(item => {
|
|
331
|
+
item.resetCaption();
|
|
332
|
+
});
|
|
333
|
+
await delay(10);
|
|
334
|
+
return Promise.resolve();
|
|
335
|
+
}
|
|
336
|
+
async set(data) {
|
|
337
|
+
if (Array.isArray(data)) {
|
|
338
|
+
await this.check(data, true, true);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
async get() {
|
|
342
|
+
const checklist = await this.getCheckedList() && Object.keys(await this.getCheckedList());
|
|
343
|
+
return checklist.length > 0 ? checklist : [];
|
|
344
|
+
}
|
|
345
|
+
async check(items, checked = true, reset = false) {
|
|
346
|
+
checkBoxGroupState.setCheckedItems(this._id, items, checked, reset);
|
|
347
|
+
this.markForCheck();
|
|
348
|
+
}
|
|
349
|
+
async getValue(name) {
|
|
350
|
+
return Promise.resolve(checkBoxGroupState.getValue(this._id, name));
|
|
351
|
+
}
|
|
352
|
+
async getCheckedList() {
|
|
353
|
+
return checkBoxGroupState.getCheckedList(this._id);
|
|
354
|
+
}
|
|
355
|
+
handleItemsChange() {
|
|
356
|
+
this.initState();
|
|
357
|
+
}
|
|
358
|
+
getCheckboxes() {
|
|
359
|
+
return getChildElements(this.el, 'bcm-checkbox:not(#bcm-indeterminate-element)');
|
|
360
|
+
}
|
|
361
|
+
async getCheckbox(id) {
|
|
362
|
+
const element = this.el.querySelector(`bcm-checkbox[id="${id}"]`);
|
|
363
|
+
if (element) {
|
|
364
|
+
const name = element["name"];
|
|
365
|
+
const value = await this.getValue(name);
|
|
366
|
+
return { element, event: snq(() => value[name], null) };
|
|
367
|
+
}
|
|
368
|
+
return {};
|
|
369
|
+
}
|
|
370
|
+
async indeterminateClick() {
|
|
371
|
+
checkBoxGroupState.changeIndeterminate(this._id);
|
|
372
|
+
this.markForCheck();
|
|
373
|
+
}
|
|
374
|
+
async changeCheckBox(id) {
|
|
375
|
+
checkBoxGroupState.onChange({ id: this._id, childId: id });
|
|
376
|
+
this.markForCheck();
|
|
377
|
+
await delay(10);
|
|
378
|
+
this.value = await this.getValue();
|
|
379
|
+
this.change.emit({ value: this.value, changed: Object.assign({}, await this.getCheckbox(id)) });
|
|
380
|
+
this.groupCheckedList.emit(await this.getCheckedList());
|
|
381
|
+
}
|
|
382
|
+
getItems() {
|
|
383
|
+
return checkBoxGroupState.getProperty(this._id);
|
|
384
|
+
}
|
|
385
|
+
render() {
|
|
386
|
+
const items = this.getItems();
|
|
387
|
+
const { disabled, captionType, label, indeterminate, indeterminateState, required, direction, optionType, hidden, fullWidth, gap } = items;
|
|
388
|
+
const bcmChechboxGroup = classnames('bcm-checkbox-group', direction, optionType, {
|
|
389
|
+
hidden,
|
|
390
|
+
'full-width': fullWidth
|
|
391
|
+
});
|
|
392
|
+
const bcmChechboxGroupContainer = classnames('bcm-checkbox-group__container', optionType, {
|
|
393
|
+
[direction]: optionType === 'default',
|
|
394
|
+
indeterminate,
|
|
395
|
+
hidden,
|
|
396
|
+
'full-width': fullWidth
|
|
397
|
+
});
|
|
398
|
+
return (h(Host, { class: bcmChechboxGroup }, h("span", { hidden: true, id: `bcm-checkbox-group__items-${this._id}` }, h("slot", null)), h("div", { class: "bcm-checkbox-group__label" }, label &&
|
|
399
|
+
h("div", null, h(LabelTemplate, { size: this.size, type: captionType, value: label, required: required }))), indeterminate &&
|
|
400
|
+
h("bcm-checkbox", { onClick: (e) => { this.indeterminateClick(), e.preventDefault(); }, "no-caption": true, id: "bcm-indeterminate-element", indeterminate: indeterminateState, disabled: disabled }, "Check All"), h(CheckboxGroupTemplate, { items: items, groupContainerClasses: bcmChechboxGroupContainer, customStyle: gap && ({ 'gap': gap }), onBcmSelect: (id) => this.changeCheckBox(id) })));
|
|
401
|
+
}
|
|
402
|
+
get el() { return getElement(this); }
|
|
403
|
+
static get watchers() { return {
|
|
404
|
+
"items": ["handleItemsChange"]
|
|
405
|
+
}; }
|
|
406
|
+
};
|
|
407
|
+
__decorate([
|
|
408
|
+
IsLoad()
|
|
409
|
+
], BcmCheckboxGroup.prototype, "el", void 0);
|
|
410
|
+
BcmCheckboxGroup.style = groupCss;
|
|
411
|
+
|
|
412
|
+
export { BcmCheckboxGroup as bcm_checkbox_group };
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-39133086.js';
|
|
6
6
|
import { c as classnames } from './index-ed9652af.js';
|
|
7
|
-
import { G as Generate } from './generate-
|
|
8
|
-
import {
|
|
7
|
+
import { G as Generate } from './generate-a39b1045.js';
|
|
8
|
+
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
9
9
|
import { c as getChilds, d as delay } from './utils-57652744.js';
|
|
10
10
|
import './_commonjsHelpers-3016b722.js';
|
|
11
11
|
import './colors-44c95e7e.js';
|
|
@@ -0,0 +1,188 @@
|
|
|
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-39133086.js';
|
|
6
|
+
import { c as classnames } from './index-ed9652af.js';
|
|
7
|
+
import { C as CaptionTemplate } from './caption-template-da16ba7b.js';
|
|
8
|
+
import { G as Generate } from './generate-a39b1045.js';
|
|
9
|
+
import { S as SlotTemplate } from './slot-template-5b2db362.js';
|
|
10
|
+
import { a as Bcm } from './bcm-9f50af9c.js';
|
|
11
|
+
import { d as delay } from './utils-57652744.js';
|
|
12
|
+
import { C as ColorHelper } from './color-helper-e8ce23d7.js';
|
|
13
|
+
import { I as IsLoad } from './is-load-decorator-bc14ec4b.js';
|
|
14
|
+
import './_commonjsHelpers-3016b722.js';
|
|
15
|
+
import './colors-44c95e7e.js';
|
|
16
|
+
import './string-helper-6bd24967.js';
|
|
17
|
+
import './colors-1d7854ea.js';
|
|
18
|
+
|
|
19
|
+
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\"); @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}";
|
|
20
|
+
|
|
21
|
+
var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
22
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
23
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
24
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
25
|
+
else
|
|
26
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
27
|
+
if (d = decorators[i])
|
|
28
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
29
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
30
|
+
};
|
|
31
|
+
const BcmCheckbox = class {
|
|
32
|
+
constructor(hostRef) {
|
|
33
|
+
registerInstance(this, hostRef);
|
|
34
|
+
this.blur = createEvent(this, "bcm-blur", 7);
|
|
35
|
+
this.focus = createEvent(this, "bcm-focus", 7);
|
|
36
|
+
this.change = createEvent(this, "bcm-change", 7);
|
|
37
|
+
this.changeCheckbox = createEvent(this, "bcm-change-checkbox", 7);
|
|
38
|
+
this._id = Generate.UID();
|
|
39
|
+
this.inGroup = false;
|
|
40
|
+
this.value = false;
|
|
41
|
+
this.checked = false;
|
|
42
|
+
this.name = undefined;
|
|
43
|
+
this.disabled = false;
|
|
44
|
+
this.hidden = false;
|
|
45
|
+
this.required = false;
|
|
46
|
+
this.label = undefined;
|
|
47
|
+
this.readonly = false;
|
|
48
|
+
this.size = Bcm.Size.medium;
|
|
49
|
+
this.indeterminate = null;
|
|
50
|
+
this.color = "blue";
|
|
51
|
+
this.caption = undefined;
|
|
52
|
+
this.noCaption = false;
|
|
53
|
+
this.captionError = undefined;
|
|
54
|
+
this.captionType = Bcm.Status.default;
|
|
55
|
+
this.captionCache = undefined;
|
|
56
|
+
this.captionTypeCache = undefined;
|
|
57
|
+
}
|
|
58
|
+
connectedCallback() {
|
|
59
|
+
this.captionCache = this.caption;
|
|
60
|
+
this.captionTypeCache = this.captionType;
|
|
61
|
+
this.value = this.checked;
|
|
62
|
+
}
|
|
63
|
+
componentDidRender() {
|
|
64
|
+
this.inputElement.checked = this.checked;
|
|
65
|
+
}
|
|
66
|
+
async onBcmFocus() {
|
|
67
|
+
this.el.focus();
|
|
68
|
+
}
|
|
69
|
+
async onBcmBlur() {
|
|
70
|
+
this.el.blur();
|
|
71
|
+
}
|
|
72
|
+
async setClear() {
|
|
73
|
+
this.check(false);
|
|
74
|
+
this.handleChange();
|
|
75
|
+
await delay(10);
|
|
76
|
+
return Promise.resolve();
|
|
77
|
+
}
|
|
78
|
+
async resetCaption() {
|
|
79
|
+
await delay(10);
|
|
80
|
+
this.caption = this.captionCache;
|
|
81
|
+
this.captionType = this.captionTypeCache;
|
|
82
|
+
this.captionError = null;
|
|
83
|
+
await delay(10);
|
|
84
|
+
return Promise.resolve();
|
|
85
|
+
}
|
|
86
|
+
handleChange() {
|
|
87
|
+
this.checked = this.inputElement.checked;
|
|
88
|
+
this.value = this.checked;
|
|
89
|
+
if (!this.indeterminate) {
|
|
90
|
+
this.changeCheckbox.emit();
|
|
91
|
+
this.change.emit({
|
|
92
|
+
name: this.name,
|
|
93
|
+
value: this.checked
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
watchIndeterminate(newValue, oldValue) {
|
|
98
|
+
if (newValue != oldValue) {
|
|
99
|
+
this.inputElement.checked = this.indeterminate == Bcm.IndeterminateType.determinate ? true : false;
|
|
100
|
+
this.handleChange();
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async set(data) {
|
|
104
|
+
if (typeof data === 'boolean') {
|
|
105
|
+
await this.check(data);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async get() {
|
|
109
|
+
return this.checked || false;
|
|
110
|
+
}
|
|
111
|
+
async check(uncheck = true) {
|
|
112
|
+
this.inputElement.checked = uncheck;
|
|
113
|
+
this.handleChange();
|
|
114
|
+
}
|
|
115
|
+
handleKeyUp(ev) {
|
|
116
|
+
if (ev.keyCode == Bcm.KeyCode.space || ev.keyCode == Bcm.KeyCode.enter) {
|
|
117
|
+
if (!this.disabled && !this.readonly) {
|
|
118
|
+
this.inputElement.checked = !this.inputElement.checked;
|
|
119
|
+
this.handleChange();
|
|
120
|
+
}
|
|
121
|
+
ev.stopPropagation();
|
|
122
|
+
ev.preventDefault();
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
watchChecked() {
|
|
127
|
+
if (this.checked) {
|
|
128
|
+
this.resetCaption();
|
|
129
|
+
}
|
|
130
|
+
this.value = this.checked;
|
|
131
|
+
}
|
|
132
|
+
setColor(color = this.color) {
|
|
133
|
+
if (!color)
|
|
134
|
+
return;
|
|
135
|
+
const prefix = `--bcm-checkbox`;
|
|
136
|
+
return {
|
|
137
|
+
[`${prefix}-primary-color-default`]: ColorHelper.dsColor(color + '-500'),
|
|
138
|
+
[`${prefix}-primary-color-hover`]: ColorHelper.dsColor(color + '-600'),
|
|
139
|
+
[`${prefix}-primary-color-focus-visible`]: ColorHelper.dsColor(color + '-800'),
|
|
140
|
+
[`${prefix}-primary-color-active`]: ColorHelper.dsColor(color + '-700'),
|
|
141
|
+
// [`${prefix}-primary-color-disabled`]: ColorHelper.dsColor(color + '-300'),
|
|
142
|
+
[`${prefix}-secondary-color-default`]: ColorHelper.dsColor('white'),
|
|
143
|
+
[`${prefix}-secondary-color-hover`]: ColorHelper.dsColor('slate-50'),
|
|
144
|
+
[`${prefix}-secondary-color-focus-visible`]: ColorHelper.dsColor('slate-50'),
|
|
145
|
+
[`${prefix}-secondary-color-active`]: ColorHelper.dsColor('slate-50'),
|
|
146
|
+
// [`${prefix}-secondary-color-disabled`]: ColorHelper.dsColor('slate-200')
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
render() {
|
|
150
|
+
const { label, _id, indeterminate, hidden, disabled, checked, readonly, required, caption, captionError, captionType, noCaption, size } = this;
|
|
151
|
+
//////
|
|
152
|
+
const bcmCheckboxClass = classnames('bcm-checkbox', `bcm-checkbox-size-${size}`, {
|
|
153
|
+
'error': captionType == Bcm.Status.error,
|
|
154
|
+
hidden,
|
|
155
|
+
checked,
|
|
156
|
+
disabled,
|
|
157
|
+
required,
|
|
158
|
+
readonly,
|
|
159
|
+
});
|
|
160
|
+
const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
|
|
161
|
+
'bcm-checkbox__label-icon-checked': checked,
|
|
162
|
+
});
|
|
163
|
+
const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
|
|
164
|
+
const bcmCheckboxInputClass = classnames('bcm-checkbox__input');
|
|
165
|
+
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 })));
|
|
166
|
+
}
|
|
167
|
+
get el() { return getElement(this); }
|
|
168
|
+
static get watchers() { return {
|
|
169
|
+
"indeterminate": ["watchIndeterminate"],
|
|
170
|
+
"checked": ["watchChecked"]
|
|
171
|
+
}; }
|
|
172
|
+
};
|
|
173
|
+
__decorate([
|
|
174
|
+
IsLoad()
|
|
175
|
+
], BcmCheckbox.prototype, "el", void 0);
|
|
176
|
+
BcmCheckbox.style = checkboxCss;
|
|
177
|
+
|
|
178
|
+
const BcmTypography = class {
|
|
179
|
+
constructor(hostRef) {
|
|
180
|
+
registerInstance(this, hostRef);
|
|
181
|
+
}
|
|
182
|
+
render() {
|
|
183
|
+
return (h(Host, null, h("slot", null)));
|
|
184
|
+
}
|
|
185
|
+
get el() { return getElement(this); }
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
export { BcmCheckbox as bcm_checkbox, BcmTypography as bcm_typography };
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-39133086.js';
|
|
6
6
|
import { c as classnames } from './index-ed9652af.js';
|
|
7
|
-
import { G as Generate } from './generate-
|
|
7
|
+
import { G as Generate } from './generate-a39b1045.js';
|
|
8
8
|
import './_commonjsHelpers-3016b722.js';
|
|
9
9
|
import './colors-44c95e7e.js';
|
|
10
10
|
|