@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
|
@@ -2,6 +2,7 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { sendAnalytics } from "../../utils/analytics";
|
|
3
3
|
import { parseData } from "../../utils/sharedUtils";
|
|
4
4
|
import { validateFormFields } from "../../utils/eds-form/formValidators";
|
|
5
|
+
import { safeInlineFormat } from "../../utils/eds-form/safeFormat";
|
|
5
6
|
import { validateInputField } from "../../utils/eds-form/validateInput";
|
|
6
7
|
import { getFormInitData } from "../../utils/eds-form/formUtils";
|
|
7
8
|
/**
|
|
@@ -21,6 +22,12 @@ export class EdsForm {
|
|
|
21
22
|
this.name = 'eds-form';
|
|
22
23
|
this.title = 'Form Title';
|
|
23
24
|
this.description = 'Form Description';
|
|
25
|
+
this.eyebrow = undefined;
|
|
26
|
+
this.estimatedTime = undefined;
|
|
27
|
+
this.progress = undefined;
|
|
28
|
+
this.expires = undefined;
|
|
29
|
+
this.policy = undefined;
|
|
30
|
+
this.gdpr = false;
|
|
24
31
|
this.setFormUrl = true;
|
|
25
32
|
this.formBtn = true;
|
|
26
33
|
this.formBtnLabel = 'Submit';
|
|
@@ -32,7 +39,11 @@ export class EdsForm {
|
|
|
32
39
|
this.groups = [];
|
|
33
40
|
this.initData = {};
|
|
34
41
|
this.formStyle = 'default';
|
|
42
|
+
this.status = 'open';
|
|
43
|
+
this.saveStatus = 'idle';
|
|
44
|
+
this.saveLabel = undefined;
|
|
35
45
|
this.values = {};
|
|
46
|
+
this.showClearConfirm = false;
|
|
36
47
|
this.isSubmitting = false;
|
|
37
48
|
this.hasError = false;
|
|
38
49
|
this.errors = {};
|
|
@@ -199,7 +210,20 @@ export class EdsForm {
|
|
|
199
210
|
if (this.setFormUrl && typeof window !== 'undefined') {
|
|
200
211
|
formData.set('form_url', window.location.href);
|
|
201
212
|
}
|
|
213
|
+
// Group fields by name so we can drop values for fields hidden by a condition.
|
|
214
|
+
// A name may be reused across mutually-exclusive conditional variants (e.g. a
|
|
215
|
+
// `web_app_url` shown for service_type=web_app AND another for =platform), so a
|
|
216
|
+
// value is dropped ONLY when EVERY field with that name is hidden — if any
|
|
217
|
+
// variant is visible, its value is kept.
|
|
218
|
+
const fieldsByName = {};
|
|
219
|
+
this.parsedFields.forEach((f) => {
|
|
220
|
+
(fieldsByName[f.name] = fieldsByName[f.name] || []).push(f);
|
|
221
|
+
});
|
|
202
222
|
Object.keys(this.values).forEach((key) => {
|
|
223
|
+
const fields = fieldsByName[key];
|
|
224
|
+
if (fields && fields.length && !fields.some((f) => this.isFieldVisible(f))) {
|
|
225
|
+
return; // all fields with this name are conditionally hidden — skip
|
|
226
|
+
}
|
|
203
227
|
const value = this.values[key];
|
|
204
228
|
// Handle File arrays (from file inputs)
|
|
205
229
|
if (Array.isArray(value)) {
|
|
@@ -382,6 +406,10 @@ export class EdsForm {
|
|
|
382
406
|
handleSubmit(e) {
|
|
383
407
|
var _a, _b;
|
|
384
408
|
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
409
|
+
// A closed brand form is read-only — never submit.
|
|
410
|
+
if (this.status === 'closed') {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
385
413
|
if (this.isSubmitting) {
|
|
386
414
|
return;
|
|
387
415
|
}
|
|
@@ -464,11 +492,13 @@ export class EdsForm {
|
|
|
464
492
|
}
|
|
465
493
|
}
|
|
466
494
|
});
|
|
467
|
-
// Emit event
|
|
495
|
+
// Emit event. `cleared: true` lets the host skip autosaving the now-empty
|
|
496
|
+
// form — so clearing never overwrites the last saved draft.
|
|
468
497
|
this.form.emit({
|
|
469
498
|
event: 'change',
|
|
470
499
|
message: 'Form cleared',
|
|
471
|
-
success: true
|
|
500
|
+
success: true,
|
|
501
|
+
cleared: true
|
|
472
502
|
});
|
|
473
503
|
sendAnalytics({
|
|
474
504
|
category: 'ui-component',
|
|
@@ -498,47 +528,102 @@ export class EdsForm {
|
|
|
498
528
|
return map;
|
|
499
529
|
}
|
|
500
530
|
renderField(field) {
|
|
501
|
-
var _a, _b, _c, _d;
|
|
531
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
502
532
|
if (!this.isFieldVisible(field)) {
|
|
503
533
|
return null;
|
|
504
534
|
}
|
|
535
|
+
// A closed (expired / not-accepting) brand form is read-only: force every
|
|
536
|
+
// field disabled regardless of its own config.
|
|
537
|
+
const fieldDisabled = field.disabled || this.status === 'closed';
|
|
538
|
+
// 0) Presentational "Text Block" — static formatted text, NOT an input.
|
|
539
|
+
// It has no value, is never added to the submission (makeFormData only
|
|
540
|
+
// iterates this.values) and is never validated (see formValidators). The
|
|
541
|
+
// text runs through formatDescription, which escapes HTML first, so author
|
|
542
|
+
// content can never inject markup — only the **bold**/[link]/newline subset.
|
|
543
|
+
if (field.type === 'content') {
|
|
544
|
+
const raw = ((_b = (_a = field.content) !== null && _a !== void 0 ? _a : field.label) !== null && _b !== void 0 ? _b : '');
|
|
545
|
+
return (h("div", { class: "eds-content-block f-body-02 text-default", key: field.name, innerHTML: this.formatDescription(raw) }));
|
|
546
|
+
}
|
|
505
547
|
// 1) Handle rating
|
|
506
548
|
if (field.type === 'rating') {
|
|
507
549
|
// pull the current value (or zero)
|
|
508
550
|
const val = this.values[field.name] || 0;
|
|
509
|
-
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:
|
|
551
|
+
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 }))));
|
|
510
552
|
}
|
|
511
553
|
else if (field.type === 'nps') {
|
|
512
554
|
// pull the current value (or null)
|
|
513
555
|
const val = this.values[field.name] !== undefined ? this.values[field.name] : null;
|
|
514
|
-
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:
|
|
556
|
+
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] }))));
|
|
557
|
+
}
|
|
558
|
+
else if (field.type === 'search-select') {
|
|
559
|
+
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) }));
|
|
515
560
|
}
|
|
516
561
|
else if (field.type === 'kg-web-service') {
|
|
517
|
-
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:
|
|
562
|
+
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) }));
|
|
518
563
|
}
|
|
519
|
-
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: (
|
|
564
|
+
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) }));
|
|
520
565
|
}
|
|
521
566
|
async getData() {
|
|
522
567
|
return this.makeFormData();
|
|
523
568
|
}
|
|
569
|
+
/**
|
|
570
|
+
* Render the form/step description with a small, safe subset of inline
|
|
571
|
+
* formatting so authors can add links and emphasis:
|
|
572
|
+
* **bold** → <strong>
|
|
573
|
+
* [label](url) → <a> (only http/https/mailto; others render as text)
|
|
574
|
+
* blank line / \n → paragraph / line break
|
|
575
|
+
* HTML is escaped FIRST, so author text can never inject markup — only the
|
|
576
|
+
* whitelisted patterns above produce tags.
|
|
577
|
+
*/
|
|
578
|
+
formatDescription(text) {
|
|
579
|
+
return safeInlineFormat(text);
|
|
580
|
+
}
|
|
524
581
|
render() {
|
|
525
582
|
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
526
583
|
//const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
527
584
|
const buckets = this.groupedFields;
|
|
528
585
|
// build the styling classes based on formStyle prop
|
|
529
586
|
let styleClasses = '';
|
|
587
|
+
// No inner padding on the form card — spacing is provided by the surrounding
|
|
588
|
+
// page/container. This keeps fields flush with the card edge (and, when the
|
|
589
|
+
// form is slotted inside another container like a multi-step stepper, in line
|
|
590
|
+
// with it) instead of double-padding.
|
|
530
591
|
if (this.formStyle === 'default') {
|
|
531
|
-
styleClasses = 'bg-inverse border-softer relative rounded-xs border-2
|
|
592
|
+
styleClasses = 'bg-inverse border-softer relative rounded-xs border-2';
|
|
532
593
|
}
|
|
533
594
|
else if (this.formStyle === 'shadow') {
|
|
534
|
-
styleClasses = 'bg-inverse effect-shadow shadow-hover border-softer relative rounded-xs border-2
|
|
595
|
+
styleClasses = 'bg-inverse effect-shadow shadow-hover border-softer relative rounded-xs border-2';
|
|
535
596
|
}
|
|
536
597
|
else if (this.formStyle === 'brand') {
|
|
537
|
-
styleClasses = 'bg-inverse form-brand relative rounded-xs
|
|
598
|
+
styleClasses = 'bg-inverse form-brand relative rounded-xs';
|
|
599
|
+
}
|
|
600
|
+
// ── Brand style: a self-contained card with a dark hero header, a light
|
|
601
|
+
// sectioned body, and a footer. The page that hosts it is expected to be
|
|
602
|
+
// chrome-less (the hero header is the page header). ──
|
|
603
|
+
if (this.formStyle === 'brand') {
|
|
604
|
+
const hasRequired = this.parsedFields.some((f) => f && f.required && f.type !== 'hidden');
|
|
605
|
+
const groupSections = this.parsedGroups
|
|
606
|
+
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
607
|
+
.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))))));
|
|
608
|
+
// Lifecycle: open (brand green) · expiring (amber) · closed (red, read-only).
|
|
609
|
+
const isClosed = this.status === 'closed';
|
|
610
|
+
const isExpiring = this.status === 'expiring';
|
|
611
|
+
const statusSuffix = isClosed ? 'Closed' : isExpiring ? 'Closing soon' : '';
|
|
612
|
+
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;
|
|
613
|
+
const expiresChipClass = isClosed ? 'is-danger' : isExpiring ? 'is-warn' : '';
|
|
614
|
+
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) => {
|
|
615
|
+
this.showClearConfirm = false;
|
|
616
|
+
this.handleClear(e);
|
|
617
|
+
} }, "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() })))))))));
|
|
538
618
|
}
|
|
539
|
-
return (h("form", {
|
|
619
|
+
return (h("form", { class: styleClasses,
|
|
620
|
+
// Inner padding defaults to 2rem (the original p-32 look) but can be
|
|
621
|
+
// overridden per-consumer via a CSS custom property, which inherits through
|
|
622
|
+
// the shadow boundary. A form slotted inside an already-padded container
|
|
623
|
+
// (e.g. a multi-step eds-steps card) sets `--eds-form-padding: 0` to sit flush.
|
|
624
|
+
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
|
|
540
625
|
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
541
|
-
.map((g) => (h("div", { class: "mt-
|
|
626
|
+
.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) }))))));
|
|
542
627
|
}
|
|
543
628
|
static get is() { return "eds-form"; }
|
|
544
629
|
static get encapsulation() { return "shadow"; }
|
|
@@ -608,6 +693,109 @@ export class EdsForm {
|
|
|
608
693
|
"reflect": false,
|
|
609
694
|
"defaultValue": "'Form Description'"
|
|
610
695
|
},
|
|
696
|
+
"eyebrow": {
|
|
697
|
+
"type": "string",
|
|
698
|
+
"mutable": false,
|
|
699
|
+
"complexType": {
|
|
700
|
+
"original": "string",
|
|
701
|
+
"resolved": "string",
|
|
702
|
+
"references": {}
|
|
703
|
+
},
|
|
704
|
+
"required": false,
|
|
705
|
+
"optional": true,
|
|
706
|
+
"docs": {
|
|
707
|
+
"tags": [],
|
|
708
|
+
"text": "Small mono eyebrow shown above the title in the `brand` hero header\n(e.g. a programme or category label). Brand style only."
|
|
709
|
+
},
|
|
710
|
+
"attribute": "eyebrow",
|
|
711
|
+
"reflect": false
|
|
712
|
+
},
|
|
713
|
+
"estimatedTime": {
|
|
714
|
+
"type": "string",
|
|
715
|
+
"mutable": false,
|
|
716
|
+
"complexType": {
|
|
717
|
+
"original": "string",
|
|
718
|
+
"resolved": "string",
|
|
719
|
+
"references": {}
|
|
720
|
+
},
|
|
721
|
+
"required": false,
|
|
722
|
+
"optional": true,
|
|
723
|
+
"docs": {
|
|
724
|
+
"tags": [],
|
|
725
|
+
"text": "Optional \"time to complete\" hint shown as a meta chip in the `brand`\nhero header (e.g. \"~6 minutes\"). Brand style only."
|
|
726
|
+
},
|
|
727
|
+
"attribute": "estimated-time",
|
|
728
|
+
"reflect": false
|
|
729
|
+
},
|
|
730
|
+
"progress": {
|
|
731
|
+
"type": "number",
|
|
732
|
+
"mutable": false,
|
|
733
|
+
"complexType": {
|
|
734
|
+
"original": "number",
|
|
735
|
+
"resolved": "number",
|
|
736
|
+
"references": {}
|
|
737
|
+
},
|
|
738
|
+
"required": false,
|
|
739
|
+
"optional": true,
|
|
740
|
+
"docs": {
|
|
741
|
+
"tags": [],
|
|
742
|
+
"text": "Completion percentage (0\u2013100) shown as a \"X% complete\" chip in the `brand`\nhero \u2014 the single-page equivalent of the multi-step progress. Host-driven\n(e.g. filled required fields); omit/undefined to hide. Brand style only."
|
|
743
|
+
},
|
|
744
|
+
"attribute": "progress",
|
|
745
|
+
"reflect": false
|
|
746
|
+
},
|
|
747
|
+
"expires": {
|
|
748
|
+
"type": "string",
|
|
749
|
+
"mutable": false,
|
|
750
|
+
"complexType": {
|
|
751
|
+
"original": "string",
|
|
752
|
+
"resolved": "string",
|
|
753
|
+
"references": {}
|
|
754
|
+
},
|
|
755
|
+
"required": false,
|
|
756
|
+
"optional": true,
|
|
757
|
+
"docs": {
|
|
758
|
+
"tags": [],
|
|
759
|
+
"text": "Optional expiry label shown as a meta chip in the `brand` hero\n(e.g. \"Closes Jun 28, 2026\"). Brand style only."
|
|
760
|
+
},
|
|
761
|
+
"attribute": "expires",
|
|
762
|
+
"reflect": false
|
|
763
|
+
},
|
|
764
|
+
"policy": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"mutable": false,
|
|
767
|
+
"complexType": {
|
|
768
|
+
"original": "string",
|
|
769
|
+
"resolved": "string",
|
|
770
|
+
"references": {}
|
|
771
|
+
},
|
|
772
|
+
"required": false,
|
|
773
|
+
"optional": true,
|
|
774
|
+
"docs": {
|
|
775
|
+
"tags": [],
|
|
776
|
+
"text": "Optional submission-policy label shown as a meta chip in the `brand`\nhero (e.g. \"You can submit this form only once.\"). Brand style only."
|
|
777
|
+
},
|
|
778
|
+
"attribute": "policy",
|
|
779
|
+
"reflect": false
|
|
780
|
+
},
|
|
781
|
+
"gdpr": {
|
|
782
|
+
"type": "boolean",
|
|
783
|
+
"mutable": false,
|
|
784
|
+
"complexType": {
|
|
785
|
+
"original": "boolean",
|
|
786
|
+
"resolved": "boolean",
|
|
787
|
+
"references": {}
|
|
788
|
+
},
|
|
789
|
+
"required": false,
|
|
790
|
+
"optional": true,
|
|
791
|
+
"docs": {
|
|
792
|
+
"tags": [],
|
|
793
|
+
"text": "Show the \"GDPR compliant\" meta chip in the `brand` hero header. Default OFF\n\u2014 it's an unverified compliance claim, so it must be opted into explicitly\n(per form) rather than advertised on every brand form."
|
|
794
|
+
},
|
|
795
|
+
"attribute": "gdpr",
|
|
796
|
+
"reflect": false,
|
|
797
|
+
"defaultValue": "false"
|
|
798
|
+
},
|
|
611
799
|
"setFormUrl": {
|
|
612
800
|
"type": "boolean",
|
|
613
801
|
"mutable": false,
|
|
@@ -803,12 +991,66 @@ export class EdsForm {
|
|
|
803
991
|
"attribute": "form-style",
|
|
804
992
|
"reflect": false,
|
|
805
993
|
"defaultValue": "'default'"
|
|
994
|
+
},
|
|
995
|
+
"status": {
|
|
996
|
+
"type": "string",
|
|
997
|
+
"mutable": false,
|
|
998
|
+
"complexType": {
|
|
999
|
+
"original": "'open' | 'expiring' | 'closed'",
|
|
1000
|
+
"resolved": "\"closed\" | \"expiring\" | \"open\"",
|
|
1001
|
+
"references": {}
|
|
1002
|
+
},
|
|
1003
|
+
"required": false,
|
|
1004
|
+
"optional": false,
|
|
1005
|
+
"docs": {
|
|
1006
|
+
"tags": [],
|
|
1007
|
+
"text": "Lifecycle state for the brand style (drives the hero eyebrow, glow tint and\nexpiry meta-chip colour). \"closed\" additionally disables every field,\ndesaturates the body and replaces the submit with a dead \"Submissions\nclosed\" footer. No effect outside form-style=\"brand\".\n- \"open\": accepting submissions (default)\n- \"expiring\": accepting but closing soon (amber)\n- \"closed\": expired / not accepting (red, read-only)"
|
|
1008
|
+
},
|
|
1009
|
+
"attribute": "status",
|
|
1010
|
+
"reflect": false,
|
|
1011
|
+
"defaultValue": "'open'"
|
|
1012
|
+
},
|
|
1013
|
+
"saveStatus": {
|
|
1014
|
+
"type": "string",
|
|
1015
|
+
"mutable": false,
|
|
1016
|
+
"complexType": {
|
|
1017
|
+
"original": "'idle' | 'saving' | 'saved' | 'error'",
|
|
1018
|
+
"resolved": "\"error\" | \"idle\" | \"saved\" | \"saving\"",
|
|
1019
|
+
"references": {}
|
|
1020
|
+
},
|
|
1021
|
+
"required": false,
|
|
1022
|
+
"optional": false,
|
|
1023
|
+
"docs": {
|
|
1024
|
+
"tags": [],
|
|
1025
|
+
"text": "Autosave state shown at the left of the brand footer (host-driven). The dot\npulses grey while saving and settles green when saved."
|
|
1026
|
+
},
|
|
1027
|
+
"attribute": "save-status",
|
|
1028
|
+
"reflect": false,
|
|
1029
|
+
"defaultValue": "'idle'"
|
|
1030
|
+
},
|
|
1031
|
+
"saveLabel": {
|
|
1032
|
+
"type": "string",
|
|
1033
|
+
"mutable": false,
|
|
1034
|
+
"complexType": {
|
|
1035
|
+
"original": "string",
|
|
1036
|
+
"resolved": "string",
|
|
1037
|
+
"references": {}
|
|
1038
|
+
},
|
|
1039
|
+
"required": false,
|
|
1040
|
+
"optional": true,
|
|
1041
|
+
"docs": {
|
|
1042
|
+
"tags": [],
|
|
1043
|
+
"text": "Autosave label next to the dot (e.g. \"Saved 5:01 PM\"). Empty hides the\nwhole save-state cluster. Brand footer only."
|
|
1044
|
+
},
|
|
1045
|
+
"attribute": "save-label",
|
|
1046
|
+
"reflect": false
|
|
806
1047
|
}
|
|
807
1048
|
};
|
|
808
1049
|
}
|
|
809
1050
|
static get states() {
|
|
810
1051
|
return {
|
|
811
1052
|
"values": {},
|
|
1053
|
+
"showClearConfirm": {},
|
|
812
1054
|
"isSubmitting": {},
|
|
813
1055
|
"hasError": {},
|
|
814
1056
|
"errors": {},
|
|
@@ -828,8 +1070,8 @@ export class EdsForm {
|
|
|
828
1070
|
"text": ""
|
|
829
1071
|
},
|
|
830
1072
|
"complexType": {
|
|
831
|
-
"original": "{\n event: 'input' | 'change' | 'submit';\n validated?: boolean;\n field?: string;\n value?: any;\n message?: string;\n success?: boolean;\n }",
|
|
832
|
-
"resolved": "{ event: \"input\" | \"change\" | \"submit\"; validated?: boolean; field?: string; value?: any; message?: string; success?: boolean; }",
|
|
1073
|
+
"original": "{\n event: 'input' | 'change' | 'submit';\n validated?: boolean;\n field?: string;\n value?: any;\n message?: string;\n success?: boolean;\n /** True when this change came from the Clear button (host may skip autosave). */\n cleared?: boolean;\n }",
|
|
1074
|
+
"resolved": "{ event: \"input\" | \"change\" | \"submit\"; validated?: boolean; field?: string; value?: any; message?: string; success?: boolean; cleared?: boolean; }",
|
|
833
1075
|
"references": {}
|
|
834
1076
|
}
|
|
835
1077
|
}];
|
|
@@ -3,8 +3,9 @@ export default {
|
|
|
3
3
|
title: 'Components/Form',
|
|
4
4
|
component: 'eds-form',
|
|
5
5
|
argTypes: {
|
|
6
|
-
title: { control: 'text', description: 'Form title displayed above the form' },
|
|
6
|
+
title: { control: 'text', description: 'Form title displayed above the form (brand: in the dark hero)' },
|
|
7
7
|
description: { control: 'text', description: 'Form description displayed below the title' },
|
|
8
|
+
eyebrow: { control: 'text', description: 'Brand hero only: small uppercase kicker above the title (e.g. "Internal form")' },
|
|
8
9
|
fields: {
|
|
9
10
|
control: 'object',
|
|
10
11
|
description: 'Form fields as JSON array'
|
|
@@ -28,10 +29,29 @@ export default {
|
|
|
28
29
|
options: ['primary', 'secondary'],
|
|
29
30
|
description: 'Variant/style intent for the submit button'
|
|
30
31
|
},
|
|
32
|
+
clearBtn: { control: 'boolean', description: 'Show the Clear action (brand: quiet footer text-link with inline confirm)' },
|
|
33
|
+
clearBtnLabel: { control: 'text', description: 'Label for the Clear action' },
|
|
31
34
|
formStyle: {
|
|
32
35
|
control: 'select',
|
|
33
|
-
options: ['default', 'shadow']
|
|
34
|
-
|
|
36
|
+
options: ['default', 'shadow', 'brand'],
|
|
37
|
+
description: 'Visual style: default (bordered), shadow (elevated) or brand (dark hero + sectioned body + footer)'
|
|
38
|
+
},
|
|
39
|
+
status: {
|
|
40
|
+
control: 'select',
|
|
41
|
+
options: ['open', 'expiring', 'closed'],
|
|
42
|
+
description: 'Brand lifecycle: open (green), expiring (amber glow/eyebrow, warn expiry chip), closed (red, read-only body, locked footer)'
|
|
43
|
+
},
|
|
44
|
+
expires: { control: 'text', description: 'Hero meta chip: expiry label (e.g. "Closes Jul 18, 2026"). Tone follows `status`.' },
|
|
45
|
+
policy: { control: 'text', description: 'Hero meta chip: submission policy (e.g. "One submission per person")' },
|
|
46
|
+
estimatedTime: { control: 'text', description: 'Time-to-complete chip (e.g. "~5 min"). Brand: hero meta strip; default/shadow: above the title.' },
|
|
47
|
+
progress: { control: 'number', description: 'Hero meta chip: completion percentage ("N% complete"). Omit to hide.' },
|
|
48
|
+
gdpr: { control: 'boolean', description: 'Hero meta chip: "GDPR compliant" badge (default false)' },
|
|
49
|
+
saveStatus: {
|
|
50
|
+
control: 'select',
|
|
51
|
+
options: ['idle', 'saving', 'saved', 'error'],
|
|
52
|
+
description: 'Brand footer autosave state (dot + label). idle hides it.'
|
|
53
|
+
},
|
|
54
|
+
saveLabel: { control: 'text', description: 'Autosave label next to the state dot (e.g. "Saved 12:04")' }
|
|
35
55
|
}
|
|
36
56
|
};
|
|
37
57
|
const Template = (args) => html `
|
|
@@ -39,13 +59,24 @@ const Template = (args) => html `
|
|
|
39
59
|
name="form-name"
|
|
40
60
|
title="${args.title}"
|
|
41
61
|
description="${args.description}"
|
|
62
|
+
eyebrow="${args.eyebrow || ''}"
|
|
42
63
|
.fields=${args.fields}
|
|
43
64
|
.groups=${args.groups}
|
|
44
65
|
.initData=${args.initData}
|
|
45
66
|
form-btn="${args.formBtn}"
|
|
46
67
|
form-btn-label="${args.formBtnLabel}"
|
|
47
68
|
button-intent="${args.buttonIntent}"
|
|
69
|
+
clear-btn="${args.clearBtn || false}"
|
|
70
|
+
clear-btn-label="${args.clearBtnLabel || 'Clear'}"
|
|
48
71
|
form-style="${args.formStyle}"
|
|
72
|
+
status="${args.status || 'open'}"
|
|
73
|
+
expires="${args.expires || ''}"
|
|
74
|
+
policy="${args.policy || ''}"
|
|
75
|
+
estimated-time="${args.estimatedTime || ''}"
|
|
76
|
+
.progress=${args.progress}
|
|
77
|
+
gdpr="${args.gdpr || false}"
|
|
78
|
+
save-status="${args.saveStatus || 'idle'}"
|
|
79
|
+
save-label="${args.saveLabel || ''}"
|
|
49
80
|
></eds-form>
|
|
50
81
|
`;
|
|
51
82
|
export const Default = Template.bind({});
|
|
@@ -146,3 +177,79 @@ WithInitData.args = {
|
|
|
146
177
|
buttonIntent: 'primary',
|
|
147
178
|
formStyle: 'default'
|
|
148
179
|
};
|
|
180
|
+
/* Shared field set for the brand stories — a small registration form with
|
|
181
|
+
required fields (feeds the footer's "* Required fields" note) and a group
|
|
182
|
+
(renders as a brand section with glyph + label). */
|
|
183
|
+
const brandFields = [
|
|
184
|
+
{ name: 'fullName', label: 'Full name', type: 'text', required: true, placeholder: 'Jane Doe', groupId: 'about' },
|
|
185
|
+
{ name: 'email', label: 'Email address', type: 'email', required: true, placeholder: 'jane@example.org', groupId: 'about' },
|
|
186
|
+
{
|
|
187
|
+
name: 'attendance',
|
|
188
|
+
label: 'How would you like to attend?',
|
|
189
|
+
type: 'radio',
|
|
190
|
+
required: true,
|
|
191
|
+
options: [
|
|
192
|
+
{ value: 'remote', label: 'Join remotely online' },
|
|
193
|
+
{ value: 'in-person', label: 'Join in person' }
|
|
194
|
+
]
|
|
195
|
+
},
|
|
196
|
+
{ name: 'comments', label: 'Anything we should know?', type: 'textarea', required: false, maxlength: 300 }
|
|
197
|
+
];
|
|
198
|
+
const brandGroups = [{ id: 'about', title: 'About you' }];
|
|
199
|
+
/**
|
|
200
|
+
* The full brand experience: dark hero (eyebrow · title · description) with the
|
|
201
|
+
* meta strip — progress, expiry, policy, estimated time, GDPR badge — a light
|
|
202
|
+
* sectioned body, and the footer with autosave state, required-fields note,
|
|
203
|
+
* Clear text-link (inline confirm) and the pill submit.
|
|
204
|
+
*/
|
|
205
|
+
export const Brand = Template.bind({});
|
|
206
|
+
Brand.args = {
|
|
207
|
+
title: 'Attendee Confirmation Survey',
|
|
208
|
+
description: 'Reusable form template to confirm attendance and capture key logistics (contact details, dietary/access needs, session choices).',
|
|
209
|
+
eyebrow: 'Internal form',
|
|
210
|
+
fields: brandFields,
|
|
211
|
+
groups: brandGroups,
|
|
212
|
+
formBtn: true,
|
|
213
|
+
formBtnLabel: 'Submit',
|
|
214
|
+
clearBtn: true,
|
|
215
|
+
clearBtnLabel: 'Clear form',
|
|
216
|
+
formStyle: 'brand',
|
|
217
|
+
status: 'open',
|
|
218
|
+
expires: 'Closes Jul 18, 2026',
|
|
219
|
+
policy: 'One submission per person',
|
|
220
|
+
estimatedTime: '~5 min',
|
|
221
|
+
progress: 25,
|
|
222
|
+
gdpr: true,
|
|
223
|
+
saveStatus: 'saved',
|
|
224
|
+
saveLabel: 'Saved 12:04'
|
|
225
|
+
};
|
|
226
|
+
/** Expiring lifecycle: amber glow, "· Closing soon" eyebrow suffix, warn-toned expiry chip. */
|
|
227
|
+
export const BrandExpiring = Template.bind({});
|
|
228
|
+
BrandExpiring.args = Object.assign(Object.assign({}, Brand.args), { status: 'expiring', expires: 'Closes in 3 days · Jul 18', progress: undefined, saveStatus: 'idle', saveLabel: '' });
|
|
229
|
+
/** Closed lifecycle: red glow, "· Closed" eyebrow, danger expiry chip, read-only
|
|
230
|
+
* body and the locked footer ("Submissions closed" + disabled submit). */
|
|
231
|
+
export const BrandClosed = Template.bind({});
|
|
232
|
+
BrandClosed.args = Object.assign(Object.assign({}, Brand.args), { status: 'closed', expires: 'Closed Jul 18, 2026', progress: undefined, saveStatus: 'idle', saveLabel: '', gdpr: false });
|
|
233
|
+
/** Autosave footer states — flip `saveStatus` (saving/saved/error) in the controls. */
|
|
234
|
+
export const BrandAutosave = Template.bind({});
|
|
235
|
+
BrandAutosave.args = Object.assign(Object.assign({}, Brand.args), { progress: undefined, gdpr: false, saveStatus: 'saving', saveLabel: 'Saving…' });
|
|
236
|
+
/** Non-brand styles show `estimatedTime` too — as a quiet mono chip above the title. */
|
|
237
|
+
export const EstimatedTimeChip = Template.bind({});
|
|
238
|
+
EstimatedTimeChip.args = {
|
|
239
|
+
title: 'Quick Survey',
|
|
240
|
+
description: 'Three questions, in and out.',
|
|
241
|
+
fields: [
|
|
242
|
+
{ name: 'q1', label: 'How satisfied are you?', type: 'radio', required: true, options: [
|
|
243
|
+
{ value: 'happy', label: 'Satisfied' },
|
|
244
|
+
{ value: 'neutral', label: 'Neutral' },
|
|
245
|
+
{ value: 'unhappy', label: 'Unsatisfied' }
|
|
246
|
+
] },
|
|
247
|
+
{ name: 'q2', label: 'What should we improve?', type: 'textarea', required: false }
|
|
248
|
+
],
|
|
249
|
+
groups: [],
|
|
250
|
+
formBtn: true,
|
|
251
|
+
formBtnLabel: 'Send',
|
|
252
|
+
buttonIntent: 'primary',
|
|
253
|
+
formStyle: 'shadow',
|
|
254
|
+
estimatedTime: '~2 min'
|
|
255
|
+
};
|
|
@@ -84,7 +84,7 @@ export class EdsFrame {
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h("div", { key: '
|
|
87
|
+
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 })))));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "eds-frame"; }
|
|
90
90
|
static get encapsulation() { return "shadow"; }
|
|
@@ -54,7 +54,7 @@ export class EdsHeader {
|
|
|
54
54
|
const logoType = this.variant === 'strong' ? 'negative' : 'positive';
|
|
55
55
|
// Link intent based on header variant
|
|
56
56
|
const linkIntent = this.variant === 'strong' ? 'underlineInverse' : 'underline';
|
|
57
|
-
return (h("header", { key: '
|
|
57
|
+
return (h("header", { key: '7b2039f33349e19ff3f6e8519e36c73008f636ff', role: "banner", class: `flex items-center justify-between relative z-10 ${classes}` }, h("div", { key: '300470c050a9f50a08cc0d964b718327ecec598f', class: "w-[250px]" }, h("div", { key: '4ff98957c7f838561b2a86b6fcf5a40a1f631d94', class: "p-[24px]" }, h("eds-logo", { key: '610e8465379fbdc9cab1d315aa11940763ba4561', variant: logoType, href: this.url }))), this.parsedLinks && (h("nav", { key: '97e14d79eea2d69fb37785984d29167e3056c2ec', role: "navigation", "aria-label": "Primary", class: "flex-1 flex justify-center items-center hidden md:flex" }, h("ul", { key: '79a7dd5f647319b339078ad426160ebc21af733d', class: "flex gap-x-16" }, this.parsedLinks.map((link) => (h("eds-link", { label: link.label, "aria-label": link.label, url: link.url, intent: linkIntent, size: "large", icon: link.icon, external: link.external })))))), h("div", { key: '1da0a64c28395f3601e6e954f5ed9017525d4c2e', class: "w-[250px] flex justify-end items-center" }, h("slot", { key: 'bae6c23ce8400bc5ff21c4aec71e915bde7b15f2', name: "actions" })), this.menu && (h("div", { key: '9ab2466ce42dcf2136565a14522f734565bd2fbf', class: "md:hidden flex overflow-hidden px-16" }, h("eds-button", { key: 'bd2e20f436a96bd28eea126e655f0c9c9976d32e', "aria-label": "Menu", intent: this.variant === 'strong' ? 'ghostInverse' : 'ghost', icon: "menu", size: "small", onClick: () => this.handleToggleMenu() })))));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "eds-header"; }
|
|
60
60
|
static get encapsulation() { return "shadow"; }
|