@db-ux/wc-core-components 4.5.1 → 4.5.2-agent-cli-pnpm-compatibility-ebd2994
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agent/Accordion.md +23 -0
- package/agent/AccordionItem.md +29 -0
- package/agent/Badge.md +32 -0
- package/agent/Brand.md +13 -0
- package/agent/Button.md +47 -0
- package/agent/Card.md +23 -0
- package/agent/Checkbox.md +41 -0
- package/agent/CustomSelect.md +54 -0
- package/agent/Divider.md +21 -0
- package/agent/Drawer.md +71 -0
- package/agent/Header.md +29 -0
- package/agent/Icon.md +20 -0
- package/agent/Infotext.md +25 -0
- package/agent/Input.md +48 -0
- package/agent/Link.md +52 -0
- package/agent/Navigation.md +19 -0
- package/agent/NavigationItem.md +29 -0
- package/agent/Notification.md +38 -0
- package/agent/Page.md +27 -0
- package/agent/Popover.md +52 -0
- package/agent/Radio.md +28 -0
- package/agent/Section.md +21 -0
- package/agent/Select.md +62 -0
- package/agent/Stack.md +35 -0
- package/agent/Switch.md +44 -0
- package/agent/TabItem.md +25 -0
- package/agent/Tabs.md +61 -0
- package/agent/Tag.md +41 -0
- package/agent/Textarea.md +44 -0
- package/agent/Tooltip.md +37 -0
- package/agent/_instructions.md +31 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js +3 -3
- package/dist/cjs/db-accordion.cjs.entry.js +2 -2
- package/dist/cjs/db-badge.cjs.entry.js +2 -2
- package/dist/cjs/db-brand.cjs.entry.js +2 -2
- package/dist/cjs/db-button.cjs.entry.js +2 -2
- package/dist/cjs/db-card.cjs.entry.js +3 -3
- package/dist/cjs/db-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/db-custom-button.cjs.entry.js +3 -3
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +10 -10
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +3 -3
- package/dist/cjs/db-custom-select.cjs.entry.js +6 -6
- package/dist/cjs/db-divider.cjs.entry.js +2 -2
- package/dist/cjs/db-drawer.cjs.entry.js +4 -4
- package/dist/cjs/db-header.cjs.entry.js +3 -3
- package/dist/cjs/db-icon.cjs.entry.js +2 -2
- package/dist/cjs/db-infotext.cjs.entry.js +2 -2
- package/dist/cjs/db-link.cjs.entry.js +2 -2
- package/dist/cjs/db-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/db-navigation.cjs.entry.js +3 -3
- package/dist/cjs/db-notification.cjs.entry.js +3 -3
- package/dist/cjs/db-page.cjs.entry.js +3 -3
- package/dist/cjs/db-popover.cjs.entry.js +3 -3
- package/dist/cjs/db-radio.cjs.entry.js +2 -2
- package/dist/cjs/db-section.cjs.entry.js +3 -3
- package/dist/cjs/db-select.cjs.entry.js +3 -3
- package/dist/cjs/db-stack.cjs.entry.js +3 -3
- package/dist/cjs/db-switch.cjs.entry.js +3 -3
- package/dist/cjs/db-tab-item_3.cjs.entry.js +7 -7
- package/dist/cjs/db-tabs.cjs.entry.js +3 -3
- package/dist/cjs/db-textarea.cjs.entry.js +3 -3
- package/dist/cjs/db-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/db-ux.cjs.js +2 -2
- package/dist/cjs/{index-D_vrmAD6.js → index-CSMPhlzz.js} +13 -22
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/accordion/accordion.js +1 -1
- package/dist/collection/components/accordion-item/accordion-item.js +2 -2
- package/dist/collection/components/badge/badge.js +1 -1
- package/dist/collection/components/brand/brand.js +1 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/card/card.js +2 -2
- package/dist/collection/components/checkbox/checkbox.js +2 -2
- package/dist/collection/components/custom-button/custom-button.js +2 -2
- package/dist/collection/components/custom-select/custom-select.js +5 -5
- package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +2 -2
- package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +2 -2
- package/dist/collection/components/custom-select-list/custom-select-list.js +2 -2
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +1 -1
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/drawer/drawer.js +3 -3
- package/dist/collection/components/header/header.js +2 -2
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/infotext/infotext.js +1 -1
- package/dist/collection/components/input/input.js +2 -2
- package/dist/collection/components/link/link.js +1 -1
- package/dist/collection/components/navigation/navigation.js +2 -2
- package/dist/collection/components/navigation-item/navigation-item.js +1 -1
- package/dist/collection/components/notification/notification.js +2 -2
- package/dist/collection/components/page/page.js +2 -2
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/radio/radio.js +1 -1
- package/dist/collection/components/section/section.js +2 -2
- package/dist/collection/components/select/select.js +2 -2
- package/dist/collection/components/stack/stack.js +2 -2
- package/dist/collection/components/switch/switch.js +2 -2
- package/dist/collection/components/tab-item/tab-item.js +2 -2
- package/dist/collection/components/tab-list/tab-list.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +2 -2
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tag/tag.js +2 -2
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +2 -2
- package/dist/custom-elements.json +814 -814
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/p-00df7d53.entry.js +1 -0
- package/dist/db-ux/{p-11251b99.entry.js → p-0ff173fb.entry.js} +1 -1
- package/dist/db-ux/{p-32c4a1b5.entry.js → p-1519dbbb.entry.js} +1 -1
- package/dist/db-ux/p-16281dcb.entry.js +1 -0
- package/dist/db-ux/p-2503bd4d.entry.js +1 -0
- package/dist/db-ux/p-27eb6e88.entry.js +1 -0
- package/dist/db-ux/p-2e940d2e.entry.js +1 -0
- package/dist/db-ux/p-309259be.entry.js +1 -0
- package/dist/db-ux/{p-a34d2691.entry.js → p-330e89df.entry.js} +1 -1
- package/dist/db-ux/{p-29442fd9.entry.js → p-4183b8e1.entry.js} +1 -1
- package/dist/db-ux/p-4284c37f.entry.js +1 -0
- package/dist/db-ux/p-432ceb90.entry.js +1 -0
- package/dist/db-ux/{p-ff3866f3.entry.js → p-503d5103.entry.js} +1 -1
- package/dist/db-ux/p-6cb4232d.entry.js +1 -0
- package/dist/db-ux/p-6da70f61.entry.js +1 -0
- package/dist/db-ux/{p-9fb146d1.entry.js → p-766057ea.entry.js} +1 -1
- package/dist/db-ux/{p-745ccfb8.entry.js → p-7a146dee.entry.js} +1 -1
- package/dist/db-ux/{p-e199b6f9.entry.js → p-7e274359.entry.js} +1 -1
- package/dist/db-ux/p-Bs7RfNRP.js +2 -0
- package/dist/db-ux/p-aad9c604.entry.js +1 -0
- package/dist/db-ux/p-b218b08b.entry.js +1 -0
- package/dist/db-ux/{p-043c407c.entry.js → p-beb541cc.entry.js} +1 -1
- package/dist/db-ux/{p-c6f43506.entry.js → p-bfe27311.entry.js} +1 -1
- package/dist/db-ux/{p-5028b12e.entry.js → p-cd8557dd.entry.js} +1 -1
- package/dist/db-ux/{p-1c89f0fc.entry.js → p-d2674cff.entry.js} +1 -1
- package/dist/db-ux/{p-cdfaf027.entry.js → p-d4e79c33.entry.js} +1 -1
- package/dist/db-ux/{p-3e5be44c.entry.js → p-e19f2640.entry.js} +1 -1
- package/dist/db-ux/{p-e3664354.entry.js → p-e3def528.entry.js} +1 -1
- package/dist/db-ux/p-e6b17374.entry.js +1 -0
- package/dist/db-ux/{p-587263ad.entry.js → p-ea7219af.entry.js} +1 -1
- package/dist/db-ux/{p-58f21c03.entry.js → p-fe54feb3.entry.js} +1 -1
- package/dist/db-ux/p-ffb2c6be.entry.js +1 -0
- package/dist/esm/db-accordion-item.entry.js +3 -3
- package/dist/esm/db-accordion.entry.js +2 -2
- package/dist/esm/db-badge.entry.js +2 -2
- package/dist/esm/db-brand.entry.js +2 -2
- package/dist/esm/db-button.entry.js +2 -2
- package/dist/esm/db-card.entry.js +3 -3
- package/dist/esm/db-checkbox.entry.js +3 -3
- package/dist/esm/db-custom-button.entry.js +3 -3
- package/dist/esm/db-custom-select-dropdown_5.entry.js +10 -10
- package/dist/esm/db-custom-select-form-field.entry.js +3 -3
- package/dist/esm/db-custom-select.entry.js +6 -6
- package/dist/esm/db-divider.entry.js +2 -2
- package/dist/esm/db-drawer.entry.js +4 -4
- package/dist/esm/db-header.entry.js +3 -3
- package/dist/esm/db-icon.entry.js +2 -2
- package/dist/esm/db-infotext.entry.js +2 -2
- package/dist/esm/db-link.entry.js +2 -2
- package/dist/esm/db-navigation-item.entry.js +2 -2
- package/dist/esm/db-navigation.entry.js +3 -3
- package/dist/esm/db-notification.entry.js +3 -3
- package/dist/esm/db-page.entry.js +3 -3
- package/dist/esm/db-popover.entry.js +3 -3
- package/dist/esm/db-radio.entry.js +2 -2
- package/dist/esm/db-section.entry.js +3 -3
- package/dist/esm/db-select.entry.js +3 -3
- package/dist/esm/db-stack.entry.js +3 -3
- package/dist/esm/db-switch.entry.js +3 -3
- package/dist/esm/db-tab-item_3.entry.js +7 -7
- package/dist/esm/db-tabs.entry.js +3 -3
- package/dist/esm/db-textarea.entry.js +3 -3
- package/dist/esm/db-tooltip.entry.js +3 -3
- package/dist/esm/db-ux.js +3 -3
- package/dist/esm/{index-BjIPMjCM.js → index-Bs7RfNRP.js} +13 -22
- package/dist/esm/loader.js +2 -2
- package/dist/vscode.html-custom-data.json +75 -75
- package/dist/web-types.json +130 -130
- package/package.json +4 -4
- package/agent/.gitkeep +0 -0
- package/dist/db-ux/p-0541c3c2.entry.js +0 -1
- package/dist/db-ux/p-074e4a43.entry.js +0 -1
- package/dist/db-ux/p-213bfff6.entry.js +0 -1
- package/dist/db-ux/p-2bce91e1.entry.js +0 -1
- package/dist/db-ux/p-4cda36f1.entry.js +0 -1
- package/dist/db-ux/p-4cf64cbb.entry.js +0 -1
- package/dist/db-ux/p-56af9177.entry.js +0 -1
- package/dist/db-ux/p-6b073570.entry.js +0 -1
- package/dist/db-ux/p-836f0fef.entry.js +0 -1
- package/dist/db-ux/p-9a19e197.entry.js +0 -1
- package/dist/db-ux/p-BjIPMjCM.js +0 -2
- package/dist/db-ux/p-d186aef4.entry.js +0 -1
- package/dist/db-ux/p-dceb35a8.entry.js +0 -1
- package/dist/db-ux/p-ef034bba.entry.js +0 -1
- package/dist/db-ux/p-f0bc176a.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,F as h}from"./p-BjIPMjCM.js";import{l,a as e,m as a,f as o,g as d,h as n,e as c,d as v,i as r,o as u,k as w,c as f,s as m}from"./p-BdL-nI5y.js";import{h as p,d as b,s as y,m as g,u as k,g as F,e as A,l as D,c as x}from"./p-xkoBSP8R.js";import{D as C}from"./p-D_roHmuC.js";import{D as L}from"./p-CHLgQ9vn.js";import{a as S}from"./p-DOPXnIzL.js";import{b as I}from"./p-D5mInaY7.js";const R=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),p()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:w,b((()=>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,p()&&(this._voiceOverFallback=this._invalidMessage,b((()=>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 L).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 L).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&&b((()=>{var t;S(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)b((()=>{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){if(this.detailsRef)if(t)this.detailsRef.open=!1,this.handleSummaryFocus();else if(this.detailsRef.open&&i&&i.relatedTarget){const t=i.relatedTarget;this.detailsRef.contains(t)||"dialog"===t.localName||b((()=>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&&b((()=>{h.focus()}),1)}}}handleOpenByKeyboardFocus(){if(this.detailsRef){const i=g(this.detailsRef);i?b((()=>{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())}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`custom-select-${k()}`;this._id=h,this._messageId=h+o,this._validMessageId=h+d,this._invalidMessageId=h+n,this._selectId=h+c,this._labelId=h+v,this._summaryId=h+"-summary",this._placeholderId=h+r,this._selectedLabelsId=h+"-selected-labels",this._infoTextId=h+"-info"}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&&"data-density"!==l.name&&(l.name.startsWith("data-")||l.name.startsWith("aria-")))i.setAttribute(l.name,l.value),s.removeAttribute(l.name);else if(l&&"data-density"!==l.name&&"class"!==l.name&&"style"===l.name)i.setAttribute(l.name,l.value),s.removeAttribute(l.name);else if(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(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){this.detailsRef&&this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const i=this._id+o;this._labelId=this._id+v,this._selectId=this._id+c,this._validMessageId=this._id+d,this._invalidMessageId=this._id+n,this._placeholderId=this._id+r,y(this.message,this.showMessage)?this.setDescById(i):this.setDescById()}}watch2(){this.watch2Fn()}watch3Fn(){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||"")}}watch3(){this.watch3Fn()}watch4Fn(){void 0!==this.showNoResults?this._hasNoOptions=this.showNoResults:this._options&&(this._hasNoOptions=0===this._options.length)}watch4(){this.watch4Fn()}watch5Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&(null!==(i=this.showSelectAll)&&void 0!==i?i:this.amountOptions>5))}watch5(){this.watch5Fn()}watch6Fn(){var i;this.searchEnabled=null!==(i=this.showSearch)&&void 0!==i?i:this.amountOptions>9}watch6(){this.watch6Fn()}watch7Fn(){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=[])}watch7(){this.watch7Fn()}watch8Fn(){this.selectRef&&this.handleValidation()}watch8(){this.watch8Fn()}watch9Fn(){if(this.selectRef){let i=this.abortController;i||(i=new AbortController,this.abortController=i);const t=this.values;I(this.selectRef,(()=>{this.handleOptionSelected(t||(this.selectRef.value?[this.selectRef.value]:[])),this.handleValidation()}),i.signal)}}watch9(){this.watch9Fn()}watch10Fn(){this._validity=this.validation}watch10(){this.watch10Fn()}watch11Fn(){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)}watch11(){this.watch11Fn()}watch12Fn(){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}watch12(){this.watch12Fn()}watch13Fn(){this._searchValue=this.searchValue,this.searchValue&&this.handleSearch(this.searchValue)}watch13(){this.watch13Fn()}watch14Fn(){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))})))}watch14(){this.watch14Fn()}watch15Fn(){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} ${u}`:null===(s=this._selectedOptions)||void 0===s?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}else this._selectedLabels=""}watch15(){this.watch15Fn()}watch16Fn(){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)}watch16(){this.watch16Fn()}watch17Fn(){this.selectAllRef&&(this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate))}watch17(){this.watch17Fn()}watch18Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this.selectRef)||void 0===i?void 0:i.validationMessage)||l}watch18(){this.watch18Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-custom-select"),this.resetIds(),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(),this.watch18Fn()}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,p,b,g,k;return s("div",{key:"04344ea736f4311c09459970f6c743516c0a45ba",class:x("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":D(this.showRequiredAsterisk),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":D(this.showLabel),"data-icon":this.icon,"data-show-icon":F(this.showIcon)},s("label",{key:"ed856ad29b0f840ebe37c8edf275267efc780f2c",id:this._labelId},null!==(i=this.label)&&void 0!==i?i:e,s("select",{key:"093be2cd13041a45a95664e083125f5e4e8c2689",role:"none",hidden:!0,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,"data-custom-validity":this._validity,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:"e0617c55fb94a72432719b485d922d87cca58d40",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"4a4754177ce637816734d8e195d1d34b0e4a9707"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":F(this.disabled),tabIndex:this.disabled?-1:void 0,"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!==(p=this.mobileCloseButtonText)&&void 0!==p?p:m)))):null),(null===(b=this.showClearSelection)||void 0===b||b)&&(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,disabled:A(this.disabled,"disabled"),onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"ea3f5751609a4383f9d381cfbc7947a4b0192880",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:"d8733256a74ba4876d4080a27798f01264d6472d",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"4ca046467d7da79ac48f0e1dddf2712ef2a93074","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],detailsRef:[{watch1:0},{watch3:0}],_id:[{watch2:0}],_descByIds:[{watch3:0}],showNoResults:[{watch4:0}],showLoading:[{watch4:0}],_options:[{watch4:0}],showSelectAll:[{watch5:0}],amountOptions:[{watch5:0},{watch6:0},{watch11:0}],multiple:[{watch5:0}],showSearch:[{watch6:0}],values:[{watch7:0}],_values:[{watch8:0},{watch11:0},{watch14:0}],selectRef:[{watch8:0},{watch9:0},{watch18:0}],validation:[{watch10:0}],options:[{watch12:0},{watch14:0}],searchValue:[{watch13:0}],_selectedOptions:[{watch15:0},{watch16:0}],selectedType:[{watch15:0}],amountText:[{watch15:0}],selectedLabels:[{watch15:0}],transformSelectedLabels:[{watch15:0}],selectAllIndeterminate:[{watch17:0}],selectAllRef:[{watch17:0}],invalidMessage:[{watch18:0}]}}};export{R as db_custom_select}
|
|
1
|
+
import{r as i,c as t,h as s,F as h}from"./p-Bs7RfNRP.js";import{l,a as e,m as o,f as a,g as d,h as n,e as c,d as v,i as r,o as u,k as w,c as f,s as m}from"./p-BdL-nI5y.js";import{h as b,d as p,s as y,m as g,u as k,g as F,e as A,l as D,c as x}from"./p-xkoBSP8R.js";import{D as C}from"./p-D_roHmuC.js";import{D as L}from"./p-CHLgQ9vn.js";import{a as S}from"./p-DOPXnIzL.js";import{b as R}from"./p-D5mInaY7.js";const I=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,o,a,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),b()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:w,p((()=>this._voiceOverFallback=""),1e3)),this._validity=null!==(o=this.validation)&&void 0!==o?o:"valid"):y(this.message,this.showMessage)?(this.setDescById(this._messageId),this._validity=null!==(a=this.validation)&&void 0!==a?a:"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,b()&&(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 L).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 L).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`${o} ${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;S(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){if(this.detailsRef)if(t)this.detailsRef.open=!1,this.handleSummaryFocus();else if(this.detailsRef.open&&i&&i.relatedTarget){const t=i.relatedTarget;this.detailsRef.contains(t)||"dialog"===t.localName||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())}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`custom-select-${k()}`;this._id=h,this._messageId=h+a,this._validMessageId=h+d,this._invalidMessageId=h+n,this._selectId=h+c,this._labelId=h+v,this._summaryId=h+"-summary",this._placeholderId=h+r,this._selectedLabelsId=h+"-selected-labels",this._infoTextId=h+"-info"}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&&"data-density"!==l.name&&(l.name.startsWith("data-")||l.name.startsWith("aria-")))i.setAttribute(l.name,l.value),s.removeAttribute(l.name);else if(l&&"data-density"!==l.name&&"class"!==l.name&&"style"===l.name)i.setAttribute(l.name,l.value),s.removeAttribute(l.name);else if(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(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){this.detailsRef&&this.detailsRef.addEventListener("focusout",(i=>this.handleClose(i)))}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const i=this._id+a;this._labelId=this._id+v,this._selectId=this._id+c,this._validMessageId=this._id+d,this._invalidMessageId=this._id+n,this._placeholderId=this._id+r,y(this.message,this.showMessage)?this.setDescById(i):this.setDescById()}}watch2(){this.watch2Fn()}watch3Fn(){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||"")}}watch3(){this.watch3Fn()}watch4Fn(){void 0!==this.showNoResults?this._hasNoOptions=this.showNoResults:this._options&&(this._hasNoOptions=0===this._options.length)}watch4(){this.watch4Fn()}watch5Fn(){var i;this.selectAllEnabled=Boolean(this.multiple&&(null!==(i=this.showSelectAll)&&void 0!==i?i:this.amountOptions>5))}watch5(){this.watch5Fn()}watch6Fn(){var i;this.searchEnabled=null!==(i=this.showSearch)&&void 0!==i?i:this.amountOptions>9}watch6(){this.watch6Fn()}watch7Fn(){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=[])}watch7(){this.watch7Fn()}watch8Fn(){this.selectRef&&this.handleValidation()}watch8(){this.watch8Fn()}watch9Fn(){if(this.selectRef){let i=this.abortController;i||(i=new AbortController,this.abortController=i);const t=this.values;R(this.selectRef,(()=>{this.handleOptionSelected(t||(this.selectRef.value?[this.selectRef.value]:[])),this.handleValidation()}),i.signal)}}watch9(){this.watch9Fn()}watch10Fn(){this._validity=this.validation}watch10(){this.watch10Fn()}watch11Fn(){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)}watch11(){this.watch11Fn()}watch12Fn(){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}watch12(){this.watch12Fn()}watch13Fn(){this._searchValue=this.searchValue,this.searchValue&&this.handleSearch(this.searchValue)}watch13(){this.watch13Fn()}watch14Fn(){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))})))}watch14(){this.watch14Fn()}watch15Fn(){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} ${u}`:null===(s=this._selectedOptions)||void 0===s?void 0:s.map((i=>this.getOptionLabel(i))).join(", ")}else this._selectedLabels=""}watch15(){this.watch15Fn()}watch16Fn(){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)}watch16(){this.watch16Fn()}watch17Fn(){this.selectAllRef&&(this.selectAllRef.indeterminate=Boolean(this.selectAllIndeterminate))}watch17(){this.watch17Fn()}watch18Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this.selectRef)||void 0===i?void 0:i.validationMessage)||l}watch18(){this.watch18Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-custom-select"),this.resetIds(),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(),this.watch18Fn()}disconnectedCallback(){var i;null===(i=this.abortController)||void 0===i||i.abort()}render(){var i,t,l,o,a,d,n,c,v,r,u,b,p,g,k;return s("div",{key:"6b471474ff49cc517d9b38563e20c606be62f953",class:x("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":D(this.showRequiredAsterisk),"data-placement":this.placement,"data-selected-type":this.multiple?this.selectedType:"text","data-hide-label":D(this.showLabel),"data-icon":this.icon,"data-show-icon":F(this.showIcon)},s("label",{key:"3ef26415dcc096b3e6efe890e524ed246de35572",id:this._labelId},null!==(i=this.label)&&void 0!==i?i:e,s("select",{key:"b2f36831945d7207a7b796099d7f3623575c67e0",role:"none",hidden:!0,id:this._selectId,tabIndex:-1,ref:i=>{this.selectRef=i},form:this.form,name:this.name,"data-custom-validity":this._validity,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:"3eb356e05c4a347920276f91c270ae608c4520ac",ref:i=>{this.detailsRef=i},open:this.open,onToggle:i=>this.handleDropdownToggle(i),onKeyDown:i=>this.handleKeyboardPress(i)},s("slot",{key:"c346a6ec5361e4460563a34d3829d80b75430734"}),this.options?s(h,null,s("summary",{class:"db-custom-select-form-field",id:this._summaryId,"aria-disabled":F(this.disabled),tabIndex:this.disabled?-1:void 0,"aria-labelledby":this._labelId},(null===(o=this._selectedLabels)||void 0===o?void 0:o.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===(a=this._selectedOptions)||void 0===a?void 0:a.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!==(b=this.mobileCloseButtonText)&&void 0!==b?b:m)))):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,disabled:A(this.disabled,"disabled"),onClick:i=>this.handleClearAll(i)},this.clearSelectionText,s("db-tooltip",{placement:"top"},this.clearSelectionText)):null,s("span",{key:"11458df4b503351732e076869349d31904a87a9e",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:"02561fdca7f4a4258e10121f3fb15edcdf84e451",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"c9bca925e70f1903fc0fe7e1bd411efb349a5f0d","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],detailsRef:[{watch1:0},{watch3:0}],_id:[{watch2:0}],_descByIds:[{watch3:0}],showNoResults:[{watch4:0}],showLoading:[{watch4:0}],_options:[{watch4:0}],showSelectAll:[{watch5:0}],amountOptions:[{watch5:0},{watch6:0},{watch11:0}],multiple:[{watch5:0}],showSearch:[{watch6:0}],values:[{watch7:0}],_values:[{watch8:0},{watch11:0},{watch14:0}],selectRef:[{watch8:0},{watch9:0},{watch18:0}],validation:[{watch10:0}],options:[{watch12:0},{watch14:0}],searchValue:[{watch13:0}],_selectedOptions:[{watch15:0},{watch16:0}],selectedType:[{watch15:0}],amountText:[{watch15:0}],selectedLabels:[{watch15:0}],transformSelectedLabels:[{watch15:0}],selectAllIndeterminate:[{watch17:0}],selectAllRef:[{watch17:0}],invalidMessage:[{watch18:0}]}}};export{I as db_custom_select}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-Bs7RfNRP.js";import{g as a,e,c as d}from"./p-xkoBSP8R.js";const h=class{constructor(i){t(this,i),this.change=s(this,"change"),this._selected=!1,this._name=void 0,this.initialized=!1,this._listenerAdded=!1,this.boundSetSelectedOnChange=void 0}setSelectedOnChange(t){t.stopPropagation(),this._selected=a(t.target===this._ref)}handleNameAttribute(){if(this._ref){const t=this._ref.setAttribute;this._ref.setAttribute=(s,i)=>{t.call(this._ref,s,i),"name"===s&&(this._name=i)}}}handleChange(t){this.change&&this.change.emit(t)}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&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"data-density"!==e.name&&"class"!==e.name&&"style"===e.name)t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(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(){var t;this._ref&&this.initialized&&this.boundSetSelectedOnChange&&(this.initialized=!1,this._listenerAdded||(null===(t=this._ref.closest("[role=tablist]"))||void 0===t||t.addEventListener("change",this.boundSetSelectedOnChange),this._listenerAdded=!0),(this.active||this._ref.checked)&&(this._selected=a(!0),this._ref.click()))}watch0(){this.watch0Fn()}watch1Fn(){this.name&&(this._name=this.name)}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-tab-item"),this.boundSetSelectedOnChange=this.setSelectedOnChange.bind(this),this.initialized=!0,this.watch0Fn(),this.watch1Fn()}disconnectedCallback(){var t;this._listenerAdded&&this._ref&&this.boundSetSelectedOnChange&&(null===(t=this._ref.closest("[role=tablist]"))||void 0===t||t.removeEventListener("change",this.boundSetSelectedOnChange),this._listenerAdded=!1)}render(){var t,s,h,l,n,c;return i("li",{key:"aa5a73d9a5f1482623ebdb8a79846b478ecf9fd1",class:d("db-tab-item",this.className),role:"none"},i("label",{key:"b6148c23f64ffd2d9153db7e8e3d39a90f009da3",htmlFor:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-icon":null!==(h=this.iconLeading)&&void 0!==h?h:this.icon,"data-icon-trailing":this.iconTrailing,"data-show-icon":a(null!==(l=this.showIconLeading)&&void 0!==l?l:this.showIcon),"data-show-icon-trailing":a(this.showIconTrailing),"data-no-text":a(this.noText)},i("input",{key:"c7d167364eaa4f9cee156d9260553b14d60ffb13",type:"radio",role:"tab",disabled:e(this.disabled,"disabled"),"aria-selected":this._selected,checked:e(this.checked,"checked"),ref:t=>{this._ref=t},name:this._name,id:null!==(n=this.id)&&void 0!==n?n:null===(c=this.propOverrides)||void 0===c?void 0:c.id,onInput:t=>this.handleChange(t)}),this.label?this.label:null,i("slot",{key:"aab78a92118a8ea9b7ffcb446ead8211294a6e6c"})))}static get watchers(){return{_ref:[{watch0:0}],initialized:[{watch0:0}],boundSetSelectedOnChange:[{watch0:0}],name:[{watch1:0}]}}},l=class{constructor(s){t(this,s)}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&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"data-density"!==e.name&&"class"!==e.name&&"style"===e.name)t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(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)}}}}componentDidLoad(){this.enableAttributePassing(this._ref,"db-tab-list")}render(){var t,s;return i("div",{key:"9d2121250cb2a12971ea33774d8ff9e79117d18e",class:d("db-tab-list",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},i("ul",{key:"db93a3777f11ee39e15633b0b5ae501b0526d73d",role:"tablist"},i("slot",{key:"14d45a6c1693c5c2bdb2d422397e6ddeb93bf5b3"})))}},n=class{constructor(s){t(this,s)}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&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"data-density"!==e.name&&"class"!==e.name&&"style"===e.name)t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(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)}}}}componentDidLoad(){this.enableAttributePassing(this._ref,"db-tab-panel")}render(){var t,s;return i("section",{key:"3cae700e240af4818416120b8c85fc91839c7fa1",class:d("db-tab-panel",this.className),role:"tabpanel",ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id},this.content?this.content:null,i("slot",{key:"25595de165921a31119ffd785bd5c569c42fa557"}))}};export{h as db_tab_item,l as db_tab_list,n as db_tab_panel}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s}from"./p-Bs7RfNRP.js";import{l as h,f as a,g as d,h as e,k as l}from"./p-BdL-nI5y.js";import{h as o,d as n,s as c,u as r,e as v,l as u,g as f,c as w}from"./p-xkoBSP8R.js";import{a as b}from"./p-D5mInaY7.js";const m=class{constructor(s){i(this,s),this.change=t(this,"change"),this.blur=t(this,"blur"),this.focus=t(this,"focus"),this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._descByIds=void 0,this._voiceOverFallback="",this.abortController=void 0}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,a,d,e;return(null===(t=null===(i=this._ref)||void 0===i?void 0:i.validity)||void 0===t?void 0:t.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(d=null===(a=this._ref)||void 0===a?void 0:a.validity)||void 0===d?void 0:d.valid)&&this.required?(this._descByIds=this._validMessageId,void(o()&&(this._voiceOverFallback=null!==(e=this.validMessage)&&void 0!==e?e:l,n((()=>{this._voiceOverFallback=""}),1e3)))):void(this._descByIds=c(this.message,this.showMessage)?this._messageId:void 0):(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(s=this._ref)||void 0===s?void 0:s.validationMessage)||h,void(o()&&(this._voiceOverFallback=this._invalidMessage||h,n((()=>{this._voiceOverFallback=""}),1e3))))}handleChange(i,t){this.change&&this.change.emit(i),this.handleValidation()}handleBlur(i){this.blur&&this.blur.emit(i)}handleFocus(i){this.focus&&this.focus.emit(i)}handleKeyDown(i){var t;"Enter"===i.key&&(i.preventDefault(),this.disabled||null===(t=this._ref)||void 0===t||t.click())}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`switch-${r()}`;this._id=h,this._messageId=`${h}${a}`,this._validMessageId=`${h}${d}`,this._invalidMessageId=`${h}${e}`}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 a=t.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))i.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"data-density"!==a.name&&"class"!==a.name&&"style"===a.name)i.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const t=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),d=i.getAttribute("class");i.setAttribute(a.name,`${d?`${d} `:""}${h}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){this.handleValidation()}watch1(){this.watch1Fn()}watch2Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||h}watch2(){this.watch2Fn()}watch3Fn(){if(this._ref){const i=void 0;let t=this.abortController;t||(t=new AbortController,this.abortController=t),b(this._ref,{checked:this.checked,defaultChecked:i},(i=>{this.handleChange(i,!0)}),t.signal)}}watch3(){this.watch3Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-switch"),this.resetIds(),this.handleValidation(),this._invalidMessage=this.invalidMessage||h,this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn()}disconnectedCallback(){var i;null===(i=this.abortController)||void 0===i||i.abort()}render(){var i,t;return s("div",{key:"5d55932625984fa62f0ee9d86f3d89f5b63f9072",class:w("db-switch",this.className),"data-visual-aid":f(this.visualAid),"data-size":this.size,"data-hide-label":u(this.showLabel),"data-variant":this.variant,"data-hide-asterisk":u(this.showRequiredAsterisk),"data-custom-validity":this.validation},s("label",{key:"711ab3c882dbd490e19400ecf5d926f5bf80e95e",htmlFor:this._id},s("input",{key:"aa50031870b7ee76e1f1e6f9bd5dd14b9013de18",type:"checkbox",role:"switch",id:this._id,ref:i=>{this._ref=i},checked:v(this.checked,"checked"),value:this.value,disabled:v(this.disabled,"disabled"),"aria-invalid":"invalid"===this.validation?"true":void 0,"aria-describedby":this._descByIds,name:this.name,required:v(this.required,"required"),"data-aid-icon":null!==(i=this.iconLeading)&&void 0!==i?i:this.icon,"data-aid-icon-trailing":this.iconTrailing,onChange:i=>this.handleChange(i),onBlur:i=>this.handleBlur(i),onFocus:i=>this.handleFocus(i),onKeyDown:i=>this.handleKeyDown(i)}),this.label?this.label:s("slot",null)),c(this.message,this.showMessage)?s("db-infotext",{size:"small",semantic:"adaptive",id:this._messageId,icon:this.messageIcon},this.message):null,this.hasValidState()?s("db-infotext",{size:"small",semantic:"successful",id:this._validMessageId},null!==(t=this.validMessage)&&void 0!==t?t:l):null,s("db-infotext",{key:"95f846f3de48f29bef0406c3c19d0314a2a0cfc6",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"297a64a0c5b5faf97a3f685ab78eea7145fe700e","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],validation:[{watch1:0}],required:[{watch1:0}],message:[{watch1:0}],showMessage:[{watch1:0}],validMessage:[{watch1:0}],invalidMessage:[{watch1:0},{watch2:0}],checked:[{watch1:0}],_ref:[{watch2:0},{watch3:0}]}}};export{m as db_switch}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-
|
|
1
|
+
import{r as t,h as i}from"./p-Bs7RfNRP.js";import{u as s,c as a}from"./p-xkoBSP8R.js";const h=class{constructor(i){t(this,i),this._name="",this.initialized=!1,this._initOpenIndexDone=!1}convertItems(){try{return"string"==typeof this.items?JSON.parse(this.items):this.items}catch(t){console.error(t)}return[]}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let a=0;a<i.length;a++){const h=i.item(a);if(h&&"data-density"!==h.name&&(h.name.startsWith("data-")||h.name.startsWith("aria-")))t.setAttribute(h.name,h.value),s.removeAttribute(h.name);else if(h&&"data-density"!==h.name&&"class"!==h.name&&"style"===h.name)t.setAttribute(h.name,h.value),s.removeAttribute(h.name);else if(h&&"class"===h.name){const i=h.value.includes("hydrated"),a=h.value.replace("hydrated","").trim(),e=t.getAttribute("class");t.setAttribute(h.name,`${e?`${e} `:""}${a}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(h.name)}}}}watch0Fn(){this.initialized&&("single"===this.behavior?this.name?this._name!==this.name&&(this._name=this.name):this._name=`accordion-${s()}`:this._name="")}watch0(){this.watch0Fn()}watch1Fn(){var t;if(this._ref){const i=this._ref.getElementsByTagName("details");if(i)for(const s of Array.from(i))""===this._name?s.removeAttribute("name"):s.name=null!==(t=this._name)&&void 0!==t?t:""}}watch1(){this.watch1Fn()}watch2Fn(){if(this._ref&&this._initOpenIndexDone){if(this.initOpenIndex&&this.initOpenIndex.length>0){const t=this._ref.getElementsByTagName("details");if(t){const i="single"===this.behavior&&this.initOpenIndex.length>1?[this.initOpenIndex[0]]:this.initOpenIndex;Array.from(t).forEach(((t,s)=>{(null==i?void 0:i.includes(s))&&(t.open=!0)}))}}this._initOpenIndexDone=!1}}watch2(){this.watch2Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-accordion"),this.initialized=!0,this._initOpenIndexDone=!0,this.watch0Fn(),this.watch1Fn(),this.watch2Fn()}render(){var t,s,h;return i("ul",{key:"ea919e6fa79f820a40ece5ee3305dad84f113d1d",class:a("db-accordion",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(s=this.propOverrides)||void 0===s?void 0:s.id,"data-variant":this.variant},this.items?null:i("slot",null),this.items?null===(h=this.convertItems())||void 0===h?void 0:h.map(((t,s)=>i("db-accordion-item",{key:`accordion-item-${s}`,headlinePlain:t.headlinePlain,disabled:t.disabled,text:t.text}))):null)}static get watchers(){return{initialized:[{watch0:0}],name:[{watch0:0}],behavior:[{watch0:0}],_ref:[{watch1:0},{watch2:0}],_name:[{watch1:0}],_initOpenIndexDone:[{watch2:0}],initOpenIndex:[{watch2:0}]}}};export{h as db_accordion}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s}from"./p-Bs7RfNRP.js";import{l as h,f as a,g as d,h as e,k as l,b as n,r as o,a as c}from"./p-BdL-nI5y.js";import{h as r,d as v,s as u,u as f,f as b,e as m,l as w,c as p}from"./p-xkoBSP8R.js";import{c as y}from"./p-D5mInaY7.js";const x=class{constructor(s){i(this,s),this.input=t(this,"input"),this.change=t(this,"change"),this.blur=t(this,"blur"),this.focus=t(this,"focus"),this._id=void 0,this._messageId=void 0,this._validMessageId=void 0,this._invalidMessageId=void 0,this._invalidMessage=void 0,this._descByIds=void 0,this._value="",this._voiceOverFallback="",this.abortController=void 0}hasValidState(){var i;return!!(null!==(i=this.validMessage)&&void 0!==i?i:"valid"===this.validation)}handleValidation(){var i,t,s,a;(null===(i=this._ref)||void 0===i?void 0:i.validity.valid)&&"invalid"!==this.validation?this.hasValidState()&&(null===(s=this._ref)||void 0===s?void 0:s.validity.valid)&&(this.required||this.minLength||this.maxLength)?(this._descByIds=this._validMessageId,r()&&(this._voiceOverFallback=null!==(a=this.validMessage)&&void 0!==a?a:l,v((()=>this._voiceOverFallback=""),1e3))):this._descByIds=u(this.message,this.showMessage)?this._messageId:void 0:(this._descByIds=this._invalidMessageId,this._invalidMessage=this.invalidMessage||(null===(t=this._ref)||void 0===t?void 0:t.validationMessage)||h,r()&&(this._voiceOverFallback=this._invalidMessage,v((()=>this._voiceOverFallback=""),1e3)))}handleInput(i,t){this.input&&this.input.emit(i),this.handleValidation()}handleChange(i,t){this.change&&this.change.emit(i),this.handleValidation()}handleBlur(i){this.blur&&this.blur.emit(i)}handleFocus(i){this.focus&&this.focus.emit(i)}resetIds(){var i,t,s;const h=null!==(s=null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&void 0!==s?s:`textarea-${f()}`;this._id=h,this._messageId=h+a,this._validMessageId=h+d,this._invalidMessageId=h+e}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 a=t.item(h);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))i.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"data-density"!==a.name&&"class"!==a.name&&"style"===a.name)i.setAttribute(a.name,a.value),s.removeAttribute(a.name);else if(a&&"class"===a.name){const t=a.value.includes("hydrated"),h=a.value.replace("hydrated","").trim(),d=i.getAttribute("class");i.setAttribute(a.name,`${d?`${d} `:""}${h}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(a.name)}}}}watch0Fn(){var i,t;(null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id)&&this.resetIds()}watch0(){this.watch0Fn()}watch1Fn(){var i;this._invalidMessage=this.invalidMessage||(null===(i=this._ref)||void 0===i?void 0:i.validationMessage)||h}watch1(){this.watch1Fn()}watch2Fn(){if(this._id){const i=this._id+a;this._messageId=i,this._validMessageId=this._id+d,this._invalidMessageId=this._id+e,u(this.message,this.showMessage)&&(this._descByIds=i),this.handleValidation()}}watch2(){this.watch2Fn()}watch3Fn(){void 0!==this.value&&(this._value=this.value)}watch3(){this.watch3Fn()}watch4Fn(){if(this._ref){const i=void 0;let t=this.abortController;t||(t=new AbortController,this.abortController=t),y(this._ref,{value:this.value,defaultValue:i},(i=>{this.handleChange(i,!0),this.handleInput(i,!0)}),t.signal)}}watch4(){this.watch4Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-textarea"),this.resetIds(),this._invalidMessage=this.invalidMessage||h,this.watch0Fn(),this.watch1Fn(),this.watch2Fn(),this.watch3Fn(),this.watch4Fn()}disconnectedCallback(){var i;null===(i=this.abortController)||void 0===i||i.abort()}render(){var i,t,h,a,d;return s("div",{key:"393d0c53d9c4566418ac057d776c17b3f17c32aa",class:p("db-textarea",this.className),"data-variant":this.variant,"data-hide-asterisk":w(this.showRequiredAsterisk),"data-hide-label":w(this.showLabel)},s("label",{key:"a899bcdffbffcdeef71bd1a62c4d0e3d5e4bbecc",htmlFor:this._id},null!==(i=this.label)&&void 0!==i?i:c),s("textarea",{key:"e21b1f05254885af4ff600ad4ffeb691040074d1","aria-invalid":"invalid"===this.validation,"data-custom-validity":this.validation,"data-field-sizing":this.fieldSizing,ref:i=>{this._ref=i},id:this._id,"data-resize":this.resize,"data-hide-resizer":w(null===(t=this.showResizer)||void 0===t||t),disabled:m(this.disabled,"disabled"),required:m(this.required,"required"),readOnly:m(this.readOnly,"readOnly")||m(this.readonly,"readonly"),form:this.form,maxLength:b(this.maxLength,this.maxlength),minLength:b(this.minLength,this.minlength),name:this.name,wrap:this.wrap,spellcheck:this.spellCheck,autocomplete:this.autocomplete,onInput:i=>this.handleInput(i),onChange:i=>this.handleChange(i),onBlur:i=>this.handleBlur(i),onFocus:i=>this.handleFocus(i),value:null!==(h=this.value)&&void 0!==h?h:this._value,"aria-describedby":null!==(a=this.ariaDescribedBy)&&void 0!==a?a:this._descByIds,placeholder:null!==(d=this.placeholder)&&void 0!==d?d:n,rows:b(this.rows,o),cols:b(this.cols)}),u(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||l):null,s("db-infotext",{key:"9067bf72dc0406d8fa9365d57f6289aabdccc507",size:"small",semantic:"critical",id:this._invalidMessageId},this._invalidMessage),s("span",{key:"85655aea65cece93bbc6fbc5d50b8849548a4365","data-visually-hidden":"true",role:"status"},this._voiceOverFallback))}static get watchers(){return{id:[{watch0:0}],"propOverrides?.id":[{watch0:0}],_ref:[{watch1:0},{watch4:0}],invalidMessage:[{watch1:0}],_id:[{watch2:0}],value:[{watch3:0}]}}};export{x as db_textarea}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as s}from"./p-
|
|
1
|
+
import{r as t,h as s}from"./p-Bs7RfNRP.js";import{a}from"./p-BdL-nI5y.js";import{g as i,c as e}from"./p-xkoBSP8R.js";const d=class{constructor(s){t(this,s),this.initialized=!1}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&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))t.setAttribute(e.name,e.value),a.removeAttribute(e.name);else if(e&&"data-density"!==e.name&&"class"!==e.name&&"style"===e.name)t.setAttribute(e.name,e.value),a.removeAttribute(e.name);else if(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(){var t;if(this._ref&&this.initialized&&(null===(t=this.placement)||void 0===t?void 0:t.startsWith("corner"))){let t=this._ref.parentElement;t&&t.localName.includes("badge")&&(t=t.parentElement),t&&(t.dataset.hasBadge="true")}}watch0(){this.watch0Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-badge"),this.initialized=!0,this.watch0Fn()}render(){var t,d,h,r;return s("span",{key:"285ff83ac5c79c7e1c6328aba89e1825f57dd78a",class:e("db-badge",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(d=this.propOverrides)||void 0===d?void 0:d.id,"data-semantic":this.semantic,"data-size":this.size,"data-emphasis":this.emphasis,"data-placement":this.placement,"data-wrap":i(this.wrap),"data-label":(null===(h=this.placement)||void 0===h?void 0:h.startsWith("corner"))&&(null!==(r=this.label)&&void 0!==r?r:a)},this.text?this.text:s("slot",null))}static get watchers(){return{_ref:[{watch0:0}],initialized:[{watch0:0}]}}};export{d as db_badge}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,h as t}from"./p-
|
|
1
|
+
import{r as s,h as t}from"./p-Bs7RfNRP.js";import{c as i}from"./p-xkoBSP8R.js";const a=class{constructor(t){s(this,t)}enableAttributePassing(s,t){const i=null==s?void 0:s.closest(t);if(s&&i){const t=i.attributes;for(let a=0;a<t.length;a++){const d=t.item(a);if(d&&"data-density"!==d.name&&(d.name.startsWith("data-")||d.name.startsWith("aria-")))s.setAttribute(d.name,d.value),i.removeAttribute(d.name);else if(d&&"data-density"!==d.name&&"class"!==d.name&&"style"===d.name)s.setAttribute(d.name,d.value),i.removeAttribute(d.name);else if(d&&"class"===d.name){const t=d.value.includes("hydrated"),a=d.value.replace("hydrated","").trim(),e=s.getAttribute("class");s.setAttribute(d.name,`${e?`${e} `:""}${a}`),t?i.setAttribute("class","hydrated"):i.removeAttribute(d.name)}}}}componentDidLoad(){this.enableAttributePassing(this._ref,"db-divider")}render(){var s,a;return t("div",{key:"6085ef73845be698561795af1a69cee864b31b7d",class:i("db-divider",this.className),ref:s=>{this._ref=s},id:null!==(s=this.id)&&void 0!==s?s:null===(a=this.propOverrides)||void 0===a?void 0:a.id,"data-margin":this.margin,"data-variant":this.variant,"data-emphasis":this.emphasis,"data-width":this.width})}};export{a as db_divider}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,h as t}from"./p-Bs7RfNRP.js";import{c as a}from"./p-xkoBSP8R.js";const d=class{constructor(t){s(this,t)}enableAttributePassing(s,t){const a=null==s?void 0:s.closest(t);if(s&&a){const t=a.attributes;for(let d=0;d<t.length;d++){const i=t.item(d);if(i&&"data-density"!==i.name&&(i.name.startsWith("data-")||i.name.startsWith("aria-")))s.setAttribute(i.name,i.value),a.removeAttribute(i.name);else if(i&&"data-density"!==i.name&&"class"!==i.name&&"style"===i.name)s.setAttribute(i.name,i.value),a.removeAttribute(i.name);else if(i&&"class"===i.name){const t=i.value.includes("hydrated"),d=i.value.replace("hydrated","").trim(),e=s.getAttribute("class");s.setAttribute(i.name,`${e?`${e} `:""}${d}`),t?a.setAttribute("class","hydrated"):a.removeAttribute(i.name)}}}}componentDidLoad(){this.enableAttributePassing(this._ref,"db-section")}render(){var s,d;return t("section",{key:"433827caeacf2a63ea928bd6178f66dad7112d6d",class:a("db-section",this.className),ref:s=>{this._ref=s},id:null!==(s=this.id)&&void 0!==s?s:null===(d=this.propOverrides)||void 0===d?void 0:d.id,"data-spacing":this.spacing||"medium","data-width":this.width},t("slot",{key:"b815cad646a0d81b749b215a02299b290f765f09"}))}};export{d as db_section}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,F as a}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,F as a}from"./p-Bs7RfNRP.js";import{u as n,c as o}from"./p-xkoBSP8R.js";const h=class{constructor(s){t(this,s),this.indexChange=i(this,"indexChange"),this.tabSelect=i(this,"tabSelect"),this._name="",this.initialized=!1,this.showScrollLeft=!1,this.showScrollRight=!1,this.scrollContainer=null,this._resizeObserver=void 0}convertTabs(){try{return"string"==typeof this.tabs?JSON.parse(this.tabs):this.tabs}catch(t){console.error(t)}return[]}evaluateScrollButtons(t){const i=t.scrollWidth>t.clientWidth;this.showScrollLeft=i&&t.scrollLeft>1,this.showScrollRight=i&&t.scrollLeft<t.scrollWidth-t.clientWidth}scroll(t){var i;let s=Number(this.arrowScrollDistance)||100;t&&(s*=-1),null===(i=this.scrollContainer)||void 0===i||i.scrollBy({top:0,left:s,behavior:"smooth"})}initTabList(){if(this._ref){const t=this._ref.querySelector(".db-tab-list");if(t){const i=t.querySelector('[role="tablist"]');if(i&&(i.setAttribute("aria-orientation",this.orientation||"horizontal"),"arrows"===this.behavior&&(this.scrollContainer=i,this.evaluateScrollButtons(i),i.addEventListener("scroll",(()=>{this.evaluateScrollButtons(i)})),!this._resizeObserver))){const t=new ResizeObserver((()=>{this.evaluateScrollButtons(i)}));t.observe(i),this._resizeObserver=t}}}}initTabs(t){if(this._ref){const i=Array.from(this._ref.getElementsByClassName("db-tab-item")),s=Array.from(this._ref.querySelectorAll(":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)"));for(const a of i){const n=i.indexOf(a),o=a.querySelector("label"),h=a.querySelector("input");if(h&&o){if(!h.id){const t=`${this._name}-tab-${n}`;o.setAttribute("for",t),h.id=t,h.setAttribute("name",this._name),s.length>n&&h.setAttribute("aria-controls",`${this._name}-tab-panel-${n}`)}if(t){const t=!this.initialSelectedMode||"auto"===this.initialSelectedMode,i=null==this.initialSelectedIndex&&0===n||Number(this.initialSelectedIndex)===n;t&&i&&h.click()}}}for(const t of s){if(t.id)continue;const i=s.indexOf(t);t.id=`${this._name}-tab-panel-${i}`,t.setAttribute("aria-labelledby",`${this._name}-tab-${i}`)}}}handleChange(t){var i;if(t.stopPropagation(),t.target){const s=t.target.parentElement;if(s&&s.parentElement&&"LI"===(null===(i=s.parentElement)||void 0===i?void 0:i.nodeName)){const i=s.parentElement.parentElement;if(i){const s=i.parentElement;if(s){const a=Array.from(s.children).indexOf(i);this.indexChange&&this.indexChange.emit(a),this.tabSelect&&this.tabSelect.emit(t)}}}}}enableAttributePassing(t,i){const s=null==t?void 0:t.closest(i);if(t&&s){const i=s.attributes;for(let a=0;a<i.length;a++){const n=i.item(a);if(n&&"data-density"!==n.name&&(n.name.startsWith("data-")||n.name.startsWith("aria-")))t.setAttribute(n.name,n.value),s.removeAttribute(n.name);else if(n&&"data-density"!==n.name&&"class"!==n.name&&"style"===n.name)t.setAttribute(n.name,n.value),s.removeAttribute(n.name);else if(n&&"class"===n.name){const i=n.value.includes("hydrated"),a=n.value.replace("hydrated","").trim(),o=t.getAttribute("class");t.setAttribute(n.name,`${o?`${o} `:""}${a}`),i?s.setAttribute("class","hydrated"):s.removeAttribute(n.name)}}}}watch0Fn(){if(this._ref&&this.initialized){this.initTabList(),this.initTabs(!0);const t=this._ref.querySelector(".db-tab-list");t&&new MutationObserver((t=>{t.forEach((t=>{(t.removedNodes.length||t.addedNodes.length)&&(this.initTabList(),this.initTabs())}))})).observe(t,{childList:!0,subtree:!0}),this.initialized=!1}}watch0(){this.watch0Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-tabs"),this._name=`tabs-${this.name||n()}`,this.initialized=!0,this.watch0Fn()}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect(),this._resizeObserver=void 0}render(){var t,i,n,h,e,l;return s("div",{key:"6d273b967668288248c3853be80261a877d3ae04",class:o("db-tabs",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-orientation":this.orientation,"data-scroll-behavior":this.behavior,"data-alignment":null!==(n=this.alignment)&&void 0!==n?n:"start","data-width":null!==(h=this.width)&&void 0!==h?h:"auto",onInput:t=>this.handleChange(t),onChange:t=>this.handleChange(t)},this.showScrollLeft?s("db-button",{class:"tabs-scroll-left",variant:"ghost",icon:"chevron_left",type:"button",noText:!0,onClick:()=>this.scroll(!0)},"Scroll left"):null,this.tabs?s(a,null,s("db-tab-list",null,null===(e=this.convertTabs())||void 0===e?void 0:e.map(((t,i)=>s("db-tab-item",{key:this.name+"tab-item"+i,active:t.active,label:t.label,iconTrailing:t.iconTrailing,icon:t.icon,noText:t.noText})))),null===(l=this.convertTabs())||void 0===l?void 0:l.map(((t,i)=>s("db-tab-panel",{key:this.name+"tab-panel"+i,content:t.content},t.children)))):null,this.showScrollRight?s("db-button",{class:"tabs-scroll-right",variant:"ghost",icon:"chevron_right",type:"button",noText:!0,onClick:()=>this.scroll()},"Scroll right"):null,s("slot",{key:"04f5d96f32695ae2661ace77827ee783eb0f23d0"}))}static get watchers(){return{_ref:[{watch0:0}],initialized:[{watch0:0}]}}};export{h as db_tabs}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,F as a}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s,F as a}from"./p-Bs7RfNRP.js";import{n as h}from"./p-BdL-nI5y.js";import{d as n,e as o,g as d,c as e}from"./p-xkoBSP8R.js";import{N as l}from"./p-BuBrj57D.js";import"./p-DOPXnIzL.js";const r=class{constructor(s){i(this,s),this.click=t(this,"click"),this.initialized=!1,this.hasAreaPopup=!1,this.hasSubNavigation=!0,this.isSubNavigationExpanded=!1,this.autoClose=!1,this.navigationItemSafeTriangle=void 0}handleNavigationItemClick(i){var t;"A"===(null===(t=null==i?void 0:i.target)||void 0===t?void 0:t.nodeName)&&(this.autoClose=!0,n((()=>{this.autoClose=!1}),1e3))}handleClick(i){this.click&&(i.stopPropagation(),this.click.emit(i)),this.hasAreaPopup&&(this.isSubNavigationExpanded=!0)}handleBackClick(i){i.stopPropagation(),this.isSubNavigationExpanded=!1}enableAttributePassing(i,t){const s=null==i?void 0:i.closest(t);if(i&&s){const t=s.attributes;for(let a=0;a<t.length;a++){const h=t.item(a);if(h&&"data-density"!==h.name&&(h.name.startsWith("data-")||h.name.startsWith("aria-")))i.setAttribute(h.name,h.value),s.removeAttribute(h.name);else if(h&&"data-density"!==h.name&&"class"!==h.name&&"style"===h.name)i.setAttribute(h.name,h.value),s.removeAttribute(h.name);else if(h&&"class"===h.name){const t=h.value.includes("hydrated"),a=h.value.replace("hydrated","").trim(),n=i.getAttribute("class");i.setAttribute(h.name,`${n?`${n} `:""}${a}`),t?s.setAttribute("class","hydrated"):s.removeAttribute(h.name)}}}}watch0Fn(){void 0!==this.subNavigationExpanded&&(this.isSubNavigationExpanded=!!o(this.subNavigationExpanded,"subNavigationExpanded"))}watch0(){this.watch0Fn()}watch1Fn(){var i;if(this.initialized&&this._ref){const t=this._ref.querySelector("menu");t&&((null===(i=t.children)||void 0===i?void 0:i.length)>0?(this.hasAreaPopup=!0,this.navigationItemSafeTriangle||(this.navigationItemSafeTriangle=new l(this._ref,t))):this.hasSubNavigation=!1)}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-navigation-item"),this.initialized=!0,this.watch0Fn(),this.watch1Fn()}render(){var i,t,n;return s("li",{key:"9e00c0e7d146b0e8472b0aa356846ae40f78b142",class:e("db-navigation-item",this.className),ref:i=>{this._ref=i},id:null!==(i=this.id)&&void 0!==i?i:null===(t=this.propOverrides)||void 0===t?void 0:t.id,onMouseOver:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.enableFollow()},onMouseLeave:()=>{var i;return null===(i=this.navigationItemSafeTriangle)||void 0===i?void 0:i.disableFollow()},onMouseMove:i=>{var t;return null===(t=this.navigationItemSafeTriangle)||void 0===t?void 0:t.followByMouseEvent(i)},"data-width":this.width,"data-icon":this.icon,"data-show-icon":d(this.showIcon),"data-active":this.active,"data-wrap":d(this.wrap),"aria-disabled":d(this.disabled)},this.hasSubNavigation?null:this.text?this.text:s("slot",null),this.hasSubNavigation?s(a,null,s("button",{class:"db-navigation-item-expand-button","aria-haspopup":this.hasAreaPopup,"aria-expanded":this.isSubNavigationExpanded,disabled:o(this.disabled,"disabled"),onClick:i=>this.handleClick(i)},this.text?this.text:s("slot",null)),s("menu",{class:"db-sub-navigation","data-force-close":this.autoClose,onClick:i=>this.handleNavigationItemClick(i)},this.hasAreaPopup?s("div",{class:"db-mobile-navigation-back"},s("db-button",{icon:"arrow_left",variant:"ghost",id:this.backButtonId,onClick:i=>this.handleBackClick(i)},null!==(n=this.backButtonText)&&void 0!==n?n:h)):null,s("slot",{name:"subNavigation"}))):null)}static get watchers(){return{subNavigationExpanded:[{watch0:0}],initialized:[{watch1:0}],_ref:[{watch1:0}]}}};export{r as db_navigation_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as s}from"./p-Bs7RfNRP.js";import{d as i,g as a,c as e}from"./p-xkoBSP8R.js";import{D as o}from"./p-CHLgQ9vn.js";import{b as n}from"./p-DOPXnIzL.js";const h=class{constructor(s){t(this,s),this.initialized=!1,this.isExpanded=!1,this._documentScrollListenerCallbackId=void 0,this._observer=void 0}handleEscape(t){if(!t||"Escape"===t.key)for(const t of Array.from(this._ref.children))t.blur()}handleAutoPlacement(){if(!this._ref)return;const t=this._ref.querySelector("article");t&&i((()=>{var s;n(t,this._ref,null!==(s=this.placement)&&void 0!==s?s:"bottom")}),1)}handleDocumentScroll(t){var s,i;(null===(s=null==t?void 0:t.target)||void 0===s?void 0:s.contains)&&(null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.contains(this._ref))&&this.handleAutoPlacement()}handleEnter(){var t;this.isExpanded=!0,this._documentScrollListenerCallbackId=(new o).addCallback((t=>this.handleDocumentScroll(t))),this.handleAutoPlacement();const s=this.getTrigger();s&&(null===(t=this._observer)||void 0===t||t.observe(s))}handleLeave(t){var s;const i=null==t?void 0:t.target;if(!(null==i?void 0:i.parentNode)||i.parentNode.querySelector(":focus")!==i&&i.parentNode.querySelector(":focus-within")!==i&&i.parentNode.querySelector(":hover")!==i){this.isExpanded=!1,this._documentScrollListenerCallbackId&&(new o).removeCallback(this._documentScrollListenerCallbackId);const t=this.getTrigger();t&&(null===(s=this._observer)||void 0===s||s.unobserve(t))}}getTrigger(){var t;if(this._ref){const s=Array.from(this._ref.children);if(s.length>=2){const i=s[0];return i.tagName.includes("-")?(null===(t=i.children)||void 0===t?void 0:t.length)>0?i.children[0]:null:i}}return null}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&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"data-density"!==e.name&&"class"!==e.name&&"style"===e.name)t.setAttribute(e.name,e.value),i.removeAttribute(e.name);else if(e&&"class"===e.name){const s=e.value.includes("hydrated"),a=e.value.replace("hydrated","").trim(),o=t.getAttribute("class");t.setAttribute(e.name,`${o?`${o} `:""}${a}`),s?i.setAttribute("class","hydrated"):i.removeAttribute(e.name)}}}}watch0Fn(){if(this._ref&&this.initialized){this.initialized=!1;const t=this.getTrigger();t&&(t.ariaHasPopup="true"),this.handleAutoPlacement(),this._ref.addEventListener("keydown",(t=>this.handleEscape(t))),["mouseenter","focusin"].forEach((t=>{this._ref.addEventListener(t,(()=>this.handleEnter()))})),["mouseleave","focusout"].forEach((t=>{this._ref.addEventListener(t,(()=>this.handleLeave()))})),"undefined"!=typeof window&&"IntersectionObserver"in window&&(this._observer=new IntersectionObserver((t=>{const s=t.find((({target:t})=>t===this.getTrigger()));s&&!s.isIntersecting&&this.handleEscape(!1)})))}}watch0(){this.watch0Fn()}watch1Fn(){if(this._ref){const t=this.getTrigger();t&&(t.ariaExpanded=Boolean(this.isExpanded).toString())}}watch1(){this.watch1Fn()}componentDidLoad(){this.enableAttributePassing(this._ref,"db-popover"),this.initialized=!0,this.watch0Fn(),this.watch1Fn()}render(){var t,i,o;return s("div",{key:"aa9250091fc55d09bb5db9f6ca82af793999160c",class:e("db-popover",this.className),ref:t=>{this._ref=t},id:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id},s("slot",{key:"aab79e27b5ce47cb859342d448c4efc0933fc523",name:"trigger"}),s("article",{key:"4f8ba04305cf074b94d50c0c5121c89bd4251434",class:"db-popover-content","data-spacing":this.spacing,"data-gap":a(this.gap),"data-animation":a(null===(o=this.animation)||void 0===o||o),"data-open":a(this.open),"data-delay":this.delay,"data-width":this.width,"data-placement":this.placement},s("slot",{key:"3ce3cca432122ee2b52d7df9cd0016d4c6b81da1"})))}static get watchers(){return{_ref:[{watch0:0},{watch1:0}],initialized:[{watch0:0}],isExpanded:[{watch1:0}]}}};export{h as db_popover}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBAccordionItem = class {
|
|
@@ -89,9 +89,9 @@ const DBAccordionItem = class {
|
|
|
89
89
|
}
|
|
90
90
|
render() {
|
|
91
91
|
var _a, _b;
|
|
92
|
-
return (h("li", { key: '
|
|
92
|
+
return (h("li", { key: 'd326ba8af9e635f673d1016cd16ef9a9a8b1503c', class: cls("db-accordion-item", this.className), id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("details", { key: '6f15470fcdaf103df318c251e941fed9fd79c4ee', "aria-disabled": getBooleanAsString(this.disabled), ref: (el) => {
|
|
93
93
|
this._ref = el;
|
|
94
|
-
}, name: this._name, open: this._open }, h("summary", { key: '
|
|
94
|
+
}, name: this._name, open: this._open }, h("summary", { key: 'db41f2b1f85dfdecf9ab37b35b04efb2e83d69af', onClick: (event) => this.handleToggle(event) }, this.headlinePlain ? this.headlinePlain : null, !this.headlinePlain ? h("slot", { name: "headline" }) : null), h("div", { key: '00a6fed4fdb26de2c998d991a6dfaee6caa3ca92' }, this.text ? this.text : h("slot", null)))));
|
|
95
95
|
}
|
|
96
96
|
static get watchers() { return {
|
|
97
97
|
"_ref": [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { u as uuid, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBAccordion = class {
|
|
@@ -128,7 +128,7 @@ const DBAccordion = class {
|
|
|
128
128
|
}
|
|
129
129
|
render() {
|
|
130
130
|
var _a, _b, _c;
|
|
131
|
-
return (h("ul", { key: '
|
|
131
|
+
return (h("ul", { key: 'ea919e6fa79f820a40ece5ee3305dad84f113d1d', class: cls("db-accordion", this.className), ref: (el) => {
|
|
132
132
|
this._ref = el;
|
|
133
133
|
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-variant": this.variant }, !this.items ? h("slot", null) : null, this.items
|
|
134
134
|
? (_c = this.convertItems()) === null || _c === void 0 ? void 0 : _c.map((item, index) => (h("db-accordion-item", { key: `accordion-item-${index}`, headlinePlain: item.headlinePlain, disabled: item.disabled, text: item.text })))
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { a as DEFAULT_LABEL } from './constants-BdL-nI5y.js';
|
|
3
3
|
import { g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
4
4
|
|
|
@@ -68,7 +68,7 @@ const DBBadge = class {
|
|
|
68
68
|
}
|
|
69
69
|
render() {
|
|
70
70
|
var _a, _b, _c, _d;
|
|
71
|
-
return (h("span", { key: '
|
|
71
|
+
return (h("span", { key: '285ff83ac5c79c7e1c6328aba89e1825f57dd78a', class: cls("db-badge", this.className), ref: (el) => {
|
|
72
72
|
this._ref = el;
|
|
73
73
|
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-size": this.size, "data-emphasis": this.emphasis, "data-placement": this.placement, "data-wrap": getBooleanAsString(this.wrap), "data-label": ((_c = this.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = this.label) !== null && _d !== void 0 ? _d : DEFAULT_LABEL) }, this.text ? this.text : h("slot", null)));
|
|
74
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { q as DEFAULT_ICON } from './constants-BdL-nI5y.js';
|
|
3
3
|
import { g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
4
4
|
|
|
@@ -47,7 +47,7 @@ const DBBrand = class {
|
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
49
|
var _a, _b, _c;
|
|
50
|
-
return (h("div", { key: '
|
|
50
|
+
return (h("div", { key: '2dbff45d3e8c3dbe6f1993c3401a12f15628984d', class: cls("db-brand", this.className), ref: (el) => {
|
|
51
51
|
this._ref = el;
|
|
52
52
|
}, "data-icon": this.hideLogo ? "none" : (_a = this.icon) !== null && _a !== void 0 ? _a : DEFAULT_ICON, "data-show-icon": getBooleanAsString(this.showIcon), id: (_b = this.id) !== null && _b !== void 0 ? _b : (_c = this.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, this.text ? this.text : h("slot", null)));
|
|
53
53
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { g as getBooleanAsString, e as getBoolean, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBButton = class {
|
|
@@ -56,7 +56,7 @@ const DBButton = class {
|
|
|
56
56
|
}
|
|
57
57
|
render() {
|
|
58
58
|
var _a, _b, _c, _d;
|
|
59
|
-
return (h("button", { key: '
|
|
59
|
+
return (h("button", { key: '8bd02e4a26046fa1b62f26449e961b2ba7edf377', class: cls("db-button", this.className), ref: (el) => {
|
|
60
60
|
this._ref = el;
|
|
61
61
|
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, type: this.getButtonType(), disabled: getBoolean(this.disabled, "disabled"), "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-wrap": getBooleanAsString(this.wrap), "data-no-text": getBooleanAsString(this.noText), name: this.name, form: this.form, value: this.value }, this.text ? this.text : h("slot", null)));
|
|
62
62
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBCard = class {
|
|
@@ -52,9 +52,9 @@ const DBCard = class {
|
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
54
|
var _a, _b;
|
|
55
|
-
return (h("div", { key: '
|
|
55
|
+
return (h("div", { key: 'fc177f67efe5de971fcc6eeeb069473788988c1a', class: cls("db-card", this.className), ref: (el) => {
|
|
56
56
|
this._ref = el;
|
|
57
|
-
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-behavior": this.behavior, "data-elevation-level": this.elevationLevel, "data-spacing": this.spacing, onClick: (event) => this.handleClick(event) }, h("slot", { key: '
|
|
57
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-behavior": this.behavior, "data-elevation-level": this.elevationLevel, "data-spacing": this.spacing, onClick: (event) => this.handleClick(event) }, h("slot", { key: 'cffa2e7b3427e279ef5ae1b3d00ff923e5c819c6' })));
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE } from './constants-BdL-nI5y.js';
|
|
3
3
|
import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, l as getHideProp, c as cls } from './index-xkoBSP8R.js';
|
|
4
4
|
import { a as addCheckedResetEventListener } from './form-components-D6LQfJvq.js';
|
|
@@ -208,9 +208,9 @@ const DBCheckbox = class {
|
|
|
208
208
|
}
|
|
209
209
|
render() {
|
|
210
210
|
var _a;
|
|
211
|
-
return (h("div", { key: '
|
|
211
|
+
return (h("div", { key: '433618f3dbf837b2b8febeb5b3acd77b0cebbc24', class: cls("db-checkbox", this.className), "data-size": this.size, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: '02b767c372314a2dc32b90fec28a0a2d4caa67c1', htmlFor: this._id }, h("input", { key: '1fc78fbb4079f69ed7bde43097ff3125ec67edf9', type: "checkbox", "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
|
|
212
212
|
this._ref = el;
|
|
213
|
-
}, id: this._id, name: this.name, checked: getBoolean(this.checked, "checked"), disabled: getBoolean(this.disabled, "disabled"), value: this.value, required: getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : h("slot", null)), 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: '
|
|
213
|
+
}, id: this._id, name: this.name, checked: getBoolean(this.checked, "checked"), disabled: getBoolean(this.disabled, "disabled"), value: this.value, required: getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : h("slot", null)), 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: '1bc15384adefeb0a9749ebe60ee8e130e9258321', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '9daadc858ce041949b5470e6914c2c22f5a2918e', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
214
214
|
}
|
|
215
215
|
static get watchers() { return {
|
|
216
216
|
"id": [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBCustomButton = class {
|
|
@@ -46,9 +46,9 @@ const DBCustomButton = class {
|
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
48
|
var _a, _b, _c, _d;
|
|
49
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: 'ee954dad8cd0baff52172a1ec9553c43673d0fa4', class: cls("db-custom-button", this.className), ref: (el) => {
|
|
50
50
|
this._ref = el;
|
|
51
|
-
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-no-text": getBooleanAsString(this.noText) }, h("slot", { key: '
|
|
51
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-no-text": getBooleanAsString(this.noText) }, h("slot", { key: 'accbe2a436c60ecb945aea8b008453e3a264fd2b' })));
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as registerInstance, h, c as createEvent } from './index-
|
|
1
|
+
import { r as registerInstance, h, c as createEvent } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { c as cls, e as getBoolean, g as getBooleanAsString, h as hasVoiceOver, d as delay, s as stringPropVisible, i as isArrayOfStrings, u as uuid, k as getInputValue, f as getNumber, j as getStep, b as isIOSSafari, l as getHideProp } from './index-xkoBSP8R.js';
|
|
3
3
|
import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, j as DEFAULT_DATALIST_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, b as DEFAULT_PLACEHOLDER, a as DEFAULT_LABEL, m as DEFAULT_REMOVE } from './constants-BdL-nI5y.js';
|
|
4
4
|
import { c as addValueResetEventListener } from './form-components-D6LQfJvq.js';
|
|
@@ -49,9 +49,9 @@ const DBCustomSelectDropdown = class {
|
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
51
|
var _a, _b;
|
|
52
|
-
return (h("article", { key: '
|
|
52
|
+
return (h("article", { key: '18ea31a3993786aed93fbb95fabc349231b455ae', class: cls("db-custom-select-dropdown db-card", this.className), "data-spacing": "none", ref: (el) => {
|
|
53
53
|
this._ref = el;
|
|
54
|
-
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-width": this.width }, h("slot", { key: '
|
|
54
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-width": this.width }, h("slot", { key: '14a29534f56e6fe16c6d6e856b26aba549fef8dc' })));
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -100,9 +100,9 @@ const DBCustomSelectList = class {
|
|
|
100
100
|
}
|
|
101
101
|
render() {
|
|
102
102
|
var _a, _b;
|
|
103
|
-
return (h("div", { key: '
|
|
103
|
+
return (h("div", { key: '7694da5a9c97c4f603217d79afd88afe63719db8', class: cls("db-custom-select-list", this.className), role: this.multiple ? "group" : "radiogroup", "aria-label": this.label, ref: (el) => {
|
|
104
104
|
this._ref = el;
|
|
105
|
-
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("ul", { key: '
|
|
105
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("ul", { key: '5c718c452425cfec8a6234d5ae2cf6aef7ed4655' }, h("slot", { key: '93b311c5a750a9ec2b0cb9ab4f7453aa25cc77d8' }))));
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
108
|
|
|
@@ -172,7 +172,7 @@ const DBCustomSelectListItem = class {
|
|
|
172
172
|
}
|
|
173
173
|
render() {
|
|
174
174
|
var _a, _b;
|
|
175
|
-
return (h("li", { key: '
|
|
175
|
+
return (h("li", { key: '40ae5213dd63ce580e2a036e5bf4781065026a30', class: cls("db-custom-select-list-item", this.className, {
|
|
176
176
|
"db-checkbox": this.type === "checkbox" && !this.isGroupTitle,
|
|
177
177
|
"db-radio": this.type !== "checkbox" && !this.isGroupTitle,
|
|
178
178
|
}), ref: (el) => {
|
|
@@ -401,7 +401,7 @@ const DBInput = class {
|
|
|
401
401
|
}
|
|
402
402
|
render() {
|
|
403
403
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
404
|
-
return (h("div", { key: '
|
|
404
|
+
return (h("div", { key: 'cd3b45e50318203965c74406dfe058b5c667520a', class: cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel), "data-show-icon": getBooleanAsString((_a = this.showIconLeading) !== null && _a !== void 0 ? _a : this.showIcon), "data-icon": (_b = this.iconLeading) !== null && _b !== void 0 ? _b : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing) }, h("label", { key: '07a3c4f58cd6531ce8891e18603a6f534d2df1a5', htmlFor: this._id }, (_c = this.label) !== null && _c !== void 0 ? _c : DEFAULT_LABEL), h("input", { key: 'b90a93ed9454972000e4e3f37cb839a3d14ab3ec', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
|
|
405
405
|
this._ref = el;
|
|
406
406
|
}, id: this._id, name: this.name, type: this.type || "text", multiple: getBoolean(this.multiple, "multiple"), accept: this.accept, placeholder: (_d = this.placeholder) !== null && _d !== void 0 ? _d : DEFAULT_PLACEHOLDER, disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), step: getStep(this.step), value: (_e = this.value) !== null && _e !== void 0 ? _e : this._value, maxLength: getNumber(this.maxLength, this.maxlength), minLength: getNumber(this.minLength, this.minlength), max: getInputValue(this.max, this.type), min: getInputValue(this.min, this.type), readOnly: getBoolean(this.readOnly, "readOnly") ||
|
|
407
407
|
getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: getBoolean(this.autofocus, "autofocus"), enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds, role: [
|
|
@@ -413,7 +413,7 @@ const DBInput = class {
|
|
|
413
413
|
"color",
|
|
414
414
|
].includes((_g = this.type) !== null && _g !== void 0 ? _g : "") && isIOSSafari()
|
|
415
415
|
? "textbox"
|
|
416
|
-
: undefined }), this.dataList ? (h("datalist", { id: this._dataListId }, (_h = this.getDataList()) === null || _h === void 0 ? void 0 : _h.map((option) => (h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, h("slot", { key: '
|
|
416
|
+
: undefined }), this.dataList ? (h("datalist", { id: this._dataListId }, (_h = this.getDataList()) === null || _h === void 0 ? void 0 : _h.map((option) => (h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, h("slot", { key: '1333f33d378f1d888146fba5143867051b697a2d' }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: this.messageSize || "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { semantic: "successful", id: this._validMessageId, size: this.validMessageSize || "small" }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'bac739c900da2b312dbfd253f845f59fdf177f8d', semantic: "critical", id: this._invalidMessageId, size: this.invalidMessageSize || "small" }, this._invalidMessage), h("span", { key: '46779c27b49d4fd389ac446e4e8c097fae65f51b', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
417
417
|
}
|
|
418
418
|
static get watchers() { return {
|
|
419
419
|
"id": [{
|
|
@@ -500,9 +500,9 @@ const DBTag = class {
|
|
|
500
500
|
}
|
|
501
501
|
render() {
|
|
502
502
|
var _a, _b, _c;
|
|
503
|
-
return (h("div", { key: '
|
|
503
|
+
return (h("div", { key: 'd84df9f55535db4fbe9befd09fd2eef8125069c4', class: cls("db-tag", this.className), ref: (el) => {
|
|
504
504
|
this._ref = el;
|
|
505
|
-
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": getBooleanAsString((_c = this.showCheckState) !== null && _c !== void 0 ? _c : true), "data-show-icon": getBooleanAsString(this.showIcon), "data-no-text": getBooleanAsString(this.noText), "data-overflow": getBooleanAsString(this.overflow) }, h("slot", { key: '
|
|
505
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": getBooleanAsString((_c = this.showCheckState) !== null && _c !== void 0 ? _c : true), "data-show-icon": getBooleanAsString(this.showIcon), "data-no-text": getBooleanAsString(this.noText), "data-overflow": getBooleanAsString(this.overflow) }, h("slot", { key: '9f4d27ce3f4d4d2e1d193167148168a2cb8784dd', name: "content" }), h("slot", { key: '9feecc10d65e9f807709e5d90b90f69be72b8efb' }), this.text ? this.text : null, this.behavior === "removable" ? (h("button", { class: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", type: "button", onClick: (event) => this.handleRemove(event) }, h("db-tooltip", { variant: "label" }, this.getRemoveButtonText()))) : null));
|
|
506
506
|
}
|
|
507
507
|
};
|
|
508
508
|
|