@ebrains/components 1.0.0 → 1.2.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/components-section.cjs.entry.js +1 -1
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +2 -2
- package/dist/cjs/eds-alert.cjs.entry.js +2 -2
- package/dist/cjs/{eds-avatar_34.cjs.entry.js → eds-avatar_28.cjs.entry.js} +494 -523
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +145 -0
- package/dist/cjs/eds-card-desc_2.cjs.entry.js +77 -0
- package/dist/cjs/eds-card-generic.cjs.entry.js +92 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +1 -1
- package/dist/cjs/eds-gauge.cjs.entry.js +60 -0
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bookmark.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-close.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-copy.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-external.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-loader.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-minus.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-more.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-paper.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-plus.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-portal.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-private.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-public.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-search.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-star.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-success.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-thumbs-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-thumbs-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-tutorial.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-unknown.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-updown.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-user.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-pie.cjs.entry.js +106 -0
- package/dist/cjs/eds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/eds-rating.cjs.entry.js +1 -1
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-spinner.cjs.entry.js +1 -1
- package/dist/cjs/eds-switch.cjs.entry.js +2 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +32 -0
- package/dist/cjs/index-88c8039f.js +28 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/token-spacing.cjs.entry.js +16 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -2
- package/dist/collection/components/eds-alert/eds-alert.js +2 -2
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +1 -1
- package/dist/collection/components/eds-button/eds-button.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.js +1 -1
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.js +1 -1
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +2 -2
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-bookmark/eds-icon-bookmark.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-close/eds-icon-close.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-copy/eds-icon-copy.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-external/eds-icon-external.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-minus/eds-icon-minus.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-paper/eds-icon-paper.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-plus/eds-icon-plus.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-portal/eds-icon-portal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-private/eds-icon-private.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-public/eds-icon-public.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-star/eds-icon-star.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-down/eds-icon-thumbs-down.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-up/eds-icon-thumbs-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-tutorial/eds-icon-tutorial.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-unknown/eds-icon-unknown.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-updown/eds-icon-updown.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +1 -1
- package/dist/collection/components/eds-img/eds-img.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +2 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +121 -109
- package/dist/collection/components/eds-link/eds-link.js +1 -1
- package/dist/collection/components/eds-logo/eds-logo.js +1 -1
- package/dist/collection/components/eds-modal/eds-modal.js +2 -2
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-switch/eds-switch.js +2 -2
- package/dist/collection/components/eds-table/eds-table.css +5 -0
- package/dist/collection/components/eds-table/eds-table.js +171 -22
- package/dist/collection/eds-docs-ui/components-section/functional/react.js +1 -1
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +2 -2
- package/dist/collection/shared-ui/eds-form/eds-form.js +35 -3
- package/dist/collection/shared-ui/eds-steps/eds-steps.js +2 -2
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.css +17 -0
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.js +20 -2
- package/dist/collection/shared-ui/eds-user/eds-user.js +1 -1
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +7 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/eds-accordion2.js +2 -2
- package/dist/components/eds-alert2.js +2 -2
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +1 -1
- package/dist/components/eds-button2.js +1 -1
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-project.js +1 -1
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-tool.js +1 -1
- package/dist/components/eds-code-block2.js +1 -1
- package/dist/components/eds-dropdown2.js +2 -2
- package/dist/components/eds-footer2.js +2 -2
- package/dist/components/eds-form.js +15 -3
- package/dist/components/eds-gauge.js +1 -1
- 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-bookmark.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-external.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-minus.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-paper.js +1 -1
- package/dist/components/eds-icon-plus.js +1 -1
- package/dist/components/eds-icon-portal.js +1 -1
- package/dist/components/eds-icon-private.js +1 -1
- package/dist/components/eds-icon-public.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/eds-icon-star.js +1 -1
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-thumbs-down.js +1 -1
- package/dist/components/eds-icon-thumbs-up.js +1 -1
- package/dist/components/eds-icon-tutorial.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-unknown.js +1 -1
- package/dist/components/eds-icon-updown.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 -2
- package/dist/components/eds-input-field2.js +18 -27
- package/dist/components/eds-input-footer2.js +1 -1
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +1 -1
- package/dist/components/eds-input-search2.js +1 -1
- package/dist/components/eds-input-select2.js +2 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +1 -1
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-modal.js +2 -2
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +5 -3
- package/dist/components/eds-steps2.js +2 -2
- package/dist/components/eds-switch.js +2 -2
- package/dist/components/eds-table2.js +85 -25
- package/dist/components/eds-user.js +1 -1
- package/dist/components/p-023bc47c.entry.js +1 -0
- package/dist/components/p-11efb1d1.entry.js +1 -0
- package/dist/components/p-14679a86.entry.js +1 -0
- package/dist/components/p-158c95bc.entry.js +1 -0
- package/dist/components/p-177103fd.entry.js +1 -0
- package/dist/components/{p-bfc62d3e.entry.js → p-17d39d66.entry.js} +1 -1
- package/dist/components/p-19d586e6.entry.js +1 -0
- package/dist/components/p-1de8401b.entry.js +1 -0
- package/dist/components/{p-8ad05566.entry.js → p-1f5c19b9.entry.js} +1 -1
- package/dist/components/p-233d3577.entry.js +1 -0
- package/dist/components/p-321a950b.entry.js +1 -0
- package/dist/components/p-38c9aee7.entry.js +1 -0
- package/dist/components/p-42295abe.entry.js +1 -0
- package/dist/components/p-424e91b3.entry.js +1 -0
- package/dist/components/p-43cff423.entry.js +1 -0
- package/dist/components/p-45f21238.entry.js +1 -0
- package/dist/components/p-4bdf1589.entry.js +1 -0
- package/dist/components/p-4dcdd4d9.entry.js +1 -0
- package/dist/components/p-4fad9296.entry.js +1 -0
- package/dist/components/p-50f43dfd.entry.js +1 -0
- package/dist/components/p-563d56c0.entry.js +1 -0
- package/dist/components/p-5827fd52.entry.js +1 -0
- package/dist/components/{p-7af6b832.entry.js → p-590fb0e7.entry.js} +1 -1
- package/dist/components/p-5c5dfc4a.entry.js +1 -0
- package/dist/components/p-66f4cdd9.entry.js +1 -0
- package/dist/components/p-6dc6f729.entry.js +1 -0
- package/dist/components/p-6f9ab63c.entry.js +1 -0
- package/dist/components/p-7502b8b4.entry.js +1 -0
- package/dist/components/p-750e3ec8.entry.js +1 -0
- package/dist/components/p-8c0b0121.entry.js +1 -0
- package/dist/components/p-95518776.entry.js +1 -0
- package/dist/components/p-99d9bb29.entry.js +1 -0
- package/dist/components/p-9a4b5746.entry.js +1 -0
- package/dist/components/p-9c823b5e.entry.js +1 -0
- package/dist/components/p-9d64d1fd.entry.js +1 -0
- package/dist/components/p-ab4447f6.entry.js +1 -0
- package/dist/components/p-b073d78f.entry.js +1 -0
- package/dist/components/{p-8b016d76.entry.js → p-b5e64725.entry.js} +1 -1
- package/dist/components/p-b630e51a.entry.js +1 -0
- package/dist/components/p-c91b4eec.entry.js +1 -0
- package/dist/components/{p-0eeddc13.entry.js → p-d05a09df.entry.js} +1 -1
- package/dist/components/{p-84fd3e40.entry.js → p-d0b1e963.entry.js} +1 -1
- package/dist/components/p-d25364db.entry.js +1 -0
- package/dist/components/p-d3bb444a.entry.js +1 -0
- package/dist/components/p-d4f239d7.entry.js +1 -0
- package/dist/components/{p-a81cba86.entry.js → p-deb9bbed.entry.js} +1 -1
- package/dist/components/p-df772a35.entry.js +1 -0
- package/dist/components/p-e5113509.entry.js +1 -0
- package/dist/components/p-e8f0d7fc.entry.js +1 -0
- package/dist/components/{p-abb2ad00.entry.js → p-f189be4f.entry.js} +1 -1
- package/dist/components/p-f221eca2.entry.js +1 -0
- package/dist/components/p-f2416727.entry.js +1 -0
- package/dist/components/{p-50ea5b07.entry.js → p-f7716080.entry.js} +1 -1
- package/dist/components/p-fd85675b.entry.js +1 -0
- package/dist/components/{p-ea97a94e.entry.js → p-fe167c78.entry.js} +2 -2
- package/dist/components/p-ffccfeb6.entry.js +1 -0
- package/dist/esm/components-section.entry.js +1 -1
- package/dist/esm/components.js +1 -1
- package/dist/esm/eds-accordion.entry.js +2 -2
- package/dist/esm/eds-alert.entry.js +2 -2
- package/dist/esm/{eds-avatar_34.entry.js → eds-avatar_28.entry.js} +494 -517
- package/dist/esm/eds-breadcrumb.entry.js +141 -0
- package/dist/esm/eds-card-desc_2.entry.js +72 -0
- package/dist/esm/eds-card-generic.entry.js +88 -0
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +1 -1
- package/dist/esm/eds-gauge.entry.js +56 -0
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +1 -1
- package/dist/esm/eds-icon-arrow-right.entry.js +1 -1
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-bookmark.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-down.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-left.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-right.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-up.entry.js +1 -1
- package/dist/esm/eds-icon-close.entry.js +1 -1
- package/dist/esm/eds-icon-copy.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-external.entry.js +1 -1
- package/dist/esm/eds-icon-facebook.entry.js +1 -1
- package/dist/esm/eds-icon-gitlab.entry.js +1 -1
- package/dist/esm/eds-icon-linkedin.entry.js +1 -1
- package/dist/esm/eds-icon-loader.entry.js +1 -1
- package/dist/esm/eds-icon-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-menu.entry.js +1 -1
- package/dist/esm/eds-icon-minus.entry.js +1 -1
- package/dist/esm/eds-icon-more.entry.js +1 -1
- package/dist/esm/eds-icon-paper.entry.js +1 -1
- package/dist/esm/eds-icon-plus.entry.js +1 -1
- package/dist/esm/eds-icon-portal.entry.js +1 -1
- package/dist/esm/eds-icon-private.entry.js +1 -1
- package/dist/esm/eds-icon-public.entry.js +1 -1
- package/dist/esm/eds-icon-search.entry.js +1 -1
- package/dist/esm/eds-icon-star.entry.js +1 -1
- package/dist/esm/eds-icon-success.entry.js +1 -1
- package/dist/esm/eds-icon-thumbs-down.entry.js +1 -1
- package/dist/esm/eds-icon-thumbs-up.entry.js +1 -1
- package/dist/esm/eds-icon-tutorial.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-unknown.entry.js +1 -1
- package/dist/esm/eds-icon-updown.entry.js +1 -1
- package/dist/esm/eds-icon-user.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-pie.entry.js +102 -0
- package/dist/esm/eds-progress-bar.entry.js +1 -1
- package/dist/esm/eds-rating.entry.js +1 -1
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-spinner.entry.js +1 -1
- package/dist/esm/eds-switch.entry.js +2 -2
- package/dist/esm/eds-tooltip.entry.js +28 -0
- package/dist/esm/index-fdb33359.js +28 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/token-spacing.entry.js +12 -0
- package/dist/hydrate/index.js +201 -148
- package/dist/hydrate/index.mjs +201 -148
- package/dist/types/components/eds-input-field/eds-input-field.d.ts +47 -72
- package/dist/types/components/eds-table/eds-table.d.ts +69 -0
- package/dist/types/components.d.ts +114 -78
- package/dist/types/shared-ui/eds-form/eds-form.d.ts +3 -0
- package/dist/types/shared-ui/eds-steps-v2/eds-steps-v2.d.ts +2 -0
- package/package.json +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +0 -403
- package/dist/components/p-04b4e9d0.entry.js +0 -1
- package/dist/components/p-0863352c.entry.js +0 -1
- package/dist/components/p-0d6434e1.entry.js +0 -1
- package/dist/components/p-0e94a89f.entry.js +0 -1
- package/dist/components/p-100909ce.entry.js +0 -1
- package/dist/components/p-124b8747.entry.js +0 -1
- package/dist/components/p-14a223fe.entry.js +0 -1
- package/dist/components/p-18ceadd2.entry.js +0 -1
- package/dist/components/p-26d6679b.entry.js +0 -1
- package/dist/components/p-2b1b2026.entry.js +0 -1
- package/dist/components/p-3c642a30.entry.js +0 -1
- package/dist/components/p-46619042.entry.js +0 -1
- package/dist/components/p-511b23ec.entry.js +0 -1
- package/dist/components/p-5462923d.entry.js +0 -1
- package/dist/components/p-6199b8c0.entry.js +0 -1
- package/dist/components/p-624e653e.entry.js +0 -1
- package/dist/components/p-6ba42d02.entry.js +0 -1
- package/dist/components/p-6e929acb.entry.js +0 -1
- package/dist/components/p-6ede7101.entry.js +0 -1
- package/dist/components/p-70bac015.entry.js +0 -1
- package/dist/components/p-822ac246.entry.js +0 -1
- package/dist/components/p-848506b8.entry.js +0 -1
- package/dist/components/p-85634ad2.entry.js +0 -1
- package/dist/components/p-8bdf5841.entry.js +0 -1
- package/dist/components/p-8ff39cef.entry.js +0 -1
- package/dist/components/p-affe2b55.entry.js +0 -1
- package/dist/components/p-b31591db.entry.js +0 -1
- package/dist/components/p-b7efd666.entry.js +0 -1
- package/dist/components/p-ba784274.entry.js +0 -1
- package/dist/components/p-c0b22803.entry.js +0 -1
- package/dist/components/p-cdd491f5.entry.js +0 -1
- package/dist/components/p-d268c96b.entry.js +0 -1
- package/dist/components/p-d437bae2.entry.js +0 -1
- package/dist/components/p-d456e649.entry.js +0 -1
- package/dist/components/p-dae8f66a.entry.js +0 -1
- package/dist/components/p-e1791844.entry.js +0 -1
- package/dist/components/p-e82edd4a.entry.js +0 -1
- package/dist/components/p-e9f608a8.entry.js +0 -1
- package/dist/components/p-f26fd186.entry.js +0 -1
- package/dist/components/p-fe1cba17.entry.js +0 -1
- package/dist/esm/eds-pagination_2.entry.js +0 -398
|
@@ -20,7 +20,7 @@ export class EdsSectionCore {
|
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
22
|
const TagType = this.tag; // Set dynamic tag type (div or section)
|
|
23
|
-
return (h(TagType, { key: '
|
|
23
|
+
return (h(TagType, { key: '43f8d599041ae0c9761988fdec4872ec4a8ca037' }, h("eds-section-heading", { key: 'd120ddd851a0485e2edb43e2a6f508a661f35c07', headingLevel: this.headingLevel, sectionTitle: this.sectionTitle }), h("slot", { key: '9818b82a3eebcb741f5bccc9781e4212f2c5fa3d' })));
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "eds-section-core"; }
|
|
26
26
|
static get encapsulation() { return "shadow"; }
|
|
@@ -36,12 +36,12 @@ export class EdsSectionHeading {
|
|
|
36
36
|
render() {
|
|
37
37
|
const TagType = this.tag; // Dynamically set tag type for the container
|
|
38
38
|
const HeadingTag = this.headingLevel; // Dynamically set heading level
|
|
39
|
-
return (h(TagType, { key: '
|
|
39
|
+
return (h(TagType, { key: '740ed8b3208e07091a1f4c79888e172dec33773a', class: {
|
|
40
40
|
'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
|
|
41
41
|
container: this.withContainer,
|
|
42
42
|
'pt-48': this.spacingLarge,
|
|
43
43
|
'pt-28': !this.spacingLarge
|
|
44
|
-
} }, h(HeadingTag, { key: '
|
|
44
|
+
} }, h(HeadingTag, { key: '4d4ceef35b7cb06bfbff2fdae47e66dd7ac10c49', class: this.getHeadingClass() }, this.sectionTitle)));
|
|
45
45
|
}
|
|
46
46
|
static get is() { return "eds-section-heading"; }
|
|
47
47
|
static get properties() {
|
|
@@ -37,7 +37,7 @@ export class EdsSpinner {
|
|
|
37
37
|
alignItems: 'center',
|
|
38
38
|
justifyContent: 'center'
|
|
39
39
|
};
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: 'f687ccbbb05840b7699202f3758ec4a8d0de1bc4' }, h("div", { key: '4bb5c697f1ccd90d2d65d519fcfb3ec809b106ac', class: "spinner-overlay", style: overlayStyle }, h("span", { key: 'a07722d9ee9c94d03d9766a4b297a498998c00be', class: "spinner", style: spinnerStyle }))));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "eds-spinner"; }
|
|
43
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -23,11 +23,11 @@ export class EdsSwitch {
|
|
|
23
23
|
render() {
|
|
24
24
|
// Compute an accessible name based on state.
|
|
25
25
|
const accessibleLabel = this.labelOn || this.labelOff ? (this.checked ? this.labelOn : this.labelOff) : 'Toggle switch';
|
|
26
|
-
return (h("div", { key: '
|
|
26
|
+
return (h("div", { key: '385c1463b11e83ff5b982218e0f28c54299210fd', class: "switch-container" }, this.labelOff && h("span", { key: 'f7e825a34487a1cec466b5172d77c2802029607c', class: "switch-label switch-label--off mr-8" }, this.labelOff), h("button", { key: 'fd1e8ffab675ee79edc6b99de4dfff42545d91af', type: "button", role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": accessibleLabel, class: {
|
|
27
27
|
switch: true,
|
|
28
28
|
'switch--checked': this.checked,
|
|
29
29
|
'switch--disabled': this.disabled
|
|
30
|
-
}, onClick: this.toggleSwitch, disabled: this.disabled }, h("span", { key: '
|
|
30
|
+
}, onClick: this.toggleSwitch, disabled: this.disabled }, h("span", { key: '0d185957ffe2577ffc8798c298820c84c838a2a4', class: "switch-handle" })), this.labelOn && h("span", { key: 'f12b752ff94a363bb9593bd00cf43e7110e4399e', class: "switch-label switch-label--on ml-8" }, this.labelOn)));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "eds-switch"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* <eds-table
|
|
3
|
+
table-data='[
|
|
4
|
+
{ "Property": "username", "Type": "string", "Required": "Yes" },
|
|
5
|
+
{ "Property": "password", "Type": "string", "Required": "Yes" },
|
|
6
|
+
{ "Property": "email", "Type": "string", "Required": "No" }
|
|
7
|
+
]'
|
|
8
|
+
config='{
|
|
9
|
+
"Type": { "format": "uppercase" },
|
|
10
|
+
"Property": { "format": "code" },
|
|
11
|
+
"Required": { "hidden": true }
|
|
12
|
+
}'
|
|
13
|
+
actions='[
|
|
14
|
+
{ "name": "view", "label": "View" },
|
|
15
|
+
{ "name": "edit", "label": "Edit" },
|
|
16
|
+
{ "name": "delete", "type": "checkbox" }
|
|
17
|
+
]'
|
|
18
|
+
></eds-table>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
const table = document.querySelector('eds-table');
|
|
22
|
+
table.addEventListener('rowaction', e => {
|
|
23
|
+
const { action, row } = e.detail;
|
|
24
|
+
console.log(e.detail)
|
|
25
|
+
// etc.
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
*/
|
|
1
29
|
import { sendAnalytics } from "../../utils/analytics";
|
|
2
30
|
import { h } from "@stencil/core";
|
|
3
31
|
import { parseData } from "../../utils/sharedUtils";
|
|
@@ -25,6 +53,10 @@ export class EdsTable {
|
|
|
25
53
|
this.searchEnabled = false;
|
|
26
54
|
this.hostWidth = undefined;
|
|
27
55
|
this.columnSize = 'default';
|
|
56
|
+
this.actions = [];
|
|
57
|
+
this.actionTemplate = undefined;
|
|
58
|
+
this.parsedActions = [];
|
|
59
|
+
this.dataColumns = [];
|
|
28
60
|
this.tbData = [];
|
|
29
61
|
this.columns = [];
|
|
30
62
|
this.currentPage = 1;
|
|
@@ -39,8 +71,18 @@ export class EdsTable {
|
|
|
39
71
|
handleConfigChange() {
|
|
40
72
|
this.parseConfig();
|
|
41
73
|
}
|
|
74
|
+
handleActionsChange() {
|
|
75
|
+
try {
|
|
76
|
+
this.parsedActions = typeof this.actions === 'string' ? JSON.parse(this.actions) : this.actions;
|
|
77
|
+
}
|
|
78
|
+
catch (_a) {
|
|
79
|
+
console.error('Failed to parse actions JSON');
|
|
80
|
+
this.parsedActions = [];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
42
83
|
componentWillLoad() {
|
|
43
84
|
this.parseConfig();
|
|
85
|
+
this.handleActionsChange();
|
|
44
86
|
this.data ? this.parseData() : this.endpoint && this.fetchData();
|
|
45
87
|
}
|
|
46
88
|
componentDidLoad() {
|
|
@@ -69,24 +111,20 @@ export class EdsTable {
|
|
|
69
111
|
parseData() {
|
|
70
112
|
try {
|
|
71
113
|
this.tbData = parseData(this.data);
|
|
72
|
-
//this.tbData = typeof this.data === 'string' ? JSON.parse(this.data) : this.data || [];
|
|
73
114
|
this.totalRows = this.tbData.length;
|
|
74
115
|
this.updateColumns();
|
|
75
116
|
this.currentPage = 1;
|
|
76
117
|
}
|
|
77
118
|
catch (error) {
|
|
78
|
-
// eslint-disable-next-line
|
|
79
119
|
console.error('Failed to parse data:', error);
|
|
80
120
|
this.tbData = [];
|
|
81
121
|
}
|
|
82
122
|
}
|
|
83
123
|
parseConfig() {
|
|
84
124
|
try {
|
|
85
|
-
//this.parsedConfig = parseData(this.config);
|
|
86
125
|
this.parsedConfig = typeof this.config === 'string' ? JSON.parse(this.config) : this.config;
|
|
87
126
|
}
|
|
88
127
|
catch (error) {
|
|
89
|
-
// eslint-disable-next-line
|
|
90
128
|
console.error('Failed to parse config:', error);
|
|
91
129
|
this.parsedConfig = {};
|
|
92
130
|
}
|
|
@@ -98,7 +136,6 @@ export class EdsTable {
|
|
|
98
136
|
this.data = data;
|
|
99
137
|
}
|
|
100
138
|
catch (error) {
|
|
101
|
-
// eslint-disable-next-line
|
|
102
139
|
console.error('Failed to fetch data:', error);
|
|
103
140
|
}
|
|
104
141
|
}
|
|
@@ -134,24 +171,52 @@ export class EdsTable {
|
|
|
134
171
|
handleSearch(event) {
|
|
135
172
|
this.searchQuery = event.target.value;
|
|
136
173
|
this.currentPage = 1;
|
|
137
|
-
/*sendAnalytics({
|
|
138
|
-
category: 'ui-component',
|
|
139
|
-
parentContext: null,
|
|
140
|
-
tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
|
|
141
|
-
name: `${this.searchQuery}` || '',
|
|
142
|
-
action: 'page'
|
|
143
|
-
});*/
|
|
144
174
|
}
|
|
145
175
|
renderCell(value, column) {
|
|
146
176
|
var _a;
|
|
147
177
|
const format = (_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.format;
|
|
148
178
|
return format === 'uppercase' ? (value === null || value === void 0 ? void 0 : value.toString().toUpperCase()) : format === 'svg' ? (h("div", { innerHTML: value })) : format === 'bold' ? (h("strong", null, value)) : format === 'code' ? (h("code", null, value)) : (value);
|
|
149
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Renders one action (button or checkbox) for a specific action‐name.
|
|
182
|
+
* Used by the “Actions” column below.
|
|
183
|
+
*/
|
|
184
|
+
renderSingleActionCell(actionName, row) {
|
|
185
|
+
var _a;
|
|
186
|
+
const act = this.parsedActions.find((a) => a.name === actionName);
|
|
187
|
+
if (this.actionTemplate) {
|
|
188
|
+
return this.actionTemplate(row);
|
|
189
|
+
}
|
|
190
|
+
const type = act.type || 'button';
|
|
191
|
+
if (type === 'checkbox') {
|
|
192
|
+
const boundField = (_a = act.field) !== null && _a !== void 0 ? _a : act.name;
|
|
193
|
+
const checked = !!row[boundField];
|
|
194
|
+
return (h("eds-input-field", { name: `chc-${actionName}`, label: act.label, type: "checkbox", checked: checked, onChange: (e) => this.emitAction(act.name, row, e.target.checked) }));
|
|
195
|
+
}
|
|
196
|
+
return h("eds-link", { label: act.label, intent: "weak", onClick: () => this.emitAction(act.name, row) });
|
|
197
|
+
}
|
|
198
|
+
emitAction(actionName, row, checked) {
|
|
199
|
+
sendAnalytics({
|
|
200
|
+
category: 'ui-component',
|
|
201
|
+
parentContext: null,
|
|
202
|
+
tag: `${this.hostEl.tagName.toLowerCase()}/action`,
|
|
203
|
+
name: actionName,
|
|
204
|
+
action: 'click'
|
|
205
|
+
});
|
|
206
|
+
this.rowaction.emit({ action: actionName, row, checked: !!checked });
|
|
207
|
+
}
|
|
150
208
|
shouldEnablePagination() {
|
|
151
209
|
return this.paginationEnabled && this.totalRows > this.rowsPerPage;
|
|
152
210
|
}
|
|
153
211
|
updateColumns() {
|
|
212
|
+
var _a, _b;
|
|
213
|
+
// 1) Grab all data‐keys from the first row (if any) as before:
|
|
154
214
|
this.columns = this.tbData.length > 0 ? Object.keys(this.tbData[0]) : [];
|
|
215
|
+
// 2) Instead of pushing each action.name, we add just a single “actions” column
|
|
216
|
+
// (you can call it anything; we’ll detect it in render())
|
|
217
|
+
if (((_b = (_a = this.parsedActions) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0 && this.tbData.length > 0) {
|
|
218
|
+
this.columns.push('actions');
|
|
219
|
+
}
|
|
155
220
|
}
|
|
156
221
|
getVisibleColumnsCount() {
|
|
157
222
|
return this.columns.filter((column) => { var _a; return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden); }).length;
|
|
@@ -166,23 +231,39 @@ export class EdsTable {
|
|
|
166
231
|
}
|
|
167
232
|
return divisionFactor;
|
|
168
233
|
}
|
|
234
|
+
capitalize(str) {
|
|
235
|
+
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
236
|
+
}
|
|
169
237
|
render() {
|
|
170
|
-
// Use containerWidth state that is updated on resize.
|
|
171
238
|
const currentContainerWidth = this.hostWidth && this.hostWidth.trim() !== '' ? Number(this.hostWidth) : this.containerWidth || 400;
|
|
172
|
-
// Calculate the number of visible columns and the column width.
|
|
173
239
|
const visibleColumnsCount = this.getVisibleColumnsCount();
|
|
174
240
|
const columnWidth = visibleColumnsCount > 0 ? Math.floor((currentContainerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
175
241
|
const paginatedRows = this.getPaginatedRows();
|
|
176
242
|
const lastPage = Math.ceil(this.totalRows / this.rowsPerPage);
|
|
177
|
-
return (h("div", { key: '
|
|
178
|
-
// @ts-ignore
|
|
179
|
-
onInput: (event) => this.handleSearch(event) }))), h("div", { key: 'eb3eebe6fb124d4e1983b2fb7e636707817d36bd', class: "mt-20" }, h("table", { key: '03b312ac20bdec28843a46907a3cc4fba69f62ae', class: "block overflow-x-auto mt-6 p-0" }, h("thead", { key: 'ccab58dc46ae765df28da97ded6b1dd14d45d7f1' }, h("tr", { key: '904a125aad610cebe42b0bce46615be38f0ee17a', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((column) => {
|
|
243
|
+
return (h("div", { key: '5034177431626ab2bfc5fd0118c006d11a4f6e96' }, this.searchEnabled && (h("div", { key: '86e1a6ffc4bed69f290b3a53031341ab276eaf04' }, h("eds-input-field", { key: 1, name: "search", "aria-label": "Search", type: "text", placeholder: "Search...", onInput: (event) => this.handleSearch(event) }))), h("div", { key: 'bc11838d819ecf89c5ba1cc1cfe7ac0af0e82b59', class: "mt-20" }, h("table", { key: '97f16b65eb1d9387e9ca7588184c9e68c1afcc2e', class: "block overflow-x-auto mt-6 p-0" }, h("thead", { key: 'f4d64ada28c225db1b224277513e663a99de1cec' }, h("tr", { key: 'c6a69e159cceada0f7143c0acb787e5c23242ae7', class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((col) => {
|
|
180
244
|
var _a;
|
|
181
|
-
|
|
182
|
-
|
|
245
|
+
// 3) For the “actions” column, override the header to “Actions”
|
|
246
|
+
if (col === 'actions') {
|
|
247
|
+
// You can choose a smaller min‐width here if you wish:
|
|
248
|
+
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }, "Actions"));
|
|
249
|
+
}
|
|
250
|
+
// Otherwise, render column name or action label if you do want to override:
|
|
251
|
+
if (!((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden)) {
|
|
252
|
+
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${columnWidth - 4}px` } }, this.capitalize(col)));
|
|
253
|
+
}
|
|
254
|
+
return null;
|
|
255
|
+
}))), h("tbody", { key: '133af82fdd1f820e853734ab48123cb3db527e15' }, paginatedRows.map((row) => (h("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((col) => {
|
|
183
256
|
var _a;
|
|
184
|
-
|
|
185
|
-
|
|
257
|
+
if (col === 'actions') {
|
|
258
|
+
// 4) Render ALL actions inside a single <td> for this row:
|
|
259
|
+
return (h("td", { class: "text-center border border-softer m-0 f-ui-02 break-words actions-cell", style: { minWidth: `${columnWidth - 4}px` } }, h("div", { style: { display: 'flex', gap: '0.5rem', justifyContent: 'center', flexWrap: 'wrap' } }, this.parsedActions.map((act) => (h("span", { style: { whiteSpace: 'nowrap' } }, this.renderSingleActionCell(act.name, row)))))));
|
|
260
|
+
}
|
|
261
|
+
if (!((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden)) {
|
|
262
|
+
// Regular data cell:
|
|
263
|
+
return (h("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${columnWidth - 4}px` } }, this.renderCell(row[col], col)));
|
|
264
|
+
}
|
|
265
|
+
return null;
|
|
266
|
+
}))))))), this.shouldEnablePagination() && (h("div", { key: '85032d06cd0ac5dae9b504d423fceba3cd074861', class: "mt-20" }, h("eds-pagination", { key: '8caf6f57960e222c04d45f57a5811cd7bd524f4c', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
|
|
186
267
|
}
|
|
187
268
|
static get is() { return "eds-table"; }
|
|
188
269
|
static get encapsulation() { return "shadow"; }
|
|
@@ -239,7 +320,7 @@ export class EdsTable {
|
|
|
239
320
|
"mutable": false,
|
|
240
321
|
"complexType": {
|
|
241
322
|
"original": "| string\n | {\n [key: string]: {\n hidden?: boolean;\n format?: 'uppercase' | 'bold' | 'code';\n };\n }",
|
|
242
|
-
"resolved": "string | { [key: string]: { hidden?: boolean; format?: \"code\" | \"
|
|
323
|
+
"resolved": "string | { [key: string]: { hidden?: boolean; format?: \"code\" | \"uppercase\" | \"bold\"; }; }",
|
|
243
324
|
"references": {}
|
|
244
325
|
},
|
|
245
326
|
"required": false,
|
|
@@ -340,11 +421,58 @@ export class EdsTable {
|
|
|
340
421
|
"attribute": "column-size",
|
|
341
422
|
"reflect": false,
|
|
342
423
|
"defaultValue": "'default'"
|
|
424
|
+
},
|
|
425
|
+
"actions": {
|
|
426
|
+
"type": "string",
|
|
427
|
+
"mutable": false,
|
|
428
|
+
"complexType": {
|
|
429
|
+
"original": "string | TableAction[]",
|
|
430
|
+
"resolved": "TableAction[] | string",
|
|
431
|
+
"references": {
|
|
432
|
+
"TableAction": {
|
|
433
|
+
"location": "local",
|
|
434
|
+
"path": "/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/src/components/eds-table/eds-table.tsx",
|
|
435
|
+
"id": "../../../packages/components/src/components/eds-table/eds-table.tsx::TableAction"
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
"required": false,
|
|
440
|
+
"optional": false,
|
|
441
|
+
"docs": {
|
|
442
|
+
"tags": [],
|
|
443
|
+
"text": "Array of actions to render in each row.\nEach action should have:\n - `name`: a unique key (e.g. \"view\", \"delete\")\n - `label`: what shows in the button (or you could pass an icon name here)"
|
|
444
|
+
},
|
|
445
|
+
"attribute": "actions",
|
|
446
|
+
"reflect": false,
|
|
447
|
+
"defaultValue": "[]"
|
|
448
|
+
},
|
|
449
|
+
"actionTemplate": {
|
|
450
|
+
"type": "unknown",
|
|
451
|
+
"mutable": false,
|
|
452
|
+
"complexType": {
|
|
453
|
+
"original": "(row: any) => VNode",
|
|
454
|
+
"resolved": "(row: any) => VNode",
|
|
455
|
+
"references": {
|
|
456
|
+
"VNode": {
|
|
457
|
+
"location": "import",
|
|
458
|
+
"path": "@stencil/core",
|
|
459
|
+
"id": "../../../node_modules/@stencil/core/internal/stencil-core/index.d.ts::VNode"
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
},
|
|
463
|
+
"required": false,
|
|
464
|
+
"optional": true,
|
|
465
|
+
"docs": {
|
|
466
|
+
"tags": [],
|
|
467
|
+
"text": "Optional: allow the consumer to supply a full JSX render\u2010prop\ninstead of simple name/label pairs. If provided, this takes priority."
|
|
468
|
+
}
|
|
343
469
|
}
|
|
344
470
|
};
|
|
345
471
|
}
|
|
346
472
|
static get states() {
|
|
347
473
|
return {
|
|
474
|
+
"parsedActions": {},
|
|
475
|
+
"dataColumns": {},
|
|
348
476
|
"tbData": {},
|
|
349
477
|
"columns": {},
|
|
350
478
|
"currentPage": {},
|
|
@@ -354,6 +482,24 @@ export class EdsTable {
|
|
|
354
482
|
"containerWidth": {}
|
|
355
483
|
};
|
|
356
484
|
}
|
|
485
|
+
static get events() {
|
|
486
|
+
return [{
|
|
487
|
+
"method": "rowaction",
|
|
488
|
+
"name": "rowaction",
|
|
489
|
+
"bubbles": true,
|
|
490
|
+
"cancelable": true,
|
|
491
|
+
"composed": true,
|
|
492
|
+
"docs": {
|
|
493
|
+
"tags": [],
|
|
494
|
+
"text": "Define the event with the payload type"
|
|
495
|
+
},
|
|
496
|
+
"complexType": {
|
|
497
|
+
"original": "{ action: string; row: any; checked: boolean }",
|
|
498
|
+
"resolved": "{ action: string; row: any; checked: boolean; }",
|
|
499
|
+
"references": {}
|
|
500
|
+
}
|
|
501
|
+
}];
|
|
502
|
+
}
|
|
357
503
|
static get elementRef() { return "hostEl"; }
|
|
358
504
|
static get watchers() {
|
|
359
505
|
return [{
|
|
@@ -362,6 +508,9 @@ export class EdsTable {
|
|
|
362
508
|
}, {
|
|
363
509
|
"propName": "config",
|
|
364
510
|
"methodName": "handleConfigChange"
|
|
511
|
+
}, {
|
|
512
|
+
"propName": "actions",
|
|
513
|
+
"methodName": "handleActionsChange"
|
|
365
514
|
}, {
|
|
366
515
|
"propName": "data",
|
|
367
516
|
"methodName": "parseData"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const DocsReact = () => (h("div", null, h("h2", null, "React Wrappers"), h("p", null, "To use the EBRAINS web components in a React Application, simple install the package below and check out the examples"), h("eds-code-block", { code: "npm install @ebrains/react", language: "javascript", "copy-label": "Copy Code" }), h("eds-section-core", { "section-title": "Example React App", "heading-level": "h3" }, h("p", null, "This code displays a Stencil-based splash screen that stays visible until an initialization promise resolves (or errors), then hides itself and reveals the main React app content."), h("eds-code-block", { code: "\nimport React, { useMemo, useState } from 'react';\nimport {\n EdsHeader
|
|
2
|
+
export const DocsReact = () => (h("div", null, h("h2", null, "React Wrappers"), h("p", null, "To use the EBRAINS web components in a React Application, simple install the package below and check out the examples"), h("eds-code-block", { code: "npm install @ebrains/react", language: "javascript", "copy-label": "Copy Code" }), h("eds-section-core", { "section-title": "Example React App", "heading-level": "h3" }, h("p", null, "This code displays a Stencil-based splash screen that stays visible until an initialization promise resolves (or errors), then hides itself and reveals the main React app content."), h("eds-code-block", { code: "\nimport React, { useMemo, useState } from 'react';\nimport {\n EdsHeader,\n EdsSplashScreen,\n EdsMatomoNotice,\n EdsSteps\n} from '@ebrains/react';\nimport './app.css';\n\n// simulate 2s\nfunction fakeInit(): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, 2000));\n}\n\nexport function App() {\n // 1) create init promise\n const initPromise = useMemo(() => fakeInit(), []);\n\n // 2) is splash still visible\n const [splashVisible, setSplashVisible] = useState(true);\n const [initError, setInitError] = useState<string | null>(null);\n\n // 3) show the UI after the splash has hidden\n const showApp = !splashVisible && !initError;\n\n return (\n <div>\n {splashVisible && (\n <EdsSplashScreen\n inverse={false}\n initPromise={initPromise}\n onSplash={(e: CustomEvent) => {\n if (e.detail.type === 'hidden') {\n setSplashVisible(false);\n } else if (e.detail.type === 'error') {\n setInitError(e.detail.message);\n setSplashVisible(false);\n }\n }}\n />\n )}\n\n {initError && (\n <div className='error'>\n Failed to initialize: {initError}\n </div>\n )}\n\n {/* Show App only when ready */}\n {showApp && (\n <>\n <EdsHeader></EdsHeader>\n <EdsSteps\n steps={[\n {\n title: 'Introduction',\n content: 'Begin by familiarizing yourself with the overall process.'\n },\n {\n title: 'Process Overview',\n content: 'Review the detailed steps and understand the workflow.'\n }\n ]}\n type='linear'\n />\n\n <EdsMatomoNotice />\n\n <div id='root'></div>\n </>\n )}\n </div>\n );\n}\nexport default App;\n", language: "javascript", "copy-label": "Copy Code" }))));
|
|
@@ -43,9 +43,9 @@ export class EdsFooter {
|
|
|
43
43
|
* @returns {JSX.Element} The rendered JSX for the footer component.
|
|
44
44
|
*/
|
|
45
45
|
render() {
|
|
46
|
-
return (h("footer", { key: '7bbc8cd8e0e3a153dc30bb3569e83afc0bc09b0a' }, this.social ? (h("div", { class: "border-softest border-t-2 pt-20 md:pt-28" }, h("div", { class: "container pb-20" }, h("div", { class: "grid-layout" }, h("div", { class: "grid-col-span-12 lg:grid-col-span-5" }, h("eds-social-networks", { class: "mt-28" })))))) : null, h("div", { key: '9ee8ada698546344b18e557ee1de76042cd727ed', class: `border-softest ${this.social ? 'border-t-2' : ''} pb-28 pt-20 md:pt-28` }, h("div", { key: 'e795e5bba0273b4147c66ed667142997bc0cbaff', class: "container flex items-center gap-20 lg:flex-nowrap" }, h("div", { key: 'fa09a0dbccb035b1e4f496aa447aca241bcc2415', class: "flex items-center gap-x-12" }, h("a", { key: '
|
|
46
|
+
return (h("footer", { key: '7bbc8cd8e0e3a153dc30bb3569e83afc0bc09b0a' }, this.social ? (h("div", { class: "border-softest border-t-2 pt-20 md:pt-28" }, h("div", { class: "container pb-20" }, h("div", { class: "grid-layout" }, h("div", { class: "grid-col-span-12 lg:grid-col-span-5" }, h("eds-social-networks", { class: "mt-28" })))))) : null, h("div", { key: '9ee8ada698546344b18e557ee1de76042cd727ed', class: `border-softest ${this.social ? 'border-t-2' : ''} pb-28 pt-20 md:pt-28` }, h("div", { key: 'e795e5bba0273b4147c66ed667142997bc0cbaff', class: "container flex items-center gap-20 lg:flex-nowrap" }, h("div", { key: 'fa09a0dbccb035b1e4f496aa447aca241bcc2415', class: "flex items-center gap-x-12" }, h("a", { key: '578d6a8463e65d07278f8328c108ee266cfba2b8', target: "_blank", rel: "noopener noreferrer", class: "effect-focus focus-visible:rounded-xs flex w-[54px] ml-0", href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-europe_en", "aria-label": "Learn about Horizon Europe funding" }, h("eds-img", { key: '5b9e987c2ecf62fb4f44c1faacad7c569a149805', width: 54, height: 41, src: "https://www.ebrains.eu/flags/4x3/eu.svg", alt: "European Union Flag" }))), h("div", { key: 'df75949c0718b8fb7dd449a6e7df39d332da366f' }, h("div", { key: 'f83d31b16d0601cd456d5cb72e9fa2adb29a2b66', class: "f-ui-04 text-light" }, h("p", { key: 'dcdf09d78ca64c5391d56fe5ed69bab987cbf67b' }, this.fundedBy), h("div", { key: 'af279fb5dfdf0a8f1f85e6ce7446dc3a0eeac397', class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap inline-block" }, h("span", { key: '026b41fa6162ffb6825ccf98364b4caf64b6457a', class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline mr-4" }, "\u00A9 ", this.rightsReserved), this.enableCookiesSettings ? (h("eds-link", { label: this.cookiesPreferences, intent: "underline", "extra-class": "f-ui-04", onClick: () => {
|
|
47
47
|
this.toggleCookiesConsent();
|
|
48
|
-
} })) : null))), h("div", { key: '
|
|
48
|
+
} })) : null))), h("div", { key: '27cb561815d6918567ab8cfa1148019aca8aeda0', class: "ml-auto pl-12" }, this.enableScrollTop ? (h("eds-button", { id: "backToTop", "aria-hidden": "true", "aria-label": this.backToTopAriaLabel, intent: "ghostInverse", icon: "chevron-up", onClick: this.backToTop, class: "transition-all transition duration-75 opacity-0 " })) : null)))));
|
|
49
49
|
}
|
|
50
50
|
static get is() { return "eds-footer"; }
|
|
51
51
|
static get encapsulation() { return "shadow"; }
|
|
@@ -31,6 +31,9 @@ export class EdsForm {
|
|
|
31
31
|
this.errors = {};
|
|
32
32
|
this.parsedFields = [];
|
|
33
33
|
}
|
|
34
|
+
async setData(newData) {
|
|
35
|
+
this.populateFormWithInitData(newData);
|
|
36
|
+
}
|
|
34
37
|
componentWillLoad() {
|
|
35
38
|
this.parseFields(this.fields);
|
|
36
39
|
// Emit context for each eds-link element after the component is fully loaded
|
|
@@ -203,6 +206,14 @@ export class EdsForm {
|
|
|
203
206
|
// Update the errors state and the hasError flag.
|
|
204
207
|
this.errors = newErrors;
|
|
205
208
|
this.hasError = Object.keys(newErrors).length > 0;
|
|
209
|
+
// Emit the updated form state.
|
|
210
|
+
this.form.emit({
|
|
211
|
+
event: 'input',
|
|
212
|
+
field: field.name,
|
|
213
|
+
value: target.type === 'checkbox' ? this.values[field.name] : target.value,
|
|
214
|
+
message: `${field.name} updated`
|
|
215
|
+
//data: this.makeFormData()
|
|
216
|
+
});
|
|
206
217
|
}
|
|
207
218
|
handleSubmit() {
|
|
208
219
|
var _a, _b;
|
|
@@ -263,13 +274,13 @@ export class EdsForm {
|
|
|
263
274
|
render() {
|
|
264
275
|
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
265
276
|
const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
266
|
-
return (h("form", { key: '
|
|
277
|
+
return (h("form", { key: '1418bbac3ea7c994bf363602e6ddd18ed3c6c661', ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, h("div", { key: 'ae6f05d50a1c32312e585d55f0b5d64b0dd1fc9c' }, h("slot", { key: '09c9ddd0d3b77ae9cbcb54389b799af7a6fc6c9e' }), hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), otherFields.map((field, index) => {
|
|
267
278
|
var _a, _b;
|
|
268
279
|
if (!this.isFieldVisible(field)) {
|
|
269
280
|
return null;
|
|
270
281
|
}
|
|
271
|
-
return (h("eds-input-field", { key: index, name: field.name, id: `${this.name}_${field.name}`, label: field.label, placeholder: field.placeholder, value: this.values[field.name] || null, type: field.type, icon: field.icon || null, disabled: field.disabled, required: field.required, maxLength: field.maxlength, hint: field.hint, link: field.link, message: field.message, 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.handleInput(e, field),
|
|
272
|
-
})), this.formBtn && (h("div", { key: '
|
|
282
|
+
return (h("eds-input-field", { key: index, name: field.name, id: `${this.name}_${field.name}`, label: field.label, placeholder: field.placeholder, value: this.values[field.name] || null, type: field.type, icon: field.icon || null, disabled: field.disabled, required: field.required, maxLength: field.maxlength, hint: field.hint, link: field.link, message: field.message, 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.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field), class: index > 0 ? 'mt-20' : '', options: field.options }));
|
|
283
|
+
})), this.formBtn && (h("div", { key: 'c97041c2e421c21a38513d3b456991167f5d1cdb', class: "mt-20" }, h("eds-button", { key: '96c35271f7227b9acd467fe822745bd41d3eaa80', intent: "primary", label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, onClick: () => this.handleSubmit() })))));
|
|
273
284
|
}
|
|
274
285
|
static get is() { return "eds-form"; }
|
|
275
286
|
static get encapsulation() { return "shadow"; }
|
|
@@ -440,6 +451,27 @@ export class EdsForm {
|
|
|
440
451
|
}
|
|
441
452
|
static get methods() {
|
|
442
453
|
return {
|
|
454
|
+
"setData": {
|
|
455
|
+
"complexType": {
|
|
456
|
+
"signature": "(newData: { [key: string]: any; }) => Promise<void>",
|
|
457
|
+
"parameters": [{
|
|
458
|
+
"name": "newData",
|
|
459
|
+
"type": "{ [key: string]: any; }",
|
|
460
|
+
"docs": ""
|
|
461
|
+
}],
|
|
462
|
+
"references": {
|
|
463
|
+
"Promise": {
|
|
464
|
+
"location": "global",
|
|
465
|
+
"id": "global::Promise"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"return": "Promise<void>"
|
|
469
|
+
},
|
|
470
|
+
"docs": {
|
|
471
|
+
"text": "",
|
|
472
|
+
"tags": []
|
|
473
|
+
}
|
|
474
|
+
},
|
|
443
475
|
"getData": {
|
|
444
476
|
"complexType": {
|
|
445
477
|
"signature": "() => Promise<FormData>",
|
|
@@ -74,10 +74,10 @@ export class EdsSteps {
|
|
|
74
74
|
render() {
|
|
75
75
|
const steps = this.parsedSteps;
|
|
76
76
|
if (this.type === 'linear') {
|
|
77
|
-
return (h("div", null, h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), this.activeStep === index && (h("div", { class: "content" }, h("div", { class:
|
|
77
|
+
return (h("div", null, h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), this.activeStep === index && (h("div", { class: "content" }, h("slot", { name: `step-${index}` }, h("div", { class: index === steps.length - 1 ? 'f-body-02 text-lighter mt-16' : 'f-body-02 text-lighter my-16', innerHTML: step.content })), h("eds-button", { label: index === steps.length - 1 ? 'Finish' : 'Continue', intent: "primary", class: "next-btn", onClick: this.handleNext }), h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index === 0, "extra-class": index === 0 ? 'hidden' : 'ml-8 block' })))))))));
|
|
78
78
|
}
|
|
79
79
|
// Static mode: show all steps with their content, no navigation buttons.
|
|
80
|
-
return (h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", null, step.title), h("div", { class: "content" }, h("div", { class:
|
|
80
|
+
return (h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", null, step.title), h("div", { class: "content" }, h("slot", { name: `step-${index}` }, h("div", { class: index === steps.length - 1 ? 'f-body-02 text-lighter mt-16' : 'f-body-02 text-lighter my-16', innerHTML: step.content }))))))));
|
|
81
81
|
}
|
|
82
82
|
static get is() { return "eds-steps"; }
|
|
83
83
|
static get encapsulation() { return "shadow"; }
|
|
@@ -165,6 +165,11 @@ pre {
|
|
|
165
165
|
margin-top: 1rem;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
.my-16 {
|
|
169
|
+
margin-top: 1rem;
|
|
170
|
+
margin-bottom: 1rem;
|
|
171
|
+
}
|
|
172
|
+
|
|
168
173
|
.mb-12 {
|
|
169
174
|
margin-bottom: 0.75rem;
|
|
170
175
|
}
|
|
@@ -258,4 +263,16 @@ pre {
|
|
|
258
263
|
|
|
259
264
|
.overflow-hidden {
|
|
260
265
|
overflow: hidden;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.space-y-8 {
|
|
269
|
+
--tw-space-y-reverse: 0;
|
|
270
|
+
margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
|
|
271
|
+
margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.space-y-16 {
|
|
275
|
+
--tw-space-y-reverse: 0;
|
|
276
|
+
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
|
277
|
+
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
|
|
261
278
|
}
|
|
@@ -17,6 +17,7 @@ export class EdsStepsV2 {
|
|
|
17
17
|
this.steps = [];
|
|
18
18
|
this.type = 'static';
|
|
19
19
|
this.imageSrc = undefined;
|
|
20
|
+
this.imageWidth = undefined;
|
|
20
21
|
this.bg = true;
|
|
21
22
|
this.message = undefined;
|
|
22
23
|
this.activeStep = 0;
|
|
@@ -72,9 +73,9 @@ export class EdsStepsV2 {
|
|
|
72
73
|
}
|
|
73
74
|
render() {
|
|
74
75
|
const steps = this.parsedSteps;
|
|
75
|
-
return (h("div", { key: '
|
|
76
|
+
return (h("div", { key: 'bbcec2dd9a5096eb0cecf0d413892e5708822f52', class: this.articleClasses() }, this.imageSrc ? (h("div", { class: "w-full mb-12 rounded-t-lg overflow-hidden border-2" }, h("eds-img", { src: this.imageSrc, width: this.imageWidth, "with-bg": "true", "lazy-load": "true", alt: "Step illustration" }))) : (this.message && (h("div", { class: "w-full bg-[#00A595] rounded-t-lg border-2" }, h("div", { class: "p-24" }, h("span", { class: "text-inverse f-heading-04 " }, this.message))))), h("div", { key: 'db0618aad7d5986fcb0889f1c439be73f83a00df', class: "p-8" }, this.type === 'linear' ? (h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: index === 0 ? 'step' : 'step space-y-16', key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), this.activeStep === index && (h("div", { class: "content" }, h("slot", { name: `step-${index}` }, h("div", { class: index === steps.length - 1 ? 'f-body-02 text-lighter mt-16' : 'f-body-02 text-lighter my-16', innerHTML: step.content })), h("eds-button", { label: index === steps.length - 1 ? 'Finish' : 'Continue', intent: "primary", class: "next-btn", onClick: this.handleNext }), h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index === 0, "extra-class": index === 0 ? 'hidden' : 'ml-8 block' })))))))) : (
|
|
76
77
|
// Static mode: show all steps with their content.
|
|
77
|
-
h("div", { class: "steps space-y-8" }, steps.map((step, index) => (h("div", { class: "step", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), h("div", { class: "content" }, h("div", { class:
|
|
78
|
+
h("div", { class: "steps space-y-8" }, steps.map((step, index) => (h("div", { class: "step", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), h("div", { class: "content" }, h("slot", { name: `step-${index}` }, h("div", { class: index === steps.length - 1 ? 'f-body-02 text-lighter mt-16' : 'f-body-02 text-lighter my-16', innerHTML: step.content })))))))))));
|
|
78
79
|
}
|
|
79
80
|
static get is() { return "eds-steps-v2"; }
|
|
80
81
|
static get encapsulation() { return "shadow"; }
|
|
@@ -149,6 +150,23 @@ export class EdsStepsV2 {
|
|
|
149
150
|
"attribute": "image-src",
|
|
150
151
|
"reflect": false
|
|
151
152
|
},
|
|
153
|
+
"imageWidth": {
|
|
154
|
+
"type": "number",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "number",
|
|
158
|
+
"resolved": "number",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": true,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "Optional image width for the eds-img component."
|
|
166
|
+
},
|
|
167
|
+
"attribute": "image-width",
|
|
168
|
+
"reflect": false
|
|
169
|
+
},
|
|
152
170
|
"bg": {
|
|
153
171
|
"type": "boolean",
|
|
154
172
|
"mutable": false,
|
|
@@ -33,7 +33,7 @@ export class EdsUser {
|
|
|
33
33
|
}
|
|
34
34
|
render() {
|
|
35
35
|
const user = this.parsedUser;
|
|
36
|
-
return (h("div", { key: '9e2a8da09c2c15080e3b1ccf5b8e0e93b679d34b', class: "block" }, h("div", { key: 'ccc34b3c7b0ab8d515eebfa1962264365d20c788', class: "flex items-center" }, h("eds-dropdown", { key: '
|
|
36
|
+
return (h("div", { key: '9e2a8da09c2c15080e3b1ccf5b8e0e93b679d34b', class: "block" }, h("div", { key: 'ccc34b3c7b0ab8d515eebfa1962264365d20c788', class: "flex items-center" }, h("eds-dropdown", { key: 'dc4920fd442baa9f13d9f2b9a21065b5184eba83', label: `Hi, ${user.preferred_username}`, intent: "tertiary", "aria-label": "User Menu", "dropdown-pos": "right", "dropdown-offset": "false", icon: "chevron-down", class: "text-default" }, h("div", { key: '0522db7fc229186c645665a4c9eeedc46fb5823b', class: "min-w-[280px] p-8" }, h("div", { key: 'af7b9daec713d24f8a1415415d19cdf48905c0cb', class: "flex gap-x-16" }, h("eds-avatar", { key: 'c3ea7307d9beb597fe93d3942b7724f8526298ad', "first-name": user.given_name, "last-name": user.family_name, initials: this.initials, color: "grey" }), h("div", { key: '7af823b5f38a3d7acf16c633471dcfe74bca5e3c', class: "max-w-full" }, user.name && h("p", { key: '5973dfbac0efceeddb0dc211d9c502a1ad3b0dde', class: "f-ui-01 text-default w-full text-ellipsis" }, user.name), user.preferred_username && h("p", { key: '5989927760ed2a2d1365661bbdc112a3a3d23bbf', class: "f-ui-03-light text-light mt-4" }, user.preferred_username), user.email && h("p", { key: 'ee36be95298c0c7a748537012d48a85884955904', class: "f-ui-03-light text-light mt-4" }, user.email))), h("eds-block-break", { key: 'fb3ef5cad6e81f51983e54914412131c3bd4cbc2' }), h("div", { key: 'e3784f3f4931378bf55d766d4a1cf5e24a75d462', class: "text-default flex w-full flex-col gap-y-8" }, h("slot", { key: 'c0052bb56286d9a3fdc686c8407e105499a38084' })))))));
|
|
37
37
|
}
|
|
38
38
|
static get is() { return "eds-user"; }
|
|
39
39
|
static get encapsulation() { return "shadow"; }
|
|
@@ -80,7 +80,7 @@ const DocsReact = () => (h("div", null,
|
|
|
80
80
|
h("eds-code-block", { code: "npm install @ebrains/react", language: "javascript", "copy-label": "Copy Code" }),
|
|
81
81
|
h("eds-section-core", { "section-title": "Example React App", "heading-level": "h3" },
|
|
82
82
|
h("p", null, "This code displays a Stencil-based splash screen that stays visible until an initialization promise resolves (or errors), then hides itself and reveals the main React app content."),
|
|
83
|
-
h("eds-code-block", { code: "\nimport React, { useMemo, useState } from 'react';\nimport {\n EdsHeader
|
|
83
|
+
h("eds-code-block", { code: "\nimport React, { useMemo, useState } from 'react';\nimport {\n EdsHeader,\n EdsSplashScreen,\n EdsMatomoNotice,\n EdsSteps\n} from '@ebrains/react';\nimport './app.css';\n\n// simulate 2s\nfunction fakeInit(): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, 2000));\n}\n\nexport function App() {\n // 1) create init promise\n const initPromise = useMemo(() => fakeInit(), []);\n\n // 2) is splash still visible\n const [splashVisible, setSplashVisible] = useState(true);\n const [initError, setInitError] = useState<string | null>(null);\n\n // 3) show the UI after the splash has hidden\n const showApp = !splashVisible && !initError;\n\n return (\n <div>\n {splashVisible && (\n <EdsSplashScreen\n inverse={false}\n initPromise={initPromise}\n onSplash={(e: CustomEvent) => {\n if (e.detail.type === 'hidden') {\n setSplashVisible(false);\n } else if (e.detail.type === 'error') {\n setInitError(e.detail.message);\n setSplashVisible(false);\n }\n }}\n />\n )}\n\n {initError && (\n <div className='error'>\n Failed to initialize: {initError}\n </div>\n )}\n\n {/* Show App only when ready */}\n {showApp && (\n <>\n <EdsHeader></EdsHeader>\n <EdsSteps\n steps={[\n {\n title: 'Introduction',\n content: 'Begin by familiarizing yourself with the overall process.'\n },\n {\n title: 'Process Overview',\n content: 'Review the detailed steps and understand the workflow.'\n }\n ]}\n type='linear'\n />\n\n <EdsMatomoNotice />\n\n <div id='root'></div>\n </>\n )}\n </div>\n );\n}\nexport default App;\n", language: "javascript", "copy-label": "Copy Code" }))));
|
|
84
84
|
|
|
85
85
|
const DocsVue = () => (h("div", null,
|
|
86
86
|
h("h2", null, "Vue Wrappers"),
|