@ebrains/components 3.1.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_53.cjs.entry.js +367 -248
- 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-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-gitlab-contributors.cjs.entry.js +26 -30
- 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 +1 -1
- 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 +14 -11
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- 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/components/eds-accordion/eds-accordion.js +2 -5
- 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-button/eds-button.js +6 -10
- 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-title/eds-card-title.js +1 -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-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-footer/eds-footer.js +23 -18
- package/dist/collection/components/eds-footer/eds-footer.stories.js +3 -4
- package/dist/collection/components/eds-form/eds-form.css +456 -0
- package/dist/collection/components/eds-form/eds-form.js +218 -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-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-input-dropzone/eds-input-dropzone.js +7 -4
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.css +10 -0
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.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-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 +7 -2
- package/dist/collection/components/eds-input-field/eds-input-field.stories.js +35 -7
- 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-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 +3 -1
- package/dist/collection/components/eds-nps/eds-nps.js +2 -2
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -8
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-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.js +1 -3
- package/dist/collection/components/eds-table/eds-table.stories.js +2 -6
- package/dist/collection/components/eds-tabs/eds-tabs.js +4 -11
- 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.js +26 -30
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.js +18 -12
- package/dist/collection/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.js +15 -19
- 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.stories.js +1 -1
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.css +11 -1
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.js +37 -16
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.stories.js +10 -5
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.js +14 -11
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.stories.js +4 -1
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/collection/utils/eds-form/safeFormat.js +1 -5
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +9 -7
- 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 +2 -5
- package/dist/components/eds-alert2.js +3 -2
- package/dist/components/eds-app-root.js +1 -1
- package/dist/components/eds-button2.js +5 -9
- package/dist/components/eds-card-app.js +2 -5
- package/dist/components/eds-card-cta.js +2 -5
- 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-footer2.js +23 -18
- package/dist/components/eds-form.js +101 -38
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gitlab-contributors.js +26 -30
- package/dist/components/eds-global-search.js +18 -12
- 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-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 +8 -3
- package/dist/components/eds-input-file2.js +5 -3
- package/dist/components/eds-input-footer2.js +3 -7
- 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 +1 -1
- package/dist/components/eds-input-select2.js +6 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-kg-learning-resources.js +15 -19
- package/dist/components/eds-kg-web-services-select2.js +2 -2
- package/dist/components/eds-link2.js +3 -7
- package/dist/components/eds-logo2.js +4 -22
- package/dist/components/eds-modal.js +18 -9
- package/dist/components/eds-nps2.js +2 -2
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-pie.js +2 -2
- package/dist/components/eds-progress-bar.js +1 -8
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-search-select2.js +38 -17
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.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 +1 -3
- package/dist/components/eds-tabs.js +4 -11
- 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.js +14 -11
- package/dist/components/eds-user.js +1 -4
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +58 -1
- 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-d59d6fda.entry.js → p-05e96609.entry.js} +1 -1
- package/dist/components/p-0d778d10.entry.js +1 -0
- package/dist/components/{p-62f53e7a.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-39dbb964.entry.js +1 -0
- package/dist/components/{p-25729ade.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-e9e6ec19.entry.js → p-4b8a7979.entry.js} +1 -1
- package/dist/components/{p-bdcb71e1.entry.js → p-6b94b2ec.entry.js} +1 -1
- package/dist/components/p-6d965fef.entry.js +1 -0
- package/dist/components/{p-62580004.entry.js → p-6e370182.entry.js} +1 -1
- package/dist/components/p-6ffe581c.entry.js +1 -0
- package/dist/components/{p-e027bc90.entry.js → p-726637b1.entry.js} +1 -1
- package/dist/components/{p-8a483358.entry.js → p-86ccc09f.entry.js} +1 -1
- package/dist/components/{p-e71a4f29.entry.js → p-8755a21b.entry.js} +1 -1
- package/dist/components/{p-e4df206e.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-42791331.entry.js → p-8e034c4e.entry.js} +1 -1
- package/dist/components/p-9f649fa3.entry.js +1 -0
- package/dist/components/{p-f9a9fa34.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-1fbcc480.entry.js → p-b1519098.entry.js} +1 -1
- package/dist/components/{p-12acc48d.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-e339d0b5.entry.js → p-f66a7cf9.entry.js} +1 -1
- package/dist/components/{p-80a32e20.entry.js → p-f97f62f2.entry.js} +1 -1
- 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 +1 -1
- 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_53.entry.js +367 -248
- package/dist/esm/eds-app-root.entry.js +1 -1
- package/dist/esm/eds-cookies-preference.entry.js +1 -1
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-gitlab-contributors.entry.js +26 -30
- 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/esm/eds-input-search.entry.js +1 -1
- 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 +14 -11
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- 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 +572 -368
- package/dist/hydrate/index.mjs +572 -368
- package/dist/types/components/eds-form/eds-form.d.ts +56 -0
- package/dist/types/components/eds-form/eds-form.stories.d.ts +63 -0
- 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-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 +210 -60
- package/package.json +1 -1
- package/dist/components/p-00ba405d.entry.js +0 -1
- package/dist/components/p-03342030.entry.js +0 -1
- package/dist/components/p-0e2bac0f.entry.js +0 -1
- package/dist/components/p-18399fe1.entry.js +0 -1
- package/dist/components/p-1e6f0572.entry.js +0 -1
- package/dist/components/p-27e093c3.entry.js +0 -1
- package/dist/components/p-3d1bb2fe.entry.js +0 -1
- package/dist/components/p-5ff4b1d0.entry.js +0 -1
- package/dist/components/p-6be1730a.entry.js +0 -1
- package/dist/components/p-786ff09b.entry.js +0 -1
- package/dist/components/p-85476a6f.entry.js +0 -9
- package/dist/components/p-c2127276.entry.js +0 -1
- package/dist/components/p-c3ee9163.entry.js +0 -1
- package/dist/components/p-c4cfbf98.entry.js +0 -1
- package/dist/components/p-c65082fe.entry.js +0 -1
- package/dist/components/p-cc096938.entry.js +0 -1
- package/dist/components/p-f4d2f882.entry.js +0 -1
|
@@ -2,6 +2,9 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { parseData } from "../../utils/sharedUtils";
|
|
3
3
|
export class EdsSteps {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.onResize = () => {
|
|
6
|
+
this.isMobile = typeof window !== 'undefined' && window.innerWidth < 750;
|
|
7
|
+
};
|
|
5
8
|
this.handleTitleClick = (index) => {
|
|
6
9
|
// In linear mode, do NOT collapse; only navigate if allowed.
|
|
7
10
|
if (this.type === 'linear') {
|
|
@@ -29,11 +32,11 @@ export class EdsSteps {
|
|
|
29
32
|
};
|
|
30
33
|
this.handleNext = () => {
|
|
31
34
|
const lastIndex = this.parsedSteps.length - 1;
|
|
32
|
-
// On last step
|
|
35
|
+
// On last step: stay put and just emit finished. Collapsing (activeStep = -1)
|
|
36
|
+
// left the form as an empty shell when the host rejected the submit (e.g.
|
|
37
|
+
// single-submission already used); the success path navigates away.
|
|
33
38
|
if (this.activeStep >= lastIndex) {
|
|
34
39
|
this.finished.emit();
|
|
35
|
-
this.activeStep = -1; // collapse the content
|
|
36
|
-
this.step.emit(this.activeStep); // notify change (-1 sentinel)
|
|
37
40
|
return;
|
|
38
41
|
}
|
|
39
42
|
const target = this.activeStep + 1;
|
|
@@ -77,6 +80,7 @@ export class EdsSteps {
|
|
|
77
80
|
this.headingLevel = 'h4';
|
|
78
81
|
this.collapsibleTitles = false;
|
|
79
82
|
this.activeStep = 0;
|
|
83
|
+
this.isMobile = false;
|
|
80
84
|
}
|
|
81
85
|
handleDisableNextChange(newValue) {
|
|
82
86
|
if (typeof newValue === 'string' && newValue.trim().startsWith('[')) {
|
|
@@ -88,8 +92,23 @@ export class EdsSteps {
|
|
|
88
92
|
}
|
|
89
93
|
}
|
|
90
94
|
}
|
|
95
|
+
/** Nav button size: comfortable on desktop, compact on mobile. */
|
|
96
|
+
get navBtnSize() {
|
|
97
|
+
return this.isMobile ? 'small' : 'large';
|
|
98
|
+
}
|
|
91
99
|
componentWillLoad() {
|
|
92
100
|
this.handleDisableNextChange(this.disableNext);
|
|
101
|
+
this.onResize();
|
|
102
|
+
}
|
|
103
|
+
connectedCallback() {
|
|
104
|
+
if (typeof window !== 'undefined') {
|
|
105
|
+
window.addEventListener('resize', this.onResize);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
disconnectedCallback() {
|
|
109
|
+
if (typeof window !== 'undefined') {
|
|
110
|
+
window.removeEventListener('resize', this.onResize);
|
|
111
|
+
}
|
|
93
112
|
}
|
|
94
113
|
componentDidLoad() {
|
|
95
114
|
if (this.type === 'linear') {
|
|
@@ -189,7 +208,7 @@ export class EdsSteps {
|
|
|
189
208
|
this.handleTitleClick(index);
|
|
190
209
|
}
|
|
191
210
|
};
|
|
192
|
-
return (h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, h("div", { class: "step-indicator" }, h("span", { class: "step-number" }, index + 1)), h("span", { class: `
|
|
211
|
+
return (h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, h("div", { class: "step-indicator" }, h("span", { class: "step-number" }, index + 1)), h("span", { class: `step-label ${forwardBlocked ? 'opacity-50' : ''}` }, step.title)));
|
|
193
212
|
}
|
|
194
213
|
render() {
|
|
195
214
|
const steps = this.parsedSteps;
|
|
@@ -202,7 +221,7 @@ export class EdsSteps {
|
|
|
202
221
|
return null;
|
|
203
222
|
}
|
|
204
223
|
const marginClass = this.orientation === 'horizontal' ? 'mt-64' : 'mt-32';
|
|
205
|
-
return (h("div", { class: "step-content", key: index, id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "
|
|
224
|
+
return (h("div", { class: "step-content", key: index, id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "chevron-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size: this.navBtnSize, iconSmall: this.isMobile }), (!isLast || this.showFinish) && (h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: isLast ? 'brand' : 'primary', icon: "chevron-right", onClick: this.handleNext, disabled: this.isNextDisabledFor(index), size: this.navBtnSize, iconSmall: this.isMobile, class: index > 0 ? 'ml-8' : null }))), h("slot", { name: `actions-${index}` })));
|
|
206
225
|
})));
|
|
207
226
|
}
|
|
208
227
|
// Vertical Linear
|
|
@@ -210,7 +229,7 @@ export class EdsSteps {
|
|
|
210
229
|
return (h("div", { class: `steps ${themeClass}` }, steps.map((step, index) => {
|
|
211
230
|
const isLast = index === steps.length - 1;
|
|
212
231
|
const marginClass = this.orientation === 'horizontal' ? 'mt-64' : 'mt-32';
|
|
213
|
-
return (h("div", { class: "step mb-16", key: index }, this.renderHeading(step.title, index), this.activeStep === index && (h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "
|
|
232
|
+
return (h("div", { class: "step mb-16", key: index }, this.renderHeading(step.title, index), this.activeStep === index && (h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "chevron-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size: this.navBtnSize, iconSmall: this.isMobile }), (!isLast || this.showFinish) && (h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: isLast ? 'brand' : 'primary', icon: "chevron-right", onClick: this.handleNext, disabled: this.isNextDisabledFor(index), size: this.navBtnSize, iconSmall: this.isMobile, class: index > 0 ? 'ml-8' : null }))), h("slot", { name: `actions-${index}` })))));
|
|
214
233
|
})));
|
|
215
234
|
}
|
|
216
235
|
// Static
|
|
@@ -441,7 +460,8 @@ export class EdsSteps {
|
|
|
441
460
|
}
|
|
442
461
|
static get states() {
|
|
443
462
|
return {
|
|
444
|
-
"activeStep": {}
|
|
463
|
+
"activeStep": {},
|
|
464
|
+
"isMobile": {}
|
|
445
465
|
};
|
|
446
466
|
}
|
|
447
467
|
static get events() {
|
|
@@ -36,6 +36,8 @@ pre {
|
|
|
36
36
|
content: counter(step);
|
|
37
37
|
position: absolute;
|
|
38
38
|
left: -41px;
|
|
39
|
+
top: 50%;
|
|
40
|
+
transform: translateY(-50%);
|
|
39
41
|
display: flex;
|
|
40
42
|
align-items: center;
|
|
41
43
|
justify-content: center;
|
|
@@ -61,12 +63,34 @@ pre {
|
|
|
61
63
|
position: relative;
|
|
62
64
|
}
|
|
63
65
|
|
|
66
|
+
/* Step content wrapper. A little more top breathing room on small screens
|
|
67
|
+
(where the stepper sits directly above the fields), tighter on desktop. */
|
|
68
|
+
.steps-body {
|
|
69
|
+
margin-top: 16px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* On small screens the vertical step titles read large next to the field
|
|
73
|
+
labels — drop them to a compact UI size. */
|
|
74
|
+
@media (max-width: 749px) {
|
|
75
|
+
.steps h3,
|
|
76
|
+
.steps h4,
|
|
77
|
+
.steps h5 {
|
|
78
|
+
font-size: var(--f-ui-01-fontSize);
|
|
79
|
+
line-height: var(--f-ui-01-lineHeight);
|
|
80
|
+
}
|
|
81
|
+
.steps-body {
|
|
82
|
+
margin-top: 32px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
64
86
|
.steps h4::before,
|
|
65
87
|
.steps h5::before {
|
|
66
88
|
content: counter(step);
|
|
67
89
|
position: absolute;
|
|
68
90
|
left: -40px;
|
|
69
|
-
|
|
91
|
+
/* Vertically centre the circle on the title line, regardless of font size. */
|
|
92
|
+
top: 50%;
|
|
93
|
+
transform: translateY(-50%);
|
|
70
94
|
display: flex;
|
|
71
95
|
align-items: center;
|
|
72
96
|
justify-content: center;
|
|
@@ -193,6 +217,14 @@ pre {
|
|
|
193
217
|
margin-top: 4rem;
|
|
194
218
|
}
|
|
195
219
|
|
|
220
|
+
.mb-16 {
|
|
221
|
+
margin-bottom: 1rem;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.mb-32 {
|
|
225
|
+
margin-bottom: 2rem;
|
|
226
|
+
}
|
|
227
|
+
|
|
196
228
|
.my-16 {
|
|
197
229
|
margin-top: 1rem;
|
|
198
230
|
margin-bottom: 1rem;
|
|
@@ -377,9 +409,12 @@ pre {
|
|
|
377
409
|
|
|
378
410
|
.horizontal-indicators {
|
|
379
411
|
display: flex;
|
|
380
|
-
|
|
381
|
-
gap:
|
|
382
|
-
padding:
|
|
412
|
+
align-items: flex-start;
|
|
413
|
+
gap: 0;
|
|
414
|
+
padding: 0;
|
|
415
|
+
/* Breathing room above (from the header); fields sit right below the steps. */
|
|
416
|
+
margin-top: 1.75rem;
|
|
417
|
+
margin-bottom: 0;
|
|
383
418
|
}
|
|
384
419
|
|
|
385
420
|
/* Helper class for aligning content with first step indicator */
|
|
@@ -388,34 +423,55 @@ pre {
|
|
|
388
423
|
padding-right: 0;
|
|
389
424
|
}
|
|
390
425
|
|
|
426
|
+
/* Left-aligned layout: every step left-aligns its circle so the FIRST circle
|
|
427
|
+
hugs the indicators' left edge — the same left edge as the form content below
|
|
428
|
+
it (see .step-content) — instead of being centred inside a flex cell. */
|
|
391
429
|
.horizontal-step {
|
|
392
430
|
display: flex;
|
|
393
431
|
flex-direction: column;
|
|
394
|
-
align-items:
|
|
395
|
-
gap: 0.
|
|
432
|
+
align-items: flex-start;
|
|
433
|
+
gap: 0.6rem;
|
|
396
434
|
cursor: pointer;
|
|
397
|
-
flex: 1;
|
|
435
|
+
flex: 1 1 0;
|
|
436
|
+
min-width: 0;
|
|
398
437
|
position: relative;
|
|
399
438
|
}
|
|
400
439
|
|
|
440
|
+
/* The last step only needs room for its own circle + label; without this it
|
|
441
|
+
would reserve a full flex cell and leave a large empty gap after the final
|
|
442
|
+
circle. */
|
|
443
|
+
.horizontal-step:last-child {
|
|
444
|
+
flex: 0 0 auto;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/* Left-aligned circles → the connector runs from just after this circle to the
|
|
448
|
+
next circle's left edge (one cell-width away). */
|
|
401
449
|
.horizontal-step:not(:last-child)::after {
|
|
402
450
|
content: '';
|
|
403
451
|
position: absolute;
|
|
404
|
-
top: 1.
|
|
405
|
-
left: calc(
|
|
406
|
-
width: calc(100% -
|
|
407
|
-
height:
|
|
452
|
+
top: 1.375rem; /* vertical centre of the 2.75rem circle */
|
|
453
|
+
left: calc(2.75rem + 0.4rem); /* just past this circle */
|
|
454
|
+
width: calc(100% - 2.75rem - 0.8rem); /* up to the next circle */
|
|
455
|
+
height: 3px;
|
|
456
|
+
border-radius: 2px;
|
|
408
457
|
background-color: #e0e0e0;
|
|
458
|
+
transform: translateY(-50%);
|
|
409
459
|
z-index: 1;
|
|
410
460
|
}
|
|
411
461
|
|
|
462
|
+
/* Titles sit left-aligned under their (left-aligned) circle. */
|
|
463
|
+
.horizontal-step > span {
|
|
464
|
+
text-align: left;
|
|
465
|
+
align-self: stretch;
|
|
466
|
+
}
|
|
467
|
+
|
|
412
468
|
.horizontal-step.is-completed:not(:last-child)::after {
|
|
413
469
|
background-color: var(--brand-green); /* brand green */
|
|
414
470
|
}
|
|
415
471
|
|
|
416
472
|
.step-indicator {
|
|
417
|
-
width: 2.
|
|
418
|
-
height: 2.
|
|
473
|
+
width: 2.75rem;
|
|
474
|
+
height: 2.75rem;
|
|
419
475
|
border-radius: 50%;
|
|
420
476
|
border: 2px solid #e0e0e0;
|
|
421
477
|
display: flex;
|
|
@@ -423,7 +479,8 @@ pre {
|
|
|
423
479
|
justify-content: center;
|
|
424
480
|
background-color: white;
|
|
425
481
|
transition: all 0.3s ease;
|
|
426
|
-
|
|
482
|
+
flex: 0 0 auto;
|
|
483
|
+
z-index: 2;
|
|
427
484
|
}
|
|
428
485
|
|
|
429
486
|
.horizontal-step.is-active .step-indicator {
|
|
@@ -443,14 +500,18 @@ pre {
|
|
|
443
500
|
}
|
|
444
501
|
|
|
445
502
|
.step-number {
|
|
446
|
-
font-
|
|
447
|
-
font-
|
|
503
|
+
font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
|
|
504
|
+
font-weight: 500;
|
|
505
|
+
font-size: 0.95rem;
|
|
448
506
|
}
|
|
449
507
|
|
|
450
508
|
.step-label {
|
|
451
|
-
font-
|
|
452
|
-
|
|
509
|
+
font-family: var(--font-family-mono, 'IBM Plex Mono', monospace);
|
|
510
|
+
font-size: 9.5px;
|
|
511
|
+
letter-spacing: 0.07em;
|
|
512
|
+
text-transform: uppercase;
|
|
453
513
|
font-weight: 500;
|
|
514
|
+
color: var(--dark-grey, #7a7b7a);
|
|
454
515
|
}
|
|
455
516
|
|
|
456
517
|
.horizontal-step.is-active .step-label {
|
|
@@ -459,17 +520,15 @@ pre {
|
|
|
459
520
|
|
|
460
521
|
.step-content {
|
|
461
522
|
padding: 0.5rem 0;
|
|
462
|
-
/*
|
|
463
|
-
|
|
464
|
-
margin-
|
|
523
|
+
/* Flush-left: the form shares the indicators' left edge (the first circle),
|
|
524
|
+
instead of the old step-count-based magic margin. */
|
|
525
|
+
margin-left: 0;
|
|
526
|
+
margin-right: 0;
|
|
465
527
|
}
|
|
466
528
|
|
|
467
|
-
/* Adjust margins for larger screens (> 700px) */
|
|
468
529
|
@media (min-width: 700px) {
|
|
469
530
|
.step-content {
|
|
470
531
|
padding: 1.5rem 0;
|
|
471
|
-
margin-left: calc((100% / var(--step-count, 1)) * 0.45 - 1.25rem);
|
|
472
|
-
margin-right: calc((100% / var(--step-count, 1)) * 0.45 - 1.25rem);
|
|
473
532
|
}
|
|
474
533
|
}
|
|
475
534
|
|
|
@@ -511,7 +570,9 @@ pre {
|
|
|
511
570
|
.theme-brand.steps .step-checkmark-icon {
|
|
512
571
|
position: absolute;
|
|
513
572
|
left: -39px;
|
|
514
|
-
|
|
573
|
+
/* Match the centred number circle. */
|
|
574
|
+
top: 50%;
|
|
575
|
+
transform: translateY(-50%);
|
|
515
576
|
display: flex;
|
|
516
577
|
align-items: center;
|
|
517
578
|
justify-content: center;
|
|
@@ -524,18 +585,22 @@ pre {
|
|
|
524
585
|
left: -41px;
|
|
525
586
|
width: 32px;
|
|
526
587
|
height: 32px;
|
|
527
|
-
top:
|
|
588
|
+
top: 50%;
|
|
528
589
|
}
|
|
529
590
|
|
|
530
591
|
/* Brand theme - Horizontal step indicators */
|
|
531
592
|
.theme-brand .step-indicator {
|
|
532
593
|
background-color: var(--grey-light);
|
|
594
|
+
border-color: transparent; /* flat grey upcoming circle (matches mockup) */
|
|
595
|
+
color: var(--dark-grey, #7a7b7a);
|
|
533
596
|
}
|
|
534
597
|
|
|
535
598
|
.theme-brand .horizontal-step.is-active .step-indicator {
|
|
536
599
|
border-color: var(--brand-green);
|
|
537
600
|
background-color: var(--brand-green);
|
|
538
601
|
color: var(--brand-black);
|
|
602
|
+
/* Soft green ring around the current step (matches mockup). */
|
|
603
|
+
box-shadow: 0 0 0 4px rgba(0, 255, 157, 0.2);
|
|
539
604
|
}
|
|
540
605
|
|
|
541
606
|
.theme-brand .horizontal-step.is-completed .step-indicator {
|
|
@@ -557,9 +622,9 @@ pre {
|
|
|
557
622
|
background-color: var(--brand-green);
|
|
558
623
|
}
|
|
559
624
|
|
|
560
|
-
.theme-brand .horizontal-step.is-active .step-label
|
|
625
|
+
.theme-brand .horizontal-step.is-active .step-label,
|
|
626
|
+
.theme-brand .horizontal-step.is-completed .step-label {
|
|
561
627
|
color: var(--brand-black);
|
|
562
|
-
font-weight: 600;
|
|
563
628
|
}
|
|
564
629
|
|
|
565
630
|
.theme-brand .step-number {
|
|
@@ -2,6 +2,9 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { parseData } from "../../utils/sharedUtils";
|
|
3
3
|
export class EdsStepsV2 {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.onResize = () => {
|
|
6
|
+
this.isMobile = typeof window !== 'undefined' && window.innerWidth < 750;
|
|
7
|
+
};
|
|
5
8
|
this.handleTitleClick = (index) => {
|
|
6
9
|
// In linear mode, do NOT collapse; only navigate if allowed.
|
|
7
10
|
if (this.type === 'linear') {
|
|
@@ -29,11 +32,12 @@ export class EdsStepsV2 {
|
|
|
29
32
|
};
|
|
30
33
|
this.handleNext = () => {
|
|
31
34
|
const lastIndex = this.parsedSteps.length - 1;
|
|
32
|
-
// On last step:
|
|
35
|
+
// On last step: stay on the last step and just emit finished. Collapsing
|
|
36
|
+
// here (activeStep = -1) left the form as an empty "Step 0" shell whenever
|
|
37
|
+
// the host's submit was rejected (e.g. single-submission already used) —
|
|
38
|
+
// the success path navigates away, so there's nothing to collapse for.
|
|
33
39
|
if (this.activeStep >= lastIndex) {
|
|
34
40
|
this.finished.emit();
|
|
35
|
-
this.activeStep = -1; // collapse the content
|
|
36
|
-
this.step.emit(this.activeStep); // notify change (-1 sentinel)
|
|
37
41
|
return;
|
|
38
42
|
}
|
|
39
43
|
const target = this.activeStep + 1;
|
|
@@ -77,9 +81,15 @@ export class EdsStepsV2 {
|
|
|
77
81
|
this.backLabel = 'Back';
|
|
78
82
|
this.finishLabel = 'Finish';
|
|
79
83
|
this.showFinish = true;
|
|
84
|
+
this.card = true;
|
|
80
85
|
this.disableNext = false;
|
|
81
86
|
this.headingLevel = 'h4';
|
|
82
87
|
this.activeStep = 0;
|
|
88
|
+
this.isMobile = false;
|
|
89
|
+
}
|
|
90
|
+
/** Nav button size: comfortable on desktop, compact on mobile. */
|
|
91
|
+
get navBtnSize() {
|
|
92
|
+
return this.isMobile ? 'small' : 'large';
|
|
83
93
|
}
|
|
84
94
|
handleDisableNextChange(newValue) {
|
|
85
95
|
if (typeof newValue === 'string' && newValue.trim().startsWith('[')) {
|
|
@@ -114,6 +124,17 @@ export class EdsStepsV2 {
|
|
|
114
124
|
}
|
|
115
125
|
componentWillLoad() {
|
|
116
126
|
this.handleDisableNextChange(this.disableNext);
|
|
127
|
+
this.onResize();
|
|
128
|
+
}
|
|
129
|
+
connectedCallback() {
|
|
130
|
+
if (typeof window !== 'undefined') {
|
|
131
|
+
window.addEventListener('resize', this.onResize);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
disconnectedCallback() {
|
|
135
|
+
if (typeof window !== 'undefined') {
|
|
136
|
+
window.removeEventListener('resize', this.onResize);
|
|
137
|
+
}
|
|
117
138
|
}
|
|
118
139
|
componentDidLoad() {
|
|
119
140
|
if (this.type === 'linear') {
|
|
@@ -134,7 +155,9 @@ export class EdsStepsV2 {
|
|
|
134
155
|
linkElement.dispatchEvent(event);
|
|
135
156
|
}
|
|
136
157
|
articleClasses() {
|
|
137
|
-
|
|
158
|
+
// The card chrome is opt-out so a host that already provides the frame
|
|
159
|
+
// (e.g. a multi-step form's outer form-style wrapper) isn't double-bordered.
|
|
160
|
+
return this.card ? 'border-softer relative rounded-lg border-2' : 'relative';
|
|
138
161
|
}
|
|
139
162
|
get parsedSteps() {
|
|
140
163
|
return parseData(this.steps);
|
|
@@ -198,21 +221,26 @@ export class EdsStepsV2 {
|
|
|
198
221
|
this.handleTitleClick(index);
|
|
199
222
|
}
|
|
200
223
|
};
|
|
201
|
-
return (h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, h("div", { class: "step-indicator" }, isCompleted ? (h("eds-icon-wrapper", { name: "checkmark", size: 20 })) : (h("span", { class: "step-number" }, index + 1))), h("span", { class: `
|
|
224
|
+
return (h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, h("div", { class: "step-indicator" }, isCompleted ? (h("eds-icon-wrapper", { name: "checkmark", size: 20 })) : (h("span", { class: "step-number" }, index + 1))), h("span", { class: `step-label ${forwardBlocked ? 'opacity-50' : ''}` }, step.title)));
|
|
202
225
|
}
|
|
203
226
|
render() {
|
|
204
227
|
const steps = this.parsedSteps;
|
|
205
|
-
|
|
228
|
+
// Top margin separates the buttons from the fields; bottom margin gives them
|
|
229
|
+
// breathing room from whatever follows (e.g. the next vertical step).
|
|
230
|
+
const marginClass = this.orientation === 'horizontal' ? 'mt-64 mb-16' : 'mt-32 mb-32';
|
|
206
231
|
const themeClass = this.theme === 'brand' ? 'theme-brand' : 'theme-default';
|
|
207
|
-
return (h("div", { key: '
|
|
232
|
+
return (h("div", { key: '84383c5655004ccc0bcc144f3765c2d0b000cad6', class: this.articleClasses() }, this.imageSrc ? (h("div", { class: "w-full mb-12 rounded-t-lg overflow-hidden border-2" }, h("eds-img", { src: this.imageSrc, width: this.imageWidth, "with-bg": "true", "lazy-load": "true", alt: "Step illustration" }))) : (this.message && (h("div", { class: `w-full ${this.theme === 'brand' ? 'bg-strongest' : 'bg-darker'} rounded-t-lg border-2` }, h("div", { class: "p-24" }, h("span", { class: `${this.theme === 'brand' ? 'text-accent' : 'text-inverse'} f-heading-04` }, this.message))))), h("div", { key: 'd5fb5bbf6a48b90bf0db1e79a61ba5e445986368', class: "steps-body pb-20", style: {
|
|
233
|
+
paddingLeft: 'var(--eds-steps-padding-x, 0.5rem)',
|
|
234
|
+
paddingRight: 'var(--eds-steps-padding-x, 0.5rem)'
|
|
235
|
+
} }, this.type === 'linear' && this.orientation === 'horizontal' ? (h("div", { class: `steps--horizontal ${themeClass}`, style: { '--step-count': steps.length.toString() } }, h("div", { class: "horizontal-indicators" }, steps.map((step, index) => this.renderHorizontalIndicator(step, index))), steps.map((step, index) => {
|
|
208
236
|
const isLast = index === steps.length - 1;
|
|
209
237
|
if (this.activeStep !== index) {
|
|
210
238
|
return null;
|
|
211
239
|
}
|
|
212
|
-
return (h("div", { class: "step-content", key: index, id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "arrow-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size:
|
|
240
|
+
return (h("div", { class: "step-content", key: index, id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "arrow-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size: this.navBtnSize, iconSmall: this.isMobile, pill: true }), (!isLast || this.showFinish) && (h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: isLast ? 'brand' : 'primary', icon: "arrow-right", onClick: this.handleNext, disabled: this.isNextDisabledFor(index), size: this.navBtnSize, iconSmall: this.isMobile, class: index > 0 ? 'ml-8' : null, pill: true }))), h("slot", { name: `actions-${index}` })));
|
|
213
241
|
}))) : this.type === 'linear' ? (h("div", { class: `steps ${themeClass}` }, steps.map((step, index) => {
|
|
214
242
|
const isCompleted = this.activeStep > index;
|
|
215
|
-
return (h("div", { class: `${index === 0 ? 'step' : 'step mt-16'} ${isCompleted ? 'is-completed' : ''}`, key: index }, this.renderHeading(step.title, index), this.activeStep === index && (h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "
|
|
243
|
+
return (h("div", { class: `${index === 0 ? 'step' : 'step mt-16'} ${isCompleted ? 'is-completed' : ''}`, key: index }, this.renderHeading(step.title, index), this.activeStep === index && (h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "chevron-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size: this.navBtnSize, iconSmall: this.isMobile, pill: true }), (index < steps.length - 1 || this.showFinish) && (h("eds-button", { label: index === steps.length - 1 ? this.finishLabel : this.nextLabel, intent: index === steps.length - 1 ? 'brand' : 'primary', icon: "chevron-right", onClick: this.handleNext, disabled: this.isNextDisabledFor(index), size: this.navBtnSize, iconSmall: this.isMobile, class: index > 0 ? 'ml-8' : null, pill: true })))))));
|
|
216
244
|
}))) : (h("div", { class: `steps space-y-8 ${themeClass}` }, steps.map((step, index) => (h("div", { class: "step", key: index }, this.renderHeading(step.title, index), h("div", { class: "content", id: `eds-step-panel-${index}` }, h("div", { class: "content-body" }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content }))))))))))));
|
|
217
245
|
}
|
|
218
246
|
static get is() { return "eds-steps-v2"; }
|
|
@@ -430,6 +458,24 @@ export class EdsStepsV2 {
|
|
|
430
458
|
"reflect": false,
|
|
431
459
|
"defaultValue": "true"
|
|
432
460
|
},
|
|
461
|
+
"card": {
|
|
462
|
+
"type": "boolean",
|
|
463
|
+
"mutable": false,
|
|
464
|
+
"complexType": {
|
|
465
|
+
"original": "boolean",
|
|
466
|
+
"resolved": "boolean",
|
|
467
|
+
"references": {}
|
|
468
|
+
},
|
|
469
|
+
"required": false,
|
|
470
|
+
"optional": false,
|
|
471
|
+
"docs": {
|
|
472
|
+
"tags": [],
|
|
473
|
+
"text": "Whether the stepper draws its own bordered card. Default true. Set to false\nwhen the host already provides the card chrome (e.g. a multi-step form whose\nform-style border lives on an outer wrapper) to avoid a double border."
|
|
474
|
+
},
|
|
475
|
+
"attribute": "card",
|
|
476
|
+
"reflect": false,
|
|
477
|
+
"defaultValue": "true"
|
|
478
|
+
},
|
|
433
479
|
"disableNext": {
|
|
434
480
|
"type": "any",
|
|
435
481
|
"mutable": true,
|
|
@@ -473,7 +519,8 @@ export class EdsStepsV2 {
|
|
|
473
519
|
}
|
|
474
520
|
static get states() {
|
|
475
521
|
return {
|
|
476
|
-
"activeStep": {}
|
|
522
|
+
"activeStep": {},
|
|
523
|
+
"isMobile": {}
|
|
477
524
|
};
|
|
478
525
|
}
|
|
479
526
|
static get events() {
|
|
@@ -5,12 +5,7 @@ export default {
|
|
|
5
5
|
argTypes: {
|
|
6
6
|
steps: {
|
|
7
7
|
control: 'object',
|
|
8
|
-
description: 'Array of step objects'
|
|
9
|
-
defaultValue: [
|
|
10
|
-
{ title: 'Step One', content: '<p>Details for step one.</p>' },
|
|
11
|
-
{ title: 'Step Two', content: '<p>Details for step two.</p>' },
|
|
12
|
-
{ title: 'Step Three', content: '<p>Details for step three.</p>' }
|
|
13
|
-
]
|
|
8
|
+
description: 'Array of step objects'
|
|
14
9
|
},
|
|
15
10
|
orientation: {
|
|
16
11
|
control: { type: 'select' },
|
|
@@ -20,17 +15,28 @@ export default {
|
|
|
20
15
|
type: {
|
|
21
16
|
control: 'select',
|
|
22
17
|
options: ['static', 'linear'],
|
|
23
|
-
description: 'Stepper type: static (all steps) or linear (one at a time)'
|
|
24
|
-
|
|
18
|
+
description: 'Stepper type: static (all steps) or linear (one at a time)'
|
|
19
|
+
},
|
|
20
|
+
theme: {
|
|
21
|
+
control: 'select',
|
|
22
|
+
options: ['default', 'brand'],
|
|
23
|
+
description: 'Visual theme. "brand" is the dark/green look multi-step brand forms use.'
|
|
24
|
+
},
|
|
25
|
+
card: {
|
|
26
|
+
control: 'boolean',
|
|
27
|
+
description: 'Draw the stepper\'s own card chrome (border/background). Set false when an outer wrapper already carries it — e.g. the brand multi-step form card.'
|
|
28
|
+
},
|
|
29
|
+
disableNext: {
|
|
30
|
+
control: 'boolean',
|
|
31
|
+
description: 'Disable the Next button (boolean for all steps, or an array/JSON string per step) — used to gate advancing until the current step validates.'
|
|
25
32
|
},
|
|
26
33
|
imageSrc: {
|
|
27
34
|
control: 'text',
|
|
28
35
|
description: 'URL of the image to display above the steps'
|
|
29
36
|
},
|
|
30
|
-
|
|
31
|
-
control: '
|
|
32
|
-
description: '
|
|
33
|
-
defaultValue: true
|
|
37
|
+
imageWidth: {
|
|
38
|
+
control: 'number',
|
|
39
|
+
description: 'Rendered width (px) of the image above the steps'
|
|
34
40
|
},
|
|
35
41
|
message: {
|
|
36
42
|
control: 'text',
|
|
@@ -40,8 +46,7 @@ export default {
|
|
|
40
46
|
name: 'heading-level',
|
|
41
47
|
control: { type: 'select' },
|
|
42
48
|
options: ['h3', 'h4', 'h5'],
|
|
43
|
-
description: 'Semantic heading tag to render for each step title'
|
|
44
|
-
defaultValue: 'h4'
|
|
49
|
+
description: 'Semantic heading tag to render for each step title'
|
|
45
50
|
},
|
|
46
51
|
nextLabel: {
|
|
47
52
|
control: 'text',
|
|
@@ -68,8 +73,11 @@ export default {
|
|
|
68
73
|
],
|
|
69
74
|
orientation: 'vertical',
|
|
70
75
|
type: 'static',
|
|
76
|
+
theme: 'default',
|
|
77
|
+
card: true,
|
|
78
|
+
disableNext: false,
|
|
71
79
|
imageSrc: '',
|
|
72
|
-
|
|
80
|
+
imageWidth: undefined,
|
|
73
81
|
message: 'No image available',
|
|
74
82
|
headingLevel: 'h4',
|
|
75
83
|
nextLabel: 'Next',
|
|
@@ -78,15 +86,17 @@ export default {
|
|
|
78
86
|
showFinish: true
|
|
79
87
|
}
|
|
80
88
|
};
|
|
81
|
-
const Template = ({ steps, type, orientation, imageSrc, imageWidth,
|
|
89
|
+
const Template = ({ steps, type, orientation, theme, card, disableNext, imageSrc, imageWidth, message, headingLevel, nextLabel, backLabel, finishLabel, showFinish }) => html `
|
|
82
90
|
<div class="grid grid-layout grid-cols-2">
|
|
83
91
|
<eds-steps-v2
|
|
84
92
|
.steps=${steps}
|
|
85
93
|
type="${type}"
|
|
86
94
|
orientation="${orientation}"
|
|
95
|
+
theme="${theme || 'default'}"
|
|
96
|
+
.card=${card}
|
|
97
|
+
.disableNext=${disableNext}
|
|
87
98
|
.imageSrc=${imageSrc}
|
|
88
99
|
.imageWidth=${imageWidth}
|
|
89
|
-
?bg=${bg}
|
|
90
100
|
message="${message || ''}"
|
|
91
101
|
heading-level="${headingLevel}"
|
|
92
102
|
next-label="${nextLabel}"
|
|
@@ -131,3 +141,56 @@ LinearHorizontal.parameters = {
|
|
|
131
141
|
}
|
|
132
142
|
}
|
|
133
143
|
};
|
|
144
|
+
/* How brand multi-step forms actually mount the stepper (FormsPage): linear +
|
|
145
|
+
horizontal, theme="brand", and card=false because the OUTER brand card
|
|
146
|
+
carries the chrome — recreated here with a dark rounded wrapper. */
|
|
147
|
+
export const BrandTheme = ({ steps, disableNext }) => html `
|
|
148
|
+
<div class="grid grid-layout grid-cols-2">
|
|
149
|
+
<div class="bg-inverse rounded-xs overflow-hidden" style="--eds-steps-padding-x: 2rem;">
|
|
150
|
+
<div class="bg-strongest p-32">
|
|
151
|
+
<p class="f-heading-05 text-inverse m-0">Attendee Confirmation Survey</p>
|
|
152
|
+
</div>
|
|
153
|
+
<eds-steps-v2
|
|
154
|
+
.steps=${steps}
|
|
155
|
+
type="linear"
|
|
156
|
+
orientation="horizontal"
|
|
157
|
+
theme="brand"
|
|
158
|
+
.card=${false}
|
|
159
|
+
.disableNext=${disableNext}
|
|
160
|
+
next-label="Next"
|
|
161
|
+
back-label="Back"
|
|
162
|
+
finish-label="Submit"
|
|
163
|
+
?show-finish=${true}
|
|
164
|
+
></eds-steps-v2>
|
|
165
|
+
</div>
|
|
166
|
+
</div>
|
|
167
|
+
`;
|
|
168
|
+
BrandTheme.storyName = 'Brand Theme (multi-step form)';
|
|
169
|
+
BrandTheme.args = {
|
|
170
|
+
steps: [
|
|
171
|
+
{ title: 'Step 1', content: '<p>About you — name, email, institution.</p>' },
|
|
172
|
+
{ title: 'Step 2', content: '<p>Logistics — attendance, dietary needs, sessions.</p>' }
|
|
173
|
+
],
|
|
174
|
+
disableNext: false
|
|
175
|
+
};
|
|
176
|
+
BrandTheme.parameters = {
|
|
177
|
+
docs: {
|
|
178
|
+
description: {
|
|
179
|
+
story: 'theme="brand" + card=false, exactly as multi-step brand forms mount it: the outer card provides the chrome (dark hero above), the stepper renders flush. Toggle disableNext to see the gated Next button.'
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
export const DisabledNext = Template.bind({});
|
|
184
|
+
DisabledNext.storyName = 'Linear — Next disabled';
|
|
185
|
+
DisabledNext.args = {
|
|
186
|
+
type: 'linear',
|
|
187
|
+
orientation: 'horizontal',
|
|
188
|
+
disableNext: true
|
|
189
|
+
};
|
|
190
|
+
DisabledNext.parameters = {
|
|
191
|
+
docs: {
|
|
192
|
+
description: {
|
|
193
|
+
story: 'disableNext gates advancing (forms set it while the current step has validation errors). Accepts a boolean for all steps or an array/JSON string per step.'
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|