@db-ux/wc-core-components 1.1.1 → 1.2.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/README.md +1 -1
- package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/{constants-89822e5f.js → constants-C75d4JiJ.js} +2 -1
- package/dist/cjs/constants-C75d4JiJ.js.map +1 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js +5 -6
- package/dist/cjs/db-accordion-item.cjs.entry.js.map +1 -1
- package/dist/cjs/db-accordion-item.entry.cjs.js.map +1 -0
- package/dist/cjs/db-accordion.cjs.entry.js +4 -5
- package/dist/cjs/db-accordion.cjs.entry.js.map +1 -1
- package/dist/cjs/db-accordion.entry.cjs.js.map +1 -0
- package/dist/cjs/db-badge.cjs.entry.js +4 -5
- package/dist/cjs/db-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/db-badge.entry.cjs.js.map +1 -0
- package/dist/cjs/db-brand.cjs.entry.js +4 -5
- package/dist/cjs/db-brand.cjs.entry.js.map +1 -1
- package/dist/cjs/db-brand.entry.cjs.js.map +1 -0
- package/dist/cjs/db-button.cjs.entry.js +4 -5
- package/dist/cjs/db-button.cjs.entry.js.map +1 -1
- package/dist/cjs/db-button.entry.cjs.js.map +1 -0
- package/dist/cjs/db-card.cjs.entry.js +4 -5
- package/dist/cjs/db-card.cjs.entry.js.map +1 -1
- package/dist/cjs/db-card.entry.cjs.js.map +1 -0
- package/dist/cjs/db-checkbox.cjs.entry.js +7 -8
- package/dist/cjs/db-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/db-checkbox.entry.cjs.js.map +1 -0
- package/dist/cjs/db-divider.cjs.entry.js +3 -4
- package/dist/cjs/db-divider.cjs.entry.js.map +1 -1
- package/dist/cjs/db-divider.entry.cjs.js.map +1 -0
- package/dist/cjs/db-drawer.cjs.entry.js +5 -6
- package/dist/cjs/db-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/db-drawer.entry.cjs.js.map +1 -0
- package/dist/cjs/db-header.cjs.entry.js +6 -7
- package/dist/cjs/db-header.cjs.entry.js.map +1 -1
- package/dist/cjs/db-header.entry.cjs.js.map +1 -0
- package/dist/cjs/db-icon.cjs.entry.js +3 -4
- package/dist/cjs/db-icon.cjs.entry.js.map +1 -1
- package/dist/cjs/db-icon.entry.cjs.js.map +1 -0
- package/dist/cjs/db-infotext.cjs.entry.js +3 -4
- package/dist/cjs/db-infotext.cjs.entry.js.map +1 -1
- package/dist/cjs/db-infotext.entry.cjs.js.map +1 -0
- package/dist/cjs/db-input.cjs.entry.js +8 -9
- package/dist/cjs/db-input.cjs.entry.js.map +1 -1
- package/dist/cjs/db-input.entry.cjs.js.map +1 -0
- package/dist/cjs/db-link.cjs.entry.js +4 -5
- package/dist/cjs/db-link.cjs.entry.js.map +1 -1
- package/dist/cjs/db-link.entry.cjs.js.map +1 -0
- package/dist/cjs/db-navigation-item.cjs.entry.js +6 -7
- package/dist/cjs/db-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/db-navigation-item.entry.cjs.js.map +1 -0
- package/dist/cjs/db-navigation.cjs.entry.js +4 -5
- package/dist/cjs/db-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/db-navigation.entry.cjs.js.map +1 -0
- package/dist/cjs/db-notification.cjs.entry.js +5 -6
- package/dist/cjs/db-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/db-notification.entry.cjs.js.map +1 -0
- package/dist/cjs/db-page.cjs.entry.js +5 -6
- package/dist/cjs/db-page.cjs.entry.js.map +1 -1
- package/dist/cjs/db-page.entry.cjs.js.map +1 -0
- package/dist/cjs/db-popover.cjs.entry.js +3 -4
- package/dist/cjs/db-popover.cjs.entry.js.map +1 -1
- package/dist/cjs/db-popover.entry.cjs.js.map +1 -0
- package/dist/cjs/db-radio.cjs.entry.js +6 -7
- package/dist/cjs/db-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/db-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/db-section.cjs.entry.js +4 -5
- package/dist/cjs/db-section.cjs.entry.js.map +1 -1
- package/dist/cjs/db-section.entry.cjs.js.map +1 -0
- package/dist/cjs/db-select.cjs.entry.js +9 -10
- package/dist/cjs/db-select.cjs.entry.js.map +1 -1
- package/dist/cjs/db-select.entry.cjs.js.map +1 -0
- package/dist/cjs/db-stack.cjs.entry.js +3 -4
- package/dist/cjs/db-stack.cjs.entry.js.map +1 -1
- package/dist/cjs/db-stack.entry.cjs.js.map +1 -0
- package/dist/cjs/db-switch.cjs.entry.js +6 -7
- package/dist/cjs/db-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/db-switch.entry.cjs.js.map +1 -0
- package/dist/cjs/db-tab-item.db-tab-list.db-tab-panel.entry.cjs.js.map +1 -0
- package/dist/cjs/db-tab-item_3.cjs.entry.js +5 -6
- package/dist/cjs/db-tab-item_3.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tabs.cjs.entry.js +5 -6
- package/dist/cjs/db-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tabs.entry.cjs.js.map +1 -0
- package/dist/cjs/db-tag.cjs.entry.js +4 -5
- package/dist/cjs/db-tag.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tag.entry.cjs.js.map +1 -0
- package/dist/cjs/db-textarea.cjs.entry.js +8 -9
- package/dist/cjs/db-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/db-textarea.entry.cjs.js.map +1 -0
- package/dist/cjs/db-tooltip.cjs.entry.js +4 -5
- package/dist/cjs/db-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tooltip.entry.cjs.js.map +1 -0
- package/dist/cjs/db-ux.cjs.js +8 -7
- package/dist/cjs/db-ux.cjs.js.map +1 -1
- package/dist/cjs/{index-6e2cf235.js → index-DBEtsnky.js} +18 -46
- package/dist/cjs/index-DBEtsnky.js.map +1 -0
- package/dist/cjs/{index-403366c7.js → index-sPDBdc1s.js} +2 -1
- package/dist/cjs/index-sPDBdc1s.js.map +1 -0
- package/dist/cjs/index.cjs.js +13 -22
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +4 -5
- package/dist/cjs/loader.cjs.js.map +1 -1
- package/dist/cjs/{navigation-5586b826.js → navigation-l4Ce-Ems.js} +3 -2
- package/dist/cjs/navigation-l4Ce-Ems.js.map +1 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/accordion/model.js.map +1 -1
- package/dist/collection/components/badge/model.js.map +1 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/button/model.js.map +1 -1
- package/dist/collection/components/card/card.js +1 -1
- package/dist/collection/components/card/model.js.map +1 -1
- package/dist/collection/components/divider/divider.js +1 -1
- package/dist/collection/components/divider/model.js.map +1 -1
- package/dist/collection/components/drawer/drawer.js +2 -2
- package/dist/collection/components/drawer/model.js.map +1 -1
- package/dist/collection/components/icon/model.js.map +1 -1
- package/dist/collection/components/input/model.js.map +1 -1
- package/dist/collection/components/link/model.js.map +1 -1
- package/dist/collection/components/navigation-item/model.js.map +1 -1
- package/dist/collection/components/navigation-item/navigation-item.js +1 -1
- package/dist/collection/components/notification/model.js.map +1 -1
- package/dist/collection/components/page/model.js.map +1 -1
- package/dist/collection/components/page/page.js +27 -2
- package/dist/collection/components/page/page.js.map +1 -1
- package/dist/collection/components/popover/popover.js +1 -1
- package/dist/collection/components/section/section.js +1 -1
- package/dist/collection/components/stack/model.js.map +1 -1
- package/dist/collection/components/tabs/model.js.map +1 -1
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tag/model.js.map +1 -1
- package/dist/collection/components/textarea/model.js.map +1 -1
- package/dist/collection/shared/model.js.map +1 -1
- package/dist/collection/utils/navigation.js.map +1 -1
- package/dist/custom-elements.json +264 -116
- package/dist/db-ux/db-accordion-item.entry.esm.js.map +1 -0
- package/dist/db-ux/db-accordion.entry.esm.js.map +1 -0
- package/dist/db-ux/db-badge.entry.esm.js.map +1 -0
- package/dist/db-ux/db-brand.entry.esm.js.map +1 -0
- package/dist/db-ux/db-button.entry.esm.js.map +1 -0
- package/dist/db-ux/db-card.entry.esm.js.map +1 -0
- package/dist/db-ux/db-checkbox.entry.esm.js.map +1 -0
- package/dist/db-ux/db-divider.entry.esm.js.map +1 -0
- package/dist/db-ux/db-drawer.entry.esm.js.map +1 -0
- package/dist/db-ux/db-header.entry.esm.js.map +1 -0
- package/dist/db-ux/db-icon.entry.esm.js.map +1 -0
- package/dist/db-ux/db-infotext.entry.esm.js.map +1 -0
- package/dist/db-ux/db-input.entry.esm.js.map +1 -0
- package/dist/db-ux/db-link.entry.esm.js.map +1 -0
- package/dist/db-ux/db-navigation-item.entry.esm.js.map +1 -0
- package/dist/db-ux/db-navigation.entry.esm.js.map +1 -0
- package/dist/db-ux/db-notification.entry.esm.js.map +1 -0
- package/dist/db-ux/db-page.entry.esm.js.map +1 -0
- package/dist/db-ux/db-popover.entry.esm.js.map +1 -0
- package/dist/db-ux/db-radio.entry.esm.js.map +1 -0
- package/dist/db-ux/db-section.entry.esm.js.map +1 -0
- package/dist/db-ux/db-select.entry.esm.js.map +1 -0
- package/dist/db-ux/db-stack.entry.esm.js.map +1 -0
- package/dist/db-ux/db-switch.entry.esm.js.map +1 -0
- package/dist/db-ux/db-tab-item.db-tab-list.db-tab-panel.entry.esm.js.map +1 -0
- package/dist/db-ux/db-tabs.entry.esm.js.map +1 -0
- package/dist/db-ux/db-tag.entry.esm.js.map +1 -0
- package/dist/db-ux/db-textarea.entry.esm.js.map +1 -0
- package/dist/db-ux/db-tooltip.entry.esm.js.map +1 -0
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/db-ux.esm.js.map +1 -1
- package/dist/db-ux/index.esm.js +1 -1
- package/dist/db-ux/index.esm.js.map +1 -1
- package/dist/db-ux/loader.esm.js.map +1 -0
- package/dist/db-ux/{p-97028dbd.entry.js → p-13103208.entry.js} +2 -2
- package/dist/db-ux/{p-97028dbd.entry.js.map → p-13103208.entry.js.map} +1 -1
- package/dist/db-ux/p-2e23ff44.entry.js +2 -0
- package/dist/db-ux/{p-3a1dfb26.entry.js.map → p-2e23ff44.entry.js.map} +1 -1
- package/dist/db-ux/{p-57674cda.entry.js → p-3d7843de.entry.js} +2 -2
- package/dist/db-ux/{p-57674cda.entry.js.map → p-3d7843de.entry.js.map} +1 -1
- package/dist/db-ux/p-63c7cb8b.entry.js +2 -0
- package/dist/db-ux/{p-a123f227.entry.js.map → p-63c7cb8b.entry.js.map} +1 -1
- package/dist/db-ux/p-6c1ea804.entry.js +2 -0
- package/dist/db-ux/{p-e0c996ca.entry.js.map → p-6c1ea804.entry.js.map} +1 -1
- package/dist/db-ux/p-720aa9a5.entry.js +2 -0
- package/dist/db-ux/{p-15a0a59a.entry.js.map → p-720aa9a5.entry.js.map} +1 -1
- package/dist/db-ux/p-77fc7549.entry.js +2 -0
- package/dist/db-ux/{p-df8a20f6.entry.js.map → p-77fc7549.entry.js.map} +1 -1
- package/dist/db-ux/p-793d7f91.entry.js +2 -0
- package/dist/db-ux/{p-d4755d20.entry.js.map → p-793d7f91.entry.js.map} +1 -1
- package/dist/db-ux/{p-5d3a6be9.entry.js → p-7f107bca.entry.js} +2 -2
- package/dist/db-ux/{p-5d3a6be9.entry.js.map → p-7f107bca.entry.js.map} +1 -1
- package/dist/db-ux/{p-b995d4f1.entry.js → p-80639e12.entry.js} +2 -2
- package/dist/db-ux/{p-b995d4f1.entry.js.map → p-80639e12.entry.js.map} +1 -1
- package/dist/db-ux/p-837442c2.entry.js +2 -0
- package/dist/db-ux/{p-680cb6b9.entry.js.map → p-837442c2.entry.js.map} +1 -1
- package/dist/db-ux/p-8822e255.entry.js +2 -0
- package/dist/db-ux/{p-ae744b8c.entry.js.map → p-8822e255.entry.js.map} +1 -1
- package/dist/db-ux/p-8e074bd8.entry.js +2 -0
- package/dist/db-ux/{p-7962a728.entry.js.map → p-8e074bd8.entry.js.map} +1 -1
- package/dist/db-ux/{p-dc43adca.entry.js → p-948a6441.entry.js} +2 -2
- package/dist/db-ux/{p-dc43adca.entry.js.map → p-948a6441.entry.js.map} +1 -1
- package/dist/db-ux/p-9638c44e.entry.js +2 -0
- package/dist/db-ux/{p-1fc85f53.entry.js.map → p-9638c44e.entry.js.map} +1 -1
- package/dist/db-ux/{p-45bb9feb.js → p-BJJmGwiD.js} +1 -1
- package/dist/db-ux/p-BJJmGwiD.js.map +1 -0
- package/dist/db-ux/{p-0cdf053e.js → p-CNYyu0D-.js} +2 -2
- package/dist/db-ux/p-CNYyu0D-.js.map +1 -0
- package/dist/db-ux/{p-af3834b6.js → p-CNj9Jn9q.js} +1 -1
- package/dist/db-ux/p-CNj9Jn9q.js.map +1 -0
- package/dist/db-ux/p-D-D8lQAG.js +3 -0
- package/dist/db-ux/p-D-D8lQAG.js.map +1 -0
- package/dist/db-ux/p-DQuL1Twl.js +2 -0
- package/dist/db-ux/p-DQuL1Twl.js.map +1 -0
- package/dist/db-ux/p-a33ead25.entry.js +2 -0
- package/dist/db-ux/{p-2c5a50cb.entry.js.map → p-a33ead25.entry.js.map} +1 -1
- package/dist/db-ux/p-a7cb5508.entry.js +2 -0
- package/dist/db-ux/{p-ecdbfa7d.entry.js.map → p-a7cb5508.entry.js.map} +1 -1
- package/dist/db-ux/p-ab698c11.entry.js +2 -0
- package/dist/db-ux/p-ab698c11.entry.js.map +1 -0
- package/dist/db-ux/p-b34a66b5.entry.js +2 -0
- package/dist/db-ux/{p-0f85a724.entry.js.map → p-b34a66b5.entry.js.map} +1 -1
- package/dist/db-ux/p-b7ea60d8.entry.js +2 -0
- package/dist/db-ux/{p-79b19742.entry.js.map → p-b7ea60d8.entry.js.map} +1 -1
- package/dist/db-ux/{p-bb08ea68.entry.js → p-b8250e4a.entry.js} +2 -2
- package/dist/db-ux/{p-bb08ea68.entry.js.map → p-b8250e4a.entry.js.map} +1 -1
- package/dist/db-ux/{p-8a557e62.entry.js → p-c1e84446.entry.js} +2 -2
- package/dist/db-ux/{p-8a557e62.entry.js.map → p-c1e84446.entry.js.map} +1 -1
- package/dist/db-ux/p-d8fa16c3.entry.js +2 -0
- package/dist/db-ux/{p-b7ca81eb.entry.js.map → p-d8fa16c3.entry.js.map} +1 -1
- package/dist/db-ux/{p-bf771913.entry.js → p-da8fcf7f.entry.js} +2 -2
- package/dist/db-ux/{p-bf771913.entry.js.map → p-da8fcf7f.entry.js.map} +1 -1
- package/dist/db-ux/{p-2e931b97.entry.js → p-e1893e40.entry.js} +2 -2
- package/dist/db-ux/{p-2e931b97.entry.js.map → p-e1893e40.entry.js.map} +1 -1
- package/dist/db-ux/p-e7905599.entry.js +2 -0
- package/dist/db-ux/{p-184fc0f3.entry.js.map → p-e7905599.entry.js.map} +1 -1
- package/dist/db-ux/p-f9804215.entry.js +2 -0
- package/dist/db-ux/{p-d94a3bf9.entry.js.map → p-f9804215.entry.js.map} +1 -1
- package/dist/db-ux/p-fa671633.entry.js +2 -0
- package/dist/db-ux/{p-16da89d8.entry.js.map → p-fa671633.entry.js.map} +1 -1
- package/dist/db-ux/p-fd672c12.entry.js +2 -0
- package/dist/db-ux/{p-79fdb910.entry.js.map → p-fd672c12.entry.js.map} +1 -1
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/{constants-745cf8d7.js → constants-CNj9Jn9q.js} +2 -1
- package/dist/{db-ux/p-af3834b6.js.map → esm/constants-CNj9Jn9q.js.map} +1 -1
- package/dist/esm/db-accordion-item.entry.js +5 -4
- package/dist/esm/db-accordion-item.entry.js.map +1 -1
- package/dist/esm/db-accordion.entry.js +4 -3
- package/dist/esm/db-accordion.entry.js.map +1 -1
- package/dist/esm/db-badge.entry.js +4 -3
- package/dist/esm/db-badge.entry.js.map +1 -1
- package/dist/esm/db-brand.entry.js +4 -3
- package/dist/esm/db-brand.entry.js.map +1 -1
- package/dist/esm/db-button.entry.js +4 -3
- package/dist/esm/db-button.entry.js.map +1 -1
- package/dist/esm/db-card.entry.js +4 -3
- package/dist/esm/db-card.entry.js.map +1 -1
- package/dist/esm/db-checkbox.entry.js +7 -6
- package/dist/esm/db-checkbox.entry.js.map +1 -1
- package/dist/esm/db-divider.entry.js +3 -2
- package/dist/esm/db-divider.entry.js.map +1 -1
- package/dist/esm/db-drawer.entry.js +5 -4
- package/dist/esm/db-drawer.entry.js.map +1 -1
- package/dist/esm/db-header.entry.js +6 -5
- package/dist/esm/db-header.entry.js.map +1 -1
- package/dist/esm/db-icon.entry.js +3 -2
- package/dist/esm/db-icon.entry.js.map +1 -1
- package/dist/esm/db-infotext.entry.js +3 -2
- package/dist/esm/db-infotext.entry.js.map +1 -1
- package/dist/esm/db-input.entry.js +8 -7
- package/dist/esm/db-input.entry.js.map +1 -1
- package/dist/esm/db-link.entry.js +4 -3
- package/dist/esm/db-link.entry.js.map +1 -1
- package/dist/esm/db-navigation-item.entry.js +6 -5
- package/dist/esm/db-navigation-item.entry.js.map +1 -1
- package/dist/esm/db-navigation.entry.js +4 -3
- package/dist/esm/db-navigation.entry.js.map +1 -1
- package/dist/esm/db-notification.entry.js +5 -4
- package/dist/esm/db-notification.entry.js.map +1 -1
- package/dist/esm/db-page.entry.js +5 -4
- package/dist/esm/db-page.entry.js.map +1 -1
- package/dist/esm/db-popover.entry.js +3 -2
- package/dist/esm/db-popover.entry.js.map +1 -1
- package/dist/esm/db-radio.entry.js +6 -5
- package/dist/esm/db-radio.entry.js.map +1 -1
- package/dist/esm/db-section.entry.js +4 -3
- package/dist/esm/db-section.entry.js.map +1 -1
- package/dist/esm/db-select.entry.js +9 -8
- package/dist/esm/db-select.entry.js.map +1 -1
- package/dist/esm/db-stack.entry.js +3 -2
- package/dist/esm/db-stack.entry.js.map +1 -1
- package/dist/esm/db-switch.entry.js +6 -5
- package/dist/esm/db-switch.entry.js.map +1 -1
- package/dist/esm/db-tab-item.db-tab-list.db-tab-panel.entry.js.map +1 -0
- package/dist/esm/db-tab-item_3.entry.js +5 -4
- package/dist/esm/db-tab-item_3.entry.js.map +1 -1
- package/dist/esm/db-tabs.entry.js +5 -4
- package/dist/esm/db-tabs.entry.js.map +1 -1
- package/dist/esm/db-tag.entry.js +4 -3
- package/dist/esm/db-tag.entry.js.map +1 -1
- package/dist/esm/db-textarea.entry.js +8 -7
- package/dist/esm/db-textarea.entry.js.map +1 -1
- package/dist/esm/db-tooltip.entry.js +4 -3
- package/dist/esm/db-tooltip.entry.js.map +1 -1
- package/dist/esm/db-ux.js +7 -5
- package/dist/esm/db-ux.js.map +1 -1
- package/dist/esm/{index-7d31752e.js → index-BJJmGwiD.js} +2 -1
- package/dist/esm/index-BJJmGwiD.js.map +1 -0
- package/dist/esm/{index-389cc56c.js → index-D-D8lQAG.js} +16 -24
- package/dist/esm/index-D-D8lQAG.js.map +1 -0
- package/dist/esm/index.js +5 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +5 -4
- package/dist/esm/loader.js.map +1 -1
- package/dist/esm/{navigation-09e3ace3.js → navigation-Dg9V7r8H.js} +3 -2
- package/dist/esm/navigation-Dg9V7r8H.js.map +1 -0
- package/dist/types/components/page/model.d.ts +4 -0
- package/dist/types/components/page/page.d.ts +1 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/types/shared/model.d.ts +5 -5
- package/dist/types/stencil-public-runtime.d.ts +1 -0
- package/dist/vscode.html-custom-data.json +19 -14
- package/dist/web-types.json +89 -79
- package/package.json +5 -5
- package/dist/cjs/app-globals-3a1e7e63.js +0 -7
- package/dist/cjs/app-globals-3a1e7e63.js.map +0 -1
- package/dist/cjs/constants-89822e5f.js.map +0 -1
- package/dist/cjs/index-403366c7.js.map +0 -1
- package/dist/cjs/index-6e2cf235.js.map +0 -1
- package/dist/cjs/navigation-5586b826.js.map +0 -1
- package/dist/db-ux/p-0cdf053e.js.map +0 -1
- package/dist/db-ux/p-0f85a724.entry.js +0 -2
- package/dist/db-ux/p-15a0a59a.entry.js +0 -2
- package/dist/db-ux/p-16da89d8.entry.js +0 -2
- package/dist/db-ux/p-184fc0f3.entry.js +0 -2
- package/dist/db-ux/p-1fc85f53.entry.js +0 -2
- package/dist/db-ux/p-2c5a50cb.entry.js +0 -2
- package/dist/db-ux/p-3a1dfb26.entry.js +0 -2
- package/dist/db-ux/p-45bb9feb.js.map +0 -1
- package/dist/db-ux/p-680cb6b9.entry.js +0 -2
- package/dist/db-ux/p-6e619ac9.js +0 -3
- package/dist/db-ux/p-6e619ac9.js.map +0 -1
- package/dist/db-ux/p-7962a728.entry.js +0 -2
- package/dist/db-ux/p-79b19742.entry.js +0 -2
- package/dist/db-ux/p-79fdb910.entry.js +0 -2
- package/dist/db-ux/p-a0a07ca5.entry.js +0 -2
- package/dist/db-ux/p-a0a07ca5.entry.js.map +0 -1
- package/dist/db-ux/p-a123f227.entry.js +0 -2
- package/dist/db-ux/p-ae744b8c.entry.js +0 -2
- package/dist/db-ux/p-b7ca81eb.entry.js +0 -2
- package/dist/db-ux/p-d4755d20.entry.js +0 -2
- package/dist/db-ux/p-d94a3bf9.entry.js +0 -2
- package/dist/db-ux/p-df8a20f6.entry.js +0 -2
- package/dist/db-ux/p-e0c996ca.entry.js +0 -2
- package/dist/db-ux/p-e1255160.js +0 -2
- package/dist/db-ux/p-e1255160.js.map +0 -1
- package/dist/db-ux/p-ecdbfa7d.entry.js +0 -2
- package/dist/esm/app-globals-0f993ce5.js +0 -5
- package/dist/esm/app-globals-0f993ce5.js.map +0 -1
- package/dist/esm/constants-745cf8d7.js.map +0 -1
- package/dist/esm/index-389cc56c.js.map +0 -1
- package/dist/esm/index-7d31752e.js.map +0 -1
- package/dist/esm/navigation-09e3ace3.js.map +0 -1
- package/dist/loader/package.json +0 -11
|
@@ -61,9 +61,9 @@ export class DBPage {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
render() {
|
|
64
|
-
return (h("div", { key: '
|
|
64
|
+
return (h("div", { key: 'e84efdbed5836db872f261cc1ac3c2606153e6d6', class: cls("db-page", this.className), ref: (el) => {
|
|
65
65
|
this._ref = el;
|
|
66
|
-
}, id: this.id, "data-variant": this.variant, "data-fade-in": this.fadeIn, "data-fonts-loaded": getBooleanAsString(this.fontsLoaded) }, h("slot", { key: '
|
|
66
|
+
}, id: this.id, "data-variant": this.variant, "data-fade-in": this.fadeIn, "data-fonts-loaded": getBooleanAsString(this.fontsLoaded) }, h("slot", { key: 'fff9d9902cc83f706932d233195d30c9096f8c14', name: "header" }), h("main", { key: '1c78d658ffe24c528e5cd431c9156fb19d10ce0d', class: cls("db-main", this.mainClass) }, h("slot", { key: 'd7124b497f131fac36e66da44add93a0504eed0c' })), h("slot", { key: '765db6c7b9981063e05c97b983558f357081c6be', name: "footer" })));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "db-page"; }
|
|
69
69
|
static get properties() {
|
|
@@ -192,6 +192,31 @@ export class DBPage {
|
|
|
192
192
|
"setter": false,
|
|
193
193
|
"attribute": "classname",
|
|
194
194
|
"reflect": false
|
|
195
|
+
},
|
|
196
|
+
"mainClass": {
|
|
197
|
+
"type": "string",
|
|
198
|
+
"mutable": false,
|
|
199
|
+
"complexType": {
|
|
200
|
+
"original": "DBPageProps[\"mainClass\"]",
|
|
201
|
+
"resolved": "string",
|
|
202
|
+
"references": {
|
|
203
|
+
"DBPageProps": {
|
|
204
|
+
"location": "import",
|
|
205
|
+
"path": "./model",
|
|
206
|
+
"id": "src/components/page/model.ts::DBPageProps"
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"required": false,
|
|
211
|
+
"optional": false,
|
|
212
|
+
"docs": {
|
|
213
|
+
"tags": [],
|
|
214
|
+
"text": ""
|
|
215
|
+
},
|
|
216
|
+
"getter": false,
|
|
217
|
+
"setter": false,
|
|
218
|
+
"attribute": "main-class",
|
|
219
|
+
"reflect": false
|
|
195
220
|
}
|
|
196
221
|
};
|
|
197
222
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/components/page/page.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGpE;;;;GAIG;AAIH,MAAM,OAAO,MAAM;IAHlB;
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/components/page/page.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGpE;;;;GAIG;AAIH,MAAM,OAAO,MAAM;IAHlB;QAYU,gBAAW,GAAG,KAAK,CAAC;KAmF9B;IAjFC;;;;OAIG;IACK,sBAAsB,CAC5B,OAA2B,EAC3B,qBAA6B;QAE7B,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACvD,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YACtB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAChC,IACE,IAAI;oBACJ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,EAChE,CAAC;oBACD,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAA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,CAAC;IACD,oBAAoB;QAClB,IACE,OAAO,MAAM,KAAK,WAAW;YAC7B,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAC/D,CAAC;YACD,qCAAqC;YACrC,QAAQ,CAAC,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;QAChE,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,4DACE,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EACrC,GAAG,EAAE,CAAC,EAAO,EAAE,EAAE;gBACf,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;YACjB,CAAC,EACD,EAAE,EAAE,IAAI,CAAC,EAAE,kBACG,IAAI,CAAC,OAAO,kBACZ,IAAI,CAAC,MAAM,uBACN,kBAAkB,CAAC,IAAI,CAAC,WAAW,CAAC;YAEvD,6DAAM,IAAI,EAAC,QAAQ,GAAQ;YAC3B,6DAAM,KAAK,EAAE,GAAG,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC;gBACzC,8DAAa,CACR;YACP,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBPageProps, DBPageState } from \"./model\";\nimport { cls, getBooleanAsString } from \"../../utils\";\n\nimport { Component, h, Fragment, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n * @slot header - TODO: Add description for slotHeader\n * @slot footer - TODO: Add description for slotFooter\n */\n @Component({\n tag: \"db-page\",\n})\nexport class DBPage {\n private _ref!: HTMLDivElement | null;\n @Prop() fadeIn: DBPageProps[\"fadeIn\"];\n @Prop() documentOverflow: DBPageProps[\"documentOverflow\"];\n @Prop() variant: DBPageProps[\"variant\"];\n @Prop() id: DBPageProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBPageProps[\"className\"];\n @Prop() mainClass: DBPageProps[\"mainClass\"];\n\n @State() fontsLoaded = false;\n\n /**\n * Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.\n * @param element the ref for the component\n * @param customElementSelector the custom element like `my-component`\n */\n private enableAttributePassing(\n element: HTMLElement | null,\n customElementSelector: string\n ) {\n const parent = element?.closest(customElementSelector);\n if (element && parent) {\n const attributes = parent.attributes;\n for (let i = 0; i < attributes.length; i++) {\n const attr = attributes.item(i);\n if (\n attr &&\n (attr.name.startsWith(\"data-\") || attr.name.startsWith(\"aria-\"))\n ) {\n element.setAttribute(attr.name, attr.value);\n parent.removeAttribute(attr.name);\n }\n if (attr && attr.name === \"class\") {\n const isWebComponent = attr.value.includes(\"hydrated\");\n const value = attr.value.replace(\"hydrated\", \"\").trim();\n const currentClass = element.getAttribute(\"class\");\n element.setAttribute(\n attr.name,\n `${currentClass ? `${currentClass} ` : \"\"}${value}`\n );\n if (isWebComponent) {\n // Stencil is using this class for lazy loading component\n parent.setAttribute(\"class\", \"hydrated\");\n } else {\n parent.removeAttribute(attr.name);\n }\n }\n }\n }\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-page\");\n this.fontsLoaded = !this.fadeIn;\n if (document && this.fadeIn) {\n document.fonts.ready.then(() => {\n this.fontsLoaded = true;\n });\n } else {\n this.fontsLoaded = true;\n }\n }\n disconnectedCallback() {\n if (\n typeof window !== \"undefined\" &&\n document.documentElement.classList.contains(\"db-page-document\")\n ) {\n // remove document styles set by this\n document.documentElement.classList.remove(\"db-page-document\");\n }\n }\n\n render() {\n return (\n <div\n class={cls(\"db-page\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this.id}\n data-variant={this.variant}\n data-fade-in={this.fadeIn}\n data-fonts-loaded={getBooleanAsString(this.fontsLoaded)}\n >\n <slot name=\"header\"></slot>\n <main class={cls(\"db-main\", this.mainClass)}>\n <slot></slot>\n </main>\n <slot name=\"footer\"></slot>\n </div>\n );\n }\n}\n"]}
|
|
@@ -172,7 +172,7 @@ export class DBPopover {
|
|
|
172
172
|
"mutable": false,
|
|
173
173
|
"complexType": {
|
|
174
174
|
"original": "DBPopoverProps[\"spacing\"]",
|
|
175
|
-
"resolved": "
|
|
175
|
+
"resolved": "string",
|
|
176
176
|
"references": {
|
|
177
177
|
"DBPopoverProps": {
|
|
178
178
|
"location": "import",
|
|
@@ -108,7 +108,7 @@ export class DBSection {
|
|
|
108
108
|
"mutable": false,
|
|
109
109
|
"complexType": {
|
|
110
110
|
"original": "DBSectionProps[\"spacing\"]",
|
|
111
|
-
"resolved": "
|
|
111
|
+
"resolved": "string",
|
|
112
112
|
"references": {
|
|
113
113
|
"DBSectionProps": {
|
|
114
114
|
"location": "import",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/stack/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/stack/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAU,CAAC;AAE/D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAU,CAAC;AAE7D,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC;AAEjF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,CAAU,CAAC","sourcesContent":["import { GapSpacingProps, GlobalProps, GlobalState } from '../../shared/model';\nexport const StackVariantList = ['simple', 'divider'] as const;\nexport type StackVariantType = (typeof StackVariantList)[number];\nexport const StackDirectionList = ['row', 'column'] as const;\nexport type StackDirectionType = (typeof StackDirectionList)[number];\nexport const StackAlignmentList = ['stretch', 'start', 'end', 'center'] as const;\nexport type StackAlignmentType = (typeof StackAlignmentList)[number];\nexport const StackJustifyContentList = ['space-between', 'start', 'end', 'center'] as const;\nexport type StackJustifyContentType = (typeof StackJustifyContentList)[number];\nexport type DBStackDefaultProps = {\n /**\n * Change variant of stack. To use variant=\"divider\" add a DBDivider after each element\n */\n variant?: StackVariantType;\n /**\n * Set the direction of the stack. Defaults to \"column\"\n */\n direction?: StackDirectionType;\n /**\n * If the stack should wrap if parent is too small otherwise you get an overflow\n */\n wrap?: boolean;\n /**\n * Represents css align-items\n */\n alignment?: StackAlignmentType;\n /**\n * Represents css justify-content\n */\n justifyContent?: StackJustifyContentType;\n};\nexport type DBStackProps = DBStackDefaultProps & GlobalProps & GapSpacingProps;\nexport type DBStackDefaultState = {};\nexport type DBStackState = DBStackDefaultState & GlobalState"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/tabs/model.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/tabs/model.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,WAAW,EAAE,QAAQ,CAAU,CAAC;AAEjE,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,MAAM,EAAE,UAAU,CAAU,CAAC","sourcesContent":["import { AlignmentProps, GlobalProps, GlobalState, InitializedState, OrientationProps, WidthProps } from '../../shared/model';\nimport { DBTabItemProps } from '../tab-item/model';\nimport { DBTabPanelProps } from '../tab-panel/model';\nexport const TabsBehaviorList = ['scrollbar', 'arrows'] as const;\nexport type TabsBehaviorType = (typeof TabsBehaviorList)[number];\nexport const TabsInitialSelectedModeList = ['auto', 'manually'] as const;\nexport type TabsInitialSelectedModeType = (typeof TabsInitialSelectedModeList)[number];\nexport type DBSimpleTabProps = DBTabItemProps & DBTabPanelProps;\nexport type DBTabsDefaultProps = {\n /**\n * Change amount of distance if you click on an arrow, only available with behavior=\"arrows\"\n */\n arrowScrollDistance?: number;\n /**\n * Show a scrollbar or buttons with arrows to navigate for horizontal tabs with overflow visible\n */\n behavior?: TabsBehaviorType;\n\n /**\n * Default behavior is auto selecting the first tab, change selected tab by index\n */\n initialSelectedIndex?: number;\n\n /**\n * Default behavior is auto selecting the first tab, disable it with 'manually'\n */\n initialSelectedMode?: TabsInitialSelectedModeType;\n\n /**\n * The name of the tab bar, is required for grouping multiple tabs together. Will overwrite names from children.\n */\n name?: string;\n\n /**\n * Informs the user if the current tab index has changed.\n */\n onIndexChange?: (index?: number) => void;\n\n /**\n * Informs the user if another tab has been selected.\n */\n onTabSelect?: (event?: Event) => void;\n\n /**\n * Provide simple tabs with label + text as content\n */\n tabs?: DBSimpleTabProps[] | string;\n};\nexport type DBTabsProps = DBTabsDefaultProps & GlobalProps & OrientationProps & WidthProps & AlignmentProps;\nexport type DBTabsDefaultState = {\n _name: string;\n scrollContainer?: Element | null;\n scroll: (left?: boolean) => void;\n showScrollLeft?: boolean;\n showScrollRight?: boolean;\n evaluateScrollButtons: (tabList: Element) => void;\n convertTabs: (tabs?: unknown[] | string | undefined) => DBSimpleTabProps[];\n initTabList: () => void;\n initTabs: (init?: boolean) => void;\n handleChange: (event: any) => void;\n};\nexport type DBTabsState = DBTabsDefaultState & GlobalState & InitializedState"]}
|
|
@@ -391,7 +391,7 @@ export class DBTabs {
|
|
|
391
391
|
"mutable": false,
|
|
392
392
|
"complexType": {
|
|
393
393
|
"original": "DBTabsProps[\"alignment\"]",
|
|
394
|
-
"resolved": "
|
|
394
|
+
"resolved": "string",
|
|
395
395
|
"references": {
|
|
396
396
|
"DBTabsProps": {
|
|
397
397
|
"location": "import",
|
|
@@ -416,7 +416,7 @@ export class DBTabs {
|
|
|
416
416
|
"mutable": false,
|
|
417
417
|
"complexType": {
|
|
418
418
|
"original": "DBTabsProps[\"width\"]",
|
|
419
|
-
"resolved": "
|
|
419
|
+
"resolved": "string",
|
|
420
420
|
"references": {
|
|
421
421
|
"DBTabsProps": {
|
|
422
422
|
"location": "import",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/tag/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/tag/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAU,CAAC","sourcesContent":["import { ContentSlotProps, GlobalProps, GlobalState, IconProps, InitializedState, OverflowProps, SemanticProps, ShowIconProps, TagEmphasisProps } from '../../shared/model';\nexport const TagBehaviorList = ['static', 'removable'] as const;\nexport type TagBehaviorType = (typeof TagBehaviorList)[number];\nexport type DBTagDefaultProps = {\n /**\n *\tDefines the behavior of the component:\n *\t- static: default behavior without remove button\n * - removable: add a remove button at the end of the tag\n */\n behavior?: TagBehaviorType | string;\n\n /**\n * @deprecated Disable tag\n */\n disabled?: boolean;\n /**\n * Define the text next to the icon specified via the icon Property to get hidden.\n */\n noText?: boolean;\n /**\n * If \"removeButton\" attribute is set this function will be called when user clicks cancel button inside the tag.\n */\n onRemove?: () => void;\n /**\n * The removeButton attribute shows the cancel button.\n */\n removeButton?: string;\n /**\n * Enable/Disable icon for checkbox/radio inside tag.\n */\n showCheckState?: boolean;\n /**\n * Alternative for children to set content as property.\n */\n text?: string;\n\n /**\n * If \"interactive\" is set to true, you can pass a value to the underlying checkbox or radio input.\n */\n value?: string;\n};\nexport type DBTagProps = DBTagDefaultProps & GlobalProps & IconProps & SemanticProps & OverflowProps & TagEmphasisProps & ShowIconProps & ContentSlotProps;\nexport type DBTagDefaultState = {\n getRemoveButtonText: () => string;\n handleRemove: () => void;\n};\nexport type DBTagState = DBTagDefaultState & GlobalState & InitializedState"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/textarea/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/textarea/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAU,CAAC;AAEtF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC","sourcesContent":["import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormState, FormTextProps, GlobalProps, GlobalState, InputEventProps, InputEventState } from '../../shared/model';\nexport const TextareaResizeList = ['none', 'both', 'horizontal', 'vertical'] as const;\nexport type TextareaResizeType = (typeof TextareaResizeList)[number];\nexport const TextareaWrapList = ['hard', 'soft', 'off'] as const;\nexport type TextareaWrapType = (typeof TextareaWrapList)[number];\nexport type DBTextareaDefaultProps = {\n /**\n * The visible width of the text control, in average character widths. If it is specified, it must be a positive integer\n */\n cols?: number;\n /**\n * In most browsers, textareas are resizable — you'll notice the drag handle in the right-hand corner, you can control it with this\n */\n resize?: TextareaResizeType;\n /**\n * The number of visible text lines for the control. If it is specified, it must be a positive integer\n */\n rows?: number;\n /**\n * Specifies whether the textarea is subject to spell checking by the underlying browser/OS\n */\n spellCheck?: boolean;\n\n /**\n * Indicates how the control should wrap the value for form submission.\n */\n wrap?: TextareaWrapType;\n};\nexport type DBTextareaProps = DBTextareaDefaultProps & ChangeEventProps<HTMLTextAreaElement> & InputEventProps<HTMLTextAreaElement> & FocusEventProps<HTMLTextAreaElement> & FormProps & GlobalProps & FormTextProps & FormMessageProps;\nexport type DBTextareaDefaultState = {};\nexport type DBTextareaState = DBTextareaDefaultState & ChangeEventState<HTMLTextAreaElement> & InputEventState<HTMLTextAreaElement> & FocusEventState<HTMLTextAreaElement> & FormState & GlobalState"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/shared/model.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAsCvD,MAAM,CAAC,MAAM,YAAY,GAAI,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,CAAW,CAAC;AA2BrH,MAAM,CAAC,MAAM,WAAW,GAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAW,CAAC;AAQ3E,MAAM,CAAC,MAAM,UAAU,GAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAW,CAAC;AAQ1E,MAAM,CAAC,MAAM,aAAa,GAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,SAAS,EAAE,cAAc,EAAE,YAAY,CAAW,CAAC;AAiBvL,MAAM,CAAC,MAAM,cAAc,GAAI,CAAC,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,CAAW,CAAC;AAcpJ,MAAM,CAAC,MAAM,eAAe,GAAI,CAAC,YAAY,EAAE,UAAU,CAAW,CAAC;AAQrE,MAAM,CAAC,MAAM,SAAS,GAAI,CAAC,MAAM,EAAE,MAAM,CAAW,CAAC;AAQrD,MAAM,CAAC,MAAM,YAAY,GAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAW,CAAC;AAQ5E,MAAM,CAAC,MAA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E,WAAW,EAAE,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,CAAW,CAAC;AA0Dh2B,MAAM,CAAC,MAAM,eAAe,GAAI,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,CAAW,CAAC;AAExG,MAAM,CAAC,MAAM,cAAc,GAAI,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAW,CAAC;AAEhF,MAAM,CAAC,MAAM,sBAAsB,GAAI,CAAC,aAAa,EAAE,4BAA4B,EAAE,QAAQ,EAAE,0BAA0B,EAAE,aAAa,EAAE,eAAe,EAAE,iCAAiC,EAAE,YAAY,CAAW,CAAC;AA6EtN,MAAM,CAAC,MAAM,aAAa,GAAI,CAAC,OAAO,EAAE,QAAQ,CAAW,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IconTypes } from '@db-ux/core-foundations';\nexport type GlobalProps = {\n /**\n * default slot\n */\n\n children?: any;\n\n /**\n * React specific for adding className to the component.\n */\n className?: string;\n\n /**\n * Workaround for TypeScript using class for all components.\n */\n class?: string | any;\n\n /**\n * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.\n */\n describedbyid?: string;\n\n /**\n * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.\n */\n id?: string;\n\n /**\n * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)\n */\n autofocus?: boolean;\n};\nexport type GlobalState = {\n _id?: string;\n};\nexport const SemanticList = (['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'] as const);\nexport type SemanticType = (typeof SemanticList)[number];\nexport type SemanticProps = {\n /**\n * The semantic defines the default variants for most components.\n */\n semantic?: SemanticType;\n};\nexport type IconProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://db-ux-design-system.github.io/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n icon?: IconTypes;\n};\nexport type ShowIconProps = {\n /**\n * Enables or disables the visibility of the icon. The default value depends on the component.\n * For many components this property is optional to reflect Figma properties.\n */\n showIcon?: boolean;\n};\nexport type IconAfterProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://db-ux-design-system.github.io/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n iconAfter?: IconTypes;\n};\nexport const SpacingList = (['medium', 'small', 'large', 'none'] as const);\nexport type SpacingType = (typeof SpacingList)[number];\nexport type SpacingProps = {\n /**\n * The spacing attribute changes the padding of the component.\n */\n spacing?: SpacingType;\n};\nexport const MarginList = (['medium', 'small', 'large', 'none'] as const);\nexport type MarginType = (typeof MarginList)[number];\nexport type MarginProps = {\n /**\n * The margin attribute changes the margin of the component.\n */\n margin?: MarginType;\n};\nexport const PlacementList = (['left', 'right', 'top', 'bottom', 'left-start', 'left-end', 'right-start', 'right-end', 'top-start', 'top-end', 'bottom-start', 'bottom-end'] as const);\nexport type PlacementType = (typeof PlacementList)[number];\nexport type PlacementProps = {\n /**\n * The `placement` attributes values change the position to absolute and adds a transform based on the placement.\n */\n placement?: PlacementType;\n};\nexport type NavigationBehaviorState = {\n handleNavigationItemClick: (event: unknown) => void;\n};\nexport type GapProps = {\n /**\n * If the absolute element should have a gap between the parent element.\n */\n gap?: boolean;\n};\nexport const GapSpacingList = (['none', '3x-large', '2x-large', 'x-large', 'large', 'medium', 'small', 'x-small', '2x-small', '3x-small'] as const);\nexport type GapSpacingType = (typeof GapSpacingList)[number];\nexport type GapSpacingProps = {\n /**\n * Set the gap/spacing between elements\n */\n gap?: GapSpacingType;\n};\nexport type OverflowProps = {\n /**\n * The overflow attribute sets a max-width and longer text will be dotted.\n */\n overflow?: boolean;\n};\nexport const OrientationList = (['horizontal', 'vertical'] as const);\nexport type OrientationType = (typeof OrientationList)[number];\nexport type OrientationProps = {\n /**\n * Change the orientation. Defaults to horizontal.\n */\n orientation?: OrientationType;\n};\nexport const WidthList = (['full', 'auto'] as const);\nexport type WidthType = (typeof WidthList)[number];\nexport type WidthProps = {\n /**\n * Width of the component. Auto width based on children size, full width based on parent elements width.\n */\n width?: WidthType;\n};\nexport const MaxWidthList = (['full', 'medium', 'large', 'small'] as const);\nexport type MaxWidthType = (typeof MaxWidthList)[number];\nexport type ContainerWidthProps = {\n /**\n * Set max width for the component\n */\n width?: MaxWidthType;\n};\nexport const PopoverDelayList = (['none', 'slow', 'fast'] as const);\nexport type PopoverDelayType = (typeof PopoverDelayList)[number];\nexport const PopoverWidthList = (['auto', 'fixed'] as const);\nexport type PopoverWidthType = (typeof PopoverWidthList)[number];\nexport type PopoverProps = {\n /**\n * Add a delay before showing the tooltip\n */\n delay?: PopoverDelayType;\n /**\n * Disable animation\n */\n animation?: boolean;\n /**\n * Use fixed with for default max-width\n */\n width?: PopoverWidthType;\n};\nexport type PopoverState = {\n handleAutoPlacement: () => void;\n};\nexport type ContentSlotProps = {\n /**\n * Default slot which is used to pass in additional content.\n */\n content?: any;\n};\nexport const SizeList = (['small', 'medium'] as const);\nexport type SizeType = (typeof SizeList)[number];\nexport type SizeProps = {\n /**\n * The size attribute changes the font-size and other related sizes of the component.\n */\n size?: SizeType;\n};\nexport const EmphasisList = (['weak', 'strong'] as const);\nexport type EmphasisType = (typeof EmphasisList)[number];\nexport type EmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak or strong importance.\n */\n emphasis?: EmphasisType;\n};\nexport const TagEmphasisList = ([...EmphasisList, 'origin'] as const);\nexport type TagEmphasisType = (typeof TagEmphasisList)[number];\nexport type TagEmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak, strong or origin appearance.\n */\n emphasis?: TagEmphasisType;\n};\nexport const ValidationList = (['invalid', 'valid', 'no-validation'] as const);\nexport type ValidationType = (typeof ValidationList)[number];\nexport type FormProps = {\n /**\n * Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.\n */\n validation?: ValidationType;\n /**\n * The disabled attribute can be set to keep a user from clicking on the form element.\n */\n disabled?: boolean;\n /**\n * \tAssociates the control with a form element\n */\n form?: string;\n\n /**\n * The label attribute specifies the caption of the form element.\n */\n label?: string;\n\n /**\n * The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.\n */\n name?: string;\n\n /**\n * When the required attribute specified, the user will be required to fill the form element before submitting the form.\n */\n required?: boolean;\n /**\n * Enables/disables the visibility of the label\n */\n showLabel?: boolean;\n /**\n * The value property is to receive results from the native form element.\n */\n value?: any;\n};\nexport type FormTextProps = {\n /**\n * Maximum length (number of characters) of value\n */\n maxLength?: number;\n /**\n * Minimum length (number of characters) of value\n */\n minLength?: number;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readOnly?: boolean;\n};\nexport type FormSizeProps = {\n /**\n * Size of the control\n */\n size?: number;\n};\nexport type FormCheckProps = {\n /**\n * Define the radio or checkbox elements checked state\n */\n checked?: boolean;\n};\nexport const LabelVariantList = (['above', 'floating'] as const);\nexport type LabelVariantType = (typeof LabelVariantList)[number];\nexport const AutoCompleteList = (['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'] as const);\nexport type AutoCompleteType = (typeof AutoCompleteList)[number];\nexport type FormMessageProps = {\n /**\n * Change the variant of the label to float or hidden\n */\n variant?: LabelVariantType;\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder?: string;\n /**\n * Optional helper message for form components\n */\n message?: string;\n\n /**\n * Helper message for valid form components\n */\n validMessage?: string;\n\n /**\n * Helper message for invalid form components\n */\n invalidMessage?: string;\n\n /**\n * Set/overwrite icon for helper message for form components\n */\n messageIcon?: IconTypes;\n\n /**\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\n */\n autocomplete?: string | AutoCompleteType;\n\n /**\n * Enables or disables the visibility of the message.\n */\n showMessage?: boolean;\n};\nexport type FormState = {\n _messageId?: string;\n _validMessageId?: string;\n _invalidMessageId?: string;\n _descByIds?: string;\n _value?: string;\n\n /**\n * https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html\n * Currently VoiceOver isn't supporting changes from aria-describedby.\n * This is an internal Fallback\n */\n _voiceOverFallback?: string;\n};\nexport type InitializedState = {\n initialized: boolean;\n};\nexport const LinkCurrentList = (['time', 'true', 'false', 'date', 'page', 'step', 'location'] as const);\nexport type LinkCurrentType = (typeof LinkCurrentList)[number];\nexport const LinkTargetList = (['_self', '_blank', '_parent', '_top'] as const);\nexport type LinkTargetType = (typeof LinkTargetList)[number];\nexport const LinkReferrerPolicyList = (['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] as const);\nexport type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];\nexport type LinkProps = {\n /**\n * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n current?: boolean | LinkCurrentType;\n /**\n * Disables the link.\n */\n disabled?: boolean;\n /**\n * The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).\n */\n href?: string;\n /**\n * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).\n */\n hreflang?: string;\n /**\n * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).\n */\n label?: string;\n /**\n * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: LinkTargetType;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n rel?: string;\n /**\n * Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).\n */\n role?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n referrerpolicy?: LinkReferrerPolicyType;\n /**\n * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).\n */\n selected?: boolean;\n};\nexport type TextProps = {\n /**\n * Alternative for default slot/children.\n */\n text?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type ClickEvent<T> = MouseEvent;\nexport type ClickEventProps<T> = {\n /**\n * React specific onClick to pass to forward ref.\n */\n onClick?: (event: ClickEvent<T>) => void;\n};\nexport type ClickEventState<T> = {\n handleClick: (event: ClickEvent<T>) => void;\n};\nexport type ToggleEventProps = {\n onToggle?: (open: boolean) => void;\n};\nexport type ToggleEventState<T> = {\n toggle: (event?: ClickEvent<T>) => void;\n};\nexport type CloseEventProps = {\n /**\n * Function to handle button click (close).\n */\n onClose?: (event?: any) => void;\n};\nexport type CloseEventState = {\n handleClose: (event: any) => void;\n};\nexport const AlignmentList = (['start', 'center'] as const);\nexport type AlignmentType = (typeof AlignmentList)[number];\nexport type AlignmentProps = {\n /**\n * Define the content alignment in full width\n */\n alignment?: AlignmentType;\n};\nexport type ActiveProps = {\n /**\n * If the tab is checked/active.\n */\n active?: boolean;\n};\nexport type InputEvent<T> = Event;\nexport type InputEventProps<T> = {\n input?: (event: InputEvent<T>) => void;\n onInput?: (event: InputEvent<T>) => void;\n};\nexport type InputEventState<T> = {\n handleInput: (event: InputEvent<T>) => void;\n};\nexport type ChangeEvent<T> = Event;\nexport type ChangeEventProps<T> = {\n change?: (event: ChangeEvent<T>) => void;\n onChange?: (event: ChangeEvent<T>) => void;\n};\nexport type ChangeEventState<T> = {\n handleChange: (event: ChangeEvent<T>) => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type InteractionEvent<T> = FocusEvent;\nexport type FocusEventProps<T> = {\n blur?: (event: InteractionEvent<T>) => void;\n onBlur?: (event: InteractionEvent<T>) => void;\n focus?: (event: InteractionEvent<T>) => void;\n onFocus?: (event: InteractionEvent<T>) => void;\n};\nexport type FocusEventState<T> = {\n handleBlur: (event: InteractionEvent<T>) => void;\n handleFocus: (event: InteractionEvent<T>) => void;\n};\nexport type InnerCloseButtonProps = {\n /**\n * The closeButtonId attribute changes the id inside the close button.\n */\n closeButtonId?: string;\n /**\n * The closeButtonText attribute changes the text inside the close button.\n */\n closeButtonText?: string;\n};\nexport type NavigationBackButtonProps = {\n /**\n * The backButtonId attribute changes the id inside the back button.\n */\n backButtonId?: string;\n /**\n * The backButtonText attribute changes the text inside the back button.\n */\n backButtonText?: string;\n};\nexport type AriaLabelledByProps = {\n /**\n * Pass aria-labelledby to inner element\n */\n labelledBy?: string;\n};\nexport type AriaControlsProps = {\n /**\n * Pass aria-controls to inner element\n */\n controls?: string;\n};\nexport type ValueLabelType = {\n value: string;\n label?: string;\n}"]}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/shared/model.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAsCvD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,CAAU,CAAC;AA2BnH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAA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AY,CAAU,CAAC;AA6EpN,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAU,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport { IconTypes } from '@db-ux/core-foundations';\nexport type GlobalProps = {\n /**\n * default slot\n */\n\n children?: any;\n\n /**\n * React specific for adding className to the component.\n */\n className?: string;\n\n /**\n * Workaround for TypeScript using class for all components.\n */\n class?: string | any;\n\n /**\n * [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby) is used to link to the elements that describe the element with the set attribute.\n */\n describedbyid?: string;\n\n /**\n * [ID](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id) of the component, generated automatically for some components as a fallback if unset.\n */\n id?: string;\n\n /**\n * Before using please check for the [accessibility concerns](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus#accessibility_concerns)\n */\n autofocus?: boolean;\n};\nexport type GlobalState = {\n _id?: string;\n};\nexport const SemanticList = ['adaptive', 'neutral', 'critical', 'informational', 'warning', 'successful'] as const;\nexport type SemanticType = (typeof SemanticList)[number];\nexport type SemanticProps = {\n /**\n * The semantic defines the default variants for most components.\n */\n semantic?: SemanticType;\n};\nexport type IconProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n icon?: IconTypes;\n};\nexport type ShowIconProps = {\n /**\n * Enables or disables the visibility of the icon. The default value depends on the component.\n * For many components this property is optional to reflect Figma properties.\n */\n showIcon?: boolean;\n};\nexport type IconAfterProps = {\n /**\n * Define an icon by its identifier (like e.g. _user_, compare to [Icons](https://design-system.deutschebahn.com/core-web/review/main/foundations/icons/overview)) to get displayed in front of the elements content.\n */\n iconAfter?: IconTypes;\n};\nexport const SpacingList = ['medium', 'small', 'large', 'none'] as const;\nexport type SpacingType = (typeof SpacingList)[number];\nexport type SpacingProps = {\n /**\n * The spacing attribute changes the padding of the component.\n */\n spacing?: SpacingType | string;\n};\nexport const MarginList = ['medium', 'small', 'large', 'none'] as const;\nexport type MarginType = (typeof MarginList)[number];\nexport type MarginProps = {\n /**\n * The margin attribute changes the margin of the component.\n */\n margin?: MarginType;\n};\nexport const PlacementList = ['left', 'right', 'top', 'bottom', 'left-start', 'left-end', 'right-start', 'right-end', 'top-start', 'top-end', 'bottom-start', 'bottom-end'] as const;\nexport type PlacementType = (typeof PlacementList)[number];\nexport type PlacementProps = {\n /**\n * The `placement` attributes values change the position to absolute and adds a transform based on the placement.\n */\n placement?: PlacementType;\n};\nexport type NavigationBehaviorState = {\n handleNavigationItemClick: (event: unknown) => void;\n};\nexport type GapProps = {\n /**\n * If the absolute element should have a gap between the parent element.\n */\n gap?: boolean;\n};\nexport const GapSpacingList = ['none', '3x-large', '2x-large', 'x-large', 'large', 'medium', 'small', 'x-small', '2x-small', '3x-small'] as const;\nexport type GapSpacingType = (typeof GapSpacingList)[number];\nexport type GapSpacingProps = {\n /**\n * Set the gap/spacing between elements\n */\n gap?: GapSpacingType;\n};\nexport type OverflowProps = {\n /**\n * The overflow attribute sets a max-width and longer text will be dotted.\n */\n overflow?: boolean;\n};\nexport const OrientationList = ['horizontal', 'vertical'] as const;\nexport type OrientationType = (typeof OrientationList)[number];\nexport type OrientationProps = {\n /**\n * Change the orientation. Defaults to horizontal.\n */\n orientation?: OrientationType;\n};\nexport const WidthList = ['full', 'auto'] as const;\nexport type WidthType = (typeof WidthList)[number];\nexport type WidthProps = {\n /**\n * Width of the component. Auto width based on children size, full width based on parent elements width.\n */\n width?: WidthType | string;\n};\nexport const MaxWidthList = ['full', 'medium', 'large', 'small'] as const;\nexport type MaxWidthType = (typeof MaxWidthList)[number];\nexport type ContainerWidthProps = {\n /**\n * Set max width for the component\n */\n width?: MaxWidthType;\n};\nexport const PopoverDelayList = ['none', 'slow', 'fast'] as const;\nexport type PopoverDelayType = (typeof PopoverDelayList)[number];\nexport const PopoverWidthList = ['auto', 'fixed'] as const;\nexport type PopoverWidthType = (typeof PopoverWidthList)[number];\nexport type PopoverProps = {\n /**\n * Add a delay before showing the tooltip\n */\n delay?: PopoverDelayType;\n /**\n * Disable animation\n */\n animation?: boolean;\n /**\n * Use fixed with for default max-width\n */\n width?: PopoverWidthType;\n};\nexport type PopoverState = {\n handleAutoPlacement: () => void;\n};\nexport type ContentSlotProps = {\n /**\n * Default slot which is used to pass in additional content.\n */\n content?: any;\n};\nexport const SizeList = ['small', 'medium'] as const;\nexport type SizeType = (typeof SizeList)[number];\nexport type SizeProps = {\n /**\n * The size attribute changes the font-size and other related sizes of the component.\n */\n size?: SizeType;\n};\nexport const EmphasisList = ['weak', 'strong'] as const;\nexport type EmphasisType = (typeof EmphasisList)[number];\nexport type EmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak or strong importance.\n */\n emphasis?: EmphasisType;\n};\nexport const TagEmphasisList = [...EmphasisList, 'origin'] as const;\nexport type TagEmphasisType = (typeof TagEmphasisList)[number];\nexport type TagEmphasisProps = {\n /**\n * The emphasis attribute divides in between a weak, strong or origin appearance.\n */\n emphasis?: TagEmphasisType;\n};\nexport const ValidationList = ['invalid', 'valid', 'no-validation'] as const;\nexport type ValidationType = (typeof ValidationList)[number];\nexport type FormProps = {\n /**\n * Marks an input element as invalid (red) / valid (green) / no-validation (grey). Overwrites the :user-valid selector.\n */\n validation?: ValidationType;\n /**\n * The disabled attribute can be set to keep a user from clicking on the form element.\n */\n disabled?: boolean;\n /**\n * \tAssociates the control with a form element\n */\n form?: string;\n\n /**\n * The label attribute specifies the caption of the form element.\n */\n label?: string;\n\n /**\n * The name attribute gives the name of the form control, as used in form submission and in the form element's elements object.\n */\n name?: string;\n\n /**\n * When the required attribute specified, the user will be required to fill the form element before submitting the form.\n */\n required?: boolean;\n /**\n * Enables/disables the visibility of the label\n */\n showLabel?: boolean;\n /**\n * The value property is to receive results from the native form element.\n */\n value?: any;\n};\nexport type FormTextProps = {\n /**\n * Maximum length (number of characters) of value\n */\n maxLength?: number;\n /**\n * Minimum length (number of characters) of value\n */\n minLength?: number;\n /**\n * The disabled attribute can be set to keep a user from edit on the form element\n */\n readOnly?: boolean;\n};\nexport type FormSizeProps = {\n /**\n * Size of the control\n */\n size?: number;\n};\nexport type FormCheckProps = {\n /**\n * Define the radio or checkbox elements checked state\n */\n checked?: boolean;\n};\nexport const LabelVariantList = ['above', 'floating'] as const;\nexport type LabelVariantType = (typeof LabelVariantList)[number];\nexport const AutoCompleteList = ['off', 'on', 'name', 'honorific-prefix', 'given-name', 'additional-name', 'family-name', 'honorific-suffix', 'nickname', 'email', 'username', 'new-password', 'current-password', 'one-time-code', 'organization-title', 'organization', 'street-address', 'shipping', 'billing', 'address-line1', 'address-line2', 'address-line3', 'address-level4', 'address-level3', 'address-level2', 'address-level1', 'country', 'country-name', 'postal-code', 'cc-name', 'cc-given-name', 'cc-additional-name', 'cc-family-name', 'cc-number', 'cc-exp', 'cc-exp-month', 'cc-exp-year', 'cc-csc', 'cc-type', 'transaction-currency', 'transaction-amount', 'language', 'bday', 'bday-day', 'bday-month', 'bday-year', 'sex', 'tel', 'tel-country-code', 'tel-national', 'tel-area-code', 'tel-local', 'tel-extension', 'impp', 'url', 'photo', 'webauthn'] as const;\nexport type AutoCompleteType = (typeof AutoCompleteList)[number];\nexport type FormMessageProps = {\n /**\n * Change the variant of the label to float or hidden\n */\n variant?: LabelVariantType;\n /**\n * Text that appears in the form control when it has no value set\n */\n placeholder?: string;\n /**\n * Optional helper message for form components\n */\n message?: string;\n\n /**\n * Helper message for valid form components\n */\n validMessage?: string;\n\n /**\n * Helper message for invalid form components\n */\n invalidMessage?: string;\n\n /**\n * Set/overwrite icon for helper message for form components\n */\n messageIcon?: IconTypes;\n\n /**\n * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete\n */\n autocomplete?: string | AutoCompleteType;\n\n /**\n * Enables or disables the visibility of the message.\n */\n showMessage?: boolean;\n};\nexport type FormState = {\n _messageId?: string;\n _validMessageId?: string;\n _invalidMessageId?: string;\n _descByIds?: string;\n _value?: string;\n\n /**\n * https://www.davidmacd.com/blog/test-aria-describedby-errormessage-aria-live.html\n * Currently VoiceOver isn't supporting changes from aria-describedby.\n * This is an internal Fallback\n */\n _voiceOverFallback?: string;\n};\nexport type InitializedState = {\n initialized: boolean;\n};\nexport const LinkCurrentList = ['time', 'true', 'false', 'date', 'page', 'step', 'location'] as const;\nexport type LinkCurrentType = (typeof LinkCurrentList)[number];\nexport const LinkTargetList = ['_self', '_blank', '_parent', '_top'] as const;\nexport type LinkTargetType = (typeof LinkTargetList)[number];\nexport const LinkReferrerPolicyList = ['no-referrer', 'no-referrer-when-downgrade', 'origin', 'origin-when-cross-origin', 'same-origin', 'strict-origin', 'strict-origin-when-cross-origin', 'unsafe-url'] as const;\nexport type LinkReferrerPolicyType = (typeof LinkReferrerPolicyList)[number];\nexport type LinkProps = {\n /**\n * Sets aria attribute based on [`aria-current`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current).\n */\n current?: boolean | LinkCurrentType;\n /**\n * Disables the link.\n */\n disabled?: boolean;\n /**\n * The [URL that the hyperlink points to](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#href).\n */\n href?: string;\n /**\n * Hints for the human [language of the linked page or document](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#hreflang).\n */\n hreflang?: string;\n /**\n * Sets aria attribute based on [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label).\n */\n label?: string;\n /**\n * Where to open the linked URL, as the name for a [browsing context](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#target).\n */\n target?: LinkTargetType;\n /**\n * The relationship of the linked URL as space-separated link types.\n */\n rel?: string;\n /**\n * Sets aria role based on [`aria-role`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles).\n */\n role?: string;\n /**\n * How much of the referrer to send when following the link.\n */\n referrerpolicy?: LinkReferrerPolicyType;\n /**\n * Sets aria role based on [`aria-selected`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected).\n */\n selected?: boolean;\n};\nexport type TextProps = {\n /**\n * Alternative for default slot/children.\n */\n text?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type ClickEvent<T> = MouseEvent;\nexport type ClickEventProps<T> = {\n /**\n * React specific onClick to pass to forward ref.\n */\n onClick?: (event: ClickEvent<T>) => void;\n};\nexport type ClickEventState<T> = {\n handleClick: (event: ClickEvent<T>) => void;\n};\nexport type ToggleEventProps = {\n onToggle?: (open: boolean) => void;\n};\nexport type ToggleEventState<T> = {\n toggle: (event?: ClickEvent<T>) => void;\n};\nexport type CloseEventProps = {\n /**\n * Function to handle button click (close).\n */\n onClose?: (event?: any) => void;\n};\nexport type CloseEventState = {\n handleClose: (event: any) => void;\n};\nexport const AlignmentList = ['start', 'center'] as const;\nexport type AlignmentType = (typeof AlignmentList)[number];\nexport type AlignmentProps = {\n /**\n * Define the content alignment in full width\n */\n alignment?: AlignmentType | string;\n};\nexport type ActiveProps = {\n /**\n * If the tab is checked/active.\n */\n active?: boolean;\n};\nexport type InputEvent<T> = Event;\nexport type InputEventProps<T> = {\n input?: (event: InputEvent<T>) => void;\n onInput?: (event: InputEvent<T>) => void;\n};\nexport type InputEventState<T> = {\n handleInput: (event: InputEvent<T>) => void;\n};\nexport type ChangeEvent<T> = Event;\nexport type ChangeEventProps<T> = {\n change?: (event: ChangeEvent<T>) => void;\n onChange?: (event: ChangeEvent<T>) => void;\n};\nexport type ChangeEventState<T> = {\n handleChange: (event: ChangeEvent<T>) => void;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type InteractionEvent<T> = FocusEvent;\nexport type FocusEventProps<T> = {\n blur?: (event: InteractionEvent<T>) => void;\n onBlur?: (event: InteractionEvent<T>) => void;\n focus?: (event: InteractionEvent<T>) => void;\n onFocus?: (event: InteractionEvent<T>) => void;\n};\nexport type FocusEventState<T> = {\n handleBlur: (event: InteractionEvent<T>) => void;\n handleFocus: (event: InteractionEvent<T>) => void;\n};\nexport type InnerCloseButtonProps = {\n /**\n * The closeButtonId attribute changes the id inside the close button.\n */\n closeButtonId?: string;\n /**\n * The closeButtonText attribute changes the text inside the close button.\n */\n closeButtonText?: string;\n};\nexport type NavigationBackButtonProps = {\n /**\n * The backButtonId attribute changes the id inside the back button.\n */\n backButtonId?: string;\n /**\n * The backButtonText attribute changes the text inside the back button.\n */\n backButtonText?: string;\n};\nexport type AriaLabelledByProps = {\n /**\n * Pass aria-labelledby to inner element\n */\n labelledBy?: string;\n};\nexport type AriaControlsProps = {\n /**\n * Pass aria-controls to inner element\n */\n controls?: string;\n};\nexport type ValueLabelType = {\n value: string;\n label?: string;\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAS5C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAc,EAAW,EAAE;;IACrE,MAAM,EACJ,MAAM,EACP,GAAI,KAEH,CAAC;IACH,OAAO,OAAO,CAAC,CAAC,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,QAAQ,CAAC,kCAAkC,CAAC,CAAA,KAAI,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,0CAAE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA,CAAC,CAAC;AACtJ,CAAC,CAAC;AACF,MAAM,OAAO,0BAA0B;IAQrC,YAAY,OAA2B,EAAE,aAA6B;;QALrD,wBAAmB,GAAmB,IAAI,CAAC;QAEpD,gBAAW,GAAY,KAAK,CAAC;QAC7B,WAAM,GAAW,CAAC,CAAC;QACnB,WAAM,GAAW,CAAC,CAAC;Q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AA0B;CAC3B,CAAA","sourcesContent":["import { handleDataOutside } from './index';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = (event as {\n target: HTMLElement;\n });\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: Element | null;\n private readonly parentSubNavigation: Element | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: Element | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"]}
|
|
1
|
+
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/utils/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAS5C,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAc,EAAW,EAAE;;IACrE,MAAM,EACJ,MAAM,EACP,GAAG,KAEH,CAAC;IACF,OAAO,OAAO,CAAC,CAAC,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,0CAAE,QAAQ,CAAC,kCAAkC,CAAC,CAAA,KAAI,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,aAAa,0CAAE,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAA,CAAC,CAAC;AACtJ,CAAC,CAAC;AACF,MAAM,OAAO,0BAA0B;IAQrC,YAAY,OAA2B,EAAE,aAA6B;;QALrD,wBAAmB,GAAmB,IAAI,CAAC;QAEpD,gBAAW,GAAY,KAAK,CAAC;QAC7B,WAAM,GAAW,CAAC,CAAC;QACnB,WAAM,GAAW,CAAC,CAAC;QAEzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,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IAAI,IAAI,CAAC;QACjC,MAAM,EAAE,GAAG,GAAG,IAAI,MAAM,IAAI,IAAI,CAAC;QACjC,OAAO;YACL,EAAE;YACF,EAAE;YACF,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,WAAW;SAChB,CAAC;IACJ,CAAC;IACM,kBAAkB,CAAC,KAAiB;QACzC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YACpF,OAAO;QACT,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,CAAC;QAC9D,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC;QAC7D,MAAM,mBAAmB,GAAG,IAAI,CAAC,4BAA4B,EAAE,CAAC;QAChE,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACpG,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO;QACT,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,WAAW,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,GAAG,CAAC,CAAC;QACxJ,IAAI,mBAAmB,EAAE,CAAC;YACxB,IAAI,CAAC,YAAY,GAAG,SAAS,CAAC;QAChC,CAAC;IACH,CAAC;CACF;AACD,eAAe;IACb,2BAA2B;IAC3B,0BAA0B;CAC3B,CAAA","sourcesContent":["import { handleDataOutside } from './index';\nexport type TriangleData = {\n itemRect: DOMRect;\n parentElementWidth: number;\n subNavigationHeight: number;\n padding: number;\n outsideVX: 'left' | 'right' | undefined;\n outsideVY: 'top' | 'bottom' | undefined;\n};\nexport const isEventTargetNavigationItem = (event: unknown): boolean => {\n const {\n target\n } = event as {\n target: HTMLElement;\n };\n return Boolean(!target?.classList?.contains('db-navigation-item-expand-button') && target?.parentElement?.classList.contains('db-navigation-item'));\n};\nexport class NavigationItemSafeTriangle {\n private readonly element: HTMLElement | null;\n private readonly subNavigation: Element | null;\n private readonly parentSubNavigation: Element | null = null;\n private triangleData?: TriangleData;\n private initialized: boolean = false;\n private mouseX: number = 0;\n private mouseY: number = 0;\n constructor(element: HTMLElement | null, subNavigation: Element | null) {\n this.element = element;\n this.subNavigation = subNavigation;\n if (!this.element || !this.subNavigation) {\n return;\n }\n this.parentSubNavigation = this.element?.closest('.db-sub-navigation');\n\n /*\n * only initiate if:\n * 1. item is not at root navigation level\n * 2. item is not in the mobile navigation / within db-drawer\n */\n if (this.parentSubNavigation && !this.element.closest('.db-drawer')) {\n this.init();\n }\n }\n private init() {\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n\n // the triangle has the width of the sub-navigation, current nav-item can be wider.\n // so the width of the triangle must be adapted to a possibly wider nav-item.\n this.element?.style.setProperty('--db-navigation-item-inline-size', `${parentElementWidth}px`);\n this.initialized = true;\n }\n public enableFollow() {\n if (!this.initialized || this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n const dataOutsidePair = handleDataOutside(this.subNavigation);\n const itemRect = this.element.getBoundingClientRect();\n const parentElementWidth = this.parentSubNavigation?.getBoundingClientRect().width ?? 0;\n this.triangleData = {\n itemRect,\n parentElementWidth,\n subNavigationHeight: this.subNavigation.getBoundingClientRect().height,\n padding: (parentElementWidth - itemRect.width) / 2,\n outsideVX: dataOutsidePair.vx,\n outsideVY: dataOutsidePair.vy\n };\n }\n public disableFollow() {\n this.triangleData = undefined;\n }\n private getTriangleTipX(): number {\n if (!this.triangleData) return 0;\n if (this.triangleData.outsideVX === 'right') {\n // vertical flipped triangle needs an inverted x pos\n return this.triangleData.itemRect.width - this.mouseX;\n }\n\n // triangle stops shrinking from 75% x pos\n return Math.min(this.mouseX, this.triangleData.itemRect.width * 0.75);\n }\n private getTriangleTipY(): number {\n if (!this.triangleData) return 0;\n\n // padding must be added to the y pos of the tip so that the y pos matches the cursor\n const mouseYLimited = Math.max(Math.min(this.mouseY, this.triangleData.itemRect.height), 0) + this.triangleData.padding;\n if (this.triangleData.outsideVY === 'bottom') {\n // add offset to tip y pos to match corrected sub-navigation y pos\n return mouseYLimited + (this.triangleData.subNavigationHeight - this.triangleData.padding * 2 - this.triangleData.itemRect.height);\n }\n return mouseYLimited;\n }\n private hasMouseEnteredSubNavigation(): boolean {\n if (!this.triangleData) {\n return false;\n }\n const isSubNavigationOnLeftSide = this.triangleData.outsideVX === 'right';\n if (isSubNavigationOnLeftSide && this.mouseX < -1 * this.triangleData.padding) {\n return true;\n }\n if (!isSubNavigationOnLeftSide && this.mouseX > this.triangleData.parentElementWidth - this.triangleData.padding) {\n return true;\n }\n return false;\n }\n private getTriangleCoordinates(variant: 'safe-triangle' | 'fill-gap'): undefined | {\n lb: string;\n lt: string;\n rt: string;\n rb: string;\n } {\n if (!this.triangleData) {\n return;\n }\n if (variant === 'fill-gap') {\n const itemHeight = `${this.triangleData.itemRect.height + 2 * this.triangleData.padding}px`;\n const xStart = `${this.triangleData.parentElementWidth - this.triangleData.padding}px`;\n return {\n lb: `${xStart} ${itemHeight}`,\n lt: `${xStart} 0`,\n rt: '100% 0',\n rb: `100% ${itemHeight}`\n };\n }\n const tipX = this.getTriangleTipX();\n const tipY = this.getTriangleTipY();\n const lb = `${tipX}px ${tipY}px`;\n const lt = `${tipX}px ${tipY}px`;\n return {\n lb,\n lt,\n rt: '100% 0',\n rb: '100% 100%'\n };\n }\n public followByMouseEvent(event: MouseEvent) {\n if (!this.initialized || !this.triangleData || !this.element || !this.subNavigation) {\n return;\n }\n this.mouseX = event.clientX - this.triangleData.itemRect.left;\n this.mouseY = event.clientY - this.triangleData.itemRect.top;\n const isOverSubNavigation = this.hasMouseEnteredSubNavigation();\n const coordinates = this.getTriangleCoordinates(isOverSubNavigation ? 'fill-gap' : 'safe-triangle');\n if (!coordinates) {\n return;\n }\n this.element.style.setProperty('--db-navigation-item-clip-path', `polygon(${coordinates.lb}, ${coordinates.lt}, ${coordinates.rt}, ${coordinates.rb})`);\n if (isOverSubNavigation) {\n this.triangleData = undefined;\n }\n }\n}\nexport default {\n isEventTargetNavigationItem,\n NavigationItemSafeTriangle\n}"]}
|