@infineon/infineon-design-system-stencil 30.9.2--canary.1673.aae465494350113a03d5687dfe66c3823dc98f42.0 → 30.9.3--canary.1496.5f10a070333a6cd6bc76a2fe783f876b1ca9ba74.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.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-af3b4f6c.js → index-ecedd8ab.js} +30 -19
- package/dist/cjs/index-ecedd8ab.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 +267 -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-alert.entry.js → components/p-2ca9c3ff.js} +35 -8
- package/dist/components/p-2ca9c3ff.js.map +1 -0
- package/dist/components/{p-12e02e47.js → p-3d6ac257.js} +5 -5
- package/dist/components/{p-12e02e47.js.map → p-3d6ac257.js.map} +1 -1
- package/dist/components/p-ed8e3166.js +211 -0
- package/dist/components/p-ed8e3166.js.map +1 -0
- package/dist/{esm/ifx-spinner.entry.js → components/p-fdaeefd0.js} +28 -9
- package/dist/components/p-fdaeefd0.js.map +1 -0
- 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.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-dc4139fb.js → index-862937cd.js} +30 -20
- package/dist/esm/index-862937cd.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-c5daebfa.entry.js → p-01f1a036.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-d101e5a0.entry.js → p-08dce920.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-35d0daa5.entry.js → p-09ac85b7.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-11fed749.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-8a497a15.entry.js → p-123c8c93.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-00d6e46e.entry.js → p-124497d9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-9ee328a5.entry.js → p-17dea3d3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-bc8a4226.entry.js → p-1c0d7eab.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-20ec1d46.entry.js +2 -0
- package/dist/infineon-design-system-stencil/{p-89c7209f.entry.js → p-21137d05.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6c5f0f7b.entry.js → p-27acd1d1.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-f8d7bbe2.entry.js → p-280af23b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ad3db607.entry.js → p-286b7a53.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c34f5517.entry.js → p-2b1c4d08.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-030a5b46.entry.js → p-35297905.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-9481adc8.entry.js → p-3db75696.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c1b1b593.entry.js → p-41b13c1d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-499dba27.entry.js → p-4bb5139f.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-eb8ba37f.entry.js → p-509df8c3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-466fea81.entry.js → p-56e4ea93.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7bef9272.entry.js → p-57f34745.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-3c5a8615.entry.js → p-5a06b4c0.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c82d6a95.entry.js → p-5a0bdc7b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-caff080b.entry.js → p-5ad22f17.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-1aed7d45.entry.js → p-5fbfc99f.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-3b99fb06.entry.js → p-61229295.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-65be8cba.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-65be8cba.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-366148e2.entry.js → p-65c56cae.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-8969f1e4.entry.js → p-65f0f9c9.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-222c1af9.entry.js → p-6940cb58.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-91f91586.entry.js → p-6aa90d13.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-775d187b.entry.js → p-6bcaa9f0.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-189c89c3.entry.js → p-6e47e108.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-51980b19.entry.js → p-6e49bd84.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-53f2ab7f.entry.js → p-78a7adfb.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-18f5a5e3.entry.js → p-7d42599b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-e66c33ea.entry.js → p-7e2f4e23.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-28fb795b.entry.js → p-8b6a5023.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6fdc1a34.entry.js → p-8c7559af.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a8ccf376.entry.js → p-8dc4ff33.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-5c6d5571.entry.js → p-976a5dc3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-9976bd0d.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-9976bd0d.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-58966086.entry.js → p-9a4079cb.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-c80f9282.entry.js → p-9c8efbef.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7f59e05a.entry.js → p-9df234de.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-680f8e2c.entry.js → p-a050cb05.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-4b21c0e6.entry.js → p-a66a061c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-6389a7b8.entry.js → p-ab96a5f7.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a2d7c880.entry.js → p-ad77eae3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-ad8b0e87.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-ad8b0e87.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/{p-f0052c72.entry.js → p-adcc2338.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-7fa8ccd3.entry.js → p-b1f7127c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0c4276df.entry.js → p-b399f7e8.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-b5a3fad1.entry.js → p-b8328b55.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-bddc382a.entry.js → p-b8fce043.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-32510d11.entry.js → p-b9bc473d.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-27a52d0b.entry.js → p-b9df0f43.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-0a011c63.entry.js → p-bc3a5b63.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-584149bd.entry.js → p-c1155506.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ce413596.entry.js → p-c3178a87.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-a116e0d2.entry.js → p-ddb0c27b.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-ee39e4ce.entry.js → p-de54e8c8.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-fbd9e58e.entry.js → p-e438aa6c.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/p-e45678d5.entry.js +2 -0
- package/dist/infineon-design-system-stencil/p-e45678d5.entry.js.map +1 -0
- package/dist/infineon-design-system-stencil/p-e9b363a2.js +3 -0
- package/dist/infineon-design-system-stencil/{p-6b122987.js.map → p-e9b363a2.js.map} +1 -1
- package/dist/infineon-design-system-stencil/{p-51c4e760.entry.js → p-ea7cd6c4.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-34fb9dca.entry.js → p-ed86d205.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-d52e5250.entry.js → p-eff8ff86.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-85f4399b.entry.js → p-f21532ac.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-44b2cbe1.entry.js → p-fa7d52e3.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-379a2090.entry.js → p-fb7995b8.entry.js} +2 -2
- package/dist/infineon-design-system-stencil/{p-436babb8.entry.js → p-fd42ba40.entry.js} +2 -2
- 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-af3b4f6c.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-dc4139fb.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-32fc3ce3.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-4fab3a1e.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-4fab3a1e.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-6ae18c50.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-6b122987.js +0 -3
- package/dist/infineon-design-system-stencil/p-db09429f.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-db09429f.entry.js.map +0 -1
- package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js +0 -2
- package/dist/infineon-design-system-stencil/p-dc7deb14.entry.js.map +0 -1
- /package/dist/infineon-design-system-stencil/{p-c5daebfa.entry.js.map → p-01f1a036.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d101e5a0.entry.js.map → p-08dce920.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-35d0daa5.entry.js.map → p-09ac85b7.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-32fc3ce3.entry.js.map → p-11fed749.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8a497a15.entry.js.map → p-123c8c93.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-00d6e46e.entry.js.map → p-124497d9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-9ee328a5.entry.js.map → p-17dea3d3.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-bc8a4226.entry.js.map → p-1c0d7eab.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6ae18c50.entry.js.map → p-20ec1d46.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-89c7209f.entry.js.map → p-21137d05.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6c5f0f7b.entry.js.map → p-27acd1d1.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-f8d7bbe2.entry.js.map → p-280af23b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ad3db607.entry.js.map → p-286b7a53.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c34f5517.entry.js.map → p-2b1c4d08.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-030a5b46.entry.js.map → p-35297905.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-9481adc8.entry.js.map → p-3db75696.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c1b1b593.entry.js.map → p-41b13c1d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-499dba27.entry.js.map → p-4bb5139f.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-eb8ba37f.entry.js.map → p-509df8c3.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-466fea81.entry.js.map → p-56e4ea93.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7bef9272.entry.js.map → p-57f34745.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-3c5a8615.entry.js.map → p-5a06b4c0.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c82d6a95.entry.js.map → p-5a0bdc7b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-caff080b.entry.js.map → p-5ad22f17.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-1aed7d45.entry.js.map → p-5fbfc99f.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-3b99fb06.entry.js.map → p-61229295.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-366148e2.entry.js.map → p-65c56cae.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-8969f1e4.entry.js.map → p-65f0f9c9.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-222c1af9.entry.js.map → p-6940cb58.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-91f91586.entry.js.map → p-6aa90d13.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-775d187b.entry.js.map → p-6bcaa9f0.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-189c89c3.entry.js.map → p-6e47e108.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-51980b19.entry.js.map → p-6e49bd84.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-53f2ab7f.entry.js.map → p-78a7adfb.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-18f5a5e3.entry.js.map → p-7d42599b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-e66c33ea.entry.js.map → p-7e2f4e23.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-28fb795b.entry.js.map → p-8b6a5023.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6fdc1a34.entry.js.map → p-8c7559af.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a8ccf376.entry.js.map → p-8dc4ff33.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-5c6d5571.entry.js.map → p-976a5dc3.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-58966086.entry.js.map → p-9a4079cb.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-c80f9282.entry.js.map → p-9c8efbef.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7f59e05a.entry.js.map → p-9df234de.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-680f8e2c.entry.js.map → p-a050cb05.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-4b21c0e6.entry.js.map → p-a66a061c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-6389a7b8.entry.js.map → p-ab96a5f7.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a2d7c880.entry.js.map → p-ad77eae3.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-f0052c72.entry.js.map → p-adcc2338.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-7fa8ccd3.entry.js.map → p-b1f7127c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0c4276df.entry.js.map → p-b399f7e8.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-b5a3fad1.entry.js.map → p-b8328b55.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-bddc382a.entry.js.map → p-b8fce043.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-32510d11.entry.js.map → p-b9bc473d.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-27a52d0b.entry.js.map → p-b9df0f43.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-0a011c63.entry.js.map → p-bc3a5b63.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-584149bd.entry.js.map → p-c1155506.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ce413596.entry.js.map → p-c3178a87.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-a116e0d2.entry.js.map → p-ddb0c27b.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-ee39e4ce.entry.js.map → p-de54e8c8.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-fbd9e58e.entry.js.map → p-e438aa6c.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-51c4e760.entry.js.map → p-ea7cd6c4.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-34fb9dca.entry.js.map → p-ed86d205.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-d52e5250.entry.js.map → p-eff8ff86.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-85f4399b.entry.js.map → p-f21532ac.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-44b2cbe1.entry.js.map → p-fa7d52e3.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-379a2090.entry.js.map → p-fb7995b8.entry.js.map} +0 -0
- /package/dist/infineon-design-system-stencil/{p-436babb8.entry.js.map → p-fd42ba40.entry.js.map} +0 -0
@@ -0,0 +1,267 @@
|
|
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: '781dff66aaf60c77f87db01e88a76937bd56d4f5' }, 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
|
+
"getter": false,
|
172
|
+
"setter": false,
|
173
|
+
"attribute": "name",
|
174
|
+
"reflect": false
|
175
|
+
},
|
176
|
+
"thumbnail": {
|
177
|
+
"type": "string",
|
178
|
+
"mutable": false,
|
179
|
+
"complexType": {
|
180
|
+
"original": "string",
|
181
|
+
"resolved": "string",
|
182
|
+
"references": {}
|
183
|
+
},
|
184
|
+
"required": false,
|
185
|
+
"optional": false,
|
186
|
+
"docs": {
|
187
|
+
"tags": [],
|
188
|
+
"text": ""
|
189
|
+
},
|
190
|
+
"getter": false,
|
191
|
+
"setter": false,
|
192
|
+
"attribute": "thumbnail",
|
193
|
+
"reflect": false
|
194
|
+
}
|
195
|
+
};
|
196
|
+
}
|
197
|
+
static get states() {
|
198
|
+
return {
|
199
|
+
"repoDetails": {},
|
200
|
+
"repoUrl": {},
|
201
|
+
"showDetails": {},
|
202
|
+
"isTemplatePage": {},
|
203
|
+
"isLoading": {},
|
204
|
+
"repoError": {}
|
205
|
+
};
|
206
|
+
}
|
207
|
+
static get events() {
|
208
|
+
return [{
|
209
|
+
"method": "toggleTemplates",
|
210
|
+
"name": "toggleTemplates",
|
211
|
+
"bubbles": true,
|
212
|
+
"cancelable": true,
|
213
|
+
"composed": true,
|
214
|
+
"docs": {
|
215
|
+
"tags": [],
|
216
|
+
"text": ""
|
217
|
+
},
|
218
|
+
"complexType": {
|
219
|
+
"original": "any",
|
220
|
+
"resolved": "any",
|
221
|
+
"references": {}
|
222
|
+
}
|
223
|
+
}, {
|
224
|
+
"method": "fieldError",
|
225
|
+
"name": "fieldError",
|
226
|
+
"bubbles": true,
|
227
|
+
"cancelable": true,
|
228
|
+
"composed": true,
|
229
|
+
"docs": {
|
230
|
+
"tags": [],
|
231
|
+
"text": ""
|
232
|
+
},
|
233
|
+
"complexType": {
|
234
|
+
"original": "any",
|
235
|
+
"resolved": "any",
|
236
|
+
"references": {}
|
237
|
+
}
|
238
|
+
}];
|
239
|
+
}
|
240
|
+
static get methods() {
|
241
|
+
return {
|
242
|
+
"toggleTemplate": {
|
243
|
+
"complexType": {
|
244
|
+
"signature": "(currTemp: any) => Promise<void>",
|
245
|
+
"parameters": [{
|
246
|
+
"name": "currTemp",
|
247
|
+
"type": "any",
|
248
|
+
"docs": ""
|
249
|
+
}],
|
250
|
+
"references": {
|
251
|
+
"Promise": {
|
252
|
+
"location": "global",
|
253
|
+
"id": "global::Promise"
|
254
|
+
}
|
255
|
+
},
|
256
|
+
"return": "Promise<void>"
|
257
|
+
},
|
258
|
+
"docs": {
|
259
|
+
"text": "",
|
260
|
+
"tags": []
|
261
|
+
}
|
262
|
+
}
|
263
|
+
};
|
264
|
+
}
|
265
|
+
static get elementRef() { return "el"; }
|
266
|
+
}
|
267
|
+
//# 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,EAAE,KAAK,EAAgB,MAAM,EAAE,MAAM,eAAe,CAAC;AAOhG,MAAM,OAAO,QAAQ;;2BAEuD,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;;2BAE/E,KAAK;8BACF,KAAK;yBACV,IAAI;;;;;IAOlC,QAAQ;QACN,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC;QACvC,MAAM,WAAW,GAAG,8DAA8D,CAAC;QACnF,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;QAChC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;Q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EAAC,IAAI,EAAC,kBAAkB,EAAC,KAAK,EAAC,KAAK,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG;oCACpJ,aAAO,KAAK,EAAC,YAAY,EAAC,OAAO,EAAC,KAAK,UAAY;8CAC/C,CACF;4BAGN,WAAK,KAAK,EAAC,uBAAuB;gCAChC,sBAAgB,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,WAAW,EAAC,WAAW,EAAC,sBAAsB,sBAAiC;gCAE9K,sBAAgB,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,WAAW,EAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,EAAC,6BAA6B,6BAAwC;gCAE5L,kBAAY,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,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: '8a1ab0171f19a96d4762617e049fe46c018049bf', class: 'templates__container' }, h("div", { key: '3350c2e2d954859fadb71b4246cfe012e8a45480', class: "back__btn-wrapper" }, h("ifx-icon-button", { key: '20e70dd402468c389ea5549e9c8b3fc18f93aad0', onClick: () => this.filterTemplates(false), shape: "round", variant: "tertiary", icon: "arrow-left-16", target: "_blank", size: "m" }), h("div", { key: 'e23552703d8010a189861b983d66ac19b1392fce', class: "alert__wrapper" }, h("ifx-alert", { key: '2c4446d73086225c5d326c760eeefa7e7791db1f', onClick: () => this.closeAlert(), "aria-live": "assertive", variant: "danger", icon: "c-info-24" }, "All fields are mandatory"))), h("h2", { key: '82fade8c4279578dcb2b7da32808bb86ed72a81c', class: "templates__title" }, "Choose your template"), h("div", { key: '3314bd4d85adedf718951a34b032654b7b606ce6', class: "templates__wrapper" }, h("ifx-template", { key: 'b2ad4e3f3f88541507ed1c7116aae06e6ab17b7b', name: 'template-01', thumbnail: this.tableTemplate }), h("ifx-template", { key: '4237196ce9c415b47804c597169f7246a04d9eb8', 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,CAAA;IACN,CAAC;IAGD,WAAW,CAAC,CAAC;QACX,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAC;QACzE,IAAG,CAAC,CAAC,MAAM,EAAE,CAAC;YACZ,YAAY,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QACrC,CAAC;aAAM,CAAC;YACN,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxC,CAAC;IACH,CAAC;IAGD,eAAe,CAAC,CAAC;QACf,MAAM,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC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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: 'e42a147ed66f95907f7e74a1b1cecb2bd245567f', "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: '2f9d1a80a38ee45a01dd6e9bf636df13a0fc3cb9', class: "textInput__top-wrapper" }, h("label", { key: '43c2995e3e467e7e283c1146333376ece03fef3c', htmlFor: "text-field" }, h("slot", { key: 'c4ac5b9e89dfcbc34fafcb4506eb5e8bcccb0ea1' }), 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: '0d336f053656ef3603fd20c39f2a7ca53f9e7bcf', class: "textInput__bottom-wrapper" }, h("div", { key: '364059c012dda2e3326957943014d76c3668ec56', class: "input-container" }, this.icon && (h("ifx-icon", { key: '92c3d4666bf546fe0959872bab509ec740e258f8', class: 'input-icon', icon: this.icon })), h("input", { key: '640ca8c190e760fe7efe301ab5cf6de0fcb29ed0', 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: '36cff10da96067388d323d186250ba51d0e8c463', class: "delete-icon", icon: "cremove16", onClick: () => this.handleDeleteContent() }))), this.caption && !this.error &&
|
46
|
+
h("div", { key: '708870a8fe7644a971714d1f76387efc3d7c2db2', class: `textInput__bottom-wrapper-caption ${this.disabled} ? disabled : ""` }, this.caption), this.error &&
|
47
|
+
h("div", { key: '000520268ab6bace4d687b41541002563fd6f59b', 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: '2741d93f63d602a6033ad015387e5c6fa06b4e8a', class: `wrapper
|
42
42
|
wrapper--${this.error ? 'error' : ''}
|
43
|
-
wrapper--${this.disabled ? 'disabled' : ''}` }, h("label", { key: '
|
43
|
+
wrapper--${this.disabled ? 'disabled' : ''}` }, h("label", { key: '84cc3ca55354f76ec579da85620c7522242ad97f', class: 'wrapper__label', htmlFor: this.inputId }, (_a = this.label) === null || _a === void 0 ? void 0 : _a.trim()), h("div", { key: '8c513b72ff2ab687f7b0ba717971ebb4e545f3bb', class: 'wrapper__textarea' }, h("textarea", { key: 'ab111c1c61cdf507877596e17b3d3acbdf78a8e1', "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: 'ac6d25c1b51e7f336c03534514081867b602af09', 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: '5f723ab7cb77998867b0461e37bc79d6e4ba61a5', "aria-label": "a tooltip showing important information", "aria-value": this.header, class: "tooltip__container" }, h("slot", { key: 'a22a8f62431b618aafbd803050dc909e6d797076' }), this.variant.toLowerCase() === 'dismissible' && h("div", { key: '1dac2d6cd1d3c2f4a65bcbcfc9f448c9228bcad1', class: tooltipDismissible }, h("button", { key: '7b837916f8707d1bfc0dd7bd9e39c2fc5083a897', "aria-label": "Close Tooltip", class: "close-button", onClick: this.onDismissClick }, h("ifx-icon", { key: '242ed6be4f8bbca450f845b936de46461eff9783', icon: "cross16" })), h("div", { key: '897a1e28268e4d87fea0aee2cc65acb98b419d73', class: "tooltip-dismissible-content" }, this.header && h("div", { key: '3f7fcffcbf27946a8e22bc8d7eccd10edd1bfd9c', class: "tooltip-dismissible-header" }, this.header), h("div", { key: '3c4f35aaed3b92cd26211d2e887af20316369e14', class: "tooltip-dismissible-body" }, this.text)), h("svg", { key: 'bbb8989f2f35d54166892df95ab3fa7b523e8da4', 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: '30cd52b47114a0633729604cad3928085ce2d5eb', id: "Indicator", d: "M6 0L12 8L0 8L6 0Z", fill: "#1D1D1D" }))), this.variant.toLowerCase() === 'compact' &&
|
153
|
+
h("div", { key: 'f1937f4fe6738a5ec5e2ff97d40833de6e556ea0', class: tooltipCompact }, this.text, h("svg", { key: 'af49be55f76aa695f873574cf6b1d8c224d3d1bd', 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: '6a1b409ee0a6acc3cb40f570859db21fa6e95dab', id: "Indicator", d: "M6 0L12 8L0 8L6 0Z", fill: "#1D1D1D" }))), this.variant.toLowerCase() === 'extended' &&
|
154
|
+
h("div", { key: 'e8db59cd9bfb1017473cb4978d55a9d95ef716a7', class: tooltipExtended }, h("slot", { key: '9bc3ee5d1facb90e4f3a80e62edb60db9798a311', 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: '1ced5581d26ad2cee6901e662fd0631695816ec3', class: "tooltip-extended-content" }, this.header && h("div", { key: '00536a9556d42a36afc8ee3282b531b10e6331a4', class: "tooltip-extended-header" }, this.header), h("div", { key: 'df9c595d583240132a838dc8d9c073c7066c5d17', class: "tooltip-extended-body" }, this.text)), h("svg", { key: '7ba21ada3d496d2ac9a1314b6773299f99927cdf', 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: '3079c667691d7a11a28efd9180510f03bd001f58', 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: 'a176f639b21e2f4504663ae832d93f8f88a14aff', class: 'container' }, h("ifx-accordion", { key: '1b89a12dc9c462963fe98ddfafcb137f76cf9b81' }, h("ifx-accordion-item", { key: 'ec3b2b10e3656d23fdee790bdad02ead0c7308fc', 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: 'dbeb6e058107b7565649e37389c7995bb4c38b00', 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: '509470bafae5eda41b6ead1c3fb5fe7a4a494e33', 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: '942e19b55d1342b08e84c367d16faca6b53dd47d', 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: '82da02da75548b48d10644d35c423b0c6502d35c', 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-7e430b83.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-2ca9c3ff.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}
|