@db-ux/wc-core-components 4.11.0 → 4.11.1
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/CHANGELOG.md +12 -0
- package/bundle/db-accordion-item.js +1 -1
- package/bundle/db-accordion.js +1 -1
- package/bundle/db-badge.js +1 -1
- package/bundle/db-brand.js +1 -1
- package/bundle/db-button.js +1 -1
- package/bundle/db-card.js +1 -1
- package/bundle/db-checkbox.js +1 -1
- package/bundle/db-custom-button.js +1 -1
- package/bundle/db-custom-select-dropdown.js +1 -1
- package/bundle/db-custom-select-form-field.js +1 -1
- package/bundle/db-custom-select-list-item.js +1 -1
- package/bundle/db-custom-select-list.js +1 -1
- package/bundle/db-custom-select.js +1 -1
- package/bundle/db-divider.js +1 -1
- package/bundle/db-drawer.js +1 -1
- package/bundle/db-header.js +1 -1
- package/bundle/db-icon.js +1 -1
- package/bundle/db-infotext.js +1 -1
- package/bundle/db-input.js +1 -1
- package/bundle/db-link.js +1 -1
- package/bundle/db-navigation-item.js +1 -1
- package/bundle/db-navigation.js +1 -1
- package/bundle/db-notification.js +1 -1
- package/bundle/db-page.js +1 -1
- package/bundle/db-popover.js +1 -1
- package/bundle/db-radio.js +1 -1
- package/bundle/db-section.js +1 -1
- package/bundle/db-select.js +1 -1
- package/bundle/db-stack.js +1 -1
- package/bundle/db-switch.js +1 -1
- package/bundle/db-tab-item.js +1 -1
- package/bundle/db-tab-list.js +1 -1
- package/bundle/db-tab-panel.js +1 -1
- package/bundle/db-table-body.js +1 -1
- package/bundle/db-table-caption.js +1 -1
- package/bundle/db-table-data-cell.js +1 -1
- package/bundle/db-table-footer.js +1 -1
- package/bundle/db-table-head.js +1 -1
- package/bundle/db-table-header-cell.js +1 -1
- package/bundle/db-table-row.js +1 -1
- package/bundle/db-table.js +1 -1
- package/bundle/db-tabs.js +1 -1
- package/bundle/db-tag.js +1 -1
- package/bundle/db-textarea.js +1 -1
- package/bundle/db-tooltip.js +1 -1
- package/bundle/p-3Da4lo5j.js +1 -0
- package/bundle/p-BEcb3EOO.js +1 -0
- package/bundle/p-BEolc6Da.js +1 -0
- package/bundle/p-BekmqY3B.js +1 -0
- package/bundle/p-BmRO4X-P.js +1 -0
- package/bundle/p-BrQIYm5N.js +1 -0
- package/bundle/p-BxZ0zFXf.js +1 -0
- package/bundle/p-C2viXF7U.js +1 -0
- package/bundle/p-C4iD-won.js +1 -0
- package/bundle/p-CHg_VPD9.js +1 -0
- package/bundle/p-CZ9SsTOA.js +1 -0
- package/bundle/p-CewqZGHg.js +1 -0
- package/bundle/p-CotiEHZi.js +1 -0
- package/bundle/p-D1orcIJf.js +1 -0
- package/bundle/p-D9RSX1St.js +1 -0
- package/bundle/p-DbgzEek1.js +1 -0
- package/bundle/p-DqNXsduK.js +1 -0
- package/bundle/p-Duacd-NX.js +1 -0
- package/bundle/p-k5Hci0ok.js +1 -0
- package/bundle/p-mk64Fltq.js +1 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js +46 -9
- package/dist/cjs/db-accordion.cjs.entry.js +43 -6
- package/dist/cjs/db-badge.cjs.entry.js +43 -6
- package/dist/cjs/db-brand.cjs.entry.js +36 -5
- package/dist/cjs/db-button.cjs.entry.js +36 -5
- package/dist/cjs/db-card.cjs.entry.js +36 -5
- package/dist/cjs/db-checkbox.cjs.entry.js +45 -11
- package/dist/cjs/db-custom-button.cjs.entry.js +36 -5
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +190 -31
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +36 -5
- package/dist/cjs/db-custom-select.cjs.entry.js +60 -26
- package/dist/cjs/db-divider.cjs.entry.js +35 -4
- package/dist/cjs/db-drawer.cjs.entry.js +45 -8
- package/dist/cjs/db-header.cjs.entry.js +43 -6
- package/dist/cjs/db-icon.cjs.entry.js +36 -5
- package/dist/cjs/db-infotext.cjs.entry.js +36 -5
- package/dist/cjs/db-link_4.cjs.entry.js +65 -19
- package/dist/cjs/db-navigation-item.cjs.entry.js +46 -9
- package/dist/cjs/db-navigation.cjs.entry.js +36 -5
- package/dist/cjs/db-notification.cjs.entry.js +36 -5
- package/dist/cjs/db-page.cjs.entry.js +48 -13
- package/dist/cjs/db-popover.cjs.entry.js +43 -6
- package/dist/cjs/db-radio.cjs.entry.js +42 -8
- package/dist/cjs/db-section.cjs.entry.js +36 -5
- package/dist/cjs/db-select.cjs.entry.js +45 -11
- package/dist/cjs/db-stack.cjs.entry.js +36 -5
- package/dist/cjs/db-switch.cjs.entry.js +45 -11
- package/dist/cjs/db-tab-item_3.cjs.entry.js +118 -19
- package/dist/cjs/db-table-body_3.cjs.entry.js +53 -12
- package/dist/cjs/db-table-caption.cjs.entry.js +36 -5
- package/dist/cjs/db-table.cjs.entry.js +35 -4
- package/dist/cjs/db-tabs.cjs.entry.js +42 -8
- package/dist/cjs/db-textarea.cjs.entry.js +45 -10
- package/dist/cjs/db-tooltip.cjs.entry.js +144 -20
- package/dist/cjs/db-ux.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion.js +45 -7
- package/dist/collection/components/accordion-item/accordion-item.js +48 -10
- package/dist/collection/components/badge/badge.js +45 -7
- package/dist/collection/components/brand/brand.js +43 -5
- package/dist/collection/components/button/button.js +43 -5
- package/dist/collection/components/card/card.js +43 -5
- package/dist/collection/components/checkbox/checkbox.js +47 -12
- package/dist/collection/components/custom-button/custom-button.js +43 -5
- package/dist/collection/components/custom-select/custom-select.js +62 -27
- package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +41 -5
- package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +43 -5
- package/dist/collection/components/custom-select-list/custom-select-list.js +43 -5
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +37 -5
- package/dist/collection/components/divider/divider.js +42 -4
- package/dist/collection/components/drawer/drawer.js +47 -9
- package/dist/collection/components/header/header.js +45 -7
- package/dist/collection/components/icon/icon.js +43 -5
- package/dist/collection/components/infotext/infotext.js +43 -5
- package/dist/collection/components/input/input.js +49 -13
- package/dist/collection/components/link/link.js +43 -5
- package/dist/collection/components/navigation/navigation.js +43 -5
- package/dist/collection/components/navigation-item/navigation-item.js +48 -10
- package/dist/collection/components/notification/notification.js +43 -5
- package/dist/collection/components/page/page.js +50 -14
- package/dist/collection/components/popover/popover.js +45 -7
- package/dist/collection/components/radio/radio.js +44 -9
- package/dist/collection/components/section/section.js +43 -5
- package/dist/collection/components/select/select.js +47 -12
- package/dist/collection/components/stack/stack.js +43 -5
- package/dist/collection/components/switch/switch.js +47 -12
- package/dist/collection/components/tab-item/tab-item.js +45 -10
- package/dist/collection/components/tab-list/tab-list.js +43 -5
- package/dist/collection/components/tab-panel/tab-panel.js +48 -5
- package/dist/collection/components/table/table.js +37 -5
- package/dist/collection/components/table-body/table-body.js +9 -4
- package/dist/collection/components/table-caption/table-caption.js +43 -5
- package/dist/collection/components/table-data-cell/table-data-cell.js +10 -5
- package/dist/collection/components/table-footer/table-footer.js +9 -4
- package/dist/collection/components/table-head/table-head.js +42 -4
- package/dist/collection/components/table-header-cell/table-header-cell.js +10 -5
- package/dist/collection/components/table-row/table-row.js +9 -4
- package/dist/collection/components/tabs/tabs.js +44 -9
- package/dist/collection/components/tag/tag.js +43 -5
- package/dist/collection/components/textarea/textarea.js +47 -11
- package/dist/collection/components/tooltip/tooltip.js +150 -21
- package/dist/custom-elements.json +710 -0
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/p-0123ee1b.entry.js +1 -0
- package/dist/db-ux/p-090b1797.entry.js +1 -0
- package/dist/db-ux/p-0e17c5a0.entry.js +1 -0
- package/dist/db-ux/p-194e851c.entry.js +1 -0
- package/dist/db-ux/p-281f5e3e.entry.js +1 -0
- package/dist/db-ux/p-2ae377e6.entry.js +1 -0
- package/dist/db-ux/p-2cf4345f.entry.js +1 -0
- package/dist/db-ux/p-2e6c8304.entry.js +1 -0
- package/dist/db-ux/p-335391d4.entry.js +1 -0
- package/dist/db-ux/p-34235204.entry.js +1 -0
- package/dist/db-ux/p-3569bb3c.entry.js +1 -0
- package/dist/db-ux/p-398f9165.entry.js +1 -0
- package/dist/db-ux/p-5070470f.entry.js +1 -0
- package/dist/db-ux/p-5e08712d.entry.js +1 -0
- package/dist/db-ux/p-63d98f9d.entry.js +1 -0
- package/dist/db-ux/p-6aa92091.entry.js +1 -0
- package/dist/db-ux/p-78b7e6f6.entry.js +1 -0
- package/dist/db-ux/p-7ca4bc82.entry.js +1 -0
- package/dist/db-ux/p-8f989150.entry.js +1 -0
- package/dist/db-ux/p-8fa7a578.entry.js +1 -0
- package/dist/db-ux/p-91052c75.entry.js +1 -0
- package/dist/db-ux/p-9ccd42b1.entry.js +1 -0
- package/dist/db-ux/p-a4d9f6e2.entry.js +1 -0
- package/dist/db-ux/p-af248e57.entry.js +1 -0
- package/dist/db-ux/p-ba82a0b0.entry.js +1 -0
- package/dist/db-ux/p-c2ce6ecd.entry.js +1 -0
- package/dist/db-ux/p-d7b5748d.entry.js +1 -0
- package/dist/db-ux/p-dfbbe502.entry.js +1 -0
- package/dist/db-ux/p-e7a400a2.entry.js +1 -0
- package/dist/db-ux/p-ef1aa878.entry.js +1 -0
- package/dist/db-ux/p-f1daaefa.entry.js +1 -0
- package/dist/db-ux/p-f6312d2c.entry.js +1 -0
- package/dist/db-ux/p-fbf09569.entry.js +1 -0
- package/dist/db-ux/p-ff11c071.entry.js +1 -0
- package/dist/esm/db-accordion-item.entry.js +46 -9
- package/dist/esm/db-accordion.entry.js +43 -6
- package/dist/esm/db-badge.entry.js +43 -6
- package/dist/esm/db-brand.entry.js +36 -5
- package/dist/esm/db-button.entry.js +36 -5
- package/dist/esm/db-card.entry.js +36 -5
- package/dist/esm/db-checkbox.entry.js +45 -11
- package/dist/esm/db-custom-button.entry.js +36 -5
- package/dist/esm/db-custom-select-dropdown_5.entry.js +190 -31
- package/dist/esm/db-custom-select-form-field.entry.js +36 -5
- package/dist/esm/db-custom-select.entry.js +60 -26
- package/dist/esm/db-divider.entry.js +35 -4
- package/dist/esm/db-drawer.entry.js +45 -8
- package/dist/esm/db-header.entry.js +43 -6
- package/dist/esm/db-icon.entry.js +36 -5
- package/dist/esm/db-infotext.entry.js +36 -5
- package/dist/esm/db-link_4.entry.js +65 -19
- package/dist/esm/db-navigation-item.entry.js +47 -10
- package/dist/esm/db-navigation.entry.js +36 -5
- package/dist/esm/db-notification.entry.js +36 -5
- package/dist/esm/db-page.entry.js +48 -13
- package/dist/esm/db-popover.entry.js +43 -6
- package/dist/esm/db-radio.entry.js +42 -8
- package/dist/esm/db-section.entry.js +36 -5
- package/dist/esm/db-select.entry.js +45 -11
- package/dist/esm/db-stack.entry.js +36 -5
- package/dist/esm/db-switch.entry.js +45 -11
- package/dist/esm/db-tab-item_3.entry.js +118 -19
- package/dist/esm/db-table-body_3.entry.js +53 -12
- package/dist/esm/db-table-caption.entry.js +36 -5
- package/dist/esm/db-table.entry.js +35 -4
- package/dist/esm/db-tabs.entry.js +43 -9
- package/dist/esm/db-textarea.entry.js +45 -10
- package/dist/esm/db-tooltip.entry.js +144 -20
- package/dist/esm/db-ux.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/accordion/accordion.d.ts +3 -0
- package/dist/types/components/accordion-item/accordion-item.d.ts +3 -0
- package/dist/types/components/badge/badge.d.ts +3 -0
- package/dist/types/components/brand/brand.d.ts +3 -0
- package/dist/types/components/button/button.d.ts +3 -0
- package/dist/types/components/card/card.d.ts +3 -0
- package/dist/types/components/checkbox/checkbox.d.ts +2 -0
- package/dist/types/components/custom-button/custom-button.d.ts +3 -0
- package/dist/types/components/custom-select/custom-select.d.ts +2 -0
- package/dist/types/components/custom-select-dropdown/custom-select-dropdown.d.ts +3 -0
- package/dist/types/components/custom-select-form-field/custom-select-form-field.d.ts +3 -0
- package/dist/types/components/custom-select-list/custom-select-list.d.ts +3 -0
- package/dist/types/components/custom-select-list-item/custom-select-list-item.d.ts +3 -0
- package/dist/types/components/divider/divider.d.ts +3 -0
- package/dist/types/components/drawer/drawer.d.ts +3 -0
- package/dist/types/components/header/header.d.ts +3 -0
- package/dist/types/components/icon/icon.d.ts +3 -0
- package/dist/types/components/infotext/infotext.d.ts +3 -0
- package/dist/types/components/input/input.d.ts +2 -0
- package/dist/types/components/link/link.d.ts +3 -0
- package/dist/types/components/navigation/navigation.d.ts +3 -0
- package/dist/types/components/navigation-item/navigation-item.d.ts +3 -0
- package/dist/types/components/notification/notification.d.ts +3 -0
- package/dist/types/components/page/page.d.ts +2 -0
- package/dist/types/components/popover/popover.d.ts +3 -0
- package/dist/types/components/radio/radio.d.ts +2 -0
- package/dist/types/components/section/section.d.ts +3 -0
- package/dist/types/components/select/select.d.ts +2 -0
- package/dist/types/components/stack/stack.d.ts +3 -0
- package/dist/types/components/switch/switch.d.ts +2 -0
- package/dist/types/components/tab-item/tab-item.d.ts +2 -0
- package/dist/types/components/tab-list/tab-list.d.ts +3 -0
- package/dist/types/components/tab-panel/tab-panel.d.ts +3 -0
- package/dist/types/components/table/table.d.ts +3 -0
- package/dist/types/components/table-caption/table-caption.d.ts +3 -0
- package/dist/types/components/table-head/table-head.d.ts +3 -0
- package/dist/types/components/tabs/tabs.d.ts +2 -0
- package/dist/types/components/tag/tag.d.ts +3 -0
- package/dist/types/components/textarea/textarea.d.ts +2 -0
- package/dist/types/components/tooltip/model.d.ts +9 -0
- package/dist/types/components/tooltip/tooltip.d.ts +8 -0
- package/dist/web-types.json +84 -40
- package/package.json +6 -6
- package/bundle/p-B5ANMEnQ.js +0 -1
- package/bundle/p-BJwvv-yT.js +0 -1
- package/bundle/p-BNiKxu3y.js +0 -1
- package/bundle/p-B_bPnncM.js +0 -1
- package/bundle/p-BnLhi6Lz.js +0 -1
- package/bundle/p-BrBlnLrn.js +0 -1
- package/bundle/p-CByFfoSH.js +0 -1
- package/bundle/p-CQo0C7QE.js +0 -1
- package/bundle/p-CR2ZbfYe.js +0 -1
- package/bundle/p-CeDu282h.js +0 -1
- package/bundle/p-CfLPOLHz.js +0 -1
- package/bundle/p-CoOxyQb2.js +0 -1
- package/bundle/p-CqED0CfD.js +0 -1
- package/bundle/p-Cr_z1Jfi.js +0 -1
- package/bundle/p-D-XzX0R7.js +0 -1
- package/bundle/p-DMSIvqcA.js +0 -1
- package/bundle/p-DUiroUyR.js +0 -1
- package/bundle/p-DdyMClpj.js +0 -1
- package/bundle/p-DjVjS2Tb.js +0 -1
- package/bundle/p-in4Kv88F.js +0 -1
- package/dist/db-ux/p-08271c80.entry.js +0 -1
- package/dist/db-ux/p-105ffa74.entry.js +0 -1
- package/dist/db-ux/p-15adca91.entry.js +0 -1
- package/dist/db-ux/p-1a322a0c.entry.js +0 -1
- package/dist/db-ux/p-1f7232c0.entry.js +0 -1
- package/dist/db-ux/p-27e2f6f2.entry.js +0 -1
- package/dist/db-ux/p-2907f214.entry.js +0 -1
- package/dist/db-ux/p-2ff958e4.entry.js +0 -1
- package/dist/db-ux/p-3423b7af.entry.js +0 -1
- package/dist/db-ux/p-365e6edf.entry.js +0 -1
- package/dist/db-ux/p-42516007.entry.js +0 -1
- package/dist/db-ux/p-5045182c.entry.js +0 -1
- package/dist/db-ux/p-5e1d42e5.entry.js +0 -1
- package/dist/db-ux/p-61b28212.entry.js +0 -1
- package/dist/db-ux/p-6850a53c.entry.js +0 -1
- package/dist/db-ux/p-6bff55b4.entry.js +0 -1
- package/dist/db-ux/p-6e7c5e42.entry.js +0 -1
- package/dist/db-ux/p-76adf385.entry.js +0 -1
- package/dist/db-ux/p-78f7b353.entry.js +0 -1
- package/dist/db-ux/p-7fa5d304.entry.js +0 -1
- package/dist/db-ux/p-95b69e71.entry.js +0 -1
- package/dist/db-ux/p-99ebe6ec.entry.js +0 -1
- package/dist/db-ux/p-a5dc355d.entry.js +0 -1
- package/dist/db-ux/p-a6113789.entry.js +0 -1
- package/dist/db-ux/p-b9c0feaf.entry.js +0 -1
- package/dist/db-ux/p-c14fa91a.entry.js +0 -1
- package/dist/db-ux/p-c65b807e.entry.js +0 -1
- package/dist/db-ux/p-dd9cedbe.entry.js +0 -1
- package/dist/db-ux/p-e3f705fd.entry.js +0 -1
- package/dist/db-ux/p-e4cddc9f.entry.js +0 -1
- package/dist/db-ux/p-e7a8612c.entry.js +0 -1
- package/dist/db-ux/p-ee8c3243.entry.js +0 -1
- package/dist/db-ux/p-f0d0acfc.entry.js +0 -1
- package/dist/db-ux/p-f15748ea.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as t,H as i,A as e,j as s,z as a,k as h,d as n,t as d}from"./p-CYYSsu3p.js";const o=t(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),this.change=e(this,"change"),this._selected=!1,this._name=void 0,this.initialized=!1,this._listenerAdded=!1,this.boundSetSelectedOnChange=void 0,this.observer=void 0}setSelectedOnChange(t){t.stopPropagation(),this._selected=s(t.target===this._ref,"selected")}handleNameAttribute(){if(this._ref){const t=this._ref.setAttribute;this._ref.setAttribute=(i,e)=>{t.call(this._ref,i,e),"name"===i&&(this._name=e)}}}handleChange(t){this.change&&this.change.emit(t)}setupObserver(t){if(!t)return;const i=t.closest("db-tab-item");i&&!this.observer&&(this.observer=new MutationObserver((i=>{i.some((t=>{var i;const e=t.target.attributes.getNamedItem(null!==(i=t.attributeName)&&void 0!==i?i:"");return(null==e?void 0:e.value)!==t.oldValue}))&&this.enableAttributePassing(t,"db-tab-item")})),this.observer.observe(i,{attributes:!0,attributeOldValue:!0}))}enableAttributePassing(t,i){const e=null==t?void 0:t.closest(i);if(t&&e){const i=e.attributes;for(let s=0;s<i.length;s++){const a=i.item(s);if(a&&"data-density"!==a.name&&(a.name.startsWith("data-")||a.name.startsWith("aria-")))a.value?t.setAttribute(a.name,a.value):t.removeAttribute(a.name),e.removeAttribute(a.name);else if(a&&["style"].includes(a.name))t.setAttribute(a.name,a.value),e.removeAttribute(a.name);else if(a&&"class"===a.name){const i=a.value.includes("hydrated"),s=a.value.replace("hydrated","").trim(),h=t.getAttribute("class");t.setAttribute(a.name,`${h||""}${s?` ${s}`:""}`),i?e.setAttribute("class","hydrated"):e.removeAttribute(a.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=s(!0,"selected"),this._ref.click()))}watch0(){this.watch0Fn()}watch1Fn(){this.name&&(this._name=this.name)}watch1(){this.watch1Fn()}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const t=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);t&&t.remove()}this.enableAttributePassing(this._ref,"db-tab-item"),(()=>{this.boundSetSelectedOnChange=this.setSelectedOnChange.bind(this),this.initialized=!0})(),(()=>{this.setupObserver(this._ref)})(),this.watch0Fn(),this.watch1Fn()}disconnectedCallback(){var t,i;this._listenerAdded&&this._ref&&this.boundSetSelectedOnChange&&(null===(t=this._ref.closest("[role=tablist]"))||void 0===t||t.removeEventListener("change",this.boundSetSelectedOnChange),this._listenerAdded=!1),null===(i=this.observer)||void 0===i||i.disconnect()}render(){var t,i,e,d,o;return a("li",{key:"003e5b968c65ba01df1b97e8f75592aee31125d9",class:n("db-tab-item",this.className),role:"none"},a("label",{key:"682e5a3cf7036abcbbbbbba9f42ce534d7a4145d",htmlFor:null!==(t=this.id)&&void 0!==t?t:null===(i=this.propOverrides)||void 0===i?void 0:i.id,"data-icon":null!==(e=this.iconLeading)&&void 0!==e?e:this.icon,"data-icon-trailing":this.iconTrailing,"data-show-icon":s(this.showIconLeading,"showIconLeading")||s(this.showIcon,"showIcon"),"data-show-icon-trailing":s(this.showIconTrailing,"showIconTrailing"),"data-no-text":s(this.noText,"noText")},a("input",{key:"ffb91a8e7248a8e5a2a7a05c6828fc6203e1eb37",type:"radio",role:"tab",disabled:h(this.disabled,"disabled"),"aria-selected":this._selected,checked:h(this.checked,"checked"),ref:t=>{this._ref=t},name:this._name,id:null!==(d=this.id)&&void 0!==d?d:null===(o=this.propOverrides)||void 0===o?void 0:o.id,onInput:t=>this.handleChange(t)}),this.label?this.label:null,a("slot",{key:"2d079503cd365448cd054e05bfaec608ff476e04"})))}get rootElement(){return this}static get watchers(){return{_ref:[{watch0:0}],initialized:[{watch0:0}],boundSetSelectedOnChange:[{watch0:0}],name:[{watch1:0}]}}},[260,"db-tab-item",{active:[8],name:[1],className:[1,"classname"],id:[1],propOverrides:[16],iconLeading:[1,"icon-leading"],icon:[1],iconTrailing:[1,"icon-trailing"],showIconLeading:[8,"show-icon-leading"],showIcon:[8,"show-icon"],showIconTrailing:[8,"show-icon-trailing"],noText:[8,"no-text"],disabled:[8],checked:[8],label:[1],_selected:[32],_name:[32],initialized:[32],_listenerAdded:[32],boundSetSelectedOnChange:[32],observer:[32]},void 0,{_ref:[{watch0:0}],initialized:[{watch0:0}],boundSetSelectedOnChange:[{watch0:0}],name:[{watch1:0}]}]);function c(){"undefined"!=typeof customElements&&["db-tab-item"].forEach((t=>{"db-tab-item"===t&&(customElements.get(d(t))||customElements.define(d(t),o))}))}export{o as D,c as d}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{y as l,H as i,z as o,u as d,j as e,d as t,t as n}from"./p-CYYSsu3p.js";import{d as a}from"./p-D1orcIJf.js";import{d as s}from"./p-BEcb3EOO.js";import{d as v}from"./p-C4iD-won.js";const r=l(class extends i{constructor(l){super(),!1!==l&&this.__registerHost()}getHeaderCell(l){if(l.headerCell)return l}enableAttributePassing(l,i){const o=null==l?void 0:l.closest(i);if(l&&o){const i=o.attributes;for(let d=0;d<i.length;d++){const e=i.item(d);if(e&&"data-density"!==e.name&&(e.name.startsWith("data-")||e.name.startsWith("aria-")))e.value?l.setAttribute(e.name,e.value):l.removeAttribute(e.name),o.removeAttribute(e.name);else if(e&&["style"].includes(e.name))l.setAttribute(e.name,e.value),o.removeAttribute(e.name);else if(e&&"class"===e.name){const i=e.value.includes("hydrated"),d=e.value.replace("hydrated","").trim(),t=l.getAttribute("class");l.setAttribute(e.name,`${t||""}${d?` ${d}`:""}`),i?o.setAttribute("class","hydrated"):o.removeAttribute(e.name)}}}}componentDidLoad(){if("undefined"!=typeof document&&this.rootElement&&this.rootElement.dataset.connect){const l=document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);l&&l.remove()}this.enableAttributePassing(this._ref,"db-table-row")}render(){var l;return o("tr",{key:"d9ca9f14117c8cf3974110eb1a36cb7352c06c24",class:t("db-table-row",this.className),ref:l=>{this._ref=l},id:this.id,"data-interactive":e(this.interactive),"data-sub-header-emphasis":this.subHeaderEmphasis},this.cells?null===(l=this.cells)||void 0===l?void 0:l.map(((l,i)=>{var e,t,n,a,s,v,r,u,c,b,h,m,f,p,w,y,g,k,E,$,j,x,z,A,S,D,C,I,P,H,O,Y,B,J,L,N,T,q,F,G,K,M,Q,R,U,V,W;return l.headerCell?o("db-table-header-cell",{class:null!==(e=l.className)&&void 0!==e?e:l.class,key:`${null!==(n=null!==(t=l.id)&&void 0!==t?t:this.id)&&void 0!==n?n:d()}-table-row-header-cell-${i}`,id:l.id,abbr:null===(a=this.getHeaderCell(l))||void 0===a?void 0:a.abbr,scope:null===(s=this.getHeaderCell(l))||void 0===s?void 0:s.scope,noText:null===(v=this.getHeaderCell(l))||void 0===v?void 0:v.noText,horizontalAlignment:l.horizontalAlignment,verticalAlignment:l.verticalAlignment,headers:l.headers,colSpan:l.colSpan,colspan:l.colspan,rowSpan:l.rowSpan,rowspan:l.rowspan},l.link?o("db-link",{class:null!==(u=null===(r=l.link)||void 0===r?void 0:r.className)&&void 0!==u?u:null===(c=l.link)||void 0===c?void 0:c.class,content:null===(b=l.link)||void 0===b?void 0:b.content,size:null===(h=l.link)||void 0===h?void 0:h.size,variant:null===(m=l.link)||void 0===m?void 0:m.variant,id:null===(f=l.link)||void 0===f?void 0:f.id,autofocus:null===(p=l.link)||void 0===p?void 0:p.autofocus,disabled:null===(w=l.link)||void 0===w?void 0:w.disabled,href:null===(y=l.link)||void 0===y?void 0:y.href,hreflang:null===(g=l.link)||void 0===g?void 0:g.hreflang,target:null===(k=l.link)||void 0===k?void 0:k.target,rel:null===(E=l.link)||void 0===E?void 0:E.rel,referrerPolicy:null===($=l.link)||void 0===$?void 0:$.referrerPolicy,role:null===(j=l.link)||void 0===j?void 0:j.role,showIcon:null===(x=l.link)||void 0===x?void 0:x.showIcon,text:null===(z=l.link)||void 0===z?void 0:z.text,wrap:null===(A=l.link)||void 0===A?void 0:A.wrap},null===(S=l.link)||void 0===S?void 0:S.children):l.content):o("db-table-data-cell",{class:null!==(D=l.className)&&void 0!==D?D:l.class,key:`${null!==(I=null!==(C=l.id)&&void 0!==C?C:this.id)&&void 0!==I?I:d()}-table-row-data-cell-${i}`,id:l.id,horizontalAlignment:l.horizontalAlignment,verticalAlignment:l.verticalAlignment,headers:l.headers,colSpan:l.colSpan,colspan:l.colspan,rowSpan:l.rowSpan,rowspan:l.rowspan},l.link?o("db-link",{class:null!==(H=null===(P=l.link)||void 0===P?void 0:P.className)&&void 0!==H?H:null===(O=l.link)||void 0===O?void 0:O.class,content:null===(Y=l.link)||void 0===Y?void 0:Y.content,size:null===(B=l.link)||void 0===B?void 0:B.size,variant:null===(J=l.link)||void 0===J?void 0:J.variant,id:null===(L=l.link)||void 0===L?void 0:L.id,autofocus:null===(N=l.link)||void 0===N?void 0:N.autofocus,disabled:null===(T=l.link)||void 0===T?void 0:T.disabled,href:null===(q=l.link)||void 0===q?void 0:q.href,hreflang:null===(F=l.link)||void 0===F?void 0:F.hreflang,target:null===(G=l.link)||void 0===G?void 0:G.target,rel:null===(K=l.link)||void 0===K?void 0:K.rel,referrerPolicy:null===(M=l.link)||void 0===M?void 0:M.referrerPolicy,role:null===(Q=l.link)||void 0===Q?void 0:Q.role,showIcon:null===(R=l.link)||void 0===R?void 0:R.showIcon,text:null===(U=l.link)||void 0===U?void 0:U.text,wrap:null===(V=l.link)||void 0===V?void 0:V.wrap},null===(W=l.link)||void 0===W?void 0:W.children):l.content)})):o("slot",null))}get rootElement(){return this}},[260,"db-table-row",{id:[1],className:[1,"classname"],interactive:[8],subHeaderEmphasis:[1,"sub-header-emphasis"],cells:[16]}]);function u(){"undefined"!=typeof customElements&&["db-table-row","db-link","db-table-data-cell","db-table-header-cell"].forEach((l=>{switch(l){case"db-table-row":customElements.get(n(l))||customElements.define(n(l),r);break;case"db-link":customElements.get(n(l))||a();break;case"db-table-data-cell":customElements.get(n(l))||s();break;case"db-table-header-cell":customElements.get(n(l))||v()}}))}export{r as D,u as d}
|
|
@@ -10,6 +10,7 @@ const DBAccordionItem = class {
|
|
|
10
10
|
this._open = false;
|
|
11
11
|
this._name = undefined;
|
|
12
12
|
this.initialized = false;
|
|
13
|
+
this.observer = undefined;
|
|
13
14
|
}
|
|
14
15
|
handleNameAttribute() {
|
|
15
16
|
if (this._ref) {
|
|
@@ -33,6 +34,26 @@ const DBAccordionItem = class {
|
|
|
33
34
|
this._open = newStateOpen;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
37
|
+
setupObserver(element) {
|
|
38
|
+
if (!element)
|
|
39
|
+
return;
|
|
40
|
+
const parent = element.closest("db-accordion-item");
|
|
41
|
+
if (!parent || this.observer)
|
|
42
|
+
return;
|
|
43
|
+
this.observer = new MutationObserver((mutations) => {
|
|
44
|
+
if (mutations.some((mutation) => {
|
|
45
|
+
var _a;
|
|
46
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
47
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
48
|
+
})) {
|
|
49
|
+
this.enableAttributePassing(element, "db-accordion-item");
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
this.observer.observe(parent, {
|
|
53
|
+
attributes: true,
|
|
54
|
+
attributeOldValue: true,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
36
57
|
/**
|
|
37
58
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
38
59
|
* @param element the ref for the component
|
|
@@ -46,10 +67,15 @@ const DBAccordionItem = class {
|
|
|
46
67
|
const attr = attributes.item(i);
|
|
47
68
|
if (attr && attr.name !== 'data-density' &&
|
|
48
69
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
49
|
-
|
|
70
|
+
if (attr.value) {
|
|
71
|
+
element.setAttribute(attr.name, attr.value);
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
element.removeAttribute(attr.name);
|
|
75
|
+
}
|
|
50
76
|
parent.removeAttribute(attr.name);
|
|
51
77
|
}
|
|
52
|
-
else if (attr &&
|
|
78
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
53
79
|
element.setAttribute(attr.name, attr.value);
|
|
54
80
|
parent.removeAttribute(attr.name);
|
|
55
81
|
}
|
|
@@ -57,7 +83,7 @@ const DBAccordionItem = class {
|
|
|
57
83
|
const isWebComponent = attr.value.includes("hydrated");
|
|
58
84
|
const value = attr.value.replace("hydrated", "").trim();
|
|
59
85
|
const currentClass = element.getAttribute("class");
|
|
60
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
86
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
61
87
|
if (isWebComponent) {
|
|
62
88
|
// Stencil is using this class for lazy loading component
|
|
63
89
|
parent.setAttribute("class", "hydrated");
|
|
@@ -99,19 +125,30 @@ const DBAccordionItem = class {
|
|
|
99
125
|
}
|
|
100
126
|
}
|
|
101
127
|
this.enableAttributePassing(this._ref, "db-accordion-item");
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
128
|
+
const onMountHook_0 = () => {
|
|
129
|
+
if (this.defaultOpen) {
|
|
130
|
+
this._open = this.defaultOpen;
|
|
131
|
+
}
|
|
132
|
+
this.initialized = true;
|
|
133
|
+
};
|
|
134
|
+
onMountHook_0();
|
|
135
|
+
const onMountHook_1 = () => {
|
|
136
|
+
this.setupObserver(this._ref);
|
|
137
|
+
};
|
|
138
|
+
onMountHook_1();
|
|
106
139
|
this.watch0Fn();
|
|
107
140
|
this.watch1Fn();
|
|
108
141
|
this.watch2Fn();
|
|
109
142
|
}
|
|
143
|
+
disconnectedCallback() {
|
|
144
|
+
var _a;
|
|
145
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
146
|
+
}
|
|
110
147
|
render() {
|
|
111
148
|
var _a, _b;
|
|
112
|
-
return (index.h("li", { key: '
|
|
149
|
+
return (index.h("li", { key: '3c70e3a9542e8bd7d96e725381caf73e3ac7296a', class: index$1.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 }, index.h("details", { key: '326f88378a110e2eae8087deec3d333fa85b206e', "aria-disabled": index$1.getBooleanAsString(this.disabled, "disabled"), ref: (el) => {
|
|
113
150
|
this._ref = el;
|
|
114
|
-
}, name: this._name, open: this._open }, index.h("summary", { key: '
|
|
151
|
+
}, name: this._name, open: this._open }, index.h("summary", { key: '0dd759c18b3ec0bb4110613b073a248936827bfb', onClick: (event) => this.handleToggle(event) }, this.headlinePlain ? this.headlinePlain : null, !this.headlinePlain ? index.h("slot", { name: "headline" }) : null), index.h("div", { key: '44e7c57155828aa6465bde02aa4717e3161673f2' }, this.text ? this.text : null, index.h("slot", { key: '015b11e09045b96c43ec815916611ebd4b7ac4e3' })))));
|
|
115
152
|
}
|
|
116
153
|
get rootElement() { return index.getElement(this); }
|
|
117
154
|
static get watchers() { return {
|
|
@@ -9,6 +9,7 @@ const DBAccordion = class {
|
|
|
9
9
|
this._name = "";
|
|
10
10
|
this.initialized = false;
|
|
11
11
|
this._initOpenIndexDone = false;
|
|
12
|
+
this.observer = undefined;
|
|
12
13
|
}
|
|
13
14
|
convertItems() {
|
|
14
15
|
try {
|
|
@@ -22,6 +23,26 @@ const DBAccordion = class {
|
|
|
22
23
|
}
|
|
23
24
|
return [];
|
|
24
25
|
}
|
|
26
|
+
setupObserver(element) {
|
|
27
|
+
if (!element)
|
|
28
|
+
return;
|
|
29
|
+
const parent = element.closest("db-accordion");
|
|
30
|
+
if (!parent || this.observer)
|
|
31
|
+
return;
|
|
32
|
+
this.observer = new MutationObserver((mutations) => {
|
|
33
|
+
if (mutations.some((mutation) => {
|
|
34
|
+
var _a;
|
|
35
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
36
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
37
|
+
})) {
|
|
38
|
+
this.enableAttributePassing(element, "db-accordion");
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
this.observer.observe(parent, {
|
|
42
|
+
attributes: true,
|
|
43
|
+
attributeOldValue: true,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
25
46
|
/**
|
|
26
47
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
27
48
|
* @param element the ref for the component
|
|
@@ -35,10 +56,15 @@ const DBAccordion = class {
|
|
|
35
56
|
const attr = attributes.item(i);
|
|
36
57
|
if (attr && attr.name !== 'data-density' &&
|
|
37
58
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
38
|
-
|
|
59
|
+
if (attr.value) {
|
|
60
|
+
element.setAttribute(attr.name, attr.value);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
element.removeAttribute(attr.name);
|
|
64
|
+
}
|
|
39
65
|
parent.removeAttribute(attr.name);
|
|
40
66
|
}
|
|
41
|
-
else if (attr &&
|
|
67
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
42
68
|
element.setAttribute(attr.name, attr.value);
|
|
43
69
|
parent.removeAttribute(attr.name);
|
|
44
70
|
}
|
|
@@ -46,7 +72,7 @@ const DBAccordion = class {
|
|
|
46
72
|
const isWebComponent = attr.value.includes("hydrated");
|
|
47
73
|
const value = attr.value.replace("hydrated", "").trim();
|
|
48
74
|
const currentClass = element.getAttribute("class");
|
|
49
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
75
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
50
76
|
if (isWebComponent) {
|
|
51
77
|
// Stencil is using this class for lazy loading component
|
|
52
78
|
parent.setAttribute("class", "hydrated");
|
|
@@ -128,15 +154,26 @@ const DBAccordion = class {
|
|
|
128
154
|
}
|
|
129
155
|
}
|
|
130
156
|
this.enableAttributePassing(this._ref, "db-accordion");
|
|
131
|
-
|
|
132
|
-
|
|
157
|
+
const onMountHook_0 = () => {
|
|
158
|
+
this.initialized = true;
|
|
159
|
+
this._initOpenIndexDone = true;
|
|
160
|
+
};
|
|
161
|
+
onMountHook_0();
|
|
162
|
+
const onMountHook_1 = () => {
|
|
163
|
+
this.setupObserver(this._ref);
|
|
164
|
+
};
|
|
165
|
+
onMountHook_1();
|
|
133
166
|
this.watch0Fn();
|
|
134
167
|
this.watch1Fn();
|
|
135
168
|
this.watch2Fn();
|
|
136
169
|
}
|
|
170
|
+
disconnectedCallback() {
|
|
171
|
+
var _a;
|
|
172
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
173
|
+
}
|
|
137
174
|
render() {
|
|
138
175
|
var _a, _b, _c;
|
|
139
|
-
return (index.h("ul", { key: '
|
|
176
|
+
return (index.h("ul", { key: 'ca6ccc06f1846796371751f169585adfca380e3d', class: index$1.cls("db-accordion", this.className), ref: (el) => {
|
|
140
177
|
this._ref = el;
|
|
141
178
|
}, 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 ? index.h("slot", null) : null, this.items
|
|
142
179
|
? (_c = this.convertItems()) === null || _c === void 0 ? void 0 : _c.map((item, index$1) => (index.h("db-accordion-item", { key: `accordion-item-${index$1}`, headlinePlain: item.headlinePlain, disabled: item.disabled, text: item.text })))
|
|
@@ -8,6 +8,27 @@ const DBBadge = class {
|
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
10
|
this.initialized = false;
|
|
11
|
+
this.observer = undefined;
|
|
12
|
+
}
|
|
13
|
+
setupObserver(element) {
|
|
14
|
+
if (!element)
|
|
15
|
+
return;
|
|
16
|
+
const parent = element.closest("db-badge");
|
|
17
|
+
if (!parent || this.observer)
|
|
18
|
+
return;
|
|
19
|
+
this.observer = new MutationObserver((mutations) => {
|
|
20
|
+
if (mutations.some((mutation) => {
|
|
21
|
+
var _a;
|
|
22
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
23
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
24
|
+
})) {
|
|
25
|
+
this.enableAttributePassing(element, "db-badge");
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
this.observer.observe(parent, {
|
|
29
|
+
attributes: true,
|
|
30
|
+
attributeOldValue: true,
|
|
31
|
+
});
|
|
11
32
|
}
|
|
12
33
|
/**
|
|
13
34
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -22,10 +43,15 @@ const DBBadge = class {
|
|
|
22
43
|
const attr = attributes.item(i);
|
|
23
44
|
if (attr && attr.name !== 'data-density' &&
|
|
24
45
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
25
|
-
|
|
46
|
+
if (attr.value) {
|
|
47
|
+
element.setAttribute(attr.name, attr.value);
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
element.removeAttribute(attr.name);
|
|
51
|
+
}
|
|
26
52
|
parent.removeAttribute(attr.name);
|
|
27
53
|
}
|
|
28
|
-
else if (attr &&
|
|
54
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
29
55
|
element.setAttribute(attr.name, attr.value);
|
|
30
56
|
parent.removeAttribute(attr.name);
|
|
31
57
|
}
|
|
@@ -33,7 +59,7 @@ const DBBadge = class {
|
|
|
33
59
|
const isWebComponent = attr.value.includes("hydrated");
|
|
34
60
|
const value = attr.value.replace("hydrated", "").trim();
|
|
35
61
|
const currentClass = element.getAttribute("class");
|
|
36
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
62
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
37
63
|
if (isWebComponent) {
|
|
38
64
|
// Stencil is using this class for lazy loading component
|
|
39
65
|
parent.setAttribute("class", "hydrated");
|
|
@@ -71,14 +97,25 @@ const DBBadge = class {
|
|
|
71
97
|
}
|
|
72
98
|
}
|
|
73
99
|
this.enableAttributePassing(this._ref, "db-badge");
|
|
74
|
-
|
|
100
|
+
const onMountHook_0 = () => {
|
|
101
|
+
this.initialized = true;
|
|
102
|
+
};
|
|
103
|
+
onMountHook_0();
|
|
104
|
+
const onMountHook_1 = () => {
|
|
105
|
+
this.setupObserver(this._ref);
|
|
106
|
+
};
|
|
107
|
+
onMountHook_1();
|
|
75
108
|
this.watch0Fn();
|
|
76
109
|
}
|
|
110
|
+
disconnectedCallback() {
|
|
111
|
+
var _a;
|
|
112
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
113
|
+
}
|
|
77
114
|
render() {
|
|
78
115
|
var _a, _b, _c, _d;
|
|
79
|
-
return (index.h("span", { key: '
|
|
116
|
+
return (index.h("span", { key: '359727eb7aa15e2456b2b616c9157d6546aa1821', class: index$1.cls("db-badge", this.className), ref: (el) => {
|
|
80
117
|
this._ref = el;
|
|
81
|
-
}, 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": index$1.getBooleanAsString(this.wrap, "wrap"), "data-label": ((_c = this.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = this.label) !== null && _d !== void 0 ? _d : constants.DEFAULT_LABEL) }, this.text ? this.text : null, index.h("slot", { key: '
|
|
118
|
+
}, 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": index$1.getBooleanAsString(this.wrap, "wrap"), "data-label": ((_c = this.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = this.label) !== null && _d !== void 0 ? _d : constants.DEFAULT_LABEL) }, this.text ? this.text : null, index.h("slot", { key: '4540ec4549a70007f0192fad72b07fdb90005f0c' })));
|
|
82
119
|
}
|
|
83
120
|
get rootElement() { return index.getElement(this); }
|
|
84
121
|
static get watchers() { return {
|
|
@@ -7,6 +7,27 @@ var index$1 = require('./index-spuu3sXz.js');
|
|
|
7
7
|
const DBBrand = class {
|
|
8
8
|
constructor(hostRef) {
|
|
9
9
|
index.registerInstance(this, hostRef);
|
|
10
|
+
this.observer = undefined;
|
|
11
|
+
}
|
|
12
|
+
setupObserver(element) {
|
|
13
|
+
if (!element)
|
|
14
|
+
return;
|
|
15
|
+
const parent = element.closest("db-brand");
|
|
16
|
+
if (!parent || this.observer)
|
|
17
|
+
return;
|
|
18
|
+
this.observer = new MutationObserver((mutations) => {
|
|
19
|
+
if (mutations.some((mutation) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
22
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
23
|
+
})) {
|
|
24
|
+
this.enableAttributePassing(element, "db-brand");
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
this.observer.observe(parent, {
|
|
28
|
+
attributes: true,
|
|
29
|
+
attributeOldValue: true,
|
|
30
|
+
});
|
|
10
31
|
}
|
|
11
32
|
/**
|
|
12
33
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
@@ -21,10 +42,15 @@ const DBBrand = class {
|
|
|
21
42
|
const attr = attributes.item(i);
|
|
22
43
|
if (attr && attr.name !== 'data-density' &&
|
|
23
44
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
24
|
-
|
|
45
|
+
if (attr.value) {
|
|
46
|
+
element.setAttribute(attr.name, attr.value);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
element.removeAttribute(attr.name);
|
|
50
|
+
}
|
|
25
51
|
parent.removeAttribute(attr.name);
|
|
26
52
|
}
|
|
27
|
-
else if (attr &&
|
|
53
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
28
54
|
element.setAttribute(attr.name, attr.value);
|
|
29
55
|
parent.removeAttribute(attr.name);
|
|
30
56
|
}
|
|
@@ -32,7 +58,7 @@ const DBBrand = class {
|
|
|
32
58
|
const isWebComponent = attr.value.includes("hydrated");
|
|
33
59
|
const value = attr.value.replace("hydrated", "").trim();
|
|
34
60
|
const currentClass = element.getAttribute("class");
|
|
35
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
61
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
36
62
|
if (isWebComponent) {
|
|
37
63
|
// Stencil is using this class for lazy loading component
|
|
38
64
|
parent.setAttribute("class", "hydrated");
|
|
@@ -52,12 +78,17 @@ const DBBrand = class {
|
|
|
52
78
|
}
|
|
53
79
|
}
|
|
54
80
|
this.enableAttributePassing(this._ref, "db-brand");
|
|
81
|
+
this.setupObserver(this._ref);
|
|
82
|
+
}
|
|
83
|
+
disconnectedCallback() {
|
|
84
|
+
var _a;
|
|
85
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
55
86
|
}
|
|
56
87
|
render() {
|
|
57
88
|
var _a, _b, _c;
|
|
58
|
-
return (index.h("div", { key: '
|
|
89
|
+
return (index.h("div", { key: '1c27a0d77bc0862364161f6eabfb78c81a331fb1', class: index$1.cls("db-brand", this.className), ref: (el) => {
|
|
59
90
|
this._ref = el;
|
|
60
|
-
}, "data-icon": this.hideLogo ? "none" : (_a = this.icon) !== null && _a !== void 0 ? _a : constants.DEFAULT_ICON, "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), id: (_b = this.id) !== null && _b !== void 0 ? _b : (_c = this.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, index.h("slot", { key: '
|
|
91
|
+
}, "data-icon": this.hideLogo ? "none" : (_a = this.icon) !== null && _a !== void 0 ? _a : constants.DEFAULT_ICON, "data-show-icon": index$1.getBooleanAsString(this.showIcon, "showIcon"), id: (_b = this.id) !== null && _b !== void 0 ? _b : (_c = this.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, index.h("slot", { key: '58d2daa05934dcc42bfe0bdb08b8f60fc204064d' }), this.text ? this.text : null));
|
|
61
92
|
}
|
|
62
93
|
get rootElement() { return index.getElement(this); }
|
|
63
94
|
};
|
|
@@ -7,6 +7,7 @@ const DBButton = class {
|
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
index.registerInstance(this, hostRef);
|
|
9
9
|
this.click = index.createEvent(this, "click");
|
|
10
|
+
this.observer = undefined;
|
|
10
11
|
}
|
|
11
12
|
getButtonType() {
|
|
12
13
|
if (this.type) {
|
|
@@ -17,6 +18,26 @@ const DBButton = class {
|
|
|
17
18
|
}
|
|
18
19
|
return "submit";
|
|
19
20
|
}
|
|
21
|
+
setupObserver(element) {
|
|
22
|
+
if (!element)
|
|
23
|
+
return;
|
|
24
|
+
const parent = element.closest("db-button");
|
|
25
|
+
if (!parent || this.observer)
|
|
26
|
+
return;
|
|
27
|
+
this.observer = new MutationObserver((mutations) => {
|
|
28
|
+
if (mutations.some((mutation) => {
|
|
29
|
+
var _a;
|
|
30
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
31
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
32
|
+
})) {
|
|
33
|
+
this.enableAttributePassing(element, "db-button");
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
this.observer.observe(parent, {
|
|
37
|
+
attributes: true,
|
|
38
|
+
attributeOldValue: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
20
41
|
/**
|
|
21
42
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
22
43
|
* @param element the ref for the component
|
|
@@ -30,10 +51,15 @@ const DBButton = class {
|
|
|
30
51
|
const attr = attributes.item(i);
|
|
31
52
|
if (attr && attr.name !== 'data-density' &&
|
|
32
53
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
33
|
-
|
|
54
|
+
if (attr.value) {
|
|
55
|
+
element.setAttribute(attr.name, attr.value);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
element.removeAttribute(attr.name);
|
|
59
|
+
}
|
|
34
60
|
parent.removeAttribute(attr.name);
|
|
35
61
|
}
|
|
36
|
-
else if (attr &&
|
|
62
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
37
63
|
element.setAttribute(attr.name, attr.value);
|
|
38
64
|
parent.removeAttribute(attr.name);
|
|
39
65
|
}
|
|
@@ -41,7 +67,7 @@ const DBButton = class {
|
|
|
41
67
|
const isWebComponent = attr.value.includes("hydrated");
|
|
42
68
|
const value = attr.value.replace("hydrated", "").trim();
|
|
43
69
|
const currentClass = element.getAttribute("class");
|
|
44
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
70
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
45
71
|
if (isWebComponent) {
|
|
46
72
|
// Stencil is using this class for lazy loading component
|
|
47
73
|
parent.setAttribute("class", "hydrated");
|
|
@@ -61,13 +87,18 @@ const DBButton = class {
|
|
|
61
87
|
}
|
|
62
88
|
}
|
|
63
89
|
this.enableAttributePassing(this._ref, "db-button");
|
|
90
|
+
this.setupObserver(this._ref);
|
|
91
|
+
}
|
|
92
|
+
disconnectedCallback() {
|
|
93
|
+
var _a;
|
|
94
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
64
95
|
}
|
|
65
96
|
render() {
|
|
66
97
|
var _a, _b, _c;
|
|
67
|
-
return (index.h("button", { key: '
|
|
98
|
+
return (index.h("button", { key: 'b3c660955f667a8f8c93bb7c83360a44a5af3d1f', class: index$1.cls("db-button", this.className), ref: (el) => {
|
|
68
99
|
this._ref = el;
|
|
69
100
|
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, type: this.getButtonType(), disabled: index$1.getBoolean(this.disabled, "disabled"), "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": index$1.getBooleanAsString(this.showIconLeading, "showIconLeading") ||
|
|
70
|
-
index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing, "showIconTrailing"), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap"), "data-no-text": index$1.getBooleanAsString(this.noText, "noText"), name: this.name, form: this.form, value: this.value }, this.text ? this.text : null, index.h("slot", { key: '
|
|
101
|
+
index$1.getBooleanAsString(this.showIcon, "showIcon"), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing, "showIconTrailing"), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-wrap": index$1.getBooleanAsString(this.wrap, "wrap"), "data-no-text": index$1.getBooleanAsString(this.noText, "noText"), name: this.name, form: this.form, value: this.value }, this.text ? this.text : null, index.h("slot", { key: 'eb9c13e9573f61cdb3e61b5614fec0ad656c02b8' })));
|
|
71
102
|
}
|
|
72
103
|
get rootElement() { return index.getElement(this); }
|
|
73
104
|
};
|
|
@@ -7,12 +7,33 @@ const DBCard = class {
|
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
index.registerInstance(this, hostRef);
|
|
9
9
|
this.click = index.createEvent(this, "click");
|
|
10
|
+
this.observer = undefined;
|
|
10
11
|
}
|
|
11
12
|
handleClick(event) {
|
|
12
13
|
if (this.click) {
|
|
13
14
|
this.click.emit(event);
|
|
14
15
|
}
|
|
15
16
|
}
|
|
17
|
+
setupObserver(element) {
|
|
18
|
+
if (!element)
|
|
19
|
+
return;
|
|
20
|
+
const parent = element.closest("db-card");
|
|
21
|
+
if (!parent || this.observer)
|
|
22
|
+
return;
|
|
23
|
+
this.observer = new MutationObserver((mutations) => {
|
|
24
|
+
if (mutations.some((mutation) => {
|
|
25
|
+
var _a;
|
|
26
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
27
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
28
|
+
})) {
|
|
29
|
+
this.enableAttributePassing(element, "db-card");
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
this.observer.observe(parent, {
|
|
33
|
+
attributes: true,
|
|
34
|
+
attributeOldValue: true,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
16
37
|
/**
|
|
17
38
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
18
39
|
* @param element the ref for the component
|
|
@@ -26,10 +47,15 @@ const DBCard = class {
|
|
|
26
47
|
const attr = attributes.item(i);
|
|
27
48
|
if (attr && attr.name !== 'data-density' &&
|
|
28
49
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
29
|
-
|
|
50
|
+
if (attr.value) {
|
|
51
|
+
element.setAttribute(attr.name, attr.value);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
element.removeAttribute(attr.name);
|
|
55
|
+
}
|
|
30
56
|
parent.removeAttribute(attr.name);
|
|
31
57
|
}
|
|
32
|
-
else if (attr &&
|
|
58
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
33
59
|
element.setAttribute(attr.name, attr.value);
|
|
34
60
|
parent.removeAttribute(attr.name);
|
|
35
61
|
}
|
|
@@ -37,7 +63,7 @@ const DBCard = class {
|
|
|
37
63
|
const isWebComponent = attr.value.includes("hydrated");
|
|
38
64
|
const value = attr.value.replace("hydrated", "").trim();
|
|
39
65
|
const currentClass = element.getAttribute("class");
|
|
40
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
66
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
41
67
|
if (isWebComponent) {
|
|
42
68
|
// Stencil is using this class for lazy loading component
|
|
43
69
|
parent.setAttribute("class", "hydrated");
|
|
@@ -57,12 +83,17 @@ const DBCard = class {
|
|
|
57
83
|
}
|
|
58
84
|
}
|
|
59
85
|
this.enableAttributePassing(this._ref, "db-card");
|
|
86
|
+
this.setupObserver(this._ref);
|
|
87
|
+
}
|
|
88
|
+
disconnectedCallback() {
|
|
89
|
+
var _a;
|
|
90
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
60
91
|
}
|
|
61
92
|
render() {
|
|
62
93
|
var _a, _b;
|
|
63
|
-
return (index.h("div", { key: '
|
|
94
|
+
return (index.h("div", { key: '44419819c968f1a3882fc7618f9fa6627706e84d', class: index$1.cls("db-card", this.className), ref: (el) => {
|
|
64
95
|
this._ref = el;
|
|
65
|
-
}, 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) }, index.h("slot", { key: '
|
|
96
|
+
}, 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) }, index.h("slot", { key: '0854d0bbca92f6dd3bdea08f82872fbfb6567bfa' })));
|
|
66
97
|
}
|
|
67
98
|
get rootElement() { return index.getElement(this); }
|
|
68
99
|
};
|