@ebrains/components 3.0.0 → 3.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/color-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components-section.cjs.entry.js +1 -1
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/{eds-accordion_52.cjs.entry.js → eds-accordion_53.cjs.entry.js} +1095 -336
- package/dist/cjs/eds-app-root.cjs.entry.js +1 -1
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +1 -1
- package/dist/cjs/eds-feedback.cjs.entry.js +1 -1
- package/dist/cjs/eds-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-gauge.cjs.entry.js +1 -1
- package/dist/cjs/eds-gitlab-contributors.cjs.entry.js +35 -32
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.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-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-input-search.cjs.entry.js +76 -0
- package/dist/cjs/eds-modal.cjs.entry.js +18 -9
- package/dist/cjs/eds-pie.cjs.entry.js +2 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-timeline.cjs.entry.js +1 -1
- package/dist/cjs/eds-toast-manager.cjs.entry.js +1 -1
- package/dist/cjs/eds-trl-badge.cjs.entry.js +184 -0
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-50bc1aa4.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +58 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +2 -2
- package/dist/cjs/logo-variations-tabs.cjs.entry.js +1 -1
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +1 -1
- package/dist/cjs/svg-repository.cjs.entry.js +1 -1
- package/dist/cjs/token-list_3.cjs.entry.js +3 -3
- package/dist/cjs/token-ratios.cjs.entry.js +1 -1
- package/dist/cjs/token-spacing.cjs.entry.js +1 -1
- package/dist/cjs/token-typography.cjs.entry.js +8 -2
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/eds-accordion/eds-accordion.css +3 -2
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -5
- package/dist/collection/components/eds-accordion/eds-accordion.stories.js +7 -19
- package/dist/collection/components/eds-alert/eds-alert.css +14 -0
- package/dist/collection/components/eds-alert/eds-alert.js +2 -1
- package/dist/collection/components/eds-alert/eds-alert.stories.js +19 -147
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +2 -2
- 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.css +15 -0
- package/dist/collection/components/eds-button/eds-button.js +17 -14
- package/dist/collection/components/eds-button/eds-button.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-app/eds-card-app.js +2 -5
- 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-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.css +10 -1
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-feature/eds-card-feature.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +2 -4
- package/dist/collection/components/eds-cards/eds-card-hero/eds-card-hero.js +6 -7
- package/dist/collection/components/eds-cards/eds-card-stat/eds-card-stat.js +6 -7
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.js +1 -1
- package/dist/collection/components/eds-charts/eds-pie/eds-pie.js +2 -2
- package/dist/collection/components/eds-code-block/eds-code-block.css +72 -106
- package/dist/collection/components/eds-code-block/eds-code-block.js +1 -1
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +30 -4
- package/dist/collection/components/eds-feedback/eds-feedback.js +1 -1
- package/dist/collection/components/eds-footer/eds-footer.css +143 -203
- package/dist/collection/components/eds-footer/eds-footer.js +176 -74
- package/dist/collection/components/eds-footer/eds-footer.stories.js +109 -17
- package/dist/collection/components/eds-form/eds-form.css +493 -1
- package/dist/collection/components/eds-form/eds-form.js +256 -14
- package/dist/collection/components/eds-form/eds-form.stories.js +110 -3
- package/dist/collection/components/eds-frame/eds-frame.js +1 -1
- package/dist/collection/components/eds-header/eds-header.js +1 -1
- package/dist/collection/components/eds-header/eds-header.stories.js +26 -12
- package/dist/collection/components/eds-icon-wrapper/eds-icon-wrapper.js +20 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.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-img/eds-img.stories.js +29 -52
- package/dist/collection/components/eds-input-dropzone/eds-input-dropzone.js +7 -4
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +20 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.css +39 -0
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +2 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.css +17 -5
- 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 +15 -5
- 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-search/eds-input-search.stories.js +30 -0
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +6 -2
- package/dist/collection/components/eds-input-field/eds-input-field.css +219 -0
- package/dist/collection/components/eds-input-field/eds-input-field.js +16 -5
- package/dist/collection/components/eds-input-field/eds-input-field.stories.js +105 -125
- package/dist/collection/components/eds-input-file/eds-input-file.js +5 -3
- package/dist/collection/components/eds-link/eds-link.js +4 -8
- package/dist/collection/components/eds-link/eds-link.stories.js +13 -8
- package/dist/collection/components/eds-logo/eds-logo.js +13 -66
- package/dist/collection/components/eds-logo/eds-logo.stories.js +36 -17
- package/dist/collection/components/eds-modal/eds-modal.js +18 -9
- package/dist/collection/components/eds-modal/eds-modal.stories.js +11 -8
- package/dist/collection/components/eds-nps/eds-nps.css +32 -0
- package/dist/collection/components/eds-nps/eds-nps.js +3 -3
- package/dist/collection/components/eds-pagination/eds-pagination.js +2 -2
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -8
- package/dist/collection/components/eds-rating/eds-rating.css +9 -0
- package/dist/collection/components/eds-rating/eds-rating.js +2 -2
- 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-sidebar/eds-sidebar.js +2 -2
- package/dist/collection/components/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/components/eds-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-steps/eds-steps.css +56 -25
- package/dist/collection/components/eds-steps/eds-steps.js +27 -7
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.css +93 -28
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.js +57 -10
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.stories.js +80 -17
- package/dist/collection/components/eds-switch/eds-switch.css +26 -3
- package/dist/collection/components/eds-switch/eds-switch.js +10 -7
- package/dist/collection/components/eds-switch/eds-switch.stories.js +20 -1
- package/dist/collection/components/eds-table/eds-table.css +21 -4
- package/dist/collection/components/eds-table/eds-table.js +16 -51
- package/dist/collection/components/eds-table/eds-table.stories.js +7 -115
- package/dist/collection/components/eds-tabs/eds-tabs.css +7 -1
- package/dist/collection/components/eds-tabs/eds-tabs.js +49 -18
- package/dist/collection/components/eds-tabs/eds-tabs.stories.js +2 -2
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.js +1 -1
- package/dist/collection/components/eds-toast/eds-toast.css +146 -0
- package/dist/collection/components/eds-toast/eds-toast.js +106 -4
- package/dist/collection/components/eds-toast/eds-toast.stories.js +102 -5
- package/dist/collection/components/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.stories.js +7 -1
- package/dist/collection/components/eds-user/eds-user.js +2 -5
- package/dist/collection/components/eds-user/eds-user.stories.js +8 -11
- 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/components-section/components-section.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/docs-tokens/docs-tokens.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 +8 -2
- package/dist/collection/eds-docs-ui/docs-palettes/docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +58 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations-tabs/logo-variations.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/eds-docs-ui/svg-repository/svg-repository.js +1 -1
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +1 -1
- package/dist/collection/shared-ui/eds-gitlab-contributors/eds-gitlab-contributors.css +19 -0
- package/dist/collection/shared-ui/eds-gitlab-contributors/eds-gitlab-contributors.js +34 -31
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.css +166 -0
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.js +69 -7
- package/dist/collection/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.css +205 -0
- package/dist/collection/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.js +253 -0
- package/dist/collection/shared-ui/eds-kg-web-services-select/eds-kg-web-services-select.js +2 -2
- package/dist/collection/shared-ui/eds-kg-web-services-select/eds-kg-web-services-select.stories.js +1 -3
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.css +23 -102
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +7 -1
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.stories.js +1 -1
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.css +213 -0
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.js +706 -0
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.stories.js +90 -0
- package/dist/collection/shared-ui/eds-trl-badge/ebrains-mark.js +26 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.css +22 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.js +324 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.stories.js +99 -0
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/collection/utils/eds-form/formValidators.js +2 -1
- package/dist/collection/utils/eds-form/safeFormat.js +35 -0
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +12 -11
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/docs-palettes.js +1 -1
- package/dist/components/docs-tokens.js +1 -1
- package/dist/components/eds-accordion2.js +3 -6
- package/dist/components/eds-alert2.js +3 -2
- package/dist/components/eds-app-root.js +1 -1
- 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 +16 -13
- package/dist/components/eds-card-app.js +2 -5
- package/dist/components/eds-card-cta.js +3 -6
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-feature.js +2 -5
- package/dist/components/eds-card-generic2.js +2 -4
- package/dist/components/eds-card-hero.js +6 -7
- package/dist/components/eds-card-stat.js +6 -7
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-code-block2.js +2 -2
- package/dist/components/eds-cookies-preference.js +1 -1
- package/dist/components/eds-dropdown2.js +30 -4
- package/dist/components/eds-feedback.js +1 -1
- package/dist/components/eds-footer2.js +118 -24
- package/dist/components/eds-form.js +146 -45
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gauge.js +1 -1
- package/dist/components/eds-gitlab-contributors.js +35 -32
- package/dist/components/eds-global-search.js +55 -70
- package/dist/components/eds-header.js +1 -1
- package/dist/components/eds-icon-bluesky.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-mastodon.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-wrapper2.js +5 -2
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-dropzone2.js +7 -4
- package/dist/components/eds-input-field2.js +31 -26
- package/dist/components/eds-input-file2.js +5 -3
- package/dist/components/eds-input-footer2.js +39 -3
- package/dist/components/eds-input-label2.js +2 -2
- package/dist/components/eds-input-range2.js +15 -5
- package/dist/components/eds-input-search.js +100 -1
- package/dist/components/eds-input-select2.js +6 -2
- package/dist/components/eds-input2.js +4 -2
- package/dist/components/eds-kg-learning-resources.d.ts +11 -0
- package/dist/components/eds-kg-learning-resources.js +217 -0
- package/dist/components/eds-kg-web-services-select2.js +18 -24
- package/dist/components/eds-link2.js +3 -7
- package/dist/components/eds-logo2.js +4 -22
- package/dist/components/eds-matomo-notice2.js +8 -2
- package/dist/components/eds-modal.js +18 -9
- package/dist/components/eds-nps2.js +4 -4
- package/dist/components/eds-pagination2.js +2 -2
- package/dist/components/eds-pie.js +2 -2
- package/dist/components/eds-progress-bar.js +1 -8
- package/dist/components/eds-rating2.js +3 -3
- package/dist/components/eds-search-select.d.ts +11 -0
- package/dist/components/eds-search-select.js +6 -0
- package/dist/components/eds-search-select2.js +382 -0
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-sidebar.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +41 -11
- package/dist/components/eds-steps2.js +28 -8
- package/dist/components/eds-switch2.js +8 -5
- package/dist/components/eds-table2.js +30 -54
- package/dist/components/eds-tabs.js +50 -19
- package/dist/components/eds-tag2.js +1 -1
- package/dist/components/eds-timeline.js +1 -1
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-toast2.js +39 -3
- package/dist/components/eds-tooltip2.js +1 -1
- package/dist/components/eds-trl-badge.d.ts +11 -0
- package/dist/components/eds-trl-badge.js +207 -0
- package/dist/components/eds-user.js +1 -4
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +76 -25
- package/dist/components/logo-variations-horizontal2.js +1 -1
- package/dist/components/logo-variations-tabs.js +1 -1
- package/dist/components/logo-variations-vertical2.js +1 -1
- package/dist/components/logo-wrong-usage.js +1 -1
- package/dist/components/p-05e96609.entry.js +1 -0
- package/dist/components/p-0d778d10.entry.js +1 -0
- package/dist/components/{p-d2576747.entry.js → p-114f6d54.entry.js} +1 -1
- package/dist/components/p-1534204d.entry.js +1 -0
- package/dist/components/p-337d4ee3.entry.js +9 -0
- package/dist/components/p-340bc935.entry.js +1 -0
- package/dist/components/{p-a6dc1f88.entry.js → p-37ef07d9.entry.js} +1 -1
- package/dist/components/p-39dbb964.entry.js +1 -0
- package/dist/components/{p-dfe93385.entry.js → p-3f66bc26.entry.js} +1 -1
- package/dist/components/p-43f9e64f.entry.js +1 -0
- package/dist/components/p-46cc6c1a.entry.js +1 -0
- package/dist/components/{p-773bd015.entry.js → p-4b8a7979.entry.js} +1 -1
- package/dist/components/p-6b94b2ec.entry.js +1 -0
- package/dist/components/p-6d965fef.entry.js +1 -0
- package/dist/components/{p-d16b5363.entry.js → p-6e370182.entry.js} +1 -1
- package/dist/components/{p-7b93a385.entry.js → p-6ffe581c.entry.js} +1 -1
- package/dist/components/p-726637b1.entry.js +1 -0
- package/dist/components/{p-a63e14bb.entry.js → p-86ccc09f.entry.js} +1 -1
- package/dist/components/{p-c2fc62f7.entry.js → p-8755a21b.entry.js} +1 -1
- package/dist/components/{p-0d7aee0b.entry.js → p-8ab461e2.entry.js} +1 -1
- package/dist/components/p-8cb162b8.entry.js +1 -0
- package/dist/components/p-8cdbc280.entry.js +1 -0
- package/dist/components/{p-940a2d42.entry.js → p-8e034c4e.entry.js} +1 -1
- package/dist/components/p-9f649fa3.entry.js +1 -0
- package/dist/components/{p-d1b3aa52.entry.js → p-a26dad9b.entry.js} +1 -1
- package/dist/components/p-a2d6a9ca.entry.js +1 -0
- package/dist/components/p-afabe1be.entry.js +1 -0
- package/dist/components/{p-c46675c8.entry.js → p-b1519098.entry.js} +1 -1
- package/dist/components/{p-04e9c2d7.entry.js → p-b1a10842.entry.js} +1 -1
- package/dist/components/{p-7aa4edef.entry.js → p-b4023b45.entry.js} +1 -1
- package/dist/components/p-c53b3563.entry.js +1 -0
- package/dist/components/p-c7d612d1.entry.js +1 -0
- package/dist/components/p-dc9aef22.entry.js +1 -0
- package/dist/components/{p-f364296f.entry.js → p-f66a7cf9.entry.js} +1 -1
- package/dist/components/p-f97f62f2.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/svg-repository.js +19 -25
- 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 +8 -2
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components-section.entry.js +1 -1
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/docs-palettes.entry.js +1 -1
- package/dist/esm/docs-tokens.entry.js +1 -1
- package/dist/esm/{eds-accordion_52.entry.js → eds-accordion_53.entry.js} +1094 -336
- package/dist/esm/eds-app-root.entry.js +1 -1
- package/dist/esm/eds-cookies-preference.entry.js +1 -1
- package/dist/esm/eds-feedback.entry.js +1 -1
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-gauge.entry.js +1 -1
- package/dist/esm/eds-gitlab-contributors.entry.js +35 -32
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-eu.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-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/{components/eds-input-search2.js → esm/eds-input-search.entry.js} +9 -39
- package/dist/esm/eds-modal.entry.js +18 -9
- package/dist/esm/eds-pie.entry.js +2 -2
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-timeline.entry.js +1 -1
- package/dist/esm/eds-toast-manager.entry.js +1 -1
- package/dist/esm/eds-trl-badge.entry.js +180 -0
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/index-870ab08f.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +58 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +2 -2
- package/dist/esm/logo-variations-tabs.entry.js +1 -1
- package/dist/esm/logo-wrong-usage.entry.js +1 -1
- package/dist/esm/svg-repository.entry.js +1 -1
- package/dist/esm/token-list_3.entry.js +3 -3
- package/dist/esm/token-ratios.entry.js +1 -1
- package/dist/esm/token-spacing.entry.js +1 -1
- package/dist/esm/token-typography.entry.js +8 -2
- package/dist/hydrate/index.js +1616 -397
- package/dist/hydrate/index.mjs +1616 -397
- package/dist/types/components/eds-accordion/eds-accordion.stories.d.ts +4 -8
- package/dist/types/components/eds-alert/eds-alert.stories.d.ts +7 -73
- package/dist/types/components/eds-button/eds-button.d.ts +1 -1
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +1 -0
- package/dist/types/components/eds-footer/eds-footer.d.ts +84 -55
- package/dist/types/components/eds-footer/eds-footer.stories.d.ts +62 -1
- package/dist/types/components/eds-form/eds-form.d.ts +66 -0
- package/dist/types/components/eds-form/eds-form.stories.d.ts +63 -0
- package/dist/types/components/eds-header/eds-header.stories.d.ts +6 -6
- package/dist/types/components/eds-icon-wrapper/eds-icon-wrapper.d.ts +8 -0
- package/dist/types/components/eds-img/eds-img.stories.d.ts +6 -20
- package/dist/types/components/eds-input-elements/eds-input/eds-input.d.ts +7 -0
- package/dist/types/components/eds-input-elements/eds-input-search/eds-input-search.stories.d.ts +36 -0
- package/dist/types/components/eds-input-field/eds-input-field.stories.d.ts +97 -38
- package/dist/types/components/eds-link/eds-link.stories.d.ts +9 -6
- package/dist/types/components/eds-logo/eds-logo.d.ts +11 -28
- package/dist/types/components/eds-logo/eds-logo.stories.d.ts +22 -2
- package/dist/types/components/eds-steps/eds-steps.d.ts +7 -0
- package/dist/types/components/eds-steps-v2/eds-steps-v2.d.ts +14 -1
- package/dist/types/components/eds-steps-v2/eds-steps-v2.stories.d.ts +40 -9
- package/dist/types/components/eds-switch/eds-switch.d.ts +6 -2
- package/dist/types/components/eds-switch/eds-switch.stories.d.ts +8 -0
- package/dist/types/components/eds-table/eds-table.d.ts +8 -14
- package/dist/types/components/eds-table/eds-table.stories.d.ts +0 -107
- package/dist/types/components/eds-tabs/eds-tabs.d.ts +10 -0
- package/dist/types/components/eds-toast/eds-toast.d.ts +33 -1
- package/dist/types/components/eds-toast/eds-toast.stories.d.ts +49 -1
- package/dist/types/components/eds-user/eds-user.d.ts +0 -2
- package/dist/types/components/eds-user/eds-user.stories.d.ts +5 -9
- package/dist/types/components.d.ts +715 -144
- package/dist/types/shared-ui/eds-global-search/eds-global-search.d.ts +12 -0
- package/dist/types/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.d.ts +60 -0
- package/dist/types/shared-ui/eds-search-select/eds-search-select.d.ts +98 -0
- package/dist/types/shared-ui/eds-search-select/eds-search-select.stories.d.ts +81 -0
- package/dist/types/shared-ui/eds-trl-badge/ebrains-mark.d.ts +7 -0
- package/dist/types/shared-ui/eds-trl-badge/eds-trl-badge.d.ts +54 -0
- package/dist/types/shared-ui/eds-trl-badge/eds-trl-badge.stories.d.ts +112 -0
- package/dist/types/utils/eds-form/safeFormat.d.ts +21 -0
- package/package.json +1 -1
- package/dist/components/p-0fe10e6c.entry.js +0 -1
- package/dist/components/p-18e852e1.entry.js +0 -1
- package/dist/components/p-3ccd6948.entry.js +0 -1
- package/dist/components/p-3d3841d6.entry.js +0 -1
- package/dist/components/p-3f38df99.entry.js +0 -1
- package/dist/components/p-527e71d0.entry.js +0 -1
- package/dist/components/p-55047f7f.entry.js +0 -9
- package/dist/components/p-64c23098.entry.js +0 -1
- package/dist/components/p-74b9c9a8.entry.js +0 -1
- package/dist/components/p-878f65a6.entry.js +0 -1
- package/dist/components/p-92f6d9c0.entry.js +0 -1
- package/dist/components/p-9eedf771.entry.js +0 -1
- package/dist/components/p-b4355cec.entry.js +0 -1
- package/dist/components/p-d2f17fac.entry.js +0 -1
- package/dist/components/p-db5eea95.entry.js +0 -1
- package/dist/components/p-e205c269.entry.js +0 -1
- package/dist/components/p-f55dd314.entry.js +0 -1
- package/dist/components/p-f88b5f21.entry.js +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
2
|
import { s as sendAnalytics } from './analytics.js';
|
|
3
3
|
import { p as parseData } from './sharedUtils.js';
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$
|
|
11
|
-
import { d as defineCustomElement$
|
|
12
|
-
import { d as defineCustomElement$
|
|
13
|
-
import { d as defineCustomElement$
|
|
14
|
-
import { d as defineCustomElement$
|
|
15
|
-
import { d as defineCustomElement$
|
|
16
|
-
import { d as defineCustomElement$
|
|
17
|
-
import { d as defineCustomElement$
|
|
18
|
-
import { d as defineCustomElement$
|
|
4
|
+
import { s as safeInlineFormat, d as defineCustomElement$b } from './eds-input-footer2.js';
|
|
5
|
+
import { d as defineCustomElement$h } from './eds-button2.js';
|
|
6
|
+
import { d as defineCustomElement$g } from './eds-icon-wrapper2.js';
|
|
7
|
+
import { d as defineCustomElement$f } from './eds-input2.js';
|
|
8
|
+
import { d as defineCustomElement$e } from './eds-input-dropzone2.js';
|
|
9
|
+
import { d as defineCustomElement$d } from './eds-input-field2.js';
|
|
10
|
+
import { d as defineCustomElement$c } from './eds-input-file2.js';
|
|
11
|
+
import { d as defineCustomElement$a } from './eds-input-label2.js';
|
|
12
|
+
import { d as defineCustomElement$9 } from './eds-input-range2.js';
|
|
13
|
+
import { d as defineCustomElement$8 } from './eds-input-select2.js';
|
|
14
|
+
import { d as defineCustomElement$7 } from './eds-kg-web-services-select2.js';
|
|
15
|
+
import { d as defineCustomElement$6 } from './eds-link2.js';
|
|
16
|
+
import { d as defineCustomElement$5 } from './eds-logo2.js';
|
|
17
|
+
import { d as defineCustomElement$4 } from './eds-nps2.js';
|
|
18
|
+
import { d as defineCustomElement$3 } from './eds-rating2.js';
|
|
19
|
+
import { d as defineCustomElement$2 } from './eds-search-select2.js';
|
|
19
20
|
|
|
20
21
|
// utils/validators.ts
|
|
21
22
|
function validateField(name, value, type, required, maxLength, min, max) {
|
|
@@ -146,7 +147,8 @@ isFieldVisible) {
|
|
|
146
147
|
delete errors[field.name];
|
|
147
148
|
return;
|
|
148
149
|
}
|
|
149
|
-
|
|
150
|
+
// 'content' is a presentational text block — no input, never validated.
|
|
151
|
+
if (field.type !== 'hidden' && field.type !== 'content') {
|
|
150
152
|
if ((field.type === 'checkbox' || field.type === 'radio') && !field.options) {
|
|
151
153
|
// Single checkbox or radio without multiple options
|
|
152
154
|
const fieldErrors = validateSingleBox(field.name, field.required, formEl);
|
|
@@ -247,7 +249,7 @@ function getFormInitData({ initData, parsedFields, currentValues
|
|
|
247
249
|
return { updatedValues };
|
|
248
250
|
}
|
|
249
251
|
|
|
250
|
-
const edsFormCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-body-01 b,.f-body-01 strong{font-weight:var(--f-body-01---bold-weight, bold)}.f-body-02 b,.f-body-02 strong{font-weight:var(--f-body-02---bold-weight, bold)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:600;font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:600;font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing);overflow:visible}.text-light{color:var(--grey-dark)}.rounded-xs{border-radius:4px}.rounded-sm{border-radius:8px}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-2{border-width:2px}.border-t-2{border-top-width:2px}.mt-20{margin-top:1.25rem}.mt-32{margin-top:2rem}.mt-64{margin-top:4rem}.mb-32{margin-bottom:2rem}.pt-28{padding-top:1.75rem}.pt-32{padding-top:2rem}.pt-64{padding-top:4rem}.pl-8{padding-left:0.5rem}.pl-16{padding-left:1rem}.border-l-2{border-left-width:2px}.gap-y-8{row-gap:0.5rem}.gap-y-16{row-gap:1rem}.gap-y-20{row-gap:1.25rem}.gap-y-24{row-gap:1.5rem}.border-group{border-left:1px solid var(--soft-color, #ddd);padding-left:1rem}.bg-inverse{background-color:var(--white)}.form-brand{box-shadow:0 2px 12px rgba(0, 0, 0, 0.08);border-left:4px solid var(--brand-green);animation:fadeInUp 0.6s ease}@keyframes fadeInUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.shadow-hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--brand-green)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.rounded-sm{border-radius:8px}.rounded-lg{border-radius:16px}.px-16{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:0.25rem}.pb-16{padding-bottom:1rem}.p-32{padding:2rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.w-full{width:100%}.justify-between{justify-content:space-between}.items-center{align-items:center}@media (min-width: 750px){.md\\:flex-row-reverse{flex-direction:row-reverse}.md\\:justify-between{justify-content:space-between}.md\\:gap-y-0{row-gap:0}.md\\:w-auto{width:auto}.md\\:mt-64{margin-top:4rem}.md\\:pt-64{padding-top:4rem}}";
|
|
252
|
+
const edsFormCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-body-01 b,.f-body-01 strong{font-weight:var(--f-body-01---bold-weight, bold)}.f-body-02 b,.f-body-02 strong{font-weight:var(--f-body-02---bold-weight, bold)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:600;font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:600;font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing);overflow:visible}.text-light{color:var(--grey-dark)}.rounded-xs{border-radius:4px}.rounded-sm{border-radius:8px}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-2{border-width:2px}.border-t-2{border-top-width:2px}.mt-20{margin-top:1.25rem}.mt-24{margin-top:1.5rem}.mt-32{margin-top:2rem}.mt-48{margin-top:3rem}.mt-64{margin-top:4rem}.mb-32{margin-bottom:2rem}.mb-48{margin-bottom:3rem}.pt-28{padding-top:1.75rem}.pt-32{padding-top:2rem}.pt-64{padding-top:4rem}.pl-8{padding-left:0.5rem}.pl-16{padding-left:1rem}.border-l-2{border-left-width:2px}.gap-y-8{row-gap:0.5rem}.gap-y-16{row-gap:1rem}.gap-y-20{row-gap:1.25rem}.gap-y-24{row-gap:1.5rem}.border-group{border-left:1px solid var(--soft-color, #ddd);padding-left:1rem}.bg-inverse{background-color:var(--white)}.form-brand{box-shadow:0 2px 12px rgba(0, 0, 0, 0.08);border-left:4px solid var(--brand-green);animation:fadeInUp 0.6s ease}.form-brand-card{--warn:#ffb22c;--warn-strong:#b26b00;--danger:#ff6b5b;--danger-strong:#c0392b;background:var(--white, #fff);border:1px solid var(--line-color, #e2e2e2);border-radius:20px;overflow:hidden;box-shadow:0 30px 60px -34px rgba(7, 20, 13, 0.32);animation:fadeInUp 0.6s ease}.form-brand-header{position:relative;overflow:hidden;background:var(--brand-black, #07140d);color:#fff;padding:38px 40px 34px}.fbh-grid{position:absolute;inset:0;background-image:linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),\n linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);background-size:42px 42px;-webkit-mask-image:radial-gradient(130% 110% at 15% 0%, #000, transparent 72%);mask-image:radial-gradient(130% 110% at 15% 0%, #000, transparent 72%);opacity:0.5;pointer-events:none}.fbh-glow{position:absolute;top:-50%;right:-12%;width:420px;height:420px;background:radial-gradient(circle, rgba(0, 255, 157, 0.16), transparent 62%);pointer-events:none}.fbh-glow--expiring{background:radial-gradient(circle, rgba(255, 178, 44, 0.13), transparent 62%)}.fbh-glow--closed{background:radial-gradient(circle, rgba(192, 57, 43, 0.14), transparent 62%)}.fbh-in{position:relative}.fbh-brand{display:flex;align-items:center;gap:10px;margin-bottom:24px}.fbh-mark{width:30px;height:30px;border-radius:50%;background:linear-gradient(150deg, #00ff9d, #00c87b 55%, #0a8f5a);display:flex;align-items:center;justify-content:center}.fbh-mark svg{width:19px;height:19px}.fbh-word{font-weight:600;font-size:16px;letter-spacing:0.04em}.fbh-logo{width:150px;margin-bottom:22px}.fbh-eyebrow{font-family:'IBM Plex Mono', monospace;font-size:11px;letter-spacing:0.15em;text-transform:uppercase;color:var(--brand-green, #00ff9d);display:inline-flex;align-items:center;gap:7px}.fbh-eyebrow svg{width:12px;height:12px;stroke:currentColor;fill:none;stroke-width:2;flex:0 0 12px}.fbh-eyebrow--expiring{color:var(--warn, #ffb22c)}.fbh-eyebrow--closed{color:var(--danger, #ff6b5b)}.fbh-title{font-weight:200;font-size:clamp(26px, 4vw, 36px);letter-spacing:-0.02em;line-height:1.08;margin-bottom:12px}.fbh-sub{font-size:14.5px;color:rgba(235, 242, 238, 0.62);font-weight:300;max-width:72ch;line-height:1.55}.fbh-meta{display:flex;gap:22px;margin-top:22px;flex-wrap:wrap}.fbh-meta span{display:inline-flex;align-items:center;gap:7px;font-family:'IBM Plex Mono', monospace;font-size:10.5px;letter-spacing:0.06em;text-transform:uppercase;color:rgba(235, 242, 238, 0.62)}.fbh-meta svg{width:13px;height:13px;stroke:var(--brand-green, #00ff9d);fill:none;stroke-width:1.8}.fbh-meta span.is-warn{color:var(--warn, #ffb22c)}.fbh-meta span.is-warn svg{stroke:var(--warn, #ffb22c)}.fbh-meta span.is-danger{color:var(--danger, #ff6b5b)}.fbh-meta span.is-danger svg{stroke:var(--danger, #ff6b5b)}.form-meta-time{display:inline-flex;align-items:center;gap:7px;width:fit-content;font-family:'IBM Plex Mono', monospace;font-size:10.5px;letter-spacing:0.06em;text-transform:uppercase;color:var(--grey-dark)}.form-meta-time svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.form-brand-body{padding:var(--eds-form-padding, 34px 40px 30px);--eds-field-accent:#00c87b}.form-brand-body--closed{opacity:0.55}.form-sect{margin-bottom:30px}.form-sect:last-child{margin-bottom:0}.form-sect-head{display:flex;align-items:center;gap:9px;margin-bottom:18px;padding-bottom:12px;border-bottom:1px solid var(--line-color, #e2e2e2)}.form-sect-glyph{color:#00c87b;display:inline-flex}.form-sect-glyph svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2}.form-sect-label{font-family:'IBM Plex Mono', monospace;font-size:11px;letter-spacing:0.12em;text-transform:uppercase;color:var(--brand-black, #07140d)}.form-brand-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:24px 40px;border-top:1px solid var(--line-color, #e2e2e2);background:#fcfcfc;flex-wrap:wrap}.form-brand-footer-actions{display:flex;align-items:center;gap:12px}.req-note{font-family:'IBM Plex Mono', monospace;font-size:10.5px;letter-spacing:0.06em;text-transform:uppercase;color:#8a8c8a}.req-note b{color:#00c87b}.fbf-left{display:flex;align-items:center;gap:12px;min-width:0}.fbf-save{display:inline-flex;align-items:center;gap:9px;font-family:'IBM Plex Mono', monospace;font-size:10.5px;letter-spacing:0.07em;text-transform:uppercase;color:#8a8c8a;transition:color 0.2s;white-space:nowrap}.fbf-save-dot{width:7px;height:7px;border-radius:50%;background:#00c87b;flex:0 0 7px;transition:background 0.2s}.fbf-save--saving{color:#7a7b7a}.fbf-save--saving .fbf-save-dot{background:#7a7b7a;animation:fbfPulse 1s ease-in-out infinite}.fbf-save--error{color:var(--danger-strong, #c0392b)}.fbf-save--error .fbf-save-dot{background:var(--danger-strong, #c0392b)}@keyframes fbfPulse{0%,100%{opacity:1}50%{opacity:0.25}}.fbf-sep{width:1px;height:13px;background:var(--line-color, #e2e2e2);flex:0 0 1px}.fbf-clear{font-family:'IBM Plex Sans', system-ui, sans-serif;font-size:13.5px;color:var(--body-l, #5a5f5c);cursor:pointer;background:none;border:none;padding:6px 2px;transition:color 0.15s}.fbf-clear:hover:not(:disabled){color:var(--danger-strong, #c0392b)}.fbf-clear:disabled{opacity:0.4;cursor:not-allowed}.fbf-confirm{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.fbf-confirm-q{font-size:13.5px;color:var(--danger-strong, #c0392b);display:inline-flex;align-items:center;gap:8px}.fbf-confirm-q svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2;flex:0 0 15px}.fbf-confirm-no{font-family:'IBM Plex Sans', system-ui, sans-serif;font-size:13.5px;color:var(--body-l, #5a5f5c);cursor:pointer;background:none;border:none}.fbf-confirm-no:hover{color:var(--brand-black, #07140d)}.fbf-confirm-yes{font-family:'IBM Plex Sans', system-ui, sans-serif;font-size:13.5px;font-weight:500;cursor:pointer;border-radius:999px;padding:9px 16px;background:#fdf0ee;color:var(--danger-strong, #c0392b);border:1px solid #f2cfc9;transition:0.15s}.fbf-confirm-yes:hover{background:var(--danger-strong, #c0392b);color:#fff;border-color:var(--danger-strong, #c0392b)}.req-note--closed{display:inline-flex;align-items:center;gap:7px;color:var(--danger-strong, #c0392b)}.req-note--closed svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;flex:0 0 13px}@media (max-width: 600px){.form-brand-header,.form-brand-footer{padding-left:24px;padding-right:24px}.form-brand-body{padding:var(--eds-form-padding, 28px 24px 28px)}.form-brand-footer{align-items:flex-start;flex-direction:column-reverse;gap:20px;padding-top:22px}.form-brand-footer-actions,.fbf-confirm{width:100%;justify-content:space-between}.fbf-left{flex-wrap:wrap;row-gap:8px;width:100%;padding-top:20px;border-top:1px solid var(--line-color, #e2e2e2)}}@keyframes fadeInUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.shadow-hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--brand-green)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.rounded-sm{border-radius:8px}.rounded-lg{border-radius:16px}.px-16{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:0.25rem}.pb-16{padding-bottom:1rem}.p-32{padding:2rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.w-full{width:100%}.justify-between{justify-content:space-between}.items-center{align-items:center}@media (min-width: 750px){.md\\:flex-row-reverse{flex-direction:row-reverse}.md\\:justify-between{justify-content:space-between}.md\\:gap-y-0{row-gap:0}.md\\:w-auto{width:auto}.md\\:mt-64{margin-top:4rem}.md\\:pt-64{padding-top:4rem}}.eds-desc-link{position:relative;display:inline-block;color:var(--brand-black);text-decoration:none}.eds-desc-link::after{content:'';position:absolute;bottom:-2px;left:0;width:0;height:2px;background-color:var(--brand-green);transition:width 0.3s ease}.eds-desc-link:hover::after{width:100%}.eds-desc-link:focus-visible::after{width:0}.fbh-sub .eds-desc-link{color:#fff;font-weight:400}.eds-content-block{line-height:1.5;color:var(--brand-black, #07140d)}.eds-content-block strong{font-weight:600}.eds-content-block .eds-desc-link{font-weight:600}";
|
|
251
253
|
const EdsFormStyle0 = edsFormCss;
|
|
252
254
|
|
|
253
255
|
const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLElement {
|
|
@@ -259,6 +261,12 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
259
261
|
this.name = 'eds-form';
|
|
260
262
|
this.title = 'Form Title';
|
|
261
263
|
this.description = 'Form Description';
|
|
264
|
+
this.eyebrow = undefined;
|
|
265
|
+
this.estimatedTime = undefined;
|
|
266
|
+
this.progress = undefined;
|
|
267
|
+
this.expires = undefined;
|
|
268
|
+
this.policy = undefined;
|
|
269
|
+
this.gdpr = false;
|
|
262
270
|
this.setFormUrl = true;
|
|
263
271
|
this.formBtn = true;
|
|
264
272
|
this.formBtnLabel = 'Submit';
|
|
@@ -270,7 +278,11 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
270
278
|
this.groups = [];
|
|
271
279
|
this.initData = {};
|
|
272
280
|
this.formStyle = 'default';
|
|
281
|
+
this.status = 'open';
|
|
282
|
+
this.saveStatus = 'idle';
|
|
283
|
+
this.saveLabel = undefined;
|
|
273
284
|
this.values = {};
|
|
285
|
+
this.showClearConfirm = false;
|
|
274
286
|
this.isSubmitting = false;
|
|
275
287
|
this.hasError = false;
|
|
276
288
|
this.errors = {};
|
|
@@ -437,7 +449,20 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
437
449
|
if (this.setFormUrl && typeof window !== 'undefined') {
|
|
438
450
|
formData.set('form_url', window.location.href);
|
|
439
451
|
}
|
|
452
|
+
// Group fields by name so we can drop values for fields hidden by a condition.
|
|
453
|
+
// A name may be reused across mutually-exclusive conditional variants (e.g. a
|
|
454
|
+
// `web_app_url` shown for service_type=web_app AND another for =platform), so a
|
|
455
|
+
// value is dropped ONLY when EVERY field with that name is hidden — if any
|
|
456
|
+
// variant is visible, its value is kept.
|
|
457
|
+
const fieldsByName = {};
|
|
458
|
+
this.parsedFields.forEach((f) => {
|
|
459
|
+
(fieldsByName[f.name] = fieldsByName[f.name] || []).push(f);
|
|
460
|
+
});
|
|
440
461
|
Object.keys(this.values).forEach((key) => {
|
|
462
|
+
const fields = fieldsByName[key];
|
|
463
|
+
if (fields && fields.length && !fields.some((f) => this.isFieldVisible(f))) {
|
|
464
|
+
return; // all fields with this name are conditionally hidden — skip
|
|
465
|
+
}
|
|
441
466
|
const value = this.values[key];
|
|
442
467
|
// Handle File arrays (from file inputs)
|
|
443
468
|
if (Array.isArray(value)) {
|
|
@@ -616,6 +641,10 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
616
641
|
handleSubmit(e) {
|
|
617
642
|
var _a, _b;
|
|
618
643
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
644
|
+
// A closed brand form is read-only — never submit.
|
|
645
|
+
if (this.status === 'closed') {
|
|
646
|
+
return;
|
|
647
|
+
}
|
|
619
648
|
if (this.isSubmitting) {
|
|
620
649
|
return;
|
|
621
650
|
}
|
|
@@ -698,11 +727,13 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
698
727
|
}
|
|
699
728
|
}
|
|
700
729
|
});
|
|
701
|
-
// Emit event
|
|
730
|
+
// Emit event. `cleared: true` lets the host skip autosaving the now-empty
|
|
731
|
+
// form — so clearing never overwrites the last saved draft.
|
|
702
732
|
this.form.emit({
|
|
703
733
|
event: 'change',
|
|
704
734
|
message: 'Form cleared',
|
|
705
|
-
success: true
|
|
735
|
+
success: true,
|
|
736
|
+
cleared: true
|
|
706
737
|
});
|
|
707
738
|
sendAnalytics({
|
|
708
739
|
category: 'ui-component',
|
|
@@ -732,47 +763,102 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
732
763
|
return map;
|
|
733
764
|
}
|
|
734
765
|
renderField(field) {
|
|
735
|
-
var _a, _b, _c, _d;
|
|
766
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
736
767
|
if (!this.isFieldVisible(field)) {
|
|
737
768
|
return null;
|
|
738
769
|
}
|
|
770
|
+
// A closed (expired / not-accepting) brand form is read-only: force every
|
|
771
|
+
// field disabled regardless of its own config.
|
|
772
|
+
const fieldDisabled = field.disabled || this.status === 'closed';
|
|
773
|
+
// 0) Presentational "Text Block" — static formatted text, NOT an input.
|
|
774
|
+
// It has no value, is never added to the submission (makeFormData only
|
|
775
|
+
// iterates this.values) and is never validated (see formValidators). The
|
|
776
|
+
// text runs through formatDescription, which escapes HTML first, so author
|
|
777
|
+
// content can never inject markup — only the **bold**/[link]/newline subset.
|
|
778
|
+
if (field.type === 'content') {
|
|
779
|
+
const raw = ((_b = (_a = field.content) !== null && _a !== void 0 ? _a : field.label) !== null && _b !== void 0 ? _b : '');
|
|
780
|
+
return (h("div", { class: "eds-content-block f-body-02 text-default", key: field.name, innerHTML: this.formatDescription(raw) }));
|
|
781
|
+
}
|
|
739
782
|
// 1) Handle rating
|
|
740
783
|
if (field.type === 'rating') {
|
|
741
784
|
// pull the current value (or zero)
|
|
742
785
|
const val = this.values[field.name] || 0;
|
|
743
|
-
return (h("div", { class: "form-group rating-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `rating-${field.name}`, label: field.label, disabled:
|
|
786
|
+
return (h("div", { class: "form-group rating-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `rating-${field.name}`, label: field.label, disabled: fieldDisabled, required: field.required }))), h("eds-rating", { id: `rating-${field.name}`, "rating-type": field.ratingType, "rating-count": field.ratingCount, "selected-rating": val, onRating: (e) => this.handleRating(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, message: field.message, "error-message": (_c = this.errors[field.name]) === null || _c === void 0 ? void 0 : _c.join('<br/>'), error: !!this.errors[field.name], link: field.link }))));
|
|
744
787
|
}
|
|
745
788
|
else if (field.type === 'nps') {
|
|
746
789
|
// pull the current value (or null)
|
|
747
790
|
const val = this.values[field.name] !== undefined ? this.values[field.name] : null;
|
|
748
|
-
return (h("div", { class: "form-group nps-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `nps-${field.name}`, label: field.question, disabled:
|
|
791
|
+
return (h("div", { class: "form-group nps-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `nps-${field.name}`, label: field.question, disabled: fieldDisabled, required: field.required }))), h("eds-nps", { id: `nps-${field.name}`, "right-label": field.rightLabel, "left-label": field.leftLabel, "selected-value": val, onNps: (e) => this.handleNPS(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, "error-message": (_d = this.errors[field.name]) === null || _d === void 0 ? void 0 : _d.join('<br/>'), error: !!this.errors[field.name] }))));
|
|
792
|
+
}
|
|
793
|
+
else if (field.type === 'search-select') {
|
|
794
|
+
return (h("eds-search-select", { key: field.name, name: field.name, label: field.label, source: field.source, options: field.options, multiple: !!field.multiple, "api-base": field.apiBase || '/api/v1', placeholder: field.placeholder, required: field.required, disabled: fieldDisabled, hint: field.hint, message: field.message, error: !!this.errors[field.name], "error-message": (_e = this.errors[field.name]) === null || _e === void 0 ? void 0 : _e.join('<br/>'), value: this.values[field.name], onEdsinput: (e) => this.handleInput(e, field), onEdschange: (e) => this.handleChange(e, field) }));
|
|
749
795
|
}
|
|
750
796
|
else if (field.type === 'kg-web-service') {
|
|
751
|
-
return (h("eds-kg-web-services-select", { key: field.name, name: field.name, label: field.label, "api-endpoint": field.apiEndpoint || '/api/v1/kg/web-services/cached', placeholder: field.placeholder, required: field.required, disabled:
|
|
797
|
+
return (h("eds-kg-web-services-select", { key: field.name, name: field.name, label: field.label, "api-endpoint": field.apiEndpoint || '/api/v1/kg/web-services/cached', placeholder: field.placeholder, required: field.required, disabled: fieldDisabled, hint: field.hint, message: field.message, error: !!this.errors[field.name], "error-message": (_f = this.errors[field.name]) === null || _f === void 0 ? void 0 : _f.join('<br/>'), value: this.values[field.name], size: field.size || 500, onEdsinput: (e) => this.handleInput(e, field), onEdschange: (e) => this.handleChange(e, field) }));
|
|
752
798
|
}
|
|
753
|
-
return (h("eds-input-field", { key: field.name, name: field.name, label: field.label, placeholder: field.placeholder, type: field.type, value: this.values[field.name], required: field.required, hint: field.hint, message: field.message, link: field.link, error: !!this.errors[field.name], errorMessage: (
|
|
799
|
+
return (h("eds-input-field", { key: field.name, name: field.name, label: field.label, placeholder: field.placeholder, type: field.type, value: this.values[field.name], required: field.required, disabled: fieldDisabled, hint: field.hint, message: field.message, link: field.link, error: !!this.errors[field.name], errorMessage: (_g = this.errors[field.name]) === null || _g === void 0 ? void 0 : _g.join('<br/>'), options: field.options, onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field) }));
|
|
754
800
|
}
|
|
755
801
|
async getData() {
|
|
756
802
|
return this.makeFormData();
|
|
757
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* Render the form/step description with a small, safe subset of inline
|
|
806
|
+
* formatting so authors can add links and emphasis:
|
|
807
|
+
* **bold** → <strong>
|
|
808
|
+
* [label](url) → <a> (only http/https/mailto; others render as text)
|
|
809
|
+
* blank line / \n → paragraph / line break
|
|
810
|
+
* HTML is escaped FIRST, so author text can never inject markup — only the
|
|
811
|
+
* whitelisted patterns above produce tags.
|
|
812
|
+
*/
|
|
813
|
+
formatDescription(text) {
|
|
814
|
+
return safeInlineFormat(text);
|
|
815
|
+
}
|
|
758
816
|
render() {
|
|
759
817
|
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
760
818
|
//const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
761
819
|
const buckets = this.groupedFields;
|
|
762
820
|
// build the styling classes based on formStyle prop
|
|
763
821
|
let styleClasses = '';
|
|
822
|
+
// No inner padding on the form card — spacing is provided by the surrounding
|
|
823
|
+
// page/container. This keeps fields flush with the card edge (and, when the
|
|
824
|
+
// form is slotted inside another container like a multi-step stepper, in line
|
|
825
|
+
// with it) instead of double-padding.
|
|
764
826
|
if (this.formStyle === 'default') {
|
|
765
|
-
styleClasses = 'bg-inverse border-softer relative rounded-xs border-2
|
|
827
|
+
styleClasses = 'bg-inverse border-softer relative rounded-xs border-2';
|
|
766
828
|
}
|
|
767
829
|
else if (this.formStyle === 'shadow') {
|
|
768
|
-
styleClasses = 'bg-inverse effect-shadow shadow-hover border-softer relative rounded-xs border-2
|
|
830
|
+
styleClasses = 'bg-inverse effect-shadow shadow-hover border-softer relative rounded-xs border-2';
|
|
769
831
|
}
|
|
770
832
|
else if (this.formStyle === 'brand') {
|
|
771
|
-
styleClasses = 'bg-inverse form-brand relative rounded-xs
|
|
772
|
-
}
|
|
773
|
-
|
|
833
|
+
styleClasses = 'bg-inverse form-brand relative rounded-xs';
|
|
834
|
+
}
|
|
835
|
+
// ── Brand style: a self-contained card with a dark hero header, a light
|
|
836
|
+
// sectioned body, and a footer. The page that hosts it is expected to be
|
|
837
|
+
// chrome-less (the hero header is the page header). ──
|
|
838
|
+
if (this.formStyle === 'brand') {
|
|
839
|
+
const hasRequired = this.parsedFields.some((f) => f && f.required && f.type !== 'hidden');
|
|
840
|
+
const groupSections = this.parsedGroups
|
|
841
|
+
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
842
|
+
.map((g) => (h("div", { class: "form-sect", key: g.id }, h("div", { class: "form-sect-head" }, h("span", { class: "form-sect-glyph", "aria-hidden": "true" }, h("svg", { viewBox: "0 0 24 24" }, h("path", { d: "M6 4l13 7-5.5 1.5L11 18z", "stroke-linejoin": "round" }))), h("span", { class: "form-sect-label" }, g.title)), h("div", { class: "flex flex-col gap-y-24" }, buckets[g.id].map((f) => this.renderField(f))))));
|
|
843
|
+
// Lifecycle: open (brand green) · expiring (amber) · closed (red, read-only).
|
|
844
|
+
const isClosed = this.status === 'closed';
|
|
845
|
+
const isExpiring = this.status === 'expiring';
|
|
846
|
+
const statusSuffix = isClosed ? 'Closed' : isExpiring ? 'Closing soon' : '';
|
|
847
|
+
const statusIcon = isClosed ? (h("svg", { viewBox: "0 0 24 24" }, h("circle", { cx: "12", cy: "12", r: "9" }), h("path", { d: "M15 9l-6 6M9 9l6 6", "stroke-linecap": "round" }))) : isExpiring ? (h("svg", { viewBox: "0 0 24 24" }, h("circle", { cx: "12", cy: "12", r: "9" }), h("path", { d: "M12 8v4.5M12 16h.01", "stroke-linecap": "round" }))) : null;
|
|
848
|
+
const expiresChipClass = isClosed ? 'is-danger' : isExpiring ? 'is-warn' : '';
|
|
849
|
+
return (h("form", { class: `form-brand-card relative ${isClosed ? 'is-closed' : ''}`, ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, h("div", { class: "form-brand-header" }, h("div", { class: "fbh-grid", "aria-hidden": "true" }), h("div", { class: `fbh-glow fbh-glow--${this.status}`, "aria-hidden": "true" }), h("div", { class: "fbh-in" }, h("div", { class: "fbh-logo" }, h("eds-logo", { variant: "negative", href: "/" })), this.eyebrow && (h("span", { class: `fbh-eyebrow fbh-eyebrow--${this.status}` }, statusIcon, this.eyebrow, statusSuffix ? ` · ${statusSuffix}` : '')), this.title && h("h1", { class: "fbh-title" }, this.title), this.description && h("p", { class: "fbh-sub", innerHTML: this.formatDescription(this.description) }), (this.progress != null || this.expires || this.policy || this.estimatedTime || this.gdpr) && (h("div", { class: "fbh-meta" }, this.progress != null && (h("span", null, h("svg", { viewBox: "0 0 24 24" }, h("circle", { cx: "12", cy: "12", r: "9" }), h("path", { d: "M9 12.5l2 2 4-4" })), this.progress, "% complete")), this.expires && (h("span", { class: expiresChipClass }, h("svg", { viewBox: "0 0 24 24" }, h("rect", { x: "4", y: "5", width: "16", height: "15", rx: "2" }), h("path", { d: "M4 9h16M8 3v4M16 3v4" })), this.expires)), this.policy && (h("span", null, h("svg", { viewBox: "0 0 24 24" }, h("path", { d: "M4 9a7 7 0 0112-4M20 15a7 7 0 01-12 4M16 5h4V1M8 19H4v4" })), this.policy)), this.estimatedTime && (h("span", null, h("svg", { viewBox: "0 0 24 24" }, h("circle", { cx: "12", cy: "12", r: "9" }), h("path", { d: "M12 8v4l3 2" })), this.estimatedTime)), this.gdpr && (h("span", null, h("svg", { viewBox: "0 0 24 24" }, h("path", { d: "M12 3l7 3v5c0 4.4-3 8-7 10-4-2-7-5.6-7-10V6z" }), h("path", { d: "M9 12l2 2 4-4" })), "GDPR compliant")))))), h("div", { class: `form-brand-body ${isClosed ? 'form-brand-body--closed' : ''}` }, hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), groupSections, buckets['__ungrouped'] && buckets['__ungrouped'].length > 0 && (h("div", { class: "form-sect form-sect--bare" }, h("div", { class: "flex flex-col gap-y-24" }, buckets['__ungrouped'].map((f) => this.renderField(f)))))), isClosed ? (h("div", { class: "form-brand-footer" }, h("span", { class: "req-note req-note--closed" }, h("svg", { viewBox: "0 0 24 24" }, h("rect", { x: "5", y: "11", width: "14", height: "9", rx: "2" }), h("path", { d: "M8 11V8a4 4 0 018 0v3" })), "Submissions closed"), h("div", { class: "form-brand-footer-actions" }, h("eds-button", { intent: "neutral", pill: true, label: this.formBtnLabel, disabled: true, icon: "arrow-right", size: "large" })))) : ((this.formBtn || this.clearBtn || hasRequired || this.saveLabel) && (h("div", { class: "form-brand-footer" }, h("div", { class: "fbf-left" }, this.saveLabel && (h("span", { class: `fbf-save fbf-save--${this.saveStatus}`, role: "status", "aria-live": "polite" }, h("span", { class: "fbf-save-dot", "aria-hidden": "true" }), this.saveLabel)), this.saveLabel && hasRequired && h("span", { class: "fbf-sep", "aria-hidden": "true" }), hasRequired && (h("span", { class: "req-note" }, h("b", null, "*"), " Required fields"))), this.showClearConfirm ? (h("div", { class: "fbf-confirm" }, h("span", { class: "fbf-confirm-q" }, h("svg", { viewBox: "0 0 24 24" }, h("circle", { cx: "12", cy: "12", r: "9" }), h("path", { d: "M12 8v4.5M12 16h.01", "stroke-linecap": "round" })), "Clear everything you've typed?"), h("button", { type: "button", class: "fbf-confirm-no", onClick: () => (this.showClearConfirm = false) }, "Cancel"), h("button", { type: "button", class: "fbf-confirm-yes", onClick: (e) => {
|
|
850
|
+
this.showClearConfirm = false;
|
|
851
|
+
this.handleClear(e);
|
|
852
|
+
} }, "Yes, clear it"))) : (h("div", { class: "form-brand-footer-actions" }, this.clearBtn && (h("button", { type: "button", class: "fbf-clear", disabled: this.isSubmitting || !this.values || Object.keys(this.values).length === 0, onClick: () => (this.showClearConfirm = true) }, this.clearBtnLabel)), this.formBtn && (h("eds-button", { intent: "brand", pill: true, label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, icon: "arrow-right", size: "large", onClick: () => this.handleSubmit() })))))))));
|
|
853
|
+
}
|
|
854
|
+
return (h("form", { class: styleClasses,
|
|
855
|
+
// Inner padding defaults to 2rem (the original p-32 look) but can be
|
|
856
|
+
// overridden per-consumer via a CSS custom property, which inherits through
|
|
857
|
+
// the shadow boundary. A form slotted inside an already-padded container
|
|
858
|
+
// (e.g. a multi-step eds-steps card) sets `--eds-form-padding: 0` to sit flush.
|
|
859
|
+
style: { padding: 'var(--eds-form-padding, 2rem)' }, ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, h("div", { class: "flex flex-col gap-y-20 overflow-visible" }, this.estimatedTime && (h("span", { class: "form-meta-time" }, h("svg", { viewBox: "0 0 24 24", "aria-hidden": "true" }, h("circle", { cx: "12", cy: "12", r: "9" }), h("path", { d: "M12 8v4l3 2" })), this.estimatedTime)), this.title && (h("span", { role: "heading", class: "f-heading-05 pb-4 block" }, this.title)), this.description && (h("span", { class: "f-body-02 text-light", innerHTML: this.formatDescription(this.description) })), h("slot", null)), hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), this.parsedGroups
|
|
774
860
|
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
775
|
-
.map((g) => (h("div", { class: "mt-
|
|
861
|
+
.map((g) => (h("div", { class: "mt-48", key: g.id }, h("span", { class: "f-body-02" }, h("b", null, g.title)), h("div", { class: "border-group mt-24 mb-48 flex flex-col gap-y-24" }, buckets[g.id].map((f) => this.renderField(f)))))), h("div", { class: "flex flex-col mt-32 gap-y-24" }, buckets['__ungrouped'].map((f) => this.renderField(f))), (this.formBtn || this.clearBtn) && (h("div", { class: "mt-32 md:mt-64 flex flex-col items-center md:flex-row-reverse md:justify-between gap-y-16 md:gap-y-0" }, this.formBtn && (h("eds-button", { intent: this.buttonIntent, pill: true, label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, icon: "arrow-right", size: "large", onClick: () => this.handleSubmit() })), this.clearBtn && (h("eds-button", { intent: "neutral", pill: true, size: "large", label: this.clearBtnLabel, disabled: this.isSubmitting || !this.values || Object.keys(this.values).length === 0, onClick: (e) => this.handleClear(e) }))))));
|
|
776
862
|
}
|
|
777
863
|
get el() { return this; }
|
|
778
864
|
static get watchers() { return {
|
|
@@ -784,6 +870,12 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
784
870
|
"name": [1],
|
|
785
871
|
"title": [1],
|
|
786
872
|
"description": [1],
|
|
873
|
+
"eyebrow": [1],
|
|
874
|
+
"estimatedTime": [1, "estimated-time"],
|
|
875
|
+
"progress": [2],
|
|
876
|
+
"expires": [1],
|
|
877
|
+
"policy": [1],
|
|
878
|
+
"gdpr": [4],
|
|
787
879
|
"setFormUrl": [4, "set-form-url"],
|
|
788
880
|
"formBtn": [4, "form-btn"],
|
|
789
881
|
"formBtnLabel": [1, "form-btn-label"],
|
|
@@ -795,7 +887,11 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
795
887
|
"groups": [1],
|
|
796
888
|
"initData": [16],
|
|
797
889
|
"formStyle": [1, "form-style"],
|
|
890
|
+
"status": [1],
|
|
891
|
+
"saveStatus": [1, "save-status"],
|
|
892
|
+
"saveLabel": [1, "save-label"],
|
|
798
893
|
"values": [32],
|
|
894
|
+
"showClearConfirm": [32],
|
|
799
895
|
"isSubmitting": [32],
|
|
800
896
|
"hasError": [32],
|
|
801
897
|
"errors": [32],
|
|
@@ -811,7 +907,7 @@ function defineCustomElement$1() {
|
|
|
811
907
|
if (typeof customElements === "undefined") {
|
|
812
908
|
return;
|
|
813
909
|
}
|
|
814
|
-
const components = ["eds-form", "eds-button", "eds-icon-wrapper", "eds-input", "eds-input-dropzone", "eds-input-field", "eds-input-file", "eds-input-footer", "eds-input-label", "eds-input-range", "eds-input-
|
|
910
|
+
const components = ["eds-form", "eds-button", "eds-icon-wrapper", "eds-input", "eds-input-dropzone", "eds-input-field", "eds-input-file", "eds-input-footer", "eds-input-label", "eds-input-range", "eds-input-select", "eds-kg-web-services-select", "eds-link", "eds-logo", "eds-nps", "eds-rating", "eds-search-select"];
|
|
815
911
|
components.forEach(tagName => { switch (tagName) {
|
|
816
912
|
case "eds-form":
|
|
817
913
|
if (!customElements.get(tagName)) {
|
|
@@ -820,75 +916,80 @@ function defineCustomElement$1() {
|
|
|
820
916
|
break;
|
|
821
917
|
case "eds-button":
|
|
822
918
|
if (!customElements.get(tagName)) {
|
|
823
|
-
defineCustomElement$
|
|
919
|
+
defineCustomElement$h();
|
|
824
920
|
}
|
|
825
921
|
break;
|
|
826
922
|
case "eds-icon-wrapper":
|
|
827
923
|
if (!customElements.get(tagName)) {
|
|
828
|
-
defineCustomElement$
|
|
924
|
+
defineCustomElement$g();
|
|
829
925
|
}
|
|
830
926
|
break;
|
|
831
927
|
case "eds-input":
|
|
832
928
|
if (!customElements.get(tagName)) {
|
|
833
|
-
defineCustomElement$
|
|
929
|
+
defineCustomElement$f();
|
|
834
930
|
}
|
|
835
931
|
break;
|
|
836
932
|
case "eds-input-dropzone":
|
|
837
933
|
if (!customElements.get(tagName)) {
|
|
838
|
-
defineCustomElement$
|
|
934
|
+
defineCustomElement$e();
|
|
839
935
|
}
|
|
840
936
|
break;
|
|
841
937
|
case "eds-input-field":
|
|
842
938
|
if (!customElements.get(tagName)) {
|
|
843
|
-
defineCustomElement$
|
|
939
|
+
defineCustomElement$d();
|
|
844
940
|
}
|
|
845
941
|
break;
|
|
846
942
|
case "eds-input-file":
|
|
847
943
|
if (!customElements.get(tagName)) {
|
|
848
|
-
defineCustomElement$
|
|
944
|
+
defineCustomElement$c();
|
|
849
945
|
}
|
|
850
946
|
break;
|
|
851
947
|
case "eds-input-footer":
|
|
852
948
|
if (!customElements.get(tagName)) {
|
|
853
|
-
defineCustomElement$
|
|
949
|
+
defineCustomElement$b();
|
|
854
950
|
}
|
|
855
951
|
break;
|
|
856
952
|
case "eds-input-label":
|
|
857
953
|
if (!customElements.get(tagName)) {
|
|
858
|
-
defineCustomElement$
|
|
954
|
+
defineCustomElement$a();
|
|
859
955
|
}
|
|
860
956
|
break;
|
|
861
957
|
case "eds-input-range":
|
|
958
|
+
if (!customElements.get(tagName)) {
|
|
959
|
+
defineCustomElement$9();
|
|
960
|
+
}
|
|
961
|
+
break;
|
|
962
|
+
case "eds-input-select":
|
|
862
963
|
if (!customElements.get(tagName)) {
|
|
863
964
|
defineCustomElement$8();
|
|
864
965
|
}
|
|
865
966
|
break;
|
|
866
|
-
case "eds-
|
|
967
|
+
case "eds-kg-web-services-select":
|
|
867
968
|
if (!customElements.get(tagName)) {
|
|
868
969
|
defineCustomElement$7();
|
|
869
970
|
}
|
|
870
971
|
break;
|
|
871
|
-
case "eds-
|
|
972
|
+
case "eds-link":
|
|
872
973
|
if (!customElements.get(tagName)) {
|
|
873
974
|
defineCustomElement$6();
|
|
874
975
|
}
|
|
875
976
|
break;
|
|
876
|
-
case "eds-
|
|
977
|
+
case "eds-logo":
|
|
877
978
|
if (!customElements.get(tagName)) {
|
|
878
979
|
defineCustomElement$5();
|
|
879
980
|
}
|
|
880
981
|
break;
|
|
881
|
-
case "eds-
|
|
982
|
+
case "eds-nps":
|
|
882
983
|
if (!customElements.get(tagName)) {
|
|
883
984
|
defineCustomElement$4();
|
|
884
985
|
}
|
|
885
986
|
break;
|
|
886
|
-
case "eds-
|
|
987
|
+
case "eds-rating":
|
|
887
988
|
if (!customElements.get(tagName)) {
|
|
888
989
|
defineCustomElement$3();
|
|
889
990
|
}
|
|
890
991
|
break;
|
|
891
|
-
case "eds-
|
|
992
|
+
case "eds-search-select":
|
|
892
993
|
if (!customElements.get(tagName)) {
|
|
893
994
|
defineCustomElement$2();
|
|
894
995
|
}
|
|
@@ -76,7 +76,7 @@ const EdsFrame$1 = /*@__PURE__*/ proxyCustomElement(class EdsFrame extends HTMLE
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h("div", { key: '
|
|
79
|
+
return (h("div", { key: '397b0f9433b9339079774f0aa49b1451f9c0d45e', class: this.articleClasses() }, h("div", { key: 'a70c2ec210a1de124a82c39d6f2592ddb9ff4572', class: "effect-height flex items-center justify-between py-8 px-12" }, h("span", { key: '88d0732d0cf4b3fab14ed0e1b0797b78dd230585', class: "f-ui-02" }, this.frameLabel), !this.iframeError && this.url && this.urlLabel ? (h("eds-link", { label: this.urlLabel, url: this.url, intent: this.intent, class: "ml-auto", external: true, disabled: false, icon: "arrow-up-right" })) : null), h("div", { key: '85c0d453e85d23520e5a6a5bae2159285771677e', class: "border-softer" }, this.iframeError ? (h("div", { class: "container ml-8 mr-8 mt-16" }, this.errorMessage)) : (h("iframe", { src: this.frameSrc, width: "100%", height: this.getFrameHeight(), title: this.frameLabel, frameBorder: "0", allowFullScreen: true })))));
|
|
80
80
|
}
|
|
81
81
|
get el() { return this; }
|
|
82
82
|
static get style() { return EdsFrameStyle0; }
|
|
@@ -49,7 +49,7 @@ const EdsGauge$1 = /*@__PURE__*/ proxyCustomElement(class EdsGauge extends HTMLE
|
|
|
49
49
|
const textStyle = {
|
|
50
50
|
fontSize: `${fontSize}px`
|
|
51
51
|
};
|
|
52
|
-
return (h("div", { key: '
|
|
52
|
+
return (h("div", { key: '5629f8adbc6f144aad49062883cb85ecf24fc16c', role: "progressbar", "aria-valuemin": this.valueMin, "aria-valuemax": this.valueMax, "aria-valuenow": clamped, "aria-label": `Gauge value: ${clamped} of ${this.valueMax}`, class: "relative inline-block rounded-full overflow-hidden", style: containerStyle }, h("div", { key: 'd668b54b0a5f4bf260a2f1153781c59741bd8694', class: "absolute bg-inverse rounded-full", style: maskStyle }), h("div", { key: 'f08feba97d30ed893a72a7e07e412aa82ea8cd3d', class: "absolute inset-0 flex items-center justify-center" }, h("span", { key: '2a8dccde44677d4a4b742cd992144d6cf399ee9b', class: "f-body-01 text-default", style: textStyle }, clamped))));
|
|
53
53
|
}
|
|
54
54
|
static get style() { return EdsGaugeStyle0; }
|
|
55
55
|
}, [1, "eds-gauge", {
|
|
@@ -7,7 +7,7 @@ import { d as defineCustomElement$4 } from './eds-img2.js';
|
|
|
7
7
|
import { d as defineCustomElement$3 } from './eds-link2.js';
|
|
8
8
|
import { d as defineCustomElement$2 } from './eds-spinner2.js';
|
|
9
9
|
|
|
10
|
-
const edsGitlabContributorsCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.grid{display:grid}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-2{gap:0.5rem;}.gap-4{gap:1rem;}.gap-6{gap:1.5rem;}.p-5{padding:1.25rem;}.p-12{padding:3rem;}.pb-2{padding-bottom:0.25rem;}.pb-4{padding-bottom:1rem;}.mb-6{margin-bottom:1.5rem;}.m-0{margin:0}.mt-auto{margin-top:auto}.w-full{width:100%}.min-w-0{min-width:0}.text-xs{font-size:0.75rem;line-height:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.whitespace-nowrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.no-underline{text-decoration:none}.text-gray-600{color:var(--eds-color-gray-600, #4b5563)}.text-gray-900{color:var(--eds-color-gray-900, #111827)}.border-gray-200{border-color:var(--eds-color-gray-200, #e5e7eb)}.bg-white{background-color:var(--eds-color-white, #ffffff)}.text-primary-600{color:var(--eds-color-primary-600, #2563eb)}.hover\\:text-primary-600:hover{color:var(--eds-color-primary-600, #2563eb)}.border-primary-300{border-color:var(--eds-color-primary-300, #93c5fd)}.hover\\:border-primary-300:hover{border-color:var(--eds-color-primary-300, #93c5fd)}.text-success-600{color:var(--eds-color-success-600, #16a34a)}.text-error-600{color:var(--eds-color-error-600, #dc2626)}.border{border-width:1px}.border-b{border-bottom-width:1px}.rounded-lg{border-radius:var(--eds-radius-lg, 0.5rem);}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-200{transition-duration:200ms}.shadow-md{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.hover\\:shadow-md:hover{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.-translate-y-0\\.5{transform:translateY(-0.125rem);}.hover\\:-translate-y-0\\.5:hover{transform:translateY(-0.125rem)}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}@media (min-width: 640px){.sm\\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.md\\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5, minmax(0, 1fr))}}.contributor-card{will-change:transform, box-shadow, border-color}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.text-default{color:var(--black)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}";
|
|
10
|
+
const edsGitlabContributorsCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.grid{display:grid}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-2{gap:0.5rem;}.gap-4{gap:1rem;}.gap-6{gap:1.5rem;}.p-5{padding:1.25rem;}.p-12{padding:3rem;}.pb-2{padding-bottom:0.25rem;}.pb-4{padding-bottom:1rem;}.mb-6{margin-bottom:1.5rem;}.m-0{margin:0}.mt-auto{margin-top:auto}.w-full{width:100%}.min-w-0{min-width:0}.text-xs{font-size:0.75rem;line-height:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.whitespace-nowrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.no-underline{text-decoration:none}.text-gray-600{color:var(--eds-color-gray-600, #4b5563)}.text-gray-900{color:var(--eds-color-gray-900, #111827)}.border-gray-200{border-color:var(--eds-color-gray-200, #e5e7eb)}.bg-white{background-color:var(--eds-color-white, #ffffff)}.text-primary-600{color:var(--eds-color-primary-600, #2563eb)}.hover\\:text-primary-600:hover{color:var(--eds-color-primary-600, #2563eb)}.border-primary-300{border-color:var(--eds-color-primary-300, #93c5fd)}.hover\\:border-primary-300:hover{border-color:var(--eds-color-primary-300, #93c5fd)}.text-success-600{color:var(--eds-color-success-600, #16a34a)}.text-error-600{color:var(--eds-color-error-600, #dc2626)}.border{border-width:1px}.border-b{border-bottom-width:1px}.rounded-lg{border-radius:var(--eds-radius-lg, 0.5rem);}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-200{transition-duration:200ms}.shadow-md{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.hover\\:shadow-md:hover{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.-translate-y-0\\.5{transform:translateY(-0.125rem);}.hover\\:-translate-y-0\\.5:hover{transform:translateY(-0.125rem)}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}@media (min-width: 640px){.sm\\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.md\\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5, minmax(0, 1fr))}}.contributor-card{will-change:transform, box-shadow, border-color}.loading{position:relative;min-height:8rem;padding:1rem 1.25rem;color:var(--grey-dark, #7A7B7A);font-size:0.9375rem;border:1px solid rgba(0, 0, 0, 0.08);border-radius:0.25rem;background-color:rgba(0, 0, 0, 0.02)}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.text-default{color:var(--black)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}";
|
|
11
11
|
const EdsGitlabContributorsStyle0 = edsGitlabContributorsCss;
|
|
12
12
|
|
|
13
13
|
const EdsGitlabContributors$1 = /*@__PURE__*/ proxyCustomElement(class EdsGitlabContributors extends HTMLElement {
|
|
@@ -37,8 +37,8 @@ const EdsGitlabContributors$1 = /*@__PURE__*/ proxyCustomElement(class EdsGitlab
|
|
|
37
37
|
getProjectIds() {
|
|
38
38
|
return this.projectId
|
|
39
39
|
.split(',')
|
|
40
|
-
.map(id => id.trim())
|
|
41
|
-
.filter(id => id.length > 0);
|
|
40
|
+
.map((id) => id.trim())
|
|
41
|
+
.filter((id) => id.length > 0);
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
44
44
|
* Fetches commits by path and aggregates by author for a single project
|
|
@@ -85,7 +85,7 @@ const EdsGitlabContributors$1 = /*@__PURE__*/ proxyCustomElement(class EdsGitlab
|
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
// Convert to GitLabContributor format
|
|
88
|
-
return Array.from(authorMap.values()).map(author => ({
|
|
88
|
+
return Array.from(authorMap.values()).map((author) => ({
|
|
89
89
|
name: author.name,
|
|
90
90
|
email: author.email,
|
|
91
91
|
commits: author.commits,
|
|
@@ -105,18 +105,16 @@ const EdsGitlabContributors$1 = /*@__PURE__*/ proxyCustomElement(class EdsGitlab
|
|
|
105
105
|
// Fetch commits by path and aggregate by author (for monorepo)
|
|
106
106
|
return await this.fetchCommitsByPathForProject(projectId);
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
'PRIVATE-TOKEN': this.accessToken
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
if (!contributorsResponse.ok) {
|
|
116
|
-
throw new Error(`GitLab API error: ${contributorsResponse.status} ${contributorsResponse.statusText}`);
|
|
108
|
+
// Use contributors API for entire repository
|
|
109
|
+
const contributorsResponse = await fetch(`${this.apiUrl}/projects/${encodeURIComponent(projectId)}/repository/contributors?per_page=100`, {
|
|
110
|
+
headers: {
|
|
111
|
+
'PRIVATE-TOKEN': this.accessToken
|
|
117
112
|
}
|
|
118
|
-
|
|
113
|
+
});
|
|
114
|
+
if (!contributorsResponse.ok) {
|
|
115
|
+
throw new Error(`GitLab API error: ${contributorsResponse.status} ${contributorsResponse.statusText}`);
|
|
119
116
|
}
|
|
117
|
+
return await contributorsResponse.json();
|
|
120
118
|
}
|
|
121
119
|
/**
|
|
122
120
|
* Fetches contributors from GitLab API (supports multiple projects)
|
|
@@ -131,29 +129,24 @@ const EdsGitlabContributors$1 = /*@__PURE__*/ proxyCustomElement(class EdsGitlab
|
|
|
131
129
|
this.loading = true;
|
|
132
130
|
this.error = '';
|
|
133
131
|
const projectIds = this.getProjectIds();
|
|
134
|
-
|
|
132
|
+
const allContributorsData = [];
|
|
135
133
|
// Fetch contributors from all projects
|
|
136
134
|
for (const projectId of projectIds) {
|
|
137
135
|
const contributorsData = await this.fetchContributorsForProject(projectId);
|
|
138
136
|
allContributorsData.push(...contributorsData);
|
|
139
137
|
}
|
|
140
138
|
// Filter by minimum commits and exclude bot contributors
|
|
141
|
-
const filteredContributors = allContributorsData.filter(c => {
|
|
139
|
+
const filteredContributors = allContributorsData.filter((c) => {
|
|
142
140
|
// Exclude if commits are below minimum
|
|
143
|
-
if (c.commits < this.minCommits)
|
|
141
|
+
if (c.commits < this.minCommits) {
|
|
144
142
|
return false;
|
|
143
|
+
}
|
|
145
144
|
// Exclude GitLab CI and other bots
|
|
146
145
|
const email = c.email.toLowerCase();
|
|
147
146
|
const name = c.name.toLowerCase();
|
|
148
147
|
// Common bot identifiers
|
|
149
|
-
const botPatterns = [
|
|
150
|
-
|
|
151
|
-
'gitlab ci',
|
|
152
|
-
'noreply@gitlab',
|
|
153
|
-
'bot@',
|
|
154
|
-
'automation@'
|
|
155
|
-
];
|
|
156
|
-
return !botPatterns.some(pattern => email.includes(pattern) || name.includes(pattern));
|
|
148
|
+
const botPatterns = ['gitlab-ci', 'gitlab ci', 'noreply@gitlab', 'bot@', 'automation@'];
|
|
149
|
+
return !botPatterns.some((pattern) => email.includes(pattern) || name.includes(pattern));
|
|
157
150
|
});
|
|
158
151
|
// Aggregate duplicate contributors by username
|
|
159
152
|
const aggregatedContributors = this.aggregateContributors(filteredContributors);
|
|
@@ -230,18 +223,28 @@ const EdsGitlabContributors$1 = /*@__PURE__*/ proxyCustomElement(class EdsGitlab
|
|
|
230
223
|
}
|
|
231
224
|
render() {
|
|
232
225
|
if (this.loading) {
|
|
233
|
-
|
|
226
|
+
// Spinner placeholder mirrors eds-kg-learning-resources exactly —
|
|
227
|
+
// same `.loading` wrapper (position: relative + min-height so the
|
|
228
|
+
// absolutely-positioned spinner anchors inside the box instead of
|
|
229
|
+
// escaping to the page), same eds-spinner props (sm/primary/
|
|
230
|
+
// transparent + message-as-prop), and the same role+aria-live for
|
|
231
|
+
// screen-reader announcement. Keep these two components in sync if
|
|
232
|
+
// the loading affordance ever changes.
|
|
233
|
+
return (h("div", { class: "loading", role: "status", "aria-live": "polite" }, h("eds-spinner", { size: "sm", variant: "primary", background: "transparent", message: "Loading contributors..." })));
|
|
234
234
|
}
|
|
235
235
|
if (this.error) {
|
|
236
|
-
return
|
|
236
|
+
return h("eds-alert", { message: "Error loading contributors", intent: "error" });
|
|
237
237
|
}
|
|
238
238
|
if (this.contributors.length === 0) {
|
|
239
|
-
return
|
|
239
|
+
return h("eds-alert", { message: "No contributors found for this project.", intent: "error" });
|
|
240
240
|
}
|
|
241
|
-
const gridClass = `grid gap-6 w-full ${this.columns === '2'
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
241
|
+
const gridClass = `grid gap-6 w-full ${this.columns === '2'
|
|
242
|
+
? 'grid-cols-1 sm:grid-cols-2'
|
|
243
|
+
: this.columns === '3'
|
|
244
|
+
? 'grid-cols-1 sm:grid-cols-2 md:grid-cols-3'
|
|
245
|
+
: this.columns === '4'
|
|
246
|
+
? 'grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4'
|
|
247
|
+
: 'grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5'}`;
|
|
245
248
|
return (h("div", { class: "w-full" }, h("div", { class: gridClass }, this.contributors.map((contributor) => {
|
|
246
249
|
const { firstName, lastName } = this.parseName(contributor.name);
|
|
247
250
|
return (h("div", { class: "contributor-card flex flex-row gap-4 p-5 bg-white border border-gray-200 rounded-lg transition-all duration-200", key: contributor.email }, h("div", { class: "flex-shrink-0" }, h("eds-avatar", { firstName: firstName, lastName: lastName, color: "black" })), h("div", { class: "min-w-0 flex flex-col gap-2" }, h("span", { class: "f-ui-01 text-default pb-2 m-0 whitespace-nowrap overflow-hidden text-ellipsis" }, "@", contributor.username), h("div", { class: "flex flex-col gap-2 mt-auto" }, h("div", { class: "flex items-center gap-2 font-semibold" }, h("span", { class: "text-light" }, this.formatNumber(contributor.commits)), h("span", { class: "text-lighter" }, contributor.commits === 1 ? 'commit' : 'commits'))))));
|