@db-ux/wc-core-components 1.0.0-test-13b991d
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 +92 -0
- package/dist/cjs/app-globals-3a1e7e63.js +7 -0
- package/dist/cjs/app-globals-3a1e7e63.js.map +1 -0
- package/dist/cjs/constants-89822e5f.js +116 -0
- package/dist/cjs/constants-89822e5f.js.map +1 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js +73 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js.map +1 -0
- package/dist/cjs/db-accordion.cjs.entry.js +130 -0
- package/dist/cjs/db-accordion.cjs.entry.js.map +1 -0
- package/dist/cjs/db-badge.cjs.entry.js +75 -0
- package/dist/cjs/db-badge.cjs.entry.js.map +1 -0
- package/dist/cjs/db-brand.cjs.entry.js +58 -0
- package/dist/cjs/db-brand.cjs.entry.js.map +1 -0
- package/dist/cjs/db-button.cjs.entry.js +62 -0
- package/dist/cjs/db-button.cjs.entry.js.map +1 -0
- package/dist/cjs/db-card.cjs.entry.js +62 -0
- package/dist/cjs/db-card.cjs.entry.js.map +1 -0
- package/dist/cjs/db-checkbox.cjs.entry.js +149 -0
- package/dist/cjs/db-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/db-divider.cjs.entry.js +56 -0
- package/dist/cjs/db-divider.cjs.entry.js.map +1 -0
- package/dist/cjs/db-drawer.cjs.entry.js +108 -0
- package/dist/cjs/db-drawer.cjs.entry.js.map +1 -0
- package/dist/cjs/db-header.cjs.entry.js +89 -0
- package/dist/cjs/db-header.cjs.entry.js.map +1 -0
- package/dist/cjs/db-icon.cjs.entry.js +56 -0
- package/dist/cjs/db-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/db-infotext.cjs.entry.js +57 -0
- package/dist/cjs/db-infotext.cjs.entry.js.map +1 -0
- package/dist/cjs/db-input.cjs.entry.js +157 -0
- package/dist/cjs/db-input.cjs.entry.js.map +1 -0
- package/dist/cjs/db-link.cjs.entry.js +63 -0
- package/dist/cjs/db-link.cjs.entry.js.map +1 -0
- package/dist/cjs/db-navigation-item.cjs.entry.js +102 -0
- package/dist/cjs/db-navigation-item.cjs.entry.js.map +1 -0
- package/dist/cjs/db-navigation.cjs.entry.js +59 -0
- package/dist/cjs/db-navigation.cjs.entry.js.map +1 -0
- package/dist/cjs/db-notification.cjs.entry.js +64 -0
- package/dist/cjs/db-notification.cjs.entry.js.map +1 -0
- package/dist/cjs/db-page.cjs.entry.js +73 -0
- package/dist/cjs/db-page.cjs.entry.js.map +1 -0
- package/dist/cjs/db-popover.cjs.entry.js +113 -0
- package/dist/cjs/db-popover.cjs.entry.js.map +1 -0
- package/dist/cjs/db-radio.cjs.entry.js +98 -0
- package/dist/cjs/db-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/db-section.cjs.entry.js +59 -0
- package/dist/cjs/db-section.cjs.entry.js.map +1 -0
- package/dist/cjs/db-select.cjs.entry.js +170 -0
- package/dist/cjs/db-select.cjs.entry.js.map +1 -0
- package/dist/cjs/db-stack.cjs.entry.js +56 -0
- package/dist/cjs/db-stack.cjs.entry.js.map +1 -0
- package/dist/cjs/db-switch.cjs.entry.js +91 -0
- package/dist/cjs/db-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/db-tab-item_3.cjs.entry.js +175 -0
- package/dist/cjs/db-tab-item_3.cjs.entry.js.map +1 -0
- package/dist/cjs/db-tabs.cjs.entry.js +173 -0
- package/dist/cjs/db-tabs.cjs.entry.js.map +1 -0
- package/dist/cjs/db-tag.cjs.entry.js +83 -0
- package/dist/cjs/db-tag.cjs.entry.js.map +1 -0
- package/dist/cjs/db-textarea.cjs.entry.js +144 -0
- package/dist/cjs/db-textarea.cjs.entry.js.map +1 -0
- package/dist/cjs/db-tooltip.cjs.entry.js +86 -0
- package/dist/cjs/db-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/db-ux.cjs.js +27 -0
- package/dist/cjs/db-ux.cjs.js.map +1 -0
- package/dist/cjs/index-3d093f06.js +1496 -0
- package/dist/cjs/index-3d093f06.js.map +1 -0
- package/dist/cjs/index-c0df827d.js +169 -0
- package/dist/cjs/index-c0df827d.js.map +1 -0
- package/dist/cjs/index.cjs.js +118 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +17 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/navigation-bb2d5552.js +140 -0
- package/dist/cjs/navigation-bb2d5552.js.map +1 -0
- package/dist/collection/collection-manifest.json +42 -0
- package/dist/collection/components/accordion/accordion.js +311 -0
- package/dist/collection/components/accordion/accordion.js.map +1 -0
- package/dist/collection/components/accordion/index.js +3 -0
- package/dist/collection/components/accordion/index.js.map +1 -0
- package/dist/collection/components/accordion/model.js +3 -0
- package/dist/collection/components/accordion/model.js.map +1 -0
- package/dist/collection/components/accordion-item/accordion-item.js +246 -0
- package/dist/collection/components/accordion-item/accordion-item.js.map +1 -0
- package/dist/collection/components/accordion-item/index.js +3 -0
- package/dist/collection/components/accordion-item/index.js.map +1 -0
- package/dist/collection/components/accordion-item/model.js +2 -0
- package/dist/collection/components/accordion-item/model.js.map +1 -0
- package/dist/collection/components/badge/badge.js +280 -0
- package/dist/collection/components/badge/badge.js.map +1 -0
- package/dist/collection/components/badge/index.js +3 -0
- package/dist/collection/components/badge/index.js.map +1 -0
- package/dist/collection/components/badge/model.js +2 -0
- package/dist/collection/components/badge/model.js.map +1 -0
- package/dist/collection/components/brand/brand.js +206 -0
- package/dist/collection/components/brand/brand.js.map +1 -0
- package/dist/collection/components/brand/index.js +3 -0
- package/dist/collection/components/brand/index.js.map +1 -0
- package/dist/collection/components/brand/model.js +2 -0
- package/dist/collection/components/brand/model.js.map +1 -0
- package/dist/collection/components/button/button.js +527 -0
- package/dist/collection/components/button/button.js.map +1 -0
- package/dist/collection/components/button/index.js +3 -0
- package/dist/collection/components/button/index.js.map +1 -0
- package/dist/collection/components/button/model.js +4 -0
- package/dist/collection/components/button/model.js.map +1 -0
- package/dist/collection/components/card/card.js +202 -0
- package/dist/collection/components/card/card.js.map +1 -0
- package/dist/collection/components/card/index.js +3 -0
- package/dist/collection/components/card/index.js.map +1 -0
- package/dist/collection/components/card/model.js +3 -0
- package/dist/collection/components/card/model.js.map +1 -0
- package/dist/collection/components/checkbox/checkbox.js +699 -0
- package/dist/collection/components/checkbox/checkbox.js.map +1 -0
- package/dist/collection/components/checkbox/index.js +3 -0
- package/dist/collection/components/checkbox/index.js.map +1 -0
- package/dist/collection/components/checkbox/model.js +2 -0
- package/dist/collection/components/checkbox/model.js.map +1 -0
- package/dist/collection/components/divider/divider.js +204 -0
- package/dist/collection/components/divider/divider.js.map +1 -0
- package/dist/collection/components/divider/index.js +3 -0
- package/dist/collection/components/divider/index.js.map +1 -0
- package/dist/collection/components/divider/model.js +3 -0
- package/dist/collection/components/divider/model.js.map +1 -0
- package/dist/collection/components/drawer/drawer.js +398 -0
- package/dist/collection/components/drawer/drawer.js.map +1 -0
- package/dist/collection/components/drawer/index.js +3 -0
- package/dist/collection/components/drawer/index.js.map +1 -0
- package/dist/collection/components/drawer/model.js +4 -0
- package/dist/collection/components/drawer/model.js.map +1 -0
- package/dist/collection/components/header/header.js +266 -0
- package/dist/collection/components/header/header.js.map +1 -0
- package/dist/collection/components/header/index.js +3 -0
- package/dist/collection/components/header/index.js.map +1 -0
- package/dist/collection/components/header/model.js +2 -0
- package/dist/collection/components/header/model.js.map +1 -0
- package/dist/collection/components/icon/icon.js +204 -0
- package/dist/collection/components/icon/icon.js.map +1 -0
- package/dist/collection/components/icon/index.js +3 -0
- package/dist/collection/components/icon/index.js.map +1 -0
- package/dist/collection/components/icon/model.js +3 -0
- package/dist/collection/components/icon/model.js.map +1 -0
- package/dist/collection/components/infotext/index.js +3 -0
- package/dist/collection/components/infotext/index.js.map +1 -0
- package/dist/collection/components/infotext/infotext.js +230 -0
- package/dist/collection/components/infotext/infotext.js.map +1 -0
- package/dist/collection/components/infotext/model.js +2 -0
- package/dist/collection/components/infotext/model.js.map +1 -0
- package/dist/collection/components/input/index.js +3 -0
- package/dist/collection/components/input/index.js.map +1 -0
- package/dist/collection/components/input/input.js +1118 -0
- package/dist/collection/components/input/input.js.map +1 -0
- package/dist/collection/components/input/model.js +6 -0
- package/dist/collection/components/input/model.js.map +1 -0
- package/dist/collection/components/link/index.js +3 -0
- package/dist/collection/components/link/index.js.map +1 -0
- package/dist/collection/components/link/link.js +478 -0
- package/dist/collection/components/link/link.js.map +1 -0
- package/dist/collection/components/link/model.js +4 -0
- package/dist/collection/components/link/model.js.map +1 -0
- package/dist/collection/components/navigation/index.js +3 -0
- package/dist/collection/components/navigation/index.js.map +1 -0
- package/dist/collection/components/navigation/model.js +2 -0
- package/dist/collection/components/navigation/model.js.map +1 -0
- package/dist/collection/components/navigation/navigation.js +139 -0
- package/dist/collection/components/navigation/navigation.js.map +1 -0
- package/dist/collection/components/navigation-item/index.js +3 -0
- package/dist/collection/components/navigation-item/index.js.map +1 -0
- package/dist/collection/components/navigation-item/model.js +2 -0
- package/dist/collection/components/navigation-item/model.js.map +1 -0
- package/dist/collection/components/navigation-item/navigation-item.js +404 -0
- package/dist/collection/components/navigation-item/navigation-item.js.map +1 -0
- package/dist/collection/components/notification/index.js +3 -0
- package/dist/collection/components/notification/index.js.map +1 -0
- package/dist/collection/components/notification/model.js +4 -0
- package/dist/collection/components/notification/model.js.map +1 -0
- package/dist/collection/components/notification/notification.js +480 -0
- package/dist/collection/components/notification/notification.js.map +1 -0
- package/dist/collection/components/page/index.js +3 -0
- package/dist/collection/components/page/index.js.map +1 -0
- package/dist/collection/components/page/model.js +3 -0
- package/dist/collection/components/page/model.js.map +1 -0
- package/dist/collection/components/page/page.js +204 -0
- package/dist/collection/components/page/page.js.map +1 -0
- package/dist/collection/components/popover/index.js +3 -0
- package/dist/collection/components/popover/index.js.map +1 -0
- package/dist/collection/components/popover/model.js +2 -0
- package/dist/collection/components/popover/model.js.map +1 -0
- package/dist/collection/components/popover/popover.js +344 -0
- package/dist/collection/components/popover/popover.js.map +1 -0
- package/dist/collection/components/radio/index.js +3 -0
- package/dist/collection/components/radio/index.js.map +1 -0
- package/dist/collection/components/radio/model.js +2 -0
- package/dist/collection/components/radio/model.js.map +1 -0
- package/dist/collection/components/radio/radio.js +518 -0
- package/dist/collection/components/radio/radio.js.map +1 -0
- package/dist/collection/components/section/index.js +3 -0
- package/dist/collection/components/section/index.js.map +1 -0
- package/dist/collection/components/section/model.js +2 -0
- package/dist/collection/components/section/model.js.map +1 -0
- package/dist/collection/components/section/section.js +164 -0
- package/dist/collection/components/section/section.js.map +1 -0
- package/dist/collection/components/select/index.js +3 -0
- package/dist/collection/components/select/index.js.map +1 -0
- package/dist/collection/components/select/model.js +2 -0
- package/dist/collection/components/select/model.js.map +1 -0
- package/dist/collection/components/select/select.js +846 -0
- package/dist/collection/components/select/select.js.map +1 -0
- package/dist/collection/components/stack/index.js +3 -0
- package/dist/collection/components/stack/index.js.map +1 -0
- package/dist/collection/components/stack/model.js +5 -0
- package/dist/collection/components/stack/model.js.map +1 -0
- package/dist/collection/components/stack/stack.js +254 -0
- package/dist/collection/components/stack/stack.js.map +1 -0
- package/dist/collection/components/switch/index.js +3 -0
- package/dist/collection/components/switch/index.js.map +1 -0
- package/dist/collection/components/switch/model.js +2 -0
- package/dist/collection/components/switch/model.js.map +1 -0
- package/dist/collection/components/switch/switch.js +587 -0
- package/dist/collection/components/switch/switch.js.map +1 -0
- package/dist/collection/components/tab-item/index.js +3 -0
- package/dist/collection/components/tab-item/index.js.map +1 -0
- package/dist/collection/components/tab-item/model.js +2 -0
- package/dist/collection/components/tab-item/model.js.map +1 -0
- package/dist/collection/components/tab-item/tab-item.js +399 -0
- package/dist/collection/components/tab-item/tab-item.js.map +1 -0
- package/dist/collection/components/tab-list/index.js +3 -0
- package/dist/collection/components/tab-list/index.js.map +1 -0
- package/dist/collection/components/tab-list/model.js +2 -0
- package/dist/collection/components/tab-list/model.js.map +1 -0
- package/dist/collection/components/tab-list/tab-list.js +114 -0
- package/dist/collection/components/tab-list/tab-list.js.map +1 -0
- package/dist/collection/components/tab-panel/index.js +3 -0
- package/dist/collection/components/tab-panel/index.js.map +1 -0
- package/dist/collection/components/tab-panel/model.js +2 -0
- package/dist/collection/components/tab-panel/model.js.map +1 -0
- package/dist/collection/components/tab-panel/tab-panel.js +154 -0
- package/dist/collection/components/tab-panel/tab-panel.js.map +1 -0
- package/dist/collection/components/tabs/index.js +3 -0
- package/dist/collection/components/tabs/index.js.map +1 -0
- package/dist/collection/components/tabs/model.js +3 -0
- package/dist/collection/components/tabs/model.js.map +1 -0
- package/dist/collection/components/tabs/tabs.js +458 -0
- package/dist/collection/components/tabs/tabs.js.map +1 -0
- package/dist/collection/components/tag/index.js +3 -0
- package/dist/collection/components/tag/index.js.map +1 -0
- package/dist/collection/components/tag/model.js +2 -0
- package/dist/collection/components/tag/model.js.map +1 -0
- package/dist/collection/components/tag/tag.js +430 -0
- package/dist/collection/components/tag/tag.js.map +1 -0
- package/dist/collection/components/textarea/index.js +3 -0
- package/dist/collection/components/textarea/index.js.map +1 -0
- package/dist/collection/components/textarea/model.js +3 -0
- package/dist/collection/components/textarea/model.js.map +1 -0
- package/dist/collection/components/textarea/textarea.js +956 -0
- package/dist/collection/components/textarea/textarea.js.map +1 -0
- package/dist/collection/components/tooltip/index.js +3 -0
- package/dist/collection/components/tooltip/index.js.map +1 -0
- package/dist/collection/components/tooltip/model.js +2 -0
- package/dist/collection/components/tooltip/model.js.map +1 -0
- package/dist/collection/components/tooltip/tooltip.js +292 -0
- package/dist/collection/components/tooltip/tooltip.js.map +1 -0
- package/dist/collection/index.js +37 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/shared/constants.js +88 -0
- package/dist/collection/shared/constants.js.map +1 -0
- package/dist/collection/shared/model.js +22 -0
- package/dist/collection/shared/model.js.map +1 -0
- package/dist/collection/utils/form-components.js +11 -0
- package/dist/collection/utils/form-components.js.map +1 -0
- package/dist/collection/utils/index.js +167 -0
- package/dist/collection/utils/index.js.map +1 -0
- package/dist/collection/utils/navigation.js +137 -0
- package/dist/collection/utils/navigation.js.map +1 -0
- package/dist/custom-elements.json +13474 -0
- package/dist/db-ux/db-ux.esm.js +2 -0
- package/dist/db-ux/db-ux.esm.js.map +1 -0
- package/dist/db-ux/index.esm.js +2 -0
- package/dist/db-ux/index.esm.js.map +1 -0
- package/dist/db-ux/p-031e9fbf.entry.js +2 -0
- package/dist/db-ux/p-031e9fbf.entry.js.map +1 -0
- package/dist/db-ux/p-08126c21.entry.js +2 -0
- package/dist/db-ux/p-08126c21.entry.js.map +1 -0
- package/dist/db-ux/p-1066cd52.entry.js +2 -0
- package/dist/db-ux/p-1066cd52.entry.js.map +1 -0
- package/dist/db-ux/p-10d30f53.entry.js +2 -0
- package/dist/db-ux/p-10d30f53.entry.js.map +1 -0
- package/dist/db-ux/p-1566cfef.entry.js +2 -0
- package/dist/db-ux/p-1566cfef.entry.js.map +1 -0
- package/dist/db-ux/p-1c12853c.entry.js +2 -0
- package/dist/db-ux/p-1c12853c.entry.js.map +1 -0
- package/dist/db-ux/p-1feee149.js +3 -0
- package/dist/db-ux/p-1feee149.js.map +1 -0
- package/dist/db-ux/p-2d32aa06.entry.js +2 -0
- package/dist/db-ux/p-2d32aa06.entry.js.map +1 -0
- package/dist/db-ux/p-2e318e2a.entry.js +2 -0
- package/dist/db-ux/p-2e318e2a.entry.js.map +1 -0
- package/dist/db-ux/p-34f88e4e.js +2 -0
- package/dist/db-ux/p-34f88e4e.js.map +1 -0
- package/dist/db-ux/p-3f2e2d87.entry.js +2 -0
- package/dist/db-ux/p-3f2e2d87.entry.js.map +1 -0
- package/dist/db-ux/p-43aa16d7.entry.js +2 -0
- package/dist/db-ux/p-43aa16d7.entry.js.map +1 -0
- package/dist/db-ux/p-5a689165.entry.js +2 -0
- package/dist/db-ux/p-5a689165.entry.js.map +1 -0
- package/dist/db-ux/p-683d690f.entry.js +2 -0
- package/dist/db-ux/p-683d690f.entry.js.map +1 -0
- package/dist/db-ux/p-6b6f1f7f.entry.js +2 -0
- package/dist/db-ux/p-6b6f1f7f.entry.js.map +1 -0
- package/dist/db-ux/p-6f645f17.entry.js +2 -0
- package/dist/db-ux/p-6f645f17.entry.js.map +1 -0
- package/dist/db-ux/p-71cb932e.entry.js +2 -0
- package/dist/db-ux/p-71cb932e.entry.js.map +1 -0
- package/dist/db-ux/p-78e5293a.entry.js +2 -0
- package/dist/db-ux/p-78e5293a.entry.js.map +1 -0
- package/dist/db-ux/p-79b43b42.entry.js +2 -0
- package/dist/db-ux/p-79b43b42.entry.js.map +1 -0
- package/dist/db-ux/p-79d9caa7.entry.js +2 -0
- package/dist/db-ux/p-79d9caa7.entry.js.map +1 -0
- package/dist/db-ux/p-871805e1.entry.js +2 -0
- package/dist/db-ux/p-871805e1.entry.js.map +1 -0
- package/dist/db-ux/p-8e2a086b.entry.js +2 -0
- package/dist/db-ux/p-8e2a086b.entry.js.map +1 -0
- package/dist/db-ux/p-99d90022.js +2 -0
- package/dist/db-ux/p-99d90022.js.map +1 -0
- package/dist/db-ux/p-a3be13fd.entry.js +2 -0
- package/dist/db-ux/p-a3be13fd.entry.js.map +1 -0
- package/dist/db-ux/p-a494046c.entry.js +2 -0
- package/dist/db-ux/p-a494046c.entry.js.map +1 -0
- package/dist/db-ux/p-ab8a1944.entry.js +2 -0
- package/dist/db-ux/p-ab8a1944.entry.js.map +1 -0
- package/dist/db-ux/p-af3834b6.js +2 -0
- package/dist/db-ux/p-af3834b6.js.map +1 -0
- package/dist/db-ux/p-b0f1a571.entry.js +2 -0
- package/dist/db-ux/p-b0f1a571.entry.js.map +1 -0
- package/dist/db-ux/p-b47af6eb.entry.js +2 -0
- package/dist/db-ux/p-b47af6eb.entry.js.map +1 -0
- package/dist/db-ux/p-c6d54dd4.entry.js +2 -0
- package/dist/db-ux/p-c6d54dd4.entry.js.map +1 -0
- package/dist/db-ux/p-d48f3770.entry.js +2 -0
- package/dist/db-ux/p-d48f3770.entry.js.map +1 -0
- package/dist/db-ux/p-e1255160.js +2 -0
- package/dist/db-ux/p-e1255160.js.map +1 -0
- package/dist/db-ux/p-f65f4eac.entry.js +2 -0
- package/dist/db-ux/p-f65f4eac.entry.js.map +1 -0
- package/dist/db-ux/p-fea6db86.entry.js +2 -0
- package/dist/db-ux/p-fea6db86.entry.js.map +1 -0
- package/dist/esm/app-globals-0f993ce5.js +5 -0
- package/dist/esm/app-globals-0f993ce5.js.map +1 -0
- package/dist/esm/constants-745cf8d7.js +91 -0
- package/dist/esm/constants-745cf8d7.js.map +1 -0
- package/dist/esm/db-accordion-item.entry.js +69 -0
- package/dist/esm/db-accordion-item.entry.js.map +1 -0
- package/dist/esm/db-accordion.entry.js +126 -0
- package/dist/esm/db-accordion.entry.js.map +1 -0
- package/dist/esm/db-badge.entry.js +71 -0
- package/dist/esm/db-badge.entry.js.map +1 -0
- package/dist/esm/db-brand.entry.js +54 -0
- package/dist/esm/db-brand.entry.js.map +1 -0
- package/dist/esm/db-button.entry.js +58 -0
- package/dist/esm/db-button.entry.js.map +1 -0
- package/dist/esm/db-card.entry.js +58 -0
- package/dist/esm/db-card.entry.js.map +1 -0
- package/dist/esm/db-checkbox.entry.js +145 -0
- package/dist/esm/db-checkbox.entry.js.map +1 -0
- package/dist/esm/db-divider.entry.js +52 -0
- package/dist/esm/db-divider.entry.js.map +1 -0
- package/dist/esm/db-drawer.entry.js +104 -0
- package/dist/esm/db-drawer.entry.js.map +1 -0
- package/dist/esm/db-header.entry.js +85 -0
- package/dist/esm/db-header.entry.js.map +1 -0
- package/dist/esm/db-icon.entry.js +52 -0
- package/dist/esm/db-icon.entry.js.map +1 -0
- package/dist/esm/db-infotext.entry.js +53 -0
- package/dist/esm/db-infotext.entry.js.map +1 -0
- package/dist/esm/db-input.entry.js +153 -0
- package/dist/esm/db-input.entry.js.map +1 -0
- package/dist/esm/db-link.entry.js +59 -0
- package/dist/esm/db-link.entry.js.map +1 -0
- package/dist/esm/db-navigation-item.entry.js +98 -0
- package/dist/esm/db-navigation-item.entry.js.map +1 -0
- package/dist/esm/db-navigation.entry.js +55 -0
- package/dist/esm/db-navigation.entry.js.map +1 -0
- package/dist/esm/db-notification.entry.js +60 -0
- package/dist/esm/db-notification.entry.js.map +1 -0
- package/dist/esm/db-page.entry.js +69 -0
- package/dist/esm/db-page.entry.js.map +1 -0
- package/dist/esm/db-popover.entry.js +109 -0
- package/dist/esm/db-popover.entry.js.map +1 -0
- package/dist/esm/db-radio.entry.js +94 -0
- package/dist/esm/db-radio.entry.js.map +1 -0
- package/dist/esm/db-section.entry.js +55 -0
- package/dist/esm/db-section.entry.js.map +1 -0
- package/dist/esm/db-select.entry.js +166 -0
- package/dist/esm/db-select.entry.js.map +1 -0
- package/dist/esm/db-stack.entry.js +52 -0
- package/dist/esm/db-stack.entry.js.map +1 -0
- package/dist/esm/db-switch.entry.js +87 -0
- package/dist/esm/db-switch.entry.js.map +1 -0
- package/dist/esm/db-tab-item_3.entry.js +169 -0
- package/dist/esm/db-tab-item_3.entry.js.map +1 -0
- package/dist/esm/db-tabs.entry.js +169 -0
- package/dist/esm/db-tabs.entry.js.map +1 -0
- package/dist/esm/db-tag.entry.js +79 -0
- package/dist/esm/db-tag.entry.js.map +1 -0
- package/dist/esm/db-textarea.entry.js +140 -0
- package/dist/esm/db-textarea.entry.js.map +1 -0
- package/dist/esm/db-tooltip.entry.js +82 -0
- package/dist/esm/db-tooltip.entry.js.map +1 -0
- package/dist/esm/db-ux.js +22 -0
- package/dist/esm/db-ux.js.map +1 -0
- package/dist/esm/index-5be50117.js +1468 -0
- package/dist/esm/index-5be50117.js.map +1 -0
- package/dist/esm/index-fad99efc.js +153 -0
- package/dist/esm/index-fad99efc.js.map +1 -0
- package/dist/esm/index.js +30 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +13 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/navigation-9fec9921.js +137 -0
- package/dist/esm/navigation-9fec9921.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/loader/cdn.js +1 -0
- package/dist/loader/index.cjs.js +1 -0
- package/dist/loader/index.d.ts +24 -0
- package/dist/loader/index.es2017.js +1 -0
- package/dist/loader/index.js +2 -0
- package/dist/loader/package.json +11 -0
- package/dist/types/components/accordion/accordion.d.ts +29 -0
- package/dist/types/components/accordion/index.d.ts +2 -0
- package/dist/types/components/accordion/model.d.ts +41 -0
- package/dist/types/components/accordion-item/accordion-item.d.ts +27 -0
- package/dist/types/components/accordion-item/index.d.ts +2 -0
- package/dist/types/components/accordion-item/model.d.ts +24 -0
- package/dist/types/components/badge/badge.d.ts +26 -0
- package/dist/types/components/badge/index.d.ts +2 -0
- package/dist/types/components/badge/model.d.ts +16 -0
- package/dist/types/components/brand/brand.d.ts +22 -0
- package/dist/types/components/brand/index.d.ts +2 -0
- package/dist/types/components/brand/model.d.ts +10 -0
- package/dist/types/components/button/button.d.ts +37 -0
- package/dist/types/components/button/index.d.ts +2 -0
- package/dist/types/components/button/model.d.ts +52 -0
- package/dist/types/components/card/card.d.ts +24 -0
- package/dist/types/components/card/index.d.ts +2 -0
- package/dist/types/components/card/model.d.ts +18 -0
- package/dist/types/components/checkbox/checkbox.d.ts +51 -0
- package/dist/types/components/checkbox/index.d.ts +2 -0
- package/dist/types/components/checkbox/model.d.ts +10 -0
- package/dist/types/components/divider/divider.d.ts +22 -0
- package/dist/types/components/divider/index.d.ts +2 -0
- package/dist/types/components/divider/model.d.ts +18 -0
- package/dist/types/components/drawer/drawer.d.ts +32 -0
- package/dist/types/components/drawer/index.d.ts +2 -0
- package/dist/types/components/drawer/model.d.ts +41 -0
- package/dist/types/components/header/header.d.ts +32 -0
- package/dist/types/components/header/index.d.ts +2 -0
- package/dist/types/components/header/model.d.ts +44 -0
- package/dist/types/components/icon/icon.d.ts +22 -0
- package/dist/types/components/icon/index.d.ts +2 -0
- package/dist/types/components/icon/model.d.ts +12 -0
- package/dist/types/components/infotext/index.d.ts +2 -0
- package/dist/types/components/infotext/infotext.d.ts +23 -0
- package/dist/types/components/infotext/model.d.ts +5 -0
- package/dist/types/components/input/index.d.ts +2 -0
- package/dist/types/components/input/input.d.ts +71 -0
- package/dist/types/components/input/model.d.ts +39 -0
- package/dist/types/components/link/index.d.ts +2 -0
- package/dist/types/components/link/link.d.ts +35 -0
- package/dist/types/components/link/model.d.ts +24 -0
- package/dist/types/components/navigation/index.d.ts +2 -0
- package/dist/types/components/navigation/model.d.ts +5 -0
- package/dist/types/components/navigation/navigation.d.ts +20 -0
- package/dist/types/components/navigation-item/index.d.ts +2 -0
- package/dist/types/components/navigation-item/model.d.ts +34 -0
- package/dist/types/components/navigation-item/navigation-item.d.ts +39 -0
- package/dist/types/components/notification/index.d.ts +2 -0
- package/dist/types/components/notification/model.d.ts +57 -0
- package/dist/types/components/notification/notification.d.ts +36 -0
- package/dist/types/components/page/index.d.ts +2 -0
- package/dist/types/components/page/model.d.ts +32 -0
- package/dist/types/components/page/page.d.ts +24 -0
- package/dist/types/components/popover/index.d.ts +2 -0
- package/dist/types/components/popover/model.d.ts +18 -0
- package/dist/types/components/popover/popover.d.ts +31 -0
- package/dist/types/components/radio/index.d.ts +2 -0
- package/dist/types/components/radio/model.d.ts +7 -0
- package/dist/types/components/radio/radio.d.ts +41 -0
- package/dist/types/components/section/index.d.ts +2 -0
- package/dist/types/components/section/model.d.ts +5 -0
- package/dist/types/components/section/section.d.ts +21 -0
- package/dist/types/components/select/index.d.ts +2 -0
- package/dist/types/components/select/model.d.ts +43 -0
- package/dist/types/components/select/select.d.ts +62 -0
- package/dist/types/components/stack/index.d.ts +2 -0
- package/dist/types/components/stack/model.d.ts +34 -0
- package/dist/types/components/stack/stack.d.ts +24 -0
- package/dist/types/components/switch/index.d.ts +2 -0
- package/dist/types/components/switch/model.d.ts +12 -0
- package/dist/types/components/switch/switch.d.ts +44 -0
- package/dist/types/components/tab-item/index.d.ts +2 -0
- package/dist/types/components/tab-item/model.d.ts +24 -0
- package/dist/types/components/tab-item/tab-item.d.ts +34 -0
- package/dist/types/components/tab-list/index.d.ts +2 -0
- package/dist/types/components/tab-list/model.d.ts +5 -0
- package/dist/types/components/tab-list/tab-list.d.ts +19 -0
- package/dist/types/components/tab-panel/index.d.ts +2 -0
- package/dist/types/components/tab-panel/model.d.ts +10 -0
- package/dist/types/components/tab-panel/tab-panel.d.ts +20 -0
- package/dist/types/components/tabs/index.d.ts +2 -0
- package/dist/types/components/tabs/model.d.ts +47 -0
- package/dist/types/components/tabs/tabs.d.ts +39 -0
- package/dist/types/components/tag/index.d.ts +2 -0
- package/dist/types/components/tag/model.d.ts +45 -0
- package/dist/types/components/tag/tag.d.ts +34 -0
- package/dist/types/components/textarea/index.d.ts +2 -0
- package/dist/types/components/textarea/model.d.ts +30 -0
- package/dist/types/components/textarea/textarea.d.ts +63 -0
- package/dist/types/components/tooltip/index.d.ts +2 -0
- package/dist/types/components/tooltip/model.d.ts +7 -0
- package/dist/types/components/tooltip/tooltip.d.ts +30 -0
- package/dist/types/components.d.ts +1479 -0
- package/dist/types/index.d.ts +36 -0
- package/dist/types/shared/constants.d.ts +83 -0
- package/dist/types/shared/model.d.ts +445 -0
- package/dist/types/stencil-public-runtime.d.ts +1680 -0
- package/dist/types/utils/form-components.d.ts +2 -0
- package/dist/types/utils/index.d.ts +61 -0
- package/dist/types/utils/navigation.d.ts +32 -0
- package/dist/vscode.html-custom-data.json +2245 -0
- package/dist/web-types.json +3991 -0
- package/package.json +48 -0
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
import { cls, uuid } from "../../utils";
|
|
2
|
+
import { DEFAULT_ID } from "../../shared/constants";
|
|
3
|
+
import { h } from "@stencil/core";
|
|
4
|
+
/**
|
|
5
|
+
* @slot children - This is a default/unnamed slot
|
|
6
|
+
|
|
7
|
+
*/
|
|
8
|
+
export class DBAccordion {
|
|
9
|
+
constructor() {
|
|
10
|
+
this._id = DEFAULT_ID;
|
|
11
|
+
this._name = "";
|
|
12
|
+
this.initialized = false;
|
|
13
|
+
this._initOpenIndexDone = false;
|
|
14
|
+
}
|
|
15
|
+
convertItems(items) {
|
|
16
|
+
try {
|
|
17
|
+
if (typeof items === "string") {
|
|
18
|
+
return JSON.parse(items);
|
|
19
|
+
}
|
|
20
|
+
return items;
|
|
21
|
+
}
|
|
22
|
+
catch (error) {
|
|
23
|
+
console.error(error);
|
|
24
|
+
}
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
29
|
+
* @param element the ref for the component
|
|
30
|
+
* @param customElementSelector the custom element like `my-component`
|
|
31
|
+
*/
|
|
32
|
+
enableAttributePassing(element, customElementSelector) {
|
|
33
|
+
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
34
|
+
if (element && parent) {
|
|
35
|
+
const attributes = parent.attributes;
|
|
36
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
37
|
+
const attr = attributes.item(i);
|
|
38
|
+
if (attr &&
|
|
39
|
+
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
40
|
+
element.setAttribute(attr.name, attr.value);
|
|
41
|
+
parent.removeAttribute(attr.name);
|
|
42
|
+
}
|
|
43
|
+
if (attr && attr.name === "class") {
|
|
44
|
+
const isWebComponent = attr.value.includes("hydrated");
|
|
45
|
+
const value = attr.value.replace("hydrated", "").trim();
|
|
46
|
+
const currentClass = element.getAttribute("class");
|
|
47
|
+
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
48
|
+
if (isWebComponent) {
|
|
49
|
+
// Stencil is using this class for lazy loading component
|
|
50
|
+
parent.setAttribute("class", "hydrated");
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
parent.removeAttribute(attr.name);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
componentDidLoad() {
|
|
60
|
+
this.enableAttributePassing(this._ref, "db-accordion");
|
|
61
|
+
this._id = this.id || "accordion-" + uuid();
|
|
62
|
+
this.initialized = true;
|
|
63
|
+
this._initOpenIndexDone = true;
|
|
64
|
+
}
|
|
65
|
+
componentDidUpdate() {
|
|
66
|
+
var _a;
|
|
67
|
+
// If we have a single behavior we first check for
|
|
68
|
+
// props.name otherwise for state_id
|
|
69
|
+
if (this.initialized) {
|
|
70
|
+
if (this.behavior === "single") {
|
|
71
|
+
if (this.name) {
|
|
72
|
+
if (this._name !== this.name) {
|
|
73
|
+
this._name = this.name;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
if (this._name !== this._id && this._id) {
|
|
78
|
+
this._name = this._id;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
this._name = "";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (this._ref) {
|
|
87
|
+
const childDetails = this._ref.getElementsByTagName("details");
|
|
88
|
+
if (childDetails) {
|
|
89
|
+
for (const details of Array.from(childDetails)) {
|
|
90
|
+
if (this._name === "") {
|
|
91
|
+
details.removeAttribute("name");
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
details.name = this._name;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (this._ref && this._initOpenIndexDone) {
|
|
100
|
+
if (this.initOpenIndex && ((_a = this.initOpenIndex) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
101
|
+
const childDetails = this._ref.getElementsByTagName("details");
|
|
102
|
+
if (childDetails) {
|
|
103
|
+
const initOpenIndex = this.behavior === "single" && this.initOpenIndex.length > 1
|
|
104
|
+
? [this.initOpenIndex[0]] // use only one index for behavior=single
|
|
105
|
+
: this.initOpenIndex;
|
|
106
|
+
Array.from(childDetails).forEach((details, index) => {
|
|
107
|
+
if (initOpenIndex.includes(index)) {
|
|
108
|
+
details.open = true;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
this._initOpenIndexDone = false;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
var _a;
|
|
118
|
+
return (h("ul", { key: '6a2d7280077c11e5660b5638d2d10b4dce057be5', class: cls("db-accordion", this.className), ref: (el) => {
|
|
119
|
+
this._ref = el;
|
|
120
|
+
}, id: this._id, "data-variant": this.variant }, !this.items ? h("slot", null) : null, this.items
|
|
121
|
+
? (_a = this.convertItems(this.items)) === null || _a === void 0 ? void 0 : _a.map((item, index) => (h("db-accordion-item", { key: `accordion-item-${index}`, headlinePlain: item.headlinePlain, disabled: item.disabled, text: item.text })))
|
|
122
|
+
: null));
|
|
123
|
+
}
|
|
124
|
+
static get is() { return "db-accordion"; }
|
|
125
|
+
static get properties() {
|
|
126
|
+
return {
|
|
127
|
+
"id": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"mutable": false,
|
|
130
|
+
"complexType": {
|
|
131
|
+
"original": "DBAccordionProps[\"id\"]",
|
|
132
|
+
"resolved": "string",
|
|
133
|
+
"references": {
|
|
134
|
+
"DBAccordionProps": {
|
|
135
|
+
"location": "import",
|
|
136
|
+
"path": "./model",
|
|
137
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"required": false,
|
|
142
|
+
"optional": false,
|
|
143
|
+
"docs": {
|
|
144
|
+
"tags": [],
|
|
145
|
+
"text": ""
|
|
146
|
+
},
|
|
147
|
+
"getter": false,
|
|
148
|
+
"setter": false,
|
|
149
|
+
"attribute": "id",
|
|
150
|
+
"reflect": false
|
|
151
|
+
},
|
|
152
|
+
"name": {
|
|
153
|
+
"type": "string",
|
|
154
|
+
"mutable": false,
|
|
155
|
+
"complexType": {
|
|
156
|
+
"original": "DBAccordionProps[\"name\"]",
|
|
157
|
+
"resolved": "string",
|
|
158
|
+
"references": {
|
|
159
|
+
"DBAccordionProps": {
|
|
160
|
+
"location": "import",
|
|
161
|
+
"path": "./model",
|
|
162
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"getter": false,
|
|
173
|
+
"setter": false,
|
|
174
|
+
"attribute": "name",
|
|
175
|
+
"reflect": false
|
|
176
|
+
},
|
|
177
|
+
"behavior": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "DBAccordionProps[\"behavior\"]",
|
|
182
|
+
"resolved": "\"multiple\" | \"single\"",
|
|
183
|
+
"references": {
|
|
184
|
+
"DBAccordionProps": {
|
|
185
|
+
"location": "import",
|
|
186
|
+
"path": "./model",
|
|
187
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"required": false,
|
|
192
|
+
"optional": false,
|
|
193
|
+
"docs": {
|
|
194
|
+
"tags": [],
|
|
195
|
+
"text": ""
|
|
196
|
+
},
|
|
197
|
+
"getter": false,
|
|
198
|
+
"setter": false,
|
|
199
|
+
"attribute": "behavior",
|
|
200
|
+
"reflect": false
|
|
201
|
+
},
|
|
202
|
+
"initOpenIndex": {
|
|
203
|
+
"type": "unknown",
|
|
204
|
+
"mutable": false,
|
|
205
|
+
"complexType": {
|
|
206
|
+
"original": "DBAccordionProps[\"initOpenIndex\"]",
|
|
207
|
+
"resolved": "number[]",
|
|
208
|
+
"references": {
|
|
209
|
+
"DBAccordionProps": {
|
|
210
|
+
"location": "import",
|
|
211
|
+
"path": "./model",
|
|
212
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"required": false,
|
|
217
|
+
"optional": false,
|
|
218
|
+
"docs": {
|
|
219
|
+
"tags": [],
|
|
220
|
+
"text": ""
|
|
221
|
+
},
|
|
222
|
+
"getter": false,
|
|
223
|
+
"setter": false
|
|
224
|
+
},
|
|
225
|
+
"className": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "DBAccordionProps[\"className\"]",
|
|
230
|
+
"resolved": "string",
|
|
231
|
+
"references": {
|
|
232
|
+
"DBAccordionProps": {
|
|
233
|
+
"location": "import",
|
|
234
|
+
"path": "./model",
|
|
235
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
"required": false,
|
|
240
|
+
"optional": false,
|
|
241
|
+
"docs": {
|
|
242
|
+
"tags": [],
|
|
243
|
+
"text": ""
|
|
244
|
+
},
|
|
245
|
+
"getter": false,
|
|
246
|
+
"setter": false,
|
|
247
|
+
"attribute": "classname",
|
|
248
|
+
"reflect": false
|
|
249
|
+
},
|
|
250
|
+
"variant": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "DBAccordionProps[\"variant\"]",
|
|
255
|
+
"resolved": "\"card\" | \"divider\"",
|
|
256
|
+
"references": {
|
|
257
|
+
"DBAccordionProps": {
|
|
258
|
+
"location": "import",
|
|
259
|
+
"path": "./model",
|
|
260
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
"required": false,
|
|
265
|
+
"optional": false,
|
|
266
|
+
"docs": {
|
|
267
|
+
"tags": [],
|
|
268
|
+
"text": ""
|
|
269
|
+
},
|
|
270
|
+
"getter": false,
|
|
271
|
+
"setter": false,
|
|
272
|
+
"attribute": "variant",
|
|
273
|
+
"reflect": false
|
|
274
|
+
},
|
|
275
|
+
"items": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"mutable": false,
|
|
278
|
+
"complexType": {
|
|
279
|
+
"original": "DBAccordionProps[\"items\"]",
|
|
280
|
+
"resolved": "DBAccordionItemDefaultProps[] | string",
|
|
281
|
+
"references": {
|
|
282
|
+
"DBAccordionProps": {
|
|
283
|
+
"location": "import",
|
|
284
|
+
"path": "./model",
|
|
285
|
+
"id": "src/components/accordion/model.ts::DBAccordionProps"
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"required": false,
|
|
290
|
+
"optional": false,
|
|
291
|
+
"docs": {
|
|
292
|
+
"tags": [],
|
|
293
|
+
"text": ""
|
|
294
|
+
},
|
|
295
|
+
"getter": false,
|
|
296
|
+
"setter": false,
|
|
297
|
+
"attribute": "items",
|
|
298
|
+
"reflect": false
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
static get states() {
|
|
303
|
+
return {
|
|
304
|
+
"_id": {},
|
|
305
|
+
"_name": {},
|
|
306
|
+
"initialized": {},
|
|
307
|
+
"_initOpenIndexDone": {}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
//# sourceMappingURL=accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../../src/components/accordion/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGpE;;;GAGG;AAIH,MAAM,OAAO,WAAW;IAHvB;QAaU,QAAG,GAAG,UAAU,CAAC;QACjB,UAAK,GAAG,EAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBAccordionItemDefaultProps } from \"../accordion-item/model\";\nimport { DBAccordionProps, DBAccordionState } from \"./model\";\nimport { cls, uuid } from \"../../utils\";\nimport { DBAccordionItem } from \"../accordion-item/accordion-item\";\nimport { DEFAULT_ID } from \"../../shared/constants\";\n\nimport { Component, h, Fragment, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-accordion\",\n})\nexport class DBAccordion {\n private _ref!: HTMLUListElement | null;\n @Prop() id: DBAccordionProps[\"id\"];\n @Prop() name: DBAccordionProps[\"name\"];\n @Prop() behavior: DBAccordionProps[\"behavior\"];\n @Prop() initOpenIndex: DBAccordionProps[\"initOpenIndex\"];\n @Prop({attribute: \"classname\"}) className: DBAccordionProps[\"className\"];\n @Prop() variant: DBAccordionProps[\"variant\"];\n @Prop() items: DBAccordionProps[\"items\"];\n\n @State() _id = DEFAULT_ID;\n @State() _name = \"\";\n @State() initialized = false;\n @State() _initOpenIndexDone = false;\n\n convertItems(items: unknown[] | string | undefined) {\n try {\n if (typeof items === \"string\") {\n return JSON.parse(items);\n }\n return items as DBAccordionItemDefaultProps[];\n } catch (error) {\n console.error(error);\n }\n return [];\n }\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-accordion\");\n this._id = this.id || \"accordion-\" + uuid();\n this.initialized = true;\n this._initOpenIndexDone = true;\n }\n\n componentDidUpdate() {\n // If we have a single behavior we first check for\n // props.name otherwise for state_id\n if (this.initialized) {\n if (this.behavior === \"single\") {\n if (this.name) {\n if (this._name !== this.name) {\n this._name = this.name;\n }\n } else {\n if (this._name !== this._id && this._id) {\n this._name = this._id;\n }\n }\n } else {\n this._name = \"\";\n }\n }\n if (this._ref) {\n const childDetails = this._ref.getElementsByTagName(\"details\");\n if (childDetails) {\n for (const details of Array.from<HTMLDetailsElement>(childDetails)) {\n if (this._name === \"\") {\n details.removeAttribute(\"name\");\n } else {\n details.name = this._name;\n }\n }\n }\n }\n if (this._ref && this._initOpenIndexDone) {\n if (this.initOpenIndex && this.initOpenIndex?.length > 0) {\n const childDetails = this._ref.getElementsByTagName(\"details\");\n if (childDetails) {\n const initOpenIndex =\n this.behavior === \"single\" && this.initOpenIndex.length > 1\n ? [this.initOpenIndex[0]] // use only one index for behavior=single\n : this.initOpenIndex;\n Array.from<HTMLDetailsElement>(childDetails).forEach(\n (details: HTMLDetailsElement, index: number) => {\n if (initOpenIndex.includes(index)) {\n details.open = true;\n }\n }\n );\n }\n }\n this._initOpenIndexDone = false;\n }\n }\n\n render() {\n return (\n <ul\n class={cls(\"db-accordion\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-variant={this.variant}\n >\n {!this.items ? <slot></slot> : null}\n {this.items\n ? this.convertItems(this.items)?.map((item, index) => (\n <db-accordion-item\n key={`accordion-item-${index}`}\n headlinePlain={item.headlinePlain}\n disabled={item.disabled}\n text={item.text}\n ></db-accordion-item>\n ))\n : null}\n </ul>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/accordion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,eAAe,WAAW,CAAC","sourcesContent":["import { DBAccordion } from './accordion';\n\nexport default DBAccordion;"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/accordion/model.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAI,CAAC,SAAS,EAAE,MAAM,CAAW,CAAC;AAEnE,MAAM,CAAC,MAAM,qBAAqB,GAAI,CAAC,UAAU,EAAE,QAAQ,CAAW,CAAC","sourcesContent":["import { GlobalProps, GlobalState, InitializedState } from '../../shared/model';\nimport { DBAccordionItemDefaultProps } from '../accordion-item/model';\nexport const AccordionVariantList = (['divider', 'card'] as const);\nexport type AccordionVariantType = (typeof AccordionVariantList)[number];\nexport const AccordionBehaviorList = (['multiple', 'single'] as const);\nexport type AccordionBehaviorType = (typeof AccordionBehaviorList)[number];\nexport type DBAccordionDefaultProps = {\n /**\n * To allow multiple items open at the same time or only 1 item\n */\n behavior?: AccordionBehaviorType;\n /**\n * The index of items which should be open when loading the accordion\n */\n initOpenIndex?: number[];\n\n /**\n * Alternative to pass in a simple representation of accordion items\n */\n items?: DBAccordionItemDefaultProps[] | string;\n\n /**\n * Set details name for exclusive accordions, see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#name\n */\n name?: string;\n\n /**\n * Informs about the changes in the internal state, which item is open\n */\n onChange?: (openAccordionItemIds: string[]) => void;\n\n /**\n * Defines the display of the accordion and the items:\n * \"divider\": with a dividing line between the items\n * \"card\": w/o dividing line, but items are shown in the card variant\n */\n variant?: AccordionVariantType;\n};\nexport type DBAccordionProps = DBAccordionDefaultProps & GlobalProps;\nexport type DBAccordionDefaultState = {\n _initOpenIndexDone: boolean;\n _name: string;\n convertItems: (items?: unknown[] | string) => DBAccordionItemDefaultProps[];\n};\nexport type DBAccordionState = DBAccordionDefaultState & GlobalState & InitializedState"]}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { cls, getBooleanAsString, uuid } from "../../utils";
|
|
2
|
+
import { DEFAULT_ID } from "../../shared/constants";
|
|
3
|
+
import { h } from "@stencil/core";
|
|
4
|
+
/**
|
|
5
|
+
* @slot children - This is a default/unnamed slot
|
|
6
|
+
* @slot headline - TODO: Add description for slotHeadline
|
|
7
|
+
*/
|
|
8
|
+
export class DBAccordionItem {
|
|
9
|
+
constructor() {
|
|
10
|
+
this._id = DEFAULT_ID;
|
|
11
|
+
this._open = false;
|
|
12
|
+
}
|
|
13
|
+
toggle(event) {
|
|
14
|
+
// We need this for react https://github.com/facebook/react/issues/15486#issuecomment-488028431
|
|
15
|
+
event === null || event === void 0 ? void 0 : event.preventDefault();
|
|
16
|
+
const newStateOpen = !this._open;
|
|
17
|
+
if (this.onToggle) {
|
|
18
|
+
this.onToggle.emit(newStateOpen);
|
|
19
|
+
}
|
|
20
|
+
this._open = newStateOpen;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
24
|
+
* @param element the ref for the component
|
|
25
|
+
* @param customElementSelector the custom element like `my-component`
|
|
26
|
+
*/
|
|
27
|
+
enableAttributePassing(element, customElementSelector) {
|
|
28
|
+
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
29
|
+
if (element && parent) {
|
|
30
|
+
const attributes = parent.attributes;
|
|
31
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
32
|
+
const attr = attributes.item(i);
|
|
33
|
+
if (attr &&
|
|
34
|
+
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
35
|
+
element.setAttribute(attr.name, attr.value);
|
|
36
|
+
parent.removeAttribute(attr.name);
|
|
37
|
+
}
|
|
38
|
+
if (attr && attr.name === "class") {
|
|
39
|
+
const isWebComponent = attr.value.includes("hydrated");
|
|
40
|
+
const value = attr.value.replace("hydrated", "").trim();
|
|
41
|
+
const currentClass = element.getAttribute("class");
|
|
42
|
+
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
43
|
+
if (isWebComponent) {
|
|
44
|
+
// Stencil is using this class for lazy loading component
|
|
45
|
+
parent.setAttribute("class", "hydrated");
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
parent.removeAttribute(attr.name);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
componentDidLoad() {
|
|
55
|
+
this.enableAttributePassing(this._ref, "db-accordion-item");
|
|
56
|
+
this._id = this.id || "accordion-item-" + uuid();
|
|
57
|
+
if (this.defaultOpen) {
|
|
58
|
+
this._open = this.defaultOpen;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
render() {
|
|
62
|
+
return (h("li", { key: '7094e608b01a216da13c416ba6d6f845bc3554df', class: cls("db-accordion-item", this.className), id: this._id }, h("details", { key: '8eb8bc7f0741d7e03a79923407709d7451a1c423', "aria-disabled": getBooleanAsString(this.disabled), ref: (el) => {
|
|
63
|
+
this._ref = el;
|
|
64
|
+
}, open: this._open }, h("summary", { key: '7f531a785588b63c302c637416552171e88b310a', onClick: (event) => this.toggle(event) }, this.headlinePlain ? this.headlinePlain : null, !this.headlinePlain ? h("slot", { name: "headline" }) : null), h("div", { key: '9a53a8b06d591360965973288075ab2b06968ac4' }, this.text ? this.text : h("slot", null)))));
|
|
65
|
+
}
|
|
66
|
+
static get is() { return "db-accordion-item"; }
|
|
67
|
+
static get properties() {
|
|
68
|
+
return {
|
|
69
|
+
"id": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "DBAccordionItemProps[\"id\"]",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {
|
|
76
|
+
"DBAccordionItemProps": {
|
|
77
|
+
"location": "import",
|
|
78
|
+
"path": "./model",
|
|
79
|
+
"id": "src/components/accordion-item/model.ts::DBAccordionItemProps"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": false,
|
|
84
|
+
"optional": false,
|
|
85
|
+
"docs": {
|
|
86
|
+
"tags": [],
|
|
87
|
+
"text": ""
|
|
88
|
+
},
|
|
89
|
+
"getter": false,
|
|
90
|
+
"setter": false,
|
|
91
|
+
"attribute": "id",
|
|
92
|
+
"reflect": false
|
|
93
|
+
},
|
|
94
|
+
"defaultOpen": {
|
|
95
|
+
"type": "boolean",
|
|
96
|
+
"mutable": false,
|
|
97
|
+
"complexType": {
|
|
98
|
+
"original": "DBAccordionItemProps[\"defaultOpen\"]",
|
|
99
|
+
"resolved": "boolean",
|
|
100
|
+
"references": {
|
|
101
|
+
"DBAccordionItemProps": {
|
|
102
|
+
"location": "import",
|
|
103
|
+
"path": "./model",
|
|
104
|
+
"id": "src/components/accordion-item/model.ts::DBAccordionItemProps"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": ""
|
|
113
|
+
},
|
|
114
|
+
"getter": false,
|
|
115
|
+
"setter": false,
|
|
116
|
+
"attribute": "default-open",
|
|
117
|
+
"reflect": false
|
|
118
|
+
},
|
|
119
|
+
"className": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"mutable": false,
|
|
122
|
+
"complexType": {
|
|
123
|
+
"original": "DBAccordionItemProps[\"className\"]",
|
|
124
|
+
"resolved": "string",
|
|
125
|
+
"references": {
|
|
126
|
+
"DBAccordionItemProps": {
|
|
127
|
+
"location": "import",
|
|
128
|
+
"path": "./model",
|
|
129
|
+
"id": "src/components/accordion-item/model.ts::DBAccordionItemProps"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": false,
|
|
134
|
+
"optional": false,
|
|
135
|
+
"docs": {
|
|
136
|
+
"tags": [],
|
|
137
|
+
"text": ""
|
|
138
|
+
},
|
|
139
|
+
"getter": false,
|
|
140
|
+
"setter": false,
|
|
141
|
+
"attribute": "classname",
|
|
142
|
+
"reflect": false
|
|
143
|
+
},
|
|
144
|
+
"disabled": {
|
|
145
|
+
"type": "boolean",
|
|
146
|
+
"mutable": false,
|
|
147
|
+
"complexType": {
|
|
148
|
+
"original": "DBAccordionItemProps[\"disabled\"]",
|
|
149
|
+
"resolved": "boolean",
|
|
150
|
+
"references": {
|
|
151
|
+
"DBAccordionItemProps": {
|
|
152
|
+
"location": "import",
|
|
153
|
+
"path": "./model",
|
|
154
|
+
"id": "src/components/accordion-item/model.ts::DBAccordionItemProps"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": false,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"attribute": "disabled",
|
|
167
|
+
"reflect": false
|
|
168
|
+
},
|
|
169
|
+
"headlinePlain": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"mutable": false,
|
|
172
|
+
"complexType": {
|
|
173
|
+
"original": "DBAccordionItemProps[\"headlinePlain\"]",
|
|
174
|
+
"resolved": "string",
|
|
175
|
+
"references": {
|
|
176
|
+
"DBAccordionItemProps": {
|
|
177
|
+
"location": "import",
|
|
178
|
+
"path": "./model",
|
|
179
|
+
"id": "src/components/accordion-item/model.ts::DBAccordionItemProps"
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": ""
|
|
188
|
+
},
|
|
189
|
+
"getter": false,
|
|
190
|
+
"setter": false,
|
|
191
|
+
"attribute": "headline-plain",
|
|
192
|
+
"reflect": false
|
|
193
|
+
},
|
|
194
|
+
"text": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "DBAccordionItemProps[\"text\"]",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {
|
|
201
|
+
"DBAccordionItemProps": {
|
|
202
|
+
"location": "import",
|
|
203
|
+
"path": "./model",
|
|
204
|
+
"id": "src/components/accordion-item/model.ts::DBAccordionItemProps"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"required": false,
|
|
209
|
+
"optional": false,
|
|
210
|
+
"docs": {
|
|
211
|
+
"tags": [],
|
|
212
|
+
"text": ""
|
|
213
|
+
},
|
|
214
|
+
"getter": false,
|
|
215
|
+
"setter": false,
|
|
216
|
+
"attribute": "text",
|
|
217
|
+
"reflect": false
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
static get states() {
|
|
222
|
+
return {
|
|
223
|
+
"_id": {},
|
|
224
|
+
"_open": {}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
static get events() {
|
|
228
|
+
return [{
|
|
229
|
+
"method": "onToggle",
|
|
230
|
+
"name": "onToggle",
|
|
231
|
+
"bubbles": true,
|
|
232
|
+
"cancelable": true,
|
|
233
|
+
"composed": true,
|
|
234
|
+
"docs": {
|
|
235
|
+
"tags": [],
|
|
236
|
+
"text": ""
|
|
237
|
+
},
|
|
238
|
+
"complexType": {
|
|
239
|
+
"original": "any",
|
|
240
|
+
"resolved": "any",
|
|
241
|
+
"references": {}
|
|
242
|
+
}
|
|
243
|
+
}];
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
//# sourceMappingURL=accordion-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion-item.js","sourceRoot":"","sources":["../../../src/components/accordion-item/accordion-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAG3E;;;GAGG;AAIH,MAAM,OAAO,eAAe;IAH3B;QAaU,QAAG,GAAG,UAAU,CAAC;QACjB,UAAK,GAAG,KAAK,CAAC;KA+ExB;IA7EC,MAAM,CAAC,KAA8B;QACnC,+FAA+F;QAC/F,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,cAAc,EAAE,CAAC;QACxB,MAAM,YAAY,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;QACjC,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IAC5B,CAAC;IAED;;;;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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B,GAAG,IAAI,EAAE,CAAC;QACjD,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;QAChC,CAAC;IACH,CAAC;IAED,MAAM;QACJ,OAAO,CACL,2DAAI,KAAK,EAAE,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG;YAC/D,iFACiB,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAChD,GAAG,EAAE,CAAC,EAAO,EAAE,EAAE;oBACf,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC;gBACjB,CAAC,EACD,IAAI,EAAE,IAAI,CAAC,KAAK;gBAEhB,gEAAS,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;oBAC5C,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI;oBAC9C,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,YAAM,IAAI,EAAC,UAAU,GAAQ,CAAC,CAAC,CAAC,IAAI,CACnD;gBACV,8DAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,eAAa,CAAO,CAC1C,CACP,CACN,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DBAccordionItemProps, DBAccordionItemState } from \"./model\";\nimport { cls, getBooleanAsString, uuid } from \"../../utils\";\nimport { ClickEvent } from \"../../shared/model\";\nimport { DEFAULT_ID } from \"../../shared/constants\";\n\nimport { Component, h, Fragment, Event, Prop, State } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n * @slot headline - TODO: Add description for slotHeadline\n */\n @Component({\n tag: \"db-accordion-item\",\n})\nexport class DBAccordionItem {\n private _ref!: HTMLDetailsElement | null;\n @Prop() id: DBAccordionItemProps[\"id\"];\n @Prop() defaultOpen: DBAccordionItemProps[\"defaultOpen\"];\n @Event() onToggle: any;\n @Prop({attribute: \"classname\"}) className: DBAccordionItemProps[\"className\"];\n @Prop() disabled: DBAccordionItemProps[\"disabled\"];\n @Prop() headlinePlain: DBAccordionItemProps[\"headlinePlain\"];\n @Prop() text: DBAccordionItemProps[\"text\"];\n\n @State() _id = DEFAULT_ID;\n @State() _open = false;\n\n toggle(event: ClickEvent<HTMLElement>) {\n // We need this for react https://github.com/facebook/react/issues/15486#issuecomment-488028431\n event?.preventDefault();\n const newStateOpen = !this._open;\n if (this.onToggle) {\n this.onToggle.emit(newStateOpen);\n }\n this._open = newStateOpen;\n }\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-accordion-item\");\n this._id = this.id || \"accordion-item-\" + uuid();\n if (this.defaultOpen) {\n this._open = this.defaultOpen;\n }\n }\n\n render() {\n return (\n <li class={cls(\"db-accordion-item\", this.className)} id={this._id}>\n <details\n aria-disabled={getBooleanAsString(this.disabled)}\n ref={(el: any) => {\n this._ref = el;\n }}\n open={this._open}\n >\n <summary onClick={(event) => this.toggle(event)}>\n {this.headlinePlain ? this.headlinePlain : null}\n {!this.headlinePlain ? <slot name=\"headline\"></slot> : null}\n </summary>\n <div>{this.text ? this.text : <slot></slot>}</div>\n </details>\n </li>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/accordion-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,eAAe,eAAe,CAAC","sourcesContent":["import { DBAccordionItem } from './accordion-item';\n\nexport default DBAccordionItem;"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/accordion-item/model.ts"],"names":[],"mappings":"","sourcesContent":["import { GlobalProps, GlobalState, TextProps, ToggleEventProps, ToggleEventState } from '../../shared/model';\nexport type DBAccordionItemDefaultProps = {\n /**\n * Initial state for the accordion item\n */\n defaultOpen?: boolean;\n /**\n * The disabled attribute can be set to keep a user from clicking on the element.\n */\n disabled?: boolean;\n /**\n * Title of the accordion-item as slot\n */\n headline?: any;\n /**\n * Title of the accordion-item as plain text\n */\n headlinePlain?: string;\n} & TextProps;\nexport type DBAccordionItemProps = DBAccordionItemDefaultProps & GlobalProps & ToggleEventProps;\nexport type DBAccordionItemDefaultState = {\n _open: boolean;\n};\nexport type DBAccordionItemState = DBAccordionItemDefaultState & GlobalState & ToggleEventState<HTMLElement>"]}
|