@ebrains/components 0.0.1-alpha.0 → 0.2.0-alpha.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/{color-ac51ccf7.js → color-3ffe3072.js} +6 -6
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +15 -15
- package/dist/cjs/components.cjs.js +3 -30
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/eds-accordion.cjs.entry.js +5 -4
- package/dist/cjs/{eds-accordion_23.cjs.entry.js → eds-alert_28.cjs.entry.js} +394 -221
- package/dist/cjs/eds-block-break.cjs.entry.js +3 -2
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +3 -2
- package/dist/cjs/eds-card-project.cjs.entry.js +5 -5
- package/dist/cjs/eds-card-section.cjs.entry.js +4 -3
- package/dist/cjs/eds-card-tags.cjs.entry.js +3 -2
- package/dist/cjs/eds-card-tool.cjs.entry.js +6 -5
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +4 -34
- package/dist/cjs/eds-components-section.cjs.entry.js +2 -2
- package/dist/cjs/eds-docs-palettes.cjs.entry.js +2 -2
- package/dist/cjs/eds-docs-tokens.cjs.entry.js +2 -2
- package/dist/cjs/eds-footer.cjs.entry.js +4 -3
- package/dist/cjs/eds-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +3 -2
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-close.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-copy.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-eu.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-loader.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-menu.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-more.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-search.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-success.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-user.cjs.entry.js +3 -3
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +3 -3
- package/dist/cjs/eds-login.cjs.entry.js +3 -3
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +7 -6
- package/dist/cjs/eds-modal.cjs.entry.js +45 -5
- package/dist/cjs/eds-navigator.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination.cjs.entry.js +3 -2
- package/dist/cjs/eds-rating.cjs.entry.js +3 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +1 -1
- package/dist/cjs/eds-social-networks.cjs.entry.js +4 -3
- package/dist/cjs/eds-svg-repository.cjs.entry.js +292 -4
- package/dist/cjs/eds-tab.cjs.entry.js +2 -2
- package/dist/cjs/eds-table.cjs.entry.js +3 -2
- package/dist/cjs/eds-tabs-content.cjs.entry.js +6 -6
- package/dist/cjs/eds-tabs.cjs.entry.js +7 -6
- package/dist/cjs/eds-tooltip.cjs.entry.js +4 -3
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/{index-2cc3495f.js → index-f08e4f5c.js} +22 -13
- package/dist/cjs/{loader-5efe2c21.js → loader-72f9d178.js} +2 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/logo-space.cjs.entry.js +5 -4
- package/dist/cjs/logo-variations-horizontal.cjs.entry.js +3 -2
- package/dist/cjs/logo-variations-vertical.cjs.entry.js +3 -2
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +5 -4
- package/dist/cjs/token-list_3.cjs.entry.js +4 -4
- package/dist/cjs/token-ratios.cjs.entry.js +2 -2
- package/dist/cjs/token-spacing.cjs.entry.js +2 -2
- package/dist/cjs/token-typography.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -2
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +21 -1
- package/dist/collection/components/eds-form/eds-form.css +10 -0
- package/dist/collection/components/eds-form/eds-form.js +111 -20
- package/dist/collection/components/eds-input-field/eds-input-field.css +16 -6
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-modal/eds-modal.css +8 -0
- package/dist/collection/components/eds-modal/eds-modal.js +42 -2
- package/dist/collection/components/eds-timeline/eds-timeline.js +89 -0
- package/dist/collection/components/eds-timeline/eds-timeline.stories.js +35 -0
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-trl/eds-trl.css +0 -0
- package/dist/collection/components/eds-trl/eds-trl.js +61 -0
- package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
- package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
- package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +1 -1
- package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +1 -1
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +1 -1
- package/dist/collection/shared-ui/eds-header/eds-header.js +3 -3
- package/dist/collection/shared-ui/eds-login/eds-login.js +1 -1
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +1 -1
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +2 -2
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +1 -1
- package/dist/components/analytics.js +6 -6
- package/dist/components/components.css +31 -0
- package/dist/components/components.esm.js +1 -47
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/eds-accordion2.js +4 -3
- package/dist/components/eds-alert2.js +3 -2
- package/dist/components/eds-avatar2.js +3 -2
- package/dist/components/eds-block-break2.js +2 -1
- package/dist/components/eds-breadcrumb.js +2 -1
- package/dist/components/eds-button2.js +5 -3
- package/dist/components/eds-card-desc2.js +2 -1
- package/dist/components/eds-card-generic2.js +17 -4
- package/dist/components/eds-card-project.js +2 -1
- package/dist/components/eds-card-section.js +3 -2
- package/dist/components/eds-card-tags.js +2 -1
- package/dist/components/eds-card-title2.js +2 -1
- package/dist/components/eds-card-tool.js +4 -2
- package/dist/components/eds-code-block2.js +3 -33
- package/dist/components/eds-components-section.js +1 -1
- package/dist/components/eds-docs-palettes.js +1 -1
- package/dist/components/eds-docs-tokens.js +1 -1
- package/dist/components/eds-dropdown2.js +2 -1
- package/dist/components/eds-footer2.js +3 -2
- package/dist/components/eds-form.js +97 -22
- package/dist/components/eds-fullscreen-menu.js +2 -1
- package/dist/components/eds-header.js +5 -4
- package/dist/components/eds-icon-arrow-diagonal.js +1 -1
- package/dist/components/eds-icon-arrow-right.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-chevron-down.js +1 -1
- package/dist/components/eds-icon-chevron-left.js +1 -1
- package/dist/components/eds-icon-chevron-right.js +1 -1
- package/dist/components/eds-icon-chevron-up.js +1 -1
- package/dist/components/eds-icon-close.js +1 -1
- package/dist/components/eds-icon-copy.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-facebook.js +1 -1
- package/dist/components/eds-icon-gitlab.js +1 -1
- package/dist/components/eds-icon-linkedin.js +1 -1
- package/dist/components/eds-icon-loader.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-menu.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -1
- package/dist/components/eds-input-field2.js +5 -4
- package/dist/components/eds-link2.js +5 -3
- package/dist/components/eds-login.js +1 -1
- package/dist/components/eds-logo2.js +6 -3
- package/dist/components/eds-matomo-notice.js +4 -2
- package/dist/components/eds-modal.js +44 -4
- package/dist/components/eds-pagination2.js +2 -1
- package/dist/components/eds-progress-bar.js +1 -40
- package/dist/{esm/eds-progress-bar.entry.js → components/eds-progress-bar2.js} +26 -7
- package/dist/components/eds-rating.js +2 -1
- package/dist/components/eds-section-core2.js +2 -1
- package/dist/components/eds-social-networks2.js +3 -2
- package/dist/components/eds-svg-repository.js +290 -2
- package/dist/components/eds-tab2.js +1 -1
- package/dist/components/eds-table2.js +2 -1
- package/dist/components/eds-tabs-content.js +5 -4
- package/dist/components/eds-tabs.js +6 -4
- package/dist/components/eds-tag2.js +3 -2
- package/dist/components/eds-timeline.d.ts +11 -0
- package/dist/components/eds-timeline.js +118 -0
- package/dist/components/eds-toast-manager.js +3 -2
- package/dist/components/eds-toast2.js +1 -1
- package/dist/components/eds-tooltip.js +3 -2
- package/dist/components/eds-trl.d.ts +11 -0
- package/dist/components/eds-trl.js +59 -0
- package/dist/components/eds-user-modal2.js +3 -2
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/index.esm.js +0 -1
- package/dist/components/index2.js +44 -399
- package/dist/components/keycloak.js +0 -10
- package/dist/components/loader.js +2 -5
- package/dist/components/logo-space.js +4 -3
- package/dist/components/logo-variations-horizontal.js +2 -1
- package/dist/components/logo-variations-vertical.js +2 -1
- package/dist/components/logo-wrong-usage.js +4 -3
- package/dist/components/{p-877403df.entry.js → p-02e2a62f.entry.js} +1 -1
- package/dist/components/{p-e2e715a2.entry.js → p-04e47e04.entry.js} +1 -1
- package/dist/components/{p-e639818b.entry.js → p-0a3b2576.entry.js} +1 -1
- package/dist/components/{p-6bc00fad.entry.js → p-0c2e844e.entry.js} +1 -1
- package/dist/components/{p-1d94d663.entry.js → p-0c99ef81.entry.js} +1 -1
- package/dist/components/{p-378d371f.entry.js → p-145f13ad.entry.js} +1 -1
- package/dist/components/{p-0a195bfe.entry.js → p-16458a81.entry.js} +1 -1
- package/dist/components/{p-e69ff916.entry.js → p-1bcfbaf1.entry.js} +1 -1
- package/dist/components/p-2117611b.js +1 -0
- package/dist/components/{p-513bf756.entry.js → p-22762818.entry.js} +1 -1
- package/dist/components/p-22f9e720.js +1 -0
- package/dist/components/{p-e04097a2.entry.js → p-272d249f.entry.js} +1 -1
- package/dist/components/p-297b2bc3.entry.js +1 -0
- package/dist/components/p-2d8508cd.entry.js +1 -0
- package/dist/components/p-32cddd94.entry.js +1 -0
- package/dist/components/{p-0611bbac.entry.js → p-32f282a9.entry.js} +1 -1
- package/dist/components/p-373673ca.js +1 -0
- package/dist/components/{p-677f60bc.entry.js → p-388b4966.entry.js} +1 -1
- package/dist/components/p-3a2e8ef3.entry.js +1 -0
- package/dist/components/p-3afafa59.entry.js +1 -0
- package/dist/components/p-3b40559e.entry.js +1 -0
- package/dist/components/{p-ff6b25a1.entry.js → p-4037ad48.entry.js} +1 -1
- package/dist/components/{p-c16b3c0c.entry.js → p-42b4ecff.entry.js} +1 -1
- package/dist/components/p-490ba155.entry.js +1 -0
- package/dist/components/p-4932aab2.entry.js +1 -0
- package/dist/components/p-49958f77.entry.js +1 -0
- package/dist/components/p-4a24c2ce.entry.js +1 -0
- package/dist/components/{p-b544f216.entry.js → p-54c75346.entry.js} +1 -1
- package/dist/components/{p-42dfb426.entry.js → p-551c0b58.entry.js} +1 -1
- package/dist/components/{p-6f601454.entry.js → p-559b6ec9.entry.js} +1 -1
- package/dist/components/p-5aad9d3f.entry.js +1 -0
- package/dist/components/{p-9c74a5dd.entry.js → p-5ae9722b.entry.js} +1 -1
- package/dist/components/{p-3dbf2ac9.entry.js → p-5eb32f03.entry.js} +1 -1
- package/dist/components/{p-2728a189.entry.js → p-5fc68438.entry.js} +1 -1
- package/dist/components/p-673dce11.entry.js +1 -0
- package/dist/components/{p-c0afe524.entry.js → p-6fc62452.entry.js} +1 -1
- package/dist/components/{p-36c0f3ee.entry.js → p-73bd0c97.entry.js} +1 -1
- package/dist/components/p-79887c2c.entry.js +1 -0
- package/dist/components/{p-e9a1fb1e.js → p-7a8b9de5.js} +2 -2
- package/dist/components/p-846fc91c.entry.js +1 -0
- package/dist/components/p-8c56e39a.entry.js +1 -0
- package/dist/components/{p-caf2af08.entry.js → p-9000b245.entry.js} +1 -1
- package/dist/components/p-96c4deda.entry.js +1 -0
- package/dist/components/{p-4541cb5f.entry.js → p-9722811d.entry.js} +1 -1
- package/dist/components/p-a44a1abe.entry.js +1 -0
- package/dist/components/p-a4e9b68b.entry.js +1 -0
- package/dist/components/{p-55444767.entry.js → p-b14ef448.entry.js} +1 -1
- package/dist/components/{p-25eb1801.entry.js → p-b203eb1b.entry.js} +1 -1
- package/dist/components/{p-49a5eef5.entry.js → p-b33941a0.entry.js} +1 -1
- package/dist/components/{p-c11d93cf.entry.js → p-b717f95a.entry.js} +1 -1
- package/dist/components/{p-fa1276cc.entry.js → p-bb60412b.entry.js} +1 -1
- package/dist/components/{p-7a2b35b4.entry.js → p-bca40434.entry.js} +1 -1
- package/dist/components/{p-6cb8c52d.entry.js → p-bdd86a3c.entry.js} +1 -1
- package/dist/components/p-bf0f851d.entry.js +1 -0
- package/dist/components/{p-82453a66.entry.js → p-c2d369bc.entry.js} +1 -1
- package/dist/components/{p-94b74ae8.entry.js → p-c9c3cc49.entry.js} +1 -1
- package/dist/components/p-d1670eec.entry.js +1 -0
- package/dist/components/{p-bad2a33a.entry.js → p-d6d86366.entry.js} +1 -1
- package/dist/components/p-d9788b54.entry.js +1 -0
- package/dist/components/{p-64d4a6e0.entry.js → p-df93db96.entry.js} +1 -1
- package/dist/components/{p-606d8f86.entry.js → p-e20ed2c7.entry.js} +1 -1
- package/dist/components/{p-200ad980.entry.js → p-e6bfbf51.entry.js} +1 -1
- package/dist/components/{p-ddd005a3.entry.js → p-e74834bc.entry.js} +1 -1
- package/dist/components/p-ebed87b8.entry.js +1 -0
- package/dist/components/{p-b94318f2.entry.js → p-f7a6ce69.entry.js} +1 -1
- package/dist/components/{p-1a1b8e28.entry.js → p-ff5de62c.entry.js} +1 -1
- package/dist/components/p-ffec8755.entry.js +1 -0
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/token-list2.js +1 -1
- package/dist/components/token-radii2.js +1 -1
- package/dist/components/token-ratios.js +1 -1
- package/dist/components/token-shadows2.js +1 -1
- package/dist/components/token-spacing.js +1 -1
- package/dist/components/token-typography.js +1 -1
- package/dist/esm/{color-49aa977d.js → color-0ba8ed56.js} +6 -6
- package/dist/esm/color-primary-palette_6.entry.js +15 -15
- package/dist/esm/components.js +4 -31
- package/dist/esm/correct-use-of-colors.entry.js +2 -2
- package/dist/esm/eds-accordion.entry.js +5 -4
- package/dist/esm/{eds-accordion_23.entry.js → eds-alert_28.entry.js} +385 -217
- package/dist/esm/eds-block-break.entry.js +3 -2
- package/dist/esm/eds-breadcrumb.entry.js +3 -2
- package/dist/esm/eds-card-project.entry.js +3 -3
- package/dist/esm/eds-card-section.entry.js +4 -3
- package/dist/esm/eds-card-tags.entry.js +3 -2
- package/dist/esm/eds-card-tool.entry.js +5 -4
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +4 -34
- package/dist/esm/eds-components-section.entry.js +2 -2
- package/dist/esm/eds-docs-palettes.entry.js +2 -2
- package/dist/esm/eds-docs-tokens.entry.js +2 -2
- package/dist/esm/eds-footer.entry.js +4 -3
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-fullscreen-menu.entry.js +3 -2
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-right.entry.js +2 -2
- package/dist/esm/eds-icon-bluesky.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-down.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-left.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-right.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-up.entry.js +2 -2
- package/dist/esm/eds-icon-close.entry.js +2 -2
- package/dist/esm/eds-icon-copy.entry.js +2 -2
- package/dist/esm/eds-icon-eu.entry.js +2 -2
- package/dist/esm/eds-icon-facebook.entry.js +2 -2
- package/dist/esm/eds-icon-gitlab.entry.js +2 -2
- package/dist/esm/eds-icon-linkedin.entry.js +2 -2
- package/dist/esm/eds-icon-loader.entry.js +2 -2
- package/dist/esm/eds-icon-mastodon.entry.js +2 -2
- package/dist/esm/eds-icon-menu.entry.js +2 -2
- package/dist/esm/eds-icon-more.entry.js +2 -2
- package/dist/esm/eds-icon-search.entry.js +2 -2
- package/dist/esm/eds-icon-success.entry.js +2 -2
- package/dist/esm/eds-icon-twitter.entry.js +2 -2
- package/dist/esm/eds-icon-user.entry.js +2 -2
- package/dist/esm/eds-icon-youtube.entry.js +2 -2
- package/dist/esm/eds-login.entry.js +3 -3
- package/dist/esm/eds-matomo-notice.entry.js +6 -5
- package/dist/esm/eds-modal.entry.js +45 -5
- package/dist/esm/eds-navigator.entry.js +1 -1
- package/dist/esm/eds-pagination.entry.js +3 -2
- package/dist/esm/eds-rating.entry.js +3 -2
- package/dist/esm/eds-section-core_2.entry.js +1 -1
- package/dist/esm/eds-social-networks.entry.js +4 -3
- package/dist/esm/eds-svg-repository.entry.js +291 -3
- package/dist/esm/eds-tab.entry.js +2 -2
- package/dist/esm/eds-table.entry.js +3 -2
- package/dist/esm/eds-tabs-content.entry.js +5 -5
- package/dist/esm/eds-tabs.entry.js +6 -5
- package/dist/esm/eds-tooltip.entry.js +4 -3
- package/dist/esm/incorrect-use-of-colors.entry.js +2 -2
- package/dist/esm/{index-f1426055.js → index-e96badea.js} +22 -13
- package/dist/esm/{loader-66341740.js → loader-c9628637.js} +2 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/logo-space.entry.js +5 -4
- package/dist/esm/logo-variations-horizontal.entry.js +3 -2
- package/dist/esm/logo-variations-vertical.entry.js +3 -2
- package/dist/esm/logo-wrong-usage.entry.js +5 -4
- package/dist/esm/token-list_3.entry.js +4 -4
- package/dist/esm/token-ratios.entry.js +2 -2
- package/dist/esm/token-spacing.entry.js +2 -2
- package/dist/esm/token-typography.entry.js +2 -2
- package/dist/hydrate/index.js +363 -115
- package/dist/hydrate/index.mjs +363 -115
- package/dist/stencil.config.js +4 -3
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +2 -2
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +2 -0
- package/dist/types/components/eds-form/eds-form.d.ts +8 -0
- package/dist/types/components/eds-modal/eds-modal.d.ts +16 -0
- package/dist/types/components/eds-timeline/eds-timeline.d.ts +29 -0
- package/dist/types/components/eds-timeline/eds-timeline.stories.d.ts +24 -0
- package/dist/types/components/eds-trl/eds-trl.d.ts +9 -0
- package/dist/types/components.d.ts +44 -0
- package/package.json +3 -3
- package/dist/cjs/color-primary-palette.cjs.entry.js +0 -43
- package/dist/cjs/color-secondary-palette.cjs.entry.js +0 -68
- package/dist/cjs/color-support-palette.cjs.entry.js +0 -59
- package/dist/cjs/eds-alert.cjs.entry.js +0 -95
- package/dist/cjs/eds-avatar.cjs.entry.js +0 -73
- package/dist/cjs/eds-button.cjs.entry.js +0 -233
- package/dist/cjs/eds-card-desc.cjs.entry.js +0 -26
- package/dist/cjs/eds-card-desc_3.cjs.entry.js +0 -117
- package/dist/cjs/eds-card-generic.cjs.entry.js +0 -93
- package/dist/cjs/eds-card-title.cjs.entry.js +0 -56
- package/dist/cjs/eds-dropdown.cjs.entry.js +0 -129
- package/dist/cjs/eds-form.cjs.entry.js +0 -249
- package/dist/cjs/eds-header.cjs.entry.js +0 -96
- package/dist/cjs/eds-icon-wrapper.cjs.entry.js +0 -40
- package/dist/cjs/eds-img.cjs.entry.js +0 -57
- package/dist/cjs/eds-input-field.cjs.entry.js +0 -72
- package/dist/cjs/eds-input-footer.cjs.entry.js +0 -21
- package/dist/cjs/eds-input-label.cjs.entry.js +0 -20
- package/dist/cjs/eds-input-range.cjs.entry.js +0 -39
- package/dist/cjs/eds-input-search.cjs.entry.js +0 -41
- package/dist/cjs/eds-input-select.cjs.entry.js +0 -30
- package/dist/cjs/eds-input.cjs.entry.js +0 -68
- package/dist/cjs/eds-link.cjs.entry.js +0 -211
- package/dist/cjs/eds-logo.cjs.entry.js +0 -76
- package/dist/cjs/eds-progress-bar.cjs.entry.js +0 -28
- package/dist/cjs/eds-section-core.cjs.entry.js +0 -23
- package/dist/cjs/eds-section-heading.cjs.entry.js +0 -41
- package/dist/cjs/eds-tag.cjs.entry.js +0 -44
- package/dist/cjs/eds-toast-manager.cjs.entry.js +0 -45
- package/dist/cjs/eds-toast.cjs.entry.js +0 -53
- package/dist/cjs/eds-user-modal.cjs.entry.js +0 -47
- package/dist/cjs/eds-user.cjs.entry.js +0 -90
- package/dist/cjs/gradient-primary-palette.cjs.entry.js +0 -45
- package/dist/cjs/gradient-secondary-palette.cjs.entry.js +0 -79
- package/dist/cjs/gradient-support-palette.cjs.entry.js +0 -63
- package/dist/cjs/index-1ff5f25c.js +0 -48
- package/dist/cjs/index-383d2951.js +0 -3449
- package/dist/cjs/index-96a4261e.js +0 -405
- package/dist/cjs/index-f62478aa.js +0 -1837
- package/dist/cjs/keycloak-940b83c1.js +0 -1910
- package/dist/cjs/shadow-css-988e4292.js +0 -334
- package/dist/cjs/token-list.cjs.entry.js +0 -253
- package/dist/cjs/token-radii.cjs.entry.js +0 -25
- package/dist/cjs/token-shadows.cjs.entry.js +0 -34
- package/dist/components/app-globals-0f993ce5.js +0 -3
- package/dist/components/color-primary-palette.entry.js +0 -39
- package/dist/components/color-secondary-palette.entry.js +0 -64
- package/dist/components/color-support-palette.entry.js +0 -55
- package/dist/components/correct-use-of-colors.entry.js +0 -64
- package/dist/components/eds-accordion.entry.js +0 -88
- package/dist/components/eds-alert.entry.js +0 -91
- package/dist/components/eds-avatar.entry.js +0 -69
- package/dist/components/eds-block-break.entry.js +0 -16
- package/dist/components/eds-breadcrumb.entry.js +0 -148
- package/dist/components/eds-button.entry.js +0 -229
- package/dist/components/eds-card-desc.entry.js +0 -22
- package/dist/components/eds-card-generic.entry.js +0 -89
- package/dist/components/eds-card-project.entry.js +0 -63
- package/dist/components/eds-card-section.entry.js +0 -39
- package/dist/components/eds-card-tags.entry.js +0 -17
- package/dist/components/eds-card-title.entry.js +0 -52
- package/dist/components/eds-card-tool.entry.js +0 -75
- package/dist/components/eds-card-wrapper.entry.js +0 -28
- package/dist/components/eds-code-block.entry.js +0 -2468
- package/dist/components/eds-components-section.entry.js +0 -92
- package/dist/components/eds-docs-palettes.entry.js +0 -23
- package/dist/components/eds-docs-tokens.entry.js +0 -31
- package/dist/components/eds-dropdown.entry.js +0 -125
- package/dist/components/eds-footer.entry.js +0 -45
- package/dist/components/eds-form.entry.js +0 -245
- package/dist/components/eds-frame.entry.js +0 -87
- package/dist/components/eds-fullscreen-menu.entry.js +0 -95
- package/dist/components/eds-header.entry.js +0 -92
- package/dist/components/eds-icon-arrow-diagonal.entry.js +0 -14
- package/dist/components/eds-icon-arrow-right.entry.js +0 -14
- package/dist/components/eds-icon-bluesky.entry.js +0 -14
- package/dist/components/eds-icon-chevron-down.entry.js +0 -14
- package/dist/components/eds-icon-chevron-left.entry.js +0 -14
- package/dist/components/eds-icon-chevron-right.entry.js +0 -14
- package/dist/components/eds-icon-chevron-up.entry.js +0 -14
- package/dist/components/eds-icon-close.entry.js +0 -14
- package/dist/components/eds-icon-copy.entry.js +0 -14
- package/dist/components/eds-icon-eu.entry.js +0 -14
- package/dist/components/eds-icon-facebook.entry.js +0 -14
- package/dist/components/eds-icon-gitlab.entry.js +0 -14
- package/dist/components/eds-icon-linkedin.entry.js +0 -14
- package/dist/components/eds-icon-loader.entry.js +0 -14
- package/dist/components/eds-icon-mastodon.entry.js +0 -14
- package/dist/components/eds-icon-menu.entry.js +0 -14
- package/dist/components/eds-icon-more.entry.js +0 -14
- package/dist/components/eds-icon-search.entry.js +0 -14
- package/dist/components/eds-icon-success.entry.js +0 -14
- package/dist/components/eds-icon-twitter.entry.js +0 -14
- package/dist/components/eds-icon-user.entry.js +0 -14
- package/dist/components/eds-icon-wrapper.entry.js +0 -36
- package/dist/components/eds-icon-youtube.entry.js +0 -14
- package/dist/components/eds-img.entry.js +0 -53
- package/dist/components/eds-input-field.entry.js +0 -68
- package/dist/components/eds-input-footer.entry.js +0 -17
- package/dist/components/eds-input-label.entry.js +0 -16
- package/dist/components/eds-input-range.entry.js +0 -35
- package/dist/components/eds-input-search.entry.js +0 -37
- package/dist/components/eds-input-select.entry.js +0 -26
- package/dist/components/eds-input.entry.js +0 -64
- package/dist/components/eds-link.entry.js +0 -207
- package/dist/components/eds-login.entry.js +0 -68
- package/dist/components/eds-logo.entry.js +0 -72
- package/dist/components/eds-matomo-notice.entry.js +0 -105
- package/dist/components/eds-modal.entry.js +0 -42
- package/dist/components/eds-navigator.entry.js +0 -39
- package/dist/components/eds-pagination.entry.js +0 -207
- package/dist/components/eds-progress-bar.entry.js +0 -24
- package/dist/components/eds-rating.entry.js +0 -53
- package/dist/components/eds-section-core.entry.js +0 -19
- package/dist/components/eds-section-heading.entry.js +0 -37
- package/dist/components/eds-social-networks.entry.js +0 -61
- package/dist/components/eds-svg-repository.entry.js +0 -28
- package/dist/components/eds-tab.entry.js +0 -36
- package/dist/components/eds-table.entry.js +0 -138
- package/dist/components/eds-tabs-content.entry.js +0 -129
- package/dist/components/eds-tabs.entry.js +0 -118
- package/dist/components/eds-tag.entry.js +0 -40
- package/dist/components/eds-toast-manager.entry.js +0 -41
- package/dist/components/eds-toast.entry.js +0 -49
- package/dist/components/eds-tooltip.entry.js +0 -95
- package/dist/components/eds-user-modal.entry.js +0 -43
- package/dist/components/eds-user.entry.js +0 -86
- package/dist/components/gradient-primary-palette.entry.js +0 -41
- package/dist/components/gradient-secondary-palette.entry.js +0 -75
- package/dist/components/gradient-support-palette.entry.js +0 -59
- package/dist/components/incorrect-use-of-colors.entry.js +0 -46
- package/dist/components/index-144c9ae8.js +0 -46
- package/dist/components/index-360dc790.js +0 -401
- package/dist/components/index-a9afa43f.js +0 -1802
- package/dist/components/index-b384416e.js +0 -3023
- package/dist/components/index3.js +0 -46
- package/dist/components/index4.js +0 -1802
- package/dist/components/keycloak-b647d452.js +0 -1903
- package/dist/components/logo-space.entry.js +0 -16
- package/dist/components/logo-variations-horizontal.entry.js +0 -26
- package/dist/components/logo-variations-vertical.entry.js +0 -26
- package/dist/components/logo-wrong-usage.entry.js +0 -16
- package/dist/components/p-0a6262b7.entry.js +0 -1
- package/dist/components/p-11a4ef34.entry.js +0 -1
- package/dist/components/p-145d8e4d.entry.js +0 -1
- package/dist/components/p-219d9f68.entry.js +0 -1
- package/dist/components/p-22ee5374.entry.js +0 -1
- package/dist/components/p-2b14f03a.entry.js +0 -1
- package/dist/components/p-3048bdec.entry.js +0 -1
- package/dist/components/p-52a487ee.entry.js +0 -1
- package/dist/components/p-5b900a2c.entry.js +0 -1
- package/dist/components/p-5edc806a.entry.js +0 -1
- package/dist/components/p-763cbe2f.entry.js +0 -1
- package/dist/components/p-77a81dfa.entry.js +0 -1
- package/dist/components/p-81d2a9be.entry.js +0 -1
- package/dist/components/p-8c1be2b6.entry.js +0 -1
- package/dist/components/p-923e4d23.entry.js +0 -1
- package/dist/components/p-9c05e349.entry.js +0 -1
- package/dist/components/p-abcdf35f.js +0 -1
- package/dist/components/p-ac083317.entry.js +0 -1
- package/dist/components/p-ad79cc3c.entry.js +0 -1
- package/dist/components/p-b4055691.entry.js +0 -1
- package/dist/components/p-bfd2fdf1.entry.js +0 -1
- package/dist/components/p-c3c61db1.entry.js +0 -1
- package/dist/components/p-d80de13e.entry.js +0 -1
- package/dist/components/p-e80f4f24.js +0 -1
- package/dist/components/p-ec95188c.entry.js +0 -1
- package/dist/components/p-f04946a5.entry.js +0 -1
- package/dist/components/shadow-css-423dab2c.js +0 -332
- package/dist/components/token-list.entry.js +0 -249
- package/dist/components/token-radii.entry.js +0 -21
- package/dist/components/token-ratios.entry.js +0 -25
- package/dist/components/token-shadows.entry.js +0 -30
- package/dist/components/token-spacing.entry.js +0 -12
- package/dist/components/token-typography.entry.js +0 -226
- package/dist/esm/color-primary-palette.entry.js +0 -39
- package/dist/esm/color-secondary-palette.entry.js +0 -64
- package/dist/esm/color-support-palette.entry.js +0 -55
- package/dist/esm/eds-alert.entry.js +0 -91
- package/dist/esm/eds-avatar.entry.js +0 -69
- package/dist/esm/eds-button.entry.js +0 -229
- package/dist/esm/eds-card-desc.entry.js +0 -22
- package/dist/esm/eds-card-desc_3.entry.js +0 -111
- package/dist/esm/eds-card-generic.entry.js +0 -89
- package/dist/esm/eds-card-title.entry.js +0 -52
- package/dist/esm/eds-dropdown.entry.js +0 -125
- package/dist/esm/eds-form.entry.js +0 -245
- package/dist/esm/eds-header.entry.js +0 -92
- package/dist/esm/eds-icon-wrapper.entry.js +0 -36
- package/dist/esm/eds-img.entry.js +0 -53
- package/dist/esm/eds-input-field.entry.js +0 -68
- package/dist/esm/eds-input-footer.entry.js +0 -17
- package/dist/esm/eds-input-label.entry.js +0 -16
- package/dist/esm/eds-input-range.entry.js +0 -35
- package/dist/esm/eds-input-search.entry.js +0 -37
- package/dist/esm/eds-input-select.entry.js +0 -26
- package/dist/esm/eds-input.entry.js +0 -64
- package/dist/esm/eds-link.entry.js +0 -207
- package/dist/esm/eds-logo.entry.js +0 -72
- package/dist/esm/eds-section-core.entry.js +0 -19
- package/dist/esm/eds-section-heading.entry.js +0 -37
- package/dist/esm/eds-tag.entry.js +0 -40
- package/dist/esm/eds-toast-manager.entry.js +0 -41
- package/dist/esm/eds-toast.entry.js +0 -49
- package/dist/esm/eds-user-modal.entry.js +0 -43
- package/dist/esm/eds-user.entry.js +0 -86
- package/dist/esm/gradient-primary-palette.entry.js +0 -41
- package/dist/esm/gradient-secondary-palette.entry.js +0 -75
- package/dist/esm/gradient-support-palette.entry.js +0 -59
- package/dist/esm/index-144c9ae8.js +0 -46
- package/dist/esm/index-360dc790.js +0 -401
- package/dist/esm/index-a9afa43f.js +0 -1802
- package/dist/esm/index-b384416e.js +0 -3416
- package/dist/esm/keycloak-b647d452.js +0 -1903
- package/dist/esm/shadow-css-423dab2c.js +0 -332
- package/dist/esm/toastManager-b716afd8.js +0 -31
- package/dist/esm/token-list.entry.js +0 -249
- package/dist/esm/token-radii.entry.js +0 -21
- package/dist/esm/token-shadows.entry.js +0 -30
- /package/dist/cjs/{toastManager-1fb1a402.js → toastManager-4e9535f3.js} +0 -0
- /package/dist/{components/toastManager-b716afd8.js → esm/toastManager-d9eee791.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
import { toast } from "../../utils/toastManager";
|
|
2
3
|
/**
|
|
3
4
|
* `EdsForm` is a comprehensive form component designed to handle form submission with validation,
|
|
4
5
|
* error handling, and customizable fields. It offers several options for handling alerts and
|
|
@@ -16,23 +17,50 @@ import { h } from "@stencil/core";
|
|
|
16
17
|
export class EdsForm {
|
|
17
18
|
constructor() {
|
|
18
19
|
this.handleChange = (e, field) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
const target = e.target;
|
|
21
|
+
// Update the field's value in state.
|
|
22
|
+
this.values = Object.assign(Object.assign({}, this.values), { [field.name]: target.value });
|
|
23
|
+
// Create a copy of the current errors.
|
|
24
|
+
const newErrors = Object.assign({}, this.errors);
|
|
25
|
+
// Validate only the changed field.
|
|
26
|
+
if (field.type === 'checkbox' || field.type === 'radio') {
|
|
27
|
+
if (field.options) {
|
|
28
|
+
// Validate group of checkboxes or radio buttons.
|
|
29
|
+
const fieldErrors = this.validateFieldGroup(field.name, field.type, field.required);
|
|
30
|
+
if (fieldErrors.length > 0) {
|
|
31
|
+
newErrors[field.name] = fieldErrors;
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
delete newErrors[field.name];
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
// Validate a single checkbox.
|
|
39
|
+
const fieldErrors = this.validateSingleBox(field.name, field.required);
|
|
40
|
+
if (fieldErrors.length > 0) {
|
|
41
|
+
newErrors[field.name] = fieldErrors;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
delete newErrors[field.name];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
// Validate standard text (or similar) inputs.
|
|
50
|
+
const fieldErrors = this.validateField(field.name, target.value, field.type, field.required, field.maxlength);
|
|
24
51
|
if (fieldErrors.length > 0) {
|
|
25
|
-
|
|
26
|
-
this.hasError = true;
|
|
52
|
+
newErrors[field.name] = fieldErrors;
|
|
27
53
|
}
|
|
28
54
|
else {
|
|
29
|
-
delete
|
|
30
|
-
this.hasError = Object.keys(this.errors).length > 0;
|
|
55
|
+
delete newErrors[field.name];
|
|
31
56
|
}
|
|
32
|
-
this.alertMessage = null;
|
|
33
57
|
}
|
|
58
|
+
// Update the errors state and hasError flag.
|
|
59
|
+
this.errors = newErrors;
|
|
60
|
+
this.hasError = Object.keys(newErrors).length > 0;
|
|
34
61
|
};
|
|
35
62
|
this.handleSubmit = async (e) => {
|
|
63
|
+
var _a;
|
|
36
64
|
e.preventDefault();
|
|
37
65
|
if (this.isSubmitting) {
|
|
38
66
|
return;
|
|
@@ -58,6 +86,9 @@ export class EdsForm {
|
|
|
58
86
|
if (this.setFormUrl && typeof window !== 'undefined') {
|
|
59
87
|
formData.set('form_url', window.location.href);
|
|
60
88
|
}
|
|
89
|
+
if (this.authUser) {
|
|
90
|
+
formData.set('form_user', (_a = this.authUser) === null || _a === void 0 ? void 0 : _a.email);
|
|
91
|
+
}
|
|
61
92
|
/*const formDataObject = Object.fromEntries((formData as any).entries());
|
|
62
93
|
console.log(JSON.stringify(formDataObject));*/
|
|
63
94
|
const headers = this.coupleAuth
|
|
@@ -73,18 +104,21 @@ export class EdsForm {
|
|
|
73
104
|
if (!response.ok) {
|
|
74
105
|
const errorData = await response.json();
|
|
75
106
|
this.hasError = true;
|
|
76
|
-
|
|
107
|
+
toast.show(errorData.error || this.errorMessage, 'error');
|
|
108
|
+
//this.alertMessage = errorData.error || this.errorMessage;
|
|
77
109
|
return;
|
|
78
110
|
}
|
|
79
111
|
const data = await response.json();
|
|
80
112
|
this.formSubmitted = true;
|
|
81
|
-
this.alertMessage = data.message || this.successMessage;
|
|
113
|
+
//this.alertMessage = data.message || this.successMessage;
|
|
114
|
+
toast.show(data.message || this.successMessage, 'success');
|
|
82
115
|
this.formEl.reset();
|
|
83
116
|
}
|
|
84
117
|
catch (err) {
|
|
85
118
|
this.hasError = true;
|
|
86
119
|
//when api is unreachable will trigger the error message
|
|
87
|
-
this.alertMessage = `${
|
|
120
|
+
//this.alertMessage = `${err}`;
|
|
121
|
+
toast.show(`${err}`, 'error');
|
|
88
122
|
}
|
|
89
123
|
finally {
|
|
90
124
|
this.isSubmitting = false;
|
|
@@ -97,9 +131,11 @@ export class EdsForm {
|
|
|
97
131
|
this.submitBtnLabel = 'Submit';
|
|
98
132
|
this.successMessage = 'Your message has been sent.';
|
|
99
133
|
this.errorMessage = 'Some fields in your form are incorrect.';
|
|
134
|
+
this.submitBtnHintMessage = 'To participate, please sign in using your EBRAINS account. If you do not have an account yet, you can easily create one on the EBRAINS portal.';
|
|
100
135
|
this.endpoint = undefined;
|
|
101
136
|
this.name = 'form';
|
|
102
137
|
this.fields = undefined;
|
|
138
|
+
this.values = {};
|
|
103
139
|
this.coupleAuth = false;
|
|
104
140
|
this.formSubmitted = false;
|
|
105
141
|
this.hasError = false;
|
|
@@ -130,6 +166,14 @@ export class EdsForm {
|
|
|
130
166
|
});
|
|
131
167
|
linkElement.dispatchEvent(event);
|
|
132
168
|
}
|
|
169
|
+
// Visibility helper
|
|
170
|
+
isFieldVisible(field) {
|
|
171
|
+
if (!field.condition) {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
const parentValue = this.values[field.condition.field];
|
|
175
|
+
return parentValue === field.condition.value;
|
|
176
|
+
}
|
|
133
177
|
// Validate individual fields dynamically
|
|
134
178
|
validateField(name, value, type, required, maxLength) {
|
|
135
179
|
const errors = [];
|
|
@@ -145,7 +189,11 @@ export class EdsForm {
|
|
|
145
189
|
return errors;
|
|
146
190
|
}
|
|
147
191
|
validateFieldGroup(name, _type, required) {
|
|
148
|
-
|
|
192
|
+
// Find all eds-input-field components that contain this specific name
|
|
193
|
+
const groupFields = Array.from(this.formEl.querySelectorAll('eds-input-field')).filter((edsField) => { var _a, _b; return ((_b = (_a = edsField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`input[name="${name}"]`)) === null || _b === void 0 ? void 0 : _b.length) > 0; });
|
|
194
|
+
// Collect all input elements with the matching name inside those fields
|
|
195
|
+
const groupElements = groupFields.flatMap((edsField) => { var _a; return Array.from(((_a = edsField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`input[name="${name}"]`)) || []); });
|
|
196
|
+
//console.log(`validateFieldGroup - Found ${groupElements.length} elements for ${name}:`, groupElements);
|
|
149
197
|
const isChecked = groupElements.some((el) => el.checked);
|
|
150
198
|
const errors = [];
|
|
151
199
|
if (required && !isChecked) {
|
|
@@ -154,8 +202,19 @@ export class EdsForm {
|
|
|
154
202
|
return errors;
|
|
155
203
|
}
|
|
156
204
|
validateSingleBox(name, required) {
|
|
205
|
+
var _a;
|
|
157
206
|
const errors = [];
|
|
158
|
-
|
|
207
|
+
// Find the eds-input-field that contains the input
|
|
208
|
+
const edsField = Array.from(this.formEl.querySelectorAll('eds-input-field')).find((field) => { var _a; return (_a = field.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[name="${name}"]`); });
|
|
209
|
+
// If not found, handle the error or return early.
|
|
210
|
+
if (!edsField) {
|
|
211
|
+
if (required) {
|
|
212
|
+
errors.push(`${name} is required.`);
|
|
213
|
+
}
|
|
214
|
+
return errors;
|
|
215
|
+
}
|
|
216
|
+
// Now query within the shadow root of the found component.
|
|
217
|
+
const checkboxElement = (_a = edsField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`[name="${name}"]`);
|
|
159
218
|
if (required && checkboxElement && !checkboxElement.checked) {
|
|
160
219
|
errors.push(`${name} is required.`);
|
|
161
220
|
}
|
|
@@ -225,6 +284,18 @@ export class EdsForm {
|
|
|
225
284
|
const values = checkboxes.map((checkbox) => checkbox.value);
|
|
226
285
|
formData.append(input.name, values.join(',')); // Join multiple values with a comma
|
|
227
286
|
}
|
|
287
|
+
else if (input.type === 'file') {
|
|
288
|
+
// Handle file uploads.
|
|
289
|
+
const fileInput = input;
|
|
290
|
+
if (fileInput.files && fileInput.files.length > 0) {
|
|
291
|
+
// If multiple files are allowed, you can append them all.
|
|
292
|
+
Array.from(fileInput.files).forEach((file) => {
|
|
293
|
+
// You can either append each file under the same name (if your backend expects an array)
|
|
294
|
+
// or you can give them unique names. Here we use the same name.
|
|
295
|
+
formData.append(fileInput.name, file);
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
}
|
|
228
299
|
else {
|
|
229
300
|
// Handle other input types
|
|
230
301
|
formData.append(input.name, input.value);
|
|
@@ -240,12 +311,13 @@ export class EdsForm {
|
|
|
240
311
|
render() {
|
|
241
312
|
const hiddenFields = this.parseFields.filter((field) => field.type === 'hidden');
|
|
242
313
|
const otherFields = this.parseFields.filter((field) => field.type !== 'hidden');
|
|
243
|
-
return (h("form", { key: '
|
|
314
|
+
return (h("form", { key: 'fdb974998dfd27c0d857d0fbfbbe9e769e55d7bb', ref: (el) => (this.formEl = el), enctype: "multipart/form-data", autocomplete: "on", method: "post", onSubmit: this.handleSubmit }, h("div", { key: 'dfbe5adce9e5685736169e88408590088aba5b1e' }, h("slot", { key: 'f5c5356a8b87bf63fdd21901da81291c596f1487' }), hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), otherFields.map((field, index) => {
|
|
244
315
|
var _a, _b;
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
316
|
+
if (!this.isFieldVisible(field)) {
|
|
317
|
+
return null;
|
|
318
|
+
}
|
|
319
|
+
return (h("eds-input-field", { key: index, name: field.name, id: `${this.name}_${field.name}`, label: field.label, type: field.type, icon: field.icon || null, required: field.required, maxLength: field.maxlength, hint: field.hint, error: ((_a = this.errors[field.name]) === null || _a === void 0 ? void 0 : _a.length) > 0, errorMessage: (_b = this.errors[field.name]) === null || _b === void 0 ? void 0 : _b.join('<br />'), onInput: (e) => this.handleChange(e, field), class: index > 0 ? 'mt-20' : '', options: field.options }));
|
|
320
|
+
})), this.submitBtn && (h("div", { key: '2c3165a56d5bec9135a8695cae1b87981167c949', class: "mt-20" }, h("eds-button", { key: 'f311628ff58cd03ebbd0f7ccb0623df817d416da', intent: "primary", label: this.submitBtnLabel, disabled: this.isSubmitting || (this.coupleAuth && !this.isAuthenticated), loading: this.isSubmitting, onClick: (e) => this.handleSubmit(e) }), this.coupleAuth && !this.isAuthenticated ? (h("p", { class: "f-ui-05 text-lighter mt-8 ml-8" }, this.submitBtnHintMessage)) : null)), this.alertMessage && (this.formSubmitted || this.hasError) && (h("div", { key: '1c7adc93081294eb86b71e808933215fe04fa033', class: "mt-20" }, h("eds-alert", { key: 'd221dd0674be734a8b7382ea2eeb97509f6bc3a6', message: this.alertMessage, intent: this.hasError ? 'error' : 'success', direction: "horizontal" })))));
|
|
249
321
|
}
|
|
250
322
|
static get is() { return "eds-form"; }
|
|
251
323
|
static get originalStyleUrls() {
|
|
@@ -368,6 +440,24 @@ export class EdsForm {
|
|
|
368
440
|
"reflect": false,
|
|
369
441
|
"defaultValue": "'Some fields in your form are incorrect.'"
|
|
370
442
|
},
|
|
443
|
+
"submitBtnHintMessage": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"mutable": false,
|
|
446
|
+
"complexType": {
|
|
447
|
+
"original": "string",
|
|
448
|
+
"resolved": "string",
|
|
449
|
+
"references": {}
|
|
450
|
+
},
|
|
451
|
+
"required": false,
|
|
452
|
+
"optional": true,
|
|
453
|
+
"docs": {
|
|
454
|
+
"tags": [],
|
|
455
|
+
"text": "The message displayed when the form submission fails."
|
|
456
|
+
},
|
|
457
|
+
"attribute": "submit-btn-hint-message",
|
|
458
|
+
"reflect": false,
|
|
459
|
+
"defaultValue": "'To participate, please sign in using your EBRAINS account. If you do not have an account yet, you can easily create one on the EBRAINS portal.'"
|
|
460
|
+
},
|
|
371
461
|
"endpoint": {
|
|
372
462
|
"type": "string",
|
|
373
463
|
"mutable": false,
|
|
@@ -442,6 +532,7 @@ export class EdsForm {
|
|
|
442
532
|
}
|
|
443
533
|
static get states() {
|
|
444
534
|
return {
|
|
535
|
+
"values": {},
|
|
445
536
|
"formSubmitted": {},
|
|
446
537
|
"hasError": {},
|
|
447
538
|
"errors": {},
|
|
@@ -5399,14 +5399,14 @@ video {
|
|
|
5399
5399
|
}
|
|
5400
5400
|
}
|
|
5401
5401
|
.input-label {
|
|
5402
|
-
font-family: var(--f-ui-
|
|
5403
|
-
font-weight: var(--f-ui-
|
|
5404
|
-
font-size: var(--f-ui-
|
|
5405
|
-
line-height: var(--f-ui-
|
|
5406
|
-
letter-spacing: var(--f-ui-
|
|
5402
|
+
font-family: var(--f-ui-03-fontFamily);
|
|
5403
|
+
font-weight: var(--f-ui-03-fontWeight);
|
|
5404
|
+
font-size: var(--f-ui-03-fontSize);
|
|
5405
|
+
line-height: var(--f-ui-03-lineHeight);
|
|
5406
|
+
letter-spacing: var(--f-ui-03-letterSpacing);
|
|
5407
5407
|
}
|
|
5408
5408
|
.input-label b,.input-label strong {
|
|
5409
|
-
font-weight: var(--f-ui-
|
|
5409
|
+
font-weight: var(--f-ui-03---bold-weight, bold);
|
|
5410
5410
|
}
|
|
5411
5411
|
.input {
|
|
5412
5412
|
-webkit-appearance: none;
|
|
@@ -6193,6 +6193,16 @@ video {
|
|
|
6193
6193
|
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
6194
6194
|
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
|
6195
6195
|
}
|
|
6196
|
+
.space-y-4 {
|
|
6197
|
+
--tw-space-y-reverse: 0;
|
|
6198
|
+
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
|
|
6199
|
+
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
|
|
6200
|
+
}
|
|
6201
|
+
.space-y-8 {
|
|
6202
|
+
--tw-space-y-reverse: 0;
|
|
6203
|
+
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
6204
|
+
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
|
6205
|
+
}
|
|
6196
6206
|
.overflow-hidden {
|
|
6197
6207
|
overflow: hidden;
|
|
6198
6208
|
}
|
|
@@ -63,11 +63,11 @@ export class EdsInputField {
|
|
|
63
63
|
icon: this.icon,
|
|
64
64
|
checked: this.checked
|
|
65
65
|
};
|
|
66
|
-
return (h("div", { key: 'e1e4c68a8ca48b9526217b1c1eeaecbf3c73a652', class: "space-y-8" }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (h("fieldset", { class: "space-y-4 mt-8" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.parsedOptions.map((option) => (h("div", { class: "flex items-center gap-x-2", key: option.value }, h("eds-input", Object.assign({}, inputOpts, { value: option.value })), h("eds-input-label", { name: `${this.name}-${option.value}`, label: option.label })))))) : (h("div", { class: "flex items-center gap-x-8" }, h("eds-input", Object.assign({}, inputOpts)), this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (h("div", null, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && h("p", { class: "f-ui-05 text-lighter ml-8" }, this.hint)), this.type === 'select' ? (h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (h("input", { type: "file", id: this.inputId || this.name, name: this.name, onChange: this.onChange, disabled: this.disabled, required: this.required })) : this.type === 'search' ? (h("eds-input-search", { name: "search-box" })) : this.type === 'range' ? ((() => {
|
|
66
|
+
return (h("div", { key: 'e1e4c68a8ca48b9526217b1c1eeaecbf3c73a652', class: "space-y-8" }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (h("fieldset", { class: "space-y-4 mt-8" }, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.hint && h("p", { class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint)), this.parsedOptions.map((option) => (h("div", { class: "flex items-center gap-x-2", key: option.value }, h("eds-input", Object.assign({}, inputOpts, { value: option.value })), h("eds-input-label", { name: `${this.name}-${option.value}`, label: option.label })))))) : (h("div", { class: "flex items-center gap-x-8" }, h("eds-input", Object.assign({}, inputOpts)), this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (h("div", null, h("div", { class: "flex justify-between" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && h("p", { class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint)), this.type === 'select' ? (h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (h("input", { type: "file", id: this.inputId || this.name, name: this.name, onChange: this.onChange, disabled: this.disabled, required: this.required })) : this.type === 'search' ? (h("eds-input-search", { name: "search-box" })) : this.type === 'range' ? ((() => {
|
|
67
67
|
var _a, _b, _c;
|
|
68
68
|
const opt = this.parsedOptions;
|
|
69
69
|
return (h("eds-input-range", { min: (_a = opt[0]) === null || _a === void 0 ? void 0 : _a.value, max: (_b = opt[1]) === null || _b === void 0 ? void 0 : _b.value, step: (_c = opt[2]) === null || _c === void 0 ? void 0 : _c.value, name: "range-slider" }));
|
|
70
|
-
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("eds-input-footer", { key: '
|
|
70
|
+
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("eds-input-footer", { key: '7c283d5b193f179cdefbb011862358e3c92685c5', name: this.name, message: this.message, "error-message": this.errorMessage, error: this.error, link: this.link })));
|
|
71
71
|
}
|
|
72
72
|
static get is() { return "eds-input-field"; }
|
|
73
73
|
static get encapsulation() { return "shadow"; }
|
|
@@ -60,6 +60,10 @@
|
|
|
60
60
|
background-color: var(--white);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
.bg-dark {
|
|
64
|
+
background-color: var(--grey-300);
|
|
65
|
+
}
|
|
66
|
+
|
|
63
67
|
.rounded-lg {
|
|
64
68
|
border-radius: 16px;
|
|
65
69
|
}
|
|
@@ -174,6 +178,10 @@
|
|
|
174
178
|
padding-top: 0.5rem;
|
|
175
179
|
}
|
|
176
180
|
|
|
181
|
+
.bg-opacity-90 {
|
|
182
|
+
opacity: 0.9;
|
|
183
|
+
}
|
|
184
|
+
|
|
177
185
|
.line-clamp-1 {
|
|
178
186
|
overflow: hidden;
|
|
179
187
|
display: -webkit-box;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
+
//import { sendAnalytics } from '@ebrains/utils';
|
|
2
3
|
/**
|
|
3
4
|
* `EdsModal` is a modal dialog component that can be toggled open or closed.
|
|
4
5
|
*
|
|
@@ -24,12 +25,24 @@ export class EdsModal {
|
|
|
24
25
|
*/
|
|
25
26
|
async open() {
|
|
26
27
|
this.isOpen = true;
|
|
28
|
+
/*sendAnalytics({
|
|
29
|
+
category: 'ui-component',
|
|
30
|
+
tag: this.el.tagName.toLowerCase(),
|
|
31
|
+
name: this.title,
|
|
32
|
+
action: 'show'
|
|
33
|
+
});*/
|
|
27
34
|
}
|
|
28
35
|
/**
|
|
29
36
|
* Closes the modal.
|
|
30
37
|
*/
|
|
31
38
|
async close() {
|
|
32
39
|
this.isOpen = false;
|
|
40
|
+
/*sendAnalytics({
|
|
41
|
+
category: 'ui-component',
|
|
42
|
+
tag: this.el.tagName.toLowerCase(),
|
|
43
|
+
name: this.title,
|
|
44
|
+
action: 'hide'
|
|
45
|
+
});*/
|
|
33
46
|
}
|
|
34
47
|
/**
|
|
35
48
|
* Toggles the modal open or closed.
|
|
@@ -37,10 +50,36 @@ export class EdsModal {
|
|
|
37
50
|
async toggle() {
|
|
38
51
|
this.isOpen = !this.isOpen;
|
|
39
52
|
}
|
|
53
|
+
/**
|
|
54
|
+
* Lifecycle method that runs when the component has fully loaded.
|
|
55
|
+
* It emits a custom event for each `eds-button` element contained within the breadcrumb.
|
|
56
|
+
*/
|
|
57
|
+
componentDidLoad() {
|
|
58
|
+
// Emit context for each eds-link element after the component is fully loaded
|
|
59
|
+
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
60
|
+
btns.forEach((btn) => {
|
|
61
|
+
this.emitContext(btn);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Emits a custom event called `parentContext` for a given button element.
|
|
66
|
+
* This event provides context information about the eds-modal component.
|
|
67
|
+
*
|
|
68
|
+
* @param btnElement - The link element to which the event will be dispatched.
|
|
69
|
+
*/
|
|
70
|
+
emitContext(btnElement) {
|
|
71
|
+
const event = new CustomEvent('parentContext', {
|
|
72
|
+
detail: {
|
|
73
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
74
|
+
identifier: null
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
btnElement.dispatchEvent(event);
|
|
78
|
+
}
|
|
40
79
|
render() {
|
|
41
|
-
return (h("div", { key: '
|
|
80
|
+
return (h("div", { key: '00816ecb900bd9b68b31fdf6e48bef0223f9e10a', class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex` }, this.isOpen && (h("div", { key: '570fa8625f9ad4b1ea82633f11e2b289ab01b853', class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
42
81
|
,
|
|
43
|
-
onClick: () => this.close() })), h("div", { key: '
|
|
82
|
+
onClick: () => this.close() })), h("div", { key: 'ff658c763e3fbc98123f13483076399966b10515', class: "max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center " }, h("div", { key: 'd8b72acd90cc59ab1f82384aee4e311319f75aa9', class: "flex justify-between items-center border-b-2 border-softer pb-8" }, h("span", { key: 'ee61fc505c5a3eb93541d3762d37f28a5a788bae', class: `f-heading-04 text-lighter ${this.getTruncateClass()}` }, this.title), h("eds-button", { key: '3832772417d05a162eb5f2c4d0733f0ee845ed1c', intent: "tertiary", icon: "close", "aria-label": "Close modal", onClick: () => this.close(), "extra-class": "ml-8" })), h("div", { key: 'f71b38be8284a37d0d198df0a9858c64202b3d91', class: "pt-8" }, h("slot", { key: '1f80948334e5b4e9fc00a3bf01c6fc402d8220c3' })))));
|
|
44
83
|
}
|
|
45
84
|
static get is() { return "eds-modal"; }
|
|
46
85
|
static get encapsulation() { return "shadow"; }
|
|
@@ -172,4 +211,5 @@ export class EdsModal {
|
|
|
172
211
|
}
|
|
173
212
|
};
|
|
174
213
|
}
|
|
214
|
+
static get elementRef() { return "el"; }
|
|
175
215
|
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export class EdsTimeline {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.selectedEvent = null;
|
|
8
|
+
this.parsedEvents = [];
|
|
9
|
+
this.events = undefined;
|
|
10
|
+
}
|
|
11
|
+
parseEvents(newValue) {
|
|
12
|
+
try {
|
|
13
|
+
const parsed = JSON.parse(newValue);
|
|
14
|
+
this.parsedEvents = Array.isArray(parsed)
|
|
15
|
+
? parsed.map((event) => (Object.assign(Object.assign({}, event), { completed: event.completed === 'true' || event.completed === true // Ensure boolean conversion
|
|
16
|
+
})))
|
|
17
|
+
: [];
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
this.parsedEvents = [];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
componentWillLoad() {
|
|
24
|
+
this.parseEvents(this.events);
|
|
25
|
+
}
|
|
26
|
+
componentDidLoad() {
|
|
27
|
+
const cards = this.el.querySelectorAll('eds-card-generic');
|
|
28
|
+
cards.forEach((card) => {
|
|
29
|
+
this.emitContext(card);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
emitContext(cardElement) {
|
|
33
|
+
const event = new CustomEvent('parentContext', {
|
|
34
|
+
detail: {
|
|
35
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
36
|
+
identifier: null
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
cardElement.dispatchEvent(event);
|
|
40
|
+
}
|
|
41
|
+
handleEventClick(event) {
|
|
42
|
+
this.selectedEvent = event;
|
|
43
|
+
if (this.modalRef && typeof this.modalRef.open === 'function') {
|
|
44
|
+
this.modalRef.open();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
render() {
|
|
48
|
+
return (h("div", { key: '8f40212e04ab17cac2688df56b7330041a605a86', class: "max-w-sidebar mx-auto px-4 py-8" }, h("div", { key: '68421d4fce08e881e2494b5c504bd5db7570e34f', class: "relative" }, h("div", { key: 'e43edd7fba6d30b3dd48ffb2b467ff24b46c8da7', class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0" }), h("div", { key: '56dd7cebb5a2761547a5e24ec76652f7052906b2', class: "space-y-16" }, this.parsedEvents.map((event, index) => (h("div", { class: "relative flex" }, h("div", { class: `w-1/2 ${index % 2 === 0 ? 'pr-4' : ''}` }, index % 2 === 0 && (h("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
|
|
49
|
+
? [{ label: 'completed', style: 'accent' }]
|
|
50
|
+
: [{ label: 'pending', style: 'default' }]), onClick: () => this.handleEventClick(event) }))), h("div", { class: "flex items-center justify-center relative" }, event.completed ? (h("div", { class: "w-32 h-32 bg-accent rounded-full shadow flex items-center justify-center" })) : (h("div", { class: "w-32 h-32 bg-strong rounded-full shadow flex items-center justify-center" }))), h("div", { class: `w-1/2 ${index % 2 !== 0 ? 'pl-4' : ''}` }, index % 2 !== 0 && (h("eds-card-generic", { cardTitle: event.title, url: "#", description: event.description, "heading-level": "h2", tiny: true, bg: !event.completed, "with-hover": "false", tags: JSON.stringify(event.completed
|
|
51
|
+
? [{ label: 'completed', style: 'accent' }]
|
|
52
|
+
: [{ label: 'pending', style: 'default' }]), onClick: () => this.handleEventClick(event) }))))))))));
|
|
53
|
+
}
|
|
54
|
+
static get is() { return "eds-timeline"; }
|
|
55
|
+
static get properties() {
|
|
56
|
+
return {
|
|
57
|
+
"events": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"mutable": false,
|
|
60
|
+
"complexType": {
|
|
61
|
+
"original": "string",
|
|
62
|
+
"resolved": "string",
|
|
63
|
+
"references": {}
|
|
64
|
+
},
|
|
65
|
+
"required": false,
|
|
66
|
+
"optional": false,
|
|
67
|
+
"docs": {
|
|
68
|
+
"tags": [],
|
|
69
|
+
"text": "Accepts a JSON string of timeline events."
|
|
70
|
+
},
|
|
71
|
+
"attribute": "events",
|
|
72
|
+
"reflect": false
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static get states() {
|
|
77
|
+
return {
|
|
78
|
+
"selectedEvent": {},
|
|
79
|
+
"parsedEvents": {}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
static get elementRef() { return "el"; }
|
|
83
|
+
static get watchers() {
|
|
84
|
+
return [{
|
|
85
|
+
"propName": "events",
|
|
86
|
+
"methodName": "parseEvents"
|
|
87
|
+
}];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Timeline',
|
|
3
|
+
component: 'eds-timeline',
|
|
4
|
+
argTypes: {
|
|
5
|
+
events: {
|
|
6
|
+
control: 'object',
|
|
7
|
+
description: 'List of timeline events as a JSON array'
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
export const Default = {
|
|
12
|
+
render: (args) => `
|
|
13
|
+
<eds-timeline events='${JSON.stringify(args.events)}'></eds-timeline>
|
|
14
|
+
`,
|
|
15
|
+
args: {
|
|
16
|
+
events: [
|
|
17
|
+
{
|
|
18
|
+
id: '1',
|
|
19
|
+
title: 'TRL 1',
|
|
20
|
+
category: '#1',
|
|
21
|
+
description: 'Basic research is complete, principles are documented.',
|
|
22
|
+
fullDescription: 'Initial scientific research umented.',
|
|
23
|
+
completed: true
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: '2',
|
|
27
|
+
title: 'TRL 2',
|
|
28
|
+
category: '#2',
|
|
29
|
+
description: 'The technology concept and/or application is formulated.',
|
|
30
|
+
fullDescription: 'The initial concept and potential applications of the technology have been outlined.',
|
|
31
|
+
completed: false
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
@@ -81,7 +81,7 @@ export class EdsTooltip {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
render() {
|
|
84
|
-
return (h("div", { key: '
|
|
84
|
+
return (h("div", { key: '5edce5e2ca66ef992ad22604a5017e5ab02f846b', class: "relative" }, h("slot", { key: '74c9ef5978e023a45eb9c25c18f95f1875c19b13' }), this.isVisible && this.isPositioned && this.content && (h("div", { key: '4cc3ea40bd81308eb7685b5c1065e8bd30f99191', class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6", role: "tooltip", style: {
|
|
85
85
|
top: this.tooltipStyle.top,
|
|
86
86
|
left: this.tooltipStyle.left,
|
|
87
87
|
transform: this.tooltipStyle.transform
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export class EdsTrl {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.applications = undefined;
|
|
8
|
+
}
|
|
9
|
+
getParsedApplications() {
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(this.applications || '[]');
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
//console.error('Invalid applications JSON', error);
|
|
15
|
+
return [];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
calculateProgress(currentTrl) {
|
|
19
|
+
const maxTrl = 9;
|
|
20
|
+
return Math.ceil((currentTrl / maxTrl) * 100); // Calculate percentage and round up
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
const apps = this.getParsedApplications();
|
|
24
|
+
if (apps.length === 0) {
|
|
25
|
+
return h("p", null, "No applications to display.");
|
|
26
|
+
}
|
|
27
|
+
return (h("div", { class: "container mx-auto px-4 py-8" }, h("table", { class: "table-auto w-full border-collapse border border-gray-200" }, h("thead", null, h("tr", { class: "bg-gray-100" }, h("th", { class: "border border-gray-300 px-4 py-2 text-left" }, "Application"), h("th", { class: "border border-gray-300 px-4 py-2 text-left" }, "Current TRL Stage"), h("th", { class: "border border-gray-300 px-4 py-2 text-left" }, "Progress"))), h("tbody", null, apps.map((app) => (h("tr", null, h("td", { class: "border border-gray-300 px-4 py-2" }, app.name), h("td", { class: "border border-gray-300 px-4 py-2" }, "TRL ", app.currentTrl), h("td", { class: "border border-gray-300 px-4 py-2" }, h("eds-progress-bar", { value: this.calculateProgress(app.currentTrl) })))))))));
|
|
28
|
+
}
|
|
29
|
+
static get is() { return "eds-trl"; }
|
|
30
|
+
static get originalStyleUrls() {
|
|
31
|
+
return {
|
|
32
|
+
"$": ["eds-trl.css"]
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
static get styleUrls() {
|
|
36
|
+
return {
|
|
37
|
+
"$": ["eds-trl.css"]
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static get properties() {
|
|
41
|
+
return {
|
|
42
|
+
"applications": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"mutable": false,
|
|
45
|
+
"complexType": {
|
|
46
|
+
"original": "string",
|
|
47
|
+
"resolved": "string",
|
|
48
|
+
"references": {}
|
|
49
|
+
},
|
|
50
|
+
"required": false,
|
|
51
|
+
"optional": false,
|
|
52
|
+
"docs": {
|
|
53
|
+
"tags": [],
|
|
54
|
+
"text": ""
|
|
55
|
+
},
|
|
56
|
+
"attribute": "applications",
|
|
57
|
+
"reflect": false
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -33,7 +33,7 @@ export class ColorPrimaryPalette {
|
|
|
33
33
|
];
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
|
-
return (h("ul", { key: '
|
|
36
|
+
return (h("ul", { key: '20dce1081c2a9213d9df3bb19f14445881892809', class: "gap-y-8 md:gap-y-12 lg:gap-y-16" }, this.colors.map((color) => (h("li", { class: "grid-col-span-12 md:grid-col-span-6 flex flex-col" }, h("div", { class: "effect-height flex items-center justify-between p-16", style: { backgroundColor: color.background } }, h("div", { class: "grid" }, h("span", { class: "f-body-02" }, color.rgb), h("span", { class: "f-body-02 w-full" }, color.cmyk), h("eds-code-block", { code: color.hex, style: { minWidth: '150px', marginRight: '5px' } })), h("div", { class: "grid" }, h("span", { class: "f-body-02" }, color.pantoneC), h("span", { class: "f-body-02" }, color.pantoneU))))))));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "color-primary-palette"; }
|
|
39
39
|
}
|
|
@@ -58,7 +58,7 @@ export class ColorSecondaryPalette {
|
|
|
58
58
|
this.show = undefined;
|
|
59
59
|
}
|
|
60
60
|
render() {
|
|
61
|
-
return (h("ul", { key: '
|
|
61
|
+
return (h("ul", { key: '1eb0e9d0b681be4049209e60ab72bfd36cb09731', class: "gap-y-8 md:gap-y-12 lg:gap-y-16" }, this.colors.map((color) => (h("li", { class: "grid-col-span-12 md:grid-col-span-6 flex flex-col" }, h("div", { class: "effect-height flex items-center justify-between p-16", style: { backgroundColor: color.background } }, h("div", { class: "grid" }, h("span", { class: "f-body-02" }, color.rgb), h("span", { class: "f-body-02 w-full" }, color.cmyk), h("eds-code-block", { code: color.hex, style: { minWidth: '150px', marginRight: '5px' } })), h("div", { class: "grid" }, h("span", { class: "f-body-02" }, color.pantoneC), h("span", { class: "f-body-02" }, color.pantoneU))))))));
|
|
62
62
|
}
|
|
63
63
|
static get is() { return "color-secondary-palette"; }
|
|
64
64
|
static get properties() {
|
|
@@ -49,7 +49,7 @@ export class ColorSupportPalette {
|
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
51
|
render() {
|
|
52
|
-
return (h("ul", { key: '
|
|
52
|
+
return (h("ul", { key: 'c3dfdc3ab9ac3dcfbe1b82c7725d548d9f10a7ad', class: "gap-y-8 md:gap-y-12 lg:gap-y-16" }, this.colors.map((color) => (h("li", { class: "grid-col-span-12 md:grid-col-span-6 flex flex-col" }, h("div", { class: "effect-height flex items-center justify-between p-16", style: { backgroundColor: color.background } }, h("div", { class: "grid" }, h("span", { class: "f-body-02" }, color.rgb), h("span", { class: "f-body-02 w-full" }, color.cmyk), h("eds-code-block", { code: color.hex, style: { minWidth: '150px', marginRight: '5px' } })), h("div", { class: "grid" }, h("span", { class: "f-body-02" }, color.pantoneC || 'N/A'), h("span", { class: "f-body-02" }, color.pantoneU || 'N/A'))))))));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "color-support-palette"; }
|
|
55
55
|
}
|