@infineon/infineon-design-system-stencil 30.1.1--canary.1640.e4770f238d16196b9059daf4898d2d6ef7cdcbdd.0 → 30.2.0--canary.1641.2fa3dc92b1652a9ad0c0488d80e396bc04aab9d2.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/ifx-accordion_2.cjs.entry.js +2 -2
- package/dist/cjs/ifx-accordion_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-faq.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +2 -2
- package/dist/cjs/ifx-filter-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-search.cjs.entry.js +1 -1
- package/dist/cjs/ifx-filter-type-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
- package/dist/cjs/ifx-modal.cjs.entry.js +8 -8
- package/dist/cjs/ifx-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js +9 -9
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-search-bar.cjs.entry.js +5 -5
- package/dist/cjs/ifx-search-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-select.cjs.entry.js +2 -2
- package/dist/cjs/ifx-select.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js +9 -9
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ifx-slider.cjs.entry.js +2 -2
- package/dist/cjs/ifx-spinner.cjs.entry.js +2 -2
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js +4 -4
- package/dist/cjs/ifx-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ifx-switch.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tab.cjs.entry.js +1 -1
- package/dist/cjs/ifx-table.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
- package/dist/cjs/ifx-textarea.cjs.entry.js +2 -2
- package/dist/cjs/ifx-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/infineon-design-system-stencil.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/accordion/accordion.stories.js +3 -79
- package/dist/collection/components/accordion/accordion.stories.js.map +1 -1
- package/dist/collection/components/accordion/accordionItem.js +4 -4
- package/dist/collection/components/accordion/accordionItem.js.map +1 -1
- package/dist/collection/components/alert/alert.stories.js +12 -45
- package/dist/collection/components/alert/alert.stories.js.map +1 -1
- package/dist/collection/components/badge/badge.stories.js +7 -28
- package/dist/collection/components/badge/badge.stories.js.map +1 -1
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js +7 -66
- package/dist/collection/components/breadcrumb/breadcrumb.stories.js.map +1 -1
- package/dist/collection/components/button/button.stories.js +9 -104
- package/dist/collection/components/button/button.stories.js.map +1 -1
- package/dist/collection/components/card/card.stories.js +2 -85
- package/dist/collection/components/card/card.stories.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +13 -74
- package/dist/collection/components/checkbox/checkbox.stories.js.map +1 -1
- package/dist/collection/components/content-switcher/content-switcher.stories.js +3 -48
- package/dist/collection/components/content-switcher/content-switcher.stories.js.map +1 -1
- package/dist/collection/components/date-picker/date-picker.stories.js +6 -73
- package/dist/collection/components/date-picker/date-picker.stories.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown.stories.js +64 -161
- package/dist/collection/components/dropdown/dropdown.stories.js.map +1 -1
- package/dist/collection/components/footer/footer.stories.js +1 -7
- package/dist/collection/components/footer/footer.stories.js.map +1 -1
- package/dist/collection/components/icon/infineonIconStencil.stories.js +2 -7
- package/dist/collection/components/icon/infineonIconStencil.stories.js.map +1 -1
- package/dist/collection/components/icon-button/icon-button.stories.js +5 -61
- package/dist/collection/components/icon-button/icon-button.stories.js.map +1 -1
- package/dist/collection/components/link/link.stories.js +4 -56
- package/dist/collection/components/link/link.stories.js.map +1 -1
- package/dist/collection/components/modal/modal.js +10 -10
- package/dist/collection/components/modal/modal.js.map +1 -1
- package/dist/collection/components/modal/modal.stories.js +19 -96
- package/dist/collection/components/modal/modal.stories.js.map +1 -1
- package/dist/collection/components/navigation/navbar/navbar.stories.js +12 -203
- package/dist/collection/components/navigation/navbar/navbar.stories.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar-item.js +11 -11
- package/dist/collection/components/navigation/sidebar/sidebar-item.js.map +1 -1
- package/dist/collection/components/navigation/sidebar/sidebar.stories.js +17 -110
- package/dist/collection/components/navigation/sidebar/sidebar.stories.js.map +1 -1
- package/dist/collection/components/notification/notification.stories.js +4 -51
- package/dist/collection/components/notification/notification.stories.js.map +1 -1
- package/dist/collection/components/number-indicator/number-indicator.stories.js +0 -19
- package/dist/collection/components/number-indicator/number-indicator.stories.js.map +1 -1
- package/dist/collection/components/pagination/pagination.stories.js +3 -30
- package/dist/collection/components/pagination/pagination.stories.js.map +1 -1
- package/dist/collection/components/progress-bar/progress-bar.stories.js +8 -31
- package/dist/collection/components/progress-bar/progress-bar.stories.js.map +1 -1
- package/dist/collection/components/radio-button/radio-button.stories.js +13 -66
- package/dist/collection/components/radio-button/radio-button.stories.js.map +1 -1
- package/dist/collection/components/search-bar/search-bar.js +6 -6
- package/dist/collection/components/search-bar/search-bar.js.map +1 -1
- package/dist/collection/components/search-bar/search-bar.stories.js +9 -58
- package/dist/collection/components/search-bar/search-bar.stories.js.map +1 -1
- package/dist/collection/components/search-field/search-field.stories.js +7 -43
- package/dist/collection/components/search-field/search-field.stories.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.js +6 -6
- package/dist/collection/components/select/multi-select/multiselect.js.map +1 -1
- package/dist/collection/components/select/multi-select/multiselect.stories.js +5 -131
- package/dist/collection/components/select/multi-select/multiselect.stories.js.map +1 -1
- package/dist/collection/components/select/single-select/select.css +16 -0
- package/dist/collection/components/select/single-select/select.js +1 -1
- package/dist/collection/components/select/single-select/select.js.map +1 -1
- package/dist/collection/components/select/single-select/select.stories.js +26 -83
- package/dist/collection/components/select/single-select/select.stories.js.map +1 -1
- package/dist/collection/components/slider/slider.js +2 -2
- package/dist/collection/components/slider/slider.stories.js +13 -97
- package/dist/collection/components/slider/slider.stories.js.map +1 -1
- package/dist/collection/components/spinner/spinner.js +2 -2
- package/dist/collection/components/spinner/spinner.stories.js +2 -34
- package/dist/collection/components/spinner/spinner.stories.js.map +1 -1
- package/dist/collection/components/status/status.js +1 -1
- package/dist/collection/components/status/status.stories.js +1 -24
- package/dist/collection/components/status/status.stories.js.map +1 -1
- package/dist/collection/components/stepper/step/step.js +4 -4
- package/dist/collection/components/stepper/stepper.js +2 -2
- package/dist/collection/components/stepper/stepper.stories.js +16 -33
- package/dist/collection/components/stepper/stepper.stories.js.map +1 -1
- package/dist/collection/components/switch/switch.js +1 -1
- package/dist/collection/components/switch/switch.stories.js +4 -54
- package/dist/collection/components/switch/switch.stories.js.map +1 -1
- package/dist/collection/components/table-advanced-version/filter-bar/filter-bar.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-accordion/filter-accordion.js +2 -2
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-search/filter-search.js +1 -1
- package/dist/collection/components/table-advanced-version/filter-type-group/filter-type-group.js +1 -1
- package/dist/collection/components/table-advanced-version/list/list-entry/list-entry.js +1 -1
- package/dist/collection/components/table-advanced-version/table.js +2 -2
- package/dist/collection/components/table-advanced-version/table.stories.js +13 -235
- package/dist/collection/components/table-advanced-version/table.stories.js.map +1 -1
- package/dist/collection/components/table-basic-version/table.js +1 -1
- package/dist/collection/components/table-basic-version/table.stories.js +1 -17
- package/dist/collection/components/table-basic-version/table.stories.js.map +1 -1
- package/dist/collection/components/tabs/tab.js +1 -1
- package/dist/collection/components/tabs/tabs.js +2 -2
- package/dist/collection/components/tabs/tabs.stories.js +23 -89
- package/dist/collection/components/tabs/tabs.stories.js.map +1 -1
- package/dist/collection/components/tag/tag.js +1 -1
- package/dist/collection/components/tag/tag.stories.js +0 -18
- package/dist/collection/components/tag/tag.stories.js.map +1 -1
- package/dist/collection/components/text-field/text-field.js +4 -4
- package/dist/collection/components/text-field/text-field.stories.js +13 -104
- package/dist/collection/components/text-field/text-field.stories.js.map +1 -1
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +4 -4
- package/dist/collection/components/tooltip/tooltip.stories.js +4 -48
- package/dist/collection/components/tooltip/tooltip.stories.js.map +1 -1
- package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
- package/dist/components/ifx-accordion-item.js +1 -1
- package/dist/components/ifx-basic-table.js +1 -1
- package/dist/components/ifx-faq.js +2 -2
- package/dist/components/ifx-filter-accordion.js +2 -2
- package/dist/components/ifx-filter-bar.js +1 -1
- package/dist/components/ifx-filter-search.js +1 -1
- package/dist/components/ifx-filter-type-group.js +1 -1
- package/dist/components/ifx-list-entry.js +1 -1
- package/dist/components/ifx-modal.js +8 -8
- package/dist/components/ifx-modal.js.map +1 -1
- package/dist/components/ifx-multiselect.js +1 -1
- package/dist/components/ifx-pagination.js +1 -1
- package/dist/components/ifx-search-bar.js +5 -5
- package/dist/components/ifx-search-bar.js.map +1 -1
- package/dist/components/ifx-select.js +1 -1
- package/dist/components/ifx-set-filter.js +3 -3
- package/dist/components/ifx-sidebar-item.js +11 -11
- package/dist/components/ifx-sidebar-item.js.map +1 -1
- package/dist/components/ifx-slider.js +2 -2
- package/dist/components/ifx-spinner.js +2 -2
- package/dist/components/ifx-status.js +1 -1
- package/dist/components/ifx-step.js +4 -4
- package/dist/components/ifx-stepper.js +2 -2
- package/dist/components/ifx-switch.js +1 -1
- package/dist/components/ifx-tab.js +1 -1
- package/dist/components/ifx-table.js +4 -4
- package/dist/components/ifx-tabs.js +2 -2
- package/dist/components/ifx-tag.js +1 -1
- package/dist/components/ifx-text-field.js +1 -1
- package/dist/components/ifx-textarea.js +2 -2
- package/dist/components/ifx-tooltip.js +4 -4
- package/dist/components/{p-78f3e867.js → p-0a68c458.js} +4 -4
- package/dist/components/{p-78f3e867.js.map → p-0a68c458.js.map} +1 -1
- package/dist/components/{p-81357e99.js → p-652fc14d.js} +2 -2
- package/dist/components/{p-81357e99.js.map → p-652fc14d.js.map} +1 -1
- package/dist/components/{p-b9024e1a.js → p-7826add7.js} +3 -3
- package/dist/components/p-7826add7.js.map +1 -0
- package/dist/components/{p-bac84326.js → p-96fbc3db.js} +6 -6
- package/dist/components/p-96fbc3db.js.map +1 -0
- package/dist/components/{p-d5a199fb.js → p-a6736b21.js} +5 -5
- package/dist/components/{p-d5a199fb.js.map → p-a6736b21.js.map} +1 -1
- package/dist/esm/ifx-accordion_2.entry.js +2 -2
- package/dist/esm/ifx-accordion_2.entry.js.map +1 -1
- package/dist/esm/ifx-basic-table.entry.js +1 -1
- package/dist/esm/ifx-faq.entry.js +1 -1
- package/dist/esm/ifx-filter-accordion.entry.js +2 -2
- package/dist/esm/ifx-filter-bar.entry.js +1 -1
- package/dist/esm/ifx-filter-search.entry.js +1 -1
- package/dist/esm/ifx-filter-type-group.entry.js +1 -1
- package/dist/esm/ifx-list-entry.entry.js +1 -1
- package/dist/esm/ifx-modal.entry.js +8 -8
- package/dist/esm/ifx-modal.entry.js.map +1 -1
- package/dist/esm/ifx-multiselect_2.entry.js +9 -9
- package/dist/esm/ifx-multiselect_2.entry.js.map +1 -1
- package/dist/esm/ifx-search-bar.entry.js +5 -5
- package/dist/esm/ifx-search-bar.entry.js.map +1 -1
- package/dist/esm/ifx-select.entry.js +2 -2
- package/dist/esm/ifx-select.entry.js.map +1 -1
- package/dist/esm/ifx-sidebar-item.entry.js +9 -9
- package/dist/esm/ifx-sidebar-item.entry.js.map +1 -1
- package/dist/esm/ifx-slider.entry.js +2 -2
- package/dist/esm/ifx-spinner.entry.js +2 -2
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-step.entry.js +4 -4
- package/dist/esm/ifx-stepper.entry.js +2 -2
- package/dist/esm/ifx-switch.entry.js +1 -1
- package/dist/esm/ifx-tab.entry.js +1 -1
- package/dist/esm/ifx-table.entry.js +2 -2
- package/dist/esm/ifx-tabs.entry.js +2 -2
- package/dist/esm/ifx-tag.entry.js +1 -1
- package/dist/esm/ifx-textarea.entry.js +2 -2
- package/dist/esm/ifx-tooltip.entry.js +4 -4
- package/dist/esm/infineon-design-system-stencil.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js +1 -1
- package/dist/infineon-design-system-stencil/infineon-design-system-stencil.esm.js.map +1 -1
- package/dist/infineon-design-system-stencil/{p-37ecac74.entry.js → p-190ebb90.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a10f9b3c.entry.js → p-2e2ab749.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0ddf85fc.entry.js → p-32c617c6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2e8c0115.entry.js → p-42a6429b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b30b66e5.entry.js → p-44e64146.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-50e122c4.entry.js → p-462946bf.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-8b089cd1.entry.js → p-4a6e75a4.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-598324f5.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-31e9d4f8.entry.js.map → p-598324f5.entry.js.map} +1 -1
- package/dist/infineon-design-system-stencil/p-6902ee06.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-49872432.entry.js → p-6e2eec34.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-7131a2b3.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-7131a2b3.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-79b4d359.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-79b4d359.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-7f510d1c.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-7378190d.entry.js → p-874f2bf6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-39697853.entry.js → p-88fb3c49.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-30640970.entry.js → p-90687777.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-bc40ad21.entry.js → p-a1c9b6fc.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-25bf54c9.entry.js → p-a24039e5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-a29b6247.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-a29b6247.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-c428a56a.entry.js → p-b8f31dc3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-b8f31dc3.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-02be14a9.entry.js → p-c68be6d9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-cdad5d2c.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-cdad5d2c.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-5edfe317.entry.js → p-db956276.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c2e6cbdb.entry.js → p-e954b757.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b010bfcb.entry.js → p-ec0c6eb5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b010bfcb.entry.js.map → p-ec0c6eb5.entry.js.map} +1 -1
- package/dist/types/components/accordion/accordion.stories.d.ts +1 -67
- package/dist/types/components/accordion/accordionItem.d.ts +1 -1
- package/dist/types/components/alert/alert.stories.d.ts +11 -38
- package/dist/types/components/badge/badge.stories.d.ts +3 -23
- package/dist/types/components/breadcrumb/breadcrumb.stories.d.ts +1 -66
- package/dist/types/components/button/button.stories.d.ts +16 -95
- package/dist/types/components/card/card.stories.d.ts +1 -95
- package/dist/types/components/checkbox/checkbox.stories.d.ts +10 -68
- package/dist/types/components/content-switcher/content-switcher.stories.d.ts +0 -50
- package/dist/types/components/date-picker/date-picker.stories.d.ts +2 -67
- package/dist/types/components/dropdown/dropdown.stories.d.ts +27 -111
- package/dist/types/components/footer/footer.stories.d.ts +0 -4
- package/dist/types/components/icon/infineonIconStencil.stories.d.ts +0 -5
- package/dist/types/components/icon-button/icon-button.stories.d.ts +8 -56
- package/dist/types/components/link/link.stories.d.ts +6 -52
- package/dist/types/components/modal/modal.d.ts +2 -2
- package/dist/types/components/modal/modal.stories.d.ts +3 -77
- package/dist/types/components/navigation/navbar/navbar.stories.d.ts +6 -243
- package/dist/types/components/navigation/sidebar/sidebar-item.d.ts +2 -2
- package/dist/types/components/navigation/sidebar/sidebar.stories.d.ts +7 -90
- package/dist/types/components/notification/notification.stories.d.ts +0 -44
- package/dist/types/components/number-indicator/number-indicator.stories.d.ts +0 -19
- package/dist/types/components/pagination/pagination.stories.d.ts +0 -27
- package/dist/types/components/progress-bar/progress-bar.stories.d.ts +4 -25
- package/dist/types/components/radio-button/radio-button.stories.d.ts +8 -59
- package/dist/types/components/search-bar/search-bar.d.ts +1 -1
- package/dist/types/components/search-bar/search-bar.stories.d.ts +3 -60
- package/dist/types/components/search-field/search-field.stories.d.ts +6 -36
- package/dist/types/components/select/multi-select/multiselect.d.ts +1 -1
- package/dist/types/components/select/multi-select/multiselect.stories.d.ts +0 -125
- package/dist/types/components/select/single-select/select.stories.d.ts +24 -67
- package/dist/types/components/slider/slider.stories.d.ts +0 -110
- package/dist/types/components/spinner/spinner.stories.d.ts +0 -32
- package/dist/types/components/status/status.stories.d.ts +2 -23
- package/dist/types/components/stepper/stepper.stories.d.ts +4 -21
- package/dist/types/components/switch/switch.stories.d.ts +1 -50
- package/dist/types/components/table-advanced-version/table.stories.d.ts +2 -243
- package/dist/types/components/table-basic-version/table.stories.d.ts +1 -19
- package/dist/types/components/tabs/tabs.stories.d.ts +7 -77
- package/dist/types/components/tag/tag.stories.d.ts +0 -20
- package/dist/types/components/text-field/text-field.stories.d.ts +11 -96
- package/dist/types/components/tooltip/tooltip.stories.d.ts +6 -41
- package/dist/types/components.d.ts +10 -10
- package/package.json +1 -1
- package/dist/components/p-b9024e1a.js.map +0 -1
- package/dist/components/p-bac84326.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-16f9a47c.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-227d384c.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-227d384c.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-2849823e.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-2849823e.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-31e9d4f8.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-3ca407c8.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-3ca407c8.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-b1688ca4.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-b1688ca4.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-c428a56a.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-ea74d7ab.entry.js +0 -2
- /package/dist/infineon-design-system-stencil/{p-37ecac74.entry.js.map → p-190ebb90.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a10f9b3c.entry.js.map → p-2e2ab749.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0ddf85fc.entry.js.map → p-32c617c6.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2e8c0115.entry.js.map → p-42a6429b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b30b66e5.entry.js.map → p-44e64146.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-50e122c4.entry.js.map → p-462946bf.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8b089cd1.entry.js.map → p-4a6e75a4.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-16f9a47c.entry.js.map → p-6902ee06.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-49872432.entry.js.map → p-6e2eec34.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ea74d7ab.entry.js.map → p-7f510d1c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7378190d.entry.js.map → p-874f2bf6.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-39697853.entry.js.map → p-88fb3c49.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-30640970.entry.js.map → p-90687777.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-bc40ad21.entry.js.map → p-a1c9b6fc.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-25bf54c9.entry.js.map → p-a24039e5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-02be14a9.entry.js.map → p-c68be6d9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5edfe317.entry.js.map → p-db956276.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c2e6cbdb.entry.js.map → p-e954b757.entry.js.map} +0 -0
@@ -6,143 +6,69 @@ export default {
|
|
6
6
|
// tags: ['autodocs'],
|
7
7
|
args: {
|
8
8
|
opened: false,
|
9
|
-
cancelButtonLabel: 'Cancel',
|
10
|
-
okButtonLabel: 'OK',
|
11
9
|
},
|
12
10
|
argTypes: {
|
13
11
|
caption: {
|
14
12
|
control: 'text',
|
15
|
-
description: 'Title for the modal
|
16
|
-
table: {
|
17
|
-
category: 'ifx-modal props',
|
18
|
-
},
|
13
|
+
description: 'Title for the modal',
|
19
14
|
},
|
20
15
|
opened: {
|
21
16
|
control: {
|
22
17
|
disable: true,
|
23
18
|
},
|
24
|
-
description: 'Default state of the modal.',
|
25
19
|
table: {
|
26
|
-
category: 'ifx-modal props',
|
27
|
-
defaultValue: {
|
28
|
-
summary: 'false',
|
29
|
-
},
|
30
20
|
type: {
|
31
21
|
summary: 'Example (in VanillaJs)',
|
32
22
|
detail: "const modal = document.getElementById('modal'); \nconst openButton = document.getElementById('open'); \n//add DOM event listeners (e.g. click and/or keypress)\n\nfunction openModal() { \nmodal.opened=true;\n\nfunction closeModal() { \nmodal.opened = false; \n}",
|
33
23
|
},
|
34
24
|
},
|
25
|
+
description: 'Defaults to false - Can be set by referring to the component and setting it to false/true',
|
35
26
|
},
|
36
27
|
closeOnOverlayClick: {
|
37
28
|
control: 'boolean',
|
38
|
-
description: 'Close the modal when clicking outside the window
|
39
|
-
table: {
|
40
|
-
category: 'ifx-modal props',
|
41
|
-
defaultValue: {
|
42
|
-
summary: 'false',
|
43
|
-
}
|
44
|
-
}
|
29
|
+
description: 'Close the modal when clicking outside the window',
|
45
30
|
},
|
46
31
|
showCloseButton: {
|
47
32
|
control: 'boolean',
|
48
|
-
description: "Show or hide close button
|
49
|
-
table: {
|
50
|
-
category: 'ifx-modal props',
|
51
|
-
defaultValue: {
|
52
|
-
summary: 'true',
|
53
|
-
},
|
54
|
-
},
|
33
|
+
description: "Show or hide close button 'x'",
|
55
34
|
},
|
56
35
|
alertIcon: {
|
57
36
|
options: Object.keys(icons),
|
58
37
|
control: { type: 'select' },
|
59
|
-
description: '
|
60
|
-
table: {
|
61
|
-
category: 'ifx-modal props',
|
62
|
-
type: {
|
63
|
-
summary: 'string',
|
64
|
-
},
|
65
|
-
},
|
38
|
+
description: 'When specified together with alertIcon then an border to the right is shown',
|
66
39
|
},
|
67
40
|
size: {
|
68
41
|
options: ['s', 'm', 'l'],
|
69
42
|
control: { type: 'radio' },
|
70
|
-
description: 'Usable only when screen width is more than 1024px
|
71
|
-
table: {
|
72
|
-
category: 'ifx-modal props',
|
73
|
-
defaultValue: {
|
74
|
-
summary: 's',
|
75
|
-
},
|
76
|
-
type: {
|
77
|
-
summary: 's | m | l',
|
78
|
-
}
|
79
|
-
}
|
43
|
+
description: 'Usable only when screen width is more than 1024px'
|
80
44
|
},
|
81
45
|
variant: {
|
82
46
|
options: ['default', 'alert-brand', 'alert-danger'],
|
83
47
|
control: { type: 'radio' },
|
84
|
-
description: 'Variant of the modal.',
|
85
|
-
table: {
|
86
|
-
category: 'ifx-modal props',
|
87
|
-
defaultValue: {
|
88
|
-
summary: 'default',
|
89
|
-
},
|
90
|
-
type: {
|
91
|
-
summary: 'default | alert-brand | alert-danger',
|
92
|
-
},
|
93
|
-
},
|
94
|
-
},
|
95
|
-
cancelButtonLabel: {
|
96
|
-
control: 'text',
|
97
|
-
description: 'Label for the cancel button.',
|
98
|
-
table: {
|
99
|
-
category: 'ifx-modal props',
|
100
|
-
defaultValue: {
|
101
|
-
summary: 'Cancel',
|
102
|
-
},
|
103
|
-
type: {
|
104
|
-
summary: 'string',
|
105
|
-
},
|
106
|
-
},
|
107
|
-
},
|
108
|
-
okButtonLabel: {
|
109
|
-
control: 'text',
|
110
|
-
description: 'Label for the OK button.',
|
111
|
-
table: {
|
112
|
-
category: 'ifx-modal props',
|
113
|
-
defaultValue: {
|
114
|
-
summary: 'OK',
|
115
|
-
},
|
116
|
-
type: {
|
117
|
-
summary: 'string',
|
118
|
-
},
|
119
|
-
},
|
120
48
|
},
|
121
|
-
|
122
|
-
action: '
|
123
|
-
description: 'Custom event emitted when modal opens
|
49
|
+
ifxModalOpen: {
|
50
|
+
action: 'ifxModalOpen',
|
51
|
+
description: 'Custom event emitted when modal opens',
|
124
52
|
table: {
|
125
|
-
category: 'custom events',
|
126
53
|
type: {
|
127
54
|
summary: 'Framework integration',
|
128
|
-
detail: 'React:
|
55
|
+
detail: 'React: onIfxModalOpen={handleChange}\nVue:@ifxModalOpen="handleChange"\nAngular:(ifxModalOpen)="handleChange()"\nVanillaJs:.addEventListener("ifxModalOpen", (event) => {//handle change});',
|
129
56
|
},
|
130
57
|
},
|
131
58
|
},
|
132
|
-
|
133
|
-
action: '
|
134
|
-
description: 'Custom event emitted when modal closes
|
59
|
+
ifxModalClose: {
|
60
|
+
action: 'ifxModalClose',
|
61
|
+
description: 'Custom event emitted when modal closes',
|
135
62
|
table: {
|
136
|
-
category: 'custom events',
|
137
63
|
type: {
|
138
64
|
summary: 'Framework integration',
|
139
|
-
detail: 'React:
|
65
|
+
detail: 'React: onIfxModalClose={handleChange}\nVue:@ifxModalClose="handleChange"\nAngular:(ifxModalClose)="handleChange()"\nVanillaJs:.addEventListener("ifxModalClose", (event) => {//handle change});',
|
140
66
|
},
|
141
67
|
},
|
142
68
|
},
|
143
69
|
},
|
144
70
|
};
|
145
|
-
const Template = ({ caption, showCloseButton, closeOnOverlayClick, variant, size, alertIcon
|
71
|
+
const Template = ({ caption, showCloseButton, closeOnOverlayClick, variant, size, alertIcon }) => {
|
146
72
|
const modal = document.createElement('ifx-modal');
|
147
73
|
modal.setAttribute('caption', caption);
|
148
74
|
modal.setAttribute('variant', variant);
|
@@ -152,8 +78,8 @@ const Template = ({ caption, showCloseButton, closeOnOverlayClick, variant, size
|
|
152
78
|
modal.setAttribute('close-on-overlay-click', closeOnOverlayClick);
|
153
79
|
modal.setAttribute('show-close-button', showCloseButton);
|
154
80
|
modal.setAttribute('size', size);
|
155
|
-
modal.addEventListener('
|
156
|
-
modal.addEventListener('
|
81
|
+
modal.addEventListener('ifxModalOpen', action('ifxModalOpen'));
|
82
|
+
modal.addEventListener('ifxModalClose', action('ifxModalClose'));
|
157
83
|
const content = document.createElement('div');
|
158
84
|
content.setAttribute('slot', 'content');
|
159
85
|
content.innerHTML = `
|
@@ -164,12 +90,12 @@ const Template = ({ caption, showCloseButton, closeOnOverlayClick, variant, size
|
|
164
90
|
buttons.setAttribute('slot', 'buttons');
|
165
91
|
const cancelButton = document.createElement('ifx-button');
|
166
92
|
cancelButton.setAttribute('variant', 'secondary');
|
167
|
-
cancelButton.textContent =
|
93
|
+
cancelButton.textContent = 'Button 1';
|
168
94
|
cancelButton.addEventListener('click', () => {
|
169
95
|
console.log('Button 1 clicked');
|
170
96
|
});
|
171
97
|
const primaryButton = document.createElement('ifx-button');
|
172
|
-
primaryButton.textContent =
|
98
|
+
primaryButton.textContent = 'Button 2';
|
173
99
|
primaryButton.addEventListener('click', () => {
|
174
100
|
console.log('Button 2 clicked');
|
175
101
|
});
|
@@ -207,8 +133,5 @@ Alert.args = {
|
|
207
133
|
alertIcon: 'arrowdoen24',
|
208
134
|
size: 's',
|
209
135
|
variant: 'alert-brand',
|
210
|
-
cancelButtonLabel: 'Cancel',
|
211
|
-
okButtonLabel: 'OK',
|
212
|
-
showCloseButton: false,
|
213
136
|
};
|
214
137
|
//# sourceMappingURL=modal.stories.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal.stories.js","sourceRoot":"","sources":["../../../src/components/modal/modal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,sBAAsB;IAEtB,IAAI,EAAE;QACJ,MAAM,EAAE,KAAK;QACb,iBAAiB,EAAE,QAAQ;QAC3B,aAAa,EAAE,IAAI;KACpB;IACD,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,MAAM;YACf,WAAW,EAAE,sBAAsB;YACnC,KAAK,EAAE;gBACL,QAAQ,EAAE,iBAAiB;aAC5B;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,OAAO,EAAE,IAAI;aACd;YACD,WAAW,EAAE,6BAA6B;YAC1C,KAAK,EAAE;gBACL,QAAQ,EAAE,iBAAiB;gBAC3B,YAAY,EAAE;oBACZ,OAAO,EAAE,OAAO;iBACjB;gBACD,IAAI,EAAE;oBACJ,OAAO,EAAE,wBAAwB;oBACjC,MAAM,EACJ,sQAAsQ;iBACzQ;aACF;SACF;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AAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,OAAO,EAAE,yBAAyB;IAClC,mBAAmB,EAAE,IAAI;IACzB,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,aAAa;IACtB,iBAAiB,EAAE,QAAQ;IAC3B,aAAa,EAAE,IAAI;IACnB,eAAe,EAAE,KAAK;CACvB,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Modal',\n component: 'ifx-modal',\n // tags: ['autodocs'],\n\n args: {\n opened: false,\n cancelButtonLabel: 'Cancel',\n okButtonLabel: 'OK',\n },\n argTypes: {\n caption: {\n control: 'text',\n description: 'Title for the modal.',\n table: {\n category: 'ifx-modal props',\n },\n },\n opened: {\n control: {\n disable: true,\n },\n description: 'Default state of the modal.',\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 'false',\n },\n type: {\n summary: 'Example (in VanillaJs)',\n detail:\n \"const modal = document.getElementById('modal'); \\nconst openButton = document.getElementById('open'); \\n//add DOM event listeners (e.g. click and/or keypress)\\n\\nfunction openModal() { \\nmodal.opened=true;\\n\\nfunction closeModal() { \\nmodal.opened = false; \\n}\",\n },\n },\n },\n closeOnOverlayClick: {\n control: 'boolean',\n description: 'Close the modal when clicking outside the window.',\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 'false',\n }\n }\n },\n showCloseButton: {\n control: 'boolean',\n description: \"Show or hide close button in the modal's header.\",\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 'true',\n },\n },\n },\n alertIcon: {\n options: Object.keys(icons),\n control: { type: 'select' },\n description: 'Icon to be displayed in the alert modal.',\n table: {\n category: 'ifx-modal props',\n type: {\n summary: 'string',\n },\n },\n },\n size: {\n options: ['s', 'm', 'l'],\n control: { type: 'radio' },\n description: 'Usable only when screen width is more than 1024px.',\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 's',\n },\n type: {\n summary: 's | m | l',\n }\n }\n },\n variant: {\n options: ['default', 'alert-brand', 'alert-danger'],\n control: { type: 'radio' },\n description: 'Variant of the modal.',\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 'default',\n },\n type: {\n summary: 'default | alert-brand | alert-danger',\n },\n },\n },\n cancelButtonLabel: {\n control: 'text',\n description: 'Label for the cancel button.',\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 'Cancel',\n },\n type: {\n summary: 'string',\n },\n },\n },\n okButtonLabel: {\n control: 'text',\n description: 'Label for the OK button.',\n table: {\n category: 'ifx-modal props',\n defaultValue: {\n summary: 'OK',\n },\n type: {\n summary: 'string',\n },\n },\n },\n\n ifxOpen: {\n action: 'ifxOpen',\n description: 'Custom event emitted when modal opens.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxOpen={handleChange}\\nVue:@ifxOpen=\"handleChange\"\\nAngular:(ifxOpen)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxOpen\", (event) => {//handle change});',\n },\n },\n },\n ifxClose: {\n action: 'ifxClose',\n description: 'Custom event emitted when modal closes.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxClose={handleChange}\\nVue:@ifxClose=\"handleChange\"\\nAngular:(ifxClose)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxClose\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst Template = ({ caption, showCloseButton, closeOnOverlayClick, variant, size, alertIcon, cancelButtonLabel, okButtonLabel }) => {\n const modal = document.createElement('ifx-modal');\n modal.setAttribute('caption', caption);\n modal.setAttribute('variant', variant);\n\n if (alertIcon) {\n modal.setAttribute('alert-icon', alertIcon);\n }\n modal.setAttribute('close-on-overlay-click', closeOnOverlayClick);\n modal.setAttribute('show-close-button', showCloseButton);\n modal.setAttribute('size', size)\n\n modal.addEventListener('ifxOpen', action('ifxOpen'));\n modal.addEventListener('ifxClose', action('ifxClose'));\n\n const content = document.createElement('div');\n content.setAttribute('slot', 'content');\n content.innerHTML = `\n <span>Modal content</span>\n `;\n modal.appendChild(content);\n const buttons = document.createElement('div');\n buttons.setAttribute('slot', 'buttons');\n\n const cancelButton = document.createElement('ifx-button');\n cancelButton.setAttribute('variant', 'secondary');\n cancelButton.textContent = cancelButtonLabel;\n cancelButton.addEventListener('click', () => {\n console.log('Button 1 clicked');\n });\n\n const primaryButton = document.createElement('ifx-button');\n primaryButton.textContent = okButtonLabel;\n primaryButton.addEventListener('click', () => {\n console.log('Button 2 clicked');\n });\n\n buttons.appendChild(cancelButton);\n buttons.appendChild(primaryButton);\n modal.appendChild(buttons);\n\n const openButton = document.createElement('ifx-button');\n openButton.id = 'open';\n openButton.textContent = 'Open Modal';\n openButton.addEventListener('click', () => {\n modal.opened = true;\n });\n openButton.addEventListener('keydown', event => {\n if (event.key === 'Enter') {\n modal.opened = true;\n }\n });\n\n const storyElement = document.createElement('div');\n storyElement.appendChild(modal);\n storyElement.appendChild(openButton);\n\n return storyElement;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n caption: 'Modal Title',\n showCloseButton: true,\n closeOnOverlayClick: false,\n size: 's',\n variant: 'default',\n};\n\nexport const Alert = Template.bind({});\nAlert.args = {\n caption: 'Alert-Brand Modal Title',\n closeOnOverlayClick: true,\n alertIcon: 'arrowdoen24',\n size: 's',\n variant: 'alert-brand',\n cancelButtonLabel: 'Cancel',\n okButtonLabel: 'OK',\n showCloseButton: false,\n};\n"]}
|
1
|
+
{"version":3,"file":"modal.stories.js","sourceRoot":"","sources":["../../../src/components/modal/modal.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,WAAW;IACtB,sBAAsB;IAEtB,IAAI,EAA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CAAC,UAAU,CAAC,CAAC;IAErC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACzC,OAAO,CAAC,IAAI,GAAG;IACb,OAAO,EAAE,aAAa;IACtB,eAAe,EAAE,IAAI;IACrB,mBAAmB,EAAE,KAAK;IAC1B,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACvC,KAAK,CAAC,IAAI,GAAG;IACX,OAAO,EAAE,yBAAyB;IAClC,mBAAmB,EAAE,IAAI;IACzB,SAAS,EAAE,aAAa;IACxB,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,aAAa;CACvB,CAAC","sourcesContent":["import { action } from '@storybook/addon-actions';\nimport { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Modal',\n component: 'ifx-modal',\n // tags: ['autodocs'],\n\n args: {\n opened: false,\n },\n argTypes: {\n caption: {\n control: 'text',\n description: 'Title for the modal',\n },\n opened: {\n control: {\n disable: true,\n },\n table: {\n type: {\n summary: 'Example (in VanillaJs)',\n detail:\n \"const modal = document.getElementById('modal'); \\nconst openButton = document.getElementById('open'); \\n//add DOM event listeners (e.g. click and/or keypress)\\n\\nfunction openModal() { \\nmodal.opened=true;\\n\\nfunction closeModal() { \\nmodal.opened = false; \\n}\",\n },\n },\n description: 'Defaults to false - Can be set by referring to the component and setting it to false/true',\n },\n closeOnOverlayClick: {\n control: 'boolean',\n description: 'Close the modal when clicking outside the window',\n },\n showCloseButton: {\n control: 'boolean',\n description: \"Show or hide close button 'x'\",\n },\n alertIcon: {\n options: Object.keys(icons),\n control: { type: 'select' },\n description: 'When specified together with alertIcon then an border to the right is shown',\n },\n size: {\n options: ['s', 'm', 'l'],\n control: { type: 'radio'},\n description: 'Usable only when screen width is more than 1024px'\n },\n variant: {\n options: ['default', 'alert-brand', 'alert-danger'],\n control: { type: 'radio' },\n },\n ifxModalOpen: {\n action: 'ifxModalOpen',\n description: 'Custom event emitted when modal opens',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxModalOpen={handleChange}\\nVue:@ifxModalOpen=\"handleChange\"\\nAngular:(ifxModalOpen)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxModalOpen\", (event) => {//handle change});',\n },\n },\n },\n ifxModalClose: {\n action: 'ifxModalClose',\n description: 'Custom event emitted when modal closes',\n table: {\n type: {\n summary: 'Framework integration',\n detail:\n 'React: onIfxModalClose={handleChange}\\nVue:@ifxModalClose=\"handleChange\"\\nAngular:(ifxModalClose)=\"handleChange()\"\\nVanillaJs:.addEventListener(\"ifxModalClose\", (event) => {//handle change});',\n },\n },\n },\n },\n};\n\nconst Template = ({ caption, showCloseButton, closeOnOverlayClick, variant, size, alertIcon }) => {\n const modal = document.createElement('ifx-modal');\n modal.setAttribute('caption', caption);\n modal.setAttribute('variant', variant);\n\n if (alertIcon) {\n modal.setAttribute('alert-icon', alertIcon);\n }\n modal.setAttribute('close-on-overlay-click', closeOnOverlayClick);\n modal.setAttribute('show-close-button', showCloseButton);\n modal.setAttribute('size', size)\n\n modal.addEventListener('ifxModalOpen', action('ifxModalOpen'));\n modal.addEventListener('ifxModalClose', action('ifxModalClose'));\n\n const content = document.createElement('div');\n content.setAttribute('slot', 'content');\n content.innerHTML = `\n <span>Modal content</span>\n `;\n modal.appendChild(content);\n const buttons = document.createElement('div');\n buttons.setAttribute('slot', 'buttons');\n\n const cancelButton = document.createElement('ifx-button');\n cancelButton.setAttribute('variant', 'secondary');\n cancelButton.textContent = 'Button 1';\n cancelButton.addEventListener('click', () => {\n console.log('Button 1 clicked');\n });\n\n const primaryButton = document.createElement('ifx-button');\n primaryButton.textContent = 'Button 2';\n primaryButton.addEventListener('click', () => {\n console.log('Button 2 clicked');\n });\n\n buttons.appendChild(cancelButton);\n buttons.appendChild(primaryButton);\n modal.appendChild(buttons);\n\n const openButton = document.createElement('ifx-button');\n openButton.id = 'open';\n openButton.textContent = 'Open Modal';\n openButton.addEventListener('click', () => {\n modal.opened = true;\n });\n openButton.addEventListener('keydown', event => {\n if (event.key === 'Enter') {\n modal.opened = true;\n }\n });\n\n const storyElement = document.createElement('div');\n storyElement.appendChild(modal);\n storyElement.appendChild(openButton);\n\n return storyElement;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n caption: 'Modal Title',\n showCloseButton: true,\n closeOnOverlayClick: false,\n size: 's',\n variant: 'default',\n};\n\nexport const Alert = Template.bind({});\nAlert.args = {\n caption: 'Alert-Brand Modal Title',\n closeOnOverlayClick: true,\n alertIcon: 'arrowdoen24',\n size: 's',\n variant: 'alert-brand',\n};\n"]}
|
@@ -2,11 +2,10 @@ import { icons } from "@infineon/infineon-icons";
|
|
2
2
|
export default {
|
3
3
|
title: 'Components/Navigation/Navbar',
|
4
4
|
args: {
|
5
|
-
profileLabel: "",
|
6
5
|
applicationName: 'Application name',
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
hideLabel: true,
|
7
|
+
navbarItemTarget: '_blank',
|
8
|
+
navbarItemHref: '',
|
10
9
|
searchBarIsOpen: false,
|
11
10
|
navbarPositionFixed: false,
|
12
11
|
showLogoAndAppname: true,
|
@@ -16,216 +15,26 @@ export default {
|
|
16
15
|
hideOnMobile: true,
|
17
16
|
profileImageUrl: "",
|
18
17
|
userName: "",
|
19
|
-
|
20
|
-
href: "http://google.com",
|
21
|
-
target: "_self",
|
22
|
-
alt: "profile image",
|
18
|
+
profileLabel: ""
|
23
19
|
},
|
24
20
|
argTypes: {
|
25
|
-
|
26
|
-
name: 'Label',
|
27
|
-
control: { type: 'text' },
|
28
|
-
description: 'Label for the profile.',
|
29
|
-
table: {
|
30
|
-
category: 'story controls',
|
31
|
-
},
|
32
|
-
},
|
33
|
-
applicationName: {
|
34
|
-
control: { type: 'text' },
|
35
|
-
description: 'The name of the application.',
|
36
|
-
table: {
|
37
|
-
category: 'ifx-navbar props',
|
38
|
-
},
|
39
|
-
},
|
40
|
-
navbarPositionFixed: {
|
41
|
-
name: 'fixed',
|
42
|
-
control: { type: 'boolean' },
|
43
|
-
description: 'Fix the navbar to the top of the page.',
|
44
|
-
table: {
|
45
|
-
defaultValue: { summary: 'true' },
|
46
|
-
category: 'ifx-navbar props',
|
47
|
-
},
|
48
|
-
},
|
49
|
-
showLogoAndAppname: {
|
50
|
-
control: { type: 'boolean' },
|
51
|
-
description: 'Show the logo and application name.',
|
52
|
-
table: {
|
53
|
-
defaultValue: { summary: 'true' },
|
54
|
-
category: 'ifx-navbar props',
|
55
|
-
},
|
56
|
-
},
|
57
|
-
logoHref: {
|
58
|
-
control: { type: 'text' },
|
59
|
-
description: 'The URL of the logo link.',
|
60
|
-
table: {
|
61
|
-
category: 'ifx-navbar props',
|
62
|
-
},
|
63
|
-
},
|
64
|
-
logoHrefTarget: {
|
65
|
-
description: 'The target of the logo link.',
|
66
|
-
options: ['_self', '_blank', '_parent'],
|
67
|
-
control: { type: 'radio' },
|
68
|
-
table: {
|
69
|
-
defaultValue: { summary: '_self' },
|
70
|
-
category: 'ifx-navbar props',
|
71
|
-
type: {
|
72
|
-
summary: '_self | _blank | _parent',
|
73
|
-
},
|
74
|
-
},
|
75
|
-
},
|
76
|
-
showLabelOfNavbarItem: {
|
77
|
-
name: 'showLabel',
|
78
|
-
control: { type: 'boolean' },
|
79
|
-
description: 'Show the label of the navbar item.',
|
80
|
-
table: {
|
81
|
-
defaultValue: { summary: 'true' },
|
82
|
-
category: 'ifx-navbar-item props',
|
83
|
-
},
|
84
|
-
},
|
85
|
-
iconOfNavbarItem: {
|
86
|
-
name: 'icon',
|
21
|
+
icon: {
|
87
22
|
options: Object.values(icons).map(i => i['name']),
|
88
23
|
control: { type: 'select' },
|
89
|
-
description: 'The icon to display in the navbar item.',
|
90
|
-
table: {
|
91
|
-
category: 'ifx-navbar-item props',
|
92
|
-
type: {
|
93
|
-
summary: 'string',
|
94
|
-
},
|
95
|
-
},
|
96
|
-
},
|
97
|
-
hrefOfNavbarItem: {
|
98
|
-
name: 'href',
|
99
|
-
control: { type: 'text' },
|
100
|
-
description: 'The URL of the navbar item link.',
|
101
|
-
table: {
|
102
|
-
category: 'ifx-navbar-item props',
|
103
|
-
},
|
104
|
-
},
|
105
|
-
targetOfnavbarItem: {
|
106
|
-
name: 'target',
|
107
|
-
control: { type: 'radio' },
|
108
|
-
options: ['_self'],
|
109
|
-
description: 'The target of the navbar item link.',
|
110
|
-
table: {
|
111
|
-
defaultValue: { summary: '_self' },
|
112
|
-
category: 'ifx-navbar-item props',
|
113
|
-
type: {
|
114
|
-
summary: '_self',
|
115
|
-
},
|
116
|
-
},
|
117
24
|
},
|
118
|
-
|
119
|
-
|
120
|
-
description: 'Hide the navbar item on mobile.',
|
121
|
-
table: {
|
122
|
-
defaultValue: { summary: 'true' },
|
123
|
-
category: 'ifx-navbar-item props',
|
124
|
-
},
|
125
|
-
},
|
126
|
-
showNavbarProfileLabel: {
|
127
|
-
name: 'showLabel',
|
128
|
-
control: { type: 'boolean' },
|
129
|
-
description: 'Show label for the profile.',
|
130
|
-
table: {
|
131
|
-
defaultValue: { summary: 'true' },
|
132
|
-
category: 'ifx-navbar-profile props',
|
133
|
-
},
|
134
|
-
},
|
135
|
-
href: {
|
136
|
-
control: { type: 'text' },
|
137
|
-
description: 'The URL of the profile link.',
|
138
|
-
table: {
|
139
|
-
category: 'ifx-navbar-profile props',
|
140
|
-
},
|
141
|
-
},
|
142
|
-
profileImageUrl: {
|
143
|
-
name: 'imageUrl',
|
144
|
-
control: { type: 'text' },
|
145
|
-
description: 'The URL of the image.',
|
146
|
-
table: {
|
147
|
-
category: 'ifx-navbar-profile props',
|
148
|
-
},
|
149
|
-
},
|
150
|
-
target: {
|
151
|
-
control: { type: 'radio' },
|
25
|
+
logoHrefTarget: {
|
26
|
+
description: "If not '_self' or '_blank' or '_parent', then set to '_self' by default",
|
152
27
|
options: ['_self', '_blank', '_parent'],
|
153
|
-
|
154
|
-
table: {
|
155
|
-
defaultValue: { summary: '_self' },
|
156
|
-
category: 'ifx-navbar-profile props',
|
157
|
-
type: {
|
158
|
-
summary: '_self | _blank | _parent',
|
159
|
-
},
|
160
|
-
},
|
161
|
-
},
|
162
|
-
alt: {
|
163
|
-
control: { type: 'text' },
|
164
|
-
description: 'The alternative text of the image.',
|
165
|
-
table: {
|
166
|
-
category: 'ifx-navbar-profile props',
|
167
|
-
},
|
168
|
-
},
|
169
|
-
userName: {
|
170
|
-
control: { type: 'text' },
|
171
|
-
description: 'The name of the user.',
|
172
|
-
table: {
|
173
|
-
category: 'ifx-navbar-profile props',
|
174
|
-
},
|
175
|
-
},
|
176
|
-
searchBarIsOpen: {
|
177
|
-
name: 'isOpen',
|
178
|
-
control: { type: 'boolean' },
|
179
|
-
description: 'Show the search bar.',
|
180
|
-
table: {
|
181
|
-
defaultValue: { summary: 'true' },
|
182
|
-
category: 'ifx-search-bar props',
|
183
|
-
},
|
28
|
+
control: { type: 'radio' },
|
184
29
|
},
|
185
30
|
searchBarPosition: {
|
186
|
-
description: 'The position of the search bar.',
|
187
31
|
options: ['left', 'right'],
|
188
32
|
control: { type: 'radio' },
|
189
|
-
table: {
|
190
|
-
defaultValue: { summary: 'left' },
|
191
|
-
category: 'ifx-search-bar props',
|
192
|
-
type: {
|
193
|
-
summary: 'left | right',
|
194
|
-
},
|
195
|
-
},
|
196
|
-
},
|
197
|
-
ifxNavbarMobileMenuIsOpen: {
|
198
|
-
action: 'ifxNavbarMobileMenuIsOpen',
|
199
|
-
description: 'Event emitted when the mobile menu is opened.',
|
200
|
-
table: {
|
201
|
-
category: 'custom events',
|
202
|
-
type: {
|
203
|
-
summary: 'Framework integration',
|
204
|
-
detail: `React: onifxNavbarMobileMenuIsOpen={handleOpen}
|
205
|
-
Vue: @ifxNavbarMobileMenuIsOpen="handleOpen"
|
206
|
-
Angular: (ifxNavbarMobileMenuIsOpen)="handleOpen()"
|
207
|
-
VanillaJs: .addEventListener("ifxNavbarMobileMenuIsOpen", (event) => {/*handle open*/});`
|
208
|
-
},
|
209
|
-
},
|
210
|
-
},
|
211
|
-
ifxNavItem: {
|
212
|
-
action: 'ifxNavItem',
|
213
|
-
description: 'Event emitted when a navbar item is clicked.',
|
214
|
-
table: {
|
215
|
-
category: 'custom events',
|
216
|
-
type: {
|
217
|
-
summary: 'Framework integration',
|
218
|
-
detail: `React: onifxNavItem={handleClick}
|
219
|
-
Vue: @ifxNavItem="handleClick"
|
220
|
-
Angular: (ifxNavItem)="handleClick()"
|
221
|
-
VanillaJs: .addEventListener("ifxNavItem", (event) => {/*handle click*/});`
|
222
|
-
},
|
223
|
-
},
|
224
33
|
},
|
225
34
|
},
|
226
35
|
};
|
227
|
-
const DefaultTemplate = args => `<ifx-navbar show-logo-and-appname="${args.showLogoAndAppname}" application-name="${args.applicationName}" fixed="${args.
|
228
|
-
<ifx-navbar-item icon="${args.
|
36
|
+
const DefaultTemplate = args => `<ifx-navbar show-logo-and-appname="${args.showLogoAndAppname}" application-name="${args.applicationName}" fixed="${args.fixed}" logo-href="${args.logoHref}" logo-href-target="${args.logoHrefTarget}">
|
37
|
+
<ifx-navbar-item icon="${args.icon}" slot="left-item" target="" href="" >
|
229
38
|
Menu Item
|
230
39
|
<ifx-navbar-item icon="">
|
231
40
|
Layer 1 Nested Item 1
|
@@ -257,7 +66,7 @@ const DefaultTemplate = args => `<ifx-navbar show-logo-and-appname="${args.show
|
|
257
66
|
|
258
67
|
</ifx-navbar-item>
|
259
68
|
|
260
|
-
<ifx-navbar-item href="${args.
|
69
|
+
<ifx-navbar-item href="${args.navbarItemHref}" target="${args.navbarItemTarget}" slot="left-item" icon="" show-label="${args.hideLabel}">
|
261
70
|
Menu Item
|
262
71
|
</ifx-navbar-item>
|
263
72
|
|
@@ -274,7 +83,7 @@ const DefaultTemplate = args => `<ifx-navbar show-logo-and-appname="${args.show
|
|
274
83
|
<ifx-navbar-item slot="right-item" hide-on-mobile="true" show-label='false' icon="image-16">
|
275
84
|
</ifx-navbar-item>
|
276
85
|
|
277
|
-
<ifx-navbar-profile user-name="${args.userName}" slot="right-item" image-url="${args.profileImageUrl}" show-label="
|
86
|
+
<ifx-navbar-profile user-name="${args.userName}" slot="right-item" image-url="${args.profileImageUrl}" show-label="true" href="" target="_blank">${args.profileLabel}</ifx-navbar-profile>
|
278
87
|
</ifx-navbar>`;
|
279
88
|
export const Default = DefaultTemplate.bind({});
|
280
89
|
//# sourceMappingURL=navbar.stories.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"navbar.stories.js","sourceRoot":"","sources":["../../../../src/components/navigation/navbar/navbar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACjD,eAAe;IACb,KAAK,EAAE,8BAA8B;IACrC,IAAI,EAAE;QACJ,YAAY,EAAE,EAAE;QAChB,eAAe,EAAE,kBAAkB;QACnC,qBAAqB,EAAE,IAAI;QAC3B,kBAAkB,EAAE,OAAO;QAC3B,gBAAgB,EAAE,EAAE;QACpB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,KAAK;QAC1B,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE,mBAAmB;QAC7B,cAAc,EAAE,OAAO;QACvB,iBAAiB,EAAE,MAAM;QACzB,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE,EAAE;QACZ,sBAAsB,EAAE,IAAI;QAC5B,IAAI,EAAE,mBAAmB;QACzB,MAAM,EAAE,OAAO;QACf,GAAG,EAAE,eAAe;KACrB;IACD,QAAQ,EAAE;QACR,YAAY,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACzB,WAAW,EAAE,wBAAwB;YACrC,KAAK,EAAE;gBACL,QAAQ,EAAE,gBAAgB;aAC3B;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,QAAQ,kCAAkC,IAAI,CAAC,eAAe,iBAAiB,IAAI,CAAC,sBAAsB,qBAAqB,IAAI,CAAC,MAAM,UAAU,IAAI,CAAC,GAAG,KAAK,IAAI,CAAC,YAAY;cAC5M,CAAC;AAEf,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\nexport default {\n title: 'Components/Navigation/Navbar',\n args: {\n profileLabel: \"\",\n applicationName: 'Application name',\n showLabelOfNavbarItem: true,\n targetOfnavbarItem: '_self',\n hrefOfNavbarItem: '',\n searchBarIsOpen: false,\n navbarPositionFixed: false,\n showLogoAndAppname: true,\n logoHref: 'http://google.com',\n logoHrefTarget: '_self',\n searchBarPosition: 'left',\n hideOnMobile: true,\n profileImageUrl: \"\",\n userName: \"\",\n showNavbarProfileLabel: true,\n href: \"http://google.com\",\n target: \"_self\",\n alt: \"profile image\",\n },\n argTypes: {\n profileLabel: {\n name: 'Label',\n control: { type: 'text' },\n description: 'Label for the profile.',\n table: {\n category: 'story controls',\n },\n },\n applicationName: {\n control: { type: 'text' },\n description: 'The name of the application.',\n table: {\n category: 'ifx-navbar props',\n },\n },\n navbarPositionFixed: {\n name: 'fixed',\n control: { type: 'boolean' },\n description: 'Fix the navbar to the top of the page.',\n table: {\n defaultValue: { summary: 'true' },\n category: 'ifx-navbar props',\n },\n },\n showLogoAndAppname: {\n control: { type: 'boolean' },\n description: 'Show the logo and application name.',\n table: {\n defaultValue: { summary: 'true' },\n category: 'ifx-navbar props',\n },\n },\n logoHref: {\n control: { type: 'text' },\n description: 'The URL of the logo link.',\n table: {\n category: 'ifx-navbar props',\n },\n },\n logoHrefTarget: {\n description: 'The target of the logo link.',\n options: ['_self', '_blank', '_parent'],\n control: { type: 'radio' },\n table: {\n defaultValue: { summary: '_self' },\n category: 'ifx-navbar props',\n type: {\n summary: '_self | _blank | _parent',\n },\n },\n },\n showLabelOfNavbarItem: {\n name: 'showLabel',\n control: { type: 'boolean' },\n description: 'Show the label of the navbar item.',\n table: {\n defaultValue: { summary: 'true' },\n category: 'ifx-navbar-item props',\n },\n },\n iconOfNavbarItem: {\n name: 'icon',\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n description: 'The icon to display in the navbar item.',\n table: {\n category: 'ifx-navbar-item props',\n type: {\n summary: 'string',\n },\n },\n },\n hrefOfNavbarItem: {\n name: 'href',\n control: { type: 'text' },\n description: 'The URL of the navbar item link.',\n table: {\n category: 'ifx-navbar-item props',\n },\n },\n\n targetOfnavbarItem: {\n name: 'target',\n control: { type: 'radio' },\n options: ['_self'],\n description: 'The target of the navbar item link.',\n table: {\n defaultValue: { summary: '_self' },\n category: 'ifx-navbar-item props',\n type: {\n summary: '_self',\n },\n },\n },\n hideOnMobile: {\n control: { type: 'boolean' },\n description: 'Hide the navbar item on mobile.',\n table: {\n defaultValue: { summary: 'true' },\n category: 'ifx-navbar-item props',\n },\n },\n showNavbarProfileLabel: {\n name: 'showLabel',\n control: { type: 'boolean' },\n description: 'Show label for the profile.',\n table: {\n defaultValue: { summary: 'true' },\n category: 'ifx-navbar-profile props',\n },\n },\n href: {\n control: { type: 'text' },\n description: 'The URL of the profile link.',\n table: {\n category: 'ifx-navbar-profile props',\n },\n },\n profileImageUrl: {\n name: 'imageUrl',\n control: { type: 'text' },\n description: 'The URL of the image.',\n table: {\n category: 'ifx-navbar-profile props',\n },\n },\n target: {\n control: { type: 'radio' },\n options: ['_self', '_blank', '_parent'],\n description: 'The target of the link.',\n table: {\n defaultValue: { summary: '_self' },\n category: 'ifx-navbar-profile props',\n type: {\n summary: '_self | _blank | _parent',\n },\n },\n },\n alt: {\n control: { type: 'text' },\n description: 'The alternative text of the image.',\n table: {\n category: 'ifx-navbar-profile props',\n },\n },\n userName: {\n control: { type: 'text' },\n description: 'The name of the user.',\n table: {\n category: 'ifx-navbar-profile props',\n },\n },\n searchBarIsOpen: {\n name: 'isOpen',\n control: { type: 'boolean' },\n description: 'Show the search bar.',\n table: {\n defaultValue: { summary: 'true' },\n category: 'ifx-search-bar props',\n },\n },\n searchBarPosition: {\n description: 'The position of the search bar.',\n options: ['left', 'right'],\n control: { type: 'radio' },\n table: {\n defaultValue: { summary: 'left' },\n category: 'ifx-search-bar props',\n type: {\n summary: 'left | right',\n },\n },\n },\n ifxNavbarMobileMenuIsOpen: {\n action: 'ifxNavbarMobileMenuIsOpen',\n description: 'Event emitted when the mobile menu is opened.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `React: onifxNavbarMobileMenuIsOpen={handleOpen} \n Vue: @ifxNavbarMobileMenuIsOpen=\"handleOpen\" \n Angular: (ifxNavbarMobileMenuIsOpen)=\"handleOpen()\" \n VanillaJs: .addEventListener(\"ifxNavbarMobileMenuIsOpen\", (event) => {/*handle open*/});`\n },\n },\n },\n ifxNavItem: {\n action: 'ifxNavItem',\n description: 'Event emitted when a navbar item is clicked.',\n table: {\n category: 'custom events',\n type: {\n summary: 'Framework integration',\n detail: `React: onifxNavItem={handleClick}\n Vue: @ifxNavItem=\"handleClick\" \n Angular: (ifxNavItem)=\"handleClick()\"\n VanillaJs: .addEventListener(\"ifxNavItem\", (event) => {/*handle click*/});`},\n },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-navbar show-logo-and-appname=\"${args.showLogoAndAppname}\" application-name=\"${args.applicationName}\" fixed=\"${args.navbarPositionFixed}\" logo-href=\"${args.logoHref}\" logo-href-target=\"${args.logoHrefTarget}\">\n <ifx-navbar-item icon=\"${args.iconOfNavbarItem}\" slot=\"left-item\" target=\"${args.targetOfnavbarItem}\" href=\"${args.hrefOfNavbarItem}\" hide-on-mobile=\"${args.hideOnMobile}\">\n Menu Item\n <ifx-navbar-item icon=\"\">\n Layer 1 Nested Item 1\n <ifx-navbar-item>\n Layer 2 Nested Item 2\n <ifx-navbar-item href=\"http://google.com\" target=\"_blank\">Link Layer 3 Nested Item 1</ifx-navbar-item>\n <ifx-navbar-item>Layer 3 Nested Item 2</ifx-navbar-item>\n <ifx-navbar-item>Layer 3 Nested Item 3</ifx-navbar-item>\n <ifx-navbar-item>Layer 3 Nested Item 4</ifx-navbar-item>\n </ifx-navbar-item>\n <ifx-navbar-item >Layer 2 Nested Item 3</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Nested Item 4</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Nested Item 5</ifx-navbar-item>\n </ifx-navbar-item>\n\n <ifx-navbar-item>\n Layer 1 Nested Item 2\n <ifx-navbar-item>Layer 2 Item 1</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Item 2</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Item 3</ifx-navbar-item>\n </ifx-navbar-item>\n\n <ifx-navbar-item>Nested Item 3</ifx-navbar-item>\n\n <ifx-navbar-item>\n Layer 1 Nested Item 4\n <ifx-navbar-item>Nested Item 4</ifx-navbar-item>\n </ifx-navbar-item>\n\n </ifx-navbar-item>\n\n <ifx-navbar-item href=\"${args.hrefOfNavbarItem}\" target=\"_self\" slot=\"left-item\" icon=\"\" show-label=\"${args.showLabelOfNavbarItem}\">\n Menu Item\n </ifx-navbar-item>\n\n <ifx-navbar-item slot=\"left-item\">\n More\n <ifx-navbar-item>Item1</ifx-navbar-item>\n <ifx-navbar-item>Item2</ifx-navbar-item>\n </ifx-navbar-item>\n\n <ifx-search-bar slot=\"search-bar-${args.searchBarPosition}\" is-open=\"${args.searchBarIsOpen}\"></ifx-search-bar>\n\n <ifx-navbar-item slot=\"right-item\" target=\"_blank\" href=\"http://google.com\" hide-on-mobile=\"${args.hideOnMobile}\" show-label=\"true\" icon=\"image-16\">\n </ifx-navbar-item>\n <ifx-navbar-item slot=\"right-item\" hide-on-mobile=\"true\" show-label='false' icon=\"image-16\">\n </ifx-navbar-item>\n\n <ifx-navbar-profile user-name=\"${args.userName}\" slot=\"right-item\" image-url=\"${args.profileImageUrl}\" show-label=\"${args.showNavbarProfileLabel}\" href=\"\" target=\"${args.target}\" alt=\"${args.alt}\">${args.profileLabel}</ifx-navbar-profile>\n</ifx-navbar>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}
|
1
|
+
{"version":3,"file":"navbar.stories.js","sourceRoot":"","sources":["../../../../src/components/navigation/navbar/navbar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEjD,eAAe;IACb,KAAK,EAAE,8BAA8B;IACrC,IAAI,EAAE;QACJ,eAAe,EAAE,kBAAkB;QACnC,SAAS,EAAE,IAAI;QACf,gBAAgB,EAAE,QAAQ;QAC1B,cAAc,EAAE,EAAE;QAClB,eAAe,EAAE,KAAK;QACtB,mBAAmB,EAAE,KAAK;QAC1B,kBAAkB,EAAE,IAAI;QACxB,QAAQ,EAAE,mBAAmB;QAC7B,cAAc,EAAE,OAAO;QACvB,iBAAiB,EAAE,MAAM;QACzB,YAAY,EAAE,IAAI;QAClB,eAAe,EAAE,EAAE;QACnB,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;KACjB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;YACjD,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC5B;QACD,cAAc,EAAE;YACd,WAAW,EAAE,yEAAyE;YACtF,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;YACvC,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;QACD,iBAAiB,EAAE;YACjB,OAAO,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;SAC3B;KACF;CACF,CAAC;AAEF,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,CAC7B,uCAAuC,IAAI,CAAC,kBAAkB,uBAAuB,IAAI,CAAC,eAAe,YAAY,IAAI,CAAC,KAAK,gBAAgB,IAAI,CAAC,QAAQ,uBAAuB,IAAI,CAAC,cAAc;2BAC7K,IAAI,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAgCT,IAAI,CAAC,cAAc,aAAa,IAAI,CAAC,gBAAgB,0CAA0C,IAAI,CAAC,SAAS;;;;;;;;;;qCAUnG,IAAI,CAAC,iBAAiB,cAAc,IAAI,CAAC,eAAe;;gGAEG,IAAI,CAAC,YAAY;;;;;mCAK9E,IAAI,CAAC,QAAQ,kCAAkC,IAAI,CAAC,eAAe,+CAA+C,IAAI,CAAC,YAAY;cACxJ,CAAC;AAEf,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import { icons } from '@infineon/infineon-icons';\n\nexport default {\n title: 'Components/Navigation/Navbar',\n args: {\n applicationName: 'Application name',\n hideLabel: true,\n navbarItemTarget: '_blank',\n navbarItemHref: '',\n searchBarIsOpen: false,\n navbarPositionFixed: false,\n showLogoAndAppname: true,\n logoHref: 'http://google.com',\n logoHrefTarget: '_self',\n searchBarPosition: 'left',\n hideOnMobile: true,\n profileImageUrl: \"\",\n userName: \"\",\n profileLabel: \"\"\n },\n argTypes: {\n icon: {\n options: Object.values(icons).map(i => i['name']),\n control: { type: 'select' },\n },\n logoHrefTarget: {\n description: \"If not '_self' or '_blank' or '_parent', then set to '_self' by default\",\n options: ['_self', '_blank', '_parent'],\n control: { type: 'radio' },\n },\n searchBarPosition: {\n options: ['left', 'right'],\n control: { type: 'radio' },\n },\n },\n};\n\nconst DefaultTemplate = args =>\n `<ifx-navbar show-logo-and-appname=\"${args.showLogoAndAppname}\" application-name=\"${args.applicationName}\" fixed=\"${args.fixed}\" logo-href=\"${args.logoHref}\" logo-href-target=\"${args.logoHrefTarget}\">\n <ifx-navbar-item icon=\"${args.icon}\" slot=\"left-item\" target=\"\" href=\"\" >\n Menu Item\n <ifx-navbar-item icon=\"\">\n Layer 1 Nested Item 1\n <ifx-navbar-item>\n Layer 2 Nested Item 2\n <ifx-navbar-item href=\"http://google.com\" target=\"_blank\">Link Layer 3 Nested Item 1</ifx-navbar-item>\n <ifx-navbar-item>Layer 3 Nested Item 2</ifx-navbar-item>\n <ifx-navbar-item>Layer 3 Nested Item 3</ifx-navbar-item>\n <ifx-navbar-item>Layer 3 Nested Item 4</ifx-navbar-item>\n </ifx-navbar-item>\n <ifx-navbar-item >Layer 2 Nested Item 3</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Nested Item 4</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Nested Item 5</ifx-navbar-item>\n </ifx-navbar-item>\n\n <ifx-navbar-item>\n Layer 1 Nested Item 2\n <ifx-navbar-item>Layer 2 Item 1</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Item 2</ifx-navbar-item>\n <ifx-navbar-item>Layer 2 Item 3</ifx-navbar-item>\n </ifx-navbar-item>\n\n <ifx-navbar-item>Nested Item 3</ifx-navbar-item>\n\n <ifx-navbar-item>\n Layer 1 Nested Item 4\n <ifx-navbar-item>Nested Item 4</ifx-navbar-item>\n </ifx-navbar-item>\n\n </ifx-navbar-item>\n\n <ifx-navbar-item href=\"${args.navbarItemHref}\" target=\"${args.navbarItemTarget}\" slot=\"left-item\" icon=\"\" show-label=\"${args.hideLabel}\">\n Menu Item\n </ifx-navbar-item>\n\n <ifx-navbar-item slot=\"left-item\">\n More\n <ifx-navbar-item>Item1</ifx-navbar-item>\n <ifx-navbar-item>Item2</ifx-navbar-item>\n </ifx-navbar-item>\n\n <ifx-search-bar slot=\"search-bar-${args.searchBarPosition}\" is-open=\"${args.searchBarIsOpen}\"></ifx-search-bar>\n\n <ifx-navbar-item slot=\"right-item\" target=\"_blank\" href=\"http://google.com\" hide-on-mobile=\"${args.hideOnMobile}\" show-label=\"true\" icon=\"image-16\">\n </ifx-navbar-item>\n <ifx-navbar-item slot=\"right-item\" hide-on-mobile=\"true\" show-label='false' icon=\"image-16\">\n </ifx-navbar-item>\n\n <ifx-navbar-profile user-name=\"${args.userName}\" slot=\"right-item\" image-url=\"${args.profileImageUrl}\" show-label=\"true\" href=\"\" target=\"_blank\">${args.profileLabel}</ifx-navbar-profile>\n</ifx-navbar>`;\n\nexport const Default = DefaultTemplate.bind({});\n"]}
|
@@ -2,8 +2,8 @@ import { h } from "@stencil/core";
|
|
2
2
|
export class SidebarItem {
|
3
3
|
constructor() {
|
4
4
|
this.icon = "";
|
5
|
-
this.
|
6
|
-
this.
|
5
|
+
this.hasIcon = true;
|
6
|
+
this.hasIconWrapper = false;
|
7
7
|
this.href = "";
|
8
8
|
this.internalHref = "";
|
9
9
|
this.target = "_self";
|
@@ -36,10 +36,10 @@ export class SidebarItem {
|
|
36
36
|
}
|
37
37
|
handleConsoleError(event) {
|
38
38
|
if (event.detail) {
|
39
|
-
this.
|
39
|
+
this.hasIcon = false;
|
40
40
|
}
|
41
41
|
else {
|
42
|
-
this.
|
42
|
+
this.hasIcon = true;
|
43
43
|
}
|
44
44
|
}
|
45
45
|
handleEventEmission() {
|
@@ -243,11 +243,11 @@ export class SidebarItem {
|
|
243
243
|
}
|
244
244
|
render() {
|
245
245
|
var _a, _b;
|
246
|
-
return (h("div", { key: '
|
247
|
-
h("div", { key: '
|
248
|
-
h("div", { key: '
|
249
|
-
h("span", { key: '
|
250
|
-
h("span", { key: '
|
246
|
+
return (h("div", { key: '300c33eb3478fd56763957338d35b71e10e7f051' }, h("a", { key: 'baec46c86811da4d99f462db822d0080128ba168', tabIndex: 1, onKeyDown: (event) => this.handleKeyDown(event), href: this.internalHref, onClick: () => this.toggleSubmenu(), target: this.target, class: `sidebar__nav-item ${!this.isNested && this.isExpandable ? 'header__section' : ""} ${this.isSubMenuItem ? 'submenu__item' : ""}` }, this.icon &&
|
247
|
+
h("div", { key: '25774f4e3389b73d1835bc96801d7c2671b57754', class: `sidebar__nav-item-icon-wrapper ${!this.hasIcon ? 'noIcon' : ""}` }, h("ifx-icon", { key: '2598dbcaa212d27c687d2920b8a9e6a17b8ee1a0', icon: this.icon })), h("div", { key: '5e6567053aaf33af5b01bdf997f16fb176f76317', class: "sidebar__nav-item-label" }, h("slot", { key: '624d78a76b5b87b31caf10d294299fe2b643785a' })), (this.isExpandable || ((_a = this.numberIndicator) === null || _a === void 0 ? void 0 : _a.trim())) &&
|
248
|
+
h("div", { key: '5e8afc60f5da57e00390e7f7982ef87c724cdde6', class: "sidebar__nav-item-indicator" }, this.isExpandable &&
|
249
|
+
h("span", { key: '321321f3ba9bda67d439c719776ae51cb1df172d', class: 'item__arrow-wrapper' }, h("ifx-icon", { key: '992934501145b6f641d23a4975c24ce4c8a39ef5', icon: "chevron-down-12" })), ((_b = this.numberIndicator) === null || _b === void 0 ? void 0 : _b.trim()) && !this.isExpandable && !this.isNested &&
|
250
|
+
h("span", { key: '41ea0d96c7d1e87f92093570863218ef6240a285', class: 'item__number-indicator' }, h("ifx-number-indicator", { key: '2e45be1b110dfa845f36cc13e875f2712e7c9039' }, this.numberIndicator)))), this.isExpandable && h("ul", { key: '15674f7d3e5462fa11e6048737e3f865ac2b16b8', class: 'expandable__submenu' })));
|
251
251
|
}
|
252
252
|
static get is() { return "ifx-sidebar-item"; }
|
253
253
|
static get encapsulation() { return "shadow"; }
|
@@ -412,8 +412,8 @@ export class SidebarItem {
|
|
412
412
|
}
|
413
413
|
static get states() {
|
414
414
|
return {
|
415
|
-
"
|
416
|
-
"
|
415
|
+
"hasIcon": {},
|
416
|
+
"hasIconWrapper": {},
|
417
417
|
"internalHref": {},
|
418
418
|
"isExpandable": {},
|
419
419
|
"isNested": {},
|