bromcom-ui 3.0.0-alpha.3 → 3.0.0-alpha.5
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-01eaca9a.entry.js +5 -0
- package/dist/bromcom-ui/{p-dc8b7bd5.entry.js → p-0b7de283.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ff8adde6.entry.js → p-0e75f6ba.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3a6e9576.entry.js → p-112b9a62.entry.js} +1 -1
- package/dist/bromcom-ui/{p-be96827e.js → p-1535f9b1.js} +1 -1
- package/dist/bromcom-ui/{p-ef839034.entry.js → p-32ce6cf6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-33d97b3f.entry.js → p-33b2ed75.entry.js} +1 -1
- package/dist/bromcom-ui/p-3ddd3c83.entry.js +5 -0
- package/dist/bromcom-ui/{p-e115af8a.entry.js → p-4545a13d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f1de8ed5.entry.js → p-5532696c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f6e710ff.entry.js → p-69adb859.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d0647951.js → p-6ce02d0a.js} +1 -1
- package/dist/bromcom-ui/p-7c08789d.entry.js +5 -0
- package/dist/bromcom-ui/{p-b7f449ff.entry.js → p-803739bc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3b988ad1.entry.js → p-8390dd02.entry.js} +1 -1
- package/dist/bromcom-ui/p-91197b04.js +5 -0
- package/dist/bromcom-ui/{p-b9b9d753.entry.js → p-a80e6310.entry.js} +1 -1
- package/dist/bromcom-ui/p-aa67918a.entry.js +5 -0
- package/dist/bromcom-ui/{p-91aa21af.entry.js → p-acab07ec.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a53c3682.entry.js → p-b333a3d7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b386e9c9.entry.js → p-b7787c11.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2e7ffc5a.entry.js → p-b7c56cbe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-221095a9.entry.js → p-c36a7889.entry.js} +1 -1
- package/dist/bromcom-ui/p-ce0ab4e3.entry.js +5 -0
- package/dist/bromcom-ui/{p-ee75cd00.js → p-d3cf91a9.js} +1 -1
- package/dist/bromcom-ui/p-d5464577.entry.js +16 -0
- package/dist/bromcom-ui/{p-bd77f532.entry.js → p-d7a619c5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-baa4193d.entry.js → p-e36b6b08.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6c7fdf95.entry.js → p-f15c1d3d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8001040c.js → p-fc29c94d.js} +1 -1
- package/dist/cjs/bcm-accordion_69.cjs.entry.js +722 -66
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +4 -4
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/bcm-caption.cjs.entry.js +4 -4
- package/dist/cjs/bcm-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-default.cjs.entry.js +2 -2
- package/dist/cjs/bcm-file-upload.cjs.entry.js +578 -0
- package/dist/cjs/bcm-form-2.cjs.entry.js +3 -2
- package/dist/cjs/bcm-input-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-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-number-input.cjs.entry.js +12 -6
- package/dist/cjs/bcm-skeleton.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-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-toast.cjs.entry.js +17 -11
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{generate-554f54dc.js → generate-9d1bf6b3.js} +1 -1
- package/dist/cjs/{global-90b5dbce.js → global-d69a64ec.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-677e9c02.js → number-helper-ae28b255.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-8445ccd4.js → package-6de220be.js} +1 -1
- package/dist/cjs/{validators-92f2f1ef.js → validators-3381bee2.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/button/button.js +1 -1
- package/dist/collection/components/atoms/button/types.js +7 -0
- package/dist/collection/components/molecules/color-input/color-input.js +5 -22
- package/dist/collection/components/molecules/color-palette/color-palette.js +4 -4
- package/dist/collection/components/molecules/dropdown/dropdown.js +36 -1
- package/dist/collection/components/molecules/linked/linked-focus-manager.js +86 -0
- package/dist/collection/components/molecules/linked/linked.js +43 -1
- package/dist/collection/components/molecules/number-input/number-input.js +8 -2
- package/dist/collection/components/molecules/number-input/react-input.js +1 -1
- package/dist/collection/components/molecules/upload/file-upload.component.js +1060 -0
- package/dist/collection/components/molecules/upload/file-upload.style.js +201 -0
- 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-focus-manager.js +344 -0
- package/dist/collection/components/organism/list/list-key-control.js +9 -4
- package/dist/collection/components/organism/list/list.css +8 -3
- package/dist/collection/components/organism/list/list.js +227 -27
- package/dist/collection/components/other/toast/toast.js +15 -9
- package/dist/collection/components/other_deprecated/old-tag/old-tag.js +1 -1
- package/dist/collection/components/other_deprecated/tag/tag.js +1 -1
- package/dist/collection/templates/list-item-template.js +6 -5
- package/dist/collection/templates/list-template.js +2 -2
- package/dist/components/bcm-color-input.js +5 -22
- package/dist/components/bcm-dropdown.js +35 -0
- package/dist/components/bcm-file-upload.d.ts +11 -0
- package/dist/components/bcm-file-upload.js +625 -0
- package/dist/components/bcm-form-2.js +1 -0
- package/dist/components/bcm-number-input.js +8 -2
- package/dist/components/bcm-toast.js +15 -9
- package/dist/components/button.js +7 -0
- package/dist/components/color-palette.js +2 -2
- package/dist/components/form.js +1 -0
- 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 +105 -2
- package/dist/components/list.js +567 -39
- package/dist/esm/bcm-accordion_69.entry.js +722 -66
- package/dist/esm/bcm-attendance-actions-comment.entry.js +4 -4
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +4 -4
- package/dist/esm/bcm-breadcrumb.entry.js +2 -2
- package/dist/esm/bcm-caption.entry.js +4 -4
- package/dist/esm/bcm-card.entry.js +2 -2
- 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 +2 -2
- package/dist/esm/bcm-file-upload.entry.js +574 -0
- package/dist/esm/bcm-form-2.entry.js +3 -2
- package/dist/esm/bcm-input-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-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-number-input.entry.js +12 -6
- package/dist/esm/bcm-skeleton.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-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +17 -11
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{generate-8a394b83.js → generate-56d49b70.js} +1 -1
- package/dist/esm/{global-7919f57f.js → global-97c42a5f.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-a86adc72.js → number-helper-455ab41e.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-278e08d9.js → package-edee14d5.js} +1 -1
- package/dist/esm/{validators-89e791a1.js → validators-cc882165.js} +1 -1
- package/dist/types/components/atoms/button/types.d.ts +8 -1
- package/dist/types/components/molecules/color-input/color-input.d.ts +1 -4
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +7 -0
- package/dist/types/components/molecules/linked/linked-focus-manager.d.ts +13 -0
- package/dist/types/components/molecules/linked/linked.d.ts +3 -0
- package/dist/types/components/molecules/number-input/number-input.d.ts +1 -0
- package/dist/types/components/molecules/upload/file-upload.component.d.ts +233 -0
- package/dist/types/components/molecules/upload/file-upload.style.d.ts +548 -0
- package/dist/types/components/organism/list/list-focus-manager.d.ts +53 -0
- package/dist/types/components/organism/list/list-key-control.d.ts +1 -0
- package/dist/types/components/organism/list/list.d.ts +18 -1
- package/dist/types/components/other/toast/toast.d.ts +1 -0
- package/dist/types/components.d.ts +417 -1
- package/dist/types/templates/list-item-template.d.ts +2 -0
- package/dist/types/templates/list-template.d.ts +2 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-16b8a312.entry.js +0 -16
- package/dist/bromcom-ui/p-839b6fd5.entry.js +0 -5
- package/dist/bromcom-ui/p-be8aa3b8.entry.js +0 -5
- package/dist/bromcom-ui/p-d0aa71e1.entry.js +0 -5
- package/dist/bromcom-ui/p-df92d838.js +0 -5
- package/dist/bromcom-ui/p-dfd73f7c.entry.js +0 -5
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index$1 = require('./index-c591ecec.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-9d1bf6b3.js');
|
|
11
11
|
const index$2 = require('./index-95ae50d0.js');
|
|
12
12
|
const stringHelper = require('./string-helper-9cdfb273.js');
|
|
13
13
|
const colorHelper = require('./color-helper-dc98a2ca.js');
|
|
14
14
|
require('./datetime-helper-eaf4fadb.js');
|
|
15
|
-
const numberHelper = require('./number-helper-
|
|
16
|
-
const validators = require('./validators-
|
|
15
|
+
const numberHelper = require('./number-helper-ae28b255.js');
|
|
16
|
+
const validators = require('./validators-3381bee2.js');
|
|
17
17
|
require('./element-dragger-a8562f82.js');
|
|
18
18
|
const bcm = require('./bcm-1d1fcf21.js');
|
|
19
19
|
const index$3 = require('./index-5279dea2.js');
|
|
@@ -30,7 +30,7 @@ const floatingUi = require('./floating-ui-5b396838.js');
|
|
|
30
30
|
const popoverPlacement = require('./popover-placement-02e6101b.js');
|
|
31
31
|
const colors = require('./colors-56282b00.js');
|
|
32
32
|
const types$1 = require('./types-3871235f.js');
|
|
33
|
-
require('./package-
|
|
33
|
+
require('./package-6de220be.js');
|
|
34
34
|
require('./colors-250d0982.js');
|
|
35
35
|
|
|
36
36
|
const accordionCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}.bcm-accordion .bcm-expansion-panel{border-radius:0}.bcm-accordion .bcm-expansion-panel .bcm-expansion-panel__header{border-radius:0}.bcm-accordion .bcm-expansion-panel:first-child{border-top-left-radius:var(--bcm-ui-border-radius-default);border-top-right-radius:var(--bcm-ui-border-radius-default)}.bcm-accordion .bcm-expansion-panel:first-child .bcm-expansion-panel__header{border-top-left-radius:var(--bcm-ui-border-radius-default);border-top-right-radius:var(--bcm-ui-border-radius-default)}.bcm-accordion .bcm-expansion-panel:last-child{border-bottom-left-radius:var(--bcm-ui-border-radius-default);border-bottom-right-radius:var(--bcm-ui-border-radius-default)}.bcm-accordion .bcm-expansion-panel:last-child .bcm-expansion-panel__header{border-bottom-left-radius:var(--bcm-ui-border-radius-default);border-bottom-right-radius:var(--bcm-ui-border-radius-default)}";
|
|
@@ -1309,6 +1309,12 @@ const variantOptions = {
|
|
|
1309
1309
|
icon: 'far fa-download',
|
|
1310
1310
|
iconPosition: 'prefix',
|
|
1311
1311
|
},
|
|
1312
|
+
upload: {
|
|
1313
|
+
text: 'Upload',
|
|
1314
|
+
color: 'blue',
|
|
1315
|
+
icon: 'far fa-cloud-arrow-up',
|
|
1316
|
+
iconPosition: 'prefix',
|
|
1317
|
+
},
|
|
1312
1318
|
};
|
|
1313
1319
|
var VariantProps;
|
|
1314
1320
|
(function (VariantProps) {
|
|
@@ -1335,6 +1341,7 @@ var VariantProps;
|
|
|
1335
1341
|
VariantProps["update"] = "update";
|
|
1336
1342
|
VariantProps["reset"] = "Reset";
|
|
1337
1343
|
VariantProps["download"] = "download";
|
|
1344
|
+
VariantProps["upload"] = "upload";
|
|
1338
1345
|
})(VariantProps || (VariantProps = {}));
|
|
1339
1346
|
|
|
1340
1347
|
const { state: state$4 } = createStore({
|
|
@@ -2397,7 +2404,7 @@ ref, handleBlur, handleFocus, handleInput, handleChange, isEyeDropperSupported,
|
|
|
2397
2404
|
index$1.h("i", { class: "far fa-eye-dropper", onClick: () => eyeDropper() })))))));
|
|
2398
2405
|
};
|
|
2399
2406
|
|
|
2400
|
-
const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selectedItem, openGroup, checkedItem, focusItem, searchIsOnlyChilds }) => {
|
|
2407
|
+
const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selectedItem, openGroup, checkedItem, focusItem, searchIsOnlyChilds, disabled: parentDisabled, readonly: parentReadonly }) => {
|
|
2401
2408
|
const isHaveChildren = item.items && item.items.length > 0;
|
|
2402
2409
|
var text = stringHelper.StringHelper.htmlEntities(item.text);
|
|
2403
2410
|
let intersection = [];
|
|
@@ -2416,8 +2423,8 @@ const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selecte
|
|
|
2416
2423
|
}
|
|
2417
2424
|
text = item.isHtmlContent ? item.isHtmlContent : item.template && intersection.length > 0 ? stringHelper.StringHelper.templateParser(item.template, Object.assign(Object.assign({}, item.itemObject), { text })) : text;
|
|
2418
2425
|
const unClickable = !treeview && item.type == "group" && !item.clickable;
|
|
2419
|
-
const disabled = item.disabled;
|
|
2420
|
-
const readonly = item.readonly;
|
|
2426
|
+
const disabled = item.disabled || parentDisabled;
|
|
2427
|
+
const readonly = item.readonly || parentReadonly;
|
|
2421
2428
|
const itemClick = (event) => {
|
|
2422
2429
|
let path = event.path || event.composedPath();
|
|
2423
2430
|
if (path.filter(x => x.attributes && x.attributes.getNamedItem("unlinked"))[0]) {
|
|
@@ -2435,23 +2442,24 @@ const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selecte
|
|
|
2435
2442
|
item.open = item.isSearching;
|
|
2436
2443
|
openGroup(item.id);
|
|
2437
2444
|
};
|
|
2438
|
-
return (index$1.h("div", { id: item.id, hidden: item.hidden, "on-focus": e => !unClickable && !disabled && focusItem(e), tabIndex: unClickable || disabled ? -1 : 0, class: index$2.classnames('bcm-list__item',
|
|
2445
|
+
return (index$1.h("div", { id: item.id, hidden: item.hidden, "data-has-children": isHaveChildren ? "true" : "false", "data-open": item.isSearching || item.open ? "true" : "false", "data-parent-id": item.parentId || "", "on-focus": e => !unClickable && !disabled && focusItem(e), tabIndex: unClickable || disabled ? -1 : 0, class: index$2.classnames('bcm-list__item',
|
|
2439
2446
|
// size === 'large' ? 'size-3' : 'size-2',
|
|
2440
2447
|
'bcm-list__item-' + size, {
|
|
2441
2448
|
'bcm-list__item--group': !treeview && item.type == 'group',
|
|
2449
|
+
'bcm-list__item--open': item.isSearching || item.open,
|
|
2442
2450
|
'bcm-list__item--readonly': readonly,
|
|
2443
2451
|
}) },
|
|
2444
2452
|
index$1.h("div", { class: index$2.classnames('bcm-list__item-content', !checkboxes && item.selected && 'selected', { disabled, readonly }) },
|
|
2445
2453
|
treeview && (index$1.h("div", { class: "bcm-list__item-content-collapse-icon", onClick: () => collapseClick() }, isHaveChildren && index$1.h("bcm-icon", { icon: index$2.classnames('fas fa-caret-' + (item.isSearching || item.open ? 'down' : 'right')) }))),
|
|
2446
2454
|
index$1.h("div", { class: index$2.classnames('bcm-list__item-content-text', { treeview }), onClick: (e) => itemClick(e) },
|
|
2447
2455
|
checkboxes && (treeview || (!treeview && item.type != 'group')) && (index$1.h("div", { class: "bcm-list__item-content-text-checkbox" },
|
|
2448
|
-
index$1.h(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled:
|
|
2456
|
+
index$1.h(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled: disabled }))),
|
|
2449
2457
|
index$1.h("span", Object.assign({ class: "bcm-list__item-content-text-inner" }, (item.title && { "title": item.title }), { innerHTML: text })))),
|
|
2450
2458
|
(treeview || !treeview && item.type == "group") && isHaveChildren && (index$1.h("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open || (!treeview && item.type == "group")) &&
|
|
2451
2459
|
item.items.map((item) => (index$1.h(ListItemTemplate, { highlight: highlight, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, size: size, selectedItem: selectedItem, checkedItem: checkedItem, openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) })))))));
|
|
2452
2460
|
};
|
|
2453
2461
|
|
|
2454
|
-
const ListTemplate = ({ type, highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, tempId, data, width, height, size, searchPlaceholder, minSearchLength, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, handleTransitionEnd, }) => {
|
|
2462
|
+
const ListTemplate = ({ type, highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, tempId, data, width, height, size, searchPlaceholder, minSearchLength, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, handleTransitionEnd, disabled, readonly, }) => {
|
|
2455
2463
|
const showSelectAll = !(treeview && searchFound > 0) && !(searchFound > 0);
|
|
2456
2464
|
const setScrollHeight = () => {
|
|
2457
2465
|
const itemHeight = size === 'small' ? 28 : size === 'medium' ? 36 : 48;
|
|
@@ -2465,8 +2473,8 @@ const ListTemplate = ({ type, highlight, selectAllItem, bcmListContainer, treevi
|
|
|
2465
2473
|
index$1.h("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: Object.assign({}, (type === 'select' && { 'overscroll-behavior': 'none' })) },
|
|
2466
2474
|
index$1.h("div", { style: setScrollHeight() },
|
|
2467
2475
|
checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (index$1.h("section", { class: "bcm-list__container-select-all" },
|
|
2468
|
-
index$1.h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
|
|
2469
|
-
items.map((item) => (index$1.h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
|
|
2476
|
+
index$1.h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId), disabled: disabled, readonly: readonly }))),
|
|
2477
|
+
items.map((item) => (index$1.h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId), disabled: disabled, readonly: readonly }))),
|
|
2470
2478
|
(!items || items.length === 0) && searchFound != 0 && (index$1.h("section", { class: "bcm-list__container-no-data" },
|
|
2471
2479
|
index$1.h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
|
|
2472
2480
|
index$1.h("span", { innerHTML: emptyText || 'No data' })))),
|
|
@@ -19879,26 +19887,9 @@ const BcmColorInput = class {
|
|
|
19879
19887
|
}
|
|
19880
19888
|
handleChange(color) {
|
|
19881
19889
|
this.value = color;
|
|
19882
|
-
this.getInputElement().setValue(color);
|
|
19883
|
-
index$1.forceUpdate(this.el);
|
|
19884
|
-
}
|
|
19885
|
-
getInputElement() {
|
|
19886
|
-
return this.el.querySelector(`bcm-input`);
|
|
19887
19890
|
}
|
|
19888
|
-
|
|
19889
|
-
|
|
19890
|
-
}
|
|
19891
|
-
handleInputChanged(e) {
|
|
19892
|
-
this.value = e.detail;
|
|
19893
|
-
const picker = this.getPickerElement();
|
|
19894
|
-
if (picker) {
|
|
19895
|
-
if (this.type === "palette") {
|
|
19896
|
-
picker.value = e.detail;
|
|
19897
|
-
}
|
|
19898
|
-
else {
|
|
19899
|
-
picker.color = e.detail;
|
|
19900
|
-
}
|
|
19901
|
-
}
|
|
19891
|
+
handleInputChanged(value) {
|
|
19892
|
+
this.value = value;
|
|
19902
19893
|
}
|
|
19903
19894
|
eyeDropper() {
|
|
19904
19895
|
const eyeDropper = new window.EyeDropper();
|
|
@@ -19920,9 +19911,9 @@ const BcmColorInput = class {
|
|
|
19920
19911
|
return typeof window !== "undefined" && "EyeDropper" in window;
|
|
19921
19912
|
}
|
|
19922
19913
|
render() {
|
|
19923
|
-
return (index$1.h(index$1.Host, { class: "tw-block" }, index$1.h("bcm-input", { id: this._id + "-color", fullWidth: this.fullWidth, label: this.label, placeholder: this.placeholder, type: "text", disabled: this.disabled, readonly: this.readonly, "onBcm-change":
|
|
19914
|
+
return (index$1.h(index$1.Host, { class: "tw-block" }, index$1.h("bcm-input", { id: this._id + "-color", fullWidth: this.fullWidth, label: this.label, placeholder: this.placeholder, type: "text", disabled: this.disabled, readonly: this.readonly, "onBcm-change": ({ detail }) => this.handleInputChanged(detail), value: this.value }, index$1.h("i", { slot: "prefix", class: "tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-color-default", style: {
|
|
19924
19915
|
backgroundColor: this.value,
|
|
19925
|
-
} }), this.isEyeDropperSupported() && index$1.h("i", { slot: "suffix", class: "far fa-eye-dropper", onClick: () => this.eyeDropper() })), index$1.h("bcm-linked", { targetId: this._id + "-color" }, this.type === 'palette' ? (index$1.h("bcm-color-palette", { id: this._id + "-picker", value: this.value, "onBcm-change":
|
|
19916
|
+
} }), this.isEyeDropperSupported() && index$1.h("i", { slot: "suffix", class: "far fa-eye-dropper", onClick: () => this.eyeDropper() })), index$1.h("bcm-linked", { targetId: this._id + "-color-container" }, this.type === 'palette' ? (index$1.h("bcm-color-palette", { id: this._id + "-picker", value: this.value, "onBcm-change": ({ detail }) => this.handleChange(detail) })) : (index$1.h("bcm-colorful", { id: this._id + "-picker", color: this.value, onBcmChange: ({ detail }) => this.handleChange(detail) })))));
|
|
19926
19917
|
}
|
|
19927
19918
|
get el() { return index$1.getElement(this); }
|
|
19928
19919
|
};
|
|
@@ -19958,8 +19949,8 @@ const BcmColorPalette = class {
|
|
|
19958
19949
|
this.bcmChange.emit(hex);
|
|
19959
19950
|
};
|
|
19960
19951
|
this.value = undefined;
|
|
19961
|
-
this.paletteKeys = ["orange", "yellow", "lime", "green", "teal", "cyan", "sky", "indigo", "violet", "purple", "fuchsia", "pink"];
|
|
19962
|
-
this.shades = [900, 800, 700, 600,
|
|
19952
|
+
this.paletteKeys = ["orange", "yellow", "lime", "green", "teal", "cyan", "sky", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "stone", "slate"];
|
|
19953
|
+
this.shades = [950, 900, 800, 700, 600, 400, 300, 200, 100, 50];
|
|
19963
19954
|
}
|
|
19964
19955
|
render() {
|
|
19965
19956
|
const { host, column, box } = colorPaletteStyle();
|
|
@@ -24921,6 +24912,41 @@ const BcmDropdown = class {
|
|
|
24921
24912
|
item.setActive(id);
|
|
24922
24913
|
});
|
|
24923
24914
|
}
|
|
24915
|
+
componentWillLoad() {
|
|
24916
|
+
this.checkContent();
|
|
24917
|
+
}
|
|
24918
|
+
componentDidLoad() {
|
|
24919
|
+
this.observeContent();
|
|
24920
|
+
}
|
|
24921
|
+
disconnectedCallback() {
|
|
24922
|
+
var _a;
|
|
24923
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
24924
|
+
}
|
|
24925
|
+
observeContent() {
|
|
24926
|
+
this.observer = new MutationObserver(() => {
|
|
24927
|
+
this.manualSlotContent();
|
|
24928
|
+
});
|
|
24929
|
+
this.observer.observe(this.el, { childList: true });
|
|
24930
|
+
}
|
|
24931
|
+
manualSlotContent() {
|
|
24932
|
+
const contentNodes = this.el.querySelectorAll(':scope > [slot="content"], :scope > bcm-content, :scope > bcm-items');
|
|
24933
|
+
if (contentNodes.length > 0) {
|
|
24934
|
+
const menu = document.getElementById(this.menuId);
|
|
24935
|
+
if (menu) {
|
|
24936
|
+
contentNodes.forEach(node => {
|
|
24937
|
+
if (!menu.contains(node)) {
|
|
24938
|
+
menu.appendChild(node);
|
|
24939
|
+
}
|
|
24940
|
+
});
|
|
24941
|
+
if (menu === null || menu === void 0 ? void 0 : menu.updateLayout) {
|
|
24942
|
+
menu === null || menu === void 0 ? void 0 : menu.updateLayout();
|
|
24943
|
+
}
|
|
24944
|
+
}
|
|
24945
|
+
}
|
|
24946
|
+
}
|
|
24947
|
+
checkContent() {
|
|
24948
|
+
this.manualSlotContent();
|
|
24949
|
+
}
|
|
24924
24950
|
async getActive() {
|
|
24925
24951
|
return this.activeItem;
|
|
24926
24952
|
}
|
|
@@ -25153,6 +25179,7 @@ const BcmForm = class {
|
|
|
25153
25179
|
CHECKBOX: 'checkbox',
|
|
25154
25180
|
RADIO_GROUP: 'radio-group',
|
|
25155
25181
|
CHECKBOX_GROUP: 'checkbox-group',
|
|
25182
|
+
FILE_UPLOAD: 'file-upload',
|
|
25156
25183
|
RANGE: 'range',
|
|
25157
25184
|
// sadece value fırlatıyor
|
|
25158
25185
|
FORM: 'form',
|
|
@@ -26115,10 +26142,94 @@ const BcmLink = class {
|
|
|
26115
26142
|
};
|
|
26116
26143
|
BcmLink.style = linkCss;
|
|
26117
26144
|
|
|
26145
|
+
class LinkedFocusManager {
|
|
26146
|
+
constructor() {
|
|
26147
|
+
this.focusableSelector = [
|
|
26148
|
+
"a[href]",
|
|
26149
|
+
"area[href]",
|
|
26150
|
+
"button:not([disabled])",
|
|
26151
|
+
"input:not([disabled]):not([type='hidden'])",
|
|
26152
|
+
"select:not([disabled])",
|
|
26153
|
+
"textarea:not([disabled])",
|
|
26154
|
+
"iframe",
|
|
26155
|
+
"object",
|
|
26156
|
+
"embed",
|
|
26157
|
+
"[contenteditable='true']",
|
|
26158
|
+
"[tabindex]:not([tabindex='-1'])",
|
|
26159
|
+
].join(",");
|
|
26160
|
+
}
|
|
26161
|
+
getFocusableElements(linkedElement) {
|
|
26162
|
+
return Array.from(linkedElement.querySelectorAll(this.focusableSelector)).filter(item => {
|
|
26163
|
+
const style = window.getComputedStyle(item);
|
|
26164
|
+
return style.display !== "none" && style.visibility !== "hidden";
|
|
26165
|
+
});
|
|
26166
|
+
}
|
|
26167
|
+
handleKeyboardNavigation(params) {
|
|
26168
|
+
const { event, isOpen, canKeyboardOpen, linkedElement, targetElement, openLinked, hideLinked } = params;
|
|
26169
|
+
const keyCode = event.keyCode || event.which;
|
|
26170
|
+
const isSpaceKey = event.key === " " || event.key === "Spacebar" || keyCode === 32;
|
|
26171
|
+
const isEnterKey = event.key === "Enter" || keyCode === 13;
|
|
26172
|
+
const activeElement = document.activeElement;
|
|
26173
|
+
const isTargetFocused = activeElement === targetElement;
|
|
26174
|
+
const isFocusInsideTarget = !!(activeElement && targetElement.contains(activeElement));
|
|
26175
|
+
const isFocusInsideLinked = !!activeElement && linkedElement.contains(activeElement);
|
|
26176
|
+
const isTriggerFocused = isTargetFocused || isFocusInsideTarget;
|
|
26177
|
+
if (!isOpen && canKeyboardOpen && isTriggerFocused) {
|
|
26178
|
+
if (isSpaceKey || isEnterKey) {
|
|
26179
|
+
event.preventDefault();
|
|
26180
|
+
event.stopPropagation();
|
|
26181
|
+
event.stopImmediatePropagation();
|
|
26182
|
+
openLinked();
|
|
26183
|
+
return;
|
|
26184
|
+
}
|
|
26185
|
+
}
|
|
26186
|
+
if (!isOpen)
|
|
26187
|
+
return;
|
|
26188
|
+
if (event.key === "Escape") {
|
|
26189
|
+
if (isTriggerFocused || isFocusInsideLinked) {
|
|
26190
|
+
event.preventDefault();
|
|
26191
|
+
hideLinked();
|
|
26192
|
+
targetElement.focus();
|
|
26193
|
+
}
|
|
26194
|
+
return;
|
|
26195
|
+
}
|
|
26196
|
+
if (event.key !== "Tab")
|
|
26197
|
+
return;
|
|
26198
|
+
const focusableElements = this.getFocusableElements(linkedElement);
|
|
26199
|
+
const firstFocusableElement = focusableElements[0];
|
|
26200
|
+
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
26201
|
+
if (!event.shiftKey && isTargetFocused) {
|
|
26202
|
+
event.preventDefault();
|
|
26203
|
+
if (firstFocusableElement) {
|
|
26204
|
+
firstFocusableElement.focus();
|
|
26205
|
+
}
|
|
26206
|
+
else {
|
|
26207
|
+
linkedElement.focus();
|
|
26208
|
+
}
|
|
26209
|
+
return;
|
|
26210
|
+
}
|
|
26211
|
+
if (event.shiftKey && isFocusInsideLinked && firstFocusableElement && activeElement === firstFocusableElement) {
|
|
26212
|
+
event.preventDefault();
|
|
26213
|
+
targetElement.focus();
|
|
26214
|
+
return;
|
|
26215
|
+
}
|
|
26216
|
+
if (!event.shiftKey && isFocusInsideLinked && lastFocusableElement && activeElement === lastFocusableElement) {
|
|
26217
|
+
event.preventDefault();
|
|
26218
|
+
firstFocusableElement.focus();
|
|
26219
|
+
return;
|
|
26220
|
+
}
|
|
26221
|
+
if (focusableElements.length === 0 && isFocusInsideLinked) {
|
|
26222
|
+
event.preventDefault();
|
|
26223
|
+
targetElement.focus();
|
|
26224
|
+
}
|
|
26225
|
+
}
|
|
26226
|
+
}
|
|
26227
|
+
|
|
26118
26228
|
const BcmLinked = class {
|
|
26119
26229
|
constructor(hostRef) {
|
|
26120
26230
|
index$1.registerInstance(this, hostRef);
|
|
26121
26231
|
this.bcmOpen = index$1.createEvent(this, "bcm-open", 7);
|
|
26232
|
+
this.focusManager = new LinkedFocusManager();
|
|
26122
26233
|
this._id = generate.Generate.UID();
|
|
26123
26234
|
this.placement = bcm.Bcm.Placement["bottom-start"];
|
|
26124
26235
|
this.trigger = bcm.Bcm.TriggerType.click;
|
|
@@ -26256,6 +26367,9 @@ const BcmLinked = class {
|
|
|
26256
26367
|
}
|
|
26257
26368
|
return this.isOpen;
|
|
26258
26369
|
}
|
|
26370
|
+
async updateLayout() {
|
|
26371
|
+
this.calculatePosition();
|
|
26372
|
+
}
|
|
26259
26373
|
async toggle(wait = true) {
|
|
26260
26374
|
return this.isOpen ? await this.hide(wait) : await this.show(wait);
|
|
26261
26375
|
}
|
|
@@ -26303,9 +26417,24 @@ const BcmLinked = class {
|
|
|
26303
26417
|
this.isMouseOverLink = false;
|
|
26304
26418
|
this.show();
|
|
26305
26419
|
}
|
|
26420
|
+
keyboardNavigation(e) {
|
|
26421
|
+
const target = this.target();
|
|
26422
|
+
if (!target)
|
|
26423
|
+
return;
|
|
26424
|
+
const canKeyboardOpen = this.trigger !== bcm.Bcm.TriggerType.hover && this.trigger !== bcm.Bcm.TriggerType.custom;
|
|
26425
|
+
this.focusManager.handleKeyboardNavigation({
|
|
26426
|
+
event: e,
|
|
26427
|
+
isOpen: this.isOpen,
|
|
26428
|
+
canKeyboardOpen,
|
|
26429
|
+
linkedElement: this.el,
|
|
26430
|
+
targetElement: target,
|
|
26431
|
+
openLinked: () => this.show(false),
|
|
26432
|
+
hideLinked: () => this.hide(false),
|
|
26433
|
+
});
|
|
26434
|
+
}
|
|
26306
26435
|
render() {
|
|
26307
26436
|
const openStyle = this.isOpen ? { visibility: "visible", opacity: "1" } : { visibility: "hidden", opacity: "0" };
|
|
26308
|
-
return (index$1.h(index$1.Host, { class: "tw-invisible tw-absolute tw-left-0 tw-top-0 tw-z-tooltip tw-block tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-opacity-0 tw-shadow tw-transition-opacity tw-duration-100", style: Object.assign(Object.assign({}, openStyle), { overflow: "auto" }) }, index$1.h("slot", null)));
|
|
26437
|
+
return (index$1.h(index$1.Host, { class: "tw-invisible tw-absolute tw-left-0 tw-top-0 tw-z-tooltip tw-block tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-opacity-0 tw-shadow tw-transition-opacity tw-duration-100", tabindex: "-1", style: Object.assign(Object.assign({}, openStyle), { overflow: "auto" }) }, index$1.h("slot", null)));
|
|
26309
26438
|
}
|
|
26310
26439
|
get el() { return index$1.getElement(this); }
|
|
26311
26440
|
static get watchers() { return {
|
|
@@ -26808,6 +26937,347 @@ const listState = {
|
|
|
26808
26937
|
removeState: removeState$1,
|
|
26809
26938
|
};
|
|
26810
26939
|
|
|
26940
|
+
class ListFocusManager {
|
|
26941
|
+
constructor() {
|
|
26942
|
+
this.focusableSelector = [
|
|
26943
|
+
"a[href]",
|
|
26944
|
+
"area[href]",
|
|
26945
|
+
"button:not([disabled])",
|
|
26946
|
+
"input:not([disabled]):not([type='hidden'])",
|
|
26947
|
+
"select:not([disabled])",
|
|
26948
|
+
"textarea:not([disabled])",
|
|
26949
|
+
"[contenteditable='true']",
|
|
26950
|
+
"[tabindex]:not([tabindex='-1'])",
|
|
26951
|
+
].join(",");
|
|
26952
|
+
}
|
|
26953
|
+
getFocusableElements(container) {
|
|
26954
|
+
return Array.from(container.querySelectorAll(this.focusableSelector)).filter(item => this.isVisible(item));
|
|
26955
|
+
}
|
|
26956
|
+
getFirstFocusableElement(container) {
|
|
26957
|
+
if (!container)
|
|
26958
|
+
return null;
|
|
26959
|
+
if (this.canReceiveProgrammaticFocus(container))
|
|
26960
|
+
return container;
|
|
26961
|
+
return this.getFocusableElements(container)[0] || null;
|
|
26962
|
+
}
|
|
26963
|
+
getListItems(listElement) {
|
|
26964
|
+
if (!listElement)
|
|
26965
|
+
return [];
|
|
26966
|
+
return Array.from(listElement.querySelectorAll(".bcm-list__item")).filter(item => this.canReceiveProgrammaticFocus(item));
|
|
26967
|
+
}
|
|
26968
|
+
getItemById(listElement, itemId) {
|
|
26969
|
+
return this.getListItems(listElement).find(item => item.id === itemId) || null;
|
|
26970
|
+
}
|
|
26971
|
+
getCurrentListItem(listElement, activeElement) {
|
|
26972
|
+
if (!listElement)
|
|
26973
|
+
return null;
|
|
26974
|
+
const activeItem = activeElement === null || activeElement === void 0 ? void 0 : activeElement.closest(".bcm-list__item");
|
|
26975
|
+
if (activeItem && this.isInsideElement(listElement, activeItem) && this.canReceiveProgrammaticFocus(activeItem)) {
|
|
26976
|
+
return activeItem;
|
|
26977
|
+
}
|
|
26978
|
+
const focusedItem = listElement.querySelector(".bcm-list__item.focused");
|
|
26979
|
+
return this.canReceiveProgrammaticFocus(focusedItem) ? focusedItem : null;
|
|
26980
|
+
}
|
|
26981
|
+
getPreferredListFocusElement(listElement, direction = "first") {
|
|
26982
|
+
var _a;
|
|
26983
|
+
if (!listElement)
|
|
26984
|
+
return null;
|
|
26985
|
+
const focusedItem = listElement.querySelector(".bcm-list__item.focused");
|
|
26986
|
+
if (focusedItem && this.canReceiveProgrammaticFocus(focusedItem))
|
|
26987
|
+
return focusedItem;
|
|
26988
|
+
const selectedItem = (_a = listElement.querySelector(".bcm-list__item .selected")) === null || _a === void 0 ? void 0 : _a.closest(".bcm-list__item");
|
|
26989
|
+
if (selectedItem && this.canReceiveProgrammaticFocus(selectedItem))
|
|
26990
|
+
return selectedItem;
|
|
26991
|
+
const listItems = this.getListItems(listElement);
|
|
26992
|
+
if (listItems.length > 0) {
|
|
26993
|
+
return direction === "last" ? listItems[listItems.length - 1] : listItems[0];
|
|
26994
|
+
}
|
|
26995
|
+
const focusableElements = this.getFocusableElements(listElement);
|
|
26996
|
+
return direction === "last" ? focusableElements[focusableElements.length - 1] || null : focusableElements[0] || null;
|
|
26997
|
+
}
|
|
26998
|
+
isElementNaturallyFocusable(element) {
|
|
26999
|
+
const nodeName = element.tagName;
|
|
27000
|
+
if (nodeName === "A")
|
|
27001
|
+
return element.hasAttribute("href");
|
|
27002
|
+
return ["BUTTON", "INPUT", "SELECT", "TEXTAREA"].includes(nodeName);
|
|
27003
|
+
}
|
|
27004
|
+
isEditableElement(element) {
|
|
27005
|
+
if (!element)
|
|
27006
|
+
return false;
|
|
27007
|
+
const nodeName = element.tagName;
|
|
27008
|
+
return nodeName === "INPUT" || nodeName === "TEXTAREA" || nodeName === "SELECT" || element.isContentEditable;
|
|
27009
|
+
}
|
|
27010
|
+
isVisible(element) {
|
|
27011
|
+
if (!element.isConnected)
|
|
27012
|
+
return false;
|
|
27013
|
+
const style = window.getComputedStyle(element);
|
|
27014
|
+
return style.display !== "none" && style.visibility !== "hidden";
|
|
27015
|
+
}
|
|
27016
|
+
isInsideElement(parent, child) {
|
|
27017
|
+
return !!(parent && child && (parent === child || parent.contains(child)));
|
|
27018
|
+
}
|
|
27019
|
+
canReceiveProgrammaticFocus(element) {
|
|
27020
|
+
if (!element || !this.isVisible(element))
|
|
27021
|
+
return false;
|
|
27022
|
+
const tabIndexAttr = element.getAttribute("tabindex");
|
|
27023
|
+
if (tabIndexAttr != null) {
|
|
27024
|
+
return Number(tabIndexAttr) >= 0;
|
|
27025
|
+
}
|
|
27026
|
+
return this.isElementNaturallyFocusable(element);
|
|
27027
|
+
}
|
|
27028
|
+
getInteractionContext(params) {
|
|
27029
|
+
const { hostElement, targetElement, listElement, openTriggerElement } = params;
|
|
27030
|
+
const activeElement = document.activeElement;
|
|
27031
|
+
const isFocusInsideTarget = this.isInsideElement(targetElement, activeElement);
|
|
27032
|
+
const isFocusInsideOpenTrigger = this.isInsideElement(openTriggerElement || null, activeElement);
|
|
27033
|
+
const isFocusInsideHost = this.isInsideElement(hostElement, activeElement);
|
|
27034
|
+
const isFocusInsideList = this.isInsideElement(listElement, activeElement);
|
|
27035
|
+
const isTriggerFocused = isFocusInsideHost || isFocusInsideTarget || isFocusInsideOpenTrigger;
|
|
27036
|
+
return {
|
|
27037
|
+
activeElement,
|
|
27038
|
+
isFocusInsideHost,
|
|
27039
|
+
isFocusInsideList,
|
|
27040
|
+
isFocusInsideOpenTrigger,
|
|
27041
|
+
isFocusInsideTarget,
|
|
27042
|
+
isTriggerFocused,
|
|
27043
|
+
};
|
|
27044
|
+
}
|
|
27045
|
+
isInsideSearch(activeElement) {
|
|
27046
|
+
return !!(activeElement === null || activeElement === void 0 ? void 0 : activeElement.closest(".bcm-list__container-search"));
|
|
27047
|
+
}
|
|
27048
|
+
focusElement(element) {
|
|
27049
|
+
var _a;
|
|
27050
|
+
if (!element || !this.canReceiveProgrammaticFocus(element))
|
|
27051
|
+
return false;
|
|
27052
|
+
element.focus();
|
|
27053
|
+
(_a = element.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(element, { block: "nearest" });
|
|
27054
|
+
return this.isInsideElement(element, document.activeElement);
|
|
27055
|
+
}
|
|
27056
|
+
focusListElement(listElement, preferItem = false, direction = "first") {
|
|
27057
|
+
const focusTarget = preferItem ? this.getPreferredListFocusElement(listElement, direction) : this.getFirstFocusableElement(listElement);
|
|
27058
|
+
return this.focusElement(focusTarget);
|
|
27059
|
+
}
|
|
27060
|
+
focusListItemByOffset(listElement, activeElement, offset) {
|
|
27061
|
+
const items = this.getListItems(listElement);
|
|
27062
|
+
if (items.length === 0)
|
|
27063
|
+
return false;
|
|
27064
|
+
const currentItem = this.getCurrentListItem(listElement, activeElement);
|
|
27065
|
+
const currentIndex = currentItem ? items.indexOf(currentItem) : -1;
|
|
27066
|
+
const nextIndex = currentIndex === -1 ? (offset > 0 ? 0 : items.length - 1) : (currentIndex + offset + items.length) % items.length;
|
|
27067
|
+
return this.focusElement(items[nextIndex]);
|
|
27068
|
+
}
|
|
27069
|
+
focusListItemWhenReady(listElement, itemId, remainingAttempts = 6) {
|
|
27070
|
+
if (this.focusElement(this.getItemById(listElement, itemId)))
|
|
27071
|
+
return true;
|
|
27072
|
+
if (remainingAttempts <= 0)
|
|
27073
|
+
return false;
|
|
27074
|
+
requestAnimationFrame(() => {
|
|
27075
|
+
this.focusListItemWhenReady(listElement, itemId, remainingAttempts - 1);
|
|
27076
|
+
});
|
|
27077
|
+
return true;
|
|
27078
|
+
}
|
|
27079
|
+
focusListElementWhenReady(listElement, preferItem = false, direction = "first", remainingAttempts = 6) {
|
|
27080
|
+
if (this.focusListElement(listElement, preferItem, direction))
|
|
27081
|
+
return true;
|
|
27082
|
+
if (remainingAttempts <= 0)
|
|
27083
|
+
return false;
|
|
27084
|
+
requestAnimationFrame(() => {
|
|
27085
|
+
this.focusListElementWhenReady(listElement, preferItem, direction, remainingAttempts - 1);
|
|
27086
|
+
});
|
|
27087
|
+
return true;
|
|
27088
|
+
}
|
|
27089
|
+
getParentListItem(item) {
|
|
27090
|
+
if (!item)
|
|
27091
|
+
return null;
|
|
27092
|
+
const parentId = item.getAttribute("data-parent-id");
|
|
27093
|
+
if (!parentId)
|
|
27094
|
+
return null;
|
|
27095
|
+
return this.getItemById(item.closest(".bcm-list__container"), parentId);
|
|
27096
|
+
}
|
|
27097
|
+
getFirstChildListItem(item) {
|
|
27098
|
+
return (item === null || item === void 0 ? void 0 : item.querySelector(":scope > .bcm-list__item-childs > .bcm-list__item")) || null;
|
|
27099
|
+
}
|
|
27100
|
+
hasTreeChildren(item) {
|
|
27101
|
+
return (item === null || item === void 0 ? void 0 : item.getAttribute("data-has-children")) === "true";
|
|
27102
|
+
}
|
|
27103
|
+
isTreeItemOpen(item) {
|
|
27104
|
+
return (item === null || item === void 0 ? void 0 : item.getAttribute("data-open")) === "true";
|
|
27105
|
+
}
|
|
27106
|
+
isInsideAnyElement(elements, child) {
|
|
27107
|
+
return elements.some(element => this.isInsideElement(element || null, child));
|
|
27108
|
+
}
|
|
27109
|
+
focusAdjacentOutside(params) {
|
|
27110
|
+
const { hostElement, targetElement, listElement, openTriggerElement, direction } = params;
|
|
27111
|
+
const relatedElements = [hostElement, targetElement, listElement, openTriggerElement];
|
|
27112
|
+
const focusableElements = this.getFocusableElements(document.body).filter(item => !this.isInsideAnyElement(relatedElements, item));
|
|
27113
|
+
const documentFocusableElements = this.getFocusableElements(document.body);
|
|
27114
|
+
const relatedIndexes = documentFocusableElements
|
|
27115
|
+
.map((item, index) => (this.isInsideAnyElement(relatedElements, item) ? index : -1))
|
|
27116
|
+
.filter(index => index >= 0);
|
|
27117
|
+
if (relatedIndexes.length === 0 || focusableElements.length === 0)
|
|
27118
|
+
return false;
|
|
27119
|
+
const anchorIndex = direction === "next" ? Math.max(...relatedIndexes) : Math.min(...relatedIndexes);
|
|
27120
|
+
const focusTarget = direction === "next"
|
|
27121
|
+
? documentFocusableElements.slice(anchorIndex + 1).find(item => focusableElements.includes(item))
|
|
27122
|
+
: documentFocusableElements
|
|
27123
|
+
.slice(0, anchorIndex)
|
|
27124
|
+
.reverse()
|
|
27125
|
+
.find(item => focusableElements.includes(item));
|
|
27126
|
+
return this.focusElement(focusTarget || null);
|
|
27127
|
+
}
|
|
27128
|
+
restoreTriggerFocus(params) {
|
|
27129
|
+
const { hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger } = params;
|
|
27130
|
+
const primaryTarget = preferOpenTrigger ? openTriggerElement : autocompleteInput || targetElement;
|
|
27131
|
+
const secondaryTarget = preferOpenTrigger ? autocompleteInput || targetElement : openTriggerElement;
|
|
27132
|
+
const focusTarget = this.getFirstFocusableElement(primaryTarget || null) || this.getFirstFocusableElement(secondaryTarget || null) || this.getFirstFocusableElement(hostElement);
|
|
27133
|
+
focusTarget === null || focusTarget === void 0 ? void 0 : focusTarget.focus();
|
|
27134
|
+
}
|
|
27135
|
+
handleKeyDown(params) {
|
|
27136
|
+
const { disabled, isOpen, isOverlayType } = params;
|
|
27137
|
+
if (disabled || !isOverlayType)
|
|
27138
|
+
return false;
|
|
27139
|
+
return isOpen ? this.handleOpenOverlayKeyDown(params) : this.handleClosedOverlayKeyDown(params);
|
|
27140
|
+
}
|
|
27141
|
+
handleClosedOverlayKeyDown(params) {
|
|
27142
|
+
const { event, hostElement, targetElement, listElement, openList, openTriggerElement } = params;
|
|
27143
|
+
const keyCode = event.keyCode || event.which;
|
|
27144
|
+
const isSpaceKey = event.key === " " || event.key === "Spacebar" || keyCode === 32;
|
|
27145
|
+
const isArrowDownKey = event.key === "ArrowDown" || keyCode === 40;
|
|
27146
|
+
const isArrowUpKey = event.key === "ArrowUp" || keyCode === 38;
|
|
27147
|
+
const context = this.getInteractionContext({ hostElement, targetElement, listElement, openTriggerElement });
|
|
27148
|
+
if (!context.isTriggerFocused)
|
|
27149
|
+
return false;
|
|
27150
|
+
if (this.isEditableElement(context.activeElement) && !isArrowDownKey && !isArrowUpKey)
|
|
27151
|
+
return false;
|
|
27152
|
+
if (!isSpaceKey && !isArrowDownKey && !isArrowUpKey)
|
|
27153
|
+
return false;
|
|
27154
|
+
event.preventDefault();
|
|
27155
|
+
event.stopPropagation();
|
|
27156
|
+
event.stopImmediatePropagation();
|
|
27157
|
+
openList();
|
|
27158
|
+
if (isArrowDownKey || isArrowUpKey) {
|
|
27159
|
+
this.focusListElementWhenReady(listElement, true, isArrowUpKey ? "last" : "first");
|
|
27160
|
+
}
|
|
27161
|
+
return true;
|
|
27162
|
+
}
|
|
27163
|
+
handleOpenOverlayKeyDown(params) {
|
|
27164
|
+
const { event, hostElement, targetElement, listElement, closeList, selectFocusedItem, openGroup, treeview, checkboxes, autocompleteInput, openTriggerElement } = params;
|
|
27165
|
+
const keyCode = event.keyCode || event.which;
|
|
27166
|
+
const isSpaceKey = event.key === " " || event.key === "Spacebar" || keyCode === 32;
|
|
27167
|
+
const isEnterKey = event.key === "Enter" || keyCode === 13;
|
|
27168
|
+
const isEscapeKey = event.key === "Escape" || keyCode === 27;
|
|
27169
|
+
const isTabKey = event.key === "Tab" || keyCode === 9;
|
|
27170
|
+
const isArrowDownKey = event.key === "ArrowDown" || keyCode === 40;
|
|
27171
|
+
const isArrowUpKey = event.key === "ArrowUp" || keyCode === 38;
|
|
27172
|
+
const isArrowRightKey = event.key === "ArrowRight" || keyCode === 39;
|
|
27173
|
+
const isArrowLeftKey = event.key === "ArrowLeft" || keyCode === 37;
|
|
27174
|
+
const context = this.getInteractionContext({ hostElement, targetElement, listElement, openTriggerElement });
|
|
27175
|
+
const currentItem = this.getCurrentListItem(listElement, context.activeElement);
|
|
27176
|
+
const isInsideSearch = this.isInsideSearch(context.activeElement);
|
|
27177
|
+
if (isEscapeKey && (context.isTriggerFocused || context.isFocusInsideList || context.isFocusInsideHost)) {
|
|
27178
|
+
event.preventDefault();
|
|
27179
|
+
event.stopPropagation();
|
|
27180
|
+
event.stopImmediatePropagation();
|
|
27181
|
+
closeList();
|
|
27182
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27183
|
+
return true;
|
|
27184
|
+
}
|
|
27185
|
+
if (isSpaceKey && checkboxes && currentItem && !isInsideSearch) {
|
|
27186
|
+
event.preventDefault();
|
|
27187
|
+
event.stopPropagation();
|
|
27188
|
+
event.stopImmediatePropagation();
|
|
27189
|
+
selectFocusedItem(currentItem.id);
|
|
27190
|
+
return true;
|
|
27191
|
+
}
|
|
27192
|
+
if (isSpaceKey && currentItem && !checkboxes && !isInsideSearch) {
|
|
27193
|
+
event.preventDefault();
|
|
27194
|
+
event.stopPropagation();
|
|
27195
|
+
event.stopImmediatePropagation();
|
|
27196
|
+
return true;
|
|
27197
|
+
}
|
|
27198
|
+
if (isSpaceKey && context.isTriggerFocused && !this.isEditableElement(context.activeElement)) {
|
|
27199
|
+
event.preventDefault();
|
|
27200
|
+
event.stopPropagation();
|
|
27201
|
+
event.stopImmediatePropagation();
|
|
27202
|
+
closeList();
|
|
27203
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27204
|
+
return true;
|
|
27205
|
+
}
|
|
27206
|
+
if ((isArrowDownKey || isArrowUpKey) && listElement && (context.isFocusInsideList || context.isTriggerFocused)) {
|
|
27207
|
+
event.preventDefault();
|
|
27208
|
+
event.stopPropagation();
|
|
27209
|
+
event.stopImmediatePropagation();
|
|
27210
|
+
if (context.isFocusInsideList && !isInsideSearch) {
|
|
27211
|
+
return this.focusListItemByOffset(listElement, context.activeElement, isArrowUpKey ? -1 : 1);
|
|
27212
|
+
}
|
|
27213
|
+
return this.focusListElementWhenReady(listElement, true, isArrowUpKey ? "last" : "first");
|
|
27214
|
+
}
|
|
27215
|
+
if (treeview && (isArrowRightKey || isArrowLeftKey) && currentItem && !isInsideSearch) {
|
|
27216
|
+
event.preventDefault();
|
|
27217
|
+
event.stopPropagation();
|
|
27218
|
+
event.stopImmediatePropagation();
|
|
27219
|
+
if (isArrowRightKey) {
|
|
27220
|
+
if (this.hasTreeChildren(currentItem) && !this.isTreeItemOpen(currentItem)) {
|
|
27221
|
+
openGroup(currentItem.id);
|
|
27222
|
+
return this.focusListItemWhenReady(listElement, currentItem.id);
|
|
27223
|
+
}
|
|
27224
|
+
return this.focusElement(this.getFirstChildListItem(currentItem));
|
|
27225
|
+
}
|
|
27226
|
+
if (this.hasTreeChildren(currentItem) && this.isTreeItemOpen(currentItem)) {
|
|
27227
|
+
openGroup(currentItem.id);
|
|
27228
|
+
return this.focusListItemWhenReady(listElement, currentItem.id);
|
|
27229
|
+
}
|
|
27230
|
+
return this.focusElement(this.getParentListItem(currentItem));
|
|
27231
|
+
}
|
|
27232
|
+
if (isEnterKey && context.isFocusInsideOpenTrigger && !this.isEditableElement(context.activeElement) && listElement) {
|
|
27233
|
+
event.preventDefault();
|
|
27234
|
+
event.stopPropagation();
|
|
27235
|
+
event.stopImmediatePropagation();
|
|
27236
|
+
return this.focusListElementWhenReady(listElement, true, "first");
|
|
27237
|
+
}
|
|
27238
|
+
if (isEnterKey && listElement && context.isFocusInsideList && !isInsideSearch) {
|
|
27239
|
+
const focusedItem = currentItem || listElement.querySelector(".bcm-list__item.focused");
|
|
27240
|
+
if (focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.id) {
|
|
27241
|
+
event.preventDefault();
|
|
27242
|
+
event.stopPropagation();
|
|
27243
|
+
event.stopImmediatePropagation();
|
|
27244
|
+
selectFocusedItem(focusedItem.id);
|
|
27245
|
+
return true;
|
|
27246
|
+
}
|
|
27247
|
+
}
|
|
27248
|
+
if (!isTabKey || !listElement)
|
|
27249
|
+
return false;
|
|
27250
|
+
const focusableElements = this.getFocusableElements(listElement);
|
|
27251
|
+
const firstFocusableElement = focusableElements[0];
|
|
27252
|
+
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
27253
|
+
if (!event.shiftKey && context.isTriggerFocused) {
|
|
27254
|
+
event.preventDefault();
|
|
27255
|
+
return this.focusListElementWhenReady(listElement);
|
|
27256
|
+
}
|
|
27257
|
+
if (event.shiftKey && context.isFocusInsideList && firstFocusableElement && context.activeElement === firstFocusableElement) {
|
|
27258
|
+
event.preventDefault();
|
|
27259
|
+
closeList();
|
|
27260
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27261
|
+
return true;
|
|
27262
|
+
}
|
|
27263
|
+
if (!event.shiftKey && context.isFocusInsideList && lastFocusableElement && context.activeElement === lastFocusableElement) {
|
|
27264
|
+
event.preventDefault();
|
|
27265
|
+
closeList();
|
|
27266
|
+
requestAnimationFrame(() => {
|
|
27267
|
+
this.focusAdjacentOutside({ hostElement, targetElement, listElement, openTriggerElement, direction: "next" });
|
|
27268
|
+
});
|
|
27269
|
+
return true;
|
|
27270
|
+
}
|
|
27271
|
+
if (context.isFocusInsideList && focusableElements.length === 0) {
|
|
27272
|
+
event.preventDefault();
|
|
27273
|
+
closeList();
|
|
27274
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27275
|
+
return true;
|
|
27276
|
+
}
|
|
27277
|
+
return false;
|
|
27278
|
+
}
|
|
27279
|
+
}
|
|
27280
|
+
|
|
26811
27281
|
class KeyControl {
|
|
26812
27282
|
constructor(keyCode, element, elementName, childElementName) {
|
|
26813
27283
|
this.elementName = '';
|
|
@@ -26990,13 +27460,18 @@ class ListKeyControl extends KeyControl {
|
|
|
26990
27460
|
}
|
|
26991
27461
|
}
|
|
26992
27462
|
}
|
|
26993
|
-
keyEnterControl() {
|
|
26994
|
-
|
|
27463
|
+
keyEnterControl() {
|
|
27464
|
+
const focused = this.getFocusedElement();
|
|
27465
|
+
if (!(focused === null || focused === void 0 ? void 0 : focused.id))
|
|
27466
|
+
return;
|
|
26995
27467
|
if (this.isCheckBoxes) {
|
|
26996
|
-
|
|
26997
|
-
|
|
27468
|
+
this.checkedItem(focused.id);
|
|
27469
|
+
}
|
|
27470
|
+
else {
|
|
27471
|
+
this.selectedItem(focused.id);
|
|
26998
27472
|
}
|
|
26999
27473
|
}
|
|
27474
|
+
keySpaceControl() { }
|
|
27000
27475
|
keyDown() {
|
|
27001
27476
|
switch (this.getKeyCode()) {
|
|
27002
27477
|
case bcm.Bcm$1.KeyCode.up:
|
|
@@ -27022,7 +27497,7 @@ class ListKeyControl extends KeyControl {
|
|
|
27022
27497
|
keyUp() { }
|
|
27023
27498
|
}
|
|
27024
27499
|
|
|
27025
|
-
const listCss = "@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\"); .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}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-ui-color-background-primary-default);--bcm-checkbox-secondary-color-default:var(--bcm-ui-color-background-base-default);--bcm-checkbox-primary-color-hover:var(--bcm-ui-color-background-primary-hover);--bcm-checkbox-secondary-color-hover:var(--bcm-ui-color-background-default-default);--bcm-checkbox-primary-color-focus-visible:var(--bcm-ui-color-background-primary-active);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-ui-color-background-default-active);--bcm-checkbox-primary-color-active:var(--bcm-ui-color-background-primary-active);--bcm-checkbox-secondary-color-active:var(--bcm-ui-color-background-default-active);--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-ui-color-text-default)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:var(--bcm-ui-font-size-4);line-height:var(--bcm-ui-line-height-4);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:24px}.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:var(--bcm-ui-font-size-5);line-height:var(--bcm-ui-line-height-4);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:32px}.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:var(--bcm-ui-font-size-6);line-height:var(--bcm-ui-line-height-6);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:40px}.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}.bcm-list{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:var(--bcm-ui-font-size-4);line-height:var(--bcm-ui-line-height-4)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:var(--bcm-ui-font-size-5);line-height:var(--bcm-ui-line-height-5)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:var(--bcm-ui-font-size-6);line-height:var(--bcm-ui-line-height-6)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-ui-color-background-base-default);border:1px solid var(--bcm-ui-color-border-default);border-radius:var(--bcm-ui-border-radius-default);box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{display:none;opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{transition:transform 50ms;display:flex}.bcm-list__container.bcm-list__type-linked-component.is-open-animation,.bcm-list__container.bcm-list__type-select.is-open-animation,.bcm-list__container.bcm-list__type-autocomplete.is-open-animation{opacity:1;transform:translateY(0);visibility:visible}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{display:contents}.bcm-list__label>div{display:contents}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;color:var(--bcm-ui-color-text-default);background-color:var(--bcm-ui-color-background-base-default);border:1px solid var(--bcm-ui-color-border-default);border-radius:var(--bcm-ui-border-radius-default);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:#6B7280}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-ui-color-text-placeholder)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 4px 0 4px;font-size:16px;color:var(--bcm-ui-color-text-default)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-ui-color-text-disabled);background-color:var(--bcm-ui-color-background-disabled-default);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-ui-color-border-primary)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-ui-color-border-primary);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-ui-color-border-primary)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-ui-color-text-default);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-ui-color-text-disabled);background-color:var(--bcm-ui-color-background-disabled-default);user-select:none;cursor:not-allowed}.bcm-list__item-content.readonly{color:var(--bcm-new-ds-color-slate-500);background-color:var(--bcm-new-ds-color-slate-100);cursor:default}.bcm-list__item-content.readonly .bcm-list__item-content-collapse-icon{color:var(--bcm-new-ds-color-slate-700);cursor:pointer}.bcm-list__item-content.selected{color:var(--bcm-ui-color-text-primary);background-color:var(--bcm-ui-color-background-stated-primary-default)}.bcm-list__item-content.selected:hover:not(.disabled):not(.readonly){color:var(--bcm-ui-color-text-primary);background-color:var(--bcm-ui-color-background-stated-primary-hover)}.bcm-list__item-content:hover:not(.disabled):not(.readonly){background-color:var(--bcm-ui-color-background-base-hover)}.bcm-list__item-content:active:not(.disabled):not(.readonly){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-ui-color-background-base-active)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}";
|
|
27500
|
+
const listCss = "@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\"); .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}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-ui-color-background-primary-default);--bcm-checkbox-secondary-color-default:var(--bcm-ui-color-background-base-default);--bcm-checkbox-primary-color-hover:var(--bcm-ui-color-background-primary-hover);--bcm-checkbox-secondary-color-hover:var(--bcm-ui-color-background-default-default);--bcm-checkbox-primary-color-focus-visible:var(--bcm-ui-color-background-primary-active);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-ui-color-background-default-active);--bcm-checkbox-primary-color-active:var(--bcm-ui-color-background-primary-active);--bcm-checkbox-secondary-color-active:var(--bcm-ui-color-background-default-active);--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-ui-color-text-default)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:var(--bcm-ui-font-size-4);line-height:var(--bcm-ui-line-height-4);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:24px}.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:var(--bcm-ui-font-size-5);line-height:var(--bcm-ui-line-height-4);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:32px}.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:var(--bcm-ui-font-size-6);line-height:var(--bcm-ui-line-height-6);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:40px}.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}.bcm-list{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:var(--bcm-ui-font-size-4);line-height:var(--bcm-ui-line-height-4)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:var(--bcm-ui-font-size-5);line-height:var(--bcm-ui-line-height-5)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:var(--bcm-ui-font-size-6);line-height:var(--bcm-ui-line-height-6)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-ui-color-background-base-default);border:1px solid var(--bcm-ui-color-border-default);border-radius:var(--bcm-ui-border-radius-default);box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{display:none;opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;z-index:10800}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{display:flex}.bcm-list__container.bcm-list__type-linked-component.is-open-animation,.bcm-list__container.bcm-list__type-select.is-open-animation,.bcm-list__container.bcm-list__type-autocomplete.is-open-animation{opacity:1;visibility:visible}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{display:contents}.bcm-list__label>div{display:contents}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;color:var(--bcm-ui-color-text-default);background-color:var(--bcm-ui-color-background-base-default);border:1px solid var(--bcm-ui-color-border-default);border-radius:var(--bcm-ui-border-radius-default);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:#6B7280}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-ui-color-text-placeholder)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 4px 0 4px;font-size:16px;color:var(--bcm-ui-color-text-default)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-ui-color-text-disabled);background-color:var(--bcm-ui-color-background-disabled-default);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-ui-color-border-primary)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-ui-color-border-primary);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-ui-color-border-primary)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-ui-color-text-default);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-ui-color-text-disabled);background-color:var(--bcm-ui-color-background-disabled-default);user-select:none;cursor:not-allowed}.bcm-list__item-content.readonly{color:var(--bcm-new-ds-color-slate-500);background-color:var(--bcm-new-ds-color-slate-100);cursor:default}.bcm-list__item-content.readonly .bcm-list__item-content-collapse-icon{color:var(--bcm-new-ds-color-slate-700);cursor:pointer}.bcm-list__item-content.selected{color:var(--bcm-ui-color-text-primary);background-color:var(--bcm-ui-color-background-stated-primary-default)}.bcm-list__item-content.selected:hover:not(.disabled):not(.readonly){color:var(--bcm-ui-color-text-primary);background-color:var(--bcm-ui-color-background-stated-primary-hover)}.bcm-list__item-content:hover:not(.disabled):not(.readonly){background-color:var(--bcm-ui-color-background-base-hover)}.bcm-list__item-content:active:not(.disabled):not(.readonly){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-ui-color-background-base-active)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (max-width: 768px), (pointer: coarse){.bcm-list__container-search .bcm-input__container,.bcm-list__autocomplete .bcm-input__container{font-size:16px}.bcm-list__container-search .bcm-input-element,.bcm-list__autocomplete .bcm-input-element{font-size:16px}}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}";
|
|
27026
27501
|
|
|
27027
27502
|
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
27028
27503
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -27044,8 +27519,18 @@ const BcmList = class {
|
|
|
27044
27519
|
this.close = index$1.createEvent(this, "bcm-close", 3);
|
|
27045
27520
|
this.listClose = index$1.createEvent(this, "bcm-list-close", 7);
|
|
27046
27521
|
this.listOpen = index$1.createEvent(this, "bcm-list-open", 7);
|
|
27522
|
+
var _a, _b;
|
|
27047
27523
|
this.debounce = null;
|
|
27524
|
+
this.focusManager = new ListFocusManager();
|
|
27525
|
+
this.openTriggerElement = null;
|
|
27526
|
+
this.suppressScrollCloseUntil = 0;
|
|
27048
27527
|
this.debounceHandler = generate.Generate.debounceInput(() => this.listenResize(), 300, false);
|
|
27528
|
+
this.handleVisualViewportChange = () => {
|
|
27529
|
+
if (!this.isOpen)
|
|
27530
|
+
return;
|
|
27531
|
+
this.preventScrollClose(400);
|
|
27532
|
+
this.calculateLocation();
|
|
27533
|
+
};
|
|
27049
27534
|
this._id = generate.Generate.UID();
|
|
27050
27535
|
this.tempId = generate.Generate.UID();
|
|
27051
27536
|
this.type = bcm.Bcm.ListType.listbox;
|
|
@@ -27127,6 +27612,8 @@ const BcmList = class {
|
|
|
27127
27612
|
window.addEventListener("scroll", this.handleWheel.bind(this), true);
|
|
27128
27613
|
window.addEventListener("wheel", this.handleWheel.bind(this), true);
|
|
27129
27614
|
window.addEventListener("resize", this.handleResize.bind(this), true);
|
|
27615
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener("resize", this.handleVisualViewportChange, true);
|
|
27616
|
+
(_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.addEventListener("scroll", this.handleVisualViewportChange, true);
|
|
27130
27617
|
}
|
|
27131
27618
|
connectedCallback() {
|
|
27132
27619
|
if (this.height != "256px") {
|
|
@@ -27177,7 +27664,10 @@ const BcmList = class {
|
|
|
27177
27664
|
// }
|
|
27178
27665
|
}
|
|
27179
27666
|
disconnectedCallback() {
|
|
27667
|
+
var _a, _b;
|
|
27180
27668
|
this.isOpen = false;
|
|
27669
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener("resize", this.handleVisualViewportChange, true);
|
|
27670
|
+
(_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.removeEventListener("scroll", this.handleVisualViewportChange, true);
|
|
27181
27671
|
if (this.stopDeepClean)
|
|
27182
27672
|
return;
|
|
27183
27673
|
listState.removeState(this._id);
|
|
@@ -27236,8 +27726,10 @@ const BcmList = class {
|
|
|
27236
27726
|
}
|
|
27237
27727
|
async handleOpen() {
|
|
27238
27728
|
const isAutoSelected = this.autoFocusSelected && this.type == "select" && !this.checkboxes && this.value;
|
|
27729
|
+
const isMobile = this.isMobileViewport();
|
|
27239
27730
|
if (this.isOpen) {
|
|
27240
27731
|
this.detectClone();
|
|
27732
|
+
await this.prepareMobileViewportForOpen();
|
|
27241
27733
|
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
27242
27734
|
const list = this.el.querySelector(`#bcm-list-${this._id}`);
|
|
27243
27735
|
if (list) {
|
|
@@ -27248,7 +27740,9 @@ const BcmList = class {
|
|
|
27248
27740
|
this.open.emit();
|
|
27249
27741
|
this.calculateLocation();
|
|
27250
27742
|
this.onSelectSearch();
|
|
27251
|
-
|
|
27743
|
+
if (!isMobile) {
|
|
27744
|
+
await utils.delay(50);
|
|
27745
|
+
}
|
|
27252
27746
|
this.isOpenAnimation = true;
|
|
27253
27747
|
if (isAutoSelected) {
|
|
27254
27748
|
this.focusSelectedElement();
|
|
@@ -27306,11 +27800,41 @@ const BcmList = class {
|
|
|
27306
27800
|
this.calculateLocation();
|
|
27307
27801
|
}
|
|
27308
27802
|
}
|
|
27803
|
+
else if (this.shouldKeepOpenWhileInteracting(list)) {
|
|
27804
|
+
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
27805
|
+
this.calculateLocation();
|
|
27806
|
+
}
|
|
27807
|
+
}
|
|
27309
27808
|
else {
|
|
27310
27809
|
this.hide();
|
|
27311
27810
|
}
|
|
27312
27811
|
}
|
|
27313
27812
|
}
|
|
27813
|
+
handleTouchStart(event) {
|
|
27814
|
+
if (!this.isOpen)
|
|
27815
|
+
return;
|
|
27816
|
+
const list = document.querySelector(`#bcm-list-${this._id}`);
|
|
27817
|
+
const isInside = generate.Generate.findEventPath(event, this.el) || (list && generate.Generate.findEventPath(event, list));
|
|
27818
|
+
if (isInside) {
|
|
27819
|
+
this.preventScrollClose(1000);
|
|
27820
|
+
}
|
|
27821
|
+
else if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
27822
|
+
this.isOpen = false;
|
|
27823
|
+
}
|
|
27824
|
+
}
|
|
27825
|
+
handleFocusIn(event) {
|
|
27826
|
+
if (!this.isOpen)
|
|
27827
|
+
return;
|
|
27828
|
+
const list = document.querySelector(`#bcm-list-${this._id}`);
|
|
27829
|
+
const isInside = generate.Generate.findEventPath(event, this.el) || (list && generate.Generate.findEventPath(event, list));
|
|
27830
|
+
if (isInside) {
|
|
27831
|
+
this.preventScrollClose(1000);
|
|
27832
|
+
this.calculateLocation();
|
|
27833
|
+
}
|
|
27834
|
+
else if (this.isOverlayType()) {
|
|
27835
|
+
this.isOpen = false;
|
|
27836
|
+
}
|
|
27837
|
+
}
|
|
27314
27838
|
clearAutocomplete() {
|
|
27315
27839
|
if (this.type == "autocomplete") {
|
|
27316
27840
|
const autocompleteInput = this.getAutoCompleteInput();
|
|
@@ -27406,8 +27930,8 @@ const BcmList = class {
|
|
|
27406
27930
|
var _a, _b, _c, _d, _e, _f;
|
|
27407
27931
|
if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.id) === `bcm-list-${this._id}-search` || ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.id) === `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
|
|
27408
27932
|
this.searchGetParents = generate.snq(() => { var _a; return (_a = event.detail) === null || _a === void 0 ? void 0 : _a.parentIndex; }, null);
|
|
27409
|
-
this.searchResultLimit = 10;
|
|
27410
27933
|
this.searchFound = ((_c = event.detail) === null || _c === void 0 ? void 0 : _c.matching) != null ? (_d = event.detail) === null || _d === void 0 ? void 0 : _d.matching.length : null;
|
|
27934
|
+
this.searchResultLimit = this.getInitialSearchResultLimit();
|
|
27411
27935
|
this.returnFilterData = listState.filterData(this._id, (_e = event.detail) === null || _e === void 0 ? void 0 : _e.nestedResult);
|
|
27412
27936
|
if (this.searchFound > 0 && this.highlight) {
|
|
27413
27937
|
this.highlightText = (_f = event.detail) === null || _f === void 0 ? void 0 : _f.value;
|
|
@@ -27433,13 +27957,51 @@ const BcmList = class {
|
|
|
27433
27957
|
//keyboard navigation
|
|
27434
27958
|
handleKeyDown(ev) {
|
|
27435
27959
|
const keycode = ev.keyCode || ev.which;
|
|
27436
|
-
|
|
27437
|
-
|
|
27960
|
+
const handled = this.focusManager.handleKeyDown({
|
|
27961
|
+
event: ev,
|
|
27962
|
+
disabled: this.disabled,
|
|
27963
|
+
isOpen: this.isOpen,
|
|
27964
|
+
isOverlayType: this.isOverlayType(),
|
|
27965
|
+
hostElement: this.el,
|
|
27966
|
+
targetElement: this.getTargetElement(),
|
|
27967
|
+
listElement: document.getElementById(`bcm-list-${this._id}`),
|
|
27968
|
+
openList: () => {
|
|
27969
|
+
this.rememberOpenTrigger();
|
|
27970
|
+
this.isOpen = true;
|
|
27971
|
+
},
|
|
27972
|
+
closeList: () => {
|
|
27438
27973
|
this.isOpen = false;
|
|
27439
|
-
|
|
27440
|
-
|
|
27441
|
-
|
|
27442
|
-
|
|
27974
|
+
},
|
|
27975
|
+
selectFocusedItem: (itemId) => {
|
|
27976
|
+
if (this.checkboxes) {
|
|
27977
|
+
this.checkedItem(itemId);
|
|
27978
|
+
}
|
|
27979
|
+
else {
|
|
27980
|
+
this.selectedItem(itemId);
|
|
27981
|
+
}
|
|
27982
|
+
},
|
|
27983
|
+
openGroup: (itemId) => {
|
|
27984
|
+
this.openGroup(itemId);
|
|
27985
|
+
},
|
|
27986
|
+
treeview: this.treeview,
|
|
27987
|
+
checkboxes: this.checkboxes,
|
|
27988
|
+
autocompleteInput: this.type == "autocomplete" ? this.getAutoCompleteInput() : null,
|
|
27989
|
+
openTriggerElement: this.openTriggerElement,
|
|
27990
|
+
});
|
|
27991
|
+
if (handled)
|
|
27992
|
+
return;
|
|
27993
|
+
if ((ev.key === "Escape" || keycode === bcm.Bcm.KeyCode.escape) && this.isOpen) {
|
|
27994
|
+
this.isOpen = false;
|
|
27995
|
+
ev.preventDefault();
|
|
27996
|
+
ev.stopPropagation();
|
|
27997
|
+
ev.stopImmediatePropagation();
|
|
27998
|
+
this.focusManager.restoreTriggerFocus({
|
|
27999
|
+
hostElement: this.el,
|
|
28000
|
+
targetElement: this.getTargetElement(),
|
|
28001
|
+
autocompleteInput: this.type == "autocomplete" ? this.getAutoCompleteInput() : null,
|
|
28002
|
+
openTriggerElement: this.openTriggerElement,
|
|
28003
|
+
preferOpenTrigger: true,
|
|
28004
|
+
});
|
|
27443
28005
|
}
|
|
27444
28006
|
if (this.keyControl) {
|
|
27445
28007
|
const keyboard = new ListKeyControl(keycode, this.el, this.treeview, this.checkboxes);
|
|
@@ -27449,6 +28011,9 @@ const BcmList = class {
|
|
|
27449
28011
|
keyboard.checkedItem = checkedItemId => {
|
|
27450
28012
|
this.checkedItem(checkedItemId);
|
|
27451
28013
|
};
|
|
28014
|
+
keyboard.selectedItem = itemId => {
|
|
28015
|
+
this.selectedItem(itemId);
|
|
28016
|
+
};
|
|
27452
28017
|
keyboard.keyDown();
|
|
27453
28018
|
}
|
|
27454
28019
|
}
|
|
@@ -27558,7 +28123,8 @@ const BcmList = class {
|
|
|
27558
28123
|
});
|
|
27559
28124
|
}
|
|
27560
28125
|
}
|
|
27561
|
-
async show() {
|
|
28126
|
+
async show(openTriggerElement) {
|
|
28127
|
+
this.rememberOpenTrigger(openTriggerElement);
|
|
27562
28128
|
this.isOpen = true;
|
|
27563
28129
|
return Promise.resolve();
|
|
27564
28130
|
}
|
|
@@ -27595,11 +28161,50 @@ const BcmList = class {
|
|
|
27595
28161
|
async onSelectSearch() {
|
|
27596
28162
|
const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
|
|
27597
28163
|
if (searchInput) {
|
|
28164
|
+
this.preventScrollClose(1000);
|
|
27598
28165
|
await utils.delay(100);
|
|
27599
28166
|
searchInput.onBcmFocus();
|
|
27600
28167
|
searchInput.onBcmSelect();
|
|
27601
28168
|
}
|
|
27602
28169
|
}
|
|
28170
|
+
preventScrollClose(duration = 500) {
|
|
28171
|
+
this.suppressScrollCloseUntil = Date.now() + duration;
|
|
28172
|
+
}
|
|
28173
|
+
isMobileViewport() {
|
|
28174
|
+
return window.matchMedia("(max-width: 768px), (pointer: coarse)").matches;
|
|
28175
|
+
}
|
|
28176
|
+
async prepareMobileViewportForOpen() {
|
|
28177
|
+
var _a;
|
|
28178
|
+
if (!this.isMobileViewport() || !(this.type == "select" || this.type == "autocomplete" || this.linkedComponent)) {
|
|
28179
|
+
return;
|
|
28180
|
+
}
|
|
28181
|
+
const targetElementId = this.linkedComponent ? this.linkedComponent : `bcm-list-input-${this._id}`;
|
|
28182
|
+
const targetElement = document.getElementById(targetElementId);
|
|
28183
|
+
if (!targetElement)
|
|
28184
|
+
return;
|
|
28185
|
+
const viewportHeight = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
28186
|
+
const rect = targetElement.getBoundingClientRect();
|
|
28187
|
+
const minimumSpaceBelow = Math.min(320, viewportHeight * 0.45);
|
|
28188
|
+
const shouldReposition = rect.top > viewportHeight * 0.35 || viewportHeight - rect.bottom < minimumSpaceBelow;
|
|
28189
|
+
if (shouldReposition) {
|
|
28190
|
+
this.preventScrollClose(1200);
|
|
28191
|
+
const desiredTop = Math.max(110, Math.min(180, viewportHeight * 0.24));
|
|
28192
|
+
const delta = rect.top - desiredTop;
|
|
28193
|
+
window.scrollBy({
|
|
28194
|
+
top: delta,
|
|
28195
|
+
left: 0,
|
|
28196
|
+
behavior: "auto",
|
|
28197
|
+
});
|
|
28198
|
+
await utils.delay(50);
|
|
28199
|
+
this.calculateLocation();
|
|
28200
|
+
}
|
|
28201
|
+
}
|
|
28202
|
+
shouldKeepOpenWhileInteracting(list) {
|
|
28203
|
+
var _a;
|
|
28204
|
+
const activeElement = document.activeElement;
|
|
28205
|
+
const focusedInside = !!(activeElement && (((_a = this.el) === null || _a === void 0 ? void 0 : _a.contains(activeElement)) || (list === null || list === void 0 ? void 0 : list.contains(activeElement))));
|
|
28206
|
+
return focusedInside || Date.now() < this.suppressScrollCloseUntil;
|
|
28207
|
+
}
|
|
27603
28208
|
async filterOtherList(ids) {
|
|
27604
28209
|
const checklist = (await this.getCheckedList()).nestedResult;
|
|
27605
28210
|
const filter = generate.Generate.convertIdsToNestedData(ids, checklist);
|
|
@@ -27662,8 +28267,30 @@ const BcmList = class {
|
|
|
27662
28267
|
}
|
|
27663
28268
|
return generate.snq(() => listState.getData(this._id), []);
|
|
27664
28269
|
}
|
|
28270
|
+
hasNestedItems(items = []) {
|
|
28271
|
+
return items.some((item) => { var _a; return (item === null || item === void 0 ? void 0 : item.type) === "group" || ((_a = item === null || item === void 0 ? void 0 : item.items) === null || _a === void 0 ? void 0 : _a.length) > 0; });
|
|
28272
|
+
}
|
|
28273
|
+
getVisibleSearchItems() {
|
|
28274
|
+
const visibledItems = this.returnFilterData["visibledItems"];
|
|
28275
|
+
if (this.searchFound == null || !Array.isArray(visibledItems)) {
|
|
28276
|
+
return null;
|
|
28277
|
+
}
|
|
28278
|
+
return visibledItems;
|
|
28279
|
+
}
|
|
28280
|
+
getInitialSearchResultLimit() {
|
|
28281
|
+
if (this.searchFound === 0) {
|
|
28282
|
+
return 0;
|
|
28283
|
+
}
|
|
28284
|
+
const initialLimit = Math.max(10, this.limit);
|
|
28285
|
+
return this.searchFound == null ? initialLimit : Math.min(initialLimit, this.searchFound);
|
|
28286
|
+
}
|
|
27665
28287
|
getLimitedItems(ids) {
|
|
27666
|
-
|
|
28288
|
+
const visibleSearchItems = this.getVisibleSearchItems();
|
|
28289
|
+
const limit = this.searchResultLimit || this.limit;
|
|
28290
|
+
if (visibleSearchItems && !this.hasNestedItems(this.getItems())) {
|
|
28291
|
+
return visibleSearchItems.slice(0, limit);
|
|
28292
|
+
}
|
|
28293
|
+
return generate.snq(() => listState.getDataPagination(this._id, limit, ids), []);
|
|
27667
28294
|
}
|
|
27668
28295
|
openGroup(parentId) {
|
|
27669
28296
|
listState.openGroup(this._id, parentId);
|
|
@@ -27691,7 +28318,15 @@ const BcmList = class {
|
|
|
27691
28318
|
this.value = listState.selectedItem(this._id, itemId) ? listState.selectedItem(this._id, itemId)[0] : null;
|
|
27692
28319
|
this.inputText = generate.Generate.domParser((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
|
|
27693
28320
|
this.isOpen = false;
|
|
27694
|
-
this.markForCheck();
|
|
28321
|
+
await this.markForCheck();
|
|
28322
|
+
if (this.isOverlayType()) {
|
|
28323
|
+
await utils.delay(10);
|
|
28324
|
+
this.focusManager.restoreTriggerFocus({
|
|
28325
|
+
hostElement: this.el,
|
|
28326
|
+
targetElement: this.getTargetElement(),
|
|
28327
|
+
autocompleteInput: this.type == "autocomplete" ? this.getAutoCompleteInput() : null,
|
|
28328
|
+
});
|
|
28329
|
+
}
|
|
27695
28330
|
if (this.type == "autocomplete" && this.value) {
|
|
27696
28331
|
// await delay(100)
|
|
27697
28332
|
// this.resetCaption()
|
|
@@ -27729,15 +28364,36 @@ const BcmList = class {
|
|
|
27729
28364
|
getAutoCompleteInput() {
|
|
27730
28365
|
return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`);
|
|
27731
28366
|
}
|
|
28367
|
+
rememberOpenTrigger(openTriggerElement) {
|
|
28368
|
+
const activeElement = openTriggerElement || document.activeElement;
|
|
28369
|
+
this.openTriggerElement = this.isValidOpenTrigger(activeElement) ? activeElement : null;
|
|
28370
|
+
}
|
|
28371
|
+
isValidOpenTrigger(element) {
|
|
28372
|
+
return !!(element && element.isConnected && element !== document.body && element !== document.documentElement);
|
|
28373
|
+
}
|
|
28374
|
+
isOverlayType() {
|
|
28375
|
+
return this.type == "select" || this.type == "autocomplete" || !!this.linkedComponent;
|
|
28376
|
+
}
|
|
28377
|
+
getTargetElement() {
|
|
28378
|
+
const targetElementId = this.linkedComponent ? this.linkedComponent : `bcm-list-input-${this._id}`;
|
|
28379
|
+
return document.getElementById(targetElementId);
|
|
28380
|
+
}
|
|
27732
28381
|
/** @description Fixes the issue where the list appears empty during fast scrolling. */
|
|
27733
28382
|
dataScrollEvent(event) {
|
|
27734
28383
|
var _a, _b;
|
|
27735
28384
|
const itemHeight = this.size === 'small' ? 28 : this.size === 'large' ? 48 : 36;
|
|
27736
28385
|
const currentScrollBottom = ((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.scrollTop) + ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.clientHeight);
|
|
27737
28386
|
const requiredItems = Math.ceil(currentScrollBottom / itemHeight) + 20;
|
|
27738
|
-
|
|
27739
|
-
|
|
27740
|
-
|
|
28387
|
+
const isSearchActive = this.searchFound != null && !this.isSelectedOther;
|
|
28388
|
+
const currentLimit = isSearchActive ? this.searchResultLimit || 0 : this.limit;
|
|
28389
|
+
if (requiredItems > currentLimit) {
|
|
28390
|
+
if (isSearchActive) {
|
|
28391
|
+
this.searchResultLimit = Math.min(requiredItems, this.searchFound);
|
|
28392
|
+
}
|
|
28393
|
+
else {
|
|
28394
|
+
this.limit = requiredItems;
|
|
28395
|
+
this.searchResultLimit = requiredItems;
|
|
28396
|
+
}
|
|
27741
28397
|
}
|
|
27742
28398
|
}
|
|
27743
28399
|
async calculateLocation() {
|
|
@@ -27810,20 +28466,20 @@ const BcmList = class {
|
|
|
27810
28466
|
}
|
|
27811
28467
|
/** @description Focus selected element * BUG 282262 */
|
|
27812
28468
|
focusSelectedElement() {
|
|
27813
|
-
var _a;
|
|
28469
|
+
var _a, _b;
|
|
27814
28470
|
const listElement = document.querySelector(`#bcm-list-${this._id}`);
|
|
27815
28471
|
if (!listElement)
|
|
27816
28472
|
return;
|
|
27817
|
-
const selectedId = (_a = this.value) === null || _a === void 0 ? void 0 : _a.id;
|
|
28473
|
+
const selectedId = Array.isArray(this.value) ? (_a = this.value[0]) === null || _a === void 0 ? void 0 : _a.id : (_b = this.value) === null || _b === void 0 ? void 0 : _b.id;
|
|
27818
28474
|
if (selectedId) {
|
|
27819
|
-
const targetItem = listElement.querySelector(`[id*="${selectedId}"]`);
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
|
|
27823
|
-
|
|
27824
|
-
|
|
27825
|
-
|
|
27826
|
-
targetItem.focus();
|
|
28475
|
+
const targetItem = (listElement.querySelector(`[id="${selectedId}"]`) || listElement.querySelector(`[id*="${selectedId}"]`));
|
|
28476
|
+
const scrollContainer = listElement.querySelector(".scrolling");
|
|
28477
|
+
if (targetItem && scrollContainer) {
|
|
28478
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
28479
|
+
const itemRect = targetItem.getBoundingClientRect();
|
|
28480
|
+
const relativeOffsetTop = itemRect.top - containerRect.top + scrollContainer.scrollTop;
|
|
28481
|
+
scrollContainer.scrollTop = relativeOffsetTop - (containerRect.height / 2) + (itemRect.height / 2);
|
|
28482
|
+
targetItem.focus({ preventScroll: true });
|
|
27827
28483
|
const items = listElement.querySelectorAll(".bcm-list__item");
|
|
27828
28484
|
items.forEach(i => i.classList.remove("focused"));
|
|
27829
28485
|
targetItem.classList.add("focused");
|
|
@@ -27858,7 +28514,7 @@ const BcmList = class {
|
|
|
27858
28514
|
"--min-height": openedType ? "inherit" : this.minHeight,
|
|
27859
28515
|
} }, index$1.h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (index$1.h("div", null, index$1.h("bcm-label", { tooltip: this.tooltip, size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == "select" && (index$1.h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, index$1.h("span", { class: index$2.classnames("bcm-list__input-container", { "type-single": !checkboxes, "value-empty": !this.value }) }, this.checkboxes ? (this.value && this.value.length > 0 ? (index$1.h("bcm-rc-overflow", { data: this.tagData, maxCount: this.tagCount })) : (index$1.h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))) : this.value ? (this.inputText) : (index$1.h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), index$1.h("span", { class: index$2.classnames("bcm-list__input-buttons", {
|
|
27860
28516
|
disabled: disabled,
|
|
27861
|
-
}) }, this.clearable && this.value && (index$1.h("div", { class: "bcm-list__input-buttons-button" }, index$1.h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), index$1.h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, index$1.h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (index$1.h("div", { id: `bcm-list-input-${this._id}`, class: index$2.classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, index$1.h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && index$1.h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), index$1.h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), index$1.h(ListTemplate, { type: this.type, highlight: this.highlightText, searchable: this.type == "autocomplete" ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, tempId: this.tempId, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon, handleTransitionEnd: e => this.handleTransitionEnd(e) }), index$1.h(captionTemplate.CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
28517
|
+
}) }, this.clearable && this.value && (index$1.h("div", { class: "bcm-list__input-buttons-button" }, index$1.h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), index$1.h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, index$1.h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (index$1.h("div", { id: `bcm-list-input-${this._id}`, class: index$2.classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, index$1.h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && index$1.h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), index$1.h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), index$1.h(ListTemplate, { type: this.type, highlight: this.highlightText, searchable: this.type == "autocomplete" ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, tempId: this.tempId, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon, handleTransitionEnd: e => this.handleTransitionEnd(e), disabled: disabled, readonly: readonly }), index$1.h(captionTemplate.CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
27862
28518
|
}
|
|
27863
28519
|
get el() { return index$1.getElement(this); }
|
|
27864
28520
|
static get watchers() { return {
|