@infineon/infineon-design-system-stencil 30.1.0 → 30.1.1--canary.1496.ada7ab553a087bc3fb372b950494343ccb1df41e.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 +1 -1
- package/dist/cjs/ifx-alert_2.cjs.entry.js +201 -0
- package/dist/cjs/ifx-alert_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ifx-badge.cjs.entry.js +1 -1
- package/dist/cjs/ifx-basic-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-breadcrumb-item-label.cjs.entry.js +1 -1
- package/dist/cjs/ifx-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ifx-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card-headline.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card-image.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card-links.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card-overline.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card-text.cjs.entry.js +1 -1
- package/dist/cjs/ifx-card.cjs.entry.js +1 -1
- package/dist/cjs/ifx-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/ifx-chip_3.cjs.entry.js +1 -1
- package/dist/cjs/ifx-content-switcher-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-content-switcher.cjs.entry.js +1 -1
- package/dist/cjs/ifx-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown-header.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown-menu.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown-separator.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown-trigger-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown-trigger.cjs.entry.js +1 -1
- package/dist/cjs/ifx-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/ifx-faq.cjs.entry.js +2 -2
- package/dist/cjs/ifx-filter-accordion.cjs.entry.js +1 -1
- 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-footer-column.cjs.entry.js +1 -1
- package/dist/cjs/ifx-footer.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icon-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icon.cjs.entry.js +1 -1
- package/dist/cjs/ifx-icons-preview.cjs.entry.js +1 -1
- package/dist/cjs/ifx-link.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-entry.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-group.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list-notification.cjs.entry.js +1 -1
- package/dist/cjs/ifx-list.cjs.entry.js +1 -1
- package/dist/cjs/ifx-modal.cjs.entry.js +1 -1
- package/dist/cjs/{ifx-multiselect_2.cjs.entry.js → ifx-multiselect.cjs.entry.js} +2 -70
- package/dist/cjs/ifx-multiselect.cjs.entry.js.map +1 -0
- package/dist/cjs/ifx-navbar-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-navbar-profile.cjs.entry.js +1 -1
- package/dist/cjs/ifx-navbar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-notification.cjs.entry.js +1 -1
- package/dist/cjs/ifx-number-indicator.cjs.entry.js +1 -1
- package/dist/cjs/ifx-overview-table.cjs.entry.js +1 -1
- package/dist/cjs/ifx-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ifx-search-bar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-search-field.cjs.entry.js +1 -1
- package/dist/cjs/ifx-segment.cjs.entry.js +1 -1
- package/dist/cjs/ifx-segmented-control.cjs.entry.js +1 -1
- package/dist/cjs/ifx-select.cjs.entry.js +1 -1
- package/dist/cjs/ifx-set-filter.cjs.entry.js +1 -1
- package/dist/cjs/ifx-sidebar-item.cjs.entry.js +1 -1
- package/dist/cjs/ifx-sidebar-title.cjs.entry.js +1 -1
- package/dist/cjs/ifx-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/ifx-slider.cjs.entry.js +1 -1
- package/dist/cjs/ifx-spinner_2.cjs.entry.js +103 -0
- package/dist/cjs/ifx-spinner_2.cjs.entry.js.map +1 -0
- package/dist/cjs/ifx-status.cjs.entry.js +1 -1
- package/dist/cjs/ifx-step.cjs.entry.js +1 -1
- package/dist/cjs/ifx-stepper.cjs.entry.js +1 -1
- 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 +1 -1
- package/dist/cjs/ifx-tabs.cjs.entry.js +1 -1
- package/dist/cjs/ifx-tag.cjs.entry.js +1 -1
- package/dist/cjs/ifx-templates-ui.cjs.entry.js +61 -0
- package/dist/cjs/ifx-templates-ui.cjs.entry.js.map +1 -0
- package/dist/cjs/ifx-textarea.cjs.entry.js +3 -3
- package/dist/cjs/ifx-tooltip.cjs.entry.js +5 -5
- package/dist/cjs/{index-f6c58643.js → index-155a65a3.js} +30 -19
- package/dist/cjs/index-155a65a3.js.map +1 -0
- package/dist/cjs/infineon-design-system-stencil.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/templates/template/template.css +76 -0
- package/dist/collection/components/templates/template/template.js +263 -0
- package/dist/collection/components/templates/template/template.js.map +1 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.css +33 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.js +75 -0
- package/dist/collection/components/templates/templates-ui/templates-ui.js.map +1 -0
- package/dist/collection/components/text-field/text-field.js +4 -4
- package/dist/collection/components/textarea/textarea.js +2 -2
- package/dist/collection/components/tooltip/tooltip.js +4 -4
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/stories/setup-and-installation/faq/faq.js +1 -1
- package/dist/components/ifx-alert.js +1 -68
- package/dist/components/ifx-alert.js.map +1 -1
- package/dist/components/ifx-faq.js +1 -1
- package/dist/components/ifx-set-filter.js +1 -1
- package/dist/components/ifx-spinner.js +1 -46
- package/dist/components/ifx-spinner.js.map +1 -1
- package/dist/components/ifx-template.d.ts +11 -0
- package/dist/components/ifx-template.js +8 -0
- package/dist/components/ifx-template.js.map +1 -0
- package/dist/components/ifx-templates-ui.d.ts +11 -0
- package/dist/components/ifx-templates-ui.js +123 -0
- package/dist/components/ifx-templates-ui.js.map +1 -0
- 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/{esm/ifx-spinner.entry.js → components/p-53704c65.js} +28 -9
- package/dist/components/p-53704c65.js.map +1 -0
- package/dist/components/p-80d6c6e4.js +211 -0
- package/dist/components/p-80d6c6e4.js.map +1 -0
- package/dist/{esm/ifx-alert.entry.js → components/p-81263927.js} +35 -8
- package/dist/components/p-81263927.js.map +1 -0
- package/dist/components/{p-d5a199fb.js → p-b537c83a.js} +5 -5
- package/dist/components/{p-d5a199fb.js.map → p-b537c83a.js.map} +1 -1
- package/dist/esm/ifx-accordion_2.entry.js +1 -1
- package/dist/esm/ifx-alert_2.entry.js +196 -0
- package/dist/esm/ifx-alert_2.entry.js.map +1 -0
- package/dist/esm/ifx-badge.entry.js +1 -1
- package/dist/esm/ifx-basic-table.entry.js +1 -1
- package/dist/esm/ifx-breadcrumb-item-label.entry.js +1 -1
- package/dist/esm/ifx-breadcrumb-item.entry.js +1 -1
- package/dist/esm/ifx-breadcrumb.entry.js +1 -1
- package/dist/esm/ifx-button.entry.js +1 -1
- package/dist/esm/ifx-card-headline.entry.js +1 -1
- package/dist/esm/ifx-card-image.entry.js +1 -1
- package/dist/esm/ifx-card-links.entry.js +1 -1
- package/dist/esm/ifx-card-overline.entry.js +1 -1
- package/dist/esm/ifx-card-text.entry.js +1 -1
- package/dist/esm/ifx-card.entry.js +1 -1
- package/dist/esm/ifx-checkbox.entry.js +1 -1
- package/dist/esm/ifx-chip_3.entry.js +1 -1
- package/dist/esm/ifx-content-switcher-item.entry.js +1 -1
- package/dist/esm/ifx-content-switcher.entry.js +1 -1
- package/dist/esm/ifx-date-picker.entry.js +1 -1
- package/dist/esm/ifx-dropdown-header.entry.js +1 -1
- package/dist/esm/ifx-dropdown-item.entry.js +1 -1
- package/dist/esm/ifx-dropdown-menu.entry.js +1 -1
- package/dist/esm/ifx-dropdown-separator.entry.js +1 -1
- package/dist/esm/ifx-dropdown-trigger-button.entry.js +1 -1
- package/dist/esm/ifx-dropdown-trigger.entry.js +1 -1
- package/dist/esm/ifx-dropdown.entry.js +1 -1
- package/dist/esm/ifx-faq.entry.js +2 -2
- package/dist/esm/ifx-filter-accordion.entry.js +1 -1
- 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-footer-column.entry.js +1 -1
- package/dist/esm/ifx-footer.entry.js +1 -1
- package/dist/esm/ifx-icon-button.entry.js +1 -1
- package/dist/esm/ifx-icon.entry.js +1 -1
- package/dist/esm/ifx-icons-preview.entry.js +1 -1
- package/dist/esm/ifx-link.entry.js +1 -1
- package/dist/esm/ifx-list-entry.entry.js +1 -1
- package/dist/esm/ifx-list-group.entry.js +1 -1
- package/dist/esm/ifx-list-item.entry.js +1 -1
- package/dist/esm/ifx-list-notification.entry.js +1 -1
- package/dist/esm/ifx-list.entry.js +1 -1
- package/dist/esm/ifx-modal.entry.js +1 -1
- package/dist/esm/{ifx-multiselect_2.entry.js → ifx-multiselect.entry.js} +3 -70
- package/dist/esm/ifx-multiselect.entry.js.map +1 -0
- package/dist/esm/ifx-navbar-item.entry.js +1 -1
- package/dist/esm/ifx-navbar-profile.entry.js +1 -1
- package/dist/esm/ifx-navbar.entry.js +1 -1
- package/dist/esm/ifx-notification.entry.js +1 -1
- package/dist/esm/ifx-number-indicator.entry.js +1 -1
- package/dist/esm/ifx-overview-table.entry.js +1 -1
- package/dist/esm/ifx-progress-bar.entry.js +1 -1
- package/dist/esm/ifx-radio-button.entry.js +1 -1
- package/dist/esm/ifx-search-bar.entry.js +1 -1
- package/dist/esm/ifx-search-field.entry.js +1 -1
- package/dist/esm/ifx-segment.entry.js +1 -1
- package/dist/esm/ifx-segmented-control.entry.js +1 -1
- package/dist/esm/ifx-select.entry.js +1 -1
- package/dist/esm/ifx-set-filter.entry.js +1 -1
- package/dist/esm/ifx-sidebar-item.entry.js +1 -1
- package/dist/esm/ifx-sidebar-title.entry.js +1 -1
- package/dist/esm/ifx-sidebar.entry.js +1 -1
- package/dist/esm/ifx-slider.entry.js +1 -1
- package/dist/esm/ifx-spinner_2.entry.js +98 -0
- package/dist/esm/ifx-spinner_2.entry.js.map +1 -0
- package/dist/esm/ifx-status.entry.js +1 -1
- package/dist/esm/ifx-step.entry.js +1 -1
- package/dist/esm/ifx-stepper.entry.js +1 -1
- 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 +1 -1
- package/dist/esm/ifx-tabs.entry.js +1 -1
- package/dist/esm/ifx-tag.entry.js +1 -1
- package/dist/esm/ifx-templates-ui.entry.js +57 -0
- package/dist/esm/ifx-templates-ui.entry.js.map +1 -0
- package/dist/esm/ifx-textarea.entry.js +3 -3
- package/dist/esm/ifx-tooltip.entry.js +5 -5
- package/dist/esm/{index-fc6a5751.js → index-d021b985.js} +30 -20
- package/dist/esm/index-d021b985.js.map +1 -0
- package/dist/esm/infineon-design-system-stencil.js +3 -3
- package/dist/esm/loader.js +3 -3
- 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-37654645.entry.js → p-005cee40.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-1d9e400c.entry.js → p-070a401c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-d31a6167.entry.js → p-0b2330b1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-fcf71895.entry.js → p-0c6417aa.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b3fb648f.entry.js → p-10f2f4d2.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c2e6cbdb.entry.js → p-15c2d91e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-1a9b19fa.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-1a9b19fa.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-37ecac74.entry.js → p-1e32dc46.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-47476fcb.entry.js → p-1f0a54f5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-21ab54a8.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-21ab54a8.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-c61a9185.entry.js → p-21f9efe3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4111bbdc.entry.js → p-22c3e2a6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7378190d.entry.js → p-23061813.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-39697853.entry.js → p-23fc1ac6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ea74d7ab.entry.js → p-2cde10eb.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-50e122c4.entry.js → p-2deacdfc.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-3419fe00.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-2ae0a0d0.entry.js → p-3a64f78a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-30640970.entry.js → p-3b597917.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5edfe317.entry.js → p-3e313cf5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-cb0ddc9b.entry.js → p-3f71f020.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0b5ad497.entry.js → p-4082111f.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0c570fa2.entry.js → p-4126ee6a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2d17e5b2.entry.js → p-4626a7a5.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-49872432.entry.js → p-4b7b93c4.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-31e9d4f8.entry.js → p-5269c5f6.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a3c03169.entry.js → p-55e8c571.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a10f9b3c.entry.js → p-577e735a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c22f8c81.entry.js → p-5a134c12.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5992e272.entry.js → p-67efe96d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-cdad5d2c.entry.js → p-6c3947ee.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-db4a364b.entry.js → p-6d82d306.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-951cf503.entry.js → p-6ff541a9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-02be14a9.entry.js → p-716f6675.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2e8c0115.entry.js → p-7973be1c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-7aa4082c.js +3 -0
- package/dist/infineon-design-system-stencil/{p-80bb0959.js.map → p-7aa4082c.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-79b4d359.entry.js → p-80d79ac2.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-3be58aa2.entry.js → p-8299d886.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b30b66e5.entry.js → p-83a3c6d9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-f3383274.entry.js → p-85b95a9b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b8f31dc3.entry.js → p-8822c055.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-2fbad873.entry.js → p-8bd1eb2e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e6427f2e.entry.js → p-8c0caf65.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a29b6247.entry.js → p-8ccea8df.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4349aa3a.entry.js → p-9256384e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-d323e4ed.entry.js → p-95c0da4c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-41b0849d.entry.js → p-95c56362.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6ad287cf.entry.js → p-9c641115.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-666e0ea0.entry.js → p-9e68df13.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4af08129.entry.js → p-a4205f38.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-a76a2ec0.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-a76a2ec0.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-8b089cd1.entry.js → p-a7b721e4.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-bc40ad21.entry.js → p-a825eb1f.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-985c7bdc.entry.js → p-b10e3175.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-1b9317bd.entry.js → p-b1543f1d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ee68427e.entry.js → p-bbc7a00e.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-31889cb2.entry.js → p-c9211767.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-1175d112.entry.js → p-ca00d3c8.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c9aca4b7.entry.js → p-cc49128c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ce9e5451.entry.js → p-d0afd036.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-8c9887e3.entry.js → p-d4432905.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-16348b9d.entry.js → p-d517ea6c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6e61295f.entry.js → p-d70843bb.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b010bfcb.entry.js → p-d74b939d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-f121e197.entry.js → p-d7b5242d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e8cde48d.entry.js → p-da42f326.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-1f329979.entry.js → p-e2c6464a.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-e3ce1662.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-e3ce1662.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-16f9a47c.entry.js → p-e76c8cce.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5cc523fb.entry.js → p-ec5fcb90.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-208b28b1.entry.js → p-f037e2e1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-9c50bc3e.entry.js → p-f2ba1590.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-dba5e033.entry.js → p-f93d0e29.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-336778c3.entry.js → p-f98cae21.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-ff8f6ddc.entry.js +2 -0
- package/dist/types/components/templates/template/template.d.ts +33 -0
- package/dist/types/components/templates/templates-ui/templates-ui.d.ts +10 -0
- package/dist/types/components.d.ts +49 -0
- package/package.json +1 -1
- package/dist/cjs/ifx-alert.cjs.entry.js +0 -49
- package/dist/cjs/ifx-alert.cjs.entry.js.map +0 -1
- package/dist/cjs/ifx-multiselect_2.cjs.entry.js.map +0 -1
- package/dist/cjs/ifx-spinner.cjs.entry.js +0 -35
- package/dist/cjs/ifx-spinner.cjs.entry.js.map +0 -1
- package/dist/cjs/index-f6c58643.js.map +0 -1
- package/dist/esm/ifx-alert.entry.js.map +0 -1
- package/dist/esm/ifx-multiselect_2.entry.js.map +0 -1
- package/dist/esm/ifx-spinner.entry.js.map +0 -1
- package/dist/esm/index-fc6a5751.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-0ddf85fc.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-0ddf85fc.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-25bf54c9.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-492a9ab7.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-4aab4af4.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-4aab4af4.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-75436967.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-75436967.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-80bb0959.js +0 -3
- /package/dist/infineon-design-system-stencil/{p-37654645.entry.js.map → p-005cee40.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-1d9e400c.entry.js.map → p-070a401c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d31a6167.entry.js.map → p-0b2330b1.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-fcf71895.entry.js.map → p-0c6417aa.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b3fb648f.entry.js.map → p-10f2f4d2.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c2e6cbdb.entry.js.map → p-15c2d91e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-37ecac74.entry.js.map → p-1e32dc46.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-47476fcb.entry.js.map → p-1f0a54f5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c61a9185.entry.js.map → p-21f9efe3.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4111bbdc.entry.js.map → p-22c3e2a6.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7378190d.entry.js.map → p-23061813.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-39697853.entry.js.map → p-23fc1ac6.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ea74d7ab.entry.js.map → p-2cde10eb.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-50e122c4.entry.js.map → p-2deacdfc.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-25bf54c9.entry.js.map → p-3419fe00.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2ae0a0d0.entry.js.map → p-3a64f78a.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-30640970.entry.js.map → p-3b597917.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5edfe317.entry.js.map → p-3e313cf5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-cb0ddc9b.entry.js.map → p-3f71f020.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0b5ad497.entry.js.map → p-4082111f.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0c570fa2.entry.js.map → p-4126ee6a.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2d17e5b2.entry.js.map → p-4626a7a5.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-49872432.entry.js.map → p-4b7b93c4.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-31e9d4f8.entry.js.map → p-5269c5f6.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a3c03169.entry.js.map → p-55e8c571.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a10f9b3c.entry.js.map → p-577e735a.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c22f8c81.entry.js.map → p-5a134c12.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5992e272.entry.js.map → p-67efe96d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-cdad5d2c.entry.js.map → p-6c3947ee.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-db4a364b.entry.js.map → p-6d82d306.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-951cf503.entry.js.map → p-6ff541a9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-02be14a9.entry.js.map → p-716f6675.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2e8c0115.entry.js.map → p-7973be1c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-79b4d359.entry.js.map → p-80d79ac2.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-3be58aa2.entry.js.map → p-8299d886.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b30b66e5.entry.js.map → p-83a3c6d9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-f3383274.entry.js.map → p-85b95a9b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b8f31dc3.entry.js.map → p-8822c055.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-2fbad873.entry.js.map → p-8bd1eb2e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e6427f2e.entry.js.map → p-8c0caf65.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a29b6247.entry.js.map → p-8ccea8df.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4349aa3a.entry.js.map → p-9256384e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d323e4ed.entry.js.map → p-95c0da4c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-41b0849d.entry.js.map → p-95c56362.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6ad287cf.entry.js.map → p-9c641115.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-666e0ea0.entry.js.map → p-9e68df13.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4af08129.entry.js.map → p-a4205f38.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8b089cd1.entry.js.map → p-a7b721e4.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-bc40ad21.entry.js.map → p-a825eb1f.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-985c7bdc.entry.js.map → p-b10e3175.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-1b9317bd.entry.js.map → p-b1543f1d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ee68427e.entry.js.map → p-bbc7a00e.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-31889cb2.entry.js.map → p-c9211767.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-1175d112.entry.js.map → p-ca00d3c8.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c9aca4b7.entry.js.map → p-cc49128c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ce9e5451.entry.js.map → p-d0afd036.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8c9887e3.entry.js.map → p-d4432905.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-16348b9d.entry.js.map → p-d517ea6c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6e61295f.entry.js.map → p-d70843bb.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b010bfcb.entry.js.map → p-d74b939d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-f121e197.entry.js.map → p-d7b5242d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e8cde48d.entry.js.map → p-da42f326.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-1f329979.entry.js.map → p-e2c6464a.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-16f9a47c.entry.js.map → p-e76c8cce.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5cc523fb.entry.js.map → p-ec5fcb90.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-208b28b1.entry.js.map → p-f037e2e1.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-9c50bc3e.entry.js.map → p-f2ba1590.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-dba5e033.entry.js.map → p-f93d0e29.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-336778c3.entry.js.map → p-f98cae21.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-492a9ab7.entry.js.map → p-ff8f6ddc.entry.js.map} +0 -0
@@ -0,0 +1,263 @@
|
|
1
|
+
import { h } from "@stencil/core";
|
2
|
+
export class Template {
|
3
|
+
constructor() {
|
4
|
+
this.repoDetails = { name: "", desc: "", framework: "" };
|
5
|
+
this.repoUrl = undefined;
|
6
|
+
this.showDetails = false;
|
7
|
+
this.isTemplatePage = false;
|
8
|
+
this.isLoading = true;
|
9
|
+
this.repoError = undefined;
|
10
|
+
this.name = undefined;
|
11
|
+
this.thumbnail = undefined;
|
12
|
+
}
|
13
|
+
authUser() {
|
14
|
+
const clientId = process.env.CLIENT_ID;
|
15
|
+
const redirectUri = 'http://localhost:6262/?path=/docs/dds-templates--development';
|
16
|
+
const scope = process.env.SCOPE;
|
17
|
+
const state = process.env.STATE;
|
18
|
+
const authorizationUrl = `https://github.com/login/oauth/authorize?` +
|
19
|
+
`client_id=${clientId}&` +
|
20
|
+
`redirect_uri=${redirectUri}&` +
|
21
|
+
`scope=${scope}&` +
|
22
|
+
`state=${state}`;
|
23
|
+
window.open(authorizationUrl, '_blank');
|
24
|
+
}
|
25
|
+
componentDidLoad() {
|
26
|
+
const url = new URL(window.location.href);
|
27
|
+
const code = url.searchParams.get('code');
|
28
|
+
const { templateName } = this.getLocalStorageValues();
|
29
|
+
if (code && this.name === templateName) {
|
30
|
+
this.isTemplatePage = true;
|
31
|
+
this.toggleTemplates.emit('details');
|
32
|
+
this.getUserToken(code);
|
33
|
+
}
|
34
|
+
}
|
35
|
+
getLocalStorageValues() {
|
36
|
+
const repoName = localStorage.getItem('repo_name');
|
37
|
+
const repoDesc = localStorage.getItem('repo_desc');
|
38
|
+
const repoFramework = localStorage.getItem('repo_framework');
|
39
|
+
const templateName = localStorage.getItem('selectedTemplate');
|
40
|
+
return { repoName, repoDesc, repoFramework, templateName };
|
41
|
+
}
|
42
|
+
async getUserToken(authCode) {
|
43
|
+
const { repoName, repoDesc, repoFramework, templateName } = this.getLocalStorageValues();
|
44
|
+
fetch(`http://localhost:5000/token/${authCode}/${repoName}/${repoDesc}/${repoFramework}/${templateName}`)
|
45
|
+
.then(response => {
|
46
|
+
if (response.ok) {
|
47
|
+
return response.text();
|
48
|
+
}
|
49
|
+
else {
|
50
|
+
return response.text().then(errorMessage => {
|
51
|
+
throw new Error(errorMessage);
|
52
|
+
});
|
53
|
+
}
|
54
|
+
})
|
55
|
+
.then(data => {
|
56
|
+
if (data) {
|
57
|
+
this.isLoading = false;
|
58
|
+
this.repoUrl = data;
|
59
|
+
localStorage.clear();
|
60
|
+
}
|
61
|
+
})
|
62
|
+
.catch(error => {
|
63
|
+
this.repoError = error.message;
|
64
|
+
console.error('Error:', error.message);
|
65
|
+
});
|
66
|
+
}
|
67
|
+
handleUserInput(e, type) {
|
68
|
+
if (type === 'name') {
|
69
|
+
this.repoDetails = Object.assign(Object.assign({}, this.repoDetails), { name: e.target.value });
|
70
|
+
}
|
71
|
+
else if (type === 'desc') {
|
72
|
+
this.repoDetails = Object.assign(Object.assign({}, this.repoDetails), { desc: e.target.value });
|
73
|
+
}
|
74
|
+
else if (type === 'framework') {
|
75
|
+
this.repoDetails = Object.assign(Object.assign({}, this.repoDetails), { framework: e.target.value });
|
76
|
+
}
|
77
|
+
}
|
78
|
+
submitUserData() {
|
79
|
+
if (this.repoDetails.name && this.repoDetails.desc && this.repoDetails.framework) {
|
80
|
+
localStorage.setItem('repo_name', this.repoDetails.name);
|
81
|
+
localStorage.setItem('repo_desc', this.repoDetails.desc);
|
82
|
+
localStorage.setItem('repo_framework', this.repoDetails.framework);
|
83
|
+
localStorage.setItem('selectedTemplate', this.name);
|
84
|
+
this.fieldError.emit(false);
|
85
|
+
this.authUser();
|
86
|
+
}
|
87
|
+
else {
|
88
|
+
this.fieldError.emit('All fields are mandatory');
|
89
|
+
}
|
90
|
+
}
|
91
|
+
togglePadding(action) {
|
92
|
+
let parent = this.el.parentElement;
|
93
|
+
if (parent) {
|
94
|
+
const rootNode = parent.getRootNode();
|
95
|
+
if (rootNode instanceof ShadowRoot) {
|
96
|
+
parent = rootNode.host.parentElement;
|
97
|
+
}
|
98
|
+
else {
|
99
|
+
parent = parent.parentElement;
|
100
|
+
}
|
101
|
+
if (action === 'remove') {
|
102
|
+
parent.parentElement.style.padding = '0px';
|
103
|
+
}
|
104
|
+
else if (action === 'add') {
|
105
|
+
parent.parentElement.style.padding = '4rem 20px';
|
106
|
+
}
|
107
|
+
}
|
108
|
+
}
|
109
|
+
handleCurrentTemplate(e) {
|
110
|
+
if (e && !this.showDetails) {
|
111
|
+
this.togglePadding('remove');
|
112
|
+
const targetTemplate = e.currentTarget;
|
113
|
+
this.toggleTemplates.emit(targetTemplate);
|
114
|
+
this.showDetails = true;
|
115
|
+
}
|
116
|
+
}
|
117
|
+
async toggleTemplate(currTemp) {
|
118
|
+
const templateWrapper = this.el.shadowRoot.querySelector('.react__template-wrapper');
|
119
|
+
if (templateWrapper) {
|
120
|
+
if (!templateWrapper.classList.contains('hide') && currTemp) {
|
121
|
+
if (templateWrapper !== currTemp) {
|
122
|
+
templateWrapper.classList.add('hide');
|
123
|
+
}
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
if (this.showDetails) {
|
127
|
+
this.showDetails = false;
|
128
|
+
}
|
129
|
+
this.togglePadding('add');
|
130
|
+
templateWrapper.classList.remove('hide');
|
131
|
+
}
|
132
|
+
}
|
133
|
+
}
|
134
|
+
render() {
|
135
|
+
return (h("div", { key: 'de9032e360a189b62a9b6b861f2dabbdd21cb409' }, this.isTemplatePage
|
136
|
+
?
|
137
|
+
h("div", { class: "template__page-wrapper" }, !this.repoUrl && !this.repoError &&
|
138
|
+
h("div", null, h("h3", null, "Your repository is getting ready.."), h("p", null, "This will only take a minute.")), this.isLoading && !this.repoError && h("div", null, h("ifx-spinner", { variant: 'default', size: 's' })), this.repoUrl && h("ifx-link", { href: this.repoUrl, target: "_parent", size: "m", variant: "underlined" }, "Your repository"), this.repoError && h("div", null, this.repoError))
|
139
|
+
:
|
140
|
+
h("div", { class: "react__template-container" }, h("div", { class: "react__template-wrapper", onClick: (e) => this.handleCurrentTemplate(e) }, h("div", { class: "image__wrapper" }, h("img", { src: this.thumbnail }))), this.showDetails &&
|
141
|
+
h("div", { class: "details__wrapper" }, h("div", { class: "selection__buttons-wrapper" }, h("div", { class: "selection__input" }, h("input", { type: "radio", id: "react", name: "chosen_framework", value: "react", onInput: (e) => this.handleUserInput(e, 'framework') }), h("label", { htmlFor: "react" }, "React")), h("div", { class: "selection__input vue" }, h("input", { class: "vue__input", disabled: true, type: "radio", id: "vue", name: "chosen_framework", value: "vue", onInput: (e) => this.handleUserInput(e, 'framework') }), h("label", { class: "vue__label", htmlFor: "vue" }, "Vue"), " (Soon)")), h("div", { class: "input__fields-wrapper" }, h("ifx-text-field", { required: true, onInput: (e) => this.handleUserInput(e, 'name'), size: "m", icon: "c-info-16", placeholder: "Your repository name" }, "Repository Name"), h("ifx-text-field", { required: true, size: "m", icon: "c-info-16", onInput: (e) => this.handleUserInput(e, 'desc'), placeholder: "Your repository description" }, "Repository Description"), h("ifx-button", { fullWidth: true, onClick: () => this.submitUserData(), variant: 'primary' }, "Generate template"))))));
|
142
|
+
}
|
143
|
+
static get is() { return "ifx-template"; }
|
144
|
+
static get encapsulation() { return "shadow"; }
|
145
|
+
static get originalStyleUrls() {
|
146
|
+
return {
|
147
|
+
"$": ["template.scss"]
|
148
|
+
};
|
149
|
+
}
|
150
|
+
static get styleUrls() {
|
151
|
+
return {
|
152
|
+
"$": ["template.css"]
|
153
|
+
};
|
154
|
+
}
|
155
|
+
static get properties() {
|
156
|
+
return {
|
157
|
+
"name": {
|
158
|
+
"type": "string",
|
159
|
+
"mutable": false,
|
160
|
+
"complexType": {
|
161
|
+
"original": "string",
|
162
|
+
"resolved": "string",
|
163
|
+
"references": {}
|
164
|
+
},
|
165
|
+
"required": false,
|
166
|
+
"optional": false,
|
167
|
+
"docs": {
|
168
|
+
"tags": [],
|
169
|
+
"text": ""
|
170
|
+
},
|
171
|
+
"attribute": "name",
|
172
|
+
"reflect": false
|
173
|
+
},
|
174
|
+
"thumbnail": {
|
175
|
+
"type": "string",
|
176
|
+
"mutable": false,
|
177
|
+
"complexType": {
|
178
|
+
"original": "string",
|
179
|
+
"resolved": "string",
|
180
|
+
"references": {}
|
181
|
+
},
|
182
|
+
"required": false,
|
183
|
+
"optional": false,
|
184
|
+
"docs": {
|
185
|
+
"tags": [],
|
186
|
+
"text": ""
|
187
|
+
},
|
188
|
+
"attribute": "thumbnail",
|
189
|
+
"reflect": false
|
190
|
+
}
|
191
|
+
};
|
192
|
+
}
|
193
|
+
static get states() {
|
194
|
+
return {
|
195
|
+
"repoDetails": {},
|
196
|
+
"repoUrl": {},
|
197
|
+
"showDetails": {},
|
198
|
+
"isTemplatePage": {},
|
199
|
+
"isLoading": {},
|
200
|
+
"repoError": {}
|
201
|
+
};
|
202
|
+
}
|
203
|
+
static get events() {
|
204
|
+
return [{
|
205
|
+
"method": "toggleTemplates",
|
206
|
+
"name": "toggleTemplates",
|
207
|
+
"bubbles": true,
|
208
|
+
"cancelable": true,
|
209
|
+
"composed": true,
|
210
|
+
"docs": {
|
211
|
+
"tags": [],
|
212
|
+
"text": ""
|
213
|
+
},
|
214
|
+
"complexType": {
|
215
|
+
"original": "any",
|
216
|
+
"resolved": "any",
|
217
|
+
"references": {}
|
218
|
+
}
|
219
|
+
}, {
|
220
|
+
"method": "fieldError",
|
221
|
+
"name": "fieldError",
|
222
|
+
"bubbles": true,
|
223
|
+
"cancelable": true,
|
224
|
+
"composed": true,
|
225
|
+
"docs": {
|
226
|
+
"tags": [],
|
227
|
+
"text": ""
|
228
|
+
},
|
229
|
+
"complexType": {
|
230
|
+
"original": "any",
|
231
|
+
"resolved": "any",
|
232
|
+
"references": {}
|
233
|
+
}
|
234
|
+
}];
|
235
|
+
}
|
236
|
+
static get methods() {
|
237
|
+
return {
|
238
|
+
"toggleTemplate": {
|
239
|
+
"complexType": {
|
240
|
+
"signature": "(currTemp: any) => Promise<void>",
|
241
|
+
"parameters": [{
|
242
|
+
"name": "currTemp",
|
243
|
+
"type": "any",
|
244
|
+
"docs": ""
|
245
|
+
}],
|
246
|
+
"references": {
|
247
|
+
"Promise": {
|
248
|
+
"location": "global",
|
249
|
+
"id": "global::Promise"
|
250
|
+
}
|
251
|
+
},
|
252
|
+
"return": "Promise<void>"
|
253
|
+
},
|
254
|
+
"docs": {
|
255
|
+
"text": "",
|
256
|
+
"tags": []
|
257
|
+
}
|
258
|
+
}
|
259
|
+
};
|
260
|
+
}
|
261
|
+
static get elementRef() { return "el"; }
|
262
|
+
}
|
263
|
+
//# sourceMappingURL=template.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../src/components/templates/template/template.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI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AE,OAAO,EAAC,SAAS,wBAA+B,CAC/G,CAEF,CACF,CACF,CACP,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Element, State, Prop, Event, EventEmitter, Method } from '@stencil/core';\n\n@Component({\n tag: 'ifx-template',\n styleUrl: 'template.scss',\n shadow: true,\n})\nexport class Template {\n @Element() el: HTMLElement;\n @State() repoDetails: { name: string, desc: string, framework: string } = { name: \"\", desc: \"\", framework: \"\" };\n @State() repoUrl: string;\n @State() showDetails: boolean = false;\n @State() isTemplatePage: boolean = false;\n @State() isLoading: boolean = true;\n @State() repoError: string;\n @Prop() name: string;\n @Event() toggleTemplates: EventEmitter;\n @Event() fieldError: EventEmitter;\n @Prop() thumbnail: string;\n\n authUser() { \n const clientId = process.env.CLIENT_ID;\n const redirectUri = 'http://localhost:6262/?path=/docs/dds-templates--development';\n const scope = process.env.SCOPE;\n const state = process.env.STATE;\n\n const authorizationUrl = `https://github.com/login/oauth/authorize?` +\n `client_id=${clientId}&` +\n `redirect_uri=${redirectUri}&` +\n `scope=${scope}&` +\n `state=${state}`;\n \n window.open(authorizationUrl, '_blank'); \n }\n\n componentDidLoad() { \n const url = new URL(window.location.href);\n const code = url.searchParams.get('code');\n const { templateName } = this.getLocalStorageValues()\n if(code && this.name === templateName) { \n this.isTemplatePage = true;\n this.toggleTemplates.emit('details')\n this.getUserToken(code)\n } \n }\n\n getLocalStorageValues() { \n const repoName = localStorage.getItem('repo_name');\n const repoDesc = localStorage.getItem('repo_desc');\n const repoFramework = localStorage.getItem('repo_framework');\n const templateName = localStorage.getItem('selectedTemplate');\n return { repoName, repoDesc, repoFramework, templateName }\n }\n\n async getUserToken(authCode) {\n const { repoName, repoDesc, repoFramework, templateName } = this.getLocalStorageValues();\n\n fetch(`http://localhost:5000/token/${authCode}/${repoName}/${repoDesc}/${repoFramework}/${templateName}`)\n .then(response => {\n if (response.ok) {\n return response.text();\n } else {\n return response.text().then(errorMessage => {\n throw new Error(errorMessage);\n });\n }\n })\n .then(data => { \n if(data) { \n this.isLoading = false;\n this.repoUrl = data;\n localStorage.clear();\n } \n })\n .catch(error => {\n this.repoError = error.message;\n console.error('Error:', error.message)\n });\n }\n\n handleUserInput(e, type) { \n if (type === 'name') {\n this.repoDetails = { ...this.repoDetails, name: e.target.value };\n } else if (type === 'desc') {\n this.repoDetails = { ...this.repoDetails, desc: e.target.value };\n } else if(type === 'framework') { \n this.repoDetails = { ...this.repoDetails, framework: e.target.value };\n }\n }\n\n submitUserData() { \n if(this.repoDetails.name && this.repoDetails.desc && this.repoDetails.framework) { \n localStorage.setItem('repo_name', this.repoDetails.name);\n localStorage.setItem('repo_desc', this.repoDetails.desc);\n localStorage.setItem('repo_framework', this.repoDetails.framework);\n localStorage.setItem('selectedTemplate', this.name);\n this.fieldError.emit(false)\n this.authUser()\n } else { \n this.fieldError.emit('All fields are mandatory')\n }\n }\n\n togglePadding(action) { \n let parent = this.el.parentElement;\n if (parent) {\n const rootNode = parent.getRootNode();\n if (rootNode instanceof ShadowRoot) {\n parent = rootNode.host.parentElement;\n } else {\n parent = parent.parentElement;\n }\n if(action === 'remove') { \n parent.parentElement.style.padding = '0px';\n } else if(action === 'add') { \n parent.parentElement.style.padding = '4rem 20px';\n }\n }\n }\n\n handleCurrentTemplate(e) { \n if(e && !this.showDetails) { \n this.togglePadding('remove')\n const targetTemplate = e.currentTarget;\n this.toggleTemplates.emit(targetTemplate)\n this.showDetails = true;\n } \n }\n\n @Method()\n async toggleTemplate(currTemp) { \n const templateWrapper = this.el.shadowRoot.querySelector('.react__template-wrapper');\n if(templateWrapper) { \n if(!templateWrapper.classList.contains('hide') && currTemp ) { \n if(templateWrapper !== currTemp) {\n templateWrapper.classList.add('hide')\n }\n } else { \n if(this.showDetails) { \n this.showDetails = false;\n }\n this.togglePadding('add')\n templateWrapper.classList.remove('hide')\n }\n }\n }\n\n \n render() {\n return (\n <div>\n {this.isTemplatePage \n ? \n <div class=\"template__page-wrapper\">\n {!this.repoUrl && !this.repoError && \n <div>\n <h3>Your repository is getting ready..</h3>\n <p>This will only take a minute.</p>\n </div>}\n {this.isLoading && !this.repoError && <div><ifx-spinner variant='default' size='s' /></div>}\n {this.repoUrl && <ifx-link href={this.repoUrl} target=\"_parent\" size=\"m\" variant=\"underlined\">Your repository</ifx-link>}\n {this.repoError && <div>{this.repoError}</div>}\n </div> \n : \n <div class=\"react__template-container\">\n <div class=\"react__template-wrapper\" onClick={(e) => this.handleCurrentTemplate(e)}>\n <div class=\"image__wrapper\">\n <img src={this.thumbnail} />\n </div>\n </div>\n {this.showDetails && \n <div class=\"details__wrapper\">\n <div class=\"selection__buttons-wrapper\">\n <div class=\"selection__input\">\n <input type=\"radio\" id=\"react\" name=\"chosen_framework\" value=\"react\" onInput={(e) => this.handleUserInput(e, 'framework')} />\n <label htmlFor=\"react\">React</label>\n </div>\n <div class=\"selection__input vue\">\n <input class=\"vue__input\" disabled type=\"radio\" id=\"vue\" name=\"chosen_framework\" value=\"vue\" onInput={(e) => this.handleUserInput(e, 'framework')}/>\n <label class=\"vue__label\" htmlFor=\"vue\">Vue</label> (Soon)\n </div>\n </div>\n \n\n <div class=\"input__fields-wrapper\">\n <ifx-text-field required={true} onInput={(e) => this.handleUserInput(e, 'name')} size=\"m\" icon=\"c-info-16\" placeholder=\"Your repository name\">Repository Name</ifx-text-field>\n\n <ifx-text-field required={true} size=\"m\" icon=\"c-info-16\" onInput={(e) => this.handleUserInput(e, 'desc')} placeholder=\"Your repository description\">Repository Description</ifx-text-field>\n\n <ifx-button fullWidth={true} onClick={() => this.submitUserData()} variant='primary'>Generate template</ifx-button>\n </div>\n \n </div>}\n </div>}\n </div>\n );\n }\n}"]}
|
@@ -0,0 +1,33 @@
|
|
1
|
+
* {
|
2
|
+
padding: 0;
|
3
|
+
margin: 0;
|
4
|
+
}
|
5
|
+
|
6
|
+
.templates__container {
|
7
|
+
display: flex;
|
8
|
+
flex-direction: column;
|
9
|
+
align-items: center;
|
10
|
+
}
|
11
|
+
.templates__container .back__btn-wrapper {
|
12
|
+
display: none;
|
13
|
+
}
|
14
|
+
.templates__container .back__btn-wrapper.show {
|
15
|
+
display: flex;
|
16
|
+
justify-content: space-between;
|
17
|
+
width: 100%;
|
18
|
+
}
|
19
|
+
.templates__container .back__btn-wrapper .alert__wrapper {
|
20
|
+
display: none;
|
21
|
+
}
|
22
|
+
.templates__container .back__btn-wrapper .alert__wrapper.show {
|
23
|
+
display: block;
|
24
|
+
}
|
25
|
+
.templates__container .templates__wrapper {
|
26
|
+
display: flex;
|
27
|
+
padding: 20px 0px;
|
28
|
+
gap: 20px;
|
29
|
+
flex-wrap: wrap;
|
30
|
+
}
|
31
|
+
.templates__container .templates__title.hide {
|
32
|
+
display: none;
|
33
|
+
}
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import { h, getAssetPath } from "@stencil/core";
|
2
|
+
export class TemplatesUI {
|
3
|
+
constructor() {
|
4
|
+
this.tableTemplate = getAssetPath(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/table_template.png`);
|
5
|
+
this.wizardTemplate = getAssetPath(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/wizard_template.png`);
|
6
|
+
}
|
7
|
+
toggleTemplate(currTemp) {
|
8
|
+
const templates = this.el.shadowRoot.querySelector('.templates__wrapper').querySelectorAll('ifx-template');
|
9
|
+
templates.forEach((template) => {
|
10
|
+
template.toggleTemplate(currTemp);
|
11
|
+
});
|
12
|
+
}
|
13
|
+
handleError(e) {
|
14
|
+
const alertWrapper = this.el.shadowRoot.querySelector('.alert__wrapper');
|
15
|
+
if (e.detail) {
|
16
|
+
alertWrapper.classList.add('show');
|
17
|
+
}
|
18
|
+
else {
|
19
|
+
alertWrapper.classList.remove('show');
|
20
|
+
}
|
21
|
+
}
|
22
|
+
filterTemplates(e) {
|
23
|
+
const title = this.el.shadowRoot.querySelector('.templates__title');
|
24
|
+
const backBtn = this.el.shadowRoot.querySelector('.back__btn-wrapper');
|
25
|
+
if (e.detail) {
|
26
|
+
title.classList.add('hide');
|
27
|
+
if (e.detail !== 'details') {
|
28
|
+
backBtn.classList.add('show');
|
29
|
+
}
|
30
|
+
this.toggleTemplate(e.detail);
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
title.classList.remove('hide');
|
34
|
+
backBtn.classList.remove('show');
|
35
|
+
this.toggleTemplate(null);
|
36
|
+
}
|
37
|
+
}
|
38
|
+
closeAlert() {
|
39
|
+
const alertWrapper = this.el.shadowRoot.querySelector('.alert__wrapper');
|
40
|
+
alertWrapper.classList.remove('show');
|
41
|
+
}
|
42
|
+
render() {
|
43
|
+
return (h("div", { key: '021302ff1be7a098818f46abea24d04084ca3048', class: 'templates__container' }, h("div", { key: '7bdbf267abf9e7684b6f15d2149c6e0130ce3458', class: "back__btn-wrapper" }, h("ifx-icon-button", { key: 'b38d94883924f12f40619ad96b3d4ef1da3a8831', onClick: () => this.filterTemplates(false), shape: "round", variant: "tertiary", icon: "arrow-left-16", target: "_blank", size: "m" }), h("div", { key: '7e6bcb6482bfebec1d9917e1ffa8655124d9e67d', class: "alert__wrapper" }, h("ifx-alert", { key: '4687bc498dab92676f947838398b7257e059f3c2', onClick: () => this.closeAlert(), "aria-live": "assertive", variant: "danger", icon: "c-info-24" }, "All fields are mandatory"))), h("h2", { key: 'c2420ad1ca629e5702b64043b47a113e9b387b87', class: "templates__title" }, "Choose your template"), h("div", { key: '5d7b84eaddb49ec2a98eae1bb19515fcc11eb7e5', class: "templates__wrapper" }, h("ifx-template", { key: 'bff5d0e5143a8d0a34904fc65564e0ce0487d437', name: 'template-01', thumbnail: this.tableTemplate }), h("ifx-template", { key: 'c8621f682b5d4eaf2dbab6ff41def757f7a8ddb0', name: 'template-02', thumbnail: this.wizardTemplate }))));
|
44
|
+
}
|
45
|
+
static get is() { return "ifx-templates-ui"; }
|
46
|
+
static get encapsulation() { return "shadow"; }
|
47
|
+
static get originalStyleUrls() {
|
48
|
+
return {
|
49
|
+
"$": ["templates-ui.scss"]
|
50
|
+
};
|
51
|
+
}
|
52
|
+
static get styleUrls() {
|
53
|
+
return {
|
54
|
+
"$": ["templates-ui.css"]
|
55
|
+
};
|
56
|
+
}
|
57
|
+
static get assetsDirs() { return ["assets"]; }
|
58
|
+
static get elementRef() { return "el"; }
|
59
|
+
static get listeners() {
|
60
|
+
return [{
|
61
|
+
"name": "fieldError",
|
62
|
+
"method": "handleError",
|
63
|
+
"target": undefined,
|
64
|
+
"capture": false,
|
65
|
+
"passive": false
|
66
|
+
}, {
|
67
|
+
"name": "toggleTemplates",
|
68
|
+
"method": "filterTemplates",
|
69
|
+
"target": undefined,
|
70
|
+
"capture": false,
|
71
|
+
"passive": false
|
72
|
+
}];
|
73
|
+
}
|
74
|
+
}
|
75
|
+
//# sourceMappingURL=templates-ui.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"templates-ui.js","sourceRoot":"","sources":["../../../../src/components/templates/templates-ui/templates-ui.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAS5E,MAAM,OAAO,WAAW;IAPxB;QAUU,kBAAa,GAAG,YAAY,CAAC,6FAA6F,CAAC,CAAC;QAC5H,mBAAc,GAAG,YAAY,CAAC,8FAA8F,CAAC,CAAC;KA2DvI;IAxDC,cAAc,CAAC,QAAQ;QACrB,MAAM,SAAS,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;QACzG,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC7B,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAA;QACnC,CAAC,CAAC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;IAED,MAAM;QACJ,OAAO,CACL,4DAAK,KAAK,EAAC,sBAAsB;YAC/B,4DAAK,KAAK,EAAC,mBAAmB;gBAC5B,wEAAiB,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,KAAK,EAAC,OAAO,EAAC,OAAO,EAAC,UAAU,EAAC,IAAI,EAAC,eAAe,EAAC,MAAM,EAAC,QAAQ,EAAC,IAAI,EAAC,GAAG,GAAG;gBAC9I,4DAAK,KAAK,EAAC,gBAAgB;oBACzB,kEAAW,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE,eAAY,WAAW,EAAC,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,WAAW,+BAAqC,CACrI,CACF;YACN,2DAAI,KAAK,EAAC,kBAAkB,2BAA0B;YACtD,4DAAK,KAAK,EAAC,oBAAoB;gBAC7B,qEAAc,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,IAAI,CAAC,aAAa,GAAI;gBAClE,qEAAc,IAAI,EAAC,aAAa,EAAC,SAAS,EAAE,IAAI,CAAC,cAAc,GAAI,CAC/D,CACF,CACP,CAAA;IACH,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Listen, Element, getAssetPath } from '@stencil/core';\n\n@Component({\n tag: 'ifx-templates-ui',\n styleUrl: 'templates-ui.scss',\n shadow: true,\n assetsDirs: ['assets']\n})\n\nexport class TemplatesUI {\n @Element() el: HTMLElement;\n\n private tableTemplate = getAssetPath(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/table_template.png`);\n private wizardTemplate = getAssetPath(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/wizard_template.png`);\n\n\n toggleTemplate(currTemp) { \n const templates = this.el.shadowRoot.querySelector('.templates__wrapper').querySelectorAll('ifx-template');\n templates.forEach((template) => { \n template.toggleTemplate(currTemp)\n })\n }\n\n @Listen('fieldError')\n handleError(e) { \n const alertWrapper = this.el.shadowRoot.querySelector('.alert__wrapper');\n if(e.detail) { \n alertWrapper.classList.add('show');\n } else { \n alertWrapper.classList.remove('show');\n }\n }\n\n @Listen('toggleTemplates')\n filterTemplates(e) {\n const title = this.el.shadowRoot.querySelector('.templates__title');\n const backBtn = this.el.shadowRoot.querySelector('.back__btn-wrapper');\n if(e.detail) { \n title.classList.add('hide');\n if(e.detail !== 'details') { \n backBtn.classList.add('show');\n }\n this.toggleTemplate(e.detail)\n } else { \n title.classList.remove('hide');\n backBtn.classList.remove('show');\n this.toggleTemplate(null)\n }\n }\n\n closeAlert() { \n const alertWrapper = this.el.shadowRoot.querySelector('.alert__wrapper');\n alertWrapper.classList.remove('show');\n }\n\n render() {\n return (\n <div class='templates__container'>\n <div class=\"back__btn-wrapper\">\n <ifx-icon-button onClick={() => this.filterTemplates(false)} shape=\"round\" variant=\"tertiary\" icon=\"arrow-left-16\" target=\"_blank\" size=\"m\" />\n <div class=\"alert__wrapper\">\n <ifx-alert onClick={() => this.closeAlert()} aria-live=\"assertive\" variant=\"danger\" icon=\"c-info-24\">All fields are mandatory</ifx-alert>\n </div>\n </div>\n <h2 class=\"templates__title\">Choose your template</h2>\n <div class=\"templates__wrapper\">\n <ifx-template name='template-01' thumbnail={this.tableTemplate} />\n <ifx-template name='template-02' thumbnail={this.wizardTemplate} />\n </div>\n </div>\n )\n }\n}\n"]}
|
@@ -39,12 +39,12 @@ export class TextField {
|
|
39
39
|
this.internals.setFormValue("");
|
40
40
|
}
|
41
41
|
render() {
|
42
|
-
return (h("div", { key: '
|
42
|
+
return (h("div", { key: 'f76a8efd672a84edb34e5b5e820ca8fe14182066', "aria-label": "a text field for user input", "aria-value": this.value, "aria-disabled": this.disabled, class: `textInput__container ${this.disabled ? 'disabled' : ""}` }, h("div", { key: '531b832f44b98dc863ee00e55d3625ff8de2c984', class: "textInput__top-wrapper" }, h("label", { key: '538bd51d59dce9ae1e03d9b47b78efc7509d35fc', htmlFor: "text-field" }, h("slot", { key: '7a7a08283630b1b768100d438daf435128af8549' }), this.optional && this.required ? (h("span", { class: "optional-required" }, "(optional) *")) : this.optional ? (h("span", { class: "optional" }, "(optional)")) : this.required ? (h("span", { class: `required ${this.error ? 'error' : ""}` }, "*")) : null)), h("div", { key: '291a820de5211c235d0bb9455379251af70f5388', class: "textInput__bottom-wrapper" }, h("div", { key: 'a633c93c4d2c278163890626d402ee8339955853', class: "input-container" }, this.icon && (h("ifx-icon", { key: '266d57aad6ff144924feaa781053dd2be24b59cc', class: 'input-icon', icon: this.icon })), h("input", { key: 'fc7f085ff9517422dfc0ffa1f020a8e4732cb6b8', ref: (el) => (this.inputElement = el), disabled: this.disabled, type: "text", id: 'text-field', value: this.value, onInput: () => this.handleInput(), placeholder: this.placeholder, maxlength: this.maxlength, class: `${this.icon ? 'icon' : ""}
|
43
43
|
${this.error ? 'error' : ""}
|
44
44
|
${this.size === "s" ? "input-s" : ""}
|
45
|
-
${this.success ? "success" : ""}` }), (this.showDeleteIcon && this.value) && (h("ifx-icon", { key: '
|
46
|
-
h("div", { key: '
|
47
|
-
h("div", { key: '
|
45
|
+
${this.success ? "success" : ""}` }), (this.showDeleteIcon && this.value) && (h("ifx-icon", { key: '5fc4424ef2ceee687e24c76954440fa71ed801d3', class: "delete-icon", icon: "cremove16", onClick: () => this.handleDeleteContent() }))), this.caption && !this.error &&
|
46
|
+
h("div", { key: 'e5ebfe2568a94ace8c6d258d525b51c8c8171dbc', class: `textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""` }, this.caption), this.error &&
|
47
|
+
h("div", { key: '87e75c5c412d0143311ef1adc11e79e9746ad718', class: "textInput__bottom-wrapper-caption error" }, this.caption))));
|
48
48
|
}
|
49
49
|
static get is() { return "ifx-text-field"; }
|
50
50
|
static get encapsulation() { return "shadow"; }
|
@@ -38,9 +38,9 @@ export class TextArea {
|
|
38
38
|
}
|
39
39
|
render() {
|
40
40
|
var _a, _b;
|
41
|
-
return (h(Host, { key: '
|
41
|
+
return (h(Host, { key: 'e5c17cac7a95922f09f368164922e4a1476cb1d0', class: `wrapper
|
42
42
|
wrapper--${this.error ? 'error' : ''}
|
43
|
-
wrapper--${this.disabled ? 'disabled' : ''}` }, h("label", { key: '
|
43
|
+
wrapper--${this.disabled ? 'disabled' : ''}` }, h("label", { key: '924af5892e76fca1b3e68670c42b95d963972d1b', class: 'wrapper__label', htmlFor: this.inputId }, (_a = this.label) === null || _a === void 0 ? void 0 : _a.trim()), h("div", { key: 'dc8be60590d330e62b0b9e56dcd3985095ac2039', class: 'wrapper__textarea' }, h("textarea", { key: 'a49734b30b44ae14d80a90448e807f12a1decb15', "aria-label": 'a textarea', "aria-value": this.value, "aria-disabled": this.disabled, id: this.inputId, style: { resize: this.resize }, name: this.name ? this.name : this.inputId, cols: this.cols, rows: this.rows, maxlength: this.maxlength, wrap: this.wrap, disabled: this.disabled, readonly: this.readOnly, placeholder: this.placeholder, value: this.value, onInput: (e) => this.handleOnInput(e) })), ((_b = this.caption) === null || _b === void 0 ? void 0 : _b.trim()) && (h("div", { key: '1b0a2afad717723ced888bbd13d5705ef5312922', class: 'wrapper__caption' }, this.caption.trim()))));
|
44
44
|
}
|
45
45
|
static get is() { return "ifx-textarea"; }
|
46
46
|
static get encapsulation() { return "shadow"; }
|
@@ -149,10 +149,10 @@ export class Tooltip {
|
|
149
149
|
'tooltip-extended': true,
|
150
150
|
'visible': this.tooltipVisible,
|
151
151
|
};
|
152
|
-
return (h("div", { key: '
|
153
|
-
h("div", { key: '
|
154
|
-
h("div", { key: '
|
155
|
-
h("svg", { class: "extended_icon", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24" }, h("path", { stroke: "#fff", "stroke-linecap": "round", "stroke-linejoin": "round", d: "M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z" }), h("path", { stroke: "#fff", d: "M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z" }), h("path", { fill: "#fff", d: "M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" }))), h("div", { key: '
|
152
|
+
return (h("div", { key: '3566693f57f31b7e8d1b7cfc86210d416a2ff405', "aria-label": "a tooltip showing important information", "aria-value": this.header, class: "tooltip__container" }, h("slot", { key: 'd8f66d71d9844579ba1a669d8b9d65e6b80285b9' }), this.variant.toLowerCase() === 'dismissible' && h("div", { key: '6a20c5e5b3b6f36460891529c31b15cbb2a3f80d', class: tooltipDismissible }, h("button", { key: '26e5b3de6264c5d669b6dd2e67ac720e7ed523d6', "aria-label": "Close Tooltip", class: "close-button", onClick: this.onDismissClick }, h("ifx-icon", { key: 'dd2e518cc33a4fad6a6625ac8ad93510c0ac8a76', icon: "cross16" })), h("div", { key: '8dfda31b92a2a68e902d9294dfafa829e2ae125d', class: "tooltip-dismissible-content" }, this.header && h("div", { key: '102cdcade59aa6087cef62a33cc40890cc712edc', class: "tooltip-dismissible-header" }, this.header), h("div", { key: '433c704e55e38e676ced43af80cbedf66a08ecef', class: "tooltip-dismissible-body" }, this.text)), h("svg", { key: 'dfed0dd56d3164ba18799ab39198f380993f6248', class: "tooltip-arrow-svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '915aec860f084f37befe14e1b29ced2dbe802ffe', id: "Indicator", d: "M6 0L12 8L0 8L6 0Z", fill: "#1D1D1D" }))), this.variant.toLowerCase() === 'compact' &&
|
153
|
+
h("div", { key: '0ab10da386219cfa266adfc8d01460a2f7861b70', class: tooltipCompact }, this.text, h("svg", { key: '1bfc2c79d905ef0c725f3a7b4ceb962280ad6ec1', class: "tooltip-arrow-svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'ce5383e429ceae096c397a177ee451a60ddaa20f', id: "Indicator", d: "M6 0L12 8L0 8L6 0Z", fill: "#1D1D1D" }))), this.variant.toLowerCase() === 'extended' &&
|
154
|
+
h("div", { key: '7f2d598a355e5105659531a7d65868a572b0c8d3', class: tooltipExtended }, h("slot", { key: 'a7194c3e4b34f6a80e973d721be9e928dc6b543a', name: "icon" }, this.icon ? h("div", { class: "extended_icon" }, h("ifx-icon", { icon: this.icon })) :
|
155
|
+
h("svg", { class: "extended_icon", xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24" }, h("path", { stroke: "#fff", "stroke-linecap": "round", "stroke-linejoin": "round", d: "M20.5 2.5h-16a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-16a2 2 0 0 0-2-2Z" }), h("path", { stroke: "#fff", d: "M19 17H6l2.5-4 2.097 2.516.405.486.379-.506 4.118-5.49.003-.002L19 17Z" }), h("path", { fill: "#fff", d: "M10 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z" }))), h("div", { key: '90c7c32649a095f7c7d5ca91dfb11565b6e4cefd', class: "tooltip-extended-content" }, this.header && h("div", { key: '2a685101980670bcda6dca798a1b4ff5dce2b0e9', class: "tooltip-extended-header" }, this.header), h("div", { key: '0e772b681e344b36852b40ad64a60c0fce70a026', class: "tooltip-extended-body" }, this.text)), h("svg", { key: '4ba674399371b299380f00788d5df4c2fab7c511', class: "tooltip-arrow-svg", width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'ad20591f248f3cd2132d33faaeb155043b53fb38', id: "Indicator", d: "M6 0L12 8L0 8L6 0Z", fill: "#1D1D1D" })))));
|
156
156
|
}
|
157
157
|
static get is() { return "ifx-tooltip"; }
|
158
158
|
static get encapsulation() { return "shadow"; }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './components'
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './components';\n"]}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { h } from "@stencil/core";
|
2
2
|
export class Faq {
|
3
3
|
render() {
|
4
|
-
return (h("div", { key: '
|
4
|
+
return (h("div", { key: '940635ca96aed75993f653a115ca4e76e711e0c1', class: 'container' }, h("ifx-accordion", { key: '1560bc2603d0666ad6504b9f148e19c2934a730f' }, h("ifx-accordion-item", { key: '63e5b09b25ce51683cfd6aa59318f7fdd45205a4', caption: "What is the Infineon DDS?" }, "The Infineon Digital Design System consists of code components, design principles, tools and guidelines as well as a dedicated interdisciplinary team. Its purpose is to support internal and external colleagues create digital user interfaces with a high level of usability as well as a consistent expression of the Infineon brand. The DDS does not focus on the content of a web application but it describes how the design of the application\u2019s structure should be."), h("ifx-accordion-item", { key: 'a16615fa9a0d533decc568b476717b4550546065', caption: "How do I get access to the DDS?" }, "You can use the provided Figma file as a foundation for mockups and prototypes, use Storybook to view what UI components and variants are available and use code components provided via Storybook or Github."), h("ifx-accordion-item", { key: 'fe1464594ab2e24acc7869320b51b6fed951f438', caption: "Can I integrate the Infineon DDS into my project?" }, "Yes, you can. We are happy to discuss with you which point in time and which scope of integration is bestsuited for updating your interface to the Infineon DDS. (To avoid that users get confused by a mixture of UI components, we recommend choosing larger updates or technology changes as opportunity to integrate the Infineon DDS.)"), h("ifx-accordion-item", { key: '4a3cb74604b6d73210d2da4004f8bcd9a37df0b8', caption: "Are Infineon DDS components accessable?" }, "We have taken WCAG 2.0 Level AA as baseline level for all design decisions inside the Infineon Digital Design System. To make an online experience truly accessible you have to implement the specific code, content, and visual design according to the accessibility standard. Find an introduction to this topic here."), h("ifx-accordion-item", { key: '132a5a7b1b55ffc4213d0beddebf05cf58c8bcb1', caption: "How to request a new component?" }, "Please contact us like described in the contribution section! We are planning to expand the number of components continually. If your component is also usable for multiple other projects, there is a good chance we might work together with you."))));
|
5
5
|
}
|
6
6
|
static get is() { return "ifx-faq"; }
|
7
7
|
static get encapsulation() { return "shadow"; }
|
@@ -1,71 +1,4 @@
|
|
1
|
-
import {
|
2
|
-
import { d as defineCustomElement$2 } from './p-a2411b44.js';
|
3
|
-
|
4
|
-
const alertCss = ":root{--ifx-font-family:\"Source Sans 3\";font-family:var(--ifx-font-family, sans-serif)}:host{display:block}.alert__info-wrapper{display:flex;padding:16px 24px;font-family:var(--ifx-font-family);box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843)}.alert__info-wrapper .info__text-wrapper{display:flex;flex-direction:column;gap:8px;width:100%}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper{display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper,.alert__info-wrapper .info__text-wrapper .info__description-wrapper{color:#1D1D1D;font-size:16px;font-style:normal;font-weight:600;line-height:24px}.alert__info-wrapper .info__text-wrapper .info__headline-wrapper ::slotted(p),.alert__info-wrapper .info__text-wrapper .info__description-wrapper ::slotted(p){padding:0;margin:0}.alert__info-wrapper .info__text-wrapper .info__description-wrapper{font-weight:400}.alert__info-wrapper .close-icon-wrapper{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}.alert__info-wrapper .close-icon-wrapper button{all:unset;display:flex;align-items:center;justify-content:center;line-height:0;color:#1D1D1D;height:24px;width:24px}.alert__info-wrapper .close-icon-wrapper button:focus{outline:2px solid #0A8276;outline-offset:2px}.alert{display:flex;border:1px solid #0A8276;border-radius:1px;color:#1D1D1D;background-color:#FFFFFF;font-family:var(--ifx-font-family);box-shadow:0px 6px 9px 0px rgba(29, 29, 29, 0.1019607843)}.alert .close-icon-wrapper{display:flex;align-items:center;justify-content:center;min-width:40px}.alert .close-icon-wrapper button{all:unset;display:flex;align-items:center;justify-content:center;line-height:0;color:#1D1D1D;height:24px;width:24px}.alert .close-icon-wrapper button:focus{outline:2px solid #0A8276;outline-offset:2px}.alert .icon-wrapper{position:relative;min-width:48px;display:flex;justify-content:center;align-items:center;background-color:#0A8276}.alert .alert-text{font-size:16px;width:100%;padding:12px 0px 12px 12px;color:#1D1D1D;white-space:pre-wrap;word-wrap:break-word;overflow-wrap:anywhere;}.alert.primary{border:1px solid #0A8276}.alert.primary .icon-wrapper{background-color:#0A8276;color:#FFFFFF}.alert.success{border:1px solid #4CA460}.alert.success .icon-wrapper{background-color:#4CA460;color:#FFFFFF}.alert.danger{border:1px solid #CD002F}.alert.danger .icon-wrapper{background-color:#CD002F;color:#FFFFFF}.alert.warning{border:1px solid #E16B25}.alert.warning .icon-wrapper{background-color:#E16B25;color:#FFFFFF}.close-icon-wrapper ifx-icon:hover{cursor:pointer}";
|
5
|
-
const IfxAlertStyle0 = alertCss;
|
6
|
-
|
7
|
-
const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends H {
|
8
|
-
constructor() {
|
9
|
-
super();
|
10
|
-
this.__registerHost();
|
11
|
-
this.__attachShadow();
|
12
|
-
this.ifxClose = createEvent(this, "ifxClose", 7);
|
13
|
-
this.alertTypeDescription = {
|
14
|
-
"primary": 'Neutral alert',
|
15
|
-
"success": 'Success Alert',
|
16
|
-
"danger": 'Error Alert',
|
17
|
-
"warning": 'Warning Alert',
|
18
|
-
"info": 'Neutral alert',
|
19
|
-
};
|
20
|
-
this.variant = 'primary';
|
21
|
-
this.icon = undefined;
|
22
|
-
this.closable = true;
|
23
|
-
this.AriaLive = 'assertive';
|
24
|
-
this.uniqueId = undefined;
|
25
|
-
}
|
26
|
-
handleClose() {
|
27
|
-
this.ifxClose.emit();
|
28
|
-
}
|
29
|
-
renderCloseButton() {
|
30
|
-
return (h("div", { class: "close-icon-wrapper" }, h("button", { onClick: this.handleClose.bind(this), "aria-label": "Dismiss alert" }, h("ifx-icon", { icon: "cross-16" }))));
|
31
|
-
}
|
32
|
-
generateUniqueId(prefix = 'id') {
|
33
|
-
return `${prefix}-${Math.random().toString(36).substring(2, 9)}`;
|
34
|
-
}
|
35
|
-
componentWillLoad() {
|
36
|
-
if (!this.uniqueId) {
|
37
|
-
this.uniqueId = this.generateUniqueId('alert');
|
38
|
-
}
|
39
|
-
}
|
40
|
-
render() {
|
41
|
-
return this.variant === 'info' ? (h("div", { class: "alert__info-wrapper", role: "alert", "aria-live": this.AriaLive, "aria-describedby": this.alertTypeDescription[this.variant], "aria-labelledby": "alert-text alert-description" }, h("div", { class: "info__text-wrapper" }, h("div", { class: "info__headline-wrapper" }, h("slot", { name: "headline" })), h("div", { id: `alert-description-${this.uniqueId}`, class: "info__description-wrapper" }, h("slot", { name: "desc" }))), this.closable ? this.renderCloseButton() : null)) : (h("div", { class: `alert ${this.variant}`, role: "alert" }, this.icon && (h("div", { class: "icon-wrapper" }, h("ifx-icon", { icon: this.icon }))), h("div", { class: "alert-text", id: `alert-text-${this.uniqueId}` }, h("slot", null)), this.closable ? this.renderCloseButton() : null));
|
42
|
-
}
|
43
|
-
static get style() { return IfxAlertStyle0; }
|
44
|
-
}, [1, "ifx-alert", {
|
45
|
-
"variant": [1],
|
46
|
-
"icon": [1],
|
47
|
-
"closable": [4],
|
48
|
-
"AriaLive": [1, "aria-live"],
|
49
|
-
"uniqueId": [32]
|
50
|
-
}]);
|
51
|
-
function defineCustomElement$1() {
|
52
|
-
if (typeof customElements === "undefined") {
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
const components = ["ifx-alert", "ifx-icon"];
|
56
|
-
components.forEach(tagName => { switch (tagName) {
|
57
|
-
case "ifx-alert":
|
58
|
-
if (!customElements.get(tagName)) {
|
59
|
-
customElements.define(tagName, Alert);
|
60
|
-
}
|
61
|
-
break;
|
62
|
-
case "ifx-icon":
|
63
|
-
if (!customElements.get(tagName)) {
|
64
|
-
defineCustomElement$2();
|
65
|
-
}
|
66
|
-
break;
|
67
|
-
} });
|
68
|
-
}
|
1
|
+
import { A as Alert, d as defineCustomElement$1 } from './p-81263927.js';
|
69
2
|
|
70
3
|
const IfxAlert = Alert;
|
71
4
|
const defineCustomElement = defineCustomElement$1;
|
@@ -1 +1 @@
|
|
1
|
-
{"file":"ifx-alert.js","mappings":"
|
1
|
+
{"file":"ifx-alert.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|