@db-ux/wc-core-components 4.3.1 → 4.3.2-consolidation-7549d9f

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.
@@ -286,7 +286,7 @@ const DBCustomSelect = class {
286
286
  event.preventDefault();
287
287
  }
288
288
  handleKeyboardPress(event) {
289
- var _a, _b;
289
+ var _a, _b, _c;
290
290
  event.stopPropagation();
291
291
  if (event.key === "Escape" && ((_a = this.detailsRef) === null || _a === void 0 ? void 0 : _a.open)) {
292
292
  this.handleClose(undefined, true);
@@ -301,6 +301,14 @@ const DBCustomSelect = class {
301
301
  activeElement.click();
302
302
  event.preventDefault();
303
303
  }
304
+ else if (activeElement.getAttribute("type") === "search") {
305
+ // When Enter is pressed in search field, select the first available option
306
+ const firstOption = (_c = this._options) === null || _c === void 0 ? void 0 : _c.find((opt) => !opt.isGroupTitle && !opt.disabled);
307
+ if (firstOption === null || firstOption === void 0 ? void 0 : firstOption.value) {
308
+ this.handleSelect(firstOption.value);
309
+ event.preventDefault();
310
+ }
311
+ }
304
312
  }
305
313
  }
306
314
  else if (event.key === "ArrowDown" ||
@@ -765,19 +773,19 @@ const DBCustomSelect = class {
765
773
  }
766
774
  render() {
767
775
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
768
- return (index.h("div", { key: 'e3c88fad9a69c3a3f55084c42eaa18dd0b328fcb', class: index$1.cls("db-custom-select", this.className), id: this._id, ref: (el) => {
776
+ return (index.h("div", { key: '5ab3c80f3af53b7795e709feaea160e4aa26f281', class: index$1.cls("db-custom-select", this.className), id: this._id, ref: (el) => {
769
777
  this._ref = el;
770
778
  }, "aria-invalid": this._validity === "invalid", "data-custom-validity": this._validity, "data-width": this.formFieldWidth, "data-variant": this.variant === "floating" &&
771
779
  this.selectedType === "tag" &&
772
780
  this.multiple
773
781
  ? "above"
774
- : this.variant, "data-required": index$1.getBooleanAsString(this.required), "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": index$1.getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": index$1.getBooleanAsString(this.showIcon) }, index.h("label", { key: '8761c16255c8722f01008536cefbaac50677095b', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : constants.DEFAULT_LABEL, index.h("select", { key: 'd750bdd188427d5fc4e15a53d5640a7b55a360cd', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
782
+ : this.variant, "data-required": index$1.getBooleanAsString(this.required), "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": index$1.getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": index$1.getBooleanAsString(this.showIcon) }, index.h("label", { key: '281d6b75a9ae62b6e2f59c04876603988366952d', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : constants.DEFAULT_LABEL, index.h("select", { key: '26029a01c106666155c40cac98a7f67739145491', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
775
783
  this.selectRef = el;
776
784
  }, form: this.form, name: this.name, multiple: index$1.getBoolean(this.multiple, "multiple"), disabled: index$1.getBoolean(this.disabled, "disabled"), required: index$1.getBoolean(this.required, "required"), onChange: (event) => this.satisfyReact(event) }, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length)
777
785
  ? (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => (index.h("option", { disabled: option.disabled, value: option.value, key: undefined }, this.getOptionLabel(option))))
778
- : null)), index.h("details", { key: '4554ef5982957f7202f0109f0d081f6dde2d078c', ref: (el) => {
786
+ : null)), index.h("details", { key: '60f50d851ebf3b180094bdbd1c9acb3c6e1069af', ref: (el) => {
779
787
  this.detailsRef = el;
780
- }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, index.h("slot", { key: '3ee9982ab7ea04516f50b6ad7ba68da802e6df20' }), this.options ? (index.h(index.Fragment, null, index.h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": index$1.getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (index.h("span", { "data-visually-hidden": index$1.getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (index.h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (index.h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index$1) => (index.h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), index.h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (index.h("div", null, index.h("db-input", { type: "search", ref: (el) => {
788
+ }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, index.h("slot", { key: '369ba87529acc1e3b2d12869174eff0a824c0176' }), this.options ? (index.h(index.Fragment, null, index.h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": index$1.getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (index.h("span", { "data-visually-hidden": index$1.getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (index.h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (index.h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index$1) => (index.h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), index.h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (index.h("div", null, index.h("db-input", { type: "search", ref: (el) => {
781
789
  this.searchInputRef = el;
782
790
  }, name: this._id, form: this._id, showLabel: false, value: this._searchValue, label: (_f = this.searchLabel) !== null && _f !== void 0 ? _f : constants.DEFAULT_LABEL, placeholder: (_g = this.searchPlaceholder) !== null && _g !== void 0 ? _g : this.searchLabel, ariaDescribedBy: this._hasNoOptions || this.showLoading
783
791
  ? this._infoTextId
@@ -787,7 +795,7 @@ const DBCustomSelect = class {
787
795
  this.selectAllRef = el;
788
796
  }, form: this._id, checked: this.selectAllChecked, onChange: (event) => this.handleSelectAll(event) }), this.getSelectAllLabel())))) : null, index.h("db-custom-select-list", { multiple: index$1.getBoolean(this.multiple, "multiple"), label: (_k = (_j = this.listLabel) !== null && _j !== void 0 ? _j : this.label) !== null && _k !== void 0 ? _k : constants.DEFAULT_LABEL }, (_l = this._options) === null || _l === void 0 ? void 0 : _l.map((option) => (index.h("db-custom-select-list-item", { type: this.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: this.getOptionLabel(option), name: this._id, checked: this.getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: () => this.handleSelect(option.value), key: undefined }, !option.isGroupTitle
789
797
  ? this.getOptionLabel(option)
790
- : null)))))), index.h("div", null, index.h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : constants.DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (index.h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, index.h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, index.h("span", { key: '0294aea948930da94ffda5cc9c2a06439d284dca', class: "db-custom-select-placeholder", "aria-hidden": index$1.getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '36d6fb52fc71e38c2fae07741b489bbcad2cd1f8', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), index.h("span", { key: 'bb1406432ebb877e25f5cfc2ea90a3719d0c50aa', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
798
+ : null)))))), index.h("div", null, index.h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : constants.DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (index.h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, index.h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, index.h("span", { key: 'b4a9cebfe1db06422f428bac4d04d581bcadbb95', class: "db-custom-select-placeholder", "aria-hidden": index$1.getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: 'a407a98afeecf7634770f34e2f427a09d657419a', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), index.h("span", { key: '4465c3745c21e5333c8498927416fd0f244673dd', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
791
799
  }
792
800
  static get watchers() { return {
793
801
  "detailsRef": [{
@@ -43,7 +43,7 @@ const DBDrawer = class {
43
43
  const open = Boolean(this.open);
44
44
  if (open && !this._ref.open) {
45
45
  if (this.dialogContainerRef) {
46
- this.dialogContainerRef.hidden = false;
46
+ this.dialogContainerRef.removeAttribute("data-transition");
47
47
  }
48
48
  if (this.position === "absolute" ||
49
49
  this.backdrop === "none" ||
@@ -53,16 +53,20 @@ const DBDrawer = class {
53
53
  else {
54
54
  this._ref.showModal();
55
55
  }
56
+ void index$1.delay(() => {
57
+ if (this.dialogContainerRef) {
58
+ this.dialogContainerRef.dataset["transition"] =
59
+ "open";
60
+ }
61
+ }, 1);
56
62
  }
57
63
  if (!open && this._ref.open) {
58
64
  if (this.dialogContainerRef) {
59
- this.dialogContainerRef.hidden = true;
65
+ this.dialogContainerRef.dataset["transition"] =
66
+ "close";
60
67
  }
61
- index$1.delay(() => {
68
+ void index$1.delay(() => {
62
69
  var _a;
63
- if (this.dialogContainerRef) {
64
- this.dialogContainerRef.hidden = false;
65
- }
66
70
  (_a = this._ref) === null || _a === void 0 ? void 0 : _a.close();
67
71
  }, 401);
68
72
  }
@@ -127,11 +131,11 @@ const DBDrawer = class {
127
131
  }
128
132
  render() {
129
133
  var _a;
130
- return (index.h("dialog", { key: 'bde9fb000bc000b3371ab4e7333ec0b7e802a1d5', class: "db-drawer", id: this.id, ref: (el) => {
134
+ return (index.h("dialog", { key: '171c5580c99bbe2d2ea0a6e8e5962e4132d9b07f', class: "db-drawer", id: this.id, ref: (el) => {
131
135
  this._ref = el;
132
- }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, index.h("article", { key: '62fb34f827d93c6a52e6dc79fb0970879b07dd72', class: index$1.cls("db-drawer-container", this.className), ref: (el) => {
136
+ }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, index.h("article", { key: 'e9fad39beff3e642ad13be4950bb64fd15896f80', class: index$1.cls("db-drawer-container", this.className), ref: (el) => {
133
137
  this.dialogContainerRef = el;
134
- }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": index$1.getBooleanAsString(this.rounded) }, index.h("header", { key: '81567140972ebb1f244c46227f688f017b2d74da', class: "db-drawer-header" }, index.h("div", { key: '14fe9424f88dd71bedc5b670edf7d776639ad65f', class: "db-drawer-header-text" }, index.h("slot", { key: 'e8f703b2d8c81c9e64996f6c8214ae004484698c', name: "drawerHeader" })), index.h("db-button", { key: '7f18727c2550a75ed735d11b8983b9b6bca0f1d4', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : constants.DEFAULT_CLOSE_BUTTON)), index.h("div", { key: 'e2b7f182c9f321f5477ee4669451e10935cae010', class: "db-drawer-content" }, index.h("slot", { key: '23bb4b8cf2c617757379637fab20361b6d4943f2' })))));
138
+ }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": index$1.getBooleanAsString(this.rounded) }, index.h("header", { key: 'cb9f374f26ebca0f11d02081c28e856cc87107c3', class: "db-drawer-header" }, index.h("div", { key: '7fca8037c16e16d909bcede75e223f38ae019453', class: "db-drawer-header-text" }, index.h("slot", { key: '85159cc4d260fa992bfe8b933920ae286b9ab09c', name: "drawerHeader" })), index.h("db-button", { key: '4a9ad6ba576480b154614da72752421a8ff81df6', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : constants.DEFAULT_CLOSE_BUTTON)), index.h("div", { key: '9dbbd6a3835dad60dea79a9b2fbed6a62dd6b837', class: "db-drawer-content" }, index.h("slot", { key: '1bc4b88266e6d7250d0075e2405b725ad38b950e' })))));
135
139
  }
136
140
  static get watchers() { return {
137
141
  "open": [{
@@ -282,7 +282,7 @@ export class DBCustomSelect {
282
282
  event.preventDefault();
283
283
  }
284
284
  handleKeyboardPress(event) {
285
- var _a, _b;
285
+ var _a, _b, _c;
286
286
  event.stopPropagation();
287
287
  if (event.key === "Escape" && ((_a = this.detailsRef) === null || _a === void 0 ? void 0 : _a.open)) {
288
288
  this.handleClose(undefined, true);
@@ -297,6 +297,14 @@ export class DBCustomSelect {
297
297
  activeElement.click();
298
298
  event.preventDefault();
299
299
  }
300
+ else if (activeElement.getAttribute("type") === "search") {
301
+ // When Enter is pressed in search field, select the first available option
302
+ const firstOption = (_c = this._options) === null || _c === void 0 ? void 0 : _c.find((opt) => !opt.isGroupTitle && !opt.disabled);
303
+ if (firstOption === null || firstOption === void 0 ? void 0 : firstOption.value) {
304
+ this.handleSelect(firstOption.value);
305
+ event.preventDefault();
306
+ }
307
+ }
300
308
  }
301
309
  }
302
310
  else if (event.key === "ArrowDown" ||
@@ -761,19 +769,19 @@ export class DBCustomSelect {
761
769
  }
762
770
  render() {
763
771
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
764
- return (h("div", { key: 'e3c88fad9a69c3a3f55084c42eaa18dd0b328fcb', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
772
+ return (h("div", { key: '5ab3c80f3af53b7795e709feaea160e4aa26f281', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
765
773
  this._ref = el;
766
774
  }, "aria-invalid": this._validity === "invalid", "data-custom-validity": this._validity, "data-width": this.formFieldWidth, "data-variant": this.variant === "floating" &&
767
775
  this.selectedType === "tag" &&
768
776
  this.multiple
769
777
  ? "above"
770
- : this.variant, "data-required": getBooleanAsString(this.required), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '8761c16255c8722f01008536cefbaac50677095b', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: 'd750bdd188427d5fc4e15a53d5640a7b55a360cd', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
778
+ : this.variant, "data-required": getBooleanAsString(this.required), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '281d6b75a9ae62b6e2f59c04876603988366952d', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: '26029a01c106666155c40cac98a7f67739145491', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
771
779
  this.selectRef = el;
772
780
  }, form: this.form, name: this.name, multiple: getBoolean(this.multiple, "multiple"), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), onChange: (event) => this.satisfyReact(event) }, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length)
773
781
  ? (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => (h("option", { disabled: option.disabled, value: option.value, key: undefined }, this.getOptionLabel(option))))
774
- : null)), h("details", { key: '4554ef5982957f7202f0109f0d081f6dde2d078c', ref: (el) => {
782
+ : null)), h("details", { key: '60f50d851ebf3b180094bdbd1c9acb3c6e1069af', ref: (el) => {
775
783
  this.detailsRef = el;
776
- }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '3ee9982ab7ea04516f50b6ad7ba68da802e6df20' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
784
+ }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '369ba87529acc1e3b2d12869174eff0a824c0176' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
777
785
  this.searchInputRef = el;
778
786
  }, name: this._id, form: this._id, showLabel: false, value: this._searchValue, label: (_f = this.searchLabel) !== null && _f !== void 0 ? _f : DEFAULT_LABEL, placeholder: (_g = this.searchPlaceholder) !== null && _g !== void 0 ? _g : this.searchLabel, ariaDescribedBy: this._hasNoOptions || this.showLoading
779
787
  ? this._infoTextId
@@ -783,7 +791,7 @@ export class DBCustomSelect {
783
791
  this.selectAllRef = el;
784
792
  }, form: this._id, checked: this.selectAllChecked, onChange: (event) => this.handleSelectAll(event) }), this.getSelectAllLabel())))) : null, h("db-custom-select-list", { multiple: getBoolean(this.multiple, "multiple"), label: (_k = (_j = this.listLabel) !== null && _j !== void 0 ? _j : this.label) !== null && _k !== void 0 ? _k : DEFAULT_LABEL }, (_l = this._options) === null || _l === void 0 ? void 0 : _l.map((option) => (h("db-custom-select-list-item", { type: this.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: this.getOptionLabel(option), name: this._id, checked: this.getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: () => this.handleSelect(option.value), key: undefined }, !option.isGroupTitle
785
793
  ? this.getOptionLabel(option)
786
- : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '0294aea948930da94ffda5cc9c2a06439d284dca', class: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '36d6fb52fc71e38c2fae07741b489bbcad2cd1f8', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: 'bb1406432ebb877e25f5cfc2ea90a3719d0c50aa', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
794
+ : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: 'b4a9cebfe1db06422f428bac4d04d581bcadbb95', class: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'a407a98afeecf7634770f34e2f427a09d657419a', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '4465c3745c21e5333c8498927416fd0f244673dd', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
787
795
  }
788
796
  static get is() { return "db-custom-select"; }
789
797
  static get properties() {
@@ -42,7 +42,7 @@ export class DBDrawer {
42
42
  const open = Boolean(this.open);
43
43
  if (open && !this._ref.open) {
44
44
  if (this.dialogContainerRef) {
45
- this.dialogContainerRef.hidden = false;
45
+ this.dialogContainerRef.removeAttribute("data-transition");
46
46
  }
47
47
  if (this.position === "absolute" ||
48
48
  this.backdrop === "none" ||
@@ -52,16 +52,20 @@ export class DBDrawer {
52
52
  else {
53
53
  this._ref.showModal();
54
54
  }
55
+ void delay(() => {
56
+ if (this.dialogContainerRef) {
57
+ this.dialogContainerRef.dataset["transition"] =
58
+ "open";
59
+ }
60
+ }, 1);
55
61
  }
56
62
  if (!open && this._ref.open) {
57
63
  if (this.dialogContainerRef) {
58
- this.dialogContainerRef.hidden = true;
64
+ this.dialogContainerRef.dataset["transition"] =
65
+ "close";
59
66
  }
60
- delay(() => {
67
+ void delay(() => {
61
68
  var _a;
62
- if (this.dialogContainerRef) {
63
- this.dialogContainerRef.hidden = false;
64
- }
65
69
  (_a = this._ref) === null || _a === void 0 ? void 0 : _a.close();
66
70
  }, 401);
67
71
  }
@@ -126,11 +130,11 @@ export class DBDrawer {
126
130
  }
127
131
  render() {
128
132
  var _a;
129
- return (h("dialog", { key: 'bde9fb000bc000b3371ab4e7333ec0b7e802a1d5', class: "db-drawer", id: this.id, ref: (el) => {
133
+ return (h("dialog", { key: '171c5580c99bbe2d2ea0a6e8e5962e4132d9b07f', class: "db-drawer", id: this.id, ref: (el) => {
130
134
  this._ref = el;
131
- }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, h("article", { key: '62fb34f827d93c6a52e6dc79fb0970879b07dd72', class: cls("db-drawer-container", this.className), ref: (el) => {
135
+ }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, h("article", { key: 'e9fad39beff3e642ad13be4950bb64fd15896f80', class: cls("db-drawer-container", this.className), ref: (el) => {
132
136
  this.dialogContainerRef = el;
133
- }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": getBooleanAsString(this.rounded) }, h("header", { key: '81567140972ebb1f244c46227f688f017b2d74da', class: "db-drawer-header" }, h("div", { key: '14fe9424f88dd71bedc5b670edf7d776639ad65f', class: "db-drawer-header-text" }, h("slot", { key: 'e8f703b2d8c81c9e64996f6c8214ae004484698c', name: "drawerHeader" })), h("db-button", { key: '7f18727c2550a75ed735d11b8983b9b6bca0f1d4', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : DEFAULT_CLOSE_BUTTON)), h("div", { key: 'e2b7f182c9f321f5477ee4669451e10935cae010', class: "db-drawer-content" }, h("slot", { key: '23bb4b8cf2c617757379637fab20361b6d4943f2' })))));
137
+ }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": getBooleanAsString(this.rounded) }, h("header", { key: 'cb9f374f26ebca0f11d02081c28e856cc87107c3', class: "db-drawer-header" }, h("div", { key: '7fca8037c16e16d909bcede75e223f38ae019453', class: "db-drawer-header-text" }, h("slot", { key: '85159cc4d260fa992bfe8b933920ae286b9ab09c', name: "drawerHeader" })), h("db-button", { key: '4a9ad6ba576480b154614da72752421a8ff81df6', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : DEFAULT_CLOSE_BUTTON)), h("div", { key: '9dbbd6a3835dad60dea79a9b2fbed6a62dd6b837', class: "db-drawer-content" }, h("slot", { key: '1bc4b88266e6d7250d0075e2405b725ad38b950e' })))));
134
138
  }
135
139
  static get is() { return "db-drawer"; }
136
140
  static get properties() {
@@ -1 +1 @@
1
- import{p as e,b as a}from"./p-9pYJFapZ.js";export{s as setNonce}from"./p-9pYJFapZ.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a(JSON.parse('[["p-5426dbd3",[[260,"db-custom-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"ariaDescribedBy":[1,"aria-described-by"],"showNoResults":[4,"show-no-results"],"showLoading":[4,"show-loading"],"multiple":[8],"showSelectAll":[4,"show-select-all"],"showSearch":[4,"show-search"],"values":[16],"validation":[1],"options":[16],"searchValue":[1,"search-value"],"selectedLabels":[1,"selected-labels"],"transformSelectedLabels":[16],"selectedType":[1,"selected-type"],"amountText":[1,"amount-text"],"validMessage":[1,"valid-message"],"required":[8],"selectAllLabel":[1,"select-all-label"],"removeTagsTexts":[16],"placement":[1],"searchFilter":[16],"className":[1,"classname"],"formFieldWidth":[1,"form-field-width"],"variant":[1],"showRequiredAsterisk":[8,"show-required-asterisk"],"showLabel":[8,"show-label"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"form":[1],"name":[1],"disabled":[8],"open":[4],"selectedPrefix":[1,"selected-prefix"],"dropdownWidth":[1,"dropdown-width"],"searchLabel":[1,"search-label"],"searchPlaceholder":[1,"search-placeholder"],"listLabel":[1,"list-label"],"loadingText":[1,"loading-text"],"noResultsText":[1,"no-results-text"],"mobileCloseButtonText":[1,"mobile-close-button-text"],"showClearSelection":[4,"show-clear-selection"],"clearSelectionText":[1,"clear-selection-text"],"placeholder":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_selectId":[32],"_labelId":[32],"_summaryId":[32],"_placeholderId":[32],"_infoTextId":[32],"_validity":[32],"_userInteraction":[32],"abortController":[32],"_descByIds":[32],"_selectedLabels":[32],"_selectedLabelsId":[32],"_voiceOverFallback":[32],"_selectedOptions":[32],"selectAllEnabled":[32],"searchEnabled":[32],"amountOptions":[32],"_values":[32],"_options":[32],"_hasNoOptions":[32],"_documentClickListenerCallbackId":[32],"_internalChangeTimestamp":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32],"_searchValue":[32],"selectAllChecked":[32],"selectAllIndeterminate":[32]},null,{"detailsRef":[{"watch0":0},{"watch2":0}],"_id":[{"watch1":0}],"_descByIds":[{"watch2":0}],"showNoResults":[{"watch3":0}],"showLoading":[{"watch3":0}],"_options":[{"watch3":0}],"showSelectAll":[{"watch4":0}],"amountOptions":[{"watch4":0},{"watch5":0},{"watch10":0}],"multiple":[{"watch4":0}],"showSearch":[{"watch5":0}],"values":[{"watch6":0}],"_values":[{"watch7":0},{"watch10":0},{"watch13":0}],"selectRef":[{"watch7":0},{"watch8":0},{"watch17":0}],"validation":[{"watch9":0}],"options":[{"watch11":0},{"watch13":0}],"searchValue":[{"watch12":0}],"_selectedOptions":[{"watch14":0},{"watch15":0}],"selectedType":[{"watch14":0}],"amountText":[{"watch14":0}],"selectedLabels":[{"watch14":0}],"transformSelectedLabels":[{"watch14":0}],"selectAllIndeterminate":[{"watch16":0}],"selectAllRef":[{"watch16":0}],"invalidMessage":[{"watch17":0}]}]]],["p-e30a4814",[[260,"db-tabs",{"id":[1],"name":[1],"tabs":[1],"arrowScrollDistance":[8,"arrow-scroll-distance"],"orientation":[1],"behavior":[1],"initialSelectedMode":[1,"initial-selected-mode"],"initialSelectedIndex":[8,"initial-selected-index"],"className":[1,"classname"],"alignment":[1],"width":[1],"_id":[32],"_name":[32],"initialized":[32],"showScrollLeft":[32],"showScrollRight":[32],"scrollContainer":[32],"_resizeObserver":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}]}]]],["p-2069117e",[[260,"db-header",{"forceMobile":[8,"force-mobile"],"drawerOpen":[8,"drawer-open"],"className":[1,"classname"],"id":[1],"width":[1],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"],"burgerMenuLabel":[1,"burger-menu-label"],"initialized":[32],"forcedToMobile":[32]},null,{"initialized":[{"watch0":0}],"_ref":[{"watch0":0}]}]]],["p-78f6b72a",[[260,"db-accordion",{"id":[1],"name":[1],"behavior":[1],"initOpenIndex":[16],"items":[1],"className":[1,"classname"],"variant":[1],"_id":[32],"_name":[32],"initialized":[32],"_initOpenIndexDone":[32]},null,{"initialized":[{"watch0":0}],"name":[{"watch0":0}],"behavior":[{"watch0":0}],"_id":[{"watch0":0}],"_ref":[{"watch1":0},{"watch2":0}],"_name":[{"watch1":0}],"_initOpenIndexDone":[{"watch2":0}],"initOpenIndex":[{"watch2":0}]}]]],["p-29d3070a",[[260,"db-checkbox",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"indeterminate":[8],"checked":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"size":[1],"showRequiredAsterisk":[8,"show-required-asterisk"],"showLabel":[8,"show-label"],"name":[1],"disabled":[8],"value":[8],"ariaDescribedBy":[1,"aria-described-by"],"label":[1],"messageIcon":[1,"message-icon"],"initialized":[32],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch2":0},{"watch3":0},{"watch4":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"initialized":[{"watch2":0},{"watch3":0}],"indeterminate":[{"watch2":0}],"checked":[{"watch3":0}]}]]],["p-286f83f4",[[260,"db-navigation-item",{"subNavigationExpanded":[8,"sub-navigation-expanded"],"id":[1],"className":[1,"classname"],"width":[1],"icon":[1],"showIcon":[8,"show-icon"],"active":[4],"wrap":[8],"disabled":[8],"text":[1],"backButtonId":[1,"back-button-id"],"backButtonText":[1,"back-button-text"],"initialized":[32],"hasAreaPopup":[32],"hasSubNavigation":[32],"isSubNavigationExpanded":[32],"autoClose":[32],"subNavigationId":[32],"navigationItemSafeTriangle":[32]},null,{"subNavigationExpanded":[{"watch0":0}],"initialized":[{"watch1":0}],"_ref":[{"watch1":0}]}]]],["p-c9d514e5",[[260,"db-notification",{"id":[1],"className":[1,"classname"],"ariaLive":[1,"aria-live"],"semantic":[1],"variant":[1],"showIcon":[8,"show-icon"],"icon":[1],"linkVariant":[1,"link-variant"],"headline":[8],"showHeadline":[8,"show-headline"],"text":[1],"timestamp":[1],"showTimestamp":[8,"show-timestamp"],"closeable":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"]}]]],["p-b729b29f",[[260,"db-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"placeholder":[1],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"showRequiredAsterisk":[8,"show-required-asterisk"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"disabled":[8],"name":[1],"size":[2],"autocomplete":[1],"multiple":[4],"ariaDescribedBy":[1,"aria-described-by"],"options":[16],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_placeholderId":[32],"_descByIds":[32],"_value":[32],"initialized":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch3":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"initialized":[{"watch1":0}],"value":[{"watch2":0}]}]]],["p-26fa6bc1",[[260,"db-switch",{"id":[1],"validation":[1],"required":[8],"message":[1],"showMessage":[8,"show-message"],"validMessage":[1,"valid-message"],"invalidMessage":[1,"invalid-message"],"checked":[8],"disabled":[8],"visualAid":[8,"visual-aid"],"size":[1],"showLabel":[8,"show-label"],"variant":[16],"showRequiredAsterisk":[8,"show-required-asterisk"],"className":[1,"classname"],"value":[8],"name":[1],"iconLeading":[1,"icon-leading"],"icon":[1],"iconTrailing":[1,"icon-trailing"],"label":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"validation":[{"watch0":0}],"required":[{"watch0":0}],"message":[{"watch0":0}],"showMessage":[{"watch0":0}],"validMessage":[{"watch0":0}],"invalidMessage":[{"watch0":0}],"checked":[{"watch0":0}],"_ref":[{"watch1":0}]}]]],["p-39d22a0f",[[0,"db-textarea",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"className":[1,"classname"],"variant":[1],"showRequiredAsterisk":[8,"show-required-asterisk"],"showLabel":[8,"show-label"],"label":[1],"fieldSizing":[1,"field-sizing"],"resize":[1],"showResizer":[8,"show-resizer"],"disabled":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"maxlength":[8],"minlength":[8],"name":[1],"wrap":[1],"spellCheck":[4,"spell-check"],"autocomplete":[1],"ariaDescribedBy":[1,"aria-described-by"],"placeholder":[1],"rows":[8],"cols":[8],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch3":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"value":[{"watch2":0}]}]]],["p-5bca6d35",[[260,"db-badge",{"placement":[1],"id":[1],"className":[1,"classname"],"semantic":[1],"size":[1],"emphasis":[1],"label":[1],"text":[1],"initialized":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}]}]]],["p-a232eea2",[[260,"db-brand",{"hideLogo":[4,"hide-logo"],"icon":[1],"showIcon":[8,"show-icon"],"id":[1],"className":[1,"classname"],"text":[1]}]]],["p-bde7ff5f",[[260,"db-card",{"id":[1],"className":[1,"classname"],"behavior":[1],"elevationLevel":[1,"elevation-level"],"spacing":[1]}]]],["p-af0e61d0",[[260,"db-custom-select-form-field",{"id":[1],"className":[1,"classname"]}]]],["p-9d5365f7",[[0,"db-divider",{"id":[1],"margin":[1],"variant":[1],"emphasis":[1],"width":[1],"className":[1,"classname"]}]]],["p-15241486",[[260,"db-icon",{"id":[1],"className":[1,"classname"],"icon":[1],"weight":[1],"variant":[1],"text":[1]}]]],["p-197f90e4",[[260,"db-link",{"id":[1],"className":[1,"classname"],"href":[1],"target":[1],"rel":[1],"role":[1],"referrerpolicy":[1],"referrerPolicy":[1,"referrer-policy"],"hreflang":[1],"disabled":[8],"size":[1],"showIcon":[8,"show-icon"],"variant":[1],"content":[1],"wrap":[8],"text":[1]}]]],["p-58611dcc",[[260,"db-navigation",{"id":[1],"className":[1,"classname"],"_id":[32]}]]],["p-623a6b59",[[260,"db-page",{"fadeIn":[8,"fade-in"],"documentOverflow":[1,"document-overflow"],"variant":[1],"id":[1],"className":[1,"classname"],"mainClass":[1,"main-class"],"fontsLoaded":[32]}]]],["p-b6538eed",[[260,"db-popover",{"placement":[1],"id":[1],"className":[1,"classname"],"spacing":[1],"gap":[8],"animation":[8],"open":[8],"delay":[1],"width":[1],"initialized":[32],"isExpanded":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":[{"watch0":0},{"watch1":0}],"initialized":[{"watch0":0}],"isExpanded":[{"watch1":0}]}]]],["p-13dd39f1",[[260,"db-radio",{"id":[1],"checked":[8],"size":[1],"showLabel":[8,"show-label"],"showRequiredAsterisk":[8,"show-required-asterisk"],"className":[1,"classname"],"validation":[1],"name":[1],"disabled":[8],"value":[8],"required":[8],"label":[1],"initialized":[32],"_id":[32],"abortController":[32]},null,{"initialized":[{"watch0":0}],"_ref":[{"watch0":0},{"watch1":0}],"checked":[{"watch0":0}]}]]],["p-2baf9c08",[[260,"db-section",{"id":[1],"className":[1,"classname"],"spacing":[1],"width":[1]}]]],["p-a98bde77",[[260,"db-stack",{"id":[1],"className":[1,"classname"],"gap":[1],"variant":[1],"direction":[1],"alignment":[1],"justifyContent":[1,"justify-content"],"wrap":[8]}]]],["p-86414acd",[[260,"db-drawer",{"open":[8],"position":[1],"backdrop":[1],"variant":[1],"id":[1],"direction":[1],"className":[1,"classname"],"spacing":[1],"width":[1],"rounded":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"],"initialized":[32]},null,{"open":[{"watch0":0}],"_ref":[{"watch1":0}],"initialized":[{"watch1":0}],"position":[{"watch1":0}]}]]],["p-a7463ead",[[260,"db-accordion-item",{"id":[1],"defaultOpen":[4,"default-open"],"name":[1],"className":[1,"classname"],"disabled":[8],"headlinePlain":[1,"headline-plain"],"text":[1],"_id":[32],"_open":[32],"_name":[32],"initialized":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}],"name":[{"watch1":0}]}]]],["p-9a543d5a",[[260,"db-tooltip",{"id":[1],"variant":[1],"placement":[1],"className":[1,"classname"],"emphasis":[1],"animation":[8],"delay":[1],"width":[1],"showArrow":[8,"show-arrow"],"_id":[32],"initialized":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}]}]]],["p-a1e66a3d",[[260,"db-tab-item",{"active":[8],"name":[1],"className":[1,"classname"],"id":[1],"iconLeading":[1,"icon-leading"],"icon":[1],"iconTrailing":[1,"icon-trailing"],"showIconLeading":[8,"show-icon-leading"],"showIcon":[8,"show-icon"],"showIconTrailing":[8,"show-icon-trailing"],"noText":[8,"no-text"],"disabled":[8],"checked":[8],"label":[1],"_selected":[32],"_name":[32],"initialized":[32],"_listenerAdded":[32],"boundSetSelectedOnChange":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}],"boundSetSelectedOnChange":[{"watch0":0}],"name":[{"watch1":0}]}],[260,"db-tab-list",{"id":[1],"className":[1,"classname"],"_id":[32]}],[260,"db-tab-panel",{"className":[1,"classname"],"id":[1],"content":[1]}]]],["p-75ae0fd9",[[260,"db-input",{"id":[1],"invalidMessage":[1,"invalid-message"],"dataListId":[1,"data-list-id"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"pattern":[1],"dataList":[16],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"showIconLeading":[8,"show-icon-leading"],"showIcon":[8,"show-icon"],"iconLeading":[1,"icon-leading"],"icon":[1],"iconTrailing":[1,"icon-trailing"],"showRequiredAsterisk":[8,"show-required-asterisk"],"showIconTrailing":[8,"show-icon-trailing"],"label":[1],"fieldSizing":[1,"field-sizing"],"name":[1],"type":[1],"multiple":[8],"placeholder":[1],"disabled":[8],"step":[8],"maxlength":[8],"minlength":[8],"max":[8],"min":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"size":[2],"autocomplete":[1],"autofocus":[8],"enterkeyhint":[1],"inputmode":[1],"ariaDescribedBy":[1,"aria-described-by"],"messageSize":[1,"message-size"],"messageIcon":[1,"message-icon"],"validMessageSize":[1,"valid-message-size"],"invalidMessageSize":[1,"invalid-message-size"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_dataListId":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch3":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"value":[{"watch2":0}]}],[260,"db-tag",{"removeButton":[1,"remove-button"],"id":[1],"className":[1,"classname"],"semantic":[1],"emphasis":[1],"icon":[1],"showCheckState":[8,"show-check-state"],"showIcon":[8,"show-icon"],"noText":[8,"no-text"],"overflow":[8],"text":[1],"behavior":[1]}],[260,"db-custom-select-dropdown",{"id":[1],"className":[1,"classname"],"width":[1]}],[260,"db-custom-select-list",{"multiple":[4],"label":[1],"id":[1],"className":[1,"classname"]}],[260,"db-custom-select-list-item",{"id":[1],"isGroupTitle":[4,"is-group-title"],"showDivider":[4,"show-divider"],"type":[1],"checked":[8],"className":[1,"classname"],"groupTitle":[1,"group-title"],"icon":[1],"showIcon":[8,"show-icon"],"name":[1],"disabled":[8],"value":[8],"label":[1],"_id":[32],"hasDivider":[32]},null,{"isGroupTitle":[{"watch0":0}],"showDivider":[{"watch0":0}]}]]],["p-29efc51e",[[260,"db-button",{"type":[1],"id":[1],"className":[1,"classname"],"disabled":[8],"iconLeading":[1,"icon-leading"],"icon":[1],"showIconLeading":[8,"show-icon-leading"],"showIcon":[8,"show-icon"],"iconTrailing":[1,"icon-trailing"],"showIconTrailing":[8,"show-icon-trailing"],"size":[1],"width":[1],"variant":[1],"noText":[8,"no-text"],"name":[1],"form":[1],"value":[1],"text":[1]}]]],["p-027fb90a",[[260,"db-infotext",{"id":[1],"className":[1,"classname"],"icon":[1],"semantic":[1],"size":[1],"showIcon":[8,"show-icon"],"text":[1]}]]]]'),e))));
1
+ import{p as e,b as a}from"./p-9pYJFapZ.js";export{s as setNonce}from"./p-9pYJFapZ.js";import{g as i}from"./p-DQuL1Twl.js";(()=>{const a=import.meta.url,i={};return""!==a&&(i.resourcesUrl=new URL(".",a).href),e(i)})().then((async e=>(await i(),a(JSON.parse('[["p-44f2f09d",[[260,"db-custom-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"ariaDescribedBy":[1,"aria-described-by"],"showNoResults":[4,"show-no-results"],"showLoading":[4,"show-loading"],"multiple":[8],"showSelectAll":[4,"show-select-all"],"showSearch":[4,"show-search"],"values":[16],"validation":[1],"options":[16],"searchValue":[1,"search-value"],"selectedLabels":[1,"selected-labels"],"transformSelectedLabels":[16],"selectedType":[1,"selected-type"],"amountText":[1,"amount-text"],"validMessage":[1,"valid-message"],"required":[8],"selectAllLabel":[1,"select-all-label"],"removeTagsTexts":[16],"placement":[1],"searchFilter":[16],"className":[1,"classname"],"formFieldWidth":[1,"form-field-width"],"variant":[1],"showRequiredAsterisk":[8,"show-required-asterisk"],"showLabel":[8,"show-label"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"form":[1],"name":[1],"disabled":[8],"open":[4],"selectedPrefix":[1,"selected-prefix"],"dropdownWidth":[1,"dropdown-width"],"searchLabel":[1,"search-label"],"searchPlaceholder":[1,"search-placeholder"],"listLabel":[1,"list-label"],"loadingText":[1,"loading-text"],"noResultsText":[1,"no-results-text"],"mobileCloseButtonText":[1,"mobile-close-button-text"],"showClearSelection":[4,"show-clear-selection"],"clearSelectionText":[1,"clear-selection-text"],"placeholder":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_selectId":[32],"_labelId":[32],"_summaryId":[32],"_placeholderId":[32],"_infoTextId":[32],"_validity":[32],"_userInteraction":[32],"abortController":[32],"_descByIds":[32],"_selectedLabels":[32],"_selectedLabelsId":[32],"_voiceOverFallback":[32],"_selectedOptions":[32],"selectAllEnabled":[32],"searchEnabled":[32],"amountOptions":[32],"_values":[32],"_options":[32],"_hasNoOptions":[32],"_documentClickListenerCallbackId":[32],"_internalChangeTimestamp":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32],"_searchValue":[32],"selectAllChecked":[32],"selectAllIndeterminate":[32]},null,{"detailsRef":[{"watch0":0},{"watch2":0}],"_id":[{"watch1":0}],"_descByIds":[{"watch2":0}],"showNoResults":[{"watch3":0}],"showLoading":[{"watch3":0}],"_options":[{"watch3":0}],"showSelectAll":[{"watch4":0}],"amountOptions":[{"watch4":0},{"watch5":0},{"watch10":0}],"multiple":[{"watch4":0}],"showSearch":[{"watch5":0}],"values":[{"watch6":0}],"_values":[{"watch7":0},{"watch10":0},{"watch13":0}],"selectRef":[{"watch7":0},{"watch8":0},{"watch17":0}],"validation":[{"watch9":0}],"options":[{"watch11":0},{"watch13":0}],"searchValue":[{"watch12":0}],"_selectedOptions":[{"watch14":0},{"watch15":0}],"selectedType":[{"watch14":0}],"amountText":[{"watch14":0}],"selectedLabels":[{"watch14":0}],"transformSelectedLabels":[{"watch14":0}],"selectAllIndeterminate":[{"watch16":0}],"selectAllRef":[{"watch16":0}],"invalidMessage":[{"watch17":0}]}]]],["p-e30a4814",[[260,"db-tabs",{"id":[1],"name":[1],"tabs":[1],"arrowScrollDistance":[8,"arrow-scroll-distance"],"orientation":[1],"behavior":[1],"initialSelectedMode":[1,"initial-selected-mode"],"initialSelectedIndex":[8,"initial-selected-index"],"className":[1,"classname"],"alignment":[1],"width":[1],"_id":[32],"_name":[32],"initialized":[32],"showScrollLeft":[32],"showScrollRight":[32],"scrollContainer":[32],"_resizeObserver":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}]}]]],["p-2069117e",[[260,"db-header",{"forceMobile":[8,"force-mobile"],"drawerOpen":[8,"drawer-open"],"className":[1,"classname"],"id":[1],"width":[1],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"],"burgerMenuLabel":[1,"burger-menu-label"],"initialized":[32],"forcedToMobile":[32]},null,{"initialized":[{"watch0":0}],"_ref":[{"watch0":0}]}]]],["p-78f6b72a",[[260,"db-accordion",{"id":[1],"name":[1],"behavior":[1],"initOpenIndex":[16],"items":[1],"className":[1,"classname"],"variant":[1],"_id":[32],"_name":[32],"initialized":[32],"_initOpenIndexDone":[32]},null,{"initialized":[{"watch0":0}],"name":[{"watch0":0}],"behavior":[{"watch0":0}],"_id":[{"watch0":0}],"_ref":[{"watch1":0},{"watch2":0}],"_name":[{"watch1":0}],"_initOpenIndexDone":[{"watch2":0}],"initOpenIndex":[{"watch2":0}]}]]],["p-29d3070a",[[260,"db-checkbox",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"indeterminate":[8],"checked":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"size":[1],"showRequiredAsterisk":[8,"show-required-asterisk"],"showLabel":[8,"show-label"],"name":[1],"disabled":[8],"value":[8],"ariaDescribedBy":[1,"aria-described-by"],"label":[1],"messageIcon":[1,"message-icon"],"initialized":[32],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch2":0},{"watch3":0},{"watch4":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"initialized":[{"watch2":0},{"watch3":0}],"indeterminate":[{"watch2":0}],"checked":[{"watch3":0}]}]]],["p-286f83f4",[[260,"db-navigation-item",{"subNavigationExpanded":[8,"sub-navigation-expanded"],"id":[1],"className":[1,"classname"],"width":[1],"icon":[1],"showIcon":[8,"show-icon"],"active":[4],"wrap":[8],"disabled":[8],"text":[1],"backButtonId":[1,"back-button-id"],"backButtonText":[1,"back-button-text"],"initialized":[32],"hasAreaPopup":[32],"hasSubNavigation":[32],"isSubNavigationExpanded":[32],"autoClose":[32],"subNavigationId":[32],"navigationItemSafeTriangle":[32]},null,{"subNavigationExpanded":[{"watch0":0}],"initialized":[{"watch1":0}],"_ref":[{"watch1":0}]}]]],["p-c9d514e5",[[260,"db-notification",{"id":[1],"className":[1,"classname"],"ariaLive":[1,"aria-live"],"semantic":[1],"variant":[1],"showIcon":[8,"show-icon"],"icon":[1],"linkVariant":[1,"link-variant"],"headline":[8],"showHeadline":[8,"show-headline"],"text":[1],"timestamp":[1],"showTimestamp":[8,"show-timestamp"],"closeable":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"]}]]],["p-b729b29f",[[260,"db-select",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"placeholder":[1],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"showRequiredAsterisk":[8,"show-required-asterisk"],"icon":[1],"showIcon":[8,"show-icon"],"label":[1],"disabled":[8],"name":[1],"size":[2],"autocomplete":[1],"multiple":[4],"ariaDescribedBy":[1,"aria-described-by"],"options":[16],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_placeholderId":[32],"_descByIds":[32],"_value":[32],"initialized":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch3":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"initialized":[{"watch1":0}],"value":[{"watch2":0}]}]]],["p-26fa6bc1",[[260,"db-switch",{"id":[1],"validation":[1],"required":[8],"message":[1],"showMessage":[8,"show-message"],"validMessage":[1,"valid-message"],"invalidMessage":[1,"invalid-message"],"checked":[8],"disabled":[8],"visualAid":[8,"visual-aid"],"size":[1],"showLabel":[8,"show-label"],"variant":[16],"showRequiredAsterisk":[8,"show-required-asterisk"],"className":[1,"classname"],"value":[8],"name":[1],"iconLeading":[1,"icon-leading"],"icon":[1],"iconTrailing":[1,"icon-trailing"],"label":[1],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"validation":[{"watch0":0}],"required":[{"watch0":0}],"message":[{"watch0":0}],"showMessage":[{"watch0":0}],"validMessage":[{"watch0":0}],"invalidMessage":[{"watch0":0}],"checked":[{"watch0":0}],"_ref":[{"watch1":0}]}]]],["p-39d22a0f",[[0,"db-textarea",{"id":[1],"invalidMessage":[1,"invalid-message"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"className":[1,"classname"],"variant":[1],"showRequiredAsterisk":[8,"show-required-asterisk"],"showLabel":[8,"show-label"],"label":[1],"fieldSizing":[1,"field-sizing"],"resize":[1],"showResizer":[8,"show-resizer"],"disabled":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"maxlength":[8],"minlength":[8],"name":[1],"wrap":[1],"spellCheck":[4,"spell-check"],"autocomplete":[1],"ariaDescribedBy":[1,"aria-described-by"],"placeholder":[1],"rows":[8],"cols":[8],"messageIcon":[1,"message-icon"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch3":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"value":[{"watch2":0}]}]]],["p-5bca6d35",[[260,"db-badge",{"placement":[1],"id":[1],"className":[1,"classname"],"semantic":[1],"size":[1],"emphasis":[1],"label":[1],"text":[1],"initialized":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}]}]]],["p-a232eea2",[[260,"db-brand",{"hideLogo":[4,"hide-logo"],"icon":[1],"showIcon":[8,"show-icon"],"id":[1],"className":[1,"classname"],"text":[1]}]]],["p-bde7ff5f",[[260,"db-card",{"id":[1],"className":[1,"classname"],"behavior":[1],"elevationLevel":[1,"elevation-level"],"spacing":[1]}]]],["p-af0e61d0",[[260,"db-custom-select-form-field",{"id":[1],"className":[1,"classname"]}]]],["p-9d5365f7",[[0,"db-divider",{"id":[1],"margin":[1],"variant":[1],"emphasis":[1],"width":[1],"className":[1,"classname"]}]]],["p-15241486",[[260,"db-icon",{"id":[1],"className":[1,"classname"],"icon":[1],"weight":[1],"variant":[1],"text":[1]}]]],["p-197f90e4",[[260,"db-link",{"id":[1],"className":[1,"classname"],"href":[1],"target":[1],"rel":[1],"role":[1],"referrerpolicy":[1],"referrerPolicy":[1,"referrer-policy"],"hreflang":[1],"disabled":[8],"size":[1],"showIcon":[8,"show-icon"],"variant":[1],"content":[1],"wrap":[8],"text":[1]}]]],["p-58611dcc",[[260,"db-navigation",{"id":[1],"className":[1,"classname"],"_id":[32]}]]],["p-623a6b59",[[260,"db-page",{"fadeIn":[8,"fade-in"],"documentOverflow":[1,"document-overflow"],"variant":[1],"id":[1],"className":[1,"classname"],"mainClass":[1,"main-class"],"fontsLoaded":[32]}]]],["p-b6538eed",[[260,"db-popover",{"placement":[1],"id":[1],"className":[1,"classname"],"spacing":[1],"gap":[8],"animation":[8],"open":[8],"delay":[1],"width":[1],"initialized":[32],"isExpanded":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":[{"watch0":0},{"watch1":0}],"initialized":[{"watch0":0}],"isExpanded":[{"watch1":0}]}]]],["p-13dd39f1",[[260,"db-radio",{"id":[1],"checked":[8],"size":[1],"showLabel":[8,"show-label"],"showRequiredAsterisk":[8,"show-required-asterisk"],"className":[1,"classname"],"validation":[1],"name":[1],"disabled":[8],"value":[8],"required":[8],"label":[1],"initialized":[32],"_id":[32],"abortController":[32]},null,{"initialized":[{"watch0":0}],"_ref":[{"watch0":0},{"watch1":0}],"checked":[{"watch0":0}]}]]],["p-2baf9c08",[[260,"db-section",{"id":[1],"className":[1,"classname"],"spacing":[1],"width":[1]}]]],["p-a98bde77",[[260,"db-stack",{"id":[1],"className":[1,"classname"],"gap":[1],"variant":[1],"direction":[1],"alignment":[1],"justifyContent":[1,"justify-content"],"wrap":[8]}]]],["p-e7e35164",[[260,"db-drawer",{"open":[8],"position":[1],"backdrop":[1],"variant":[1],"id":[1],"direction":[1],"className":[1,"classname"],"spacing":[1],"width":[1],"rounded":[8],"closeButtonId":[1,"close-button-id"],"closeButtonText":[1,"close-button-text"],"initialized":[32]},null,{"open":[{"watch0":0}],"_ref":[{"watch1":0}],"initialized":[{"watch1":0}],"position":[{"watch1":0}]}]]],["p-a7463ead",[[260,"db-accordion-item",{"id":[1],"defaultOpen":[4,"default-open"],"name":[1],"className":[1,"classname"],"disabled":[8],"headlinePlain":[1,"headline-plain"],"text":[1],"_id":[32],"_open":[32],"_name":[32],"initialized":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}],"name":[{"watch1":0}]}]]],["p-9a543d5a",[[260,"db-tooltip",{"id":[1],"variant":[1],"placement":[1],"className":[1,"classname"],"emphasis":[1],"animation":[8],"delay":[1],"width":[1],"showArrow":[8,"show-arrow"],"_id":[32],"initialized":[32],"_documentScrollListenerCallbackId":[32],"_observer":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}]}]]],["p-a1e66a3d",[[260,"db-tab-item",{"active":[8],"name":[1],"className":[1,"classname"],"id":[1],"iconLeading":[1,"icon-leading"],"icon":[1],"iconTrailing":[1,"icon-trailing"],"showIconLeading":[8,"show-icon-leading"],"showIcon":[8,"show-icon"],"showIconTrailing":[8,"show-icon-trailing"],"noText":[8,"no-text"],"disabled":[8],"checked":[8],"label":[1],"_selected":[32],"_name":[32],"initialized":[32],"_listenerAdded":[32],"boundSetSelectedOnChange":[32]},null,{"_ref":[{"watch0":0}],"initialized":[{"watch0":0}],"boundSetSelectedOnChange":[{"watch0":0}],"name":[{"watch1":0}]}],[260,"db-tab-list",{"id":[1],"className":[1,"classname"],"_id":[32]}],[260,"db-tab-panel",{"className":[1,"classname"],"id":[1],"content":[1]}]]],["p-75ae0fd9",[[260,"db-input",{"id":[1],"invalidMessage":[1,"invalid-message"],"dataListId":[1,"data-list-id"],"message":[1],"showMessage":[8,"show-message"],"value":[8],"validMessage":[1,"valid-message"],"validation":[1],"required":[8],"minLength":[8,"min-length"],"maxLength":[8,"max-length"],"pattern":[1],"dataList":[16],"className":[1,"classname"],"variant":[1],"showLabel":[8,"show-label"],"showIconLeading":[8,"show-icon-leading"],"showIcon":[8,"show-icon"],"iconLeading":[1,"icon-leading"],"icon":[1],"iconTrailing":[1,"icon-trailing"],"showRequiredAsterisk":[8,"show-required-asterisk"],"showIconTrailing":[8,"show-icon-trailing"],"label":[1],"fieldSizing":[1,"field-sizing"],"name":[1],"type":[1],"multiple":[8],"placeholder":[1],"disabled":[8],"step":[8],"maxlength":[8],"minlength":[8],"max":[8],"min":[8],"readOnly":[8,"read-only"],"readonly":[8],"form":[1],"size":[2],"autocomplete":[1],"autofocus":[8],"enterkeyhint":[1],"inputmode":[1],"ariaDescribedBy":[1,"aria-described-by"],"messageSize":[1,"message-size"],"messageIcon":[1,"message-icon"],"validMessageSize":[1,"valid-message-size"],"invalidMessageSize":[1,"invalid-message-size"],"_id":[32],"_messageId":[32],"_validMessageId":[32],"_invalidMessageId":[32],"_invalidMessage":[32],"_dataListId":[32],"_descByIds":[32],"_value":[32],"_voiceOverFallback":[32],"abortController":[32]},null,{"_ref":[{"watch0":0},{"watch3":0}],"invalidMessage":[{"watch0":0}],"_id":[{"watch1":0}],"value":[{"watch2":0}]}],[260,"db-tag",{"removeButton":[1,"remove-button"],"id":[1],"className":[1,"classname"],"semantic":[1],"emphasis":[1],"icon":[1],"showCheckState":[8,"show-check-state"],"showIcon":[8,"show-icon"],"noText":[8,"no-text"],"overflow":[8],"text":[1],"behavior":[1]}],[260,"db-custom-select-dropdown",{"id":[1],"className":[1,"classname"],"width":[1]}],[260,"db-custom-select-list",{"multiple":[4],"label":[1],"id":[1],"className":[1,"classname"]}],[260,"db-custom-select-list-item",{"id":[1],"isGroupTitle":[4,"is-group-title"],"showDivider":[4,"show-divider"],"type":[1],"checked":[8],"className":[1,"classname"],"groupTitle":[1,"group-title"],"icon":[1],"showIcon":[8,"show-icon"],"name":[1],"disabled":[8],"value":[8],"label":[1],"_id":[32],"hasDivider":[32]},null,{"isGroupTitle":[{"watch0":0}],"showDivider":[{"watch0":0}]}]]],["p-29efc51e",[[260,"db-button",{"type":[1],"id":[1],"className":[1,"classname"],"disabled":[8],"iconLeading":[1,"icon-leading"],"icon":[1],"showIconLeading":[8,"show-icon-leading"],"showIcon":[8,"show-icon"],"iconTrailing":[1,"icon-trailing"],"showIconTrailing":[8,"show-icon-trailing"],"size":[1],"width":[1],"variant":[1],"noText":[8,"no-text"],"name":[1],"form":[1],"value":[1],"text":[1]}]]],["p-027fb90a",[[260,"db-infotext",{"id":[1],"className":[1,"classname"],"icon":[1],"semantic":[1],"size":[1],"showIcon":[8,"show-icon"],"text":[1]}]]]]'),e))));
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,F as h}from"./p-9pYJFapZ.js";import{l,a as e,m as a,d as o,e as n,g as d,h as c,i as v,o as r,f as u,k as w,c as f,s as b}from"./p-BdL-nI5y.js";import{h as m,d as p,s as y,m as g,u as k,g as F,e as A,l as x,c as D}from"./p-BwBkekqp.js";import{D as C}from"./p-cqrM3KjS.js";import{D as S}from"./p-EqlW5Wqf.js";import{a as L}from"./p-G-TursYV.js";import{b as T}from"./p-Cb-k135w.js";const B=class{constructor(s){i(this,s),this.amountChange=t(this,"amountChange"),this.dropdownToggle=t(this,"dropdownToggle"),this.optionSelected=t(this,"optionSelected"),this.search=t(this,"search"),this.showClearSelection=!0,this.clearSelectionText="Clear selection",this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._selectId=void 0,this._labelId=void 0,this._summaryId=void 0,this._placeholderId=void 0,this._infoTextId=void 0,this._validity="no-validation",this._userInteraction=!1,this.abortController=void 0,this._descByIds=void 0,this._selectedLabels="",this._selectedLabelsId=void 0,this._voiceOverFallback="",this._selectedOptions=[],this.selectAllEnabled=!1,this.searchEnabled=!1,this.amountOptions=0,this._values=[],this._options=[],this._hasNoOptions=!1,this._documentClickListenerCallbackId=void 0,this._internalChangeTimestamp=0,this._documentScrollListenerCallbackId=void 0,this._observer=void 0,this._searchValue=void 0,this.selectAllChecked=!1,this.selectAllIndeterminate=!1,this.satisfyReact=function(i){i.stopPropagation()}}handleDocumentScroll(i){var t,s;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.contains)&&(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.contains(this.detailsRef))&&this.handleAutoPlacement()}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h,e,a,o,n;this.selectRef&&(this.selectRef.value=this.getNativeSelectValue()),(null===(i=this.selectRef)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(h=this.selectRef)||void 0===h?void 0:h.validity.valid)&&this.required?(this.setDescById(this._validMessageId),m()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:w,p((()=>this._voiceOverFallback=""),1e3)),this._validity=null!==(a=this.validation)&&void 0!==a?a:"valid"):y(this.message,this.showMessage)?(this.setDescById(this._messageId),this._validity=null!==(o=this.validation)&&void 0!==o?o:"no-validation"):(this.setDescById(this._placeholderId),this._validity=null!==(n=this.validation)&&void 0!==n?n:"no-validation"):(this.setDescById(this._invalidMessageId),this._invalidMessage=this.invalidMessage||(null===(t=this.selectRef)||void 0===t?void 0:t.validationMessage)||l,m()&&(this._voiceOverFallback=this._invalidMessage,p((()=>this._voiceOverFallback=""),1e3)),this._userInteraction&&(this._validity=null!==(s=this.validation)&&void 0!==s?s:"invalid"))}handleDropdownToggle(i){var t,s;this.dropdownToggle&&(i.stopPropagation(),this.dropdownToggle.emit(i)),i.target instanceof HTMLDetailsElement&&i.target.open?(this._documentClickListenerCallbackId=(new C).addCallback((i=>this.handleDocumentClose(i))),this._documentScrollListenerCallbackId=(new S).addCallback((i=>this.handleDocumentScroll(i))),this.handleAutoPlacement(),null===(t=this._observer)||void 0===t||t.observe(this.detailsRef),i.target.dataset.test||this.handleOpenByKeyboardFocus()):(this._documentClickListenerCallbackId&&(new C).removeCallback(this._documentClickListenerCallbackId),this._documentScrollListenerCallbackId&&(new S).removeCallback(this._documentScrollListenerCallbackId),null===(s=this._observer)||void 0===s||s.unobserve(this.detailsRef))}getNativeSelectValue(){var i,t;return(null===(i=this._values)||void 0===i?void 0:i.length)&&null!==(t=this._values.at(0))&&void 0!==t?t:""}setDescById(i){var t;const s=[];i&&s.push(i),this._selectedLabelsId&&(null===(t=this._selectedLabels)||void 0===t?void 0:t.length)&&s.push(this._selectedLabelsId),this._descByIds=s.join(" ")}getSelectAllLabel(){var i;return null!==(i=this.selectAllLabel)&&void 0!==i?i:e}getOptionLabel(i){var t,s,h;return null!==(h=null!==(t=i.label)&&void 0!==t?t:null===(s=i.value)||void 0===s?void 0:s.toString())&&void 0!==h?h:""}getOptionChecked(i){var t,s;return!(!i||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&(null===(s=this._values)||void 0===s?void 0:s.includes(i))}getTagRemoveLabel(i){const t=this.removeTagsTexts,s=this.options;if(t&&s){const h=s.findIndex((t=>t.value===i.value));if(h>=0&&h<t.length)return t[h]}return`${a} ${this.getOptionLabel(i)}`}handleTagRemove(i,t){t&&t.stopPropagation(),this.handleSelect(i.value),this.handleSummaryFocus()}handleAutoPlacement(){if(this.detailsRef){const i=this.detailsRef.querySelector("article");i&&p((()=>{var t;L(i,this.detailsRef,null!==(t=this.placement)&&void 0!==t?t:"bottom")}),1)}}handleArrowDownUp(i){var t,s,h;if(null===(t=this.detailsRef)||void 0===t?void 0:t.open){if(self.document){const t=self.document.activeElement;if(t)if("checkbox"===t.getAttribute("type")||"radio"===t.getAttribute("type")){const l=null==t?void 0:t.closest("li");if("ArrowDown"===i.key||"ArrowRight"===i.key){let i=null==l?void 0:l.nextElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.nextElementSibling}i||this.handleFocusFirstDropdownCheckbox(t)}else{let i=null==l?void 0:l.previousElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.previousElementSibling}if(!i){const i=this.detailsRef.querySelector('input[type="checkbox"]');if(i&&i!==t)this.handleFocusFirstDropdownCheckbox(t);else{const i=g(this.detailsRef);if(i)p((()=>{i.focus()}),100);else{const i=Array.from(null===(s=this.detailsRef)||void 0===s?void 0:s.querySelectorAll('input[type="checkbox"],input[type="radio"]'));i.length&&(null===(h=i.at(-1))||void 0===h||h.focus())}}}}}else"search"!==t.getAttribute("type")||"ArrowUp"!==i.key&&"ArrowLeft"!==i.key?this.handleFocusFirstDropdownCheckbox(t):(this.handleClose(void 0,!0),this.handleSummaryFocus())}}else"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(this.handleAutoPlacement(),this.detailsRef&&(this.detailsRef.open=!0),this.handleOpenByKeyboardFocus());i.stopPropagation(),i.preventDefault()}handleKeyboardPress(i){var t,s,h;if(i.stopPropagation(),"Escape"===i.key&&(null===(t=this.detailsRef)||void 0===t?void 0:t.open))this.handleClose(void 0,!0),this.handleSummaryFocus();else if("Enter"===i.key&&(null===(s=this.detailsRef)||void 0===s?void 0:s.open)){if(self.document){const t=self.document.activeElement;if(["checkbox","radio"].includes(t.getAttribute("type")||""))t.click(),i.preventDefault();else if("search"===t.getAttribute("type")){const t=null===(h=this._options)||void 0===h?void 0:h.find((i=>!i.isGroupTitle&&!i.disabled));(null==t?void 0:t.value)&&(this.handleSelect(t.value),i.preventDefault())}}}else"ArrowDown"!==i.key&&"ArrowUp"!==i.key&&"ArrowLeft"!==i.key&&"ArrowRight"!==i.key||this.handleArrowDownUp(i)}handleClose(i,t){this.detailsRef&&(t?(this.detailsRef.open=!1,this.handleSummaryFocus()):this.detailsRef.open&&i&&i.relatedTarget&&(this.detailsRef.contains(i.relatedTarget)||p((()=>this.detailsRef.open=!1),1)))}handleDocumentClose(i){var t,s;if(i){const h="number"==typeof i.detail?i.target:null===(t=i.detail)||void 0===t?void 0:t.target;(null===(s=this.detailsRef)||void 0===s?void 0:s.open)&&!this.detailsRef.contains(h)&&(this.detailsRef.open=!1)}}handleOptionSelected(i){(new Date).getTime()-this._internalChangeTimestamp<200||(this._values=i,this._userInteraction=!0,this.optionSelected&&this.optionSelected.emit(null!=i?i:[]),this._internalChangeTimestamp=(new Date).getTime())}handleSelect(i){var t;i&&(this.multiple?(null===(t=this._values)||void 0===t?void 0:t.includes(i))?this.handleOptionSelected(this._values.filter((t=>t!==i))):this.handleOptionSelected([...this._values||[],i]):(this.handleOptionSelected([i]),this.handleClose(void 0,!0)))}handleSelectAll(i){var t;if(i.stopPropagation(),(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions)this.handleOptionSelected([]);else{const i=this.searchEnabled&&this.searchInputRef?this.searchInputRef.value:void 0;this.handleOptionSelected(this.options?this.options.filter((t=>{var s;return!t.isGroupTitle&&(!i||(null===(s=t.value)||void 0===s?void 0:s.toLowerCase().includes(i.toLowerCase())))})).map((i=>{var t;return null!==(t=i.value)&&void 0!==t?t:""})):[])}}handleFocusFirstDropdownCheckbox(i){if(this.detailsRef){const t=Array.from(this.detailsRef.querySelectorAll('input[type="checkbox"],input[type="radio"]'));if(t.length){const s=t.at(0),h=s===i&&t.length>1?t.at(1):s;h&&p((()=>{h.focus()}),1)}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=g(this.detailsRef);i?p((()=>{i.focus()}),1):this.handleFocusFirstDropdownCheckbox()}}handleSearch(i){if(void 0===i)return;let t;if("string"==typeof i)t=i;else{const s=i;s.stopPropagation(),this.search&&this.search.emit(s),t=s.target.value,this._searchValue=t}this._options=this.options&&t&&0!==t.length?this.options.filter(this.searchFilter?i=>this.searchFilter(i,t):i=>!i.isGroupTitle&&this.getOptionLabel(i).toLowerCase().includes(t.toLowerCase())):this.options}handleClearAll(i){i.stopPropagation(),this.handleOptionSelected([]),this.handleSummaryFocus()}handleSummaryFocus(){var i;this.detailsRef&&(null===(i=this.detailsRef.querySelector("summary"))||void 0===i||i.focus())}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const l=t.item(h);if(l&&(l.name.startsWith("data-")||l.name.startsWith("aria-"))&&(i.setAttribute(l.name,l.value),s.removeAttribute(l.name)),l&&"class"===l.name){const t=l.value.includes("hydrated"),h=l.value.replace("hydrated","").trim(),e=i.getAttribute("class");i.setAttribute(l.name,`${e?`${e} `:""}${h}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(l.name)}}}}watch0Fn(){this.detailsRef&&this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}watch0(){this.watch0Fn()}watch1Fn(){if(this._id){const i=this._id+u;this._labelId=this._id+o,this._selectId=this._id+n,this._validMessageId=this._id+d,this._invalidMessageId=this._id+c,this._placeholderId=this._id+v,y(this.message,this.showMessage)?this.setDescById(i):this.setDescById()}}watch1(){this.watch1Fn()}watch2Fn(){var i;if(this.detailsRef){const t=this.detailsRef.querySelector("summary");t&&t.setAttribute("aria-describedby",null!==(i=this.ariaDescribedBy)&&void 0!==i?i:this._descByIds||"")}}watch2(){this.watch2Fn()}watch3Fn(){void 0!==this.showNoResults?this._hasNoOptions=this.showNoResults:this._options&&(this._hasNoOptions=0===this._options.length)}watch3(){this.watch3Fn()}watch4Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&(null!==(i=this.showSelectAll)&&void 0!==i?i:this.amountOptions>5))}watch4(){this.watch4Fn()}watch5Fn(){var i;this.searchEnabled=null!==(i=this.showSearch)&&void 0!==i?i:this.amountOptions>9}watch5(){this.watch5Fn()}watch6Fn(){var i;const t=this.values;Array.isArray(t)?this._values!==t&&(this._values=t):null==t&&0!==(null===(i=this._values)||void 0===i?void 0:i.length)&&(this._values=[])}watch6(){this.watch6Fn()}watch7Fn(){this.selectRef&&this.handleValidation()}watch7(){this.watch7Fn()}watch8Fn(){if(this.selectRef){let i=this.abortController;i||(i=new AbortController,this.abortController=i);const t=this.values;T(this.selectRef,(()=>{this.handleOptionSelected(t||(this.selectRef.value?[this.selectRef.value]:[])),this.handleValidation()}),i.signal)}}watch8(){this.watch8Fn()}watch9Fn(){this._validity=this.validation}watch9(){this.watch9Fn()}watch10Fn(){var i,t;0===(null===(i=this._values)||void 0===i?void 0:i.length)?(this.selectAllChecked=!1,this.selectAllIndeterminate=!1):(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions?(this.selectAllIndeterminate=!1,this.selectAllChecked=!0):this._values&&(this.selectAllIndeterminate=!0)}watch10(){this.watch10Fn()}watch11Fn(){var i,t;this._options=this.options,this.amountOptions=null!==(t=null===(i=this.options)||void 0===i?void 0:i.filter((i=>!i.isGroupTitle)).length)&&void 0!==t?t:0}watch11(){this.watch11Fn()}watch12Fn(){this._searchValue=this.searchValue,this.searchValue&&this.handleSearch(this.searchValue)}watch12(){this.watch12Fn()}watch13Fn(){var i,t;(null===(i=this.options)||void 0===i?void 0:i.length)&&(this._selectedOptions=null===(t=this.options)||void 0===t?void 0:t.filter((i=>{var t,s;return!(!i.value||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&!i.isGroupTitle&&(null===(s=this._values)||void 0===s?void 0:s.includes(i.value))})))}watch13(){this.watch13Fn()}watch14Fn(){var i,t,s;if(this.selectedLabels)this._selectedLabels=this.selectedLabels;else if(null===(i=this._selectedOptions)||void 0===i?void 0:i.length){if(this.transformSelectedLabels)return void(this._selectedLabels=(0,this.transformSelectedLabels)(this._selectedOptions));this._selectedLabels="amount"===this.selectedType?this.amountText?this.amountText:`${null===(t=this._selectedOptions)||void 0===t?void 0:t.length} ${r}`:null===(s=this._selectedOptions)||void 0===s?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}else this._selectedLabels=""}watch14(){this.watch14Fn()}watch15Fn(){var i,t;this.amountChange&&this.amountChange.emit(null!==(t=null===(i=this._selectedOptions)||void 0===i?void 0:i.length)&&void 0!==t?t:0)}watch15(){this.watch15Fn()}watch16Fn(){this.selectAllRef&&(this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate))}watch16(){this.watch16Fn()}watch17Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this.selectRef)||void 0===i?void 0:i.validationMessage)||l}watch17(){this.watch17Fn()}componentDidLoad(){var i;this.enableAttributePassing(this._ref,"db-custom-select");const t=null!==(i=this.id)&&void 0!==i?i:`custom-select-${k()}`;this._id=t,this._messageId=t+u,this._validMessageId=t+d,this._invalidMessageId=t+c,this._selectId=t+n,this._labelId=t+o,this._summaryId=t+"-summary",this._placeholderId=t+v,this._selectedLabelsId=t+"-selected-labels",this._infoTextId=t+"-info",this._invalidMessage=this.invalidMessage||l,"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((i=>{if(this.detailsRef){const t=i.find((({target:i})=>i===this.detailsRef));t&&!t.isIntersecting&&this.detailsRef.open&&(this.detailsRef.open=!1)}}))),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn(),this.watch5Fn(),this.watch6Fn(),this.watch7Fn(),this.watch8Fn(),this.watch9Fn(),this.watch10Fn(),this.watch11Fn(),this.watch12Fn(),this.watch13Fn(),this.watch14Fn(),this.watch15Fn(),this.watch16Fn(),this.watch17Fn()}disconnectedCallback(){var i;null===(i=this.abortController)||void 0===i||i.abort()}render(){var i,t,l,a,o,n,d,c,v,r,u,m,p,g,k;return s("div",{key:"5ab3c80f3af53b7795e709feaea160e4aa26f281",class:D("db-custom-select",this.className),id:this._id,ref:i=>{this._ref=i},"aria-invalid":"invalid"===this._validity,"data-custom-validity":this._validity,"data-width":this.formFieldWidth,"data-variant":"floating"===this.variant&&"tag"===this.selectedType&&this.multiple?"above":this.variant,"data-required":F(this.required),"data-hide-asterisk":x(this.showRequiredAsterisk),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":x(this.showLabel),"data-icon":this.icon,"data-show-icon":F(this.showIcon)},s("label",{key:"281d6b75a9ae62b6e2f59c04876603988366952d",id:this._labelId},null!==(i=this.label)&&void 0!==i?i:e,s("select",{key:"26029a01c106666155c40cac98a7f67739145491",role:"none",hidden:!0,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,multiple:A(this.multiple,"multiple"),disabled:A(this.disabled,"disabled"),required:A(this.required,"required"),onChange:i=>this.satisfyReact(i)},(null===(t=this.options)||void 0===t?void 0:t.length)?null===(l=this.options)||void 0===l?void 0:l.map((i=>s("option",{disabled:i.disabled,value:i.value,key:void 0},this.getOptionLabel(i)))):null)),s("details",{key:"60f50d851ebf3b180094bdbd1c9acb3c6e1069af",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"369ba87529acc1e3b2d12869174eff0a824c0176"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":F(this.disabled),"aria-labelledby":this._labelId},(null===(a=this._selectedLabels)||void 0===a?void 0:a.length)?s("span",{"data-visually-hidden":F("tag"===this.selectedType),id:this._selectedLabelsId},this.selectedPrefix?s("span",{"data-visually-hidden":"true"},this.selectedPrefix):null,this._selectedLabels):null,"tag"===this.selectedType?s("div",null,null===(o=this._selectedOptions)||void 0===o?void 0:o.map((i=>s("db-tag",{emphasis:"strong",behavior:"removable",removeButton:this.getTagRemoveLabel(i),onRemove:t=>this.handleTagRemove(i,t),key:void 0},this.getOptionLabel(i))))):null),s("db-custom-select-dropdown",{width:this.dropdownWidth},this.searchEnabled?s("div",null,s("db-input",{type:"search",ref:i=>{this.searchInputRef=i},name:this._id,form:this._id,showLabel:!1,value:this._searchValue,label:null!==(n=this.searchLabel)&&void 0!==n?n:e,placeholder:null!==(d=this.searchPlaceholder)&&void 0!==d?d:this.searchLabel,ariaDescribedBy:this._hasNoOptions||this.showLoading?this._infoTextId:void 0,onInput:i=>this.handleSearch(i)})):null,this._hasNoOptions||this.showLoading?s("db-infotext",{id:this._infoTextId,icon:this.showLoading?"circular_arrows":void 0,semantic:this.showLoading?"informational":"warning"},null!==(c=this.showLoading?this.loadingText:this.noResultsText)&&void 0!==c?c:f):s(h,null,this.selectAllEnabled?s("div",null,s("div",{class:"db-checkbox db-custom-select-list-item"},s("label",null,s("input",{type:"checkbox",value:"select-all",ref:i=>{this.selectAllRef=i},form:this._id,checked:this.selectAllChecked,onChange:i=>this.handleSelectAll(i)}),this.getSelectAllLabel()))):null,s("db-custom-select-list",{multiple:A(this.multiple,"multiple"),label:null!==(r=null!==(v=this.listLabel)&&void 0!==v?v:this.label)&&void 0!==r?r:e},null===(u=this._options)||void 0===u?void 0:u.map((i=>s("db-custom-select-list-item",{type:this.multiple?"checkbox":"radio",showDivider:i.showDivider,icon:i.icon,isGroupTitle:i.isGroupTitle,groupTitle:this.getOptionLabel(i),name:this._id,checked:this.getOptionChecked(i.value),disabled:i.disabled,value:i.value,onChange:()=>this.handleSelect(i.value),key:void 0},i.isGroupTitle?null:this.getOptionLabel(i)))))),s("div",null,s("db-button",{variant:"ghost",width:"full",icon:"cross",size:"small",name:this._id,form:this._id,onClick:()=>this.handleClose(void 0,!0)},null!==(m=this.mobileCloseButtonText)&&void 0!==m?m:b)))):null),(null===(p=this.showClearSelection)||void 0===p||p)&&(null===(g=this._values)||void 0===g?void 0:g.length)?s("db-button",{icon:"cross",variant:"ghost",size:"small",noText:!0,name:this._id,form:this._id,onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"b4a9cebfe1db06422f428bac4d04d581bcadbb95",class:"db-custom-select-placeholder","aria-hidden":F(!0),id:this._placeholderId},null!==(k=this.placeholder)&&void 0!==k?k:this.label),y(this.message,this.showMessage)?s("db-infotext",{size:"small",icon:this.messageIcon,id:this._messageId},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},this.validMessage||w):null,s("db-infotext",{key:"a407a98afeecf7634770f34e2f427a09d657419a",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"4465c3745c21e5333c8498927416fd0f244673dd","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{detailsRef:[{watch0:0},{watch2:0}],_id:[{watch1:0}],_descByIds:[{watch2:0}],showNoResults:[{watch3:0}],showLoading:[{watch3:0}],_options:[{watch3:0}],showSelectAll:[{watch4:0}],amountOptions:[{watch4:0},{watch5:0},{watch10:0}],multiple:[{watch4:0}],showSearch:[{watch5:0}],values:[{watch6:0}],_values:[{watch7:0},{watch10:0},{watch13:0}],selectRef:[{watch7:0},{watch8:0},{watch17:0}],validation:[{watch9:0}],options:[{watch11:0},{watch13:0}],searchValue:[{watch12:0}],_selectedOptions:[{watch14:0},{watch15:0}],selectedType:[{watch14:0}],amountText:[{watch14:0}],selectedLabels:[{watch14:0}],transformSelectedLabels:[{watch14:0}],selectAllIndeterminate:[{watch16:0}],selectAllRef:[{watch16:0}],invalidMessage:[{watch17:0}]}}};export{B as db_custom_select}
@@ -0,0 +1 @@
1
+ import{r as t,c as s,h as a}from"./p-9pYJFapZ.js";import{s as i}from"./p-BdL-nI5y.js";import{o as e,d,g as h,c}from"./p-BwBkekqp.js";const o=class{constructor(a){t(this,a),this.close=s(this,"close"),this.initialized=!1}handleClose(t,s){var a;t&&(e(t)?"Escape"===t.key&&(t.preventDefault(),this.close&&this.close.emit(t)):(s&&(t.stopPropagation(),this.close&&this.close.emit(t)),"DIALOG"===(null===(a=t.target)||void 0===a?void 0:a.nodeName)&&"click"===t.type&&"none"!==this.backdrop&&this.close&&this.close.emit(t)))}handleDialogOpen(){if(this._ref){const t=Boolean(this.open);t&&!this._ref.open&&(this.dialogContainerRef&&this.dialogContainerRef.removeAttribute("data-transition"),"absolute"===this.position||"none"===this.backdrop||"inside"===this.variant?this._ref.show():this._ref.showModal(),d((()=>{this.dialogContainerRef&&(this.dialogContainerRef.dataset.transition="open")}),1)),!t&&this._ref.open&&(this.dialogContainerRef&&(this.dialogContainerRef.dataset.transition="close"),d((()=>{var t;null===(t=this._ref)||void 0===t||t.close()}),401))}}enableAttributePassing(t,s){const a=null==t?void 0:t.closest(s);if(t&&a){const s=a.attributes;for(let i=0;i<s.length;i++){const e=s.item(i);if(e&&(e.name.startsWith("data-")||e.name.startsWith("aria-"))&&(t.setAttribute(e.name,e.value),a.removeAttribute(e.name)),e&&"class"===e.name){const s=e.value.includes("hydrated"),i=e.value.replace("hydrated","").trim(),d=t.getAttribute("class");t.setAttribute(e.name,`${d?`${d} `:""}${i}`),s?a.setAttribute("class","hydrated"):a.removeAttribute(e.name)}}}}watch0Fn(){this.handleDialogOpen()}watch0(){this.watch0Fn()}watch1Fn(){if(this._ref&&this.initialized&&"absolute"===this.position){const t=this._ref.parentElement;t&&(t.style.position="relative")}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-drawer"),this.handleDialogOpen(),this.initialized=!0,this.watch0Fn(),this.watch1Fn()}render(){var t;return a("dialog",{key:"171c5580c99bbe2d2ea0a6e8e5962e4132d9b07f",class:"db-drawer",id:this.id,ref:t=>{this._ref=t},onClick:t=>this.handleClose(t),onKeyDown:t=>this.handleClose(t),"data-position":this.position,"data-backdrop":this.backdrop,"data-direction":this.direction,"data-variant":this.variant},a("article",{key:"e9fad39beff3e642ad13be4950bb64fd15896f80",class:c("db-drawer-container",this.className),ref:t=>{this.dialogContainerRef=t},"data-spacing":this.spacing,"data-width":this.width,"data-direction":this.direction,"data-rounded":h(this.rounded)},a("header",{key:"cb9f374f26ebca0f11d02081c28e856cc87107c3",class:"db-drawer-header"},a("div",{key:"7fca8037c16e16d909bcede75e223f38ae019453",class:"db-drawer-header-text"},a("slot",{key:"85159cc4d260fa992bfe8b933920ae286b9ab09c",name:"drawerHeader"})),a("db-button",{key:"4a9ad6ba576480b154614da72752421a8ff81df6",class:"button-close-drawer",icon:"cross",variant:"ghost",id:this.closeButtonId,noText:!0,onClick:t=>this.handleClose(t,!0)},null!==(t=this.closeButtonText)&&void 0!==t?t:i)),a("div",{key:"9dbbd6a3835dad60dea79a9b2fbed6a62dd6b837",class:"db-drawer-content"},a("slot",{key:"1bc4b88266e6d7250d0075e2405b725ad38b950e"}))))}static get watchers(){return{open:[{watch0:0}],_ref:[{watch1:0}],initialized:[{watch1:0}],position:[{watch1:0}]}}};export{o as db_drawer}
@@ -284,7 +284,7 @@ const DBCustomSelect = class {
284
284
  event.preventDefault();
285
285
  }
286
286
  handleKeyboardPress(event) {
287
- var _a, _b;
287
+ var _a, _b, _c;
288
288
  event.stopPropagation();
289
289
  if (event.key === "Escape" && ((_a = this.detailsRef) === null || _a === void 0 ? void 0 : _a.open)) {
290
290
  this.handleClose(undefined, true);
@@ -299,6 +299,14 @@ const DBCustomSelect = class {
299
299
  activeElement.click();
300
300
  event.preventDefault();
301
301
  }
302
+ else if (activeElement.getAttribute("type") === "search") {
303
+ // When Enter is pressed in search field, select the first available option
304
+ const firstOption = (_c = this._options) === null || _c === void 0 ? void 0 : _c.find((opt) => !opt.isGroupTitle && !opt.disabled);
305
+ if (firstOption === null || firstOption === void 0 ? void 0 : firstOption.value) {
306
+ this.handleSelect(firstOption.value);
307
+ event.preventDefault();
308
+ }
309
+ }
302
310
  }
303
311
  }
304
312
  else if (event.key === "ArrowDown" ||
@@ -763,19 +771,19 @@ const DBCustomSelect = class {
763
771
  }
764
772
  render() {
765
773
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
766
- return (h("div", { key: 'e3c88fad9a69c3a3f55084c42eaa18dd0b328fcb', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
774
+ return (h("div", { key: '5ab3c80f3af53b7795e709feaea160e4aa26f281', class: cls("db-custom-select", this.className), id: this._id, ref: (el) => {
767
775
  this._ref = el;
768
776
  }, "aria-invalid": this._validity === "invalid", "data-custom-validity": this._validity, "data-width": this.formFieldWidth, "data-variant": this.variant === "floating" &&
769
777
  this.selectedType === "tag" &&
770
778
  this.multiple
771
779
  ? "above"
772
- : this.variant, "data-required": getBooleanAsString(this.required), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '8761c16255c8722f01008536cefbaac50677095b', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: 'd750bdd188427d5fc4e15a53d5640a7b55a360cd', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
780
+ : this.variant, "data-required": getBooleanAsString(this.required), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-placement": this.placement, "data-selected-type": this.multiple ? this.selectedType : "text", "data-hide-label": getHideProp(this.showLabel), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '281d6b75a9ae62b6e2f59c04876603988366952d', id: this._labelId }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL, h("select", { key: '26029a01c106666155c40cac98a7f67739145491', role: "none", hidden: true, id: this._selectId, tabIndex: -1, ref: (el) => {
773
781
  this.selectRef = el;
774
782
  }, form: this.form, name: this.name, multiple: getBoolean(this.multiple, "multiple"), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), onChange: (event) => this.satisfyReact(event) }, ((_b = this.options) === null || _b === void 0 ? void 0 : _b.length)
775
783
  ? (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => (h("option", { disabled: option.disabled, value: option.value, key: undefined }, this.getOptionLabel(option))))
776
- : null)), h("details", { key: '4554ef5982957f7202f0109f0d081f6dde2d078c', ref: (el) => {
784
+ : null)), h("details", { key: '60f50d851ebf3b180094bdbd1c9acb3c6e1069af', ref: (el) => {
777
785
  this.detailsRef = el;
778
- }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '3ee9982ab7ea04516f50b6ad7ba68da802e6df20' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
786
+ }, open: this.open, onToggle: (event) => this.handleDropdownToggle(event), onKeyDown: (event) => this.handleKeyboardPress(event) }, h("slot", { key: '369ba87529acc1e3b2d12869174eff0a824c0176' }), this.options ? (h(Fragment, null, h("summary", { class: "db-custom-select-form-field", id: this._summaryId, "aria-disabled": getBooleanAsString(this.disabled), "aria-labelledby": this._labelId }, ((_d = this._selectedLabels) === null || _d === void 0 ? void 0 : _d.length) ? (h("span", { "data-visually-hidden": getBooleanAsString(this.selectedType === "tag"), id: this._selectedLabelsId }, this.selectedPrefix ? (h("span", { "data-visually-hidden": "true" }, this.selectedPrefix)) : null, this._selectedLabels)) : null, this.selectedType === "tag" ? (h("div", null, (_e = this._selectedOptions) === null || _e === void 0 ? void 0 : _e.map((option, index) => (h("db-tag", { emphasis: "strong", behavior: "removable", removeButton: this.getTagRemoveLabel(option), onRemove: (event) => this.handleTagRemove(option, event), key: undefined }, this.getOptionLabel(option)))))) : null), h("db-custom-select-dropdown", { width: this.dropdownWidth }, this.searchEnabled ? (h("div", null, h("db-input", { type: "search", ref: (el) => {
779
787
  this.searchInputRef = el;
780
788
  }, name: this._id, form: this._id, showLabel: false, value: this._searchValue, label: (_f = this.searchLabel) !== null && _f !== void 0 ? _f : DEFAULT_LABEL, placeholder: (_g = this.searchPlaceholder) !== null && _g !== void 0 ? _g : this.searchLabel, ariaDescribedBy: this._hasNoOptions || this.showLoading
781
789
  ? this._infoTextId
@@ -785,7 +793,7 @@ const DBCustomSelect = class {
785
793
  this.selectAllRef = el;
786
794
  }, form: this._id, checked: this.selectAllChecked, onChange: (event) => this.handleSelectAll(event) }), this.getSelectAllLabel())))) : null, h("db-custom-select-list", { multiple: getBoolean(this.multiple, "multiple"), label: (_k = (_j = this.listLabel) !== null && _j !== void 0 ? _j : this.label) !== null && _k !== void 0 ? _k : DEFAULT_LABEL }, (_l = this._options) === null || _l === void 0 ? void 0 : _l.map((option) => (h("db-custom-select-list-item", { type: this.multiple ? "checkbox" : "radio", showDivider: option.showDivider, icon: option.icon, isGroupTitle: option.isGroupTitle, groupTitle: this.getOptionLabel(option), name: this._id, checked: this.getOptionChecked(option.value), disabled: option.disabled, value: option.value, onChange: () => this.handleSelect(option.value), key: undefined }, !option.isGroupTitle
787
795
  ? this.getOptionLabel(option)
788
- : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: '0294aea948930da94ffda5cc9c2a06439d284dca', class: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '36d6fb52fc71e38c2fae07741b489bbcad2cd1f8', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: 'bb1406432ebb877e25f5cfc2ea90a3719d0c50aa', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
796
+ : null)))))), h("div", null, h("db-button", { variant: "ghost", width: "full", icon: "cross", size: "small", name: this._id, form: this._id, onClick: () => this.handleClose(undefined, true) }, (_m = this.mobileCloseButtonText) !== null && _m !== void 0 ? _m : DEFAULT_CLOSE_BUTTON))))) : null), ((_o = this.showClearSelection) !== null && _o !== void 0 ? _o : true) && ((_p = this._values) === null || _p === void 0 ? void 0 : _p.length) ? (h("db-button", { icon: "cross", variant: "ghost", size: "small", noText: true, name: this._id, form: this._id, onClick: (event) => this.handleClearAll(event) }, this.clearSelectionText, h("db-tooltip", { placement: "top" }, this.clearSelectionText))) : null, h("span", { key: 'b4a9cebfe1db06422f428bac4d04d581bcadbb95', class: "db-custom-select-placeholder", "aria-hidden": getBooleanAsString(true), id: this._placeholderId }, (_q = this.placeholder) !== null && _q !== void 0 ? _q : this.label), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'a407a98afeecf7634770f34e2f427a09d657419a', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '4465c3745c21e5333c8498927416fd0f244673dd', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
789
797
  }
790
798
  static get watchers() { return {
791
799
  "detailsRef": [{
@@ -41,7 +41,7 @@ const DBDrawer = class {
41
41
  const open = Boolean(this.open);
42
42
  if (open && !this._ref.open) {
43
43
  if (this.dialogContainerRef) {
44
- this.dialogContainerRef.hidden = false;
44
+ this.dialogContainerRef.removeAttribute("data-transition");
45
45
  }
46
46
  if (this.position === "absolute" ||
47
47
  this.backdrop === "none" ||
@@ -51,16 +51,20 @@ const DBDrawer = class {
51
51
  else {
52
52
  this._ref.showModal();
53
53
  }
54
+ void delay(() => {
55
+ if (this.dialogContainerRef) {
56
+ this.dialogContainerRef.dataset["transition"] =
57
+ "open";
58
+ }
59
+ }, 1);
54
60
  }
55
61
  if (!open && this._ref.open) {
56
62
  if (this.dialogContainerRef) {
57
- this.dialogContainerRef.hidden = true;
63
+ this.dialogContainerRef.dataset["transition"] =
64
+ "close";
58
65
  }
59
- delay(() => {
66
+ void delay(() => {
60
67
  var _a;
61
- if (this.dialogContainerRef) {
62
- this.dialogContainerRef.hidden = false;
63
- }
64
68
  (_a = this._ref) === null || _a === void 0 ? void 0 : _a.close();
65
69
  }, 401);
66
70
  }
@@ -125,11 +129,11 @@ const DBDrawer = class {
125
129
  }
126
130
  render() {
127
131
  var _a;
128
- return (h("dialog", { key: 'bde9fb000bc000b3371ab4e7333ec0b7e802a1d5', class: "db-drawer", id: this.id, ref: (el) => {
132
+ return (h("dialog", { key: '171c5580c99bbe2d2ea0a6e8e5962e4132d9b07f', class: "db-drawer", id: this.id, ref: (el) => {
129
133
  this._ref = el;
130
- }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, h("article", { key: '62fb34f827d93c6a52e6dc79fb0970879b07dd72', class: cls("db-drawer-container", this.className), ref: (el) => {
134
+ }, onClick: (event) => this.handleClose(event), onKeyDown: (event) => this.handleClose(event), "data-position": this.position, "data-backdrop": this.backdrop, "data-direction": this.direction, "data-variant": this.variant }, h("article", { key: 'e9fad39beff3e642ad13be4950bb64fd15896f80', class: cls("db-drawer-container", this.className), ref: (el) => {
131
135
  this.dialogContainerRef = el;
132
- }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": getBooleanAsString(this.rounded) }, h("header", { key: '81567140972ebb1f244c46227f688f017b2d74da', class: "db-drawer-header" }, h("div", { key: '14fe9424f88dd71bedc5b670edf7d776639ad65f', class: "db-drawer-header-text" }, h("slot", { key: 'e8f703b2d8c81c9e64996f6c8214ae004484698c', name: "drawerHeader" })), h("db-button", { key: '7f18727c2550a75ed735d11b8983b9b6bca0f1d4', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : DEFAULT_CLOSE_BUTTON)), h("div", { key: 'e2b7f182c9f321f5477ee4669451e10935cae010', class: "db-drawer-content" }, h("slot", { key: '23bb4b8cf2c617757379637fab20361b6d4943f2' })))));
136
+ }, "data-spacing": this.spacing, "data-width": this.width, "data-direction": this.direction, "data-rounded": getBooleanAsString(this.rounded) }, h("header", { key: 'cb9f374f26ebca0f11d02081c28e856cc87107c3', class: "db-drawer-header" }, h("div", { key: '7fca8037c16e16d909bcede75e223f38ae019453', class: "db-drawer-header-text" }, h("slot", { key: '85159cc4d260fa992bfe8b933920ae286b9ab09c', name: "drawerHeader" })), h("db-button", { key: '4a9ad6ba576480b154614da72752421a8ff81df6', class: "button-close-drawer", icon: "cross", variant: "ghost", id: this.closeButtonId, noText: true, onClick: (event) => this.handleClose(event, true) }, (_a = this.closeButtonText) !== null && _a !== void 0 ? _a : DEFAULT_CLOSE_BUTTON)), h("div", { key: '9dbbd6a3835dad60dea79a9b2fbed6a62dd6b837', class: "db-drawer-content" }, h("slot", { key: '1bc4b88266e6d7250d0075e2405b725ad38b950e' })))));
133
137
  }
134
138
  static get watchers() { return {
135
139
  "open": [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@db-ux/wc-core-components",
3
- "version": "4.3.1",
3
+ "version": "4.3.2-consolidation-7549d9f",
4
4
  "description": "Stencil components for @db-ux/core-components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -48,7 +48,7 @@
48
48
  "web-types": "./dist/web-types.json",
49
49
  "customElements": "dist/custom-elements.json",
50
50
  "dependencies": {
51
- "@db-ux/core-components": "4.3.1",
52
- "@db-ux/core-foundations": "4.3.1"
51
+ "@db-ux/core-components": "4.3.2-consolidation-7549d9f",
52
+ "@db-ux/core-foundations": "4.3.2-consolidation-7549d9f"
53
53
  }
54
54
  }
@@ -1 +0,0 @@
1
- import{r as i,c as t,h as s,F as h}from"./p-9pYJFapZ.js";import{l,a as e,m as a,d as o,e as d,g as n,h as c,i as v,o as r,f as u,k as w,c as f,s as b}from"./p-BdL-nI5y.js";import{h as m,d as p,s as y,m as g,u as k,g as F,e as A,l as x,c as D}from"./p-BwBkekqp.js";import{D as C}from"./p-cqrM3KjS.js";import{D as S}from"./p-EqlW5Wqf.js";import{a as L}from"./p-G-TursYV.js";import{b as T}from"./p-Cb-k135w.js";const B=class{constructor(s){i(this,s),this.amountChange=t(this,"amountChange"),this.dropdownToggle=t(this,"dropdownToggle"),this.optionSelected=t(this,"optionSelected"),this.search=t(this,"search"),this.showClearSelection=!0,this.clearSelectionText="Clear selection",this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._selectId=void 0,this._labelId=void 0,this._summaryId=void 0,this._placeholderId=void 0,this._infoTextId=void 0,this._validity="no-validation",this._userInteraction=!1,this.abortController=void 0,this._descByIds=void 0,this._selectedLabels="",this._selectedLabelsId=void 0,this._voiceOverFallback="",this._selectedOptions=[],this.selectAllEnabled=!1,this.searchEnabled=!1,this.amountOptions=0,this._values=[],this._options=[],this._hasNoOptions=!1,this._documentClickListenerCallbackId=void 0,this._internalChangeTimestamp=0,this._documentScrollListenerCallbackId=void 0,this._observer=void 0,this._searchValue=void 0,this.selectAllChecked=!1,this.selectAllIndeterminate=!1,this.satisfyReact=function(i){i.stopPropagation()}}handleDocumentScroll(i){var t,s;(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.contains)&&(null===(s=null==i?void 0:i.target)||void 0===s?void 0:s.contains(this.detailsRef))&&this.handleAutoPlacement()}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,h,e,a,o,d;this.selectRef&&(this.selectRef.value=this.getNativeSelectValue()),(null===(i=this.selectRef)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(h=this.selectRef)||void 0===h?void 0:h.validity.valid)&&this.required?(this.setDescById(this._validMessageId),m()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:w,p((()=>this._voiceOverFallback=""),1e3)),this._validity=null!==(a=this.validation)&&void 0!==a?a:"valid"):y(this.message,this.showMessage)?(this.setDescById(this._messageId),this._validity=null!==(o=this.validation)&&void 0!==o?o:"no-validation"):(this.setDescById(this._placeholderId),this._validity=null!==(d=this.validation)&&void 0!==d?d:"no-validation"):(this.setDescById(this._invalidMessageId),this._invalidMessage=this.invalidMessage||(null===(t=this.selectRef)||void 0===t?void 0:t.validationMessage)||l,m()&&(this._voiceOverFallback=this._invalidMessage,p((()=>this._voiceOverFallback=""),1e3)),this._userInteraction&&(this._validity=null!==(s=this.validation)&&void 0!==s?s:"invalid"))}handleDropdownToggle(i){var t,s;this.dropdownToggle&&(i.stopPropagation(),this.dropdownToggle.emit(i)),i.target instanceof HTMLDetailsElement&&i.target.open?(this._documentClickListenerCallbackId=(new C).addCallback((i=>this.handleDocumentClose(i))),this._documentScrollListenerCallbackId=(new S).addCallback((i=>this.handleDocumentScroll(i))),this.handleAutoPlacement(),null===(t=this._observer)||void 0===t||t.observe(this.detailsRef),i.target.dataset.test||this.handleOpenByKeyboardFocus()):(this._documentClickListenerCallbackId&&(new C).removeCallback(this._documentClickListenerCallbackId),this._documentScrollListenerCallbackId&&(new S).removeCallback(this._documentScrollListenerCallbackId),null===(s=this._observer)||void 0===s||s.unobserve(this.detailsRef))}getNativeSelectValue(){var i,t;return(null===(i=this._values)||void 0===i?void 0:i.length)&&null!==(t=this._values.at(0))&&void 0!==t?t:""}setDescById(i){var t;const s=[];i&&s.push(i),this._selectedLabelsId&&(null===(t=this._selectedLabels)||void 0===t?void 0:t.length)&&s.push(this._selectedLabelsId),this._descByIds=s.join(" ")}getSelectAllLabel(){var i;return null!==(i=this.selectAllLabel)&&void 0!==i?i:e}getOptionLabel(i){var t,s,h;return null!==(h=null!==(t=i.label)&&void 0!==t?t:null===(s=i.value)||void 0===s?void 0:s.toString())&&void 0!==h?h:""}getOptionChecked(i){var t,s;return!(!i||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&(null===(s=this._values)||void 0===s?void 0:s.includes(i))}getTagRemoveLabel(i){const t=this.removeTagsTexts,s=this.options;if(t&&s){const h=s.findIndex((t=>t.value===i.value));if(h>=0&&h<t.length)return t[h]}return`${a} ${this.getOptionLabel(i)}`}handleTagRemove(i,t){t&&t.stopPropagation(),this.handleSelect(i.value),this.handleSummaryFocus()}handleAutoPlacement(){if(this.detailsRef){const i=this.detailsRef.querySelector("article");i&&p((()=>{var t;L(i,this.detailsRef,null!==(t=this.placement)&&void 0!==t?t:"bottom")}),1)}}handleArrowDownUp(i){var t,s,h;if(null===(t=this.detailsRef)||void 0===t?void 0:t.open){if(self.document){const t=self.document.activeElement;if(t)if("checkbox"===t.getAttribute("type")||"radio"===t.getAttribute("type")){const l=null==t?void 0:t.closest("li");if("ArrowDown"===i.key||"ArrowRight"===i.key){let i=null==l?void 0:l.nextElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.nextElementSibling}i||this.handleFocusFirstDropdownCheckbox(t)}else{let i=null==l?void 0:l.previousElementSibling;for(;i;){const t=i.querySelector("input");if(t){t.focus();break}i=i.previousElementSibling}if(!i){const i=this.detailsRef.querySelector('input[type="checkbox"]');if(i&&i!==t)this.handleFocusFirstDropdownCheckbox(t);else{const i=g(this.detailsRef);if(i)p((()=>{i.focus()}),100);else{const i=Array.from(null===(s=this.detailsRef)||void 0===s?void 0:s.querySelectorAll('input[type="checkbox"],input[type="radio"]'));i.length&&(null===(h=i.at(-1))||void 0===h||h.focus())}}}}}else"search"!==t.getAttribute("type")||"ArrowUp"!==i.key&&"ArrowLeft"!==i.key?this.handleFocusFirstDropdownCheckbox(t):(this.handleClose(void 0,!0),this.handleSummaryFocus())}}else"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(this.handleAutoPlacement(),this.detailsRef&&(this.detailsRef.open=!0),this.handleOpenByKeyboardFocus());i.stopPropagation(),i.preventDefault()}handleKeyboardPress(i){var t,s;if(i.stopPropagation(),"Escape"===i.key&&(null===(t=this.detailsRef)||void 0===t?void 0:t.open))this.handleClose(void 0,!0),this.handleSummaryFocus();else if("Enter"===i.key&&(null===(s=this.detailsRef)||void 0===s?void 0:s.open)){if(self.document){const t=self.document.activeElement;["checkbox","radio"].includes(t.getAttribute("type")||"")&&(t.click(),i.preventDefault())}}else"ArrowDown"!==i.key&&"ArrowUp"!==i.key&&"ArrowLeft"!==i.key&&"ArrowRight"!==i.key||this.handleArrowDownUp(i)}handleClose(i,t){this.detailsRef&&(t?(this.detailsRef.open=!1,this.handleSummaryFocus()):this.detailsRef.open&&i&&i.relatedTarget&&(this.detailsRef.contains(i.relatedTarget)||p((()=>this.detailsRef.open=!1),1)))}handleDocumentClose(i){var t,s;if(i){const h="number"==typeof i.detail?i.target:null===(t=i.detail)||void 0===t?void 0:t.target;(null===(s=this.detailsRef)||void 0===s?void 0:s.open)&&!this.detailsRef.contains(h)&&(this.detailsRef.open=!1)}}handleOptionSelected(i){(new Date).getTime()-this._internalChangeTimestamp<200||(this._values=i,this._userInteraction=!0,this.optionSelected&&this.optionSelected.emit(null!=i?i:[]),this._internalChangeTimestamp=(new Date).getTime())}handleSelect(i){var t;i&&(this.multiple?(null===(t=this._values)||void 0===t?void 0:t.includes(i))?this.handleOptionSelected(this._values.filter((t=>t!==i))):this.handleOptionSelected([...this._values||[],i]):(this.handleOptionSelected([i]),this.handleClose(void 0,!0)))}handleSelectAll(i){var t;if(i.stopPropagation(),(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions)this.handleOptionSelected([]);else{const i=this.searchEnabled&&this.searchInputRef?this.searchInputRef.value:void 0;this.handleOptionSelected(this.options?this.options.filter((t=>{var s;return!t.isGroupTitle&&(!i||(null===(s=t.value)||void 0===s?void 0:s.toLowerCase().includes(i.toLowerCase())))})).map((i=>{var t;return null!==(t=i.value)&&void 0!==t?t:""})):[])}}handleFocusFirstDropdownCheckbox(i){if(this.detailsRef){const t=Array.from(this.detailsRef.querySelectorAll('input[type="checkbox"],input[type="radio"]'));if(t.length){const s=t.at(0),h=s===i&&t.length>1?t.at(1):s;h&&p((()=>{h.focus()}),1)}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=g(this.detailsRef);i?p((()=>{i.focus()}),1):this.handleFocusFirstDropdownCheckbox()}}handleSearch(i){if(void 0===i)return;let t;if("string"==typeof i)t=i;else{const s=i;s.stopPropagation(),this.search&&this.search.emit(s),t=s.target.value,this._searchValue=t}this._options=this.options&&t&&0!==t.length?this.options.filter(this.searchFilter?i=>this.searchFilter(i,t):i=>!i.isGroupTitle&&this.getOptionLabel(i).toLowerCase().includes(t.toLowerCase())):this.options}handleClearAll(i){i.stopPropagation(),this.handleOptionSelected([]),this.handleSummaryFocus()}handleSummaryFocus(){var i;this.detailsRef&&(null===(i=this.detailsRef.querySelector("summary"))||void 0===i||i.focus())}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let h=0;h<t.length;h++){const l=t.item(h);if(l&&(l.name.startsWith("data-")||l.name.startsWith("aria-"))&&(i.setAttribute(l.name,l.value),s.removeAttribute(l.name)),l&&"class"===l.name){const t=l.value.includes("hydrated"),h=l.value.replace("hydrated","").trim(),e=i.getAttribute("class");i.setAttribute(l.name,`${e?`${e} `:""}${h}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(l.name)}}}}watch0Fn(){this.detailsRef&&this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}watch0(){this.watch0Fn()}watch1Fn(){if(this._id){const i=this._id+u;this._labelId=this._id+o,this._selectId=this._id+d,this._validMessageId=this._id+n,this._invalidMessageId=this._id+c,this._placeholderId=this._id+v,y(this.message,this.showMessage)?this.setDescById(i):this.setDescById()}}watch1(){this.watch1Fn()}watch2Fn(){var i;if(this.detailsRef){const t=this.detailsRef.querySelector("summary");t&&t.setAttribute("aria-describedby",null!==(i=this.ariaDescribedBy)&&void 0!==i?i:this._descByIds||"")}}watch2(){this.watch2Fn()}watch3Fn(){void 0!==this.showNoResults?this._hasNoOptions=this.showNoResults:this._options&&(this._hasNoOptions=0===this._options.length)}watch3(){this.watch3Fn()}watch4Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&(null!==(i=this.showSelectAll)&&void 0!==i?i:this.amountOptions>5))}watch4(){this.watch4Fn()}watch5Fn(){var i;this.searchEnabled=null!==(i=this.showSearch)&&void 0!==i?i:this.amountOptions>9}watch5(){this.watch5Fn()}watch6Fn(){var i;const t=this.values;Array.isArray(t)?this._values!==t&&(this._values=t):null==t&&0!==(null===(i=this._values)||void 0===i?void 0:i.length)&&(this._values=[])}watch6(){this.watch6Fn()}watch7Fn(){this.selectRef&&this.handleValidation()}watch7(){this.watch7Fn()}watch8Fn(){if(this.selectRef){let i=this.abortController;i||(i=new AbortController,this.abortController=i);const t=this.values;T(this.selectRef,(()=>{this.handleOptionSelected(t||(this.selectRef.value?[this.selectRef.value]:[])),this.handleValidation()}),i.signal)}}watch8(){this.watch8Fn()}watch9Fn(){this._validity=this.validation}watch9(){this.watch9Fn()}watch10Fn(){var i,t;0===(null===(i=this._values)||void 0===i?void 0:i.length)?(this.selectAllChecked=!1,this.selectAllIndeterminate=!1):(null===(t=this._values)||void 0===t?void 0:t.length)===this.amountOptions?(this.selectAllIndeterminate=!1,this.selectAllChecked=!0):this._values&&(this.selectAllIndeterminate=!0)}watch10(){this.watch10Fn()}watch11Fn(){var i,t;this._options=this.options,this.amountOptions=null!==(t=null===(i=this.options)||void 0===i?void 0:i.filter((i=>!i.isGroupTitle)).length)&&void 0!==t?t:0}watch11(){this.watch11Fn()}watch12Fn(){this._searchValue=this.searchValue,this.searchValue&&this.handleSearch(this.searchValue)}watch12(){this.watch12Fn()}watch13Fn(){var i,t;(null===(i=this.options)||void 0===i?void 0:i.length)&&(this._selectedOptions=null===(t=this.options)||void 0===t?void 0:t.filter((i=>{var t,s;return!(!i.value||!(null===(t=this._values)||void 0===t?void 0:t.includes))&&!i.isGroupTitle&&(null===(s=this._values)||void 0===s?void 0:s.includes(i.value))})))}watch13(){this.watch13Fn()}watch14Fn(){var i,t,s;if(this.selectedLabels)this._selectedLabels=this.selectedLabels;else if(null===(i=this._selectedOptions)||void 0===i?void 0:i.length){if(this.transformSelectedLabels)return void(this._selectedLabels=(0,this.transformSelectedLabels)(this._selectedOptions));this._selectedLabels="amount"===this.selectedType?this.amountText?this.amountText:`${null===(t=this._selectedOptions)||void 0===t?void 0:t.length} ${r}`:null===(s=this._selectedOptions)||void 0===s?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}else this._selectedLabels=""}watch14(){this.watch14Fn()}watch15Fn(){var i,t;this.amountChange&&this.amountChange.emit(null!==(t=null===(i=this._selectedOptions)||void 0===i?void 0:i.length)&&void 0!==t?t:0)}watch15(){this.watch15Fn()}watch16Fn(){this.selectAllRef&&(this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate))}watch16(){this.watch16Fn()}watch17Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this.selectRef)||void 0===i?void 0:i.validationMessage)||l}watch17(){this.watch17Fn()}componentDidLoad(){var i;this.enableAttributePassing(this._ref,"db-custom-select");const t=null!==(i=this.id)&&void 0!==i?i:`custom-select-${k()}`;this._id=t,this._messageId=t+u,this._validMessageId=t+n,this._invalidMessageId=t+c,this._selectId=t+d,this._labelId=t+o,this._summaryId=t+"-summary",this._placeholderId=t+v,this._selectedLabelsId=t+"-selected-labels",this._infoTextId=t+"-info",this._invalidMessage=this.invalidMessage||l,"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((i=>{if(this.detailsRef){const t=i.find((({target:i})=>i===this.detailsRef));t&&!t.isIntersecting&&this.detailsRef.open&&(this.detailsRef.open=!1)}}))),this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn(),this.watch5Fn(),this.watch6Fn(),this.watch7Fn(),this.watch8Fn(),this.watch9Fn(),this.watch10Fn(),this.watch11Fn(),this.watch12Fn(),this.watch13Fn(),this.watch14Fn(),this.watch15Fn(),this.watch16Fn(),this.watch17Fn()}disconnectedCallback(){var i;null===(i=this.abortController)||void 0===i||i.abort()}render(){var i,t,l,a,o,d,n,c,v,r,u,m,p,g,k;return s("div",{key:"e3c88fad9a69c3a3f55084c42eaa18dd0b328fcb",class:D("db-custom-select",this.className),id:this._id,ref:i=>{this._ref=i},"aria-invalid":"invalid"===this._validity,"data-custom-validity":this._validity,"data-width":this.formFieldWidth,"data-variant":"floating"===this.variant&&"tag"===this.selectedType&&this.multiple?"above":this.variant,"data-required":F(this.required),"data-hide-asterisk":x(this.showRequiredAsterisk),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":x(this.showLabel),"data-icon":this.icon,"data-show-icon":F(this.showIcon)},s("label",{key:"8761c16255c8722f01008536cefbaac50677095b",id:this._labelId},null!==(i=this.label)&&void 0!==i?i:e,s("select",{key:"d750bdd188427d5fc4e15a53d5640a7b55a360cd",role:"none",hidden:!0,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,multiple:A(this.multiple,"multiple"),disabled:A(this.disabled,"disabled"),required:A(this.required,"required"),onChange:i=>this.satisfyReact(i)},(null===(t=this.options)||void 0===t?void 0:t.length)?null===(l=this.options)||void 0===l?void 0:l.map((i=>s("option",{disabled:i.disabled,value:i.value,key:void 0},this.getOptionLabel(i)))):null)),s("details",{key:"4554ef5982957f7202f0109f0d081f6dde2d078c",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"3ee9982ab7ea04516f50b6ad7ba68da802e6df20"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":F(this.disabled),"aria-labelledby":this._labelId},(null===(a=this._selectedLabels)||void 0===a?void 0:a.length)?s("span",{"data-visually-hidden":F("tag"===this.selectedType),id:this._selectedLabelsId},this.selectedPrefix?s("span",{"data-visually-hidden":"true"},this.selectedPrefix):null,this._selectedLabels):null,"tag"===this.selectedType?s("div",null,null===(o=this._selectedOptions)||void 0===o?void 0:o.map((i=>s("db-tag",{emphasis:"strong",behavior:"removable",removeButton:this.getTagRemoveLabel(i),onRemove:t=>this.handleTagRemove(i,t),key:void 0},this.getOptionLabel(i))))):null),s("db-custom-select-dropdown",{width:this.dropdownWidth},this.searchEnabled?s("div",null,s("db-input",{type:"search",ref:i=>{this.searchInputRef=i},name:this._id,form:this._id,showLabel:!1,value:this._searchValue,label:null!==(d=this.searchLabel)&&void 0!==d?d:e,placeholder:null!==(n=this.searchPlaceholder)&&void 0!==n?n:this.searchLabel,ariaDescribedBy:this._hasNoOptions||this.showLoading?this._infoTextId:void 0,onInput:i=>this.handleSearch(i)})):null,this._hasNoOptions||this.showLoading?s("db-infotext",{id:this._infoTextId,icon:this.showLoading?"circular_arrows":void 0,semantic:this.showLoading?"informational":"warning"},null!==(c=this.showLoading?this.loadingText:this.noResultsText)&&void 0!==c?c:f):s(h,null,this.selectAllEnabled?s("div",null,s("div",{class:"db-checkbox db-custom-select-list-item"},s("label",null,s("input",{type:"checkbox",value:"select-all",ref:i=>{this.selectAllRef=i},form:this._id,checked:this.selectAllChecked,onChange:i=>this.handleSelectAll(i)}),this.getSelectAllLabel()))):null,s("db-custom-select-list",{multiple:A(this.multiple,"multiple"),label:null!==(r=null!==(v=this.listLabel)&&void 0!==v?v:this.label)&&void 0!==r?r:e},null===(u=this._options)||void 0===u?void 0:u.map((i=>s("db-custom-select-list-item",{type:this.multiple?"checkbox":"radio",showDivider:i.showDivider,icon:i.icon,isGroupTitle:i.isGroupTitle,groupTitle:this.getOptionLabel(i),name:this._id,checked:this.getOptionChecked(i.value),disabled:i.disabled,value:i.value,onChange:()=>this.handleSelect(i.value),key:void 0},i.isGroupTitle?null:this.getOptionLabel(i)))))),s("div",null,s("db-button",{variant:"ghost",width:"full",icon:"cross",size:"small",name:this._id,form:this._id,onClick:()=>this.handleClose(void 0,!0)},null!==(m=this.mobileCloseButtonText)&&void 0!==m?m:b)))):null),(null===(p=this.showClearSelection)||void 0===p||p)&&(null===(g=this._values)||void 0===g?void 0:g.length)?s("db-button",{icon:"cross",variant:"ghost",size:"small",noText:!0,name:this._id,form:this._id,onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"0294aea948930da94ffda5cc9c2a06439d284dca",class:"db-custom-select-placeholder","aria-hidden":F(!0),id:this._placeholderId},null!==(k=this.placeholder)&&void 0!==k?k:this.label),y(this.message,this.showMessage)?s("db-infotext",{size:"small",icon:this.messageIcon,id:this._messageId},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},this.validMessage||w):null,s("db-infotext",{key:"36d6fb52fc71e38c2fae07741b489bbcad2cd1f8",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"bb1406432ebb877e25f5cfc2ea90a3719d0c50aa","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{detailsRef:[{watch0:0},{watch2:0}],_id:[{watch1:0}],_descByIds:[{watch2:0}],showNoResults:[{watch3:0}],showLoading:[{watch3:0}],_options:[{watch3:0}],showSelectAll:[{watch4:0}],amountOptions:[{watch4:0},{watch5:0},{watch10:0}],multiple:[{watch4:0}],showSearch:[{watch5:0}],values:[{watch6:0}],_values:[{watch7:0},{watch10:0},{watch13:0}],selectRef:[{watch7:0},{watch8:0},{watch17:0}],validation:[{watch9:0}],options:[{watch11:0},{watch13:0}],searchValue:[{watch12:0}],_selectedOptions:[{watch14:0},{watch15:0}],selectedType:[{watch14:0}],amountText:[{watch14:0}],selectedLabels:[{watch14:0}],transformSelectedLabels:[{watch14:0}],selectAllIndeterminate:[{watch16:0}],selectAllRef:[{watch16:0}],invalidMessage:[{watch17:0}]}}};export{B as db_custom_select}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-9pYJFapZ.js";import{s as a}from"./p-BdL-nI5y.js";import{o as e,d,g as h,c}from"./p-BwBkekqp.js";const r=class{constructor(i){t(this,i),this.close=s(this,"close"),this.initialized=!1}handleClose(t,s){var i;t&&(e(t)?"Escape"===t.key&&(t.preventDefault(),this.close&&this.close.emit(t)):(s&&(t.stopPropagation(),this.close&&this.close.emit(t)),"DIALOG"===(null===(i=t.target)||void 0===i?void 0:i.nodeName)&&"click"===t.type&&"none"!==this.backdrop&&this.close&&this.close.emit(t)))}handleDialogOpen(){if(this._ref){const t=Boolean(this.open);t&&!this._ref.open&&(this.dialogContainerRef&&(this.dialogContainerRef.hidden=!1),"absolute"===this.position||"none"===this.backdrop||"inside"===this.variant?this._ref.show():this._ref.showModal()),!t&&this._ref.open&&(this.dialogContainerRef&&(this.dialogContainerRef.hidden=!0),d((()=>{var t;this.dialogContainerRef&&(this.dialogContainerRef.hidden=!1),null===(t=this._ref)||void 0===t||t.close()}),401))}}enableAttributePassing(t,s){const i=null==t?void 0:t.closest(s);if(t&&i){const s=i.attributes;for(let a=0;a<s.length;a++){const e=s.item(a);if(e&&(e.name.startsWith("data-")||e.name.startsWith("aria-"))&&(t.setAttribute(e.name,e.value),i.removeAttribute(e.name)),e&&"class"===e.name){const s=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),d=t.getAttribute("class");t.setAttribute(e.name,`${d?`${d} `:""}${a}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(e.name)}}}}watch0Fn(){this.handleDialogOpen()}watch0(){this.watch0Fn()}watch1Fn(){if(this._ref&&this.initialized&&"absolute"===this.position){const t=this._ref.parentElement;t&&(t.style.position="relative")}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-drawer"),this.handleDialogOpen(),this.initialized=!0,this.watch0Fn(),this.watch1Fn()}render(){var t;return i("dialog",{key:"bde9fb000bc000b3371ab4e7333ec0b7e802a1d5",class:"db-drawer",id:this.id,ref:t=>{this._ref=t},onClick:t=>this.handleClose(t),onKeyDown:t=>this.handleClose(t),"data-position":this.position,"data-backdrop":this.backdrop,"data-direction":this.direction,"data-variant":this.variant},i("article",{key:"62fb34f827d93c6a52e6dc79fb0970879b07dd72",class:c("db-drawer-container",this.className),ref:t=>{this.dialogContainerRef=t},"data-spacing":this.spacing,"data-width":this.width,"data-direction":this.direction,"data-rounded":h(this.rounded)},i("header",{key:"81567140972ebb1f244c46227f688f017b2d74da",class:"db-drawer-header"},i("div",{key:"14fe9424f88dd71bedc5b670edf7d776639ad65f",class:"db-drawer-header-text"},i("slot",{key:"e8f703b2d8c81c9e64996f6c8214ae004484698c",name:"drawerHeader"})),i("db-button",{key:"7f18727c2550a75ed735d11b8983b9b6bca0f1d4",class:"button-close-drawer",icon:"cross",variant:"ghost",id:this.closeButtonId,noText:!0,onClick:t=>this.handleClose(t,!0)},null!==(t=this.closeButtonText)&&void 0!==t?t:a)),i("div",{key:"e2b7f182c9f321f5477ee4669451e10935cae010",class:"db-drawer-content"},i("slot",{key:"23bb4b8cf2c617757379637fab20361b6d4943f2"}))))}static get watchers(){return{open:[{watch0:0}],_ref:[{watch1:0}],initialized:[{watch1:0}],position:[{watch1:0}]}}};export{r as db_drawer}