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
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
5
|
import { r as registerInstance, h as h$2, H as Host, g as getElement, c as createEvent, a as getRenderingRef, f as forceUpdate, d as getAssetPath } from './index-4614b7f0.js';
|
|
6
|
-
import { G as Generate, S as StatusProps, T as TypeProps, s as snq } from './generate-
|
|
6
|
+
import { G as Generate, S as StatusProps, T as TypeProps, s as snq } from './generate-56d49b70.js';
|
|
7
7
|
import { c as classnames } from './index-00c8a8f7.js';
|
|
8
8
|
import { S as StringHelper } from './string-helper-69203215.js';
|
|
9
9
|
import { C as ColorHelper } from './color-helper-ba15b0d8.js';
|
|
10
10
|
import './datetime-helper-df25808a.js';
|
|
11
|
-
import { N as NumberHelper } from './number-helper-
|
|
12
|
-
import { V as Validators } from './validators-
|
|
11
|
+
import { N as NumberHelper } from './number-helper-455ab41e.js';
|
|
12
|
+
import { V as Validators } from './validators-cc882165.js';
|
|
13
13
|
import './element-dragger-b75266e6.js';
|
|
14
14
|
import { B as Bcm, a as Bcm$1 } from './bcm-a50d55ba.js';
|
|
15
15
|
import { c as ce } from './index-3bc8c6e3.js';
|
|
@@ -26,7 +26,7 @@ import { F as FloatingUI } from './floating-ui-3f4394da.js';
|
|
|
26
26
|
import { g as getPlacement, s as setPosition } from './popover-placement-2bf3a181.js';
|
|
27
27
|
import { C as ColorPalette } from './colors-1d7854ea.js';
|
|
28
28
|
import { T as TypeProps$1, S as SizeProps, D as DirectionProps } from './types-b211a5eb.js';
|
|
29
|
-
import './package-
|
|
29
|
+
import './package-edee14d5.js';
|
|
30
30
|
import './colors-ed4e7579.js';
|
|
31
31
|
|
|
32
32
|
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)}";
|
|
@@ -1305,6 +1305,12 @@ const variantOptions = {
|
|
|
1305
1305
|
icon: 'far fa-download',
|
|
1306
1306
|
iconPosition: 'prefix',
|
|
1307
1307
|
},
|
|
1308
|
+
upload: {
|
|
1309
|
+
text: 'Upload',
|
|
1310
|
+
color: 'blue',
|
|
1311
|
+
icon: 'far fa-cloud-arrow-up',
|
|
1312
|
+
iconPosition: 'prefix',
|
|
1313
|
+
},
|
|
1308
1314
|
};
|
|
1309
1315
|
var VariantProps;
|
|
1310
1316
|
(function (VariantProps) {
|
|
@@ -1331,6 +1337,7 @@ var VariantProps;
|
|
|
1331
1337
|
VariantProps["update"] = "update";
|
|
1332
1338
|
VariantProps["reset"] = "Reset";
|
|
1333
1339
|
VariantProps["download"] = "download";
|
|
1340
|
+
VariantProps["upload"] = "upload";
|
|
1334
1341
|
})(VariantProps || (VariantProps = {}));
|
|
1335
1342
|
|
|
1336
1343
|
const { state: state$4 } = createStore({
|
|
@@ -2393,7 +2400,7 @@ ref, handleBlur, handleFocus, handleInput, handleChange, isEyeDropperSupported,
|
|
|
2393
2400
|
h$2("i", { class: "far fa-eye-dropper", onClick: () => eyeDropper() })))))));
|
|
2394
2401
|
};
|
|
2395
2402
|
|
|
2396
|
-
const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selectedItem, openGroup, checkedItem, focusItem, searchIsOnlyChilds }) => {
|
|
2403
|
+
const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selectedItem, openGroup, checkedItem, focusItem, searchIsOnlyChilds, disabled: parentDisabled, readonly: parentReadonly }) => {
|
|
2397
2404
|
const isHaveChildren = item.items && item.items.length > 0;
|
|
2398
2405
|
var text = StringHelper.htmlEntities(item.text);
|
|
2399
2406
|
let intersection = [];
|
|
@@ -2412,8 +2419,8 @@ const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selecte
|
|
|
2412
2419
|
}
|
|
2413
2420
|
text = item.isHtmlContent ? item.isHtmlContent : item.template && intersection.length > 0 ? StringHelper.templateParser(item.template, Object.assign(Object.assign({}, item.itemObject), { text })) : text;
|
|
2414
2421
|
const unClickable = !treeview && item.type == "group" && !item.clickable;
|
|
2415
|
-
const disabled = item.disabled;
|
|
2416
|
-
const readonly = item.readonly;
|
|
2422
|
+
const disabled = item.disabled || parentDisabled;
|
|
2423
|
+
const readonly = item.readonly || parentReadonly;
|
|
2417
2424
|
const itemClick = (event) => {
|
|
2418
2425
|
let path = event.path || event.composedPath();
|
|
2419
2426
|
if (path.filter(x => x.attributes && x.attributes.getNamedItem("unlinked"))[0]) {
|
|
@@ -2431,23 +2438,24 @@ const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selecte
|
|
|
2431
2438
|
item.open = item.isSearching;
|
|
2432
2439
|
openGroup(item.id);
|
|
2433
2440
|
};
|
|
2434
|
-
return (h$2("div", { id: item.id, hidden: item.hidden, "on-focus": e => !unClickable && !disabled && focusItem(e), tabIndex: unClickable || disabled ? -1 : 0, class: classnames('bcm-list__item',
|
|
2441
|
+
return (h$2("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: classnames('bcm-list__item',
|
|
2435
2442
|
// size === 'large' ? 'size-3' : 'size-2',
|
|
2436
2443
|
'bcm-list__item-' + size, {
|
|
2437
2444
|
'bcm-list__item--group': !treeview && item.type == 'group',
|
|
2445
|
+
'bcm-list__item--open': item.isSearching || item.open,
|
|
2438
2446
|
'bcm-list__item--readonly': readonly,
|
|
2439
2447
|
}) },
|
|
2440
2448
|
h$2("div", { class: classnames('bcm-list__item-content', !checkboxes && item.selected && 'selected', { disabled, readonly }) },
|
|
2441
2449
|
treeview && (h$2("div", { class: "bcm-list__item-content-collapse-icon", onClick: () => collapseClick() }, isHaveChildren && h$2("bcm-icon", { icon: classnames('fas fa-caret-' + (item.isSearching || item.open ? 'down' : 'right')) }))),
|
|
2442
2450
|
h$2("div", { class: classnames('bcm-list__item-content-text', { treeview }), onClick: (e) => itemClick(e) },
|
|
2443
2451
|
checkboxes && (treeview || (!treeview && item.type != 'group')) && (h$2("div", { class: "bcm-list__item-content-text-checkbox" },
|
|
2444
|
-
h$2(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled:
|
|
2452
|
+
h$2(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled: disabled }))),
|
|
2445
2453
|
h$2("span", Object.assign({ class: "bcm-list__item-content-text-inner" }, (item.title && { "title": item.title }), { innerHTML: text })))),
|
|
2446
2454
|
(treeview || !treeview && item.type == "group") && isHaveChildren && (h$2("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open || (!treeview && item.type == "group")) &&
|
|
2447
2455
|
item.items.map((item) => (h$2(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) })))))));
|
|
2448
2456
|
};
|
|
2449
2457
|
|
|
2450
|
-
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, }) => {
|
|
2458
|
+
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, }) => {
|
|
2451
2459
|
const showSelectAll = !(treeview && searchFound > 0) && !(searchFound > 0);
|
|
2452
2460
|
const setScrollHeight = () => {
|
|
2453
2461
|
const itemHeight = size === 'small' ? 28 : size === 'medium' ? 36 : 48;
|
|
@@ -2461,8 +2469,8 @@ const ListTemplate = ({ type, highlight, selectAllItem, bcmListContainer, treevi
|
|
|
2461
2469
|
h$2("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: Object.assign({}, (type === 'select' && { 'overscroll-behavior': 'none' })) },
|
|
2462
2470
|
h$2("div", { style: setScrollHeight() },
|
|
2463
2471
|
checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (h$2("section", { class: "bcm-list__container-select-all" },
|
|
2464
|
-
h$2(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) }))),
|
|
2465
|
-
items.map((item) => (h$2(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) }))),
|
|
2472
|
+
h$2(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 }))),
|
|
2473
|
+
items.map((item) => (h$2(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 }))),
|
|
2466
2474
|
(!items || items.length === 0) && searchFound != 0 && (h$2("section", { class: "bcm-list__container-no-data" },
|
|
2467
2475
|
h$2("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
|
|
2468
2476
|
h$2("span", { innerHTML: emptyText || 'No data' })))),
|
|
@@ -19875,26 +19883,9 @@ const BcmColorInput = class {
|
|
|
19875
19883
|
}
|
|
19876
19884
|
handleChange(color) {
|
|
19877
19885
|
this.value = color;
|
|
19878
|
-
this.getInputElement().setValue(color);
|
|
19879
|
-
forceUpdate(this.el);
|
|
19880
|
-
}
|
|
19881
|
-
getInputElement() {
|
|
19882
|
-
return this.el.querySelector(`bcm-input`);
|
|
19883
19886
|
}
|
|
19884
|
-
|
|
19885
|
-
|
|
19886
|
-
}
|
|
19887
|
-
handleInputChanged(e) {
|
|
19888
|
-
this.value = e.detail;
|
|
19889
|
-
const picker = this.getPickerElement();
|
|
19890
|
-
if (picker) {
|
|
19891
|
-
if (this.type === "palette") {
|
|
19892
|
-
picker.value = e.detail;
|
|
19893
|
-
}
|
|
19894
|
-
else {
|
|
19895
|
-
picker.color = e.detail;
|
|
19896
|
-
}
|
|
19897
|
-
}
|
|
19887
|
+
handleInputChanged(value) {
|
|
19888
|
+
this.value = value;
|
|
19898
19889
|
}
|
|
19899
19890
|
eyeDropper() {
|
|
19900
19891
|
const eyeDropper = new window.EyeDropper();
|
|
@@ -19916,9 +19907,9 @@ const BcmColorInput = class {
|
|
|
19916
19907
|
return typeof window !== "undefined" && "EyeDropper" in window;
|
|
19917
19908
|
}
|
|
19918
19909
|
render() {
|
|
19919
|
-
return (h$2(Host, { class: "tw-block" }, h$2("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":
|
|
19910
|
+
return (h$2(Host, { class: "tw-block" }, h$2("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 }, h$2("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: {
|
|
19920
19911
|
backgroundColor: this.value,
|
|
19921
|
-
} }), this.isEyeDropperSupported() && h$2("i", { slot: "suffix", class: "far fa-eye-dropper", onClick: () => this.eyeDropper() })), h$2("bcm-linked", { targetId: this._id + "-color" }, this.type === 'palette' ? (h$2("bcm-color-palette", { id: this._id + "-picker", value: this.value, "onBcm-change":
|
|
19912
|
+
} }), this.isEyeDropperSupported() && h$2("i", { slot: "suffix", class: "far fa-eye-dropper", onClick: () => this.eyeDropper() })), h$2("bcm-linked", { targetId: this._id + "-color-container" }, this.type === 'palette' ? (h$2("bcm-color-palette", { id: this._id + "-picker", value: this.value, "onBcm-change": ({ detail }) => this.handleChange(detail) })) : (h$2("bcm-colorful", { id: this._id + "-picker", color: this.value, onBcmChange: ({ detail }) => this.handleChange(detail) })))));
|
|
19922
19913
|
}
|
|
19923
19914
|
get el() { return getElement(this); }
|
|
19924
19915
|
};
|
|
@@ -19954,8 +19945,8 @@ const BcmColorPalette = class {
|
|
|
19954
19945
|
this.bcmChange.emit(hex);
|
|
19955
19946
|
};
|
|
19956
19947
|
this.value = undefined;
|
|
19957
|
-
this.paletteKeys = ["orange", "yellow", "lime", "green", "teal", "cyan", "sky", "indigo", "violet", "purple", "fuchsia", "pink"];
|
|
19958
|
-
this.shades = [900, 800, 700, 600,
|
|
19948
|
+
this.paletteKeys = ["orange", "yellow", "lime", "green", "teal", "cyan", "sky", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "stone", "slate"];
|
|
19949
|
+
this.shades = [950, 900, 800, 700, 600, 400, 300, 200, 100, 50];
|
|
19959
19950
|
}
|
|
19960
19951
|
render() {
|
|
19961
19952
|
const { host, column, box } = colorPaletteStyle();
|
|
@@ -24917,6 +24908,41 @@ const BcmDropdown = class {
|
|
|
24917
24908
|
item.setActive(id);
|
|
24918
24909
|
});
|
|
24919
24910
|
}
|
|
24911
|
+
componentWillLoad() {
|
|
24912
|
+
this.checkContent();
|
|
24913
|
+
}
|
|
24914
|
+
componentDidLoad() {
|
|
24915
|
+
this.observeContent();
|
|
24916
|
+
}
|
|
24917
|
+
disconnectedCallback() {
|
|
24918
|
+
var _a;
|
|
24919
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
24920
|
+
}
|
|
24921
|
+
observeContent() {
|
|
24922
|
+
this.observer = new MutationObserver(() => {
|
|
24923
|
+
this.manualSlotContent();
|
|
24924
|
+
});
|
|
24925
|
+
this.observer.observe(this.el, { childList: true });
|
|
24926
|
+
}
|
|
24927
|
+
manualSlotContent() {
|
|
24928
|
+
const contentNodes = this.el.querySelectorAll(':scope > [slot="content"], :scope > bcm-content, :scope > bcm-items');
|
|
24929
|
+
if (contentNodes.length > 0) {
|
|
24930
|
+
const menu = document.getElementById(this.menuId);
|
|
24931
|
+
if (menu) {
|
|
24932
|
+
contentNodes.forEach(node => {
|
|
24933
|
+
if (!menu.contains(node)) {
|
|
24934
|
+
menu.appendChild(node);
|
|
24935
|
+
}
|
|
24936
|
+
});
|
|
24937
|
+
if (menu === null || menu === void 0 ? void 0 : menu.updateLayout) {
|
|
24938
|
+
menu === null || menu === void 0 ? void 0 : menu.updateLayout();
|
|
24939
|
+
}
|
|
24940
|
+
}
|
|
24941
|
+
}
|
|
24942
|
+
}
|
|
24943
|
+
checkContent() {
|
|
24944
|
+
this.manualSlotContent();
|
|
24945
|
+
}
|
|
24920
24946
|
async getActive() {
|
|
24921
24947
|
return this.activeItem;
|
|
24922
24948
|
}
|
|
@@ -25149,6 +25175,7 @@ const BcmForm = class {
|
|
|
25149
25175
|
CHECKBOX: 'checkbox',
|
|
25150
25176
|
RADIO_GROUP: 'radio-group',
|
|
25151
25177
|
CHECKBOX_GROUP: 'checkbox-group',
|
|
25178
|
+
FILE_UPLOAD: 'file-upload',
|
|
25152
25179
|
RANGE: 'range',
|
|
25153
25180
|
// sadece value fırlatıyor
|
|
25154
25181
|
FORM: 'form',
|
|
@@ -26111,10 +26138,94 @@ const BcmLink = class {
|
|
|
26111
26138
|
};
|
|
26112
26139
|
BcmLink.style = linkCss;
|
|
26113
26140
|
|
|
26141
|
+
class LinkedFocusManager {
|
|
26142
|
+
constructor() {
|
|
26143
|
+
this.focusableSelector = [
|
|
26144
|
+
"a[href]",
|
|
26145
|
+
"area[href]",
|
|
26146
|
+
"button:not([disabled])",
|
|
26147
|
+
"input:not([disabled]):not([type='hidden'])",
|
|
26148
|
+
"select:not([disabled])",
|
|
26149
|
+
"textarea:not([disabled])",
|
|
26150
|
+
"iframe",
|
|
26151
|
+
"object",
|
|
26152
|
+
"embed",
|
|
26153
|
+
"[contenteditable='true']",
|
|
26154
|
+
"[tabindex]:not([tabindex='-1'])",
|
|
26155
|
+
].join(",");
|
|
26156
|
+
}
|
|
26157
|
+
getFocusableElements(linkedElement) {
|
|
26158
|
+
return Array.from(linkedElement.querySelectorAll(this.focusableSelector)).filter(item => {
|
|
26159
|
+
const style = window.getComputedStyle(item);
|
|
26160
|
+
return style.display !== "none" && style.visibility !== "hidden";
|
|
26161
|
+
});
|
|
26162
|
+
}
|
|
26163
|
+
handleKeyboardNavigation(params) {
|
|
26164
|
+
const { event, isOpen, canKeyboardOpen, linkedElement, targetElement, openLinked, hideLinked } = params;
|
|
26165
|
+
const keyCode = event.keyCode || event.which;
|
|
26166
|
+
const isSpaceKey = event.key === " " || event.key === "Spacebar" || keyCode === 32;
|
|
26167
|
+
const isEnterKey = event.key === "Enter" || keyCode === 13;
|
|
26168
|
+
const activeElement = document.activeElement;
|
|
26169
|
+
const isTargetFocused = activeElement === targetElement;
|
|
26170
|
+
const isFocusInsideTarget = !!(activeElement && targetElement.contains(activeElement));
|
|
26171
|
+
const isFocusInsideLinked = !!activeElement && linkedElement.contains(activeElement);
|
|
26172
|
+
const isTriggerFocused = isTargetFocused || isFocusInsideTarget;
|
|
26173
|
+
if (!isOpen && canKeyboardOpen && isTriggerFocused) {
|
|
26174
|
+
if (isSpaceKey || isEnterKey) {
|
|
26175
|
+
event.preventDefault();
|
|
26176
|
+
event.stopPropagation();
|
|
26177
|
+
event.stopImmediatePropagation();
|
|
26178
|
+
openLinked();
|
|
26179
|
+
return;
|
|
26180
|
+
}
|
|
26181
|
+
}
|
|
26182
|
+
if (!isOpen)
|
|
26183
|
+
return;
|
|
26184
|
+
if (event.key === "Escape") {
|
|
26185
|
+
if (isTriggerFocused || isFocusInsideLinked) {
|
|
26186
|
+
event.preventDefault();
|
|
26187
|
+
hideLinked();
|
|
26188
|
+
targetElement.focus();
|
|
26189
|
+
}
|
|
26190
|
+
return;
|
|
26191
|
+
}
|
|
26192
|
+
if (event.key !== "Tab")
|
|
26193
|
+
return;
|
|
26194
|
+
const focusableElements = this.getFocusableElements(linkedElement);
|
|
26195
|
+
const firstFocusableElement = focusableElements[0];
|
|
26196
|
+
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
26197
|
+
if (!event.shiftKey && isTargetFocused) {
|
|
26198
|
+
event.preventDefault();
|
|
26199
|
+
if (firstFocusableElement) {
|
|
26200
|
+
firstFocusableElement.focus();
|
|
26201
|
+
}
|
|
26202
|
+
else {
|
|
26203
|
+
linkedElement.focus();
|
|
26204
|
+
}
|
|
26205
|
+
return;
|
|
26206
|
+
}
|
|
26207
|
+
if (event.shiftKey && isFocusInsideLinked && firstFocusableElement && activeElement === firstFocusableElement) {
|
|
26208
|
+
event.preventDefault();
|
|
26209
|
+
targetElement.focus();
|
|
26210
|
+
return;
|
|
26211
|
+
}
|
|
26212
|
+
if (!event.shiftKey && isFocusInsideLinked && lastFocusableElement && activeElement === lastFocusableElement) {
|
|
26213
|
+
event.preventDefault();
|
|
26214
|
+
firstFocusableElement.focus();
|
|
26215
|
+
return;
|
|
26216
|
+
}
|
|
26217
|
+
if (focusableElements.length === 0 && isFocusInsideLinked) {
|
|
26218
|
+
event.preventDefault();
|
|
26219
|
+
targetElement.focus();
|
|
26220
|
+
}
|
|
26221
|
+
}
|
|
26222
|
+
}
|
|
26223
|
+
|
|
26114
26224
|
const BcmLinked = class {
|
|
26115
26225
|
constructor(hostRef) {
|
|
26116
26226
|
registerInstance(this, hostRef);
|
|
26117
26227
|
this.bcmOpen = createEvent(this, "bcm-open", 7);
|
|
26228
|
+
this.focusManager = new LinkedFocusManager();
|
|
26118
26229
|
this._id = Generate.UID();
|
|
26119
26230
|
this.placement = Bcm.Placement["bottom-start"];
|
|
26120
26231
|
this.trigger = Bcm.TriggerType.click;
|
|
@@ -26252,6 +26363,9 @@ const BcmLinked = class {
|
|
|
26252
26363
|
}
|
|
26253
26364
|
return this.isOpen;
|
|
26254
26365
|
}
|
|
26366
|
+
async updateLayout() {
|
|
26367
|
+
this.calculatePosition();
|
|
26368
|
+
}
|
|
26255
26369
|
async toggle(wait = true) {
|
|
26256
26370
|
return this.isOpen ? await this.hide(wait) : await this.show(wait);
|
|
26257
26371
|
}
|
|
@@ -26299,9 +26413,24 @@ const BcmLinked = class {
|
|
|
26299
26413
|
this.isMouseOverLink = false;
|
|
26300
26414
|
this.show();
|
|
26301
26415
|
}
|
|
26416
|
+
keyboardNavigation(e) {
|
|
26417
|
+
const target = this.target();
|
|
26418
|
+
if (!target)
|
|
26419
|
+
return;
|
|
26420
|
+
const canKeyboardOpen = this.trigger !== Bcm.TriggerType.hover && this.trigger !== Bcm.TriggerType.custom;
|
|
26421
|
+
this.focusManager.handleKeyboardNavigation({
|
|
26422
|
+
event: e,
|
|
26423
|
+
isOpen: this.isOpen,
|
|
26424
|
+
canKeyboardOpen,
|
|
26425
|
+
linkedElement: this.el,
|
|
26426
|
+
targetElement: target,
|
|
26427
|
+
openLinked: () => this.show(false),
|
|
26428
|
+
hideLinked: () => this.hide(false),
|
|
26429
|
+
});
|
|
26430
|
+
}
|
|
26302
26431
|
render() {
|
|
26303
26432
|
const openStyle = this.isOpen ? { visibility: "visible", opacity: "1" } : { visibility: "hidden", opacity: "0" };
|
|
26304
|
-
return (h$2(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" }) }, h$2("slot", null)));
|
|
26433
|
+
return (h$2(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" }) }, h$2("slot", null)));
|
|
26305
26434
|
}
|
|
26306
26435
|
get el() { return getElement(this); }
|
|
26307
26436
|
static get watchers() { return {
|
|
@@ -26804,6 +26933,347 @@ const listState = {
|
|
|
26804
26933
|
removeState: removeState$1,
|
|
26805
26934
|
};
|
|
26806
26935
|
|
|
26936
|
+
class ListFocusManager {
|
|
26937
|
+
constructor() {
|
|
26938
|
+
this.focusableSelector = [
|
|
26939
|
+
"a[href]",
|
|
26940
|
+
"area[href]",
|
|
26941
|
+
"button:not([disabled])",
|
|
26942
|
+
"input:not([disabled]):not([type='hidden'])",
|
|
26943
|
+
"select:not([disabled])",
|
|
26944
|
+
"textarea:not([disabled])",
|
|
26945
|
+
"[contenteditable='true']",
|
|
26946
|
+
"[tabindex]:not([tabindex='-1'])",
|
|
26947
|
+
].join(",");
|
|
26948
|
+
}
|
|
26949
|
+
getFocusableElements(container) {
|
|
26950
|
+
return Array.from(container.querySelectorAll(this.focusableSelector)).filter(item => this.isVisible(item));
|
|
26951
|
+
}
|
|
26952
|
+
getFirstFocusableElement(container) {
|
|
26953
|
+
if (!container)
|
|
26954
|
+
return null;
|
|
26955
|
+
if (this.canReceiveProgrammaticFocus(container))
|
|
26956
|
+
return container;
|
|
26957
|
+
return this.getFocusableElements(container)[0] || null;
|
|
26958
|
+
}
|
|
26959
|
+
getListItems(listElement) {
|
|
26960
|
+
if (!listElement)
|
|
26961
|
+
return [];
|
|
26962
|
+
return Array.from(listElement.querySelectorAll(".bcm-list__item")).filter(item => this.canReceiveProgrammaticFocus(item));
|
|
26963
|
+
}
|
|
26964
|
+
getItemById(listElement, itemId) {
|
|
26965
|
+
return this.getListItems(listElement).find(item => item.id === itemId) || null;
|
|
26966
|
+
}
|
|
26967
|
+
getCurrentListItem(listElement, activeElement) {
|
|
26968
|
+
if (!listElement)
|
|
26969
|
+
return null;
|
|
26970
|
+
const activeItem = activeElement === null || activeElement === void 0 ? void 0 : activeElement.closest(".bcm-list__item");
|
|
26971
|
+
if (activeItem && this.isInsideElement(listElement, activeItem) && this.canReceiveProgrammaticFocus(activeItem)) {
|
|
26972
|
+
return activeItem;
|
|
26973
|
+
}
|
|
26974
|
+
const focusedItem = listElement.querySelector(".bcm-list__item.focused");
|
|
26975
|
+
return this.canReceiveProgrammaticFocus(focusedItem) ? focusedItem : null;
|
|
26976
|
+
}
|
|
26977
|
+
getPreferredListFocusElement(listElement, direction = "first") {
|
|
26978
|
+
var _a;
|
|
26979
|
+
if (!listElement)
|
|
26980
|
+
return null;
|
|
26981
|
+
const focusedItem = listElement.querySelector(".bcm-list__item.focused");
|
|
26982
|
+
if (focusedItem && this.canReceiveProgrammaticFocus(focusedItem))
|
|
26983
|
+
return focusedItem;
|
|
26984
|
+
const selectedItem = (_a = listElement.querySelector(".bcm-list__item .selected")) === null || _a === void 0 ? void 0 : _a.closest(".bcm-list__item");
|
|
26985
|
+
if (selectedItem && this.canReceiveProgrammaticFocus(selectedItem))
|
|
26986
|
+
return selectedItem;
|
|
26987
|
+
const listItems = this.getListItems(listElement);
|
|
26988
|
+
if (listItems.length > 0) {
|
|
26989
|
+
return direction === "last" ? listItems[listItems.length - 1] : listItems[0];
|
|
26990
|
+
}
|
|
26991
|
+
const focusableElements = this.getFocusableElements(listElement);
|
|
26992
|
+
return direction === "last" ? focusableElements[focusableElements.length - 1] || null : focusableElements[0] || null;
|
|
26993
|
+
}
|
|
26994
|
+
isElementNaturallyFocusable(element) {
|
|
26995
|
+
const nodeName = element.tagName;
|
|
26996
|
+
if (nodeName === "A")
|
|
26997
|
+
return element.hasAttribute("href");
|
|
26998
|
+
return ["BUTTON", "INPUT", "SELECT", "TEXTAREA"].includes(nodeName);
|
|
26999
|
+
}
|
|
27000
|
+
isEditableElement(element) {
|
|
27001
|
+
if (!element)
|
|
27002
|
+
return false;
|
|
27003
|
+
const nodeName = element.tagName;
|
|
27004
|
+
return nodeName === "INPUT" || nodeName === "TEXTAREA" || nodeName === "SELECT" || element.isContentEditable;
|
|
27005
|
+
}
|
|
27006
|
+
isVisible(element) {
|
|
27007
|
+
if (!element.isConnected)
|
|
27008
|
+
return false;
|
|
27009
|
+
const style = window.getComputedStyle(element);
|
|
27010
|
+
return style.display !== "none" && style.visibility !== "hidden";
|
|
27011
|
+
}
|
|
27012
|
+
isInsideElement(parent, child) {
|
|
27013
|
+
return !!(parent && child && (parent === child || parent.contains(child)));
|
|
27014
|
+
}
|
|
27015
|
+
canReceiveProgrammaticFocus(element) {
|
|
27016
|
+
if (!element || !this.isVisible(element))
|
|
27017
|
+
return false;
|
|
27018
|
+
const tabIndexAttr = element.getAttribute("tabindex");
|
|
27019
|
+
if (tabIndexAttr != null) {
|
|
27020
|
+
return Number(tabIndexAttr) >= 0;
|
|
27021
|
+
}
|
|
27022
|
+
return this.isElementNaturallyFocusable(element);
|
|
27023
|
+
}
|
|
27024
|
+
getInteractionContext(params) {
|
|
27025
|
+
const { hostElement, targetElement, listElement, openTriggerElement } = params;
|
|
27026
|
+
const activeElement = document.activeElement;
|
|
27027
|
+
const isFocusInsideTarget = this.isInsideElement(targetElement, activeElement);
|
|
27028
|
+
const isFocusInsideOpenTrigger = this.isInsideElement(openTriggerElement || null, activeElement);
|
|
27029
|
+
const isFocusInsideHost = this.isInsideElement(hostElement, activeElement);
|
|
27030
|
+
const isFocusInsideList = this.isInsideElement(listElement, activeElement);
|
|
27031
|
+
const isTriggerFocused = isFocusInsideHost || isFocusInsideTarget || isFocusInsideOpenTrigger;
|
|
27032
|
+
return {
|
|
27033
|
+
activeElement,
|
|
27034
|
+
isFocusInsideHost,
|
|
27035
|
+
isFocusInsideList,
|
|
27036
|
+
isFocusInsideOpenTrigger,
|
|
27037
|
+
isFocusInsideTarget,
|
|
27038
|
+
isTriggerFocused,
|
|
27039
|
+
};
|
|
27040
|
+
}
|
|
27041
|
+
isInsideSearch(activeElement) {
|
|
27042
|
+
return !!(activeElement === null || activeElement === void 0 ? void 0 : activeElement.closest(".bcm-list__container-search"));
|
|
27043
|
+
}
|
|
27044
|
+
focusElement(element) {
|
|
27045
|
+
var _a;
|
|
27046
|
+
if (!element || !this.canReceiveProgrammaticFocus(element))
|
|
27047
|
+
return false;
|
|
27048
|
+
element.focus();
|
|
27049
|
+
(_a = element.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(element, { block: "nearest" });
|
|
27050
|
+
return this.isInsideElement(element, document.activeElement);
|
|
27051
|
+
}
|
|
27052
|
+
focusListElement(listElement, preferItem = false, direction = "first") {
|
|
27053
|
+
const focusTarget = preferItem ? this.getPreferredListFocusElement(listElement, direction) : this.getFirstFocusableElement(listElement);
|
|
27054
|
+
return this.focusElement(focusTarget);
|
|
27055
|
+
}
|
|
27056
|
+
focusListItemByOffset(listElement, activeElement, offset) {
|
|
27057
|
+
const items = this.getListItems(listElement);
|
|
27058
|
+
if (items.length === 0)
|
|
27059
|
+
return false;
|
|
27060
|
+
const currentItem = this.getCurrentListItem(listElement, activeElement);
|
|
27061
|
+
const currentIndex = currentItem ? items.indexOf(currentItem) : -1;
|
|
27062
|
+
const nextIndex = currentIndex === -1 ? (offset > 0 ? 0 : items.length - 1) : (currentIndex + offset + items.length) % items.length;
|
|
27063
|
+
return this.focusElement(items[nextIndex]);
|
|
27064
|
+
}
|
|
27065
|
+
focusListItemWhenReady(listElement, itemId, remainingAttempts = 6) {
|
|
27066
|
+
if (this.focusElement(this.getItemById(listElement, itemId)))
|
|
27067
|
+
return true;
|
|
27068
|
+
if (remainingAttempts <= 0)
|
|
27069
|
+
return false;
|
|
27070
|
+
requestAnimationFrame(() => {
|
|
27071
|
+
this.focusListItemWhenReady(listElement, itemId, remainingAttempts - 1);
|
|
27072
|
+
});
|
|
27073
|
+
return true;
|
|
27074
|
+
}
|
|
27075
|
+
focusListElementWhenReady(listElement, preferItem = false, direction = "first", remainingAttempts = 6) {
|
|
27076
|
+
if (this.focusListElement(listElement, preferItem, direction))
|
|
27077
|
+
return true;
|
|
27078
|
+
if (remainingAttempts <= 0)
|
|
27079
|
+
return false;
|
|
27080
|
+
requestAnimationFrame(() => {
|
|
27081
|
+
this.focusListElementWhenReady(listElement, preferItem, direction, remainingAttempts - 1);
|
|
27082
|
+
});
|
|
27083
|
+
return true;
|
|
27084
|
+
}
|
|
27085
|
+
getParentListItem(item) {
|
|
27086
|
+
if (!item)
|
|
27087
|
+
return null;
|
|
27088
|
+
const parentId = item.getAttribute("data-parent-id");
|
|
27089
|
+
if (!parentId)
|
|
27090
|
+
return null;
|
|
27091
|
+
return this.getItemById(item.closest(".bcm-list__container"), parentId);
|
|
27092
|
+
}
|
|
27093
|
+
getFirstChildListItem(item) {
|
|
27094
|
+
return (item === null || item === void 0 ? void 0 : item.querySelector(":scope > .bcm-list__item-childs > .bcm-list__item")) || null;
|
|
27095
|
+
}
|
|
27096
|
+
hasTreeChildren(item) {
|
|
27097
|
+
return (item === null || item === void 0 ? void 0 : item.getAttribute("data-has-children")) === "true";
|
|
27098
|
+
}
|
|
27099
|
+
isTreeItemOpen(item) {
|
|
27100
|
+
return (item === null || item === void 0 ? void 0 : item.getAttribute("data-open")) === "true";
|
|
27101
|
+
}
|
|
27102
|
+
isInsideAnyElement(elements, child) {
|
|
27103
|
+
return elements.some(element => this.isInsideElement(element || null, child));
|
|
27104
|
+
}
|
|
27105
|
+
focusAdjacentOutside(params) {
|
|
27106
|
+
const { hostElement, targetElement, listElement, openTriggerElement, direction } = params;
|
|
27107
|
+
const relatedElements = [hostElement, targetElement, listElement, openTriggerElement];
|
|
27108
|
+
const focusableElements = this.getFocusableElements(document.body).filter(item => !this.isInsideAnyElement(relatedElements, item));
|
|
27109
|
+
const documentFocusableElements = this.getFocusableElements(document.body);
|
|
27110
|
+
const relatedIndexes = documentFocusableElements
|
|
27111
|
+
.map((item, index) => (this.isInsideAnyElement(relatedElements, item) ? index : -1))
|
|
27112
|
+
.filter(index => index >= 0);
|
|
27113
|
+
if (relatedIndexes.length === 0 || focusableElements.length === 0)
|
|
27114
|
+
return false;
|
|
27115
|
+
const anchorIndex = direction === "next" ? Math.max(...relatedIndexes) : Math.min(...relatedIndexes);
|
|
27116
|
+
const focusTarget = direction === "next"
|
|
27117
|
+
? documentFocusableElements.slice(anchorIndex + 1).find(item => focusableElements.includes(item))
|
|
27118
|
+
: documentFocusableElements
|
|
27119
|
+
.slice(0, anchorIndex)
|
|
27120
|
+
.reverse()
|
|
27121
|
+
.find(item => focusableElements.includes(item));
|
|
27122
|
+
return this.focusElement(focusTarget || null);
|
|
27123
|
+
}
|
|
27124
|
+
restoreTriggerFocus(params) {
|
|
27125
|
+
const { hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger } = params;
|
|
27126
|
+
const primaryTarget = preferOpenTrigger ? openTriggerElement : autocompleteInput || targetElement;
|
|
27127
|
+
const secondaryTarget = preferOpenTrigger ? autocompleteInput || targetElement : openTriggerElement;
|
|
27128
|
+
const focusTarget = this.getFirstFocusableElement(primaryTarget || null) || this.getFirstFocusableElement(secondaryTarget || null) || this.getFirstFocusableElement(hostElement);
|
|
27129
|
+
focusTarget === null || focusTarget === void 0 ? void 0 : focusTarget.focus();
|
|
27130
|
+
}
|
|
27131
|
+
handleKeyDown(params) {
|
|
27132
|
+
const { disabled, isOpen, isOverlayType } = params;
|
|
27133
|
+
if (disabled || !isOverlayType)
|
|
27134
|
+
return false;
|
|
27135
|
+
return isOpen ? this.handleOpenOverlayKeyDown(params) : this.handleClosedOverlayKeyDown(params);
|
|
27136
|
+
}
|
|
27137
|
+
handleClosedOverlayKeyDown(params) {
|
|
27138
|
+
const { event, hostElement, targetElement, listElement, openList, openTriggerElement } = params;
|
|
27139
|
+
const keyCode = event.keyCode || event.which;
|
|
27140
|
+
const isSpaceKey = event.key === " " || event.key === "Spacebar" || keyCode === 32;
|
|
27141
|
+
const isArrowDownKey = event.key === "ArrowDown" || keyCode === 40;
|
|
27142
|
+
const isArrowUpKey = event.key === "ArrowUp" || keyCode === 38;
|
|
27143
|
+
const context = this.getInteractionContext({ hostElement, targetElement, listElement, openTriggerElement });
|
|
27144
|
+
if (!context.isTriggerFocused)
|
|
27145
|
+
return false;
|
|
27146
|
+
if (this.isEditableElement(context.activeElement) && !isArrowDownKey && !isArrowUpKey)
|
|
27147
|
+
return false;
|
|
27148
|
+
if (!isSpaceKey && !isArrowDownKey && !isArrowUpKey)
|
|
27149
|
+
return false;
|
|
27150
|
+
event.preventDefault();
|
|
27151
|
+
event.stopPropagation();
|
|
27152
|
+
event.stopImmediatePropagation();
|
|
27153
|
+
openList();
|
|
27154
|
+
if (isArrowDownKey || isArrowUpKey) {
|
|
27155
|
+
this.focusListElementWhenReady(listElement, true, isArrowUpKey ? "last" : "first");
|
|
27156
|
+
}
|
|
27157
|
+
return true;
|
|
27158
|
+
}
|
|
27159
|
+
handleOpenOverlayKeyDown(params) {
|
|
27160
|
+
const { event, hostElement, targetElement, listElement, closeList, selectFocusedItem, openGroup, treeview, checkboxes, autocompleteInput, openTriggerElement } = params;
|
|
27161
|
+
const keyCode = event.keyCode || event.which;
|
|
27162
|
+
const isSpaceKey = event.key === " " || event.key === "Spacebar" || keyCode === 32;
|
|
27163
|
+
const isEnterKey = event.key === "Enter" || keyCode === 13;
|
|
27164
|
+
const isEscapeKey = event.key === "Escape" || keyCode === 27;
|
|
27165
|
+
const isTabKey = event.key === "Tab" || keyCode === 9;
|
|
27166
|
+
const isArrowDownKey = event.key === "ArrowDown" || keyCode === 40;
|
|
27167
|
+
const isArrowUpKey = event.key === "ArrowUp" || keyCode === 38;
|
|
27168
|
+
const isArrowRightKey = event.key === "ArrowRight" || keyCode === 39;
|
|
27169
|
+
const isArrowLeftKey = event.key === "ArrowLeft" || keyCode === 37;
|
|
27170
|
+
const context = this.getInteractionContext({ hostElement, targetElement, listElement, openTriggerElement });
|
|
27171
|
+
const currentItem = this.getCurrentListItem(listElement, context.activeElement);
|
|
27172
|
+
const isInsideSearch = this.isInsideSearch(context.activeElement);
|
|
27173
|
+
if (isEscapeKey && (context.isTriggerFocused || context.isFocusInsideList || context.isFocusInsideHost)) {
|
|
27174
|
+
event.preventDefault();
|
|
27175
|
+
event.stopPropagation();
|
|
27176
|
+
event.stopImmediatePropagation();
|
|
27177
|
+
closeList();
|
|
27178
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27179
|
+
return true;
|
|
27180
|
+
}
|
|
27181
|
+
if (isSpaceKey && checkboxes && currentItem && !isInsideSearch) {
|
|
27182
|
+
event.preventDefault();
|
|
27183
|
+
event.stopPropagation();
|
|
27184
|
+
event.stopImmediatePropagation();
|
|
27185
|
+
selectFocusedItem(currentItem.id);
|
|
27186
|
+
return true;
|
|
27187
|
+
}
|
|
27188
|
+
if (isSpaceKey && currentItem && !checkboxes && !isInsideSearch) {
|
|
27189
|
+
event.preventDefault();
|
|
27190
|
+
event.stopPropagation();
|
|
27191
|
+
event.stopImmediatePropagation();
|
|
27192
|
+
return true;
|
|
27193
|
+
}
|
|
27194
|
+
if (isSpaceKey && context.isTriggerFocused && !this.isEditableElement(context.activeElement)) {
|
|
27195
|
+
event.preventDefault();
|
|
27196
|
+
event.stopPropagation();
|
|
27197
|
+
event.stopImmediatePropagation();
|
|
27198
|
+
closeList();
|
|
27199
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27200
|
+
return true;
|
|
27201
|
+
}
|
|
27202
|
+
if ((isArrowDownKey || isArrowUpKey) && listElement && (context.isFocusInsideList || context.isTriggerFocused)) {
|
|
27203
|
+
event.preventDefault();
|
|
27204
|
+
event.stopPropagation();
|
|
27205
|
+
event.stopImmediatePropagation();
|
|
27206
|
+
if (context.isFocusInsideList && !isInsideSearch) {
|
|
27207
|
+
return this.focusListItemByOffset(listElement, context.activeElement, isArrowUpKey ? -1 : 1);
|
|
27208
|
+
}
|
|
27209
|
+
return this.focusListElementWhenReady(listElement, true, isArrowUpKey ? "last" : "first");
|
|
27210
|
+
}
|
|
27211
|
+
if (treeview && (isArrowRightKey || isArrowLeftKey) && currentItem && !isInsideSearch) {
|
|
27212
|
+
event.preventDefault();
|
|
27213
|
+
event.stopPropagation();
|
|
27214
|
+
event.stopImmediatePropagation();
|
|
27215
|
+
if (isArrowRightKey) {
|
|
27216
|
+
if (this.hasTreeChildren(currentItem) && !this.isTreeItemOpen(currentItem)) {
|
|
27217
|
+
openGroup(currentItem.id);
|
|
27218
|
+
return this.focusListItemWhenReady(listElement, currentItem.id);
|
|
27219
|
+
}
|
|
27220
|
+
return this.focusElement(this.getFirstChildListItem(currentItem));
|
|
27221
|
+
}
|
|
27222
|
+
if (this.hasTreeChildren(currentItem) && this.isTreeItemOpen(currentItem)) {
|
|
27223
|
+
openGroup(currentItem.id);
|
|
27224
|
+
return this.focusListItemWhenReady(listElement, currentItem.id);
|
|
27225
|
+
}
|
|
27226
|
+
return this.focusElement(this.getParentListItem(currentItem));
|
|
27227
|
+
}
|
|
27228
|
+
if (isEnterKey && context.isFocusInsideOpenTrigger && !this.isEditableElement(context.activeElement) && listElement) {
|
|
27229
|
+
event.preventDefault();
|
|
27230
|
+
event.stopPropagation();
|
|
27231
|
+
event.stopImmediatePropagation();
|
|
27232
|
+
return this.focusListElementWhenReady(listElement, true, "first");
|
|
27233
|
+
}
|
|
27234
|
+
if (isEnterKey && listElement && context.isFocusInsideList && !isInsideSearch) {
|
|
27235
|
+
const focusedItem = currentItem || listElement.querySelector(".bcm-list__item.focused");
|
|
27236
|
+
if (focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.id) {
|
|
27237
|
+
event.preventDefault();
|
|
27238
|
+
event.stopPropagation();
|
|
27239
|
+
event.stopImmediatePropagation();
|
|
27240
|
+
selectFocusedItem(focusedItem.id);
|
|
27241
|
+
return true;
|
|
27242
|
+
}
|
|
27243
|
+
}
|
|
27244
|
+
if (!isTabKey || !listElement)
|
|
27245
|
+
return false;
|
|
27246
|
+
const focusableElements = this.getFocusableElements(listElement);
|
|
27247
|
+
const firstFocusableElement = focusableElements[0];
|
|
27248
|
+
const lastFocusableElement = focusableElements[focusableElements.length - 1];
|
|
27249
|
+
if (!event.shiftKey && context.isTriggerFocused) {
|
|
27250
|
+
event.preventDefault();
|
|
27251
|
+
return this.focusListElementWhenReady(listElement);
|
|
27252
|
+
}
|
|
27253
|
+
if (event.shiftKey && context.isFocusInsideList && firstFocusableElement && context.activeElement === firstFocusableElement) {
|
|
27254
|
+
event.preventDefault();
|
|
27255
|
+
closeList();
|
|
27256
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27257
|
+
return true;
|
|
27258
|
+
}
|
|
27259
|
+
if (!event.shiftKey && context.isFocusInsideList && lastFocusableElement && context.activeElement === lastFocusableElement) {
|
|
27260
|
+
event.preventDefault();
|
|
27261
|
+
closeList();
|
|
27262
|
+
requestAnimationFrame(() => {
|
|
27263
|
+
this.focusAdjacentOutside({ hostElement, targetElement, listElement, openTriggerElement, direction: "next" });
|
|
27264
|
+
});
|
|
27265
|
+
return true;
|
|
27266
|
+
}
|
|
27267
|
+
if (context.isFocusInsideList && focusableElements.length === 0) {
|
|
27268
|
+
event.preventDefault();
|
|
27269
|
+
closeList();
|
|
27270
|
+
this.restoreTriggerFocus({ hostElement, targetElement, autocompleteInput, openTriggerElement, preferOpenTrigger: true });
|
|
27271
|
+
return true;
|
|
27272
|
+
}
|
|
27273
|
+
return false;
|
|
27274
|
+
}
|
|
27275
|
+
}
|
|
27276
|
+
|
|
26807
27277
|
class KeyControl {
|
|
26808
27278
|
constructor(keyCode, element, elementName, childElementName) {
|
|
26809
27279
|
this.elementName = '';
|
|
@@ -26986,13 +27456,18 @@ class ListKeyControl extends KeyControl {
|
|
|
26986
27456
|
}
|
|
26987
27457
|
}
|
|
26988
27458
|
}
|
|
26989
|
-
keyEnterControl() {
|
|
26990
|
-
|
|
27459
|
+
keyEnterControl() {
|
|
27460
|
+
const focused = this.getFocusedElement();
|
|
27461
|
+
if (!(focused === null || focused === void 0 ? void 0 : focused.id))
|
|
27462
|
+
return;
|
|
26991
27463
|
if (this.isCheckBoxes) {
|
|
26992
|
-
|
|
26993
|
-
|
|
27464
|
+
this.checkedItem(focused.id);
|
|
27465
|
+
}
|
|
27466
|
+
else {
|
|
27467
|
+
this.selectedItem(focused.id);
|
|
26994
27468
|
}
|
|
26995
27469
|
}
|
|
27470
|
+
keySpaceControl() { }
|
|
26996
27471
|
keyDown() {
|
|
26997
27472
|
switch (this.getKeyCode()) {
|
|
26998
27473
|
case Bcm$1.KeyCode.up:
|
|
@@ -27018,7 +27493,7 @@ class ListKeyControl extends KeyControl {
|
|
|
27018
27493
|
keyUp() { }
|
|
27019
27494
|
}
|
|
27020
27495
|
|
|
27021
|
-
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}";
|
|
27496
|
+
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}";
|
|
27022
27497
|
|
|
27023
27498
|
var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
27024
27499
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -27040,8 +27515,18 @@ const BcmList = class {
|
|
|
27040
27515
|
this.close = createEvent(this, "bcm-close", 3);
|
|
27041
27516
|
this.listClose = createEvent(this, "bcm-list-close", 7);
|
|
27042
27517
|
this.listOpen = createEvent(this, "bcm-list-open", 7);
|
|
27518
|
+
var _a, _b;
|
|
27043
27519
|
this.debounce = null;
|
|
27520
|
+
this.focusManager = new ListFocusManager();
|
|
27521
|
+
this.openTriggerElement = null;
|
|
27522
|
+
this.suppressScrollCloseUntil = 0;
|
|
27044
27523
|
this.debounceHandler = Generate.debounceInput(() => this.listenResize(), 300, false);
|
|
27524
|
+
this.handleVisualViewportChange = () => {
|
|
27525
|
+
if (!this.isOpen)
|
|
27526
|
+
return;
|
|
27527
|
+
this.preventScrollClose(400);
|
|
27528
|
+
this.calculateLocation();
|
|
27529
|
+
};
|
|
27045
27530
|
this._id = Generate.UID();
|
|
27046
27531
|
this.tempId = Generate.UID();
|
|
27047
27532
|
this.type = Bcm.ListType.listbox;
|
|
@@ -27123,6 +27608,8 @@ const BcmList = class {
|
|
|
27123
27608
|
window.addEventListener("scroll", this.handleWheel.bind(this), true);
|
|
27124
27609
|
window.addEventListener("wheel", this.handleWheel.bind(this), true);
|
|
27125
27610
|
window.addEventListener("resize", this.handleResize.bind(this), true);
|
|
27611
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.addEventListener("resize", this.handleVisualViewportChange, true);
|
|
27612
|
+
(_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.addEventListener("scroll", this.handleVisualViewportChange, true);
|
|
27126
27613
|
}
|
|
27127
27614
|
connectedCallback() {
|
|
27128
27615
|
if (this.height != "256px") {
|
|
@@ -27173,7 +27660,10 @@ const BcmList = class {
|
|
|
27173
27660
|
// }
|
|
27174
27661
|
}
|
|
27175
27662
|
disconnectedCallback() {
|
|
27663
|
+
var _a, _b;
|
|
27176
27664
|
this.isOpen = false;
|
|
27665
|
+
(_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.removeEventListener("resize", this.handleVisualViewportChange, true);
|
|
27666
|
+
(_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.removeEventListener("scroll", this.handleVisualViewportChange, true);
|
|
27177
27667
|
if (this.stopDeepClean)
|
|
27178
27668
|
return;
|
|
27179
27669
|
listState.removeState(this._id);
|
|
@@ -27232,8 +27722,10 @@ const BcmList = class {
|
|
|
27232
27722
|
}
|
|
27233
27723
|
async handleOpen() {
|
|
27234
27724
|
const isAutoSelected = this.autoFocusSelected && this.type == "select" && !this.checkboxes && this.value;
|
|
27725
|
+
const isMobile = this.isMobileViewport();
|
|
27235
27726
|
if (this.isOpen) {
|
|
27236
27727
|
this.detectClone();
|
|
27728
|
+
await this.prepareMobileViewportForOpen();
|
|
27237
27729
|
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
27238
27730
|
const list = this.el.querySelector(`#bcm-list-${this._id}`);
|
|
27239
27731
|
if (list) {
|
|
@@ -27244,7 +27736,9 @@ const BcmList = class {
|
|
|
27244
27736
|
this.open.emit();
|
|
27245
27737
|
this.calculateLocation();
|
|
27246
27738
|
this.onSelectSearch();
|
|
27247
|
-
|
|
27739
|
+
if (!isMobile) {
|
|
27740
|
+
await delay$1(50);
|
|
27741
|
+
}
|
|
27248
27742
|
this.isOpenAnimation = true;
|
|
27249
27743
|
if (isAutoSelected) {
|
|
27250
27744
|
this.focusSelectedElement();
|
|
@@ -27302,11 +27796,41 @@ const BcmList = class {
|
|
|
27302
27796
|
this.calculateLocation();
|
|
27303
27797
|
}
|
|
27304
27798
|
}
|
|
27799
|
+
else if (this.shouldKeepOpenWhileInteracting(list)) {
|
|
27800
|
+
if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
27801
|
+
this.calculateLocation();
|
|
27802
|
+
}
|
|
27803
|
+
}
|
|
27305
27804
|
else {
|
|
27306
27805
|
this.hide();
|
|
27307
27806
|
}
|
|
27308
27807
|
}
|
|
27309
27808
|
}
|
|
27809
|
+
handleTouchStart(event) {
|
|
27810
|
+
if (!this.isOpen)
|
|
27811
|
+
return;
|
|
27812
|
+
const list = document.querySelector(`#bcm-list-${this._id}`);
|
|
27813
|
+
const isInside = Generate.findEventPath(event, this.el) || (list && Generate.findEventPath(event, list));
|
|
27814
|
+
if (isInside) {
|
|
27815
|
+
this.preventScrollClose(1000);
|
|
27816
|
+
}
|
|
27817
|
+
else if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
|
|
27818
|
+
this.isOpen = false;
|
|
27819
|
+
}
|
|
27820
|
+
}
|
|
27821
|
+
handleFocusIn(event) {
|
|
27822
|
+
if (!this.isOpen)
|
|
27823
|
+
return;
|
|
27824
|
+
const list = document.querySelector(`#bcm-list-${this._id}`);
|
|
27825
|
+
const isInside = Generate.findEventPath(event, this.el) || (list && Generate.findEventPath(event, list));
|
|
27826
|
+
if (isInside) {
|
|
27827
|
+
this.preventScrollClose(1000);
|
|
27828
|
+
this.calculateLocation();
|
|
27829
|
+
}
|
|
27830
|
+
else if (this.isOverlayType()) {
|
|
27831
|
+
this.isOpen = false;
|
|
27832
|
+
}
|
|
27833
|
+
}
|
|
27310
27834
|
clearAutocomplete() {
|
|
27311
27835
|
if (this.type == "autocomplete") {
|
|
27312
27836
|
const autocompleteInput = this.getAutoCompleteInput();
|
|
@@ -27402,8 +27926,8 @@ const BcmList = class {
|
|
|
27402
27926
|
var _a, _b, _c, _d, _e, _f;
|
|
27403
27927
|
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`) {
|
|
27404
27928
|
this.searchGetParents = snq(() => { var _a; return (_a = event.detail) === null || _a === void 0 ? void 0 : _a.parentIndex; }, null);
|
|
27405
|
-
this.searchResultLimit = 10;
|
|
27406
27929
|
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;
|
|
27930
|
+
this.searchResultLimit = this.getInitialSearchResultLimit();
|
|
27407
27931
|
this.returnFilterData = listState.filterData(this._id, (_e = event.detail) === null || _e === void 0 ? void 0 : _e.nestedResult);
|
|
27408
27932
|
if (this.searchFound > 0 && this.highlight) {
|
|
27409
27933
|
this.highlightText = (_f = event.detail) === null || _f === void 0 ? void 0 : _f.value;
|
|
@@ -27429,13 +27953,51 @@ const BcmList = class {
|
|
|
27429
27953
|
//keyboard navigation
|
|
27430
27954
|
handleKeyDown(ev) {
|
|
27431
27955
|
const keycode = ev.keyCode || ev.which;
|
|
27432
|
-
|
|
27433
|
-
|
|
27956
|
+
const handled = this.focusManager.handleKeyDown({
|
|
27957
|
+
event: ev,
|
|
27958
|
+
disabled: this.disabled,
|
|
27959
|
+
isOpen: this.isOpen,
|
|
27960
|
+
isOverlayType: this.isOverlayType(),
|
|
27961
|
+
hostElement: this.el,
|
|
27962
|
+
targetElement: this.getTargetElement(),
|
|
27963
|
+
listElement: document.getElementById(`bcm-list-${this._id}`),
|
|
27964
|
+
openList: () => {
|
|
27965
|
+
this.rememberOpenTrigger();
|
|
27966
|
+
this.isOpen = true;
|
|
27967
|
+
},
|
|
27968
|
+
closeList: () => {
|
|
27434
27969
|
this.isOpen = false;
|
|
27435
|
-
|
|
27436
|
-
|
|
27437
|
-
|
|
27438
|
-
|
|
27970
|
+
},
|
|
27971
|
+
selectFocusedItem: (itemId) => {
|
|
27972
|
+
if (this.checkboxes) {
|
|
27973
|
+
this.checkedItem(itemId);
|
|
27974
|
+
}
|
|
27975
|
+
else {
|
|
27976
|
+
this.selectedItem(itemId);
|
|
27977
|
+
}
|
|
27978
|
+
},
|
|
27979
|
+
openGroup: (itemId) => {
|
|
27980
|
+
this.openGroup(itemId);
|
|
27981
|
+
},
|
|
27982
|
+
treeview: this.treeview,
|
|
27983
|
+
checkboxes: this.checkboxes,
|
|
27984
|
+
autocompleteInput: this.type == "autocomplete" ? this.getAutoCompleteInput() : null,
|
|
27985
|
+
openTriggerElement: this.openTriggerElement,
|
|
27986
|
+
});
|
|
27987
|
+
if (handled)
|
|
27988
|
+
return;
|
|
27989
|
+
if ((ev.key === "Escape" || keycode === Bcm.KeyCode.escape) && this.isOpen) {
|
|
27990
|
+
this.isOpen = false;
|
|
27991
|
+
ev.preventDefault();
|
|
27992
|
+
ev.stopPropagation();
|
|
27993
|
+
ev.stopImmediatePropagation();
|
|
27994
|
+
this.focusManager.restoreTriggerFocus({
|
|
27995
|
+
hostElement: this.el,
|
|
27996
|
+
targetElement: this.getTargetElement(),
|
|
27997
|
+
autocompleteInput: this.type == "autocomplete" ? this.getAutoCompleteInput() : null,
|
|
27998
|
+
openTriggerElement: this.openTriggerElement,
|
|
27999
|
+
preferOpenTrigger: true,
|
|
28000
|
+
});
|
|
27439
28001
|
}
|
|
27440
28002
|
if (this.keyControl) {
|
|
27441
28003
|
const keyboard = new ListKeyControl(keycode, this.el, this.treeview, this.checkboxes);
|
|
@@ -27445,6 +28007,9 @@ const BcmList = class {
|
|
|
27445
28007
|
keyboard.checkedItem = checkedItemId => {
|
|
27446
28008
|
this.checkedItem(checkedItemId);
|
|
27447
28009
|
};
|
|
28010
|
+
keyboard.selectedItem = itemId => {
|
|
28011
|
+
this.selectedItem(itemId);
|
|
28012
|
+
};
|
|
27448
28013
|
keyboard.keyDown();
|
|
27449
28014
|
}
|
|
27450
28015
|
}
|
|
@@ -27554,7 +28119,8 @@ const BcmList = class {
|
|
|
27554
28119
|
});
|
|
27555
28120
|
}
|
|
27556
28121
|
}
|
|
27557
|
-
async show() {
|
|
28122
|
+
async show(openTriggerElement) {
|
|
28123
|
+
this.rememberOpenTrigger(openTriggerElement);
|
|
27558
28124
|
this.isOpen = true;
|
|
27559
28125
|
return Promise.resolve();
|
|
27560
28126
|
}
|
|
@@ -27591,11 +28157,50 @@ const BcmList = class {
|
|
|
27591
28157
|
async onSelectSearch() {
|
|
27592
28158
|
const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
|
|
27593
28159
|
if (searchInput) {
|
|
28160
|
+
this.preventScrollClose(1000);
|
|
27594
28161
|
await delay$1(100);
|
|
27595
28162
|
searchInput.onBcmFocus();
|
|
27596
28163
|
searchInput.onBcmSelect();
|
|
27597
28164
|
}
|
|
27598
28165
|
}
|
|
28166
|
+
preventScrollClose(duration = 500) {
|
|
28167
|
+
this.suppressScrollCloseUntil = Date.now() + duration;
|
|
28168
|
+
}
|
|
28169
|
+
isMobileViewport() {
|
|
28170
|
+
return window.matchMedia("(max-width: 768px), (pointer: coarse)").matches;
|
|
28171
|
+
}
|
|
28172
|
+
async prepareMobileViewportForOpen() {
|
|
28173
|
+
var _a;
|
|
28174
|
+
if (!this.isMobileViewport() || !(this.type == "select" || this.type == "autocomplete" || this.linkedComponent)) {
|
|
28175
|
+
return;
|
|
28176
|
+
}
|
|
28177
|
+
const targetElementId = this.linkedComponent ? this.linkedComponent : `bcm-list-input-${this._id}`;
|
|
28178
|
+
const targetElement = document.getElementById(targetElementId);
|
|
28179
|
+
if (!targetElement)
|
|
28180
|
+
return;
|
|
28181
|
+
const viewportHeight = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
28182
|
+
const rect = targetElement.getBoundingClientRect();
|
|
28183
|
+
const minimumSpaceBelow = Math.min(320, viewportHeight * 0.45);
|
|
28184
|
+
const shouldReposition = rect.top > viewportHeight * 0.35 || viewportHeight - rect.bottom < minimumSpaceBelow;
|
|
28185
|
+
if (shouldReposition) {
|
|
28186
|
+
this.preventScrollClose(1200);
|
|
28187
|
+
const desiredTop = Math.max(110, Math.min(180, viewportHeight * 0.24));
|
|
28188
|
+
const delta = rect.top - desiredTop;
|
|
28189
|
+
window.scrollBy({
|
|
28190
|
+
top: delta,
|
|
28191
|
+
left: 0,
|
|
28192
|
+
behavior: "auto",
|
|
28193
|
+
});
|
|
28194
|
+
await delay$1(50);
|
|
28195
|
+
this.calculateLocation();
|
|
28196
|
+
}
|
|
28197
|
+
}
|
|
28198
|
+
shouldKeepOpenWhileInteracting(list) {
|
|
28199
|
+
var _a;
|
|
28200
|
+
const activeElement = document.activeElement;
|
|
28201
|
+
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))));
|
|
28202
|
+
return focusedInside || Date.now() < this.suppressScrollCloseUntil;
|
|
28203
|
+
}
|
|
27599
28204
|
async filterOtherList(ids) {
|
|
27600
28205
|
const checklist = (await this.getCheckedList()).nestedResult;
|
|
27601
28206
|
const filter = Generate.convertIdsToNestedData(ids, checklist);
|
|
@@ -27658,8 +28263,30 @@ const BcmList = class {
|
|
|
27658
28263
|
}
|
|
27659
28264
|
return snq(() => listState.getData(this._id), []);
|
|
27660
28265
|
}
|
|
28266
|
+
hasNestedItems(items = []) {
|
|
28267
|
+
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; });
|
|
28268
|
+
}
|
|
28269
|
+
getVisibleSearchItems() {
|
|
28270
|
+
const visibledItems = this.returnFilterData["visibledItems"];
|
|
28271
|
+
if (this.searchFound == null || !Array.isArray(visibledItems)) {
|
|
28272
|
+
return null;
|
|
28273
|
+
}
|
|
28274
|
+
return visibledItems;
|
|
28275
|
+
}
|
|
28276
|
+
getInitialSearchResultLimit() {
|
|
28277
|
+
if (this.searchFound === 0) {
|
|
28278
|
+
return 0;
|
|
28279
|
+
}
|
|
28280
|
+
const initialLimit = Math.max(10, this.limit);
|
|
28281
|
+
return this.searchFound == null ? initialLimit : Math.min(initialLimit, this.searchFound);
|
|
28282
|
+
}
|
|
27661
28283
|
getLimitedItems(ids) {
|
|
27662
|
-
|
|
28284
|
+
const visibleSearchItems = this.getVisibleSearchItems();
|
|
28285
|
+
const limit = this.searchResultLimit || this.limit;
|
|
28286
|
+
if (visibleSearchItems && !this.hasNestedItems(this.getItems())) {
|
|
28287
|
+
return visibleSearchItems.slice(0, limit);
|
|
28288
|
+
}
|
|
28289
|
+
return snq(() => listState.getDataPagination(this._id, limit, ids), []);
|
|
27663
28290
|
}
|
|
27664
28291
|
openGroup(parentId) {
|
|
27665
28292
|
listState.openGroup(this._id, parentId);
|
|
@@ -27687,7 +28314,15 @@ const BcmList = class {
|
|
|
27687
28314
|
this.value = listState.selectedItem(this._id, itemId) ? listState.selectedItem(this._id, itemId)[0] : null;
|
|
27688
28315
|
this.inputText = Generate.domParser((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
|
|
27689
28316
|
this.isOpen = false;
|
|
27690
|
-
this.markForCheck();
|
|
28317
|
+
await this.markForCheck();
|
|
28318
|
+
if (this.isOverlayType()) {
|
|
28319
|
+
await delay$1(10);
|
|
28320
|
+
this.focusManager.restoreTriggerFocus({
|
|
28321
|
+
hostElement: this.el,
|
|
28322
|
+
targetElement: this.getTargetElement(),
|
|
28323
|
+
autocompleteInput: this.type == "autocomplete" ? this.getAutoCompleteInput() : null,
|
|
28324
|
+
});
|
|
28325
|
+
}
|
|
27691
28326
|
if (this.type == "autocomplete" && this.value) {
|
|
27692
28327
|
// await delay(100)
|
|
27693
28328
|
// this.resetCaption()
|
|
@@ -27725,15 +28360,36 @@ const BcmList = class {
|
|
|
27725
28360
|
getAutoCompleteInput() {
|
|
27726
28361
|
return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`);
|
|
27727
28362
|
}
|
|
28363
|
+
rememberOpenTrigger(openTriggerElement) {
|
|
28364
|
+
const activeElement = openTriggerElement || document.activeElement;
|
|
28365
|
+
this.openTriggerElement = this.isValidOpenTrigger(activeElement) ? activeElement : null;
|
|
28366
|
+
}
|
|
28367
|
+
isValidOpenTrigger(element) {
|
|
28368
|
+
return !!(element && element.isConnected && element !== document.body && element !== document.documentElement);
|
|
28369
|
+
}
|
|
28370
|
+
isOverlayType() {
|
|
28371
|
+
return this.type == "select" || this.type == "autocomplete" || !!this.linkedComponent;
|
|
28372
|
+
}
|
|
28373
|
+
getTargetElement() {
|
|
28374
|
+
const targetElementId = this.linkedComponent ? this.linkedComponent : `bcm-list-input-${this._id}`;
|
|
28375
|
+
return document.getElementById(targetElementId);
|
|
28376
|
+
}
|
|
27728
28377
|
/** @description Fixes the issue where the list appears empty during fast scrolling. */
|
|
27729
28378
|
dataScrollEvent(event) {
|
|
27730
28379
|
var _a, _b;
|
|
27731
28380
|
const itemHeight = this.size === 'small' ? 28 : this.size === 'large' ? 48 : 36;
|
|
27732
28381
|
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);
|
|
27733
28382
|
const requiredItems = Math.ceil(currentScrollBottom / itemHeight) + 20;
|
|
27734
|
-
|
|
27735
|
-
|
|
27736
|
-
|
|
28383
|
+
const isSearchActive = this.searchFound != null && !this.isSelectedOther;
|
|
28384
|
+
const currentLimit = isSearchActive ? this.searchResultLimit || 0 : this.limit;
|
|
28385
|
+
if (requiredItems > currentLimit) {
|
|
28386
|
+
if (isSearchActive) {
|
|
28387
|
+
this.searchResultLimit = Math.min(requiredItems, this.searchFound);
|
|
28388
|
+
}
|
|
28389
|
+
else {
|
|
28390
|
+
this.limit = requiredItems;
|
|
28391
|
+
this.searchResultLimit = requiredItems;
|
|
28392
|
+
}
|
|
27737
28393
|
}
|
|
27738
28394
|
}
|
|
27739
28395
|
async calculateLocation() {
|
|
@@ -27806,20 +28462,20 @@ const BcmList = class {
|
|
|
27806
28462
|
}
|
|
27807
28463
|
/** @description Focus selected element * BUG 282262 */
|
|
27808
28464
|
focusSelectedElement() {
|
|
27809
|
-
var _a;
|
|
28465
|
+
var _a, _b;
|
|
27810
28466
|
const listElement = document.querySelector(`#bcm-list-${this._id}`);
|
|
27811
28467
|
if (!listElement)
|
|
27812
28468
|
return;
|
|
27813
|
-
const selectedId = (_a = this.value) === null || _a === void 0 ? void 0 : _a.id;
|
|
28469
|
+
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;
|
|
27814
28470
|
if (selectedId) {
|
|
27815
|
-
const targetItem = listElement.querySelector(`[id*="${selectedId}"]`);
|
|
27816
|
-
|
|
27817
|
-
|
|
27818
|
-
|
|
27819
|
-
|
|
27820
|
-
|
|
27821
|
-
|
|
27822
|
-
targetItem.focus();
|
|
28471
|
+
const targetItem = (listElement.querySelector(`[id="${selectedId}"]`) || listElement.querySelector(`[id*="${selectedId}"]`));
|
|
28472
|
+
const scrollContainer = listElement.querySelector(".scrolling");
|
|
28473
|
+
if (targetItem && scrollContainer) {
|
|
28474
|
+
const containerRect = scrollContainer.getBoundingClientRect();
|
|
28475
|
+
const itemRect = targetItem.getBoundingClientRect();
|
|
28476
|
+
const relativeOffsetTop = itemRect.top - containerRect.top + scrollContainer.scrollTop;
|
|
28477
|
+
scrollContainer.scrollTop = relativeOffsetTop - (containerRect.height / 2) + (itemRect.height / 2);
|
|
28478
|
+
targetItem.focus({ preventScroll: true });
|
|
27823
28479
|
const items = listElement.querySelectorAll(".bcm-list__item");
|
|
27824
28480
|
items.forEach(i => i.classList.remove("focused"));
|
|
27825
28481
|
targetItem.classList.add("focused");
|
|
@@ -27854,7 +28510,7 @@ const BcmList = class {
|
|
|
27854
28510
|
"--min-height": openedType ? "inherit" : this.minHeight,
|
|
27855
28511
|
} }, h$2("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (h$2("div", null, h$2("bcm-label", { tooltip: this.tooltip, size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == "select" && (h$2("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, h$2("span", { class: classnames("bcm-list__input-container", { "type-single": !checkboxes, "value-empty": !this.value }) }, this.checkboxes ? (this.value && this.value.length > 0 ? (h$2("bcm-rc-overflow", { data: this.tagData, maxCount: this.tagCount })) : (h$2("span", { class: "bcm-list__input-placeholder" }, this.placeholder))) : this.value ? (this.inputText) : (h$2("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), h$2("span", { class: classnames("bcm-list__input-buttons", {
|
|
27856
28512
|
disabled: disabled,
|
|
27857
|
-
}) }, this.clearable && this.value && (h$2("div", { class: "bcm-list__input-buttons-button" }, h$2("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h$2("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, h$2("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (h$2("div", { id: `bcm-list-input-${this._id}`, class: classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, h$2("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h$2("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h$2("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 })))), h$2(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) }), h$2(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
28513
|
+
}) }, this.clearable && this.value && (h$2("div", { class: "bcm-list__input-buttons-button" }, h$2("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h$2("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, h$2("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (h$2("div", { id: `bcm-list-input-${this._id}`, class: classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, h$2("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h$2("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h$2("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 })))), h$2(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 }), h$2(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
|
|
27858
28514
|
}
|
|
27859
28515
|
get el() { return getElement(this); }
|
|
27860
28516
|
static get watchers() { return {
|