@db-ux/wc-core-components 2.4.3 → 3.0.0
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/dist/cjs/db-accordion-item.cjs.entry.js +1 -1
- package/dist/cjs/db-accordion.cjs.entry.js +1 -1
- package/dist/cjs/db-badge.cjs.entry.js +1 -1
- package/dist/cjs/db-brand.cjs.entry.js +3 -3
- package/dist/cjs/db-brand.cjs.entry.js.map +1 -1
- package/dist/cjs/db-brand.entry.cjs.js.map +1 -1
- package/dist/cjs/db-button.cjs.entry.js +14 -3
- package/dist/cjs/db-button.cjs.entry.js.map +1 -1
- package/dist/cjs/db-button.entry.cjs.js.map +1 -1
- package/dist/cjs/db-card.cjs.entry.js +3 -3
- package/dist/cjs/db-card.cjs.entry.js.map +1 -1
- package/dist/cjs/db-card.entry.cjs.js.map +1 -1
- package/dist/cjs/db-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.cjs.js.map +1 -1
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +10 -32
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js.map +1 -1
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +1 -1
- package/dist/cjs/db-custom-select.cjs.entry.js +6 -6
- package/dist/cjs/db-custom-select.cjs.entry.js.map +1 -1
- package/dist/cjs/db-custom-select.entry.cjs.js.map +1 -1
- package/dist/cjs/db-divider.cjs.entry.js +1 -1
- package/dist/cjs/db-drawer.cjs.entry.js +1 -1
- package/dist/cjs/db-header.cjs.entry.js +1 -1
- package/dist/cjs/db-icon.cjs.entry.js +1 -1
- package/dist/cjs/db-infotext.cjs.entry.js +3 -3
- package/dist/cjs/db-infotext.cjs.entry.js.map +1 -1
- package/dist/cjs/db-infotext.entry.cjs.js.map +1 -1
- package/dist/cjs/db-link.cjs.entry.js +3 -3
- package/dist/cjs/db-link.cjs.entry.js.map +1 -1
- package/dist/cjs/db-link.entry.cjs.js.map +1 -1
- package/dist/cjs/db-navigation-item.cjs.entry.js +3 -3
- package/dist/cjs/db-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/db-navigation-item.entry.cjs.js.map +1 -1
- package/dist/cjs/db-navigation.cjs.entry.js +3 -3
- package/dist/cjs/db-navigation.cjs.entry.js.map +1 -1
- package/dist/cjs/db-navigation.entry.cjs.js.map +1 -1
- package/dist/cjs/db-notification.cjs.entry.js +3 -3
- package/dist/cjs/db-notification.cjs.entry.js.map +1 -1
- package/dist/cjs/db-notification.entry.cjs.js.map +1 -1
- package/dist/cjs/db-page.cjs.entry.js +1 -1
- package/dist/cjs/db-popover.cjs.entry.js +1 -1
- package/dist/cjs/db-radio.cjs.entry.js +3 -4
- package/dist/cjs/db-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/db-radio.entry.cjs.js.map +1 -1
- package/dist/cjs/db-section.cjs.entry.js +1 -1
- package/dist/cjs/db-select.cjs.entry.js +4 -4
- package/dist/cjs/db-select.cjs.entry.js.map +1 -1
- package/dist/cjs/db-select.entry.cjs.js.map +1 -1
- package/dist/cjs/db-stack.cjs.entry.js +1 -1
- package/dist/cjs/db-switch.cjs.entry.js +3 -3
- package/dist/cjs/db-switch.cjs.entry.js.map +1 -1
- package/dist/cjs/db-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/db-tab-item.db-tab-list.db-tab-panel.entry.cjs.js.map +1 -1
- package/dist/cjs/db-tab-item_3.cjs.entry.js +6 -5
- package/dist/cjs/db-tab-item_3.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tabs.cjs.entry.js +3 -3
- package/dist/cjs/db-tabs.cjs.entry.js.map +1 -1
- package/dist/cjs/db-tabs.entry.cjs.js.map +1 -1
- package/dist/cjs/db-textarea.cjs.entry.js +1 -1
- package/dist/cjs/db-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/db-ux.cjs.js +3 -3
- package/dist/cjs/db-ux.cjs.js.map +1 -1
- package/dist/cjs/{index-DRg3L2am.js → index-9urL1KCD.js} +3 -3
- package/dist/{esm/index-B-IYTj4g.js.map → cjs/index-9urL1KCD.js.map} +1 -1
- package/dist/cjs/index.cjs.js +1 -3
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/brand/brand.js +3 -3
- package/dist/collection/components/brand/brand.js.map +1 -1
- package/dist/collection/components/button/button.js +92 -89
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/button/model.js +0 -1
- package/dist/collection/components/button/model.js.map +1 -1
- package/dist/collection/components/card/card.js +2 -2
- package/dist/collection/components/card/card.js.map +1 -1
- package/dist/collection/components/custom-select/custom-select.js +5 -5
- package/dist/collection/components/custom-select/custom-select.js.map +1 -1
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +4 -4
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js.map +1 -1
- package/dist/collection/components/custom-select-list-item/model.js.map +1 -1
- package/dist/collection/components/infotext/infotext.js +3 -3
- package/dist/collection/components/infotext/infotext.js.map +1 -1
- package/dist/collection/components/input/input.js +108 -8
- package/dist/collection/components/input/input.js.map +1 -1
- package/dist/collection/components/input/model.js.map +1 -1
- package/dist/collection/components/link/link.js +24 -74
- package/dist/collection/components/link/link.js.map +1 -1
- package/dist/collection/components/link/model.js +1 -1
- package/dist/collection/components/link/model.js.map +1 -1
- package/dist/collection/components/navigation/model.js.map +1 -1
- package/dist/collection/components/navigation/navigation.js +2 -27
- package/dist/collection/components/navigation/navigation.js.map +1 -1
- package/dist/collection/components/navigation-item/model.js.map +1 -1
- package/dist/collection/components/navigation-item/navigation-item.js +3 -3
- package/dist/collection/components/navigation-item/navigation-item.js.map +1 -1
- package/dist/collection/components/notification/notification.js +3 -3
- package/dist/collection/components/notification/notification.js.map +1 -1
- package/dist/collection/components/radio/radio.js +2 -53
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/select/select.js +4 -4
- package/dist/collection/components/select/select.js.map +1 -1
- package/dist/collection/components/switch/model.js.map +1 -1
- package/dist/collection/components/switch/switch.js +21 -46
- package/dist/collection/components/switch/switch.js.map +1 -1
- package/dist/collection/components/tab-item/model.js.map +1 -1
- package/dist/collection/components/tab-item/tab-item.js +68 -17
- package/dist/collection/components/tab-item/tab-item.js.map +1 -1
- package/dist/collection/components/tab-panel/model.js.map +1 -1
- package/dist/collection/components/tab-panel/tab-panel.js +2 -27
- package/dist/collection/components/tab-panel/tab-panel.js.map +1 -1
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tabs/tabs.js.map +1 -1
- package/dist/collection/components/tag/model.js.map +1 -1
- package/dist/collection/components/tag/tag.js +3 -64
- package/dist/collection/components/tag/tag.js.map +1 -1
- package/dist/collection/shared/model.js +0 -1
- package/dist/collection/shared/model.js.map +1 -1
- package/dist/custom-elements.json +520 -549
- package/dist/db-ux/db-brand.entry.esm.js.map +1 -1
- package/dist/db-ux/db-button.entry.esm.js.map +1 -1
- package/dist/db-ux/db-card.entry.esm.js.map +1 -1
- package/dist/db-ux/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.esm.js.map +1 -1
- package/dist/db-ux/db-custom-select.entry.esm.js.map +1 -1
- package/dist/db-ux/db-infotext.entry.esm.js.map +1 -1
- package/dist/db-ux/db-link.entry.esm.js.map +1 -1
- package/dist/db-ux/db-navigation-item.entry.esm.js.map +1 -1
- package/dist/db-ux/db-navigation.entry.esm.js.map +1 -1
- package/dist/db-ux/db-notification.entry.esm.js.map +1 -1
- package/dist/db-ux/db-radio.entry.esm.js.map +1 -1
- package/dist/db-ux/db-select.entry.esm.js.map +1 -1
- package/dist/db-ux/db-switch.entry.esm.js.map +1 -1
- package/dist/db-ux/db-tab-item.db-tab-list.db-tab-panel.entry.esm.js.map +1 -1
- package/dist/db-ux/db-tabs.entry.esm.js.map +1 -1
- 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/{p-26531856.entry.js → p-02fcd4a8.entry.js} +2 -2
- package/dist/db-ux/{p-d4cc20df.entry.js → p-07594af1.entry.js} +2 -2
- package/dist/db-ux/{p-4da7f4bb.entry.js → p-16f1fa7c.entry.js} +2 -2
- package/dist/db-ux/p-209cf793.entry.js +2 -0
- package/dist/db-ux/p-209cf793.entry.js.map +1 -0
- package/dist/db-ux/p-30023526.entry.js +2 -0
- package/dist/db-ux/p-30023526.entry.js.map +1 -0
- package/dist/db-ux/{p-6243b16c.entry.js → p-44142b26.entry.js} +2 -2
- package/dist/db-ux/p-51de401e.entry.js +2 -0
- package/dist/db-ux/p-51de401e.entry.js.map +1 -0
- package/dist/db-ux/{p-723c465c.entry.js → p-58007675.entry.js} +2 -2
- package/dist/db-ux/p-58007675.entry.js.map +1 -0
- package/dist/db-ux/p-5b45664d.entry.js +2 -0
- package/dist/db-ux/p-5b45664d.entry.js.map +1 -0
- package/dist/db-ux/p-5c6da0f3.entry.js +2 -0
- package/dist/db-ux/p-5c6da0f3.entry.js.map +1 -0
- package/dist/db-ux/{p-52fc60a6.entry.js → p-6c4115c8.entry.js} +2 -2
- package/dist/db-ux/p-6c4115c8.entry.js.map +1 -0
- package/dist/db-ux/{p-291a3bb4.entry.js → p-7d77b648.entry.js} +2 -2
- package/dist/db-ux/p-86df8645.entry.js +2 -0
- package/dist/db-ux/p-86df8645.entry.js.map +1 -0
- package/dist/db-ux/{p-109b88a5.entry.js → p-914ca50e.entry.js} +2 -2
- package/dist/db-ux/p-93a9f369.entry.js +2 -0
- package/dist/db-ux/p-93a9f369.entry.js.map +1 -0
- package/dist/db-ux/{p-9f122b1e.entry.js → p-971a16c3.entry.js} +2 -2
- package/dist/db-ux/{p-e5984435.entry.js → p-9d0996e9.entry.js} +2 -2
- package/dist/db-ux/{p-B-IYTj4g.js → p-CNzNv7KB.js} +1 -1
- package/dist/db-ux/{p-B-IYTj4g.js.map → p-CNzNv7KB.js.map} +1 -1
- package/dist/db-ux/p-a2b55626.entry.js +2 -0
- package/dist/db-ux/p-a2b55626.entry.js.map +1 -0
- package/dist/db-ux/{p-1d4ee600.entry.js → p-b7f2a0b9.entry.js} +2 -2
- package/dist/db-ux/{p-c6ac54c3.entry.js → p-bd7d1646.entry.js} +2 -2
- package/dist/db-ux/p-c5ff3d3f.entry.js +2 -0
- package/dist/db-ux/p-c5ff3d3f.entry.js.map +1 -0
- package/dist/db-ux/{p-42c60f21.entry.js → p-c8bdd952.entry.js} +2 -2
- package/dist/db-ux/{p-f6c1d4b7.entry.js → p-c8cdde8c.entry.js} +2 -2
- package/dist/db-ux/p-ce895e0c.entry.js +2 -0
- package/dist/db-ux/p-ce895e0c.entry.js.map +1 -0
- package/dist/db-ux/p-d6aeabf0.entry.js +2 -0
- package/dist/db-ux/p-d6aeabf0.entry.js.map +1 -0
- package/dist/db-ux/{p-2fade21b.entry.js → p-d7168627.entry.js} +2 -2
- package/dist/db-ux/{p-6d2da8ea.entry.js → p-e6e7719e.entry.js} +2 -2
- package/dist/db-ux/{p-32c21508.entry.js → p-ec957247.entry.js} +2 -2
- package/dist/db-ux/p-f03f7076.entry.js +2 -0
- package/dist/db-ux/p-f03f7076.entry.js.map +1 -0
- package/dist/db-ux/{p-a8d63224.entry.js → p-fedcbc94.entry.js} +2 -2
- package/dist/db-ux/{p-a8d63224.entry.js.map → p-fedcbc94.entry.js.map} +1 -1
- package/dist/esm/db-accordion-item.entry.js +1 -1
- package/dist/esm/db-accordion.entry.js +1 -1
- package/dist/esm/db-badge.entry.js +1 -1
- package/dist/esm/db-brand.entry.js +4 -4
- package/dist/esm/db-brand.entry.js.map +1 -1
- package/dist/esm/db-button.entry.js +15 -4
- package/dist/esm/db-button.entry.js.map +1 -1
- package/dist/esm/db-card.entry.js +3 -3
- package/dist/esm/db-card.entry.js.map +1 -1
- package/dist/esm/db-checkbox.entry.js +1 -1
- package/dist/esm/db-custom-select-dropdown.db-custom-select-list.db-custom-select-list-item.db-input.db-tag.entry.js.map +1 -1
- package/dist/esm/db-custom-select-dropdown_5.entry.js +11 -33
- package/dist/esm/db-custom-select-dropdown_5.entry.js.map +1 -1
- package/dist/esm/db-custom-select-form-field.entry.js +1 -1
- package/dist/esm/db-custom-select.entry.js +6 -6
- package/dist/esm/db-custom-select.entry.js.map +1 -1
- package/dist/esm/db-divider.entry.js +1 -1
- package/dist/esm/db-drawer.entry.js +1 -1
- package/dist/esm/db-header.entry.js +1 -1
- package/dist/esm/db-icon.entry.js +1 -1
- package/dist/esm/db-infotext.entry.js +4 -4
- package/dist/esm/db-infotext.entry.js.map +1 -1
- package/dist/esm/db-link.entry.js +4 -4
- package/dist/esm/db-link.entry.js.map +1 -1
- package/dist/esm/db-navigation-item.entry.js +4 -4
- package/dist/esm/db-navigation-item.entry.js.map +1 -1
- package/dist/esm/db-navigation.entry.js +3 -3
- package/dist/esm/db-navigation.entry.js.map +1 -1
- package/dist/esm/db-notification.entry.js +4 -4
- package/dist/esm/db-notification.entry.js.map +1 -1
- package/dist/esm/db-page.entry.js +1 -1
- package/dist/esm/db-popover.entry.js +1 -1
- package/dist/esm/db-radio.entry.js +3 -4
- package/dist/esm/db-radio.entry.js.map +1 -1
- package/dist/esm/db-section.entry.js +1 -1
- package/dist/esm/db-select.entry.js +5 -5
- package/dist/esm/db-select.entry.js.map +1 -1
- package/dist/esm/db-stack.entry.js +1 -1
- package/dist/esm/db-switch.entry.js +3 -3
- 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 -1
- package/dist/esm/db-tab-item_3.entry.js +7 -6
- package/dist/esm/db-tab-item_3.entry.js.map +1 -1
- package/dist/esm/db-tabs.entry.js +3 -3
- package/dist/esm/db-tabs.entry.js.map +1 -1
- package/dist/esm/db-textarea.entry.js +1 -1
- package/dist/esm/db-tooltip.entry.js +1 -1
- package/dist/esm/db-ux.js +4 -4
- package/dist/esm/db-ux.js.map +1 -1
- package/dist/esm/{index-B-IYTj4g.js → index-CNzNv7KB.js} +3 -3
- package/dist/{cjs/index-DRg3L2am.js.map → esm/index-CNzNv7KB.js.map} +1 -1
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/button/button.d.ts +8 -6
- package/dist/types/components/button/model.d.ts +6 -22
- package/dist/types/components/custom-select-list-item/custom-select-list-item.d.ts +1 -1
- package/dist/types/components/custom-select-list-item/model.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +5 -1
- package/dist/types/components/input/model.d.ts +6 -2
- package/dist/types/components/link/link.d.ts +1 -3
- package/dist/types/components/link/model.d.ts +3 -3
- package/dist/types/components/navigation/model.d.ts +2 -2
- package/dist/types/components/navigation/navigation.d.ts +0 -1
- package/dist/types/components/navigation-item/model.d.ts +2 -6
- package/dist/types/components/radio/radio.d.ts +0 -2
- package/dist/types/components/switch/model.d.ts +2 -2
- package/dist/types/components/switch/switch.d.ts +2 -3
- package/dist/types/components/tab-item/model.d.ts +2 -2
- package/dist/types/components/tab-item/tab-item.d.ts +4 -2
- package/dist/types/components/tab-panel/model.d.ts +2 -2
- package/dist/types/components/tab-panel/tab-panel.d.ts +0 -1
- package/dist/types/components/tag/model.d.ts +2 -6
- package/dist/types/components/tag/tag.d.ts +0 -4
- package/dist/types/components.d.ts +48 -38
- package/dist/types/shared/model.d.ts +28 -27
- package/dist/vscode.html-custom-data.json +81 -84
- package/dist/web-types.json +158 -169
- package/package.json +4 -4
- package/dist/db-ux/p-3320cac1.entry.js +0 -2
- package/dist/db-ux/p-3320cac1.entry.js.map +0 -1
- package/dist/db-ux/p-40f5e6e7.entry.js +0 -2
- package/dist/db-ux/p-40f5e6e7.entry.js.map +0 -1
- package/dist/db-ux/p-4296343b.entry.js +0 -2
- package/dist/db-ux/p-4296343b.entry.js.map +0 -1
- package/dist/db-ux/p-52fc60a6.entry.js.map +0 -1
- package/dist/db-ux/p-60b8eb25.entry.js +0 -2
- package/dist/db-ux/p-60b8eb25.entry.js.map +0 -1
- package/dist/db-ux/p-723c465c.entry.js.map +0 -1
- package/dist/db-ux/p-738954c8.entry.js +0 -2
- package/dist/db-ux/p-738954c8.entry.js.map +0 -1
- package/dist/db-ux/p-766ce40b.entry.js +0 -2
- package/dist/db-ux/p-766ce40b.entry.js.map +0 -1
- package/dist/db-ux/p-8643bd7b.entry.js +0 -2
- package/dist/db-ux/p-8643bd7b.entry.js.map +0 -1
- package/dist/db-ux/p-9da8c824.entry.js +0 -2
- package/dist/db-ux/p-9da8c824.entry.js.map +0 -1
- package/dist/db-ux/p-ac31c402.entry.js +0 -2
- package/dist/db-ux/p-ac31c402.entry.js.map +0 -1
- package/dist/db-ux/p-d1835c57.entry.js +0 -2
- package/dist/db-ux/p-d1835c57.entry.js.map +0 -1
- package/dist/db-ux/p-e9301996.entry.js +0 -2
- package/dist/db-ux/p-e9301996.entry.js.map +0 -1
- package/dist/db-ux/p-f8eec3af.entry.js +0 -2
- package/dist/db-ux/p-f8eec3af.entry.js.map +0 -1
- /package/dist/db-ux/{p-26531856.entry.js.map → p-02fcd4a8.entry.js.map} +0 -0
- /package/dist/db-ux/{p-d4cc20df.entry.js.map → p-07594af1.entry.js.map} +0 -0
- /package/dist/db-ux/{p-4da7f4bb.entry.js.map → p-16f1fa7c.entry.js.map} +0 -0
- /package/dist/db-ux/{p-6243b16c.entry.js.map → p-44142b26.entry.js.map} +0 -0
- /package/dist/db-ux/{p-291a3bb4.entry.js.map → p-7d77b648.entry.js.map} +0 -0
- /package/dist/db-ux/{p-109b88a5.entry.js.map → p-914ca50e.entry.js.map} +0 -0
- /package/dist/db-ux/{p-9f122b1e.entry.js.map → p-971a16c3.entry.js.map} +0 -0
- /package/dist/db-ux/{p-e5984435.entry.js.map → p-9d0996e9.entry.js.map} +0 -0
- /package/dist/db-ux/{p-1d4ee600.entry.js.map → p-b7f2a0b9.entry.js.map} +0 -0
- /package/dist/db-ux/{p-c6ac54c3.entry.js.map → p-bd7d1646.entry.js.map} +0 -0
- /package/dist/db-ux/{p-42c60f21.entry.js.map → p-c8bdd952.entry.js.map} +0 -0
- /package/dist/db-ux/{p-f6c1d4b7.entry.js.map → p-c8cdde8c.entry.js.map} +0 -0
- /package/dist/db-ux/{p-2fade21b.entry.js.map → p-d7168627.entry.js.map} +0 -0
- /package/dist/db-ux/{p-6d2da8ea.entry.js.map → p-e6e7719e.entry.js.map} +0 -0
- /package/dist/db-ux/{p-32c21508.entry.js.map → p-ec957247.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DEFAULT_DATALIST_ID_SUFFIX, DEFAULT_INVALID_MESSAGE, DEFAULT_INVALID_MESSAGE_ID_SUFFIX, DEFAULT_LABEL, DEFAULT_MESSAGE_ID_SUFFIX, DEFAULT_PLACEHOLDER, DEFAULT_VALID_MESSAGE, DEFAULT_VALID_MESSAGE_ID_SUFFIX, } from "../../shared/constants";
|
|
2
|
-
import { cls, delay, getBoolean, getHideProp, getInputValue, getNumber, hasVoiceOver, isArrayOfStrings, stringPropVisible, uuid, } from "../../utils";
|
|
2
|
+
import { cls, delay, getBoolean, getBooleanAsString, getHideProp, getInputValue, getNumber, hasVoiceOver, isArrayOfStrings, stringPropVisible, uuid, } from "../../utils";
|
|
3
3
|
import { h, } from "@stencil/core";
|
|
4
4
|
/**
|
|
5
5
|
* @slot children - This is a default/unnamed slot
|
|
@@ -162,11 +162,11 @@ export class DBInput {
|
|
|
162
162
|
this.watch2Fn();
|
|
163
163
|
}
|
|
164
164
|
render() {
|
|
165
|
-
var _a, _b, _c, _d, _e;
|
|
166
|
-
return (h("div", { key: '
|
|
165
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
166
|
+
return (h("div", { key: 'e1f64105a5a13cac79e9b9735472b3859ed28e7b', class: cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel), "data-show-icon": getBooleanAsString((_a = this.showIconLeading) !== null && _a !== void 0 ? _a : this.showIcon), "data-icon": (_b = this.iconLeading) !== null && _b !== void 0 ? _b : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing) }, h("label", { key: 'cf4a55220c43d6bcabafd24b84b90a7cc984b373', htmlFor: this._id }, (_c = this.label) !== null && _c !== void 0 ? _c : DEFAULT_LABEL), h("input", { key: '42323c70273eb021afd367ff71ad99e86d664f12', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
|
|
167
167
|
this._ref = el;
|
|
168
|
-
}, id: this._id, name: this.name, type: this.type || "text", placeholder: (
|
|
169
|
-
getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: getBoolean(this.autofocus, "autofocus"), onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (
|
|
168
|
+
}, id: this._id, name: this.name, type: this.type || "text", multiple: getBoolean(this.multiple, "multiple"), placeholder: (_d = this.placeholder) !== null && _d !== void 0 ? _d : DEFAULT_PLACEHOLDER, disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), step: getNumber(this.step), value: (_e = this.value) !== null && _e !== void 0 ? _e : this._value, maxLength: getNumber(this.maxLength, this.maxlength), minLength: getNumber(this.minLength, this.minlength), max: getInputValue(this.max, this.type), min: getInputValue(this.min, this.type), readOnly: getBoolean(this.readOnly, "readOnly") ||
|
|
169
|
+
getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: getBoolean(this.autofocus, "autofocus"), onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds }), this.dataList ? (h("datalist", { id: this._dataListId }, (_g = this.getDataList()) === null || _g === void 0 ? void 0 : _g.map((option) => (h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, h("slot", { key: '9e933a4d705d6d1e891c7116489a98c41418af43' }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '3553a29a16dc1c1c3dcad81302b29d05610ba6ff', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '6824a63f5c2df64580c4e5716b9df28a47758688', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
170
170
|
}
|
|
171
171
|
static get is() { return "db-input"; }
|
|
172
172
|
static get properties() {
|
|
@@ -570,6 +570,31 @@ export class DBInput {
|
|
|
570
570
|
"setter": false,
|
|
571
571
|
"reflect": false
|
|
572
572
|
},
|
|
573
|
+
"showIconLeading": {
|
|
574
|
+
"type": "any",
|
|
575
|
+
"attribute": "show-icon-leading",
|
|
576
|
+
"mutable": false,
|
|
577
|
+
"complexType": {
|
|
578
|
+
"original": "DBInputProps[\"showIconLeading\"]",
|
|
579
|
+
"resolved": "boolean | string",
|
|
580
|
+
"references": {
|
|
581
|
+
"DBInputProps": {
|
|
582
|
+
"location": "import",
|
|
583
|
+
"path": "./model",
|
|
584
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
},
|
|
588
|
+
"required": false,
|
|
589
|
+
"optional": false,
|
|
590
|
+
"docs": {
|
|
591
|
+
"tags": [],
|
|
592
|
+
"text": ""
|
|
593
|
+
},
|
|
594
|
+
"getter": false,
|
|
595
|
+
"setter": false,
|
|
596
|
+
"reflect": false
|
|
597
|
+
},
|
|
573
598
|
"showIcon": {
|
|
574
599
|
"type": "any",
|
|
575
600
|
"attribute": "show-icon",
|
|
@@ -595,6 +620,31 @@ export class DBInput {
|
|
|
595
620
|
"setter": false,
|
|
596
621
|
"reflect": false
|
|
597
622
|
},
|
|
623
|
+
"iconLeading": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"attribute": "icon-leading",
|
|
626
|
+
"mutable": false,
|
|
627
|
+
"complexType": {
|
|
628
|
+
"original": "DBInputProps[\"iconLeading\"]",
|
|
629
|
+
"resolved": "BaseIconTypes | LooseAutocomplete",
|
|
630
|
+
"references": {
|
|
631
|
+
"DBInputProps": {
|
|
632
|
+
"location": "import",
|
|
633
|
+
"path": "./model",
|
|
634
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"required": false,
|
|
639
|
+
"optional": false,
|
|
640
|
+
"docs": {
|
|
641
|
+
"tags": [],
|
|
642
|
+
"text": ""
|
|
643
|
+
},
|
|
644
|
+
"getter": false,
|
|
645
|
+
"setter": false,
|
|
646
|
+
"reflect": false
|
|
647
|
+
},
|
|
598
648
|
"icon": {
|
|
599
649
|
"type": "string",
|
|
600
650
|
"attribute": "icon",
|
|
@@ -620,12 +670,12 @@ export class DBInput {
|
|
|
620
670
|
"setter": false,
|
|
621
671
|
"reflect": false
|
|
622
672
|
},
|
|
623
|
-
"
|
|
673
|
+
"iconTrailing": {
|
|
624
674
|
"type": "string",
|
|
625
|
-
"attribute": "icon-
|
|
675
|
+
"attribute": "icon-trailing",
|
|
626
676
|
"mutable": false,
|
|
627
677
|
"complexType": {
|
|
628
|
-
"original": "DBInputProps[\"
|
|
678
|
+
"original": "DBInputProps[\"iconTrailing\"]",
|
|
629
679
|
"resolved": "BaseIconTypes | LooseAutocomplete",
|
|
630
680
|
"references": {
|
|
631
681
|
"DBInputProps": {
|
|
@@ -670,6 +720,31 @@ export class DBInput {
|
|
|
670
720
|
"setter": false,
|
|
671
721
|
"reflect": false
|
|
672
722
|
},
|
|
723
|
+
"showIconTrailing": {
|
|
724
|
+
"type": "any",
|
|
725
|
+
"attribute": "show-icon-trailing",
|
|
726
|
+
"mutable": false,
|
|
727
|
+
"complexType": {
|
|
728
|
+
"original": "DBInputProps[\"showIconTrailing\"]",
|
|
729
|
+
"resolved": "boolean | string",
|
|
730
|
+
"references": {
|
|
731
|
+
"DBInputProps": {
|
|
732
|
+
"location": "import",
|
|
733
|
+
"path": "./model",
|
|
734
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
},
|
|
738
|
+
"required": false,
|
|
739
|
+
"optional": false,
|
|
740
|
+
"docs": {
|
|
741
|
+
"tags": [],
|
|
742
|
+
"text": ""
|
|
743
|
+
},
|
|
744
|
+
"getter": false,
|
|
745
|
+
"setter": false,
|
|
746
|
+
"reflect": false
|
|
747
|
+
},
|
|
673
748
|
"label": {
|
|
674
749
|
"type": "string",
|
|
675
750
|
"attribute": "label",
|
|
@@ -770,6 +845,31 @@ export class DBInput {
|
|
|
770
845
|
"setter": false,
|
|
771
846
|
"reflect": false
|
|
772
847
|
},
|
|
848
|
+
"multiple": {
|
|
849
|
+
"type": "any",
|
|
850
|
+
"attribute": "multiple",
|
|
851
|
+
"mutable": false,
|
|
852
|
+
"complexType": {
|
|
853
|
+
"original": "DBInputProps[\"multiple\"]",
|
|
854
|
+
"resolved": "boolean | string",
|
|
855
|
+
"references": {
|
|
856
|
+
"DBInputProps": {
|
|
857
|
+
"location": "import",
|
|
858
|
+
"path": "./model",
|
|
859
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
},
|
|
863
|
+
"required": false,
|
|
864
|
+
"optional": false,
|
|
865
|
+
"docs": {
|
|
866
|
+
"tags": [],
|
|
867
|
+
"text": ""
|
|
868
|
+
},
|
|
869
|
+
"getter": false,
|
|
870
|
+
"setter": false,
|
|
871
|
+
"reflect": false
|
|
872
|
+
},
|
|
773
873
|
"placeholder": {
|
|
774
874
|
"type": "string",
|
|
775
875
|
"attribute": "placeholder",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,GAAG,EACH,KAAK,EACL,UAAU,EACV,WAAW,EACX,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AAQrB,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,OAAO;IAHnB;QAwDU,QAAG,GAAG,SAAS,CAAC;QAChB,eAAU,GAAG,SAAS,CAAC;QACvB,oBAAe,GAAG,SAAS,CAAC;QAC5B,sBAAiB,GAAG,SAAS,CAAC;QAC9B,oBAAe,GAAG,SAAS,CAAC;QAC5B,gBAAW,GAAG,SAAS,CAAC;QACxB,eAAU,GAAG,EAAE,CAAC;QAChB,WAAM,GAAG,EAAE,CAAC;QACZ,uBAAkB,GAAG,EAAE,CAAC;KA8PlC;IA5PC,aAAa;;QACX,OAAO,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,IAAI,CAAC,UAAU,KAAK,OAAO,CAAC,CAAC;IAC9D,CAAC;IACD,gBAAgB;;QACd,wEAAwE;QACxE,IAAI,CAAC,CAAA,MAAA,IAAI,C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;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n DEFAULT_DATALIST_ID_SUFFIX,\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport {\n ChangeEvent,\n InputEvent,\n InteractionEvent,\n ValueLabelType,\n} from \"../../shared/model\";\nimport {\n cls,\n delay,\n getBoolean,\n getHideProp,\n getInputValue,\n getNumber,\n hasVoiceOver,\n isArrayOfStrings,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport { DBInputProps, DBInputState } from \"./model\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n EventEmitter,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-input\",\n})\nexport class DBInput {\n private _ref!: HTMLInputElement | any;\n @Prop() id: DBInputProps[\"id\"];\n @Prop() invalidMessage: DBInputProps[\"invalidMessage\"];\n @Prop() dataListId: DBInputProps[\"dataListId\"];\n @Prop() message: DBInputProps[\"message\"];\n @Prop() showMessage: DBInputProps[\"showMessage\"];\n @Prop() value: DBInputProps[\"value\"];\n @Prop() validMessage: DBInputProps[\"validMessage\"];\n @Prop() validation: DBInputProps[\"validation\"];\n @Prop() required: DBInputProps[\"required\"];\n @Prop() minLength: DBInputProps[\"minLength\"];\n @Prop() maxLength: DBInputProps[\"maxLength\"];\n @Prop() pattern: DBInputProps[\"pattern\"];\n @Event() input: EventEmitter<\n Parameters<Required<DBInputProps>[\"onInput\"]>[number]\n > | void;\n @Event() change: EventEmitter<\n Parameters<Required<DBInputProps>[\"onChange\"]>[number]\n > | void;\n @Event() blur: EventEmitter<\n Parameters<Required<DBInputProps>[\"onBlur\"]>[number]\n > | void;\n @Event() focus: EventEmitter<\n Parameters<Required<DBInputProps>[\"onFocus\"]>[number]\n > | void;\n @Prop() dataList: DBInputProps[\"dataList\"];\n @Prop({attribute: \"classname\"}) className: DBInputProps[\"className\"];\n @Prop() variant: DBInputProps[\"variant\"];\n @Prop() showLabel: DBInputProps[\"showLabel\"];\n @Prop() showIcon: DBInputProps[\"showIcon\"];\n @Prop() icon: DBInputProps[\"icon\"];\n @Prop() iconAfter: DBInputProps[\"iconAfter\"];\n @Prop() showRequiredAsterisk: DBInputProps[\"showRequiredAsterisk\"];\n @Prop() label: DBInputProps[\"label\"];\n @Prop() fieldSizing: DBInputProps[\"fieldSizing\"];\n @Prop() name: DBInputProps[\"name\"];\n @Prop() type: DBInputProps[\"type\"];\n @Prop() placeholder: DBInputProps[\"placeholder\"];\n @Prop() disabled: DBInputProps[\"disabled\"];\n @Prop() step: DBInputProps[\"step\"];\n @Prop() maxlength: DBInputProps[\"maxlength\"];\n @Prop() minlength: DBInputProps[\"minlength\"];\n @Prop() max: DBInputProps[\"max\"];\n @Prop() min: DBInputProps[\"min\"];\n @Prop() readOnly: DBInputProps[\"readOnly\"];\n @Prop() readonly: DBInputProps[\"readonly\"];\n @Prop() form: DBInputProps[\"form\"];\n @Prop() size: DBInputProps[\"size\"];\n @Prop() autocomplete: DBInputProps[\"autocomplete\"];\n @Prop() autofocus: DBInputProps[\"autofocus\"];\n @Prop() ariaDescribedBy: DBInputProps[\"ariaDescribedBy\"];\n @Prop() messageIcon: DBInputProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _invalidMessage = undefined;\n @State() _dataListId = undefined;\n @State() _descByIds = \"\";\n @State() _value = \"\";\n @State() _voiceOverFallback = \"\";\n\n hasValidState() {\n return !!(this.validMessage ?? this.validation === \"valid\");\n }\n handleValidation() {\n /* For a11y reasons we need to map the correct message with the input */\n if (!this._ref?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this._invalidMessage;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (\n this.hasValidState() &&\n this._ref?.validity.valid &&\n (this.required || this.minLength || this.maxLength || this.pattern)\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n } else {\n this._descByIds = \"\";\n }\n }\n handleInput(event: InputEvent<HTMLInputElement>) {\n if (this.input) {\n this.input.emit(event);\n }\n this.handleValidation();\n }\n handleChange(event: ChangeEvent<HTMLInputElement>) {\n if (this.change) {\n this.change.emit(event);\n }\n this.handleValidation();\n }\n handleBlur(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.blur) {\n this.blur.emit(event);\n }\n }\n handleFocus(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.focus) {\n this.focus.emit(event);\n }\n }\n getDataList() {\n const _list = this.dataList;\n return Array.from(\n (isArrayOfStrings(_list)\n ? _list?.map((val: string) => ({\n value: val,\n label: undefined,\n }))\n : _list) || []\n );\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: HTMLInputElement | 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 watch0Fn() {\n this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n }\n\n @Watch(\"_ref\")\n @Watch(\"invalidMessage\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._messageId = messageId;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId =\n this.dataListId ?? this._id + DEFAULT_DATALIST_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = messageId;\n }\n }\n }\n\n @Watch(\"_id\")\n watch1() {\n this.watch1Fn();\n }\n\n watch2Fn() {\n this._value = this.value;\n }\n\n @Watch(\"value\")\n watch2() {\n this.watch2Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-input\");\n const mId = this.id ?? `input-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId = mId + DEFAULT_DATALIST_ID_SUFFIX;\n this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;\n this.watch0Fn();\n this.watch1Fn();\n this.watch2Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-input\", this.className)}\n data-variant={this.variant}\n data-hide-label={getHideProp(this.showLabel)}\n data-hide-icon={getHideProp(this.showIcon)}\n data-icon={this.icon}\n data-icon-after={this.iconAfter}\n data-hide-asterisk={getHideProp(this.showRequiredAsterisk)}\n data-hide-icon-after={getHideProp(this.showIcon)}\n >\n <label htmlFor={this._id}>{this.label ?? DEFAULT_LABEL}</label>\n <input\n aria-invalid={this.validation === \"invalid\"}\n data-custom-validity={this.validation}\n data-field-sizing={this.fieldSizing}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n name={this.name}\n type={this.type || \"text\"}\n placeholder={this.placeholder ?? DEFAULT_PLACEHOLDER}\n disabled={getBoolean(this.disabled, \"disabled\")}\n required={getBoolean(this.required, \"required\")}\n step={getNumber(this.step)}\n value={this.value ?? this._value}\n maxLength={getNumber(this.maxLength, this.maxlength)}\n minLength={getNumber(this.minLength, this.minlength)}\n max={getInputValue(this.max, this.type)}\n min={getInputValue(this.min, this.type)}\n readOnly={\n getBoolean(this.readOnly, \"readOnly\") ||\n getBoolean(this.readonly, \"readonly\")\n }\n form={this.form}\n pattern={this.pattern}\n size={this.size}\n autoComplete={this.autocomplete}\n autoFocus={getBoolean(this.autofocus, \"autofocus\")}\n onInput={(event) => this.handleInput(event)}\n onChange={(event) => this.handleChange(event)}\n onBlur={(event) => this.handleBlur(event)}\n onFocus={(event) => this.handleFocus(event)}\n list={this.dataList && this._dataListId}\n aria-describedby={this.ariaDescribedBy ?? this._descByIds}\n />\n {this.dataList ? (\n <datalist id={this._dataListId}>\n {this.getDataList()?.map((option) => (\n <option\n key={this._dataListId + \"-option-\" + option.value}\n value={option.value}\n >\n {option.label}\n </option>\n ))}\n </datalist>\n ) : null}\n <slot></slot>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n {this.hasValidState() ? (\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage || DEFAULT_VALID_MESSAGE}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this._invalidMessage}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,aAAa,EACb,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,EACrB,+BAA+B,GAChC,MAAM,wBAAwB,CAAC;AAOhC,OAAO,EACL,GAAG,EACH,KAAK,EACL,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,IAAI,GACL,MAAM,aAAa,CAAC;AAQrB,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;GAGG;AAIH,MAAM,OAAO,OAAO;IAHnB;QA4DU,QAAG,GAAG,SAAS,CAAC;QAChB,eAAU,GAAG,SAAS,CAAC;QACvB,oBAAe,GAAG,SAAS,CAAC;QAC5B,sBAAiB,GAAG,SAAS,CAAC;QAC9B,oBAAe,GAAG,SAAS,CAAC;QAC5B,gBAAW,GAAG,SAAS,CAAC;QACxB,eAAU,GAAG,EAAE,CAAC;QAChB,WAAM,GAAG,EAAE,CAAC;QACZ,uBAAkB,GAAG,EAAE,CAAC;KAiQlC;IA/PC,aAAa;;QACX,OAAO,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,YAAY,mCAAI,IAAI,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import {\n DEFAULT_DATALIST_ID_SUFFIX,\n DEFAULT_INVALID_MESSAGE,\n DEFAULT_INVALID_MESSAGE_ID_SUFFIX,\n DEFAULT_LABEL,\n DEFAULT_MESSAGE_ID_SUFFIX,\n DEFAULT_PLACEHOLDER,\n DEFAULT_VALID_MESSAGE,\n DEFAULT_VALID_MESSAGE_ID_SUFFIX,\n} from \"../../shared/constants\";\nimport {\n ChangeEvent,\n InputEvent,\n InteractionEvent,\n ValueLabelType,\n} from \"../../shared/model\";\nimport {\n cls,\n delay,\n getBoolean,\n getBooleanAsString,\n getHideProp,\n getInputValue,\n getNumber,\n hasVoiceOver,\n isArrayOfStrings,\n stringPropVisible,\n uuid,\n} from \"../../utils\";\nimport {\n handleFrameworkEventAngular,\n handleFrameworkEventVue,\n} from \"../../utils/form-components\";\nimport { DBInfotext } from \"../infotext/infotext\";\nimport { DBInputProps, DBInputState } from \"./model\";\n\nimport {\n Component,\n h,\n Fragment,\n Watch,\n Event,\n EventEmitter,\n Prop,\n State,\n} from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-input\",\n})\nexport class DBInput {\n private _ref!: HTMLInputElement | any;\n @Prop() id: DBInputProps[\"id\"];\n @Prop() invalidMessage: DBInputProps[\"invalidMessage\"];\n @Prop() dataListId: DBInputProps[\"dataListId\"];\n @Prop() message: DBInputProps[\"message\"];\n @Prop() showMessage: DBInputProps[\"showMessage\"];\n @Prop() value: DBInputProps[\"value\"];\n @Prop() validMessage: DBInputProps[\"validMessage\"];\n @Prop() validation: DBInputProps[\"validation\"];\n @Prop() required: DBInputProps[\"required\"];\n @Prop() minLength: DBInputProps[\"minLength\"];\n @Prop() maxLength: DBInputProps[\"maxLength\"];\n @Prop() pattern: DBInputProps[\"pattern\"];\n @Event() input: EventEmitter<\n Parameters<Required<DBInputProps>[\"onInput\"]>[number]\n > | void;\n @Event() change: EventEmitter<\n Parameters<Required<DBInputProps>[\"onChange\"]>[number]\n > | void;\n @Event() blur: EventEmitter<\n Parameters<Required<DBInputProps>[\"onBlur\"]>[number]\n > | void;\n @Event() focus: EventEmitter<\n Parameters<Required<DBInputProps>[\"onFocus\"]>[number]\n > | void;\n @Prop() dataList: DBInputProps[\"dataList\"];\n @Prop({attribute: \"classname\"}) className: DBInputProps[\"className\"];\n @Prop() variant: DBInputProps[\"variant\"];\n @Prop() showLabel: DBInputProps[\"showLabel\"];\n @Prop() showIconLeading: DBInputProps[\"showIconLeading\"];\n @Prop() showIcon: DBInputProps[\"showIcon\"];\n @Prop() iconLeading: DBInputProps[\"iconLeading\"];\n @Prop() icon: DBInputProps[\"icon\"];\n @Prop() iconTrailing: DBInputProps[\"iconTrailing\"];\n @Prop() showRequiredAsterisk: DBInputProps[\"showRequiredAsterisk\"];\n @Prop() showIconTrailing: DBInputProps[\"showIconTrailing\"];\n @Prop() label: DBInputProps[\"label\"];\n @Prop() fieldSizing: DBInputProps[\"fieldSizing\"];\n @Prop() name: DBInputProps[\"name\"];\n @Prop() type: DBInputProps[\"type\"];\n @Prop() multiple: DBInputProps[\"multiple\"];\n @Prop() placeholder: DBInputProps[\"placeholder\"];\n @Prop() disabled: DBInputProps[\"disabled\"];\n @Prop() step: DBInputProps[\"step\"];\n @Prop() maxlength: DBInputProps[\"maxlength\"];\n @Prop() minlength: DBInputProps[\"minlength\"];\n @Prop() max: DBInputProps[\"max\"];\n @Prop() min: DBInputProps[\"min\"];\n @Prop() readOnly: DBInputProps[\"readOnly\"];\n @Prop() readonly: DBInputProps[\"readonly\"];\n @Prop() form: DBInputProps[\"form\"];\n @Prop() size: DBInputProps[\"size\"];\n @Prop() autocomplete: DBInputProps[\"autocomplete\"];\n @Prop() autofocus: DBInputProps[\"autofocus\"];\n @Prop() ariaDescribedBy: DBInputProps[\"ariaDescribedBy\"];\n @Prop() messageIcon: DBInputProps[\"messageIcon\"];\n @State() _id = undefined;\n @State() _messageId = undefined;\n @State() _validMessageId = undefined;\n @State() _invalidMessageId = undefined;\n @State() _invalidMessage = undefined;\n @State() _dataListId = undefined;\n @State() _descByIds = \"\";\n @State() _value = \"\";\n @State() _voiceOverFallback = \"\";\n\n hasValidState() {\n return !!(this.validMessage ?? this.validation === \"valid\");\n }\n handleValidation() {\n /* For a11y reasons we need to map the correct message with the input */\n if (!this._ref?.validity.valid || this.validation === \"invalid\") {\n this._descByIds = this._invalidMessageId;\n this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this._invalidMessage;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (\n this.hasValidState() &&\n this._ref?.validity.valid &&\n (this.required || this.minLength || this.maxLength || this.pattern)\n ) {\n this._descByIds = this._validMessageId;\n if (hasVoiceOver()) {\n this._voiceOverFallback = this.validMessage ?? DEFAULT_VALID_MESSAGE;\n delay(() => (this._voiceOverFallback = \"\"), 1000);\n }\n } else if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = this._messageId;\n } else {\n this._descByIds = \"\";\n }\n }\n handleInput(event: InputEvent<HTMLInputElement>) {\n if (this.input) {\n this.input.emit(event);\n }\n this.handleValidation();\n }\n handleChange(event: ChangeEvent<HTMLInputElement>) {\n if (this.change) {\n this.change.emit(event);\n }\n this.handleValidation();\n }\n handleBlur(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.blur) {\n this.blur.emit(event);\n }\n }\n handleFocus(event: InteractionEvent<HTMLInputElement> | any) {\n if (this.focus) {\n this.focus.emit(event);\n }\n }\n getDataList() {\n const _list = this.dataList;\n return Array.from(\n (isArrayOfStrings(_list)\n ? _list?.map((val: string) => ({\n value: val,\n label: undefined,\n }))\n : _list) || []\n );\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: HTMLInputElement | 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 watch0Fn() {\n this._invalidMessage =\n this.invalidMessage ||\n this._ref?.validationMessage ||\n DEFAULT_INVALID_MESSAGE;\n }\n\n @Watch(\"_ref\")\n @Watch(\"invalidMessage\")\n watch0() {\n this.watch0Fn();\n }\n\n watch1Fn() {\n if (this._id) {\n const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;\n this._messageId = messageId;\n this._validMessageId = this._id + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = this._id + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId =\n this.dataListId ?? this._id + DEFAULT_DATALIST_ID_SUFFIX;\n if (stringPropVisible(this.message, this.showMessage)) {\n this._descByIds = messageId;\n }\n }\n }\n\n @Watch(\"_id\")\n watch1() {\n this.watch1Fn();\n }\n\n watch2Fn() {\n this._value = this.value;\n }\n\n @Watch(\"value\")\n watch2() {\n this.watch2Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-input\");\n const mId = this.id ?? `input-${uuid()}`;\n this._id = mId;\n this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;\n this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;\n this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;\n this._dataListId = mId + DEFAULT_DATALIST_ID_SUFFIX;\n this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;\n this.watch0Fn();\n this.watch1Fn();\n this.watch2Fn();\n }\n\n render() {\n return (\n <div\n class={cls(\"db-input\", this.className)}\n data-variant={this.variant}\n data-hide-label={getHideProp(this.showLabel)}\n data-show-icon={getBooleanAsString(\n this.showIconLeading ?? this.showIcon\n )}\n data-icon={this.iconLeading ?? this.icon}\n data-icon-trailing={this.iconTrailing}\n data-hide-asterisk={getHideProp(this.showRequiredAsterisk)}\n data-show-icon-trailing={getBooleanAsString(this.showIconTrailing)}\n >\n <label htmlFor={this._id}>{this.label ?? DEFAULT_LABEL}</label>\n <input\n aria-invalid={this.validation === \"invalid\"}\n data-custom-validity={this.validation}\n data-field-sizing={this.fieldSizing}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n name={this.name}\n type={this.type || \"text\"}\n multiple={getBoolean(this.multiple, \"multiple\")}\n placeholder={this.placeholder ?? DEFAULT_PLACEHOLDER}\n disabled={getBoolean(this.disabled, \"disabled\")}\n required={getBoolean(this.required, \"required\")}\n step={getNumber(this.step)}\n value={this.value ?? this._value}\n maxLength={getNumber(this.maxLength, this.maxlength)}\n minLength={getNumber(this.minLength, this.minlength)}\n max={getInputValue(this.max, this.type)}\n min={getInputValue(this.min, this.type)}\n readOnly={\n getBoolean(this.readOnly, \"readOnly\") ||\n getBoolean(this.readonly, \"readonly\")\n }\n form={this.form}\n pattern={this.pattern}\n size={this.size}\n autoComplete={this.autocomplete}\n autoFocus={getBoolean(this.autofocus, \"autofocus\")}\n onInput={(event) => this.handleInput(event)}\n onChange={(event) => this.handleChange(event)}\n onBlur={(event) => this.handleBlur(event)}\n onFocus={(event) => this.handleFocus(event)}\n list={this.dataList && this._dataListId}\n aria-describedby={this.ariaDescribedBy ?? this._descByIds}\n />\n {this.dataList ? (\n <datalist id={this._dataListId}>\n {this.getDataList()?.map((option) => (\n <option\n key={this._dataListId + \"-option-\" + option.value}\n value={option.value}\n >\n {option.label}\n </option>\n ))}\n </datalist>\n ) : null}\n <slot></slot>\n {stringPropVisible(this.message, this.showMessage) ? (\n <db-infotext\n size=\"small\"\n icon={this.messageIcon}\n id={this._messageId}\n >\n {this.message}\n </db-infotext>\n ) : null}\n {this.hasValidState() ? (\n <db-infotext\n size=\"small\"\n semantic=\"successful\"\n id={this._validMessageId}\n >\n {this.validMessage || DEFAULT_VALID_MESSAGE}\n </db-infotext>\n ) : null}\n <db-infotext\n size=\"small\"\n semantic=\"critical\"\n id={this._invalidMessageId}\n >\n {this._invalidMessage}\n </db-infotext>\n <span data-visually-hidden=\"true\" role=\"status\">\n {this._voiceOverFallback}\n </span>\n </div>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/input/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM;IAChF,mCAAmC;IACnC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO;IAChD,mCAAmC;IACnC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC","sourcesContent":["import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FormTextProps, FromValidState, GlobalProps, GlobalState,
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/input/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM;IAChF,mCAAmC;IACnC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO;IAChD,mCAAmC;IACnC,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC","sourcesContent":["import { ChangeEventProps, ChangeEventState, FocusEventProps, FocusEventState, FormMessageProps, FormProps, FormSizeProps, FormState, FormTextProps, FromValidState, GlobalProps, GlobalState, IconLeadingProps, IconProps, IconTrailingProps, InputEventProps, InputEventState, ShowIconLeadingProps, ShowIconProps, ShowIconTrailingProps, ValueLabelType } from '../../shared/model';\nexport const InputTypeList = ['color', 'date', 'datetime-local', 'email', 'file',\n// TODO: move this to own component\n'hidden', 'month', 'number', 'password', 'range',\n// TODO: move this to own component\n'search', 'tel', 'text', 'time', 'url', 'week'] as const;\nexport type InputTypeType = (typeof InputTypeList)[number];\nexport type DBInputDefaultProps = {\n /**\n * Set a [data list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist) via attribute instead of children.\n */\n dataList?: string[] | ValueLabelType[];\n /**\n * Add a custom id to [data list](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist) if you're using `dataList` attribute.\n */\n dataListId?: string;\n /**\n * Allow selecting multiple files. https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input/file#multiple\n */\n multiple?: boolean | string;\n /**\n * Maximum value\n */\n max?: number | string;\n /**\n * Minimum value\n */\n min?: number | string;\n\n /**\n * Pattern the value must match to be valid\n */\n pattern?: string;\n /**\n * \tType of form control\n */\n type?: InputTypeType | string;\n /**\n * Sets [step value](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/step).\n */\n step?: number | string;\n};\nexport type DBInputProps = DBInputDefaultProps & GlobalProps & FormTextProps & InputEventProps<HTMLInputElement> & ChangeEventProps<HTMLInputElement> & FocusEventProps<HTMLInputElement> & FormProps & IconProps & IconTrailingProps & FormMessageProps & ShowIconProps & IconLeadingProps & ShowIconLeadingProps & ShowIconTrailingProps & FormSizeProps;\nexport type DBInputDefaultState = {\n _dataListId?: string;\n getDataList: () => ValueLabelType[];\n};\nexport type DBInputState = DBInputDefaultState & GlobalState & InputEventState<HTMLInputElement> & ChangeEventState<HTMLInputElement> & FocusEventState<HTMLInputElement> & FormState & FromValidState"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cls, getBooleanAsString
|
|
1
|
+
import { cls, getBooleanAsString } from "../../utils";
|
|
2
2
|
import { h } from "@stencil/core";
|
|
3
3
|
/**
|
|
4
4
|
* @slot children - This is a default/unnamed slot
|
|
@@ -42,9 +42,9 @@ export class DBLink {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
var _a;
|
|
45
|
-
return (h("a", { key: '
|
|
45
|
+
return (h("a", { key: 'c76a9caf23e3efc45794fd4ef5b55ee7d228f500', class: cls("db-link", this.className), ref: (el) => {
|
|
46
46
|
this._ref = el;
|
|
47
|
-
}, id: this.id, href: this.href, target: this.target, rel: this.rel, role: this.role, hrefLang: this.hreflang, "aria-disabled": getBooleanAsString(this.disabled), tabIndex: this.disabled ? -1 : 0, "
|
|
47
|
+
}, id: this.id, href: this.href, target: this.target, rel: this.rel, role: this.role, hrefLang: this.hreflang, "aria-disabled": getBooleanAsString(this.disabled), tabIndex: this.disabled ? -1 : 0, "data-size": this.size, "data-show-icon-trailing": getBooleanAsString((_a = this.showIcon) !== null && _a !== void 0 ? _a : true), "data-variant": this.variant, "data-content": this.content || "internal", "data-wrap": getBooleanAsString(this.wrap) }, this.text ? this.text : h("slot", null)));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "db-link"; }
|
|
50
50
|
static get properties() {
|
|
@@ -249,38 +249,13 @@ export class DBLink {
|
|
|
249
249
|
"setter": false,
|
|
250
250
|
"reflect": false
|
|
251
251
|
},
|
|
252
|
-
"
|
|
253
|
-
"type": "any",
|
|
254
|
-
"attribute": "selected",
|
|
255
|
-
"mutable": false,
|
|
256
|
-
"complexType": {
|
|
257
|
-
"original": "DBLinkProps[\"selected\"]",
|
|
258
|
-
"resolved": "boolean | string",
|
|
259
|
-
"references": {
|
|
260
|
-
"DBLinkProps": {
|
|
261
|
-
"location": "import",
|
|
262
|
-
"path": "./model",
|
|
263
|
-
"id": "src/components/link/model.ts::DBLinkProps"
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
},
|
|
267
|
-
"required": false,
|
|
268
|
-
"optional": false,
|
|
269
|
-
"docs": {
|
|
270
|
-
"tags": [],
|
|
271
|
-
"text": ""
|
|
272
|
-
},
|
|
273
|
-
"getter": false,
|
|
274
|
-
"setter": false,
|
|
275
|
-
"reflect": false
|
|
276
|
-
},
|
|
277
|
-
"label": {
|
|
252
|
+
"size": {
|
|
278
253
|
"type": "string",
|
|
279
|
-
"attribute": "
|
|
254
|
+
"attribute": "size",
|
|
280
255
|
"mutable": false,
|
|
281
256
|
"complexType": {
|
|
282
|
-
"original": "DBLinkProps[\"
|
|
283
|
-
"resolved": "
|
|
257
|
+
"original": "DBLinkProps[\"size\"]",
|
|
258
|
+
"resolved": "\"medium\" | \"small\"",
|
|
284
259
|
"references": {
|
|
285
260
|
"DBLinkProps": {
|
|
286
261
|
"location": "import",
|
|
@@ -299,13 +274,13 @@ export class DBLink {
|
|
|
299
274
|
"setter": false,
|
|
300
275
|
"reflect": false
|
|
301
276
|
},
|
|
302
|
-
"
|
|
277
|
+
"showIcon": {
|
|
303
278
|
"type": "any",
|
|
304
|
-
"attribute": "
|
|
279
|
+
"attribute": "show-icon",
|
|
305
280
|
"mutable": false,
|
|
306
281
|
"complexType": {
|
|
307
|
-
"original": "DBLinkProps[\"
|
|
308
|
-
"resolved": "
|
|
282
|
+
"original": "DBLinkProps[\"showIcon\"]",
|
|
283
|
+
"resolved": "boolean | string",
|
|
309
284
|
"references": {
|
|
310
285
|
"DBLinkProps": {
|
|
311
286
|
"location": "import",
|
|
@@ -324,38 +299,13 @@ export class DBLink {
|
|
|
324
299
|
"setter": false,
|
|
325
300
|
"reflect": false
|
|
326
301
|
},
|
|
327
|
-
"
|
|
302
|
+
"variant": {
|
|
328
303
|
"type": "string",
|
|
329
|
-
"attribute": "
|
|
330
|
-
"mutable": false,
|
|
331
|
-
"complexType": {
|
|
332
|
-
"original": "DBLinkProps[\"size\"]",
|
|
333
|
-
"resolved": "\"medium\" | \"small\"",
|
|
334
|
-
"references": {
|
|
335
|
-
"DBLinkProps": {
|
|
336
|
-
"location": "import",
|
|
337
|
-
"path": "./model",
|
|
338
|
-
"id": "src/components/link/model.ts::DBLinkProps"
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
},
|
|
342
|
-
"required": false,
|
|
343
|
-
"optional": false,
|
|
344
|
-
"docs": {
|
|
345
|
-
"tags": [],
|
|
346
|
-
"text": ""
|
|
347
|
-
},
|
|
348
|
-
"getter": false,
|
|
349
|
-
"setter": false,
|
|
350
|
-
"reflect": false
|
|
351
|
-
},
|
|
352
|
-
"showIcon": {
|
|
353
|
-
"type": "any",
|
|
354
|
-
"attribute": "show-icon",
|
|
304
|
+
"attribute": "variant",
|
|
355
305
|
"mutable": false,
|
|
356
306
|
"complexType": {
|
|
357
|
-
"original": "DBLinkProps[\"
|
|
358
|
-
"resolved": "
|
|
307
|
+
"original": "DBLinkProps[\"variant\"]",
|
|
308
|
+
"resolved": "\"adaptive\" | \"brand\" | \"inline\"",
|
|
359
309
|
"references": {
|
|
360
310
|
"DBLinkProps": {
|
|
361
311
|
"location": "import",
|
|
@@ -374,13 +324,13 @@ export class DBLink {
|
|
|
374
324
|
"setter": false,
|
|
375
325
|
"reflect": false
|
|
376
326
|
},
|
|
377
|
-
"
|
|
327
|
+
"content": {
|
|
378
328
|
"type": "string",
|
|
379
|
-
"attribute": "
|
|
329
|
+
"attribute": "content",
|
|
380
330
|
"mutable": false,
|
|
381
331
|
"complexType": {
|
|
382
|
-
"original": "DBLinkProps[\"
|
|
383
|
-
"resolved": "\"
|
|
332
|
+
"original": "DBLinkProps[\"content\"]",
|
|
333
|
+
"resolved": "\"external\" | \"internal\"",
|
|
384
334
|
"references": {
|
|
385
335
|
"DBLinkProps": {
|
|
386
336
|
"location": "import",
|
|
@@ -399,13 +349,13 @@ export class DBLink {
|
|
|
399
349
|
"setter": false,
|
|
400
350
|
"reflect": false
|
|
401
351
|
},
|
|
402
|
-
"
|
|
403
|
-
"type": "
|
|
404
|
-
"attribute": "
|
|
352
|
+
"wrap": {
|
|
353
|
+
"type": "any",
|
|
354
|
+
"attribute": "wrap",
|
|
405
355
|
"mutable": false,
|
|
406
356
|
"complexType": {
|
|
407
|
-
"original": "DBLinkProps[\"
|
|
408
|
-
"resolved": "
|
|
357
|
+
"original": "DBLinkProps[\"wrap\"]",
|
|
358
|
+
"resolved": "boolean | string",
|
|
409
359
|
"references": {
|
|
410
360
|
"DBLinkProps": {
|
|
411
361
|
"location": "import",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/components/link/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"link.js","sourceRoot":"","sources":["../../../src/components/link/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,IAAI,EAAE,MAAM,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C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { cls, getBooleanAsString } from \"../../utils\";\nimport { DBLinkProps } from \"./model\";\n\nimport { Component, h, Fragment, Prop } from \"@stencil/core\";\n\n\n/**\n * @slot children - This is a default/unnamed slot\n\n */\n @Component({\n tag: \"db-link\",\n})\nexport class DBLink {\n private _ref!: HTMLAnchorElement | any;\n @Prop() id: DBLinkProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBLinkProps[\"className\"];\n @Prop() href: DBLinkProps[\"href\"];\n @Prop() target: DBLinkProps[\"target\"];\n @Prop() rel: DBLinkProps[\"rel\"];\n @Prop() role: DBLinkProps[\"role\"];\n @Prop() hreflang: DBLinkProps[\"hreflang\"];\n @Prop() disabled: DBLinkProps[\"disabled\"];\n @Prop() size: DBLinkProps[\"size\"];\n @Prop() showIcon: DBLinkProps[\"showIcon\"];\n @Prop() variant: DBLinkProps[\"variant\"];\n @Prop() content: DBLinkProps[\"content\"];\n @Prop() wrap: DBLinkProps[\"wrap\"];\n @Prop() text: DBLinkProps[\"text\"];\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-link\");\n }\n\n render() {\n return (\n <a\n class={cls(\"db-link\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this.id}\n href={this.href}\n target={this.target}\n rel={this.rel}\n role={this.role}\n hrefLang={this.hreflang}\n aria-disabled={getBooleanAsString(this.disabled)}\n tabIndex={this.disabled ? -1 : 0}\n data-size={this.size}\n data-show-icon-trailing={getBooleanAsString(this.showIcon ?? true)}\n data-variant={this.variant}\n data-content={this.content || \"internal\"}\n data-wrap={getBooleanAsString(this.wrap)}\n >\n {this.text ? this.text : <slot></slot>}\n </a>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/link/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,OAAO,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/link/model.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAExE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AAEzD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,UAAU,EAAE,UAAU,CAAU,CAAC","sourcesContent":["import { ClickEventProps, ClickEventState, GlobalProps, GlobalState, LinkProps, ShowIconProps, TextProps, WrapProps } from '../../shared/model';\nexport const LinkVariantList = ['adaptive', 'brand', 'inline'] as const;\nexport type LinkVariantType = (typeof LinkVariantList)[number];\nexport const LinkSizeList = ['medium', 'small'] as const;\nexport type LinkSizeType = (typeof LinkSizeList)[number];\nexport const LinkContentList = ['external', 'internal'] as const;\nexport type LinkContentType = (typeof LinkContentList)[number];\nexport type DBLinkDefaultProps = {\n /**\n * Adds a different arrow after the link to indicate external or internal link\n */\n content?: LinkContentType;\n /**\n * Change the size of the link\n */\n size?: LinkSizeType;\n /**\n * Change the styling of the link. `inline` will remove the arrow. Defaults to adaptive.\n */\n variant?: LinkVariantType;\n};\nexport type DBLinkProps = DBLinkDefaultProps & GlobalProps & ClickEventProps<HTMLAnchorElement> & LinkProps & ShowIconProps & TextProps & WrapProps;\nexport type DBLinkDefaultState = {};\nexport type DBLinkState = DBLinkDefaultState & GlobalState & ClickEventState<HTMLAnchorElement>"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/navigation/model.ts"],"names":[],"mappings":"","sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/navigation/model.ts"],"names":[],"mappings":"","sourcesContent":["import { GlobalProps, GlobalState } from '../../shared/model';\nexport type DBNavigationDefaultProps = {};\nexport type DBNavigationProps = DBNavigationDefaultProps & GlobalProps;\nexport type DBNavigationDefaultState = {};\nexport type DBNavigationState = DBNavigationDefaultState & GlobalState"]}
|
|
@@ -46,9 +46,9 @@ export class DBNavigation {
|
|
|
46
46
|
this._id = this.id || "navigation-" + uuid();
|
|
47
47
|
}
|
|
48
48
|
render() {
|
|
49
|
-
return (h("nav", { key: '
|
|
49
|
+
return (h("nav", { key: 'ed27159179b89985cbf0711be7dc494ca820cf75', class: cls("db-navigation", this.className), ref: (el) => {
|
|
50
50
|
this._ref = el;
|
|
51
|
-
}, id: this._id
|
|
51
|
+
}, id: this._id }, h("menu", { key: '6aa518535f6c802abec874a174d6e8d028572269' }, h("slot", { key: '2307ee2093cf4bcec3c8f4b8d5e8e88a8d78cf08' }))));
|
|
52
52
|
}
|
|
53
53
|
static get is() { return "db-navigation"; }
|
|
54
54
|
static get properties() {
|
|
@@ -78,31 +78,6 @@ export class DBNavigation {
|
|
|
78
78
|
"setter": false,
|
|
79
79
|
"reflect": false
|
|
80
80
|
},
|
|
81
|
-
"labelledBy": {
|
|
82
|
-
"type": "string",
|
|
83
|
-
"attribute": "labelled-by",
|
|
84
|
-
"mutable": false,
|
|
85
|
-
"complexType": {
|
|
86
|
-
"original": "DBNavigationProps[\"labelledBy\"]",
|
|
87
|
-
"resolved": "string",
|
|
88
|
-
"references": {
|
|
89
|
-
"DBNavigationProps": {
|
|
90
|
-
"location": "import",
|
|
91
|
-
"path": "./model",
|
|
92
|
-
"id": "src/components/navigation/model.ts::DBNavigationProps"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
"required": false,
|
|
97
|
-
"optional": false,
|
|
98
|
-
"docs": {
|
|
99
|
-
"tags": [],
|
|
100
|
-
"text": ""
|
|
101
|
-
},
|
|
102
|
-
"getter": false,
|
|
103
|
-
"setter": false,
|
|
104
|
-
"reflect": false
|
|
105
|
-
},
|
|
106
81
|
"className": {
|
|
107
82
|
"type": "string",
|
|
108
83
|
"attribute": "classname",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../src/components/navigation/navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,GAAG,EAAE,IAAI,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DEFAULT_ID } from \"../../shared/constants\";\nimport { cls, uuid } from \"../../utils\";\nimport { DBNavigationProps, DBNavigationState } from \"./model\";\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-navigation\",\n})\nexport class DBNavigation {\n private _ref!: HTMLDivElement | any;\n @Prop() id: DBNavigationProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBNavigationProps[\"className\"];\n @State() _id = DEFAULT_ID;\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-navigation\");\n this._id = this.id || \"navigation-\" + uuid();\n }\n\n render() {\n return (\n <nav\n class={cls(\"db-navigation\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n >\n <menu>\n <slot></slot>\n </menu>\n </nav>\n );\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/navigation-item/model.ts"],"names":[],"mappings":"","sourcesContent":["import { ClickEvent, ClickEventProps, ClickEventState, GlobalProps, GlobalState, IconProps, InitializedState, NavigationBackButtonProps, NavigationBehaviorState, ShowIconProps, TextProps, WidthProps } from '../../shared/model';\nimport { NavigationItemSafeTriangle } from '../../utils/navigation';\nexport type DBNavigationItemDefaultProps = {\n /**\n * Alternative indicator for active navigation item (bold font). In contrast to the use of aria-current=\"page\" on the contained anchor, this does not guarantee correct a11y.\n */\n active?: boolean;\n\n /**\n * The disabled attribute can be set to [keep a user from clicking on the item](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled).\n */\n disabled?: boolean | string;\n\n /**\n * React-specific property to pass in a slot for sub-navigation\n */\n\n subNavigation?: any;\n\n /**\n * This is for mobile navigation only, if it is set the sub-navigation is a static overlay\n */\n subNavigationExpanded?: boolean | string;\n
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../src/components/navigation-item/model.ts"],"names":[],"mappings":"","sourcesContent":["import { ClickEvent, ClickEventProps, ClickEventState, GlobalProps, GlobalState, IconProps, InitializedState, NavigationBackButtonProps, NavigationBehaviorState, ShowIconProps, TextProps, WidthProps, WrapProps } from '../../shared/model';\nimport { NavigationItemSafeTriangle } from '../../utils/navigation';\nexport type DBNavigationItemDefaultProps = {\n /**\n * Alternative indicator for active navigation item (bold font). In contrast to the use of aria-current=\"page\" on the contained anchor, this does not guarantee correct a11y.\n */\n active?: boolean;\n\n /**\n * The disabled attribute can be set to [keep a user from clicking on the item](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#disabled).\n */\n disabled?: boolean | string;\n\n /**\n * React-specific property to pass in a slot for sub-navigation\n */\n\n subNavigation?: any;\n\n /**\n * This is for mobile navigation only, if it is set the sub-navigation is a static overlay\n */\n subNavigationExpanded?: boolean | string;\n};\nexport type DBNavigationItemProps = DBNavigationItemDefaultProps & GlobalProps & ClickEventProps<HTMLButtonElement> & IconProps & WidthProps & WrapProps & NavigationBackButtonProps & ShowIconProps & TextProps;\nexport type DBNavigationItemDefaultState = {\n handleBackClick: (event: ClickEvent<HTMLButtonElement>) => void;\n hasAreaPopup: boolean;\n isSubNavigationExpanded: boolean;\n subNavigationId: string;\n\n /**\n * Internal state property to show/hide sub-navigation button\n */\n hasSubNavigation?: boolean;\n navigationItemSafeTriangle?: NavigationItemSafeTriangle;\n autoClose?: boolean;\n};\nexport type DBNavigationItemState = DBNavigationItemDefaultState & ClickEventState<HTMLButtonElement> & GlobalState & InitializedState & NavigationBehaviorState"]}
|