@db-ux/wc-core-components 2.4.4 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +6 -5
- package/dist/cjs/db-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/db-checkbox.entry.cjs.js.map +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 +14 -35
- 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 +21 -14
- 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 +14 -19
- package/dist/cjs/db-header.cjs.entry.js.map +1 -1
- package/dist/cjs/db-header.entry.cjs.js.map +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 +5 -5
- 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 +2 -2
- 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 +6 -5
- 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 +6 -5
- package/dist/cjs/db-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/db-textarea.entry.cjs.js.map +1 -1
- package/dist/cjs/db-tooltip.cjs.entry.js +2 -2
- package/dist/cjs/db-ux.cjs.js +3 -3
- package/dist/cjs/db-ux.cjs.js.map +1 -1
- package/dist/cjs/{floating-components-BxBSpOv1.js → floating-components-ogUqz72V.js} +3 -2
- package/dist/cjs/{floating-components-BxBSpOv1.js.map → floating-components-ogUqz72V.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 +114 -15
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{navigation-BNSnj0bl.js → navigation-DauGE-qj.js} +3 -3
- package/dist/cjs/{navigation-BNSnj0bl.js.map → navigation-DauGE-qj.js.map} +1 -1
- 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/checkbox/checkbox.js +5 -4
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/custom-select/custom-select.js +55 -42
- package/dist/collection/components/custom-select/custom-select.js.map +1 -1
- package/dist/collection/components/custom-select/model.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/header/header.js +30 -34
- package/dist/collection/components/header/header.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 +112 -11
- 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 +6 -5
- 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/components/textarea/textarea.js +5 -4
- package/dist/collection/components/textarea/textarea.js.map +1 -1
- package/dist/collection/index.js +39 -0
- package/dist/collection/index.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 +613 -657
- 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-checkbox.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-header.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-textarea.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-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-340bb722.entry.js +2 -0
- package/dist/db-ux/p-340bb722.entry.js.map +1 -0
- package/dist/db-ux/p-3d7eb768.entry.js +2 -0
- package/dist/db-ux/p-3d7eb768.entry.js.map +1 -0
- 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-6e35a260.entry.js +2 -0
- package/dist/db-ux/p-6e35a260.entry.js.map +1 -0
- package/dist/db-ux/p-84dd974f.entry.js +2 -0
- package/dist/db-ux/p-84dd974f.entry.js.map +1 -0
- package/dist/db-ux/p-8b41c30e.entry.js +2 -0
- package/dist/db-ux/p-8b41c30e.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-CifCRcqG.js → p-G-TursYV.js} +2 -2
- package/dist/db-ux/{p-CifCRcqG.js.map → p-G-TursYV.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-a3541c03.entry.js +2 -0
- package/dist/db-ux/p-a3541c03.entry.js.map +1 -0
- 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-1d4ee600.entry.js → p-d4e3d1db.entry.js} +2 -2
- 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-e9c323af.entry.js +2 -0
- package/dist/db-ux/p-e9c323af.entry.js.map +1 -0
- 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-109b88a5.entry.js → p-fdf5578d.entry.js} +2 -2
- package/dist/db-ux/{p-DdyDId49.js → p-sP2NlPcu.js} +2 -2
- package/dist/db-ux/{p-DdyDId49.js.map → p-sP2NlPcu.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 +6 -5
- package/dist/esm/db-checkbox.entry.js.map +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 +15 -36
- 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 +21 -14
- 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 +16 -21
- package/dist/esm/db-header.entry.js.map +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 +6 -6
- 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 +2 -2
- 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 +7 -6
- 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 +6 -5
- package/dist/esm/db-textarea.entry.js.map +1 -1
- package/dist/esm/db-tooltip.entry.js +2 -2
- package/dist/esm/db-ux.js +4 -4
- package/dist/esm/db-ux.js.map +1 -1
- package/dist/esm/{floating-components-CifCRcqG.js → floating-components-G-TursYV.js} +3 -3
- package/dist/esm/{floating-components-CifCRcqG.js.map → floating-components-G-TursYV.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 +65 -7
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{navigation--rT2utIA.js → navigation--UdC9CzO.js} +3 -3
- package/dist/esm/{navigation--rT2utIA.js.map → navigation--UdC9CzO.js.map} +1 -1
- package/dist/types/components/button/button.d.ts +8 -6
- package/dist/types/components/button/model.d.ts +6 -22
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/custom-select/custom-select.d.ts +4 -3
- package/dist/types/components/custom-select/model.d.ts +1 -0
- 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/header/header.d.ts +1 -2
- package/dist/types/components/input/input.d.ts +7 -3
- 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/select/select.d.ts +1 -1
- 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/textarea/textarea.d.ts +1 -1
- package/dist/types/components.d.ts +48 -38
- package/dist/types/index.d.ts +39 -0
- package/dist/types/shared/model.d.ts +28 -27
- package/dist/vscode.html-custom-data.json +95 -98
- package/dist/web-types.json +193 -204
- package/package.json +8 -8
- package/dist/db-ux/p-291a3bb4.entry.js +0 -2
- package/dist/db-ux/p-291a3bb4.entry.js.map +0 -1
- 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-6243b16c.entry.js +0 -2
- package/dist/db-ux/p-6243b16c.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-a8d63224.entry.js +0 -2
- package/dist/db-ux/p-a8d63224.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-d4cc20df.entry.js +0 -2
- package/dist/db-ux/p-d4cc20df.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-4da7f4bb.entry.js.map → p-16f1fa7c.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-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-1d4ee600.entry.js.map → p-d4e3d1db.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
- /package/dist/db-ux/{p-109b88a5.entry.js.map → p-fdf5578d.entry.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DEFAULT_BURGER_MENU
|
|
2
|
-
import { addAttributeToChildren, cls, getBoolean
|
|
1
|
+
import { DEFAULT_BURGER_MENU } from "../../shared/constants";
|
|
2
|
+
import { addAttributeToChildren, cls, getBoolean } from "../../utils";
|
|
3
3
|
import { isEventTargetNavigationItem } from "../../utils/navigation";
|
|
4
4
|
import { h, } from "@stencil/core";
|
|
5
5
|
/**
|
|
@@ -11,7 +11,6 @@ import { h, } from "@stencil/core";
|
|
|
11
11
|
*/
|
|
12
12
|
export class DBHeader {
|
|
13
13
|
constructor() {
|
|
14
|
-
this._id = DEFAULT_ID;
|
|
15
14
|
this.initialized = false;
|
|
16
15
|
this.forcedToMobile = false;
|
|
17
16
|
}
|
|
@@ -62,17 +61,13 @@ export class DBHeader {
|
|
|
62
61
|
}
|
|
63
62
|
}
|
|
64
63
|
watch0Fn() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
key: "data-force-mobile",
|
|
73
|
-
value: "true",
|
|
74
|
-
});
|
|
75
|
-
}
|
|
64
|
+
if (this.initialized && this._ref && this.forceMobile) {
|
|
65
|
+
// Adds this attribute to the header to enable all styling which would have
|
|
66
|
+
// @media screen and (min-width: $db-screens-m) to show mobile navigation on a desktop device
|
|
67
|
+
addAttributeToChildren(this._ref, {
|
|
68
|
+
key: "data-force-mobile",
|
|
69
|
+
value: "true",
|
|
70
|
+
});
|
|
76
71
|
this.forcedToMobile = true;
|
|
77
72
|
}
|
|
78
73
|
}
|
|
@@ -82,25 +77,24 @@ export class DBHeader {
|
|
|
82
77
|
componentDidLoad() {
|
|
83
78
|
this.enableAttributePassing(this._ref, "db-header");
|
|
84
79
|
this.initialized = true;
|
|
85
|
-
this._id = this.id || "header-" + uuid();
|
|
86
80
|
this.watch0Fn();
|
|
87
81
|
}
|
|
88
82
|
render() {
|
|
89
83
|
var _a;
|
|
90
|
-
return (h("header", { key: '
|
|
84
|
+
return (h("header", { key: 'f4c9884becf742012f64300f7c63fc6d4463fc53', class: cls("db-header", this.className), ref: (el) => {
|
|
91
85
|
this._ref = el;
|
|
92
|
-
}, id: this.
|
|
86
|
+
}, id: this.id, "data-width": this.width, "data-on-forcing-mobile": this.forceMobile && !this.forcedToMobile }, h("db-drawer", { key: '1e7041fce0b49d91634f9150de2728fb3ea570ae', class: "db-header-drawer", spacing: "small", rounded: true, open: getBoolean(this.drawerOpen), onClose: () => this.handleToggle() }, h("div", { key: '9cf3ece5244d1210276de64d74916077323a03c1', class: "db-header-drawer-navigation" }, h("div", { key: '4b3aa0923761a654d6095e862b5d1beddae86d80', class: "db-header-navigation", onClick: (event) => this.handleNavigationItemClick(event) }, h("slot", { key: 'a4f4a03a8cb99eb51aa6b865900ce5087099eddf' })), h("div", { key: '3d45857231f8637705c827d7c261cc33ab14f966', class: "db-header-meta-navigation" }, h("slot", { key: '8820a4e7f3e41d92ffabee8787e68cff52ae9ffe', name: "metaNavigation" }))), h("div", { key: 'a2419d7e6cf2ac44e303b3ecbce0e2879064ce92', class: "db-header-secondary-action" }, h("slot", { key: 'be3960fbaf78ae49ba370e78be80069c21272b90', name: "secondaryAction" }))), h("div", { key: '5d34773d05e83f70b8c4b94320ccacfa724c607d', class: "db-header-meta-navigation" }, h("slot", { key: '59173edd33c4cb1198d01ff226a9b00510066a23', name: "metaNavigation" })), h("div", { key: '295063c335c63c27caa205577aa8d1c9fba8f707', class: "db-header-navigation-bar" }, h("div", { key: '89bba742b816ae4de7964a6818552cb539b338fc', class: "db-header-brand-container" }, h("slot", { key: '98f16df9f68541c7fddc25fd823d6a6c2c038186', name: "brand" })), h("div", { key: '7e6279f4528c98b3e33fe9e948f24e098806aba1', class: "db-header-navigation-container" }, h("div", { key: '9194a52e1270ae50b648498587262354e2cbb074', class: "db-header-navigation" }, h("slot", { key: '5c5b769528a870c273f6b278f2426818b87fca34' })), h("div", { key: 'fdd0b74ffd36b12cca136b66ffb851332384e7f5', class: "db-header-primary-action" }, h("slot", { key: '9785dea0204a3029a31962e661861c26ca9ba490', name: "primaryAction" }))), h("div", { key: '3da686773c71442497aed65236b22ce19d42cf5a', class: "db-header-action-container" }, h("div", { key: '08d4fcda3c5e3d757fa090fc7a4170884f653340', class: "db-header-burger-menu-container" }, h("db-button", { key: '066d1359f239663f6c92d9206ec6112ab93a7326', icon: "menu", variant: "ghost", noText: true, onClick: () => this.handleToggle() }, (_a = this.burgerMenuLabel) !== null && _a !== void 0 ? _a : DEFAULT_BURGER_MENU)), h("div", { key: '43ed5e88925dd99ff83241a626e3a4204101304f', class: "db-header-secondary-action" }, h("slot", { key: 'c74a72a5babc2ab9c667d2a898955be5ce919a9b', name: "secondaryAction" }))))));
|
|
93
87
|
}
|
|
94
88
|
static get is() { return "db-header"; }
|
|
95
89
|
static get properties() {
|
|
96
90
|
return {
|
|
97
|
-
"
|
|
98
|
-
"type": "
|
|
99
|
-
"attribute": "
|
|
91
|
+
"forceMobile": {
|
|
92
|
+
"type": "any",
|
|
93
|
+
"attribute": "force-mobile",
|
|
100
94
|
"mutable": false,
|
|
101
95
|
"complexType": {
|
|
102
|
-
"original": "DBHeaderProps[\"
|
|
103
|
-
"resolved": "string",
|
|
96
|
+
"original": "DBHeaderProps[\"forceMobile\"]",
|
|
97
|
+
"resolved": "boolean | string",
|
|
104
98
|
"references": {
|
|
105
99
|
"DBHeaderProps": {
|
|
106
100
|
"location": "import",
|
|
@@ -119,12 +113,12 @@ export class DBHeader {
|
|
|
119
113
|
"setter": false,
|
|
120
114
|
"reflect": false
|
|
121
115
|
},
|
|
122
|
-
"
|
|
116
|
+
"drawerOpen": {
|
|
123
117
|
"type": "any",
|
|
124
|
-
"attribute": "
|
|
118
|
+
"attribute": "drawer-open",
|
|
125
119
|
"mutable": false,
|
|
126
120
|
"complexType": {
|
|
127
|
-
"original": "DBHeaderProps[\"
|
|
121
|
+
"original": "DBHeaderProps[\"drawerOpen\"]",
|
|
128
122
|
"resolved": "boolean | string",
|
|
129
123
|
"references": {
|
|
130
124
|
"DBHeaderProps": {
|
|
@@ -144,13 +138,13 @@ export class DBHeader {
|
|
|
144
138
|
"setter": false,
|
|
145
139
|
"reflect": false
|
|
146
140
|
},
|
|
147
|
-
"
|
|
148
|
-
"type": "
|
|
149
|
-
"attribute": "
|
|
141
|
+
"className": {
|
|
142
|
+
"type": "string",
|
|
143
|
+
"attribute": "classname",
|
|
150
144
|
"mutable": false,
|
|
151
145
|
"complexType": {
|
|
152
|
-
"original": "DBHeaderProps[\"
|
|
153
|
-
"resolved": "
|
|
146
|
+
"original": "DBHeaderProps[\"className\"]",
|
|
147
|
+
"resolved": "string",
|
|
154
148
|
"references": {
|
|
155
149
|
"DBHeaderProps": {
|
|
156
150
|
"location": "import",
|
|
@@ -169,12 +163,12 @@ export class DBHeader {
|
|
|
169
163
|
"setter": false,
|
|
170
164
|
"reflect": false
|
|
171
165
|
},
|
|
172
|
-
"
|
|
166
|
+
"id": {
|
|
173
167
|
"type": "string",
|
|
174
|
-
"attribute": "
|
|
168
|
+
"attribute": "id",
|
|
175
169
|
"mutable": false,
|
|
176
170
|
"complexType": {
|
|
177
|
-
"original": "DBHeaderProps[\"
|
|
171
|
+
"original": "DBHeaderProps[\"id\"]",
|
|
178
172
|
"resolved": "string",
|
|
179
173
|
"references": {
|
|
180
174
|
"DBHeaderProps": {
|
|
@@ -248,7 +242,6 @@ export class DBHeader {
|
|
|
248
242
|
}
|
|
249
243
|
static get states() {
|
|
250
244
|
return {
|
|
251
|
-
"_id": {},
|
|
252
245
|
"initialized": {},
|
|
253
246
|
"forcedToMobile": {}
|
|
254
247
|
};
|
|
@@ -275,6 +268,9 @@ export class DBHeader {
|
|
|
275
268
|
return [{
|
|
276
269
|
"propName": "initialized",
|
|
277
270
|
"methodName": "watch0"
|
|
271
|
+
}, {
|
|
272
|
+
"propName": "_ref",
|
|
273
|
+
"methodName": "watch0"
|
|
278
274
|
}];
|
|
279
275
|
}
|
|
280
276
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,sBAAsB,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CA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ean, uuid } from \"../../utils\";\nimport { isEventTargetNavigationItem } from \"../../utils/navigation\";\nimport { DBButton } from \"../button/button\";\nimport { DBDrawer } from \"../drawer/drawer\";\nimport { DBHeaderProps, DBHeaderState } 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 * @slot metaNavigation - TODO: Add description for slotMetaNavigation\n * @slot secondaryAction - TODO: Add description for slotSecondaryAction\n * @slot brand - TODO: Add description for slotBrand\n * @slot primaryAction - TODO: Add description for slotPrimaryAction\n */\n @Component({\n tag: \"db-header\",\n})\nexport class DBHeader {\n private _ref!: HTMLDivElement | any;\n @Prop() id: DBHeaderProps[\"id\"];\n @Prop() forceMobile: DBHeaderProps[\"forceMobile\"];\n @Prop() drawerOpen: DBHeaderProps[\"drawerOpen\"];\n @Event() toggle: EventEmitter<\n Parameters<Required<DBHeaderProps>[\"onToggle\"]>[number]\n > | void;\n @Prop({attribute: \"classname\"}) className: DBHeaderProps[\"className\"];\n @Prop() width: DBHeaderProps[\"width\"];\n @Prop() burgerMenuLabel: DBHeaderProps[\"burgerMenuLabel\"];\n @State() _id = DEFAULT_ID;\n @State() initialized = false;\n @State() forcedToMobile = false;\n\n handleToggle(event?: any) {\n if (event && event.stopPropagation) {\n event.stopPropagation();\n }\n const open = !getBoolean(this.drawerOpen, \"drawerOpen\");\n if (this.toggle) {\n this.toggle.emit(open);\n }\n }\n handleNavigationItemClick(event: unknown) {\n if (isEventTargetNavigationItem(event)) {\n this.handleToggle();\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: 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 watch0Fn() {\n if (this.initialized && document && this._id && this.forceMobile) {\n const headerElement = document.getElementById(\n this._id ?? \"\"\n ) as HTMLElement;\n if (headerElement) {\n // Adds this attribute to the header to enable all styling which would have\n // @media screen and (min-width: $db-screens-m) to show mobile navigation on a desktop device\n addAttributeToChildren(headerElement, {\n key: \"data-force-mobile\",\n value: \"true\",\n });\n }\n this.forcedToMobile = true;\n }\n }\n\n @Watch(\"initialized\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-header\");\n this.initialized = true;\n this._id = this.id || \"header-\" + uuid();\n this.watch0Fn();\n }\n\n render() {\n return (\n <header\n class={cls(\"db-header\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this._id}\n data-width={this.width}\n data-on-forcing-mobile={this.forceMobile && !this.forcedToMobile}\n >\n <db-drawer\n class=\"db-header-drawer\"\n spacing=\"small\"\n rounded={true}\n open={getBoolean(this.drawerOpen)}\n onClose={() => this.handleToggle()}\n >\n <div class=\"db-header-drawer-navigation\">\n <div\n class=\"db-header-navigation\"\n onClick={(event) => this.handleNavigationItemClick(event)}\n >\n <slot></slot>\n </div>\n <div class=\"db-header-meta-navigation\">\n <slot name=\"metaNavigation\"></slot>\n </div>\n </div>\n <div class=\"db-header-secondary-action\">\n <slot name=\"secondaryAction\"></slot>\n </div>\n </db-drawer>\n <div class=\"db-header-meta-navigation\">\n <slot name=\"metaNavigation\"></slot>\n </div>\n <div class=\"db-header-navigation-bar\">\n <div class=\"db-header-brand-container\">\n <slot name=\"brand\"></slot>\n </div>\n <div class=\"db-header-navigation-container\">\n <div class=\"db-header-navigation\">\n <slot></slot>\n </div>\n <div class=\"db-header-primary-action\">\n <slot name=\"primaryAction\"></slot>\n </div>\n </div>\n <div class=\"db-header-action-container\">\n <div class=\"db-header-burger-menu-container\">\n <db-button\n icon=\"menu\"\n variant=\"ghost\"\n id={this._id + \"-burger-menu\"}\n noText={true}\n onClick={() => this.handleToggle()}\n >\n {this.burgerMenuLabel ?? DEFAULT_BURGER_MENU}\n </db-button>\n </div>\n <div class=\"db-header-secondary-action\">\n <slot name=\"secondaryAction\"></slot>\n </div>\n </div>\n </div>\n </header>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../../src/components/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAKrE,OAAO,EACL,SAAS,EACT,CAAC,EAED,KAAK,EACL,KAAK,EAEL,IAAI,EACJ,KAAK,GACN,MAAM,eAAe,CAAC;AAGvB;;;;;;GAMG;AAIH,MAAM,OAAO,QAAQ;IAHpB;QAcU,gBAAW,GAAG,KAAK,CAAC;QACpB,mBAAc,GAAG,KAAK,CAAC;KAoJjC;IAlJC,YAAY,CAAC,KAAW;QACtB,IAAI,KAAK,IAAI,KAAK,CAAC,eAAe,EAAE,CAAC;YACnC,KAAK,CAAC,eAAe,EAAE,CAAC;QAC1B,CAAC;QACD,MAAM,IAAI,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,EAA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,CAAC,YAAY,EAAE,IAEjC,MAAA,IAAI,CAAC,eAAe,mCAAI,mBAAmB,CAClC,CACR;oBACN,4DAAK,KAAK,EAAC,4BAA4B;wBACrC,6DAAM,IAAI,EAAC,iBAAiB,GAAQ,CAChC,CACF,CACF,CACC,CACV,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { DEFAULT_BURGER_MENU } from \"../../shared/constants\";\nimport { addAttributeToChildren, cls, getBoolean } from \"../../utils\";\nimport { isEventTargetNavigationItem } from \"../../utils/navigation\";\nimport { DBButton } from \"../button/button\";\nimport { DBDrawer } from \"../drawer/drawer\";\nimport { DBHeaderProps, DBHeaderState } 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 * @slot metaNavigation - TODO: Add description for slotMetaNavigation\n * @slot secondaryAction - TODO: Add description for slotSecondaryAction\n * @slot brand - TODO: Add description for slotBrand\n * @slot primaryAction - TODO: Add description for slotPrimaryAction\n */\n @Component({\n tag: \"db-header\",\n})\nexport class DBHeader {\n private _ref!: HTMLDivElement | any;\n @Prop() forceMobile: DBHeaderProps[\"forceMobile\"];\n @Prop() drawerOpen: DBHeaderProps[\"drawerOpen\"];\n @Event() toggle: EventEmitter<\n Parameters<Required<DBHeaderProps>[\"onToggle\"]>[number]\n > | void;\n @Prop({attribute: \"classname\"}) className: DBHeaderProps[\"className\"];\n @Prop() id: DBHeaderProps[\"id\"];\n @Prop() width: DBHeaderProps[\"width\"];\n @Prop() burgerMenuLabel: DBHeaderProps[\"burgerMenuLabel\"];\n @State() initialized = false;\n @State() forcedToMobile = false;\n\n handleToggle(event?: any) {\n if (event && event.stopPropagation) {\n event.stopPropagation();\n }\n const open = !getBoolean(this.drawerOpen, \"drawerOpen\");\n if (this.toggle) {\n this.toggle.emit(open);\n }\n }\n handleNavigationItemClick(event: unknown) {\n if (isEventTargetNavigationItem(event)) {\n this.handleToggle();\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: 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 watch0Fn() {\n if (this.initialized && this._ref && this.forceMobile) {\n // Adds this attribute to the header to enable all styling which would have\n // @media screen and (min-width: $db-screens-m) to show mobile navigation on a desktop device\n addAttributeToChildren(this._ref, {\n key: \"data-force-mobile\",\n value: \"true\",\n });\n this.forcedToMobile = true;\n }\n }\n\n @Watch(\"initialized\")\n @Watch(\"_ref\")\n watch0() {\n this.watch0Fn();\n }\n\n componentDidLoad() {\n this.enableAttributePassing(this._ref, \"db-header\");\n this.initialized = true;\n this.watch0Fn();\n }\n\n render() {\n return (\n <header\n class={cls(\"db-header\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this.id}\n data-width={this.width}\n data-on-forcing-mobile={this.forceMobile && !this.forcedToMobile}\n >\n <db-drawer\n class=\"db-header-drawer\"\n spacing=\"small\"\n rounded={true}\n open={getBoolean(this.drawerOpen)}\n onClose={() => this.handleToggle()}\n >\n <div class=\"db-header-drawer-navigation\">\n <div\n class=\"db-header-navigation\"\n onClick={(event) => this.handleNavigationItemClick(event)}\n >\n <slot></slot>\n </div>\n <div class=\"db-header-meta-navigation\">\n <slot name=\"metaNavigation\"></slot>\n </div>\n </div>\n <div class=\"db-header-secondary-action\">\n <slot name=\"secondaryAction\"></slot>\n </div>\n </db-drawer>\n <div class=\"db-header-meta-navigation\">\n <slot name=\"metaNavigation\"></slot>\n </div>\n <div class=\"db-header-navigation-bar\">\n <div class=\"db-header-brand-container\">\n <slot name=\"brand\"></slot>\n </div>\n <div class=\"db-header-navigation-container\">\n <div class=\"db-header-navigation\">\n <slot></slot>\n </div>\n <div class=\"db-header-primary-action\">\n <slot name=\"primaryAction\"></slot>\n </div>\n </div>\n <div class=\"db-header-action-container\">\n <div class=\"db-header-burger-menu-container\">\n <db-button\n icon=\"menu\"\n variant=\"ghost\"\n noText={true}\n onClick={() => this.handleToggle()}\n >\n {this.burgerMenuLabel ?? DEFAULT_BURGER_MENU}\n </db-button>\n </div>\n <div class=\"db-header-secondary-action\">\n <slot name=\"secondaryAction\"></slot>\n </div>\n </div>\n </div>\n </header>\n );\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { cls,
|
|
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 DBInfotext {
|
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
44
|
var _a;
|
|
45
|
-
return (h("span", { key: '
|
|
45
|
+
return (h("span", { key: 'c126d11d979284931006fa76b2a6a49e396f394c', class: cls("db-infotext", this.className), ref: (el) => {
|
|
46
46
|
this._ref = el;
|
|
47
|
-
}, id: this.id, "data-icon": this.icon, "data-semantic": this.semantic, "data-size": this.size, "data-
|
|
47
|
+
}, id: this.id, "data-icon": this.icon, "data-semantic": this.semantic, "data-size": this.size, "data-show-icon-leading": getBooleanAsString((_a = this.showIcon) !== null && _a !== void 0 ? _a : true) }, this.text ? this.text : h("slot", null)));
|
|
48
48
|
}
|
|
49
49
|
static get is() { return "db-infotext"; }
|
|
50
50
|
static get properties() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infotext.js","sourceRoot":"","sources":["../../../src/components/infotext/infotext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"infotext.js","sourceRoot":"","sources":["../../../src/components/infotext/infotext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAAE,SAAS,EAAE,CAAC,EAAY,IAAI,EAAE,MAAM,eAAe,CAAC;AAG7D;;;GAGG;AAIH,MAAM,OAAO,UAAU;IAUrB;;;;OAIG;IACK,sBAAsB,CAC5B,OAA2B,EAC3B,qBAA6B;QAE7B,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;QACvD,IAAI,OAAO,IAAI,MAAM,EAAE,CAAC;YACtB,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;gBAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gBAChC,IACE,IAAI;oBACJ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OA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I,GAAG,EAAE,CAAC;YACjB,CAAC,EACD,EAAE,EAAE,IAAI,CAAC,EAAE,eACA,IAAI,CAAC,IAAI,mBACL,IAAI,CAAC,QAAQ,eACjB,IAAI,CAAC,IAAI,4BACI,kBAAkB,CAAC,MAAA,IAAI,CAAC,QAAQ,mCAAI,IAAI,CAAC,IAEhE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,eAAa,CACjC,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { cls, getBooleanAsString } from \"../../utils\";\nimport { DBInfotextProps, DBInfotextState } 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-infotext\",\n})\nexport class DBInfotext {\n private _ref!: HTMLSpanElement | any;\n @Prop() id: DBInfotextProps[\"id\"];\n @Prop({attribute: \"classname\"}) className: DBInfotextProps[\"className\"];\n @Prop() icon: DBInfotextProps[\"icon\"];\n @Prop() semantic: DBInfotextProps[\"semantic\"];\n @Prop() size: DBInfotextProps[\"size\"];\n @Prop() showIcon: DBInfotextProps[\"showIcon\"];\n @Prop() text: DBInfotextProps[\"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-infotext\");\n }\n\n render() {\n return (\n <span\n class={cls(\"db-infotext\", this.className)}\n ref={(el: any) => {\n this._ref = el;\n }}\n id={this.id}\n data-icon={this.icon}\n data-semantic={this.semantic}\n data-size={this.size}\n data-show-icon-leading={getBooleanAsString(this.showIcon ?? true)}\n >\n {this.text ? this.text : <slot></slot>}\n </span>\n );\n }\n}\n"]}
|
|
@@ -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
|
|
@@ -13,8 +13,8 @@ export class DBInput {
|
|
|
13
13
|
this._invalidMessageId = undefined;
|
|
14
14
|
this._invalidMessage = undefined;
|
|
15
15
|
this._dataListId = undefined;
|
|
16
|
-
this._descByIds =
|
|
17
|
-
this._value =
|
|
16
|
+
this._descByIds = undefined;
|
|
17
|
+
this._value = undefined;
|
|
18
18
|
this._voiceOverFallback = "";
|
|
19
19
|
}
|
|
20
20
|
hasValidState() {
|
|
@@ -48,7 +48,7 @@ export class DBInput {
|
|
|
48
48
|
this._descByIds = this._messageId;
|
|
49
49
|
}
|
|
50
50
|
else {
|
|
51
|
-
this._descByIds =
|
|
51
|
+
this._descByIds = undefined;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
handleInput(event) {
|
|
@@ -136,6 +136,7 @@ export class DBInput {
|
|
|
136
136
|
if (stringPropVisible(this.message, this.showMessage)) {
|
|
137
137
|
this._descByIds = messageId;
|
|
138
138
|
}
|
|
139
|
+
this.handleValidation();
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
watch1() {
|
|
@@ -162,11 +163,11 @@ export class DBInput {
|
|
|
162
163
|
this.watch2Fn();
|
|
163
164
|
}
|
|
164
165
|
render() {
|
|
165
|
-
var _a, _b, _c, _d, _e;
|
|
166
|
-
return (h("div", { key: '
|
|
166
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
167
|
+
return (h("div", { key: '14f5ef53f59b28fc9ec86af2c8b73163ee0711eb', 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: '742b1fff77d5984d9aaf7f9f7a8d3bec38cd0d7f', htmlFor: this._id }, (_c = this.label) !== null && _c !== void 0 ? _c : DEFAULT_LABEL), h("input", { key: '6bf7b4ef207482801e3664c1234d7033caf24b3f', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
|
|
167
168
|
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": (
|
|
169
|
+
}, 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") ||
|
|
170
|
+
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: '7148441abf8ae48961d6c33e9d3e1aafd80b712e' }), 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: '0138db84ad8a008ede50e58d69e72384e84b590b', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '8386b22d98880d515d0b310895c21f388ef172b1', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
170
171
|
}
|
|
171
172
|
static get is() { return "db-input"; }
|
|
172
173
|
static get properties() {
|
|
@@ -570,6 +571,31 @@ export class DBInput {
|
|
|
570
571
|
"setter": false,
|
|
571
572
|
"reflect": false
|
|
572
573
|
},
|
|
574
|
+
"showIconLeading": {
|
|
575
|
+
"type": "any",
|
|
576
|
+
"attribute": "show-icon-leading",
|
|
577
|
+
"mutable": false,
|
|
578
|
+
"complexType": {
|
|
579
|
+
"original": "DBInputProps[\"showIconLeading\"]",
|
|
580
|
+
"resolved": "boolean | string",
|
|
581
|
+
"references": {
|
|
582
|
+
"DBInputProps": {
|
|
583
|
+
"location": "import",
|
|
584
|
+
"path": "./model",
|
|
585
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
},
|
|
589
|
+
"required": false,
|
|
590
|
+
"optional": false,
|
|
591
|
+
"docs": {
|
|
592
|
+
"tags": [],
|
|
593
|
+
"text": ""
|
|
594
|
+
},
|
|
595
|
+
"getter": false,
|
|
596
|
+
"setter": false,
|
|
597
|
+
"reflect": false
|
|
598
|
+
},
|
|
573
599
|
"showIcon": {
|
|
574
600
|
"type": "any",
|
|
575
601
|
"attribute": "show-icon",
|
|
@@ -595,6 +621,31 @@ export class DBInput {
|
|
|
595
621
|
"setter": false,
|
|
596
622
|
"reflect": false
|
|
597
623
|
},
|
|
624
|
+
"iconLeading": {
|
|
625
|
+
"type": "string",
|
|
626
|
+
"attribute": "icon-leading",
|
|
627
|
+
"mutable": false,
|
|
628
|
+
"complexType": {
|
|
629
|
+
"original": "DBInputProps[\"iconLeading\"]",
|
|
630
|
+
"resolved": "BaseIconTypes | LooseAutocomplete",
|
|
631
|
+
"references": {
|
|
632
|
+
"DBInputProps": {
|
|
633
|
+
"location": "import",
|
|
634
|
+
"path": "./model",
|
|
635
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
},
|
|
639
|
+
"required": false,
|
|
640
|
+
"optional": false,
|
|
641
|
+
"docs": {
|
|
642
|
+
"tags": [],
|
|
643
|
+
"text": ""
|
|
644
|
+
},
|
|
645
|
+
"getter": false,
|
|
646
|
+
"setter": false,
|
|
647
|
+
"reflect": false
|
|
648
|
+
},
|
|
598
649
|
"icon": {
|
|
599
650
|
"type": "string",
|
|
600
651
|
"attribute": "icon",
|
|
@@ -620,12 +671,12 @@ export class DBInput {
|
|
|
620
671
|
"setter": false,
|
|
621
672
|
"reflect": false
|
|
622
673
|
},
|
|
623
|
-
"
|
|
674
|
+
"iconTrailing": {
|
|
624
675
|
"type": "string",
|
|
625
|
-
"attribute": "icon-
|
|
676
|
+
"attribute": "icon-trailing",
|
|
626
677
|
"mutable": false,
|
|
627
678
|
"complexType": {
|
|
628
|
-
"original": "DBInputProps[\"
|
|
679
|
+
"original": "DBInputProps[\"iconTrailing\"]",
|
|
629
680
|
"resolved": "BaseIconTypes | LooseAutocomplete",
|
|
630
681
|
"references": {
|
|
631
682
|
"DBInputProps": {
|
|
@@ -670,6 +721,31 @@ export class DBInput {
|
|
|
670
721
|
"setter": false,
|
|
671
722
|
"reflect": false
|
|
672
723
|
},
|
|
724
|
+
"showIconTrailing": {
|
|
725
|
+
"type": "any",
|
|
726
|
+
"attribute": "show-icon-trailing",
|
|
727
|
+
"mutable": false,
|
|
728
|
+
"complexType": {
|
|
729
|
+
"original": "DBInputProps[\"showIconTrailing\"]",
|
|
730
|
+
"resolved": "boolean | string",
|
|
731
|
+
"references": {
|
|
732
|
+
"DBInputProps": {
|
|
733
|
+
"location": "import",
|
|
734
|
+
"path": "./model",
|
|
735
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
"required": false,
|
|
740
|
+
"optional": false,
|
|
741
|
+
"docs": {
|
|
742
|
+
"tags": [],
|
|
743
|
+
"text": ""
|
|
744
|
+
},
|
|
745
|
+
"getter": false,
|
|
746
|
+
"setter": false,
|
|
747
|
+
"reflect": false
|
|
748
|
+
},
|
|
673
749
|
"label": {
|
|
674
750
|
"type": "string",
|
|
675
751
|
"attribute": "label",
|
|
@@ -770,6 +846,31 @@ export class DBInput {
|
|
|
770
846
|
"setter": false,
|
|
771
847
|
"reflect": false
|
|
772
848
|
},
|
|
849
|
+
"multiple": {
|
|
850
|
+
"type": "any",
|
|
851
|
+
"attribute": "multiple",
|
|
852
|
+
"mutable": false,
|
|
853
|
+
"complexType": {
|
|
854
|
+
"original": "DBInputProps[\"multiple\"]",
|
|
855
|
+
"resolved": "boolean | string",
|
|
856
|
+
"references": {
|
|
857
|
+
"DBInputProps": {
|
|
858
|
+
"location": "import",
|
|
859
|
+
"path": "./model",
|
|
860
|
+
"id": "src/components/input/model.ts::DBInputProps"
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
"required": false,
|
|
865
|
+
"optional": false,
|
|
866
|
+
"docs": {
|
|
867
|
+
"tags": [],
|
|
868
|
+
"text": ""
|
|
869
|
+
},
|
|
870
|
+
"getter": false,
|
|
871
|
+
"setter": false,
|
|
872
|
+
"reflect": false
|
|
873
|
+
},
|
|
773
874
|
"placeholder": {
|
|
774
875
|
"type": "string",
|
|
775
876
|
"attribute": "placeholder",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../src/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B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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,SAAS,CAAC;QACvB,WAAM,GAAG,SAAS,CAAC;QACnB,uBAAkB,GAAG,EAAE,CAAC;KAkQlC;IAhQC,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,CAAC,IAAI,0CAAE,QAAQ,CAAC,KAAK,CAAA,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAChE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,iBAAiB,CAAC;YACzC,IAAI,CAAC,eAAe;gBAClB,IAAI,CAAC,cAAc;qBACnB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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 = undefined;\n @State() _value = undefined;\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 = undefined;\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 this.handleValidation();\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"]}
|