@db-ux/wc-core-components 4.10.2 → 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 +24 -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.d.ts +11 -0
- package/bundle/db-table-body.js +1 -0
- package/bundle/db-table-caption.d.ts +11 -0
- package/bundle/db-table-caption.js +1 -0
- package/bundle/db-table-data-cell.d.ts +11 -0
- package/bundle/db-table-data-cell.js +1 -0
- package/bundle/db-table-footer.d.ts +11 -0
- package/bundle/db-table-footer.js +1 -0
- package/bundle/db-table-head.d.ts +11 -0
- package/bundle/db-table-head.js +1 -0
- package/bundle/db-table-header-cell.d.ts +11 -0
- package/bundle/db-table-header-cell.js +1 -0
- package/bundle/db-table-row.d.ts +11 -0
- package/bundle/db-table-row.js +1 -0
- package/bundle/db-table.d.ts +11 -0
- package/bundle/db-table.js +1 -0
- 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/index.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-CYYSsu3p.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/{dist/db-ux/p-D5mInaY7.js → bundle/p-D6L0n3gO.js} +1 -1
- package/bundle/p-D9RSX1St.js +1 -0
- package/bundle/p-DJTpgiBy.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 +48 -11
- package/dist/cjs/db-accordion.cjs.entry.js +45 -8
- package/dist/cjs/db-badge.cjs.entry.js +45 -8
- package/dist/cjs/db-brand.cjs.entry.js +38 -7
- package/dist/cjs/db-button.cjs.entry.js +40 -8
- package/dist/cjs/db-card.cjs.entry.js +38 -7
- package/dist/cjs/db-checkbox.cjs.entry.js +48 -14
- package/dist/cjs/db-custom-button.cjs.entry.js +40 -8
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +197 -37
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +38 -7
- package/dist/cjs/db-custom-select.cjs.entry.js +65 -31
- package/dist/cjs/db-divider.cjs.entry.js +37 -6
- package/dist/cjs/db-drawer.cjs.entry.js +47 -10
- package/dist/cjs/db-header.cjs.entry.js +45 -8
- package/dist/cjs/db-icon.cjs.entry.js +38 -7
- package/dist/cjs/db-infotext.cjs.entry.js +38 -7
- package/dist/cjs/db-link_4.cjs.entry.js +294 -0
- package/dist/cjs/db-navigation-item.cjs.entry.js +49 -12
- package/dist/cjs/db-navigation.cjs.entry.js +38 -7
- package/dist/cjs/db-notification.cjs.entry.js +38 -7
- package/dist/cjs/db-page.cjs.entry.js +50 -15
- package/dist/cjs/db-popover.cjs.entry.js +46 -9
- package/dist/cjs/db-radio.cjs.entry.js +45 -11
- package/dist/cjs/db-section.cjs.entry.js +38 -7
- package/dist/cjs/db-select.cjs.entry.js +49 -15
- package/dist/cjs/db-stack.cjs.entry.js +38 -7
- package/dist/cjs/db-switch.cjs.entry.js +48 -14
- package/dist/cjs/db-tab-item_3.cjs.entry.js +123 -23
- package/dist/cjs/db-table-body_3.cjs.entry.js +235 -0
- package/dist/cjs/{db-link.cjs.entry.js → db-table-caption.cjs.entry.js} +41 -11
- package/dist/cjs/db-table.cjs.entry.js +189 -0
- package/dist/cjs/db-tabs.cjs.entry.js +44 -10
- package/dist/cjs/db-textarea.cjs.entry.js +48 -13
- package/dist/cjs/db-tooltip.cjs.entry.js +147 -23
- package/dist/cjs/db-ux.cjs.js +2 -2
- package/dist/cjs/{document-click-listener-B2-xKJv3.js → document-click-listener-DdNXbErU.js} +1 -1
- package/dist/cjs/{document-scroll-listener-ChQ7XZRk.js → document-scroll-listener-CvAZ6uPr.js} +1 -1
- package/dist/cjs/{form-components-_ncB_U2D.js → form-components-CmQlkARp.js} +1 -1
- package/dist/cjs/{index-HN8AqU2e.js → index-C313bRqJ.js} +21 -0
- package/dist/cjs/{index-2_9ESkQu.js → index-spuu3sXz.js} +13 -8
- package/dist/cjs/index.cjs.js +23 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +8 -0
- 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 +44 -6
- package/dist/collection/components/button/button.js +48 -9
- package/dist/collection/components/card/card.js +43 -5
- package/dist/collection/components/checkbox/checkbox.js +48 -13
- package/dist/collection/components/custom-button/custom-button.js +48 -9
- package/dist/collection/components/custom-select/custom-select.js +64 -29
- 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 +39 -7
- 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 +44 -6
- package/dist/collection/components/infotext/infotext.js +44 -6
- package/dist/collection/components/input/input.js +56 -19
- 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 +50 -12
- package/dist/collection/components/notification/notification.js +44 -6
- 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 +50 -15
- package/dist/collection/components/stack/stack.js +43 -5
- package/dist/collection/components/switch/switch.js +51 -16
- package/dist/collection/components/tab-item/tab-item.js +51 -15
- 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/examples/data.js +258 -0
- package/dist/collection/components/table/index.js +2 -0
- package/dist/collection/components/table/model.js +6 -0
- package/dist/collection/components/table/table.js +510 -0
- package/dist/collection/components/table-body/index.js +2 -0
- package/dist/collection/components/table-body/model.js +1 -0
- package/dist/collection/components/table-body/table-body.js +149 -0
- package/dist/collection/components/table-caption/index.js +2 -0
- package/dist/collection/components/table-caption/model.js +1 -0
- package/dist/collection/components/table-caption/table-caption.js +154 -0
- package/dist/collection/components/table-data-cell/index.js +2 -0
- package/dist/collection/components/table-data-cell/model.js +1 -0
- package/dist/collection/components/table-data-cell/table-data-cell.js +303 -0
- package/dist/collection/components/table-footer/index.js +2 -0
- package/dist/collection/components/table-footer/model.js +1 -0
- package/dist/collection/components/table-footer/table-footer.js +149 -0
- package/dist/collection/components/table-head/index.js +2 -0
- package/dist/collection/components/table-head/model.js +1 -0
- package/dist/collection/components/table-head/table-head.js +185 -0
- package/dist/collection/components/table-header-cell/index.js +2 -0
- package/dist/collection/components/table-header-cell/model.js +1 -0
- package/dist/collection/components/table-header-cell/table-header-cell.js +381 -0
- package/dist/collection/components/table-row/index.js +2 -0
- package/dist/collection/components/table-row/model.js +1 -0
- package/dist/collection/components/table-row/table-row.js +207 -0
- package/dist/collection/components/tabs/tabs.js +44 -9
- package/dist/collection/components/tag/tag.js +44 -6
- package/dist/collection/components/textarea/textarea.js +48 -12
- package/dist/collection/components/tooltip/tooltip.js +150 -21
- package/dist/collection/index.js +16 -0
- package/dist/collection/shared/model.js +1 -1
- package/dist/collection/utils/index.js +13 -8
- package/dist/custom-elements.json +8189 -4307
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/index.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-BihrW11j.js +1 -0
- package/dist/db-ux/p-BlbKvvUv.js +2 -0
- package/{bundle/p-BLyvxOmU.js → dist/db-ux/p-BtImZ8Nt.js} +1 -1
- package/dist/db-ux/p-OOIf-5XP.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/db-ux/p-fumiz06Y.js +1 -0
- package/dist/esm/db-accordion-item.entry.js +48 -11
- package/dist/esm/db-accordion.entry.js +45 -8
- package/dist/esm/db-badge.entry.js +45 -8
- package/dist/esm/db-brand.entry.js +38 -7
- package/dist/esm/db-button.entry.js +40 -8
- package/dist/esm/db-card.entry.js +38 -7
- package/dist/esm/db-checkbox.entry.js +48 -14
- package/dist/esm/db-custom-button.entry.js +40 -8
- package/dist/esm/db-custom-select-dropdown_5.entry.js +197 -37
- package/dist/esm/db-custom-select-form-field.entry.js +38 -7
- package/dist/esm/db-custom-select.entry.js +65 -31
- package/dist/esm/db-divider.entry.js +37 -6
- package/dist/esm/db-drawer.entry.js +47 -10
- package/dist/esm/db-header.entry.js +45 -8
- package/dist/esm/db-icon.entry.js +38 -7
- package/dist/esm/db-infotext.entry.js +38 -7
- package/dist/esm/db-link_4.entry.js +289 -0
- package/dist/esm/db-navigation-item.entry.js +49 -12
- package/dist/esm/db-navigation.entry.js +38 -7
- package/dist/esm/db-notification.entry.js +38 -7
- package/dist/esm/db-page.entry.js +50 -15
- package/dist/esm/db-popover.entry.js +46 -9
- package/dist/esm/db-radio.entry.js +45 -11
- package/dist/esm/db-section.entry.js +38 -7
- package/dist/esm/db-select.entry.js +49 -15
- package/dist/esm/db-stack.entry.js +38 -7
- package/dist/esm/db-switch.entry.js +48 -14
- package/dist/esm/db-tab-item_3.entry.js +123 -23
- package/dist/esm/db-table-body_3.entry.js +231 -0
- package/dist/esm/{db-link.entry.js → db-table-caption.entry.js} +41 -11
- package/dist/esm/db-table.entry.js +187 -0
- package/dist/esm/db-tabs.entry.js +44 -10
- package/dist/esm/db-textarea.entry.js +48 -13
- package/dist/esm/db-tooltip.entry.js +147 -23
- package/dist/esm/db-ux.js +3 -3
- package/dist/esm/{document-click-listener-D7W_VE5O.js → document-click-listener-9wJfRcvz.js} +1 -1
- package/dist/esm/{document-scroll-listener-DOBe3Oa9.js → document-scroll-listener-4F0ZAg9p.js} +1 -1
- package/dist/esm/{form-components-D6LQfJvq.js → form-components-ZV7IN0oG.js} +1 -1
- package/dist/esm/{index-BGaQ0Bx8.js → index-BlbKvvUv.js} +21 -0
- package/dist/esm/{index-xkoBSP8R.js → index-fumiz06Y.js} +13 -8
- package/dist/esm/index.js +16 -5
- package/dist/esm/loader.js +3 -3
- 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/examples/data.d.ts +9 -0
- package/dist/types/components/table/index.d.ts +2 -0
- package/dist/types/components/table/model.d.ts +74 -0
- package/dist/types/components/table/table.d.ts +41 -0
- package/dist/types/components/table-body/index.d.ts +2 -0
- package/dist/types/components/table-body/model.d.ts +8 -0
- package/dist/types/components/table-body/table-body.d.ts +20 -0
- package/dist/types/components/table-caption/index.d.ts +2 -0
- package/dist/types/components/table-caption/model.d.ts +5 -0
- package/dist/types/components/table-caption/table-caption.d.ts +22 -0
- package/dist/types/components/table-data-cell/index.d.ts +2 -0
- package/dist/types/components/table-data-cell/model.d.ts +5 -0
- package/dist/types/components/table-data-cell/table-data-cell.d.ts +26 -0
- package/dist/types/components/table-footer/index.d.ts +2 -0
- package/dist/types/components/table-footer/model.d.ts +8 -0
- package/dist/types/components/table-footer/table-footer.d.ts +20 -0
- package/dist/types/components/table-head/index.d.ts +2 -0
- package/dist/types/components/table-head/model.d.ts +10 -0
- package/dist/types/components/table-head/table-head.d.ts +62 -0
- package/dist/types/components/table-header-cell/index.d.ts +2 -0
- package/dist/types/components/table-header-cell/model.d.ts +24 -0
- package/dist/types/components/table-header-cell/table-header-cell.d.ts +29 -0
- package/dist/types/components/table-row/index.d.ts +2 -0
- package/dist/types/components/table-row/model.d.ts +30 -0
- package/dist/types/components/table-row/table-row.d.ts +24 -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/types/components.d.ts +278 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/shared/figma.d.ts +70 -18
- package/dist/types/shared/model.d.ts +44 -2
- package/dist/types/utils/index.d.ts +9 -4
- package/dist/vscode.html-custom-data.json +400 -2
- package/dist/web-types.json +960 -177
- package/package.json +6 -6
- package/bundle/p--qzKkpB9.js +0 -1
- package/bundle/p-9fgrfYbf.js +0 -1
- package/bundle/p-B5E_0kTi.js +0 -1
- package/bundle/p-BChikMGc.js +0 -1
- package/bundle/p-BGVLpaFn.js +0 -1
- package/bundle/p-BPxBqqlc.js +0 -1
- package/bundle/p-C6_y8Tot.js +0 -1
- package/bundle/p-CKfRqzsn.js +0 -1
- package/bundle/p-CnYMRGX1.js +0 -1
- package/bundle/p-CwzdaLE3.js +0 -1
- package/bundle/p-CyxQfbGC.js +0 -1
- package/bundle/p-DisehhY5.js +0 -1
- package/bundle/p-DstwggLZ.js +0 -1
- package/bundle/p-LbPYp2oP.js +0 -1
- package/bundle/p-suxDlmXD.js +0 -1
- package/dist/db-ux/p-0f524f6c.entry.js +0 -1
- package/dist/db-ux/p-11211f1a.entry.js +0 -1
- package/dist/db-ux/p-1a4881de.entry.js +0 -1
- package/dist/db-ux/p-21e5f6d0.entry.js +0 -1
- package/dist/db-ux/p-2461e08a.entry.js +0 -1
- package/dist/db-ux/p-26b7e21f.entry.js +0 -1
- package/dist/db-ux/p-272bdffc.entry.js +0 -1
- package/dist/db-ux/p-32c359a9.entry.js +0 -1
- package/dist/db-ux/p-33606da9.entry.js +0 -1
- package/dist/db-ux/p-44391c06.entry.js +0 -1
- package/dist/db-ux/p-46e3033b.entry.js +0 -1
- package/dist/db-ux/p-4b99f205.entry.js +0 -1
- package/dist/db-ux/p-4c238643.entry.js +0 -1
- package/dist/db-ux/p-4c3a8823.entry.js +0 -1
- package/dist/db-ux/p-4d5201a3.entry.js +0 -1
- package/dist/db-ux/p-5eae34e7.entry.js +0 -1
- package/dist/db-ux/p-652739e4.entry.js +0 -1
- package/dist/db-ux/p-93a6b1ee.entry.js +0 -1
- package/dist/db-ux/p-94de5791.entry.js +0 -1
- package/dist/db-ux/p-9728504d.entry.js +0 -1
- package/dist/db-ux/p-BGaQ0Bx8.js +0 -2
- package/dist/db-ux/p-CHLgQ9vn.js +0 -1
- package/dist/db-ux/p-D_roHmuC.js +0 -1
- package/dist/db-ux/p-a6c3ceaa.entry.js +0 -1
- package/dist/db-ux/p-cd3cfb4e.entry.js +0 -1
- package/dist/db-ux/p-cf045f35.entry.js +0 -1
- package/dist/db-ux/p-d173eace.entry.js +0 -1
- package/dist/db-ux/p-d3ada4cb.entry.js +0 -1
- package/dist/db-ux/p-d858f147.entry.js +0 -1
- package/dist/db-ux/p-db71c251.entry.js +0 -1
- package/dist/db-ux/p-e2740857.entry.js +0 -1
- package/dist/db-ux/p-ed5b3877.entry.js +0 -1
- package/dist/db-ux/p-fd334f14.entry.js +0 -1
- package/dist/db-ux/p-fed0fc42.entry.js +0 -1
- package/dist/db-ux/p-xkoBSP8R.js +0 -1
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { cls, getBooleanAsString, uuid } from "../../utils";
|
|
2
|
+
import { h } from "@stencil/core";
|
|
3
|
+
/**
|
|
4
|
+
* @slot children - This is a default/unnamed slot
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
export class DBTableRow {
|
|
8
|
+
getHeaderCell(cell) {
|
|
9
|
+
if (cell.headerCell) {
|
|
10
|
+
return cell;
|
|
11
|
+
}
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
16
|
+
* @param element the ref for the component
|
|
17
|
+
* @param customElementSelector the custom element like `my-component`
|
|
18
|
+
*/
|
|
19
|
+
enableAttributePassing(element, customElementSelector) {
|
|
20
|
+
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
21
|
+
if (element && parent) {
|
|
22
|
+
const attributes = parent.attributes;
|
|
23
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
24
|
+
const attr = attributes.item(i);
|
|
25
|
+
if (attr && attr.name !== 'data-density' &&
|
|
26
|
+
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
27
|
+
if (attr.value) {
|
|
28
|
+
element.setAttribute(attr.name, attr.value);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
element.removeAttribute(attr.name);
|
|
32
|
+
}
|
|
33
|
+
parent.removeAttribute(attr.name);
|
|
34
|
+
}
|
|
35
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
36
|
+
element.setAttribute(attr.name, attr.value);
|
|
37
|
+
parent.removeAttribute(attr.name);
|
|
38
|
+
}
|
|
39
|
+
else if (attr && attr.name === "class") {
|
|
40
|
+
const isWebComponent = attr.value.includes("hydrated");
|
|
41
|
+
const value = attr.value.replace("hydrated", "").trim();
|
|
42
|
+
const currentClass = element.getAttribute("class");
|
|
43
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
44
|
+
if (isWebComponent) {
|
|
45
|
+
// Stencil is using this class for lazy loading component
|
|
46
|
+
parent.setAttribute("class", "hydrated");
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
parent.removeAttribute(attr.name);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
componentDidLoad() {
|
|
56
|
+
if (typeof document !== "undefined" && this.rootElement && this.rootElement.dataset.connect) {
|
|
57
|
+
const connectedElement = document.querySelector(`[data-connect-id="${this.rootElement.dataset.connect}"]`);
|
|
58
|
+
if (connectedElement) {
|
|
59
|
+
connectedElement.remove();
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
this.enableAttributePassing(this._ref, "db-table-row");
|
|
63
|
+
}
|
|
64
|
+
render() {
|
|
65
|
+
var _a;
|
|
66
|
+
return (h("tr", { key: 'd9ca9f14117c8cf3974110eb1a36cb7352c06c24', class: cls("db-table-row", this.className), ref: (el) => {
|
|
67
|
+
this._ref = el;
|
|
68
|
+
}, id: this.id, "data-interactive": getBooleanAsString(this.interactive), "data-sub-header-emphasis": this.subHeaderEmphasis }, this.cells ? ((_a = this.cells) === null || _a === void 0 ? void 0 : _a.map((cell, index) => {
|
|
69
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
|
|
70
|
+
return cell.headerCell ? (h("db-table-header-cell", { class: (_a = cell.className) !== null && _a !== void 0 ? _a : cell.class, key: `${(_c = (_b = cell.id) !== null && _b !== void 0 ? _b : this.id) !== null && _c !== void 0 ? _c : uuid()}-table-row-header-cell-${index}`, id: cell.id, abbr: (_d = this.getHeaderCell(cell)) === null || _d === void 0 ? void 0 : _d.abbr, scope: (_e = this.getHeaderCell(cell)) === null || _e === void 0 ? void 0 : _e.scope, noText: (_f = this.getHeaderCell(cell)) === null || _f === void 0 ? void 0 : _f.noText, horizontalAlignment: cell.horizontalAlignment, verticalAlignment: cell.verticalAlignment, headers: cell.headers, colSpan: cell.colSpan, colspan: cell.colspan, rowSpan: cell.rowSpan, rowspan: cell.rowspan }, cell.link ? (h("db-link", { class: (_h = (_g = cell.link) === null || _g === void 0 ? void 0 : _g.className) !== null && _h !== void 0 ? _h : (_j = cell.link) === null || _j === void 0 ? void 0 : _j.class, content: (_k = cell.link) === null || _k === void 0 ? void 0 : _k.content, size: (_l = cell.link) === null || _l === void 0 ? void 0 : _l.size, variant: (_m = cell.link) === null || _m === void 0 ? void 0 : _m.variant, id: (_o = cell.link) === null || _o === void 0 ? void 0 : _o.id, autofocus: (_p = cell.link) === null || _p === void 0 ? void 0 : _p.autofocus, disabled: (_q = cell.link) === null || _q === void 0 ? void 0 : _q.disabled, href: (_r = cell.link) === null || _r === void 0 ? void 0 : _r.href, hreflang: (_s = cell.link) === null || _s === void 0 ? void 0 : _s.hreflang, target: (_t = cell.link) === null || _t === void 0 ? void 0 : _t.target, rel: (_u = cell.link) === null || _u === void 0 ? void 0 : _u.rel, referrerPolicy: (_v = cell.link) === null || _v === void 0 ? void 0 : _v.referrerPolicy, role: (_w = cell.link) === null || _w === void 0 ? void 0 : _w.role, showIcon: (_x = cell.link) === null || _x === void 0 ? void 0 : _x.showIcon, text: (_y = cell.link) === null || _y === void 0 ? void 0 : _y.text, wrap: (_z = cell.link) === null || _z === void 0 ? void 0 : _z.wrap }, (_0 = cell.link) === null || _0 === void 0 ? void 0 : _0.children)) : (cell.content))) : (h("db-table-data-cell", { class: (_1 = cell.className) !== null && _1 !== void 0 ? _1 : cell.class, key: `${(_3 = (_2 = cell.id) !== null && _2 !== void 0 ? _2 : this.id) !== null && _3 !== void 0 ? _3 : uuid()}-table-row-data-cell-${index}`, id: cell.id, horizontalAlignment: cell.horizontalAlignment, verticalAlignment: cell.verticalAlignment, headers: cell.headers, colSpan: cell.colSpan, colspan: cell.colspan, rowSpan: cell.rowSpan, rowspan: cell.rowspan }, cell.link ? (h("db-link", { class: (_5 = (_4 = cell.link) === null || _4 === void 0 ? void 0 : _4.className) !== null && _5 !== void 0 ? _5 : (_6 = cell.link) === null || _6 === void 0 ? void 0 : _6.class, content: (_7 = cell.link) === null || _7 === void 0 ? void 0 : _7.content, size: (_8 = cell.link) === null || _8 === void 0 ? void 0 : _8.size, variant: (_9 = cell.link) === null || _9 === void 0 ? void 0 : _9.variant, id: (_10 = cell.link) === null || _10 === void 0 ? void 0 : _10.id, autofocus: (_11 = cell.link) === null || _11 === void 0 ? void 0 : _11.autofocus, disabled: (_12 = cell.link) === null || _12 === void 0 ? void 0 : _12.disabled, href: (_13 = cell.link) === null || _13 === void 0 ? void 0 : _13.href, hreflang: (_14 = cell.link) === null || _14 === void 0 ? void 0 : _14.hreflang, target: (_15 = cell.link) === null || _15 === void 0 ? void 0 : _15.target, rel: (_16 = cell.link) === null || _16 === void 0 ? void 0 : _16.rel, referrerPolicy: (_17 = cell.link) === null || _17 === void 0 ? void 0 : _17.referrerPolicy, role: (_18 = cell.link) === null || _18 === void 0 ? void 0 : _18.role, showIcon: (_19 = cell.link) === null || _19 === void 0 ? void 0 : _19.showIcon, text: (_20 = cell.link) === null || _20 === void 0 ? void 0 : _20.text, wrap: (_21 = cell.link) === null || _21 === void 0 ? void 0 : _21.wrap }, (_22 = cell.link) === null || _22 === void 0 ? void 0 : _22.children)) : (cell.content)));
|
|
71
|
+
})) : (h("slot", null))));
|
|
72
|
+
}
|
|
73
|
+
static get is() { return "db-table-row"; }
|
|
74
|
+
static get properties() {
|
|
75
|
+
return {
|
|
76
|
+
"id": {
|
|
77
|
+
"type": "string",
|
|
78
|
+
"mutable": false,
|
|
79
|
+
"complexType": {
|
|
80
|
+
"original": "DBTableRowProps[\"id\"]",
|
|
81
|
+
"resolved": "string",
|
|
82
|
+
"references": {
|
|
83
|
+
"DBTableRowProps": {
|
|
84
|
+
"location": "import",
|
|
85
|
+
"path": "./model",
|
|
86
|
+
"id": "src/components/table-row/model.ts::DBTableRowProps",
|
|
87
|
+
"referenceLocation": "DBTableRowProps"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": false,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [],
|
|
95
|
+
"text": ""
|
|
96
|
+
},
|
|
97
|
+
"getter": false,
|
|
98
|
+
"setter": false,
|
|
99
|
+
"reflect": false,
|
|
100
|
+
"attribute": "id"
|
|
101
|
+
},
|
|
102
|
+
"className": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "DBTableRowProps[\"className\"]",
|
|
107
|
+
"resolved": "string",
|
|
108
|
+
"references": {
|
|
109
|
+
"DBTableRowProps": {
|
|
110
|
+
"location": "import",
|
|
111
|
+
"path": "./model",
|
|
112
|
+
"id": "src/components/table-row/model.ts::DBTableRowProps",
|
|
113
|
+
"referenceLocation": "DBTableRowProps"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"required": false,
|
|
118
|
+
"optional": false,
|
|
119
|
+
"docs": {
|
|
120
|
+
"tags": [],
|
|
121
|
+
"text": ""
|
|
122
|
+
},
|
|
123
|
+
"getter": false,
|
|
124
|
+
"setter": false,
|
|
125
|
+
"reflect": false,
|
|
126
|
+
"attribute": "classname"
|
|
127
|
+
},
|
|
128
|
+
"interactive": {
|
|
129
|
+
"type": "any",
|
|
130
|
+
"mutable": false,
|
|
131
|
+
"complexType": {
|
|
132
|
+
"original": "DBTableRowProps[\"interactive\"]",
|
|
133
|
+
"resolved": "boolean | string",
|
|
134
|
+
"references": {
|
|
135
|
+
"DBTableRowProps": {
|
|
136
|
+
"location": "import",
|
|
137
|
+
"path": "./model",
|
|
138
|
+
"id": "src/components/table-row/model.ts::DBTableRowProps",
|
|
139
|
+
"referenceLocation": "DBTableRowProps"
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": ""
|
|
148
|
+
},
|
|
149
|
+
"getter": false,
|
|
150
|
+
"setter": false,
|
|
151
|
+
"reflect": false,
|
|
152
|
+
"attribute": "interactive"
|
|
153
|
+
},
|
|
154
|
+
"subHeaderEmphasis": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"mutable": false,
|
|
157
|
+
"complexType": {
|
|
158
|
+
"original": "DBTableRowProps[\"subHeaderEmphasis\"]",
|
|
159
|
+
"resolved": "\"none\" | \"strong\" | \"weak\"",
|
|
160
|
+
"references": {
|
|
161
|
+
"DBTableRowProps": {
|
|
162
|
+
"location": "import",
|
|
163
|
+
"path": "./model",
|
|
164
|
+
"id": "src/components/table-row/model.ts::DBTableRowProps",
|
|
165
|
+
"referenceLocation": "DBTableRowProps"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
"required": false,
|
|
170
|
+
"optional": false,
|
|
171
|
+
"docs": {
|
|
172
|
+
"tags": [],
|
|
173
|
+
"text": ""
|
|
174
|
+
},
|
|
175
|
+
"getter": false,
|
|
176
|
+
"setter": false,
|
|
177
|
+
"reflect": false,
|
|
178
|
+
"attribute": "sub-header-emphasis"
|
|
179
|
+
},
|
|
180
|
+
"cells": {
|
|
181
|
+
"type": "unknown",
|
|
182
|
+
"mutable": false,
|
|
183
|
+
"complexType": {
|
|
184
|
+
"original": "DBTableRowProps[\"cells\"]",
|
|
185
|
+
"resolved": "DBTableRowCell[]",
|
|
186
|
+
"references": {
|
|
187
|
+
"DBTableRowProps": {
|
|
188
|
+
"location": "import",
|
|
189
|
+
"path": "./model",
|
|
190
|
+
"id": "src/components/table-row/model.ts::DBTableRowProps",
|
|
191
|
+
"referenceLocation": "DBTableRowProps"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
"required": false,
|
|
196
|
+
"optional": false,
|
|
197
|
+
"docs": {
|
|
198
|
+
"tags": [],
|
|
199
|
+
"text": ""
|
|
200
|
+
},
|
|
201
|
+
"getter": false,
|
|
202
|
+
"setter": false
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
static get elementRef() { return "rootElement"; }
|
|
207
|
+
}
|
|
@@ -12,6 +12,7 @@ export class DBTabs {
|
|
|
12
12
|
this.showScrollRight = false;
|
|
13
13
|
this.scrollContainer = null;
|
|
14
14
|
this._resizeObserver = undefined;
|
|
15
|
+
this.observer = undefined;
|
|
15
16
|
}
|
|
16
17
|
convertTabs() {
|
|
17
18
|
try {
|
|
@@ -132,6 +133,26 @@ export class DBTabs {
|
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
135
|
}
|
|
136
|
+
setupObserver(element) {
|
|
137
|
+
if (!element)
|
|
138
|
+
return;
|
|
139
|
+
const parent = element.closest("db-tabs");
|
|
140
|
+
if (!parent || this.observer)
|
|
141
|
+
return;
|
|
142
|
+
this.observer = new MutationObserver((mutations) => {
|
|
143
|
+
if (mutations.some((mutation) => {
|
|
144
|
+
var _a;
|
|
145
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
146
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
147
|
+
})) {
|
|
148
|
+
this.enableAttributePassing(element, "db-tabs");
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
this.observer.observe(parent, {
|
|
152
|
+
attributes: true,
|
|
153
|
+
attributeOldValue: true,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
135
156
|
/**
|
|
136
157
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
137
158
|
* @param element the ref for the component
|
|
@@ -145,10 +166,15 @@ export class DBTabs {
|
|
|
145
166
|
const attr = attributes.item(i);
|
|
146
167
|
if (attr && attr.name !== 'data-density' &&
|
|
147
168
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
148
|
-
|
|
169
|
+
if (attr.value) {
|
|
170
|
+
element.setAttribute(attr.name, attr.value);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
element.removeAttribute(attr.name);
|
|
174
|
+
}
|
|
149
175
|
parent.removeAttribute(attr.name);
|
|
150
176
|
}
|
|
151
|
-
else if (attr &&
|
|
177
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
152
178
|
element.setAttribute(attr.name, attr.value);
|
|
153
179
|
parent.removeAttribute(attr.name);
|
|
154
180
|
}
|
|
@@ -156,7 +182,7 @@ export class DBTabs {
|
|
|
156
182
|
const isWebComponent = attr.value.includes("hydrated");
|
|
157
183
|
const value = attr.value.replace("hydrated", "").trim();
|
|
158
184
|
const currentClass = element.getAttribute("class");
|
|
159
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
185
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
160
186
|
if (isWebComponent) {
|
|
161
187
|
// Stencil is using this class for lazy loading component
|
|
162
188
|
parent.setAttribute("class", "hydrated");
|
|
@@ -201,21 +227,29 @@ export class DBTabs {
|
|
|
201
227
|
}
|
|
202
228
|
}
|
|
203
229
|
this.enableAttributePassing(this._ref, "db-tabs");
|
|
204
|
-
|
|
205
|
-
|
|
230
|
+
const onMountHook_0 = () => {
|
|
231
|
+
this._name = `tabs-${this.name || uuid()}`;
|
|
232
|
+
this.initialized = true;
|
|
233
|
+
};
|
|
234
|
+
onMountHook_0();
|
|
235
|
+
const onMountHook_1 = () => {
|
|
236
|
+
this.setupObserver(this._ref);
|
|
237
|
+
};
|
|
238
|
+
onMountHook_1();
|
|
206
239
|
this.watch0Fn();
|
|
207
240
|
}
|
|
208
241
|
disconnectedCallback() {
|
|
209
|
-
var _a;
|
|
242
|
+
var _a, _b;
|
|
210
243
|
(_a = this._resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
211
244
|
this._resizeObserver = undefined;
|
|
245
|
+
(_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
212
246
|
}
|
|
213
247
|
render() {
|
|
214
248
|
var _a, _b, _c, _d, _e, _f;
|
|
215
|
-
return (h("div", { key: '
|
|
249
|
+
return (h("div", { key: 'aca0d156b8d50c5951a982e5ab35d2644b4989e7', class: cls("db-tabs", this.className), ref: (el) => {
|
|
216
250
|
this._ref = el;
|
|
217
251
|
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-orientation": this.orientation, "data-scroll-behavior": this.behavior, "data-alignment": (_c = this.alignment) !== null && _c !== void 0 ? _c : "start", "data-width": (_d = this.width) !== null && _d !== void 0 ? _d : "auto", onInput: (event) => this.handleChange(event), onChange: (event) => this.handleChange(event) }, this.showScrollLeft ? (h("db-button", { class: "tabs-scroll-left", variant: "ghost", icon: "chevron_left", type: "button", noText: true, onClick: () => this.scroll(true) }, "Scroll left")) : null, this.tabs ? (h(Fragment, null, h("db-tab-list", null, (_e = this.convertTabs()) === null || _e === void 0 ? void 0 : _e.map((tab, index) => (h("db-tab-item", { key: this.name + "tab-item" + index, active: tab.active, label: tab.label, iconTrailing: tab.iconTrailing, icon: tab.icon, noText: tab.noText })))), (_f = this.convertTabs()) === null || _f === void 0 ? void 0 :
|
|
218
|
-
_f.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, content: tab.content }, tab.children))))) : null, this.showScrollRight ? (h("db-button", { class: "tabs-scroll-right", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null, h("slot", { key: '
|
|
252
|
+
_f.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, content: tab.content }, tab.children))))) : null, this.showScrollRight ? (h("db-button", { class: "tabs-scroll-right", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null, h("slot", { key: 'b05907467917bb82f9ef6b9ce3774e52411fb822' })));
|
|
219
253
|
}
|
|
220
254
|
static get is() { return "db-tabs"; }
|
|
221
255
|
static get properties() {
|
|
@@ -539,7 +573,8 @@ export class DBTabs {
|
|
|
539
573
|
"showScrollLeft": {},
|
|
540
574
|
"showScrollRight": {},
|
|
541
575
|
"scrollContainer": {},
|
|
542
|
-
"_resizeObserver": {}
|
|
576
|
+
"_resizeObserver": {},
|
|
577
|
+
"observer": {}
|
|
543
578
|
};
|
|
544
579
|
}
|
|
545
580
|
static get events() {
|
|
@@ -6,6 +6,9 @@ import { h } from "@stencil/core";
|
|
|
6
6
|
* @slot content - TODO: Add description for slotContent
|
|
7
7
|
*/
|
|
8
8
|
export class DBTag {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.observer = undefined;
|
|
11
|
+
}
|
|
9
12
|
handleRemove(event) {
|
|
10
13
|
if (!event)
|
|
11
14
|
return;
|
|
@@ -21,6 +24,26 @@ export class DBTag {
|
|
|
21
24
|
// TODO: We should think this through again, if we would really like to have default and especially english, instead of german labels in here
|
|
22
25
|
return DEFAULT_REMOVE;
|
|
23
26
|
}
|
|
27
|
+
setupObserver(element) {
|
|
28
|
+
if (!element)
|
|
29
|
+
return;
|
|
30
|
+
const parent = element.closest("db-tag");
|
|
31
|
+
if (!parent || this.observer)
|
|
32
|
+
return;
|
|
33
|
+
this.observer = new MutationObserver((mutations) => {
|
|
34
|
+
if (mutations.some((mutation) => {
|
|
35
|
+
var _a;
|
|
36
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
37
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
38
|
+
})) {
|
|
39
|
+
this.enableAttributePassing(element, "db-tag");
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
this.observer.observe(parent, {
|
|
43
|
+
attributes: true,
|
|
44
|
+
attributeOldValue: true,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
24
47
|
/**
|
|
25
48
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
26
49
|
* @param element the ref for the component
|
|
@@ -34,10 +57,15 @@ export class DBTag {
|
|
|
34
57
|
const attr = attributes.item(i);
|
|
35
58
|
if (attr && attr.name !== 'data-density' &&
|
|
36
59
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
37
|
-
|
|
60
|
+
if (attr.value) {
|
|
61
|
+
element.setAttribute(attr.name, attr.value);
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
element.removeAttribute(attr.name);
|
|
65
|
+
}
|
|
38
66
|
parent.removeAttribute(attr.name);
|
|
39
67
|
}
|
|
40
|
-
else if (attr &&
|
|
68
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
41
69
|
element.setAttribute(attr.name, attr.value);
|
|
42
70
|
parent.removeAttribute(attr.name);
|
|
43
71
|
}
|
|
@@ -45,7 +73,7 @@ export class DBTag {
|
|
|
45
73
|
const isWebComponent = attr.value.includes("hydrated");
|
|
46
74
|
const value = attr.value.replace("hydrated", "").trim();
|
|
47
75
|
const currentClass = element.getAttribute("class");
|
|
48
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
76
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
49
77
|
if (isWebComponent) {
|
|
50
78
|
// Stencil is using this class for lazy loading component
|
|
51
79
|
parent.setAttribute("class", "hydrated");
|
|
@@ -65,12 +93,17 @@ export class DBTag {
|
|
|
65
93
|
}
|
|
66
94
|
}
|
|
67
95
|
this.enableAttributePassing(this._ref, "db-tag");
|
|
96
|
+
this.setupObserver(this._ref);
|
|
97
|
+
}
|
|
98
|
+
disconnectedCallback() {
|
|
99
|
+
var _a;
|
|
100
|
+
(_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
68
101
|
}
|
|
69
102
|
render() {
|
|
70
103
|
var _a, _b, _c;
|
|
71
|
-
return (h("div", { key: '
|
|
104
|
+
return (h("div", { key: '22654726ea465c2b07942705dfcf72162c11e314', class: cls("db-tag", this.className), ref: (el) => {
|
|
72
105
|
this._ref = el;
|
|
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-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: '
|
|
106
|
+
}, 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, "showCheckState"), "data-show-icon": getBooleanAsString(this.showIcon, "showIcon"), "data-no-text": getBooleanAsString(this.noText, "noText"), "data-overflow": getBooleanAsString(this.overflow, "overflow") }, h("slot", { key: '284aa3b6bce1595939f667e8a511319879545e27', name: "content" }), this.text ? this.text : null, h("slot", { key: '7471ead10bf5f95654444020e6b76d0b2f64486b' }), 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));
|
|
74
107
|
}
|
|
75
108
|
static get is() { return "db-tag"; }
|
|
76
109
|
static get properties() {
|
|
@@ -234,7 +267,7 @@ export class DBTag {
|
|
|
234
267
|
"mutable": false,
|
|
235
268
|
"complexType": {
|
|
236
269
|
"original": "DBTagProps[\"icon\"]",
|
|
237
|
-
"resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
|
|
270
|
+
"resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"arrows_vertical\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"more_vertical\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
|
|
238
271
|
"references": {
|
|
239
272
|
"DBTagProps": {
|
|
240
273
|
"location": "import",
|
|
@@ -413,6 +446,11 @@ export class DBTag {
|
|
|
413
446
|
}
|
|
414
447
|
};
|
|
415
448
|
}
|
|
449
|
+
static get states() {
|
|
450
|
+
return {
|
|
451
|
+
"observer": {}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
416
454
|
static get events() {
|
|
417
455
|
return [{
|
|
418
456
|
"method": "remove",
|
|
@@ -17,6 +17,7 @@ export class DBTextarea {
|
|
|
17
17
|
this._value = "";
|
|
18
18
|
this._voiceOverFallback = "";
|
|
19
19
|
this.abortController = undefined;
|
|
20
|
+
this.observer = undefined;
|
|
20
21
|
}
|
|
21
22
|
hasValidState() {
|
|
22
23
|
var _a;
|
|
@@ -33,7 +34,7 @@ export class DBTextarea {
|
|
|
33
34
|
DEFAULT_INVALID_MESSAGE;
|
|
34
35
|
if (hasVoiceOver()) {
|
|
35
36
|
this._voiceOverFallback = this._invalidMessage;
|
|
36
|
-
delay(() => (this._voiceOverFallback = ""), 1000);
|
|
37
|
+
void delay(() => (this._voiceOverFallback = ""), 1000);
|
|
37
38
|
}
|
|
38
39
|
}
|
|
39
40
|
else if (this.hasValidState() &&
|
|
@@ -42,7 +43,7 @@ export class DBTextarea {
|
|
|
42
43
|
this._descByIds = this._validMessageId;
|
|
43
44
|
if (hasVoiceOver()) {
|
|
44
45
|
this._voiceOverFallback = (_d = this.validMessage) !== null && _d !== void 0 ? _d : DEFAULT_VALID_MESSAGE;
|
|
45
|
-
delay(() => (this._voiceOverFallback = ""), 1000);
|
|
46
|
+
void delay(() => (this._voiceOverFallback = ""), 1000);
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
49
|
else if (stringPropVisible(this.message, this.showMessage)) {
|
|
@@ -82,6 +83,26 @@ export class DBTextarea {
|
|
|
82
83
|
this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
83
84
|
this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
84
85
|
}
|
|
86
|
+
setupObserver(element) {
|
|
87
|
+
if (!element)
|
|
88
|
+
return;
|
|
89
|
+
const parent = element.closest("db-textarea");
|
|
90
|
+
if (!parent || this.observer)
|
|
91
|
+
return;
|
|
92
|
+
this.observer = new MutationObserver((mutations) => {
|
|
93
|
+
if (mutations.some((mutation) => {
|
|
94
|
+
var _a;
|
|
95
|
+
const attr = mutation.target.attributes.getNamedItem((_a = mutation.attributeName) !== null && _a !== void 0 ? _a : "");
|
|
96
|
+
return (attr === null || attr === void 0 ? void 0 : attr.value) !== mutation.oldValue;
|
|
97
|
+
})) {
|
|
98
|
+
this.enableAttributePassing(element, "db-textarea");
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
this.observer.observe(parent, {
|
|
102
|
+
attributes: true,
|
|
103
|
+
attributeOldValue: true,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
85
106
|
/**
|
|
86
107
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
87
108
|
* @param element the ref for the component
|
|
@@ -95,10 +116,15 @@ export class DBTextarea {
|
|
|
95
116
|
const attr = attributes.item(i);
|
|
96
117
|
if (attr && attr.name !== 'data-density' &&
|
|
97
118
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
98
|
-
|
|
119
|
+
if (attr.value) {
|
|
120
|
+
element.setAttribute(attr.name, attr.value);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
element.removeAttribute(attr.name);
|
|
124
|
+
}
|
|
99
125
|
parent.removeAttribute(attr.name);
|
|
100
126
|
}
|
|
101
|
-
else if (attr &&
|
|
127
|
+
else if (attr && ["style"].includes(attr.name)) {
|
|
102
128
|
element.setAttribute(attr.name, attr.value);
|
|
103
129
|
parent.removeAttribute(attr.name);
|
|
104
130
|
}
|
|
@@ -106,7 +132,7 @@ export class DBTextarea {
|
|
|
106
132
|
const isWebComponent = attr.value.includes("hydrated");
|
|
107
133
|
const value = attr.value.replace("hydrated", "").trim();
|
|
108
134
|
const currentClass = element.getAttribute("class");
|
|
109
|
-
element.setAttribute(attr.name, `${currentClass ?
|
|
135
|
+
element.setAttribute(attr.name, `${currentClass ? currentClass : ""}${value ? ` ${value}` : ""}`);
|
|
110
136
|
if (isWebComponent) {
|
|
111
137
|
// Stencil is using this class for lazy loading component
|
|
112
138
|
parent.setAttribute("class", "hydrated");
|
|
@@ -189,8 +215,15 @@ export class DBTextarea {
|
|
|
189
215
|
}
|
|
190
216
|
}
|
|
191
217
|
this.enableAttributePassing(this._ref, "db-textarea");
|
|
192
|
-
|
|
193
|
-
|
|
218
|
+
const onMountHook_0 = () => {
|
|
219
|
+
this.resetIds();
|
|
220
|
+
this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;
|
|
221
|
+
};
|
|
222
|
+
onMountHook_0();
|
|
223
|
+
const onMountHook_1 = () => {
|
|
224
|
+
this.setupObserver(this._ref);
|
|
225
|
+
};
|
|
226
|
+
onMountHook_1();
|
|
194
227
|
this.watch0Fn();
|
|
195
228
|
this.watch1Fn();
|
|
196
229
|
this.watch2Fn();
|
|
@@ -198,15 +231,17 @@ export class DBTextarea {
|
|
|
198
231
|
this.watch4Fn();
|
|
199
232
|
}
|
|
200
233
|
disconnectedCallback() {
|
|
201
|
-
var _a;
|
|
234
|
+
var _a, _b;
|
|
202
235
|
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
236
|
+
(_b = this.observer) === null || _b === void 0 ? void 0 : _b.disconnect();
|
|
203
237
|
}
|
|
204
238
|
render() {
|
|
205
239
|
var _a, _b, _c, _d, _e, _f;
|
|
206
|
-
return (h("div", { key: '
|
|
240
|
+
return (h("div", { key: '86667d91fc82e602b09ee517a82fff23d97966e7', class: cls("db-textarea", this.className), "data-variant": this.variant, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: '27de9316b7e31d3f72b70ec38413d53a6aa54e3a', htmlFor: this._id }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL), h("textarea", { key: '7316f18f473c980ba1cccf4fd52e84b8dc7a98cd', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
|
|
207
241
|
this._ref = el;
|
|
208
242
|
}, id: this._id, "data-resize": this.resize, "data-hide-resizer": getHideProp((_b = this.showResizer) !== null && _b !== void 0 ? _b : true), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), readOnly: getBoolean(this.readOnly, "readOnly") ||
|
|
209
|
-
getBoolean(this.readonly, "readonly")
|
|
243
|
+
getBoolean(this.readonly, "readonly") ||
|
|
244
|
+
undefined, form: this.form, maxLength: getNumber(this.maxLength, this.maxlength), minLength: getNumber(this.minLength, this.minlength), name: this.name, wrap: this.wrap, spellcheck: this.spellCheck, autocomplete: this.autocomplete, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), value: (_d = (_c = this.value) !== null && _c !== void 0 ? _c : this._value) !== null && _d !== void 0 ? _d : "", "aria-describedby": (_e = this.ariaDescribedBy) !== null && _e !== void 0 ? _e : this._descByIds, placeholder: (_f = this.placeholder) !== null && _f !== void 0 ? _f : DEFAULT_PLACEHOLDER, rows: getNumber(this.rows, DEFAULT_ROWS), cols: getNumber(this.cols) }), 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: '86ad7a246adc37d20e4b0314429202797520f39e', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '594923a0e9bb1ebd905c665c4f3d185b2f425bd5', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
210
245
|
}
|
|
211
246
|
static get is() { return "db-textarea"; }
|
|
212
247
|
static get properties() {
|
|
@@ -1072,7 +1107,7 @@ export class DBTextarea {
|
|
|
1072
1107
|
"mutable": false,
|
|
1073
1108
|
"complexType": {
|
|
1074
1109
|
"original": "DBTextareaProps[\"messageIcon\"]",
|
|
1075
|
-
"resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
|
|
1110
|
+
"resolved": "\"arrow_down\" | \"arrow_left\" | \"arrow_right\" | \"arrow_up\" | \"arrow_up_right\" | \"arrows_vertical\" | \"brand\" | \"calendar\" | \"chat\" | \"check\" | \"check_circle\" | \"chevron_down\" | \"chevron_left\" | \"chevron_right\" | \"chevron_up\" | \"circle\" | \"circle_small\" | \"circular_arrows\" | \"clock\" | \"copy\" | \"cross\" | \"cross_circle\" | \"double_chevron_down\" | \"double_chevron_left\" | \"double_chevron_right\" | \"double_chevron_up\" | \"exclamation_mark_circle\" | \"exclamation_mark_triangle\" | \"eye\" | \"eye_disabled\" | \"house\" | \"information_circle\" | \"magnifying_glass\" | \"menu\" | \"minus\" | \"moon\" | \"more_vertical\" | \"plus\" | \"resize_handle_corner\" | \"sun\" | \"x_placeholder\" | string & Record<never, never>",
|
|
1076
1111
|
"references": {
|
|
1077
1112
|
"DBTextareaProps": {
|
|
1078
1113
|
"location": "import",
|
|
@@ -1105,7 +1140,8 @@ export class DBTextarea {
|
|
|
1105
1140
|
"_descByIds": {},
|
|
1106
1141
|
"_value": {},
|
|
1107
1142
|
"_voiceOverFallback": {},
|
|
1108
|
-
"abortController": {}
|
|
1143
|
+
"abortController": {},
|
|
1144
|
+
"observer": {}
|
|
1109
1145
|
};
|
|
1110
1146
|
}
|
|
1111
1147
|
static get events() {
|